/* =========================================================
   BellyDay — shared design system
   Warm ivory, deep plum, clay-rose. Editorial, not clinical.
   ========================================================= */

:root {
  --bone: #fbf5ec;
  --bone-deep: #f3e9dc;
  --paper: #fffcf5;
  --ink: #2c1b2a;
  --ink-70: rgba(44, 27, 42, 0.74);
  --ink-55: rgba(44, 27, 42, 0.58);
  --ink-38: rgba(44, 27, 42, 0.38);
  --line: rgba(44, 27, 42, 0.14);
  --line-strong: rgba(44, 27, 42, 0.3);
  --rose: #b8455f;
  --rose-deep: #8d2e45;
  --rose-soft: #f7e3e4;
  --rose-tint: rgba(184, 69, 95, 0.09);
  --apricot: #e08a5f;
  --apricot-soft: rgba(224, 138, 95, 0.12);
  --sage: #4d6b55;
  --panel: #2c1b2a;
  --panel-2: #3a2537;
  --panel-ink: #fdf5ec;
  --panel-muted: rgba(253, 245, 236, 0.7);
  --panel-line: rgba(253, 245, 236, 0.17);
  --panel-rose: #ffa9b7;
  --panel-apricot: #f4b183;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-ui: "Inter Tight", "Segoe UI", system-ui, -apple-system, sans-serif;
  --shadow: 10px 10px 0 var(--rose);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 12% -12%, rgba(224, 138, 95, 0.16), transparent 42%),
    radial-gradient(circle at 94% 0%, rgba(184, 69, 95, 0.1), transparent 38%),
    var(--bone);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
ul, ol { margin: 0; }
img, svg { max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.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 {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--bone);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

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

/* ---------- Masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--line-strong);
  background: rgba(251, 245, 236, 0.82);
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 20;
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-decoration: none;
}

.brand em {
  font-style: italic;
  color: var(--rose);
}

.brand__logo {
  display: block;
  width: auto;
  height: 42px;
  max-width: 190px;
  flex: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 26px);
}

.nav a {
  padding: 8px 0;
  border-bottom: 1.5px solid transparent;
  color: var(--ink-70);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav a:hover { color: var(--ink); }

.nav a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--rose);
}

/* Masthead disclosure: three primary links plus an All tools drop panel. */
.nav--tools {
  flex-wrap: nowrap;
  white-space: nowrap;
}

/* Higher specificity keeps the drop panel out of the legacy scroll fallback. */
.nav.nav--tools {
  overflow: visible;
}

.nav--tools a,
.nav--tools > .nav__more > summary {
  flex-wrap: nowrap;
  white-space: nowrap;
}

.nav__more {
  position: relative;
  flex: 0 0 auto;
}

.nav__more > summary {
  display: inline-flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  border-bottom: 1.5px solid transparent;
  color: var(--ink-70);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}

.nav__more > summary::-webkit-details-marker { display: none; }

.nav__more > summary::after {
  content: "+";
  color: var(--rose);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

.nav__more[open] > summary::after { content: "\2212"; }

.nav__more[open] > summary {
  color: var(--ink);
  border-color: var(--rose);
}

.nav__panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  display: block;
  width: min(280px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: min(70vh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  box-shadow: 6px 6px 0 rgba(44, 27, 42, 0.12);
}

.nav__group + .nav__group {
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.nav__group .eyebrow {
  margin: 6px 10px 4px;
  font-size: 10px;
}

.nav__group .eyebrow::before { width: 14px; }

.nav__panel a {
  display: block;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-70);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.nav__panel .nav__group a:last-child { border-bottom: 0; }

.nav__panel a:hover {
  background: var(--rose-tint);
  color: var(--ink);
}

.masthead__note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--ink-55);
}

.masthead__note::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--rose);
  border-radius: 50%;
}

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

.hero {
  padding: clamp(40px, 6vw, 76px) 0 clamp(28px, 3.8vw, 44px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--rose);
}

.hero h1 {
  max-width: 17ch;
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(42px, 6.4vw, 76px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.038em;
  text-wrap: balance;
}

.hero__lede {
  max-width: 63ch;
  margin-top: 18px;
  font-size: clamp(15.5px, 1.5vw, 17.5px);
  line-height: 1.6;
  color: var(--ink-70);
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 20px;
  margin-top: 22px;
  font-size: 12.5px;
  color: var(--ink-55);
}

.hero__trust span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero__trust span::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--apricot);
  border-radius: 50%;
}

