/* Todoalist website
   Same foundations as operatorapps.dev. Two base themes: dark (mirrors the apps) and light (green darkened to #007a45
   so text and buttons keep >= 4.5:1 on the off-white ground). The seasonal themes are in seasons.css.
   With no saved choice the site follows the system's light/dark setting. */

@font-face { font-family: "Open Sans"; src: url("/assets/fonts/OpenSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("/assets/fonts/OpenSans-Semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/JetBrainsMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/JetBrainsMono-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ---- Tokens -------------------------------------------------------------------------------- */

:root {
  --bg: #06070a;
  --bg-raised: #0b0d12;
  --surface: #0e1117;
  --surface-2: #141820;
  --border: #1c212b;
  --border-strong: #2b323e;
  --text: #e6e8ec;
  --text-muted: #9da4af;
  --text-faint: #7a828e;
  --accent: #00ff88;
  --accent-hover: #4dffab;
  --accent-text: #00ff88;
  --accent-ink: #03140b;
  --accent-soft: rgba(0, 255, 136, 0.07);
  --accent-line: rgba(0, 255, 136, 0.32);
  --warn: #ffb020;
  --warn-soft: rgba(255, 176, 32, 0.08);
  --danger: #ff5c6c;
  --grid-line: rgba(255, 255, 255, 0.035);
  --header-bg: rgba(6, 7, 10, 0.82);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
  --tile: #06070a;

  --font-sans: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --radius: 10px;
  --radius-sm: 6px;
  --container: 1140px;
  --gutter: 24px;
  --header-h: 64px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #f6f7f5;
    --bg-raised: #ffffff;
    --surface: #ffffff;
    --surface-2: #eef1ee;
    --border: #dde2de;
    --border-strong: #c3cbc5;
    --text: #0f1512;
    --text-muted: #46514b;
    --text-faint: #5c6862;
    --accent: #007a45;
    --accent-hover: #006239;
    --accent-text: #00703f;
    --accent-ink: #ffffff;
    --accent-soft: rgba(0, 122, 69, 0.07);
    --accent-line: rgba(0, 122, 69, 0.35);
    --warn: #8a5300;
    --warn-soft: rgba(176, 106, 0, 0.08);
    --danger: #b3202f;
    --grid-line: rgba(15, 21, 18, 0.05);
    --header-bg: rgba(246, 247, 245, 0.86);
    --shadow: 0 1px 2px rgba(15, 21, 18, 0.04);
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #f6f7f5;
  --bg-raised: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef1ee;
  --border: #dde2de;
  --border-strong: #c3cbc5;
  --text: #0f1512;
  --text-muted: #46514b;
  --text-faint: #5c6862;
  --accent: #007a45;
  --accent-hover: #006239;
  --accent-text: #00703f;
  --accent-ink: #ffffff;
  --accent-soft: rgba(0, 122, 69, 0.07);
  --accent-line: rgba(0, 122, 69, 0.35);
  --warn: #8a5300;
  --warn-soft: rgba(176, 106, 0, 0.08);
  --danger: #b3202f;
  --grid-line: rgba(15, 21, 18, 0.05);
  --header-bg: rgba(246, 247, 245, 0.86);
  --shadow: 0 1px 2px rgba(15, 21, 18, 0.04);
  color-scheme: light;
}

/* ---- Base ---------------------------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; color: var(--text); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
code, kbd { font-family: var(--font-mono); font-size: 0.88em; }

a { color: var(--accent-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--accent-line); }
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

::selection { background: var(--accent); color: var(--accent-ink); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link { position: absolute; left: 16px; top: -48px; z-index: 100; padding: 8px 14px; background: var(--accent); color: var(--accent-ink); font-weight: 600; border-radius: var(--radius-sm); text-decoration: none; }
.skip-link:focus { top: 12px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.eyebrow {
  font: 700 12px/1.4 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.lede { font-size: 1.1875rem; line-height: 1.6; color: var(--text-muted); max-width: 62ch; }

/* ---- Header -------------------------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  backdrop-filter: saturate(150%) blur(12px);
}
.site-header-inner { display: flex; align-items: center; gap: 32px; height: 100%; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-mark-tile { fill: var(--accent); }
.brand-mark-glyph { stroke: var(--accent-ink); }
.brand-name { font: 700 15px/1 var(--font-mono); letter-spacing: 0.06em; }
.brand-suffix { margin-left: 8px; font: 400 12px/1 var(--font-sans); letter-spacing: 0; color: var(--text-faint); }

.header-actions { display: flex; gap: 6px; margin-left: auto; }
.icon-button {
  display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: transparent; color: var(--text-muted); cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.icon-button:hover { color: var(--text); border-color: var(--border-strong); }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Buttons ------------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font: 600 0.9375rem/1 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { border-color: var(--border-strong); color: var(--text); background: transparent; }
.btn-secondary:hover { border-color: var(--text-faint); background: var(--surface-2); }
.btn .icon { width: 16px; height: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- Sections ------------------------------------------------------------------------------ */

.section { padding: 96px 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-head { display: grid; gap: 14px; max-width: 720px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.375rem); }
.section-head p { color: var(--text-muted); font-size: 1.0625rem; }

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
}

/* ---- Hero ---------------------------------------------------------------------------------- */

.hero { position: relative; padding: 112px 0 96px; border-bottom: 1px solid var(--border); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 20%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 30% 20%, #000 30%, transparent 75%);
}
.hero-inner { display: grid; gap: 24px; }
.hero-inner > * { max-width: 820px; }
.hero h1 { font-size: clamp(2.375rem, 1.4rem + 3.4vw, 3.75rem); line-height: 1.08; letter-spacing: -0.03em; }
.hero h1 .accent { color: var(--accent-text); }
.hero .btn-row { margin-top: 12px; }

.hero-status {
  display: inline-flex; align-items: center; gap: 10px; width: fit-content;
  padding: 6px 12px 6px 10px; border: 1px solid var(--border); border-radius: 999px;
  font: 400 12px/1.4 var(--font-mono); color: var(--text-muted); background: var(--bg-raised);
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

@media (max-width: 640px) { .hero { padding: 72px 0 64px; } }

/* ---- App cards (home) ---------------------------------------------------------------------- */

.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 900px) { .app-grid { grid-template-columns: 1fr; } }

.app-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 0.2s;
}
.app-card:hover { border-color: var(--border-strong); }
.app-card-main { display: grid; gap: 18px; padding: 28px; flex: 1; }
.app-card-top { display: flex; align-items: center; gap: 16px; }
.app-card h3 { font-size: 1.375rem; }
.app-card h3 a { color: inherit; text-decoration: none; }
.app-card h3 a::after { content: ""; position: absolute; inset: 0; }
.app-card-title { position: relative; }
.app-card .category { font: 400 12px/1.4 var(--font-mono); color: var(--text-faint); letter-spacing: 0.04em; margin-top: 4px; }
.app-card p { color: var(--text-muted); }
.app-card-links {
  display: flex; flex-wrap: wrap; gap: 4px 20px;
  padding: 16px 28px; border-top: 1px solid var(--border);
  font-size: 0.875rem;
}
.app-card-links a { color: var(--text-muted); text-decoration: none; }
.app-card-links a:hover { color: var(--accent-text); }

