/* ─────────────────────────────
   DESIGN SYSTEM FRAMEWORK
   ───────────────────────────── */


/* -- @font-face: Local fonts -- */
@font-face {
  font-family: "RecifeText";
  src: url("../fonts/recife-text/RecifeText-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Bugrino — Upright */
@font-face {
  font-family: "Bugrino";
  src: url("../fonts/bugrino/Bugrino-Fine.woff2") format("woff2");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bugrino";
  src: url("../fonts/bugrino/Bugrino-Thin.woff2") format("woff2");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bugrino";
  src: url("../fonts/bugrino/Bugrino-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bugrino";
  src: url("../fonts/bugrino/Bugrino-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bugrino";
  src: url("../fonts/bugrino/Bugrino-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bugrino";
  src: url("../fonts/bugrino/Bugrino-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bugrino";
  src: url("../fonts/bugrino/Bugrino-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bugrino";
  src: url("../fonts/bugrino/Bugrino-Heavy.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bugrino";
  src: url("../fonts/bugrino/Bugrino-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* Bugrino — Italic */
@font-face {
  font-family: "Bugrino";
  src: url("../fonts/bugrino/Bugrino-FineItalic.woff2") format("woff2");
  font-weight: 100;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Bugrino";
  src: url("../fonts/bugrino/Bugrino-ThinItalic.woff2") format("woff2");
  font-weight: 200;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Bugrino";
  src: url("../fonts/bugrino/Bugrino-LightItalic.woff2") format("woff2");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Bugrino";
  src: url("../fonts/bugrino/Bugrino-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Bugrino";
  src: url("../fonts/bugrino/Bugrino-MediumItalic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Bugrino";
  src: url("../fonts/bugrino/Bugrino-SemiBoldItalic.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Bugrino";
  src: url("../fonts/bugrino/Bugrino-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Bugrino";
  src: url("../fonts/bugrino/Bugrino-HeavyItalic.woff2") format("woff2");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Bugrino";
  src: url("../fonts/bugrino/Bugrino-BlackItalic.woff2") format("woff2");
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}


/* ------ 1. BRAND TOKENS ------ */

/*
 * Brand identity tokens (fonts, palette) are defined here.
 * Update these values when customising for a new project.
 */

:root {
  /* -- Typography -- */
  --font-primary: "Inclusive Sans", sans-serif;
  --font-secondary: "RecifeText", Georgia, serif;
  --font-tertiary: "Bugrino", sans-serif;
  --font-quaternary: "IBM Plex Mono", monospace;

  /* -- Palette -- */
  --off-white: var(--neutral-50); 
  --warm-white: #f5ebe3;
  --warm-black: #221f1c;
  --off-black: var(--neutral-900); 

  /* -- Accent colours -- */
  --red-lighter: #FFE8E3;
  --red-light: #FFD6CD;
  --red: #D92A27;
  --red-dark: #750D0B;
  --blue-lighter: #D5F3FF;
  --blue-light: #B1E6FC;
  --blue: #1A54D6;
  --blue-dark: #152F57;
  --yellow-lighter: #FFF3B8;
  --yellow-light: #FFEA83;
  --yellow: #FFB533;
  --yellow-dark: #7E5700;
  --green-lighter: #DBF7CC;
  --green-light: #B6D6A5;
  --green: #167255;
  --green-dark: #094C45;
  --purple-lighter: #F9E2FF;
  --purple-light: #F5CDFF;
  --purple: #AA4FE3;
  --purple-dark: #600E83;
  /* -- Base font sizes (rem-based, progressive step scale: +2px body, +4px heading, +8px display) -- */
  --font-3xs: 0.625rem;  /* 10px */
  --font-2xs: 0.75rem;   /* 12px */
  --font-xs: 0.875rem;   /* 14px */
  --font-s: 1rem;        /* 16px */
  --font-m: 1.125rem;    /* 18px */
  --font-l: 1.25rem;     /* 20px */
  --font-xl: 1.375rem;   /* 22px */
  --font-2xl: 1.5rem;    /* 24px */
  --font-3xl: 1.75rem;   /* 28px */
  --font-4xl: 2rem;      /* 32px */
  --font-5xl: 2.25rem;   /* 36px */
  --font-6xl: 2.5rem;    /* 40px */
  --font-7xl: 3rem;      /* 48px */
  --font-8xl: 3.5rem;    /* 56px */
  --font-9xl: 4rem;      /* 64px */
  --font-10xl: 4.5rem;   /* 72px */

  /* -- Semantic font sizes -- */
  --text-body: var(--font-m);

  /* -- UI font sizes -- */
  --button-font-size: var(--text-body);
  --button-font-size-small: var(--font-xs);

  /* -- Line height tokens -- */
  --line-height-xs: 0.7;
  --line-height-s: 1;
  --line-height-m: 1.3;
  --line-height-l: 1.4;
  --line-height-xl: 1.6;
  --line-height-2xl: 1.8;

  /* -- Font weight tokens -- */
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semi-bold: 600;
  --font-weight-bold: 700;
  --font-weight-extra-bold: 800;
  --font-weight-black: 900;

  /* -- Letter spacing tokens (em-based for proportional scaling) -- */
  --letter-spacing-s: 0.03em;
  --letter-spacing-m: 0.06em;
  --letter-spacing-l: 0.12em;
  --letter-spacing-xl: 0.24em;
}

/* ------ 2. SYSTEM TOKENS - COLORS ------ */

:root {
  /* -- Neutrals -- */
  --neutral-50:  #fafafa;
  --neutral-100: #e5e5e5;
  --neutral-150: #d4d4d4;
  --neutral-200: #c4c4c4;
  --neutral-300: #a3a3a3;
  --neutral-400: #8a8a8a;
  --neutral-500: #737373;
  --neutral-600: #5c5c5c;
  --neutral-700: #474747;
  --neutral-800: #333333;
  --neutral-900: #1f1f1f;
  --neutral-950: #141414;
  --neutral-990: #0a0a0a;

  /* -- Black & White Alpha Tokens -- */
  --black: #000000;
  --black-alpha-3: #00000008;
  --black-alpha-5: #0000000d;
  --black-alpha-10: #0000001a;
  --black-alpha-15: #00000026;
  --black-alpha-20: #00000033;
  --black-alpha-30: #0000004d;
  --black-alpha-40: #00000066;
  --black-alpha-50: #00000080;
  --black-alpha-60: #00000099;
  --black-alpha-70: #000000b3;
  --black-alpha-80: #000000cc;
  --black-alpha-90: #000000e6;
  --black-alpha-95: #000000f2;

  --white: #ffffff;
  --white-alpha-5: #ffffff0d;
  --white-alpha-10: #ffffff1a;
  --white-alpha-15: #ffffff26;
  --white-alpha-20: #ffffff33;
  --white-alpha-30: #ffffff4d;
  --white-alpha-40: #ffffff66;
  --white-alpha-50: #ffffff80;
  --white-alpha-60: #ffffff99;
  --white-alpha-70: #ffffffb3;
  --white-alpha-80: #ffffffcc;
  --white-alpha-90: #ffffffe6;
  --white-alpha-95: #fffffff2;

  --transparent: transparent;

  /* -- Color-Mix Alpha Scale -- */
  --alpha-5: transparent 95%;
  --alpha-10: transparent 90%;
  --alpha-15: transparent 85%;
  --alpha-20: transparent 80%;
  --alpha-25: transparent 75%;
  --alpha-30: transparent 70%;
  --alpha-35: transparent 65%;
  --alpha-40: transparent 60%;
  --alpha-45: transparent 55%;
  --alpha-50: transparent 50%;
  --alpha-55: transparent 45%;
  --alpha-60: transparent 40%;
  --alpha-65: transparent 35%;
  --alpha-70: transparent 30%;
  --alpha-75: transparent 25%;
  --alpha-80: transparent 20%;
  --alpha-85: transparent 15%;
  --alpha-90: transparent 10%;
  --alpha-95: transparent 5%;

  /* -- Semantic colours -- */
  --text-primary: var(--off-black);
  --text-secondary: var(--neutral-800);
  --text-plain: var(--black);
  --text-faded: var(--black-alpha-50);
  --text-accent: var(--blue);
  --text-link: var(--text-accent);
  --text-inverted: var(--off-white);
  --text-sidebar: var(--text-primary);
  --text-top-nav: var(--text-primary);

    /* -- Text with Opacity -- */
  --text-alpha-5: color-mix(in srgb, var(----text-primary), var(--alpha-5));
  --text-alpha-10: color-mix(in srgb, var(----text-primary), var(--alpha-10));
  --text-alpha-15: color-mix(in srgb, var(----text-primary), var(--alpha-15));
  --text-alpha-20: color-mix(in srgb, var(----text-primary), var(--alpha-20));
  --text-alpha-30: color-mix(in srgb, var(----text-primary), var(--alpha-30));
  --text-alpha-40: color-mix(in srgb, var(----text-primary), var(--alpha-40));
  --text-alpha-50: color-mix(in srgb, var(----text-primary), var(--alpha-50));



  --background-primary: var(--neutral-50);
  --background-secondary: var(--neutral-100);
  --background-plain: var(--white);
  --background-faded: var(--black-alpha-5);
  --background-darker: var(--black-alpha-10);
  --background-lighter: var(--white-alpha-10);
  --background-modal: rgba(0, 0, 0, 0.75);
  --background-sidebar: var(--background-primary);
  --background-top-nav: var(--background-primary);

  /* -- Solid colour backgrounds — for hero blocks, callouts, ad units, etc. -- */
  --background-accent: var(--text-accent);
  --background-black: var(--black);
  --background-white: var(--white);
  --background-blue: var(--blue);
  --background-red: var(--red);
  --background-green: var(--green);

  --border-primary: var(--text-primary);
  --border-secondary: var(--neutral-300);
  --border-faded: var(--black-alpha-15);

  --button-primary: var(--text-primary);
  --button-text: var(--off-white);
  --button-secondary: var(--black);
  --button-secondary-text: var(--off-white);
  --button-faded: color-mix(in srgb, var(--button-primary), var(--alpha-15));

  /* -- Status colours (from brand book or defaults) -- */
  --status-info: var(--blue);
  --status-info-bg: var(--blue-lighter);
  --status-success: var(--green);
  --status-success-bg: var(--green-lighter);
  --status-warning: var(--yellow-darker);
  --status-warning-bg: var(--yellow-lighter);
  --status-danger: var(--red);
  --status-danger-bg: var(--red-lighter);
  --status-accent: var(--purple);
  --status-accent-bg: var(--purple-lighter);

  /* -- Form semantic tokens -- */
  --input-border: var(--border-secondary);
  --input-background: var(--black-alpha-5);
  --input-text: var(--text-plain);
  --input-placeholder: var(--text-faded);
  --input-focus: var(--text-accent);
  --input-disabled-bg: var(--background-faded);
  --input-disabled-text: var(--text-faded);
  --checkbox-background: var(--neutral-100);
  --checkbox-selected: var(--text-primary);
  --checkbox-border: var(--border-faded);
  --checkbox-checkmark: var(--off-white);
  --toggle-track: var(--black-alpha-3);
  --toggle-knob: var(--neutral-500);
  --toggle-selected: var(--text-accent);
  --toggle-knob-selected: var(--off-white);

  /* -- Selection -- */
  --selection-text: var(--background-primary);
  --selection-background: var(--text-primary);

  /* -- Card tokens -- */
  --card-background: var(--background-primary);
  --card-border: var(--border-faded);
  --card-border-hover: var(--border-primary);
  --card-padding: var(--space-xl);
  --card-radius: var(--radius-m);

  /* -- Tooltip tokens -- */
  --tooltip-background: var(--warm-black);
  --tooltip-text: var(--off-white);

  /* -- Toast tokens -- */
  --toast-background: var(--warm-black);
  --toast-text: var(--off-white);

  /* -- Tab tokens -- */
  --tab-active-color: var(--text-primary);
  --tab-inactive-color: var(--text-faded);
  --tab-indicator-color: var(--text-primary);

  /* -- Progress tokens -- */
  --progress-track: var(--background-darker);
  --progress-fill: var(--text-primary);

  /* -- Divider tokens -- */
  --divider-color: var(--border-faded);

  /* -- Dropdown tokens -- */
  --dropdown-background: var(--background-primary);
  --dropdown-border: var(--border-faded);
  --dropdown-item-hover: var(--background-faded);

  /* -- Tag tokens -- */
  --tag-background: var(--background-darker);
  --tag-border: var(--border-faded);

  /* -- Dialog tokens -- */
  --dialog-background: var(--background-primary);
  --dialog-max-width: 560px;
  --dialog-shadow: 0 8px 32px var(--black-alpha-20);
  --dialog-backdrop: var(--background-modal);

  /* -- Slider tokens -- */
  --slider-track-background: var(--background-darker);
  --slider-fill: var(--text-primary);
  --slider-thumb-background: var(--text-primary);
  --slider-thumb-border: var(--background-primary);

  /* -- Rating tokens -- */
  --rating-color: var(--yellow);
  --rating-color-empty: var(--background-faded);
  --rating-size: 1.5rem;

  /* -- Mark tokens -- */
  --mark-background: var(--yellow-light);
  --mark-text: var(--warm-black);

}

/* ------ 2b. THEME TOKENS - DARK MODE ------ */
/* Set data-theme="dark" on <html> for page-level, or on any element for scoped theming */

[data-theme="dark"] {
  /* -- Text -- */
  --text-primary: #e8e6e3;
  --text-secondary: #a8a5a2;
  --text-plain: #f0eeeb;
  --text-faded: rgba(255, 255, 255, 0.45);
  --text-accent: var(--yellow);
  --text-link: var(--text-accent);
  --text-inverted: #1a1a1a;
  --text-sidebar: var(--text-primary);
  --text-top-nav: var(--text-primary);

  /* -- Background -- */
  --background-primary: var(--neutral-800);
  --background-secondary: #222222;
  --background-plain: #2a2a2a;
  --background-faded: rgba(255, 255, 255, 0.06);
  --background-darker: rgba(255, 255, 255, 0.12);
  --background-modal: var(--black-alpha-50);
  --background-sidebar: var(--background-primary);
  --background-top-nav: var(--background-primary);

  /* -- Border -- */
  --border-primary: #e8e6e3;
  --border-secondary: #3a3a3a;
  --border-faded: rgba(255, 255, 255, 0.12);

  /* -- Black & white alpha (inverted for dark surfaces) -- */
  --black-alpha-5: rgba(255, 255, 255, 0.05);
  --black-alpha-10: rgba(255, 255, 255, 0.08);
  --black-alpha-15: rgba(255, 255, 255, 0.12);
  --black-alpha-20: rgba(255, 255, 255, 0.16);
  --black-alpha-30: rgba(255, 255, 255, 0.22);
  --black-alpha-50: rgba(255, 255, 255, 0.45);

  /* -- Button -- */
  --button-primary: var(--text-primary);
  --button-text:var(--background-primary);
  --button-secondary: #e8e6e3;
  --button-secondary-text: #1a1a1a;
  --button-faded: color-mix(in srgb, var(--button-primary), var(--alpha-80));

  /* -- Status -- */
  --status-info: var(--blue-light);
  --status-success: var(--green-light);
  --status-warning: var(--yellow-light);
  --status-danger: var(--red-light);
  --status-accent: var(--purple-light);

  /* -- Form -- */
  --input-border: #3a3a3a;
  --input-background: rgba(255, 255, 255, 0.08);
  --input-text: #f0eeeb;
  --input-placeholder: rgba(255, 255, 255, 0.45);
  --input-focus: var(--text-accent);
  --input-disabled-bg: rgba(255, 255, 255, 0.06);
  --input-disabled-text: rgba(255, 255, 255, 0.3);
  --checkbox-background: #3a3a3a;
  --checkbox-selected: #e8e6e3;
  --checkbox-border: #555;
  --checkbox-checkmark: #1a1a1a;
  --toggle-track: #444;
  --toggle-knob: #888;
  --toggle-selected: #e8e6e3;
  --toggle-knob-selected: #1a1a1a;

  /* -- Card -- */
  --card-background: var(--background-secondary);
  --card-border: var(--border-faded);
  --card-border-hover: var(--border-primary);


  /* -- Tooltip / Toast -- */
  --tooltip-background: var(--neutral-100);
  --tooltip-text: var(--warm-black);
  --toast-background: var(--neutral-100);
  --toast-text: var(--warm-black);

  /* -- Dropdown -- */
  --dropdown-background: var(--background-plain);

  /* -- Dialog -- */
  --dialog-background: var(--background-secondary);
  --dialog-shadow: 0 8px 40px var(--black-alpha-60);

  /* -- Rating -- */

  /* -- Mark -- */
  --mark-background: color-mix(in srgb, var(--yellow), var(--alpha-60));
  --mark-text: var(--off-white);

  color-scheme: dark;
}

/* ------ 2c. SYSTEM PREFERENCE FALLBACK (no-JS) ------ */
/* Applies dark tokens when the user's OS prefers dark and no data-theme is set */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --text-primary: #e8e6e3;
    --text-secondary: #a8a5a2;
    --text-plain: #f0eeeb;
    --text-faded: rgba(255, 255, 255, 0.45);
    --text-accent: #5bb89a;
    --text-link: #5bb89a;
    --text-inverted: #1a1a1a;
    --text-sidebar: var(--text-primary);
    --text-top-nav: var(--text-primary);

    --background-primary: #1a1a1a;
    --background-secondary: #222222;
    --background-plain: #2a2a2a;
    --background-faded: rgba(255, 255, 255, 0.06);
    --background-darker: rgba(255, 255, 255, 0.12);
    --background-sidebar: var(--background-primary);
    --background-top-nav: var(--background-primary);

    --border-primary: #e8e6e3;
    --border-secondary: #3a3a3a;
    --border-faded: rgba(255, 255, 255, 0.12);

    --black-alpha-5: rgba(255, 255, 255, 0.05);
    --black-alpha-10: rgba(255, 255, 255, 0.08);
    --black-alpha-15: rgba(255, 255, 255, 0.12);
    --black-alpha-20: rgba(255, 255, 255, 0.16);
    --black-alpha-30: rgba(255, 255, 255, 0.22);
    --black-alpha-50: rgba(255, 255, 255, 0.45);

    --button-primary: #5bb89a;
    --button-text: #1a1a1a;
    --button-secondary: #e8e6e3;
    --button-secondary-text: #1a1a1a;
  --button-faded: color-mix(in srgb, var(--button-primary), var(--alpha-80));

    --status-info: var(--blue-light);
    --status-success: var(--green-light);
    --status-warning: var(--yellow-light);
    --status-danger: var(--red-light);
    --status-accent: var(--purple-light);

    --input-border: #3a3a3a;
    --input-background: rgba(255, 255, 255, 0.08);
    --input-text: #f0eeeb;
    --input-placeholder: rgba(255, 255, 255, 0.45);
    --input-focus: #5bb89a;
    --input-disabled-bg: rgba(255, 255, 255, 0.06);
    --input-disabled-text: rgba(255, 255, 255, 0.3);
    --checkbox-background: #3a3a3a;
    --checkbox-selected: #e8e6e3;
    --checkbox-border: #555;
    --checkbox-checkmark: #1a1a1a;
    --toggle-track: #444;
    --toggle-knob: #888;
    --toggle-selected: #e8e6e3;
    --toggle-knob-selected: #1a1a1a;

    /* -- Card -- */
    --card-background: var(--background-secondary);
    --card-border: var(--border-faded);

    /* -- Tooltip / Toast -- */
    --tooltip-background: var(--neutral-100);
    --tooltip-text: var(--warm-black);
    --toast-background: var(--neutral-100);
    --toast-text: var(--warm-black);

    /* -- Dropdown -- */
    --dropdown-background: var(--background-plain);

    /* -- Dialog -- */
    --dialog-background: var(--background-secondary);
    --dialog-shadow: 0 8px 40px var(--black-alpha-60);

    /* -- Rating -- */

    /* -- Mark -- */
    --mark-background: color-mix(in srgb, var(--yellow), var(--alpha-60));
    --mark-text: var(--off-white);

    color-scheme: dark;
  }
}

/* -- Selection highlight -- */
::selection {
  color: var(--selection-text);
  background: var(--selection-background);
}

/* ------ 3. SYSTEM TOKENS - SPACING & TYPOGRAPHY ------ */

:root {
  /* -- Unit tokens -- */
  --none: 0;
  --2xs: 0.125rem;
  /* 2px */
  --xs: 0.25rem;
  /* 4px */
  --s: 0.5rem;
  /* 8px */
  --m: 0.75rem;
  /* 12px */
  --l: 1rem;
  /* 16px */
  --xl: 1.5rem;
  /* 24px */
  --2xl: 2rem;
  /* 32px */
  --3xl: 2.5rem;
  /* 40px */
  --4xl: 3rem;
  /* 48px */
  --5xl: 3.5rem;
  /* 56px */
  --6xl: 4rem;
  /* 64px */
  --7xl: 4.5rem;
  /* 72px */
  --8xl: 5rem;
  /* 80px */
  --9xl: 5.5rem;
  /* 88px */
  --10xl: 6rem;
  /* 96px */
  --11xl: 6.5rem;
  /* 104px */
  --12xl: 7rem;
  /* 112px */
  --13xl: 7.5rem;
  /* 120px */
  --14xl: 10rem;
  /* 160px */

  /* -- Spacing scale -- */
  --space-none: var(--none);
  --space-2xs: var(--2xs);
  --space-xs: var(--xs);
  --space-s: var(--s);
  --space-m: var(--m);
  --space-l: var(--l);
  --space-xl: var(--xl);
  --space-2xl: var(--2xl);
  --space-3xl: var(--3xl);
  --space-4xl: var(--4xl);
  --space-5xl: var(--5xl);
  --space-6xl: var(--6xl);
  --space-7xl: var(--7xl);
  --space-8xl: var(--8xl);
  --space-9xl: var(--9xl);
  --space-10xl: var(--10xl);
  --space-11xl: var(--11xl);
  --space-12xl: var(--12xl);
  --space-13xl: var(--13xl);
  --space-14xl: var(--14xl);

  /* -- Section spacing variables -- */
  --section-xs: var(--space-xl);
  --section-s: var(--space-2xl);
  --section-m: var(--space-6xl);
  --section-l: var(--space-10xl);
  --section-xl: var(--space-14xl);

  /* -- Border width tokens -- */
  --border-s: 1.5px;
  --border-m: 2px;
  --border-l: 4px;

  /* -- Border composition variables -- */
  --border-width: var(--border-s);
  --border-style: solid;
  --border-color: var(--border-primary);

  /* -- Border radius tokens -- */
  --radius-xs: 4px;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;
}

/* ------ 4. SYSTEM TOKENS - MOTION ------ */
/*
 * Motion design tokens. Two layers, same model as color and spacing:
 *
 *   1. Primitives (--ease-*, --duration-*) — raw building blocks. Same
 *      t-shirt scale as the rest of the design system. Easing names match
 *      the standard CSS keywords (in / out / in-out) so anyone with web
 *      experience already knows what shape they have; the cubic-bezier
 *      values are our refined replacements for the defaults.
 *
 *   2. Semantic tokens (--motion-*) — named by intent ("page-open",
 *      "page-close"). These compose primitives. Consumers (CSS components,
 *      JS code) only ever read the semantic layer.
 *
 * Naming convention for new semantic tokens:
 *   --motion-{scope}-{event}-{property}
 *   scope    = page | surface | element | feedback
 *   event    = open | close | swap | enter | exit | fade | hover | press
 *   property = duration | easing
 *
 * See cms/motion.md for the full reference and demos.
 */

:root {
  /* -- Easing primitives -- */
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  /* fast start, slow end. for exits. */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  /* slow start, slow end with long tail. for entrances. */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  /* symmetric. for swaps and continuous motion. */

  /* -- Duration primitives -- */
  --duration-2xs: 100ms;
  --duration-xs: 200ms;
  --duration-s: 400ms;
  --duration-m: 600ms;
  --duration-l: 800ms;
  --duration-xl: 1200ms;
  --duration-2xl: 1500ms;

  /* -- Page-level semantic motion -- */
  --motion-page-open-duration: var(--duration-xl);
  /* 800ms */
  --motion-page-open-easing: var(--ease-in-out);

  --motion-page-close-duration: var(--duration-xl);
  /* 600ms */
  --motion-page-close-easing: var(--ease-in-out);

  --motion-page-swap-duration: var(--duration-xl);
  /* 600ms */
  --motion-page-swap-easing: var(--ease-in-out);

  --motion-page-fade-duration: var(--duration-m);
  /* 400ms */
  --motion-page-fade-easing: var(--ease-in-out);
}

/* ------ 5. LAYOUT PRIMITIVES ------ */

/* -- Global horizontal padding -- */
.padding-global {
  padding-left: var(--space-xl);
  padding-right: var(--space-xl);
}

/* -- Padding utilities -- */
.padding-s {
  padding: var(--space-s);
}

.padding-m {
  padding: var(--space-m);
}

.padding-l {
  padding: var(--space-l);
}

.padding-xl {
  padding: var(--space-xl);
}

.padding-2xl {
  padding: var(--space-2xl);
}

.padding-3xl {
  padding: var(--space-3xl);
}

/* -- Containers -- */
.container-small {
  display: block;
  max-width: 640px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.container-medium {
  display: block;
  max-width: 1040px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.container-large {
  display: block;
  max-width: 1200px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* -- Max-width utilities -- */
.max-width-small {
  max-width: 640px;
}

.max-width-medium {
  max-width: 960px;
}

.max-width-large {
  max-width: 1200px;
}

.max-width-full {
  max-width: 100%;
}

/* -- Section spacing -- */

section {
  display: block;
}

.padding-section {
  display: block;
}

/* -- Top spacing combo classes -- */
.top-small {
  padding-top: var(--section-s);
}

.top-medium {
  padding-top: var(--section-m);
}

.top-large {
  padding-top: var(--section-l);
}

.top-xl {
  padding-top: var(--section-xl);
}

/* -- Bottom spacing combo classes -- */
.bottom-small {
  padding-bottom: var(--section-s);
}

.bottom-medium {
  padding-bottom: var(--section-m);
}

.bottom-large {
  padding-bottom: var(--section-l);
}

.bottom-xl {
  padding-bottom: var(--section-xl);
}

/* ------ 6. BLOCKS ------ */

.block {
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
}

/* -- Gap modifiers -- */
.gap-none {
  gap: var(--space-none);
}

.gap-xs {
  gap: var(--space-xs) !important;
}

.gap-s {
  gap: var(--space-s) !important;
}

.gap-m {
  gap: var(--space-m) !important;
}

.gap-l {
  gap: var(--space-l) !important;
}

.gap-xl {
  gap: var(--space-xl) !important;
}

.gap-2xl {
  gap: var(--space-2xl) !important;
}

.gap-3xl {
  gap: var(--space-3xl) !important;
}


/* -- Layout modifiers -- */
.row {
  flex-direction: row;
}

.row-reverse {
  flex-direction: row-reverse;
}

.align-start {
  align-items: flex-start;
}

.align-center {
  align-items: center;
}

.align-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-end {
  justify-content: flex-end;
}


/* ------ 7. GRID ------ */

/* -- Grid -- */
.grid {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: 1fr 1fr;
  grid-auto-columns: 1fr;
}

/* -- Grid column modifiers -- */
.cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.cols-4 {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

/* -- Responsive collapse -- */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.token-col {
  grid-template-columns: 1fr auto;
  padding: var(--space-m);
}

/* -- Grid item width modifiers -- */
.fit-content {
  width: fit-content;
}

/* ------ 8. BORDER UTILITIES ------ */

/* -- Structural classes -- */
.border {
  border: var(--border-width) var(--border-style) var(--border-color);
}

.border-top {
  border-top: var(--border-width) var(--border-style) var(--border-color);
}

.border-bottom {
  border-bottom: var(--border-width) var(--border-style) var(--border-color);
}

.border-left {
  border-left: var(--border-width) var(--border-style) var(--border-color);
}

.border-right {
  border-right: var(--border-width) var(--border-style) var(--border-color);
}

/* -- Width combo classes -- */
.border-s {
  --border-width: var(--border-s);
}

.border-m {
  --border-width: var(--border-m);
}

.border-l {
  --border-width: var(--border-l);
}

/* -- Style combo classes -- */
.border-solid {
  --border-style: solid;
}

.border-dashed {
  --border-style: dashed;
}

.border-dotted {
  --border-style: dotted;
}

/* -- Color combo classes -- */
.border-primary {
  --border-color: var(--border-primary);
}

.border-secondary {
  --border-color: var(--border-secondary);
}

.border-faded {
  --border-color: var(--border-faded);
}

/* ------ 9. TYPOGRAPHY UTILITIES ------ */

/* -- Font size utilities -- */
.font-2xs {
  font-size: var(--font-2xs);
}

.font-xs {
  font-size: var(--font-xs);
}

.font-s {
  font-size: var(--font-s);
}

.font-m {
  font-size: var(--font-m);
}

.font-l {
  font-size: var(--font-l);
}

.font-xl {
  font-size: var(--font-xl);
}

.font-2xl {
  font-size: var(--font-2xl);
}

.font-3xl {
  font-size: var(--font-3xl);
}

.font-4xl {
  font-size: var(--font-4xl);
}

.font-5xl {
  font-size: var(--font-5xl);
}

.font-6xl {
  font-size: var(--font-6xl);
}

.font-7xl {
  font-size: var(--font-7xl);
}

.font-8xl {
  font-size: var(--font-8xl);
}

.font-9xl {
  font-size: var(--font-9xl);
}

.font-10xl {
  font-size: var(--font-10xl);
}

/* -- Text size utilities -- */

.text-size-xlarge {
  font-size: var(--font-3xl);
}

.text-size-large {
  font-size: var(--font-xl);
}

.text-size-medium {
  font-size: var(--font-m);
}

.text-size-small {
  font-size: var(--font-s);
  line-height: var(--line-height-xl);
}

.text-size-xsmall {
  font-size: var(--font-xs);
  line-height: var(--line-height-xl);
}

/* -- Text wrap utilities -- */
[data-text-wrap="balance"] {
  text-wrap: balance;
}

[data-text-wrap="pretty"] {
  text-wrap: pretty;
}

/* -- Eyebrow text -- */
.eyebrow {
  font-family: var(--font-tertiary);
  font-size: var(--font-xs);
  line-height: var(--line-height-m);
  font-weight: var(--font-weight-extra-bold);
  letter-spacing: var(--letter-spacing-xl);
  text-transform: uppercase;
}

/* -- Button reset (bare element) -- */
button {
  font-family: var(--font-primary);
  font-size: inherit;
  line-height: inherit;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: var(--space-s);
}

/* -- Button component -- */
.button {
  font-family: var(--font-tertiary);
  font-size: var(--button-font-size);
  line-height: var(--line-height-m);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0;
  text-transform: none;
  text-align: center;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  align-self: flex-start;
  padding: var(--space-m) var(--space-xl);
  background-color: var(--button-primary);
  color: var(--button-text);
  border: var(--border-s) solid var(--button-primary);
  cursor: pointer;
  transition: all .15s ease-in-out;
  display: flex;
  gap: var(--space-s);
}

.button:hover,
.is-outline.is-faded:hover {
  transform: scale(1.02);
}

.button:active {
  transform: scale3d(1.0, 1.0, 1.0);
}

.is-faded {
  background-color: var(--button-faded);
  color: var(--button-primary);
  border: var(--border-s) solid var(--transparent);
}

.is-outline {
  background-color: var(--transparent);
  color: var(--button-primary);
  border: var(--border-s) solid var(--button-primary);
}

.is-outline.is-faded {
  background-color: var(--transparent);
  color: var(--button-primary);
  border: var(--border-s) solid var(--button-faded);
}

.is-link {
  padding: 0;
  background: none;
  border: none;
  color: var(--text-primary);
}

.is-small {
  font-size: var(--button-font-size-small);
  padding: var(--space-m) var(--space-xl);
}

.is-xsmall {
  font-size: var(--button-font-size-small);
  padding: var(--space-s) var(--space-m);
}

.button:disabled,
.button.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.is-icon {
  padding: var(--space-l);
}

.svg-icn {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  aspect-ratio: 1 / 1;
  transition: color var(--duration-m) var(--ease-out);
}

.svg-icn svg,
.svg-icn path {
  transition: fill var(--duration-m) var(--ease-out);
}

.svg-icn.is-preview {
  width: 2.5rem;
  height: 2.5rem;
}

.svg-logo {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 210 / 101;
}

[class*="svg-logo"] {
  transition: color var(--duration-m) var(--ease-out);
}

[class*="svg-logo"] svg,
[class*="svg-logo"] path {
  transition: fill var(--duration-m) var(--ease-out);
}

.button-group {
  grid-column-gap: var(--space-m);
  grid-row-gap: var(--space-m);
  flex-wrap: wrap;
  align-items: center;
  display: flex;
}

/* ------ 10. BACKGROUND UTILITIES ------ */

/* -- Background utilities -- */
.bg-primary {
  background-color: var(--background-primary);
}

.bg-secondary {
  background-color: var(--background-secondary);
}

.bg-plain {
  background-color: var(--background-plain);
}

.bg-faded {
  background-color: var(--background-faded);
}

/* -- Text color utilities -- */
.text-primary {
  color: var(--text-primary);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-plain {
  color: var(--text-plain);
}

.text-faded {
  color: var(--text-faded);
}

.text-accent {
  color: var(--text-accent);
}

.text-link {
  color: var(--text-link);
}


/* -- Global state utilities -- */
.is-hidden {
  display: none !important;
}

/* ------ BASE ELEMENTS ------ */

/* -- Reset -- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-primary);
  color: var(--text-primary);
  font-size: var(--text-body);
  font-weight: var(--font-weight-regular);
  background: var(--background-primary);
  line-height: var(--line-height-l);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* -- Headings -- */
h1 {
  font-size: var(--font-7xl);
  line-height: var(--line-height-m);
}

h2 {
  font-size: var(--font-5xl);
  line-height: var(--line-height-m);
}

h3 {
  font-size: var(--font-3xl);
  line-height: var(--line-height-m);
}

h4 {
  font-size: var(--font-2xl);
  line-height: var(--line-height-m);
}

h5 {
  font-size: var(--font-xl);
  line-height: var(--line-height-m);
}

h6 {
  font-size: var(--font-xl);
  line-height: var(--line-height-l);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-secondary);
  font-weight: var(--font-weight-regular);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-l);
}

/* -- Headings — mobile -- */
@media (max-width: 768px) {
  h1 {
    font-size: var(--font-5xl);
  }

  h2 {
    font-size: var(--font-3xl);
  }
}

/* -- Paragraphs -- */
p {
  margin-top: 0;
  margin-bottom: var(--space-m);
}

/* -- Links -- */
a {
  color: var(--text-plain);
  text-underline-offset: 2.5px;
  text-decoration: underline;
  -webkit-text-decoration-color: var(--text-link);
  text-decoration-color: var(--text-link);
  text-decoration-thickness: 0.09em;
  transition: color var(--duration-m) var(--ease-out),
              text-decoration-color var(--duration-m) var(--ease-out),
              text-underline-offset var(--duration-m) var(--ease-out);
}

a:not(.button):hover {
  color: var(--text-link);
  text-underline-offset: 6px;

}

a[target="_blank"]::after {
  content: "";
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  margin-left: 0.2em;
  vertical-align: baseline;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 21V3H9V5H7C5.89543 5 5 5.89543 5 7V17C5 18.1046 5.89543 19 7 19H17C18.1046 19 19 18.1046 19 17V15H21V21H3ZM9.7 15.7L8.3 14.3L15.8929 6.70711C16.5229 6.07714 16.0767 5 15.1858 5H12V3H21V12H19V8.81421C19 7.92331 17.9229 7.47714 17.2929 8.10711L9.7 15.7Z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 21V3H9V5H7C5.89543 5 5 5.89543 5 7V17C5 18.1046 5.89543 19 7 19H17C18.1046 19 19 18.1046 19 17V15H21V21H3ZM9.7 15.7L8.3 14.3L15.8929 6.70711C16.5229 6.07714 16.0767 5 15.1858 5H12V3H21V12H19V8.81421C19 7.92331 17.9229 7.47714 17.2929 8.10711L9.7 15.7Z' fill='black'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
}

/* -- Lists -- */
ul,
ol {
  margin-top: 0;
  margin-bottom: var(--space-m);
  padding-left: var(--space-2xl);
}

li {
  margin-top: var(--space-s);
  margin-bottom: 0;
}

li:first-child {
  margin-top: 0;
}

/* Nested lists */
ul ul,
ul ol,
ol ul,
ol ol {
  margin-top: var(--space-s);
  margin-bottom: 0;
}

ol ol,
ul ol {
  list-style-type: lower-roman;
}

ul ul ol,
ul ol ol,
ol ul ol,
ol ol ol {
  list-style-type: lower-alpha;
}

/* List items with paragraphs */
li > p {
  margin-top: var(--space-l);
  margin-bottom: 0;
}

li > p:first-child {
  margin-top: 0;
}

/* -- Blockquotes -- */
blockquote {
  margin: var(--space-xl) 0;
  padding-left: var(--space-l);
  border-left: var(--border-m) solid var(--border-secondary);
  color: var(--text-secondary);
  font-size: var(--font-m);
  font-style: italic;
}

blockquote p {
  margin-top: 0;
  margin-bottom: var(--space-m);
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* -- Bold -- */
b,
strong {
  font-weight: var(--font-weight-semi-bold);
}

/* -- Images -- */
img {
  border-style: none;
  max-width: 100%;
  box-sizing: content-box;
}

/* -- Definition lists -- */
dl {
  padding: 0;
}

dl dt {
  padding: 0;
  font-size: var(--font-s);
  font-style: italic;
  font-weight: var(--font-weight-semi-bold);
}

dl dd {
  padding: 0 var(--space-l);
}

dd {
  margin-left: 0;
}

/* -- Focus styles -- */
a:focus,
[role=button]:focus,
input[type=radio]:focus,
input[type=checkbox]:focus {
  outline: 2px solid var(--status-info);
  outline-offset: -2px;
  box-shadow: none;
}

a:focus:not(:focus-visible),
[role=button]:focus:not(:focus-visible),
input[type=radio]:focus:not(:focus-visible),
input[type=checkbox]:focus:not(:focus-visible) {
  outline: solid 1px transparent;
}

a:focus-visible,
[role=button]:focus-visible,
input[type=radio]:focus-visible,
input[type=checkbox]:focus-visible {
  outline: 2px solid var(--status-info);
  outline-offset: -2px;
  box-shadow: none;
}

a:not([href]) {
  color: inherit;
  text-decoration: none;
}


/* ------ 11. CALLOUTS & ALERTS ------ */

/* -- Base callout -- */
.callout {
  padding: var(--space-m) var(--space-l);
  margin-top: var(--space-l);
  margin-bottom: var(--space-l);
  background-color: var(--background-faded);
  border: var(--border-s) solid var(--border-faded);
}

.callout > *:first-child {
  margin-top: 0;
}

.callout > *:last-child {
  margin-bottom: 0;
}

/* -- Callout title -- */
.callout-title {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  font-weight: var(--font-weight-semi-bold);
  font-size: var(--font-s);
  line-height: var(--line-height-s);
}

/* -- Callout icon layout -- */
.callout--icon {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--space-m);
}

.callout--icon > .svg-icn {
  grid-column: 1;
  grid-row: 1;
  width: 1.25rem;
  height: 1.25rem;
  align-self: center;
}

.callout--icon > :not(.svg-icn) {
  grid-column: 2;
}

/* -- Callout description -- */
.callout-description {
  margin-top: var(--space-xs);
  font-size: var(--font-s);
}

/* -- Callout variants -- */
.callout-note {
  background-color: var(--status-info-bg);
}

.callout-note .callout-title,
.callout-note > .svg-icn {
  color: var(--status-info);
}

.callout-tip {
  background-color: var(--status-success-bg);
}

.callout-tip .callout-title,
.callout-tip > .svg-icn {
  color: var(--status-success);
}

.callout-warning {
  background-color: var(--status-warning-bg);
}

.callout-warning .callout-title,
.callout-warning > .svg-icn {
  color: var(--status-warning);
}

.callout-caution {
  background-color: var(--status-danger-bg);
}

.callout-caution .callout-title,
.callout-caution > .svg-icn {
  color: var(--status-danger);
}

.callout-important {
  background-color: var(--status-accent-bg);
}

.callout-important .callout-title,
.callout-important > .svg-icn {
  color: var(--status-accent);
}

/* ------ 12. FORM ELEMENTS ------ */

/* -- Labels -- */
label {
  display: block;
  font-size: var(--font-s);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

/* -- Text inputs & textarea -- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="tel"],
textarea,
select {
  font-family: var(--font-primary);
  font-size: var(--text-body);
  line-height: var(--line-height-l);
  color: var(--input-text);
  background-color: var(--input-background);
  border: var(--border-s) solid var(--input-border);
  padding: var(--space-m) var(--space-l);
  min-height: 44px;
  width: 100%;
  display: block;
  transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--input-focus);
  outline-offset: 2px;
  border-color: var(--input-focus);
  box-shadow: none;
}

/* -- Input error state -- */
input.is-error,
textarea.is-error,
select.is-error {
  border-color: var(--status-danger);
}

input.is-error:focus,
textarea.is-error:focus,
select.is-error:focus {
  outline-color: var(--status-danger);
}

/* -- Disabled inputs -- */
input:disabled,
textarea:disabled,
select:disabled {
  background-color: var(--input-disabled-bg);
  color: var(--input-disabled-text);
  cursor: not-allowed;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

input::placeholder,
textarea::placeholder {
  color: var(--input-placeholder);
}

/* -- Textarea -- */
textarea {
  min-height: 120px;
  resize: vertical;
}

/* -- Colour input -- */
input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  border: var(--border-s) solid var(--input-border);
  background-color: var(--input-background);
  padding: 0;
  width: auto;
  aspect-ratio: 1 / 1;
  align-self: stretch;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: none;
}

input[type="color"]::-moz-color-swatch {
  border: none;
}

input[type="color"]:focus {
  outline: none;
  border-color: var(--input-focus);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--input-focus), var(--alpha-75));
}

/* -- Select -- */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-m) center;
  padding-right: var(--space-2xl);
  cursor: pointer;
}

/* -- Disabled states -- */
input:disabled,
textarea:disabled,
select:disabled {
  background-color: var(--input-disabled-bg);
  color: var(--input-disabled-text);
  cursor: not-allowed;
  border: none;
}

/* -- Fieldset & legend -- */
fieldset {
  border: var(--border-s) solid var(--border-secondary);
  padding: var(--space-l);
  margin: 0 0 var(--space-l) 0;
}

legend {
  font-size: var(--font-s);
  font-weight: var(--font-weight-semi-bold);
  padding: 0 var(--space-s);
  color: var(--text-primary);
}

/* -- Checkbox & radio -- */
input[type="checkbox"],
input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  width: var(--space-xl);
  height: var(--space-xl);
  margin: 0;
  cursor: pointer;
  background-color: var(--checkbox-background);
  border: var(--border-s) solid var(--checkbox-border);
  transition: background-color 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
  position: relative;
}

input[type="radio"] {
  border-radius: 50%;
}

input[type="checkbox"]:checked {
  background-color: var(--checkbox-selected);
  border-color: var(--checkbox-selected);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 12 10 18 20 6'/%3E%3C/svg%3E");
  background-size: 14px 14px;
  background-position: center;
  background-repeat: no-repeat;
}

input[type="radio"]:checked {
  background-color: var(--checkbox-selected);
  border-color: var(--checkbox-selected);
}

input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background-color: var(--checkbox-checkmark);
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--input-focus), var(--alpha-75));
}

input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
  background-color: var(--input-disabled-bg);
  border-color: var(--input-disabled-bg);
  cursor: not-allowed;
  opacity: 0.5;
}

input[type="checkbox"]:disabled:checked {
  background-color: var(--input-disabled-text);
  border-color: var(--input-disabled-text);
}

input[type="radio"]:disabled:checked {
  background-color: var(--input-disabled-text);
  border-color: var(--input-disabled-text);
}

/* Dark mode checkmark */
[data-theme="dark"] input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 12 10 18 20 6'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) input[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 12 10 18 20 6'/%3E%3C/svg%3E");
  }
}

/* -- Inline label + checkbox/radio pattern -- */
.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-s);
}

.form-check label {
  display: inline;
  margin-bottom: 0;
  font-weight: var(--font-weight-regular);
  cursor: pointer;
}

/* -- Segmented control (single-select button group) -- */
.segmented-control {
  display: inline-flex;
  background-color: var(--background-faded);
  padding: 3px;
  gap: 2px;
}

.segmented-control-btn {
  padding: var(--space-s) var(--space-l);
  font-size: var(--font-s);
  font-weight: var(--font-weight-semi-bold);
  border-radius: 0;
  border: none;
  background: transparent;
  color: var(--text-faded);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  font-family: inherit;
}

.segmented-control-btn:hover {
  color: var(--text-primary);
  background-color: color-mix(in srgb, var(--background-primary), var(--alpha-50));
}

.segmented-control-btn.is-active {
  background-color: var(--text-primary);
  color: var(--background-primary);
}

.segmented-control-btn:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

.segmented-control-btn.is-icon {
  padding: var(--space-s);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* -- Toggle / switch -- */
.form-toggle {
  --toggle-width: 44px;
  --toggle-height: var(--space-xl);
  --toggle-knob-size: 18px;
  --toggle-knob-offset: 3px;

  display: flex;
  align-items: center;
  gap: var(--space-s);
}

.form-toggle label {
  display: inline;
  margin-bottom: 0;
  font-weight: var(--font-weight-regular);
  cursor: pointer;
  order: -1;
  white-space: nowrap;
}

.form-toggle.is-label-right label {
  order: 1;
}

.form-toggle input[type="checkbox"] {
  width: var(--toggle-width);
  height: var(--toggle-height);
  background-color: var(--toggle-track);
  border: var(--border-s) solid var(--border-faded);
  border-radius: var(--radius-pill);
  position: relative;
  transition: background-color 0.2s ease;
}

.form-toggle input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: var(--toggle-knob-offset);
  transform: translateY(-50%);
  width: var(--toggle-knob-size);
  height: var(--toggle-knob-size);
  border-radius: 50%;
  background-color: var(--toggle-knob);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.form-toggle input[type="checkbox"]:checked {
  background-color: var(--toggle-selected);
  background-image: none;
}

.form-toggle input[type="checkbox"]:checked::after {
  transform: translateY(-50%) translateX(calc(var(--toggle-width) - var(--toggle-knob-size) - var(--toggle-knob-offset) * 2 - var(--border-s) * 2));
  background-color: var(--toggle-knob-selected);
}

.form-toggle input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--input-focus), var(--alpha-75));
}

.form-toggle input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-toggle input[type="checkbox"]:disabled + label {
  cursor: not-allowed;
}

/* -- Form group (label + input pair) -- */
.form-group {
  margin-bottom: var(--space-l);
}

/* -- Form hint text -- */
.form-hint {
  font-size: var(--font-s);
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

/* -- Form error message -- */
.form-error {
  font-size: var(--font-s);
  color: var(--status-danger);
  margin-top: var(--space-xs);
}

/* -- Skeleton loading -- */
.skeleton-line {
  background: var(--background-faded);
  border-radius: 4px;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-label {
  height: 14px;
  width: 30%;
  margin-bottom: var(--space-xs);
}

.skeleton-input {
  height: 44px;
  width: 100%;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* -- Form success state -- */
.notion-form-success {
  text-align: center;
  padding: var(--space-3xl) 0;
}

.notion-form-success p {
  font-size: var(--text-body);
  color: var(--text-secondary);
  margin-bottom: var(--space-l);
}

/* -- Form error state -- */
.notion-form-error {
  text-align: center;
  padding: var(--space-3xl) 0;
  color: var(--text-secondary);
}

/* -- Access support form states -- */
.access-support-success {
  text-align: center;
  padding: var(--space-3xl) 0;
}

.access-support-success p {
  font-size: var(--text-body);
  color: var(--text-secondary);
}

.access-support-error {
  font-size: var(--font-s);
  color: var(--status-danger);
  margin-top: var(--space-s);
}

/* ------ 13. DISCLOSURE (details / summary) ------ */

/* -- Base disclosure -- */


summary {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  font-family: var(--font-primary);
  font-size: var(--text-body);
  color: var(--text-primary);
  padding: var(--space-s) var(--space-m);
  cursor: pointer;
  user-select: none;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "";
  width: 0.5em;
  height: 0.5em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

details[open] > summary::before {
  transform: rotate(45deg);
}

summary:hover {
  color: var(--text-secondary);
}

summary:focus-visible {
  outline: 2px solid var(--input-focus);
  outline-offset: -2px;
}

/* -- Disclosure content -- */
details .disclosure-content {
  padding: var(--space-s) var(--space-m) var(--space-m) calc(0.5em + var(--space-s) + var(--space-m));
  font-family: var(--font-primary);
  font-size: var(--text-body);
  line-height: var(--line-height-xl);
  color: var(--text-secondary);
}

/* -- Disclosure table (key-value pairs) -- */
.disclosure-table {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-2xs) var(--space-l);
  align-items: baseline;
  margin: 0;
}

.disclosure-table dt {
  color: var(--text-faded);
  white-space: nowrap;
}

.disclosure-table dd {
  color: var(--text-primary);
  margin: 0;
}


/* ------ 16. BADGE ------ */

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-tertiary);
  font-size: var(--font-2xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-l);
  padding: var(--space-2xs) var(--space-s);
  border-radius: 0;
  background: var(--background-darker);
  color: var(--text-primary);
  white-space: nowrap;
  line-height: var(--line-height-m);
}

.badge--success {
  background: var(--status-success-bg);
  color: var(--status-success);
}

.badge--warning {
  background: var(--status-warning-bg);
  color: var(--status-warning);
}

.badge--danger {
  background: var(--status-danger-bg);
  color: var(--status-danger);
}

.badge--info {
  background: var(--status-info-bg);
  color: var(--status-info);
}

.badge--accent {
  background: var(--status-accent-bg);
  color: var(--status-accent);
}


/* ------ 17. CARD ------ */

.card {
  background: var(--card-background);
  border: var(--border-s) solid var(--card-border);
  padding: var(--card-padding);
  transition: border 0.3s, background-color 0.3s, box-shadow 0.15s;
}

.card--flush {
  padding: 0;
}

.card--interactive {
  display: block;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: border 0.3s, background-color 0.3s, box-shadow 0.15s;
}

.card--interactive:hover {
  background: var(--background-faded);
  box-shadow: 0 4px 12px var(--black-alpha-10);
  /* border-color: var(--card-border-hover); */
}

.card--interactive:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--input-focus), var(--alpha-75));
}
/* -- Card inner elements -- */
.card-title {
  margin-top: 0;
  margin-bottom: var(--space-s);
  font-size: var(--font-3xl);
  line-height: var(--line-height-m);
}

