/* ==========================================================================
   سلطنة مهران العربية — design system
   ========================================================================== */

@view-transition { navigation: auto; }

:root {
  /* palette (pinned by brief) */
  --green-900: #063F32;
  --green-950: #042E25;
  --green-700: #086B50;
  --sage: #A6C5B2;
  --sage-soft: #DCE8E0;
  --ivory: #FAF9F5;
  --ivory-deep: #F2F0E8;
  --white: #FFFFFF;
  --gold: #C5A56A;
  --gold-deep: #8F7340;
  --ink: #202923;
  --ink-soft: #4A564E;
  --line: #E3E1D8;
  --line-strong: #CFCCBF;

  /* type */
  --f-callig: "Aref Ruqaa", "Amiri", serif;
  --f-display: "Amiri", "Times New Roman", serif;
  --f-ui: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;

  --t-xs: .8125rem;
  --t-sm: .9375rem;
  --t-md: 1.0625rem;
  --t-lg: 1.25rem;
  --t-xl: clamp(1.5rem, 1.1rem + 1.4vw, 2.125rem);
  --t-2xl: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
  --t-3xl: clamp(2.5rem, 1.4rem + 4.2vw, 4.75rem);

  /* space */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4.5rem; --s-9: 7rem; --s-10: 10rem;
  --gutter: clamp(1rem, .4rem + 3vw, 3rem);
  --max: 76rem;

  /* shape + depth */
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgb(6 63 50 / .06), 0 4px 14px -6px rgb(6 63 50 / .12);
  --shadow-2: 0 2px 4px rgb(6 63 50 / .06), 0 18px 40px -18px rgb(6 63 50 / .28);

  /* motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --d-fast: 180ms; --d-mid: 420ms; --d-slow: 900ms;

  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  font-family: var(--f-ui);
  font-size: var(--t-md);
  line-height: 1.85;
  color: var(--ink);
  background: var(--ivory);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  transition: background-color 900ms var(--ease-out);
  overflow-x: clip;
}
body[data-tone="deep"] { background: var(--green-900); }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 700; line-height: 1.3; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--green-700); text-underline-offset: .35em; text-decoration-thickness: 1px; }
a:hover { color: var(--green-900); }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--green-900); color: var(--ivory); }
:focus-visible { outline: 2px solid var(--green-700); outline-offset: 3px; border-radius: 6px; }
.on-dark :focus-visible, .site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--gold); }
html { scrollbar-color: var(--sage) var(--ivory); }
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--ivory); }
::-webkit-scrollbar-thumb { background: var(--sage); border: 3px solid var(--ivory); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--green-700); }

.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-link {
  position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 100;
  background: var(--gold); color: var(--green-950); padding: .6rem 1.1rem; border-radius: var(--r-pill);
  font-weight: 600; text-decoration: none; transition: top var(--d-fast) var(--ease-out);
}
.skip-link:focus { top: 1rem; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.num { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: relative;
  background: var(--green-900);
  color: var(--ivory);
  text-align: center;
  padding-block: clamp(1.75rem, 1rem + 2.5vw, 3rem) clamp(1rem, .6rem + 1vw, 1.5rem);
  overflow: hidden;
  isolation: isolate;
  view-transition-name: site-header;
}
.site-header__pattern {
  position: absolute; inset: 0; z-index: -1; opacity: .09; color: var(--sage);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23A6C5B2' stroke-width='1'%3E%3Cpath d='M32 4l8 20 20 8-20 8-8 20-8-20-20-8 20-8z'/%3E%3Cpath d='M12 12h40v40H12z' transform='rotate(45 32 32)'/%3E%3Ccircle cx='32' cy='32' r='6'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 60% 120% at 50% 0%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 60% 120% at 50% 0%, #000 0%, transparent 75%);
}
.brand { display: inline-block; color: var(--white); text-decoration: none; }
.brand:hover { color: var(--white); }
.brand__name {
  display: block;
  font-family: var(--f-callig);
  font-weight: 700;
  font-size: clamp(2.6rem, 1.4rem + 5.2vw, 5.4rem);
  line-height: 1.35;
  letter-spacing: 0;
  padding-inline: .2em;
}
.brand__latin {
  display: block; margin-top: .1rem;
  font-family: var(--f-ui); font-size: var(--t-xs); letter-spacing: .32em;
  color: var(--sage); text-transform: uppercase; direction: ltr;
}
.divider {
  display: block; width: min(320px, 70%); height: 22px; margin: .9rem auto 0; color: var(--gold);
}
.divider path, .divider circle, .divider rect { vector-effect: non-scaling-stroke; }

/* first-load sequence (CSS only, content never depends on JS) */
.intro .brand__name { animation: inkWipe 1.3s var(--ease-out) both; }
.intro .brand__latin { animation: fadeUp .9s .55s var(--ease-out) both; }
.intro .divider .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s .4s var(--ease-out) forwards; }
.intro .divider .dot { animation: pop .6s 1.2s var(--ease-out) both; transform-box: fill-box; transform-origin: center; }
.divider .draw { stroke-dasharray: 1; }