.check-list { display: grid; gap: 8px; list-style: none; }
.check-list li { position: relative; padding-left: 26px; color: var(--text-muted); font-size: 0.9375rem; }
.check-list li::before {
  content: ""; position: absolute; left: 2px; top: 0.55em;
  width: 10px; height: 6px; border-left: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text);
  transform: rotate(-45deg);
}

.app-icon { width: 56px; height: 56px; flex: none; border-radius: 14px; }
.app-icon-lg { width: 88px; height: 88px; border-radius: 22px; }

/* ---- Badges -------------------------------------------------------------------------------- */

.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 999px;
  font: 400 12px/1 var(--font-mono); color: var(--text-muted); white-space: nowrap;
}
.badge-accent { border-color: var(--accent-line); color: var(--accent-text); background: var(--accent-soft); }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---- Principles ---------------------------------------------------------------------------- */

.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.principle { padding: 28px 28px 8px 0; display: grid; gap: 10px; align-content: start; }
.principle + .principle { padding-left: 28px; border-left: 1px solid var(--border); }
.principle .num { font: 700 12px/1 var(--font-mono); color: var(--accent-text); letter-spacing: 0.1em; }
.principle h3 { font-size: 1.0625rem; }
.principle p { color: var(--text-muted); font-size: 0.9375rem; }
@media (max-width: 900px) {
  .principles { grid-template-columns: 1fr 1fr; }
  .principle:nth-child(3) { padding-left: 0; border-left: 0; }
  .principle:nth-child(n + 3) { border-top: 1px solid var(--border); }
}
@media (max-width: 560px) {
  .principles { grid-template-columns: 1fr; }
  .principle, .principle + .principle { padding: 24px 0 8px; border-left: 0; }
  .principle + .principle { border-top: 1px solid var(--border); }
}

