/* Peptidly — landing page. Tokens are the app's own.
   The legal pages keep style.css; nothing here touches them. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono"; /* taste-skill-ignore: brand face (wordmark and app numerals) */
  src: url("/assets/fonts/jetbrains-mono-latin-wght.woff2") format("woff2"); /* taste-skill-ignore: brand face (wordmark and app numerals) */
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0D1B2A;
  --bg-deep: #070F1A;
  --surface: #13243A;
  --card: #16273D;
  --card-hi: #1B2F49;
  --ink: #EAF2FB;
  --muted: #A9B8CC;
  --mute: #6F8299;
  --faint: #4E6075;
  --accent: #00B4D8;
  --accent-hover: #5FD4EB;
  --on-accent: #04202B;
  --teal-soft: rgba(0, 180, 216, 0.16);
  --teal-line: rgba(0, 180, 216, 0.35);
  --lav: #7B8CDE;
  --amber: #F2B155;
  --green: #4ADE80;
  --line: rgba(255, 255, 255, 0.06);
  --line-hi: rgba(255, 255, 255, 0.1);

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace; /* taste-skill-ignore: brand face (wordmark and app numerals) */

  --margin: clamp(20px, 4.4vw, 64px);
  --maxw: 1280px;
  --col-gap: clamp(16px, 2.2vw, 32px);
  --section: clamp(112px, 13vw, 200px);
  --radius: 18px;

  --step-xl: clamp(40px, 4.5vw, 66px);
  --step-l: clamp(34px, 3.6vw, 54px);
  --step-m: clamp(22px, 2vw, 28px);
  --step-s: 18px;
  --step-xs: 15px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-s);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}

h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; }
button, input { font: inherit; color: inherit; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

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

::selection { background: var(--accent); color: var(--on-accent); }

/* On a teal surface the teal ring would vanish: switch it to the dark on-teal ink. */
.cta :focus-visible { outline-color: var(--on-accent); }
.faq details[open] summary:focus-visible { outline-offset: -4px; }
/* The Home replica draws its frame with an outline; a focus ring must replace it, not lose to it. */
[data-ui].phone:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

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

.skip {
  position: absolute;
  left: var(--margin);
  top: -60px;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  border-radius: 999px;
  z-index: 10;
}
.skip:focus { top: 12px; }
.skip:hover { color: var(--on-accent); }

/* Words that only make sense once the script has made something work. */
.js-only { display: none; }
.js .js-only { display: inline; }

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

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: var(--step-xs);
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms var(--ease-out);
}
.btn:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn:active { transform: scale(0.97); }
.btn-small { background: var(--card-hi); color: var(--ink); }
.btn-small:hover { background: var(--teal-soft); color: var(--ink); }

.play {
  display: inline-block;
  border-radius: 12px;
  transition: transform 180ms var(--ease-out);
}
.play img { width: auto; height: 78px; margin: -8px 0 -8px -10px; }
@media (hover: hover) and (pointer: fine) {
  .play:hover { transform: translateY(-2px); }
}
.play:active { transform: scale(0.98); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  font-weight: 600;
  font-size: var(--step-s);
  text-decoration: none;
}
.text-link svg { width: 20px; height: 20px; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .text-link:hover svg { transform: translateX(4px); }
}

/* ---------- Header ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; border-radius: 7px; }
.wordmark {
  font-family: var(--mono); /* taste-skill-ignore: the PEPTIDLY wordmark is JetBrains Mono by brand rule */
  font-weight: 700;
  font-size: var(--step-xs);
  letter-spacing: 4px;
}
.brand:hover { color: var(--ink); }
.top-nav { display: flex; gap: clamp(16px, 2.4vw, 36px); margin-left: auto; }
.top-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: var(--step-xs);
  font-weight: 500;
  padding: 10px 2px;
  transition: color 160ms ease;
}
.top-nav a:hover { color: var(--ink); }

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

.hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  align-items: center;
  padding-top: clamp(32px, 6vh, 72px);
  padding-bottom: var(--section);
  min-height: min(940px, calc(100svh - 72px));
}
.hero-copy { grid-column: 1 / span 6; }
.hero h1 {
  font-size: var(--step-xl);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.payoff { display: block; color: var(--accent); }
.lead {
  margin-top: 32px;
  max-width: 40ch;
  color: var(--muted);
  font-size: var(--step-s);
  line-height: 1.5;
}
.actions { margin-top: 40px; }
.meta {
  margin-top: 14px;
  color: var(--muted);
  font-size: var(--step-xs);
}

.hero-stage { grid-column: 7 / span 6; }
.stage-note {
  margin-top: 20px;
  margin-left: calc(var(--vial-w) + 28px);
  max-width: 44ch;
  color: var(--muted);
  font-size: var(--step-xs);
  line-height: 1.5;
}

/* ---------- The instrument (data-ui: the app's own conventions) ---------- */

[data-ui].instrument {
  display: grid;
  grid-template-columns: var(--vial-w) minmax(0, 1fr);
  column-gap: 28px;
  align-items: end;
}
.hero-stage { --vial-w: clamp(118px, 11vw, 158px); }
[data-ui] .vial-wrap { padding-bottom: 6px; }
[data-ui] .vial { width: 100%; height: auto; overflow: visible; color: var(--accent); }
[data-ui] .vial .liquid {
  transform: translateY(128px); /* the calculator's starting water in a 3 ml vial */
  transition: transform 900ms cubic-bezier(0.215, 0.61, 0.355, 1);
}
@starting-style {
  [data-ui] .vial .liquid { transform: translateY(292px); }
}
/* home.js redraws the surface and the bubbles each frame, as the app does. Still bubbles would read as
   specks in the liquid, so they show only while it moves (the app hides them for the same reason). */
[data-ui] .vial .bubbles { display: none; }
[data-ui] .vial.is-moving .bubbles { display: inline; }
[data-ui] .vial .bubbles circle { fill: #fff; opacity: 0.25; }
[data-ui] .vial .ring {
  fill: none;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
[data-ui] .vial .ring-a { stroke: #fff; }
[data-ui] .vial .ring-b { stroke: var(--accent); stroke-width: 1.5; }
/* The app's vial: the white ring grows to r 50 over 1.1 s, the teal one to r 30 over 0.9 s, 0.15 s later. */
[data-ui] .vial .ring-a { --r: 50; --o: 0.9; }
[data-ui] .vial .ring-b { --r: 30; --o: 0.7; }
[data-ui] .vial .ripple.go .ring-a { animation: ring 1.1s cubic-bezier(0.215, 0.61, 0.355, 1) forwards; }
[data-ui] .vial .ripple.go .ring-b { animation: ring 0.9s 0.15s cubic-bezier(0.215, 0.61, 0.355, 1) forwards; }
@keyframes ring {
  0% { transform: scale(0); opacity: var(--o); }
  100% { transform: scale(var(--r)); opacity: 0; }
}
[data-ui] .vial-label { font-variant-numeric: tabular-nums; }
[data-ui] .vial-motion {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 8px auto 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, transform 140ms var(--ease-out);
}
[data-ui] .vial-motion:active { transform: scale(0.95); }
[data-ui] .vial-motion[hidden] { display: none; }
@media (max-width: 699px) { [data-ui] .vial-motion { width: 44px; height: 44px; } }
[data-ui] .vial-motion svg { fill: currentColor; }
[data-ui] .vial-motion .i-play,
[data-ui] .vial-motion.is-paused .i-pause { display: none; }
[data-ui] .vial-motion.is-paused .i-play { display: inline; }
@media (hover: hover) and (pointer: fine) {
  [data-ui] .vial-motion:hover { color: var(--ink); border-color: var(--muted); }
}

[data-ui] .calc { display: grid; gap: 16px; min-width: 0; }
[data-ui] .calc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 14px;
  min-width: 0;
}
[data-ui] .field { display: block; min-width: 0; cursor: text; }
[data-ui] .field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
[data-ui] .field-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--mute);
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 0;
  transition: border-color 160ms ease;
}
[data-ui] .field-box.wants { border-color: var(--accent); }
[data-ui] .field-box:focus-within { border-color: var(--accent); }
[data-ui] .field-icon { width: 18px; height: 18px; flex: none; color: var(--accent); }
[data-ui] .field-icon.lav { color: var(--lav); }
[data-ui] .field input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  font-family: var(--mono); /* taste-skill-ignore: app UI inside [data-ui] */
  font-size: 15px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
[data-ui] .field input::placeholder { color: var(--muted); }
[data-ui] .field-box:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -1px; }
[data-ui] .unit { font-family: var(--mono); font-size: 13px; color: var(--muted); } /* taste-skill-ignore: app UI inside [data-ui] */

