/* techpack.live — design system
   Dark by default; [data-theme=light] and [data-theme=system] (follows the OS) override the tokens.
   Type: Inter (UI, optical sizes) + JetBrains Mono (values, addresses, file names). Icons: /static/icons.svg. */

@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/static/fonts/inter-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/static/fonts/inter-latin-ext.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url("/static/fonts/jetbrains-mono-latin.woff2") format("woff2-variations"); }

:root {
  color-scheme: dark;
  --bg: #08090b; --bg-2: #0c0e11; --panel: #111317; --panel-2: #15181d; --panel-3: #1b1f25; --panel-hover: #1a1e24;
  --line: rgba(255,255,255,.075); --line-2: rgba(255,255,255,.13); --line-3: rgba(255,255,255,.2);
  --text: #eceef2; --text-2: #a9b0bb; --text-3: #6e7682; --text-4: #4b525c;
  --accent: #ffb547; --accent-2: #ff8a3d; --accent-ink: #1b1204; --accent-text: #ffc46b;
  --accent-soft: rgba(255,181,71,.11); --accent-line: rgba(255,181,71,.34); --accent-glow: rgba(255,170,60,.28);
  --blue: #6cb6ff; --green: #3fcf8e; --red: #ff6b70; --violet: #a993ff; --cyan: #4fd6ea; --pink: #ff7eb6;
  --green-soft: rgba(63,207,142,.12); --red-soft: rgba(255,107,112,.12); --blue-soft: rgba(108,182,255,.12); --violet-soft: rgba(169,147,255,.12);
  --shadow-1: 0 1px 0 rgba(255,255,255,.04) inset, 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 1px 0 rgba(255,255,255,.05) inset, 0 8px 24px -8px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.35);
  --shadow-3: 0 1px 0 rgba(255,255,255,.06) inset, 0 24px 60px -12px rgba(0,0,0,.75), 0 8px 20px rgba(0,0,0,.4);
  --glass: rgba(10,11,14,.72);
  --map-bg: #0d1014;
  --r-xs: 6px; --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px; --r-full: 999px;
  --ease: cubic-bezier(.2,.8,.2,1); --ease-out: cubic-bezier(.16,1,.3,1); --ease-spring: cubic-bezier(.34,1.4,.64,1);
  --t-fast: 140ms; --t: 220ms; --t-slow: 420ms;
  --header-h: 64px; --wrap: 1240px; --gutter: clamp(16px, 4vw, 32px);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f4f1; --bg-2: #eeeeea; --panel: #ffffff; --panel-2: #fafaf8; --panel-3: #f2f2ee; --panel-hover: #f6f6f2;
  --line: rgba(17,19,24,.085); --line-2: rgba(17,19,24,.14); --line-3: rgba(17,19,24,.22);
  --text: #121418; --text-2: #4b535f; --text-3: #7b838f; --text-4: #a3aab4;
  --accent: #ffb03a; --accent-2: #ff8a2c; --accent-ink: #1d1203; --accent-text: #a65400;
  --accent-soft: rgba(255,160,40,.14); --accent-line: rgba(214,130,10,.42); --accent-glow: rgba(255,160,40,.3);
  --blue: #1f6fd1; --green: #11865a; --red: #d73a49; --violet: #6b4fd8; --cyan: #0b8ea3; --pink: #c2376f;
  --green-soft: rgba(17,134,90,.1); --red-soft: rgba(215,58,73,.09); --blue-soft: rgba(31,111,209,.09); --violet-soft: rgba(107,79,216,.09);
  --shadow-1: 0 1px 2px rgba(17,19,24,.06);
  --shadow-2: 0 10px 28px -12px rgba(17,19,24,.18), 0 2px 6px rgba(17,19,24,.06);
  --shadow-3: 0 30px 70px -20px rgba(17,19,24,.3), 0 8px 20px rgba(17,19,24,.08);
  --glass: rgba(250,250,247,.78);
  --map-bg: #eef0ee;
}
@media (prefers-color-scheme: light) {
  :root[data-theme="system"] {
    color-scheme: light;
    --bg: #f4f4f1; --bg-2: #eeeeea; --panel: #ffffff; --panel-2: #fafaf8; --panel-3: #f2f2ee; --panel-hover: #f6f6f2;
    --line: rgba(17,19,24,.085); --line-2: rgba(17,19,24,.14); --line-3: rgba(17,19,24,.22);
    --text: #121418; --text-2: #4b535f; --text-3: #7b838f; --text-4: #a3aab4;
    --accent: #ffb03a; --accent-2: #ff8a2c; --accent-ink: #1d1203; --accent-text: #a65400;
    --accent-soft: rgba(255,160,40,.14); --accent-line: rgba(214,130,10,.42); --accent-glow: rgba(255,160,40,.3);
    --blue: #1f6fd1; --green: #11865a; --red: #d73a49; --violet: #6b4fd8; --cyan: #0b8ea3; --pink: #c2376f;
    --green-soft: rgba(17,134,90,.1); --red-soft: rgba(215,58,73,.09); --blue-soft: rgba(31,111,209,.09); --violet-soft: rgba(107,79,216,.09);
    --shadow-1: 0 1px 2px rgba(17,19,24,.06);
    --shadow-2: 0 10px 28px -12px rgba(17,19,24,.18), 0 2px 6px rgba(17,19,24,.06);
    --shadow-3: 0 30px 70px -20px rgba(17,19,24,.3), 0 8px 20px rgba(17,19,24,.08);
    --glass: rgba(250,250,247,.78); --map-bg: #eef0ee;
  }
}

/* ───────────── base ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.55 var(--font);
  font-feature-settings: "cv11", "ss01", "ss03"; font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  min-height: 100dvh; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a.link, .prose a, .link-accent { color: var(--accent-text); text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
a.link:hover, .prose a:hover { text-decoration-color: currentColor; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.i { display: inline-block; width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.25em; }
.i.sm { width: 1em; height: 1em; } .i.lg { width: 1.5em; height: 1.5em; } .i.xl { width: 2em; height: 2em; stroke-width: 1.4; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: -.01em; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); } .faint { color: var(--text-3); } .accent { color: var(--accent-text); }
.green { color: var(--green); } .red { color: var(--red); } .blue { color: var(--blue); }
.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; }
.nowrap { white-space: nowrap; } .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap-mid { width: 100%; max-width: 1000px; margin: 0 auto; padding: 0 var(--gutter); }
.stack > * + * { margin-top: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: var(--gap, 12px); }
.row.wrap-row { flex-wrap: wrap; }
.spacer { flex: 1; }
.grid { display: grid; gap: var(--gap, 16px); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: minmax(0, 1fr); } }
kbd, .kbd { font: 500 11px/1 var(--mono); padding: 3px 5px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text-2); box-shadow: 0 1px 0 var(--line-2); }
.eyebrow { font: 600 11.5px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.eyebrow.accent { color: var(--accent-text); }
.title-xl { font-size: clamp(38px, 6.2vw, 78px); font-weight: 680; letter-spacing: -.045em; line-height: 1.0; }
.title-lg { font-size: clamp(30px, 4vw, 48px); font-weight: 660; letter-spacing: -.035em; line-height: 1.05; }
.title-md { font-size: clamp(22px, 2.6vw, 30px); font-weight: 640; letter-spacing: -.028em; }
.title-sm { font-size: 18px; font-weight: 620; letter-spacing: -.018em; }
.lede { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.55; color: var(--text-2); max-width: 62ch; }
.gradient-text { background: linear-gradient(100deg, var(--text) 30%, var(--accent) 70%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ───────────── header ───────────── */
.top {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: var(--glass); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid transparent; transition: border-color var(--t) var(--ease), background var(--t);
}
.top.scrolled, .top.solid { border-bottom-color: var(--line); }
.top .wrap { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 680; letter-spacing: -.03em; font-size: 17px; white-space: nowrap; }
.brand .mark { width: 28px; height: 28px; flex: none; }
.brand .tld { color: var(--accent-text); font-weight: 560; }
/* the owner's logo: one image per background; the theme decides which shows (same rules as the theme toggle) */
.brand .logo { height: 30px; width: auto; max-width: min(56vw, 260px); object-fit: contain; object-position: left center; }
.logo-on-light { display: none; }
:root[data-theme="light"] .logo-on-dark { display: none; }
:root[data-theme="light"] .logo-on-light { display: block; }
@media (prefers-color-scheme: light) { :root[data-theme="system"] .logo-on-dark { display: none; } :root[data-theme="system"] .logo-on-light { display: block; } }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { padding: 8px 12px; border-radius: var(--r-sm); color: var(--text-2); font-size: 14px; font-weight: 500; transition: color var(--t-fast), background var(--t-fast); }
.nav a:hover { color: var(--text); background: var(--panel-2); }
.nav a[aria-current="page"] { color: var(--text); }
.top-search {
  flex: 1; max-width: 420px; margin-left: 8px; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px 0 12px;
  border-radius: var(--r-full); background: var(--panel-2); border: 1px solid var(--line); color: var(--text-3); font-size: 14px;
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast); cursor: text;
}
.top-search:hover { border-color: var(--line-2); color: var(--text-2); }
.top-search .kbd { margin-left: auto; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: var(--r-full); color: var(--text-2); transition: background var(--t-fast), color var(--t-fast); }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn .badge-dot { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font: 700 10px/16px var(--font); text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.avatar { --h: 30; width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font: 650 12px/1 var(--font); letter-spacing: .02em; color: #fff;
  background: linear-gradient(140deg, hsl(var(--h) 70% 52%), hsl(calc(var(--h) + 40) 70% 38%)); }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; } .avatar.sm { width: 24px; height: 24px; font-size: 10px; }
img.avatar { object-fit: cover; background: var(--panel-3); }
.avatar.xl { width: 84px; height: 84px; font-size: 28px; }
.menu-btn { display: none; }
@media (max-width: 980px) { .nav.primary, .top-search { display: none; } .menu-btn { display: inline-grid; } }
.mobile-nav { position: fixed; inset: var(--header-h) 0 0; z-index: 49; background: var(--bg); padding: 20px var(--gutter) 40px; overflow: auto;
  display: grid; align-content: start; gap: 4px; animation: fadeIn var(--t) var(--ease-out); }
.mobile-nav a { padding: 14px 12px; border-radius: var(--r); font-size: 17px; font-weight: 560; display: flex; align-items: center; gap: 12px; }
.mobile-nav a:hover, .mobile-nav .mnav-theme:hover { background: var(--panel-2); }
.mobile-nav .mnav-theme { padding: 14px 12px; border-radius: var(--r); font-size: 17px; font-weight: 560; align-items: center; gap: 12px; color: inherit; text-align: left; }
[data-theme-toggle] .theme-dark { display: none; }
:root[data-theme="light"] [data-theme-toggle] .theme-dark { display: block; }
:root[data-theme="light"] [data-theme-toggle] .theme-light { display: none; }
@media (prefers-color-scheme: light) { :root[data-theme="system"] [data-theme-toggle] .theme-dark { display: block; } :root[data-theme="system"] [data-theme-toggle] .theme-light { display: none; } }
.link-like { color: inherit; font: inherit; padding: 0; text-align: left; }
.link-like:hover { color: var(--text); }
@media (max-width: 980px) { .mobile-only-search { display: inline-grid !important; } }
@media (max-width: 760px) { .hide-mobile { display: none !important; } }
.announce { background: linear-gradient(90deg, var(--accent-soft), transparent); border-bottom: 1px solid var(--accent-line); font-size: 13.5px; color: var(--text-2); }
.announce .wrap { padding-top: 9px; padding-bottom: 9px; display: flex; gap: 10px; align-items: center; }