.card-description {
  color: var(--text-secondary);
  font-size: var(--text-body);
  margin-bottom: 0;

}

.card-image {
  border-radius: var(--card-radius) var(--card-radius) 0 0;
}

/* NOTE: .book-cover moved to docs-site.css — see CLAUDE.md §17 (Layer Discipline) */


/* ------ 18. BREADCRUMB ------ */

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
  font-size: var(--font-xs);
  color: var(--text-faded);
}

.breadcrumb a {
  color: var(--text-faded);
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}

.breadcrumb a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
  color: var(--text-primary);
  font-weight: var(--font-weight-medium);
}

.breadcrumb-separator {
  color: var(--text-faded);
  user-select: none;
}


/* ------ 19. TABS ------ */

.tabs {
  display: flex;
  border-bottom: var(--border-s) solid var(--border-faded);
  gap: var(--space-none);
}

.tab {
  position: relative;
  background: none;
  border: none;
  padding: var(--space-m) var(--space-l);
  color: var(--tab-inactive-color);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-s);
  cursor: pointer;
  transition: color 0.15s ease-in-out;
}

.tab:hover {
  color: var(--text-secondary);
}

.tab.is-active {
  color: var(--tab-active-color);
}

.tab.is-active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--tab-indicator-color);
}

.tab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--input-focus), var(--alpha-75));
}

