/* ============================================================
   Nari — landing (es)
   Tokens taken from the iOS app (MenstrualCycleApp/):
   · ivory / mist / ink ......... Presentation/Views/Onboarding/OnboardingTheme.swift
                                  (#FAF9F6 background, #F2F2F7 gradient end, black accent)
   · phase pastels .............. Core/Extensions/Phase+UI.swift  (brandColor)
   · phase blob variants ........ Presentation/Components/PhaseBlobView.swift (light mode)
   · calendar phase fills ....... Core/Utilities/Constants.swift (AppColors: red/orange/green/purple @30%)
   · card radius 16, pill CTA ... Constants.UI.cornerRadius, PrimaryCTAView, OnboardingPillButton
   Web adaptations (not app tokens): panel radius, container, section rhythm,
   darker secondary grey and "ink" variants of iOS colours for text contrast.
   ============================================================ */

@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* surfaces */
  --ivory: #FAF9F6;
  --mist: #F2F2F7;
  --paper: #FFFFFF;
  --night: #0B0B0C;
  --night-2: #18181A;

  /* text */
  --ink: #000000;
  --ink-2: #5F5F65;          /* app systemGray #8E8E93 darkened for AA body text on ivory/white */
  --ink-3: #8E8E93;          /* systemGray — decorative/large only */
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);

  /* phases — Phase+UI.swift brandColor */
  --menstrual: #FF99B3;
  --follicular: #FFE680;
  --ovulation: #99CCFF;
  --luteal: #99E699;

  /* phase washes (web: brandColor mixed into ivory for large surfaces) */
  --menstrual-wash: #FFEFF3;
  --follicular-wash: #FFF6CF;
  --ovulation-wash: #EEF6FF;
  --luteal-wash: #EEFAEE;

  /* iOS system colours used by specific components */
  --ios-red: #FF3B30;
  --ios-orange: #FF9500;
  --ios-yellow: #FFCC00;
  --ios-green: #34C759;
  --ios-teal: #30B0C7;
  --ios-blue: #007AFF;
  --ios-indigo: #5856D6;
  --ios-purple: #AF52DE;
  --ios-pink: #FF2D55;
  /* darker "ink" variants for icons/text on light fills (contrast) */
  --ios-yellow-ink: #B88A00;
  --ios-green-ink: #248A3D;
  --olive: #6F785E;             /* crayon olive from the fox drawings */
  --ios-purple-ink: #8E3BBE;
  --ios-red-ink: #D70015;

  --serif: "Newsreader", ui-serif, "New York", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --r-card: 16px;                     /* Constants.UI.cornerRadius */
  --r-panel: clamp(24px, 2.4vw, 32px); /* web: editorial panels */
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(64px, 9vw, 120px);
  --container: 1200px;
  --header-h: 68px;

  --shadow-card: 0 6px 24px rgba(0, 0, 0, 0.05);
  --shadow-device: 0 30px 60px -20px rgba(40, 30, 0, 0.35), 0 10px 24px -12px rgba(0, 0, 0, 0.25);
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ---------- base ---------- */

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

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

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
abbr { text-decoration: none; }

::selection { background: var(--follicular); color: #000; }

.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;
}

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

/* One language is in the DOM at a time. The active one is set on <html> before paint. */
html[lang="es"] [lang="en"],
html[lang="en"] [lang="es"] { display: none !important; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

#contenido:focus { outline: none; }
section[tabindex="-1"]:focus { outline: none; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section) 0; }

/* ---------- type ---------- */

