/* The secondary pages of jyna.clinic (guides, privacy): the same stationery as the landing page, in a smaller kit.
   A letterhead band, the 2px rule down the margin with one mark per section, the section's name in the margin,
   Almarai, and the landing page's colour roles in both schemes (DESIGN.md, "The Doctor's Stationery"). */

:root {
  --ground: #faf7f8; --paper: #ffffff; --raised: #ffffff;
  --ink: #1d1216; --muted: #6e6468; --hairline: #eadfe3; --line: #8f8286;
  --band: #e3a2b6; --band-edge: #d48fa5; --band-ink: #1d1216; --band-soft: #55303d;
  --letterhead: #e3a2b6; --rose: #8a2846; --rose-deep: #6c1c35; --on-rose: #ffffff; --rose-text: #8a2846;
  --blush: #f8ecf0; --region: #f5e3e9;
  --saffron: #f29b32; --saffron-deep: #d97f16; --on-saffron: #1d1216;
  --ok: #1b7363; --ok-tint: #e4f2ef;
  --wa: #25d366; --on-wa: #06281a;
  --shadow-card: 0 4px 16px rgba(29, 18, 22, 0.08);
  --font: "Almarai", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --wrap: 68rem; --gutter: 16px; --margin: 7.5rem; --radius-md: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #191114; --paper: #21191c; --raised: #30282a;
    --ink: #f0e6e9; --muted: #c8babe; --hairline: #3a3034; --line: #8f8186;
    --band-edge: #b07689; --letterhead: #c98a9e; --rose: #a8445f; --rose-deep: #b85270; --rose-text: #ffa5b9;
    --blush: #3b2229; --region: #3b2229; --ok: #7dd0bd; --ok-tint: #173029;
    --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #191114; --paper: #21191c; --raised: #30282a;
  --ink: #f0e6e9; --muted: #c8babe; --hairline: #3a3034; --line: #8f8186;
  --band-edge: #b07689; --letterhead: #c98a9e; --rose: #a8445f; --rose-deep: #b85270; --rose-text: #ffa5b9;
  --blush: #3b2229; --region: #3b2229; --ok: #7dd0bd; --ok-tint: #173029;
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font); font-size: 1.0625rem; line-height: 1.65; overflow-x: clip; }
[hidden] { display: none !important; }
a { color: var(--rose-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--rose-deep); }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 50; background: var(--paper); color: var(--ink); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow-card); }
.skip:focus { top: 8px; }
.num, .ltr { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }

/* the band */
.band { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--band); color: var(--band-ink); border-bottom: 1px solid var(--band-edge); }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.band-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding-block: 8px; }
.brand { display: flex; align-items: baseline; gap: 10px; min-height: 44px; padding-block: 4px; text-decoration: none; color: inherit; min-width: 0; }
.brand-name { font-size: 1.5rem; font-weight: 800; line-height: 1.15; white-space: nowrap; }
.brand-line { color: var(--band-soft); font-size: 0.8125rem; font-weight: 700; line-height: 1.3; }
.band-acts { display: flex; align-items: center; gap: 6px; flex: none; }
.band-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 999px; color: inherit; font-size: 0.9375rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.band-link:hover { background: rgba(29, 18, 22, 0.08); color: inherit; }
.btn-band { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--band-ink); color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
@media (max-width: 720px) { .brand-line { display: none; } .btn-band { display: none; } }

/* the sheet: the rule down the margin, the marks, the margin names */
.sheet { position: relative; padding-block: 8px 48px; }
.spine { position: absolute; inset-block: 0; inset-inline-start: calc(var(--margin) - 1px); width: 2px; background: var(--letterhead); }
.sec { position: relative; display: grid; grid-template-columns: var(--margin) minmax(0, 1fr); padding-block: 36px 8px; }
.sec .mark { position: absolute; inset-inline-start: calc(var(--margin) - 8px); top: 48px; width: 16px; height: 16px; border-radius: 50%; background: var(--letterhead); box-shadow: 0 0 0 4px var(--ground); z-index: 2; }
.m { padding-inline-end: 24px; padding-top: 44px; }
.mname { margin: 0; color: var(--muted); font-size: 0.875rem; font-weight: 700; line-height: 1.3; text-align: end; max-width: 9rem; }
.t { min-width: 0; padding-inline-start: 24px; max-width: 42rem; }
@media (max-width: 720px) {
  :root { --margin: 1.25rem; }
  .sec { grid-template-columns: minmax(0, 1fr); padding-inline-start: 2.25rem; }
  .sec .mark { top: 40px; }
  .m { display: none; }
  .t { padding-inline-start: 0; }
}