/* ───────────── buttons ───────────── */
.btn {
  --bh: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--bh); padding: 0 16px;
  border-radius: var(--r-full); font-size: 14px; font-weight: 580; letter-spacing: -.005em; white-space: nowrap; user-select: none;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); box-shadow: var(--shadow-1);
  transition: transform var(--t-fast) var(--ease), background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), color var(--t-fast);
}
.btn:hover { background: var(--panel-3); border-color: var(--line-3); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled], .btn.is-busy { opacity: .55; pointer-events: none; }
.btn.primary { background: linear-gradient(180deg, #ffc566, var(--accent) 55%, #f7a23a); border-color: rgba(0,0,0,.18); color: var(--accent-ink);
  box-shadow: 0 1px 0 rgba(255,255,255,.45) inset, 0 6px 20px -6px var(--accent-glow), 0 1px 2px rgba(0,0,0,.3); }
.btn.primary:hover { background: linear-gradient(180deg, #ffcf7d, #ffbd57 55%, #ffab45); box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 10px 28px -6px var(--accent-glow), 0 1px 2px rgba(0,0,0,.3); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--panel-2); color: var(--text); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-soft); border-color: color-mix(in oklab, var(--red) 40%, transparent); }
.btn.danger.solid { background: var(--red); color: #fff; border-color: transparent; }
.btn.sm { --bh: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }
.btn.lg { --bh: 48px; padding: 0 22px; font-size: 15.5px; }
.btn.square { width: var(--bh); padding: 0; }
.btn.block { width: 100%; }
.btn .i { width: 1.1em; height: 1.1em; }
.btn-group { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.spinner { width: 1em; height: 1em; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }

/* ───────────── forms ───────────── */
.field { display: grid; gap: 6px; }
.field > label, .label { font-size: 13px; font-weight: 580; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.req { color: var(--accent-text); font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.opt { color: var(--text-4); font-size: 11px; font-weight: 550; letter-spacing: .04em; }
.help { font-size: 12.5px; color: var(--text-3); line-height: 1.45; }
.input, .select, .textarea {
  width: 100%; min-height: 42px; padding: 10px 13px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line-2);
  color: var(--text); font-size: 14.5px; outline: none; transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-3); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--panel); }
.input.lg { min-height: 50px; font-size: 16px; border-radius: var(--r); }
.input.invalid, .field.invalid .input { border-color: color-mix(in oklab, var(--red) 70%, transparent); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.input-icon { position: relative; }
.input-icon > .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon > .input { padding-left: 40px; }
.input-unit { position: relative; }
.input-unit .unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: 500 12px var(--mono); color: var(--text-3); pointer-events: none; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; line-height: 1.45; }
.check input { appearance: none; width: 18px; height: 18px; flex: none; margin-top: 1px; border-radius: 5px; border: 1.5px solid var(--line-3); background: var(--bg-2); display: grid; place-items: center; transition: all var(--t-fast); cursor: pointer; }
.check input[type="radio"] { border-radius: 50%; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: translateY(-1px) rotate(-45deg); }
.check input[type="radio"]:checked::after { width: 7px; height: 7px; border: 0; border-radius: 50%; background: var(--accent-ink); transform: none; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 99px; background: var(--panel-3); border: 1px solid var(--line-2); position: relative; transition: background var(--t) var(--ease); cursor: pointer; flex: none; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2); transition: transform var(--t) var(--ease-spring), background var(--t); }
.switch input:checked { background: var(--accent); border-color: var(--accent); }
.switch input:checked::after { transform: translateX(16px); background: var(--accent-ink); }
.seg { display: inline-flex; padding: 3px; border-radius: var(--r-full); background: var(--panel-2); border: 1px solid var(--line); gap: 2px; }
.seg button, .seg a, .seg label { height: 30px; padding: 0 12px; border-radius: var(--r-full); font-size: 13px; font-weight: 560; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; transition: all var(--t-fast); cursor: pointer; }
.seg input { display: none; }
.seg [aria-pressed="true"], .seg .on, .seg input:checked + span { background: var(--panel-3); color: var(--text); box-shadow: var(--shadow-1); }
.seg label:has(input:checked) { background: var(--panel-3); color: var(--text); box-shadow: var(--shadow-1); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(max(240px, (100% - 20px) / 2), 1fr)); gap: 18px 20px; }   /* two columns, or one when the form is too narrow for two 240 px fields (a date-time picker needs ~235 px) */
.form-grid > * { min-width: 0; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 6px; }
.error-text { color: var(--red); font-size: 13px; }
.alert { display: flex; gap: 12px; padding: 13px 15px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--panel-2); font-size: 14px; align-items: flex-start; }
.alert .i { margin-top: 1px; }
.alert.err { border-color: color-mix(in oklab, var(--red) 45%, transparent); background: var(--red-soft); }
.alert.ok { border-color: color-mix(in oklab, var(--green) 45%, transparent); background: var(--green-soft); }
.alert.warn { border-color: var(--accent-line); background: var(--accent-soft); }
.alert.info { border-color: color-mix(in oklab, var(--blue) 40%, transparent); background: var(--blue-soft); }

/* ───────────── surfaces ───────────── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.card.pad { padding: 22px; }
.card.hover { transition: transform var(--t) var(--ease), border-color var(--t), box-shadow var(--t); }
.card.hover:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: var(--shadow-2); }
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { font-size: 15px; font-weight: 620; letter-spacing: -.01em; }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.panel-soft { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-full); border: 1px solid var(--line-2);
  background: var(--panel); font-size: 13px; font-weight: 520; color: var(--text-2); transition: all var(--t-fast); white-space: nowrap; cursor: pointer; }
.chip:hover { color: var(--text); border-color: var(--line-3); }
.chip.on, .chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); }
.chip .count { font-size: 11.5px; color: var(--text-3); }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--r-full); font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
  background: var(--panel-3); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap; }
.badge .i { width: 12px; height: 12px; }
.badge.accent { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-line); }
.badge.green { background: var(--green-soft); color: var(--green); border-color: color-mix(in oklab, var(--green) 30%, transparent); }
.badge.red { background: var(--red-soft); color: var(--red); border-color: color-mix(in oklab, var(--red) 30%, transparent); }
.badge.blue { background: var(--blue-soft); color: var(--blue); border-color: color-mix(in oklab, var(--blue) 30%, transparent); }
.badge.violet { background: var(--violet-soft); color: var(--violet); border-color: color-mix(in oklab, var(--violet) 30%, transparent); }
.badge.dotted::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.divider { height: 1px; background: var(--line); margin: 20px 0; }
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 48px 20px; color: var(--text-2); }
.empty .glyph { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); color: var(--text-3); margin-bottom: 6px; }
.empty h3 { font-size: 16px; color: var(--text); }
.empty p { max-width: 42ch; font-size: 14px; }
.skeleton { background: linear-gradient(90deg, var(--panel-2) 0%, var(--panel-3) 40%, var(--panel-2) 80%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--r-sm); }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); letter-spacing: .02em; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel-2); position: sticky; top: 0; }
table.t td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr { transition: background var(--t-fast); }
table.t tbody tr:hover { background: var(--panel-hover); }
table.t td.n, table.t th.n { text-align: right; font-variant-numeric: tabular-nums; }
table.t.compact td { padding: 8px 12px; } table.t.compact th { padding: 8px 12px; }
table.t a.rowlink { font-weight: 560; }
table.t a.rowlink:hover { color: var(--accent-text); }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { position: relative; padding: 12px 14px; font-size: 14px; font-weight: 560; color: var(--text-3); white-space: nowrap; transition: color var(--t-fast); display: inline-flex; gap: 8px; align-items: center; }
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs a[aria-current="page"], .tabs .on { color: var(--text); }
.tabs a[aria-current="page"]::after, .tabs .on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }

/* dropdown menu */
.dropdown { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: 6px; z-index: 60; background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--r); box-shadow: var(--shadow-3); transform-origin: top right; animation: popIn var(--t) var(--ease-out); }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: var(--r-sm); font-size: 14px; color: var(--text-2); text-align: left; }
.menu a:hover, .menu button:hover { background: var(--panel-2); color: var(--text); }
.menu .sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu .menu-head { padding: 10px 10px 8px; }
.menu .menu-head b { display: block; font-size: 14px; } .menu .menu-head span { font-size: 12.5px; color: var(--text-3); }

/* modal / drawer */
dialog.modal { border: 0; padding: 0; background: transparent; color: var(--text); max-width: min(560px, calc(100vw - 24px)); width: 100%; }
dialog.modal::backdrop { background: rgba(4,5,7,.62); backdrop-filter: blur(6px); animation: fadeIn var(--t) var(--ease-out); }
dialog.modal[open] .modal-card { animation: modalIn var(--t-slow) var(--ease-out); }
.modal-card { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--shadow-3); overflow: hidden; }
.modal-card header { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-card header h2 { font-size: 16px; }
.modal-card .modal-body { padding: 20px; max-height: 70vh; overflow: auto; }
.modal-card footer { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--panel-2); }
dialog.modal.wide { max-width: min(880px, calc(100vw - 24px)); }

/* toasts */
.toasts { position: fixed; z-index: 200; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: min(460px, calc(100vw - 32px)); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: var(--r-full); background: var(--panel-3); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-3); font-size: 14px; font-weight: 520; animation: toastIn var(--t-slow) var(--ease-spring); }
.toast.leaving { animation: toastOut var(--t) var(--ease) forwards; }
.toast.ok .i { color: var(--green); } .toast.err .i { color: var(--red); } .toast.info .i { color: var(--blue); }

/* tooltips */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  padding: 6px 9px; border-radius: 7px; background: var(--panel-3); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); color: var(--text); font-size: 12px; font-weight: 500;
  white-space: nowrap; z-index: 70; pointer-events: none; animation: fadeIn var(--t-fast) var(--ease-out); }

/* progress ring (completeness) */
.ring { --p: 0; --size: 64px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--panel-3) 0); }
.ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--panel); }
.ring span { position: relative; font: 650 15px/1 var(--font); font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); width: calc(var(--p, 0) * 1%); transition: width var(--t-slow) var(--ease-out); }