@keyframes inkWipe {
  from { clip-path: inset(0 0 0 100%); filter: blur(6px); opacity: .2; }
  to   { clip-path: inset(0 0 0 0); filter: blur(0); opacity: 1; }
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- tabs ---------- */
.tabs-bar {
  position: sticky; top: 0; z-index: 40;
  background: var(--green-900);
  border-top: 1px solid rgb(166 197 178 / .14);
  view-transition-name: tabs-bar;
}
.tabs-bar.is-stuck { box-shadow: 0 10px 30px -18px rgb(4 46 37 / .7); }
.tabs {
  display: flex; justify-content: center; gap: .35rem;
  list-style: none; margin: 0 auto; padding: .7rem var(--gutter);
}
.tab {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; gap: .55rem;
  min-height: 44px; padding: .45rem 1.15rem .45rem 1.25rem;
  border-radius: var(--r-pill);
  color: var(--sage); text-decoration: none; font-weight: 500; font-size: var(--t-sm);
  transition: color var(--d-mid) var(--ease-out);
}
.tab:hover { color: var(--white); }
.tab::before { /* hover wash */
  content: ""; position: absolute; inset: 0; z-index: -2; border-radius: inherit;
  background: rgb(166 197 178 / .1); opacity: 0; transform: scale(.92);
  transition: opacity var(--d-mid) var(--ease-out), transform var(--d-mid) var(--ease-out);
}
.tab:hover::before { opacity: 1; transform: none; }
.tab__ind {
  position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--ivory); opacity: 0;
  box-shadow: 0 6px 18px -8px rgb(0 0 0 / .45);
}
.tab[aria-current="page"] { color: var(--green-900); font-weight: 600; }
.tab[aria-current="page"] .tab__ind { opacity: 1; view-transition-name: tab-indicator; }
.tab svg { width: 20px; height: 20px; flex: none; transition: transform var(--d-mid) var(--ease-out); }
.tab:hover svg { transform: translateY(-2px) rotate(-6deg); }
.tab[aria-current="page"] svg { color: var(--green-700); }
.icon { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* view transitions */
::view-transition-old(root) { animation: vtOut 260ms var(--ease-in-out) both; }
::view-transition-new(root) { animation: vtIn 520ms 80ms var(--ease-out) both; }
::view-transition-group(tab-indicator) { animation-duration: 520ms; animation-timing-function: var(--ease-out); }
::view-transition-group(site-header), ::view-transition-group(tabs-bar) { animation-duration: 0s; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-8px); filter: blur(4px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }

/* ==========================================================================
   Shared section primitives
   ========================================================================== */
.section { padding-block: clamp(4.5rem, 3rem + 6vw, 9rem); position: relative; background: var(--ivory); }
.h-section { font-size: var(--t-2xl); color: var(--green-900); }
.lede { font-size: var(--t-lg); color: var(--ink-soft); max-width: 60ch; line-height: 1.95; }
.prose { max-width: 68ch; color: var(--ink-soft); }
.prose p + p { margin-top: 1em; }

.rule { display: block; height: 14px; width: 160px; color: var(--gold); margin-block: 1.25rem 1.75rem; }
.rule--center { margin-inline: auto; }
.rule .draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease-out); }
.rule.in .draw, .no-js .rule .draw { stroke-dashoffset: 0; }

.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: .6rem;
  min-height: 48px; padding: .7rem 1.5rem;
  border: 1px solid var(--green-900); border-radius: var(--r-pill);
  background: var(--green-900); color: var(--ivory);
  font-weight: 600; font-size: var(--t-sm); text-decoration: none; cursor: pointer;
  transition: transform var(--d-fast) var(--ease-out), box-shadow var(--d-mid) var(--ease-out), color var(--d-mid);
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--green-700);
  clip-path: circle(0% at var(--mx, 50%) var(--my, 50%));
  transition: clip-path 600ms var(--ease-out);
}
.btn:hover { color: var(--white); box-shadow: var(--shadow-2); }
.btn:hover::after { clip-path: circle(150% at var(--mx, 50%) var(--my, 50%)); }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; transition: transform var(--d-mid) var(--ease-out); }
.btn:hover svg { transform: translateX(-4px); }
.btn--ghost { background: transparent; color: var(--green-900); }
.btn--ghost::after { background: var(--green-900); }

/* reveal system */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal="scale"] { transform: scale(.94); }
.js [data-reveal="clip"] { opacity: 1; transform: none; clip-path: inset(0 0 100% 0); transition: clip-path 1.2s var(--ease-out); }
.js [data-reveal].in { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }

/* paused offscreen loops */
.paused, .paused * { animation-play-state: paused !important; }

/* ==========================================================================
   Home — hero
   ========================================================================== */
.hero {
  position: relative; text-align: center; overflow: hidden;
  --sky: clamp(140px, 16vw + 60px, 280px);
  padding-block: clamp(2.5rem, 1.5rem + 3vw, 4.5rem) calc(var(--sky) * .72);
  min-height: max(40rem, 100svh - 13rem);
  display: flex; flex-direction: column; justify-content: center;
}
.hero__inner { position: relative; z-index: 2; }
.rosette { width: clamp(150px, 12vw + 90px, 250px); aspect-ratio: 1; margin: 0 auto clamp(1.5rem, 1rem + 2vw, 2.5rem); color: var(--green-900); }
.rosette svg { width: 100%; height: 100%; overflow: visible; }
.rosette .ln { fill: none; stroke: currentColor; stroke-width: 1.15; vector-effect: non-scaling-stroke; }
.rosette .ln--fine { stroke-width: .7; opacity: .55; }
.rosette .ln--em { stroke: var(--green-700); }
.rosette .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s var(--ease-out) forwards; animation-delay: calc(.2s + var(--k, 0) * .12s); }
.rosette .spin-a { transform-origin: 0 0; animation: spin 140s linear infinite; }
.rosette .spin-b { transform-origin: 0 0; animation: spin 200s linear infinite reverse; }
.rosette .breathe { transform-origin: 0 0; animation: breathe 9s var(--ease-in-out) infinite; }
.rosette .light { fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: .05 .95; animation: travel 11s linear infinite; opacity: 0; animation-delay: 2.2s; }
.rosette .light--b { stroke-dasharray: .035 .965; animation-duration: 16s; animation-direction: reverse; }
.rosette .dot { fill: var(--gold); transform-box: fill-box; transform-origin: center; animation: pop .5s var(--ease-out) both; animation-delay: calc(1.4s + var(--k, 0) * .05s); }
.rosette .core { fill: var(--green-900); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.045) rotate(11.25deg); } }
@keyframes travel { 0% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: -1; opacity: 1; } }

