/*
  Wick & Mortar: skincare shop product page (Screenery template)
  1. Ivory letterpress stock, sepia ink for type, oxblood for labels and rules, bottle green for the botanicals and actions.
  2. Every surface is a printed label: double rules, ornamental corners, small capitals by letter-spacing; no rounded cards.
  3. Order: tokens, base and browser surfaces, kit (buttons, fields, ticks), masthead, hero, builder, dispensary,
     glossary, counter, questions, footer, motion, narrow screens.
*/

/* ---------- Tokens ---------- */
:root {
  --paper: #f3ead6;          /* ivory stock */
  --paper-2: #f8f1e1;        /* label stock, a shade lighter */
  --paper-3: #e9dcc0;        /* well, pressed areas */
  --ink: #2a1d17;            /* sepia-black, 14:1 on paper */
  --ink-2: #4f3d33;          /* secondary, 8.6:1 */
  --ink-3: #6a5547;          /* small print, 5.9:1 */
  --oxblood: #6b1c22;        /* label ink, 9.8:1 */
  --oxblood-2: #8a2a2f;      /* hover */
  --green: #234a3b;          /* bottle green, 8.7:1 */
  --green-2: #2f5f4c;
  --rule: rgb(42 29 23 / 0.55);
  --rule-soft: rgb(42 29 23 / 0.2);
  --error: #8f1f1a;          /* 7.6:1 on paper */

  --display: "IM Fell English", "Iowan Old Style", Georgia, serif;
  --body: "Crimson Pro", "Iowan Old Style", Georgia, serif;

  --fs-xs: 0.875rem;
  --fs-sm: 1rem;
  --fs-md: 1.1875rem;
  --fs-lg: 1.4rem;
  --fs-xl: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  --fs-hero: clamp(2.5rem, 1.6rem + 3.6vw, 4.75rem);

  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4.5rem;
  --s-9: 7rem;

  --r-0: 0;
  --r-1: 2px;
  --gutter: clamp(1rem, 0.4rem + 3vw, 3rem);
  --max: 76rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base and browser surfaces ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--oxblood) var(--paper-3); accent-color: var(--green); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background-color: var(--paper);
  /* Laid paper: faint chain lines and a little foxing at the corners */
  background-image:
    radial-gradient(ellipse at 0 0, rgb(160 110 50 / 0.10), transparent 40%),
    radial-gradient(ellipse at 100% 100%, rgb(160 110 50 / 0.10), transparent 40%),
    repeating-linear-gradient(90deg, rgb(42 29 23 / 0.025) 0 1px, transparent 1px 28px);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--fs-md);
  line-height: 1.55;
  caret-color: var(--oxblood);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--oxblood); color: var(--paper-2); }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--paper-3); }
::-webkit-scrollbar-thumb { background: var(--oxblood); border: 3px solid var(--paper-3); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
a { color: var(--oxblood); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--oxblood-2); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; line-height: 1.1; text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 1em; height: 1em; flex: none; }
.skip { position: absolute; left: var(--s-4); top: -4rem; background: var(--ink); color: var(--paper); padding: var(--s-3) var(--s-4); z-index: 10; }
.skip:focus { top: var(--s-4); }
.skip:hover { color: var(--paper); }
section { scroll-margin-top: 5rem; }