.display {
  font-family: var(--serif);
  font-weight: 300;
  font-optical-sizing: auto;
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.section-title {
  font-family: var(--serif);
  font-weight: 350;
  font-size: clamp(2rem, 1.4rem + 1.8vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.008em;
  text-wrap: balance;
}

.lede {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 34em;
}

.section-head { max-width: 760px; margin-bottom: clamp(32px, 4vw, 48px); }
.section-lede {
  margin-top: 16px;
  font-size: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);
  color: var(--ink-2);
  max-width: 38em;
}

.text-link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.text-link:hover { text-decoration-thickness: 2px; }
.text-link-light { color: var(--paper); }

.lang-note { font-weight: 400; opacity: 0.75; }

.hint { font-size: 0.9375rem; color: var(--ink-2); }

/* small provenance label: real capture / reconstruction / demo data */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
  max-width: 100%;
  line-height: 1.35;
}
.tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ios-yellow);
}
.tag-soft { background: var(--follicular-wash); border-color: rgba(184, 138, 0, 0.2); color: #6B5200; }
.tag-plain { background: transparent; }
.tag-dark { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.78); }
.tag-under { margin-top: 14px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1); /* PrimaryCTAView shadow */
}
.btn-primary:hover { background: #222; }
.btn-primary:active { transform: scale(0.98); }
.btn-small { min-height: 44px; padding: 0 20px; font-size: 0.9375rem; }

.text-button {
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 10px 2px;
  min-height: 44px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 249, 246, 0.96);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-height: 44px;
}
.brand-icon { width: 32px; height: 32px; border-radius: 9px; }
.brand-word {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1.75rem;
  letter-spacing: 0.05em;   /* onboarding wordmark: .tracking(4) at 80pt */
  line-height: 1;
}

.header-end {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  min-width: 0;
}
.primary-nav { display: flex; align-items: center; gap: 28px; }

.lang-switch {
  --lang-slot: 44px;
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0;
}
.lang-switch button {
  position: relative;
  z-index: 1;
  width: var(--lang-slot);
  min-height: 44px;
  padding: 0 0 2px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
html[lang="en"] .lang-switch [data-set-lang="en"],
html[lang="es"] .lang-switch [data-set-lang="es"] {
  color: var(--ink);
  font-weight: 600;
}
@media (hover: hover) and (pointer: fine) {
  .lang-switch button:hover { color: var(--ink); }
}
.lang-mark {
  position: absolute;
  z-index: 0;
  left: 10px;
  bottom: 8px;
  width: 24px;
  height: 8px;
  color: var(--olive);
  pointer-events: none;
  transition: transform 220ms var(--ease);
}
.lang-mark path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lang-mark path:first-child { stroke-width: 2.4; }
.lang-mark path:last-child { stroke-width: 1.35; opacity: 0.5; }
html[lang="es"] .lang-mark { transform: translateX(var(--lang-slot)); }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
}
.nav-links a:hover { background: rgba(0, 0, 0, 0.05); }
.nav-links a[aria-current="page"] { font-weight: 600; }