/* ---------- Tool layout ---------- */

.tool {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.96fr);
  gap: clamp(18px, 2.4vw, 30px);
  align-items: stretch;
}

.panel {
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: clamp(20px, 2.7vw, 30px);
}

.panel--form {
  box-shadow: 4px 4px 0 rgba(44, 27, 42, 0.08);
  display: flex;
  flex-direction: column;
}

.panel--result {
  position: sticky;
  top: 20px;
  background: var(--panel);
  color: var(--panel-ink);
  border-color: var(--ink);
  box-shadow: var(--shadow);
}

/* ---------- Method switch ---------- */

.methods {
  margin: 0 0 24px;
  padding: 0;
  border: 0;
}

.form-kicker {
  margin-bottom: 9px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-55);
}

.method-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line-strong);
}

.method { position: relative; }

.method input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.method label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 7px 6px;
  border-left: 1px solid var(--line);
  color: var(--ink-70);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.method:first-child label { border-left: 0; }

.method label:hover { background: var(--rose-tint); }

.method input:checked + label {
  background: var(--ink);
  color: var(--bone);
}

.method input:focus-visible + label {
  outline: 2px solid var(--rose);
  outline-offset: -4px;
}

/* ---------- Fields ---------- */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 16px;
}

.field--full { grid-column: 1 / -1; }

.field > label {
  display: block;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.005em;
}

.label__unit {
  margin-left: 4px;
  font-weight: 400;
  color: var(--ink-55);
}

.field__control {
  display: flex;
  align-items: center;
  height: 50px;
  border: 1px solid var(--line-strong);
  background: #fffdf8;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field__control:hover { border-color: var(--ink); }

.field__control:focus-within {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(184, 69, 95, 0.16);
}

.field__control input,
.field__control select {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 12px;
  border: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.field__control input:focus,
.field__control select:focus { outline: none; }

.field__control input[type="date"] {
  padding-top: 1px;
  appearance: none;
  -webkit-appearance: none;
}

.field__control select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%236b5a67' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.field__suffix {
  padding-right: 12px;
  color: var(--ink-55);
  font-size: 12.5px;
  white-space: nowrap;
}

.field__hint {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-55);
}

.field__error {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--rose-deep);
}

.field__error[hidden] { display: none; }

.field__control[data-invalid="true"] {
  border-color: var(--rose-deep);
  box-shadow: 0 0 0 3px rgba(184, 69, 95, 0.14);
}

.method-panel { margin-bottom: 26px; }
.method-panel[hidden] { display: none; }

.form-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-55);
}

.form-extra {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.form-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.form-stats > div + div {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.form-stats dt {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-55);
}

.form-stats dd {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.form-extra__kicker {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

.form-extra p + p {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-55);
}

.form-extra .form-extra__kicker + p { margin-top: 7px; }

.form-foot svg {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--rose);
}

/* ---------- Result panel ---------- */

.result__label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--panel-muted);
}

.result__date {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(42px, 4.9vw, 58px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.result__date.is-empty { color: var(--panel-muted); }

.result__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 4px 9px;
  border: 1px solid var(--panel-line);
  color: var(--panel-muted);
  font-size: 11px;
  line-height: 1.4;
}

.result__badge.is-passed {
  border-color: rgba(244, 177, 131, 0.45);
  color: var(--panel-apricot);
}

/* ---------- Dial ---------- */

.dial {
  position: relative;
  width: min(100%, 240px);
  margin: 16px auto 4px;
}

.dial svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.dial__track {
  fill: none;
  stroke: rgba(253, 245, 236, 0.13);
  stroke-width: 9;
}

.dial__arc {
  fill: none;
  stroke: var(--panel-rose);
  stroke-width: 9;
  stroke-linecap: butt;
  transition: stroke-dasharray 0.45s ease;
}

.dial__tick { stroke: rgba(253, 245, 236, 0.28); stroke-width: 1; }
.dial__tick.is-major { stroke: rgba(253, 245, 236, 0.6); stroke-width: 1.8; }

.dial__fertile {
  fill: none;
  stroke: var(--panel-rose);
  stroke-width: 9;
  stroke-linecap: butt;
  opacity: 0.92;
}

.dial__ov { fill: var(--panel-apricot); }

.dial__today-ring {
  fill: var(--panel);
  stroke: var(--panel-ink);
  stroke-width: 2;
}

.dial__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}

