/*
 * OPD Simple download site. Colours, radii and fonts follow the app's own tokens (src/styles/tokens.css):
 * clinical teal on grey-green neutrals, amber for waiting, green for done, lavender for "in consultation",
 * and system fonts only, so the page loads nothing from other sites.
 * Layout: grey-green ground with white bands for the practical parts (download, steps, questions) and one
 * dark band for contact; the hero pairs the pitch with a queue and a prescription drawn like the app.
 */
:root {
  --primary: #0f766e;
  --primary-hover: #0c5d56;
  --on-primary: #ffffff;
  --primary-50: #e9f4f1;
  --primary-100: #cfe7e1;

  --bg: #eef2f2;
  --surface: #ffffff;
  --surface-2: #f6f8f8;
  --border: #e3e9e8;
  --border-strong: #d3dedb;
  --text: #1a2422;
  --muted: #5d6b68;

  --violet: #4d59a6;
  --violet-50: #eef0f7;
  --amber: #a14a08;
  --amber-50: #fdf3e7;
  --green: #1b7a4e;
  --green-50: #e7f6ee;

  --ink: #0e1f1d;
  --on-ink: #f1f6f5;
  --on-ink-muted: #a9bcb8;

  --shadow-1: 0 1px 2px rgba(20, 40, 38, 0.05), 0 1px 1px rgba(20, 40, 38, 0.03);
  --shadow-3: 0 12px 32px rgba(20, 40, 38, 0.14), 0 24px 60px rgba(0, 0, 0, 0.1);
  --focus: 0 0 0 3px rgba(15, 118, 110, 0.35);

  --font-sans: system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --fs-sm: 0.8125rem;
  --fs-base: 1rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.625rem;
  --fs-2xl: clamp(1.75rem, 3.2vw, 2.25rem);
  --fs-hero: clamp(2.125rem, 5vw, 3.375rem);

  --r-sm: 6px;
  --r-md: 9px;
  --r-lg: 13px;
  --r-xl: 16px;
  --r-pill: 999px;

  --wrap: 72rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #5cc6b9;
    --primary-hover: #7dd4c9;
    --on-primary: #04201d;
    --primary-50: #12302c;
    --primary-100: #1d4540;
    --bg: #0e1615;
    --surface: #141f1d;
    --surface-2: #1a2725;
    --border: #24332f;
    --border-strong: #31443f;
    --text: #e2ebe9;
    --muted: #9fb1ad;
    --violet: #b9c0ef;
    --violet-50: #262b4a;
    --amber: #f2b768;
    --amber-50: #3a2a14;
    --green: #7fd6a6;
    --green-50: #12301f;
    --ink: #082a26;
    --on-ink: #eaf4f2;
    --on-ink-muted: #9cbcb6;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-3: 0 12px 32px rgba(0, 0, 0, 0.45), 0 24px 60px rgba(0, 0, 0, 0.35);
    --focus: 0 0 0 3px rgba(92, 198, 185, 0.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --primary: #5cc6b9;
  --primary-hover: #7dd4c9;
  --on-primary: #04201d;
  --primary-50: #12302c;
  --primary-100: #1d4540;
  --bg: #0e1615;
  --surface: #141f1d;
  --surface-2: #1a2725;
  --border: #24332f;
  --border-strong: #31443f;
  --text: #e2ebe9;
  --muted: #9fb1ad;
  --violet: #b9c0ef;
  --violet-50: #262b4a;
  --amber: #f2b768;
  --amber-50: #3a2a14;
  --green: #7fd6a6;
  --green-50: #12301f;
  --ink: #082a26;
  --on-ink: #eaf4f2;
  --on-ink-muted: #9cbcb6;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-3: 0 12px 32px rgba(0, 0, 0, 0.45), 0 24px 60px rgba(0, 0, 0, 0.35);
  --focus: 0 0 0 3px rgba(92, 198, 185, 0.45);
  color-scheme: dark;
}

*,
*::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;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  text-wrap: balance;
  letter-spacing: -0.01em;
}
h2 {
  font-size: var(--fs-2xl);
  font-weight: 700;
}
h3 {
  font-size: var(--fs-md);
  font-weight: 650;
}
p {
  margin: 0;
}
a {
  color: var(--primary);
}
code,
kbd {
  font-family: var(--font-mono);
  font-size: 0.875em;
}
kbd {
  padding: 0.05em 0.4em;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
}
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--r-sm);
}