/* ---------- Kit: buttons, fields, ticks ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5);
  font-family: var(--body); font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; border: 1.5px solid var(--ink); cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease);
}
.btn--ink { background: var(--green); border-color: var(--green); color: var(--paper-2); box-shadow: inset 0 0 0 3px var(--green), inset 0 0 0 4px var(--paper-2); }
.btn--ink:hover { background: var(--green-2); color: var(--paper-2); box-shadow: inset 0 0 0 3px var(--green-2), inset 0 0 0 4px var(--paper-2); }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--paper-3); color: var(--ink); }
.btn--wide { width: 100%; }
.btn__busy { display: none; }
.btn[aria-busy="true"] { cursor: progress; background: var(--ink-2); border-color: var(--ink-2); box-shadow: none; }
.btn[aria-busy="true"] .btn__label { display: none; }
.btn[aria-busy="true"] .btn__busy { display: inline; }
.btn[aria-busy="true"] .btn__busy::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.link-btn { background: none; border: 0; padding: var(--s-2) 0; min-height: 44px; font: inherit; color: var(--oxblood); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }

input[type="text"], input[type="email"] {
  width: 100%; min-height: 48px; padding: var(--s-2) var(--s-3);
  font-family: var(--display); font-size: var(--fs-lg); color: var(--ink);
  background: var(--paper-2); border: 0; border-bottom: 1.5px solid var(--ink); border-radius: 0;
}
input::placeholder { color: var(--ink-3); font-style: italic; text-transform: none; letter-spacing: 0; }
input:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
input[aria-invalid="true"] { border-bottom-color: var(--error); background: #f6e4dc; }
.field-msg { min-height: 1.5em; margin-top: var(--s-2); font-size: var(--fs-xs); color: var(--ink-3); }
.field-msg.is-error { color: var(--error); font-weight: 600; }
.field-msg.is-ok { color: var(--green); }

/* ---------- Masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: var(--s-5);
  padding: var(--s-3) var(--gutter);
  background: rgb(243 234 214 / 0.96);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 1px 0 var(--paper-2), 0 3px 0 -1px var(--rule-soft);
}
.brand { display: flex; align-items: center; gap: var(--s-2); color: var(--oxblood); text-decoration: none; min-height: 44px; }
.brand__mark { width: 30px; height: 30px; }
.brand__name { font-family: var(--display); font-size: 1.5rem; color: var(--ink); }
.nav { display: flex; gap: var(--s-5); margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: var(--fs-sm); letter-spacing: 0.1em; text-transform: uppercase; padding: var(--s-3) 0; }
.nav a:hover { color: var(--oxblood); text-decoration: underline; }
.bag-link { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-3); border: 1px solid var(--ink); color: var(--ink); text-decoration: none; font-size: var(--fs-sm); }
.bag-link__count { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: var(--s-8) var(--gutter) var(--s-8);
  display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--s-7); align-items: center;
}
.ornament { display: flex; align-items: center; gap: var(--s-3); color: var(--oxblood); margin-bottom: var(--s-4); max-width: 22rem; }
.ornament span { flex: 1; height: 5px; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; }
.ornament svg { width: 28px; height: 28px; }
.hero__est { font-size: var(--fs-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--oxblood); margin-top: var(--s-3); }  /* the imprint line, under the facts */
.hero__title { font-size: var(--fs-hero); letter-spacing: -0.01em; max-width: 14ch; }
.hero__lede { margin-top: var(--s-5); max-width: 36rem; font-size: var(--fs-lg); line-height: 1.5; color: var(--ink-2); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.hero__facts { display: flex; flex-wrap: wrap; gap: 0; margin: var(--s-7) 0 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.hero__facts div { flex: 1 1 9rem; padding: var(--s-3) var(--s-4); border-left: 1px solid var(--rule-soft); }
.hero__facts div:first-child { border-left: 0; padding-left: 0; }
.hero__facts dt { font-size: var(--fs-xs); color: var(--ink-3); }
.hero__facts dd { margin: 0; font-family: var(--display); font-size: var(--fs-lg); }
.hero__plate { margin: 0; }
.plate { width: 100%; height: auto; display: block; background: var(--paper-2); }
.plate__no { font-family: var(--display); font-size: 13px; fill: var(--oxblood); }
.plate__name { font-family: var(--display); font-size: 15px; fill: var(--ink); }
.plate__small { font-family: var(--body); font-size: 7.5px; letter-spacing: 1.4px; fill: var(--oxblood); }
.plate__caption { font-family: var(--display); font-style: italic; font-size: 15px; fill: var(--ink-2); }

/* ---------- Prescription builder ---------- */
.builder { padding: var(--s-7) var(--gutter) var(--s-8); }
.sheet {
  max-width: var(--max); margin: 0 auto;
  background: var(--paper-2);
  border: 1.5px solid var(--oxblood);
  outline: 1px solid var(--oxblood); outline-offset: -8px;
  padding: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  box-shadow: 0 18px 40px -24px rgb(42 29 23 / 0.45);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--s-5) var(--s-7);
}
.sheet__head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); flex-wrap: wrap; border-bottom: 3px double var(--oxblood); padding-bottom: var(--s-4); }
.sheet__head h2 { font-size: var(--fs-xl); color: var(--oxblood); }
.sheet__no { font-family: var(--display); font-style: italic; font-size: var(--fs-lg); color: var(--oxblood); font-variant-numeric: tabular-nums; }
.sheet__intro { grid-column: 1 / -1; max-width: 62ch; color: var(--ink-2); }

