/* PregnancyCalculator.mom — warm, calm, trustworthy. */
:root {
  --bg: #fff9fb;
  --bg-soft: #fdf0f4;
  --surface: #ffffff;
  --border: #f3dde6;
  --border-strong: #e5c3d0;
  --text: #2e2335;
  --text-2: #574b5f;
  --muted: #7a6e81;
  --ink: #3b2a4a;
  --accent: #c8336a;
  --accent-strong: #a2234f;
  --accent-soft: #fde9f0;
  --accent-border: #f6c3d5;
  --sage: #6a59b8;
  --sage-soft: #f1eefc;
  --t1: #f9c6d7;
  --t2: #d8ccf6;
  --t3: #bfe6d8;
  --ok: #2f7a5b;
  --danger: #b4232f;
  --danger-soft: #fdeff1;
  --warn-soft: #fff7e6;
  --warn-border: #f0d08a;
  --focus: #6a59b8;
  --header-bg: rgba(255, 249, 251, .9);
  --footer-bg: #3b2a4a;
  --footer-text: #eadff0;
  --footer-muted: #bfaecb;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(59, 42, 74, .04), 0 6px 18px rgba(200, 51, 106, .06);
  --shadow-lg: 0 2px 6px rgba(59, 42, 74, .05), 0 22px 48px rgba(106, 89, 184, .12);
  --font-display: "Poppins", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1420; --bg-soft: #211a28; --surface: #271f30; --border: #3a2f45; --border-strong: #52445f;
    --text: #f6eff8; --text-2: #d9cde0; --muted: #a999b3; --ink: #120d17;
    --accent: #f58bb0; --accent-strong: #f9adc8; --accent-soft: #3a1f2c; --accent-border: #7a3352;
    --sage: #b8a8f2; --sage-soft: #261f3a; --t1: #8c4561; --t2: #5d4f8c; --t3: #3f6f5f;
    --ok: #8fd6b5; --danger: #f49aa2; --danger-soft: #35191e; --warn-soft: #2f2716; --warn-border: #7d6425; --focus: #b8a8f2;
    --header-bg: rgba(26, 20, 32, .9); --footer-bg: #120d17; --shadow: none; --shadow-lg: 0 18px 44px rgba(0, 0, 0, .4); color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.68 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; color: var(--text); font-weight: 600; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.8vw, 3.1rem); margin: 0 0 .6rem; font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.4rem, 1.15rem + .8vw, 1.8rem); margin: 2.4rem 0 .8rem; }
h3 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
p { margin: 0 0 1rem; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -100px; background: var(--text); color: var(--bg); padding: .6rem 1rem; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 1rem; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
main { display: block; outline: none; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------- header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); min-width: 0; }
.logo-mark { width: 38px; height: 38px; flex: none; }
.brand-text { display: flex; align-items: baseline; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; white-space: nowrap; }
.brand-accent { color: var(--accent); }
.brand-tld { color: var(--muted); font-weight: 500; font-size: .88em; }
.nav-desktop { display: none; gap: .1rem; align-items: center; }
.nav-desktop a, .nav-mobile nav a { color: var(--text-2); text-decoration: none; font-weight: 550; font-size: .93rem; padding: .5rem .7rem; border-radius: 10px; }
.nav-desktop a:hover, .nav-mobile nav a:hover { background: var(--bg-soft); color: var(--text); }
.nav-desktop a.nav-main { color: var(--text); font-weight: 650; }
.nav-desktop a[aria-current="page"], .nav-mobile nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); }
.nav-mobile { position: relative; }
.nav-mobile summary { list-style: none; cursor: pointer; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.nav-mobile summary::-webkit-details-marker { display: none; }
.burger, .burger::before, .burger::after { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; position: relative; content: ""; transition: transform .15s; }
.burger::before { position: absolute; top: -6px; } .burger::after { position: absolute; top: 6px; }
.nav-mobile[open] .burger { background: transparent; }
.nav-mobile[open] .burger::before { transform: translateY(6px) rotate(45deg); }
.nav-mobile[open] .burger::after { transform: translateY(-6px) rotate(-45deg); }
.nav-mobile nav { position: absolute; right: 0; top: 56px; width: min(86vw, 310px); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: .5rem; display: grid; }
.nav-mobile nav a { padding: .85rem .9rem; font-size: 1rem; }
@media (min-width: 1060px) { .nav-desktop { display: flex; } .nav-mobile { display: none; } }

/* ---------------------------------------------------------- page */
.page { padding-top: 1rem; padding-bottom: 3rem; }
.page-narrow { max-width: 820px; }
.breadcrumb { padding-top: 1rem; font-size: .9rem; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin-right: .35rem; color: var(--border-strong); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.page-head { margin: .6rem 0 1.4rem; max-width: 780px; }
.lead { font-size: 1.14rem; color: var(--text-2); margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .76rem; font-weight: 700; color: var(--sage); margin: 0 0 .6rem; }

/* hero (home) */
.hero { background:
  radial-gradient(760px 340px at 8% -8%, rgba(249, 198, 215, .55), transparent 62%),
  radial-gradient(700px 320px at 96% 4%, rgba(216, 204, 246, .55), transparent 62%), var(--bg-soft);
  border-bottom: 1px solid var(--border); padding: 1.6rem 0 2.6rem; }
@media (prefers-color-scheme: dark) { .hero { background: radial-gradient(760px 340px at 8% -8%, rgba(245, 139, 176, .14), transparent 62%), radial-gradient(700px 320px at 96% 4%, rgba(184, 168, 242, .12), transparent 62%), var(--bg-soft); } }
.hero-head { margin: .8rem 0 1.6rem; max-width: 760px; }
.hero-head h1 { font-size: clamp(2.3rem, 1.5rem + 3.6vw, 3.8rem); }
.hero-head .lead { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.hero-calc { scroll-margin-top: 90px; }

/* ---------------------------------------------------------- calculator */
.calc-card { display: grid; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow-lg); overflow: hidden; }
@media (min-width: 920px) { .calc-card { grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); } }
.calc { padding: 1.3rem; display: grid; gap: 1.05rem; align-content: start; }
@media (min-width: 720px) { .calc { padding: 1.8rem; } }
@media (min-width: 920px) { .calc { position: sticky; top: 76px; align-self: start; } }
.field { display: grid; gap: .4rem; min-width: 0; }
.field label { font-weight: 600; font-size: 1rem; }
.hint { margin: 0; font-size: .87rem; color: var(--muted); }
.field-row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.input { width: 100%; min-height: 56px; padding: .7rem .95rem; font: inherit; font-size: 1.08rem; color: var(--text); background: var(--bg); border: 1.5px solid var(--border-strong); border-radius: 14px; appearance: none; -webkit-appearance: none; }
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2.4rem; }
.input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 4px rgba(106, 89, 184, .2); }
.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(180, 35, 47, .12); }
input[type="date"].input { min-width: 0; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.seg { border: 0; padding: 0; margin: 0; min-width: 0; }
.seg legend { font-weight: 600; font-size: 1rem; margin-bottom: .45rem; padding: 0; }
.seg-items { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 15px; }
.seg-item { flex: 1 1 auto; min-width: 0; position: relative; display: flex; }
.seg-item input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg-item span { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 46px; padding: .45rem .7rem; border-radius: 11px; font-weight: 600; font-size: .93rem; line-height: 1.2; color: var(--text-2); white-space: nowrap; }
.seg-item input:checked + span { background: var(--surface); color: var(--accent-strong); box-shadow: 0 1px 3px rgba(59, 42, 74, .14); }
.seg-item input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.more { border: 1px dashed var(--border-strong); border-radius: 12px; padding: .55rem .9rem; }
.more summary { cursor: pointer; font-weight: 600; color: var(--text-2); font-size: .95rem; padding: .25rem 0; min-height: 32px; }
.more[open] summary { margin-bottom: .6rem; }
.calc-privacy { margin: 0; font-size: .85rem; color: var(--muted); display: flex; gap: .4rem; align-items: center; }
.calc-privacy::before { content: ""; width: 14px; height: 14px; flex: none; background: var(--sage); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1zm2 0h6V7a3 3 0 0 0-6 0z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1zm2 0h6V7a3 3 0 0 0-6 0z'/%3E%3C/svg%3E") center / contain no-repeat; }

.btn { font-family: var(--font-display); display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 46px; padding: .55rem 1.05rem; font: inherit; font-weight: 600; font-size: .96rem; border-radius: 12px; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--accent); color: var(--accent-strong); }
.btn-primary { background: linear-gradient(135deg, #d9467b, #b83166); border-color: transparent; color: #fff; box-shadow: 0 8px 18px rgba(200, 51, 106, .25); }
.btn-primary:hover { background: linear-gradient(135deg, #c93a6e, #a2234f); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary { color: #1a1420; } .btn-primary:hover { color: #1a1420; } }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
@media (prefers-color-scheme: dark) { .btn-outline { border-color: var(--text-2); color: var(--text); } }
.btn-outline:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-soft { background: var(--surface); border-color: var(--border); }
.btn-lg { min-height: 58px; padding: .8rem 1.5rem; font-size: 1.08rem; border-radius: 15px; }
.calc .btn-lg { width: 100%; }
@media (max-width: 520px) { .hero-ctas .btn { flex: 1 1 100%; } }

/* result */
.result-slot { padding: 1.3rem; background: var(--bg-soft); border-top: 1px solid var(--border); min-width: 0; }
@media (min-width: 920px) { .result-slot { border-top: 0; border-left: 1px solid var(--border); padding: 1.8rem; } }
.result-empty { height: 100%; min-height: 180px; display: grid; place-items: center; align-content: center; gap: .6rem; text-align: center; border: 2px dashed var(--border-strong); border-radius: 18px; color: var(--muted); padding: 1.5rem; }
.result-empty svg { width: 44px; height: 44px; color: var(--border-strong); }
.result-empty p { margin: 0; max-width: 34ch; }
.result { display: grid; gap: .2rem; animation: rise .35s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.result-hero { background: var(--ink); color: #fff5f8; border-radius: 18px; padding: 1.1rem 1.2rem 1.15rem; position: relative; overflow: hidden; }
.result-hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; border: 18px solid rgba(242, 139, 176, .25); }
.result-kicker { margin: 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: #f7b3cb; }
.result-main { margin: .2rem 0 0; font-family: var(--font-display); font-size: clamp(1.8rem, 1.3rem + 2.1vw, 2.5rem); font-weight: 700; letter-spacing: -.02em; color: #fff; outline: none; overflow-wrap: anywhere; position: relative; z-index: 1; }
.result-sub { margin: .1rem 0 0; color: #dccfe6; font-weight: 500; position: relative; z-index: 1; }
.result-approx { margin: .7rem 0 0; padding-top: .7rem; border-top: 1px solid rgba(255, 255, 255, .14); color: #efe6f4; position: relative; z-index: 1; }
.result-approx strong { color: #fff; font-size: 1.1em; }
.result-body { display: grid; gap: .2rem; margin-top: .4rem; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin: .5rem 0; }
@media (min-width: 560px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 13px; padding: .65rem .8rem; min-width: 0; }
.stat dt { font-size: .74rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat dd { margin: .15rem 0 0; font-weight: 700; font-size: 1.04rem; overflow-wrap: anywhere; }
.stat dd small { display: block; font-weight: 500; font-size: .8rem; color: var(--muted); }

.journey { margin: .6rem 0 .4rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: .8rem .9rem .7rem; }
.journey-head { display: flex; justify-content: space-between; font-size: .88rem; font-weight: 600; color: var(--text-2); margin-bottom: .55rem; }
.journey-head strong { color: var(--text); }
.journey-bar { position: relative; display: flex; height: 14px; border-radius: 99px; overflow: visible; background: var(--bg-soft); }
.journey-bar .seg { height: 100%; opacity: .55; }
.seg-1 { width: 35%; background: var(--t1); border-radius: 99px 0 0 99px; }
.seg-2 { width: 35%; background: var(--t2); }
.seg-3 { width: 30%; background: var(--t3); border-radius: 0 99px 99px 0; }
.journey-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, #f28bb0, #a993e6 55%, #7fcbb3); max-width: 100%; }
.journey-dot { position: absolute; top: 50%; width: 22px; height: 22px; margin-left: -11px; transform: translateY(-50%); border-radius: 50%; background: var(--surface); border: 4px solid var(--ink); box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
@media (prefers-color-scheme: dark) { .journey-dot { border-color: #fff5f8; } }
.journey-legend { display: flex; font-size: .74rem; color: var(--muted); margin-top: .5rem; }
.journey-legend span:nth-child(1) { width: 35%; } .journey-legend span:nth-child(2) { width: 35%; } .journey-legend span:nth-child(3) { width: 30%; text-align: right; }

.wk-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: .3rem 0 .4rem; }
@media (max-width: 520px) { .wk-strip { grid-template-columns: 1fr; } }
.wk { display: grid; gap: .1rem; align-content: start; padding: .65rem .75rem; border-radius: 13px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-size: .86rem; }
a.wk:hover { border-color: var(--accent); color: var(--text); }
.wk.is-now { border: 2px solid var(--accent); background: var(--accent-soft); }
.wk-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); }
.wk.is-now .wk-label { color: var(--accent-strong); }
.wk-num { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.wk-dates { color: var(--muted); font-size: .8rem; }
.wk-note { color: var(--text-2); line-height: 1.4; margin-top: .2rem; }

.result-h3 { font-family: var(--font); font-size: .95rem; font-weight: 700; margin: 1rem 0 .4rem; letter-spacing: 0; }
.result-h3 small { font-weight: 500; color: var(--muted); margin-left: .3rem; }
.tri-h { padding-left: .6rem; border-left: 4px solid var(--t1); }
.tri-h-2 { border-left-color: var(--t2); } .tri-h-3 { border-left-color: var(--t3); }
.result-more { margin: .5rem 0; background: var(--surface); border: 1px solid var(--border); border-radius: 13px; padding: 0 .8rem; }
.result-more summary { cursor: pointer; font-weight: 600; color: var(--accent-strong); padding: .7rem 0; min-height: 44px; }
.result-more .table-wrap { border: 0; margin-top: 0; }
.result-flag { background: var(--warn-soft); border: 1px solid var(--warn-border); border-radius: 12px; padding: .65rem .85rem; font-size: .93rem; margin: .5rem 0; }
.result-note-inline { font-size: .93rem; background: var(--sage-soft); border-radius: 12px; padding: .65rem .85rem; margin: .5rem 0; }
.result-method { font-size: .9rem; color: var(--text-2); margin: .6rem 0 0; }
.result-note { font-size: .85rem; color: var(--muted); margin: .4rem 0 0; }
.result-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; }
.result-actions .btn { flex: 1 1 auto; min-height: 44px; font-size: .9rem; padding: .45rem .8rem; }
.result-status { margin: .4rem 0 0; font-size: .9rem; color: var(--ok); min-height: 1.2em; }
.alert { background: var(--danger-soft); border: 1px solid var(--danger); color: var(--danger); border-radius: 14px; padding: .9rem 1rem; }
.pill { display: inline-block; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 700; border-radius: 99px; padding: .08rem .5rem; margin-left: .3rem; vertical-align: middle; font-family: var(--font); }
tr.is-now th, tr.is-now td { background: var(--accent-soft); }
tr.is-late th, tr.is-late td { color: var(--muted); }

.disclaimer { display: flex; gap: .7rem; align-items: flex-start; margin: 1rem 0 0; font-size: .9rem; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: .85rem 1rem; }
.disclaimer svg { width: 20px; height: 20px; flex: none; color: var(--sage); margin-top: .1rem; }
.disclaimer p { margin: 0; }

/* facts box on week / month pages */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: 0 0 1.2rem; }
@media (min-width: 720px) { .facts { grid-template-columns: repeat(6, minmax(0, 1fr)); } .facts:has(> div:nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.facts > div { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: .65rem .8rem; }
.facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted); }
.facts dd { margin: .15rem 0 0; font-weight: 600; font-family: var(--font-display); font-size: 1.05rem; }

.week-strip { list-style: none; padding: 0; margin: .8rem 0 1.2rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.week-strip li a, .week-strip li span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--text-2); }
.week-strip li a:hover { border-color: var(--accent); color: var(--accent-strong); }
.week-strip li.is-now span { background: var(--ink); color: #fff; border-color: var(--ink); }
.table-note { font-size: .88rem; color: var(--muted); }

/* ---------------------------------------------------------- content */
.content-grid { margin-top: 1.2rem; }
.prose { max-width: 780px; }
.prose h2:first-child { margin-top: 1.4rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1rem; }
.prose li { margin: .35rem 0; }
.formula { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 14px; padding: 1rem 1.15rem; margin: 1rem 0 1.2rem; }
.formula p { margin: .2rem 0; }
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: .6rem 0 1.2rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl th, .tbl td { text-align: left; padding: .6rem .85rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl thead th { background: var(--bg-soft); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; }
.tbl tbody th { font-weight: 600; }
.tbl tr:last-child th, .tbl tr:last-child td { border-bottom: 0; }
.tbl-compact th, .tbl-compact td { padding: .42rem .7rem; font-size: .9rem; }
.tbl-timeline th { white-space: nowrap; }
.result .table-wrap { max-height: 440px; overflow-y: auto; }
.chip-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: .3rem .8rem; border: 1px solid var(--border); border-radius: 99px; text-decoration: none; font-weight: 550; font-size: .9rem; background: var(--surface); color: var(--text-2); }
.chip:hover { border-color: var(--accent); color: var(--accent-strong); }

/* FAQ */
.faq { margin-top: 2.6rem; max-width: 820px; }
.faq-item { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); margin: .55rem 0; }
.faq-item summary { cursor: pointer; list-style: none; padding: .95rem 2.8rem .95rem 1.05rem; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 1.05rem; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--accent); }
.faq-item[open] summary::after { content: "−"; }
.faq-item summary h3 { margin: 0; font-family: var(--font); font-size: 1.02rem; font-weight: 600; letter-spacing: 0; }
.faq-a { padding: 0 1.05rem 1rem; color: var(--text-2); }
.faq-a p { margin: 0; }

/* cards */
.related, .home-section, .related-pages { margin-top: 2.8rem; }
.tool-grid { display: grid; gap: .8rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 920px) { .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tool-card { display: grid; grid-template-columns: auto 1fr; column-gap: .85rem; row-gap: .15rem; align-items: start; padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.tool-card:hover { border-color: var(--accent-border); transform: translateY(-2px); color: var(--text); }
.tool-ico { grid-row: span 2; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--sage-soft); color: var(--sage); }
.tool-ico svg { width: 22px; height: 22px; }
.tool-card-title { font-weight: 650; color: var(--text); }
.tool-card-text { font-size: .9rem; color: var(--text-2); line-height: 1.5; }
.spotlight { margin-top: 2.6rem; display: grid; gap: 1.3rem; padding: 1.5rem; border-radius: 24px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
@media (min-width: 880px) { .spotlight { grid-template-columns: 1.05fr 1fr; padding: 2.2rem; align-items: center; } }
.spotlight h2 { margin-top: 0; font-size: clamp(1.7rem, 1.35rem + 1.2vw, 2.3rem); }
.spotlight-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.spotlight-links a { display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: center; padding: .75rem .9rem; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--border); text-decoration: none; color: var(--text); }
.spotlight-links a:hover { border-color: var(--accent); }
.spotlight-links a > span:last-child { display: grid; }
.spotlight-links strong { color: var(--text); font-weight: 650; }
.spotlight-links span span { font-size: .88rem; color: var(--text-2); }
.prev-next { display: grid; gap: .6rem; grid-template-columns: 1fr 1fr; margin-bottom: 1rem; }
.pn { display: grid; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); text-decoration: none; font-weight: 600; color: var(--text); }
.pn small { font-weight: 500; color: var(--muted); font-size: .8rem; }
.pn-next { text-align: right; grid-column: 2; }
.pn:hover { border-color: var(--accent); color: var(--accent-strong); }
.updated { margin-top: 2rem; font-size: .85rem; color: var(--muted); }
.home-guide { margin-top: 2.4rem; }

/* ---------------------------------------------------------- footer */
.site-footer { background: var(--footer-bg); color: var(--footer-text); margin-top: 3rem; padding: 2.8rem 0 1.5rem; }
.site-footer a { color: var(--footer-text); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.site-footer h2 { color: #fff; font-family: var(--font); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 .8rem; }
.footer-h-gap { margin-top: 1.4rem !important; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: .93rem; }
.footer-brand p { color: var(--footer-muted); font-size: .93rem; margin-top: .8rem; }
.footer-brand .brand { color: #fff; }
.footer-brand .brand-tld { color: var(--footer-muted); }
.footer-brand .brand-accent { color: #f7b3cb; }
.footer-disclaimer { font-size: .85rem !important; border-left: 3px solid #f28bb0; padding-left: .8rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 2rem; padding-top: 1.2rem; font-size: .85rem; color: var(--footer-muted); }

.preview-banner { background: #fdf3d6; color: #6b4b06; padding: .6rem 1rem; text-align: center; font-weight: 600; position: sticky; top: 0; z-index: 60; }

@media (max-width: 400px) {
  .header-inner { gap: .5rem; }
  .brand { gap: .45rem; }
  .logo-mark { width: 32px; height: 32px; }
  .brand-text { font-size: clamp(.78rem, 4.1vw, 1rem); letter-spacing: -.02em; }
  .seg-item span { font-size: .84rem; padding: .4rem .5rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------------------------------------------------------- print */
@media print {
  .site-header, .site-footer, .breadcrumb, .calc, .result-actions, .faq, .related, .related-pages, .prose, .spotlight, .home-section, .updated, .skip-link, .hero-ctas, .lead, .facts, .eyebrow { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .hero { background: none; border: 0; padding: 0; }
  .calc-card { box-shadow: none; border: 0; display: block; }
  .result-slot { border: 0; background: #fff; padding: 0; }
  .result-hero { background: #fff; color: #000; border: 2px solid #000; }
  .result-main, .result-sub, .result-approx, .result-approx strong, .result-kicker { color: #000 !important; }
  .result-more > *:not(summary) { display: block; }
  .result .table-wrap { max-height: none; overflow: visible; }
  .stat, .table-wrap, .disclaimer, .journey, .wk { border-color: #999; }
  h1::after { content: " — PregnancyCalculator.mom"; font-weight: 400; font-size: .5em; }
}

/* ---------------------------------------------------------- tools */
.check { display: inline-flex; gap: .6rem; align-items: center; cursor: pointer; font-weight: 500; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.calc > div[data-modes] { display: grid; gap: 1rem; }
.section-lead { color: var(--text-2); margin: -.3rem 0 1rem; max-width: 640px; }
tr.is-past th, tr.is-past td { color: var(--muted); }
.timer-main { text-align: center; justify-items: center; align-content: center; }
.timer-state { margin: 0; font-weight: 600; color: var(--text-2); min-height: 3em; max-width: 30ch; }
.timer-clock { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(3.2rem, 2.4rem + 4vw, 4.6rem); line-height: 1; color: var(--accent-strong); font-variant-numeric: tabular-nums; }
.timer-sub { margin: -.4rem 0 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.timer-main .btn-lg { width: 100%; }
.timer-toggle.is-active { background: linear-gradient(135deg, #6a59b8, #4f3f99); box-shadow: 0 8px 18px rgba(106, 89, 184, .3); }
.timer-kick:not([disabled]) { border-color: var(--accent); color: var(--accent-strong); min-height: 76px; font-size: 1.15rem; }
.timer-kick[disabled] { opacity: .45; cursor: not-allowed; }
.timer-secondary { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.timer-card .result-slot { display: grid; gap: .6rem; align-content: start; }
.stats-wide { grid-template-columns: 1fr !important; }
@media (min-width: 560px) { .stats-wide { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important; } }