.menu-toggle {
  position: relative;
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px 0 14px;
  border-radius: 999px;
  background: #EBEBEB;          /* OnboardingTheme.highlight */
  font-size: 0.9375rem;
  font-weight: 600;
}
.menu-toggle-icon { position: relative; width: 16px; height: 10px; }
.menu-toggle-icon span {
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.75px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease), top 0.25s var(--ease);
}
.menu-toggle-icon span:first-child { top: 0; }
.menu-toggle-icon span:last-child { top: 8px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:first-child { top: 4px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:last-child { top: 4px; transform: rotate(-45deg); }

.mobile-menu {
  border-top: 1px solid var(--line);
  background: var(--ivory);
  padding: 8px var(--gutter) 24px;
  box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.25);
}
.mobile-menu ul { margin-bottom: 8px; }
.mobile-menu li + li { border-top: 1px solid var(--line); }
.mobile-menu a:not(.btn) {
  display: flex;
  align-items: center;
  min-height: 56px;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 350;
  text-decoration: none;
}
/* ---------- device frame (real captures) ---------- */

.device { --dw: 300px; width: var(--dw); max-width: 100%; position: relative; }
.device-frame {
  background: #0B0B0C;
  padding: calc(var(--dw) * 0.032);
  border-radius: calc(var(--dw) * 0.165);
  box-shadow: var(--shadow-device);
}
.device-frame img {
  width: 100%;
  border-radius: calc(var(--dw) * 0.135);
  background: var(--ivory);
}
.device .tag { margin-top: 16px; }
@media (min-width: 1101px) {
  .device-tab { --dw: 320px !important; }
}
.device-on-dark .device-frame {
  background: #2A2A2D;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* ---------- phase blob canvas (PhaseBlobView) ---------- */

.phase-blob { pointer-events: none; }

/* ---------- panels ---------- */

.panel {
  background: var(--paper);
  border-radius: var(--r-panel);
  border: 1px solid var(--line);
}

.panel-night {
  background: var(--night);
  border-color: var(--night);
  color: var(--paper);
}

.photo-panel {
  position: relative;
  border-radius: var(--r-panel);
  overflow: hidden;
  background: #E9E4DA;
}
.photo-panel img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   B. HERO
   ============================================================ */

.hero { padding-top: clamp(8px, 1.5vw, 20px); }

.hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(24px, 3vw, 48px);
  min-height: clamp(600px, 50vw, 700px);
  padding: clamp(40px, 5vw, 72px) clamp(28px, 4.5vw, 72px);
  border-radius: var(--r-panel);
  background:
    radial-gradient(90% 80% at 100% 0%, #FFEFAE 0%, rgba(255, 239, 174, 0) 70%),
    linear-gradient(120deg, #FFFCF2 0%, #FFF8DE 50%, var(--follicular-wash) 100%);
  border: 1px solid rgba(184, 138, 0, 0.12);
  overflow: hidden;
  isolation: isolate;
}

.hero-copy { position: relative; z-index: 3; }
.hero-copy .display { max-width: 9.5em; }
.hero-copy .lede { margin-top: 24px; color: #4A4A50; }
.hero-copy .availability { margin-top: 32px; }

.availability {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  margin-top: 12px;
  padding-block: 8px;
  font-size: 0.875rem;
  color: var(--ink-2);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
a.availability .availability-text {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
@media (hover: hover) and (pointer: fine) {
  a.availability:hover { color: var(--ink); }
  a.availability:hover .availability-text { text-decoration-thickness: 2px; }
}
.hero-visual {
  position: relative;
  align-self: stretch;
  min-height: 560px;
}

.hero-photo {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 70%;
  border-radius: 24px;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 30px 60px -30px rgba(70, 50, 0, 0.35);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 40%;
}

.hero-sun {
  position: absolute;
  z-index: 0;
  width: 600px;
  height: 600px;
  left: -230px;
  top: 50%;
  transform: translateY(-62%);
}

.hero-device {
  position: absolute;
  z-index: 2;
  left: 2%;
  top: 50%;
  transform: translateY(-53%);
}

/* ============================================================
   C. PAUSE
   ============================================================ */

.pause { padding-block: clamp(80px, 11vw, 150px) clamp(16px, 3vw, 40px); }
.pause-text {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  line-height: 1.25;
  text-align: center;
  max-width: 20em;
  margin-inline: auto;
  text-wrap: balance;
  color: var(--ink);
}
.pause-text .pause-em { color: var(--ink-2); }

/* ============================================================
   D. EXPLORER (tabs)
   ============================================================ */

.explorer-panel { padding: clamp(16px, 2.4vw, 32px); }

.tablist-wrap {
  position: relative;
  margin-bottom: clamp(24px, 3vw, 40px);
}

.tablist {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: var(--mist);
  border-radius: 999px;
  width: max-content;
  max-width: 100%;
}

.tab {
  flex: none;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] {
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.tabpanel {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  min-height: 560px;
  padding: clamp(8px, 2vw, 24px) clamp(8px, 2vw, 32px) clamp(16px, 2vw, 24px);
  border-radius: calc(var(--r-panel) - 8px);
}
.tabpanel[hidden] { display: none; }
.tabpanel:focus-visible { outline-offset: -2px; }

.tabpanel-copy { max-width: 30em; }
.tabpanel-copy p { color: var(--ink-2); margin-top: 14px; }
.tabpanel-copy .text-link { display: inline-block; margin-top: 18px; }
.panel-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem);
  line-height: 1.15;
}

.check-list { margin-top: 22px; display: grid; gap: 12px; }
.check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--ink);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.tabpanel-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding-block: 8px 4px;
  border-radius: calc(var(--r-panel) - 10px);
  background: var(--ivory);
  padding: clamp(20px, 3vw, 40px);
  align-self: stretch;
}
#panel-registro .tabpanel-visual { background: var(--menstrual-wash); }
#panel-patrones .tabpanel-visual { background: var(--ovulation-wash); }
#panel-calendario .tabpanel-visual { background: var(--mist); }

/* app-like surface (white card scale of the iOS screens) */
.app-surface {
  width: 100%;
  max-width: 460px;
  background: var(--paper);
  border-radius: 28px;
  box-shadow: 0 1px 0 var(--line), 0 24px 48px -28px rgba(0, 0, 0, 0.28);
  padding: 22px 20px 20px;
}

/* --- Hoy reconstruction --- */
.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  padding-bottom: 6px;
}
.week-strip > span { display: grid; gap: 8px; justify-items: center; }
.week-strip abbr {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}
.week-strip b {
  display: grid;
  place-items: center;
  width: min(36px, 100%);
  aspect-ratio: 1;
  font-weight: 400;
  font-size: 1.0625rem;
}
.week-strip .is-today b {
  font-weight: 700;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--follicular);
}

.phase-hero {
  text-align: center;
  padding: 24px 8px 0;
}
.today-blob-wrap {
  position: relative;
  height: 170px;
  margin-bottom: 12px;
}
.today-blob {
  position: absolute;
  width: 230px;
  height: 230px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.8;      /* PhaseVisualView .opacity(0.8) */
}
.phase-hero-kicker {
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}
.phase-hero-name {
  font-family: var(--serif);
  font-weight: 350;
  font-size: 2.75rem;
  line-height: 1.15;
  margin-top: 4px;
}
.phase-hero-desc { color: var(--ink-2); margin-top: 6px; }

.app-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 1.0625rem;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s var(--ease);
}
.app-pill:active { transform: scale(0.98); }