.hero__title { font-size: var(--t-3xl); color: var(--green-900); line-height: 1.25; }
.hero__title .w { display: inline-block; }
.hero__sub { margin-top: .9rem; font-size: var(--t-xl); font-family: var(--f-display); color: var(--green-700); }
.hero__text { margin: 1.5rem auto 0; max-width: 58ch; color: var(--ink-soft); font-size: var(--t-md); line-height: 2; }
.hero__actions { margin-top: 2.25rem; display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

.load .hero__title .w { animation: wordIn 1.1s var(--ease-out) both; animation-delay: calc(.35s + var(--i) * .11s); }
.load .hero__sub { animation: fadeUp 1s 1s var(--ease-out) both; }
.load .hero__text { animation: fadeUp 1s 1.15s var(--ease-out) both; }
.load .hero__actions { animation: fadeUp 1s 1.3s var(--ease-out) both; }
@keyframes wordIn { from { opacity: 0; transform: translateY(.45em); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }

.skyline { position: absolute; inset-inline: 0; bottom: 0; z-index: 1; height: var(--sky); pointer-events: none; }
.skyline svg { position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: 100%; will-change: transform; }
.skyline .l1 { color: #DCE6DE; }
.skyline .l2 { color: #BFD3C6; }
.skyline .l3 { color: #93B19F; }
.skyline .l3 .win { fill: var(--ivory); opacity: .7; }
.skyline::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 42%; background: linear-gradient(to top, var(--ivory), transparent); }
.load .skyline svg { animation: rise 1.6s var(--ease-out) both; }
.load .skyline .l2 { animation-delay: .15s; }
.load .skyline .l3 { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } }

/* ==========================================================================
   Home — services (editorial index, not cards)
   ========================================================================== */
.services { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 6rem); align-items: start; }
.services__intro { position: sticky; top: 7rem; }
.services__intro .lede { margin-top: 1rem; }
.svc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.svc { border-bottom: 1px solid var(--line-strong); }
.svc a {
  position: relative; display: grid; grid-template-columns: 3.5rem 1fr auto; gap: 1.25rem; align-items: center;
  padding: 1.75rem .5rem; text-decoration: none; color: var(--ink); isolation: isolate;
}
.svc a::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--white);
  border-radius: var(--r-md); box-shadow: var(--shadow-1);
  opacity: 0; transform: scaleY(.85); transition: opacity var(--d-mid) var(--ease-out), transform var(--d-mid) var(--ease-out);
}
.svc a:hover::before, .svc a:focus-visible::before { opacity: 1; transform: none; }
.svc__icon {
  width: 3.5rem; height: 3.5rem; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--sage); color: var(--green-900);
  transition: background-color var(--d-mid) var(--ease-out), color var(--d-mid), transform var(--d-slow) var(--ease-out);
}
.svc__icon svg { width: 24px; height: 24px; }
.svc a:hover .svc__icon { background: var(--green-900); color: var(--ivory); transform: rotate(-12deg); }
.svc__t { font-family: var(--f-display); font-size: var(--t-xl); color: var(--green-900); line-height: 1.4; }
.svc__d { color: var(--ink-soft); font-size: var(--t-sm); margin-top: .2rem; }
.svc__go { width: 28px; height: 28px; color: var(--green-700); transition: transform var(--d-mid) var(--ease-out); }
.svc a:hover .svc__go { transform: translateX(-8px); }

/* ==========================================================================
   Home — about
   ========================================================================== */
.about { background: var(--ivory-deep); overflow: hidden; }
.about__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2rem, 6vw, 7rem); align-items: center; }
.about__quote { font-family: var(--f-display); font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.6rem); line-height: 1.6; color: var(--green-900); margin: 0; }
.about__quote::before { content: "«"; color: var(--gold); margin-inline-end: .15em; }
.about__quote::after { content: "»"; color: var(--gold); margin-inline-start: .15em; }
.about .prose { margin-top: 2rem; }
.pillars { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-strong); }
.pillars div { padding: 1.25rem 0 0; padding-inline-end: 1rem; }
.pillars dt { font-family: var(--f-display); font-weight: 700; color: var(--green-900); font-size: var(--t-lg); }
.pillars dd { margin: .2rem 0 0; font-size: var(--t-sm); color: var(--ink-soft); line-height: 1.7; }
.archframe { position: relative; aspect-ratio: 3 / 4; max-width: 420px; margin-inline: auto; width: 100%; }
.archframe svg { width: 100%; height: 100%; }
.archframe .tile { animation: tileDrift 40s linear infinite; }
@keyframes tileDrift { to { transform: translateY(-80px); } }