/* bands and the shared side gutter */
.band {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.band--surface {
  background: var(--surface);
  border-block: 1px solid var(--border);
}
.band--ink {
  background: var(--ink);
  color: var(--on-ink);
}
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 40rem) {
  .wrap {
    padding-left: max(32px, env(safe-area-inset-left, 0px));
    padding-right: max(32px, env(safe-area-inset-right, 0px));
  }
}

.section-head {
  display: grid;
  gap: 0.5rem;
  max-width: 40rem;
  margin-bottom: 2rem;
}
.section-head p {
  color: var(--muted);
  font-size: var(--fs-md);
}

.eyebrow {
  color: var(--primary);
  font-size: var(--fs-sm);
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  min-height: 2.75rem;
  padding: 0.6rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn--sm {
  min-height: 2.25rem;
  padding: 0.35rem 0.9rem;
  font-size: var(--fs-sm);
}
.btn--lg {
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  font-size: var(--fs-md);
}
.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
}
.btn--primary:hover {
  background: var(--primary-hover);
}
.btn--ghost {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.btn--light {
  background: var(--on-ink);
  color: var(--ink);
}
.btn--light:hover {
  background: #ffffff;
}
.btn--outline-light {
  border-color: var(--on-ink-muted);
  color: var(--on-ink);
}
.btn--outline-light:hover {
  border-color: var(--on-ink);
}
@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}

/* top bar */
.band--top {
  padding-block: 0.875rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.topbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-size: var(--fs-md);
  font-weight: 700;
  text-decoration: none;
  margin-right: auto;
}
.brand__mark {
  width: 1.9rem;
  height: 1.9rem;
  color: var(--primary);
  flex: none;
}
:root[data-theme="dark"] .brand__mark path {
  fill: var(--on-primary);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand__mark path {
    fill: var(--on-primary);
  }
}
.topnav {
  display: flex;
  gap: 1.25rem;
}
.topnav a {
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 550;
  text-decoration: none;
}
.topnav a:hover {
  color: var(--text);
}
@media (max-width: 52rem) {
  .topnav {
    display: none;
  }
}

/* hero */
.hero {
  padding-block: clamp(2.5rem, 6vw, 5rem);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero__copy {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}
.hero h1 {
  font-size: var(--fs-hero);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.06;
}
.lede {
  max-width: 34rem;
  color: var(--muted);
  font-size: var(--fs-lg);
  line-height: 1.5;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}
.hero__note {
  color: var(--muted);
  font-size: var(--fs-sm);
}
@media (max-width: 56rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* hero mock: the app's queue and prescription */
.hero__visual {
  position: relative;
  min-width: 0;
  padding-bottom: 7.5rem;
}
.mock {
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-3);
}
.mock__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-sm);
}
.mock__dots {
  display: inline-flex;
  gap: 0.3rem;
}
.mock__dots i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--border-strong);
}
.mock__title {
  font-weight: 650;
}
.mock__meta {
  margin-left: auto;
  color: var(--muted);
}
.queue {
  display: grid;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
}
.queue__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.65rem 0.6rem;
  border-radius: var(--r-md);
}
.queue__row:first-child {
  background: var(--violet-50);
}
.queue__row--done {
  opacity: 0.72;
}
.token {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: var(--r-md);
  background: var(--primary-50);
  color: var(--primary);
  font-weight: 700;
  font-size: var(--fs-sm);
}
.queue__who {
  display: grid;
  min-width: 0;
}
.queue__who b {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.queue__who small {
  color: var(--muted);
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pill {
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.pill--violet {
  background: var(--violet-50);
  color: var(--violet);
  box-shadow: inset 0 0 0 1px currentColor;
}
.pill--amber {
  background: var(--amber-50);
  color: var(--amber);
}
.pill--green {
  background: var(--green-50);
  color: var(--green);
}

.mock--rx {
  position: absolute;
  right: -0.5rem;
  bottom: 0;
  width: min(23rem, 88%);
  padding: 0.9rem 1rem 0.6rem;
}
.rx__head {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.rx__symbol {
  color: var(--primary);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.5rem;
  line-height: 1;
}
.rx__line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.15rem 0.75rem;
  padding: 0.55rem 0;
  font-size: var(--fs-sm);
}
.rx__line + .rx__line {
  border-top: 1px dashed var(--border);
}
.rx__drug {
  font-weight: 600;
}
.rx__dose {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  justify-self: end;
}
.rx__dose b {
  color: var(--primary);
}
.rx__arrow,
.rx__dim,
.rx__dur {
  color: var(--muted);
}
.rx__dur {
  grid-column: 1 / -1;
  font-size: 0.75rem;
}
@media (max-width: 30rem) {
  .hero__visual {
    padding-bottom: 0;
    display: grid;
    gap: 0.75rem;
  }
  .mock--rx {
    position: static;
    width: auto;
  }
}

/* download */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 52rem) {
  .dl-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.dl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.4rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface-2);
}
.dl-card.is-yours {
  border-color: var(--primary);
  background: var(--primary-50);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.dl-card h3 {
  font-size: var(--fs-lg);
}
.dl-card__tag {
  align-self: flex-start;
  padding: 0.15rem 0.6rem;
  border-radius: var(--r-pill);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.dl-card__req {
  color: var(--muted);
  font-size: var(--fs-sm);
}
.dl-card__file {
  margin-bottom: 0.4rem;
  overflow-wrap: anywhere;
  font-size: var(--fs-sm);
}
.dl-card__file code {
  color: var(--text);
}
.dl-card .btn {
  margin-top: auto;
}
.dl-note {
  max-width: 46rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: var(--fs-sm);
}
.dl-note b {
  color: var(--text);
  font-weight: 600;
}

/* features */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem 1.75rem;
}
@media (max-width: 62rem) {
  .feat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 34rem) {
  .feat-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.feat {
  display: grid;
  align-content: start;
  gap: 0.4rem;
  padding-top: 1rem;
  border-top: 2px solid var(--primary-100);
}
.feat p {
  color: var(--muted);
}

/* getting started: a real sequence, so it is numbered */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
@media (max-width: 62rem) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 34rem) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
}
.step {
  display: grid;
  align-content: start;
  gap: 0.6rem;
  min-width: 0;
  counter-increment: step;
}
.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
}
.step p {
  color: var(--muted);
}
.step p b,
.step p code {
  color: var(--text);
}
.step q {
  color: var(--text);
  font-weight: 600;
  quotes: '“' '”';
}
.idbox {
  display: grid;
  gap: 0.3rem;
  margin-top: 0.3rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.idbox__label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}