/* CycleSummaryView */
.summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 16px;
  background: var(--paper);
  border-radius: var(--r-card);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.06);
}
.summary-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}
.summary-value {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.25;
  margin-top: 4px;
  letter-spacing: -0.005em;
}
.summary-range { font-size: 0.8125rem; color: var(--ink-2); margin-top: 4px; }
.summary-ring {
  --size: 58px;
  flex: none;
  position: relative;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background:
    radial-gradient(closest-side, var(--paper) calc(100% - 5px), transparent calc(100% - 4px)),
    conic-gradient(var(--ring) calc(var(--progress) * 360deg), rgba(142, 142, 147, 0.12) 0);
}
.summary-ring img {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 66%;
  height: 66%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(255, 230, 128, 0.35));
}

/* --- Calendar reconstruction --- */
.calendar { padding: 18px 16px 16px; }
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cal-month {
  font-size: 1.1875rem;
  font-weight: 600;
  text-transform: lowercase;
}
.cal-nav {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}
.cal-nav:hover { background: rgba(0, 0, 0, 0.05); }
.cal-nav:disabled { opacity: 0.25; cursor: default; background: none; }
.cal-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.cal-weekdays, .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  justify-items: center;
}
.cal-weekdays > span {
  font-size: 0.8125rem;
  color: var(--ink-2);
  padding-bottom: 6px;
}
.cal-grid { row-gap: 6px; }
.cal-cell { width: 44px; height: 44px; }

.day {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}
.day::before {          /* 36pt circle, phase fill (Constants.AppColors @ 0.3) */
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--fill, transparent);
}
.day span { position: relative; }
.day.is-today span { font-weight: 700; }
.day.has-entries::after {   /* entry dot */
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--ink);
}
.day.is-predicted::before {
  background: rgba(0, 0, 0, 0.1);
  outline: 2px dashed rgba(0, 0, 0, 0.8);
  outline-offset: -2px;
}
.day[aria-pressed="true"]::before { box-shadow: inset 0 0 0 2px var(--ink); }
.day:hover::before { box-shadow: inset 0 0 0 1px var(--line-strong); }
.day[aria-pressed="true"]:hover::before { box-shadow: inset 0 0 0 2px var(--ink); }

