/* Calculators for Women – shared styles. No external fonts or requests, for speed. */
:root {
  --bg: #fbf6f1;
  --surface: #ffffff;
  --ink: #1c1522;
  --muted: #4d4357;
  --line: #eadfd6;
  --brand: #a93f5b;
  --brand-dark: #862f47;
  --accent: #2f6f62;
  --soft: #f7e8eb;
  --soft-green: #e6f1ee;
  --warn-bg: #fff4e0;
  --warn-line: #e3bb70;
  --panel: rgba(255, 255, 255, .96);
  --bg-image: url(floral-bg.svg);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(42, 34, 48, .06), 0 6px 20px rgba(42, 34, 48, .06);
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17121b;
    --surface: #211a27;
    --ink: #f1e9f3;
    --muted: #b9aebf;
    --line: #3a2f43;
    --brand: #e87f9c;
    --brand-dark: #f3a2b8;
    --accent: #7fcdb9;
    --soft: #34202a;
    --soft-green: #1d2e2a;
    --warn-bg: #33291a;
    --warn-line: #7d6330;
    --shadow: none;
    --panel: rgba(30, 23, 36, .95);
    --bg-image: url(floral-bg-dark.svg);
  }
}
:root[data-theme="dark"] {
  --bg: #17121b;
  --surface: #211a27;
  --ink: #f1e9f3;
  --muted: #b9aebf;
  --line: #3a2f43;
  --brand: #e87f9c;
  --brand-dark: #f3a2b8;
  --accent: #7fcdb9;
  --soft: #34202a;
  --soft-green: #1d2e2a;
  --warn-bg: #33291a;
  --warn-line: #7d6330;
  --shadow: none;
  --panel: rgba(30, 23, 36, .95);
  --bg-image: url(floral-bg-dark.svg);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg) var(--bg-image) repeat top center; color: var(--ink);
  font: 1.125rem/1.7 var(--sans);
}
img, svg { max-width: 100%; }
a { color: var(--brand-dark); text-underline-offset: 2px; }
a:hover { color: var(--brand); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { width: min(1080px, 100% - 2rem); margin-inline: auto; }
.skip {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg);
  padding: .6rem 1rem; z-index: 99;
}
.skip:focus { left: 0; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0; flex-wrap: wrap; }
.brand {
  font: 700 1.5rem/1 var(--serif); color: var(--brand-dark); text-decoration: none; letter-spacing: -.01em;
  display: inline-flex; align-items: center; gap: .5rem;
}
.brand svg { width: 1.6rem; height: 1.6rem; }
.top-links { display: flex; gap: 1.1rem; list-style: none; margin: 0; padding: 0; font-size: 1rem; }
.top-links a { color: var(--muted); text-decoration: none; }
.top-links a:hover, .top-links a[aria-current="page"] { color: var(--brand-dark); text-decoration: underline; }

.chip {
  display: inline-block; padding: .3rem .75rem; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .97rem; font-weight: 600;
}
.chip:hover { border-color: var(--brand); color: var(--brand-dark); }
.chip[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.related h2 { margin-top: 1.8rem; font-size: 1.35rem; }

/* Disclaimer banner */
.disclaimer-banner {
  background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 10px;
  padding: .7rem 1rem; font-size: 1rem; margin: 1.25rem 0 0;
}

/* Page layout */
main { padding-bottom: 3rem; }
.breadcrumb { font-size: 1rem; color: var(--muted); margin: 1.25rem 0 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: .4rem; }
.breadcrumb a { color: var(--muted); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); margin: .7rem 0 .4rem; }
h2 { font-size: 1.6rem; margin: 2.4rem 0 .6rem; }
h3 { font-size: 1.2rem; margin: 1.4rem 0 .3rem; }
.updated { color: var(--muted); font-size: 1rem; margin: 0; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 46rem; }
.quick-answer {
  background: var(--soft-green); border-left: 5px solid var(--accent); border-radius: 0 10px 10px 0;
  padding: .9rem 1.1rem; margin: 1.25rem 0;
}
.quick-answer h2 { font-size: .8rem; font-family: var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--accent); margin: 0 0 .25rem; }
.quick-answer p { margin: 0; font-size: 1.08rem; }

