/* Base, navbar, footer, search palette and shared components.
   Bone and cobalt: one accent, used for primary actions, the open/current nav
   underline, one word per hero heading and data highlights. Code is the only dark surface. */
:root {
  --bg: #e9e8e3; --surface: #f5f4f0; --sunken: #e2e1db;
  --line: #d0cfc8; --line-strong: #a8a79f;
  --fg: #0f1013; --muted: #5f6068; --dim: #8a8b92;
  --accent: #2a3cff; --accent-hover: #1f30e6; --accent-text: #2233e6;
  --ink: #0f1013; --ink-2: #181a1f; --ink-line: #262830; --ink-fg: #e4e5ea; --ink-dim: #6d6f7a; --ink-accent: #8f9bff;
  --ok: #1f8a4c; --warn: #b5650a; --bad: #c4321f;
  /* syntax colours, on the dark code surface */
  --code-k: #9aa5ff; --code-s: #9fd39b; --code-f: #e8c072; --code-n: #f2a07b; --code-v: #7fcfe8; --code-c: #6d6f7a;

  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --t-xs: 12px; --t-s: 13px; --t-sm: 15px; --t-md: 17px; --t-lg: 22px; --t-xl: 34px; --t-2xl: 56px;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 40px; --s5: 64px; --s6: 96px;
  --gutter: var(--s4); --max: none; --nav-h: 56px;
  --ease: cubic-bezier(.2,.7,.2,1); --t-fast: 120ms; --t-med: 220ms; --t-slow: 360ms;
  --sk-shine: #f0efea;
  /* corner radii: controls, cards and code, overlays, pills */
  --r-sm: 6px; --r: 10px; --r-lg: 14px; --r-pill: 999px;
  color-scheme: light;
}

/* Dark is the default theme; the light one above applies only when the visitor picks it with the
   navbar toggle (data-theme="light" on <html>). */
:root:not([data-theme="light"]) {
  --bg: #0f1013; --surface: #16181c; --sunken: #1d1f24;
  --line: #2a2c33; --line-strong: #41444d;
  --fg: #e8e9ed; --muted: #a2a4ad; --dim: #757782;
  --accent: #4152ff; --accent-hover: #5565ff; --accent-text: #9aa5ff;
  --ink: #08090b; --ink-2: #111316; --ink-line: #24262d;
  --ok: #3fbf74; --warn: #e3963f; --bad: #f06a55;
  --sk-shine: #262930;
  color-scheme: dark;
}

:root { interpolate-size: allow-keywords; } /* lets <details> animate to height: auto */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body { background: var(--bg); color: var(--fg); font: 400 var(--t-md)/1.55 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
body.no-scroll { overflow: hidden; }
main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
mark { background: none; color: var(--accent-text); }
kbd { font: 400 11px var(--mono); color: var(--muted); border: 1px solid var(--line-strong); padding: 1px 5px; }
::selection { background: var(--accent); color: #fff; }
.muted { color: var(--muted); }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--accent); color: #fff; padding: 8px 12px; font: 500 var(--t-sm) var(--sans); }
.skip:focus { left: 8px; }

/* ---- type helpers ---- */
.eyebrow, .lbl { font: 500 11px var(--mono); letter-spacing: .1em; color: var(--dim); text-transform: uppercase; }
.lbl { display: block; margin-bottom: 10px; }
.sec-title { font-size: var(--t-xl); line-height: 1.08; letter-spacing: -.03em; font-weight: 500; margin-top: 12px; }
.sec-title.big, .page-title { font-size: var(--t-2xl); line-height: 1.02; letter-spacing: -.04em; font-weight: 500; }
.sec-title em, .page-title em { font-style: normal; color: var(--accent-text); }
.soft { color: var(--muted); }
.lede { color: var(--muted); max-width: 46ch; margin-top: var(--s2); }
section { border-top: 1px solid var(--line); padding: var(--s5) var(--gutter); }

.page-head { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--s4); align-items: end; padding: var(--s6) var(--gutter) var(--s5); }
.page-head .page-title { margin-top: 12px; }
.page-head .lede { margin-top: 0; justify-self: end; }