/* ==========================================================================
   Home — national identity (deep tone)
   ========================================================================== */
.identity { color: var(--ivory); background: var(--green-900); overflow: hidden; }
body[data-tone="deep"] .identity { background: transparent; }
.identity .h-section { color: var(--white); }
.identity .lede { color: var(--sage); }
.identity__head { text-align: center; max-width: 46rem; margin-inline: auto; }
.identity__stage { display: grid; grid-template-columns: 1fr minmax(240px, 380px) 1fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; margin-top: clamp(3rem, 6vw, 5rem); }
.emblem { width: 100%; aspect-ratio: 1; color: var(--sage); }
.emblem svg { width: 100%; height: 100%; overflow: visible; }
.emblem .e-ring { animation: spin 90s linear infinite; transform-origin: 0 0; }
.emblem .e-gold { stroke: var(--gold); }
.sym { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.5rem; }
.sym li { position: relative; padding-top: 1.25rem; border-top: 1px solid rgb(166 197 178 / .25); }
.sym h3 { color: var(--white); font-size: var(--t-lg); }
.sym p { color: var(--sage); font-size: var(--t-sm); margin-top: .35rem; line-height: 1.8; }
.swatches { display: flex; gap: .5rem; margin-top: .8rem; }
.swatches span { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgb(250 249 245 / .35); }
.motto { margin-top: clamp(3rem, 6vw, 5rem); text-align: center; font-family: var(--f-callig); font-size: clamp(1.8rem, 1.2rem + 2.5vw, 3.2rem); color: var(--white); line-height: 1.5; }
.motto small { display: block; font-family: var(--f-ui); font-size: var(--t-xs); color: var(--sage); letter-spacing: .05em; margin-top: .4rem; }
.band { height: 34px; color: var(--gold); opacity: .55; background: none; }
.band svg { width: 100%; height: 100%; }

/* ==========================================================================
   Home — explore (arched doorways)
   ========================================================================== */
.explore__head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; flex-wrap: wrap; }
.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 2.5rem); margin-top: clamp(2.5rem, 5vw, 4rem); }
.door { text-decoration: none; color: var(--ink); display: block; }
.door:nth-child(2) { margin-top: clamp(0rem, 4vw, 4rem); }
.door__arch {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; isolation: isolate;
  border-radius: 999px 999px var(--r-sm) var(--r-sm);
  background: var(--green-900); color: var(--sage);
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--d-mid) var(--ease-out), transform var(--d-slow) var(--ease-out);
}
.door__arch svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform 1.4s var(--ease-out), opacity var(--d-mid); }
.door__arch .pat { opacity: .35; }
.door__arch .glyph { color: var(--ivory); transform-origin: 50% 55%; }
.door__arch::after {
  content: ""; position: absolute; inset: 10px; border-radius: inherit; border: 1px solid rgb(197 165 106 / .5);
  transition: inset var(--d-slow) var(--ease-out), border-color var(--d-mid);
}
.door:hover .door__arch, .door:focus-visible .door__arch { box-shadow: var(--shadow-2); transform: translateY(-6px); }
.door:hover .door__arch .pat { transform: scale(1.12) rotate(8deg); }
.door:hover .door__arch .glyph { transform: scale(1.06); }
.door:hover .door__arch::after { inset: 16px; border-color: var(--gold); }
.door h3 { margin-top: 1.25rem; font-size: var(--t-xl); color: var(--green-900); display: flex; align-items: center; gap: .5rem; }
.door h3 svg { width: 22px; height: 22px; color: var(--green-700); transition: transform var(--d-mid) var(--ease-out); }
.door:hover h3 svg { transform: translateX(-6px); }
.door p { color: var(--ink-soft); font-size: var(--t-sm); margin-top: .3rem; }

/* ==========================================================================
   Page heads (inner pages)
   ========================================================================== */
.page-head { position: relative; padding-block: clamp(3.5rem, 2.5rem + 4vw, 6.5rem) clamp(2rem, 1.5rem + 2vw, 3.5rem); overflow: hidden; }
.page-head__orn { position: absolute; inset-inline-end: calc(-1 * clamp(80px, 10vw, 160px)); top: 50%; width: clamp(260px, 30vw, 460px); aspect-ratio: 1; translate: 0 -50%; color: var(--sage); opacity: .55; pointer-events: none; }
.page-head__orn svg { width: 100%; height: 100%; animation: spin 160s linear infinite; }
.page-head h1 { font-size: var(--t-3xl); color: var(--green-900); max-width: 16ch; }
.page-head .lede { margin-top: 1.25rem; }
.crumbs { font-size: var(--t-xs); color: var(--ink-soft); margin-bottom: 1.25rem; }
.crumbs a { color: var(--ink-soft); }
.crumbs span[aria-hidden] { margin-inline: .4rem; color: var(--gold-deep); }
.load .page-head h1 { animation: wordIn 1s .1s var(--ease-out) both; }
.load .page-head .lede, .load .page-head .crumbs { animation: fadeUp .9s .3s var(--ease-out) both; }
.load .page-head .rule .draw { stroke-dashoffset: 1; animation: draw 1.4s .35s var(--ease-out) forwards; }

.note {
  display: flex; gap: .75rem; align-items: flex-start;
  padding: 1rem 1.25rem; border-radius: var(--r-md);
  background: var(--white); border: 1px solid var(--line); color: var(--ink-soft); font-size: var(--t-sm); line-height: 1.8;
}
.note svg { width: 20px; height: 20px; flex: none; color: var(--gold-deep); margin-top: .3rem; }