/* ---- Tables, callouts ---------------------------------------------------------------------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
th, td { padding: 12px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--border); }
thead th { border-top: 0; background: var(--surface-2); font: 700 11.5px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
td:first-child { color: var(--text); }
td { color: var(--text-muted); }
td code { color: var(--text); }

.callout {
  padding: 18px 20px; border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); background: var(--accent-soft);
}
.callout-title { font: 700 12px/1.4 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 6px; }
.callout-warn { border-left-color: var(--warn); background: var(--warn-soft); }
.callout-warn .callout-title { color: var(--warn); }
.callout p + p { margin-top: 8px; }

/* ---- Document pages ------------------------------------------------------------------------ */

.doc { padding-top: 48px; padding-bottom: 96px; }
.doc-header { display: grid; gap: 16px; padding-bottom: 32px; margin-bottom: 40px; border-bottom: 1px solid var(--border); max-width: 860px; }
.doc-header h1 { font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem); letter-spacing: -0.025em; }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; font: 400 12.5px/1.5 var(--font-mono); color: var(--text-faint); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--border-strong); }
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent-text); }

.doc-meta { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 4px 0 0; }
.doc-meta div { display: grid; gap: 2px; }
.doc-meta dt { font: 400 11px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); }
.doc-meta dd { margin: 0; font-size: 0.9375rem; }

.doc-body { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 64px; align-items: start; }
.doc-body > .prose:only-child { grid-column: 1 / -1; }

.doc-toc { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; }
.doc-toc summary { font: 700 11.5px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 12px; list-style: none; cursor: default; }
.doc-toc summary::-webkit-details-marker { display: none; }
.doc-toc ol { list-style: none; display: grid; gap: 2px; border-left: 1px solid var(--border); }
.doc-toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--text-muted); font-size: 0.875rem; line-height: 1.45; text-decoration: none; }
.doc-toc a:hover { color: var(--text); }
.doc-toc a.is-active { color: var(--accent-text); border-left-color: var(--accent); }

