/* Rejuvix Labs — tokens and components, ported from the Broadsheet design system.
   Palette is final: Cyan + magenta. To change a colour, edit the variables below. */

:root {
  --color-bg: #f3f2f2;
  --color-surface: #eae9e9;
  --color-text: #201e1d;
  --color-accent: #0088b0;
  --color-accent-2: #d6006c;
  --color-divider: color-mix(in srgb, #201e1d 16%, transparent);

  --color-accent-100: #e9f8ff;
  --color-accent-200: #cbeeff;
  --color-accent-300: #99e0ff;
  --color-accent-400: #62c5ee;
  --color-accent-500: #38a6cf;
  --color-accent-600: #1186ac;
  --color-accent-700: #006786;
  --color-accent-800: #004961;
  --color-accent-900: #0a303e;

  --color-accent-2-100: #fff1f4;
  --color-accent-2-200: #ffdee6;
  --color-accent-2-300: #ffc0d0;
  --color-accent-2-400: #ff90b1;
  --color-accent-2-500: #ff458e;
  --color-accent-2-600: #d82071;
  --color-accent-2-700: #aa0b56;
  --color-accent-2-800: #790e3d;
  --color-accent-2-900: #4b1528;

  /* Print-plate yellow: headline and numeral plates only, never interface colour. */
  --color-process-yellow: #edbb00;

  --text-80: color-mix(in srgb, var(--color-text) 80%, transparent);
  --text-70: color-mix(in srgb, var(--color-text) 70%, transparent);
  --text-60: color-mix(in srgb, var(--color-text) 60%, transparent);
  --leader: color-mix(in srgb, var(--color-text) 45%, transparent);

  --font-heading: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;

  --space-1: 5px;
  --space-2: 10px;
  --space-3: 15px;
  --space-4: 20px;
  --space-6: 30px;
  --space-8: 40px;

  --radius-sm: 1px;
  --radius-md: 2px;
  --radius-lg: 4px;

  --gutter: clamp(20px, 5vw, 72px);
}

/* — base — */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; min-height: 100vh;
  background: var(--color-bg); color: var(--color-text);
  font-family: var(--font-body); font-size: 15px; line-height: 1.55; font-weight: 400;
  text-wrap: pretty;
}
h1, h2, h3 {
  font-family: var(--font-heading); font-weight: 600;
  line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 var(--space-2);
}
p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent-700); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-800); }
img { display: block; max-width: 100%; }
figure { margin: 0; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
h1[tabindex="-1"]:focus-visible { outline: none; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: 600;
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: var(--radius-md);
}
.btn:hover { color: var(--color-text); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary, .btn-primary:hover { background: var(--color-accent); color: var(--color-bg); }
.btn-primary:hover { background: var(--color-accent-600); }
.btn-primary:active { background: var(--color-accent-700); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.btn-ghost, .btn-ghost:hover { color: var(--color-accent); padding-inline: var(--space-1); }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-ghost:active { background: color-mix(in srgb, var(--color-accent) 18%, transparent); }
.btn-lg { font-size: 16px; padding: 14px 22px; }
.btn-ghost.btn-lg { padding-inline: var(--space-1); min-height: 46px; }
.btn-md { min-height: 46px; font-size: 15px; }

/* — forms — */
.field > label, .field > .label {
  display: block; font-size: 12px; margin-bottom: 5px; color: var(--text-70);
}
.input {
  width: 100%; min-height: 46px; padding: 6px 10px; font: inherit;
  font-size: 16px; color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.input::placeholder { color: color-mix(in srgb, var(--color-text) 65%, transparent); opacity: 1; }
.input:hover { border-color: var(--leader); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { min-height: 90px; resize: vertical; }
input[type="file"].input { padding: 10px; font-size: 15px; }
.field-error { margin: 6px 0 0; font-size: 13px; color: var(--color-accent-2-700); }
.field-error:empty { display: none; }
.alert { font-size: 14px; min-height: 22px; margin: 0; color: var(--color-accent-2-700); }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }

.check {
  display: flex; align-items: flex-start; gap: 8px; cursor: pointer;
  font-size: 15px; line-height: 24px; min-height: 44px;
}
.check input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.check .box {
  width: 16px; height: 16px; flex: none; margin-top: 4px; border-radius: var(--radius-md);
  border: 1.5px solid var(--leader);
}
.check:hover .box { border-color: var(--color-accent); }
.check input:checked + .box {
  border-color: var(--color-accent); background: var(--color-accent);
  box-shadow: inset 0 0 0 3px var(--color-bg);
}
.check input:focus-visible + .box { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* — tags — */
.tag {
  display: inline-flex; align-items: center; font-size: 11px;
  letter-spacing: 0.02em; padding: 3px 10px; border-radius: 1.5px;
}
.tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); }
.tag-accent-2 { background: var(--color-accent-2-100); color: var(--color-accent-2-800); }

/* — navigation — */
.nav {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-4);
  padding: var(--space-3) var(--gutter);
}
.nav-brand { display: flex; margin-right: auto; }
.nav-brand img { height: 44px; width: auto; margin-bottom: -8px; }
.nav a:not(.btn) { color: inherit; text-decoration: none; font-size: 14px; }
.nav a:not(.btn):hover { color: var(--color-accent); }
.nav-note { font-size: 14px; color: var(--text-70); }

/* — tables — */
.table-scroll { overflow-x: auto; }
.table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 15px; }
.table th {
  text-align: left; font-size: 11px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-60); padding: var(--space-2); border-bottom: 1px solid var(--color-divider);
}
.table td {
  padding: 14px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent);
}
.table tbody tr:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }
.table .med-name { display: block; font-weight: 600; font-size: 17px; }
.table .med-form { font-size: 13px; color: var(--text-70); }
.nowrap { white-space: nowrap; }

