/* =========================================================================
   SGNHC — concept website styles (v3: formal health-care finish)
   Layout concept: an official, quiet, left-aligned page. Typography carries the
   identity: Source Serif 4 / Noto Serif Devanagari headings over Source Sans 3 /
   Noto Sans Devanagari text. Colour only carries meaning: blue = action,
   crimson = emergency (and the logo), green = available. No decoration that
   is not information: no gradient washes, floating shadows, all-caps labels,
   monospace numbers or decorative arrows.
   ========================================================================= */
:root {
  /* Colour */
  --ink: #0E1C3B;
  --ink-2: #2A3A5E;
  --muted: #56637F;
  --line: #DDE3EE;
  --line-strong: #C2CBDC;
  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --surface-2: #EEF2F9;
  --blue: #1D3F95;
  --blue-tint: #E8EEFA;
  --crimson: #C4122F;
  --crimson-deep: #9C0C24;
  --crimson-tint: #FCECEF;
  --ok: #0B7A55;
  --ok-tint: #E2F3EB;
  --warn: #9A5800;
  --warn-tint: #FBF0DB;
  --focus: #2F6BFF;
  --grid-minor: rgba(196, 18, 47, .05);
  --grid-major: rgba(196, 18, 47, .10);

  /* Type */
  --font-display: "Source Serif 4", "Noto Serif Devanagari", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: var(--font-body); /* v3: numbers use the text face with tabular figures */
  --fs-xs: .8125rem;
  --fs-sm: .9rem;
  --fs-base: 1rem;
  --fs-md: 1.15rem;
  --fs-lg: 1.35rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.25rem;
  --fs-hero: clamp(2.1rem, 1.5rem + 2.2vw, 3.1rem);

  /* Shape & depth */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 10px;
  --r-pill: 999px;
  --shadow-1: none;
  --shadow-2: 0 10px 28px rgba(14, 28, 59, .14); /* overlays only: menus, drawer, modal, toast */

  /* Layout */
  --container: 1200px;
  --header-h: 72px;
}

html { font-size: 106.25%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html[data-textsize="sm"] { font-size: 93.75%; }
html[data-textsize="lg"] { font-size: 118.75%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
/* Default size for SG.icon() glyphs; component rules (.btn svg, .icon-badge svg …) override it. */
svg.ic { width: 1.25em; height: 1.25em; flex-shrink: 0; }
a { color: var(--blue); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; text-wrap: balance; color: var(--ink); }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; }
h3, h4 { font-family: var(--font-body); font-weight: 600; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-md); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
html[lang="ne"] h1, html[lang="ne"] h2 { line-height: 1.3; letter-spacing: 0; }
html[lang="ne"] body { line-height: 1.65; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
/* Plex Mono has no Devanagari digits: in Nepali, numbers use Mukta's tabular figures instead. */
html[lang="ne"] .mono { font-family: var(--font-body); font-weight: 600; letter-spacing: .01em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.xsmall { font-size: var(--fs-xs); }
.eyebrow { font-size: var(--fs-xs); font-weight: 600; text-transform: none; color: var(--crimson); }
html[lang="ne"] .eyebrow { letter-spacing: .02em; text-transform: none; font-size: var(--fs-sm); }
.lede { font-size: var(--fs-md); color: var(--ink-2); max-width: 62ch; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Layout helpers ------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * max(16px, 4vw));
  margin-inline: auto;
  padding-left: max(16px, 4vw, env(safe-area-inset-left, 0px));
  padding-right: max(16px, 4vw, env(safe-area-inset-right, 0px));
}
@media (min-width: 1360px) { .container { padding-left: 40px; padding-right: 40px; max-width: calc(var(--container) + 80px); } }
.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 12px); }
.grid { display: grid; gap: var(--gap, 20px); }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--min, 260px)), 1fr)); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.section { padding-block: clamp(48px, 7vw, 88px); }
.section-tight { padding-block: clamp(32px, 5vw, 56px); }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: 32px; }
.section-head .stack { --gap: 10px; max-width: 64ch; }

