/* ClockIn: assets/appearance/appearance.css. Part of what was style.css (split in 1.42.2, rules moved as is). The load order in index.html matters: see CLAUDE.md */
/* ============================================================
   THEMES
   Every color in the app comes from the tokens below. A theme is
   one block that redefines them, chosen by two attributes on <html>
   (set before first paint by the inline script in index.html, and
   kept current by applyTheme() in app.js):

     data-theme = default-theme | klaude-ai | mackintosh | utuub |
                 pomodoro-red | pomodoro-2 (Pomodoro Verde) |
                 klokify | tangerine | terminal | nostalgic
     data-mode  = light | dark        (already resolved: "System"
                                       is turned into light/dark in JS)

   The selectors are deliberately NOT tied to :root, so the Settings
   > Theme previews can put the same two attributes on any element
   and get that theme's tokens locally, no matter which theme the
   page itself is in.

   TO ADD A THEME: copy one light + one dark block, change the
   attribute value, fill in every token in the "REQUIRED TOKENS"
   list, then add an entry to THEMES in app.js. Nothing else in this
   file needs to change, no rule below hardcodes a color.

   REQUIRED TOKENS
     Surfaces   --paper (page) --paper-raised --surface (cards,
                inputs) --line
                --line-raised (card border while raised, i.e. hovered)
                --surface also colors the Tracker, Reports, Projects
                and Clients cards
     Text       --ink --ink-light --text-muted
     Accent     --accent (fills) --accent-dark (hover / pressed fill)
                --accent-text (accent used AS text on a surface)
                --accent-tint --on-accent (text on --accent)
                --on-accent-strong (text on the Start button)
     Headings   --head-bg (section header bands: This week, Today,
                column header rows) --head-fg (text on them)
                --head-fg-muted (stats, totals, column labels)
     Danger     --danger --on-danger
     Status     --success --on-success --warning --on-warning
                (danger is the error color; notifications use all
                three)
     Focus      --focus-ring (keyboard focus outline; defaults to
                --accent-text)
     Header     --chrome-bg --chrome-fg --chrome-hover
                --chrome-field-bg --chrome-field-border
                --chrome-border --chrome-logo-color
     Effects    --shadow-card --shadow-pop --backdrop
                --project-text-mix --control-accent
     Misc       --star-active
   ============================================================ */

/* DEFAULT, LIGHT AND DARK (1.36.1). Built in from Omar's custom theme
   "Default Theme" (generated by deriveThemeVars from its builder colors):
   off-white paper, a bright blue accent, near-black in Dark. The default
   theme and first in the list since 1.36.1, with the Klaude AI font set. */
[data-theme="default-theme"][data-mode="light"] {
  color-scheme: light;
  --ink: #1A2126;
  --ink-light: #53585B;
  --paper: #FCFCFA;
  --paper-raised: #FCFCFA;
  --surface: #FCFCFA;
  --line: #F0F0EE;
  --line-raised: #F0F0EE;
  --accent: #17A8FF;
  --accent-dark: #138DD6;
  --accent-text: #1076B3;
  --accent-tint: rgba(23, 168, 255, 0.22);
  --danger: #FF484D;
  --text-muted: #586670;
  --on-accent: #FCFCFA;
  --on-accent-strong: #FCFCFA;
  --on-danger: #260B0C;
  --success: #2E7D46;
  --on-success: #FFFFFF;
  --warning: #D97706;
  --on-warning: #2B1700;
  --star-active: #E0A52C;
  --head-bg: #FCFCFA;
  --head-fg: #1A2126;
  --head-fg-muted: #1A2126;
  --chrome-bg: #FCFCFA;
  --chrome-fg: #1A1A1A;
  --chrome-hover: rgba(26, 26, 26, 0.16);
  --focus-ring: #D8D8D6;
  --chrome-field-bg: rgba(26, 26, 26, 0.07);
  --chrome-field-border: rgba(26, 26, 26, 0.2);
  --chrome-border: #E1E1DF;
  --chrome-logo-color: #000000;
  --shadow-card: 0 6px 16px rgba(26, 33, 38, 0.1);
  --shadow-pop: 0 4px 16px rgba(26, 33, 38, 0.15);
  --backdrop: rgba(26, 33, 38, 0.55);
  --project-text-mix: 0%;
  --control-accent: #17A8FF;
}

[data-theme="default-theme"][data-mode="dark"] {
  color-scheme: dark;
  --ink: #BCBBB8;
  --ink-light: #92928F;
  --paper: #151515;
  --paper-raised: #303030;
  --surface: #1C1C1C;
  --line: #121212;
  --line-raised: #121212;
  --accent: #17A8FF;
  --accent-dark: #138DD6;
  --accent-text: #17A8FF;
  --accent-tint: rgba(23, 168, 255, 0.16);
  --danger: #FF484D;
  --text-muted: #9B9A90;
  --on-accent: #FFFFFF;
  --on-accent-strong: #FFFFFF;
  --on-danger: #260B0C;
  --success: #4FB477;
  --on-success: #08210F;
  --warning: #F2A03D;
  --on-warning: #2B1700;
  --star-active: #E0A52C;
  --head-bg: #151515;
  --head-fg: #E6EBEE;
  --head-fg-muted: #E6EBEE;
  --chrome-bg: #151515;
  --chrome-fg: #BCBBB8;
  --chrome-hover: rgba(188, 187, 184, 0.16);
  --focus-ring: #D8D8D6;
  --chrome-field-bg: rgba(188, 187, 184, 0.07);
  --chrome-field-border: rgba(188, 187, 184, 0.2);
  --chrome-border: #292929;
  --chrome-logo-color: #BCBBB8;
  --shadow-card: 0 6px 16px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 4px 16px rgba(0, 0, 0, 0.55);
  --backdrop: rgba(0, 0, 0, 0.65);
  --project-text-mix: 40%;
  --control-accent: #17A8FF;
}

/* KLAUDE AI, LIGHT AND DARK (1.23.0). Built in from the custom theme of
   the same name (generated by deriveThemeVars from its builder colors).
   The default theme. A hat tip to Claude, the AI that helped build ClockIn. */