/* — print-plate type (cyan, magenta, yellow plates multiplied; plain ink where unsupported) — */
.cmyk-head { position: relative; display: block; }
.cmyk-head .paper {
  color: var(--color-bg);
  text-shadow: 0.027em 0.0185em 0 var(--color-bg), -0.0245em -0.0175em 0 var(--color-bg);
}
.cmyk-head .plate {
  position: absolute; inset: 0; mix-blend-mode: multiply;
  pointer-events: none; user-select: none; text-box: trim-both cap alphabetic;
}
.cmyk-num {
  position: relative; width: fit-content; line-height: 0.9;
  font-family: var(--font-heading); font-weight: 600; font-size: 96px;
  font-feature-settings: "pnum" 1;
  background: var(--color-bg); padding: 0.12em; margin: -0.12em;
}
.cmyk-num .paper {
  color: var(--color-bg);
  text-shadow: 0.036em 0.025em 0 var(--color-bg), -0.031em -0.023em 0 var(--color-bg);
}
.cmyk-num .plate { position: absolute; inset: 0.12em; mix-blend-mode: multiply; text-box: trim-both cap alphabetic; }
.plate-c { color: var(--color-accent); }
.plate-m { color: var(--color-accent-2); }
.plate-y { color: var(--color-process-yellow); }
.cmyk-head .plate-m { translate: 0.018em 0.0125em; }
.cmyk-head .plate-y { translate: -0.0155em -0.0115em; }
.cmyk-num .plate-m { translate: 0.036em 0.025em; }
.cmyk-num .plate-y { translate: -0.031em -0.023em; }
@supports not (mix-blend-mode: multiply) {
  .cmyk-head .paper, .cmyk-num .paper { color: var(--color-text); text-shadow: none; }
  .cmyk-head .plate, .cmyk-num .plate { display: none; }
}