/* ───────────── footer ───────────── */
.foot { margin-top: 96px; border-top: 1px solid var(--line); background: var(--bg-2); font-size: 14px; color: var(--text-2); }
.foot .wrap { padding-top: 48px; padding-bottom: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.foot h4 { font-size: 12.5px; font-weight: 620; color: var(--text); letter-spacing: .02em; margin-bottom: 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot a:hover { color: var(--text); }
.foot-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--text-3); }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* ───────────── hero & search ───────────── */
.hero { position: relative; z-index: 3; isolation: isolate; padding: clamp(56px, 10vw, 128px) 0 clamp(48px, 7vw, 88px); }
.hero .beams { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.beam { position: absolute; top: -10%; left: 50%; width: 46vw; max-width: 720px; height: 120%; transform-origin: 50% 0;
  background: conic-gradient(at 50% 0%, transparent 168deg, var(--beam-c, rgba(255,186,90,.20)) 176deg, var(--beam-c2, rgba(255,214,150,.30)) 180deg, var(--beam-c, rgba(255,186,90,.20)) 184deg, transparent 192deg);
  filter: blur(18px); opacity: .9; mix-blend-mode: screen; transform: rotate(var(--rot-a, 0deg)); animation: sweep var(--dur, 16s) var(--ease) infinite alternate; }
.beam.b1 { --rot-a: -24deg; --rot-b: -6deg; margin-left: -40vw; --dur: 17s; }
.beam.b2 { --rot-a: 14deg; --rot-b: -12deg; margin-left: -23vw; --dur: 21s; --beam-c: rgba(120,170,255,.12); --beam-c2: rgba(170,205,255,.18); }
.beam.b3 { --rot-a: -10deg; --rot-b: 18deg; margin-left: -6vw; --dur: 19s; --beam-c: rgba(255,140,80,.14); --beam-c2: rgba(255,190,140,.2); }
:root[data-theme="light"] .beam { mix-blend-mode: multiply; opacity: .55; }
.hero .haze { position: absolute; inset: 0; z-index: -2; background:
  radial-gradient(60% 50% at 50% 0%, rgba(255,170,70,.10), transparent 70%),
  radial-gradient(40% 40% at 85% 10%, rgba(110,150,255,.07), transparent 70%); }
.hero .floor { position: absolute; left: 0; right: 0; bottom: 0; height: 40%; z-index: -1; background: linear-gradient(180deg, transparent, var(--bg) 85%); }
.hero-inner { display: grid; justify-items: center; text-align: center; gap: 22px; }
.hero .lede { margin: 0 auto; }
.searchbox { position: relative; z-index: 20; width: min(720px, 100%); margin-top: 10px; }
.searchbox .field-wrap { position: relative; display: flex; align-items: center; gap: 12px; height: 62px; padding: 0 12px 0 22px; border-radius: 20px;
  background: color-mix(in oklab, var(--panel) 88%, transparent); border: 1px solid var(--line-2); box-shadow: var(--shadow-3), 0 0 0 0 var(--accent-soft);
  backdrop-filter: blur(14px); transition: border-color var(--t), box-shadow var(--t); }
.searchbox .field-wrap:focus-within { border-color: var(--accent-line); box-shadow: var(--shadow-3), 0 0 0 6px var(--accent-soft); }
.searchbox input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 17.5px; font-weight: 450; letter-spacing: -.01em; }
.searchbox input::placeholder { color: var(--text-3); }
.searchbox .scan { position: absolute; left: 18px; right: 18px; bottom: -1px; height: 2px; border-radius: 2px; overflow: hidden; opacity: 0; transition: opacity var(--t); }
.searchbox .scan::after { content: ""; position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: scan 1s var(--ease) infinite; }
.searchbox.busy .scan { opacity: 1; }
.search-hints { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; font-size: 13px; color: var(--text-3); }
.search-hints button { color: var(--text-2); padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line); background: color-mix(in oklab, var(--panel) 70%, transparent); transition: all var(--t-fast); }
.search-hints button:hover { color: var(--text); border-color: var(--line-3); }

/* live results (hero, palette and /search share these) */
.results { position: relative; display: grid; gap: 2px; }
.results-pop { position: absolute; left: 0; right: 0; top: calc(100% + 10px); z-index: 30; text-align: left; padding: 8px; border-radius: 18px;
  background: var(--panel); border: 1px solid var(--line-2); box-shadow: var(--shadow-3); max-height: min(68vh, 620px); overflow: auto; overscroll-behavior: contain; }
.res-group { padding: 10px 10px 4px; font: 600 11px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); display: flex; justify-content: space-between; }
.res { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 12px; cursor: pointer;
  transition: background var(--t-fast); will-change: transform, opacity; }
.res:hover, .res.active { background: var(--panel-2); }
.res.active { box-shadow: inset 0 0 0 1px var(--line-2); }
.res .glyph, .res-g .glyph { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: var(--text-2); background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.res .glyph img, .res-g .glyph img { width: 100%; height: 100%; object-fit: cover; }
.res .glyph.venue, .res-g .glyph.venue { --h: 30; color: hsl(var(--h) 85% 72%); background: linear-gradient(140deg, hsl(var(--h) 60% 22% / .9), hsl(calc(var(--h) + 30) 50% 12% / .9)); border-color: hsl(var(--h) 60% 40% / .3); }
:root[data-theme="light"] :is(.res, .res-g) .glyph.venue { color: hsl(var(--h) 70% 30%); background: linear-gradient(140deg, hsl(var(--h) 80% 92%), hsl(calc(var(--h) + 30) 70% 86%)); }
.res .t1 { display: block; font-weight: 580; font-size: 14.5px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res .t2 { display: block; font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res .snip { font-size: 12.5px; color: var(--text-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-top: 2px; }
.res mark, .hl mark { background: var(--accent-soft); color: var(--accent-text); border-radius: 3px; padding: 0 2px; box-shadow: 0 0 0 1px var(--accent-line) inset; }
.res .meta { display: flex; gap: 8px; align-items: center; color: var(--text-3); font-size: 12px; }
.res .go { color: var(--text-4); transition: transform var(--t-fast), color var(--t-fast); }
.res.active .go, .res:hover .go { color: var(--accent-text); transform: translateX(2px); }
.res-enter { animation: resIn 360ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 28ms); }
.res-foot { display: flex; gap: 14px; align-items: center; padding: 10px 10px 4px; border-top: 1px solid var(--line); margin-top: 6px; color: var(--text-3); font-size: 12px; }
.res-empty { padding: 26px 16px; text-align: center; color: var(--text-2); font-size: 14px; }

/* command palette */
dialog.palette { border: 0; padding: 0; background: transparent; width: min(680px, calc(100vw - 20px)); max-width: none; margin: 10vh auto auto; color: var(--text); }
dialog.palette::backdrop { background: rgba(4,5,7,.55); backdrop-filter: blur(8px); animation: fadeIn var(--t) var(--ease-out); }
dialog.palette[open] .pal { animation: palIn 320ms var(--ease-out); }
.pal { background: var(--panel); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: var(--shadow-3); overflow: hidden; }
.pal .pal-input { display: flex; gap: 12px; align-items: center; padding: 0 18px; height: 60px; border-bottom: 1px solid var(--line); position: relative; }
.pal .pal-input input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 17px; }
.pal .pal-body { max-height: min(60vh, 560px); overflow: auto; padding: 8px; overscroll-behavior: contain; }
.pal .scan { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; opacity: 0; transition: opacity var(--t); }
.pal .scan::after { content: ""; position: absolute; inset: 0; width: 35%; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: scan .9s var(--ease) infinite; }
.pal.busy .scan { opacity: 1; }

/* ───────────── venue cards & lists ───────────── */
.vcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.vcard { position: relative; display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line);
  transition: transform var(--t) var(--ease), border-color var(--t), box-shadow var(--t); }
.vcard:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow-2); }
.vcard .cover { --h: 30; position: relative; height: 128px; overflow: hidden; background:
  radial-gradient(120% 120% at 100% 0%, hsl(var(--h) 70% 50% / .35), transparent 60%),
  radial-gradient(90% 120% at 0% 100%, hsl(calc(var(--h) + 40) 60% 40% / .25), transparent 60%), var(--panel-2); }
.vcard .cover img { width: 100%; height: 100%; object-fit: cover; }
.vcard .cover .mono-mark { position: absolute; right: 14px; bottom: 10px; font: 700 44px/1 var(--font); letter-spacing: -.05em; color: hsl(var(--h) 80% 80% / .16); }
:root[data-theme="light"] .vcard .cover .mono-mark { color: hsl(var(--h) 60% 30% / .14); }
.vcard .cover .type { position: absolute; left: 14px; top: 12px; }
.vcard .body { padding: 14px 16px 16px; display: grid; gap: 10px; align-content: start; }
.vcard h3 { font-size: 16px; font-weight: 620; letter-spacing: -.015em; }
.vcard .place { font-size: 13px; color: var(--text-3); display: flex; gap: 6px; align-items: center; }
.vcard .stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.vcard .stats span { display: inline-flex; gap: 5px; align-items: center; }
.vcard .stats .i { color: var(--text-3); width: 14px; height: 14px; }
.vcard .foot-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); }
.vlist { display: grid; }
.vrow { display: grid; grid-template-columns: 48px minmax(0, 2fr) minmax(0, 1fr) 110px 120px 28px; gap: 14px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); transition: background var(--t-fast); }
.vrow:hover { background: var(--panel-hover); }
@media (max-width: 860px) { .vrow { grid-template-columns: 44px minmax(0, 1fr) 28px; } .vrow .hide-sm { display: none; } }
.fresh { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.fresh::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.fresh.aging::before { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fresh.stale::before { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }

/* directory */
.dir-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 22px; }
.filters h4 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); font-weight: 620; margin-bottom: 10px; }
.filter-list { display: grid; gap: 8px; max-height: 260px; overflow: auto; }
@media (max-width: 980px) { .dir-layout { grid-template-columns: minmax(0, 1fr); } .filters { position: static; } }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.map-full { height: min(72vh, 760px); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--map-bg); position: relative; }

/* ───────────── venue page ───────────── */
.vhero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); isolation: isolate; }
.vhero .bg { position: absolute; inset: 0; z-index: -1; }
.vhero .bg img { width: 100%; height: 100%; object-fit: cover; opacity: .32; filter: saturate(.9); }
.vhero .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in oklab, var(--bg) 30%, transparent), var(--bg) 92%),
  radial-gradient(60% 80% at 80% 0%, hsl(var(--h, 30) 70% 50% / .20), transparent 70%); }
.vhero .wrap { padding-top: 40px; padding-bottom: 28px; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text-3); margin-bottom: 18px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--text); }
.vtitle { display: flex; gap: 20px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.vtitle h1 { font-size: clamp(30px, 4.6vw, 52px); letter-spacing: -.04em; font-weight: 680; }
.vtitle .sub { margin-top: 10px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; color: var(--text-2); font-size: 14.5px; }
.vtitle .sub > span { display: inline-flex; gap: 6px; align-items: center; }
.vtitle .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.statstrip { margin-top: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg);
  background: color-mix(in oklab, var(--panel) 80%, transparent); backdrop-filter: blur(10px); overflow: hidden; }