/* Skip link & concept ribbon ------------------------------------------- */
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-sm); }
.skip:focus { top: 12px; color: #fff; }
.ribbon { background: var(--blue-tint); color: var(--ink-2); font-size: var(--fs-xs); text-align: center; padding: 6px 16px; border-bottom: 1px solid var(--line); }
.ribbon strong { color: var(--blue); font-weight: 600; }

/* Utility bar ----------------------------------------------------------- */
.utility { background: var(--ink); color: #D9E0EE; font-size: var(--fs-sm); }
.utility-inner { display: flex; align-items: center; gap: 8px 24px; min-height: 40px; flex-wrap: wrap; padding-block: 4px; }
.utility a { color: #fff; text-decoration: none; }
.utility svg { width: 16px; height: 16px; }
.u-item { display: inline-flex; align-items: center; gap: 8px; }
.u-emergency { display: inline-flex; align-items: center; gap: 8px; background: var(--crimson); color: #fff !important; padding: 3px 12px 3px 10px; border-radius: var(--r-pill); font-weight: 600; }
.u-emergency .mono { font-weight: 500; }
.u-emergency:hover { background: var(--crimson-deep); }
.u-controls { margin-left: auto; display: inline-flex; align-items: center; gap: 12px; }
.textsize { display: inline-flex; border: 1px solid rgba(255,255,255,.25); border-radius: var(--r-sm); overflow: hidden; }
.textsize button { background: transparent; border: 0; color: #D9E0EE; padding: 2px 9px; cursor: pointer; line-height: 1.5; }
.textsize button + button { border-left: 1px solid rgba(255,255,255,.25); }
.textsize button[aria-pressed="true"] { background: rgba(255,255,255,.14); color: #fff; }
.lang-toggle { background: #fff; color: var(--ink); border: 0; border-radius: var(--r-pill); padding: 2px 12px; font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.lang-toggle svg { width: 15px; height: 15px; }
.lite-toggle { background: transparent; color: #D9E0EE; border: 1px solid rgba(255,255,255,.25); border-radius: var(--r-pill); padding: 2px 12px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; font-weight: 500; }
.lite-toggle svg { width: 15px; height: 15px; }
.lite-toggle[aria-pressed="true"] { background: #FFD9DF; border-color: #FFD9DF; color: var(--ink); font-weight: 600; }
/* Narrow screens: icon only, label kept for screen readers */
@media (max-width: 560px) { .lite-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }

/* Print-only header (shown when printing; see @media print below) */
.print-only { display: none; }

/* Lite (low-bandwidth) mode — Directive 2078, 4(3): system fonts, no decoration, no motion */
html[data-lite="1"] {
  --font-display: Georgia, "Noto Serif Devanagari", "Noto Sans Devanagari", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Devanagari", sans-serif;
  --font-mono: ui-monospace, Menlo, Consolas, "Noto Sans Devanagari", monospace;
  --shadow-1: none;
  --shadow-2: none;
}
html[data-lite="1"] *, html[data-lite="1"] *::before, html[data-lite="1"] *::after { animation: none !important; transition: none !important; }
html[data-lite="1"] .ecg-paper { background-image: none; }
html[data-lite="1"] .pulse-line { display: none; }
html[data-lite="1"] .site-header { backdrop-filter: none; background: var(--surface); }
@media (max-width: 760px) { .u-hours, .u-date { display: none; } .utility-inner { gap: 8px 12px; } }

/* Header & navigation -------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand-mark { width: 44px; height: 44px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; letter-spacing: -.005em; }
.brand-sub { font-size: var(--fs-xs); color: var(--muted); }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a, .nav-more > button { color: var(--ink); text-decoration: none; font-weight: 500; padding: 10px 12px; border-radius: var(--r-sm); background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.nav a:hover, .nav-more > button:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--crimson); box-shadow: inset 0 -2px 0 var(--crimson); border-radius: 0; }
.nav-more { position: relative; }
.nav-more svg { width: 16px; height: 16px; transition: transform .2s; }
.nav-more[data-open="true"] svg { transform: rotate(180deg); }
.nav-menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-2); padding: 8px; min-width: 260px; display: grid; gap: 2px; }
.nav-menu a { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 10px 12px; white-space: normal; }
.nav-menu a span { font-size: var(--fs-xs); color: var(--muted); font-weight: 400; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px; cursor: pointer; }
.menu-toggle svg { width: 24px; height: 24px; }
@media (max-width: 1140px) {
  .nav, .header-actions .portal-link { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 520px) { .header-actions .btn-primary { display: none; } .brand-sub { display: none; } }

/* Drawer (mobile nav) */
.drawer { position: fixed; inset: 0; z-index: 80; background: rgba(14,28,59,.45); display: flex; justify-content: flex-end; }
.drawer-panel { width: min(400px, 100%); height: 100%; background: var(--surface); overflow-y: auto; padding: 16px 20px 32px; display: flex; flex-direction: column; gap: 20px; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer nav { display: grid; gap: 2px; }
.drawer nav a { display: flex; align-items: center; justify-content: space-between; padding: 14px 8px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 500; font-size: var(--fs-md); }
.drawer nav a svg { width: 18px; height: 18px; color: var(--muted); }
.drawer nav a[aria-current="page"] { color: var(--crimson); }

/* Mobile action bar */
.actionbar { display: none; }
@media (max-width: 900px) {
  .actionbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 18px rgba(14,28,59,.08); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
  .actionbar a, .actionbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 10px; font-size: .74rem; font-weight: 600; color: var(--ink-2); text-decoration: none; background: none; border: 0; cursor: pointer; }
  .actionbar svg { width: 22px; height: 22px; }
  .actionbar .ab-primary { color: var(--crimson); }
  .actionbar a[aria-current="page"] { color: var(--crimson); }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}

/* Buttons --------------------------------------------------------------- */
.btn { --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  font-weight: 600; font-size: var(--fs-base); line-height: 1.2; text-decoration: none; cursor: pointer;
  background: var(--btn-bg); color: var(--btn-fg); border: 1.5px solid var(--btn-bd); border-radius: var(--r-sm);
  transition: background .15s, border-color .15s, transform .15s, box-shadow .15s; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn:hover { --btn-bd: var(--ink-2); color: var(--btn-fg); }
.btn:active { transform: translateY(1px); }
.btn-primary { --btn-bg: var(--crimson); --btn-fg: #fff; --btn-bd: var(--crimson); box-shadow: 0 6px 16px -6px rgba(196,18,47,.55); }
.btn-primary:hover { --btn-bg: var(--crimson-deep); --btn-bd: var(--crimson-deep); }
.btn-secondary { --btn-bg: var(--surface); --btn-fg: var(--blue); --btn-bd: var(--blue); }
.btn-secondary:hover { --btn-bg: var(--blue-tint); --btn-bd: var(--blue); }
.btn-dark { --btn-bg: var(--ink); --btn-fg: #fff; --btn-bd: var(--ink); }
.btn-dark:hover { --btn-bg: var(--ink-2); --btn-bd: var(--ink-2); }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--blue); padding-inline: 10px; }
.btn-ghost:hover { --btn-bg: var(--blue-tint); --btn-bd: transparent; }
.btn-lg { min-height: 54px; padding: 14px 24px; font-size: var(--fs-md); border-radius: 10px; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: var(--fs-sm); }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.link-arrow svg { width: 18px; height: 18px; transition: transform .15s; }
.link-arrow:hover svg { transform: translateX(3px); }

/* Pills, chips, source --------------------------------------------------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill-plain::before { display: none; }
.pill-ok { background: var(--ok-tint); color: var(--ok); }
.pill-warn { background: var(--warn-tint); color: var(--warn); }
.pill-full { background: var(--crimson-tint); color: var(--crimson-deep); }
.pill-info { background: var(--blue-tint); color: var(--blue); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 500; font-size: var(--fs-sm); cursor: pointer; color: var(--ink-2); white-space: nowrap; }
.chip:hover { border-color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.source { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--muted); font-weight: 500; }
.source::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(11,122,85,.45); } 70% { box-shadow: 0 0 0 7px rgba(11,122,85,0); } 100% { box-shadow: 0 0 0 0 rgba(11,122,85,0); } }

/* Cards ------------------------------------------------------------------ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px; }
.card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.card-link:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); transform: translateY(-2px); color: inherit; }
.icon-badge { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--crimson-tint); color: var(--crimson); flex-shrink: 0; }
.icon-badge svg { width: 24px; height: 24px; }
.icon-badge.blue { background: var(--blue-tint); color: var(--blue); }
.icon-badge.ok { background: var(--ok-tint); color: var(--ok); }

/* ECG paper + page hero -------------------------------------------------- */
.ecg-paper {
  background-color: var(--surface);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px;
  background-position: -1px -1px;
}
.page-hero { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--surface) 30%, rgba(255,255,255,.55) 100%); pointer-events: none; }
.page-hero > .container { position: relative; z-index: 1; padding-block: clamp(32px, 5vw, 56px); display: flex; flex-direction: column; gap: 14px; }
.page-hero h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--fs-sm); color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb span[aria-hidden] { opacity: .6; }


/* Forms ------------------------------------------------------------------ */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label { font-weight: 600; font-size: var(--fs-sm); color: var(--ink); }
.field .hint { font-size: var(--fs-xs); color: var(--muted); }
.field .error { font-size: var(--fs-xs); color: var(--crimson-deep); font-weight: 500; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 110px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%2356637F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-2); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29,63,149,.18); }
.input[aria-invalid="true"] { border-color: var(--crimson); }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.input-icon .input { padding-left: 44px; }
.search-lg .input { min-height: 56px; font-size: var(--fs-md); border-radius: 10px; }
.prefix-group { display: flex; }
.prefix-group .prefix { display: grid; place-items: center; padding: 0 12px; background: var(--surface-2); border: 1.5px solid var(--line-strong); border-right: 0; border-radius: var(--r-sm) 0 0 var(--r-sm); font-family: var(--font-mono); color: var(--ink-2); }
.prefix-group .input { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--crimson); margin-top: 3px; flex-shrink: 0; }
.radio-card { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.radio-card:hover { border-color: var(--ink-2); }
.radio-card input { accent-color: var(--crimson); width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; }
.radio-card:has(input:checked) { border-color: var(--crimson); background: var(--crimson-tint); }
.otp { display: flex; gap: 8px; }
.otp input { width: 48px; height: 56px; text-align: center; font-family: var(--font-mono); font-size: 1.4rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); }
.otp input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29,63,149,.18); }

/* Stepper ---------------------------------------------------------------- */
.stepper { display: grid; grid-template-columns: repeat(var(--steps, 4), 1fr); gap: 8px; counter-reset: step; list-style: none; }
.stepper li { display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-sm); color: var(--muted); font-weight: 500; }
.stepper li::before { content: ""; height: 4px; border-radius: 4px; background: var(--line); }
.stepper li[data-state="done"]::before { background: var(--ink); }
.stepper li[data-state="current"]::before { background: var(--crimson); }
.stepper li[data-state="current"] { color: var(--ink); font-weight: 600; }
.stepper li[data-state="done"] { color: var(--ink-2); }
.stepper .step-n { font-family: var(--font-mono); font-size: var(--fs-xs); }
@media (max-width: 560px) { .stepper li:not([data-state="current"]) .step-label { display: none; } }

/* Date strip & slots ----------------------------------------------------- */
.date-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(78px, 1fr); gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.date-btn { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 10px 6px; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); cursor: pointer; }
.date-btn .dow { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; text-transform: none; }
.date-btn .day { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.date-btn .bs { font-size: .72rem; color: var(--muted); }
.date-btn .avail { font-size: .72rem; font-weight: 600; color: var(--ok); }
.date-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.date-btn[aria-pressed="true"] .dow, .date-btn[aria-pressed="true"] .bs, .date-btn[aria-pressed="true"] .avail { color: #CFD8EA; }
.date-btn:disabled { opacity: .45; cursor: not-allowed; background: var(--surface-2); }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.slot { padding: 10px 6px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); font-family: var(--font-mono); font-size: var(--fs-sm); cursor: pointer; text-align: center; }
.slot:hover { border-color: var(--ink-2); }
.slot[aria-pressed="true"] { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.slot:disabled { background: var(--surface-2); color: var(--line-strong); text-decoration: line-through; cursor: not-allowed; border-color: var(--line); }

/* OPD token ticket ------------------------------------------------------- */
.ticket { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2); overflow: hidden; }
.ticket-top { padding: 24px; background: var(--ink); color: #fff; }
.ticket-top .label { color: #AFBCD6; font-weight: 500; }
.ticket-token { font-family: var(--font-mono); font-size: 3rem; font-weight: 500; line-height: 1; letter-spacing: .02em; }
.ticket-perf { position: relative; height: 0; border-top: 2px dashed var(--line-strong); margin-inline: 18px; }
.ticket-perf::before, .ticket-perf::after { content: ""; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }
.ticket-perf::before { left: -32px; }
.ticket-perf::after { right: -32px; }
.ticket-body { padding: 22px 24px 24px; display: grid; gap: 14px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; font-size: var(--fs-sm); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; text-align: right; }

/* Tables ----------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: var(--fs-xs); text-transform: none; color: var(--muted); font-weight: 600; background: var(--surface-2); position: sticky; top: 0; }
.table tr:last-child td { border-bottom: 0; }
.table td.r, .table th.r { text-align: right; }
.table tbody tr:hover { background: #FAFBFD; }

/* Tabs ------------------------------------------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs [role="tab"] { background: none; border: 0; padding: 12px 16px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--crimson); }
.tabs .count { font-family: var(--font-mono); font-size: var(--fs-xs); background: var(--surface-2); padding: 0 7px; border-radius: var(--r-pill); }
[role="tabpanel"] { padding-top: 24px; }

/* Accordion -------------------------------------------------------------- */
details.accordion { border-bottom: 1px solid var(--line); }
details.accordion summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 4px; cursor: pointer; font-weight: 600; font-size: var(--fs-md); }
details.accordion summary::-webkit-details-marker { display: none; }
details.accordion summary::after { content: "+"; font-family: var(--font-mono); font-size: 1.4rem; color: var(--crimson); line-height: 1; transition: transform .2s; }
details.accordion[open] summary::after { transform: rotate(45deg); }
details.accordion .acc-body { padding: 0 4px 20px; color: var(--ink-2); max-width: 70ch; }

/* Doctor card ------------------------------------------------------------ */
.doctor-card { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: 1fr auto; gap: 14px 16px; }
.avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; color: var(--blue); background: var(--blue-tint); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.avatar.crimson { color: var(--crimson); background: var(--crimson-tint); }
.avatar.ok { color: var(--ok); background: var(--ok-tint); }
.doctor-card h3 { font-size: var(--fs-md); }
.doctor-meta { font-size: var(--fs-sm); color: var(--muted); }
.opd-days { display: flex; gap: 4px; }
/* Off days: muted text on a dashed outline (WCAG AA contrast); OPD days: filled blue */
.opd-days span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; font-size: .7rem; font-weight: 600; background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); }
.opd-days span.on { border: 1px solid var(--blue-tint); }
.opd-days span.on { background: var(--blue-tint); color: var(--blue); }
.doctor-foot { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.doctor-foot > .btn { grid-column: 1 / -1; }
.doctor-foot .mono { white-space: nowrap; }
@media (max-width: 400px) { .doctor-foot { grid-template-columns: 1fr; } .doctor-foot > :nth-child(2) { text-align: left !important; } }

/* Meter ------------------------------------------------------------------ */
.meter { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 8px; background: var(--blue); }
.meter.warn > span { background: var(--warn); }
.meter.full > span { background: var(--crimson); }
.meter.ok > span { background: var(--ok); }

/* Notices ---------------------------------------------------------------- */
.notice-list { list-style: none; display: grid; }
.notice-list li { display: grid; grid-template-columns: 76px 1fr auto; gap: 16px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.notice-list li:first-child { padding-top: 0; }
.notice-date { display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: var(--r-sm); background: var(--surface-2); line-height: 1.15; }
.notice-date .d { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; }
.notice-date .m { font-size: var(--fs-xs); text-transform: none; color: var(--muted); font-weight: 600; }
.notice-list a.title { color: var(--ink); text-decoration: none; font-weight: 600; }
.notice-list a.title:hover { color: var(--blue); text-decoration: underline; }
@media (max-width: 560px) { .notice-list li { grid-template-columns: 60px 1fr; } .notice-list li > :last-child:not(:nth-child(2)) { grid-column: 2; } }

/* Stats ------------------------------------------------------------------ */
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .v { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .l { font-size: var(--fs-sm); color: var(--muted); }

/* Callouts --------------------------------------------------------------- */
.callout { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r-md); background: var(--blue-tint); color: var(--ink-2); font-size: var(--fs-sm); }
.callout svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--blue); margin-top: 2px; }
.callout.warn { background: var(--warn-tint); }
.callout.warn svg { color: var(--warn); }
.callout.ok { background: var(--ok-tint); }
.callout.ok svg { color: var(--ok); }
.callout.crimson { background: var(--crimson-tint); }
.callout.crimson svg { color: var(--crimson); }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); display: grid; gap: 8px; justify-items: center; }
.empty svg { width: 36px; height: 36px; color: var(--line-strong); }