.cal-detail {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--mist);
  border-radius: var(--r-card);
  min-height: 112px;
}
.cal-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.cal-detail-date { font-weight: 600; font-size: 1rem; }
.badge-today {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
}
.cal-entries { display: grid; gap: 6px; }
.cal-entries li { display: flex; align-items: center; gap: 10px; font-size: 0.9375rem; }
.cal-entries .e-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--ink-3)); }
.cal-entries .e-blob { flex: none; width: 18px; height: 18px; }
.cal-empty { font-size: 0.9375rem; color: var(--ink-2); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--ink-2);
}
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.lg { width: 16px; height: 16px; border-radius: 50%; flex: none; }
.lg-menstrual { background: rgba(255, 59, 48, 0.3); }
.lg-follicular { background: rgba(255, 149, 0, 0.3); }
.lg-ovulation { background: rgba(52, 199, 89, 0.3); }
.lg-luteal { background: rgba(175, 82, 222, 0.3); }
.lg-dot { width: 6px; height: 6px; background: var(--ink); margin-inline: 5px; }
.lg-predicted { background: rgba(0, 0, 0, 0.1); border: 2px dashed rgba(0, 0, 0, 0.8); }

/* ============================================================
   G. PATTERNS
   ============================================================ */

.patterns-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: clamp(24px, 4vw, 56px);
  align-items: end;
  margin-bottom: clamp(32px, 4vw, 48px);
}
.patterns-intro .section-head { margin-bottom: 0; }
.aside-note {
  margin: 0;
  padding: 16px 18px;
  border-radius: var(--r-card);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.patterns-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(16px, 2vw, 24px);
}
.pattern-card { padding: clamp(24px, 3.4vw, 44px); display: flex; flex-direction: column; }
.pattern-observation { background: linear-gradient(160deg, var(--follicular-wash), var(--paper) 75%); }
.pattern-estimate { background: var(--paper); }

.kind {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.kind-light { color: rgba(255, 255, 255, 0.7); }

.card-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 1.2rem + 0.9vw, 1.875rem);
  line-height: 1.2;
}
.card-note { margin-top: auto; padding-top: 22px; font-size: 0.9375rem; color: var(--ink-2); }

/* HomeStatsView reconstruction */
.insight-card {
  display: flex;
  gap: 16px;
  margin-top: 26px;
  padding: 22px 22px 20px 20px;
  background: var(--paper);
  border-radius: var(--r-card);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  max-width: 560px;
}
.insight-rail { display: flex; flex-direction: column; align-items: center; padding-top: 7px; }
.insight-rail::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--follicular); }
.insight-rail span { flex: 1; width: 2px; margin-top: 4px; background: rgba(255, 230, 128, 0.6); }
.insight-body { flex: 1; min-width: 0; }
.insight-title { font-size: 1.125rem; font-weight: 600; }
.insight-headline { margin-top: 12px; font-weight: 600; }
.insight-detail { margin-top: 2px; color: var(--ink-2); font-size: 0.9375rem; }
.insight-tip {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.insight-tip svg { flex: none; width: 22px; height: 22px; fill: var(--follicular); stroke: #D9B100; stroke-width: 0.6; }
.insight-based {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 0.8125rem;
  color: var(--ink-2);
}
.insight-based svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.calc {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: var(--r-card);
  background: var(--ivory);
  border: 1px solid var(--line);
}
.calc-label { font-size: 0.8125rem; color: var(--ink-2); }
.calc-cycles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.calc-cycles li {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 32px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.calc-result { margin-top: 12px; font-size: 0.9375rem; }

.summary-card-lg { margin-top: 26px; padding: 22px 20px; box-shadow: 0 5px 24px rgba(0, 0, 0, 0.07); border: 1px solid var(--line); }
.summary-card-lg .summary-value { font-size: 1.375rem; }
.summary-card-lg .summary-ring { --size: 66px; }

/* ============================================================
   H. PARTNER
   ============================================================ */

.partner-intro {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  margin-bottom: clamp(24px, 3vw, 40px);
}
.partner-photo { aspect-ratio: 3 / 2; }
.partner-photo img { object-position: 50% 50%; }
.partner-head { margin-bottom: 0; }

.steps { margin-top: 24px; display: grid; gap: 12px; }

.partner-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(16px, 2vw, 24px);
}

.goal-panel { padding: clamp(22px, 3.4vw, 44px); }
.goal-q { font-size: 1.375rem; font-weight: 700; text-align: center; line-height: 1.25; }
.goal-sub { text-align: center; color: var(--ink-2); margin-top: 4px; }
.goal-list { display: grid; gap: 12px; margin-top: 24px; }
.goal {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 16px;
  border-radius: 12px;
  background: var(--mist);
  box-shadow: inset 0 0 0 2px transparent;
  transition: box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}
.goal:hover { background: #EBEBF0; }
.goal[aria-checked="true"] { box-shadow: inset 0 0 0 2px rgba(52, 199, 89, 0.5); background: var(--paper); }
.goal-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--gc) 15%, transparent);
  color: var(--gc);
}
.goal-icon svg { width: 24px; height: 24px; fill: currentColor; }
.goal-body { display: grid; gap: 2px; }
.goal-name { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-weight: 600; font-size: 1.0625rem; }
.goal-level {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink-2);
}
.goal-desc { font-size: 0.9375rem; color: var(--ink-2); }
.goal-check { width: 26px; height: 26px; opacity: 0; transition: opacity 0.2s var(--ease); }
.goal-check svg { width: 26px; height: 26px; }
.goal-check circle { fill: var(--ios-green-ink); }
.goal-check path { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.goal[aria-checked="true"] .goal-check { opacity: 1; }

.sees {
  margin-top: 24px;
  padding: 20px;
  border-radius: var(--r-card);
  background: var(--ivory);
  border: 1px solid var(--line);
}
.sees-title { font-weight: 600; }
.sees-list { display: grid; gap: 10px; margin-top: 12px; }
.sees-list li { position: relative; padding-left: 30px; }
.sees-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.sees-list li.is-new { animation: sees-in 0.4s var(--ease); }
@keyframes sees-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.sees-never { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.9375rem; color: var(--ink-2); }
.sees-never strong { color: var(--ink); }

.partner-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: clamp(24px, 3vw, 40px);
  background:
    radial-gradient(70% 50% at 50% 40%, rgba(255, 230, 128, 0.12), transparent 70%),
    var(--night);
}
.partner-view .kind { align-self: flex-start; }
.partner-view-note { font-size: 0.9375rem; color: rgba(255, 255, 255, 0.72); max-width: 26em; text-align: center; }
.partner-view .tag { margin-top: 18px; }