.tab-panel {
  padding-top: var(--space-m);
}

a.tab {
    text-decoration: none;
}

a.tab:hover {
  background-color: var(--background-faded);
}


/* ------ 20. PROGRESS ------ */

progress.progress-bar {
  width: 100%;
  height: var(--space-s);
  border-radius: 0;
  border: none;
  overflow: hidden;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

progress.progress-bar::-webkit-progress-bar {
  background: var(--progress-track);
  border-radius: 0;
}

progress.progress-bar::-webkit-progress-value {
  background: var(--progress-fill);
  border-radius: 0;
  transition: width 0.3s ease-in-out;
}

progress.progress-bar::-moz-progress-bar {
  background: var(--progress-fill);
  border-radius: 0;
}

/* -- Progress status variants -- */
progress.progress-bar--success::-webkit-progress-value { background: var(--status-success); }
progress.progress-bar--success::-moz-progress-bar { background: var(--status-success); }

progress.progress-bar--warning::-webkit-progress-value { background: var(--status-warning); }
progress.progress-bar--warning::-moz-progress-bar { background: var(--status-warning); }

progress.progress-bar--danger::-webkit-progress-value { background: var(--status-danger); }
progress.progress-bar--danger::-moz-progress-bar { background: var(--status-danger); }

/* -- Progress wrapper with tooltip -- */
.progress-wrapper {
  position: relative;
  width: 100%;
}

.progress-tooltip {
  position: absolute;
  bottom: calc(100% + var(--space-xs));
  background: var(--tooltip-background);
  color: var(--tooltip-text);
  font-size: var(--font-xs);
  border-radius: var(--radius-s);
  padding: var(--space-xs) var(--space-s);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 0.15s ease-in-out;
  z-index: 800;
}

.progress-wrapper:hover .progress-tooltip {
  opacity: 1;
}


/* ------ 21. TOOLTIP ------ */

[data-tooltip] {
  position: relative;
  cursor: help;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + var(--space-xs));
  left: 50%;
  transform: translateX(-50%);
  background: var(--tooltip-background);
  color: var(--tooltip-text);
  font-size: var(--font-xs);
  border-radius: var(--radius-s);
  padding: var(--space-xs) var(--space-s);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
  z-index: 800;
}

