/* Webster Infotech · site stylesheet
   Direction A × C: Registrar structure, Signal simplicity (see docs/DECISIONS.md D-08).
   Mobile-first. Square corners. Thin rules. One saffron accent. */

:root {
  --ink: #0E1B2C;
  --ink-2: #13294B;
  --saffron: #E8A33D;
  --saffron-text: #7A4A00;
  --saffron-deep: #2B1E08;
  --muted: #4F5E71;
  --line: #C7CED7;
  --line-soft: #D3D9E0;
  --tint: #D9DEE5;
  --paper: #E4E8ED;
  --surface: #fff;
  --text-2: #33414F;
  --deep: #0E1B2C;          /* dark panels: buttons, verify section, footer */
  --deep-2: #13294B;
  --on-deep: #fff;          /* text on dark panels */
  --on-deep-muted: rgba(255,255,255,.8);
  --on-deep-line: rgba(255,255,255,.16);
  --accent-on-deep: #E8A33D;
  --header-bg: rgba(228,232,237,.97);
  --map-bg: #D3D9E0;
  --fixed-ink: #0E1B2C;     /* always-dark text, for saffron and white surfaces */
  --ph-bg: #FFF3D6;
  --ph-line: #C9821E;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --wrap: 1240px;
  --pad: 20px;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (min-width: 900px) { :root { --pad: 28px; --header-h: 80px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; -webkit-tap-highlight-color: rgba(232,163,61,.25); font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--pad); top: -100px; z-index: 100; background: var(--deep); color: var(--on-deep); padding: 12px 16px; text-decoration: none; }
.skip:focus { top: 10px; }

/* ---------- layout ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.section { padding-block: clamp(48px, 8vw, 96px); }
.section-tight { padding-block: clamp(32px, 5vw, 56px); }
.rule-top { border-top: 1px solid var(--ink); }
.rule-bottom { border-bottom: 1px solid var(--ink); }
.grid { display: grid; gap: 28px 48px; }
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .grid-3-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: end; }
  .grid-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
}
.split { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 32px; }
.stack > * + * { margin-top: 14px; }

/* ---------- type ---------- */
.display { font-weight: 500; font-size: clamp(42px, 7.4vw, 92px); line-height: 1; letter-spacing: -.035em; }
.display-xl { font-weight: 500; font-size: clamp(76px, 16vw, 200px); line-height: .84; letter-spacing: -.05em; }
.h1 { font-weight: 500; font-size: clamp(36px, 5.4vw, 64px); line-height: 1.06; letter-spacing: -.03em; }
.h2 { font-weight: 500; font-size: clamp(28px, 3.6vw, 42px); line-height: 1.1; letter-spacing: -.02em; }
.h3 { font-weight: 600; font-size: 19px; line-height: 1.3; }
.lead { font-size: clamp(18px, 1.6vw, 20px); color: var(--text-2); max-width: 40rem; line-height: 1.6; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em; text-transform: uppercase; }
.num { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.measure { max-width: 40rem; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); }
.kicker::before { content: ""; width: 10px; height: 10px; background: var(--saffron); flex: none; }
.prose p + p { margin-top: 1em; }
.prose a, .link { text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.prose a:hover, .link:hover { border-bottom-width: 2px; }

/* placeholders for unconfirmed content */
.ph { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: #7A4A00; background: var(--ph-bg); border: 1px dashed var(--ph-line); padding: 1px 6px; line-height: 1.5; vertical-align: middle; white-space: nowrap; }
.tbc { color: var(--saffron-text); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border: 1px solid var(--deep); background: var(--deep); color: var(--on-deep); font-weight: 500; font-size: 16px; text-decoration: none; cursor: pointer; transition: background .15s, color .15s; }
.btn:hover { background: var(--deep-2); }
.btn .arr { transition: transform .2s var(--ease); }
@media (hover: hover) { .btn:hover .arr { transform: translateX(4px); } }
[dir="rtl"] .btn:hover .arr { transform: translateX(-4px); }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--deep); color: var(--on-deep); }
.btn-saffron { background: var(--saffron); color: var(--fixed-ink); border-color: var(--fixed-ink); }
.btn-saffron:hover { background: #F0B455; }
.btn-white { background: #fff; color: var(--fixed-ink); border-color: #fff; }
.btn-white:hover { background: var(--saffron); border-color: var(--saffron); }
.btn-ghost-light { background: transparent; color: var(--on-deep); border-color: var(--on-deep-muted); }
.btn-ghost-light:hover { border-color: var(--on-deep); background: var(--on-deep-line); }
.btn-block { width: 100%; justify-content: space-between; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); border-bottom: 1px solid var(--ink); }
.site-header .wrap { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 48px; text-decoration: none; flex: none; }
.brand img { height: 38px; width: auto; }
.brand .bar { width: 1px; height: 30px; background: var(--ink); }
.brand .name { display: flex; flex-direction: column; line-height: 1.15; }
.brand b { font-weight: 600; font-size: 14px; letter-spacing: .16em; }
.brand small { font-size: 12px; color: var(--muted); }
@media (min-width: 900px) { .brand img { height: 46px; } .brand b { font-size: 15px; } }
@media (max-width: 560px) { .brand small { display: none; } .brand { gap: 10px; } .site-header .wrap { gap: 8px; } .header-tools { gap: 8px; } .lang summary { padding: 0 8px; } .menu summary { padding: 0 12px; } }

.nav-main { display: none; }
.nav-main a { text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; font-size: 15px; white-space: nowrap; }
.nav-main a:hover { border-bottom-color: var(--ink); }
.nav-main a[aria-current="page"], .nav-main a.is-section { border-bottom-color: var(--saffron); font-weight: 600; }
.header-tools { display: flex; align-items: center; gap: 10px; }
.header-call { display: none; }
@media (min-width: 1100px) {
  .nav-main { display: flex; gap: 24px; align-items: center; }
  .header-call { display: inline-flex; min-height: 46px; padding: 0 16px; font-size: 15px; }
}
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border: 1px solid var(--ink); font-size: 14px; }
.lang summary::-webkit-details-marker { display: none; }
.lang ul { position: absolute; right: 0; top: calc(100% + 6px); min-width: 170px; background: var(--surface); border: 1px solid var(--ink); z-index: 60; }
[dir="rtl"] .lang ul { right: auto; left: 0; }
.lang li a { display: flex; justify-content: space-between; gap: 12px; min-height: 44px; align-items: center; padding: 0 14px; text-decoration: none; border-bottom: 1px solid var(--line); }
.lang li a:hover, .lang li a[aria-current="true"] { background: var(--tint); }

.menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--ink); font-size: 15px; }
.menu summary::-webkit-details-marker { display: none; }
.menu .menu-panel { position: absolute; left: 0; right: 0; top: var(--header-h); background: var(--paper); border-bottom: 1px solid var(--ink); max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow: auto; overscroll-behavior: contain; }
.menu .menu-panel a { display: flex; justify-content: space-between; align-items: center; min-height: 56px; padding: 0 var(--pad); border-top: 1px solid var(--line); text-decoration: none; font-size: 18px; }
.menu .menu-panel a[aria-current="page"] { font-weight: 600; box-shadow: inset 4px 0 0 var(--saffron); }
.menu .menu-panel .menu-call { background: var(--deep); color: var(--on-deep); }
@media (min-width: 1100px) { .menu { display: none; } }

