/* Teplota: virpo.io's bento of rounded paper tiles on black, Righteous throughout.
   Peach is paracetamol, yellow is ibuprofen, everywhere. One picture only: the syringe. */
:root {
  color-scheme: light dark;
  --gap: 3px;
  --radius: 10px;
  --frame: #090909;
  --paper: #fff4df;
  --white: #ffffff;
  --text: #090909;
  --muted: #655f58;
  --line: #e7dcc8;
  --kaki: #d76538;
  --kaki-text: #9b3f1e;
  --red: #d0513e;
  --peach: #f2a084;
  --yellow: #f4c84c;
  --p-ink: #b8402c;
  --i-ink: #8a5a00;
  --focus: #17484a;
  --barrel: #ffffff;
  --edge: rgba(9, 9, 9, 0.18);
  --glass: rgba(255, 255, 255, 0.4);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #221d19;
    --white: #191614;
    --text: #f6ecdb;
    --muted: #b3a795;
    --line: #3a322b;
    --kaki-text: #f0a27f;
    --red: #b8432f;
    --peach: #4b2a22;
    --yellow: #45380f;
    --p-ink: #ff9b85;
    --i-ink: #f6c74a;
    --focus: #8fd1c9;
    --barrel: #f6ecdb;
    --edge: rgba(246, 236, 219, 0.22);
    --glass: rgba(0, 0, 0, 0.18);
  }
}