[data-tooltip]:hover::before,
[data-tooltip]:focus-visible::before {
  opacity: 1;
}

/* -- Tooltip positions -- */
[data-tooltip-position="bottom"]::before {
  bottom: auto;
  top: calc(100% + var(--space-xs));
}

[data-tooltip-position="left"]::before {
  bottom: auto;
  top: 50%;
  left: auto;
  right: calc(100% + var(--space-xs));
  transform: translateY(-50%);
}

[data-tooltip-position="right"]::before {
  bottom: auto;
  top: 50%;
  left: calc(100% + var(--space-xs));
  transform: translateY(-50%);
}

/* -- Interactive elements override cursor -- */
button[data-tooltip],
a[data-tooltip],
.button[data-tooltip] {
  cursor: pointer;
}


/* ------ 22. TOAST ------ */

.toast-container {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  pointer-events: none;
}

.toast {
  pointer-events: all;
  background: var(--toast-background);
  color: var(--toast-text);
  padding: var(--space-m) var(--space-l);
  border: var(--border-s) solid var(--border-faded);
  display: flex;
  align-items: center;
  gap: var(--space-m);
  max-width: 360px;
  font-size: var(--font-s);
  transition: opacity 0.3s ease-in-out;
}

.toast--success { background: var(--status-success-bg); color: var(--status-success);}
.toast--warning { background: var(--status-warning-bg); color: var(--status-warning);}
.toast--danger { background: var(--status-danger-bg); color: var(--status-danger);}
.toast--info { background: var(--status-info-bg); color: var(--status-info);}

