/* =========================================================
   Design tokens
   ========================================================= */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f1f3fa;
  --text: #11142a;
  --text-2: #3b4060;
  --muted: #687090;
  --line: #e4e7f1;
  --primary: #4f46e5;
  --primary-2: #7c3aed;
  --primary-soft: #eef0ff;
  --primary-ink: #ffffff;
  --accent: #f97316;
  --good: #059669;
  --hl: #fff7dc;
  --tile-a: #1d2140;
  --tile-b: #0f1226;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(17, 20, 42, .04), 0 8px 24px rgba(17, 20, 42, .06);
  --shadow-lg: 0 20px 50px rgba(40, 36, 120, .14);
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
:root[data-theme="dark"] {
  --bg: #0b0d1a;
  --surface: #13162a;
  --surface-2: #1a1e36;
  --text: #eef0ff;
  --text-2: #c5c9e6;
  --muted: #9298ba;
  --line: #262a48;
  --primary: #8b85ff;
  --primary-2: #b18cff;
  --primary-soft: #1f2248;
  --primary-ink: #0b0d1a;
  --hl: #2b2a1a;
  --tile-a: #23284d;
  --tile-b: #171a35;
  --shadow: none;
  --shadow-lg: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d1a; --surface: #13162a; --surface-2: #1a1e36; --text: #eef0ff; --text-2: #c5c9e6; --muted: #9298ba;
    --line: #262a48; --primary: #8b85ff; --primary-2: #b18cff; --primary-soft: #1f2248; --primary-ink: #0b0d1a;
    --hl: #2b2a1a; --tile-a: #23284d; --tile-b: #171a35; --shadow: none; --shadow-lg: none;
  }
}

/* =========================================================
   Base
   ========================================================= */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; color: var(--text); }
h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); font-weight: 800; margin: 0 0 .35em; }
h2 { font-size: 1.3rem; font-weight: 700; margin: 0 0 .8em; }
h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 18px; padding-bottom: 56px; }
.muted { color: var(--muted); }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 680px; margin-left: auto; margin-right: auto; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); background: var(--primary-soft); padding: 5px 12px; border-radius: 999px; margin: 0 0 14px; }
.grad { background: linear-gradient(100deg, var(--primary), var(--primary-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--primary); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; border-radius: 6px; }

/* =========================================================
   Header
   ========================================================= */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.2rem; color: var(--text); letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--primary), var(--primary-2)); position: relative; box-shadow: 0 4px 12px rgba(79, 70, 229, .35); }
.logo-mark::before { content: ""; position: absolute; inset: 6px; border: 2.5px solid #fff; border-radius: 50%; }
.logo-mark::after { content: ""; position: absolute; left: 12px; top: 8px; width: 2.5px; height: 6px; background: #fff; border-radius: 2px; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: 6px; }
.menu { position: relative; }
.menu-btn, .nav-link { font: inherit; font-size: .94rem; font-weight: 600; color: var(--text-2); background: none; border: 0; padding: 8px 12px; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.menu-btn::after { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: .6; margin-left: 4px; }
.menu-btn:hover, .nav-link:hover, .menu.open .menu-btn { background: var(--primary-soft); color: var(--primary); text-decoration: none; }
.menu-panel { position: absolute; top: calc(100% + 8px); left: 0; width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 8px; display: none; z-index: 40; }
.menu.open .menu-panel { display: block; }
@media (hover: hover) and (min-width: 901px) { .menu:hover .menu-panel { display: block; } .menu-panel::before { content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 10px; } }
.menu-panel a { display: block; padding: 9px 12px; border-radius: 10px; color: var(--text); }
.menu-panel a:hover { background: var(--surface-2); text-decoration: none; }
.menu-panel b { display: block; font-size: .94rem; font-weight: 600; }
.menu-panel span { display: block; font-size: .8rem; color: var(--muted); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; min-width: 40px; justify-content: center; padding: 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text-2); cursor: pointer; font: inherit; font-size: .9rem; }
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.search-open .search-hint { color: var(--muted); min-width: 110px; text-align: left; }
kbd { font: 600 .72rem var(--font); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; color: var(--muted); background: var(--surface-2); }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; } :root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i-sun { display: block; } :root:not([data-theme="light"]) .i-moon { display: none; } }
.nav-toggle { display: none; }