/* ---- buttons and links ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; font: 500 var(--t-sm) var(--sans); color: var(--fg); background: none; border: 1px solid var(--line-strong); cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast); white-space: nowrap; }
.btn:hover { border-color: var(--fg); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:disabled { opacity: .5; cursor: progress; }
.btn.sm { padding: 7px 12px; font-size: 14px; }
.link { font: 500 var(--t-sm) var(--sans); border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; transition: border-color var(--t-fast), color var(--t-fast); }
.link:hover { border-color: var(--accent); color: var(--accent-text); }

/* ---- navbar ---- */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); view-transition-name: nav; }
.nav-bar { max-width: var(--max); margin: 0 auto; height: var(--nav-h); display: flex; align-items: center; gap: var(--s4); padding: 0 var(--gutter); position: relative; }
.logo { font: 600 var(--t-sm) var(--sans); white-space: nowrap; letter-spacing: -.01em; }
.logo span { color: var(--muted); font: 400 var(--t-sm) var(--mono); }
.nav-menu { height: var(--nav-h); }
.nav-titles { display: flex; gap: 26px; list-style: none; height: 100%; }
.nav-title { white-space: nowrap; font: 500 11px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); background: none; border: 0; height: var(--nav-h); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; position: relative; transition: color var(--t-fast); }
.nav-title:hover, .nav-title[aria-expanded="true"], .nav-title[aria-current] { color: var(--fg); }
.chev { transition: transform var(--t-med) var(--ease); flex: none; }
.nav-title[aria-expanded="true"] .chev { transform: rotate(180deg); }
/* keyboard focus shows as an underline under the label, not a box round the whole bar */
.nav-title:focus-visible { outline: none; }
.nav-title::after { content: ""; position: absolute; left: 0; right: 14px; bottom: 16px; height: 2px; background: var(--accent); border-radius: 1px; transform: scaleX(0); transform-origin: left; transition: transform var(--t-med) var(--ease); }
.nav-title:focus-visible::after { transform: none; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: var(--s3); }
.kbd-search { white-space: nowrap; display: flex; align-items: center; gap: 12px; background: none; border: 1px solid var(--line-strong); padding: 6px 8px 6px 12px; font: 400 var(--t-xs) var(--mono); color: var(--muted); cursor: pointer; transition: border-color var(--t-fast), color var(--t-fast); }
.kbd-search:hover { border-color: var(--fg); color: var(--fg); }
.nav-signin { font: 500 14px var(--sans); transition: color var(--t-fast); }
.nav-signin:hover { color: var(--accent-text); }
.nav-cta { padding: 8px 14px; font-size: 14px; }
.theme-toggle { width: 34px; height: 34px; display: grid; place-items: center; background: none; border: 1px solid var(--line-strong); color: var(--muted); cursor: pointer; transition: color var(--t-fast), border-color var(--t-fast); }
.theme-toggle:hover { color: var(--fg); border-color: var(--fg); }
.theme-toggle span { display: grid; place-items: center; }
.theme-toggle .ico { display: block; }
/* The sun switches to light, so it shows in the default dark theme; the moon shows in light. */
.theme-toggle .ico-moon, :root[data-theme="light"] .theme-toggle .ico-sun { display: none; }
:root[data-theme="light"] .theme-toggle .ico-moon { display: grid; }
.burger { display: none; width: 40px; height: 40px; background: none; border: 1px solid var(--line-strong); cursor: pointer; position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--fg); transition: transform var(--t-med) var(--ease), top var(--t-med) var(--ease); }
.burger span:first-child { top: 15px; }
.burger span:last-child { top: 22px; }
.burger[aria-expanded="true"] span:first-child { top: 18.5px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 18.5px; transform: rotate(-45deg); }

/* dropdown cards: click to open; a list of links with icons */
.dd { position: absolute; top: calc(var(--nav-h) + 8px); left: 0; width: 400px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 24px 48px -28px rgba(15,16,19,.4); z-index: 2;
  opacity: 0; transform: translateY(-6px); clip-path: inset(0 0 100% 0); transition: opacity 180ms, transform var(--t-med) var(--ease), clip-path var(--t-med) var(--ease); }