.toast-message {
  flex: 1;
}

.toast-close {
  color: inherit;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s ease-in-out;
}


.toast-close:hover {
  opacity: 1;
}


/* ------ 23. CODE ------ */

/* -- Inline code -- */
code {
  font-family: var(--font-quaternary);
  font-size: calc(var(--text-body) - 2px);
  background: color-mix(in srgb, var(--text-primary), var(--alpha-5));
  padding: var(--space-2xs) var(--space-xs);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  white-space: nowrap;
}

/* -- Code block -- */
pre {
  background: var(--background-secondary);
  border: var(--border-s) solid var(--border-faded);
  padding: var(--space-l);
  overflow-x: auto;
  font-family: var(--font-quaternary);
  font-size: calc(var(--text-body) - 2px);
  line-height: var(--line-height-xl);
}

pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  word-break: normal;
}

/* -- Keyboard shortcut -- */
kbd {
  display: inline-block;
  padding: var(--space-2xs) var(--space-xs);
  font-family: var(--font-quaternary);
  font-size: var(--font-2xs);
  line-height: var(--line-height-m);
  color: var(--text-secondary);
  vertical-align: middle;
  background: var(--background-faded);
  border: var(--border-s) solid var(--border-secondary);
  border-radius: var(--radius-xs);
  box-shadow: 0 1px 0 var(--border-secondary);
  white-space: nowrap;
}