[data-ui] .draw {
  position: relative;
  border-radius: 20px;
  border: 1px solid var(--teal-line);
  background: linear-gradient(135deg, var(--teal-soft), var(--card-hi)); /* taste-skill-ignore: app UI inside [data-ui] */
  box-shadow: 0 8px 32px rgba(0, 180, 216, 0.15); /* taste-skill-ignore: app UI inside [data-ui] */
  padding: 20px;
}
[data-ui] .draw-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
/* The invite and the figure share one cell, so typing a dose never moves the page. */
[data-ui] .draw-main { min-width: 0; display: grid; }
[data-ui] .readout .is-empty { visibility: hidden; }
[data-ui] .draw-figure { grid-area: 2 / 1; }
[data-ui] .draw-cap { grid-area: 3 / 1; }
[data-ui] .draw-eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
[data-ui] .draw-figure { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
[data-ui] .draw-num {
  font-family: var(--mono); /* taste-skill-ignore: app UI inside [data-ui] */
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -2px;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
[data-ui] .draw-num.is-empty { color: var(--muted); }
[data-ui] .draw-num.len-4 { font-size: 48px; }
[data-ui] .draw-num.len-5 { font-size: 40px; }
[data-ui] .draw-num.len-6 { font-size: 32px; }
[data-ui] .draw-iu { font-family: var(--mono); font-weight: 600; font-size: 20px; color: var(--accent); } /* taste-skill-ignore: app UI inside [data-ui] */
[data-ui] .draw-cap { margin-top: 6px; font-family: var(--mono); font-size: 12px; color: var(--muted); } /* taste-skill-ignore: app UI inside [data-ui] */
[data-ui] .draw-invite { grid-area: 2 / 1 / 4; visibility: hidden; max-width: 22ch; font-size: 22px; font-weight: 600; line-height: 1.3; color: var(--ink); }
[data-ui] .draw.is-waiting .draw-invite { visibility: visible; }
[data-ui] .draw.is-waiting .draw-figure,
[data-ui] .draw.is-waiting .draw-cap,
[data-ui] .draw.is-waiting .barrel-chip { visibility: hidden; }
[data-ui] .barrel-chip {
  flex: none;
  min-width: 64px;
  display: grid;
  justify-items: end;
  gap: 2px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--teal-line);
  border-radius: 12px;
  padding: 8px 12px;
}
[data-ui] .barrel-label { font-family: var(--mono); font-weight: 600; font-size: 11px; letter-spacing: 1px; color: var(--muted); } /* taste-skill-ignore: app UI inside [data-ui] */
[data-ui] .barrel-pct { font-family: var(--mono); font-weight: 700; font-size: 18px; color: var(--accent); } /* taste-skill-ignore: app UI inside [data-ui] */

[data-ui] .syr { margin-top: 4px; }
[data-ui] .syr-ticks {
  display: flex;
  justify-content: space-between;
  padding: 0 18px 0 28px;
  margin-bottom: 4px;
  font-family: var(--mono); /* taste-skill-ignore: app UI inside [data-ui] */
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}
[data-ui] .syr-ticks .on { color: var(--accent); font-weight: 700; }
[data-ui] .syr-body { display: flex; align-items: center; height: 28px; }
[data-ui] .syr-plunger {
  width: 18px;
  height: 22px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 4px 2px 2px 4px;
  background: linear-gradient(#3a4a64, #1f2d44); /* taste-skill-ignore: app UI inside [data-ui] */
  position: relative;
  z-index: 2;
}
[data-ui] .syr-barrel {
  position: relative;
  flex: 1;
  height: 18px;
  background: var(--bg-deep);
  border-block: 1px solid var(--line);
  overflow: hidden;
}
[data-ui] .syr-mark { position: absolute; top: 4px; bottom: 4px; width: 1px; background: rgba(255, 255, 255, 0.12); }
[data-ui] .syr-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 0;
  background: linear-gradient(270deg, var(--accent), var(--accent-hover)); /* taste-skill-ignore: app UI inside [data-ui] */
  border-left: 2px solid #fff;
  transition: width 520ms var(--ease-out);
}
[data-ui] .syr-fill.empty { border-left-width: 0; }
[data-ui] .syr-hub {
  width: 12px;
  height: 14px;
  background: linear-gradient(#4a5a74, #2a3a54); /* taste-skill-ignore: app UI inside [data-ui] */
  clip-path: polygon(0 0, 100% 30%, 100% 70%, 0 100%);
}
[data-ui] .syr-needle { width: 22px; height: 2px; background: linear-gradient(90deg, #4a5a74, #2a3a54); } /* taste-skill-ignore: app UI inside [data-ui] */

[data-ui] .readout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}
[data-ui] .readout dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
[data-ui] .readout dd {
  margin-top: 4px;
  font-family: var(--mono); /* taste-skill-ignore: app UI inside [data-ui] */
  font-weight: 700;
  font-size: 20px;
  color: var(--lav);
  font-variant-numeric: tabular-nums;
}
[data-ui] .readout dd small { margin-left: 3px; font-size: 11px; font-weight: 400; color: var(--muted); }
[data-ui] .readout div:last-child dd { color: var(--ink); }

/* ---------- Section headings shared ---------- */

h2 {
  font-size: var(--step-l);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.section-lead {
  margin-top: 24px;
  max-width: 46ch;
  color: var(--muted);
  font-size: var(--step-s);
}

/* ---------- The loop (three statements switch one Home screen) ---------- */

.loop {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  align-items: center;
  padding-bottom: var(--section);
}
.loop-text { grid-column: 1 / span 5; }
.steps { display: grid; gap: 8px; margin: 40px 0 0; padding: 0; list-style: none; max-width: 32rem; }
.step {
  position: relative;
  padding: 20px 24px;
  border-radius: var(--radius);
  transition: background-color 200ms ease;
}
.step h3 {
  font-size: var(--step-m);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--muted);
  text-wrap: balance;
  transition: color 200ms ease;
}
.step p { margin-top: 10px; font-size: var(--step-s); color: var(--muted); transition: color 200ms ease; }
.step.is-active { background: var(--surface); }
.step.is-active h3,
.step.is-active p,
.step:hover h3 { color: var(--ink); }
/* The button is the heading's text; its ::after spreads the click target over the whole step. */
.step-btn {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
}
.step-btn::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.loop-stage {
  grid-column: 7 / span 6;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.stage-caption {
  width: 406px;
  max-width: 100%;
  margin-top: 14px;
  text-align: center;
  text-wrap: balance;
  font-size: 13.5px;
  color: var(--muted);
}
[data-ui] .amt { white-space: nowrap; }

/* phone (data-ui) */
[data-ui].phone {
  position: relative;
  width: 406px;
  max-width: 100%;
  border-radius: 44px;
  background: var(--bg);
  border: 8px solid var(--bg-deep);
  outline: 1px solid var(--line-hi);
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
}
[data-ui] .screen { padding: 22px 16px 16px; }
[data-ui] .home-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
[data-ui] .hello { color: var(--muted); font-size: 13px; }
[data-ui] .hello-name { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; color: var(--ink); }
[data-ui] .home-icons { display: flex; gap: 8px; align-items: center; }
[data-ui] .round-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink);
}
[data-ui] .round-btn svg { width: 18px; height: 18px; }
[data-ui] .avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  position: relative;
}
[data-ui] .avatar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
  border: 2px solid var(--bg);
}