[data-theme="klaude-ai"][data-mode="light"] {
  color-scheme: light;
  --ink: #1A2126;
  --ink-light: #53585B;
  --paper: #FCFCFA;
  --paper-raised: #FCFCFA;
  --surface: #FCFCFA;
  --line: #F0F0EE;
  --line-raised: #F0F0EE;
  --accent: #EAE9E5;
  --accent-dark: #C5C4C0;
  --accent-text: #696967;
  --accent-tint: rgba(234, 233, 229, 0.22);
  --danger: #C7716E;
  --text-muted: #586670;
  --on-accent: #0B2231;
  --on-accent-strong: #0B2231;
  --on-danger: #1E1111;
  --success: #2E7D46;
  --on-success: #FFFFFF;
  --warning: #D97706;
  --on-warning: #2B1700;
  --star-active: #E0A52C;
  --head-bg: #FCFCFA;
  --head-fg: #1A2126;
  --head-fg-muted: #1A2126;
  --chrome-bg: #FCFCFA;
  --chrome-fg: #1A1A1A;
  --chrome-hover: rgba(26, 26, 26, 0.16);
  --focus-ring: #F0F0EE;
  --chrome-field-bg: rgba(26, 26, 26, 0.07);
  --chrome-field-border: rgba(26, 26, 26, 0.2);
  --chrome-border: #E1E1DF;
  --chrome-logo-color: #000000;
  --shadow-card: 0 6px 16px rgba(26, 33, 38, 0.1);
  --shadow-pop: 0 4px 16px rgba(26, 33, 38, 0.15);
  --backdrop: rgba(26, 33, 38, 0.55);
  --project-text-mix: 0%;
  --control-accent: #EAE9E5;
}

[data-theme="klaude-ai"][data-mode="dark"] {
  color-scheme: dark;
  --ink: #BCBBB8;
  --ink-light: #92928F;
  --paper: #151515;
  --paper-raised: #151515;
  --surface: #151515;
  --line: #1D1D1D;
  --line-raised: #1D1D1D;
  --accent: #BCBBB8;
  --accent-dark: #9E9D9B;
  --accent-text: #BCBBB8;
  --accent-tint: rgba(188, 187, 184, 0.16);
  --danger: #C7716E;
  --text-muted: #9B9A90;
  --on-accent: #151515;
  --on-accent-strong: #151515;
  --on-danger: #1E1111;
  --success: #4FB477;
  --on-success: #08210F;
  --warning: #F2A03D;
  --on-warning: #2B1700;
  --star-active: #E0A52C;
  --head-bg: #151515;
  --head-fg: #E6EBEE;
  --head-fg-muted: #E6EBEE;
  --chrome-bg: #151515;
  --chrome-fg: #E6EBEE;
  --chrome-hover: rgba(230, 235, 238, 0.16);
  --focus-ring: #1D1D1D;
  --chrome-field-bg: rgba(230, 235, 238, 0.07);
  --chrome-field-border: rgba(230, 235, 238, 0.2);
  --chrome-border: #2E2F2F;
  --chrome-logo-color: #FFFFFF;
  --shadow-card: 0 6px 16px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 4px 16px rgba(0, 0, 0, 0.55);
  --backdrop: rgba(0, 0, 0, 0.65);
  --project-text-mix: 40%;
  --control-accent: #BCBBB8;
}

/* UTUUB, LIGHT AND DARK (1.23.0). Built in from the custom theme of the
   same name (generated by deriveThemeVars from its builder colors). */
[data-theme="utuub"][data-mode="light"] {
  color-scheme: light;
  --ink: #000000;
  --ink-light: #404040;
  --paper: #FFFFFF;
  --paper-raised: #EEEEEE;
  --surface: #FFFFFF;
  --line: #FFFFFF;
  --line-raised: #EEEEEE;
  --accent: #F2F2F2;
  --accent-dark: #CBCBCB;
  --accent-text: #616161;
  --accent-tint: rgba(242, 242, 242, 0.22);
  --danger: #FF002D;
  --text-muted: #7D7D7D;
  --on-accent: #000000;
  --on-accent-strong: #000000;
  --on-danger: #260007;
  --success: #2E7D46;
  --on-success: #FFFFFF;
  --warning: #D97706;
  --on-warning: #2B1700;
  --star-active: #E0A52C;
  --head-bg: #FFFFFF;
  --head-fg: #1A2126;
  --head-fg-muted: #1A2126;
  --chrome-bg: #FFFFFF;
  --chrome-fg: #000000;
  --chrome-hover: rgba(0, 0, 0, 0.16);
  --focus-ring: #858585;
  --chrome-field-bg: rgba(0, 0, 0, 0.07);
  --chrome-field-border: rgba(0, 0, 0, 0.2);
  --chrome-border: #E0E0E0;
  --chrome-logo-color: #FF002D;
  --shadow-card: 0 6px 16px rgba(0, 0, 0, 0.1);
  --shadow-pop: 0 4px 16px rgba(0, 0, 0, 0.15);
  --backdrop: rgba(0, 0, 0, 0.55);
  --project-text-mix: 0%;
  --control-accent: #F2F2F2;
}

[data-theme="utuub"][data-mode="dark"] {
  color-scheme: dark;
  --ink: #EFEFEF;
  --ink-light: #B7B7B7;
  --paper: #101010;
  --paper-raised: #232323;
  --surface: #101010;
  --line: #101010;
  --line-raised: #232323;
  --accent: #282828;
  --accent-dark: #222222;
  --accent-text: #949494;
  --accent-tint: rgba(40, 40, 40, 0.16);
  --danger: #FF002D;
  --text-muted: #ABABAB;
  --on-accent: #EFEFEF;
  --on-accent-strong: #EFEFEF;
  --on-danger: #260007;
  --success: #4FB477;
  --on-success: #08210F;
  --warning: #F2A03D;
  --on-warning: #2B1700;
  --star-active: #E0A52C;
  --head-bg: #101010;
  --head-fg: #EFEFEF;
  --head-fg-muted: #EFEFEF;
  --chrome-bg: #282828;
  --chrome-fg: #EFEFEF;
  --chrome-hover: rgba(239, 239, 239, 0.16);
  --focus-ring: #737373;
  --chrome-field-bg: rgba(239, 239, 239, 0.07);
  --chrome-field-border: rgba(239, 239, 239, 0.2);
  --chrome-border: #404040;
  --chrome-logo-color: #FFFFFF;
  --shadow-card: 0 6px 16px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 4px 16px rgba(0, 0, 0, 0.55);
  --backdrop: rgba(0, 0, 0, 0.65);
  --project-text-mix: 40%;
  --control-accent: #282828;
}

