/* Pinkly check-in page. Tokens from the Pinkly Brand & Interface Guide v1 (Design/01-Brand-guide). */
@font-face {
  font-family: 'Inter';
  src: url('InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #111111;
  --surface: #f4f4f4;
  --line: #dddddd;
  --outline: #8a8a8a;
  --yellow: #f5d139;
  --yellow-pale: #fff0ad;
  --orange: #e94b0c;
  --radius-card: 16px;
  --radius-control: 12px;
  --gutter: 24px;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 24px;
  display: flex;
  flex-direction: column;
}

.top {
  position: sticky; top: 0; z-index: 2;
  background: var(--paper);
  min-height: 56px;
  padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 16px;
  max-width: 480px; width: 100%; margin: 0 auto;
}
.brand { display: block; height: 24px; width: auto; }
.progress { list-style: none; margin: 0 0 0 auto; padding: 0; display: flex; gap: 6px; }
.progress li { width: 24px; height: 6px; border-radius: 999px; background: var(--line); }
.progress li.done { background: var(--ink); }
.progress li.current { width: 36px; background: var(--orange); }

main { flex: 1; width: 100%; max-width: 480px; margin: 0 auto; padding: 8px var(--gutter) 120px; outline: none; }

h1 {
  font-weight: 600;
  font-size: 28px; line-height: 34px; letter-spacing: -0.02em;
  margin: 12px 0 8px;
}
.lead { margin: 0 0 24px; font-size: 16px; line-height: 24px; }
.noscript { padding: var(--gutter); }

/* One symptom: its name, then five circles that grow with the intensity. */
.symptom { border: 0; margin: 0 0 12px; padding: 16px 12px 12px; background: var(--surface); border-radius: var(--radius-card); }
.symptom legend { float: left; width: 100%; padding: 0 4px; margin: 0 0 12px; font-weight: 600; font-size: 16px; line-height: 24px; }
.symptom legend + * { clear: both; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; padding: 4px 0 2px; min-height: 44px; border-radius: var(--radius-control); -webkit-tap-highlight-color: transparent; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dot-wrap { height: 44px; display: grid; place-items: center; }
.dot { border-radius: 50%; border: 1.5px solid var(--outline); background: var(--paper); transition: background-color .15s ease, border-color .15s ease, transform .15s ease; }
.opt[data-v="0"] .dot { width: 18px; height: 18px; }
.opt[data-v="1"] .dot { width: 23px; height: 23px; }
.opt[data-v="2"] .dot { width: 28px; height: 28px; }
.opt[data-v="3"] .dot { width: 33px; height: 33px; }
.opt[data-v="4"] .dot { width: 38px; height: 38px; }
.word { font-size: 12px; line-height: 16px; text-align: center; min-height: 32px; }
.opt input:checked ~ .dot-wrap .dot { background: var(--yellow); border: 2px solid var(--ink); transform: scale(1.06); }
.opt input:checked ~ .word { font-weight: 700; }
.opt input:focus-visible ~ .dot-wrap .dot { outline: 2px solid var(--ink); outline-offset: 3px; }
.symptom.missing, .count.missing { box-shadow: inset 4px 0 0 var(--orange); }

/* The hot flush count */
.count { margin: 8px 0 12px; padding: 16px; background: var(--surface); border-radius: var(--radius-card); }
.count label { display: block; font-weight: 600; font-size: 16px; line-height: 24px; }
.count .help { font-size: 14px; line-height: 20px; margin: 2px 0 12px; }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button { width: 48px; height: 48px; border-radius: var(--radius-control); border: 1.5px solid var(--outline); background: var(--paper); color: var(--ink); font: 600 20px/28px var(--body); cursor: pointer; }
.stepper input { width: 96px; height: 48px; border-radius: var(--radius-control); border: 1.5px solid var(--outline); background: var(--paper); color: var(--ink); text-align: center; font: 600 20px/28px var(--body); -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus-visible, .stepper button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Optional tags */
.tags { border: 0; margin: 8px 0 0; padding: 0; }
.tags legend { font-weight: 600; font-size: 16px; line-height: 24px; padding: 0; margin-bottom: 4px; }
.tags .help { font-size: 14px; line-height: 20px; margin: 0 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--radius-control); border: 1.5px solid var(--outline); background: var(--paper); font-weight: 500; font-size: 14px; line-height: 20px; }
.chip input:checked + span { background: var(--yellow-pale); border-color: var(--ink); font-weight: 600; }
.chip input:checked + span::before { content: '✓'; margin-right: 6px; }
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

.notice { margin: 4px 0 16px; padding: 12px 16px; border-radius: var(--radius-control); background: var(--yellow-pale); border-left: 4px solid var(--orange); font-size: 14px; line-height: 20px; }

/* Bottom bar: one black action per screen */
.actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--paper) 70%, rgba(255, 255, 255, 0));
  display: flex; gap: 12px; justify-content: center;
}
.actions > * { max-width: 216px; }
button.primary, button.quiet { min-height: 48px; border-radius: var(--radius-control); font: 600 16px/24px var(--body); padding: 0 16px; white-space: nowrap; cursor: pointer; flex: 1; }
button.primary { background: var(--ink); color: var(--paper); border: 0; }
button.primary[disabled] { opacity: .45; cursor: default; }
button.quiet { background: var(--paper); color: var(--ink); border: 1.5px solid var(--outline); }
button.quiet[hidden] { display: none; }
button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* End states */
.state { padding-top: 24px; }
.summary { font-size: 20px; line-height: 28px; margin: 0 0 16px; }
.blob { width: 64px; height: 64px; margin: 16px 0 8px; background: url('placeholder-flower-colour.svg') center / contain no-repeat; }
.blob.coral { background-image: url('placeholder-flower-black.svg'); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (max-width: 360px) { .word { font-size: 11px; } }