[data-ui] .nudge {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 14px;
  max-height: 0;
  opacity: 0;
  border-radius: 13px;
  background: rgba(242, 177, 85, 0.1);
  border: 1px solid rgba(242, 177, 85, 0.55);
  overflow: hidden;
  transition: max-height 200ms var(--ease-out), opacity 160ms ease, margin 200ms var(--ease-out), padding 200ms var(--ease-out);
}
[data-ui] .nudge-dot { width: 8px; height: 8px; border-radius: 4px; background: var(--amber); flex: none; }
[data-ui] .nudge-text { flex: 1; min-width: 0; display: grid; }
[data-ui] .nudge-title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
[data-ui] .nudge-sub { margin-top: 2px; font-family: var(--mono); font-size: 11px; color: var(--amber); } /* taste-skill-ignore: app UI inside [data-ui] */
[data-ui] .nudge-chev { width: 16px; height: 16px; color: var(--amber); flex: none; }
[data-ui].phone[data-state="3"] .nudge { max-height: 80px; opacity: 1; margin-bottom: 14px; padding: 12px 14px; transition-duration: 300ms, 240ms, 300ms, 300ms; }

[data-ui] .cycle-card {
  position: relative;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--card-hi), var(--card)); /* taste-skill-ignore: app UI inside [data-ui] */
  padding: 18px;
}
[data-ui] .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
[data-ui] .chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
}
[data-ui] .chip-teal { background: var(--teal-soft); color: var(--accent-hover); }
[data-ui] .chip-teal i { width: 6px; height: 6px; border-radius: 9px; background: var(--accent); }
[data-ui] .chip-soft { background: rgba(255, 255, 255, 0.06); color: var(--muted); font-family: var(--mono); } /* taste-skill-ignore: app UI inside [data-ui] */
[data-ui] .chip-faint { background: rgba(255, 255, 255, 0.03); color: var(--muted); }
[data-ui] .cycle-name { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; color: var(--ink); }
[data-ui] .cycle-left { margin-top: 4px; color: var(--muted); font-size: 14px; }
[data-ui] .cycle-left b { color: var(--ink); font-weight: 700; }
[data-ui] .bar { margin-top: 16px; height: 8px; border-radius: 9px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
[data-ui] .bar span { display: block; height: 100%; border-radius: 9px; background: var(--accent); }
[data-ui] .cycle-dates {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-family: var(--mono); /* taste-skill-ignore: app UI inside [data-ui] */
  font-size: 11px;
  color: var(--muted);
}
[data-ui] .cycle-dates .teal { color: var(--accent); font-weight: 600; }
[data-ui] .open-cycle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 11px 18px 11px 14px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 14px;
}
[data-ui] .open-cycle svg { width: 16px; height: 16px; }