.stat { padding: 16px 18px; border-right: 1px solid var(--line); display: grid; gap: 6px; }
.stat:last-child { border-right: 0; }
.stat .k { display: flex; gap: 7px; align-items: center; font-size: 12px; color: var(--text-3); font-weight: 520; }
.stat .k .i { width: 15px; height: 15px; }
.stat .v { font: 620 19px/1.1 var(--font); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.vbody { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; padding-top: 32px; align-items: start; }
.vnav { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 2px; font-size: 14px; }
.vnav a { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: var(--r-sm); color: var(--text-3); transition: color var(--t-fast), background var(--t-fast); position: relative; }
.vnav a:hover { color: var(--text); background: var(--panel-2); }
.vnav a.on { color: var(--text); background: var(--panel-2); }
.vnav a.on::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--accent); }
.vnav a .i { width: 16px; height: 16px; }
.vnav .count { margin-left: auto; font-size: 11.5px; color: var(--text-4); }
@media (max-width: 980px) { .vbody { grid-template-columns: minmax(0, 1fr); } .vnav { position: sticky; top: var(--header-h); z-index: 20; display: flex; overflow-x: auto; background: var(--glass); backdrop-filter: blur(14px);
  margin: 0 calc(-1 * var(--gutter)); padding: 8px var(--gutter); border-bottom: 1px solid var(--line); scrollbar-width: none; } .vnav a { white-space: nowrap; } .vnav a.on::before { display: none; } }
.vsec { padding: 6px 0 34px; scroll-margin-top: calc(var(--header-h) + 20px); }
.vsec + .vsec { border-top: 1px solid var(--line); padding-top: 30px; }
.vsec-head { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.vsec-head .glyph { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); color: var(--accent-text); }
.vsec-head h2 { font-size: 19px; letter-spacing: -.02em; }
.vsec-head p { font-size: 13px; color: var(--text-3); }
.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.spec { background: var(--panel); padding: 14px 16px; display: grid; gap: 5px; align-content: start; }
.spec .k { font-size: 12px; color: var(--text-3); font-weight: 520; }
.spec .v { font-size: 15px; font-weight: 560; letter-spacing: -.01em; font-variant-numeric: tabular-nums; word-break: break-word; }
.spec.wide { grid-column: 1 / -1; }
.spec .v.text { font-weight: 450; font-size: 14px; color: var(--text-2); line-height: 1.6; white-space: pre-line; }
.inv { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.inv th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--text-3); letter-spacing: .03em; padding: 0 12px 8px; }
.inv td { padding: 9px 12px; border-top: 1px solid var(--line); }
.inv td.q { width: 56px; font-variant-numeric: tabular-nums; color: var(--accent-text); font-weight: 620; }
.inv-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 4px 4px; background: var(--panel); margin-top: 14px; overflow-x: auto; }
.inv-title { font-size: 13px; font-weight: 600; color: var(--text-2); padding: 0 12px 10px; }
.locked { position: relative; display: grid; place-items: center; gap: 10px; text-align: center; padding: 28px; border-radius: var(--r-lg); border: 1px dashed var(--line-2); color: var(--text-2); background: var(--panel-2); }

/* documents */
.docs { display: grid; gap: 10px; }
.doc { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line);
  transition: border-color var(--t), box-shadow var(--t), transform var(--t) var(--ease); }
.doc:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.doc .thumb { width: 76px; height: 96px; border-radius: 9px; overflow: hidden; background: var(--panel-2) center/cover no-repeat; border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-3); position: relative; cursor: zoom-in; }
.doc .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.doc .thumb .ext { position: absolute; left: 6px; bottom: 6px; font: 650 9.5px/1 var(--mono); padding: 3px 5px; border-radius: 4px; background: rgba(0,0,0,.65); color: #fff; letter-spacing: .04em; text-transform: uppercase; }
.doc .thumb.blur img { filter: blur(6px) saturate(.6); transform: scale(1.1); }
.doc .thumb .lock { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.25); }
.doc h3 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.doc .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--text-3); margin-top: 6px; }
.doc .meta span { display: inline-flex; gap: 5px; align-items: center; }
.doc .acts { display: flex; gap: 6px; }
@media (max-width: 640px) { .doc { grid-template-columns: 56px minmax(0, 1fr); } .doc .thumb { width: 56px; height: 72px; } .doc .acts { grid-column: 1 / -1; } }
.cat-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }

/* contacts */
.contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.contact { padding: 16px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); display: grid; gap: 12px; }
.contact .who { display: flex; gap: 12px; align-items: center; }
.contact .who b { display: block; font-size: 15px; font-weight: 600; }
.contact .who span { font-size: 12.5px; color: var(--text-3); }
.contact .ways { display: flex; gap: 6px; flex-wrap: wrap; }
.contact .line { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--text-2); }
.contact .line .i { color: var(--text-3); width: 15px; height: 15px; }