/* — shared type and layout — */
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.kicker {
  display: block; margin: 0 0 20px;
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-70);
}
.body { font-size: 16px; line-height: 28px; color: var(--text-80); }
.note { font-size: 13px; line-height: 22px; color: var(--text-70); }
.h-section { font-size: clamp(30px, 4vw, 48px); line-height: 1.1; letter-spacing: -0.02em; max-width: 20ch; margin: 0 0 56px; }
.h-page { font-size: clamp(36px, 5vw, 56px); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 14px; }
.h-step { font-size: clamp(32px, 4vw, 46px); margin: 0 0 14px; }
.h-big { font-size: clamp(36px, 5vw, 60px); line-height: 1.08; margin: 0 0 20px; }
.h-sub { font-size: 22px; line-height: 28px; margin: 0 0 14px; }
.actions { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; }

/* index rows with dotted leaders */
.index-rule { height: 0; border: 0; border-top: 1px solid var(--color-text); margin: 0; }
.index-row { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 17px; line-height: 42px; }
.index-row .leader { flex: 1; min-width: 28px; border-bottom: 1px dotted var(--leader); }
.index-row .value { font-weight: 600; text-align: right; }
.index-row .value.price { font-size: 20px; color: var(--color-accent-2-700); }
.index-row .meta { font-size: 13px; color: var(--text-70); }
.track .index-row { font-size: 16px; line-height: 36px; color: var(--text-60); }
.track .index-row .leader { min-width: 20px; }
.track .index-row.is-now { color: var(--color-text); font-weight: 600; }
.track .index-row.is-done { color: var(--color-accent-700); }

/* — home — */
.hero { position: relative; min-height: min(86vh, 780px); display: flex; }
.hero-fig { position: absolute; inset: 0; overflow: hidden; background: var(--color-surface); }
.hero-fig .print { position: absolute; inset: -8px; } /* bleeds past the edge so the offset plates leave no colour fringe */
.hero-fig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-fig.cmyk .print { filter: url(#sep-all); }
.hero-fig.cmyk::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(0,0,0,0.22) 30%, transparent 32%);
  background-size: 3px 3px; mix-blend-mode: multiply;
}
.hero-inner {
  position: relative; z-index: 1; display: flex; align-items: flex-end; width: 100%;
  padding: var(--gutter) var(--gutter) 0;
}
.hero-panel {
  background: var(--color-bg); max-width: 720px;
  padding: clamp(24px, 4vw, 56px) clamp(24px, 4vw, 56px) clamp(24px, 3vw, 42px);
}
.hero h1 {
  font-size: clamp(40px, 6vw, 76px); line-height: 1.08; letter-spacing: -0.02em;
  margin: 0 0 0 -0.035em; text-box: trim-both cap alphabetic;
}
.hero-sub { font-size: 18px; line-height: 28px; max-width: 52ch; margin: 32px 0 0; }
.hero .actions { margin-top: 28px; }

.dateline { padding: 56px 0 42px; }
.dateline .rule-head { height: 5px; border: 0; margin: 0; border-top: 2px solid var(--color-text); border-bottom: 1px solid var(--color-text); }
.dateline p {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px 28px;
  margin: 0; padding: 14px 0;
  font-size: 13px; line-height: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-70);
}
.dateline .spot { color: var(--color-accent-2-700); }

.section { padding: 70px 0; scroll-margin-top: 20px; }
.treatments { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 42px clamp(28px, 4vw, 64px); }
.treatments h3 { font-size: 26px; line-height: 28px; margin: 0 0 14px; }
.treatments p { margin: 0 0 14px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 56px clamp(28px, 4vw, 56px); }
.steps h3 { font-size: 22px; line-height: 28px; margin: 28px 0 10px; }
.steps p { margin: 0; }
.cost { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 42px clamp(28px, 6vw, 96px); align-items: start; }
.cost h2 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 28px; }
.cost-index { padding-top: 34px; }
.cost-index .index-rule:first-child { margin-bottom: 14px; }
.cost-index .index-rule:last-child { margin-top: 14px; }
.closing { padding: 84px 0 70px; }
.closing h2 { max-width: 18ch; margin-bottom: 20px; }
.closing p { margin: 0 0 28px; max-width: 52ch; }

