/* ==========================================================================
   CareClinic Open Portal — the Formulary Monograph
   --------------------------------------------------------------------------
   The public portal is set the way a clinician already reads: as a monograph
   in a national formulary, printed on insert stock, ruled rather than boxed,
   with one spot colour overprinting the ink.

   Rules to keep when extending this file:
     · No border-radius. Nothing here is a rounded card.
     · No drop shadows. Depth is a 2px spot-colour overprint offset, which is
       how a two-ink insert misregisters on cheap stock.
     · Structure is drawn with rules (hairline / ink / double), never with a
       filled panel that floats.
     · Momo Trust Sans sets the whole portal, display and running text alike.
       It is a variable weight axis (300-800) with NO width axis, so the scale
       separates roles by weight, size and tracking: 800 and tight tracking for
       the monograph head, 700 at 11-12px with .15em tracking for section marks
       and column heads, 400 at 17px for prose. Never add font-stretch here —
       it does nothing on this face and reads as a rule the type obeys.
     · Colour is the pinned palette only: navy-teal ink, spot teal, signal
       green, insert paper. One rust ink exists for genuine error states.
   ========================================================================== */

:root {
  /* ── Inks & stock ─────────────────────────────────────────────────────── */
  --ink:            #07222E;   /* navy-teal, the body ink                    */
  --ink-2:          #3B5560;   /* secondary text, tinted from the ink hue    */
  --ink-3:          #56686F;   /* tertiary: captions, placeholders, muted   */
                               /* 5.1:1 on the stock — it carries real text
                                  ("Not included", "Upcoming", placeholders),
                                  so it cannot sit at a decorative grey.     */
  --teal:           #0E6E78;   /* the spot colour                            */
  --teal-deep:      #0A545C;
  --green:          #1D6B3F;   /* the signal ink: available, included, on    */
  --rust:           #8C2F1E;   /* functional errors only                     */

  --paper:          #F2F0E9;   /* insert stock                               */
  --paper-2:        #E7E5DB;   /* the folded-under panel                     */
  --paper-mint:     #E2EAE5;   /* the tinted specimen band                   */
  --paper-white:    #FAF9F5;   /* the pasted-in slip                         */

  --rule:           #C7C3B5;   /* hairline                                   */
  --rule-soft:      #DCD8CC;
  --rule-ink:       var(--ink);

  /* On the ink field */
  --on-ink:         #E9EFEA;
  --on-ink-2:       #9FB4BB;
  --teal-lit:       #52C2C8;
  --green-lit:      #74C68F;

  /* ── Type ─────────────────────────────────────────────────────────────── */
  --face-display:   'Momo Trust Sans', 'Helvetica Neue', Arial, sans-serif;
  --face-text:      'Momo Trust Sans', 'Helvetica Neue', Arial, sans-serif;

  /* ── Metrics ──────────────────────────────────────────────────────────── */
  --pub-header-height: 62px;
  --pub-max-width:  1240px;
  --gutter:         28px;
  --measure:        68ch;

  /* Legacy names kept so any template still asking for them stays sane. */
  --md-sys-color-primary: var(--teal);
  --md-sys-color-on-primary: var(--paper);
  --md-sys-color-surface: var(--paper);
  --md-sys-color-on-surface: var(--ink);
  --md-sys-color-on-surface-variant: var(--ink-2);
  --md-sys-color-outline: var(--rule);
  --md-sys-color-outline-variant: var(--rule-soft);
  --md-sys-color-error: var(--rust);
  --md-sys-color-success: var(--green);
  --md-sys-color-background: var(--paper);
  --pub-radius-sm: 0; --pub-radius-md: 0; --pub-radius-lg: 0;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  /* Native checkboxes and radios are the one control the portal does not
     redraw, so hand them the spot colour rather than the OS blue. */
  accent-color: var(--teal);
}

html, body {
  margin: 0; padding: 0; min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--face-text);
  font-size: 17px;
  line-height: 1.58;
  font-synthesis-weight: none;
}

/* The stock. Insert paper is fibrous and laid, so the ground carries both: a
   tiled turbulence fibre and the laid lines. Drawn, never loaded — the SVG is
   inline, so the portal still makes no outbound request for it. */