.dd.open { opacity: 1; transform: none; clip-path: inset(0 -60px -60px -60px); }
.dd-main { padding: 18px 14px 14px; }
.dd-head { font: 500 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding: 0 10px 8px; }
.dd-list + .dd-head { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.dd-list { list-style: none; }
.dd-list li { opacity: 0; transform: translateY(4px); transition: opacity 200ms, transform 250ms var(--ease); transition-delay: calc(var(--i) * 22ms + 60ms); }
.dd.open .dd-list li { opacity: 1; transform: none; }
.dd-link { display: flex; align-items: center; gap: 12px; padding: 8px 10px; transition: background var(--t-fast); outline-offset: -2px; }
.dd-ico { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--bg); color: var(--muted); transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast); }
.dd-txt { min-width: 0; }
.dd-txt b { display: block; font: 500 14px var(--sans); }
.dd-txt span { display: block; font-size: var(--t-xs); color: var(--muted); margin-top: 1px; }
.dd-count { margin-left: auto; font: 400 11px var(--mono); color: var(--dim); }
.dd-fams .dd-link { padding-block: 5px; }
.dd-fams .dd-ico { width: 26px; height: 26px; }
.dd-link:hover, .dd-link:focus-visible { background: var(--bg); }
.dd-link:hover .dd-ico, .dd-link:focus-visible .dd-ico { color: #fff; background: var(--accent); border-color: var(--accent); }
.pv-tag { display: inline-block; font: 500 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); border: 1px solid currentColor; padding: 1px 5px; margin-bottom: 8px; }

.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(15,16,19,.18); animation: fade-in var(--t-med) both; }

/* mobile sheet. backdrop-filter would make the header the containing block for
   the fixed sheet and squash it, so the blur is dropped while the sheet is open. */
.nav:has(.sheet:not([hidden])) { backdrop-filter: none; background: var(--bg); }
.sheet { position: fixed; inset: var(--nav-h) 0 0; background: var(--bg); border-top: 1px solid var(--line); display: flex; flex-direction: column; overflow-y: auto; animation: fade-in var(--t-med) both; }
.sheet-groups { padding: var(--s1) var(--gutter); }
.sheet-group { border-bottom: 1px solid var(--line); }
.sheet-title { width: 100%; height: 56px; display: flex; align-items: center; justify-content: space-between; background: none; border: 0; font: 500 var(--t-lg) var(--sans); letter-spacing: -.02em; cursor: pointer; }
.sheet-title .chev { width: 12px; height: 12px; color: var(--muted); }
.sheet-title[aria-expanded="true"] .chev { transform: rotate(180deg); }
.sheet-links { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-med) var(--ease); }
.sheet-links > div { overflow: hidden; }
.sheet-title[aria-expanded="true"] + .sheet-links { grid-template-rows: 1fr; }
.sheet-links a { display: block; padding: 10px 0 10px 2px; min-height: 44px; font-size: var(--t-sm); opacity: 0; transform: translateY(4px); transition: opacity 200ms, transform 250ms var(--ease); transition-delay: calc(var(--i) * 30ms + 40ms); }
.sheet-links a:last-child { padding-bottom: 18px; }
.sheet-links a span { display: block; font-size: var(--t-xs); color: var(--muted); }
.sheet-links a[aria-current="page"] { color: var(--accent-text); }
.sheet-title[aria-expanded="true"] + .sheet-links a { opacity: 1; transform: none; }
.sheet-foot { margin-top: auto; position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s1); padding: var(--s2) var(--gutter); background: var(--bg); border-top: 1px solid var(--line); }