/* =========================================================
   Search overlay
   ========================================================= */
.search-overlay { position: fixed; inset: 0; background: rgba(10, 12, 30, .45); backdrop-filter: blur(4px); z-index: 60; display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.search-overlay[hidden] { display: none; }
.search-box { width: 100%; max-width: 640px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; }
.search-input-row { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-input-row input { flex: 1; border: 0; outline: 0; background: none; font: 500 1.1rem var(--font); color: var(--text); min-width: 0; }
.search-close { font: 600 .75rem var(--font); background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; cursor: pointer; }
.search-results { list-style: none; margin: 0; padding: 8px; max-height: 60vh; overflow-y: auto; }
.search-results li a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text); }
.search-results li a:hover, .search-results li.active a { background: var(--primary-soft); text-decoration: none; }
.search-results li a span { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.search-results li.smart a { font-weight: 700; }
.search-results .empty { padding: 14px; color: var(--muted); }

/* =========================================================
   Hero
   ========================================================= */
.crumbs { font-size: .84rem; color: var(--muted); margin: 4px 0 12px; }
.crumbs a { color: var(--muted); }
.crumbs span[aria-current] { color: var(--text-2); }
.hero { padding: 24px 0 28px; }
.hero-center { text-align: center; }
.hero-band {
  position: relative; border-radius: 28px; padding: 40px 24px 34px; margin-bottom: 26px;
  background:
    radial-gradient(1200px 300px at 50% -80px, color-mix(in srgb, var(--primary) 16%, transparent), transparent 70%),
    radial-gradient(500px 200px at 90% 110%, color-mix(in srgb, var(--primary-2) 12%, transparent), transparent 70%),
    var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden;
}
.hero-band::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px; mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 65%); -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 65%); }
.hero-band > * { position: relative; }
.hero-center h1 { max-width: 900px; margin-left: auto; margin-right: auto; }

/* Big answer */
.count { margin: 6px 0 14px; }
.count-pre { margin: 0; font-size: 1.15rem; color: var(--muted); font-weight: 500; }
.count-big { font-size: clamp(5rem, 21vw, 10rem); font-weight: 800; line-height: .95; letter-spacing: -.06em; font-variant-numeric: tabular-nums; margin: 6px 0 8px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.count-big.text { font-size: clamp(2.6rem, 9vw, 5rem); letter-spacing: -.04em; line-height: 1.05; }
.count-post { margin: 0; font-size: 1.3rem; color: var(--text-2); }
.count-post b { color: var(--text); }
.count-sub { margin: 6px 0 0; color: var(--muted); }
.unit-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0 20px; }
.unit-chips span { background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-size: .88rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; }

/* Countdown tiles */
.ticker { display: flex; justify-content: center; gap: 10px; margin: 0 0 22px; }
.tk { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 86px; padding: 14px 10px 10px; border-radius: 16px;
  background: linear-gradient(180deg, var(--tile-a), var(--tile-b)); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 24px rgba(15, 18, 38, .22); position: relative; overflow: hidden; }
