/* Pharma Remit — pharmaremit.com
   Palette taken from the product mark: steel blue and gold on marble white.
   Gold is decorative only, never text, because it cannot carry contrast.
   Red is reserved strictly for Schedule H warnings. Rows are ruled like a
   register book rather than floated as cards. */

:root {
  color-scheme: light;

  --paper:      #F5F6F4;
  --card:       #FFFFFF;
  --ink:        #17293A;
  --ink-soft:   #4F6071;
  --ink-faint:  #7E8D9A;
  --brand:      #35597C;
  --brand-deep: #23405C;
  --brand-tint: #E8EEF4;
  --gold:       #B8914E;
  --gold-soft:  #E2D2B2;
  --red:        #B3261E;
  --red-tint:   #FBEBEA;
  --rule:       #D5DBE0;
  --rule-soft:  #E7EBEE;

  --measure: 64ch;
  --page: 1140px;

  --step--1: 0.875rem;
  --step-0:  1.0625rem;
  --step-1:  1.3125rem;
  --step-2:  1.625rem;
  --step-3:  2.125rem;
  --step-4:  2.75rem;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .wordmark, .stat-figure {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.125rem, 1.4rem + 3.1vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, var(--step-3)); }
h3 { font-size: var(--step-1); letter-spacing: -0.012em; }

p { margin: 0 0 1em; max-width: var(--measure); }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-deep); }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 2px;
}

.shell {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: 20px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 12px; top: 12px;
  z-index: 10;
  background: var(--brand);
  color: #fff;
  padding: 10px 14px;
  border-radius: 3px;
}

/* ---------- Header ---------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  flex-wrap: wrap;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--step-1);
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.025em;
}
.wordmark:hover { color: var(--ink); }
/* The product mark: a shield split steel blue and gold, with the cross */
.mark {
  width: 26px; height: 26px;
  flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3CclipPath id='l'%3E%3Crect x='0' y='0' width='12' height='24'/%3E%3C/clipPath%3E%3CclipPath id='r'%3E%3Crect x='12' y='0' width='12' height='24'/%3E%3C/clipPath%3E%3Cpath d='M12 1.4l8.6 3.2v7.6c0 4.7-3.6 8.9-8.6 10.6C7 21.1 3.4 16.9 3.4 12.2V4.6z' fill='%2335597C' clip-path='url(%23l)'/%3E%3Cpath d='M12 1.4l8.6 3.2v7.6c0 4.7-3.6 8.9-8.6 10.6C7 21.1 3.4 16.9 3.4 12.2V4.6z' fill='%23B8914E' clip-path='url(%23r)'/%3E%3Cpath d='M10.85 6.3h2.3v3.45h3.45v2.3h-3.45v3.45h-2.3V12.05H7.4V9.75h3.45z' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat;
}

.nav {
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: var(--step--1);
  padding-block: 6px;
}
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding-block: 4px;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--brand);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: var(--step-0);
  padding: 13px 24px;
  border-radius: 3px;
  text-decoration: none;
  border: 1px solid var(--brand);
  transition: background 120ms ease;
}
.btn:hover { background: var(--brand-deep); color: #fff; }

.btn-quiet {
  background: transparent;
  color: var(--brand);
  border-color: var(--rule);
}
.btn-quiet:hover { background: var(--brand-tint); color: var(--brand-deep); }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(40px, 7vw, 76px) clamp(36px, 6vw, 64px); }
.hero-grid {
  display: grid;
  gap: clamp(32px, 5vw, 56px);
  align-items: start;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1fr 1fr; align-items: center; }
}
.hero p.lead {
  font-size: var(--step-1);
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 34ch;
  margin-top: 20px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.hero-note {
  margin-top: 20px;
  font-size: var(--step--1);
  color: var(--ink-faint);
  max-width: 40ch;
}

/* ---------- The bill ---------- */

.bill-wrap { margin: 0; }
.bill {
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--gold);
  padding: 22px 22px 18px;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 1px 0 var(--rule-soft);
}
.bill-head { border-bottom: 1px solid var(--rule); padding-bottom: 12px; }
.bill-shop {
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.bill-meta { color: var(--ink-faint); font-size: 11.5px; margin-top: 3px; }
.bill-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-weight: 600;
  font-size: 12px;
}
.bill-title span:last-child { color: var(--ink-faint); font-weight: 400; }