.rx { display: grid; gap: var(--s-6); align-content: start; position: sticky; top: 6rem; align-self: start; }
.rx__q { border: 0; margin: 0; padding: 0; min-width: 0; }
.rx__q legend, .rx__label { display: block; font-family: var(--display); font-size: var(--fs-lg); margin-bottom: var(--s-3); padding: 0; }
.rx__q legend small { font-family: var(--body); font-size: var(--fs-xs); color: var(--ink-3); }
.rx__n { color: var(--oxblood); margin-right: var(--s-1); }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: var(--s-2); }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span { display: block; padding: var(--s-2) var(--s-3); min-height: 56px; border: 1px solid var(--rule); background: var(--paper); font-weight: 600; transition: background-color .25s var(--ease), color .25s var(--ease); }
.choice small { display: block; font-weight: 400; font-style: italic; font-size: var(--fs-xs); color: var(--ink-3); }
.choice:hover span { background: var(--paper-3); }
.choice input:checked + span { background: var(--oxblood); border-color: var(--oxblood); color: var(--paper-2); }
.choice input:checked + span small { color: #ead6c8; }
.choice input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.ticks { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 0 var(--s-4); }
.tick { display: flex; align-items: center; gap: var(--s-3); min-height: 44px; cursor: pointer; border-bottom: 1px dotted var(--rule); }
.tick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tick__box { width: 22px; height: 22px; flex: none; border: 1.5px solid var(--ink); background: var(--paper); display: grid; place-items: center; color: var(--paper-2); }
.tick__box svg { width: 16px; height: 16px; opacity: 0; }
.tick input:checked + .tick__box { background: var(--green); border-color: var(--green); }
.tick input:checked + .tick__box svg { opacity: 1; }
.tick input:focus-visible + .tick__box { outline: 2px solid var(--green); outline-offset: 2px; }
.tick input:disabled + .tick__box { opacity: .45; }
.tick:has(input:disabled) { color: var(--ink-3); cursor: not-allowed; }
.name-row { display: flex; align-items: center; gap: var(--s-3); }
.name-row input { text-transform: uppercase; letter-spacing: 0.04em; }
.name-count { font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.name-count.is-over { color: var(--error); font-weight: 600; }

.script { border-left: 1px solid var(--rule); padding-left: var(--s-7); display: grid; gap: var(--s-5); align-content: start; }
.script__title { font-size: var(--fs-lg); }
.script__title span { font-style: italic; color: var(--oxblood); }
.routine { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); counter-reset: step; }
.step { display: grid; grid-template-columns: 110px 1fr; gap: var(--s-4); align-items: center; padding-bottom: var(--s-4); border-bottom: 1px solid var(--rule-soft); counter-increment: step; }
.step__vessel { width: 110px; height: 184px; overflow: visible; }
.step__when { font-size: var(--fs-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); }
.step__when::before { content: "Step " counter(step, upper-roman) ". "; color: var(--oxblood); }
.step h4 { font-size: var(--fs-lg); margin: var(--s-1) 0 var(--s-2); }
.step .price { font-family: var(--body); font-size: var(--fs-sm); color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.step__why { font-size: var(--fs-sm); color: var(--ink-2); max-width: 52ch; }
.step__why b { color: var(--oxblood); font-weight: 600; }
.step__sub { display: block; margin-top: var(--s-1); font-style: italic; color: var(--ink-3); }
.lbl__no { font-family: var(--display); font-style: italic; font-size: 11px; fill: var(--oxblood); }
.lbl__nm { font-family: var(--body); font-weight: 600; font-size: 8px; letter-spacing: .5px; fill: var(--ink); }
.lbl__for { font-family: var(--display); font-style: italic; font-size: 7.5px; fill: var(--ink-2); }
.lbl__who { font-family: var(--display); font-size: 10px; letter-spacing: .3px; fill: var(--oxblood); }
.tally { display: grid; gap: var(--s-1); border-top: 3px double var(--ink); padding-top: var(--s-3); }
.tally p { display: flex; justify-content: space-between; gap: var(--s-4); }
.tally__total { font-family: var(--display); font-size: var(--fs-lg); border-top: 1px solid var(--rule); padding-top: var(--s-2); margin-top: var(--s-1); }
.tally__total .num { color: var(--oxblood); }
.routine.is-fresh .step { animation: ink-in .7s var(--ease) both; }
.routine.is-fresh .step:nth-child(2) { animation-delay: .08s; }
.routine.is-fresh .step:nth-child(3) { animation-delay: .16s; }

/* ---------- Dispensary ---------- */
.dispensary, .glossary, .faq { max-width: var(--max); margin: 0 auto; padding: var(--s-8) var(--gutter); }
.section-head { display: grid; gap: var(--s-3); margin-bottom: var(--s-6); max-width: 46rem; }
.section-head h2 { font-size: var(--fs-xl); }
.section-head p { color: var(--ink-2); max-width: 62ch; }
.filters { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.filter { min-height: 44px; padding: 0 var(--s-4); font: inherit; font-size: var(--fs-sm); color: var(--ink); background: transparent; border: 1px solid var(--rule); cursor: pointer; transition: background-color .25s var(--ease); }
.filter:hover { background: var(--paper-3); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--paper-2); border-color: var(--ink); }
.filter-count { margin: var(--s-3) 0 var(--s-5); font-size: var(--fs-xs); color: var(--ink-3); font-style: italic; }
.shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--rule-soft); }
.remedy { display: grid; grid-template-rows: auto 1fr; justify-items: center; gap: var(--s-4); padding: var(--s-5) var(--s-4) var(--s-5); border-right: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule); background: linear-gradient(to bottom, transparent 70%, rgb(42 29 23 / 0.04)); }
.remedy[hidden] { display: none; }
.remedy__v { width: 96px; height: 160px; }
.remedy__label { width: 100%; text-align: center; background: var(--paper-2); border: 1px solid var(--oxblood); outline: 1px solid var(--oxblood); outline-offset: -5px; padding: var(--s-4) var(--s-3); display: grid; gap: var(--s-1); align-content: start; }
.remedy__no { font-family: var(--display); font-style: italic; color: var(--oxblood); font-size: var(--fs-sm); }
.remedy h3 { font-size: 1.25rem; }
.remedy__ing { font-size: var(--fs-xs); color: var(--ink-3); }
.remedy__meta { display: flex; justify-content: space-between; border-top: 1px solid var(--rule-soft); padding-top: var(--s-2); margin-top: var(--s-2); font-size: var(--fs-sm); }
.remedy__meta .num { font-weight: 600; }
.remedy--out .remedy__v { opacity: .55; }
.stamp { display: inline-block; justify-self: center; margin-top: var(--s-2); padding: 2px var(--s-2); border: 1.5px solid var(--error); color: var(--error); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; transform: rotate(-3deg); }
.remedy.is-picked .remedy__label { background: #e4ebdf; }
.remedy.is-picked .remedy__no::after { content: " \00B7  In your set"; color: var(--green); }

/* ---------- Glossary ---------- */
.gloss { margin: 0; columns: 2 22rem; column-gap: var(--s-7); column-rule: 1px solid var(--rule-soft); }
.gloss div { break-inside: avoid; padding: var(--s-3) 0 var(--s-4); border-bottom: 1px dotted var(--rule); }
.gloss dt { font-family: var(--display); font-size: var(--fs-lg); }
.gloss dt i { font-family: var(--body); font-size: var(--fs-sm); color: var(--green); margin-left: var(--s-2); }
.gloss dd { margin: var(--s-1) 0 0; color: var(--ink-2); font-size: var(--fs-sm); max-width: 60ch; }

/* ---------- The counter (buy box) ---------- */
.counter { background: var(--green); color: var(--paper-2); padding: var(--s-8) var(--gutter); }
.counter__inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--s-7); align-items: start; }
.counter__set { background: var(--paper-2); color: var(--ink); padding: clamp(1.25rem, 1rem + 2vw, 2.5rem); border: 1.5px solid var(--paper-2); outline: 1px solid var(--oxblood); outline-offset: -8px; display: grid; gap: var(--s-4); }
.counter__set h2 { font-size: var(--fs-xl); color: var(--oxblood); }
.counter__intro { color: var(--ink-2); }
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.ledger li { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-2) 0; border-bottom: 1px dotted var(--rule); }
.qty { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.qty__label { font-family: var(--display); font-size: var(--fs-lg); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--ink); }
.stepper button { width: 44px; height: 44px; display: grid; place-items: center; background: transparent; border: 0; color: var(--ink); cursor: pointer; }
.stepper button:hover { background: var(--paper-3); }
.stepper button:disabled { color: var(--ink-3); opacity: .5; cursor: not-allowed; }
.stepper output { min-width: 2.5rem; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.labels-for strong { font-family: var(--display); font-weight: 400; color: var(--oxblood); letter-spacing: 0.04em; text-transform: uppercase; }
.result { display: flex; gap: var(--s-3); padding: var(--s-4); border: 1.5px solid currentColor; }
.result[hidden] { display: none; }
.result:focus { outline: none; } /* focused only so screen readers land on it; it is not a control */
.result h3 { font-size: var(--fs-lg); margin-bottom: var(--s-1); }
.result p { font-size: var(--fs-sm); color: var(--ink-2); }
.result__ico { width: 24px; height: 24px; margin-top: 2px; }
.result--ok { color: var(--green); background: #e4ebdf; }
.result--err { color: var(--error); background: #f6e4dc; }
.counter__out { display: grid; grid-template-columns: 90px 1fr; gap: var(--s-4); align-items: start; padding-top: var(--s-4); }
.counter__out h3 { font-size: var(--fs-lg); }
.counter__out p { color: #e6ddc8; font-size: var(--fs-sm); margin-top: var(--s-2); }
.counter__out .stamp { color: #f2b8a8; border-color: #f2b8a8; margin: var(--s-2) 0 0; }
.out__v { width: 90px; height: 150px; opacity: .9; }
.notify { margin-top: var(--s-4); display: grid; gap: var(--s-2); }
.notify label { font-family: var(--display); font-size: var(--fs-md); }
.notify__row { display: flex; gap: var(--s-2); }
.notify input { font-family: var(--body); font-size: var(--fs-sm); }
.notify .btn--line { color: var(--paper-2); border-color: var(--paper-2); white-space: nowrap; }
.notify .btn--line:hover { background: var(--green-2); color: var(--paper-2); }
.notify .field-msg { color: #e6ddc8; }
.notify .field-msg.is-error { color: #ffc9b8; }
.notify .field-msg.is-ok { color: #cfe5d2; }
.counter :focus-visible { outline-color: var(--oxblood); }
.counter__out :focus-visible { outline-color: var(--paper-2); }

/* ---------- Questions ---------- */
.faq__list { border-top: 1px solid var(--ink); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); min-height: 56px; padding: var(--s-3) 0; cursor: pointer; font-family: var(--display); font-size: var(--fs-lg); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 12px; height: 12px; flex: none; border-right: 1.5px solid var(--oxblood); border-bottom: 1.5px solid var(--oxblood); transform: rotate(45deg) translateY(-3px); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq details p { padding: 0 0 var(--s-4); color: var(--ink-2); max-width: 64ch; }

/* ---------- Footer ---------- */
.footer { border-top: 3px double var(--ink); padding: var(--s-7) var(--gutter) var(--s-6); max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1.2fr 1.4fr 1.1fr 0.9fr; gap: var(--s-6); font-size: var(--fs-sm); color: var(--ink-2); }
.footer__mark { width: 40px; height: 40px; color: var(--oxblood); }
.footer__name { font-family: var(--display); font-size: var(--fs-lg); color: var(--ink); }
.footer__h { font-family: var(--body); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--oxblood); margin-bottom: var(--s-2); }
.footer address { font-style: normal; }
.footer address a { display: inline-block; padding: var(--s-1) 0; overflow-wrap: break-word; max-width: 100%; }
.footer__links { list-style: none; margin: 0; padding: 0; }
.footer__links a { display: inline-block; padding: var(--s-2) 0; }
.footer__small { grid-column: 1 / -1; font-size: var(--fs-xs); color: var(--ink-3); border-top: 1px solid var(--rule-soft); padding-top: var(--s-4); }

/* ---------- Motion: the signature is the label re-inking when the prescription changes ---------- */
@keyframes ink-in { from { opacity: .25; filter: blur(2px); transform: translateY(6px); } to { opacity: 1; filter: none; transform: none; } }
.lbl__who.is-typed { animation: ink-in .4s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Narrow screens ---------- */
@media (max-width: 1080px) {
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: var(--s-6); gap: var(--s-6); }
  .hero__plate { max-width: 34rem; width: 100%; justify-self: center; }
  .sheet { grid-template-columns: 1fr; }
  .rx { position: static; }
  .script { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: var(--s-5); }
  .counter__inner { grid-template-columns: 1fr; }
  .footer { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .bag-link { margin-left: auto; }
}
@media (max-width: 560px) {
  .masthead { padding-block: var(--s-2); }
  .brand__name { font-size: 1.3rem; }
  .bag-link > span:first-of-type { display: none; }
  .hero__actions .btn { width: 100%; }
  .btn { letter-spacing: 0.04em; padding: 0 var(--s-4); text-align: center; }
  .hero__facts div { border-left: 0; padding-left: 0; flex-basis: 100%; display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--rule-soft); }
  .hero__facts div:first-child { border-top: 0; }
  .choices { grid-template-columns: 1fr 1fr; }
  .ticks { grid-template-columns: 1fr 1fr; }
  .step { grid-template-columns: 92px 1fr; gap: var(--s-3); }
  .step__vessel { width: 92px; height: 154px; }
  .shelf { grid-template-columns: 1fr 1fr; }
  .remedy { padding: var(--s-4) var(--s-2); }
  .remedy__v { width: 72px; height: 120px; }
  .remedy h3 { font-size: 1.1rem; }
  .remedy .stamp { letter-spacing: 0.03em; white-space: nowrap; padding-inline: var(--s-1); }
  .counter__out { grid-template-columns: 1fr; }
  .out__v { width: 64px; height: 108px; }
  .notify__row { flex-direction: column; }
  .footer { grid-template-columns: 1fr; }
}
