@font-face { font-family: "Atkinson Hyperlegible"; src: url("/assets/fonts/atkinson-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/assets/fonts/atkinson-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/assets/fonts/fraunces-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  /* From the Dhruani logo: navy V, teal waves, gold "tag". Teal and gold are darkened or kept for decoration where text needs contrast. */
  --gold: #f2b300;
  --teal: #23457a;
  --teal-strong: #17325c;
  --teal-mid: #0e7469;
  --teal-soft: #e1ebf6;
  --teal-wash: #f1f6fb;
  --sand: #fbf7ea;
  --surface: #ffffff;
  --ink: #14243a;
  --muted: #46566a;
  --line: #cbd7e4;
  --field-line: #5a6a7d;
  --on-teal: #ffffff;
  --on-teal-muted: #d7e3f3;
  --link: #1d5596;
  --focus: #b54708;
  --ok: #0b6a4a;
  --ok-wash: #e1f4ec;
  --warn: #7a4d00;
  --warn-wash: #fbf0da;
  --bad: #a3341d;
  --bad-wash: #fbe9e4;
  --reading: #fff1c9;
  --reading-ink: #12303a;
  --heading: "Fraunces", Georgia, "Times New Roman", serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --teal: #23457a;
    --teal-strong: #17325c;
    --teal-mid: #5fd0bf;
    --teal-soft: #1a3150;
    --teal-wash: #121f33;
    --sand: #0f1a2b;
    --surface: #15243a;
    --ink: #eef3fa;
    --muted: #b9c7d9;
    --line: #34496a;
    --field-line: #8ea2bd;
    --link: #9cc3f2;
    --focus: #ffb35c;
    --ok: #8fe0bd;
    --ok-wash: #113c2e;
    --warn: #f2c675;
    --warn-wash: #3d2f10;
    --bad: #ffb3a1;
    --bad-wash: #47201a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; font: 400 1.125rem/1.65 "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--surface); }
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.55em; font-family: var(--heading); font-weight: 600; letter-spacing: -0.012em; color: var(--teal); text-wrap: balance; }
@media (prefers-color-scheme: dark) { h1, h2, h3 { color: var(--ink); } }
h1 { font-size: clamp(2.35rem, 5.6vw, 3.9rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.35rem; line-height: 1.25; }
p { margin: 0 0 1em; }
ul, ol { padding-inline-start: 1.3em; }
img, video { max-width: 100%; display: block; }
strong { font-weight: 700; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.reading { background: var(--reading) !important; color: var(--reading-ink) !important; box-shadow: 0 0 0 6px var(--reading); border-radius: 3px; }

/* Moved upward, not sideways, so it can't widen the page in right-to-left languages. */
.skip { position: absolute; inset-inline-start: 12px; top: 8px; transform: translateY(-300%); padding: 12px 18px; background: var(--surface); color: var(--link); font-weight: 700; z-index: 5; border-radius: 8px; }
.skip:focus { transform: none; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.eyebrow { font-weight: 700; letter-spacing: 0.02em; color: var(--teal-mid); margin-bottom: 0.5em; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 28px; min-height: 84px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-block; line-height: 0; border-radius: 6px; }
.brand img { height: 58px; width: auto; }
.site-nav ul { display: flex; gap: 6px 22px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: inline-block; padding: 9px 2px; font-weight: 700; color: var(--ink); text-decoration: none; border-bottom: 3px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--teal-mid); color: var(--link); }

.listen-bar { background: var(--teal-wash); border-bottom: 1px solid var(--line); }
.listen-bar .wrap { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.listen-bar .btn { min-height: 46px; padding: 8px 18px; font-size: 1rem; }
.listen-bar label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1rem; }
.listen-bar select { width: auto; min-height: 46px; padding: 6px 34px 6px 12px; font-size: 1rem; }
.listen-status { font-size: 1rem; color: var(--muted); }
.listen-controls { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.language-picker { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1rem; }
.language-picker select { width: auto; min-height: 44px; padding: 6px 12px; font-size: 1rem; }

/* Our web fonts cover English. Other languages use the device's own fonts, which read best. */
html:not([lang^="en"]) body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif; }
html:not([lang^="en"]) { --heading: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif; }
[dir="rtl"] .features li::before { transform: rotate(-45deg) scaleX(-1); }
.tag-callout { border: 2px solid var(--teal-mid); background: var(--surface); border-radius: 16px; padding: 24px 28px; margin-bottom: 26px; }
.tag-callout h2 { font-size: 1.5rem; }
.tag-callout ul { margin: 0; }
.tag-callout li { margin-bottom: 0.4em; }

section { padding: 72px 0; }
section.tint { background: var(--teal-wash); }
section.sand { background: var(--sand); }
section.deep { background: var(--teal-strong); color: var(--on-teal); }
section.deep h2, section.deep h3 { color: var(--on-teal); }
section.deep a:not(.btn) { color: var(--on-teal); }

.hero { background: var(--teal); color: var(--on-teal); padding: 76px 0; }
.hero h1 { color: var(--on-teal); }
.hero .eyebrow { color: var(--on-teal-muted); }
.hero a:not(.btn) { color: var(--on-teal); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 56px; align-items: center; }
.lead { font-size: clamp(1.2rem, 2.1vw, 1.42rem); line-height: 1.5; }
.hero .lead { color: var(--on-teal-muted); }
.section-lead { font-size: 1.22rem; color: var(--muted); max-width: 720px; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.steps + .actions { margin-top: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 12px 26px; border-radius: 10px; border: 2px solid var(--teal); background: var(--teal); color: var(--on-teal); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: background-color 0.15s, color 0.15s; }
.btn:hover { background: var(--teal-strong); border-color: var(--teal-strong); }
.btn.secondary { background: transparent; color: var(--link); border-color: var(--teal-mid); }
.btn.secondary:hover { background: var(--teal-soft); color: var(--link); }
.btn.on-dark { background: var(--on-teal); border-color: var(--on-teal); color: #23457a; }
.btn.on-dark:hover { background: var(--teal-soft); border-color: var(--teal-soft); color: #02343e; }
.btn.outline-light { background: transparent; border-color: var(--on-teal); color: var(--on-teal); }
.btn.outline-light:hover { background: rgba(255, 255, 255, 0.14); color: var(--on-teal); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.hero :focus-visible, section.deep :focus-visible { outline-color: #ffd28a; }

video { width: 100%; height: auto; border-radius: 14px; background: #02343e; aspect-ratio: 16 / 9; }
.video-note { margin-top: 10px; font-size: 1rem; }
.hero .video-note, .hero summary { color: var(--on-teal-muted); }
details { font-size: 1.02rem; }
summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
details p { margin-top: 8px; }

.steps { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
.steps li { counter-increment: step; background: var(--surface); padding: 28px; border-radius: 16px; border: 1px solid var(--line); }
.steps li::before { content: counter(step); display: flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 50%; background: var(--teal); color: var(--on-teal); font: 600 1.35rem var(--heading); margin-bottom: 16px; }
.spoken { margin: 34px 0 10px; padding: 26px 30px; border-inline-start: 6px solid var(--teal-mid); background: var(--surface); font-size: 1.24rem; line-height: 1.55; border-start-end-radius: 12px; border-end-end-radius: 12px; }
.small-note { font-size: 1rem; color: var(--muted); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: start; }
.features { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 14px; }
.features li { padding-inline-start: 38px; position: relative; }
.features li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 0.42em; width: 18px; height: 10px; border-left: 4px solid var(--teal-mid); border-bottom: 4px solid var(--teal-mid); transform: rotate(-45deg); }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 32px; }
.info-card { padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.info-card p:last-child { margin-bottom: 0; }

.downloads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 30px; }
.download { padding: 28px; border-radius: 16px; background: var(--surface); color: var(--ink); display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); }
.download h3, section.deep .download h3 { margin: 0; color: var(--ink); }
.download p { color: var(--muted); margin: 0; flex: 1; }
.badge { align-self: flex-start; margin-top: 14px; padding: 7px 14px; border-radius: 999px; background: var(--warn-wash); color: var(--warn); font-weight: 700; font-size: 0.98rem; }

.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 36px; }
.video-card { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 20px; min-width: 0; }
.video-card h3 { margin: 16px 6px 4px; }
.video-card .small-note, .video-card details { margin: 0 6px; }
.faq { margin-top: 26px; max-width: 800px; }
.faq details { border-bottom: 1px solid var(--line); padding: 10px 0; font-size: 1.125rem; }
.faq summary { padding: 10px 0; }

.site-footer { padding: 42px 0; background: var(--teal-strong); color: var(--on-teal-muted); font-size: 1.02rem; }
.site-footer a { color: var(--on-teal); }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 18px 40px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px 22px; flex-wrap: wrap; }
.site-footer p { margin: 0; max-width: 560px; }

/* Application form */
.page-intro { background: var(--teal); color: var(--on-teal); padding: 56px 0; }
.page-intro h1 { color: var(--on-teal); }
.page-intro .lead { color: var(--on-teal-muted); margin: 0; }
.apply-section { background: var(--teal-wash); padding: 44px 0 72px; }
.apply-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: clamp(22px, 4.5vw, 46px); }
.progress { list-style: none; padding: 0; margin: 0 0 30px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; font-size: 1rem; }
.progress li { padding-top: 10px; border-top: 5px solid var(--line); color: var(--muted); line-height: 1.25; }
.progress li.done { border-color: var(--ok); color: var(--ok); }
.progress li.current { border-color: var(--teal-mid); color: var(--ink); font-weight: 700; }
fieldset { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
fieldset + fieldset { margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--line); }
/* Floating the legend keeps it below the section divider instead of on top of it. */
legend { float: left; width: 100%; font: 600 1.5rem/1.2 var(--heading); color: var(--teal); padding: 0; margin-bottom: 18px; }
legend + * { clear: both; }
@media (prefers-color-scheme: dark) { legend { color: var(--ink); } }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 20px; min-width: 0; }
.field > label, .field-label { font-weight: 700; }
.hint { font-size: 1rem; color: var(--muted); line-height: 1.4; }
.field-error { font-size: 1rem; color: var(--bad); font-weight: 700; }
/* At least 16px text, so iPhones don't zoom in on a field. */
input, textarea, select { font: inherit; font-size: max(1.0625rem, 16px); min-height: 54px; padding: 12px 14px; border: 2px solid var(--field-line); border-radius: 10px; width: 100%; color: var(--ink); background: var(--surface); }
textarea { min-height: 96px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 1px; border-color: var(--focus); }
[aria-invalid="true"] { border-color: var(--bad); background: var(--bad-wash); }
.row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.notice { padding: 16px 18px; border-radius: 12px; margin: 0 0 24px; background: var(--teal-soft); }
.notice.ok { background: var(--ok-wash); color: var(--ok); }
.notice.bad { background: var(--bad-wash); color: var(--bad); }
.code-input { font-size: 1.7rem; letter-spacing: 0.25em; max-width: 260px; text-align: center; }
.form-end { margin-top: 10px; display: grid; gap: 16px; justify-items: start; }
.form-end .btn { min-width: 240px; }
[hidden] { display: none !important; }

/* Admin portal */
.card { border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-bottom: 18px; background: var(--surface); }
.card-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: start; }
.pill { padding: 3px 11px; border-radius: 999px; font-size: 0.92rem; font-weight: 700; background: var(--teal-soft); }
.pill.pass { background: var(--ok-wash); color: var(--ok); }
.pill.review { background: var(--warn-wash); color: var(--warn); }
.check-row { display: grid; grid-template-columns: 90px 150px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 1rem; align-items: start; }
.key-box { font: 700 1.4rem ui-monospace, Consolas, monospace; padding: 14px; background: var(--ok-wash); color: var(--ok); border-radius: 8px; text-align: center; overflow-wrap: anywhere; }
dl.facts { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 12px; font-size: 1rem; margin: 10px 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }

/* Prose pages */
.prose h2 { font-size: 1.6rem; margin-top: 1.6em; }

/* Pricing table and plan choices on the pharmacy page. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.table-scroll { overflow-x: auto; margin: 0 0 16px; }
.price-table { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
.price-table th, .price-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.price-table thead th { color: var(--muted); font-weight: 700; }
.choice { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 14px; }
.choice input { width: 24px; height: 24px; min-height: 0; flex: none; margin-top: 2px; accent-color: var(--teal); }
.choice label { font-weight: 400; }

@media (max-width: 860px) {
  section { padding: 52px 0; }
  .hero { padding: 48px 0; }
  .hero-grid, .two, .steps, .downloads, .card-grid, .video-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .wrap { padding: 0 18px; }
  .row, .pair { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .progress { font-size: 0.82rem; }
  .form-end .btn, .actions .btn { width: 100%; }
  .check-row { grid-template-columns: 70px minmax(0, 1fr); }
  .check-row > :last-child { grid-column: 1 / -1; }
  dl.facts { grid-template-columns: minmax(0, 1fr); }
  dl.facts dd { margin-bottom: 6px; }
  .brand img { height: 50px; }
  .apply-section { padding: 18px 0 40px; }
  .apply-section .wrap { padding: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
  .btn, .steps li, .info-card, .apply-card { border: 2px solid ButtonText; }
  .reading { outline: 3px solid Highlight; }
}

@media print {
  .site-nav, .listen-bar, video, .skip { display: none !important; }
  .hero, .page-intro, .site-footer { background: none; color: #000; }
  .hero h1, .page-intro h1 { color: #000; }
}

/* Licence uploads on the pharmacy application */
.doc-row { border: 1px solid var(--line, #d0d7e2); border-radius: 12px; padding: 14px 16px; margin: 0 0 16px; }
.doc-row legend { font-weight: 700; padding: 0 6px; }
.doc-state { margin: 6px 0 10px; }
.doc-state.ok { color: var(--ok); font-weight: 600; }
.doc-row input[type='file'] { max-width: 100%; }

/* Admin portal: uploaded documents on each application */
.documents { margin: 16px 0; }
.documents .doc { border-top: 1px solid var(--line); padding: 10px 0; }
.documents .doc.old { opacity: 0.6; }
.documents .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Sign-up agreements: one box each */
fieldset.agreements { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 0 0 18px; }
fieldset.agreements legend { font-weight: 700; padding: 0 6px; }