body {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23f)' opacity='0.085'/%3E%3C/svg%3E"),
    repeating-linear-gradient(180deg, rgba(7,34,46,.035) 0 1px, transparent 1px 5px);
  background-size: 140px 140px, auto;
}

img { max-width: 100%; height: auto; }

/* Material Symbols, tuned to the hairline weight of the rules so the icons
   read as engraved marks rather than as app chrome. */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' -25, 'opsz' 24;
  vertical-align: middle;
}

/* ── Structural type roles ────────────────────────────────────────────────
   Everything typographic in the portal comes from one of these six. */

.mono-head,            /* the monograph head — once a page, at full measure */
h1 {
  font-family: var(--face-display);
  font-weight: 800;
  letter-spacing: -.032em;
  line-height: .95;
  text-wrap: balance;
  margin: 0;
  color: var(--ink);
}
.mono-head { font-size: clamp(38px, 6.2vw, 88px); text-transform: none; }

h2, .mono-h2 {
  font-family: var(--face-display);
  font-weight: 700;
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.06;
  letter-spacing: -.026em;
  text-wrap: balance;
  margin: 0;
  color: var(--ink);
}

h3, .mono-h3 {
  font-family: var(--face-display);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.24;
  letter-spacing: -.008em;
  margin: 0;
  color: var(--ink);
}

/* The column head of an insert: small tracked caps in the spot colour. */
.mono-label {
  display: block;
  font-family: var(--face-display);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}
.mono-label--ink  { color: var(--ink); }
.mono-label--pale { color: var(--on-ink-2); }

/* Codes, counts, quantities. Tabular figures, never a monospace costume. */
.mono-fig {
  font-family: var(--face-display);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }
.mono-prose { max-width: var(--measure); color: var(--ink-2); }
.mono-prose strong { color: var(--ink); font-weight: 600; }
.mono-lede {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.58;
  color: var(--ink-2);
  max-width: 62ch;
}

a { color: var(--teal-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

/* One focus ring for the whole portal: the spot colour, squared off. */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--ink); color: var(--paper);
  padding: 12px 20px; font-family: var(--face-display);
  font-weight: 700; font-size: 12px;
  letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ── The specimen band ────────────────────────────────────────────────────
   The strip along the top of a package insert carrying the document's own
   identity. It is the portal's masthead. */
.mono-band {
  background: var(--ink);
  color: var(--on-ink-2);
  border-bottom: 1px solid var(--ink);
}
.mono-band__inner {
  max-width: var(--pub-max-width); margin: 0 auto; padding: 7px var(--gutter);
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  font-family: var(--face-display); font-weight: 600;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
}
.mono-band__inner > * { display: inline-flex; align-items: center; gap: 8px; }
.mono-band__sep { color: var(--teal-lit); }
.mono-band a { color: var(--on-ink); text-decoration: none; }
.mono-band a:hover { color: var(--teal-lit); text-decoration: underline; }
.mono-band__right { margin-left: auto; }

/* ── Header ───────────────────────────────────────────────────────────── */
.pub-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}
.pub-header__inner {
  max-width: var(--pub-max-width); margin: 0 auto;
  height: var(--pub-header-height);
  padding: 0 var(--gutter);
  display: flex; align-items: stretch; gap: 0;
}
.pub-header__brand {
  display: flex; align-items: center; gap: 11px;
  text-decoration: none; flex-shrink: 0;
  padding-right: 24px; border-right: 1px solid var(--rule);
}
.pub-header__brand-icon { width: 26px; height: 26px; }
.pub-header__brand-name {
  font-family: var(--face-display);
  font-weight: 800; font-size: 20px;
  letter-spacing: -.015em; color: var(--ink); white-space: nowrap;
}
.pub-header__nav { display: flex; align-items: stretch; flex: 1; }
.pub-nav-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0 17px;
  font-family: var(--face-display); font-weight: 600;
  font-size: 12px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-2); text-decoration: none; white-space: nowrap;
  border-right: 1px solid var(--rule);
  position: relative;
}
.pub-nav-link .material-symbols-outlined { font-size: 17px; }
.pub-nav-link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 4px; background: var(--teal); transform: scaleX(0);
  transform-origin: left; transition: transform .22s cubic-bezier(.2,.8,.2,1);
}
.pub-nav-link:hover { color: var(--ink); text-decoration: none; }
.pub-nav-link:hover::after, .pub-nav-link--active::after { transform: scaleX(1); }
.pub-nav-link--active { color: var(--ink); }
.pub-header__actions { display: flex; align-items: center; margin-left: auto; padding-left: 20px; }
.pub-header__login {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--face-display); font-weight: 600;
  font-size: 12px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-2); text-decoration: none;
}
.pub-header__login:hover { color: var(--teal); text-decoration: none; }
.pub-header__menu-btn {
  display: none; background: none; border: 0; border-left: 1px solid var(--rule);
  cursor: pointer; padding: 0 4px 0 18px; color: var(--ink); line-height: 0;
  align-items: center;
}
.pub-mobile-nav {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 199;
  background: var(--paper); border-bottom: 2px solid var(--ink);
  display: flex; flex-direction: column;
}
.pub-mobile-nav[hidden] { display: none; }
.pub-mobile-nav__link {
  display: flex; align-items: center; gap: 14px;
  padding: 15px var(--gutter);
  border-top: 1px solid var(--rule);
  font-family: var(--face-display); font-weight: 600;
  font-size: 13px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-2); text-decoration: none;
}
.pub-mobile-nav__link:hover, .pub-mobile-nav__link--active { color: var(--teal); text-decoration: none; }
.pub-mobile-nav__cta { padding: 18px var(--gutter) 22px; border-top: 1px solid var(--rule); }