/* type */
.crumbs { margin: 0 0 12px; color: var(--muted); font-size: 0.875rem; }
.crumbs a { color: inherit; }
h1 { margin: 0 0 10px; font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; }
h1 strong, h2 strong { font-weight: 800; }
.meta { color: var(--muted); font-size: 0.875rem; }
.lead { color: var(--muted); font-size: 1.1875rem; line-height: 1.55; margin: 12px 0 8px; }
h2 { margin: 36px 0 10px; font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.75rem); font-weight: 300; line-height: 1.3; }
h2::before { content: ""; display: block; width: 36px; height: 2px; background: var(--letterhead); margin-bottom: 12px; }
h3 { margin: 22px 0 6px; font-size: 1.0625rem; font-weight: 800; }
p { margin: 0 0 14px; }
ul, ol { padding-inline-start: 1.4em; margin: 0 0 14px; }
li { margin-bottom: 8px; }
li b { font-weight: 800; }
.check { list-style: none; padding: 0; }
.check li { position: relative; padding-inline-start: 30px; }
.check li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.35em; width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--line); }
table { width: 100%; border-collapse: collapse; margin: 6px 0 16px; font-size: 0.9375rem; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--hairline); text-align: start; vertical-align: top; }
th { color: var(--muted); font-size: 0.8125rem; font-weight: 700; }
tbody tr:last-child td { border-bottom: 2px solid var(--letterhead); }
.note { background: var(--blush); border-radius: var(--radius-md); padding: 14px 16px; margin: 6px 0 18px; }
.note p:last-child { margin: 0; }

/* questions */
details { border-top: 1px solid var(--hairline); }
details:last-of-type { border-bottom: 1px solid var(--hairline); }
summary { cursor: pointer; padding: 12px 0; font-weight: 800; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-weight: 300; font-size: 1.25rem; flex: none; }
details[open] summary::after { content: "−"; }
details p { margin: 0 0 14px; }

/* the calculator */
.calc { background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius-md); padding: 18px; box-shadow: var(--shadow-card); margin: 8px 0 20px; }
.calc .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 14px; }
.calc label { display: block; font-size: 0.875rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.calc input, .calc select { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--ground); color: var(--ink); font: inherit; }
.calc .out { margin-top: 16px; padding-top: 14px; border-top: 2px solid var(--letterhead); display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 12px; }
.calc .out div { display: flex; flex-direction: column; gap: 2px; }
.calc .out small { color: var(--muted); font-size: 0.8125rem; font-weight: 700; }
.calc .out b { font-size: 1.375rem; font-weight: 800; }
.calc .out .warn b { color: var(--rose-text); }
.calc .fine { color: var(--muted); font-size: 0.8125rem; margin: 12px 0 0; }

/* the call */
.cta { margin-top: 36px; background: var(--region); border-radius: var(--radius-md); padding: 22px 20px; }
.cta h2 { margin-top: 0; }
.cta h2::before { display: none; }
.acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-size: 1rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.btn-go { background: var(--saffron); color: var(--on-saffron); }
.btn-go:hover { background: var(--saffron-deep); color: var(--on-saffron); }
.btn-wa { background: var(--paper); color: var(--ink); border: 1px solid var(--hairline); }
.btn-wa:hover { color: var(--ink); border-color: var(--line); }
.wa-ic { width: 18px; height: 18px; color: var(--wa); }

/* the guides list */
.guides { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 14px; }
.guides li { margin: 0; }
.guides a { display: block; background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius-md); padding: 16px 18px; text-decoration: none; color: inherit; box-shadow: var(--shadow-card); }
.guides a:hover { border-color: var(--letterhead); }
.guides b { display: block; font-size: 1.125rem; font-weight: 800; margin-bottom: 4px; }
.guides span { color: var(--muted); }
.guides small { display: block; color: var(--muted); font-size: 0.8125rem; margin-top: 8px; }

/* sources */
.sources { font-size: 0.875rem; color: var(--muted); }
.sources li { margin-bottom: 4px; overflow-wrap: anywhere; }

/* the foot */
.foot { border-top: 2px solid var(--letterhead); padding-block: 28px 40px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 24px; color: var(--muted); font-size: 0.875rem; }
.foot ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 0; margin: 0; }
.foot li { margin: 0; }
.foot a { color: inherit; }
@media (forced-colors: active) { .btn, .calc input, .calc select, .guides a { border: 1px solid CanvasText; } }