/* -- Highlighted text -- */
mark {
  background: var(--mark-background);
  color: var(--mark-text);
  padding: 0 var(--space-2xs);
}

/* -- Figure / Figcaption -- */
figure {
  margin: var(--space-xl) 0;
  padding: 0;
}

figcaption {
  font-size: var(--font-xs);
  color: var(--text-faded);
  margin-top: var(--space-s);
  line-height: var(--line-height-xl);
  font-style: italic;
}

/* -- Abbreviation -- */
abbr[title] {
  text-decoration: underline dotted var(--text-faded);
  text-underline-offset: 2px;
  cursor: help;
}




/* ------ 24. IMAGE ------ */

/* -- Base image -- */
.img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* -- Aspect ratio combos -- */
.img-1x1  { aspect-ratio: 1 / 1; }
.img-3x2  { aspect-ratio: 3 / 2; }
.img-4x3  { aspect-ratio: 4 / 3; }
.img-16x9 { aspect-ratio: 16 / 9; }
.img-21x9 { aspect-ratio: 21 / 9; }


/* NOTE: .sticky-bar moved to docs-site.css — see CLAUDE.md §17 (Layer Discipline) */


/* ------ 25. TABLE ------ */

/* -- Table scroll wrapper -- */
.table-scroll {
  position: relative;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* -- Scroll hint: fade on right edge when overflowing -- */
.table-scroll.is-overflowing {
  display: flex;
}

.table-scroll.is-overflowing::after {
  content: "";
  position: sticky;
  right: 0;
  flex-shrink: 0;
  width: var(--space-2xl);
  margin-left: calc(-1 * var(--space-2xl));
  background: linear-gradient(to right, transparent, var(--background-primary));
  pointer-events: none;
}

.table-scroll.is-scrolled-end::after {
  display: none;
}

/* -- Base table -- */
.table {
  border-spacing: 0;
  border-collapse: collapse;
  width: fit-content;
  max-width: 100%;
  font-variant: tabular-nums;
  font-size: var(--text-body);
  margin-bottom: var(--space-2xl);
}

.table th {
  font-weight: var(--font-weight-bold);
  text-align: left;
  min-width: 130px;
}

.table th,
.table td {
  padding: var(--space-m) var(--space-l);
  border: none;
}

.table thead {
  background-color: transparent;
}

.table thead tr {
  border-bottom: var(--border-s) solid var(--border-secondary);
}

.table tbody tr {
  border-bottom: var(--border-s) solid var(--border-faded);
}

/* -- Table modifier: full width -- */
.table-full {
  width: 100%;
}

/* -- Table modifier: hoverable rows -- */
.table-hover tbody tr:hover {
  background-color: var(--background-faded);
}

/* -- Table modifier: header background -- */
.table-header-filled th {
  background-color: var(--background-faded);
  font-weight: var(--font-weight-semi-bold);
  color: var(--text-primary);
}

/* -- Table footer -- */
.table tfoot tr {
  border-top: var(--border-m) solid var(--border-primary);
}

.table tfoot th {
  font-weight: var(--font-weight-bold);
}

.table tfoot td {
  font-weight: var(--font-weight-semi-bold);
}

td .svg-icn {
  display: inline-flex;
}

/* -- Condensed table on mobile -- */
@media (max-width: 768px) {
  .table th,
  .table td {
    padding: var(--space-s) var(--space-m);
  }
}


/* ------ 26. DIVIDER ------ */

.divider {
  border: none;
  border-top: var(--border-s) solid var(--divider-color);
  margin: var(--space-xl) 0;
}

.divider--vertical {
  border-top: none;
  border-left: var(--border-s) solid var(--divider-color);
  height: auto;
  align-self: stretch;
  margin: 0 var(--space-xl);
  display: inline-block;
}

.divider--subtle {
  --divider-color: var(--black-alpha-10);
}

.divider--strong {
  --divider-color: var(--border-primary);
  border-top-width: var(--border-m);
}

hr {
  border: none;
  border-top: var(--border-s) solid var(--divider-color, var(--border-faded));
  margin: var(--space-xl) 0;
}


/* ------ 27. DROPDOWN ------ */

.dropdown {
  position: relative;
  display: flex;
  align-items: stretch;
}

/* -- Trigger -- */
.dropdown-trigger {
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: var(--space-s);
  padding: var(--space-l) var(--space-m);
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font-primary);
  font-size: var(--font-s);
  line-height: var(--line-height-m);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.dropdown-trigger:hover {
  background: var(--dropdown-item-hover);
  color: var(--text-plain);
}

.dropdown-trigger .svg-icn {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.dropdown.is-open > .dropdown-trigger {
  background: var(--background-faded);
}

/* -- Chevron (rotates on open) -- */
.dropdown-chevron {
  width: 1rem;
  height: 1rem;
  color: var(--text-faded);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.dropdown.is-open .dropdown-chevron {
  transform: rotate(180deg);
}

/* -- Menu -- */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background: var(--dropdown-background);
  border: var(--border-s) solid var(--dropdown-border);
  border-top: none;
  z-index: 1000;
  flex-direction: column;
}

.dropdown-menu.is-right {
  left: auto;
  right: 0;
}

.dropdown.is-open .dropdown-menu {
  display: flex;
}

/* -- Items -- */
.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  padding: var(--space-l) var(--space-m);
  font-size: var(--font-s);
  color: var(--text-primary);
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.1s ease;
  font-family: var(--font-primary);
  line-height: var(--line-height-m);
  text-align: left;
}

.dropdown-item:hover {
  background: var(--dropdown-item-hover);
  color: var(--text-plain);
}

.dropdown-item:focus-visible {
  outline: none;
  background: var(--dropdown-item-hover);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--input-focus), var(--alpha-75));
}