[data-ui] .next-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--teal-line);
}
[data-ui] .next-icon {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 13px;
  background: rgba(0, 180, 216, 0.12);
  border: 1px solid var(--teal-line);
  display: grid;
  place-items: center;
  color: var(--accent);
}
[data-ui] .next-icon svg { width: 22px; height: 22px; }
[data-ui] .next-text { flex: 1; min-width: 0; }
[data-ui] .next-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 1px; color: var(--muted); }
[data-ui] .next-title { margin-top: 2px; font-size: 15px; font-weight: 600; color: var(--ink); }
[data-ui] .next-when { margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--accent); }
[data-ui] .next-log {
  flex: none;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}
/* "You can press this": a green ring (the colour a dose turns once it is Taken) leaves each control the
   visitor can use in the replicas. Two rings, under 5 s a burst (WCAG 2.2.2); home.js re-runs a burst when
   the screen comes back into view, at most three per visit, and stops for good once the visitor has used it. */
[data-ui].phone:not(.tried) .row-log.pulse,
[data-ui] .field-box.wants.pulse { animation: tap-ring 2.2s ease-out 2; animation-delay: var(--pulse-delay, 0s); }
@keyframes tap-ring {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); } /* taste-skill-ignore: app UI inside [data-ui] */
  70% { box-shadow: 0 0 0 12px rgba(74, 222, 128, 0); } /* taste-skill-ignore: app UI inside [data-ui] */
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } /* taste-skill-ignore: app UI inside [data-ui] */
}
/* The same hint in words, above the next Log only, until the visitor has logged once. No motion, so it
   stays under reduced motion too. */
[data-ui] .try-tag {
  display: none;
  position: absolute;
  top: 10px;
  right: 14px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.12);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  pointer-events: none;
}
[data-ui].phone:not(.tried) .dose-row.is-next .try-tag { display: block; }
[data-ui] .next-card.all-done .next-log { visibility: hidden; }

[data-ui] .today-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 4px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: var(--muted);
}
[data-ui] .today-link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); letter-spacing: 0; font-size: 13px; }
[data-ui] .today-link svg { width: 14px; height: 14px; }

[data-ui] .dose-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 14px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  transition: border-color 400ms ease;
}
[data-ui] .dose-row.just { border-color: var(--teal-line); }
[data-ui] .mini-vial { width: 22px; height: 54px; flex: none; color: var(--accent); }
[data-ui] .mini-vial.lav { color: var(--lav); }
[data-ui] .mini-fill { fill: currentColor; opacity: 0.85; transition: y 700ms var(--ease-out), height 700ms var(--ease-out); }
[data-ui] .dose-text { flex: 1; min-width: 0; }
[data-ui] .dose-name { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--ink); }
[data-ui] .tick { width: 15px; height: 15px; color: var(--green); display: none; }
[data-ui] .dose-meta { margin-top: 3px; font-size: 12px; color: var(--muted); }
[data-ui] .dose-meta i { font-style: normal; color: var(--faint); margin: 0 3px; }
[data-ui] .dose-meta em { font-style: normal; color: var(--green); font-weight: 600; }
[data-ui] .taken-meta { display: none; }
[data-ui] .dose-draw { margin-top: 3px; font-size: 12px; font-weight: 600; color: var(--accent); }
/* A masked amount: stand-in digits blurred inside a frosted chip, the unit beside it left sharp. The digits
   come from data-d through CSS, so without styles (reader view, crawlers) the chip is empty, not a figure. */
.mask {
  display: inline-block;
  padding: 0 4px;
  border-radius: 5px;
  background: rgba(169, 184, 204, 0.12);
  color: transparent;
  text-shadow: 0 0 6px var(--mask-ink, var(--muted)); /* taste-skill-ignore: the blur that masks a dose, not a shadow */
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  user-select: none;
  forced-color-adjust: none;
}
.mask::before { content: attr(data-d); }
[data-ui] .next-title .mask, [data-ui] .nudge-title .mask { --mask-ink: var(--ink); }
[data-ui] .dose-draw .mask { --mask-ink: var(--accent); background: rgba(0, 180, 216, 0.12); }
[data-ui] .dose-site { display: flex; align-items: center; gap: 5px; margin-top: 7px; font-size: 12px; font-weight: 600; color: var(--muted); }
[data-ui] .dose-site svg { width: 12px; height: 12px; color: var(--accent); }
[data-ui] .dose-site span { color: var(--accent); }
[data-ui] .row-log {
  flex: none;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 11px;
  background: var(--teal-soft);
  border: 1px solid var(--teal-line);
  color: var(--accent-hover);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color 160ms ease;
}
[data-ui] .row-log:hover { background: rgba(0, 180, 216, 0.24); }
[data-ui] .row-log:active { transform: scale(0.95); }
[data-ui] .row-done {
  display: none;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.12);
  color: var(--green);
  place-items: center;
}
[data-ui] .row-done svg { width: 19px; height: 19px; }
[data-ui] .dose-row.taken .tick { display: block; }
[data-ui] .dose-row.taken .taken-meta { display: inline; }
[data-ui] .dose-row.taken .dose-site { display: none; }
[data-ui] .dose-row.taken .row-log { display: none; }
[data-ui] .dose-row.taken .row-done { display: grid; animation: pop 300ms var(--ease-out); }
@keyframes pop { 0% { transform: scale(0.85); opacity: 0; } 60% { transform: scale(1.03); opacity: 1; } 100% { transform: scale(1); } }

[data-ui] .tabbar {
  display: flex;
  justify-content: space-around;
  padding: 10px 6px 16px;
  background: var(--bg);
  border-top: 1px solid var(--line);
}
[data-ui] .tab { display: grid; justify-items: center; gap: 4px; font-size: 11px; color: var(--lav); }
[data-ui] .tab svg { width: 22px; height: 22px; }
[data-ui] .tab.on { color: var(--accent); }

/* ---------- Cycles: panel with margin notes ---------- */