/* Modal & toast ---------------------------------------------------------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(14,28,59,.5); display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-2); width: min(720px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-body { padding: 24px; }
.icon-btn { background: none; border: 1px solid var(--line); border-radius: var(--r-sm); width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); flex-shrink: 0; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--surface-2); }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); z-index: 95; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-md); box-shadow: var(--shadow-2); font-weight: 500; opacity: 0; transition: opacity .2s, transform .2s; display: flex; gap: 10px; align-items: center; max-width: calc(100% - 32px); }
.toast svg { width: 18px; height: 18px; color: #7FE0B8; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 900px) { .toast { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); } }

/* Footer ----------------------------------------------------------------- */
.site-footer { background: var(--ink); color: #C9D2E4; font-size: var(--fs-sm); margin-top: 0; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; padding-block: 56px 40px; }
.footer-grid h4 { color: #fff; font-size: var(--fs-sm); text-transform: none; margin-bottom: 14px; }
html[lang="ne"] .footer-grid h4 { text-transform: none; letter-spacing: 0; font-size: var(--fs-base); }
.footer-grid ul { list-style: none; display: grid; gap: 8px; }
.footer-brand { display: grid; gap: 14px; align-content: start; }
.footer-brand .brand { color: #fff; }
.footer-brand .brand-sub { color: #AFBCD6; }
.footer-contact { display: grid; gap: 6px; }
.footer-systems { border-top: 1px solid rgba(255,255,255,.12); padding-block: 18px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.footer-systems span.sys { border: 1px solid rgba(255,255,255,.2); border-radius: var(--r-pill); padding: 2px 10px; font-size: var(--fs-xs); color: #DCE3F0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-block: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: var(--fs-xs); color: #AFBCD6; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* =========================================================================
   Home page
   ========================================================================= */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 0% 0%, var(--surface) 35%, rgba(255,255,255,.6) 70%, rgba(255,255,255,.2) 100%); }
.hero .pulse-line { bottom: 0; height: 110px; z-index: 1; }
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: clamp(28px, 4vw, 56px); padding-block: clamp(36px, 5vw, 72px) 120px; align-items: start; }
.hero-copy { display: flex; flex-direction: column; gap: 20px; }
.hero h1 { font-size: var(--fs-hero); font-weight: 600; line-height: 1.04; letter-spacing: -.02em; max-width: 15ch; }
html[lang="ne"] .hero h1 { line-height: 1.25; max-width: 18ch; }
.hero h1 em { font-style: normal; color: var(--crimson); }
.hero .lede { font-size: var(--fs-md); }
.task-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.task { display: grid; grid-template-columns: 44px 1fr 20px; gap: 4px 14px; align-items: center; padding: 16px 16px 16px 14px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; box-shadow: var(--shadow-1); }
.task:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-2); color: var(--ink); }
.task .icon-badge { grid-row: span 2; }
.task strong { font-size: var(--fs-md); font-weight: 600; line-height: 1.2; }
.task small { font-size: var(--fs-sm); color: var(--muted); line-height: 1.35; grid-column: 2; }
.task > svg { grid-row: 1 / span 2; grid-column: 3; width: 20px; height: 20px; color: var(--muted); }
.task.primary { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.task.primary small, .task.primary > svg { color: #FFD9DF; }
.task.primary .icon-badge { background: rgba(255,255,255,.16); color: #fff; }
.task.primary:hover { background: var(--crimson-deep); border-color: var(--crimson-deep); color: #fff; }
.hero-offline { font-size: var(--fs-sm); color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hero-offline svg { width: 16px; height: 16px; }

.today { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2); overflow: hidden; }
.today-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.today-head h2 { font-family: var(--font-body); font-size: var(--fs-md); font-weight: 600; }
.today-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.today-row:last-of-type { border-bottom: 0; }
.today-row .k { font-size: var(--fs-sm); color: var(--muted); }
.today-row .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.today-row .big { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; line-height: 1.1; }
.today-row .meter { grid-column: 1 / -1; margin-top: 6px; }
.today-emergency { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; background: var(--crimson-tint); color: var(--crimson-deep); font-weight: 600; flex-wrap: wrap; }
.today-emergency .mono { font-size: 1.15rem; }
.today-emergency a { color: var(--crimson-deep); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.today-emergency svg { width: 18px; height: 18px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; list-style: none; counter-reset: s; }
.steps li { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.steps li .n { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--crimson); font-weight: 500; }
.steps li h3 { font-size: var(--fs-lg); font-family: var(--font-display); font-weight: 600; }
.pay-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.pay-row span { font-size: var(--fs-xs); font-weight: 600; padding: 3px 9px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink-2); }
.sms { background: var(--surface-2); border-radius: 14px 14px 14px 4px; padding: 12px 14px; font-size: var(--fs-sm); color: var(--ink-2); margin-top: auto; }
.sms b { font-family: var(--font-mono); font-weight: 500; color: var(--ink); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.spec-card { display: flex; flex-direction: column; gap: 10px; padding: 24px; }
.spec-card h3 { font-size: var(--fs-lg); font-family: var(--font-display); font-weight: 600; }
.spec-card p { color: var(--ink-2); font-size: var(--fs-sm); }
.spec-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.spec-card .tags span { font-size: var(--fs-xs); color: var(--muted); background: var(--surface-2); padding: 2px 8px; border-radius: 6px; }

.free-care { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.free-care-copy { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: 16px; background: var(--ink); color: #D9E0EE; }
.free-care-copy h2 { color: #fff; font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.25rem); }
.free-care-copy .eyebrow { color: #FF8C9D; }
.free-care-copy ul { list-style: none; display: grid; gap: 10px; }
.free-care-copy li { display: flex; gap: 10px; }
.free-care-copy li svg { width: 20px; height: 20px; color: #7FE0B8; flex-shrink: 0; margin-top: 3px; }
.free-care-form { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; gap: 16px; }
.result { border-radius: var(--r-md); padding: 16px 18px; display: grid; gap: 6px; }
.result.ok { background: var(--ok-tint); }
.result.info { background: var(--blue-tint); }
.result strong { font-size: var(--fs-md); }
@media (max-width: 860px) { .free-care { grid-template-columns: 1fr; } }

.visit-band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.visit-band > div { padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.visit-band > div + div { border-left: 1px solid var(--line); }
.hours { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; font-size: var(--fs-sm); }
.hours dt { color: var(--ink-2); }
.hours dd { margin: 0; font-family: var(--font-mono); font-size: var(--fs-xs); align-self: center; text-align: right; }
.checklist { list-style: none; display: grid; gap: 8px; font-size: var(--fs-sm); }
.checklist li { display: flex; gap: 10px; }
.checklist svg { width: 18px; height: 18px; color: var(--ok); flex-shrink: 0; margin-top: 3px; }
@media (max-width: 860px) { .visit-band { grid-template-columns: 1fr; } .visit-band > div + div { border-left: 0; border-top: 1px solid var(--line); } }

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 28px 0 0; border-top: 1px solid var(--line); margin-top: 8px; }
@media (max-width: 760px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .task-grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   Print — Directive 2078, 4(3)(च): printer-friendly pages
   ========================================================================= */
@media print {
  .ribbon, .utility, .site-header, .actionbar, .drawer, .footer-grid, .footer-systems, .skip, .btn, .menu-toggle, .toast { display: none !important; }
  .print-only { display: block !important; }
  .print-head { font-size: 10pt; border-bottom: 1px solid #000; padding-bottom: 6pt; margin-bottom: 10pt; }
  :root { --bg: #fff; --surface: #fff; --surface-2: #f2f2f2; --ink: #000; --ink-2: #111; --muted: #333; }
  body { background: #fff; color: #000; padding-bottom: 0 !important; font-size: 11pt; }
  .ecg-paper { background: none !important; }
  .pulse-line, .page-hero::after, .hero::after { display: none !important; }
  .card, .today, .ticket, .task { box-shadow: none !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; color: #333; }
  tr, .card, .ticket, .callout { break-inside: avoid; }
  .site-footer { background: #fff; color: #000; }
  .site-footer a { color: #000; }
}

/* =========================================================================
   v2 shell additions — search panel, important links, social, policy row
   ========================================================================= */
.search-btn { width: 44px; height: 44px; }
.search-panel { border-top: 1px solid var(--line); background: var(--surface); padding-block: 14px; box-shadow: var(--shadow-1); }
.site-search { display: flex; gap: 8px; align-items: stretch; }
.site-search .input-icon { flex: 1; min-width: 0; }
.drawer .site-search .btn { padding-inline: 14px; }
.footer-grid { grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-social { border-top: 1px solid rgba(255,255,255,.12); padding-block: 14px; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.footer-social a { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.footer-social svg { width: 15px; height: 15px; }
.footer-policy-row { border-top: 1px solid rgba(255,255,255,.12); padding-block: 14px; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: var(--fs-sm); }
#last-updated { margin: 0; }
.header-actions .btn { white-space: nowrap; }
/* Narrow desktops: "My reports" becomes icon-only (name kept for screen readers) so the row never wraps */
@media (max-width: 1360px) { .portal-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
.formats { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); background: var(--surface-2); padding: 2px 9px; border-radius: 6px; white-space: nowrap; }
.formats svg { width: 14px; height: 14px; color: var(--muted); }
.tbs { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--warn); background: var(--warn-tint); padding: 2px 9px; border-radius: var(--r-pill); }
.jump-links { display: flex; flex-wrap: wrap; gap: 8px; }
.today-emergency .er-first { flex-basis: 100%; font-weight: 500; font-size: var(--fs-sm); }
.notice-list li.q-head { display: block; padding: 18px 0 6px; border-bottom: 0; }
.notice-list li.q-head:first-child { padding-top: 0; }
.notice-list h3.quarter { font-size: var(--fs-base); color: var(--blue); }
.jump-links a.chip { text-decoration: none; }

/* =========================================================================
   v3 formal finish — overrides that remove templated decoration
   ========================================================================= */
/* Spacing set on a layout must not leak into nested stacks */
@property --gap { syntax: '<length>'; inherits: false; initial-value: 16px; }
.stack, .cluster, .grid { gap: var(--gap); }

/* Reading size: 18px on phones; Nepali gets more line spacing and no tracking */
@media (max-width: 640px) { html { font-size: 112.5%; } }
html[lang="ne"] body, html[lang="ne"] .lede, html[lang="ne"] p { line-height: 1.75; }
html[lang="ne"] h1, html[lang="ne"] h2, html[lang="ne"] h3 { line-height: 1.4; letter-spacing: 0; }
h1, h2 { font-weight: 600; letter-spacing: -.005em; }
.mono, .num { font-variant-numeric: tabular-nums lining-nums; letter-spacing: 0; }

/* No decorative surfaces: page tops are plain, separated by a rule */
.ecg-paper { background-image: none; background-color: var(--surface); }
.page-hero::after, .hero::after { content: none; background: none; }
.hero { background: var(--surface); }
.hero-inner { padding-block: clamp(32px, 4vw, 56px); }
.page-hero { border-top: 4px solid var(--blue); }
.hero { border-top: 4px solid var(--blue); }

/* Labels: quiet sentence-case kickers; hidden where the heading or breadcrumb already says it */
.eyebrow { font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
.page-hero .eyebrow, .section-head .eyebrow { display: none; }

/* Decorative arrows on links and buttons go; diagram arrows stay */
.ic-arrow { display: none; }
.ba-arrow .ic-arrow { display: block; }

/* Colour carries meaning: actions are blue, emergency is crimson */
.btn-primary { --btn-bg: var(--blue); --btn-bd: var(--blue); box-shadow: none; }
.btn-primary:hover { --btn-bg: var(--ink); --btn-bd: var(--ink); }
.task.primary { background: var(--blue); border-color: var(--blue); }
.task.primary:hover { background: var(--ink); border-color: var(--ink); }
.task.primary small { color: #DCE6FA; }
.slot[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); }
.stepper li[data-state="current"]::before { background: var(--blue); }
.radio-card:has(input:checked) { border-color: var(--blue); background: var(--blue-tint); }
.radio-card input, .check input { accent-color: var(--blue); }
.tabs [role="tab"][aria-selected="true"] { border-bottom-color: var(--blue); }
.nav a[aria-current="page"] { color: var(--blue); box-shadow: inset 0 -2px 0 var(--blue); }
.drawer nav a[aria-current="page"], .actionbar a[aria-current="page"], .actionbar .ab-primary { color: var(--blue); }
.actionbar a[href^="tel:"] { color: var(--crimson); }
.icon-badge { background: var(--blue-tint); color: var(--blue); }

/* Cards: flat panels with a hairline border; no lift, no floating shadow */
.card-link, .task, .btn { transition: background-color .15s, border-color .15s, color .15s; }
.card-link:hover { transform: none; box-shadow: none; border-color: var(--blue); }
.task { box-shadow: none; }
.task:hover { transform: none; box-shadow: none; border-color: var(--blue); }
.today, .ticket { box-shadow: none; }

/* Tap targets */
.chip { min-height: 40px; }
.btn-sm { min-height: 40px; }
.textsize button { min-height: 32px; min-width: 36px; }
.lite-toggle, .lang-toggle { min-height: 32px; }
/* Links inside running text must look like links (WCAG 1.4.1): underline them */
.footer-contact a, .callout a, p a { text-decoration: underline; text-underline-offset: .2em; }
.steps li .n { color: var(--blue); }

/* =========================================================================
   v3 review pass — formal identity, fewer template tells, easier small text
   ========================================================================= */
:root { --font-heading: "Source Serif 4", "Noto Serif Devanagari", Georgia, "Times New Roman", serif; --font-display: var(--font-body); --fs-xs: .9rem; --fs-sm: .9rem; }
h1, h2, .brand-name { font-family: var(--font-heading); }
html[lang="ne"] h1, html[lang="ne"] h2 { font-weight: 500; }
html[lang="ne"] .hero h1 { font-size: calc(var(--fs-hero) * .9); }
p, li { text-wrap: pretty; }
.muted, .doctor-meta, .task small, .lede { color: var(--ink-2); }
@media (max-width: 520px) { .brand-sub { display: block; font-size: .75rem; } }
.hero .eyebrow, .free-care-copy .eyebrow { display: none; }

/* Icons only where they help a choice: the four home tasks, untinted */
.icon-badge { display: none; }
.task .icon-badge, .task .icon-badge.ok, .task .icon-badge.blue { display: grid; background: none; width: auto; height: auto; color: var(--blue); }
.task.primary .icon-badge { color: #fff; background: none; }

/* Lists divided by rules rather than a card for everything */
#spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; row-gap: 0; }
@media (max-width: 760px) { #spec-grid { grid-template-columns: 1fr; } }
.spec-card { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 22px 0; background: transparent; }
.spec-card:hover { border-color: var(--blue); }
.spec-card .tags-line { color: var(--muted); font-size: var(--fs-sm); margin-top: auto; }
.steps li { border: 0; border-top: 3px solid var(--blue); border-radius: 0; padding: 18px 0 0; background: transparent; }
.steps li .n { font-weight: 600; font-size: var(--fs-sm); }
.pay-row { display: block; padding-top: 4px; }

/* Neutral avatars; crimson stays with emergencies */
.avatar, .avatar.crimson, .avatar.ok { background: var(--surface-2); color: var(--ink-2); }
.free-care-copy { background: var(--blue-tint); color: var(--ink-2); }
.free-care-copy h2 { color: var(--ink); }
.free-care-copy li svg { color: var(--ok); }

/* Plain status text instead of live dots; no punched ticket notches; quieter chips */
.source::before { display: none; }
.ticket-perf::before, .ticket-perf::after { content: none; }
.chip { border-radius: var(--r-sm); }
.btn-dark { --btn-bg: var(--blue); --btn-bd: var(--blue); }
.btn-dark:hover { --btn-bg: var(--ink); --btn-bd: var(--ink); }
.opd-line { font-size: var(--fs-sm); color: var(--ink-2); }
.notice-list .title strong { font-weight: 700; }