/* NOSTALGIC, LIGHT. The original look, values unchanged. (Mackintosh is
   the default and the fallback when no attributes are set.) */
[data-theme="nostalgic"][data-mode="light"] {
  color-scheme: light;
  --ink: #20231F;
  --ink-light: #3A3D36;
  --paper: #E9E6DC;
  --paper-raised: #F5F3EC;
  --line: #D3CEBD;
  --accent: #C89B3C;
  --accent-dark: #A67D2E;
  --accent-text: #A67D2E;
  --accent-tint: rgba(200, 155, 60, 0.14);
  --danger: #8C3B2E;
  --text-muted: #6B6A5E;
  --line-raised: var(--ink-light);
  --focus-ring: var(--accent-text);
  --success: #2E7D46;
  --on-success: #FFFFFF;
  --warning: #D97706;
  --on-warning: #2B1700;
  --head-bg: var(--paper-raised);
  --head-fg: var(--ink);
  --head-fg-muted: var(--text-muted);
  /* Was a bare #fff at ~30 call sites (card/input backgrounds,
     mostly) and one bare #e0a52c (the favorite-star active color).
     Naming them means every color in the file is a variable, which
     is what lets a theme block swap them. */
  --surface: #fff;
  --on-accent: #fff;
  --on-accent-strong: #20231F;
  --on-danger: #fff;
  --star-active: #e0a52c;

  --chrome-bg: #20231F;
  --chrome-fg: #E9E6DC;
  --chrome-hover: rgba(255, 255, 255, 0.1);
  --chrome-field-bg: rgba(255, 255, 255, 0.08);
  --chrome-field-border: rgba(255, 255, 255, 0.2);
  --chrome-border: transparent;
  --chrome-logo-color: #FFFFFF;

  /* SHADOW. --shadow-card is the exact value already shipped and
     tuned on row hover (Tracker/Reports/Projects/Clients), reused
     for modals and the sticky timer bar. --shadow-pop is the
     slightly stronger one for floating popovers and dropdowns. */
  --shadow-card: 0 6px 16px rgba(32, 35, 31, 0.10);
  --shadow-pop: 0 4px 16px rgba(32, 35, 31, 0.15);
  --backdrop: rgba(32, 35, 31, 0.6);

  /* How far project-colored TEXT is pulled toward --ink. 0% = the
     exact color the user picked. Dark modes raise it so a dark
     project color (say a deep purple) stays readable on a dark page.
     Dots and swatches always use the raw color. */
  --project-text-mix: 0%;
  --control-accent: auto;
}

/* NOSTALGIC, DARK. Same amber accent and warm cast, on the shared
   dark surfaces (#151515 page, #1d1d1d raised). */
[data-theme="nostalgic"][data-mode="dark"] {
  color-scheme: dark;
  --ink: #ECE8DA;
  --ink-light: #C9C4B2;
  --paper: #151515;
  --paper-raised: #1d1d1d;
  --surface: #262625;
  --line: #3A372F;
  --accent: #C89B3C;
  --accent-dark: #B48A32;
  --accent-text: #E0B458;
  --accent-tint: rgba(200, 155, 60, 0.18);
  --danger: #E2705F;
  --text-muted: #9A968A;
  --line-raised: var(--ink-light);
  --focus-ring: var(--accent-text);
  --success: #4FB477;
  --on-success: #08210F;
  --warning: #F2A03D;
  --on-warning: #2B1700;
  --head-bg: var(--paper-raised);
  --head-fg: var(--ink);
  --head-fg-muted: var(--text-muted);
  --on-accent: #17140B;
  --on-accent-strong: #17140B;
  --on-danger: #151515;
  --star-active: #e0a52c;

  --chrome-bg: #0E0E0E;
  --chrome-fg: #ECE8DA;
  --chrome-hover: rgba(255, 255, 255, 0.1);
  --chrome-field-bg: rgba(255, 255, 255, 0.06);
  --chrome-field-border: rgba(255, 255, 255, 0.18);
  --chrome-border: #262624;
  --chrome-logo-color: #FFFFFF;

  --shadow-card: 0 6px 16px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 4px 16px rgba(0, 0, 0, 0.55);
  --backdrop: rgba(0, 0, 0, 0.65);

  --project-text-mix: 40%;
  --control-accent: auto;
}

/* MACKINTOSH, LIGHT. Platinum grays with a sky blue accent and a
   light, menu-bar style header. Since 1.2.0 the Mackintosh and Klokify
   blocks are the theme builder's own output for the custom versions (the
   "CSS for this theme" box), so the built-ins match them exactly. Palette:
     platinum   #f3f6f8   platinum-2 #eef0f0   platinum-3 #e4eaee
     platinum-4 #f2f6f8   sky-blue   #69c8f8
   Text on the sky blue is dark navy (white would only reach ~1.9:1). */
