

html, body, #__next {
    height: 100%;

    /*font-family: "Work Sans" !important;*/
    /* Inter (loaded in pages/_app.js). A white-label domain font is injected after this file with
       its own !important, so it still wins. */
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Background colours for pre-hydration and PWA cold start: match the resolved theme from first
   paint to prevent light flash when dark mode is set. Applied to html so it's available before
   body renders. Swarm default is dark (#191B1F), light mode is white. */
html, body {
    background-color: #191B1F;
}
html.light-mode, body.light-mode,
html.light-mode body, body.light-mode body {
    background-color: #ffffff;
}
/* Form controls take the app font (browsers default them to the system font). Family only: antd
   sizes its own inputs. */
button, input, select, textarea { font-family: inherit; }

/************SWARM VARIABLES**************/
/*****https://mycolor.space/?hex=%23FF3E77&sub=1*****/
:root {
    --white: #fff;
    --white-hover: rgba(0, 0, 0, 0.2);
    --white-60: rgba(255, 255, 255, 0.6);
    --white-80: rgba(255, 255, 255, 0.4);
    --white-90: rgba(255, 255, 255, 0.3);
    --disabled-color: rgba(255, 255, 255, 0.25);
    --background-55: rgba(0, 0, 0, 0.55);
    --black: rgba(1, 0, 0, 0.85);
    --telePrompterBackground: linear-gradient(-180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0) 100%) transparent;
    --telePrompterShadow: rgba(0, 0, 0, 0.5) 0px 0px 20px;
    --cardShadow: 0 0 8px rgba(0, 0, 0, 0.45);
    --sceneTitleBackground: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
    --darkButtonBackground: rgba(255, 255, 255, 0.035);
    --cardBackground: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0)) no-repeat;
    --cardBackgroundHover: rgba(0, 0, 0, 0.25);
  
    --cardWidth: max(calc(18vh * 1.333), 120px);
    --cardHeight: 18dvh;

    --primary-color-grad1: #7421FC;
    --primary-color-grad2: #7421FC ;
    --secondary-color-grad1: #7421FC;
    --secondary-color-grad2: #7421FC;
    --line-color: var(--white-90); 
    --primary-gradient: linear-gradient(90deg, var(--primary-color-grad1) var(--primary-color-grad2));
    --secondary-gradient: linear-gradient(90deg, var(--secondary-color-grad1) var(--secondary-color-grad2));
    --background-hover: var(--primary-color);
    --sidebar-background: #191B1F; 
    --sidebar-background-hover: rgba(6, 14, 43, 0.3); 
    --listview-background: #F0F2F5;
    --listview-background-lighter: #f3f3f3;
    --listview-background-darker: rgba(225, 225, 225, 0.4);
    --background-faded: #D7DADD;
  
    --primary-color: #7421FC;
    --primary-color-80: #8758F9;
    --primary-color-60: #9170F9;
    --primary-color-40: #A18BFC;
    --primary-color-20: var(--listview-background);
  
    --destructive-color: #F3025D;
    --destructive-color-80: #DF025A;
  
  
    --secondary-color: #7421FC;
    --secondary-color-80: #8758F9;
    --secondary-color-60: #9170F9;
    --secondary-color-40: #f8f8f8;
    --secondary-color-20: #f8f8f8;

    --pricing-sidebar-color: var(--sidebar-background);
  
    --secondary-color-faded: #058BDD;
    --secondary-color-light: rgba(5, 150, 221, 0.85);
    --secondary-gray: #8E8E8E;
    --secondary-gray-light: #F0F2F5;
    --secondary-gray-light2: #e5eaee;
  
    --text-link-color: var(--primary-color);
    --text-color: #4e5266;
    --text-color-dark: rgba(0, 0, 0, 0.85);
    --background-color: #d0dae4;
    --default-icon-color: #7bd3c8;
    --editable-active-color: #F0F2F5;
    --offwhite-color: rgba(225, 225, 225, 0.1);
  
    --blankslate-heading-color: rgba(0, 0, 0, 0.85);
    --blankslate-subheading-color: rgba(0, 0, 0, 0.5);
  
    --accent-color-yellow: #fff;
    --accent-color-yellow-20: #fff;
    --accent-color-yellow-darker: #fff;
  
    --accent-color-green: #00A86B ;
    --accent-color-green-darker: rgb(21, 168, 154) ;
    --accent-color-green-80: #57C3B6;
    --accent-color-green-60: #66D2C8 ; 
    --accent-color-green-40: #AFE1DB;
    --accent-color-green-20: #D7F1ED; 

    --accent-orange: #FA8264;
    --accent-yellow: #E8C723;
    --accent-blue: #088BDE;
    --highlight-color: rgba(240, 245, 255, 1);
    --highlight-color-lighter: rgba(240, 245, 255, 0.8); /*approx. #f0f5ff at 80% opacity on white*/
    --fire-color: #F97316;
    --fire-color-80: #FED7AA; /*80% of fire-color*/
    
    --leftnav: #191B1F; 
    --scene-background: #2B2E31;
    --card-scene-background: #232527;
    --feed-background: var(--scene-background);
    --chat-background: var(--scene-background);
    --topnav-background: #191B1F;
    --topnav-background-80: #2B2E31;
  
    --fontFamily: "Work Sans"; 
  
    --buttonBackgroundDarkOpaque: rgba(0,0,0,0.35);

    /*--card-shadow:  0 1px 2px -2px rgba(255, 255, 255, 0.25), 0 3px 6px 0 rgba(255, 255, 255, 0.20), 0 5px 12px 4px rgba(255, 255, 255, 0.15);*/
    --card-shadow: 0 1px 2px -2px rgba(0, 0, 0, 0.16), 0 3px 6px 0 rgba(0, 0, 0, 0.12), 0 5px 12px 4px rgba(0, 0, 0, 0.09);

  
  
    /*** PROMPTS ***/
    --promptButtonColor: var(--primary-color);
    --promptButtonColorLight: var(--primary-color-80);
    --promptButtonColorLighter: var(--primary-color-60);
    --promptChoiceButtonColor:  rgba(10, 10, 10, 0.2);
    --promptChoiceButtonColorHover: rgba(255, 255, 255, 0.2);


    --promptTextColor: var(--white);
    --promptBackgroundColor: var(--leftnav);
    --promptBackgroundColorLight: var( --background-color);
    --promptTextBackgroundColor: unset;
    --promptTextFontFamily: inherit;
    --promptTitleColor: white;
  
    /*** WALL OF LOVE ***/
  
    --wolCarouselHeight: 500px;
    --wolCarouseDotsColor: var(  --text-color);
    --wolFeedWidth: 25vw;
    --wolFontFamily: inherit;
    --wolFontForTextPosts: 'Helvetica Neue', Roboto, 'Segoe UI', Calibri, sans-serif;
    --wolFontSize: 1.25rem;
    --wolFontSizeTitle: 1.6rem;
    --wolTitleColor: inherit;
    --wolBackgroundColor: transparent;
    --wolPrimaryColor: var(--primary-color);
    --wolSecondaryColor: var(--secondary-color);
  
    --wolDarkModeBackground: rgb(21, 32, 43);
    --wolDarkModeColor: rgb(247, 249, 249);
    --wolDarkModeColor-80: rgba(139,152,165);
  
    --wolDarkModeBorderColor: rgb(21, 32, 43);

    --wolPlaceholderBackground: var(--card-scene-background);


    /*****STORE*****/
    --store-background-color: inherit;
    --store-text-color: inherit;
    /*--store-border-color: var(--secondary-gray);*/
    --store-primary-color: inherit;
    --store-card-background-color: var(--card-scene-background);
    /*****TOPIC PALETTE*****/
    /* Six fixed chip colours, keyed by name in lib/topicColors.js.
     *
     * Defined ONCE, outside any theme block, so a topic is the same colour in light mode and
     * dark. They were themed per mode at first — pale tint with dark text in light, dark tint
     * with pale text in dark — and the inversion made the same topic read as two different
     * things depending on the viewer's theme. A topic's colour is its identity, so it is a
     * fixed sticker on whatever ground it lands on. Every fg/bg pair clears 4.5:1, and that
     * ratio is internal to the chip, so it holds on either surface.
     *
     * Deliberately NOT built on --primary-color / --accent-color-green either: both are
     * rewritten per white-label domain, which would make "purple" render red on a red-branded
     * space. */
    --topic-purple-bg: #EDE6FE;
    --topic-purple-fg: #3D1A8F;
    --topic-purple-dot: #7421FC;

    --topic-green-bg: #D7F1ED;
    --topic-green-fg: #0B5E47;
    --topic-green-dot: #00A86B;

    --topic-orange-bg: #FDE4DC;
    --topic-orange-fg: #9A3412;
    --topic-orange-dot: #FA8264;

    --topic-yellow-bg: #FDF1C7;
    --topic-yellow-fg: #854D0E;
    --topic-yellow-dot: #E0A400;

    --topic-blue-bg: #DBEAFE;
    --topic-blue-fg: #1E40AF;
    --topic-blue-dot: #3A8EE0;

    --topic-slate-bg: #EEF0F3;
    --topic-slate-fg: #4E5266;
    --topic-slate-dot: #8E8E8E;

    /* The cover-image fallback for an event with NO topic. Fixed for the same reason: it sits
       beside topic-coloured tiles in the same list, and a neutral that flipped with the theme
       would be the one tile that changed character. Distinct from slate by its border. */
    --topic-neutral-bg: #F4F6F8;
    --topic-neutral-fg: #4E5266;
    --topic-neutral-border: #DFE3E8;

  }



  /*****LIGHT MODE*****/


  .light-mode {
    --white: rgba(0, 0, 0, 0.85);
    --white-60: rgba(0, 0, 0, 0.6);
    --white-80: rgba(0, 0, 0, 0.7);
    --white-90: rgba(0, 0, 0, 0.15);
    --disabled-color: rgba(0, 0, 0, 0.45);
    --background-55: rgba(255, 255, 255, 0.75);
    --white-hover: #F8F9FA;
    --black: rgba(0, 0, 0, 0.05);
    --textPromptBackground: none;
    --textPromptShadow: none;
    --cardShadow: 0 0 5px rgba(0, 0, 0, 0.1);
    --sceneTitleBackground: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
    --darkButtonBackground: rgba(255, 255, 255, 0.8);
    --cardBackground: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0)) no-repeat;
    --cardBackgroundHover: rgba(0, 0, 0, 0.25);

    --primary-color-grad1: #7421FC;
    --primary-color-grad2: #7421FC ;
    --secondary-color-grad1: #7421FC;
    --secondary-color-grad2: #7421FC;
    --line-color: #e4e7eb; 
    --primary-gradient: linear-gradient(90deg, var(--primary-color-grad1) var(--primary-color-grad2));
    --secondary-gradient: linear-gradient(90deg, var(--secondary-color-grad1) var(--secondary-color-grad2));
    --background-hover: var(--primary-color);
    --sidebar-background: #fff; 
    --sidebar-background-hover: var(--white-hover); 
    --listview-background: #F8F9FA;
    --listview-background-lighter: #f3f3f3;
    --listview-background-darker: rgba(225, 225, 225, 0.4);
    --background-faded: #e4e7eb;
  
    --primary-color: #7421FC;
    --primary-color-80: #8758F9;
    --primary-color-60: #9170F9;
    --primary-color-40: #A18BFC;
    --primary-color-20: var(--listview-background);;
  
    --destructive-color: #F3025D;
    --destructive-color-80: #DF025A;
  
  
    --secondary-color: #7421FC;
    --secondary-color-80: #8758F9;
    --secondary-color-60: #9170F9;
    --secondary-color-40: #f8f8f8;
    --secondary-color-20: #f8f8f8;

    --pricing-sidebar-color: var(--sidebar-background);
  
    --secondary-color-faded: #058BDD;
    --secondary-color-light: rgba(5, 150, 221, 0.85);
    --secondary-gray: #e4e7eb;
    /*--secondary-gray-light: #000;*/
    --secondary-gray-light2: rgba(0, 0, 0, 0.75);
  
    --text-link-color: var(--primary-color);
    --text-color: #4e5266;
    --text-color-dark: rgba(0, 0, 0, 0.85);
    --background-color: #d0dae4;
    --default-icon-color: #7bd3c8;
    --editable-active-color: #F0F2F5;
    --offwhite-color: rgba(225, 225, 225, 0.1);
  
    --blankslate-heading-color: rgba(0, 0, 0, 0.85);
    --blankslate-subheading-color: rgba(0, 0, 0, 0.5);
  
    --accent-color-yellow: #fff;
    --accent-color-yellow-20: #fff;
    --accent-color-yellow-darker: #fff;
  
    --accent-color-green: #00A86B ;
    --accent-color-green-darker: rgb(21, 168, 154) ;
    --accent-color-green-80: #57C3B6;
    --accent-color-green-60: #66D2C8 ; 
    --accent-color-green-40: #AFE1DB;
    --accent-color-green-20: #D7F1ED; 
    
    --leftnav: #fff; 
    --scene-background: #F8F9FA;
    --card-scene-background: #FFFFFF;
    --feed-background: var(--scene-background);
    --chat-background: var(--scene-background);
    --topnav-background: #fff;
    --topnav-background-80: #F8F9FA;
  
    --fontFamily: "Work Sans";
  
    --buttonBackgroundDarkOpaque: rgba(0,0,0,0.35);
  
    --card-shadow: 0 1px 2px -2px rgba(0, 0, 0, 0.16), 0 3px 6px 0 rgba(0, 0, 0, 0.12), 0 5px 12px 4px rgba(0, 0, 0, 0.09);


    --promptChoiceButtonColor:  var(--primary-color);
    --promptChoiceButtonColorHover: var(--primary-color-80);

    --wolPlaceholderBackground: var(--secondary-gray-light);
    --wolDarkModeBackground: #fff;
    --wolDarkModeColor: rgba(0, 0, 0, 0.85);
    --wolDarkModeColor-80: rgba(83,100,113);
  
    --wolDarkModeBorderColor: #eee #ddd #bbb;

    /*****STORE*****/
    --store-background-color: inherit;
    --store-text-color: inherit;
   /* --store-border-color: var(--secondary-gray);*/
    --store-primary-color: inherit;
    --store-card-background-color: var(--card-scene-background);

  }