/* ---- footer ---- */
.foot { border-top: 1px solid var(--line); background: var(--surface); }
.foot-inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1.4fr repeat(5, 1fr); gap: var(--s3); padding: var(--s5) var(--gutter) var(--s4); }
.foot-brand p { color: var(--muted); font-size: var(--t-s); margin-top: var(--s1); max-width: 24ch; }
.foot-col a { display: block; color: var(--muted); font-size: var(--t-s); padding: 4px 0; transition: color var(--t-fast); }
.foot-col a:hover { color: var(--accent-text); }
.foot-base { max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; padding: var(--s2) var(--gutter); border-top: 1px solid var(--line); font: 400 var(--t-xs) var(--mono); color: var(--dim); letter-spacing: .04em; }

/* ---- search palette ---- */
.palette { margin: 12vh auto auto; width: min(640px, calc(100% - 32px)); background: var(--surface); color: var(--fg); border: 1px solid var(--line-strong); padding: 0; box-shadow: 0 30px 60px -30px rgba(15,16,19,.45); }
.palette::backdrop { background: rgba(15,16,19,.28); }
.palette[open] { animation: rise var(--t-med) var(--ease); }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 0 var(--s2); border-bottom: 1px solid var(--line); font-family: var(--mono); color: var(--dim); }
.palette-input input { flex: 1; background: none; border: 0; outline: none; color: var(--fg); font: 400 var(--t-md) var(--sans); padding: 16px 0; }
.palette-input input::-webkit-search-cancel-button { display: none; }
.palette-list { list-style: none; max-height: 50vh; overflow-y: auto; padding: 6px 0; }
.palette-list a { display: grid; grid-template-columns: 110px 1fr; gap: var(--s2); padding: 10px var(--s2); font-size: var(--t-sm); border-left: 2px solid transparent; }
.palette-list [aria-selected="true"] a { background: var(--bg); border-left-color: var(--accent); }
.palette-list a:hover { background: var(--bg); }
.pk { font: 400 11px var(--mono); letter-spacing: .06em; color: var(--dim); text-transform: uppercase; padding-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-empty { padding: var(--s3) var(--s2); color: var(--muted); font-size: var(--t-sm); }
.palette-empty a { border-bottom: 1px solid var(--line-strong); }
.palette-foot { display: flex; gap: var(--s3); padding: 10px var(--s2); border-top: 1px solid var(--line); font: 400 11px var(--mono); color: var(--dim); }
.palette-foot kbd { margin-right: 2px; }

/* ---- shared components ---- */
.console { background: var(--ink); display: flex; flex-direction: column; font: 400 13px/1.8 var(--mono); color: var(--ink-fg); min-width: 0; }
.console .bar { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--ink-line); padding: 0 var(--s3); gap: var(--s2); }
.tabs { display: flex; gap: var(--s3); position: relative; }
.tabs button { background: none; border: 0; color: var(--muted); font: 500 11px var(--mono); letter-spacing: .08em; padding: 12px 0; cursor: pointer; transition: color var(--t-fast); }
.tabs button:hover, .tabs button[aria-selected="true"] { color: var(--fg); }
.tabs-ink { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--accent); transition: transform var(--t-med) var(--ease), width var(--t-med) var(--ease); pointer-events: none; }
.console .tabs button { color: var(--ink-dim); }
.console .tabs button:hover, .console .tabs button[aria-selected="true"] { color: var(--ink-fg); }
.status { font-size: var(--t-xs); color: var(--muted); white-space: nowrap; }
.dot { display: inline-block; width: 6px; height: 6px; background: var(--ok); margin-right: 6px; vertical-align: middle; }
.dot.q { background: var(--warn); }
.c { color: var(--ink-dim); } .s { color: var(--ink-accent); } .k { color: var(--ink-fg); }
.cursor { display: inline-block; width: 7px; height: 14px; background: var(--accent); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.st { display: inline-flex; align-items: center; gap: 7px; font: 400 var(--t-xs) var(--mono); white-space: nowrap; }
.st.up::before, .st.queued::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st.up { color: var(--ok); }
.st.up::before { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent); }
.st.queued { color: var(--warn); }