/* map + amenities */
.vmap-wrap { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 980px) { .vmap-wrap { grid-template-columns: minmax(0, 1fr); } }
.vmap { height: 460px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--map-bg); position: relative; }
.vmap .map-hint { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); font-size: 13px; }
.amen { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); display: grid; grid-template-rows: auto 1fr; max-height: 460px; overflow: hidden; }
.amen-cats { display: flex; gap: 6px; padding: 12px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.amen-list { overflow: auto; padding: 6px; }
.amen-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 8px; border-radius: 10px; cursor: pointer; transition: background var(--t-fast); }
.amen-item:hover, .amen-item.on { background: var(--panel-2); }
.amen-item .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in oklab, var(--c, var(--accent)) 16%, transparent); color: var(--c, var(--accent)); }
.amen-item .ic .i { width: 17px; height: 17px; }
.amen-item b { display: block; font-size: 13.5px; font-weight: 580; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amen-item span { font-size: 12px; color: var(--text-3); }
.amen-item .d { text-align: right; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mk { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--c, #555); border: 2px solid rgba(255,255,255,.9); box-shadow: 0 4px 12px rgba(0,0,0,.35); cursor: pointer; transition: transform var(--t-fast) var(--ease-spring); }
.mk .i { width: 15px; height: 15px; stroke-width: 1.9; }
.mk:hover, .mk.on { transform: scale(1.18); }
.mk.venue { width: 44px; height: 44px; background: linear-gradient(160deg, #ffc566, var(--accent-2)); color: var(--accent-ink); border-color: #fff; box-shadow: 0 0 0 8px rgba(255,170,60,.25), 0 8px 24px rgba(0,0,0,.4); }
.mk.venue .i { width: 22px; height: 22px; }
.mk.dot { width: 14px; height: 14px; border-width: 2px; }
.maplibregl-popup-content { background: var(--panel) !important; color: var(--text) !important; border-radius: 12px !important; border: 1px solid var(--line-2); box-shadow: var(--shadow-3) !important; padding: 12px 14px !important; font: 13px/1.45 var(--font); }
.maplibregl-popup-tip { border-top-color: var(--panel) !important; border-bottom-color: var(--panel) !important; }
.maplibregl-popup-close-button { color: var(--text-3); font-size: 18px; right: 6px; top: 4px; }
.maplibregl-ctrl-group { background: var(--panel) !important; border: 1px solid var(--line-2); box-shadow: var(--shadow-2) !important; }
.maplibregl-ctrl-group button { filter: invert(var(--ctrl-invert, 0)); }
:root:not([data-theme="light"]) .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1) brightness(.85); }
.maplibregl-ctrl-attrib { background: color-mix(in oklab, var(--panel) 80%, transparent) !important; color: var(--text-3) !important; font-size: 10.5px; }
.maplibregl-ctrl-attrib a { color: var(--text-2) !important; }
.pop-title { font-weight: 620; font-size: 14px; margin-bottom: 2px; }
.pop-sub { color: var(--text-3); font-size: 12px; }
.pop-acts { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

/* history timeline */
.timeline { display: grid; gap: 0; position: relative; }
.tl-item { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 14px; padding-bottom: 18px; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 1px; background: var(--line-2); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--accent-text); }
.tl-dot .i { width: 12px; height: 12px; }
.tl-item b { font-size: 14px; font-weight: 580; }
.tl-item .when { font-size: 12px; color: var(--text-3); }
.tl-item ul { margin: 6px 0 0; padding-left: 16px; color: var(--text-2); font-size: 13.5px; }

/* ───────────── viewer ───────────── */
.viewer { position: fixed; inset: 0; z-index: 150; display: grid; grid-template-rows: auto minmax(0, 1fr); background: rgba(6,7,9,.86); backdrop-filter: blur(10px); animation: fadeIn var(--t) var(--ease-out); }
:root[data-theme="light"] .viewer { background: rgba(236,236,232,.92); }
.viewer .vbar { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.viewer .vbar .name { font-weight: 600; font-size: 14.5px; min-width: 0; }
.viewer .vbar .sub { font-size: 12px; color: var(--text-3); }
.viewer .stage-area { overflow: auto; position: relative; overscroll-behavior: contain; }
.viewer .pdfViewer .page { margin: 14px auto !important; border: 0 !important; border-radius: 6px; overflow: hidden; box-shadow: 0 20px 50px -10px rgba(0,0,0,.6); background: #fff; }
.viewer .img-stage { min-height: 100%; display: grid; place-items: center; padding: 20px; }
.viewer .img-stage img { max-width: 100%; max-height: calc(100vh - 110px); border-radius: 8px; box-shadow: 0 20px 50px -10px rgba(0,0,0,.6); }
.viewer .find { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); }
.viewer .find input { border: 0; outline: 0; background: transparent; width: 160px; font-size: 13.5px; }
.viewer .loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-2); gap: 12px; align-content: center; }
.viewer .zipview { max-width: 820px; margin: 24px auto; }
@media (max-width: 700px) { .viewer .find { display: none; } }

/* ───────────── app shell (signed in) ───────────── */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100dvh - var(--header-h)); }
.side { border-right: 1px solid var(--line); padding: 20px 14px; position: sticky; top: var(--header-h); height: calc(100dvh - var(--header-h)); overflow: auto; display: grid; align-content: start; gap: 2px; background: var(--bg-2); }
.side .grp { font: 600 11px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--text-4); padding: 18px 12px 8px; }
.side a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--r-sm); font-size: 14px; font-weight: 520; color: var(--text-2); transition: background var(--t-fast), color var(--t-fast); }
.side a:hover { background: var(--panel-2); color: var(--text); }
.side a[aria-current="page"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.side a[aria-current="page"] .i { color: var(--accent-text); }
.side a .n { margin-left: auto; font-size: 11.5px; padding: 1px 7px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.side a .n.soft { background: var(--panel-3); color: var(--text-3); }
.main { padding: 28px clamp(16px, 3vw, 40px) 64px; min-width: 0; }
.page-head { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.03em; }
.page-head p { color: var(--text-2); margin-top: 6px; font-size: 14.5px; }
@media (max-width: 980px) { .app { grid-template-columns: minmax(0, 1fr); }
  /* the section rail becomes a sticky, swipeable row of tabs under the header (phones keep every section one tap away) */
  .side { position: sticky; top: var(--header-h); z-index: 20; height: auto; display: flex; overflow-x: auto; padding: 8px var(--gutter); border-right: 0;
    border-bottom: 1px solid var(--line); gap: 4px; background: var(--glass); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
    scrollbar-width: none; scroll-padding-inline: var(--gutter); }
  .side::-webkit-scrollbar { display: none; }
  .side > div:not(.grp) { display: none; }
  .side .grp { display: none; } .side a { white-space: nowrap; flex: none; } }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.tile { padding: 16px 18px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); display: grid; gap: 8px; position: relative; overflow: hidden; }
.tile .k { font-size: 12.5px; color: var(--text-3); display: flex; gap: 7px; align-items: center; font-weight: 520; }
.tile .v { font: 650 26px/1 var(--font); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tile .d { font-size: 12px; color: var(--text-3); display: flex; gap: 6px; align-items: center; }
.tile .d.up { color: var(--green); } .tile .d.down { color: var(--red); }
.tile svg.spark { position: absolute; right: 0; bottom: 0; width: 55%; height: 46px; opacity: .9; }

/* charts (drawn by charts.js) */
.chart { position: relative; width: 100%; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .axis text { fill: var(--text-3); font: 11px var(--font); font-variant-numeric: tabular-nums; }
.chart .grid line { stroke: var(--line); }
.chart .tip { position: absolute; pointer-events: none; z-index: 5; padding: 8px 10px; border-radius: 9px; background: var(--panel-3); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); font-size: 12px; white-space: nowrap; transform: translate(-50%, -110%); }
.chart .tip b { display: block; font-size: 12.5px; margin-bottom: 3px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.hbars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 13px; align-items: center; }
.hbar .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.hbar .val { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 560; }
.hbar .track { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.hbar .track i { display: block; height: 100%; border-radius: inherit; background: var(--c, var(--accent)); width: calc(var(--p) * 1%); animation: grow .8s var(--ease-out) both; transform-origin: left; }

/* tours */
.tl-dates { display: grid; gap: 10px; }
.date-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 14px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); transition: border-color var(--t), box-shadow var(--t); }
.date-row:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.date-row.past { opacity: .62; }
.date-chip { display: grid; justify-items: center; gap: 2px; padding: 8px 0; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.date-chip .m { font: 650 10.5px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); }
.date-chip .d { font: 680 24px/1 var(--font); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.date-chip .w { font-size: 10.5px; color: var(--text-3); }
.date-row h3 { font-size: 15.5px; font-weight: 610; }
.date-row .sub { font-size: 13px; color: var(--text-3); display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.month-sep { font: 650 12px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); padding: 16px 4px 6px; }
.fit-table td.limit { background: var(--accent-soft); }
.fit-table .who { font-size: 12px; color: var(--text-3); }
.tour-card { padding: 18px; display: grid; gap: 12px; }
.tour-card .bar { margin-top: 2px; }

/* messages */
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100dvh - var(--header-h) - 120px); min-height: 520px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--panel); }
.threads { border-right: 1px solid var(--line); overflow: auto; }
.thread-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); transition: background var(--t-fast); position: relative; }
.thread-item:hover { background: var(--panel-2); }
.thread-item[aria-current="page"] { background: var(--panel-2); }
.thread-item[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; background: var(--accent); border-radius: 2px; }
.thread-item b { font-size: 14px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-item .pv { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-item.unread b { color: var(--text); } .thread-item.unread .pv { color: var(--text-2); }
.thread-item .when { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.thread-item .ub { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); justify-self: end; margin-top: 6px; }
.convo { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; }
.convo-head { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.convo-body { overflow: auto; padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.msg { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; max-width: 760px; padding: 6px 0; animation: msgIn 300ms var(--ease-out); }
.msg .bubble { padding: 10px 14px; border-radius: 4px 16px 16px 16px; background: var(--panel-2); border: 1px solid var(--line); font-size: 14.5px; line-height: 1.55; word-wrap: break-word; }
.msg.me { margin-left: auto; grid-template-columns: minmax(0, 1fr) 32px; }
.msg.me .avatar { order: 2; }
.msg.me .bubble { border-radius: 16px 4px 16px 16px; background: color-mix(in oklab, var(--accent) 14%, var(--panel)); border-color: var(--accent-line); }
.msg .who { font-size: 12px; color: var(--text-3); margin-bottom: 4px; display: flex; gap: 8px; }
.msg.me .who { justify-content: flex-end; }
.msg.system { grid-template-columns: 1fr; text-align: center; font-size: 12.5px; color: var(--text-3); margin: 8px auto; }
.composer { border-top: 1px solid var(--line); padding: 12px 14px; display: flex; gap: 10px; align-items: flex-end; background: var(--panel-2); }
.composer textarea { flex: 1; min-height: 44px; max-height: 220px; resize: none; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); outline: 0; font-size: 14.5px; line-height: 1.45; }
.composer textarea:focus { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
@media (max-width: 860px) { .inbox { grid-template-columns: minmax(0, 1fr); height: auto; } .inbox.has-thread .threads { display: none; } .inbox:not(.has-thread) .convo { display: none; } .convo-body { min-height: 50vh; } }

/* notifications */
.notes { display: grid; }
.note { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); transition: background var(--t-fast); }
.note:hover { background: var(--panel-2); }
.note.unread { background: color-mix(in oklab, var(--accent) 5%, transparent); }
.note .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); color: var(--accent-text); }

/* editor */
.editor { display: grid; grid-template-columns: 230px minmax(0, 1fr) 280px; gap: 28px; align-items: start; }
.editor .enav { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 2px; }
.editor .enav a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: var(--r-sm); font-size: 14px; color: var(--text-2); }
.editor .enav a:hover { background: var(--panel-2); color: var(--text); }
.editor .enav a[aria-current="page"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.editor .enav .fill { margin-left: auto; width: 26px; height: 4px; border-radius: 2px; background: var(--panel-3); overflow: hidden; }
.editor .enav .fill i { display: block; height: 100%; background: var(--accent); width: calc(var(--p) * 1%); }
.editor .aside { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 14px; }
.fset { padding: 22px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); display: grid; gap: 20px; }
.fset h2 { font-size: 18px; display: flex; gap: 10px; align-items: center; }
.listed { display: grid; gap: 6px; }
.listed { container: listed / inline-size; }
.listed .lrow { display: grid; gap: 6px; align-items: center; grid-template-columns: var(--cols) 32px; }
.listed .lc { display: block; min-width: 0; }
.listed .lc > span { display: none; }
.listed .lc .input { width: 100%; min-width: 0; }
.listed .lhead { display: grid; gap: 6px; grid-template-columns: var(--cols) 32px; font-size: 11.5px; color: var(--text-3); font-weight: 600; padding: 0 2px; }
.listed .input { min-height: 36px; padding: 7px 10px; font-size: 13.5px; }
.save-state { display: inline-flex; gap: 7px; align-items: center; font-size: 12.5px; color: var(--text-3); }
.save-state.saving::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1s infinite; }
.save-state.saved::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.save-state.error::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
/* sections with a wide list (power services) give the form the rail's width so the list stays a table on desktop */
@media (min-width: 1201px) {
  .editor:has(.listed[data-stack="700"]) { grid-template-columns: 230px minmax(0, 1fr); }
  .editor:has(.listed[data-stack="700"]) .aside { grid-column: 2; position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }
}
@media (max-width: 1200px) { .editor { grid-template-columns: 210px minmax(0, 1fr); } .editor .aside { grid-column: 2; position: static; } }
@media (max-width: 860px) { .editor { grid-template-columns: minmax(0, 1fr); } .editor .enav { position: static; display: flex; overflow-x: auto; } .editor .enav a { white-space: nowrap; } .editor .aside { grid-column: auto; } }
.dropzone { position: relative; display: grid; place-items: center; gap: 10px; text-align: center; padding: 36px 20px; border-radius: var(--r-lg); border: 1.5px dashed var(--line-3); background: var(--panel-2); color: var(--text-2); transition: all var(--t); cursor: pointer; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.uploads { display: grid; gap: 8px; margin-top: 12px; }
.upl { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); font-size: 13.5px; }
.upl .bar { grid-column: 2 / -1; }

/* auth */
.auth { min-height: calc(100dvh - var(--header-h)); display: grid; place-items: center; padding: 48px var(--gutter); position: relative; overflow: hidden; isolation: isolate; }
.auth-card { width: min(440px, 100%); padding: 32px; border-radius: var(--r-xl); background: var(--panel); border: 1px solid var(--line-2); box-shadow: var(--shadow-3); display: grid; gap: 20px; animation: modalIn var(--t-slow) var(--ease-out); }
.auth-card h1 { font-size: 26px; letter-spacing: -.03em; }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-pick label { display: grid; gap: 6px; padding: 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; transition: all var(--t-fast); }
.role-pick label:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.role-pick input { display: none; }
.role-pick b { font-size: 14px; display: flex; gap: 8px; align-items: center; }
.role-pick span { font-size: 12.5px; color: var(--text-3); line-height: 1.4; }

/* marketing sections */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head { display: grid; gap: 12px; margin-bottom: 36px; max-width: 720px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; justify-items: center; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: minmax(0, 1fr); } }
.feature { padding: 22px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); display: grid; gap: 10px; align-content: start; position: relative; overflow: hidden; }
.feature .fi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); border: 1px solid var(--accent-line); margin-bottom: 4px; }
.feature h3 { font-size: 16px; font-weight: 620; }
.feature p { font-size: 14px; color: var(--text-2); line-height: 1.55; }
.feature.big { grid-column: span 2; }
@media (max-width: 600px) { .feature.big { grid-column: auto; } }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--text-2); }
.check-list li .i { color: var(--accent-text); margin-top: 2px; }
.cta-band { border-radius: var(--r-xl); padding: clamp(28px, 5vw, 56px); background: radial-gradient(80% 140% at 100% 0%, var(--accent-soft), transparent 60%), var(--panel); border: 1px solid var(--line-2); display: grid; gap: 18px; justify-items: start; position: relative; overflow: hidden; }
.logo-row { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: center; color: var(--text-3); font-size: 14px; font-weight: 560; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.price { padding: 24px; border-radius: var(--r-xl); background: var(--panel); border: 1px solid var(--line); display: grid; gap: 16px; align-content: start; }
.price.hi { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-2); }
.price .amt { font: 680 38px/1 var(--font); letter-spacing: -.04em; }
.price > .badge { justify-self: start; }
.price .amt small { font-size: 14px; color: var(--text-3); font-weight: 500; letter-spacing: 0; }
.mock { border-radius: var(--r-xl); border: 1px solid var(--line-2); background: var(--panel); box-shadow: var(--shadow-3); overflow: hidden; }
.mock-bar { height: 34px; display: flex; gap: 6px; align-items: center; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-3); }
.mock-bar .mock-title { margin-left: 8px; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mock-art { display: block; width: 100%; height: auto; }
.mock-3d, .mock-plan { background: #14171c; }
/* a split with its picture first on wide screens (the text still comes first on phones) */
@media (min-width: 901px) { .split.rev > .mock { order: -1; } }
/* a row of small capability notes under the big sections */
.mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 28px; }
@media (max-width: 900px) { .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .mini-grid { grid-template-columns: minmax(0, 1fr); } }
.mini { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 2px 12px; align-items: start; }
.mini .fi { grid-row: span 2; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--panel-2); color: var(--accent-text); border: 1px solid var(--line); }
.mini b { font-size: 14.5px; font-weight: 620; color: var(--text); }
.mini span { font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
/* questions and answers (home, help center) */
.faq-item { border-top: 1px solid var(--line); }
.faq-item:first-of-type { border-top: 0; }
.faq > .faq-item:first-of-type, .faq .row + .faq-item { border-top: 0; }
.faq-item > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 2px; font-size: 15.5px; font-weight: 600; color: var(--text); }
.faq-item > summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-right: 4px; border-right: 1.6px solid var(--text-3); border-bottom: 1.6px solid var(--text-3); transform: rotate(45deg) translate(-2px, -2px); transition: transform var(--t-fast); }
.faq-item[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq-item > summary:hover { color: var(--accent-text); }
.faq-item > p { margin: 0 0 18px; font-size: 14.5px; line-height: 1.65; color: var(--text-2); max-width: 74ch; }
.faq-item > p a, .faq-item > p .link { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }

/* prose (legal, help) */
.prose { font-size: 15.5px; line-height: 1.75; color: var(--text-2); }
.prose h1 { font-size: clamp(30px, 4vw, 44px); color: var(--text); margin-bottom: 8px; letter-spacing: -.035em; }
.prose h2 { font-size: 21px; color: var(--text); margin: 40px 0 12px; letter-spacing: -.02em; }
.prose h3 { font-size: 16.5px; color: var(--text); margin: 28px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose strong { color: var(--text); font-weight: 620; }
.prose code { font: .9em var(--mono); padding: 2px 6px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 12px 0 20px; }
.prose th, .prose td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th, .prose td { overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 480px) { .prose table { font-size: 13px; } .prose th, .prose td { padding: 8px 6px; } }
.prose th { color: var(--text); font-weight: 600; font-size: 13px; }
.prose .callout { padding: 16px 18px; border-radius: var(--r); border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--text); margin: 18px 0; }
.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding-top: 48px; }
.legal-nav { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 2px; align-content: start; font-size: 14px; }
.legal-nav a { padding: 8px 12px; border-radius: var(--r-sm); color: var(--text-2); }
.legal-nav a:hover { background: var(--panel-2); color: var(--text); }
.legal-nav a[aria-current="page"] { background: var(--panel-2); color: var(--text); }
@media (max-width: 860px) { .legal-layout { grid-template-columns: minmax(0, 1fr); } .legal-nav { position: static; display: flex; flex-wrap: wrap; } }