.dial__weeks {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.4vw, 38px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.dial__weeks small {
  font-family: var(--font-ui);
  font-size: 0.42em;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--panel-muted);
}

.dial__caption {
  margin-top: 6px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--panel-muted);
}

.dial-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px 14px;
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--panel-muted);
}

.dial-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dial-legend i {
  display: block;
  width: 9px;
  height: 9px;
  background: var(--panel-muted);
}

.dial-legend i.is-fertile { background: var(--panel-rose); }
.dial-legend i.is-ov { background: var(--panel-apricot); border-radius: 50%; }
.dial-legend i.is-today { background: none; border: 1.5px solid var(--panel-ink); border-radius: 50%; }

/* ---------- Facts ---------- */

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 12px;
  border-top: 1px solid var(--panel-line);
}

.facts > div {
  padding: 11px 0;
  border-bottom: 1px solid var(--panel-line);
}

.facts > div:nth-child(odd) { padding-right: 12px; }

.facts > div:nth-child(even) {
  padding-left: 12px;
  border-left: 1px solid var(--panel-line);
}

.facts dt {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--panel-muted);
}

.facts dd {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.facts dd.is-accent { color: var(--panel-apricot); }

/* ---------- Week note ---------- */

.week-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--panel-line);
}

.week-note[hidden] { display: none; }

.week-note__kicker {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--panel-apricot);
}

.week-note__title {
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.week-note__body {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--panel-muted);
}

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

.result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid transparent;
  background: none;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn svg { width: 15px; height: 15px; flex: none; }

.btn--primary {
  background: var(--panel-rose);
  color: var(--ink);
}

.btn--primary:hover { background: #ffc2cd; }

.btn--ghost {
  border-color: var(--panel-line);
  color: var(--panel-ink);
}

.btn--ghost:hover {
  border-color: var(--panel-rose);
  color: var(--panel-rose);
}

.btn.is-done { border-color: var(--panel-rose); color: var(--panel-rose); }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn:disabled:hover {
  background: var(--panel-rose);
  color: var(--ink);
}

.result__note {
  margin-top: 14px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--panel-muted);
}

/* ---------- Mobile dock ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 16px calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--ink);
  background: var(--paper);
}

.dock__label {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-55);
}

.dock__value {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.dock__aside {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--rose-deep);
  text-align: right;
}

/* ---------- Sections & prose ---------- */

.section { padding-top: clamp(42px, 5.5vw, 68px); }

.section__head { max-width: 62ch; }

.section__head--wide { max-width: none; }

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

.section__lede {
  margin-top: 10px;
  color: var(--ink-70);
  font-size: 15.5px;
  line-height: 1.6;
}

.prose {
  max-width: 74ch;
  margin-top: 16px;
  color: var(--ink-70);
  font-size: 15.5px;
  line-height: 1.7;
}

.prose h3 {
  margin: 26px 0 8px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.prose p + p { margin-top: 12px; }

.prose ul, .prose ol {
  margin-top: 10px;
  padding-left: 20px;
}

.prose li + li { margin-top: 6px; }

.prose a {
  color: var(--rose-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose strong { color: var(--ink); font-weight: 600; }

.callout {
  margin-top: 18px;
  padding: 16px 18px;
  border-left: 2px solid var(--apricot);
  background: var(--apricot-soft);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-70);
}

.formula {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink);
  overflow-x: auto;
}

.formula code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12.5px;
  white-space: nowrap;
}

.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.duo--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- Tables ---------- */

.table-wrap {
  margin-top: 18px;
  border-top: 1.5px solid var(--ink);
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

caption {
  padding-bottom: 10px;
  text-align: left;
  font-size: 12px;
  color: var(--ink-55);
}

th {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink-55);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
}

td {
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: baseline;
}

th:last-child, td:last-child { padding-right: 0; }

tr.is-past td { color: var(--ink-38); }