.bill table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.bill th {
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  color: var(--ink-faint);
  padding: 6px 0;
  border-bottom: 1px solid var(--rule);
}
.bill td { padding: 7px 0; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.bill .num { text-align: right; white-space: nowrap; }
.bill .item { font-weight: 500; }
.bill .sub { color: var(--ink-faint); font-size: 11px; }
.bill .sub-stock { display: none; }

/* On a narrow screen the batch and expiry move under the item name */
@media (max-width: 580px) {
  .bill { padding: 18px 16px 14px; }
  .bill .sub-stock { display: block; }
  .bill .col-batch, .bill .col-exp { display: none; }
  .bill-totals { gap: 16px; flex-wrap: wrap; }
}

.rx {
  display: inline-block;
  background: var(--red-tint);
  color: var(--red);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 2px;
  margin-left: 6px;
  vertical-align: 1px;
}

.bill-totals {
  display: flex;
  justify-content: flex-end;
  gap: 28px;
  font-size: 11.5px;
  color: var(--ink-faint);
  padding-top: 10px;
}
.bill-grand {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 2px solid var(--ink);
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 18px;
}
.bill-foot {
  margin-top: 12px;
  font-size: 10.5px;
  color: var(--ink-faint);
}
.bill-caption {
  font-size: var(--step--1);
  color: var(--ink-faint);
  margin-top: 12px;
}

/* one staged reveal on load, nothing else moves */
@media (prefers-reduced-motion: no-preference) {
  .bill tbody tr, .bill-grand {
    animation: settle 420ms cubic-bezier(.2,.7,.3,1) both;
  }
  .bill tbody tr:nth-child(1) { animation-delay: 140ms; }
  .bill tbody tr:nth-child(2) { animation-delay: 220ms; }
  .bill tbody tr:nth-child(3) { animation-delay: 300ms; }
  .bill tbody tr:nth-child(4) { animation-delay: 380ms; }
  .bill-grand { animation-delay: 500ms; }
  @keyframes settle {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: none; }
  }
}

/* ---------- Sections ---------- */

.band { padding-block: clamp(44px, 6vw, 72px); border-top: 1px solid var(--rule); }
.band-tint { background: var(--brand-tint); border-top-color: transparent; }
.band-ink { background: var(--ink); color: var(--paper); border-top-color: transparent; }
.band-ink h2 { color: #fff; }
.band-ink p { color: #C7D2CB; }
.band-ink a { color: #fff; }

.band > .shell > h2 { max-width: 20ch; }
.section-intro {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: var(--step-1);
  line-height: 1.5;
  max-width: 54ch;
}

/* Ruled rows, like a register — not cards */
.ledger { margin-top: 36px; border-top: 1px solid var(--rule); }
.ledger-row {
  display: grid;
  gap: 6px 36px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 760px) {
  .ledger-row { grid-template-columns: 15.5rem 1fr; gap: 0 48px; }
}
.ledger-row h3 {
  color: var(--brand-deep);
  display: flex;
  gap: 11px;
  align-items: flex-start;
}
.ledger-row h3 svg {
  flex: none;
  width: 21px; height: 21px;
  margin-top: 2px;
  stroke: var(--brand);
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pairs h3 {
  display: flex;
  gap: 9px;
  align-items: center;
}
.pairs h3 svg {
  flex: none;
  width: 18px; height: 18px;
  stroke: var(--brand);
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Sections settle into place as you scroll past them */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 500ms cubic-bezier(.2,.7,.3,1), transform 500ms cubic-bezier(.2,.7,.3,1);
}
.reveal.shown { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
.ledger-row p { margin: 0; color: var(--ink-soft); }
.band-tint .ledger, .band-tint .ledger-row { border-color: #C9D8CE; }

.pairs {
  display: grid;
  gap: 28px 44px;
  margin-top: 36px;
}
@media (min-width: 720px) { .pairs { grid-template-columns: 1fr 1fr; } }
.pairs h3 { margin-bottom: 6px; }
.pairs p { margin: 0; color: var(--ink-soft); font-size: var(--step--1); line-height: 1.6; }

.plain { padding-left: 0; list-style: none; margin: 24px 0 0; }
.plain li {
  padding: 11px 0 11px 26px;
  border-bottom: 1px solid var(--rule);
  position: relative;
  max-width: var(--measure);
  color: var(--ink-soft);
}
.plain li::before {
  content: "";
  position: absolute;
  left: 3px; top: 17px;
  width: 6px; height: 11px;
  border-right: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(42deg);
}

.callout {
  border-left: 3px solid var(--red);
  background: var(--red-tint);
  padding: 18px 20px;
  margin-top: 28px;
  max-width: var(--measure);
}
.callout p { margin: 0; font-size: var(--step--1); color: #6B2520; }
.callout strong { color: var(--red); }

/* ---------- Prose pages ---------- */

.prose { padding-block: clamp(36px, 5vw, 60px); }
.prose h2 { margin-top: 44px; }
.prose h3 { margin-top: 28px; margin-bottom: 4px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-left: 20px; max-width: var(--measure); }
.prose li { margin-bottom: 7px; }
.prose .updated { color: var(--ink-faint); font-size: var(--step--1); }

/* ---------- Price ---------- */

.price-panel {
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--gold);
  padding: 32px;
  margin-top: 36px;
  max-width: 560px;
}
.price-figure {
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: var(--step-4);
  letter-spacing: -0.03em;
  line-height: 1;
}
.price-unit { color: var(--ink-faint); font-size: var(--step--1); margin-top: 8px; }

/* ---------- Footer ---------- */

.foot {
  border-top: 1px solid var(--rule);
  padding-block: 36px 48px;
  font-size: var(--step--1);
  color: var(--ink-faint);
}
.foot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 48px;
  justify-content: space-between;
}
.foot a { color: var(--ink-soft); text-decoration: none; }
.foot a:hover { color: var(--brand); text-decoration: underline; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; }
.foot p { margin: 0; max-width: 46ch; }