@media (max-width: 960px) {
  .doc-body { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .doc-toc { position: static; max-height: none; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 14px 18px; }
  .doc-toc summary { margin: 0; cursor: pointer; display: flex; justify-content: space-between; }
  .doc-toc summary::after { content: "+"; font-size: 14px; }
  .doc-toc details[open] summary { margin-bottom: 12px; }
  .doc-toc details[open] summary::after { content: "\2212"; }
}

/* Long-form text: legal documents, support articles. */
.prose { max-width: 760px; font-size: 1rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  margin-top: 2.6em; padding-top: 1.6em; border-top: 1px solid var(--border);
  font-size: 1.375rem; letter-spacing: -0.01em;
}
.prose > h2:first-child, .prose > .callout:first-child + h2 { margin-top: 1.6em; }
.prose > :first-child { margin-top: 0; }
.prose > :first-child + h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.8em; font-size: 1.0625rem; }
.prose h2 + *, .prose h3 + * { margin-top: 0.7em; }
.prose p, .prose li { color: var(--text-muted); }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: 0.45em; }
.prose li::marker { color: var(--text-faint); }
.prose .table-wrap { margin-top: 1.4em; margin-bottom: 0.4em; }
.prose table { font-size: 0.9rem; line-height: 1.6; }
.prose .callout p { color: var(--text); }
.prose .summary-box { padding: 22px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.prose .summary-box h2 { margin: 0 0 10px; padding: 0; border: 0; font: 700 12px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent-text); }
.prose .summary-box ul { margin-top: 0; }
.prose .summary-box li { color: var(--text); }
.prose address { font-style: normal; color: var(--text); }
.prose .path { font-family: var(--font-mono); font-size: 0.88em; color: var(--text); background: var(--surface-2); padding: 1px 6px; border-radius: 4px; white-space: nowrap; }

.prose details { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.prose details + details { margin-top: 10px; }
.prose summary { padding: 14px 18px; cursor: pointer; font-weight: 600; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.prose summary::-webkit-details-marker { display: none; }
.prose summary::after { content: "+"; font-family: var(--font-mono); color: var(--text-faint); }
.prose details[open] summary::after { content: "\2212"; }
.prose details > :not(summary) { padding: 0 18px; }
.prose details > :last-child { padding-bottom: 16px; }
.prose details > * + * { margin-top: 0.7em; }

/* ---- Contact / info cards ------------------------------------------------------------------ */

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.info-card { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); display: grid; gap: 10px; align-content: start; }
.info-card h2, .info-card h3 { font-size: 1.0625rem; }
.info-card p { color: var(--text-muted); font-size: 0.9375rem; }
.info-card .mono { font: 400 14px/1.5 var(--font-mono); }
@media (max-width: 900px) { .card-grid, .card-grid-2 { grid-template-columns: 1fr; } }

/* ---- Footer -------------------------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--border); background: var(--bg-raised); padding: 64px 0 32px; font-size: 0.875rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.footer-brand { display: grid; gap: 16px; align-content: start; }
.footer-brand p { color: var(--text-muted); max-width: 34ch; }
.social-links { display: flex; gap: 10px; list-style: none; margin-top: 4px; }
.social-link {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-muted); transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.social-link:hover { color: var(--accent-text); border-color: var(--accent-line); background: var(--accent-soft); }
.social-link svg { width: 18px; height: 18px; fill: currentColor; }
.footer-heading { font: 700 11.5px/1.4 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 14px; }
.footer-col ul { list-style: none; display: grid; gap: 8px; }
.footer-col a { color: var(--text-muted); text-decoration: none; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-faint); font-size: 0.8125rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---- 404 ----------------------------------------------------------------------------------- */

.not-found { padding: 128px 0; display: grid; gap: 20px; max-width: 640px; }
.not-found h1 { font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem); }
.not-found .code { font: 700 13px/1 var(--font-mono); color: var(--accent-text); letter-spacing: 0.12em; }