/* ---------- breadcrumb & page head ---------- */
.crumbs { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.page-head { padding-block: clamp(24px, 4vw, 48px) clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--ink); }
.page-head .display, .page-head .h1 { margin: 16px 0 18px; }

/* ---------- facts (dl) ---------- */
.facts { border-top: 2px solid var(--ink); font-size: 16px; }
.facts > div { display: grid; grid-template-columns: minmax(7.5rem, 38%) 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts .big { font-size: 34px; font-weight: 500; line-height: 1; letter-spacing: -.02em; }
.facts-inline > div { display: flex; justify-content: space-between; align-items: baseline; }

/* ---------- index rows ---------- */
.index { border-top: 2px solid var(--ink); }
.index-head { display: none; }
.irow { display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; align-items: center; min-height: 76px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .15s; }
@media (hover: hover) { .irow:hover { background: var(--tint); } }
.irow .code { font-weight: 600; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.015em; line-height: 1.1; }
.irow .sub { display: block; font-size: 14.5px; color: var(--muted); margin-top: 2px; }
.irow .meta { display: none; }
.irow .arr { font-size: 22px; transition: transform .2s var(--ease); }
@media (hover: hover) { .irow:hover .arr { transform: translateX(5px); } }
@media (min-width: 900px) {
  .index-head, .irow { grid-template-columns: 1.3fr 1fr 1.1fr 40px; }
  .index-head { display: grid; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--ink); }
  .irow .meta { display: block; font-size: 15px; }
}
.tag-uk { display: inline-block; font-family: var(--mono); font-size: 12px; padding: 1px 7px; background: var(--saffron); color: var(--fixed-ink); white-space: nowrap; }
.tag-line { display: inline-block; font-family: var(--mono); font-size: 12px; padding: 1px 7px; border: 1px solid var(--ink); white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- lists & rows ---------- */
.rows { border-top: 1px solid var(--ink); }
.rows > li, .rows > div { padding: 18px 0; border-bottom: 1px solid var(--line); }
.row-2 { display: grid; gap: 6px 28px; }
@media (min-width: 760px) { .row-2 { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); } }
.steps > li { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 14px; }
.steps .n { font-family: var(--mono); font-size: 20px; }
.opts { display: grid; gap: 0 28px; border-top: 1px solid var(--ink); }
@media (min-width: 640px) { .opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .opts-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.opts li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }

/* ---------- tiles (C simplicity) ---------- */
.band { background: var(--saffron); color: var(--fixed-ink); border-top: 1px solid var(--fixed-ink); border-bottom: 1px solid var(--fixed-ink); }
.band .rows { border-top-color: var(--fixed-ink); }
.band .lead, .band p { color: var(--saffron-deep); }
.tiles { display: grid; gap: 10px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { color: var(--fixed-ink); display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 80px; padding: 16px 20px; background: #fff; border: 2px solid var(--ink); text-decoration: none; font-size: 18px; font-weight: 500; transition: background .18s, color .18s, transform .18s var(--ease); }
@media (hover: hover) { .tile:hover { background: var(--fixed-ink); color: #fff; transform: translateY(-2px); } }
.contact-tiles { display: grid; gap: 8px; }
@media (min-width: 640px) { .contact-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ctile { color: var(--fixed-ink); display: flex; flex-direction: column; justify-content: center; min-height: 80px; padding: 12px 16px; background: #fff; border: 1px solid var(--ink); text-decoration: none; transition: background .15s; }
.ctile:hover { background: #EEF1F5; }
.ctile.dark { background: var(--fixed-ink); color: #fff; }
.ctile.dark:hover { background: var(--ink-2); }
.ctile .mono { color: #4F5E71; }
.ctile.dark .mono { color: var(--saffron); }
.ctile b { font-weight: 500; font-size: 16.5px; }

/* ---------- dark section ---------- */
.dark { background: var(--deep); color: var(--on-deep); }
.dark .muted, .dark .lead { color: var(--on-deep-muted); }
.dark .facts, .dark .index { border-top-color: var(--on-deep); }
.dark .facts > div, .dark .irow { border-bottom-color: var(--on-deep-line); }
.dark .facts dt { color: var(--on-deep-muted); }
.dark .irow:hover { background: var(--on-deep-line); }
.dark .irow .sub, .dark .meta { color: var(--on-deep-muted); }
.dark .accent { color: var(--accent-on-deep); }
.dark .ph { color: #FFE2A8; background: rgba(232,163,61,.14); border-color: var(--saffron); }

/* ---------- quotes ---------- */
.quotes { display: grid; gap: 16px; }
@media (min-width: 900px) { .quotes { grid-template-columns: 1.4fr 1fr 1fr; } }
.quote { border-top: 2px solid var(--ink); padding-top: 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.quote blockquote { font-size: 20px; line-height: 1.45; letter-spacing: -.005em; }
.quote.big blockquote { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.3; font-weight: 500; letter-spacing: -.015em; }
.quote figcaption b { display: block; }

/* ---------- accordion ---------- */
.acc { border-top: 2px solid var(--ink); }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding: 14px 0; font-size: 18px; font-weight: 500; }
.acc summary::-webkit-details-marker { display: none; }
.acc .plus { font-size: 26px; line-height: 1; flex: none; transition: transform .25s var(--ease); }
.acc details[open] .plus { transform: rotate(45deg); }
.acc .ans { padding: 0 0 22px; color: var(--text-2); max-width: 44rem; }
.acc .ans > * + * { margin-top: 10px; }

/* ---------- forms ---------- */
.form { display: grid; gap: 14px; }
.field label, .field legend { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea, input[type="search"] { -webkit-appearance: none; appearance: none; }
.field input, .field select, .field textarea { width: 100%; min-height: 52px; padding: 0 14px; border: 1px solid var(--ink); border-radius: 0; background: #fff; color: var(--fixed-ink); font-size: 16px; }
.field textarea { padding: 12px 14px; min-height: 110px; resize: vertical; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230E1B2C' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
[dir="rtl"] .field select { background-position: left 14px center; padding-right: 14px; padding-left: 40px; }
.field .hint { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.fieldset { border: 0; margin: 0; padding: 0; }
.choices { display: grid; gap: 8px; }
@media (min-width: 640px) { .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { color: var(--fixed-ink); display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 16px; border: 1px solid var(--ink); background: #fff; transition: background .15s, color .15s; }
.choice span::before { content: ""; width: 16px; height: 16px; border: 1.5px solid currentColor; flex: none; }
.choice input:checked + span { background: var(--deep); color: var(--on-deep); }
.choice input:checked + span::before { background: var(--saffron); border-color: var(--saffron); }
.choice input:focus-visible + span { outline: 3px solid var(--saffron); outline-offset: 2px; }

/* ---------- side panel ---------- */
.with-aside { display: grid; gap: 0 56px; }
@media (min-width: 1000px) { .with-aside { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } .aside-sticky { position: sticky; top: calc(var(--header-h) + 24px); } }
.aside-hide-sm { display: none; }
@media (min-width: 1000px) { .aside-hide-sm { display: block; } }
.talk-panel { background: var(--saffron); color: var(--fixed-ink); border: 1px solid var(--fixed-ink); padding: 22px; }
.talk-panel .btn { background: var(--fixed-ink); color: #fff; border-color: var(--fixed-ink); }
.talk-panel .btn-white { background: #fff; color: var(--fixed-ink); }
.talk-panel .btn { width: 100%; justify-content: space-between; }
.talk-panel .btns { display: grid; gap: 8px; margin-top: 16px; }
.toc a { display: flex; gap: 12px; align-items: baseline; min-height: 44px; padding: 10px 0; text-decoration: none; border-bottom: 1px solid var(--line); font-size: 15px; }
.toc a:hover { color: var(--saffron-text); }
.subsection { padding: clamp(36px, 5vw, 60px) 0; border-bottom: 1px solid var(--line); }
.subsection:last-child { border-bottom: 0; }
.subsection > .num { display: block; margin-bottom: 6px; }
.subsection > .h2 { margin-bottom: 20px; }

/* ---------- cards (programme related, unis) ---------- */
.cards { display: grid; gap: 0; border-top: 2px solid var(--ink); border-left: 1px solid var(--line); }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; display: flex; flex-direction: column; gap: 6px; transition: background .15s; }
a.card:hover { background: var(--tint); }
.card .code { font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.mark { width: 48px; height: 48px; display: grid; place-items: center; background: var(--fixed-ink); color: var(--saffron); font-weight: 600; font-size: 20px; flex: none; }

/* ---------- map ---------- */
.map { position: relative; background: var(--map-bg); border: 1px solid var(--ink); min-height: 320px; overflow: hidden; }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map .map-card { position: absolute; left: 14px; right: 14px; bottom: 14px; background: var(--surface); border: 1px solid var(--ink); padding: 16px; }
@media (min-width: 640px) { .map .map-card { right: auto; max-width: 340px; } }

/* ---------- CTA band at the end of every page ---------- */
.next { border-top: 1px solid var(--ink); }
.next-links { display: grid; gap: 0; border-top: 1px solid var(--ink); }
@media (min-width: 760px) { .next-links { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.next-links a { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 64px; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 500; }
@media (min-width: 760px) { .next-links a { border-right: 1px solid var(--line); padding-left: 16px; } .next-links a:first-child { padding-left: 0; } }
.next-links a:hover { color: var(--saffron-text); }

/* ---------- footer ---------- */
.site-footer { background: var(--deep); color: var(--on-deep-muted); font-size: 15px; padding: 56px 0 120px; }
@media (min-width: 900px) { .site-footer { padding-bottom: 40px; } }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--on-deep); text-decoration: underline; }
.foot-grid { display: grid; gap: 32px; }
@media (min-width: 700px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr; } }
.site-footer h2 { font-size: 13px; font-family: var(--mono); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-on-deep); margin-bottom: 12px; }
.site-footer li a, .site-footer li span { display: inline-flex; min-height: 44px; min-width: 44px; align-items: center; }
.foot-base a { display: inline-flex; min-height: 44px; min-width: 44px; align-items: center; justify-content: center; }
.foot-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--on-deep-line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13.5px; }

/* ---------- mobile action bar ---------- */
.action-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface); border-top: 1px solid var(--ink); padding-bottom: env(safe-area-inset-bottom); }
.action-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 60px; font-size: 13px; font-weight: 500; text-decoration: none; }
.action-bar a + a { border-left: 1px solid var(--line); }
.action-bar a:first-child { background: var(--deep); color: var(--on-deep); }
@media (min-width: 900px) { .action-bar { display: none; } }

/* ---------- hero globe (expressive moment) ---------- */
.hero { border-bottom: 1px solid var(--ink); overflow: hidden; }
.hero-grid { display: grid; gap: 32px; padding-block: clamp(32px, 6vw, 88px) clamp(36px, 6vw, 80px); align-items: center; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); } }
.globe { width: min(100%, 460px); aspect-ratio: 1; margin-inline: auto; color: var(--ink); }
.globe .m { transform-box: fill-box; transform-origin: center; }
.globe .lat { stroke: currentColor; }
.globe .m2 { transform: scaleX(.82); } .globe .m3 { transform: scaleX(.5); } .globe .m4 { transform: scaleX(.18); } .globe .m5 { transform: scaleX(-.5); } .globe .m6 { transform: scaleX(-.82); }
@media (max-width: 999px) { .globe { width: min(70%, 300px); } }
.glance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
@media (min-width: 900px) { .glance { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.glance > div { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .glance > div + div { border-left: 1px solid var(--line); padding-left: 20px; } .glance > div { border-bottom: 0; } }
.glance b { display: block; font-size: clamp(30px, 3.6vw, 44px); font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.glance span { font-size: 14.5px; color: var(--muted); }

/* ---------- finder ---------- */
.finder-result { margin-top: 28px; }
.finder-result[hidden] { display: none; }

/* ---------- motion ---------- */
@keyframes spin { from { transform: scaleX(1); } 50% { transform: scaleX(-1); } to { transform: scaleX(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .globe .m { animation: spin 14s linear infinite; }
  .globe .m2 { animation-delay: -2.33s; } .globe .m3 { animation-delay: -4.66s; } .globe .m4 { animation-delay: -7s; } .globe .m5 { animation-delay: -9.33s; } .globe .m6 { animation-delay: -11.66s; }
  .hero .in { animation: rise .8s var(--ease) both; }
  .hero .in-2 { animation-delay: .1s; } .hero .in-3 { animation-delay: .2s; } .hero .in-4 { animation-delay: .3s; }
  .acc details[open] .ans { animation: open .3s var(--ease) both; }
  .lang ul, .menu-panel { animation: open .2s var(--ease) both; }
  .finder-result:not([hidden]) { animation: rise .45s var(--ease) both; }
  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 80%; }
  }
}

/* ---------- right-to-left ---------- */
[dir="rtl"] .irow .arr, [dir="rtl"] .tile .arr { transform: scaleX(-1); }
[dir="rtl"] .kicker::before { order: 0; }

/* ---------- touch & mobile browser fixes ---------- */
/* standalone text links get a full 44px tap area */
:not(p):not(dd):not(li):not(span) > a.link { display: inline-flex; align-items: center; min-height: 44px; }
dd a.link, .facts a.link, .form p a.link { display: inline-flex; align-items: center; min-height: 44px; }
.crumbs a, .crumbs span { display: inline-flex; align-items: center; min-height: 44px; }
.acc summary span.plus { margin-inline-start: auto; }
/* keep focused fields and anchored sections clear of the fixed bottom bar */
@media (max-width: 899px) {
  html { scroll-padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* ---------- themes ---------- */
.logo-dark-bg { display: none; }
[data-theme="dark"] .logo-light-bg { display: none; }
[data-theme="dark"] .logo-dark-bg { display: block; }
.site-footer .logo-light-bg { display: none; }
.site-footer .logo-dark-bg { display: block; }
[data-theme="dark"] .site-footer .logo-light-bg { display: block; }
[data-theme="dark"] .site-footer .logo-dark-bg { display: none; }

/* Inverted (dark) theme: navy page, light text; dark panels become light. Switch with "theme" in site/config.json. */
[data-theme="dark"] {
  --paper: #0E1B2C;
  --surface: #16263B;
  --ink: #E6EBF1;
  --text-2: #C9D2DD;
  --muted: #A3B0C0;
  --line: #2C3E55;
  --line-soft: #223349;
  --tint: #17293F;
  --saffron-text: #F2BE6B;
  --deep: #E4E8ED;
  --deep-2: #D2D9E2;
  --on-deep: #0E1B2C;
  --on-deep-muted: #3E4C5E;
  --on-deep-line: rgba(14,27,44,.18);
  --accent-on-deep: #7A4A00;
  --header-bg: rgba(14,27,44,.96);
  --map-bg: #1C2E45;
  color-scheme: dark;
}
[data-theme="dark"] .dark .ph { color: #7A4A00; background: #FFF3D6; border-color: #C9821E; }