/* ==========================================================================
   Location page
   ========================================================================== */
.geo { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.geo__map { position: sticky; top: 6rem; }
.map { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.map svg { width: 100%; height: auto; aspect-ratio: 600 / 520; }
.map .sea { fill: #EAF1EC; }
.map .wave { fill: none; stroke: #CFE0D5; stroke-width: 1; stroke-dasharray: 6 10; animation: waves 30s linear infinite; }
@keyframes waves { to { stroke-dashoffset: -320; } }
.map .land { fill: var(--ivory); stroke: var(--green-900); stroke-width: 1.4; }
.map .coast-draw { fill: none; stroke: var(--green-900); stroke-width: 1.6; stroke-dasharray: 1; }
.load .map .coast-draw { stroke-dashoffset: 1; animation: draw 2.6s .2s var(--ease-out) forwards; }
.map .region { fill: transparent; transition: fill var(--d-slow) var(--ease-out); }
.map .region.is-on { fill: rgb(8 107 80 / .13); }
.map .contour { fill: none; stroke: var(--sage); stroke-width: 1; }
.map .dune { fill: none; stroke: #D9CFB4; stroke-width: 1.2; stroke-linecap: round; }
.map .route { fill: none; stroke: var(--gold); stroke-width: 1.3; stroke-dasharray: 3 5; animation: waves 18s linear infinite reverse; }
.map .lbl { font-family: var(--f-ui); font-size: 13px; fill: var(--ink-soft); }
.map .lbl--sea { fill: #6E9A82; font-size: 14px; letter-spacing: .02em; font-family: var(--f-display); }
.pin { cursor: pointer; }
.pin circle.halo { fill: var(--green-700); opacity: .18; transform-box: fill-box; transform-origin: center; animation: ping 2.8s var(--ease-out) infinite; }
.pin circle.core { fill: var(--green-900); stroke: var(--white); stroke-width: 2; transition: r var(--d-mid) var(--ease-out), fill var(--d-mid); }
.pin.is-capital circle.core { fill: var(--gold-deep); }
.pin:hover circle.core, .pin:focus-visible circle.core, .pin[aria-pressed="true"] circle.core { r: 9; }
.pin:focus-visible { outline: none; }
.pin:focus-visible circle.core { stroke: var(--gold); stroke-width: 3; }
.pin[aria-pressed="true"] circle.core { fill: var(--green-700); }
@keyframes ping { 0% { transform: scale(.6); opacity: .35; } 80%, 100% { transform: scale(2.4); opacity: 0; } }
.compass { color: var(--green-900); }
.compass .needle { transform-origin: 0 0; animation: needle 7s var(--ease-in-out) infinite; }
@keyframes needle { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }

.place-card {
  margin-top: 1rem; padding: 1.25rem 1.4rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
  min-height: 9.5rem;
}
.place-card h3 { font-size: var(--t-lg); color: var(--green-900); }
.place-card p { color: var(--ink-soft); font-size: var(--t-sm); margin-top: .3rem; }
.place-card .kind { font-size: var(--t-xs); color: var(--gold-deep); font-weight: 600; }
.place-card.swap { animation: cardSwap .55s var(--ease-out); }
@keyframes cardSwap { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } }
.place-list { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; list-style: none; padding: 0; }
.chip {
  min-height: 40px; padding: .35rem .95rem; border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  background: var(--white); color: var(--ink); font-size: var(--t-sm); cursor: pointer;
  transition: background-color var(--d-mid) var(--ease-out), color var(--d-mid), border-color var(--d-mid), transform var(--d-fast);
}
.chip:hover { border-color: var(--green-700); color: var(--green-900); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--green-900); border-color: var(--green-900); color: var(--ivory); }

.chapter { padding-block: clamp(2.5rem, 4vw, 4rem); border-top: 1px solid var(--line); }
.chapter:first-child { border-top: 0; padding-top: 0; }
.chapter h2 { font-size: var(--t-2xl); color: var(--green-900); }
.chapter h2 small { display: block; font-family: var(--f-ui); font-size: var(--t-sm); font-weight: 500; color: var(--gold-deep); margin-bottom: .4rem; }
.chapter .prose { margin-top: 1rem; }
.facts { margin: 1.75rem 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.facts div { background: var(--white); padding: 1rem 1.15rem; }
.facts dt { font-size: var(--t-xs); color: var(--ink-soft); }
.facts dd { margin: .15rem 0 0; font-family: var(--f-display); font-size: var(--t-lg); font-weight: 700; color: var(--green-900); }
.climate { margin-top: 1.75rem; }
.climate__bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; height: 120px; padding: 0; margin: 0; list-style: none; }
.climate__bars li { position: relative; height: 100%; display: flex; align-items: end; }
.climate__bars span.bar { width: 100%; height: var(--h); background: linear-gradient(to top, var(--green-700), var(--sage)); border-radius: 4px 4px 1px 1px; transform-origin: bottom; transform: scaleY(0); transition: transform 1s var(--ease-out); transition-delay: calc(var(--i) * 45ms); }
.climate.in .bar, .no-js .climate .bar { transform: scaleY(1); }
.climate__months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; font-size: 11px; color: var(--ink-soft); text-align: center; margin-top: .4rem; }
.climate figcaption { font-size: var(--t-xs); color: var(--ink-soft); margin-top: .6rem; }

/* ==========================================================================
   Constitution page
   ========================================================================== */
.progress { position: fixed; inset-inline: 0; top: 0; height: 3px; z-index: 60; background: transparent; pointer-events: none; }
.progress span { display: block; height: 100%; background: linear-gradient(to left, var(--gold), var(--green-700)); transform-origin: right; transform: scaleX(var(--p, 0)); }
@supports (animation-timeline: scroll()) {
  .progress span { animation: grow linear both; animation-timeline: scroll(root); }
  @keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}
.doc { display: grid; grid-template-columns: minmax(220px, 17rem) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; padding-bottom: var(--s-9); }
.toc { position: sticky; top: 6rem; max-height: calc(100vh - 7rem); overflow: auto; padding-inline-end: .25rem; scrollbar-width: thin; }
.toc__title { font-family: var(--f-display); font-size: var(--t-lg); color: var(--green-900); margin-bottom: .75rem; }
.toc ol { list-style: none; margin: 0; padding: 0; position: relative; border-inline-start: 1px solid var(--line-strong); }
.toc a {
  display: block; padding: .5rem 1rem; margin-inline-start: -1px; font-size: var(--t-sm); color: var(--ink-soft); text-decoration: none;
  border-inline-start: 2px solid transparent; line-height: 1.6;
  transition: color var(--d-mid) var(--ease-out), border-color var(--d-mid), background-color var(--d-mid);
}
.toc a:hover { color: var(--green-900); background: var(--white); }
.toc a.is-active { color: var(--green-900); font-weight: 600; border-inline-start-color: var(--green-700); }
.toc a small { display: block; font-size: var(--t-xs); color: var(--gold-deep); font-weight: 500; }
.toc__mobile { display: none; }
.toc__meta { margin-top: 1.25rem; font-size: var(--t-xs); color: var(--ink-soft); }

.preamble { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.75rem, 4vw, 3.25rem); text-align: center; box-shadow: var(--shadow-1); }
.preamble h2 { font-size: var(--t-xl); color: var(--green-900); }
.preamble .basmala { font-family: var(--f-callig); font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem); color: var(--green-900); line-height: 1.6; }
.preamble p { font-family: var(--f-display); font-size: var(--t-lg); line-height: 2.05; color: var(--ink); max-width: 60ch; margin: 1rem auto 0; }
.preamble::before, .preamble::after { content: ""; position: absolute; width: 46px; height: 46px; border: 1px solid var(--gold); }
.preamble::before { top: 12px; inset-inline-start: 12px; border-inline-end: 0; border-bottom: 0; border-start-start-radius: 14px; }
.preamble::after { bottom: 12px; inset-inline-end: 12px; border-inline-start: 0; border-top: 0; border-end-end-radius: 14px; }

.part { padding-top: clamp(3rem, 6vw, 5rem); }
.part__head { display: flex; align-items: baseline; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line-strong); }
.part__no { font-family: var(--f-display); font-size: var(--t-sm); color: var(--gold-deep); font-weight: 700; white-space: nowrap; }
.part__head h2 { font-size: var(--t-2xl); color: var(--green-900); }
.art { border-bottom: 1px solid var(--line); }
.art > summary, .art > .art__h {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 6.5rem 1fr 24px; gap: 1rem; align-items: baseline;
  padding: 1.15rem .25rem; font-family: var(--f-display); font-size: var(--t-lg); font-weight: 700; color: var(--ink); line-height: 1.6;
  transition: color var(--d-mid) var(--ease-out);
}
.art > .art__h { cursor: default; grid-template-columns: 6.5rem 1fr; }
.art > summary::-webkit-details-marker { display: none; }
.art > summary:hover { color: var(--green-700); }
.art__no { font-family: var(--f-ui); font-size: var(--t-sm); font-weight: 600; color: var(--green-700); }
.art__chev { width: 20px; height: 20px; color: var(--green-700); align-self: center; transition: transform var(--d-mid) var(--ease-out); }
.art[open] .art__chev { transform: rotate(180deg); }
.art__body { padding: 0 .25rem 1.5rem; padding-inline-start: 7.5rem; color: var(--ink-soft); line-height: 2.05; max-width: calc(68ch + 7.5rem); }
.art__body ol { padding-inline-start: 1.25rem; margin: .5rem 0 0; }
.art__body li + li { margin-top: .35rem; }
.art[open] .art__body { animation: unfold .6s var(--ease-out); }
@keyframes unfold { from { opacity: 0; transform: translateY(-6px); } }
.doc-tools { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1.25rem; }
.tool {
  min-height: 40px; padding: .35rem .9rem; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--white);
  font-size: var(--t-xs); font-weight: 600; color: var(--green-900); cursor: pointer; display: inline-flex; gap: .4rem; align-items: center;
  transition: border-color var(--d-mid), background-color var(--d-mid);
}
.tool:hover { border-color: var(--green-700); background: var(--sage-soft); }
.tool svg { width: 16px; height: 16px; }
.signoff { margin-top: 4rem; text-align: center; color: var(--ink-soft); font-size: var(--t-sm); }
.signoff .seal { width: 92px; height: 92px; margin: 0 auto 1rem; color: var(--green-900); }