.footer {
  padding: 42px 0 56px; display: flex; flex-wrap: wrap; gap: 20px 56px; align-items: flex-start;
  font-size: 13px; line-height: 22px; color: var(--text-70);
}
.footer img { height: 40px; width: auto; }
.footer p { margin: 0; max-width: 64ch; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* — questionnaire and portal — */
.flow {
  max-width: 1200px; margin: 0 auto; padding: 42px var(--gutter) 84px;
  display: grid; gap: 42px clamp(28px, 6vw, 96px);
}
.flow-main { min-width: 0; max-width: 640px; }
.flow-main.wide { max-width: 680px; }
.flow-aside { max-width: 320px; }
.flow-aside .note { margin: 28px 0 0; }
.step-line { display: none; margin: 0; }
.intro { margin: 0 0 34px; }
.flow-actions { margin-top: 48px; }
.step-error { margin: 28px 0 -28px; }
@media (min-width: 860px) {
  .flow.two { grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); }
}
@media (max-width: 859px) {
  /* The step index collapses to one line on small screens. */
  .flow-aside.collapses .track, .flow-aside.collapses .note, .flow-aside.collapses .kicker { display: none; }
  .flow-aside.collapses .step-line { display: block; }
  .flow { gap: 28px; }
}

.page { max-width: 1200px; margin: 0 auto; padding: 42px var(--gutter) 84px; }
.login { max-width: 420px; padding-top: 28px; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 42px 56px; }
.split ol { margin: 0 0 20px; padding-left: 20px; }
.pay { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 42px clamp(28px, 6vw, 96px); align-items: start; }
.pay-form { max-width: 520px; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card-grid .span-2 { grid-column: span 2; }
.pay-summary { padding-top: 34px; max-width: 480px; }
.downloads { display: grid; gap: 42px clamp(28px, 6vw, 96px); margin-top: 84px; align-items: start; }
.downloads h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; margin: 0 0 14px; }
.downloads .index-row { line-height: 48px; }
.downloads .index-row a { font-weight: 600; font-size: 15px; white-space: nowrap; }
.downloads-list { min-width: 0; max-width: 680px; }
@media (min-width: 860px) { .downloads { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } }

.prose { max-width: 680px; }
.prose h2 { font-size: 22px; line-height: 28px; margin: 0 0 10px; }
.prose p { margin: 0 0 34px; }

.answers { margin: 0; }
.answers dt { font-size: 12px; color: var(--text-70); margin: 14px 0 2px; }
.answers dt:first-child { margin-top: 0; }
.answers dd { margin: 0; font-size: 16px; line-height: 28px; white-space: pre-line; }

/* — clinic — */
.clinic-grid { display: grid; gap: 42px clamp(28px, 6vw, 96px); align-items: start; }
@media (min-width: 960px) { .clinic-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); } }
.table tr.is-link { cursor: pointer; }
.code-box { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 16px; background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-md); padding: 10px 14px; word-break: break-all; user-select: all; }
.history p { margin: 0 0 14px; font-size: 15px; line-height: 24px; }
.history .meta { display: block; font-size: 13px; color: var(--text-70); }

/* Medication and clinic documents (clinic screen and patient portal) */
.h-form { font-size: 17px; line-height: 24px; margin: 0 0 14px; }
.med-item { padding: 10px 0; }
.med-item p { margin: 0; font-size: 16px; line-height: 26px; }
.med-item .med-name { font-weight: 600; font-size: 17px; margin-right: 8px; }
.med-item .meta { font-size: 13px; color: var(--text-70); }
.med-item.is-stopped .med-name, .med-item.is-stopped .med-dose { color: var(--text-70); }
.med-item .btn { margin: 0 14px 0 -5px; }
.med-item .med-name { overflow-wrap: anywhere; }
.clinic-items h2 { font-size: 22px; line-height: 28px; margin: 56px 0 14px; }
.clinic-items .table { min-width: 560px; }
.clinic-items .table td { white-space: pre-line; }