:root,
[data-theme="mackintosh"][data-mode="light"] {
  color-scheme: light;
  --ink: #1A2126;
  --ink-light: #4D5358;
  --paper: #E4EAEE;
  --paper-raised: #EEF0F0;
  --surface: #F3F6F8;
  --line: #C3CED6;
  --line-raised: #3D4952;
  --accent: #69C8F8;
  --accent-dark: #58A8D0;
  --accent-text: #3A6E88;
  --accent-tint: rgba(105, 200, 248, 0.22);
  --danger: #B23A32;
  --text-muted: #586670;
  --on-accent: #0B2231;
  --on-accent-strong: #0B2231;
  --on-danger: #FFFFFF;
  --success: #2E7D46;
  --on-success: #FFFFFF;
  --warning: #D97706;
  --on-warning: #2B1700;
  --star-active: #E0A52C;
  --head-bg: #EEF0F0;
  --head-fg: #1A2126;
  --head-fg-muted: #1A2126;
  --chrome-bg: #F2F6F8;
  --chrome-fg: #1A2126;
  --chrome-hover: rgba(26, 33, 38, 0.16);
  --focus-ring: #4A8CAE;
  --chrome-field-bg: rgba(26, 33, 38, 0.07);
  --chrome-field-border: rgba(26, 33, 38, 0.2);
  --chrome-border: #D8DCDF;
  --chrome-logo-color: #000000;
  --shadow-card: 0 6px 16px rgba(26, 33, 38, 0.1);
  --shadow-pop: 0 4px 16px rgba(26, 33, 38, 0.15);
  --backdrop: rgba(26, 33, 38, 0.55);
  --project-text-mix: 0%;
  --control-accent: #69C8F8;
}

/* MACKINTOSH, DARK. Sky blue on the shared dark surfaces. */
[data-theme="mackintosh"][data-mode="dark"] {
  color-scheme: dark;
  --ink: #E6EBEE;
  --ink-light: #B2B6B8;
  --paper: #151515;
  --paper-raised: #1D1D1D;
  --surface: #262626;
  --line: #363B3F;
  --line-raised: #454A4F;
  --accent: #69C8F8;
  --accent-dark: #58A8D0;
  --accent-text: #69C8F8;
  --accent-tint: rgba(105, 200, 248, 0.16);
  --danger: #E0685B;
  --text-muted: #8F9AA2;
  --on-accent: #0B1D29;
  --on-accent-strong: #0B1D29;
  --on-danger: #22100E;
  --success: #4FB477;
  --on-success: #08210F;
  --warning: #F2A03D;
  --on-warning: #2B1700;
  --star-active: #E0A52C;
  --head-bg: #1D1D1D;
  --head-fg: #E6EBEE;
  --head-fg-muted: #E6EBEE;
  --chrome-bg: #1D1D1D;
  --chrome-fg: #E6EBEE;
  --chrome-hover: rgba(230, 235, 238, 0.16);
  --focus-ring: #69C8F8;
  --chrome-field-bg: rgba(230, 235, 238, 0.07);
  --chrome-field-border: rgba(230, 235, 238, 0.2);
  --chrome-border: #353636;
  --chrome-logo-color: #FFFFFF;
  --shadow-card: 0 6px 16px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 4px 16px rgba(0, 0, 0, 0.55);
  --backdrop: rgba(0, 0, 0, 0.65);
  --project-text-mix: 40%;
  --control-accent: #69C8F8;
}

/* POMODORO, LIGHT AND DARK (1.36.7). Built in from Omar's custom theme
   "Pomodoro" (generated by deriveThemeVars from its builder colors): tomato
   red header and accent on warm off-white paper, near-black in Dark. ID
   pomodoro-red, because the old ID pomodoro still maps to Pomodoro Verde. */
[data-theme="pomodoro-red"][data-mode="light"] {
  color-scheme: light;
  --ink: #001427;
  --ink-light: #404E5C;
  --paper: #FEFDFC;
  --paper-raised: #FFF5EE;
  --surface: #FEFDFC;
  --line: #FFF5EE;
  --line-raised: #FDE8D8;
  --accent: #EB5940;
  --accent-dark: #C54B36;
  --accent-text: #BC4733;
  --accent-tint: rgba(235, 89, 64, 0.22);
  --danger: #62A87C;
  --text-muted: #777283;
  --on-accent: #FFFFFF;
  --on-accent-strong: #FFFFFF;
  --on-danger: #0F1913;
  --success: #2E7D46;
  --on-success: #FFFFFF;
  --warning: #D97706;
  --on-warning: #2B1700;
  --star-active: #E0A52C;
  --head-bg: #FFF5EE;
  --head-fg: #001427;
  --head-fg-muted: #001427;
  --chrome-bg: #EB5940;
  --chrome-fg: #FFFFFF;
  --chrome-hover: rgba(255, 255, 255, 0.16);
  --focus-ring: #EB5940;
  --chrome-field-bg: rgba(255, 255, 255, 0.07);
  --chrome-field-border: rgba(255, 255, 255, 0.2);
  --chrome-border: #ED6D57;
  --chrome-logo-color: #FFFFFF;
  --shadow-card: 0 6px 16px rgba(0, 20, 39, 0.1);
  --shadow-pop: 0 4px 16px rgba(0, 20, 39, 0.15);
  --backdrop: rgba(0, 20, 39, 0.55);
  --project-text-mix: 0%;
  --control-accent: #EB5940;
  --side-nav-bg: #FEFDFC;
  --side-nav-pad: 0px;
  --side-nav-fg: #777283;
  --side-nav-fg-strong: #001427;
  --side-nav-hover: #FFF5EE;
  --tracker-bg: #FFF5EE;
}