/* ==========================================================================
   Converter page
   ========================================================================== */
.fx { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; padding-bottom: var(--s-9); }
.fx-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2); padding: clamp(1.25rem, 3vw, 2.25rem); position: relative; overflow: hidden; }
.fx-card::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 4px; background: linear-gradient(to left, var(--green-900), var(--green-700) 70%, var(--gold)); }
.fx-row { position: relative; border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: .9rem 1rem 1rem; transition: border-color var(--d-mid) var(--ease-out), box-shadow var(--d-mid) var(--ease-out), transform 500ms var(--ease-out); background: var(--ivory); }
.fx-row:focus-within { border-color: var(--green-700); box-shadow: 0 0 0 4px rgb(8 107 80 / .12); background: var(--white); }
.fx-row label, .fx-row .fx-label { font-size: var(--t-xs); color: var(--ink-soft); font-weight: 600; display: block; }
.fx-line { display: flex; align-items: center; gap: .75rem; margin-top: .35rem; }
.fx-amount {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font-family: var(--f-ui); font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.35rem); font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums; padding: .1rem 0; caret-color: var(--green-700);
}
.fx-amount::placeholder { color: #8A938C; }
.fx-out { flex: 1; min-width: 0; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.35rem); font-weight: 600; color: var(--green-900); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.6; }
.fx-err { min-height: 1.4em; margin-top: .25rem; font-size: var(--t-xs); color: #A1402F; }
.fx-swap-wrap { display: flex; justify-content: center; margin-block: -.85rem; position: relative; z-index: 3; }
.fx-swap {
  width: 52px; height: 52px; border-radius: 50%; border: 4px solid var(--white); background: var(--green-900); color: var(--ivory);
  display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-1);
  transition: background-color var(--d-mid), transform 650ms var(--ease-out);
}
.fx-swap:hover { background: var(--green-700); }
.fx-swap:active { transform: scale(.92); }
.fx-swap svg { width: 22px; height: 22px; transition: transform 650ms var(--ease-out); }
.fx-swap.spin svg { transform: rotate(180deg); }
.fx.swapping .fx-row--from { animation: swapDown 520ms var(--ease-out); }
.fx.swapping .fx-row--to { animation: swapUp 520ms var(--ease-out); }
@keyframes swapDown { 40% { transform: translateY(14px); opacity: .5; } }
@keyframes swapUp { 40% { transform: translateY(-14px); opacity: .5; } }