/* Calculator card */
.calc-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.4rem; margin: 1.25rem 0;
}
.calc-card { scroll-margin-top: 12px; }
.calc-card h2 { margin-top: 0; font-size: 1.35rem; }
.card-note { margin: 0 0 1rem; font-size: 1rem; color: var(--muted); }
form .field { margin-bottom: 1rem; }
form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
label, .label { display: block; font-weight: 650; margin-bottom: .25rem; font-size: 1.05rem; }
.hint { display: block; color: var(--muted); font-size: .92rem; margin-top: .2rem; font-weight: 400; }
input[type="number"], input[type="date"], input[type="datetime-local"], input[type="text"], select {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1.5px solid #cdbfb4; border-radius: 10px; padding: .6rem .7rem; min-height: 46px;
}
@media (prefers-color-scheme: dark) { input[type="number"], input[type="date"], input[type="datetime-local"], input[type="text"], select { border-color: #5a4b66; } }
input:focus, select:focus { border-color: var(--brand); outline: 3px solid color-mix(in srgb, var(--brand) 30%, transparent); }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
.btn {
  font: 700 1rem var(--sans); border-radius: 10px; padding: .75rem 1.4rem; cursor: pointer; min-height: 46px;
  border: 2px solid var(--brand); background: var(--brand); color: #fff;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.secondary { background: transparent; color: var(--brand-dark); }
.btn.secondary:hover { background: var(--soft); }
[hidden] { display: none !important; }

/* Results */
.result { margin-top: 1.4rem; border-top: 2px dashed var(--line); padding-top: 1.2rem; }
.result:focus { outline: none; }
.result.error { color: #8a1f1f; font-weight: 600; border-top-color: #d98b8b; }
@media (prefers-color-scheme: dark) { .result.error { color: #ff9c9c; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.stat { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: .75rem .9rem; }
.stat.primary { background: var(--soft); border-color: var(--brand); grid-column: 1 / -1; }
.stat-label { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stat-value { display: block; font: 700 1.25rem/1.3 var(--serif); margin-top: .15rem; }
.stat.primary .stat-value { font-size: 1.7rem; color: var(--brand-dark); }
.status { background: var(--soft-green); border-radius: 10px; padding: .7rem .9rem; margin: .5rem 0 1rem; }
.status.caution { background: var(--warn-bg); }
.result-note { font-size: 1rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: .8rem; margin-top: 1rem; }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: var(--accent); color: #fff; border-radius: 999px; padding: .1rem .5rem; margin-left: .4rem; vertical-align: middle; }
.progress { height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; margin: .4rem 0 1rem; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--brand)); }

/* Pregnancy timeline chart */
.tl { margin: 1.4rem 0 1.2rem; }
.tl h3 { margin: 0 0 2.4rem; }
.tl-bar { position: relative; display: flex; height: 44px; border-radius: 10px; border: 1px solid var(--line); }
.tl-seg { display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; color: var(--ink); overflow: hidden; white-space: nowrap; }
.tl-seg:first-child { border-radius: 9px 0 0 9px; } .tl-seg:last-of-type { border-radius: 0 9px 9px 0; }
.tl-seg.t1 { background: var(--soft); } .tl-seg.t2 { background: var(--soft-green); } .tl-seg.t3 { background: var(--warn-bg); }
.tl-seg span { position: relative; z-index: 1; padding: 0 .3rem; }
.tl-fill { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--brand) 38%, transparent); border-radius: 9px 0 0 9px; pointer-events: none; }
.tl-pin { position: absolute; top: -8px; bottom: -8px; width: 3px; margin-left: -1.5px; background: var(--brand-dark); border-radius: 2px; }
.tl-pin span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 4px; white-space: nowrap; background: var(--brand-dark); color: var(--bg); font-size: .78rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; }
.tl-pin.left span { left: 0; transform: none; } .tl-pin.right span { left: auto; right: 0; transform: none; }
.tl-ticks { position: relative; height: 1.3rem; margin-top: .3rem; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-ticks span { position: absolute; transform: translateX(-50%); }
.tl-ticks .first { transform: none; } .tl-ticks .last { transform: translateX(-100%); }
.tl-axis { margin: 0 0 1rem; text-align: center; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.g-list { list-style: none; margin: 0; padding: 0; }
.g-row { padding: .55rem 0; border-top: 1px solid var(--line); }
.g-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .1rem .8rem; font-size: .97rem; }
.g-name { font-weight: 650; min-width: 0; } .g-when { color: var(--muted); }
.g-when b { color: var(--ink); }
.g-track { position: relative; height: 12px; margin-top: .35rem; background: var(--line); border-radius: 6px; }
.g-bar { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 6px; min-width: 6px; }
.g-pt { position: absolute; top: -2px; width: 16px; height: 16px; margin-left: -8px; background: var(--accent); border: 2px solid var(--surface); border-radius: 50%; }
.g-now { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); }
.g-row.done .g-bar, .g-row.done .g-pt { background: var(--muted); opacity: .6; }
.g-row.done .g-name { color: var(--muted); font-weight: 500; }
.g-row.current .g-bar, .g-row.current .g-pt { background: var(--brand); }
.g-row.current { background: var(--soft); margin-inline: -.6rem; padding-inline: .6rem; border-radius: 10px; border-top-color: transparent; }
.tl-legend { margin-top: .8rem; font-size: .92rem; color: var(--muted); }
@media (max-width: 520px) { .tl-seg { font-size: .68rem; } .tl-seg span { white-space: normal; text-align: center; line-height: 1.1; } }

/* Week-by-week table */
.wk-scroll { position: relative; max-height: 560px; overflow: auto; margin: .8rem 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.wk { width: 100%; border-collapse: collapse; font-size: 1rem; }
.wk thead th { position: sticky; top: 0; z-index: 2; }
.wk tbody th { white-space: nowrap; }
.wk td:last-child { min-width: 15rem; }
.wk td:nth-child(2) { white-space: nowrap; }
.wk tr.tri th { background: var(--soft-green); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.wk tr.tri.t1 th { background: var(--soft); }
.wk tr.tri.t3 th { background: var(--warn-bg); }
.wk tr.now > * { background: color-mix(in srgb, var(--brand) 24%, var(--surface)); font-weight: 700; }

/* Share section */
.share { margin: 1.6rem 0; padding: 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.share h3 { margin-top: 0; }
.share-opts { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: .6rem 0 1rem; }
.chk { display: flex; align-items: center; gap: .5rem; font-weight: 500; margin: 0; }
.chk input { width: 1.2rem; height: 1.2rem; accent-color: var(--brand); }
.share-grid { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.share-img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.share-side { min-width: 0; }
.share-side .actions { margin-top: 0; }
.copy-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.copy-row input { flex: 1 1 12rem; min-width: 0; }
@media (max-width: 700px) { .share-grid { grid-template-columns: 1fr; } .share-img { max-width: 360px; margin-inline: auto; } }

/* Tables */
.table-wrap { overflow-x: auto; margin: .8rem 0 1.2rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 1rem; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 650; }

/* Content */
.content p, .content li { max-width: 46rem; }
.content ul, .content ol { padding-left: 1.3rem; }
.formula { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1rem; overflow-x: auto; }
.faq h3 { margin-top: 1.3rem; }
.faq p { margin-top: .2rem; }
.callout { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 12px; padding: 1rem 1.2rem; margin: 2rem 0; }
.callout h2 { margin: 0 0 .4rem; font-size: 1.25rem; }
.callout p { margin: .4rem 0 0; }
.refs li { margin-bottom: .3rem; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin: 1rem 0; padding: 0; list-style: none; }
.card {
  display: block; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  transition: transform .12s ease, border-color .12s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--brand); }
.card h3 { margin: 0 0 .25rem; font-size: 1.15rem; color: var(--brand-dark); }
.card p { margin: 0; color: var(--muted); font-size: 1rem; }

/* Home hero */
.hero { padding: 2.2rem 0 .5rem; }
.hero h1 { font-size: clamp(2.1rem, 5.5vw, 3.2rem); max-width: 18ch; }
.stage-title { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; }
.stage-title p { color: var(--muted); margin: 0; }

/* Contraction timer */
.ct-wrap { text-align: center; }
.ct-btn {
  width: min(280px, 80vw); aspect-ratio: 1; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; font: 700 1.3rem var(--sans); box-shadow: var(--shadow);
}
.ct-btn.running { background: var(--brand); }
.kc-progress { margin: 0 0 .2rem; font: 700 1.3rem var(--serif); }
.ct-live { font: 700 2.6rem/1 var(--serif); margin: 1rem 0 .2rem; font-variant-numeric: tabular-nums; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 2rem 0; font-size: 1rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.5rem; }
.footer-grid h2 { font: 700 .8rem var(--sans); letter-spacing: .09em; text-transform: uppercase; margin: 0 0 .5rem; color: var(--ink); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: .3rem; }
.footer-legal { border-top: 1px solid var(--line); margin-top: 1.5rem; padding-top: 1rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

@media print {
  .site-header, .site-footer, .actions, .card-grid, .cat-bar { display: none; }
  body { background: #fff; color: #000; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Affiliate promo (Viator) */
.promo { background: var(--soft); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; padding: 1rem 1.2rem; margin: 2rem 0; }
.promo h2 { margin: 0 0 .4rem; font-size: 1.25rem; }
.promo p { margin: .4rem 0 0; }
.promo-tag { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 .3rem; }
.promo-btn { display: inline-block; margin-top: .4rem; text-decoration: none; }
.promo-note { font-size: .92rem; color: var(--muted); }

/* Email sign-up */
.signup { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; margin: 1.5rem 0; }
.signup h3 { margin: 0 0 .3rem; font-size: 1.2rem; }
.signup p { margin: .3rem 0; }
.signup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: .75rem 0; }
.signup-grid .wide { grid-column: 1 / -1; }
.signup label { display: block; font-weight: 600; font-size: 1rem; }
.signup label .opt { font-weight: 400; color: var(--muted); }
.signup input[type=text], .signup input[type=email], .signup input[type=date], .signup select { display: block; width: 100%; box-sizing: border-box; margin-top: .25rem; padding: .6rem .7rem; font: inherit; font-weight: 400; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; min-height: 44px; }
.signup label.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; margin: .5rem 0 .75rem; }
.signup label.check input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; flex: none; }
.signup-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup-msg { min-height: 1.3em; font-weight: 600; }
.signup-msg.err { color: #b3261e; }
:root[data-theme="dark"] .signup-msg.err { color: #ffb4ab; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .signup-msg.err { color: #ffb4ab; } }
.signup-fine, .signup-due { font-size: .92rem; color: var(--muted); }
.signup-due { margin: 0; }
@media (max-width: 560px) { .signup-grid { grid-template-columns: 1fr; } }

/* Readable layout over the floral background */
main > .wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 2px 4px rgba(42, 34, 48, .05), 0 12px 40px rgba(42, 34, 48, .10); padding: .5rem 1.6rem 2.2rem; margin-block: 1.5rem 2rem; width: min(1060px, 100% - 1.2rem); }
@media (max-width: 560px) { main > .wrap { padding: .25rem 1rem 1.6rem; border-radius: 16px; } }
main { padding-bottom: 0; }
p, li { max-width: 68ch; }
.card-grid li, .card-grid p, .table-wrap p { max-width: none; }
.content p, .content li { max-width: 46rem; }
a { text-decoration-thickness: 1.5px; }
.card p, .lede, .updated, .breadcrumb, .hint, .card-note { color: var(--muted); }
input[type="number"], input[type="date"], input[type="datetime-local"], input[type="text"], input[type="email"], select { font-size: 1.05rem; min-height: 48px; }
label, .label { font-size: 1.05rem; }
.btn { font-size: 1.05rem; min-height: 48px; }
.site-header, .site-footer { box-shadow: 0 1px 0 var(--line); }

/* Pregnancy countdown */
.cd-hero { text-align: center; background: linear-gradient(180deg, var(--soft), transparent); border: 1px solid var(--line); border-radius: 18px; padding: 1.4rem 1rem 1.2rem; margin: 0 0 1.2rem; }
.cd-hero p { margin-inline: auto; }
.cd-kicker { font-size: 1.15rem; font-weight: 650; color: var(--muted); margin: 0; }
.cd-big { font: 700 clamp(4.5rem, 20vw, 8rem)/1 var(--serif); color: var(--brand-dark); margin: .1rem 0 0; }
.cd-unit { font-size: 1.5rem; font-weight: 700; margin: 0 0 .5rem; }
.cd-msg { max-width: 36rem; color: var(--ink); }
.live-cd { text-align: center; margin: 0 0 1.2rem; }
.live-title { font-size: .95rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin: 0 0 .5rem; max-width: none; }
.live-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; max-width: 34rem; margin: 0 auto; }
.live-grid div { background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: .7rem .3rem; }
.live-grid b { display: block; font: 700 clamp(1.6rem, 7vw, 2.4rem)/1.1 var(--serif); color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.live-grid span { font-size: .9rem; color: var(--muted); }

/* Countdown colour theme for a baby boy */
.cd-boy { --brand-dark: #27527f; --soft: #e6f0fb; --brand: #3b6ea8; --accent: #3b6ea8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cd-boy { --brand-dark: #9cc3f0; --soft: #1d2a3a; --brand: #6ea6e4; --accent: #9cc3f0; } }
:root[data-theme="dark"] .cd-boy { --brand-dark: #9cc3f0; --soft: #1d2a3a; --brand: #6ea6e4; --accent: #9cc3f0; }

/* Countdown colour theme for a surprise / neutral */
.cd-neutral { --brand-dark: #245a4f; --soft: #e8f3ee; --brand: #2f6f62; --accent: #2f6f62; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cd-neutral { --brand-dark: #8fd6c1; --soft: #1d2e2a; --brand: #6cc2aa; --accent: #8fd6c1; } }
:root[data-theme="dark"] .cd-neutral { --brand-dark: #8fd6c1; --soft: #1d2e2a; --brand: #6cc2aa; --accent: #8fd6c1; }

/* Week-by-week schedule: cards on phones */
.wk-more { display: none; }
@media (max-width: 640px) {
  .wk-scroll { max-height: none; overflow: visible; border: 0; background: transparent; margin: .6rem 0; }
  .wk, .wk tbody, .wk tr, .wk th, .wk td { display: block; }
  .wk thead { display: none; }
  .wk tbody tr:not(.tri) { display: grid; grid-template-columns: auto 1fr; gap: .15rem .8rem; align-items: baseline; padding: .7rem .9rem; margin: 0 0 .5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
  .wk tbody th, .wk td { padding: 0; border: 0; background: none; }
  .wk tbody th { white-space: normal; }
  .wk td:nth-child(2) { white-space: normal; text-align: right; color: var(--muted); }
  .wk td:last-child { grid-column: 1 / -1; min-width: 0; font-size: .97rem; }
  .wk td:last-child:empty { display: none; }
  .wk tr.tri { margin: 1.1rem 0 .5rem; }
  .wk tr.tri th { border-radius: 10px; padding: .6rem .9rem; }
  .wk tr.now { border-color: var(--brand) !important; background: color-mix(in srgb, var(--brand) 14%, var(--surface)) !important; box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 40%, transparent); }
  .wk tr.now > * { background: none; }
  .wk tr.wk-far { display: none !important; }
  .wk-scroll.open tr.wk-far:not(.tri) { display: grid !important; }
  .wk-scroll.open tr.wk-far.tri { display: block !important; }
  .wk-more { display: block; width: 100%; margin: .3rem 0 .8rem; }
}

.guide-link { margin: 1.2rem 0; }


/* Sponsored section: one centered column */
.promo { text-align: center; }
.promo-pic { display: block; margin: 0 auto 1rem; max-width: 520px; border-radius: 12px; overflow: hidden; line-height: 0; }
.promo-pic img { width: 100%; height: auto; display: block; }
@media (max-width: 600px) { .promo-pic { max-width: 360px; } .promo-pic img { aspect-ratio: 1 / 1; object-fit: cover; } }
.promo p { margin-left: auto; margin-right: auto; max-width: 58ch; }
.promo .promo-btn { display: inline-block; }

/* Category links and site search */
.site-header { position: relative; z-index: 60; }
.cat-bar { background: var(--soft); border-top: 1px solid var(--line); }
.cat-inner { display: flex; align-items: center; justify-content: space-between; gap: .6rem 1.25rem; flex-wrap: wrap; padding: .55rem 0; }
.cat-links { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; margin: 0; padding: 0; }
.cat-links a { display: block; padding: .4rem .8rem; border-radius: 999px; color: var(--brand-dark); font-size: 1rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.cat-links a:hover { background: var(--surface); }
.cat-links a[aria-current] { background: var(--brand); color: var(--surface); }
.site-search { position: relative; flex: 1 1 260px; max-width: 340px; }
.site-search input { width: 100%; min-height: 42px; padding: .4rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem; }
.site-search input::placeholder { color: var(--muted); opacity: 1; }
.search-results { position: absolute; top: calc(100% + .35rem); right: 0; width: min(420px, 100%); min-width: 100%; max-height: min(65vh, 28rem); overflow-y: auto; padding: .35rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 28px rgba(42, 34, 48, .2); z-index: 70; }
.search-results ul { list-style: none; margin: 0; padding: 0; }
.search-results a { display: block; padding: .55rem .7rem; border-radius: 10px; color: var(--ink); text-decoration: none; line-height: 1.35; }
.search-results a:hover, .search-results a:focus { background: var(--soft); outline: none; }
.search-results strong { display: block; font-size: 1rem; color: var(--brand-dark); }
.search-results span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: .85rem; color: var(--muted); }
.search-empty { margin: 0; padding: .6rem .7rem; font-size: .95rem; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.stage-title h2 a { color: inherit; text-decoration: none; }
.stage-title h2 a:hover { text-decoration: underline; }
.stage-next { margin-top: 1.5rem; font-weight: 600; }
@media (max-width: 860px) {
  .cat-inner nav { width: 100%; }
  .cat-links { display: grid; grid-template-columns: 1fr 1fr; }
  .cat-links a { text-align: center; padding: .4rem .3rem; font-size: .97rem; }
  .site-search { flex-basis: 100%; max-width: none; }
  .search-results { width: 100%; }
}
@media (max-width: 560px) {
  .top-bar { gap: .5rem; padding: .7rem 0; }
  .top-links { display: none; }
}

.aff-gallery { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.aff-gallery img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); aspect-ratio: 3 / 4; }
.aff-form label { display: block; margin-bottom: .6rem; }
.aff-form input[type=email] { display: block; width: 100%; box-sizing: border-box; margin-top: .25rem; padding: .6rem .7rem; font: inherit; border: 1px solid var(--line); border-radius: 8px; background: var(--bg, #fff); color: inherit; }
.aff-form .formkit-alert { list-style: none; padding: 0; margin: .5rem 0; font-weight: 600; }
.aff-form .formkit-alert:empty { display: none; }
.aff-form .formkit-alert-error { color: #b3261e; }
.aff-form .formkit-spinner { display: none; }
.formkit-alert-success { list-style: none; background: var(--soft); border: 1px solid var(--brand); border-radius: 10px; padding: .8rem 1rem; font-weight: 600; }
.aff-cta { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; margin: 1.5rem 0; }
.aff-cta h2 { margin-top: 0; font-size: 1.2rem; }
@media (max-width: 560px) { .aff-gallery { gap: .4rem; } }
.aff-jump { text-align: center; margin: 2.5rem 0 2.5rem; }
.aff-jump .btn { font-size: 1.5rem; padding: 1.15rem 3.4rem; min-width: 340px; border-radius: 14px; }
@media (max-width: 560px) { .aff-jump .btn { display: block; min-width: 0; } }
.content .aff-gallery { padding-left: 0; }
.content .aff-jump { max-width: none; }
a.btn, a.btn:hover, a.btn:visited { color: #fff; text-decoration: none; display: inline-block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) a.btn, :root:not([data-theme="light"]) a.btn:hover, :root:not([data-theme="light"]) a.btn:visited { color: #1c1522; } }

/* Compact footer */
.site-footer { font-size: .92rem; padding: 2.25rem 0 1.5rem; }
.footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
.footer-grid > div:first-child p { max-width: 34rem; margin: 0; }
.footer-grid > div:nth-child(n+2) ul { column-count: 4; column-gap: 1.75rem; }
.footer-grid li { break-inside: avoid; margin-bottom: .45rem; line-height: 1.35; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover, .footer-grid a:focus-visible { color: var(--brand-dark); text-decoration: underline; }
.footer-grid h2 { padding-bottom: .5rem; border-bottom: 1px solid var(--line); margin-bottom: .8rem; }
@media (max-width: 900px) { .footer-grid > div:nth-child(n+2) ul { column-count: 2; } }
@media (max-width: 420px) { .footer-grid > div:nth-child(n+2) ul { column-gap: 1rem; } .footer-grid > div:nth-child(3) ul { column-count: 1; } .site-footer { font-size: .88rem; } }
.res-soon { list-style: none; padding: 0; display: grid; gap: .75rem; }
.res-soon li { background: var(--soft); border: 1px dashed var(--line); border-radius: 12px; padding: .85rem 1rem; color: var(--muted); }
.res-soon strong { color: var(--ink); }
.res-pick { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.25rem; margin: 0 0 1.5rem; max-width: 46rem; }
.res-pick h3 { margin: 0 0 .5rem; color: var(--brand-dark); }
.res-pick-cta { margin: 1rem 0 .5rem; }
.res-note { font-size: .85rem; color: var(--muted); margin: 0; }
.res-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0 .5rem; }
.res-pair .res-pick { margin: 0; display: flex; flex-direction: column; }
.res-pair .res-pick-cta { margin-top: auto; padding-top: .5rem; }
.tip-box { margin: 1.25rem 0 1.75rem; border-left: 4px solid var(--brand); }
@media (max-width: 700px) { .res-pair { grid-template-columns: 1fr; } }
.status-note { padding: .7rem 1rem; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; }

/* E-book promo with cover */
.ebook-cta { display: flex; gap: 1.25rem; align-items: center; }
.ebook-cover { flex: 0 0 130px; line-height: 0; }
.ebook-cover img { width: 100%; height: auto; display: block; border-radius: 4px; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.ebook-text { flex: 1; min-width: 0; }
.ebook-text > :first-child { margin-top: 0; }
.res-pick.ebook-cta { align-items: flex-start; }
@media (max-width: 560px) { .ebook-cta { flex-direction: column; align-items: flex-start; } .ebook-cover { flex-basis: auto; width: 140px; } }