/* consent banner */
.consent { position: fixed; z-index: 120; left: 20px; bottom: 20px; width: min(420px, calc(100vw - 40px)); padding: 18px; border-radius: var(--r-xl); background: var(--panel); border: 1px solid var(--line-2); box-shadow: var(--shadow-3);
  display: grid; gap: 12px; animation: toastIn 600ms var(--ease-out) both; animation-delay: .6s; }
.consent p { font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.consent .row { flex-wrap: wrap; }

/* pagination */
.pager { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 22px; }

/* ───────────── mobile ─────────────
   Phones get native-feeling patterns: a bottom tab bar, sheets that rise from the bottom, a sticky action bar on venue
   pages, bigger touch targets, 16px form text (iOS doesn't zoom), safe-area padding around the notch and home bar. */
.tabbar { display: none; }
.vactions-m { display: none; }
@media (hover: none) {
  .card.hover:hover, .vcard:hover, .doc:hover, .date-row:hover { transform: none; box-shadow: var(--shadow-1); }
  [data-tip]:hover::after { display: none; }
}
@media (max-width: 760px) {
  :root { --header-h: 58px; }
  body { font-size: 15.5px; }
  .top .wrap { gap: 10px; padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
  .brand { font-size: 16px; } .brand .mark { width: 26px; height: 26px; } .brand .logo { height: 26px; }
  .icon-btn { width: 44px; height: 44px; }
  .btn { --bh: 44px; } .btn.sm { --bh: 36px; } .btn.lg { --bh: 52px; }
  .input, .select, .textarea, .searchbox input, .pal .pal-input input, .composer textarea, .listed .input { font-size: 16px; }
  .chip { height: 36px; padding: 0 14px; }
  .hero { padding-top: 40px; }
  .searchbox .field-wrap { height: 56px; border-radius: 16px; padding-left: 16px; }
  .search-hints { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; width: calc(100% + 2 * var(--gutter)); margin-left: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .search-hints::-webkit-scrollbar { display: none; }
  .search-hints button { flex: none; }
  .results-pop { position: fixed; left: 8px; right: 8px; top: calc(var(--header-h) + 8px); max-height: calc(100dvh - var(--header-h) - 90px); }
  .res { grid-template-columns: 40px minmax(0, 1fr); padding: 11px 8px; }
  .res .go, .res .meta.side-meta { display: none; }
  .statstrip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:nth-child(odd) { border-right: 1px solid var(--line); }
  .vtitle .actions { display: none; }
  .vactions-m { display: flex; position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; gap: 8px; padding: 10px max(12px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom));
    background: var(--glass); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px); border-top: 1px solid var(--line); }
  .vactions-m .btn { flex: 1; }
  .has-vactions .foot { padding-bottom: 76px; }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec { padding: 12px 13px; }
  .vmap { height: 340px; }
  .contacts { grid-template-columns: minmax(0, 1fr); }
  .page-head { margin-bottom: 18px; }
  .main { padding-top: 20px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  /* signed-in app: bottom tab bar replaces the side rail */
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 46; left: 0; right: 0; bottom: 0;
    padding: 6px max(6px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)); background: var(--glass);
    backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px); border-top: 1px solid var(--line); }
  .tabbar a { display: grid; justify-items: center; gap: 3px; padding: 6px 0; border-radius: 12px; font-size: 10.5px; font-weight: 600; color: var(--text-3); position: relative; }
  .tabbar a .i { width: 23px; height: 23px; }
  .tabbar a[aria-current="page"] { color: var(--accent-text); }
  .tabbar a .n { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font: 700 10px/16px var(--font); text-align: center; }
  .with-tabbar .foot { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .with-tabbar .vactions-m { bottom: calc(62px + env(safe-area-inset-bottom)); }
  /* dialogs become bottom sheets */
  dialog.modal, dialog.modal.wide { max-width: 100vw; width: 100vw; margin: auto 0 0; }
  dialog.modal .modal-card { border-radius: 22px 22px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); }
  dialog.modal[open] .modal-card { animation: sheetIn 380ms var(--ease-out); }
  dialog.modal .modal-card header::before { content: ""; position: absolute; left: 50%; top: 7px; width: 38px; height: 4px; margin-left: -19px; border-radius: 99px; background: var(--line-3); }
  dialog.modal .modal-card header { position: relative; padding-top: 22px; }
  .modal-card .modal-body { max-height: 72vh; }
  dialog.palette { width: 100vw; height: 100dvh; margin: 0; max-height: none; }
  dialog.palette .pal { height: 100dvh; border-radius: 0; border: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); }
  dialog.palette .pal-body { max-height: none; }
  dialog.palette .pal .pal-input { padding-top: env(safe-area-inset-top); height: calc(60px + env(safe-area-inset-top)); }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .consent { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); width: auto; }
  .with-tabbar .consent { bottom: calc(74px + env(safe-area-inset-bottom)); }
  .viewer .vbar { padding-top: calc(10px + env(safe-area-inset-top)); flex-wrap: wrap; }
  .viewer .vbar .hide-sm { display: none; }
  .date-row { grid-template-columns: 58px minmax(0, 1fr); }
  .date-row > :last-child { grid-column: 1 / -1; }
  .table-wrap.cards-sm table, .table-wrap.cards-sm tbody, .table-wrap.cards-sm tr, .table-wrap.cards-sm td { display: block; }
  .table-wrap.cards-sm thead { display: none; }
  .table-wrap.cards-sm tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table-wrap.cards-sm td { border: 0; padding: 3px 0; }
  .table-wrap.cards-sm td[data-label]::before { content: attr(data-label) " "; color: var(--text-3); font-size: 12px; margin-right: 6px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 14px; } .tile .v { font-size: 22px; }
  .auth-card { padding: 24px 20px; }
  .role-pick { grid-template-columns: minmax(0, 1fr); }
  .card.pad { padding: 18px; }
  .foot-grid { gap: 24px; }
}
@media (max-width: 380px) { .specs { grid-template-columns: minmax(0, 1fr); } .tiles { grid-template-columns: minmax(0, 1fr); } }
@keyframes sheetIn { from { transform: translateY(100%); } }