/*
  .ant-btn-round.ant-btn-lg{
    border-radius: 10px !important;
  }*/

.ant-switch-checked{
    background-color: var(--text-color-dark) !important;
    color: var(--white);
}

.ant-switch-unchecked{
    background-color: var(--white-hover) !important;
    color: var(--white);
}

.ant-switch-inner{
    color: white !important;
}

.ant-card-hoverable:hover{
  box-shadow: var(--card-shadow) !important;
 
}

.ant-card-hoverable:hover .ant-avatar{
  filter: brightness(1.1);
}
/*****CARD SURFACES*****/
/*
 * Feed-style content cards (posts, comments, the inline comment box, the reaction bar) are white
 * in both themes. A container can opt in to cards that follow the theme with `cards-follow-theme`:
 * dark cards in dark mode, white in light mode (body.light-mode). The podcast hub opts in; the
 * Feed and chat don't yet.
 *
 * Every use is written var(--card-x, <the original colour>), and these tokens exist only inside an
 * opted-in container in dark mode — `initial` makes them invalid again in light mode — so anything
 * that hasn't opted in renders exactly as before.
 */
.cards-follow-theme {
    --card-surface: var(--card-scene-background);
    /* Not pure white: glare in long posts. Same values as --text-primary / --text-muted. */
    --card-text: #E6E8EB;
    --card-text-muted: #8E95A2;
    --card-text-secondary: #B4BAC4;
    --card-line: rgba(255, 255, 255, 0.14);
    --card-hover: rgba(255, 255, 255, 0.07);
    /* A thread's band, a step lighter than the card (light mode uses a light grey for the same
       job). Solid, not see-through: threads and their containers are nested several deep, and a
       translucent tint stacked into lighter and lighter greys at each level. */
    --card-sunken: color-mix(in srgb, var(--card-scene-background), #FFFFFF 5%);
    --card-chip: rgba(255, 255, 255, 0.08);
    --card-chip-line: rgba(255, 255, 255, 0.16);
    --card-chip-text: rgba(255, 255, 255, 0.9);
    /* Links and link-coloured text: the brand colour's light tint reads on a dark card. */
    --card-link: var(--primary-color-40);
    /* The Ask AI bar's send button when there's something to send. */
    --card-ai-send: var(--primary-color);
    /* The editor's text-over-video treatment (teleprompter) is for text on a picture, not a card. */
    --textPromptBackground: none;
    --textPromptShadow: none;
}
/* Light mode, and anything inside a dark card that switches itself to light (the PDF viewer
   forces light-mode on its own box): back to the original colours. */
.light-mode .cards-follow-theme, .cards-follow-theme.light-mode, .cards-follow-theme .light-mode {
    --card-surface: initial;
    --card-text: initial;
    --card-text-muted: initial;
    --card-text-secondary: initial;
    --card-line: initial;
    --card-hover: initial;
    --card-sunken: initial;
    --card-chip: initial;
    --card-chip-line: initial;
    --card-chip-text: initial;
    --card-link: initial;
    --card-ai-send: initial;
}

/*
 * antd's Typography is fixed near-black (styles/global.css .ant-typography), and the Feed draws
 * names, post text and timestamps with it — so inside a card that has gone dark, it follows the
 * card's text colour instead. Dark mode only (body.light-mode keeps antd's own colours).
 */
body:not(.light-mode) .cards-follow-theme .ant-typography,
body:not(.light-mode) .cards-follow-theme h1.ant-typography,
body:not(.light-mode) .cards-follow-theme h2.ant-typography,
body:not(.light-mode) .cards-follow-theme h3.ant-typography,
body:not(.light-mode) .cards-follow-theme h4.ant-typography,
body:not(.light-mode) .cards-follow-theme h5.ant-typography {
    color: var(--card-text);
}
body:not(.light-mode) .cards-follow-theme .ant-typography.ant-typography-secondary {
    color: var(--card-text-muted);
}

/* antd's text buttons (the star / set-aside on a comment) are fixed near-black too. */
body:not(.light-mode) .cards-follow-theme .ant-btn-text {
    color: var(--card-text);
}
body:not(.light-mode) .cards-follow-theme .ant-btn-text:hover,
body:not(.light-mode) .cards-follow-theme .ant-btn-text:focus {
    color: var(--card-text);
    background: var(--card-hover);
}

/* "ghost-black" outline buttons (file attachments on a post or comment) are drawn in the fixed
   dark text colour; on a dark card they take the card's text and border colours instead. */
body:not(.light-mode) .cards-follow-theme .ant-btn-ghost-black,
body:not(.light-mode) .cards-follow-theme .ant-btn-ghost-black:focus {
    color: var(--card-text);
    border-color: var(--card-chip-line);
    background: transparent;
}
body:not(.light-mode) .cards-follow-theme .ant-btn-ghost-black:hover,
body:not(.light-mode) .cards-follow-theme .ant-btn-ghost-black:active {
    color: var(--card-text);
    border-color: var(--card-text-muted);
    background: var(--card-hover);
}

/* The formatting bubble over selected text (markdownInput.js BubbleMenu, a tippy box placed inside
   the editor). Its box is a fixed light grey (styles/global.css .tippy-box) while its buttons take
   the card's light text, so on a dark card it goes dark too. */
body:not(.light-mode) .cards-follow-theme .tippy-box {
    background-color: var(--card-surface) !important;
    border-color: var(--card-chip-line) !important;
}
body:not(.light-mode) .cards-follow-theme .tippy-box .ant-btn {
    color: var(--card-text);
}

/* Links on a dark card: the brand colour itself is too dark to read there, so they use its light
   tint (and mentions likewise). Buttons that happen to be links keep their own colours. */
body:not(.light-mode) .cards-follow-theme a:not(.ant-btn):not([class*="Button"]),
body:not(.light-mode) .cards-follow-theme a:not(.ant-btn):not([class*="Button"]):visited,
body:not(.light-mode) .cards-follow-theme .mention {
    color: var(--card-link);
}
body:not(.light-mode) .cards-follow-theme a:not(.ant-btn):not([class*="Button"]):hover {
    color: var(--card-link);
    text-decoration: underline;
}

/* antd's divider (the line above a post's reactions) is a near-invisible black hairline; on a dark
   card it uses the card's border colour, like the card's own edge. */
body:not(.light-mode) .cards-follow-theme .ant-divider-horizontal {
    border-top-color: var(--card-line);
}

/* antd text fields inside a card (the "Title (optional)" box when writing or editing a post) are
   white boxes by default; on a dark card they sit on the card with its text colour. */
body:not(.light-mode) .cards-follow-theme textarea.ant-input,
body:not(.light-mode) .cards-follow-theme input.ant-input,
body:not(.light-mode) .cards-follow-theme .ant-input-affix-wrapper {
    background-color: transparent;
    color: var(--card-text);
}
/* Placeholders: one colour for the title box (antd) and the body editor (tiptap,
   styles/global.css .is-editor-empty), which otherwise came out as two different greys. */
body:not(.light-mode) .cards-follow-theme textarea.ant-input::placeholder,
body:not(.light-mode) .cards-follow-theme input.ant-input::placeholder,
body:not(.light-mode) .cards-follow-theme .tiptap p.is-editor-empty:first-child::before {
    color: var(--card-text-muted);
    opacity: 1;
}

/* The inline "Ask AI" bar (aicopilot.js) opens in an antd Drawer placed inside the comment box,
   whose panel is white by default; on a dark card it takes the card's colour, and its input the
   card's border. */
body:not(.light-mode) .cards-follow-theme .ant-drawer-content,
body:not(.light-mode) .cards-follow-theme .ant-drawer-body {
    background-color: var(--card-surface);
    color: var(--card-text);
}
body:not(.light-mode) .cards-follow-theme .ant-input-affix-wrapper {
    border-color: var(--card-chip-line);
}
body:not(.light-mode) .cards-follow-theme .ant-input-affix-wrapper .ant-input-clear-icon,
body:not(.light-mode) .cards-follow-theme .ant-input-affix-wrapper .ant-input-prefix {
    color: var(--card-text-muted);
}

/* Polls (lib/react-polls) set their colours inline from a fixed near-black theme, so on a dark card
   they need !important to take the card's colours: text, borders, and the result bars' fill. The
   library's own class names are stable (they ship in its bundle). */
body:not(.light-mode) .cards-follow-theme [class*="styles_poll__"],
body:not(.light-mode) .cards-follow-theme [class*="styles_poll__"] [class*="styles_question__"],
body:not(.light-mode) .cards-follow-theme [class*="styles_poll__"] [class*="styles_option__"],
body:not(.light-mode) .cards-follow-theme [class*="styles_poll__"] [class*="styles_labels__"],
body:not(.light-mode) .cards-follow-theme [class*="styles_poll__"] [class*="styles_labels__"] *,
body:not(.light-mode) .cards-follow-theme [class*="styles_poll__"] [class*="styles_votes__"] {
    color: var(--card-text) !important;
}
body:not(.light-mode) .cards-follow-theme [class*="styles_poll__"] [class*="styles_question__"],
body:not(.light-mode) .cards-follow-theme [class*="styles_poll__"] [class*="styles_option__"],
body:not(.light-mode) .cards-follow-theme [class*="styles_poll__"] [class*="styles_result__"] {
    border-color: var(--card-chip-line) !important;
}
body:not(.light-mode) .cards-follow-theme [class*="styles_poll__"] [class*="styles_fill__"] {
    background-color: color-mix(in srgb, var(--primary-color-40) 35%, transparent) !important;
}
body:not(.light-mode) .cards-follow-theme [class*="styles_poll__"] [class*="styles_option__"]:hover {
    background: var(--card-hover) !important;
}

/* antd "link" buttons (Cancel under an inline editor, and similar) are the full brand colour,
   too dark on a dark card: they take the brand's light tint like other links. */
body:not(.light-mode) .cards-follow-theme .ant-btn-link,
body:not(.light-mode) .cards-follow-theme .ant-btn-link:focus {
    color: var(--card-link);
}
body:not(.light-mode) .cards-follow-theme .ant-btn-link:hover {
    color: var(--card-link);
    filter: brightness(1.15);
}

/* antd Cards (the Feed's card view, and other card grids inside a themed area) are fixed white with
   black text by default; inside a container that follows the theme they take the card colours. */
body:not(.light-mode) .cards-follow-theme .ant-card {
    background: var(--card-surface);
    border-color: var(--card-line);
    color: var(--card-text);
}
body:not(.light-mode) .cards-follow-theme .ant-card-meta-title {
    color: var(--card-text);
}
body:not(.light-mode) .cards-follow-theme .ant-card-meta-description {
    color: var(--card-text-muted);
}
body:not(.light-mode) .cards-follow-theme .ant-card-hoverable:hover {
    border-color: var(--card-chip-line);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}


/*****TYPE SCALE & TEXT COLOURS*****/
/*
 * Swarm community app typography. Sizes scale off --base-font-size (14px) like the --fs-* scale in
 * styles/global.css, so a white-label domainFontSize still rescales everything. Use with the line
 * heights noted. Weights: 400 body, 500 UI labels, 600 names/titles/buttons.
 * Letter-spacing: -0.01em at 18-20px, -0.02em at 24px and up.
 */
:root {
    --text-2xs: calc(var(--base-font-size) * 0.7857);  /* 11px / 16px: badges, counts */
    --text-xs:  calc(var(--base-font-size) * 0.8571);  /* 12px / 16px: meta, section labels, nav labels */
    --text-sm:  var(--base-font-size);                 /* 14px / 20px: UI default */
    --text-md:  calc(var(--base-font-size) * 1.1429);  /* 16px / 26px: post body */
    --text-lg:  calc(var(--base-font-size) * 1.2857);  /* 18px / 26px: hub title, date */
    --text-xl:  calc(var(--base-font-size) * 1.4286);  /* 20px / 28px: h2 in posts */
    --text-2xl: calc(var(--base-font-size) * 1.7143);  /* 24px / 32px: post titles */
    --text-3xl: calc(var(--base-font-size) * 2.1429);  /* 30px / 38px: h1 in posts */

    /* Hover fill for rows and quiet controls: lightens in both themes. (--white-hover is black at
       20% in dark mode, so hovers built on it darkened the dark sidebar.) Swarm only: shared rules
       use var(--hover-surface, <their old value>), so StoryPrompt keeps its own. */
    --hover-surface: rgba(255, 255, 255, 0.06);

    /* Dark. Contrast on the #191B1F sidebar / #232527 card: 14.1/12.5, 8.8/7.9, 5.7/5.1. */
    --text-primary: #E6E8EB;
    --text-secondary: #B4BAC4;
    --text-muted: #8E95A2;
    --text-color-muted: var(--text-muted);
}
.light-mode {
    --hover-surface: #F4F4F5;
    /* Light. Contrast on #FFF / #F8F9FA: 15.8/15.0, 7.7/7.3, 4.9/4.7. */
    --text-primary: #1F2328;
    --text-secondary: #4E5266;
    --text-muted: #6B7083;
    /* Re-declared: a var() resolves where it's declared, so :root's alias would stay dark. */
    --text-color-muted: var(--text-muted);
}