.dropdown-item .svg-icn {
  width: 1.25rem;
  height: 1.25rem;
}

.dropdown-item.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.dropdown-item--danger {
  color: var(--status-danger);
}

.dropdown-item--danger:hover {
  background: color-mix(in srgb, var(--status-danger), var(--alpha-90));
}

/* -- Divider -- */
.dropdown-divider {
  border: none;
  border-top: var(--border-s) solid var(--dropdown-border);
  margin: 0;
}

/* -- Label (section header) -- */
.dropdown-label {
  padding: var(--space-s) var(--space-m);
  font-size: var(--font-2xs);
  font-weight: var(--font-weight-semi-bold);
  color: var(--text-faded);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* -- Description (under item text) -- */
.dropdown-desc {
  font-size: var(--font-2xs);
  color: var(--text-faded);
  white-space: normal;
}

/* -- Trailing content (pushes to right edge) -- */
.dropdown-item-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--text-faded);
  flex-shrink: 0;
  font-size: var(--font-2xs);
}


/* ------ 28. TAG ------ */

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-primary);
  font-size: var(--font-xs);
  font-weight: var(--font-weight-medium);
  padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-s);
  border-radius: var(--radius-s);
  background: var(--tag-background);
  border: var(--border-s) solid var(--tag-border);
  color: var(--text-primary);
  white-space: nowrap;
  line-height: var(--line-height-xs);
}