[data-theme="pomodoro-red"][data-mode="dark"] {
  color-scheme: dark;
  --ink: #E9F2E8;
  --ink-light: #B4BBB3;
  --paper: #151515;
  --paper-raised: #1D1D1D;
  --surface: #262626;
  --line: #38323D;
  --line-raised: #38323D;
  --accent: #EB5940;
  --accent-dark: #C54B36;
  --accent-text: #EC614A;
  --accent-tint: rgba(235, 89, 64, 0.16);
  --danger: #62A87C;
  --text-muted: #93A095;
  --on-accent: #FFFFFF;
  --on-accent-strong: #FFFFFF;
  --on-danger: #0F1913;
  --success: #4FB477;
  --on-success: #08210F;
  --warning: #F2A03D;
  --on-warning: #2B1700;
  --star-active: #E0A52C;
  --head-bg: #1D1D1D;
  --head-fg: #E9F2E8;
  --head-fg-muted: #E9F2E8;
  --chrome-bg: #EB5940;
  --chrome-fg: #FFFFFF;
  --chrome-hover: rgba(255, 255, 255, 0.16);
  --focus-ring: #EB5940;
  --chrome-field-bg: rgba(255, 255, 255, 0.07);
  --chrome-field-border: rgba(255, 255, 255, 0.2);
  --chrome-border: #ED6D57;
  --chrome-logo-color: #FFFFFF;
  --shadow-card: 0 6px 16px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 4px 16px rgba(0, 0, 0, 0.55);
  --backdrop: rgba(0, 0, 0, 0.65);
  --project-text-mix: 40%;
  --control-accent: #EB5940;
  --side-nav-bg: #151515;
  --side-nav-pad: 0px;
  --side-nav-fg: #93A095;
  --side-nav-fg-strong: #E9F2E8;
  --side-nav-hover: #1D1D1D;
  --tracker-bg: #1D1D1D;
}

/* POMODORO 2.0 */
[data-theme="pomodoro-2"][data-mode="light"] {
  color-scheme: light;
  --ink: #001427;
  --ink-light: #3E4F5B;
  --paper: #F6FFF5;
  --paper-raised: #EAF8E8;
  --surface: #F6FCF5;
  --line: #B3D6B1;
  --line-raised: #B3D6B1;
  --accent: #62A87C;
  --accent-dark: #528D68;
  --accent-text: #457657;
  --accent-tint: rgba(98, 168, 124, 0.22);
  --danger: #F55347;
  --text-muted: #777283;
  --on-accent: #FFFFFF;
  --on-accent-strong: #FFFFFF;
  --on-danger: #250C0B;
  --success: #2E7D46;
  --on-success: #FFFFFF;
  --warning: #D97706;
  --on-warning: #2B1700;
  --star-active: #E0A52C;
  --head-bg: #EAF8E8;
  --head-fg: #001427;
  --head-fg-muted: #001427;
  --chrome-bg: #57946D;
  --chrome-fg: #FFFFFF;
  --chrome-hover: rgba(255, 255, 255, 0.16);
  --focus-ring: #589770;
  --chrome-field-bg: rgba(255, 255, 255, 0.07);
  --chrome-field-border: rgba(255, 255, 255, 0.2);
  --chrome-border: #6BA17F;
  --chrome-logo-color: #FFFFFF;
  --shadow-card: 0 6px 16px rgba(0, 20, 39, 0.1);
  --shadow-pop: 0 4px 16px rgba(0, 20, 39, 0.15);
  --backdrop: rgba(0, 20, 39, 0.55);
  --project-text-mix: 0%;
  --control-accent: #62A87C;
}

[data-theme="pomodoro-2"][data-mode="dark"] {
  color-scheme: dark;
  --ink: #E9F2E8;
  --ink-light: #B4BBB3;
  --paper: #151515;
  --paper-raised: #1D1D1D;
  --surface: #262626;
  --line: #38323D;
  --line-raised: #38323D;
  --accent: #62A87C;
  --accent-dark: #528D68;
  --accent-text: #62A87C;
  --accent-tint: rgba(98, 168, 124, 0.16);
  --danger: #7EE081;
  --text-muted: #B2C2B4;
  --on-accent: #FFFFFF;
  --on-accent-strong: #FFFFFF;
  --on-danger: #132213;
  --success: #4FB477;
  --on-success: #08210F;
  --warning: #F2A03D;
  --on-warning: #2B1700;
  --star-active: #E0A52C;
  --head-bg: #1D1D1D;
  --head-fg: #E9F2E8;
  --head-fg-muted: #E9F2E8;
  --chrome-bg: #57946D;
  --chrome-fg: #FFFFFF;
  --chrome-hover: rgba(255, 255, 255, 0.16);
  --focus-ring: #62A87C;
  --chrome-field-bg: rgba(255, 255, 255, 0.07);
  --chrome-field-border: rgba(255, 255, 255, 0.2);
  --chrome-border: #6BA17F;
  --chrome-logo-color: #FFFFFF;
  --shadow-card: 0 6px 16px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 4px 16px rgba(0, 0, 0, 0.55);
  --backdrop: rgba(0, 0, 0, 0.65);
  --project-text-mix: 40%;
  --control-accent: #62A87C;
}

/* KLOKIFY */
[data-theme="klokify"][data-mode="light"] {
  color-scheme: light;
  --ink: #2D2D2D;
  --ink-light: #5E5F60;
  --paper: #F0F5F7;
  --paper-raised: #FFFFFF;
  --surface: #FFFFFF;
  --line: #E0E7EB;
  --line-raised: #E0E7EB;
  --accent: #079FF2;
  --accent-dark: #0686CB;
  --accent-text: #056FA9;
  --accent-tint: rgba(7, 159, 242, 0.22);
  --danger: #F55347;
  --text-muted: #8E8E8E;
  --on-accent: #FFFFFF;
  --on-accent-strong: #FFFFFF;
  --on-danger: #250C0B;
  --success: #2E7D46;
  --on-success: #FFFFFF;
  --warning: #D97706;
  --on-warning: #2B1700;
  --star-active: #E0A52C;
  --head-bg: #E0E7EB;
  --head-fg: #2D2D2D;
  --head-fg-muted: #2D2D2D;
  --chrome-bg: #FFFFFF;
  --chrome-fg: #2D2D2D;
  --chrome-hover: rgba(45, 45, 45, 0.16);
  --focus-ring: #068FDA;
  --chrome-field-bg: rgba(45, 45, 45, 0.07);
  --chrome-field-border: rgba(45, 45, 45, 0.2);
  --chrome-border: #E6E6E6;
  --chrome-logo-color: #000000;
  --shadow-card: 0 6px 16px rgba(45, 45, 45, 0.1);
  --shadow-pop: 0 4px 16px rgba(45, 45, 45, 0.15);
  --backdrop: rgba(45, 45, 45, 0.55);
  --project-text-mix: 0%;
  --control-accent: #079FF2;
}