/* ============================================================
   I. PRIVACY (dark contrast moment)
   ============================================================ */

.privacy { padding-block: var(--section); }
.privacy-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 6vw, 88px) clamp(24px, 6vw, 88px);
  border-radius: var(--r-panel);
  background: #F6F1E4;
  color: var(--ink);
  isolation: isolate;
}
.privacy-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 38% 46%;
}
.privacy-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(250, 247, 239, 0.86) 0%, rgba(250, 247, 239, 0.78) 55%, rgba(250, 247, 239, 0.84) 100%);
}
.privacy-head,
.facts,
.privacy-link { position: relative; z-index: 2; }
.privacy-head { max-width: 720px; }
.privacy-head .section-lede { color: var(--ink-2); }

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px) clamp(24px, 3vw, 48px);
  margin-top: clamp(36px, 5vw, 64px);
}
.facts h3 { font-size: 1.0625rem; font-weight: 600; }
.facts p { margin-top: 8px; font-size: 0.9375rem; color: var(--ink-2); }
.privacy-link { margin-top: clamp(32px, 4vw, 48px); }

/* ============================================================
   Privacy policy modal
   ============================================================ */

body.policy-open { overflow: hidden; }
.policy-modal[hidden] { display: none; }
.policy-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding:
    max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}