.tk::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,.35); }
.tk b { font-size: 2.2rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.tk small { margin-top: 8px; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; opacity: .65; }

/* Action bar */
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 4px 0 0; }
.act { display: inline-flex; align-items: center; gap: 7px; font: 600 .88rem var(--font); color: var(--text-2); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; cursor: pointer; }
.act:hover { border-color: var(--primary); color: var(--primary); }
.act svg { width: 1.05em; height: 1.05em; }
.act-menu { position: relative; }
.act-pop { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 200px; z-index: 20; text-align: left; }
.act-pop a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); font-size: .9rem; }
.act-pop a:hover { background: var(--surface-2); text-decoration: none; }
.embed-box { max-width: 620px; margin: 14px auto 0; text-align: left; }
.embed-box p { font-size: .88rem; color: var(--muted); margin: 0 0 6px; }
.embed-box textarea { width: 100%; font: .8rem ui-monospace, Consolas, monospace; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); resize: vertical; }
.answer-strip { display: inline-flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; align-items: center; margin-top: 18px; background: var(--surface-2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 14px; font-size: .95rem; }

/* Home hero */
.hero-home { padding-top: 54px; padding-bottom: 30px; }
.hero-home h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); }
.hero-search { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 620px; margin: 22px auto 24px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-lg); color: var(--muted); font: 500 1rem var(--font); cursor: text; text-align: left; }
.hero-search span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hero-search:hover { border-color: var(--primary); }
.today-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; max-width: 760px; margin: 0 auto; }
.today-strip > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px; }
.today-strip b { display: block; font-size: 1.2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.today-strip b a { color: inherit; }
.today-strip span { font-size: .76rem; color: var(--muted); }
.day-bar { max-width: 760px; margin: 14px auto 0; }
.day-bar small { color: var(--muted); }

/* =========================================================
   Layout
   ========================================================= */
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.col-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.side-card h3 { font-size: .95rem; margin-bottom: 10px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 0 0 18px; box-shadow: var(--shadow); overflow-x: auto; }
.answer-card { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
.prose p:last-child { margin-bottom: 0; }
.section-title { font-size: 1.35rem; margin: 34px 0 14px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.section-head a { font-weight: 600; font-size: .92rem; white-space: nowrap; }
.list { margin: 0; padding-left: 18px; }
.list li { margin: 4px 0; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat { background: var(--surface-2); border-radius: 14px; padding: 14px; }
.stat-v { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat-l { font-size: .8rem; color: var(--muted); }

/* Progress */
.progress-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 0 0 18px; box-shadow: var(--shadow); }
.bar { height: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-2)); border-radius: 99px; }
.big-bar { height: 16px; max-width: 640px; margin-left: auto; margin-right: auto; }
.pbar { margin: 0 0 18px; }
.pbar-head, .pbar-foot { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; }
.pbar-head span, .pbar-foot { color: var(--muted); font-variant-numeric: tabular-nums; }
.pbar-foot { font-size: .8rem; }

/* Forms */
input, select, button, textarea { font: inherit; }
input[type=date], input[type=number], input[type=datetime-local], input[type=time], input[type=text], select, .share {
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); min-width: 0; }
input:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
button, .btn-lg { padding: 11px 20px; border: 0; border-radius: 12px; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; font-weight: 700; cursor: pointer; box-shadow: 0 6px 16px rgba(79, 70, 229, .25); }
button:hover { filter: brightness(1.06); }
.btn-light { background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.tool-form, .inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 16px 0; }
.hero-center .tool-form { justify-content: center; }
.tool-form label, .inline-form label, .calc-form label, .maker label { display: flex; flex-direction: column; font-size: .82rem; font-weight: 600; color: var(--muted); gap: 5px; text-align: left; }
.tool-form label.check { flex-direction: row; align-items: center; color: var(--text); }
.inline-form { margin: 0; }
.inline-form label { flex: 1; }
.big-form { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; max-width: 560px; margin: 20px auto 0; }
.big-form input { font-size: 1.1rem; padding: 14px 16px; flex: 1; min-width: 180px; }
.big-form input[type=number] { flex: 0 0 110px; min-width: 0; text-align: center; font-weight: 700; }
.big-form button { padding: 15px 26px; font-size: 1.02rem; }
.big-form-unit { font-weight: 600; color: var(--muted); }
.calc-form { display: flex; flex-direction: column; gap: 10px; }
.calc-form h3 { margin: 0; }
.calc-row { display: flex; gap: 8px; }
.calc-row input { width: 90px; }
.calc-row select { flex: 1; }
.maker { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 560px; margin: 22px auto 0; text-align: left; }
.maker .wide, .maker button { grid-column: 1 / -1; }
.hfn-out { font-size: 1.5rem; margin: 18px 0 6px; }

/* Buttons & chips */
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-block; font-weight: 600; font-size: .88rem; padding: 8px 13px; border-radius: 11px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.btn:hover { text-decoration: none; border-color: var(--primary); color: var(--primary); }
.btn-row.solid .btn { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.btn-row.solid .btn:hover { background: var(--primary); color: var(--primary-ink); }
.btn-row.stack { flex-direction: column; }
.btn-row.stack .btn { display: block; }
.btn-lg { font-size: 1rem; }
.pill-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pill-list a { display: inline-block; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; font-size: .88rem; color: var(--text-2); font-weight: 500; }
.pill-list a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pill-list li.past { opacity: .45; text-decoration: line-through; }
details.card .pill-list li { background: var(--surface-2); border-radius: 999px; padding: 4px 10px; font-size: .85rem; }
.compact .pill-list a { padding: 3px 9px; font-size: .8rem; }
details.card summary { cursor: pointer; }
details.card[open] summary { margin-bottom: 12px; }
.links { margin-top: 18px; }

/* Quick answer grid */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.quick { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: var(--text); box-shadow: var(--shadow); transition: transform .12s, border-color .12s; }
.quick:hover { text-decoration: none; border-color: var(--primary); transform: translateY(-2px); }
.quick b { font-size: .95rem; }
.quick span { font-size: .8rem; color: var(--muted); }
.quick-lg { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.quick-lg .quick { padding: 16px; }
.quick-lg .quick b { font-size: 1.02rem; }

/* Tools */
.tool-grid, .cards4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tool-grid.two, .cards2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.tool { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--text); box-shadow: var(--shadow); transition: transform .12s, border-color .12s; }
.tool:hover { border-color: var(--primary); text-decoration: none; transform: translateY(-2px); }
.tool b { font-size: 1.02rem; }
.tool span { color: var(--muted); font-size: .9rem; }
.tool-ic { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); margin-bottom: 8px; stroke-width: 1.8; }

/* Holiday tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; }
.tile { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; color: var(--text); box-shadow: var(--shadow); transition: transform .12s, border-color .12s; }
.tile:hover { border-color: var(--primary); text-decoration: none; transform: translateY(-2px); }
.tile-n { font-size: 2rem; font-weight: 800; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--primary); }
.tile-u { font-size: .78rem; color: var(--muted); min-height: 1.2em; }
.tile-name { font-weight: 700; margin-top: 8px; font-size: .93rem; line-height: 1.3; }
.tile-date { font-size: .78rem; color: var(--muted); }

/* Glance cards */
.glance { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.glance-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--text); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.glance-card:hover { border-color: var(--primary); text-decoration: none; }
.glance-card b { font-size: 1.8rem; font-weight: 800; letter-spacing: -.03em; }
.glance-card span { color: var(--muted); font-size: .9rem; }

/* FAQ */
.faq { margin: 30px 0; }
.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.faq-item h3 { font-size: 1rem; margin: 0 0 6px; }
.faq-item p { margin: 0; color: var(--text-2); font-size: .95rem; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.table tr:last-child td { border-bottom: 0; }
.table tr.hl td { background: var(--hl); }
.table tbody tr:hover td { background: var(--surface-2); }

/* Mini calendar */
.mini-cal-head { font-weight: 700; text-align: center; margin-bottom: 8px; }
.mini-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; font-size: .82rem; font-variant-numeric: tabular-nums; }
.mini-cal-grid .mc-w { font-size: .68rem; color: var(--muted); font-weight: 700; padding: 2px 0; }
.mini-cal-grid a { display: block; padding: 6px 0; border-radius: 8px; color: var(--text-2); }
.mini-cal-grid a:hover { background: var(--primary-soft); text-decoration: none; }
.mini-cal-grid a.we { color: var(--muted); }
.mini-cal-grid a.today { box-shadow: inset 0 0 0 2px var(--primary); }
.mini-cal-grid a.on { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; font-weight: 800; }

/* Full calendar page */
.cal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.cal-month { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.cal-month h2 { font-size: 1.05rem; margin-bottom: 8px; }
.cal { width: 100%; border-collapse: collapse; text-align: center; font-size: .85rem; font-variant-numeric: tabular-nums; }
.cal th { color: var(--muted); font-weight: 700; font-size: .7rem; padding: 3px 0; }
.cal td { padding: 1px; }
.cal td a { display: block; padding: 5px 0; border-radius: 8px; color: var(--text); }
.cal td a:hover { background: var(--primary-soft); text-decoration: none; }
.cal .wk { color: var(--muted); font-size: .68rem; }
.cal td.we a { color: var(--muted); }
.cal td.hol a { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-weight: 800; }
.cal td.today a { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; font-weight: 800; }
.cal-hol { list-style: none; margin: 8px 0 0; padding: 0; font-size: .76rem; color: var(--muted); }

/* Life grid & quizzes */
.life-grid { display: grid; grid-template-columns: repeat(52, 1fr); gap: 2px; margin: 16px 0; max-width: 760px; }
.life-grid i { display: block; aspect-ratio: 1; border-radius: 2px; background: var(--surface-2); border: 1px solid var(--line); }
.life-grid i.on { background: var(--primary); border-color: var(--primary); }
.quiz .q { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.quiz .q > span { width: 100%; font-weight: 700; }
.quiz .q label:not(.opt) { font-weight: 700; display: flex; flex-direction: column; gap: 4px; }
.opt { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; cursor: pointer; font-size: .93rem; }
.opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.quiz button { margin-top: 16px; }
.share { width: 100%; max-width: 560px; font-size: .85rem; }

/* Old hero answer styles (other templates) */
.answer { font-size: 1.3rem; margin: .3em 0; }
.big { font-size: clamp(2.6rem, 9vw, 4.4rem); font-weight: 800; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--primary), var(--primary-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.date-line { font-size: 1.1rem; font-weight: 600; margin: .4em 0; }

/* Embed widget */
body.bare { background: transparent; }
.bare-main { padding: 0; }
.embed-widget { font-family: var(--font); text-align: center; padding: 18px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.embed-widget .ticker { margin: 12px 0 10px; gap: 8px; }
.embed-widget .tk { min-width: 62px; padding: 10px 6px 8px; }
.embed-widget .tk b { font-size: 1.5rem; }
.ew-title { font-weight: 800; font-size: 1.15rem; }
.ew-date { color: var(--muted); font-size: .85rem; }
.ew-done { font-size: 2rem; font-weight: 800; margin: 10px 0; color: var(--primary); }
.ew-credit { font-size: .75rem; color: var(--muted); }

/* Fullscreen countdown */
.hero-band:fullscreen { display: flex; flex-direction: column; justify-content: center; border-radius: 0; }
.hero-band:fullscreen .count-big { font-size: 22vw; }
.hero-band:fullscreen .tk b { font-size: 4rem; }
.hero-band:fullscreen .tk { min-width: 150px; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: #0c0f24; color: #aab0d6; padding: 48px 0 24px; font-size: .92rem; margin-top: 30px; }
.site-footer a { color: #d9dcf5; }
.footer-top { display: grid; grid-template-columns: 280px 1fr; gap: 40px; }
.footer-brand p { margin: 12px 0 0; line-height: 1.6; }
.footer-small { font-size: .82rem; color: #8288b4; }
.logo-light { color: #fff; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.footer-grid h3 { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: #8288b4; margin: 0 0 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 7px 0; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 36px; padding-top: 18px; border-top: 1px solid #22264a; color: #8288b4; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1000px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .layout-2 { grid-template-columns: 1fr; }
  .col-side { position: static; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 10px 16px 16px; margin: 0; box-shadow: var(--shadow-lg); }
  .nav.open { display: flex; }
  .menu-panel { position: static; width: auto; box-shadow: none; border: 0; padding: 0 0 6px 8px; }
  .menu-btn, .nav-link { width: 100%; justify-content: space-between; padding: 12px; }
  .nav-toggle { display: inline-flex; }
  .search-open .search-hint, .search-open kbd { display: none; }
}
@media (max-width: 600px) {
  .hero-band { padding: 28px 14px 24px; border-radius: 22px; }
  .tk { min-width: 68px; padding: 12px 6px 8px; }
  .tk b { font-size: 1.6rem; }
  .ticker { gap: 6px; }
  .today-strip { grid-template-columns: repeat(3, 1fr); }
  .today-strip > div:nth-child(n+4) { display: none; }
  .card { padding: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .maker { grid-template-columns: 1fr; }
  .big-form input[type=number] { flex-basis: 80px; }
  .hero-search kbd { display: none; }
}
@media print {
  .site-header, .site-footer, .links, .faq, .no-print, .crumbs, .actions, .col-side, .upcoming { display: none !important; }
  body { background: #fff; }
  .layout-2 { display: block; }
  .cal-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Reset the global button look on UI controls */
.menu-btn, .nav-link, .icon-btn, .act, .search-close, .hero-search { box-shadow: none; }
.hero-search { box-shadow: var(--shadow-lg); }
.col-main .stats { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 600px) { .col-main .stats { grid-template-columns: repeat(2, 1fr); } }
.layout-2 > * { min-width: 0; }
@media (max-width: 900px) { .layout-2 { grid-template-columns: minmax(0, 1fr); } }

/* Contact form */
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form label { display: flex; flex-direction: column; gap: 5px; font-size: .82rem; font-weight: 600; color: var(--muted); }
.contact-form .wide, .contact-form button { grid-column: 1 / -1; }
.contact-form textarea { padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; resize: vertical; }
.contact-form button { justify-self: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-error { background: color-mix(in srgb, #dc2626 12%, transparent); color: #b91c1c; padding: 10px 14px; border-radius: 10px; }
.footer-links { line-height: 2; }
@media (max-width: 600px) { .contact-form { grid-template-columns: 1fr; } }

/* Guides */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.guide-card { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--text); box-shadow: var(--shadow); transition: transform .12s, border-color .12s; }
.guide-card:hover { border-color: var(--primary); text-decoration: none; transform: translateY(-2px); }
.guide-card b { font-size: 1.05rem; line-height: 1.3; }
.guide-card span { color: var(--muted); font-size: .9rem; }
.guide-card .guide-cat { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--primary); }
.guide-meta { color: var(--muted); font-size: .9rem; margin: 6px 0 0; }
.article { font-size: 1.04rem; line-height: 1.75; }
.article h2 { font-size: 1.4rem; margin: 1.6em 0 .6em; }
.article h2:first-child { margin-top: 0; }
.article h3 { font-size: 1.1rem; margin: 1.3em 0 .4em; }
.article ul, .article ol { padding-left: 22px; margin: 0 0 1em; }
.article li { margin: .35em 0; }
.article table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .95rem; }
.article th, .article td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.article th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.callout { background: var(--primary-soft); border-left: 4px solid var(--primary); border-radius: 12px; padding: 14px 18px; margin: 1.2em 0; }
.callout p:last-child { margin: 0; }
.holiday-story h2 { font-size: 1.3rem; margin: 1.4em 0 .5em; }
.holiday-story h2:first-child { margin-top: 0; }