/* currency picker */
.cur { position: relative; flex: none; }
.cur__btn {
  display: inline-flex; align-items: center; gap: .55rem; min-height: 48px; padding: .4rem .7rem .4rem .9rem; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: var(--white); cursor: pointer; font-weight: 600; font-size: var(--t-sm);
  transition: border-color var(--d-mid), box-shadow var(--d-mid);
}
.cur__btn:hover { border-color: var(--green-700); box-shadow: var(--shadow-1); }
.cur__btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.cur__btn .chev { width: 16px; height: 16px; color: var(--ink-soft); transition: transform var(--d-mid) var(--ease-out); }
.flag { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 11px; font-weight: 700; letter-spacing: .02em; direction: ltr; background: var(--sage-soft); color: var(--green-900); }
.flag--home { background: var(--green-900); color: var(--gold); }
.cur__list {
  position: absolute; z-index: 30; top: calc(100% + 8px); inset-inline-end: 0; width: min(19rem, 80vw); max-height: 20rem; overflow: auto;
  margin: 0; padding: .4rem; list-style: none; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-2);
  transform-origin: top left; opacity: 0; transform: translateY(-6px) scale(.97); visibility: hidden;
  transition: opacity 220ms var(--ease-out), transform 320ms var(--ease-out), visibility 0s 320ms;
}
.cur.open .cur__list { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.cur__opt { display: flex; align-items: center; gap: .7rem; padding: .55rem .6rem; border-radius: var(--r-sm); cursor: pointer; font-size: var(--t-sm); }
.cur__opt .code { margin-inline-start: auto; font-size: var(--t-xs); color: var(--ink-soft); direction: ltr; }
.cur__opt[aria-selected="true"] { background: var(--sage-soft); font-weight: 600; }
.cur__opt.is-active { background: var(--green-900); color: var(--ivory); }
.cur__opt.is-active .code { color: var(--sage); }
.cur__opt.is-active .flag { background: var(--ivory); }

.fx-rate { margin-top: 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; font-size: var(--t-sm); color: var(--ink-soft); }
.fx-rate strong { color: var(--green-900); font-variant-numeric: tabular-nums; }
.quick { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.25rem; }
.fx-badge { display: inline-flex; align-items: center; gap: .4rem; font-size: var(--t-xs); font-weight: 600; color: var(--gold-deep); background: #F6EFDF; padding: .25rem .7rem; border-radius: var(--r-pill); }
.fx-side h2 { font-size: var(--t-xl); color: var(--green-900); }
.rate-table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: var(--t-sm); }
.rate-table th { text-align: start; font-weight: 600; font-size: var(--t-xs); color: var(--ink-soft); padding: .5rem .4rem; border-bottom: 1px solid var(--line-strong); }
.rate-table td { padding: .65rem .4rem; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.rate-table tr { transition: background-color var(--d-mid); }
.rate-table tbody tr:hover { background: var(--white); }
.rate-table td:last-child, .rate-table th:last-child { text-align: end; }
.rate-table .cname { display: flex; align-items: center; gap: .6rem; }
.rate-table .flag { width: 26px; height: 26px; font-size: 10px; }
.coin { width: 120px; height: 120px; margin-bottom: 1.25rem; color: var(--green-900); }
.coin .c-spin { transform-origin: 60px 60px; animation: coin 14s var(--ease-in-out) infinite; }
@keyframes coin { 0%, 100% { transform: scaleX(1); } 45%, 55% { transform: scaleX(.12); } }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { position: relative; background: var(--green-950); color: var(--sage); padding-block: clamp(3.5rem, 6vw, 5.5rem) 2rem; overflow: hidden; isolation: isolate; }
.site-footer__orn { position: absolute; inset-inline-start: -120px; bottom: -160px; width: 460px; height: 460px; z-index: -1; color: var(--green-900); }
.site-footer__orn svg { width: 100%; height: 100%; animation: spin 220s linear infinite; }
.foot { display: grid; grid-template-columns: minmax(0, 5fr) repeat(2, minmax(0, 3fr)); gap: 2.5rem; }
.foot .foot__name { margin: 0; max-width: none; font-family: var(--f-callig); font-size: clamp(2rem, 1.5rem + 1.6vw, 2.8rem); color: var(--white); line-height: 1.4; }
.foot p { font-size: var(--t-sm); line-height: 1.9; margin-top: .75rem; max-width: 40ch; }
.foot h2 { font-family: var(--f-ui); font-size: var(--t-sm); font-weight: 600; color: var(--white); margin-bottom: .75rem; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.foot a { color: var(--sage); text-decoration: none; display: inline-block; padding-block: .3rem; font-size: var(--t-sm); background: linear-gradient(currentColor, currentColor) no-repeat 100% 100% / 0 1px; transition: background-size var(--d-mid) var(--ease-out), color var(--d-mid); }
.foot a:hover { color: var(--white); background-size: 100% 1px; }
.foot__legal { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgb(166 197 178 / .18); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: var(--t-xs); }
.foot__legal p { max-width: 70ch; margin: 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (min-width: 1600px) {
  :root { --max: 86rem; }
  body { font-size: 1.125rem; }
}
@media (max-width: 1024px) {
  .services, .about__grid, .geo, .fx { grid-template-columns: 1fr; }
  .services__intro { position: static; }
  .geo__map { position: relative; top: 0; }
  .identity__stage { grid-template-columns: 1fr 1fr; }
  .identity__stage .emblem { grid-column: 1 / -1; grid-row: 1; max-width: 320px; margin-inline: auto; }
  .archframe { max-width: 340px; }
  .doc { grid-template-columns: 1fr; }
  .toc { display: none; }
  .toc__mobile { display: block; position: sticky; top: 4.6rem; z-index: 20; margin-bottom: 1.5rem; }
  .toc__mobile details { background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--r-md); box-shadow: var(--shadow-1); }
  .toc__mobile summary { list-style: none; cursor: pointer; padding: .75rem 1rem; font-weight: 600; color: var(--green-900); display: flex; justify-content: space-between; align-items: center; min-height: 48px; }
  .toc__mobile summary::-webkit-details-marker { display: none; }
  .toc__mobile summary svg { width: 18px; height: 18px; transition: transform var(--d-mid) var(--ease-out); }
  .toc__mobile details[open] summary svg { transform: rotate(180deg); }
  .toc__mobile ol { list-style: none; margin: 0; padding: 0 .5rem .5rem; max-height: 55vh; overflow: auto; }
  .toc__mobile a { display: block; padding: .6rem .6rem; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-size: var(--t-sm); }
  .toc__mobile a.is-active { background: var(--sage-soft); color: var(--green-900); font-weight: 600; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 5rem; }
  .brand__latin { letter-spacing: .2em; font-size: 11px; }
  /* tabs become a bottom bar */
  .tabs-bar { position: fixed; inset-inline: 0; bottom: 0; top: auto; border-top: 1px solid rgb(166 197 178 / .2); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -10px 30px -18px rgb(4 46 37 / .8); }
  .tabs { padding: .45rem .5rem; gap: .25rem; justify-content: space-around; }
  .tabs li { flex: 1; }
  .tab { flex-direction: column; gap: .1rem; width: 100%; justify-content: center; padding: .4rem .25rem; font-size: 12px; border-radius: var(--r-md); min-height: 54px; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .progress { top: 0; }
  .toc__mobile { top: .75rem; }
  .hero { min-height: auto; }
  .rosette .ln--fine { display: none; }
  .rosette .light--b { display: none; }
  .svc a { grid-template-columns: 3rem 1fr; padding-block: 1.4rem; }
  .svc__icon { width: 3rem; height: 3rem; }
  .svc__go { display: none; }
  .pillars { grid-template-columns: 1fr; }
  .pillars div { border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
  .identity__stage { grid-template-columns: 1fr; }
  .doors { grid-template-columns: 1fr; gap: 2.5rem; }
  .door:nth-child(2) { margin-top: 0; }
  .door__arch { aspect-ratio: 5 / 4; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot > :first-child { grid-column: 1 / -1; }
  .art > summary, .art > .art__h { grid-template-columns: 1fr 22px; gap: .25rem .75rem; }
  .art > .art__h { grid-template-columns: 1fr; }
  .art__no { grid-column: 1 / -1; }
  .art__body { padding-inline-start: .25rem; }
  .facts { grid-template-columns: 1fr; }
  .page-head__orn { opacity: .3; }
  .fx-line { flex-wrap: wrap; }
  .cur { order: -1; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .rosette .light { display: none; }
  .js [data-reveal] { opacity: 1; transform: none; clip-path: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