/* ---- Small screens, motion, print ---------------------------------------------------------- */

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .lede { font-size: 1.0625rem; }
  .fact { padding: 20px 16px; }
  .app-card-main { padding: 22px; }
  .app-card-links { padding: 14px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #f3f3f3; --text: #000; --text-muted: #222; --text-faint: #555; --border: #ccc; --accent-text: #000; }
  .site-header, .site-footer, .doc-toc, .skip-link { display: none !important; }
  .doc { padding: 0; }
  .doc-body { display: block; }
  .prose { max-width: none; font-size: 11pt; }
  .prose a { color: #000; }
  .prose h2 { break-after: avoid; }
}

/* ---- Utilities ----------------------------------------------------------------------------- */

.mt-20 { margin-top: 20px; }
.doc-body > * { min-width: 0; }
.prose td .path { white-space: normal; }

[hidden] { display: none !important; }

/* Seasonal markup stays hidden unless seasons.css shows it for its theme, so a failed load of seasons.css never
   leaves the decorations unstyled on the page. */
.season-garland, .brand-badge, .season-hero, .season-add-icon, .season-tip, .season-scene { display: none; }

/* ---- Theme menu ---------------------------------------------------------------------------- */

.theme-menu { position: relative; }
.theme-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 196px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.55);
}
.theme-panel ul { list-style: none; display: grid; gap: 2px; }
.theme-panel-title { padding: 8px 10px 6px; font: 700 11px/1.4 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.theme-option {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px;
  border: 0; border-radius: var(--radius-sm); background: none; color: var(--text-muted);
  font: 400 0.9375rem/1 var(--font-sans); text-align: left; cursor: pointer;
}
.theme-option:hover { background: var(--surface-2); color: var(--text); }
.theme-option[aria-pressed="true"] { color: var(--text); }
.theme-option[aria-pressed="true"]::after {
  content: ""; margin-left: auto; width: 10px; height: 6px; transform: rotate(-45deg) translateY(-2px);
  border-left: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text);
}
.theme-swatch { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 1px solid var(--border-strong); }
.theme-swatch-dark { background: #06070a; box-shadow: inset 0 0 0 4px #06070a, inset 0 0 0 9px #00ff88; }
.theme-swatch-light { background: #f6f7f5; box-shadow: inset 0 0 0 4px #f6f7f5, inset 0 0 0 9px #007a45; }

/* ---- The app ------------------------------------------------------------------------------- */

.app { padding: 28px 0 72px; }
.app-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.app-grid.has-side { grid-template-columns: 240px minmax(0, 1fr) 300px; }
@media (max-width: 1100px) {
  .app-grid, .app-grid.has-side { grid-template-columns: 220px minmax(0, 1fr); }
  .app-side { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .app-grid, .app-grid.has-side { grid-template-columns: minmax(0, 1fr); }
}
.app-lists { display: grid; gap: 24px; min-width: 0; }
.excel-button { width: 100%; margin-top: 4px; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-title, .info-card .panel-title { font: 700 11.5px/1.4 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text); }

.lists-panel { padding: 16px 12px 10px; display: grid; gap: 8px; }
.lists-panel .panel-title { padding: 0 6px; }
.list-nav { list-style: none; display: grid; gap: 2px; }
.list-button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px;
  border: 0; border-radius: var(--radius-sm); background: none; color: var(--text-muted);
  font: 400 0.9375rem/1.3 var(--font-sans); text-align: left; cursor: pointer;
}
.list-button:hover { background: var(--surface-2); color: var(--text); }
.list-button[aria-current="true"] { background: var(--accent-soft); color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.list-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-count { flex: none; font: 400 12px/1 var(--font-mono); color: var(--text-faint); }
.list-button[aria-current="true"] .list-count { color: var(--accent-text); }

.link-button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  border: 0; background: none; color: var(--accent-text); cursor: pointer;
  font: 700 12.5px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase;
}
.link-button:hover { text-decoration: underline; text-underline-offset: 3px; }

.tasks-panel { min-width: 0; }
.tasks-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; padding: 22px 24px 16px; }
.tasks-title { display: grid; gap: 6px; min-width: 0; }
.tasks-title h1 { font-size: 1.75rem; overflow-wrap: anywhere; }
.tasks-summary { font: 400 12.5px/1.4 var(--font-mono); color: var(--text-faint); letter-spacing: 0.04em; }
.tasks-actions { display: flex; gap: 6px; }
.title-edit { font: 600 1.5rem/1.2 var(--font-sans); width: min(100%, 420px); }

.field {
  width: 100%; min-width: 0; height: 48px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); font: 400 1rem/1 var(--font-sans);
}
.field::placeholder { color: var(--text-faint); }
.field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.add-form { display: flex; gap: 10px; padding: 0 24px 16px; }
.add-form .btn { height: 48px; flex: none; }

.filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 24px 16px; border-bottom: 1px solid var(--border); }
.chip {
  height: 34px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px;
  background: transparent; color: var(--text-muted); cursor: pointer;
  font: 400 12.5px/1 var(--font-mono); letter-spacing: 0.04em;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip[aria-pressed="true"] { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-text); }

.task-list { list-style: none; }
.task { display: flex; align-items: center; gap: 6px; min-height: 58px; padding: 6px 12px 6px 14px; border-bottom: 1px solid var(--border); }
.task-check { display: grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0; border: 0; background: none; cursor: pointer; border-radius: var(--radius-sm); }
.task-box { display: grid; place-items: center; width: 22px; height: 22px; border: 1.5px solid var(--border-strong); border-radius: 6px; transition: background-color 0.15s, border-color 0.15s; }
.task-check:hover .task-box { border-color: var(--accent); }
.task-box svg { width: 14px; height: 14px; fill: none; stroke: var(--accent-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.task.is-done .task-box { background: var(--accent); border-color: var(--accent); }
.task.is-done .task-box svg { opacity: 1; }
.task-text { flex: 1; min-width: 0; padding: 8px 4px; color: var(--text); overflow-wrap: anywhere; cursor: text; }
.task.is-done .task-text { color: var(--text-faint); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.task-edit { height: 40px; flex: 1; }
.task-actions { display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s; }
.task:hover .task-actions, .task:focus-within .task-actions { opacity: 1; }
@media (hover: none) { .task-actions { opacity: 1; } }
.task-actions .icon-button { border-color: transparent; width: 40px; height: 40px; }
.task-actions .icon-button:hover { border-color: var(--border); }
.task-actions .is-delete:hover { color: var(--danger); }

.empty { padding: 48px 24px; display: grid; gap: 8px; justify-items: center; text-align: center; }
.empty-title { font: 700 12px/1.4 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); }
.empty p:last-child { color: var(--text-muted); }

.tasks-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 24px; }
.saved-status { display: inline-flex; align-items: center; gap: 8px; font: 400 12px/1.4 var(--font-mono); color: var(--text-faint); letter-spacing: 0.04em; }
.saved-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-text); }
.saved-status.is-error { color: var(--danger); }
.saved-status.is-error::before { background: var(--danger); }

.btn-sm { height: 36px; padding: 0 14px; font-size: 0.875rem; }
.btn-danger { border-color: var(--border-strong); color: var(--danger); background: transparent; }
.btn-danger:hover { border-color: var(--danger); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.app-side { display: grid; gap: 20px; }
.app-notice { margin-bottom: 20px; }

/* ---- Ads ----------------------------------------------------------------------------------- */

.ad { display: grid; gap: 6px; }
.ad-label { font: 400 10.5px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); }
.ad ins.adsbygoogle { display: block; min-height: 90px; }
.ad-top { margin-bottom: 20px; }
.ad-side ins.adsbygoogle { min-height: 250px; }
.ad-content { margin-top: 40px; }

/* ---- Print: just the current list ---------------------------------------------------------- */

@media print {
  .app { padding: 0; }
  .app-grid { display: block; }
  .app-lists, .app-side, .add-form, .filters, .tasks-actions, .task-actions, .tasks-foot, .ad, .home-content { display: none !important; }
  .panel { border: 0; box-shadow: none; }
}