[data-theme="klokify"][data-mode="dark"] {
  color-scheme: dark;
  --ink: #E6EBEE;
  --ink-light: #B5BBBF;
  --paper: #222C31;
  --paper-raised: #1B2327;
  --surface: #1B2327;
  --line: #0F161A;
  --line-raised: #090E11;
  --accent: #69C8F8;
  --accent-dark: #58A8D0;
  --accent-text: #69C8F8;
  --accent-tint: rgba(105, 200, 248, 0.16);
  --danger: #F55347;
  --text-muted: #8F9AA2;
  --on-accent: #101E25;
  --on-accent-strong: #101E25;
  --on-danger: #250C0B;
  --success: #4FB477;
  --on-success: #08210F;
  --warning: #F2A03D;
  --on-warning: #2B1700;
  --star-active: #E0A52C;
  --head-bg: #13181B;
  --head-fg: #E6EBEE;
  --head-fg-muted: #E6EBEE;
  --chrome-bg: #13181B;
  --chrome-fg: #E6EBEE;
  --chrome-hover: rgba(230, 235, 238, 0.16);
  --focus-ring: #69C8F8;
  --chrome-field-bg: rgba(230, 235, 238, 0.07);
  --chrome-field-border: rgba(230, 235, 238, 0.2);
  --chrome-border: #2C3134;
  --chrome-logo-color: #FFFFFF;
  --shadow-card: 0 6px 16px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 4px 16px rgba(0, 0, 0, 0.55);
  --backdrop: rgba(0, 0, 0, 0.65);
  --project-text-mix: 40%;
  --control-accent: #69C8F8;
}

/* TANGERINE */
[data-theme="tangerine"][data-mode="light"] {
  color-scheme: light;
  --ink: #2D2D2D;
  --ink-light: #625F5B;
  --paper: #FFF5E5;
  --paper-raised: #FFDAA3;
  --surface: #FDE9CA;
  --line: #FBD59D;
  --line-raised: #F8BC63;
  --accent: #FF9E00;
  --accent-dark: #D68500;
  --accent-text: #8C5700;
  --accent-tint: rgba(255, 158, 0, 0.22);
  --danger: #F55347;
  --text-muted: #8E8E8E;
  --on-accent: #FFFFFF;
  --on-accent-strong: #FFFFFF;
  --on-danger: #250C0B;
  --success: #2E7D46;
  --on-success: #FFFFFF;
  --warning: #D97706;
  --on-warning: #2B1700;
  --star-active: #E0A52C;
  --head-bg: #FFF1DB;
  --head-fg: #2D2D2D;
  --head-fg-muted: #2D2D2D;
  --chrome-bg: #FF6D00;
  --chrome-fg: #FFFFFF;
  --chrome-hover: rgba(255, 255, 255, 0.16);
  --focus-ring: #B36F00;
  --chrome-field-bg: rgba(255, 255, 255, 0.07);
  --chrome-field-border: rgba(255, 255, 255, 0.2);
  --chrome-border: #FF7F1F;
  --chrome-logo-color: #FFFFFF;
  --shadow-card: 0 6px 16px rgba(45, 45, 45, 0.1);
  --shadow-pop: 0 4px 16px rgba(45, 45, 45, 0.15);
  --backdrop: rgba(45, 45, 45, 0.55);
  --project-text-mix: 0%;
  --control-accent: #FF9E00;
}

[data-theme="tangerine"][data-mode="dark"] {
  color-scheme: dark;
  --ink: #E6EBEE;
  --ink-light: #B2B6B8;
  --paper: #151515;
  --paper-raised: #1D1D1D;
  --surface: #262626;
  --line: #363B3F;
  --line-raised: #363B3F;
  --accent: #FF9E00;
  --accent-dark: #D68500;
  --accent-text: #FF9E00;
  --accent-tint: rgba(255, 158, 0, 0.16);
  --danger: #F55347;
  --text-muted: #8F9AA2;
  --on-accent: #101E25;
  --on-accent-strong: #101E25;
  --on-danger: #250C0B;
  --success: #4FB477;
  --on-success: #08210F;
  --warning: #F2A03D;
  --on-warning: #2B1700;
  --star-active: #E0A52C;
  --head-bg: #1D1D1D;
  --head-fg: #E6EBEE;
  --head-fg-muted: #E6EBEE;
  --chrome-bg: #1D1D1D;
  --chrome-fg: #E6EBEE;
  --chrome-hover: rgba(230, 235, 238, 0.16);
  --focus-ring: #FF9E00;
  --chrome-field-bg: rgba(230, 235, 238, 0.07);
  --chrome-field-border: rgba(230, 235, 238, 0.2);
  --chrome-border: #353636;
  --chrome-logo-color: #FFFFFF;
  --shadow-card: 0 6px 16px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 4px 16px rgba(0, 0, 0, 0.55);
  --backdrop: rgba(0, 0, 0, 0.65);
  --project-text-mix: 40%;
  --control-accent: #FF9E00;
}

/* TERMINAL, LIGHT ("daytime"): phosphor green on near-black. Both modes of
   the Terminal theme are dark; the Light appearance is the green one and
   the Dark appearance is the purple one below. */
[data-theme="terminal"][data-mode="light"] {
  color-scheme: dark;
  --ink: #5CFF8A;
  --ink-light: #46C269;
  --paper: #050B06;
  --paper-raised: #0A150C;
  --surface: #0E1C11;
  --line: #1F4A29;
  --line-raised: #191D19;
  --accent: #00FF41;
  --accent-dark: #00D637;
  --accent-text: #00FF41;
  --accent-tint: rgba(0, 255, 65, 0.16);
  --danger: #FF5555;
  --text-muted: #2FB357;
  --on-accent: #001A06;
  --on-accent-strong: #001A06;
  --on-danger: #260D0D;
  --success: #4FB477;
  --on-success: #08210F;
  --warning: #F2A03D;
  --on-warning: #2B1700;
  --star-active: #E0A52C;
  --head-bg: #0B1F0F;
  --head-fg: #00FF41;
  --head-fg-muted: #00FF41;
  --chrome-bg: #000000;
  --chrome-fg: #00E639;
  --chrome-hover: rgba(0, 230, 57, 0.16);
  --focus-ring: #00FF41;
  --chrome-field-bg: rgba(0, 230, 57, 0.07);
  --chrome-field-border: rgba(0, 230, 57, 0.2);
  --chrome-border: #001C07;
  --chrome-logo-color: #FFFFFF;
  --shadow-card: 0 6px 16px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 4px 16px rgba(0, 0, 0, 0.55);
  --backdrop: rgba(0, 0, 0, 0.65);
  --project-text-mix: 40%;
  --control-accent: #00FF41;
}