/* ── Buttons: the boxed prescription line ─────────────────────────────────
   A ruled box carrying the spot colour a hair out of register along its
   bottom and right edge — the way a two-ink insert misprints on cheap stock.
   Pressing the control drives the ink heavier, so the bands thicken. */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border: 2px solid var(--ink); border-radius: 0;
  background: var(--ink); color: var(--paper);
  font-family: var(--face-display); font-weight: 700;
  font-size: 13px; letter-spacing: .15em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .18s, color .18s, border-color .18s;
}
.btn::before, .btn::after {
  content: ''; position: absolute; background: var(--teal);
  transition: transform .2s cubic-bezier(.2,.8,.2,1);
}
.btn::before { left: 5px; right: -5px; bottom: -7px; height: 5px; transform-origin: top; }
.btn::after  { top: 5px; bottom: -7px; right: -7px; width: 5px; transform-origin: left; }
.btn:hover::before, .btn:focus-visible::before { transform: scaleY(1.7); }
.btn:hover::after,  .btn:focus-visible::after  { transform: scaleX(1.7); }
.btn:active::before { transform: scaleY(.4); }
.btn:active::after  { transform: scaleX(.4); }
.btn .material-symbols-outlined { font-size: 18px; }

.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--teal-deep); border-color: var(--teal-deep); color: var(--paper); }

.btn-outline, .btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover, .btn-secondary:hover,
.btn-outline:focus-visible, .btn-secondary:focus-visible { background: var(--paper-white); color: var(--teal-deep); }

.btn-sm { padding: 9px 15px; font-size: 11px; letter-spacing: .14em; }
.btn-sm::before { left: 4px; right: -4px; bottom: -6px; height: 4px; }
.btn-sm::after  { top: 4px; bottom: -6px; right: -6px; width: 4px; }

.btn[disabled], .btn.is-disabled {
  border-color: var(--rule); background: var(--paper-2); color: var(--ink-3);
  cursor: not-allowed; pointer-events: none;
}
.btn[disabled]::before, .btn[disabled]::after,
.btn.is-disabled::before, .btn.is-disabled::after { display: none; }

