/* ChicNutrix Skin Analysis. CHIC look from chicnutrix.com: pink, blush, royal blue,
   Platypi headings, square corners. The logo replaces the text wordmark when it arrives. */

@font-face {
  font-family: "Platypi";
  src: url("../fonts/platypi-latin.woff2") format("woff2");
  font-weight: 300 800;
  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: "Platypi";
  src: url("../fonts/platypi-latin-ext.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --pink: #E01B67;
  --pink-dark: #B8134F;
  --blush: #FFDCEC;
  --blush-soft: #FFF3F8;
  --blue: #334FB4;
  --ink: #1F1D24;
  --muted: #5C5866;
  --line: #E6E1E5;
  --bg: #FFFFFF;
  --ok: #1E7A45;
  --error: #B42318;
  --heading: "Platypi", Georgia, serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* [hidden] must win over any display rule below. */
[hidden] { display: none !important; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--body);
}
a { color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

h1, h2 { font-family: var(--heading); font-weight: 600; line-height: 1.2; }
h1 { font-size: 1.9rem; margin: 0.2em 0 0.5em; }
h2 { font-size: 1.25rem; margin: 1.6em 0 0.4em; }

.top {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}
.brand { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; }

.page { max-width: 560px; margin: 0 auto; padding: 20px 16px 40px; }
.steps { margin: 0; color: var(--muted); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; }
.lead { font-size: 1.1rem; }
.small, .note, .hint { color: var(--muted); font-size: 0.92rem; }
.optional { color: var(--muted); font-weight: 400; font-size: 0.9em; }

.how { padding-left: 1.3em; margin: 1.2em 0 1.6em; }
.how li { margin-bottom: 0.5em; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 2px solid var(--pink);
  border-radius: 0;
  background: var(--pink);
  color: #fff;
  font: 600 1rem var(--body);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--pink-dark); border-color: var(--pink-dark); }
.btn:disabled { background: var(--line); border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.btn-secondary { background: #fff; color: var(--pink); }
.btn-secondary:hover { background: var(--blush-soft); color: var(--pink-dark); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.actions .btn { flex: 1 1 200px; }

/* Form */
form { margin-top: 12px; }
.field { margin: 0 0 22px; padding: 0; border: 0; }
.field > label, legend { display: block; font-weight: 600; margin-bottom: 4px; padding: 0; }
.field .hint { margin: 0 0 6px; }
input[type="text"], input[type="email"], input[type="tel"] {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 2px solid #8E8A96;
  border-radius: 0;
  font: inherit;
  color: inherit;
  background: #fff;
}
.field-short input { max-width: 8em; }
.has-error input[type="text"], .has-error input[type="email"], .has-error input[type="tel"] { border-color: var(--error); }
.has-error { border-left: 4px solid var(--error); padding-left: 12px; }
.error { color: var(--error); font-weight: 600; margin: 0 0 6px; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: inline-block;
  min-height: 44px;
  padding: 10px 16px;
  border: 2px solid var(--line);
  background: #fff;
}
.choice input:checked + span { border-color: var(--pink); background: var(--blush); font-weight: 600; }
.choice input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }

.consents { margin: 28px 0 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.field > .check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; flex: none; accent-color: var(--pink); }

.error-summary { border: 3px solid var(--error); padding: 12px 16px; margin: 0 0 20px; }
.error-summary h2 { margin-top: 0; font-size: 1.1rem; }
.error-summary ul { margin: 0; padding-left: 1.2em; }
.error-summary a { color: var(--error); font-weight: 600; }

/* Photo */
.tips { padding-left: 1.2em; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.visually-hidden:focus-visible + label { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Live camera. Sized by height so Cancel stays on screen; 3:4 matches the crop in photo.mjs.
   The oval's centre (47% down) and size are what LIVE in checks.mjs measures against. */
.viewfinder {
  position: relative; background: #000; aspect-ratio: 3 / 4; overflow: hidden;
  width: min(100%, calc((100svh - 190px) * 0.75)); margin-inline: auto;
}
.viewfinder video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.oval {
  position: absolute; left: 50%; top: 47%;
  width: 62%; height: 72%;
  transform: translate(-50%, -50%);
  border: 3px dashed rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  transition: border-color 0.2s;
}
.viewfinder.ready .oval { border: 4px solid #3FCF7F; }

.pills { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pill { flex: 1 1 0; min-width: 0; padding: 5px 4px; text-align: center; line-height: 1.2; background: #5C5866; color: #fff; overflow-wrap: anywhere; }
.pill-name { display: block; font-size: 0.7rem; opacity: 0.9; }
.pill-text { display: block; font-size: clamp(0.7rem, 3.2vw, 0.85rem); font-weight: 700; }
.pill[data-state="good"] { background: var(--ok); }
.pill[data-state="ok"] { background: #F2C14E; color: var(--ink); }
.pill[data-state="bad"] { background: var(--error); }

.cue {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  margin: 0; padding: 8px 14px; max-width: 92%;
  background: rgba(31, 29, 36, 0.82); color: #fff;
  font-weight: 600; text-align: center;
  z-index: 2; /* above the capture flash, so a failed photo's reason is readable */
}
.countdown {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6); pointer-events: none;
}
.countdown-label, .countdown-number { background: rgba(31, 29, 36, 0.55); padding: 2px 14px; }
.countdown-label { font-size: 1.1rem; font-weight: 600; }
.countdown-number { font-family: var(--heading); font-size: 6rem; font-weight: 700; line-height: 1; }
/* A phone held sideways: the guide asks to turn it upright (photo.mjs never counts down). */
@media (orientation: landscape) and (max-height: 560px) {
  .viewfinder { width: min(100%, 300px); }
  .pills { display: none; }
}
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: flash 0.35s ease-out; }
@keyframes flash { from { opacity: 0.85; } to { opacity: 0; } }

/* Analysing */
.progress { height: 6px; background: var(--blush); overflow: hidden; margin: 24px 0; }
.progress span { display: block; height: 100%; width: 35%; background: var(--pink); animation: progress 1.6s ease-in-out infinite; }
@keyframes progress { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

/* Report. Bands (decision 6): Good green, Fair amber, Needs care rose; CHIC pink is never
   used for bad news. */
:root { --good: #1E7A45; --fair: #8A5A00; --fair-bg: #FBEBC0; --care: #B42318; --care-bg: #FBE3E1; --good-bg: #DDF1E4; }
.summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; margin: 4px 0 8px; }
.overall { margin: 0; display: flex; align-items: baseline; gap: 6px; }
.overall-score { font-family: var(--heading); font-size: 3.4rem; font-weight: 700; line-height: 1; }
.overall-max { color: var(--muted); font-size: 1.1rem; }
.skin-age { margin: 0; font-size: 1.05rem; }
.band { display: inline-block; padding: 2px 8px; font-size: 0.8rem; font-weight: 700; }
.band[data-band="good"] { color: var(--good); background: var(--good-bg); }
.band[data-band="fair"] { color: var(--fair); background: var(--fair-bg); }
.band[data-band="care"] { color: var(--care); background: var(--care-bg); }

.facemap { display: block; width: 100%; height: auto; max-height: 50svh; object-fit: contain; background: var(--blush-soft); }
/* Every score as a tile in one side-scrolling strip; the chosen one stands out and the
   rest are greyed (decision 40). */
.chips { display: flex; gap: 10px; overflow-x: auto; padding: 12px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: thin; }
/* Greyed, not faded: they stay tappable, so their text keeps readable contrast. */
.chips:has([aria-pressed="true"]) .chip:not([aria-pressed="true"]) { filter: grayscale(1); background: #F2F2F2; }
.chip {
  flex: none; width: 104px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  min-height: 48px; padding: 10px 10px 8px; text-align: left; overflow-wrap: anywhere;
  border: 2px solid var(--line); border-radius: 0; background: #fff; color: var(--ink);
  font: inherit; font-size: 0.82rem; cursor: pointer;
}
.chip-name { font-weight: 600; line-height: 1.2; }
.chip-band { font-size: 0.75rem; font-weight: 700; }
.chip-score { font-weight: 700; font-size: 1rem; }
.chip[data-band="good"] :is(.chip-score, .chip-band) { color: var(--good); }
.chip[data-band="fair"] :is(.chip-score, .chip-band) { color: var(--fair); }
.chip[data-band="care"] :is(.chip-score, .chip-band) { color: var(--care); }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--blush-soft); }
.chip:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
/* The chosen score's note, right under the tiles. */
.map-caption { min-height: 3em; margin: 12px 0 8px; padding: 12px 14px; background: var(--blush-soft); border-left: 3px solid var(--pink); }
/* Suggested products */
.products { margin-top: 28px; padding-top: 4px; border-top: 2px solid var(--blush); }
.products h3 { font-family: var(--heading); font-size: 1.05rem; margin: 22px 0 8px; }
.product-list { list-style: none; padding: 0; margin: 0; }
.product { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.product img, .product-noimg { width: 96px; height: 96px; object-fit: contain; background: var(--blush-soft); display: block; }
.product-body { min-width: 0; }
.product-body h3.product-name { font-family: var(--body); font-size: 1rem; font-weight: 700; margin: 0 0 2px; }
.product-reason { margin: 0 0 4px; color: var(--pink-dark); font-weight: 600; font-size: 0.9rem; }
.product-claim { margin: 0 0 6px; font-size: 0.92rem; }
.product-price { margin: 0 0 8px; font-weight: 700; }
.product-link { min-height: 44px; padding: 0 16px; font-size: 0.92rem; }
.product-lead { border: 2px solid var(--pink); background: var(--blush-soft); padding: 12px; margin-bottom: 8px; }
.product-tag { margin: 0 0 4px; font-size: 0.8rem; font-weight: 700; color: var(--pink-dark); text-transform: uppercase; letter-spacing: 0.04em; }
.code { padding: 10px 12px; border: 2px dashed var(--pink); background: #fff; margin: 14px 0 0; }
.routine { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; }
.routine dt { font-weight: 700; }
.routine dd { margin: 0; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { padding: 4px 10px; background: var(--blush-soft); border: 1px solid var(--blush); font-size: 0.88rem; }
.rec-notes { margin: 18px 0 0; padding-left: 1.1em; color: var(--muted); font-size: 0.9rem; }

/* Desktop: hand the analysis to a phone. */
.handoff { border: 2px solid var(--blush); background: var(--blush-soft); padding: 16px; margin: 8px 0 20px; text-align: center; }
.handoff h2 { margin-top: 0; }
.qr { display: inline-block; background: #fff; padding: 8px; }
.qr svg { display: block; width: 220px; height: 220px; }
.url { word-break: break-all; }
.preview { width: auto; height: auto; max-width: 100%; max-height: 50vh; display: block; margin-inline: auto; background: var(--blush-soft); }
#checking:focus, #passed:focus { outline: none; }
input { scroll-margin-top: 6rem; }

.checks { list-style: none; padding: 0; margin: 12px 0 0; }
.checks li { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); }
.checks .mark { flex: none; width: 1.4em; text-align: center; font-weight: 700; }
.checks .pass .mark { color: var(--ok); }
.checks .fail .mark { color: var(--error); }
.checks .fail strong { color: var(--error); }
.ok { color: var(--ok); font-weight: 600; }

.draft { background: var(--blush); padding: 8px 12px; font-weight: 600; }


/* ---------------------------------------------------------------------------------
   Typography look (17-Nov-2026, the user's pick from the look options; decision 38).
   The words are the design: big Platypi, a pink-to-blue ink on a few words, blush and
   blue kept faint. Layered over the rules above. Every element's resting state is its
   final state, so with reduced motion (rule at the very end) everything simply shows.
   --------------------------------------------------------------------------------- */
@font-face {
  font-family: "Platypi";
  src: url("../fonts/platypi-italic-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-style: italic;
  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: "Platypi";
  src: url("../fonts/platypi-italic-latin-ext.woff2") format("woff2");
  font-weight: 300 800;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  --blue-faint: #F3F5FD;
  --ink-soft: #3A3742;
  --ink-gradient: linear-gradient(100deg, var(--pink) 0%, var(--pink-dark) 35%, var(--blue) 70%, var(--pink) 100%);
}

/* Page: blush at the top, white, a hint of blue at the bottom. */
html { background: var(--blue-faint); }
body { background: linear-gradient(180deg, var(--blush-soft) 0, var(--bg) 320px, var(--bg) calc(100% - 320px), var(--blue-faint) 100%); }
.page { overflow-x: clip; }

/* Header: the wordmark, large. */
.top { border-bottom: 0; padding: 18px 16px 0; }
.brand { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; max-width: 528px; margin-inline: auto; }

/* Type */
h1, h2 { font-weight: 800; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: 2.6rem; line-height: 1.02; }
h2 { font-size: 1.5rem; }
.display { font-size: clamp(3.4rem, 19vw, 4.75rem); line-height: 0.9; letter-spacing: -0.03em; margin: 14px 0 20px; }
.ink {
  font-style: italic;
  background: var(--ink-gradient); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.mark { background: linear-gradient(transparent 60%, var(--blush) 60%); }
.lead { font-size: 1.1rem; color: var(--ink-soft); }
.flow { font-family: var(--heading); font-style: italic; font-size: 1.35rem; line-height: 1.35; color: var(--muted); margin: 22px 0 26px; }
.flow span { color: var(--pink); font-style: normal; }

/* Steps: blue capitals over a three-part bar. */
.steps-wrap { margin: 0 0 6px; }
.steps { color: var(--blue); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.18em; }
.step-bar { list-style: none; display: flex; gap: 6px; margin: 8px 0 0; padding: 0; max-width: 220px; }
.step-bar li { flex: 1; height: 4px; background: var(--line); position: relative; overflow: hidden; }
.step-bar li.done { background: var(--pink); }
.step-bar li.now::after {
  content: ""; position: absolute; inset: 0; background: var(--pink);
  transform-origin: left; animation: grow 0.8s 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* Buttons: flat pink, set in Platypi. */
.btn { font-family: var(--heading); font-weight: 800; font-size: 1.15rem; transition: background-color 0.2s, color 0.2s, transform 0.15s; }
.btn:active { transform: scale(0.98); }
.btn-go { display: flex; width: 100%; justify-content: space-between; gap: 12px; min-height: 60px; padding: 0 20px; font-size: 1.5rem; }
.product-link { font-size: 1rem; }

/* Form */
input[type="text"], input[type="email"], input[type="tel"] { transition: border-color 0.2s, box-shadow 0.2s; }
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus {
  border-color: var(--pink); box-shadow: 0 0 0 4px var(--blush);
}
.choice span { transition: border-color 0.15s, background-color 0.15s, transform 0.15s; }
.choice input:checked + span { animation: pop 0.28s ease-out; box-shadow: 0 4px 0 var(--pink); }
.consents { border-top: 2px solid var(--blush); }
.handoff { border-width: 0 0 0 4px; border-color: var(--pink); }

/* Live camera */
.oval::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 3px solid #3FCF7F; opacity: 0; pointer-events: none;
}
.viewfinder.ready .oval::after { animation: ripple 1.2s ease-out infinite; }
.pill { transition: background-color 0.25s, color 0.25s; }
.pill[data-state="good"] { animation: pillpop 0.35s ease-out; }
.cue { transition: background-color 0.2s; }
.countdown-number.tick { animation: tick 0.5s cubic-bezier(0.2, 1.4, 0.4, 1); }

/* Analysing: the photo with a scan line passing over it. */
.scan {
  position: relative; width: min(100%, 300px); aspect-ratio: 3 / 4; margin: 20px auto 0;
  background: var(--blush-soft); overflow: hidden;
}
.scan-photo { display: block; width: 100%; height: 100%; object-fit: cover; }
.scan-line {
  position: absolute; left: 0; right: 0; top: 0; height: 30%;
  background: linear-gradient(to bottom, rgba(224, 27, 103, 0), rgba(224, 27, 103, 0.3));
  border-bottom: 2px solid var(--pink);
  box-shadow: 0 6px 16px rgba(224, 27, 103, 0.45);
  transform: translateY(-100%);
  animation: scanline 2.2s ease-in-out infinite alternate;
}
.scan-corners {
  position: absolute; inset: 10px; pointer-events: none;
  --c: var(--pink);
  background:
    linear-gradient(var(--c), var(--c)) top left / 26px 3px no-repeat,
    linear-gradient(var(--c), var(--c)) top left / 3px 26px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 26px 3px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 3px 26px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 26px 3px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 3px 26px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 26px 3px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 3px 26px no-repeat;
}

/* Report: the overall score as one giant number, its band beside it. */
.summary { display: block; margin: 6px 0 18px; }
.overall { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto auto; column-gap: 12px; margin: 0; }
.overall-score {
  grid-row: 1 / 4; font-size: clamp(7rem, 40vw, 10.5rem); font-weight: 800; line-height: 0.8; letter-spacing: -0.05em;
  background: var(--ink-gradient); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.overall-max { grid-column: 2; grid-row: 2; font-family: var(--heading); font-size: 1.4rem; }
.overall .band { grid-column: 2; grid-row: 3; justify-self: start; padding: 0; background: none; font-family: var(--heading); font-style: italic; font-size: 1.7rem; font-weight: 800; }
.skin-age { margin: 14px 0 0; font-family: var(--heading); font-size: 1.8rem; font-weight: 800; line-height: 1.1; text-wrap: balance; }
.facemap.fade { animation: mapfade 0.4s ease-out; }
.chip { transition: border-color 0.2s, background-color 0.2s, transform 0.15s, box-shadow 0.2s, opacity 0.2s, filter 0.2s; }
.map-caption.up { animation: rise 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
.chip[aria-pressed="true"] { border-color: var(--pink); transform: translateY(-2px); box-shadow: 0 4px 0 var(--pink); }
.chip-score { font-family: var(--heading); font-size: 2.2rem; font-weight: 800; line-height: 1; }

/* Products: names as headlines, the reason in blue capitals. */
.products { border-top: 3px solid var(--blue); }
.product-reason { color: var(--blue); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.product-body h3.product-name { font-family: var(--heading); font-size: 1.3rem; font-weight: 800; line-height: 1.1; margin: 2px 0 4px; }
.product-price { font-family: var(--heading); font-style: italic; font-weight: 400; font-size: 1.1rem; color: var(--muted); }
.product-lead { border: 0; border-top: 3px solid var(--blue); background: var(--blush-soft); }

@keyframes ink { to { background-position: -220% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes pop { 50% { transform: scale(1.06); } }
@keyframes pillpop { 50% { transform: scale(1.07); } }
@keyframes tick { from { transform: scale(1.7); opacity: 0; } }
@keyframes ripple { from { transform: scale(1); opacity: 0.9; } to { transform: scale(1.14); opacity: 0; } }
@keyframes scanline { from { transform: translateY(-100%); } to { transform: translateY(333%); } }
@keyframes mapfade { from { opacity: 0.3; } }

/* Entrances: each page's blocks, and each photo-page step as it appears, rise in. */
@media (prefers-reduced-motion: no-preference) {
  .page > * { animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .page > :nth-child(2) { animation-delay: 0.06s; }
  .page > :nth-child(3) { animation-delay: 0.12s; }
  .page > :nth-child(4) { animation-delay: 0.18s; }
  .page > :nth-child(5) { animation-delay: 0.24s; }
  .page > :nth-child(n+6) { animation-delay: 0.3s; }

  /* Blocks marked .reveal rise as they scroll into view (motion.mjs adds .in). */
  .motion .reveal { transition: opacity 0.6s, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .motion .reveal:not(.in) { opacity: 0; transform: translateY(18px); }
  .ink, .overall-score { animation: ink 9s linear infinite; }
  .motion .products.in .product { animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .motion .products.in .product-list .product:nth-child(2) { animation-delay: 0.1s; }
  .motion .products.in .product-list .product:nth-child(n+3) { animation-delay: 0.2s; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .scan-line { display: none; }
}

/* ---- chicnutrix.com's header and footer, laid out as the site on a phone (decision 44) ---- */
.top { padding: 0; background: #FFDCEC; }
.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; max-width: 560px; margin-inline: auto; padding: 8px 12px; position: relative; min-height: 64px; }
.top .brand { display: block; max-width: none; margin: 0; justify-self: center; }
.top .logo { display: block; width: 150px; height: auto; }
.sitemenu { justify-self: start; }
.sitemenu > summary { display: grid; place-items: center; width: 44px; height: 44px; color: var(--ink); cursor: pointer; list-style: none; border-radius: 10px; }
.sitemenu > summary::-webkit-details-marker { display: none; }
.sitemenu[open] > summary { color: var(--pink-dark); background: rgba(255, 255, 255, 0.6); }
.sitemenu nav { position: absolute; left: 12px; top: calc(100% + 4px); z-index: 30; width: min(300px, calc(100vw - 24px)); padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 12px 32px rgba(31, 29, 36, 0.16); }
.sitemenu ul { list-style: none; margin: 0; padding: 0; }
.sitemenu li a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.sitemenu li a:hover, .sitemenu li a:focus-visible { background: var(--blush-soft); color: var(--pink-dark); }
.sitemenu-note { margin: 6px 12px 4px; color: var(--muted); font-size: 0.78rem; }
.topicons { justify-self: end; display: flex; gap: 2px; }
.topicons a { display: grid; place-items: center; width: 44px; height: 44px; color: var(--ink); border-radius: 10px; }
.topicons a:hover, .topicons a:focus-visible { color: var(--pink-dark); }
.sitefoot { margin-top: 40px; background: #000; color: #fff; }
.sitefoot-in { max-width: 560px; margin-inline: auto; padding: 24px 24px 28px; }
.sitefoot .flogo { display: block; width: 76px; height: auto; margin: 0 auto; }
.sitefoot .tagline { margin: 14px auto 10px; max-width: 320px; text-align: center; line-height: 1.6; font-size: 0.95rem; color: #fff; }
.social { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 30px; padding: 0; }
.social a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border: 1px solid #fff; border-radius: 999px; color: #fff; font-size: 0.8rem; font-weight: 600; text-decoration: none; }
.social a:hover, .social a:focus-visible { background: #fff; color: #000; }
.footcols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 40px; padding-left: 16px; }
.sitefoot h2 { margin: 0 0 16px; font-family: var(--heading); font-size: 1.05rem; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; color: #fff; }
.footcols ul { list-style: none; margin: 0; padding: 0; }
.footcols li a { display: inline-flex; align-items: center; min-height: 44px; color: #fff; font-size: 0.92rem; text-decoration: none; }
.footcols li a:hover, .footcols li a:focus-visible { text-decoration: underline; }
.loc-head { padding-left: 16px; }
.contacts { list-style: none; margin: 0; padding: 0 0 0 16px; display: grid; gap: 22px; }
.contacts li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; font-size: 0.95rem; line-height: 1.75; }
.contacts .ring { display: grid; place-items: center; width: 34px; height: 34px; border: 1.5px solid var(--pink); border-radius: 50%; color: var(--pink); }
.contacts b { display: block; font-weight: 700; text-transform: uppercase; line-height: 1.3; }
.contacts a { color: #fff; text-decoration: none; }
.contacts a:hover, .contacts a:focus-visible { text-decoration: underline; }
.sitefoot .disclaimer { margin: 28px 0 0; padding-left: 16px; color: #CFCAD3; font-size: 0.8rem; }
.sitefoot .disclaimer a { color: #fff; }
.copybar { margin: 0; padding: 10px 16px; border-top: 1px solid #333; text-align: center; color: #fff; font-size: 0.8rem; }
.sitefoot a:focus-visible { outline: 3px solid var(--blush); outline-offset: 2px; }