.tk-k { color: var(--code-k); } .tk-s { color: var(--code-s); } .tk-f { color: var(--code-f); }
.tk-n { color: var(--code-n); } .tk-v, .tk-o { color: var(--code-v); } .tk-c { color: var(--code-c); }
.code { tab-size: 4; font: 400 13px/1.75 var(--mono); background: var(--ink); border: 1px solid var(--ink); padding: var(--s2) var(--s3); color: var(--ink-fg); white-space: pre; overflow-x: auto; }
.copy-wrap { position: relative; }
.copy-btn { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 6px; background: var(--ink-2); border: 1px solid var(--ink-line); color: var(--ink-dim); font: 400 11px var(--mono); padding: 3px 8px; cursor: pointer; opacity: 0; transition: opacity var(--t-fast), color var(--t-fast); }
.copy-wrap:hover .copy-btn, .copy-btn:focus-visible, .copy-btn.done { opacity: 1; }
.copy-btn:hover { color: var(--ink-fg); }
.copy-btn.done { color: var(--ink-accent); }
.copy-btn svg { animation: rise var(--t-fast) var(--ease); }

.split { display: grid; grid-template-columns: .8fr 1.6fr; gap: var(--s5); align-items: start; }
.split > * { min-width: 0; }
.table-scroll { overflow-x: auto; position: relative; }
table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
th { text-align: left; font: 500 11px var(--mono); letter-spacing: .08em; color: var(--dim); padding: 10px 12px; border-bottom: 1px solid var(--line-strong); text-transform: uppercase; white-space: nowrap; }
td { padding: 14px 12px; border-bottom: 1px solid var(--line); }
tbody tr { transition: background var(--t-fast); }
.num { font-family: var(--mono); text-align: right; }
.err { color: var(--muted); font-size: var(--t-sm); padding: 14px 12px; }

.cta-band { display: flex; justify-content: space-between; align-items: end; gap: var(--s4); flex-wrap: wrap; }

/* ---- skeletons ---- */
.sk { display: block; background: linear-gradient(90deg, var(--sunken) 0 35%, var(--sk-shine) 50%, var(--sunken) 65% 100%); background-size: 300% 100%; animation: sk 1.4s linear infinite; min-height: 10px; }
.sk-line { height: 10px; margin: 10px 0; }
.sk-line.short { width: 55%; }
.sk-row { height: 18px; margin: 15px 0; }
.sk-card { height: 120px; }
.sk-bars { height: 28px; }
@keyframes sk { from { background-position: 100% 0 } to { background-position: 0 0 } }
.is-loaded { animation: fade-in var(--t-med) var(--ease) both; }
.stagger > * { animation: rise var(--t-slow) var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms); }
@keyframes fade-in { from { opacity: 0 } }
@keyframes rise { from { opacity: 0; transform: translateY(6px) } }
.load-error { font: var(--t-s) var(--mono); color: var(--bad); display: flex; gap: 12px; align-items: center; padding: 14px 0; }

/* ---- reveal: headings wipe in once ---- */
[data-reveal] { clip-path: inset(0 100% 0 0); transition: clip-path 700ms var(--ease); }
[data-reveal].in { clip-path: inset(-10% -2% -10% 0); }

/* ---- page transitions ---- */
@view-transition { navigation: auto; }
main { view-transition-name: main; }
::view-transition-old(main) { animation: var(--t-med) var(--ease) both fade-out; }
::view-transition-new(main) { animation: var(--t-slow) var(--ease) both rise; }
@keyframes fade-out { to { opacity: 0 } }