/* ───────────── motion ───────────── */
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@keyframes palIn { from { opacity: 0; transform: translateY(-10px) scale(.985); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes resIn { from { opacity: 0; transform: translateY(8px); filter: blur(3px); } }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes shimmer { to { background-position: -300% 0; } }
@keyframes scan { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes sweep { from { transform: rotate(var(--rot-a)); } to { transform: rotate(var(--rot-b)); } }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(63,207,142,.5); } 70% { box-shadow: 0 0 0 8px rgba(63,207,142,0); } 100% { box-shadow: 0 0 0 0 rgba(63,207,142,0); } }
.reveal { animation: fadeUp 700ms var(--ease-out) both; animation-delay: calc(var(--d, 0) * 70ms); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: livePulse 2s infinite; display: inline-block; }

/* page-to-page transitions (Chrome, Edge, Safari 18.2+; others navigate normally) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 160ms var(--ease) both vtOut; }
::view-transition-new(root) { animation: 320ms var(--ease-out) both vtIn; }
::view-transition-group(*) { animation-duration: 380ms; animation-timing-function: var(--ease-out); }
@keyframes vtOut { to { opacity: 0; } }
@keyframes vtIn { from { opacity: 0; transform: translateY(6px); } }
.top { view-transition-name: top; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .beam { animation: none; }
  @view-transition { navigation: none; }
}

/* print: venue pages and advance sheets print cleanly */
@media print {
  :root { --bg: #fff; --panel: #fff; --panel-2: #fff; --text: #000; --text-2: #222; --text-3: #555; --line: #ccc; --line-2: #bbb; }
  .top, .foot, .vnav, .actions, .no-print, .consent, .toasts, .side { display: none !important; }
  .vbody, .app { display: block; } body { font-size: 11pt; } .vsec { break-inside: avoid-page; }
  .card, .spec, .doc, .contact { box-shadow: none !important; }
}

/* ───────────── context menus (right-click, long-press, Shift+F10) ───────────── */
.ctx { position: fixed; z-index: 300; min-width: 220px; max-width: 320px; padding: 5px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-3); font-size: 13.5px; animation: popIn 140ms var(--ease-out); user-select: none; }
.ctx button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: 8px; color: var(--text); text-align: left; position: relative; }
.ctx button .i { width: 16px; height: 16px; color: var(--text-3); }
.ctx button:hover, .ctx button.on, .ctx button:focus-visible { background: var(--panel-2); outline: none; }
.ctx button:hover .i, .ctx button.on .i { color: var(--accent-text); }
.ctx button[disabled] { opacity: .4; pointer-events: none; }
.ctx button.danger { color: var(--red); } .ctx button.danger .i { color: var(--red); }
.ctx .kbd-hint { margin-left: auto; font: 500 11px var(--mono); color: var(--text-3); }
.ctx .sub-arrow { margin-left: auto; color: var(--text-3); }
.ctx .sep { height: 1px; background: var(--line); margin: 5px 6px; }
.ctx .ctx-head { padding: 6px 10px 4px; font: 600 11px/1 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.ctx-target { outline: 2px solid var(--accent-line); outline-offset: 2px; border-radius: 6px; }
.ctx .ctx-back { display: none; font-weight: 600; color: var(--text-2); border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; margin-bottom: 4px; }
.ctx.drill { min-width: min(260px, calc(100vw - 12px)); box-shadow: var(--shadow-3), 0 0 0 100vmax rgb(0 0 0 / .12); }
.ctx.drill .ctx-back { display: flex; }
.lrow.dragging, .doc.dragging, .contact.dragging { opacity: .45; }
.drop-before { box-shadow: 0 -2px 0 var(--accent); }

/* ───────────── layout safety system ─────────────
   Nothing may spill past its container: buttons shrink and (on phones) wrap their label; button rows wrap; segmented
   controls scroll sideways; menus stay inside the viewport and scroll when tall. tests/layout_audit.mjs checks this. */
.btn { max-width: 100%; min-width: 0; overflow-wrap: anywhere; }
.btn > span:not(.badge):not(.spinner):not(.n) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.btn-group, .page-head, .page-head > div:last-child, .vtitle .actions, .doc .acts, .form-actions, .toolbar { flex-wrap: wrap; }
.page-head > * { min-width: 0; }
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg > * { flex: none; }
.chip, .badge { max-width: 100%; }
.badge { overflow: hidden; text-overflow: ellipsis; }
.input-unit .input { padding-right: 40px; }
.menu { max-height: calc(100dvh - var(--header-h) - 24px); overflow-y: auto; overscroll-behavior: contain; }
.ctx { max-height: calc(100dvh - 16px); overflow-y: auto; overscroll-behavior: contain; }
.card-head { flex-wrap: wrap; }
.row { min-width: 0; }
@media (max-width: 760px) {
  .btn { white-space: normal; height: auto; min-height: var(--bh); padding-top: 6px; padding-bottom: 6px; line-height: 1.25; text-align: center; }
  .btn.square { white-space: nowrap; height: var(--bh); padding: 0; }
  .page-head .btn-group, .vtitle .actions { width: 100%; }
}
/* list editor rows become labeled cards when their box is too narrow for the columns (data-stack = threshold in px) */
@container listed (max-width: 700px) {
  .listed[data-stack="700"] .lhead { display: none; }
  .listed[data-stack="700"] .lrow { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); position: relative; padding: 10px 48px 10px 10px; margin-bottom: 4px;
    border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
  .listed[data-stack="700"] .lc > span { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-3); margin: 0 0 4px 2px; }
  .listed[data-stack="700"] .lrow [data-row-menu] { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; }
}
@container listed (max-width: 520px) {
  .listed[data-stack="520"] .lhead { display: none; }
  .listed[data-stack="520"] .lrow { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); position: relative; padding: 10px 48px 10px 10px; margin-bottom: 4px;
    border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
  .listed[data-stack="520"] .lc > span { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-3); margin: 0 0 4px 2px; }
  .listed[data-stack="520"] .lrow [data-row-menu] { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; }
  .listed[data-stack="520"] .lc:has([data-col=notes]), .listed[data-stack="520"] .lc:has([data-col=model]) { grid-column: 1 / -1; }
}
/* header on small phones: the theme switch moves into the menu so the icons never push past the edge */
.mnav-theme { display: none; }
@media (max-width: 440px) {
  .top .wrap { gap: 10px; }
  .top-actions { gap: 2px; }
  .top-actions > [data-theme-toggle] { display: none; }
  .mobile-nav .mnav-theme { display: flex; }
}
@media (max-width: 370px) { .top-actions .icon-btn { width: 36px; height: 36px; } .brand { font-size: 16px; gap: 8px; } }