/* TERMINAL, DARK ("nighttime"): neon purple on near-black. */
[data-theme="terminal"][data-mode="dark"] {
  color-scheme: dark;
  --ink: #DCC2FF;
  --ink-light: #A893C3;
  --paper: #0A0710;
  --paper-raised: #120D1D;
  --surface: #181029;
  --line: #3D2C63;
  --line-raised: #1B1C1B;
  --accent: #BD5CFF;
  --accent-dark: #9F4DD6;
  --accent-text: #BD5CFF;
  --accent-tint: rgba(189, 92, 255, 0.16);
  --danger: #FF5C7A;
  --text-muted: #9D82D6;
  --on-accent: #12002A;
  --on-accent-strong: #12002A;
  --on-danger: #260E12;
  --success: #4FB477;
  --on-success: #08210F;
  --warning: #F2A03D;
  --on-warning: #2B1700;
  --star-active: #E0A52C;
  --head-bg: #160F28;
  --head-fg: #DDBBFF;
  --head-fg-muted: #DDBBFF;
  --chrome-bg: #000000;
  --chrome-fg: #C99DFF;
  --chrome-hover: rgba(201, 157, 255, 0.16);
  --focus-ring: #BD5CFF;
  --chrome-field-bg: rgba(201, 157, 255, 0.07);
  --chrome-field-border: rgba(201, 157, 255, 0.2);
  --chrome-border: #18131F;
  --chrome-logo-color: #FFFFFF;
  --shadow-card: 0 6px 16px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 4px 16px rgba(0, 0, 0, 0.55);
  --backdrop: rgba(0, 0, 0, 0.65);
  --project-text-mix: 40%;
  --control-accent: #BD5CFF;
}

/* ============================================================
   SETTINGS > THEME
   The appearance switch (Light / Dark / System) and one preview
   card per theme. Each card shows the theme in BOTH modes side by
   side. Every preview column carries its own data-theme/data-mode
   attributes (see THEMES near the top of this file), so the mini UI
   and the swatches inside it draw from that theme's real tokens,
   not from whatever theme the page is currently in.
   ============================================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.theme-appearance {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.theme-appearance-label {
  font-size: var(--font-size-base);
  font-weight: var(--weight-medium);
}

/* Choice buttons (2.0.4): each choice is its own button, the same size and
   look as a secondary button (40px, border, radius), and the picked one is
   filled like a primary button. They sit 8px apart and wrap onto a new line
   on a narrow screen (it was one bordered box with the choices inside, which
   broke up badly when it wrapped on a phone and matched no other button). */
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  max-width: 100%;
}

.segmented-opt { position: relative; cursor: pointer; display: block; }

.segmented-opt > span {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--btn-h-md);
  padding: 0 var(--btn-px-md);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-base);
  line-height: 1;
  white-space: nowrap;
  color: var(--ink);
  transition: border-color 150ms ease, background-color 150ms ease;
}

.segmented-opt:hover > span { border-color: var(--ink-light); }

.segmented-opt input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent-strong);
  font-weight: var(--weight-bold);
}

.segmented-opt input:focus-visible + span {
  outline: 2px solid var(--focus-ring, var(--ink));
  outline-offset: 2px;
}

.theme-appearance-note {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

/* The Theme builder row under Light / Dark / System: label, button, and a
   short note that wraps beside them instead of running off the page. */
.theme-builder-row .theme-appearance-note { flex: 1 1 320px; max-width: 620px; }

.theme-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 820px;
}

.theme-card { display: block; cursor: pointer; }

.theme-card-inner {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.theme-card:hover .theme-card-inner { border-color: var(--ink-light); }

.theme-card.selected .theme-card-inner {
  border-color: var(--accent);
  box-shadow: var(--shadow-card);
}

.theme-card input:focus-visible + .theme-card-inner {
  outline: 2px solid var(--focus-ring, var(--ink));
  outline-offset: 2px;
}

.theme-card-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-1);
}

.theme-card-name {
  font-size: var(--font-size-md);
  font-weight: var(--weight-bold);
}

.theme-card-badge {
  display: none;
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--on-accent-strong);
  font-size: var(--font-size-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.theme-card.selected .theme-card-badge { display: inline-block; }

.theme-card-blurb {
  margin: 0 0 var(--space-4);
  font-size: var(--font-size-base);
  color: var(--text-muted);
}

.theme-card-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

@media (max-width: 720px) {
  .theme-card-modes { grid-template-columns: 1fr; }
}

/* One preview column = one theme in one mode. Its own background and
   text color come from the local tokens, so it reads as a tiny page. */
.theme-mode-col {
  min-width: 0;
  padding: var(--space-3);
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.theme-mode-title {
  margin-bottom: var(--space-2);
  font-size: var(--font-size-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.theme-mini {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.tm-topbar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 8px;
  background: var(--chrome-bg);
  box-shadow: inset 0 -1px 0 var(--chrome-border);
}

.tm-logo {
  width: 10px;
  height: 10px;
  margin-right: 4px;
  border-radius: 2px;
  background: var(--chrome-logo-color);
}

.tm-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 16px;
  border-radius: 4px;
}

.tm-tab::after {
  content: '';
  width: 18px;
  height: 4px;
  border-radius: 2px;
  background: var(--chrome-fg);
  opacity: 0.55;
}

.tm-tab.active { background: var(--nav-active-bg, var(--chrome-hover)); }
.tm-tab.active::after { opacity: 1; }

.tm-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
}

.tm-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
}

.tm-field {
  flex: 1;
  height: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
}

.tm-start {
  padding: 3px 9px;
  background: var(--accent);
  color: var(--on-accent-strong);
  border-radius: 4px;
  font-size: 9px;
  font-weight: var(--weight-bold);
  line-height: 1.3;
}

.tm-link {
  color: var(--accent-text);
  font-size: 9px;
  font-weight: var(--weight-medium);
  text-decoration: underline;
}

.tm-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
}