/* ---- responsive ---- */
@media (max-width: 1180px) {
  .nav-bar { gap: var(--s3); }
  .nav-titles { gap: 18px; }
  .nav-signin { display: none; }
}
@media (max-width: 1023px) {
  :root { --t-2xl: 44px; --t-xl: 30px; --gutter: var(--s3); }
  .nav-menu, .nav-signin, .nav-cta, .kbd-search kbd { display: none; }
  .kbd-search { padding: 9px 12px; color: var(--muted); }
  .burger { display: block; }
  .nav-right { gap: var(--s1); }
  .split, .page-head { grid-template-columns: 1fr; gap: var(--s3); }
  .page-head { padding-top: var(--s5); }
  .page-head .lede { justify-self: start; }
  .foot-inner { grid-template-columns: repeat(3, 1fr); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  :root { --t-2xl: 36px; --t-xl: 26px; --gutter: var(--s2); }
  section { padding: var(--s4) var(--gutter); }
  .console .bar { flex-direction: column; align-items: flex-start; gap: 0; }
  .status { padding-bottom: 10px; }
  .palette { margin-top: 8vh; }
  .palette-list a { grid-template-columns: 1fr; gap: 0; }
  .foot-inner { grid-template-columns: 1fr 1fr; }
}
@media (hover: none) { .copy-btn { opacity: 1; } }
@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; animation-delay: 0s !important; }
  .sk { animation: none; background: var(--sunken); }
  [data-reveal] { clip-path: none; }
  ::view-transition-old(main), ::view-transition-new(main) { animation: none; }
}

/* ---- language menu: the current language on a button, the rest in a card (up from the footer and the sheet) ---- */
.lang-menu { position: relative; font: 500 11px var(--mono); letter-spacing: .06em; }
.lang-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: var(--r-sm); cursor: pointer; transition: color var(--t-fast), border-color var(--t-fast); }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { color: var(--fg); border-color: var(--muted); }
.lang-menu .chev { transition: transform var(--t-fast); }
.lang-menu[open] .chev { transform: rotate(180deg); }
.lang-menu ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 200px; list-style: none; padding: 6px; font: 400 13px var(--sans); letter-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 24px 48px -28px rgba(15, 16, 19, .4); }
.lang-menu li > * { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; color: var(--muted); border-radius: var(--r-sm); }
.lang-menu a:hover { color: var(--fg); background: var(--bg); }
.lang-menu .on { color: var(--fg); background: var(--bg); }
.lang-menu small { font: 500 10px var(--mono); color: var(--dim); }
.lang-menu .off { color: var(--dim); cursor: default; }
.lang-menu .off .soon { margin-left: 0; opacity: .8; }
.foot-base .lang-menu summary { border-color: var(--line); }
.foot-base .lang-menu ul, .sheet-foot .lang-menu ul { top: auto; bottom: calc(100% + 6px); }
.foot-base .lang-menu ul { right: auto; left: 50%; translate: -50% 0; }
.sheet-foot .lang-menu ul { right: auto; left: 0; }
.sheet-foot { grid-template-columns: auto 1fr 1fr; align-items: stretch; }
.sheet-foot .lang-menu summary { height: 100%; }

/* ---- status skeletons: dynamic content starts as these ---- */
.dot.sk-dot { background: var(--sunken); animation: sk 1.4s linear infinite; background-image: linear-gradient(90deg, var(--sunken) 0 35%, var(--sk-shine) 50%, var(--sunken) 65% 100%); background-size: 300% 100%; }
.st.sk { display: inline-block; width: 64px; height: 10px; vertical-align: middle; margin: 0; }
.st.is-loaded, .dot.is-loaded { animation: fade-in var(--t-med) var(--ease) both; }
@media (max-width: 1180px) { .nav-right .lang-menu { display: none; } }
@media (prefers-reduced-motion: reduce) { .dot.sk-dot { animation: none; } }

/* ---- rounded corners: shared components ---- */
.btn, .kbd-search, .burger, .theme-toggle, .copy-btn, .dd-link, .palette-list a, .sheet-foot .btn, .palette-input input { border-radius: var(--r-sm); }
kbd, .tabs button { border-radius: 4px; }
.dd, .palette { border-radius: var(--r-lg); overflow: hidden; }
.dd-ico { border-radius: 8px; }
.code, .console { border-radius: var(--r); }
.code-bar { border-radius: var(--r) var(--r) 0 0; }
.code-bar ~ .code, .code-bar ~ .copy-wrap .code { border-radius: 0 0 var(--r) var(--r); }
.sk { border-radius: 4px; }
.dot { border-radius: 50%; }
.pv-tag { border-radius: var(--r-pill); padding-inline: 7px; }
.palette-list a { margin-inline: 6px; }
