/* TranscriptGuard · Night palette.
   Theme-only overrides: the day palette, typography and layout remain intact.
   Load after the page stylesheet. Every rule is scoped to the active theme. */

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf8f3;
  --body: #bfd1ca;
  --muted: #9eb7ad;
  --green: #6ee7b7;
  --deep: #123c30;
  --mint: #193b30;
  --line: #304b42;
  --paper: #091b21;
  --surface: #0e232a;
  --indigo: #bbb4f6;
  --night-card: #122b32;
  --night-raised: #193a3b;
  --night-border: #35564b;
  --night-on-accent: #062d21;
}

/* Shared controls and navigation. */
html[data-theme="dark"] ::selection { background: #275b47; color: #f0fff7; }
html[data-theme="dark"] .skip { background: #9eeac5; color: #092d22; }
html[data-theme="dark"] button:focus-visible,
html[data-theme="dark"] a:focus-visible,
html[data-theme="dark"] summary:focus-visible { outline-color: #bcb1ff; }
html[data-theme="dark"] .button-primary {
  background: #6ee7b7;
  color: var(--night-on-accent);
}
html[data-theme="dark"] .button-primary:hover {
  background: #94efcd;
  box-shadow: 0 5px 18px #00000024;
}
html[data-theme="dark"] .button-secondary {
  background: #142e33;
  color: var(--ink);
  border-color: #44685b;
}
html[data-theme="dark"] .button-secondary:hover { background: #1c3d3d; border-color: #6b9f88; }
html[data-theme="dark"] .text-link { text-decoration-color: #50876d; }
html[data-theme="dark"] .text-link:hover { text-decoration-color: var(--green); }
html[data-theme="dark"] .site-header { background: #091b21f2; border-color: #304b42; }
html[data-theme="dark"] .menu-button { background: #142e33; color: var(--ink); border-color: #44685b; }
html[data-theme="dark"] .menu-button:hover { background: #1c3d3d; }
html[data-theme="dark"] .mobile-nav { background: #10272e; border-color: var(--line); }

/* First-screen result window. */
html[data-theme="dark"] .result-stage { background: linear-gradient(145deg, #183a32, #102b32); }
html[data-theme="dark"] .result-window {
  background: var(--night-card);
  border-color: #35584b;
  box-shadow: 0 18px 55px #00000026;
}
html[data-theme="dark"] .window-bar { background: #10272e; border-color: var(--line); }
html[data-theme="dark"] .small-tag { background: #1b3537; border-color: #3b5a4e; color: #b3cdc0; }
html[data-theme="dark"] .wave i { background: #466c5e; }
html[data-theme="dark"] .wave i:nth-child(-n+21) { background: #6cddb0; }
html[data-theme="dark"] .tabs { background: #0b2026; }
html[data-theme="dark"] .tabs button { color: #bdd1c7; }
html[data-theme="dark"] .tabs button:hover { background: #16322f; color: #edf8f3; }
html[data-theme="dark"] .tabs button[aria-selected="true"] {
  background: #1b4037;
  color: #9aeec7;
  box-shadow: inset 0 0 0 1px #386c55, 0 2px 5px #0000001f;
}
html[data-theme="dark"] .context-note { border-color: #559c7c; }
html[data-theme="dark"] .window-foot,
html[data-theme="dark"] .export-line { border-color: var(--line); }
html[data-theme="dark"] .stage-caption { color: #a4bfb0; }

/* Service markers retain the green / indigo / blue distinction. */
html[data-theme="dark"] .service { border-color: #3a5a4d; }
html[data-theme="dark"] .service:nth-child(2) .service-symbol { background: #292940; color: #c2baff; }
html[data-theme="dark"] .service:nth-child(3) .service-symbol { background: #1c3244; color: #a5c9e7; }

/* Source/result examples and the editable-looking Markdown output. */
html[data-theme="dark"] .examples { background: var(--surface); border-color: #304b42; }
html[data-theme="dark"] .example-tabs { border-color: #345649; }
html[data-theme="dark"] .example-shell {
  background: var(--night-card);
  border-color: #35564b;
  box-shadow: 0 12px 40px #00000012;
}
html[data-theme="dark"] .source-pane { background: #10262d; border-color: #35564b; }
html[data-theme="dark"] .output-pane { background: var(--night-card); }
html[data-theme="dark"] .pane-label .icon { color: #9ebcaf; }
html[data-theme="dark"] .source-wave i { background: #67bd99; }
html[data-theme="dark"] .source-caption { color: #a5bdb0; }
html[data-theme="dark"] .output-header .small-tag { background: #193e31; border-color: #3c6b52; color: #a1eac4; }
html[data-theme="dark"] .format { background: #163035; border-color: #3c5d50; color: #bdd6c7; }
html[data-theme="dark"] .example-outcome { background: #10282d; border-color: #35564b; }
html[data-theme="dark"] .md-output {
  background: #0b2027;
  color: #dae9e3;
  border-color: #36594c;
}
html[data-theme="dark"] .md-mark { color: #c2bafa; }
html[data-theme="dark"] .source-document {
  background: #1a3137;
  border-color: #456258;
  box-shadow: 0 7px 16px #0000001a;
}
html[data-theme="dark"] .source-document h4 { color: #deece4; }
html[data-theme="dark"] .source-document p { color: #c4d6cc; }
html[data-theme="dark"] .pii-source,
html[data-theme="dark"] .prepared-text.original .pii { background: #322d4e; color: #d9cdff; }
html[data-theme="dark"] .prepared-text .pii { background: #194634; color: #a6f1c9; }
html[data-theme="dark"] .mask-toggle { background: #193f31; border-color: #4b7d62; color: #a5edc5; }
html[data-theme="dark"] .mask-toggle:hover { background: #23533e; border-color: #70a588; }
html[data-theme="dark"] .mask-toggle[aria-pressed="false"] { background: #132c32; color: #c6d9cf; border-color: #4b7060; }
html[data-theme="dark"] .mask-toggle[aria-pressed="false"]:hover { background: #1b3a38; }
html[data-theme="dark"] .mask-toggle span { color: inherit; }
html[data-theme="dark"] .scan-paper {
  background: #1b3035;
  border-color: #526b60;
  box-shadow: 0 8px 16px #00000022;
}
html[data-theme="dark"] .scan-paper h4 { color: #deebe1; }
html[data-theme="dark"] .scan-paper p { color: #bacfc0; }
html[data-theme="dark"] .scan-corner { border-color: #8bddb2; }

/* The privacy statement remains a green focal section in both themes. */
html[data-theme="dark"] .privacy-note {
  background: #123c30;
  color: #edf9f1;
  box-shadow: inset 0 0 0 1px #33664b;
}
html[data-theme="dark"] .privacy-note h3 span { color: #9aebbf; }
html[data-theme="dark"] .privacy-note p { color: #c9dfd1; }
html[data-theme="dark"] .privacy-note .icon { color: #8cddb1; }

/* Two processing paths: green for meetings, indigo for LLM context. */
html[data-theme="dark"] .flow-card { background: #10262d; border-color: #355449; }
html[data-theme="dark"] .flow-card.llm { background: #172136; border-color: #3d4663; }
html[data-theme="dark"] .flow-card.llm .flow-head .icon { color: #bdb5f5; }
html[data-theme="dark"] .flow-step:not(:last-child):before { background: #426b55; }
html[data-theme="dark"] .flow-card.llm .flow-step:not(:last-child):before { background: #55547c; }
html[data-theme="dark"] .flow-node { background: #193f30; border-color: #437254; color: #a2e9bf; }
html[data-theme="dark"] .flow-card.llm .flow-node { background: #2c2c49; border-color: #57527e; color: #d0c5ff; }
html[data-theme="dark"] .deployment-box { background: #113034; border-color: #3b5d4e; }
html[data-theme="dark"] .deploy-tabs { background: #0b2228; }
html[data-theme="dark"] .deploy-facts span { background: #193d32; border-color: #3f6a53; color: #c7dfce; }

/* Pricing is scoped to this page; its dialog is a sibling of the section. */
html[data-theme="dark"] .tg-pricing,
html[data-theme="dark"] .tg-pricing-dialog {
  --tg-ink: #edf8f3;
  --tg-muted: #b8cec1;
  --tg-line: #3b5b4d;
  --tg-surface: #122b32;
  --tg-selected: #193d30;
  --tg-green: #6ee7b7;
  --tg-button: #6ee7b7;
  --tg-on-button: #062d21;
}
html[data-theme="dark"] .tg-plan-card:hover { border-color: #87d6ae; }
html[data-theme="dark"] .tg-plan-card.is-selected { border-color: #6ee7b7; }
html[data-theme="dark"] .tg-plan-card:focus-within,
html[data-theme="dark"] .tg-plan-buy:focus-visible,
html[data-theme="dark"] .tg-pricing-dialog button:focus-visible,
html[data-theme="dark"] .tg-pricing-dialog a:focus-visible { outline-color: #bcb1ff; }
html[data-theme="dark"] .tg-plan-buy:hover,
html[data-theme="dark"] .tg-pricing-dialog .tg-dialog-action:hover { background: #94efcd; border-color: #94efcd; filter: none; }
html[data-theme="dark"] .tg-pricing-output li { background: #15342f; border-color: #466b58; color: #c9dfcf; }
html[data-theme="dark"] .tg-pricing-dialog {
  background: #122b32;
  border-color: #466b59;
  box-shadow: 0 30px 100px #00000073;
}
html[data-theme="dark"] .tg-pricing-dialog::backdrop { background: #020b12bd; }
html[data-theme="dark"] .tg-pricing-dialog .tg-dialog-close { background: #214039; color: #d5e9dd; }
html[data-theme="dark"] .tg-pricing-dialog .tg-dialog-close:hover { background: #2c5546; color: #fff; }

/* Closing action, footer and legal details. */
html[data-theme="dark"] .faq-list summary:hover { color: #9debc6; }
html[data-theme="dark"] .closing-panel {
  background: #123c30;
  color: #edf9f1;
  box-shadow: inset 0 0 0 1px #33664b;
}
html[data-theme="dark"] .closing-panel p { color: #c8dfd0; }
html[data-theme="dark"] .closing-action .button { background: #a1edc7; color: #062d21; }
html[data-theme="dark"] .closing-action .button:hover { background: #c0f8dc; }
html[data-theme="dark"] .closing-action small { color: #bad7c4; }
html[data-theme="dark"] .legal,
html[data-theme="dark"] .footer-bottom { border-color: var(--line); }
html[data-theme="dark"] .legal p { color: #a8bfb3; }
html[data-theme="dark"] .legal .legal-title { color: #bfd3c7; }
html[data-theme="dark"] .legal .company { color: #d0e2d6; }
html[data-theme="dark"] .footer-bottom a { text-decoration-color: #567e68; }
html[data-theme="dark"] .tg-legal { color: #a8bfb3; border-color: var(--line); }

/* Authentication uses the same surface and action colors as plan selection. */
html[data-theme="dark"] .auth-dialog {
  background: #122b32;
  color: var(--ink);
  border-color: #466b59;
  box-shadow: 0 30px 100px #00000073;
}
html[data-theme="dark"] .auth-dialog::backdrop { background: #020b12bd; }
html[data-theme="dark"] .dialog-close { color: #bdd4c7; }
html[data-theme="dark"] .dialog-close:hover { color: #a3efc9; }