.policy-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(36, 32, 24, 0.42);
}
.policy-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(680px, 100%);
  max-height: min(780px, calc(100dvh - 32px));
  background: #F6F1E4;
  color: var(--ink);
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(40, 30, 12, 0.22);
  overflow: hidden;
  animation: policy-in 220ms var(--ease);
}
@keyframes policy-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.policy-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 28px 0;
}
.policy-title {
  font-family: var(--serif);
  font-weight: 350;
  font-size: clamp(1.75rem, 1.35rem + 1.2vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -0.008em;
  text-wrap: balance;
  max-width: 14em;
}
.policy-mark {
  display: block;
  width: 72px;
  height: 10px;
  margin-top: 10px;
  color: var(--olive);
}
.policy-mark path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.policy-mark path:first-child { stroke-width: 2.2; }
.policy-mark path:last-child { stroke-width: 1.2; opacity: 0.5; }
.policy-meta {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 0.875rem;
}
.policy-close {
  flex: none;
  min-height: 44px;
  padding: 8px 2px;
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.policy-close:hover { color: var(--ink); text-decoration-thickness: 2px; }
.policy-body {
  overflow: auto;
  padding: 8px 28px 36px;
  -webkit-overflow-scrolling: touch;
}
.policy-body h3 {
  margin-top: 1.7em;
  font-family: var(--serif);
  font-weight: 450;
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: -0.006em;
}
.policy-body h3:first-child { margin-top: 22px; }
.policy-body p,
.policy-body li {
  margin-top: 0.7em;
  color: var(--ink-2);
  font-size: 0.975rem;
  line-height: 1.65;
}
.policy-body ul { margin-top: 0.35em; padding-left: 1.15em; }
.policy-body li::marker { color: var(--olive); }
.policy-body li strong { color: var(--ink); font-weight: 600; }
.policy-body a { color: var(--ink); }

@media (max-width: 640px) {
  .policy-dialog { border-radius: 22px; max-height: calc(100dvh - 24px); }
  .policy-head, .policy-body { padding-inline: 20px; }
}

/* ============================================================
   J. FAQ
   ============================================================ */

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
.accordion { border-top: 1px solid var(--line-strong); }
.acc-item { border-bottom: 1px solid var(--line-strong); }
.acc-heading { font-size: inherit; font-weight: inherit; }
.acc-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  min-height: 72px;
  padding: 18px 4px;
  text-align: left;
  font-family: var(--serif);
  font-size: clamp(1.1875rem, 1.05rem + 0.45vw, 1.4375rem);
  font-weight: 400;
  line-height: 1.3;
}
.acc-trigger > [lang] { min-width: 0; }
.insight-tip p { min-width: 0; }
.acc-icon {
  position: relative;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #EBEBEB;
  transition: background-color 0.2s var(--ease);
}
.acc-icon::before, .acc-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  margin: -1px 0 0 -7px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.25s var(--ease);
}
.acc-icon::after { transform: rotate(90deg); }
.acc-trigger[aria-expanded="true"] .acc-icon { background: var(--ink); }
.acc-trigger[aria-expanded="true"] .acc-icon::before,
.acc-trigger[aria-expanded="true"] .acc-icon::after { background: var(--paper); transform: rotate(0); }
.acc-panel { padding: 0 4px 24px; color: var(--ink-2); max-width: 46em; }

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding-block: 28px 22px;
  text-align: center;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.site-footer .brand { min-height: 0; gap: 8px; }
.site-footer .brand-icon { width: 20px; height: 20px; border-radius: 6px; }
.site-footer .brand-word {
  font-size: 1.25rem;
  font-weight: 300;
  letter-spacing: 0.05em;
}
.footer-brand p {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: 0.9375rem;
  line-height: 1.3;
  color: var(--ink-2);
}
.footer-legal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 36rem;
  color: var(--ink-2);
  font-size: 0.75rem;
  line-height: 1.5;
}

/* ============================================================
   CONTACT
   ============================================================ */