* { box-sizing: border-box; min-width: 0; }
html { background: var(--frame); scroll-behavior: smooth; scroll-padding-top: 8px; }
body {
  margin: 0;
  background: var(--frame);
  color: var(--text);
  font: 16px/1.4 "Righteous", "Arial Rounded MT Bold", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

.shell { width: min(100%, 1240px); margin: 0 auto; padding: var(--gap); display: grid; gap: var(--gap); }
.tile { border-radius: var(--radius); background: var(--paper); padding: clamp(18px, 3.2vw, 34px); }

.lbl {
  margin: 0;
  color: var(--kaki-text);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hint { margin: 12px 0 0; color: var(--muted); font-size: 14px; }

/* Masthead */
.mast { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; gap: var(--gap); }
.mast .tile { padding: 0 20px; min-height: 64px; display: flex; align-items: center; text-decoration: none; }
.brand { background: var(--red); color: #fff; font-size: 26px; letter-spacing: -0.03em; }
.nav { background: var(--white); gap: 4px; padding: 0 8px !important; overflow-x: auto; }
.nav a { padding: 12px 12px; text-decoration: none; font-size: 15px; white-space: nowrap; border-radius: 8px; }
.nav a:hover { background: var(--paper); }
.call { background: var(--white); gap: 8px; font-size: 16px; white-space: nowrap; }
.call .lbl { font-size: 11px; }

/* Top: the title and the one question */
.top { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .top { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.hero { display: flex; flex-direction: column; justify-content: center; }
.hero h1 { margin: 0 0 12px; font-weight: 400; font-size: clamp(34px, 5.4vw, 60px); line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance; max-width: 14ch; }
.hero em { font-style: normal; color: var(--kaki-text); }
.lede { margin: 0; color: var(--muted); font-size: 18px; }
.q { margin: 0; font-weight: 400; font-size: clamp(24px, 3vw, 30px); letter-spacing: -0.02em; line-height: 1.1; display: flex; align-items: center; gap: 10px; }
.weight { background: var(--white); }
.wrow { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.round { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--text); background: transparent; }
.round svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.round:active { transform: scale(0.96); }
.wfield { flex: 1; display: flex; align-items: baseline; justify-content: center; gap: 8px; border-bottom: 3px solid var(--text); padding: 0 4px 4px; }
.wfield input { width: 100%; max-width: 4.2ch; border: 0; background: transparent; text-align: right; font-size: clamp(56px, 12vw, 88px); line-height: 1; letter-spacing: -0.04em; padding: 0; outline: none; }
.wfield input::placeholder { color: var(--line); }
.wfield span { font-size: 28px; }
.wfield:focus-within { border-bottom-color: var(--kaki); }
.hint.warn { color: var(--kaki-text); }

/* The two medicine cards */
.cards { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .cards { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.card.p { background: var(--peach); }
.card.i { background: var(--yellow); }
.card { display: flex; flex-direction: column; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex: none; background: var(--white); box-shadow: inset 0 0 0 2px var(--text); }
.card .dot { width: 16px; height: 16px; }
.sub { margin: 16px 0 8px; font-size: 15px; color: var(--text); opacity: 0.75; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 52px; padding: 8px 16px; border-radius: 14px;
  border: 2px solid var(--edge); background: var(--glass); text-align: left;
  display: inline-flex; flex-direction: column; justify-content: center; line-height: 1.15; font-size: 17px;
}
.chip small { font-size: 12px; opacity: 0.7; }
.chip[aria-checked="true"] { border-color: var(--text); background: var(--text); color: var(--white); }
.custom { margin-top: 12px; }
.custom p { margin: 0 0 8px; font-size: 14px; }
.crow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 17px; }
.custom input { width: 5ch; min-height: 48px; border: 2px solid var(--text); border-radius: 10px; background: var(--white); text-align: center; font-size: 20px; }

.answer { margin-top: 18px; padding-top: 18px; border-top: 2px solid var(--edge); display: flex; flex-direction: column; flex: 1; }
.todo { margin: 6px 0; font-size: 22px; line-height: 1.2; }
.dl { margin: 0; font-size: 15px; }
.big { margin: 2px 0 0; display: flex; align-items: baseline; gap: 10px; }
.big b { font-weight: 400; font-size: clamp(76px, 15vw, 120px); line-height: 0.88; letter-spacing: -0.05em; }
.big span { font-size: 34px; }
.cap { margin: 8px 0 0; font-size: 16px; }
.syr { width: 100%; max-width: 520px; height: auto; margin: 16px 0 10px; overflow: visible; }
.syr .barrel { fill: var(--barrel); stroke: #090909; stroke-width: 2; }
.syr .tick { stroke: #090909; stroke-width: 1.2; }
.syr .num { font-size: 11px; fill: var(--text); text-anchor: middle; }
.syr .tag { font-size: 12px; fill: var(--text); text-anchor: middle; }
.syr .liq { transform-box: fill-box; transform-origin: left center; transition: transform 380ms cubic-bezier(.2,.8,.2,1); }
.syr .plunger { transition: transform 380ms cubic-bezier(.2,.8,.2,1); }
.syr .ink { fill: #090909; }
.now { margin-top: 8px; padding: 14px 16px; border-radius: 12px; display: grid; gap: 4px; }
.now b { font-weight: 400; font-size: 22px; line-height: 1.15; }
.now span { font-size: 15px; }
.now.ok { background: var(--white); }
.now.ok b::before { content: "✓ "; }
.now.no { background: var(--text); color: var(--white); }
.give { margin-top: 10px; align-self: stretch; min-height: 56px; font-size: 18px; }
.last { margin: 12px 0 0; font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.last input[type="time"] { min-height: 36px; border: 2px solid var(--edge); border-radius: 8px; background: var(--glass); padding: 0 6px; font-size: 15px; }
.linkish { border: 0; background: none; padding: 6px 2px; text-decoration: underline; font-size: 14px; min-height: 36px; }
.anyway { align-self: flex-start; margin-top: 8px; min-height: 44px; }
.count { margin: 4px 0 0; font-size: 14px; }

.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px; border-radius: 999px;
  border: 2px solid var(--text); background: transparent; text-decoration: none; font-size: 16px;
}
.pill.solid { background: var(--text); color: var(--white); }
.pill.ghost { background: transparent; }
.pill:active { transform: scale(0.98); }

.keep { background: var(--paper); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-block: 14px; }
.keep p { margin: 0; color: var(--muted); font-size: 15px; }
.keep .pill { min-height: 40px; padding: 6px 14px; font-size: 14px; border-color: var(--line); }

/* Guide */
.guide { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .guide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-155 { grid-column: 1 / -1; }
}
.guide h2 { margin: 0 0 14px; font-weight: 400; font-size: clamp(26px, 3.2vw, 34px); letter-spacing: -0.02em; line-height: 1.05; }
.guide ul, .guide ol.steps { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; }
.guide p { margin: 0 0 10px; }
.g-rules, .g-cool { background: var(--white); }
.rule-row { display: grid; gap: 2px; padding: 12px 14px; border-radius: 10px; margin-bottom: 6px; }
.rule-row.p { background: var(--peach); }
.rule-row.i { background: var(--yellow); }
.rule-row b { font-weight: 400; font-size: 19px; }
.rule-row span { font-size: 15px; }
.g-rules ul { margin-top: 12px; }
.rhythm { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; }
.rhythm li { display: flex; gap: 14px; align-items: baseline; padding: 10px 14px; border-radius: 10px; }
.rhythm li.i { background: var(--yellow); }
.rhythm li.p { background: var(--peach); }
.rhythm b { font-weight: 400; font-size: 22px; min-width: 3.2ch; }
.g-155 { background: var(--red); color: #fff; }
.g-155 ul { columns: 2 280px; column-gap: 32px; display: block; }
.g-155 li { margin-bottom: 8px; break-inside: avoid; }
.g-155 .hint { color: #ffe7df; }
.calls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.g-155 .pill { border-color: #fff; color: #fff; }
.g-155 .pill.solid { background: #fff; color: #090909; }

.foot { background: var(--paper); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 14px; color: var(--muted); }
.foot p { margin: 0; max-width: 80ch; }
.nojs { color: #fff; text-align: center; }

@media (max-width: 600px) {
  .mast { grid-template-columns: max-content minmax(0, 1fr); }
  .mast .call { grid-column: 1 / -1; min-height: 52px; justify-content: center; }
  .brand { font-size: 22px; padding: 0 16px !important; }
}
