/* Clinica Store public pages: the app's Clinical Teal system (DESIGN.md),
   set for reading. Fonts are the app's own, served from this site. */
@font-face {
  font-family: "ClinicaSans";
  src: url("fonts/ReadexPro-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "ClinicaSans";
  src: url("fonts/ReadexPro-SemiBold.ttf") format("truetype");
  font-weight: 600 700;
  font-display: swap;
}
@font-face {
  font-family: "ClinicaArabic";
  src: url("fonts/Vazirmatn-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "ClinicaArabic";
  src: url("fonts/Vazirmatn-SemiBold.ttf") format("truetype");
  font-weight: 600 700;
  font-display: swap;
}

:root {
  --ground: #f1f3f0;
  --raised: #e6eae6;
  --ink: #0d1a19;
  --muted: #4a5a58;
  --teal: #0e4642;
  --on-teal: #ffffff;
  --on-teal-muted: #a9c4c0;
  --accent: #ff6b3d;
  --link: #0e4642;
  --todo: #fde7a6;
  --rule: #cfd8d4;
  --font: "ClinicaSans", system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0d1a19;
    --raised: #15302d;
    --ink: #e8eeec;
    --muted: #a9c4c0;
    --teal: #0a3532;
    --link: #8fd3c9;
    --todo: #5c4a12;
    --rule: #2a4442;
  }
}
:lang(ar),
:lang(ckb),
:lang(kmr) {
  --font: "ClinicaArabic", "ClinicaSans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 17px/1.65 var(--font);
  letter-spacing: 0;
}
.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding-inline: 16px;
}
a { color: var(--link); text-underline-offset: 0.18em; }
a:focus-visible, span:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.skip {
  position: absolute;
  inset-inline-start: 8px;
  top: -100px;
  background: var(--ink);
  color: var(--ground);
  padding: 8px 16px;
  border-radius: 999px;
}
.skip:focus { top: 8px; }

.band {
  background: var(--teal);
  color: var(--on-teal);
  padding: 20px 0 36px;
}
.band .wrap:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--on-teal);
  font: 600 18px/1 "ClinicaSans", system-ui, sans-serif;
  text-decoration: none;
  min-height: 44px;
}
.langs, .pages, .index, .choose {
  list-style: none;
  margin: 0;
  padding: 0;
}
.langs { display: flex; flex-wrap: wrap; gap: 4px; }
.langs a, .langs span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--on-teal);
  font-size: 15px;
  /* Each label is in its own script and font: centre them on one line. */
  line-height: 1;
}
.langs a { text-decoration: none; color: var(--on-teal-muted); }
.langs a:hover { color: var(--on-teal); }
.langs [aria-current] { background: var(--on-teal); color: var(--teal); font-weight: 600; }
h1 {
  margin: 32px 0 8px;
  font-size: clamp(30px, 7vw, 40px);
  line-height: 1.2;
  font-weight: 700;
}
.lead { margin: 0; color: var(--on-teal-muted); font-size: 18px; }

main { padding-top: 24px; padding-bottom: 48px; }
.draft {
  border-inline-start: 4px solid var(--accent);
  background: var(--raised);
  padding: 12px 16px;
  font-weight: 600;
}
.draft p { margin: 0; }
.draft p + p { margin-top: 6px; font-weight: 400; }
.updated { margin-top: 12px; color: var(--muted); font-size: 15px; }
h2 {
  margin: 40px 0 8px;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
}
p, ul, dl { margin: 0 0 14px; }
ul { padding-inline-start: 1.3em; }
li + li { margin-top: 6px; }
dl > div { padding: 12px 16px; }
dl > div:nth-child(odd) { background: var(--raised); }
dt { font-weight: 600; }
dd { margin: 2px 0 0; }
mark.todo {
  background: var(--todo);
  color: var(--ink);
  padding: 0 4px;
}
a[href^="mailto:"] { unicode-bidi: isolate; overflow-wrap: anywhere; }

.index li, .choose li { border-top: 1px solid var(--rule); }
.index a, .choose a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 56px;
  justify-content: center;
  padding: 10px 0;
  font-size: 19px;
  font-weight: 600;
  text-decoration: none;
}
.choose span { color: var(--muted); font-size: 15px; font-weight: 400; }

footer {
  border-top: 1px solid var(--rule);
  padding-top: 16px;
  padding-bottom: 32px;
  color: var(--muted);
  font-size: 15px;
}
.pages { display: flex; flex-wrap: wrap; gap: 0 20px; }
.pages a, .pages span { display: inline-flex; align-items: center; min-height: 44px; }
.pages [aria-current] { color: var(--ink); font-weight: 600; }
footer p { margin: 8px 0 0; }