.cycles { padding-bottom: clamp(96px, 10vw, 150px); }
.plate {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  margin-top: 64px;
}
.notes { position: relative; }
.notes-left { grid-column: 1 / span 4; text-align: right; }
.notes-right { grid-column: 9 / span 4; }
.note {
  position: absolute;
  top: var(--top);
  width: 100%;
  max-width: 24ch;
  padding: 6px 0;
}
.notes-left .note { right: 0; }
.note h3 { font-size: var(--step-s); font-weight: 600; color: var(--ink); line-height: 1.3; }
.note p { margin-top: 4px; font-size: var(--step-xs); color: var(--muted); line-height: 1.45; }
.note::before {
  content: "";
  position: absolute;
  top: 17px;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 200ms ease;
}
.notes-left .note::before { right: -34px; }
.notes-right .note::before { left: -34px; }
.note.is-on::before { opacity: 1; }

[data-ui].sheet {
  grid-column: 5 / span 4;
  justify-self: center;
  width: 100%;
  max-width: 380px;
  padding: 16px;
  border-radius: 28px;
  background: var(--bg);
  outline: 1px solid var(--line-hi);
  font-size: 14px;
  line-height: 1.35;
}
[data-ui].sheet .is-target { box-shadow: 0 0 0 2px var(--accent); } /* taste-skill-ignore: app UI inside [data-ui] */
[data-ui] .p-card {
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 16px;
  transition: box-shadow 200ms ease;
}
[data-ui] .p-toggle, [data-ui] .p-row { display: flex; align-items: center; gap: 14px; justify-content: space-between; }
[data-ui] .p-title { font-size: 15px; font-weight: 600; color: var(--ink); }
[data-ui] .p-sub { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
[data-ui] .switch {
  flex: none;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  position: relative;
}
[data-ui] .switch i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 999px; background: #6F8299; }
[data-ui] .switch.on { background: var(--teal-soft); border-color: var(--teal-line); }
[data-ui] .switch.on i { left: 21px; background: var(--accent); }
[data-ui] .p-eyebrow {
  margin: 22px 4px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: var(--muted);
}
[data-ui] .p-eyebrow.tight { margin: 0 0 4px; }
[data-ui] .p-chips { display: flex; flex-wrap: wrap; gap: 8px; border-radius: 14px; transition: box-shadow 200ms ease; }
[data-ui] .p-chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
[data-ui] .p-chip.dark { background: var(--bg-deep); }
[data-ui] .p-chip.on { color: var(--accent-hover); background: var(--teal-soft); border-color: var(--accent); }
[data-ui] .p-row { margin-top: 16px; border-radius: 12px; transition: box-shadow 200ms ease; }
[data-ui] .p-times { display: flex; gap: 8px; margin-top: 14px; border-radius: 12px; transition: box-shadow 200ms ease; }
[data-ui] .p-time {
  min-width: 82px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  font-family: var(--mono); /* taste-skill-ignore: app UI inside [data-ui] */
  font-size: 15px;
  text-align: center;
  color: var(--ink);
}
[data-ui] .p-time.add { min-width: 48px; border-style: dashed; border-color: var(--line-hi); color: var(--muted); font-family: var(--sans); }
[data-ui] .p-window { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
[data-ui] .p-window svg { width: 20px; height: 20px; color: var(--mute); flex: none; }
[data-ui] .p-window > div { flex: 1; }
[data-ui] .p-window .p-chev { color: var(--muted); }
[data-ui] .p-value { font-size: 15px; color: var(--ink); }
[data-ui] .p-field { background: var(--bg-deep); border-radius: 14px; padding: 12px 14px; }
[data-ui] .p-field-row { display: flex; justify-content: space-between; align-items: baseline; }
[data-ui] .p-num { font-family: var(--mono); font-size: 18px; color: var(--ink); } /* taste-skill-ignore: app UI inside [data-ui] */
[data-ui] .p-unit { font-family: var(--mono); font-size: 13px; color: var(--muted); } /* taste-skill-ignore: app UI inside [data-ui] */

/* ---------- Privacy: two-ended rows ---------- */

.privacy { background: var(--bg-deep); padding-block: clamp(96px, 10vw, 150px); }
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  align-items: start;
}
.privacy-head { grid-column: 1 / span 5; position: sticky; top: 96px; }
.facts { grid-column: 7 / span 6; }
.facts-group {
  font-size: var(--step-xs);
  font-weight: 600;
  color: var(--muted);
  margin: 40px 0 8px;
}
.facts-group:first-child { margin-top: 0; }
.facts-rows > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  min-height: 46px;
  padding-block: 10px;
}
.facts-rows dt {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex: none;
  font-size: var(--step-s);
  font-weight: 600;
  color: var(--ink);
}
.facts-rows dt::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--accent);
  flex: none;
  transform: translateY(-1px);
}
.facts-rows dd { text-align: right; font-size: var(--step-xs); color: var(--muted); max-width: 34ch; }

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

.faq { padding-block: var(--section); }
.faq-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  align-items: start;
}
.faq h2 { grid-column: 1 / span 4; position: sticky; top: 96px; }
.faq-list { grid-column: 5 / span 8; display: grid; gap: 8px; }
.faq details {
  border-radius: var(--radius);
  background: var(--surface);
  transition: background-color 240ms ease, color 240ms ease;
}
.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 20px 24px;
  font-size: var(--step-s);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  cursor: pointer;
  border-radius: var(--radius);
}
.faq summary::-webkit-details-marker { display: none; }
.pm { position: relative; width: 16px; height: 16px; flex: none; }
.pm::before,
.pm::after {
  content: "";
  position: absolute;
  left: 0;
  top: 6.5px;
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 240ms var(--ease-out);
}
.pm::after { transform: rotate(90deg); }
.faq details[open] { background: var(--card-hi); }
.faq details[open] .pm { color: var(--accent); }
.faq details[open] .pm::after { transform: rotate(0deg); }
.faq summary:hover { color: var(--accent-hover); }
.answer { padding: 0 24px 24px; }
.answer p { max-width: 52ch; font-size: var(--step-s); line-height: 1.55; color: var(--ink); }
.answer a { font-weight: 700; }

/* ---------- CTA field ---------- */

.cta { background: var(--accent); color: var(--on-accent); }
.cta-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  align-items: center;
  min-height: min(90svh, 860px);
  padding-block: clamp(80px, 10vw, 140px);
}
.cta-copy { grid-column: 1 / span 6; }
.cta h2 { font-size: var(--step-xl); line-height: 0.98; letter-spacing: -0.035em; max-width: 12ch; }
.cta-copy p { margin-top: 24px; max-width: 34ch; font-size: var(--step-s); font-weight: 500; }
.cta .play { margin-top: 32px; }
.cta a:hover { color: var(--on-accent); }