tr.is-now td {
  background: var(--rose-soft);
  color: var(--ink);
}

tr.is-now td:first-child {
  box-shadow: inset 3px 0 0 var(--rose);
  padding-left: 8px;
}

.tag {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 6px;
  border: 1px solid var(--line-strong);
  color: var(--ink-55);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 1px;
  white-space: nowrap;
}

.tag--rose { border-color: var(--rose); color: var(--rose-deep); }

.table-empty {
  padding: 22px 0;
  color: var(--ink-55);
  font-size: 14px;
}

/* ---------- FAQ ---------- */

.faq {
  margin-top: 18px;
  border-top: 1.5px solid var(--ink);
}

.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--rose);
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
}

.faq details[open] summary::after { content: "\2212"; }

.faq details > p {
  max-width: 72ch;
  padding: 0 0 16px;
  color: var(--ink-70);
  font-size: 14.5px;
  line-height: 1.65;
}

/* ---------- Sources & disclaimer ---------- */

.sources {
  margin-top: 16px;
  padding-left: 18px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-55);
}

.sources li + li { margin-top: 5px; }

.sources a { color: var(--rose-deep); }

.disclaimer {
  margin-top: 20px;
  padding: 14px 16px;
  border-left: 2px solid var(--apricot);
  background: var(--apricot-soft);
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-70);
}

.disclaimer strong { color: var(--ink); }

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

.footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: clamp(56px, 8vw, 96px);
  background: var(--panel);
  color: var(--panel-ink);
  padding: clamp(38px, 5vw, 64px) 0 26px;
}

.footer::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 169, 183, 0.16), transparent 32%),
    radial-gradient(circle at 4% 100%, rgba(244, 177, 131, 0.1), transparent 28%);
  pointer-events: none;
}

.footer__inner {
  display: grid;
  grid-template-columns: minmax(210px, 1.05fr) minmax(250px, 1.15fr) minmax(170px, 0.8fr);
  grid-template-areas:
    "brand calculators about"
    "brand calculators legal";
  column-gap: clamp(28px, 4.5vw, 68px);
  row-gap: clamp(24px, 3vw, 36px);
  align-items: start;
}

.footer__brand-col { grid-area: brand; }
.footer__col--calculators { grid-area: calculators; }
.footer__col--about { grid-area: about; }
.footer__col--legal { grid-area: legal; align-self: end; }

.footer__col--calculators,
.footer__col--about,
.footer__col--legal {
  padding-left: clamp(18px, 2vw, 28px);
  border-left: 1px solid var(--panel-line);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--panel-ink);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.footer__brand-logo {
  display: block;
  width: auto;
  height: 64px;
  max-width: 280px;
  flex: none;
}

.footer__brand-col p {
  max-width: 34ch;
  margin-top: 12px;
  color: var(--panel-muted);
  font-size: 13px;
  line-height: 1.65;
}

.footer h2 {
  margin-bottom: 12px;
  color: var(--panel-rose);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer nav a {
  display: block;
  width: fit-content;
  padding: 3px 0;
  color: var(--panel-muted);
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
}

.footer nav a:hover,
.footer nav a:focus-visible {
  color: var(--panel-ink);
  text-decoration: underline;
  text-decoration-color: var(--panel-rose);
  text-underline-offset: 3px;
}

.footer__legal {
  margin-top: clamp(34px, 4vw, 52px);
  padding-top: 16px;
  border-top: 1px solid var(--panel-line);
  color: rgba(253, 245, 236, 0.55);
  font-size: 11.5px;
  line-height: 1.5;
}

/* ---------- Home page ---------- */

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(54px, 8vw, 104px) 0 clamp(42px, 5vw, 64px);
}