body:has(.contact-page) {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.contact-page {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  padding-block: clamp(28px, 5vw, 48px);
}
.contact-page::before,
.contact-page::after { content: ""; flex: 1 1 0; }
.contact {
  display: grid;
  grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
  align-items: center;
  gap: clamp(36px, 5vw, 72px);
  width: 100%;
}
.contact-copy { max-width: 28rem; }
.contact-copy .section-title { max-width: 10em; }
.contact-mail {
  display: inline-block;
  margin-top: 28px;
  max-width: 100%;
  padding-block: 8px;
  min-height: 44px;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  overflow-wrap: anywhere;
}
.contact-mail:hover { text-decoration-thickness: 2px; }
.contact-art { width: 100%; height: auto; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1100px) {
  .hero-sun { width: 520px; height: 520px; left: -170px; }
  .tabpanel { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .tabpanel-copy { max-width: 40em; }
  .tabpanel-visual { padding: clamp(24px, 4vw, 40px) 16px; }
  .faq-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 960px) {
  .primary-nav { display: none; }
  .menu-toggle { display: inline-flex; }

  .hero-panel {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 36px 24px 0;
  }
  .hero-copy .display { max-width: 8.5em; }
  .hero-visual { min-height: 0; height: clamp(520px, 128vw, 700px); margin-inline: -24px; margin-top: 8px; }
  .hero-photo { top: 0; bottom: 96px; left: 24px; right: 24px; width: auto; border-radius: 20px; }
  .hero-photo img { object-position: 64% 30%; }
  .hero-device { --dw: clamp(168px, 44vw, 250px) !important; left: 36px; top: auto; bottom: 24px; transform: none; }
  .hero-sun { width: 420px; height: 420px; left: -150px; top: auto; bottom: -40px; transform: none; }

  .patterns-intro { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .patterns-grid { grid-template-columns: minmax(0, 1fr); }

  .partner-intro { grid-template-columns: minmax(0, 1fr); }
  .partner-grid { grid-template-columns: minmax(0, 1fr); }

  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .contact { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .contact-art { width: min(100%, 460px); margin-inline: auto; }
}

@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .brand-word { font-size: 1.5rem; }
  .header-inner { gap: 12px; }
  .header-end { gap: 8px; }

  .tablist-wrap { margin-inline: -4px; }
  .tablist-wrap::after {   /* edge fade hints that tabs scroll */
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 36px;
    border-radius: 0 999px 999px 0;
    background: linear-gradient(90deg, rgba(242, 242, 247, 0), var(--mist) 80%);
    pointer-events: none;
    transition: opacity 0.2s var(--ease);
  }
  .tablist-wrap.at-end::after { opacity: 0; }
  .tablist-wrap::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    bottom: 0;
    width: 36px;
    border-radius: 999px 0 0 999px;
    background: linear-gradient(270deg, rgba(242, 242, 247, 0), var(--mist) 80%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s var(--ease);
  }
  .tablist-wrap.past-start::before { opacity: 1; }
  .explorer .tablist {
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    width: 100%;
  }
  .explorer .tablist::-webkit-scrollbar { display: none; }
  .explorer .tab { scroll-snap-align: start; padding: 0 16px; }
  .explorer-panel { padding: 12px; }
  .tabpanel { padding: 4px 4px 8px; gap: 20px; }
  .tabpanel-visual { margin-inline: -4px; padding: 20px 12px; }
  .app-surface { padding: 18px 12px 14px; border-radius: 22px; }
  .calendar { padding: 14px 8px 10px; }
  .day, .cal-cell { width: 40px; height: 40px; }
  .phase-hero-name { font-size: 2.375rem; }
  .summary-value { font-size: 1.125rem; }

  .mood-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 4px; }
  .mood-label { font-size: 0.75rem; }
  .ci-card { padding: 14px; }
  .energy-row { gap: 6px; }
  .energy-label { font-size: 0.75rem; text-align: center; }

  .insight-card { padding: 18px 16px; gap: 12px; }
  .goal { gap: 12px; padding: 14px 12px; }
  .goal-icon { width: 42px; height: 42px; }

  .facts { grid-template-columns: minmax(0, 1fr); }
  .acc-trigger { min-height: 64px; }
}

@media (max-width: 420px) {
  .menu-toggle { width: 44px; padding: 0; justify-content: center; }
  .menu-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (max-width: 360px) {
  .hero-panel { padding-inline: 20px; }
  .hero-visual { margin-inline: -20px; }
  .hero-photo { left: 20px; right: 20px; }
  .hero-device { --dw: 148px !important; left: 32px; }
  .hero-photo img { object-position: 70% 30%; }
  .tabpanel-visual { padding: 16px 6px; }
  .app-surface { padding: 16px 8px 12px; }
  .week-strip abbr { font-size: 0.625rem; }
  .day, .cal-cell { width: 36px; height: 36px; }
  .day.has-entries::after { bottom: 4px; }
  .mood-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tab { padding: 0 14px; }
}

/* ---------- reduced motion ---------- */

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