.idbox__label i {
  font-weight: 400;
}
.idbox__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.idbox__row code {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.idbox__copy {
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 0.75rem;
  font-weight: 600;
}

/* your data */
.data-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 56rem) {
  .data-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.data-copy {
  display: grid;
  gap: 1.5rem;
  min-width: 0;
}
.facts {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.facts li {
  padding-left: 1rem;
  border-left: 2px solid var(--primary-100);
  color: var(--muted);
}
.facts b {
  color: var(--text);
}
.data-where {
  display: grid;
  gap: 1rem;
  min-width: 0;
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.where {
  display: grid;
  gap: 1.25rem;
}
.where h4 {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.where dl {
  display: grid;
  margin: 0;
}
.where dl > div {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.15rem 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm);
}
.where dt {
  font-weight: 600;
}
.where dd {
  margin: 0;
  min-width: 0;
}
.where code {
  overflow-wrap: anywhere;
}
@media (max-width: 26rem) {
  .where dl > div {
    grid-template-columns: minmax(0, 1fr);
  }
}
.data-tip {
  color: var(--muted);
  font-size: var(--fs-sm);
}

/* questions */
.faq {
  max-width: 52rem;
  border-top: 1px solid var(--border);
}
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 0.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  flex: none;
  color: var(--primary);
  font-size: 1.25rem;
  line-height: 1.2;
}
.faq details[open] summary::after {
  content: '–';
}
.faq details p {
  max-width: 44rem;
  padding: 0 0.25rem 1rem;
  color: var(--muted);
}
.faq details p b {
  color: var(--text);
}

/* contact */
.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}
.contact__copy {
  display: grid;
  gap: 0.6rem;
  max-width: 34rem;
}
.contact__copy p,
.contact__none {
  color: var(--on-ink-muted);
}
.contact__ways {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: 100%;
}
.contact__ways .btn span {
  font-weight: 500;
  overflow-wrap: anywhere;
}
.contact__none {
  max-width: 24rem;
}
.band--ink :focus-visible {
  box-shadow: 0 0 0 3px var(--on-ink-muted);
}

/* footer */
.band--foot {
  padding-block: 1.75rem;
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--on-ink-muted);
  font-size: var(--fs-sm);
}
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}