.home-hero h1 {
  max-width: 13ch;
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: clamp(54px, 8.4vw, 104px);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.home-hero h1 em {
  font-style: italic;
  color: var(--rose);
}

.home-hero__lede {
  max-width: 52ch;
  margin-top: 22px;
  font-size: 17px;
  line-height: 1.58;
  color: var(--ink-70);
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.home-hero__actions .btn--solid {
  background: var(--ink);
  color: var(--bone);
  min-height: 46px;
  padding: 0 18px;
}

.home-hero__actions .btn--solid:hover { background: var(--rose-deep); }

.home-hero__actions .btn--line {
  border-color: var(--ink);
  color: var(--ink);
  min-height: 46px;
  padding: 0 18px;
}

.home-hero__actions .btn--line:hover { background: var(--rose-tint); }

.home-art {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.home-art svg { width: 100%; height: auto; }

.home-art__note {
  position: absolute;
  right: 4%;
  bottom: 7%;
  padding: 6px 10px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  font-size: 11px;
  color: var(--ink-70);
  transform: rotate(-2.5deg);
}

/* Home tool grid: auto-fit so the layout stays balanced whatever the number of
   cards (4, 5 or more) without a per-count modifier. At the 1180px wrap the
   five cards settle into a balanced 3 + 2 rather than a lone orphan. */
.tool-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.tool-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tool-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 var(--rose);
}

.tool-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.tool-card__kicker {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

/* .tool-card p sets 14px, so this needs extra weight to reserve two lines. */
.tool-card .tool-card__kicker {
  min-height: 3.2em;
}

.tool-card h2 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(27px, 3.2vw, 34px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.tool-card p {
  max-width: 36ch;
  color: var(--ink-70);
  font-size: 14px;
  line-height: 1.6;
}

.tool-card__mark {
  width: 54px;
  height: 54px;
  flex: none;
}

.tool-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rose-deep);
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 3vw, 34px);
  margin-top: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.principle__num {
  display: block;
  margin-bottom: 7px;
  font-family: var(--font-display);
  font-size: 13px;
  font-style: italic;
  color: var(--rose);
}

.principle h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.principle p {
  margin-top: 6px;
  color: var(--ink-70);
  font-size: 13.5px;
  line-height: 1.55;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .tool { grid-template-columns: minmax(0, 1fr); }
  .panel--result { position: static; }
  .dock { display: flex; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .masthead { position: static; }
  .home-hero { grid-template-columns: minmax(0, 1fr); }
  .home-art { max-width: 380px; margin-inline: auto; }
}

@media (max-width: 920px) {
  .footer__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "brand brand"
      "calculators about"
      "calculators legal";
  }

  .footer__brand-col {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 18px 36px;
  }

  .footer__brand-col p { margin-top: 0; max-width: 52ch; }

  /* Seventeen links in one column made this area much taller than About/Legal,
     which pushed the legal block down. Two balanced columns keep the rows even. */
  .footer__col--calculators nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
    row-gap: 2px;
  }

  .footer__col--legal { align-self: start; }
}

@media (max-width: 760px) {
  .wrap { width: calc(100% - 32px); }
  .masthead__note { display: none; }
  .hero { padding-top: 36px; }
  .duo { grid-template-columns: 1fr; }
  .tool-cards { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; gap: 18px; }
  .panel--result { box-shadow: 6px 6px 0 var(--rose); }
}

@media (max-width: 560px) {
  .method-list { grid-template-columns: 1fr 1fr; }
  .method:nth-child(3) label { border-left: 0; border-top: 1px solid var(--line); }
  .method:nth-child(4) label { border-top: 1px solid var(--line); }
  .form-grid { grid-template-columns: 1fr; }
  .field--full { grid-column: auto; }
  .result__date { font-size: clamp(38px, 11.5vw, 48px); }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts dd { font-size: 14px; }
  .nav { gap: 13px; }
  .nav a { font-size: 13px; }
  .brand { font-size: 21px; }
  .brand__logo { height: 26px; max-width: 130px; }
  .footer__brand-logo { height: 44px; max-width: 200px; }
  .hero h1 { font-size: clamp(38px, 11.6vw, 52px); }
  .result__actions { flex-direction: column; }
  .result__actions .btn { width: 100%; }
  .footer__inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "calculators"
      "about"
      "legal";
    row-gap: 26px;
  }

  .footer__brand-col { display: block; }
  .footer__brand-col p { margin-top: 12px; }
  .footer__col--calculators,
  .footer__col--about,
  .footer__col--legal {
    padding-left: 0;
    border-left: 0;
  }
}

/* Below 520px the brand and four nav links no longer share one row without
   squeezing, so the nav drops to its own full-width line instead of wrapping
   its labels awkwardly or overflowing the viewport. */