[data-ui].welcome {
  grid-column: 7 / span 4;
  justify-self: start;
  width: 100%;
  max-width: 380px;
  border-radius: 32px;
  background: var(--bg);
  color: var(--ink);
  padding: 28px 20px 36px;
}
[data-ui] .welcome-body { display: grid; justify-items: center; text-align: center; padding: 44px 0 20px; }
[data-ui] .welcome-icon {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background: rgba(0, 180, 216, 0.1);
  border: 1px solid var(--teal-line);
  display: grid;
  place-items: center;
  color: var(--accent);
}
[data-ui] .welcome-icon svg { width: 44px; height: 44px; }
[data-ui] .welcome-title { margin-top: 20px; font-size: 22px; font-weight: 600; }
[data-ui] .welcome-sub { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.5; }
[data-ui] .welcome-btn {
  margin-top: 24px;
  padding: 14px 28px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 15px;
}

/* ---------- Footer: one quiet band after the close ---------- */

.foot { padding-block: 56px 32px; }
.foot-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 28px;
  align-items: start;
}
.foot-statement { grid-column: span 6; }
.foot-brand { display: flex; width: fit-content; margin-bottom: 20px; }
.foot-statement p:first-of-type { font-size: var(--step-s); font-weight: 600; line-height: 1.4; color: var(--ink); max-width: 44ch; }
.foot-statement .small { margin-top: 10px; max-width: 52ch; }
.foot-nav { grid-column: span 3; display: flex; flex-direction: column; gap: 4px; }
.foot-mail { grid-column: span 3; }
.small { font-size: var(--step-xs); color: var(--muted); line-height: 1.45; }
.foot-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: var(--step-xs);
  padding: 6px 0;
  transition: color 160ms ease;
}
.foot-nav a:hover { color: var(--accent); }
.count-toggle {
  align-self: flex-start;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: var(--step-xs);
  text-align: left;
  cursor: pointer;
  transition: color 160ms ease;
}
.count-toggle:hover { color: var(--accent); }
.foot-mail a { display: inline-block; margin-top: 6px; font-size: var(--step-xs); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.legal { margin-top: 20px; font-size: var(--step-xs); color: var(--muted); text-align: center; }

/* ---------- Entrances (only when script runs) ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 50ms);
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- Reminders (a lock screen beside the app's own timing setting) ---------- */

.reminders,
.sites {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  align-items: center;
  padding-bottom: var(--section);
}
.lock-stage { grid-column: 1 / span 6; grid-row: 1 / span 2; display: flex; justify-content: center; }
.reminders-text { grid-column: 8 / span 5; grid-row: 1; align-self: end; }
.reminders-facts { grid-column: 8 / span 5; grid-row: 2; align-self: start; }
.facts-list { margin: 32px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; max-width: 34rem; }
.facts-list li { position: relative; padding-left: 22px; font-size: var(--step-xs); color: var(--muted); line-height: 1.5; }
.facts-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

[data-ui].lock {
  position: relative;
  width: 380px;
  max-width: 100%;
  min-height: 540px;
  padding: 56px 16px 22px;
  border-radius: 40px;
  border: 8px solid var(--bg-deep);
  outline: 1px solid var(--line-hi);
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(0, 180, 216, 0.16), transparent 60%), /* taste-skill-ignore: app UI inside [data-ui] */
    linear-gradient(180deg, #10233A, #0A1626); /* taste-skill-ignore: app UI inside [data-ui] */
  text-align: center;
}
[data-ui] .lock-time {
  font-size: 64px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
[data-ui] .lock-date { margin-top: 8px; font-size: 14px; color: var(--muted); }
[data-ui] .notifs { margin: 36px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; text-align: left; }
[data-ui] .notif {
  padding: 12px 14px 13px;
  border-radius: 22px;
  background: rgba(22, 39, 61, 0.92);
  border: 1px solid var(--line-hi);
}
[data-ui] .notif-head { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
[data-ui] .notif-head img { width: 18px; height: 18px; border-radius: 5px; }
[data-ui] .notif-head i { font-style: normal; color: var(--faint); }
[data-ui] .notif-title { margin-top: 8px; font-size: 14.5px; font-weight: 700; color: var(--ink); }
[data-ui] .notif-body { margin-top: 2px; font-size: 14px; color: var(--muted); }
[data-ui] .notif-body .mask { --mask-ink: var(--muted); }
/* A fresh reminder lands: the card drops in from above, the way Android shows a new notification. */
.js [data-ui] .notif.pending { opacity: 0; }
.js [data-ui] .notif.arrive { animation: notif-in 420ms var(--ease-out) both; animation-delay: var(--notif-delay, 0s); }
.js [data-ui] .notif.arrive.again { animation-duration: 300ms; animation-name: notif-again; }
@keyframes notif-in { from { opacity: 0; transform: translateY(-14px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes notif-again { from { opacity: 0.4; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

.timing { margin-top: 32px; }
.timing-try { margin-bottom: 20px; font-size: var(--step-xs); color: var(--muted); }
.timing-label { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: var(--muted); }
.timing-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
[data-ui] .t-chip {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-hi);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 140ms var(--ease-out);
}
[data-ui] .t-chip[aria-checked="true"] { background: var(--teal-soft); border-color: var(--accent); color: var(--accent-hover); }
[data-ui] .t-chip:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  [data-ui] .t-chip:hover { color: var(--ink); }
}

/* ---------- Site rotation (the dose screen's body picker) ---------- */

.sites-text { grid-column: 1 / span 5; }
.picker-stage { grid-column: 7 / span 6; display: flex; flex-direction: column; align-items: center; }
.picker-stage .stage-caption { width: 400px; max-width: 100%; }
[data-ui].picker {
  width: 400px;
  max-width: 100%;
  padding: 22px 20px 24px;
  border-radius: 28px;
  background: var(--bg);
  border: 1px solid var(--line-hi);
  text-align: center;
}
[data-ui] .view-toggle { display: flex; justify-content: center; gap: 10px; }
[data-ui] .view-toggle[hidden] { display: none; }
[data-ui] .v-chip {
  min-height: 40px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid var(--line-hi);
  background: transparent;
  color: var(--muted);
  font-family: var(--mono); /* taste-skill-ignore: app UI inside [data-ui] */
  font-size: 13px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 140ms var(--ease-out);
}
[data-ui] .v-chip:active { transform: scale(0.97); }
[data-ui] .v-chip[aria-checked="true"] { background: rgba(0, 180, 216, 0.18); border-color: var(--teal-line); color: var(--accent); }
[data-ui] .map-box { margin: 12px auto 0; max-width: 340px; }
[data-ui] .body-map { display: block; width: 100%; height: auto; }
[data-ui] .body-map[hidden] { display: none; }
[data-ui] .body-map .crop path { fill: none; stroke: var(--faint); stroke-width: 1.5; }
[data-ui] .body-map .navel { fill: #0D1B2A; stroke: var(--faint); stroke-width: 1.4; }
[data-ui] .body-map .side { font-family: var(--mono); font-size: 11px; font-weight: 500; fill: var(--muted); } /* taste-skill-ignore: app UI inside [data-ui] */
/* Zone states and colours are the app's (its body map, the strict rule). */
[data-ui] .zone > rect { fill: rgba(255, 255, 255, 0.05); stroke: rgba(255, 255, 255, 0.13); stroke-width: 1; transition: fill 160ms ease, stroke 160ms ease; }
[data-ui] .zone[data-state="resting"] > rect { fill: rgba(242, 177, 85, 0.16); stroke: rgba(242, 177, 85, 0.5); }
[data-ui] .zone[data-state="suggested"] > rect { fill: rgba(0, 180, 216, 0.14); stroke: rgba(0, 180, 216, 0.65); }
[data-ui] .zone[data-state="selected"] > rect { fill: rgba(0, 180, 216, 0.26); stroke: var(--accent); stroke-width: 1.6; }
[data-ui] .zone[data-state="selWarn"] > rect { fill: rgba(242, 177, 85, 0.24); stroke: var(--amber); stroke-width: 1.6; }
[data-ui] .zone[data-state="off"] > rect { fill: transparent; stroke: rgba(255, 255, 255, 0.07); stroke-dasharray: 3 3; }
[data-ui] .zone[data-state="off"] { cursor: default; pointer-events: none; }
[data-ui] .zone { cursor: pointer; outline: none; }
[data-ui] .zone:focus-visible > rect { stroke: var(--ink); stroke-width: 2; }
@media (hover: hover) and (pointer: fine) {
  /* Not on the picked area: its teal or amber outline is the answer, so hover must not cover it. */
  [data-ui] .zone:not([data-state="selected"]):not([data-state="selWarn"]):not(:focus-visible):hover > rect { stroke: rgba(255, 255, 255, 0.4); }
}
[data-ui] .zone .badge { display: none; pointer-events: none; }
[data-ui] .zone.is-next .badge { display: inline; }
[data-ui] .badge rect { fill: #0D2431; stroke: rgba(0, 180, 216, 0.55); stroke-width: 1; }
[data-ui] .badge text { font-size: 7.5px; font-weight: 700; letter-spacing: 0.8px; fill: var(--accent); }
[data-ui] .pick-label { margin-top: 10px; font-size: 18px; font-weight: 600; color: var(--accent); }
[data-ui] .pick-label.warn { color: var(--amber); }
[data-ui] .pick-warn { margin: 12px auto 0; max-width: 30ch; font-size: 13px; color: var(--amber); }
[data-ui] .pick-warn-slot { display: grid; }
[data-ui] .pick-warn-slot > * { grid-area: 1 / 1; }
[data-ui] .pick-warn-sizer { visibility: hidden; }
[data-ui] .pick-hint { margin-top: 8px; font-size: 13px; color: var(--muted); }
[data-ui] .pick-steer { margin-top: 14px; font-family: var(--mono); font-size: 12px; color: var(--muted); text-wrap: balance; } /* taste-skill-ignore: app UI inside [data-ui] */

/* ---------- Calculator page (/peptide-calculator) ---------- */

.top-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.stage-link { margin-left: calc(var(--vial-w) + 28px); margin-top: 16px; font-size: var(--step-xs); }

.maths { padding-bottom: var(--section); }
.maths-grid, .units-grid, .close-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  align-items: start;
}
.maths-head, .units-head { grid-column: 1 / span 4; position: sticky; top: 96px; }

/* The three steps: one tonal row each, the visitor's numbers set in the app's mono. */
.formula { grid-column: 5 / span 8; display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.formula li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  column-gap: 20px;
  padding: 24px 28px;
  border-radius: var(--radius);
  background: var(--surface);
}
.formula li::before {
  content: counter(step);
  grid-row: 1 / span 4;
  padding-top: 4px;
  color: var(--muted);
  font-family: var(--mono); /* taste-skill-ignore: a step number is data */
  font-size: 14px;
  font-weight: 600;
}
.formula h3 { font-size: var(--step-m); font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; }
.formula-words { margin-top: 6px; color: var(--muted); font-size: var(--step-s); }
.formula-note { margin-top: 6px; max-width: 52ch; color: var(--muted); font-size: var(--step-xs); line-height: 1.5; }
.formula-live { margin-top: 16px; }
.f-out { color: var(--muted); font-size: var(--step-xs); }
.f-out.is-live {
  color: var(--ink);
  font-family: var(--mono); /* taste-skill-ignore: the visitor's own numbers, set as the app sets them */
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

/* Unit facts: two-ended rows, as the privacy facts on the home page. */
.unit-rows { grid-column: 5 / span 8; margin: 0; display: grid; gap: 8px; }
.unit-rows > div {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: 32px;
  align-items: baseline;
  padding: 24px 28px;
  border-radius: var(--radius);
  background: var(--surface);
}
.unit-fact {
  font-family: var(--mono); /* taste-skill-ignore: a conversion is data */
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  white-space: nowrap;
}
.unit-rows dd { margin: 0; color: var(--muted); font-size: var(--step-xs); line-height: 1.55; }

/* The close: one quiet line to the app, no second accent field. */
.calc-close { padding-block: 0 var(--section); }
.close-copy { grid-column: 1 / span 6; }
.close-copy p { margin-top: 20px; max-width: 46ch; color: var(--muted); font-size: var(--step-s); }
.close-actions { grid-column: 8 / span 5; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; align-self: end; }
.close-actions .text-link { margin-top: 8px; }

@media (max-width: 1099px) {
  .maths-head, .units-head { grid-column: 1 / -1; position: static; margin-bottom: 40px; }
  .formula, .unit-rows { grid-column: 1 / -1; }
  .close-copy { grid-column: 1 / span 7; }
  .close-actions { grid-column: 8 / span 5; }
}
@media (max-width: 699px) {
  .stage-link { margin-left: 0; }
  .formula li { padding: 20px; column-gap: 14px; grid-template-columns: 28px minmax(0, 1fr); }
  .formula li::before { font-size: 13px; }
  .unit-rows > div { grid-template-columns: 1fr; row-gap: 8px; padding: 20px; }
  .close-grid { display: block; }
  .close-actions { margin-top: 32px; }
}

/* ---------- Tablet ---------- */

@media (max-width: 1099px) {
  .top-nav { display: none; }
  .hero { min-height: 0; row-gap: 56px; }
  .hero-copy { grid-column: 1 / -1; }
  .hero h1 { font-size: clamp(40px, 7.2vw, 60px); }
  .hero-stage { grid-column: 1 / -1; width: 100%; max-width: 620px; margin-inline: auto; }
  [data-ui].instrument { align-items: center; }
  .loop-text { grid-column: 1 / span 6; }
  .loop-stage { grid-column: 7 / span 6; }
  .lock-stage { grid-column: 1 / span 6; }
  .reminders-text, .reminders-facts { grid-column: 7 / span 6; }
  .sites-text { grid-column: 1 / span 6; }
  .picker-stage { grid-column: 7 / span 6; }
  .steps { margin-top: 32px; }
  [data-ui].phone { width: 340px; }
  .plate { display: flex; flex-direction: column; }
  [data-ui].sheet { order: -1; }
  .notes { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px; text-align: left; margin-top: 32px; }
  .notes-left { margin-top: 48px; }
  .note { position: static; max-width: none; }
  .note::before { display: none; }
  [data-ui].sheet { margin-inline: auto; }
  .privacy-head { grid-column: 1 / -1; position: static; margin-bottom: 48px; }
  .facts { grid-column: 1 / -1; max-width: none; }
  .faq h2 { grid-column: 1 / -1; position: static; max-width: none; margin-bottom: 40px; }
  .faq-list { grid-column: 1 / -1; }
  .cta-copy { grid-column: 1 / span 7; }
  [data-ui].welcome { grid-column: 8 / span 5; justify-self: end; }
  .foot-statement { grid-column: span 12; }
  .foot-nav { grid-column: span 6; }
  .foot-mail { grid-column: span 6; }
}

/* ---------- Phone ---------- */

@media (max-width: 699px) {
  body { font-size: 17px; }
  .top { padding-block: 16px; }
  .btn-small { min-height: 44px; padding: 10px 18px; }
  .hero { padding-top: 24px; padding-bottom: 88px; row-gap: 48px; }
  .hero h1 { font-size: clamp(29px, 9.2vw, 40px); }
  .lead { margin-top: 24px; font-size: 18px; }
  .actions { margin-top: 32px; }
  [data-ui].instrument {
    grid-template-columns: var(--vial-w) minmax(0, 1fr);
    grid-template-areas: "vial inputs" "draw draw" "readout readout";
    column-gap: 14px;
    row-gap: 16px;
    align-items: center;
  }
  .hero-stage { --vial-w: 92px; }
  [data-ui] .calc { display: contents; }
  [data-ui] .vial-wrap { grid-area: vial; padding: 0; }
  [data-ui] .calc-card { grid-area: inputs; padding: 12px; gap: 10px; }
  [data-ui] .draw { grid-area: draw; }
  [data-ui] .readout { grid-area: readout; }
  [data-ui] .field-box { padding: 10px 12px; gap: 8px; }
  [data-ui] .field-icon { display: none; }
  .stage-note { margin-left: 0; }

  .loop { display: flex; flex-direction: column; align-items: stretch; }
  .reminders, .sites { display: flex; flex-direction: column; align-items: stretch; }
  .lock-stage, .picker-stage { margin-top: 32px; }
  .reminders-facts { margin-top: 32px; }
  [data-ui] .lock-time { font-size: 56px; }
  [data-ui].lock { min-height: 0; padding-bottom: 28px; }
  /* The figure has empty sides, so the map can run past the card's padding: that keeps the abdomen squares at
     24 px or more on a 320 px screen (WCAG 2.5.8). */
  [data-ui].picker { padding-inline: 12px; }
  [data-ui] .map-box { margin-inline: -10px; max-width: none; } /* and keeps the crop marks inside the card */
  .loop-text { display: contents; }
  .loop-text h2 { order: 0; }
  .loop-stage { align-items: center; margin: 24px 0 8px; }
  .steps { margin-top: 24px; }
  [data-ui].phone { width: 100%; max-width: 372px; }
  .stage-caption { width: 100%; max-width: 372px; }
  .step { padding: 18px 20px; }
  [data-ui] .next-icon { width: 40px; height: 40px; }
  [data-ui] .next-log { padding: 0 14px; }

  .notes { grid-template-columns: 1fr; gap: 20px; }
  [data-ui].sheet { padding: 12px; }

  .facts-rows > div { flex-direction: column; gap: 2px; min-height: 0; padding-block: 12px; }
  .facts-rows dd { text-align: left; padding-left: 22px; max-width: none; }

  .faq summary { font-size: 18px; min-height: 64px; padding: 18px 20px; }
  .answer { padding: 0 20px 20px; }
  .answer p { font-size: 16px; }

  .cta-grid { display: block; min-height: 0; padding-block: 72px; }
  .cta h2 { font-size: clamp(42px, 12vw, 52px); }
  [data-ui].welcome { margin-top: 48px; max-width: none; }

  .foot { padding-block: 40px 28px; }
  .foot-row { display: flex; flex-direction: column; gap: 24px; }
  .foot-mail a { font-size: 16px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
  [data-ui] .vial .liquid, [data-ui] .syr-fill, [data-ui] .nudge, [data-ui] .mini-fill, .js [data-reveal] { transition-duration: 1ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .play:hover, .text-link:hover svg,
  .btn:active, .play:active, [data-ui] .vial-motion:active, [data-ui] .row-log:active,
  [data-ui] .t-chip:active, [data-ui] .v-chip:active { transform: none; }
  .pm::after { transition-duration: 1ms; }
}