.tag--success {
  background: var(--status-success-bg);
  border-color: var(--green-light);
  color: var(--status-success);
}

.tag--warning {
  background: var(--status-warning-bg);
  border-color: var(--yellow-light);
  color: var(--status-warning);
}

.tag--danger {
  background: var(--status-danger-bg);
  border-color: var(--red-light);
  color: var(--status-danger);
}

.tag--info {
  background: var(--status-info-bg);
  border-color: var(--blue-light);
  color: var(--status-info);
}

.tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.6;
  padding: var(--space-2xs);
  transition: opacity 0.15s ease, background-color 0.15s ease;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
}

.tag-remove .svg-icn {
  width: 0.625rem;
  height: 0.625rem;
}

.tag-remove:hover {
  opacity: 1;
  background: var(--black-alpha-10);
}

.tag-remove:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--input-focus), var(--alpha-75));
}

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  align-items: center;
}

/* ------ 29. DIALOG ------ */

.dialog {
  background: var(--dialog-background);
  border: none;
  border-radius: 0;
  box-shadow: var(--dialog-shadow);
  padding: var(--space-2xl);
  max-width: var(--dialog-max-width);
  width: min(var(--dialog-max-width), calc(100vw - var(--space-2xl) * 2));
  max-height: 85vh;
  margin: auto;
}

.dialog::backdrop {
  background: var(--dialog-backdrop);
  backdrop-filter: blur(2px);
}

.dialog[open] {
  display: flex;
  flex-direction: column;
  gap: var(--space-l);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-l);
}

.dialog-title {
  font-family: var(--font-secondary);
  font-size: var(--font-3xl);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-m);
  color: var(--text-primary);
  margin: 0;
}

.dialog-close {
  flex-shrink: 0;
  color: var(--text-faded);
  transition: color 0.15s ease;
}

.dialog-close:hover {
  color: var(--text-primary);
}

.dialog-close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--input-focus), var(--alpha-75));
}

.dialog-body {
  overflow-y: auto;
  flex: 1;
}

.dialog-body > *:first-child {
  margin-top: 0;
}

.dialog-body > *:last-child {
  margin-bottom: 0;
}

.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-m);
  flex-wrap: wrap;
}


/* ------ 30. SLIDER ------ */

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--slider-track-background);
  border-radius: var(--radius-pill);
  outline: none;
  cursor: pointer;
  border: none;
  padding: 0;
  display: block;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--slider-thumb-background);
  border: 2px solid var(--slider-thumb-border);
  cursor: pointer;
  box-shadow: 0 1px 4px var(--black-alpha-20);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--slider-thumb-background);
  border: 2px solid var(--slider-thumb-border);
  cursor: pointer;
  box-shadow: 0 1px 4px var(--black-alpha-20);
}

input[type="range"]:hover::-webkit-slider-thumb {
  transform: scale(1.1);
  box-shadow: 0 2px 8px var(--black-alpha-20);
}

input[type="range"]:focus-visible {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--input-focus), var(--alpha-75));
  border-radius: var(--radius-pill);
}

input[type="range"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

input[type="range"]:disabled::-webkit-slider-thumb {
  cursor: not-allowed;
}

.slider-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--font-s);
  color: var(--text-primary);
}

.slider-value {
  font-family: var(--font-quaternary);
  font-size: var(--font-xs);
  color: var(--text-faded);
}


/* ------ 31. RATING ------ */

.rating {
  display: inline-flex;
  gap: var(--space-xs);
  align-items: center;
}

.rating-star {
  width: var(--rating-size);
  height: var(--rating-size);
  cursor: pointer;
  color: var(--rating-color-empty);
  transition: color 0.1s ease, transform 0.1s ease;
  flex-shrink: 0;
}

.rating-star svg path {
  stroke: var(--text-faded);
  stroke-width: var(--border-m);
}

.rating-star.is-filled,
.rating-star.is-hovered {
  color: var(--rating-color);
}


.rating-star.is-filled svg path,
.rating-star.is-hovered svg path {
  stroke: var(--text-primary);
}


.rating-star:hover {
  transform: scale(1.1);
}

.rating-star:focus-visible {
  outline: none;
  border-radius: var(--radius-xs);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--input-focus), var(--alpha-75));
}

.rating.is-readonly .rating-star {
  cursor: default;
  pointer-events: none;
}

.rating.is-readonly .rating-star:hover {
  transform: none;
}

.rating--sm { --rating-size: 1rem; }
.rating--lg { --rating-size: 2rem; }


/* NOTE: .copy-btn moved to docs-site.css — see CLAUDE.md §17 (Layer Discipline) */


/* ------ 33. NUMBER INPUT ------ */

.number-input {
  display: inline-flex;
  align-items: stretch;
  width: fit-content;
  border: var(--border-s) solid var(--input-border);
  overflow: hidden;
  background: var(--input-background);
}

.number-input:focus-within {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--input-focus), var(--alpha-75));
}

.number-input input[type="number"] {
  border: none;
  background: transparent;
  text-align: center;
  width: 4rem;
  padding: var(--space-m) var(--space-xs);
  box-shadow: none;
  -moz-appearance: textfield;
  appearance: textfield;
}

.number-input input[type="number"]:focus {
  outline: none;
  border: none;
  box-shadow: none;
}

.number-input input[type="number"]::-webkit-outer-spin-button,
.number-input input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.number-input-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  background: var(--background-faded);
  border: none;
  border-radius: 0;
  color: var(--text-primary);
  cursor: pointer;
  font-size: var(--font-xl);
  line-height: 1;
  transition: background-color 0.1s ease;
  flex-shrink: 0;
}

.number-input-btn:hover {
  background: var(--background-darker);
}

.number-input-btn:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--input-focus), var(--alpha-75));
}

.number-input-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}


/* ------ 34. RADIO GROUP ------ */

.radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

.radio-group.is-horizontal {
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-m) var(--space-xl);
}

.radio-group-label {
  font-size: var(--font-s);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
  display: block;
}

.radio-group-hint {
  font-size: var(--font-xs);
  color: var(--text-faded);
  margin-top: var(--space-2xs);
  display: block;
}


/* ------ 35. DROP CAP ------ */

/*
 * Apply .drop-cap to a <p> element to style its first letter
 * as a large decorative initial. Use on long paragraphs only —
 * the text must wrap alongside the letter for at least 3 lines.
 */

.drop-cap::first-letter {
  float: left;
  font-family: var(--font-secondary);
  font-size: 3.5rem;
  font-weight: var(--font-weight-regular);
  line-height: 0.82;
  color: var(--text-primary);
  padding-right: var(--space-s);
  margin-top: 0.06em;
  text-transform: uppercase;
}

.drop-cap::after {
  content: "";
  display: table;
  clear: both;
}


/* NOTE: .token-copy, .token-swatch, .asset-card, .dont-card moved to docs-site.css
 * — see CLAUDE.md §17 (Layer Discipline) */


/* ------ 15. COMPONENTS IN PROGRESS ------ */
/*
 * The following components are actively being built.
 * Remove each item from this list as it is implemented above.
 * See cms/components.md for the full component spec and build rules.
 *
 * REMAINING:
 * (all components implemented)
 *
 * IMPLEMENTED IN THIS FILE:
 * - [x] Button (.button)
 * - [x] Form elements (inputs, select, textarea, checkbox, radio, toggle, segmented control)
 * - [x] Callout (.callout)
 * - [x] Disclosure (details/summary)
 * - [x] Badge (.badge)
 * - [x] Card (.card)
 * - [x] Tabs (.tabs)
 * - [x] Progress (.progress-bar)
 * - [x] Tooltip (data-tooltip)
 * - [x] Toast (.toast)
 * - [x] Breadcrumb (.breadcrumb)
 * - [x] code / pre / kbd / mark / abbr / figure
 * - [x] Scrollbar
 * - [x] Divider (.divider)
 * - [x] Dropdown (.dropdown)
 * - [x] Tag (.tag)
 * - [x] Dialog (.dialog)
 * - [x] Slider (input[type="range"])
 * - [x] Rating (.rating)
 * - [x] Number Input (.number-input)
 * - [x] Radio Group (.radio-group)
 * - [x] Drop Cap (.drop-cap)
 */