@media (max-width: 520px) {
  .masthead__inner {
    flex-wrap: wrap;
    row-gap: 2px;
  }

  .nav {
    flex: 1 0 100%;
    justify-content: space-between;
    gap: 13px;
  }

  .footer__col--calculators nav { grid-template-columns: minmax(0, 1fr); }
}

/* Six nav links no longer fit on one line below ~1000px. Rather than wrap to
   two lines (which shifts the page on every load), the nav scrolls sideways:
   every link stays reachable and the masthead keeps a single row. */
@media (max-width: 1000px) {
  .nav {
    flex-wrap: nowrap;
    justify-content: flex-start;
    min-width: 0;
    gap: 15px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: 0 0 auto; white-space: nowrap; }
}

@media (max-width: 380px) {
  .nav { gap: 10px; }
  .nav a { font-size: 12px; }
  .nav--tools { gap: 7px; }
  .nav--tools > a,
  .nav--tools > .nav__more > summary { font-size: 11px; }
  .nav--tools .nav__more { margin-left: auto; }
  .brand em { display: none; }
}

/* ---------- Review strip ---------- */

.reviewstrip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
  padding: 16px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-70);
}

.reviewstrip a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.reviewstrip a:hover {
  color: var(--rose-deep);
}

.reviewstrip__label {
  display: block;
  margin-bottom: 4px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

/* ---------- Static content pages (about, privacy, terms) ---------- */

.page-hero {
  padding: clamp(34px, 5vw, 58px) 0 clamp(22px, 3vw, 30px);
  border-bottom: 1px solid var(--line-strong);
}

.page-hero h1 {
  max-width: 20ch;
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(38px, 5.2vw, 62px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.page-hero__lede {
  max-width: 64ch;
  margin-top: 16px;
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.55;
  color: var(--ink-70);
}

.page-meta {
  margin-top: 20px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-55);
}

.legal {
  max-width: 74ch;
}

.legal > :first-child {
  margin-top: 0;
}

.legal h2 {
  margin-top: 36px;
  font-family: var(--font-display);
  font-size: clamp(23px, 2.2vw, 29px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.legal h2:first-child {
  margin-top: 0;
}

.legal h3 {
  margin-top: 24px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.legal p {
  margin-top: 12px;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-70);
}

.legal ul,
.legal ol {
  margin-top: 12px;
  padding-left: 20px;
}

.legal li {
  margin-top: 7px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-70);
}

.legal li::marker {
  color: var(--rose);
}

.legal strong {
  color: var(--ink);
  font-weight: 600;
}

.legal a {
  color: var(--rose-deep);
  text-underline-offset: 2px;
}

.legal .callout {
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--rose);
  background: rgba(255, 252, 245, 0.6);
}

.legal .callout p {
  margin-top: 8px;
  font-size: 14px;
}

.legal .callout p:first-child {
  margin-top: 0;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

/* ---------- Editorial tables & utilities ---------- */

.legal table {
  width: 100%;
  margin-top: 18px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
}

.legal th,
.legal td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-strong);
  text-align: left;
  vertical-align: top;
  color: var(--ink-70);
}

.legal thead th {
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-55);
  border-bottom: 1px solid var(--ink);
}

.legal tbody th {
  width: 34%;
  color: var(--ink);
  font-weight: 600;
}

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

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

/* ---------- Print ---------- */

@media print {
  body {
    background: #fff;
    color: #000;
    padding: 0;
  }
  .masthead, .hero__trust, .panel--form, .dock, .result__actions,
  .section--hide-print, .footer, .skip, .faq { display: none !important; }
  .wrap { width: 100%; }
  .hero { padding: 0 0 12px; }
  .hero h1 { font-size: 30pt; }
  .hero__lede { font-size: 11pt; }
  .tool { display: block; }
  .panel--result {
    position: static;
    background: #fff;
    color: #000;
    border: 1px solid #000;
    box-shadow: none;
  }
  .result__date { font-size: 24pt; color: #000; }
  .result__label, .result__badge, .result__note, .facts dt, .dial__caption,
  .week-note__body, .week-note__kicker { color: #333; }
  .facts > div, .week-note { border-color: #bbb; }
  .dial { display: none; }
  .week-note__title { color: #000; }
  a { text-decoration: none; }
}