.tm-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.tm-bar {
  height: 5px;
  border-radius: 3px;
  background: var(--ink);
  opacity: 0.85;
}

.tm-bar.muted { background: var(--text-muted); opacity: 0.6; }

.tm-time {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  color: var(--ink);
}

.theme-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-3);
}

.theme-swatch {
  display: flex;
  flex-direction: column;
  width: 46px;
  min-width: 0;
}

.theme-swatch-chip {
  display: block;
  height: 26px;
  border-radius: 5px;
  /* neutral outline so a chip never vanishes into its own column
     (the Line chip is the same color as the column's border) */
  box-shadow: inset 0 0 0 1px rgba(128, 128, 128, 0.4);
}

.theme-swatch-name {
  margin-top: 3px;
  font-size: 11px;
  font-weight: var(--weight-medium);
  line-height: 1.15;
  color: var(--ink);
}

.theme-swatch-hex {
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.2;
  color: var(--text-muted);
}

.theme-extras {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}

.theme-extras-title {
  font-size: var(--font-size-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.theme-extras .theme-swatches { margin-top: var(--space-2); }
.theme-extras .theme-swatch { width: 56px; }

/* ============================================================
   SETTINGS > THEME BUILDER + custom theme card actions
   ============================================================ */
.theme-card-wrap { display: flex; flex-direction: column; gap: var(--space-2); }

.theme-card-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }

.tb-small {
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-size-sm);
}

.tb-small.danger { color: var(--danger); }
.btn-secondary.hidden { display: none; }

.theme-card-tag {
  padding: 1px var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
}

.tm-linkrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tm-danger {
  padding: 1px 6px;
  background: var(--danger);
  color: var(--on-danger);
  border-radius: 3px;
  font-size: 8px;
  font-weight: var(--weight-bold);
}

.theme-builder {
  max-width: 1100px;
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
}

.theme-builder.hidden { display: none; }

.tb-top {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin-bottom: var(--space-4);
}

.tb-labeled {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--font-size-sm);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
}

.tb-labeled input[type="text"],
.tb-labeled select {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-base);
}

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

.tb-editor {
  display: grid;
  grid-template-columns: 404px 1fr;
  gap: var(--space-5);
  align-items: start;
  margin-bottom: var(--space-4);
}

@media (max-width: 900px) {
  .tb-editor { grid-template-columns: 1fr; }
}

.tb-mode-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.tb-field {
  display: grid;
  grid-template-columns: 170px 40px 1fr;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: 6px;
}

.tb-field label { font-size: var(--font-size-base); font-weight: var(--weight-medium); }

.tb-color {
  width: 40px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
}

.tb-hex {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--font-size-base);
  text-transform: uppercase;
}

.tb-hex.invalid { border-color: var(--danger); }

.tb-fields-col .btn-secondary { margin-top: var(--space-2); }

/* 20px between the "Copy Light colors to Dark" button and the note
   under it. */
.tb-fields-col .section-note { margin-top: 20px; }

.tb-previews {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

@media (max-width: 720px) {
  .tb-previews { grid-template-columns: 1fr; }
}

.tb-checks { margin-top: var(--space-4); font-size: var(--font-size-sm); }

.tb-checks table { width: 100%; border-collapse: collapse; }

/* 20px between the contrast table and the "OK means 4.5 or better"
   note under it. */
.tb-checks .section-note { margin-top: 20px; }

.tb-checks th,
.tb-checks td {
  padding: 4px 6px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.tb-checks th {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.tb-num { font-family: var(--font-mono); }
.tb-pass { color: var(--accent-text); font-weight: var(--weight-bold); }
.tb-low { color: var(--danger); font-weight: var(--weight-bold); }

.tb-css summary { cursor: pointer; font-weight: var(--weight-medium); margin: var(--space-3) 0; }

.tb-css textarea {
  display: block;
  width: 100%;
  margin-bottom: var(--space-2);
  padding: var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
}

.tb-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }


/* ============================================================
   1.1.0
   ============================================================ */

/* Theme and font LIST view: the Custom and Active text badges made a
   row wider than its slot, which pushed the Light and Dark strips
   under the buttons. In the list they are icons instead (the text
   badges stay in the Previews view), and the name column is a fixed
   width that cuts a long name with an ellipsis, so every row lines up. */
.theme-card-icon { display: none; flex: none; align-items: center; color: var(--text-muted); }
.is-list .theme-card-name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-list .theme-card-tag,
.is-list .theme-card-badge,
.is-list .theme-card.selected .theme-card-badge { display: none; }
.is-list .theme-card-icon-custom { display: inline-flex; }
.is-list .theme-card.selected .theme-card-icon-active { display: inline-flex; }

/* Settings > Do not allow saving time without: each field is one row
   of two columns, the requirement on the left and its Allow skip on the
   right, not nested one under the other. */
.require-pair {
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 400px);
  column-gap: var(--space-6);
  align-items: start;
  max-width: 880px;
}
.require-pair .rule-fields { margin: 0; }
/* Top-align the two switches (the two descriptions differ in length, and
   centering would put the switches at different heights). The small top
   padding centers the first line of text on the switch. */
.require-pair .switch-row { align-items: flex-start; }
.require-pair .switch-row label { padding-top: 4px; }
/* 2.9.5 (Omar): stacked on a phone, the requirement and its Allow skip
   switch touched; a row gap keeps them apart. */
@media (max-width: 860px) {
  .require-pair { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-3); }
}