/* ───────────── 3D viewer (static/js/3d, source in frontend/3d) ───────────── */
.v3d { position: absolute; inset: 0; overflow: hidden; outline: none; -webkit-user-select: none; user-select: none;
  background: radial-gradient(120% 90% at 50% 0%, #1b1f26 0%, #0e1014 55%, #08090b 100%); }
.v3d.light { background: radial-gradient(120% 90% at 50% 0%, #ffffff 0%, #eff1f4 60%, #e3e6eb 100%); }
.v3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.v3d-canvas:active { cursor: grabbing; }
.v3d-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.v3d-dot { position: absolute; left: 0; top: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px rgb(0 0 0 / .55), 0 0 0 5px rgb(255 181 71 / .25); }
.v3d-measure { position: absolute; left: 0; top: 0; padding: 5px 10px; border-radius: 10px; background: rgb(12 14 17 / .88); color: #fff; font: 650 13px/1.3 var(--font);
  white-space: nowrap; text-align: center; box-shadow: var(--shadow-2); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-variant-numeric: tabular-nums; }
.v3d-measure span { display: block; font-weight: 500; font-size: 11px; color: #c4cad3; }
.v3d-views { position: absolute; top: 12px; left: 12px; z-index: 2; background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.v3d-panel-btn { position: absolute; top: 12px; right: 12px; z-index: 2; display: inline-flex; gap: 8px; align-items: center; height: 38px; padding: 0 14px; border-radius: 99px;
  background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line); font-size: 13.5px; font-weight: 560; color: var(--text); }
.v3d-panel-btn:hover { border-color: var(--line-2); }
.v3d-tools { position: absolute; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 2; display: flex; gap: 2px; padding: 5px; border-radius: 16px;
  background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); border: 1px solid var(--line); box-shadow: var(--shadow-2);
  max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none; transition: left var(--t) var(--ease), bottom var(--t) var(--ease); }
.v3d-tools::-webkit-scrollbar { display: none; }
.v3d-tools button { min-width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 11px; color: var(--text-2); padding: 0 8px; transition: background var(--t-fast), color var(--t-fast); }
.v3d-tools button:hover { background: var(--panel-2); color: var(--text); }
.v3d-tools button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-line); }
.v3d-txt { font: 650 11.5px var(--font); letter-spacing: .03em; }
.v3d-sep { width: 1px; margin: 7px 4px; background: var(--line); flex: none; }
.v3d-section { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 8px;
  border-radius: 14px; background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line); }
.v3d-section input { writing-mode: vertical-lr; direction: rtl; height: 220px; width: 26px; accent-color: var(--accent); cursor: ns-resize; }
.v3d-section span { font: 600 12px var(--font); white-space: nowrap; color: var(--text); font-variant-numeric: tabular-nums; }
.v3d-hint { position: absolute; top: 62px; left: 50%; transform: translateX(-50%); z-index: 2; padding: 8px 14px; border-radius: 99px; background: rgb(12 14 17 / .88); color: #fff;
  font-size: 13px; box-shadow: var(--shadow-2); pointer-events: none; max-width: calc(100% - 24px); text-align: center; animation: fadeIn var(--t) var(--ease-out); }
.v3d-panel { position: absolute; top: 0; right: 0; bottom: 0; width: 340px; z-index: 3; display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--line); }
.v3d-panel[hidden] { display: none; }
.v3d-grip { display: none; }
.v3d-tabs { display: flex; align-items: center; gap: 2px; padding: 6px 8px 0 10px; border-bottom: 1px solid var(--line); flex: none; }
.v3d-tabs [role="tab"] { padding: 10px; font-size: 13.5px; font-weight: 560; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.v3d-tabs [role="tab"]:hover { color: var(--text-2); }
.v3d-tabs [aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.v3d-tabs .icon-btn { margin-left: auto; width: 34px; height: 34px; }
.v3d-pbody { flex: 1; min-height: 0; overflow: auto; padding: 10px 10px 28px; overscroll-behavior: contain; -webkit-user-select: text; user-select: text; }
.v3d-search { margin: 4px 2px 8px; }
.v3d-search .input { min-height: 38px; font-size: 14px; }
.v3d-group-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 6px 6px; font: 650 11px/1.3 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.v3d-group-h .switch { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; color: var(--text-2); gap: 8px; }
.v3d-group-h .switch input { width: 32px; height: 18px; }
.v3d-group-h .switch input::after { width: 12px; height: 12px; }
.v3d-group-h .switch input:checked::after { transform: translateX(14px); }
.v3d-row { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 36px; padding: 6px 8px; border-radius: 9px; font-size: 13.5px; color: var(--text); text-align: left; }
.v3d-row:hover { background: var(--panel-2); }
.v3d-row.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.v3d-row.off { opacity: .45; }
.v3d-row > .truncate { min-width: 0; flex: 1; }
.v3d-row > b { font-weight: 600; font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.v3d-row > .faint { font-size: 12px; flex: none; }
.v3d-row small { color: var(--text-3); font-weight: 500; }
.v3d-row .sw { width: 12px; height: 12px; border-radius: 4px; flex: none; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .2); }
.v3d-sub { margin: 0 0 6px 14px; padding-left: 8px; border-left: 1px solid var(--line); }
.v3d-tinfo { font-size: 12px; padding: 4px 8px 6px; }
.v3d-more { font-size: 12px; padding: 8px; }
.v3d-check { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; font-size: 13.5px; cursor: pointer; }
.v3d-check:hover { background: var(--panel-2); }
.v3d-check input { accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.v3d-check .truncate { flex: 1; min-width: 0; }
.v3d-check .faint { font-size: 12px; }
.v3d-info-h { padding: 6px 6px 10px; }
.v3d-info-h h3 { font-size: 18px; font-weight: 650; letter-spacing: -.01em; margin-top: 4px; overflow-wrap: anywhere; }
.v3d-kv { display: grid; grid-template-columns: 104px minmax(0, 1fr); margin: 0 6px; font-size: 13.5px; }
.v3d-kv dt { color: var(--text-3); padding: 7px 8px 7px 0; border-top: 1px solid var(--line); }
.v3d-kv dd { margin: 0; padding: 7px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.v3d-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 6px 0; }
.v3d-help { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 16px; background: rgb(0 0 0 / .4); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.v3d-help[hidden] { display: none; }
.v3d-help .card { max-width: 460px; width: 100%; max-height: 100%; overflow: auto; }
.v3d-help h3 { font: 650 11.5px/1.3 var(--font); text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); margin: 2px 0 10px; }
.v3d-help dl { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 7px 12px; font-size: 14px; margin: 0 0 18px; }
.v3d-help dt { font-weight: 600; }
.v3d-help .keys dt { font: 600 12.5px var(--mono); }
.v3d-help dd { margin: 0; color: var(--text-2); }
.v3d-load { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; background: inherit; transition: opacity .35s var(--ease-out); }
.v3d-load.done { opacity: 0; pointer-events: none; }
.v3d-load-card { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 16px; }
.v3d-bar { width: min(260px, 70vw); height: 4px; border-radius: 4px; background: var(--panel-3); overflow: hidden; }
.v3d-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .25s var(--ease-out); }
@media (min-width: 761px) {
  .v3d.panel-open .v3d-canvas, .v3d.panel-open .v3d-labels { right: 340px; width: auto; }
  .v3d.panel-open .v3d-panel-btn { display: none; }
  .v3d.panel-open .v3d-tools { left: calc((100% - 340px) / 2); max-width: calc(100% - 364px); }
  .v3d.panel-open .v3d-section { right: 354px; }
  .v3d.panel-open .v3d-hint { left: calc((100% - 340px) / 2); }
}
@media (max-width: 760px) {
  .v3d-views { top: 10px; left: 10px; }
  .v3d-views button { padding: 0 10px; }
  .v3d-panel-btn { top: 10px; right: 10px; padding: 0 12px; }
  .v3d-panel-btn span { display: none; }
  .v3d-panel { top: auto; left: 0; width: auto; height: min(58%, 480px); border-left: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; box-shadow: var(--shadow-3);
    padding-bottom: env(safe-area-inset-bottom); }
  .v3d-grip { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 8px auto 0; flex: none; }
  .v3d.panel-open .v3d-tools { bottom: calc(min(58%, 480px) + 10px); }
  .v3d-section { right: 10px; padding: 10px 6px; }
  .v3d-section input { height: 160px; }
  .v3d-tools button { min-width: 42px; height: 42px; }
}


/* ───────────── charts (static/js/charts.js) ─────────────
   Categorical slots from the dataviz reference palette, validated on this site's panels (#111317 dark, #ffffff light):
   adjacent CVD ΔE ≥ 8.4, normal-vision ΔE ≥ 19.3. Light slots 3–5 sit under 3:1, so every chart ships a table view. */
:root { --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767; --series-muted: #5d636d; }
:root[data-theme="light"] { --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --series-5: #e87ba4; --series-6: #008300; --series-7: #6250d6; --series-8: #e34948; --series-muted: #b4b8bf; }
@media (prefers-color-scheme: light) { :root[data-theme="system"] { --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --series-5: #e87ba4; --series-6: #008300; --series-7: #6250d6; --series-8: #e34948; --series-muted: #b4b8bf; } }
.viz { display: grid; gap: 10px; }
.viz-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 28px; }
.viz-head .viz-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.viz-legend span { display: inline-flex; align-items: center; gap: 7px; }
.viz-legend .k-line { width: 14px; height: 2px; border-radius: 2px; background: var(--c); }
.viz-legend .k-rect { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.viz-head .viz-tbl { margin-left: auto; font-size: 12px; color: var(--text-3); padding: 3px 8px; border-radius: 7px; }
.viz-head .viz-tbl:hover, .viz-head .viz-tbl[aria-pressed="true"] { color: var(--text); background: var(--panel-2); }
.viz-plot { position: relative; width: 100%; outline: none; border-radius: 8px; }
.viz-plot:focus-visible { box-shadow: 0 0 0 2px var(--accent-line); }
.viz-plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.viz-plot .gl { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.viz-plot .base { stroke: var(--line-2); stroke-width: 1; shape-rendering: crispEdges; }
.viz-plot .tk { fill: var(--text-3); font: 11px var(--font); font-variant-numeric: tabular-nums; }
.viz-plot .end { fill: var(--text-2); font: 600 11.5px var(--font); font-variant-numeric: tabular-nums; }
.viz-plot .xh { stroke: var(--text-3); stroke-width: 1; shape-rendering: crispEdges; }
.viz-tip { position: absolute; z-index: 5; pointer-events: none; min-width: 120px; padding: 8px 10px; border-radius: 10px; background: var(--panel-3); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-2); font-size: 12px; white-space: nowrap; }
.viz-tip .d { color: var(--text-3); margin-bottom: 4px; }
.viz-tip .r { display: flex; align-items: center; gap: 8px; }
.viz-tip .r b { font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; min-width: 40px; }
.viz-tip .r span { color: var(--text-2); }
.viz-tip .r i { width: 12px; height: 2px; border-radius: 2px; background: var(--c); flex: none; }
.viz table { font-size: 12.5px; }
.spark { display: block; width: 100%; height: 34px; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat-tile { padding: 14px 16px 10px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); display: grid; gap: 4px; min-width: 0; }
.stat-tile .lbl { font-size: 12.5px; color: var(--text-3); }
.stat-tile .val { font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
.stat-tile .dl { font-size: 12px; color: var(--text-3); }
.stat-tile .dl.up { color: var(--green); } .stat-tile .dl.down { color: var(--red); }
.rank { display: grid; gap: 9px; }
.rank-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; align-items: center; font-size: 13px; }
.rank-row .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.rank-row .v { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.rank-row .b { grid-column: 1 / -1; height: 6px; border-radius: 0 4px 4px 0; background: var(--series-1); width: max(2px, calc(var(--p) * 1%)); }
.rank-row.zero .b { background: var(--series-8); }

/* ───────────── admin ───────────── */
.kv-list { display: grid; grid-template-columns: minmax(110px, auto) minmax(0, 1fr); gap: 0; font-size: 14px; }
.kv-list dt { color: var(--text-3); padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); }
.kv-list dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.kv-list dt:last-of-type, .kv-list dd:last-of-type { border-bottom: 0; }
.inline-form { display: inline; }
.admin-find { position: relative; padding: 0 4px 10px; }
.admin-find .input { min-height: 36px; font-size: 13.5px; }
/* results overlay the page, wider than the rail, so long names stay readable (two lines, then cut) */
.admin-find .menu { left: 4px; right: auto; top: 42px; width: min(420px, calc(100vw - 32px)); min-width: 0; max-height: min(70dvh, 560px); }
.admin-find .menu a { display: grid; gap: 2px; align-items: start; padding: 9px 12px; }
.admin-find .menu a b { font-weight: 560; color: var(--text); line-height: 1.3; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.admin-find .menu a small { color: var(--text-3); font-size: 12.5px; line-height: 1.35; overflow-wrap: anywhere; }
.admin-find .menu a small span { color: var(--accent-text); font-weight: 600; }
.admin-find .menu a.on { background: var(--panel-2); }
.side .admin-find .menu { position: fixed; max-height: min(70dvh, 560px, calc(100dvh - 200px)); }
.admin-find-top { display: none; }
@media (max-width: 980px) { .main > .admin-find-top { display: block; padding: 0 0 18px; }
  .admin-find-top .menu { left: 0; right: 0; width: auto; } }
.admin .table-wrap { margin-bottom: 0; }
.filters-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters-row .input, .filters-row .select { min-height: 36px; width: auto; min-width: 140px; font-size: 13.5px; }
.filters-row .input[type="search"] { flex: 1 1 220px; }
.actions-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.note-item { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.note-item .faint { font-size: 12px; }
.preview-frame { width: 100%; border: 1px solid var(--line); border-radius: var(--r-lg); background: #f4f4f1; min-height: 640px; }
.check-list { display: grid; gap: 2px; }
.check-list a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; font-size: 14px; color: var(--text); }
.check-list a:hover { background: var(--panel-2); }
.check-list .i { flex: none; }
.check-list .done { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--line-3); }
.plan h2 { font-size: 20px; letter-spacing: -.01em; margin: 30px 0 10px; }
.plan h3 { font-size: 15px; margin: 18px 0 6px; }
.plan p, .plan li { color: var(--text-2); font-size: 14.5px; line-height: 1.65; }
.plan ul { padding-left: 18px; display: grid; gap: 4px; }
.plan table.t { font-size: 13.5px; margin: 8px 0 4px; }
.ad-card { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); position: relative; color: var(--text); }
.ad-card:hover { border-color: var(--line-2); }
.ad-card img { width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover; border-radius: 10px; background: var(--panel-3); }
.ad-card .ad-tag { font: 600 10.5px/1 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.ad-card b { font-size: 15px; line-height: 1.3; }
.ad-card p { font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.ad-card .ad-cta { justify-self: start; }
.ad-card > .stack { display: grid; gap: 6px; align-content: start; }
.ad-card.wide { grid-template-columns: minmax(0, 1fr); align-items: center; }
.ad-card.wide:has(img) { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); }
.ad-row { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px dashed var(--line-2); font-size: 13.5px; color: var(--text-2); }
.ad-row b { color: var(--text); }
.ad-row .ad-tag { font: 600 10px/1 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); flex: none; }
@media (max-width: 760px) { .ad-card.wide { grid-template-columns: minmax(0, 1fr); } }
.radio-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px; border-radius: 11px; border: 1px solid var(--line); cursor: pointer; }
.radio-row:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); }
.radio-row input { margin-top: 3px; accent-color: var(--accent); }
.ad-wrap { display: grid; gap: 6px; }
.ad-why { justify-self: end; font-size: 11.5px; color: var(--text-3); }
.ad-why:hover { color: var(--text-2); }
.pad:not(.card) { padding: 14px 18px; }
summary { cursor: pointer; }
summary::-webkit-details-marker { display: none; }
.cols-split { display: grid; grid-template-columns: var(--cols, minmax(0, 1fr) minmax(0, 1fr)); gap: var(--gap, 16px); align-items: start; }
@media (max-width: 980px) { .cols-split { grid-template-columns: minmax(0, 1fr); } .cols-split > aside, .cols-split > div[style*="sticky"] { position: static !important; } }
.plan table.t { display: block; overflow-x: auto; }
.admin label.chip { white-space: normal; height: auto; min-height: 32px; text-align: left; }
.admin pre { overflow-wrap: anywhere; }


/* billing setup: numbered steps that turn into checks as they're done */
.setup-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: none; }
.setup-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.setup-steps li:first-child { border-top: 0; padding-top: 2px; }
.setup-steps .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 650 13px/1 var(--font); color: var(--text-2);
  background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.setup-steps li.done .n { background: var(--green-soft); color: var(--green); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--green) 35%, transparent); }
.setup-steps .body { display: grid; gap: 6px; min-width: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.setup-steps .body > b { font-size: 14.5px; color: var(--text); line-height: 28px; }
.setup-steps li.done .body > b { color: var(--text-2); }
.setup-steps .body p { margin: 0; overflow-wrap: anywhere; }
.setup-steps .body p.state { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--accent-text); }
.setup-steps .body p.state.ok { color: var(--green); }
.setup-steps .actions-row { margin-top: 2px; }
.kv-copy { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; min-height: 32px; }
.kv-copy code, .kv-copy a { overflow-wrap: anywhere; min-width: 0; }
.btn.icon-only { padding: 0; width: var(--bh); justify-content: center; }
details.disclose { border-top: 1px solid var(--line); padding-top: 10px; }
details.disclose > summary { font-size: 13.5px; font-weight: 560; color: var(--text-2); display: flex; align-items: center; gap: 6px; min-height: 32px; }
details.disclose > summary::before { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform var(--t-fast); margin-right: 4px; }
details.disclose[open] > summary::before { transform: rotate(45deg); }
.small-steps { margin: 8px 0 10px; padding-left: 20px; display: grid; gap: 8px; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.small-steps li { overflow-wrap: anywhere; }
.small-steps .btn { margin: 4px 0; }
.ev-list { font-size: 11.5px; line-height: 1.6; margin-top: 6px; overflow-wrap: anywhere; }
@media (max-width: 560px) { .kv-copy { grid-template-columns: minmax(0, 1fr) auto; } .kv-copy > span:first-child { grid-column: 1 / -1; } }
.bill-sub { display: grid; gap: 6px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); }
/* help center: sections flow down two columns (like a newspaper) so long and short ones pack without gaps */
.help-columns { columns: 2 360px; column-gap: 18px; }
.help-columns > section { break-inside: avoid; display: inline-block; width: 100%; margin: 0 0 18px; vertical-align: top; }