/* On the ink field the registration flips: paper box, lit-teal offset. */
.mono-field--ink .btn-primary { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.mono-field--ink .btn-primary:hover, .mono-field--ink .btn-primary:focus-visible { background: #fff; color: var(--teal-deep); border-color: #fff; }
.mono-field--ink .btn::before, .mono-field--ink .btn::after { background: var(--teal-lit); }
.mono-field--ink .btn-outline, .mono-field--ink .btn-secondary { color: var(--on-ink); border-color: var(--on-ink); background: transparent; }
.mono-field--ink .btn-outline:hover, .mono-field--ink .btn-secondary:hover,
.mono-field--ink .btn-outline:focus-visible, .mono-field--ink .btn-secondary:focus-visible { background: transparent; color: var(--teal-lit); border-color: var(--teal-lit); }

/* ── Layout ───────────────────────────────────────────────────────────── */
.pub-main { min-height: 60vh; }
.pub-container { max-width: var(--pub-max-width); margin: 0 auto; padding: 0 var(--gutter); }
.pub-section { padding: 64px 0; }
.pub-section--tight { padding: 34px 0; }

/* A ruled article field. The formulary's section: a numbered mark in a left
   rail, the content in the measure beside it. */
.mono-section { border-top: 2px solid var(--ink); padding: 0; }
.mono-section__inner {
  max-width: var(--pub-max-width); margin: 0 auto; padding: 46px var(--gutter) 58px;
  display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 34px;
}
.mono-section__mark { position: sticky; top: calc(var(--pub-header-height) + 26px); align-self: start; }
.mono-section__mark .mono-label { margin-bottom: 8px; }
.mono-section__mark-rule { display: block; height: 3px; background: var(--teal); width: 46px; }
.mono-section__body { min-width: 0; }
.mono-section__head { margin-bottom: 26px; }
.mono-section__head .mono-lede { margin-top: 14px; }

.mono-field--ink {
  background: var(--ink); color: var(--on-ink);
  border-top: 2px solid var(--ink);
}
.mono-field--ink h2, .mono-field--ink h3, .mono-field--ink .mono-head { color: var(--paper); }
.mono-field--ink .mono-prose, .mono-field--ink .mono-lede { color: var(--on-ink-2); }
.mono-field--ink .mono-prose strong { color: var(--paper); }
.mono-field--ink .mono-label { color: var(--teal-lit); }
.mono-field--ink a { color: var(--teal-lit); }
.mono-field--ink .mono-section__mark-rule { background: var(--teal-lit); }
/* Where the ground changes, the sheet has been folded: the crease catches a
   little light above the rule and holds a little shadow below it. This is the
   one place the flat world is allowed depth, because the fold is real. */
.mono-field--mint, .mono-field--fold {
  background-image: linear-gradient(180deg, rgba(7,34,46,.16) 0, rgba(7,34,46,0) 7px);
  background-repeat: no-repeat;
}
.mono-field--mint { background-color: var(--paper-mint); }
.mono-field--fold { background-color: var(--paper-2); }

/* ── The ruled list: the insert's real workhorse ──────────────────────── */
.mono-list { border-top: 1px solid var(--rule); }
.mono-row {
  display: grid; grid-template-columns: 132px minmax(0, 1fr) auto;
  gap: 22px; align-items: baseline;
  padding: 17px 0; border-bottom: 1px solid var(--rule);
}
.mono-row__term { color: var(--teal); }
.mono-field--ink .mono-row { border-color: rgba(233,239,234,.22); }
.mono-field--ink .mono-list { border-top-color: rgba(233,239,234,.34); }
.mono-row__detail { color: var(--ink-2); }
.mono-field--ink .mono-row__detail { color: var(--on-ink-2); }
.mono-row__value { color: var(--ink); font-family: var(--face-display); font-weight: 700; font-variant-numeric: tabular-nums; }
.mono-field--ink .mono-row__value { color: var(--paper); }
.mono-row--link { text-decoration: none; color: inherit; transition: background .15s; }
a.mono-row--link:hover { background: var(--paper-white); color: inherit; }
.mono-field--ink a.mono-row--link:hover { background: rgba(233,239,234,.06); }

/* ── The boxed warning ────────────────────────────────────────────────────
   An insert's black box: the thing you are not allowed to miss. */
.mono-box {
  border: 3px solid currentColor;
  padding: 26px 28px;
}
.mono-box__head {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 12px; margin-bottom: 16px;
  border-bottom: 1px solid currentColor;
}

/* ── Tables (reference ranges, presentation, pack sizes) ──────────────── */
.mono-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.mono-table caption { text-align: left; padding-bottom: 12px; }
.mono-table th, .mono-table td {
  text-align: left; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.mono-table thead th {
  border-bottom: 2px solid var(--ink);
  font-family: var(--face-display); font-weight: 700;
  font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--ink);
  white-space: nowrap;
}
.mono-table td { color: var(--ink-2); }
.mono-table td:first-child { color: var(--ink); font-weight: 600; }
.mono-table .is-num { font-family: var(--face-display); font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.mono-table tbody tr:hover { background: var(--paper-white); }

/* ── Cards, restated as pasted slips ──────────────────────────────────── */
/* A slip pasted onto the sheet: hairline box, its top edge inked. The weight
   difference between the hairline and the ink rule does the work an accent
   stripe would do elsewhere. */
.pub-card {
  background: var(--paper-white);
  border: 1px solid var(--rule);
  border-top: 1px solid var(--ink);
  border-radius: 0; padding: 22px;
  transition: border-top-color .18s, background .18s;
}
.pub-card:hover { border-top-color: var(--teal); background: #fff; }
.pub-card--flat, .pub-card--no-hover { background: transparent; }
.pub-card--no-hover:hover { border-top-color: var(--ink); background: transparent; }

.pub-grid { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.pub-grid > * { background: var(--paper); }
.pub-grid--2 { grid-template-columns: repeat(2, 1fr); }
.pub-grid--3 { grid-template-columns: repeat(3, 1fr); }
.pub-grid--auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.pub-grid--doctors { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }
.pub-grid .pub-card { border: 0; border-top: 1px solid transparent; background: var(--paper); }
.pub-grid .pub-card:hover { border-top-color: var(--teal); background: var(--paper-white); }

/* Doctor / clinic entries, set as index entries rather than avatar cards. */
.doc-card { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.doc-card__avatar {
  width: 62px; height: 62px; border-radius: 0;
  background: var(--paper-2); border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: var(--teal); margin-bottom: 14px; flex-shrink: 0;
  overflow: hidden;
}
.doc-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.doc-card__name {
  font-family: var(--face-display); font-weight: 700;
  font-size: 17px; color: var(--ink); margin: 0 0 5px;
}
.doc-card__spec {
  font-family: var(--face-display); font-weight: 700;
  font-size: 11px; color: var(--teal); text-transform: uppercase;
  letter-spacing: .15em; margin-bottom: 9px;
}
.doc-card__meta { font-size: 14px; color: var(--ink-2); flex: 1; margin-bottom: 16px; }
.clinic-card__name { font-family: var(--face-display); font-weight: 700; font-size: 18px; margin: 0 0 6px; }
.clinic-card__meta { font-size: 14px; color: var(--ink-2); margin-bottom: 14px; }

/* ── Search: a ruled entry line, not a pill ───────────────────────────── */
.pub-search {
  display: flex; gap: 0; align-items: stretch;
  background: var(--paper-white);
  border: 2px solid var(--ink); border-radius: 0;
}
.pub-search:focus-within { outline: 2px solid var(--teal); outline-offset: 3px; }
.pub-search__input {
  flex: 1; border: 0; outline: 0; background: transparent; min-width: 0;
  padding: 14px 18px; font-family: var(--face-text); font-size: 17px; color: var(--ink);
}
.pub-search__input::placeholder { color: var(--ink-3); }
.pub-search__btn {
  background: var(--ink); color: var(--paper); border: 0; border-radius: 0;
  padding: 0 22px; cursor: pointer;
  font-family: var(--face-display); font-weight: 700;
  font-size: 12px; letter-spacing: .15em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background .15s;
}
.pub-search__btn:hover { background: var(--teal-deep); }

/* ── Filter chips → ruled index tabs ──────────────────────────────────── */
.pub-filter-bar { display: flex; gap: 0; flex-wrap: wrap; align-items: stretch; margin-bottom: 26px; border-bottom: 1px solid var(--rule); }
.pub-filter-label { align-self: center; padding-right: 14px; font-family: var(--face-display); font-weight: 700; font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-3); }
.dept-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border: 0; border-radius: 0; background: transparent;
  font-family: var(--face-display); font-weight: 600;
  font-size: 12px; letter-spacing: .11em; text-transform: uppercase;
  color: var(--ink-2); text-decoration: none; cursor: pointer; white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.dept-chip:hover { color: var(--ink); text-decoration: none; border-bottom-color: var(--rule); }
.dept-chip--active { color: var(--teal); border-bottom-color: var(--teal); font-weight: 700; }

/* ── Chips / status marks ─────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 0; border: 1px solid currentColor;
  font-family: var(--face-display); font-weight: 700;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
}
.chip-primary { color: var(--teal); }
.chip-success { color: var(--green); }
.chip-warning { color: var(--rust); }

/* ── Pagination: page numbers of a bound document ─────────────────────── */
.pub-pagination {
  display: flex; align-items: stretch; justify-content: center;
  gap: 0; margin-top: 44px; flex-wrap: wrap;
  border-top: 1px solid var(--rule); padding-top: 18px;
}
.pub-page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 6px; border-radius: 0;
  font-family: var(--face-display); font-weight: 600;
  font-size: 14px; font-variant-numeric: tabular-nums;
  color: var(--ink-2); text-decoration: none;
  border-bottom: 3px solid transparent;
}
.pub-page-btn:hover { color: var(--ink); text-decoration: none; border-bottom-color: var(--rule); }
.pub-page-btn--active { color: var(--teal); border-bottom-color: var(--teal); font-weight: 800; }
.pub-page-btn--disabled { opacity: .35; pointer-events: none; }

/* ── Forms: ruled entry fields ────────────────────────────────────────── */
.form-group { margin-bottom: 22px; }
.form-label {
  display: block; margin-bottom: 7px;
  font-family: var(--face-display); font-weight: 700;
  font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--ink);
}
.form-label span.req { color: var(--rust); }
.form-control {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--rule); border-bottom: 2px solid var(--ink); border-radius: 0;
  background: var(--paper-white); color: var(--ink);
  font-family: var(--face-text); font-size: 17px; outline: 0;
  transition: border-color .15s, background .15s;
}
.form-control:focus { border-bottom-color: var(--teal); background: #fff; }
.form-control:disabled { background: var(--paper-2); color: var(--ink-3); }
.form-control::placeholder { color: var(--ink-3); }
select.form-control { font-family: var(--face-display); font-size: 15px; }
.form-hint { font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.form-error { font-size: 14px; color: var(--rust); margin-top: 6px; font-weight: 600; }

/* ── Booking step indicator: the dosage schedule ──────────────────────── */
.step-indicator {
  display: flex; align-items: stretch; gap: 0; margin: 0 0 36px; padding: 0;
  list-style: none; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.step-indicator__item {
  flex: 1; display: flex; align-items: center; gap: 10px;
  padding: 13px 12px; position: relative; min-width: 0;
}
.step-indicator__item:not(:last-child) { border-right: 1px solid var(--rule); }
.step-indicator__item::after { content: none; }
.step-indicator__dot {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--face-display); font-weight: 700; font-size: 12px;
  border: 1px solid var(--rule); background: transparent; color: var(--ink-3);
}
.step-indicator__item.done .step-indicator__dot { background: var(--teal); border-color: var(--teal); color: var(--paper); }
.step-indicator__item.active .step-indicator__dot { border-color: var(--ink); border-width: 2px; color: var(--ink); }
.step-indicator__label {
  font-family: var(--face-display); font-weight: 600;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.step-indicator__item.done .step-indicator__label { color: var(--ink-2); }
.step-indicator__item.active .step-indicator__label { color: var(--ink); font-weight: 700; }

/* ── Flash notices: the pasted-in errata slip ─────────────────────────── */
.flash-wrapper { max-width: var(--pub-max-width); margin: 0 auto; padding: 18px var(--gutter) 0; }
.flash {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 16px; margin-bottom: 10px;
  border: 1px solid currentColor; border-left-width: 1px;
  background: var(--paper-white);
  font-size: 16px;
}
.flash .material-symbols-outlined { flex-shrink: 0; }
.flash-success { color: var(--green); }
.flash-error   { color: var(--rust); }
.flash-info    { color: var(--teal-deep); }
.flash-warning { color: var(--rust); }

/* ── Content + sticky sidebar ─────────────────────────────────────────── */
.pub-split { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 40px; align-items: start; }
.pub-split__aside > .pub-card { position: sticky; top: calc(var(--pub-header-height) + 18px); }

/* ── Footer: the colophon ─────────────────────────────────────────────── */
.pub-footer {
  background: var(--ink); color: var(--on-ink-2);
  border-top: 2px solid var(--ink);
  padding: 62px 0 26px; margin-top: 0;
}
.pub-footer__inner { max-width: var(--pub-max-width); margin: 0 auto; padding: 0 var(--gutter); }
.pub-footer__grid {
  display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px;
  padding-bottom: 44px; border-bottom: 1px solid rgba(233,239,234,.24);
}
.pub-footer__brand {
  display: flex; align-items: center; gap: 11px; margin-bottom: 16px;
  color: var(--paper);
  font-family: var(--face-display); font-weight: 800; font-size: 20px;
  letter-spacing: -.015em;
}
.pub-footer__tagline { font-size: 16px; color: var(--on-ink-2); max-width: 30ch; margin-bottom: 22px; }
.pub-footer__col-title {
  margin-bottom: 18px; color: var(--teal-lit);
  font-family: var(--face-display); font-weight: 700;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
}
.pub-footer__links { display: flex; flex-direction: column; gap: 11px; }
.pub-footer__link { font-size: 16px; color: var(--on-ink-2); text-decoration: none; width: fit-content; }
.pub-footer__link:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.pub-footer__social { display: flex; gap: 10px; }
.pub-footer__social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: 1px solid rgba(233,239,234,.34); border-radius: 0;
  color: var(--on-ink-2);
  transition: background .15s, color .15s, border-color .15s;
}
.pub-footer__social-link:hover { background: var(--teal); border-color: var(--teal); color: var(--paper); }
.pub-footer__bottom {
  padding-top: 22px; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 14px;
}
.pub-footer__copy {
  margin: 0; color: var(--on-ink-2);
  font-family: var(--face-display); font-weight: 500;
  font-size: 12px; letter-spacing: .09em; text-transform: uppercase;
}
.pub-footer__copy a { color: var(--paper); }

/* ── Utilities kept from the incumbent vocabulary ─────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.text-primary { color: var(--teal); }
.text-muted   { color: var(--ink-2); }
.text-success { color: var(--green); }
.text-sm      { font-size: 15px; }
.w-100        { width: 100%; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 26px; }
.mt-1 { margin-top: 8px; }  .mt-2 { margin-top: 16px; }  .mt-3 { margin-top: 26px; }

.pub-section__heading {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
  padding-bottom: 12px; border-bottom: 2px solid var(--ink);
}
.pub-section__title { font-family: var(--face-display); font-weight: 700; font-size: 26px; margin: 0; letter-spacing: -.015em; }
.pub-section__viewall {
  font-family: var(--face-display); font-weight: 700;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal); display: inline-flex; align-items: center; gap: 5px;
  text-decoration: none; white-space: nowrap;
}
.pub-section__viewall:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1120px) {
  .pub-header__nav, .pub-header__actions { display: none; }
  .pub-header__menu-btn { display: inline-flex; margin-left: auto; }
  .pub-header__brand { border-right: 0; }
  .mono-section__inner { grid-template-columns: 116px minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 900px) {
  .pub-split { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .pub-split__aside > .pub-card { position: static; }
}
@media (max-width: 760px) {
  :root { --gutter: 20px; }
  .mono-section__inner { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 34px; padding-bottom: 42px; }
  .mono-section__mark { position: static; display: flex; align-items: center; gap: 12px; }
  .mono-section__mark .mono-label { margin-bottom: 0; }
  .mono-section__mark-rule { width: 30px; }
  .pub-grid--3, .pub-grid--2, .pub-grid--auto, .pub-grid--doctors { grid-template-columns: 1fr; }
  .pub-section { padding: 44px 0; }
  .pub-footer__grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .pub-footer__brand-col { grid-column: span 2; }
  .mono-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .mono-row__value { justify-self: start; }
  .step-indicator { flex-wrap: wrap; }
  .step-indicator__item { flex: 1 0 50%; border-bottom: 1px solid var(--rule); }
  .mono-band__inner { font-size: 10px; gap: 10px; letter-spacing: .14em; }
  .mono-band__right { margin-left: 0; }
}
@media (max-width: 460px) {
  .pub-footer__grid { grid-template-columns: 1fr; }
  .pub-footer__brand-col { grid-column: span 1; }
  .pub-footer__bottom { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; }
  .mono-table { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .btn:hover, .btn:active { transform: none; }
  .btn::before { transform: translate(5px, 5px) !important; }
}

@media print {
  .pub-header, .pub-mobile-nav, .mono-band, .pub-footer__social { display: none; }
  body { background: #fff; }
}
