/*
  SkipUpdate panel. Design system: design-system/skipupdate/MASTER.md (made with the ui-ux-pro-max skill):
  Minimalism & Swiss style, trust blue for actions, orange only for the main call to action (Publish), slate
  neutrals, light first with a matching dark mode. Components use these tokens, never raw colors.
*/

/* Plus Jakarta Sans, self-hosted (the CSP allows no outside fonts). Variable weight 200–800, from Fontsource
   (@fontsource-variable/plus-jakarta-sans 5.3.0), SIL Open Font License: fonts/OFL.txt. It has no Cyrillic,
   so Russian and other scripts use the system font from the --font stack. */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2");
  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: "Plus Jakarta Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
  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;
}

:root {
  /* surfaces and text */
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-2: #F1F5F9;
  --muted-bg: #E9EFF8;
  --zebra: #F8FAFC;
  --hover: #F1F5F9;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --text: #1E293B;
  --text-strong: #0F172A;
  --muted: #475569;
  --subtle: #64748B;

  /* actions */
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --accent-text: #FFFFFF;
  --accent-weak: #EFF6FF;
  --accent-border: #BFDBFE;
  --accent-2: #1D4ED8;
  --cta: #EA580C;
  --cta-hover: #F26B21;
  --cta-text: #C2410C;     /* orange that reads as text on white */
  --on-cta: #0B1220;
  --ring: 0 0 0 3px rgba(37, 99, 235, 0.32);

  /* states */
  --danger: #DC2626;
  --danger-weak: #FEF2F2;
  --ok: #15803D;
  --ok-weak: #F0FDF4;
  --warn: #B45309;
  --warn-weak: #FFFBEB;
  --live: #15803D;
  --test: #7C3AED;
  --ai: #BE185D;           /* changes made by AI tools */
  --ai-weak: #FDF2F8;

  /* type colors: one per key type, so people spot types at a glance */
  --t-text: #2563EB; --t-string: #475569; --t-url: #0E7490; --t-bool: #15803D; --t-int: #C2410C; --t-float: #B45309;
  --t-color: #BE185D; --t-size: #0F766E; --t-scale: #6D28D9; --t-enum: #A21CAF; --t-image: #4D7C0F; --t-new: #2563EB;

  /* tag colors */
  --tag-gray: #475569; --tag-red: #B91C1C; --tag-orange: #C2410C; --tag-amber: #B45309; --tag-green: #15803D; --tag-teal: #0F766E;
  --tag-cyan: #0E7490; --tag-blue: #1D4ED8; --tag-indigo: #4338CA; --tag-purple: #7E22CE; --tag-pink: #BE185D;

  /* shape and depth */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.10), 0 4px 6px -4px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  --shadow: var(--shadow-md);

  /* spacing (density 7: standard) */
  --space-xs: 4px; --space-sm: 8px; --space-md: 16px; --space-lg: 24px; --space-xl: 32px; --space-2xl: 48px;

  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  color-scheme: light;
}

/* Dark colors. theme.js sets data-theme before the page draws: the person's choice, or the system's. */
:root[data-theme="dark"] {
  --bg: #0B1120;
  --surface: #111827;
  --surface-2: #182133;
  --muted-bg: #1C2639;
  --zebra: #131C2D;
  --hover: #1C2639;
  --border: #243049;
  --border-strong: #35415A;
  --text: #E2E8F0;
  --text-strong: #F8FAFC;
  --muted: #A7B3C6;
  --subtle: #8E9BB0;
  --accent: #60A5FA;
  --accent-hover: #93C5FD;
  --accent-text: #0B1120;
  --accent-weak: rgba(96, 165, 250, 0.13);
  --accent-border: rgba(96, 165, 250, 0.38);
  --accent-2: #93C5FD;
  --cta: #FB923C;
  --cta-hover: #FDA766;
  --cta-text: #FB923C;
  --on-cta: #0B1120;
  --ring: 0 0 0 3px rgba(96, 165, 250, 0.38);
  --danger: #F87171;
  --danger-weak: rgba(248, 113, 113, 0.12);
  --ok: #4ADE80;
  --ok-weak: rgba(74, 222, 128, 0.11);
  --warn: #FBBF24;
  --warn-weak: rgba(251, 191, 36, 0.11);
  --live: #4ADE80;
  --test: #A78BFA;
  --ai: #F472B6;
  --ai-weak: rgba(244, 114, 182, 0.14);
  --t-text: #60A5FA; --t-string: #A7B3C6; --t-url: #22D3EE; --t-bool: #4ADE80; --t-int: #FB923C; --t-float: #FBBF24;
  --t-color: #F472B6; --t-size: #2DD4BF; --t-scale: #A78BFA; --t-enum: #E879F9; --t-image: #A3E635; --t-new: #60A5FA;
  --tag-gray: #A7B3C6; --tag-red: #F87171; --tag-orange: #FB923C; --tag-amber: #FBBF24; --tag-green: #4ADE80; --tag-teal: #2DD4BF;
  --tag-cyan: #22D3EE; --tag-blue: #60A5FA; --tag-indigo: #818CF8; --tag-purple: #C084FC; --tag-pink: #F472B6;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.45);
  --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

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

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Plus Jakarta Sans has a narrow space (0.17em, most fonts have about 0.25em), so words run together at small
   sizes. A little extra keeps them apart. Form controls don't inherit it, and code keeps its own spacing. */
body, button, input, textarea, select { word-spacing: 0.06em; }
.mono, code, pre, .key-name, .kbd, .method, .status-pill, .format-ext, .color-row input.hex { word-spacing: normal; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; color: var(--text-strong); }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--subtle); }
h4 { font-size: 14px; font-weight: 650; }
p { margin: 0.4em 0; }
a { color: inherit; text-decoration: none; }
q { quotes: "“" "”"; }
.mono, code, pre { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.block { display: block; }
.strong { font-weight: 650; }
.pad { padding: 10px 12px; }
.icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-text { fill: currentColor; stroke: none; font-family: var(--font); font-weight: 800; letter-spacing: -0.05em; }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

/* ---------- controls ---------- */
button, .button {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  height: 38px; padding: 0 14px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
button:hover, .button:hover { background: var(--hover); border-color: var(--border-strong); }
:focus-visible { outline: none; box-shadow: var(--ring); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--accent); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); box-shadow: var(--shadow-sm); }
button.primary:hover, .button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.cta { background: var(--cta); border-color: var(--cta); color: var(--on-cta); box-shadow: var(--shadow-sm); }
button.cta:hover { background: var(--cta-hover); border-color: var(--cta-hover); }
button.danger { background: var(--danger); border-color: var(--danger); color: #FFFFFF; }
button.danger:hover { filter: brightness(1.06); }
button.danger.subtle, button.subtle, .button.subtle { background: transparent; border-color: transparent; box-shadow: none; }
button.subtle:hover, .button.subtle:hover { background: var(--hover); }
button.danger.subtle { color: var(--danger); }
button.small, .button.small { height: 30px; padding: 0 10px; font-size: 13px; }
button.on { background: var(--accent-weak); border-color: var(--accent-border); color: var(--accent); }
button.wide { width: 100%; }
.icon-button { width: 36px; height: 36px; padding: 0; border-color: transparent; background: transparent; color: var(--subtle); }
.icon-button:hover { color: var(--text-strong); background: var(--hover); border-color: transparent; }
.link-button { height: auto; padding: 0; border: 0; background: none; color: var(--accent); font-size: 13px; font-weight: 600; }
.link-button:hover { background: none; text-decoration: underline; }

input, select, textarea {
  font: inherit; font-size: 14.5px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 8px 12px; min-height: 38px; width: 100%;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--border-strong) 60%, var(--subtle)); }
textarea { resize: vertical; line-height: 1.5; }
select { width: auto; padding-right: 30px; cursor: pointer; }
input.short { width: 92px; }
input::placeholder, textarea::placeholder { color: var(--subtle); opacity: 0.9; }
input:disabled, textarea:disabled, select:disabled { background: var(--surface-2); cursor: not-allowed; }
input[type="range"] { padding: 0; min-height: 0; border: 0; background: transparent; accent-color: var(--accent); cursor: pointer; }
input[type="checkbox"], input[type="radio"] { cursor: pointer; }

@media (pointer: coarse) {
  button, .button, input, select { min-height: 44px; }
  button.small, .button.small { min-height: 40px; }
  .icon-button { width: 44px; height: 44px; }
  input, select, textarea { font-size: 16px; }
}

.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; }
.check input { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--accent); }

.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented button { height: 30px; border: 0; background: transparent; color: var(--muted); padding: 0 12px; border-radius: 7px; font-weight: 600; box-shadow: none; }
.segmented button:hover { background: transparent; color: var(--text-strong); }
.segmented button.on { background: var(--surface); color: var(--text-strong); box-shadow: var(--shadow-sm); }
.segmented.small button { height: 26px; padding: 0 9px; font-size: 12.5px; }
.segmented.icons button { width: 34px; padding: 0; }
.segmented.icons button.on { color: var(--accent); }

.toggles { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.toggle { height: 32px; border-radius: 16px; padding: 0 14px; font-size: 13px; color: var(--muted); }
.toggle.on { background: var(--accent-weak); border-color: var(--accent); color: var(--accent); }

.switch { appearance: none; width: 40px; height: 24px; min-height: 0; padding: 0; border-radius: 12px; background: var(--border-strong); border: 0; position: relative; cursor: pointer; transition: background-color 0.18s var(--ease); flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #FFFFFF; box-shadow: var(--shadow-sm); transition: transform 0.18s var(--ease); }
.switch:checked { background: var(--ok); }
.switch:checked::after { transform: translateX(16px); }
.switch-row { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }

.field { display: flex; flex-direction: column; gap: 6px; margin: 16px 0; }
.field > span:first-child { font-weight: 600; font-size: 13.5px; color: var(--text-strong); }
.hint { color: var(--subtle); font-size: 12.5px; margin: 4px 0 0; line-height: 1.45; }
.error { color: var(--danger); font-size: 13.5px; margin: 6px 0; }
.error:empty { display: none; }
.inline { display: inline-flex; gap: 8px; align-items: center; }
.inline.wrap { flex-wrap: wrap; }

.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.accent { background: var(--accent-weak); color: var(--accent); }
.pill.warn { background: var(--warn-weak); color: var(--warn); }
.pill.live { background: color-mix(in srgb, var(--live) 13%, transparent); color: var(--live); }
.pill.test { background: color-mix(in srgb, var(--test) 13%, transparent); color: var(--test); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: rgba(0, 0, 0, 0.16); font-size: 12px; font-weight: 700; }
.publish-button { width: 146px; justify-content: center; } /* fixed, so the change count never moves the top bar */
.publish-button .badge { min-width: 26px; }
.theme-button { width: 38px; height: 38px; color: var(--muted); }
.theme-button:hover { color: var(--text-strong); }
.theme-menu { display: flex; flex-direction: column; gap: 2px; min-width: 210px; padding: 4px; }
.theme-menu button { justify-content: flex-start; gap: 10px; height: 38px; padding: 0 10px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text); font-weight: 600; box-shadow: none; }
.theme-menu button:hover { background: var(--hover); }
.theme-menu button.on { color: var(--accent); }
.theme-menu .muted { font-weight: 500; }
.theme-check { margin-left: auto; display: inline-flex; }
button:not(.primary):not(.cta) .badge, .env-choice .badge, .env-card .badge { background: var(--accent); color: var(--accent-text); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: var(--radius-sm); background: var(--muted-bg); color: var(--text); font-size: 12.5px; font-weight: 600; }
.chip.big { padding: 4px 6px 4px 10px; font-size: 13px; }
.chip.added { background: var(--ok-weak); color: var(--ok); }
.chip.changed { background: var(--accent-weak); color: var(--accent); }
.chip.removed { background: var(--danger-weak); color: var(--danger); }
.chip-x { width: 20px; height: 20px; min-height: 0; padding: 0; border: 0; background: transparent; color: inherit; opacity: 0.7; }
.chip-x:hover { opacity: 1; background: transparent; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-button { height: 26px; padding: 0 9px; font-size: 12.5px; border-radius: var(--radius-sm); }

/* types */
.type-icon { --tc: var(--t-text); display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: var(--radius); flex: none;
  color: var(--tc); background: color-mix(in srgb, var(--tc) 18%, transparent); }
.type-icon .icon { stroke-width: 2.1; }
.type-icon.big { width: 38px; height: 38px; border-radius: 10px; }
.type-icon[data-type="string"] { --tc: var(--t-string); }
.type-icon[data-type="url"] { --tc: var(--t-url); }
.type-icon[data-type="bool"] { --tc: var(--t-bool); }
.type-icon[data-type="int"] { --tc: var(--t-int); }
.type-icon[data-type="float"] { --tc: var(--t-float); }
.type-icon[data-type="color"] { --tc: var(--t-color); }
.type-icon[data-type="size"] { --tc: var(--t-size); }
.type-icon[data-type="scale"] { --tc: var(--t-scale); }
.type-icon[data-type="enum"] { --tc: var(--t-enum); }
.type-icon[data-type="image"] { --tc: var(--t-image); }
.type-icon[data-type="new"] { --tc: var(--t-new); }

/* tags */
.tag-chip { --tg: var(--tag-gray); display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 600; white-space: nowrap;
  color: var(--tg); background: color-mix(in srgb, var(--tg) 10%, transparent); border: 1px solid color-mix(in srgb, var(--tg) 24%, transparent); }
[data-color="red"] { --tg: var(--tag-red); } [data-color="orange"] { --tg: var(--tag-orange); } [data-color="amber"] { --tg: var(--tag-amber); }
[data-color="green"] { --tg: var(--tag-green); } [data-color="teal"] { --tg: var(--tag-teal); } [data-color="cyan"] { --tg: var(--tag-cyan); }
[data-color="blue"] { --tg: var(--tag-blue); } [data-color="indigo"] { --tg: var(--tag-indigo); } [data-color="purple"] { --tg: var(--tag-purple); }
[data-color="pink"] { --tg: var(--tag-pink); } [data-color="gray"] { --tg: var(--tag-gray); }
.tag-label { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 650; color: var(--tg, var(--tag-gray)); white-space: nowrap; }
.tag-hash { margin-right: 1px; font-weight: 500; color: color-mix(in srgb, var(--tg, var(--tag-gray)) 55%, transparent); }
.tag-chip-actions { display: inline-flex; gap: 1px; margin-right: -4px; }
.tag-mini { width: 20px; height: 20px; min-height: 0; padding: 0; border: 0; border-radius: 10px; background: transparent; color: inherit; opacity: 0.65; }
.tag-mini:hover { opacity: 1; background: color-mix(in srgb, var(--tg) 16%, transparent); }

/* ---------- shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: stretch; gap: 20px; height: 60px; padding: 0 24px;
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; letter-spacing: -0.01em; color: var(--text-strong); }
.logo { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: var(--radius); background: var(--accent); color: #FFFFFF; font-size: 11.5px; font-weight: 800; letter-spacing: 0.02em; }
.logo.big { width: 48px; height: 48px; border-radius: var(--radius-lg); font-size: 16px; }
.tabs { display: flex; align-items: stretch; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; color: var(--muted); font-weight: 600; font-size: 14.5px; box-shadow: inset 0 -2px 0 transparent; transition: color 0.18s var(--ease), box-shadow 0.18s var(--ease); }
.tabs a:hover { color: var(--text-strong); }
.tabs a.on { color: var(--text-strong); box-shadow: inset 0 -2px 0 var(--accent); }
.tab-count { font-size: 12px; font-weight: 700; min-width: 22px; text-align: center; padding: 1px 7px; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.tabs a.on .tab-count { background: var(--accent-weak); color: var(--accent); }
.tabs a:not(.app-name) { flex: none; width: 104px; justify-content: center; padding: 0 8px; } /* fixed, so a count never moves the tabs */
.tabs .app-name { color: var(--text-strong); font-weight: 700; margin-right: 10px; padding-left: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.guide-link { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: var(--radius); color: var(--muted); font-weight: 600; font-size: 14px; transition: background-color 0.18s var(--ease), color 0.18s var(--ease); }
.guide-link:hover, .guide-link.on { color: var(--accent); background: var(--accent-weak); }
.avatar { width: 36px; height: 36px; padding: 0; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); font-weight: 700; color: var(--text-strong); display: inline-grid; place-items: center; }
.avatar.small { width: 30px; height: 30px; font-size: 12px; }
.menu-wrap { position: relative; display: flex; align-items: center; }
.menu { position: absolute; right: 0; top: 46px; min-width: 230px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 6px; display: flex; flex-direction: column; }
.menu-head { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.menu a, .menu button { justify-content: flex-start; border: 0; background: transparent; height: 36px; padding: 0 10px; border-radius: var(--radius-sm); font-weight: 500; display: flex; align-items: center; }
.menu a:hover, .menu button:hover { background: var(--hover); }

.main { padding: 28px 24px 80px; }
.page { max-width: 1160px; margin: 0 auto; }
.page.wide { max-width: 1320px; }
.page.narrow { max-width: 780px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; }
.page-head p { margin: 2px 0 0; }
.loading { display: grid; place-items: center; padding: 80px 0; }
.loading.small { padding: 20px 0; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--border); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 60px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty.small { padding: 30px 20px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.card > h2 { margin-bottom: 6px; }
.card.table { padding: 0; overflow: hidden; }
.striped > :nth-child(even) { background: var(--zebra); }

/* ---------- sign in ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--bg); }
.auth-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 32px; box-shadow: var(--shadow-lg); }
.auth-card h1 { margin-top: 8px; }
.auth-card p.muted { margin: 0 0 8px; }
.auth-card p.auth-foot { margin: 6px 0 0; text-align: center; }
.auth-foot a { color: var(--accent); font-weight: 600; }
.auth-foot a:hover { text-decoration: underline; }

/* ---------- the demo server ---------- */
.demo-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 24px; font-size: 13.5px; color: var(--text);
  background: color-mix(in srgb, var(--warn) 8%, var(--surface)); border-bottom: 1px solid color-mix(in srgb, var(--warn) 24%, var(--border));
}
.demo-banner > .icon { color: var(--warn); }
.demo-banner-text { flex: 1; min-width: 220px; }
.demo-banner-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* The Shop sample app in a phone frame, beside the demo's Shop app. Fixed, outside the page, so it never reloads with it. */
.live-preview {
  position: fixed; top: 60px; right: 0; bottom: 0; width: 380px; z-index: 5; display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px 12px; background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-md);
}
.live-preview[hidden] { display: none; }
.live-preview-head { display: flex; align-items: flex-start; gap: 4px; }
.live-preview-head > div { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.phone { flex: 1; min-height: 0; display: flex; padding: 9px; border-radius: 36px; background: #0B1120; box-shadow: 0 0 0 1px var(--border-strong), var(--shadow-lg); }
.phone-screen { flex: 1; width: 100%; border: 0; border-radius: 28px; background: #FFFFFF; }
.live-preview-hint { margin: 0; text-align: center; }
body.with-live-preview .main { margin-right: 380px; }
@media (max-width: 900px) {
  body.with-live-preview .main { margin-right: 0; }
  .live-preview { left: 0; width: auto; }
}

/* ---------- apps ---------- */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.app-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.app-card:hover { border-color: var(--accent-border); box-shadow: var(--shadow-md); }
.app-card-head { display: flex; align-items: center; gap: 12px; }
.app-avatar { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-weak); color: var(--accent); font-weight: 800; }
.app-card h3 { font-size: 16.5px; text-transform: none; letter-spacing: -0.01em; color: var(--text-strong); }
.env-line { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.env-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 2px 10px; border-radius: 11px; }
.env-pill.test { background: color-mix(in srgb, var(--test) 11%, transparent); color: var(--test); }
.env-pill.live { background: color-mix(in srgb, var(--live) 11%, transparent); color: var(--live); }
.env-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); flex: none; display: inline-block; }
.env-dot.live { background: var(--live); }
.env-dot.test { background: var(--test); }

/* ---------- keys: toolbar and filters ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.filter-bar { display: flex; align-items: center; gap: 6px; flex: 1 1 520px; flex-wrap: wrap; min-width: 0; }
.search-wrap { position: relative; flex: 1 1 240px; display: flex; align-items: center; min-width: 180px; }
.search-wrap .icon { position: absolute; left: 12px; color: var(--subtle); pointer-events: none; }
.search { padding-left: 36px; }
.filter-button { gap: 6px; padding: 0 11px; color: var(--muted); font-weight: 600; }
.filter-button .icon:last-child { opacity: 0.6; }
.filter-button.on { color: var(--accent); border-color: var(--accent-border); background: var(--accent-weak); }
.filter-button .badge { min-width: 18px; height: 18px; font-size: 11px; }
.filter-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: -2px 0 12px; }
.filter-chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; }
.filter-chip .tag-chip { height: 20px; }
.result-count { margin-left: 4px; }

.popover { position: absolute; z-index: 80; min-width: 240px; max-width: min(360px, calc(100vw - 16px)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 6px; animation: fade 0.14s var(--ease); }
.menu-list { display: flex; flex-direction: column; gap: 1px; }
.menu-list.wide { min-width: 310px; }
.menu-list.pad { padding: 8px; gap: 8px; }
.menu-scroll { max-height: 300px; overflow: auto; display: flex; flex-direction: column; gap: 1px; }
.menu-search { margin-bottom: 6px; min-height: 32px; padding: 5px 10px; }
.menu-check { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--radius-sm); cursor: pointer; }
.menu-check:hover { background: var(--hover); }
.menu-check input { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--accent); }
.menu-check-label { flex: 1; min-width: 0; font-size: 14px; }
.menu-count { font-size: 12px; color: var(--subtle); font-weight: 600; }
.menu-section { padding: 4px 0; border-bottom: 1px solid var(--border); }
.menu-section:last-of-type { border-bottom: 0; }
.menu-section-title { padding: 6px 8px 2px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--subtle); }
.menu-footer { display: flex; justify-content: space-between; gap: 8px; padding: 6px 2px 0; margin-top: 4px; border-top: 1px solid var(--border); }
.quick-picks { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.palette { padding: 6px; }
.palette-title { display: flex; align-items: center; gap: 6px; font-weight: 600; margin-bottom: 8px; }
.palette-swatches { display: grid; grid-template-columns: repeat(6, 32px); gap: 6px; }
.palette-swatch { width: 32px; height: 32px; min-height: 0; padding: 0; border-radius: 50%; border: 2px solid transparent; background: var(--tg); color: #FFFFFF; }
.palette-swatch:hover { background: var(--tg); filter: brightness(1.1); }
button.palette-swatch.on { background: var(--tg); color: #FFFFFF; border-color: var(--surface); box-shadow: 0 0 0 2px var(--tg); }

/* ---------- keys: rows ---------- */
.key-list.rows {
  --col-key: 320px; --col-tags: 150px; --col-status: 116px; /* people can drag these in the header */
  --key-cols: 30px min(var(--col-key), 42%) minmax(120px, 1fr) min(var(--col-tags), 24%) min(var(--col-status), 20%);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: clip; box-shadow: var(--shadow-sm);
}
/* Column titles. "clip" above (not "hidden") lets this stick under the top bar while the list scrolls. */
.key-head {
  display: grid; grid-template-columns: var(--key-cols); gap: 0 16px; align-items: center; height: 38px; padding: 0 18px;
  position: sticky; top: 60px; z-index: 3; background: var(--surface-2); border-bottom: 1px solid var(--border);
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--subtle);
}
.key-head-key { grid-column: 2; }
.key-head > span { position: relative; min-width: 0; }
.col-resize { position: absolute; top: -11px; bottom: -11px; width: 14px; cursor: col-resize; touch-action: none; z-index: 1; border-radius: 3px; }
.col-resize.right { right: -15px; }
.col-resize.left { left: -15px; }
.col-resize::after { content: ""; position: absolute; left: 6px; top: 9px; bottom: 9px; width: 2px; border-radius: 1px; background: var(--border-strong); opacity: 0; transition: opacity 0.15s var(--ease), background-color 0.15s var(--ease); }
.key-head:hover .col-resize::after { opacity: 1; }
.col-resize:hover::after, .col-resize.active::after, .col-resize:focus-visible::after { opacity: 1; background: var(--accent); }
.col-resize:focus-visible { box-shadow: none; }
.key-list.resizing { cursor: col-resize; user-select: none; }
.key-row {
  display: grid; grid-template-columns: var(--key-cols); gap: 6px 16px; align-items: center;
  padding: 11px 18px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background-color 0.15s var(--ease);
}
.key-row:nth-child(even of .key-row) { background: var(--zebra); }
.key-row:last-child { border-bottom: 0; }
.key-row:hover { background: var(--hover); }
.key-row.deprecated .key-name, .key-card.deprecated .key-name { text-decoration: line-through; color: var(--subtle); }
.key-main { display: flex; flex-direction: column; min-width: 0; }
.key-status { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.status-label { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.status-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.status-label .icon { flex: none; }
.status-label[data-kind="unpublished"] { color: var(--cta-text); }
.status-label[data-kind="ai"] { color: var(--ai); }
.status-label[data-kind="deprecated"] { color: var(--warn); }
.status-label .dot-unpublished { width: 7px; height: 7px; margin: 0 2px; }
.key-name { font-family: var(--mono); font-weight: 600; font-size: 13px; color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.key-desc { font-size: 12.5px; color: var(--subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.key-value { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 15px; }
.key-tags { display: flex; gap: 4px 10px; flex-wrap: wrap; min-width: 0; }
/* Values are what people come to see, so in lists they get the most contrast: size and weight, not color. */
:is(.key-value, .key-card-value, .key-rule-value) { color: var(--text-strong); font-weight: 500; }
:is(.key-value, .key-card-value, .key-rule-value) .mono { font-size: 0.93em; font-weight: 500; color: var(--text-strong); }
:is(.key-value, .key-card-value, .key-rule-value) .chip { padding: 1px 9px; font-size: 0.88em; background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-strong); }
:is(.key-value, .key-card-value, .key-rule-value) .flag:is(.on, .off) { display: inline-flex; align-items: center; gap: 7px; padding: 0; border-radius: 0; background: none; font-size: inherit; font-weight: 600; }
:is(.key-value, .key-card-value, .key-rule-value) .flag::before { content: ""; width: 9px; height: 9px; border-radius: 50%; flex: none; box-sizing: border-box; }
:is(.key-value, .key-card-value, .key-rule-value) .flag.on { color: var(--ok); }
:is(.key-value, .key-card-value, .key-rule-value) .flag.on::before { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-weak); }
:is(.key-value, .key-card-value, .key-rule-value) .flag.off { color: var(--subtle); }
:is(.key-value, .key-card-value, .key-rule-value) .flag.off::before { border: 2px solid var(--border-strong); }
.key-value .swatch.small { width: 20px; height: 20px; border-radius: 6px; }
.key-value .thumb { height: 34px; max-width: 120px; }
.key-meta { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.preview-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.flag { font-weight: 650; font-size: 12px; padding: 2px 9px; border-radius: var(--radius-sm); }
.flag.on { background: var(--ok-weak); color: var(--ok); }
.flag.off { background: var(--surface-2); color: var(--muted); }
.color-preview { display: inline-flex; align-items: center; gap: 4px; }
.thumb { height: 28px; max-width: 90px; border-radius: var(--radius-sm); border: 1px solid var(--border); object-fit: cover; }
/* A key's rules, as a small list under it. Lines run from the key's icon to each rule; each rule's value sits
   under the key's value (subgrid). */
.key-rules { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; row-gap: 2px; }
.key-rule {
  --branch: color-mix(in srgb, var(--subtle) 40%, var(--border-strong)); --band: transparent; --band-from: 40px;
  grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: start; position: relative; padding: 2px 0; border-radius: var(--radius-sm);
  background: linear-gradient(to right, transparent var(--band-from), var(--band) var(--band-from));
}
.key-rule-who { grid-column: 2; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0; min-height: 24px; }
.key-rule-value { grid-column: 3; align-self: end; display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 24px; font-size: 14px; } /* "end": next to the dotted line when the conditions wrap */
.key-rules .key-rule .cond { height: 20px; padding: 0 7px; gap: 4px; font-size: 11.5px; background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--muted); }
.key-rule .cond[data-kind="platform"] .icon { color: var(--t-text); }
.key-rule .cond[data-kind="version"] .icon { color: var(--t-scale); }
.key-rule .cond[data-kind="build"] .icon { color: var(--t-string); }
.key-rule .cond[data-kind="country"] .icon { color: var(--t-size); }
.key-rule .cond[data-kind="rollout"] .icon { color: var(--t-int); }
.key-rule .cond .icon { width: 11px; height: 11px; }
.key-rule .lang-code { font-size: 11px; }
.key-rule .thumb { height: 24px; }
.key-rule.more .key-rule-who { font-size: 12.5px; font-weight: 600; color: var(--subtle); }
/* A dotted line from the conditions to the value, so it's easy to see which value goes with which rule. */
.key-rule:not(.more) .key-rule-who::after { content: ""; flex: 1 1 0; min-width: 0; align-self: center; margin: 0 -10px 0 4px; border-bottom: 2px dotted var(--branch); }
.key-rule::before { content: ""; position: absolute; left: 14px; top: -4px; width: 26px; height: 18px; border-left: 1.5px solid var(--branch); border-bottom: 1.5px solid var(--branch); border-bottom-left-radius: 8px; pointer-events: none; }
.key-rule:first-child::before { top: -7px; height: 21px; }
.key-rule:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 12px; bottom: -6px; border-left: 1.5px solid var(--branch); pointer-events: none; }
.key-rule:not(.more):hover { --band: color-mix(in srgb, var(--text-strong) 6%, transparent); }
.key-rule.hit { --band: var(--accent-weak); }
.key-rule.hit:hover { --band: color-mix(in srgb, var(--accent) 16%, transparent); }
.key-rule.hit .key-rule-value { font-weight: 650; color: var(--accent); }
.key-rule.hit .key-rule-value .mono { color: inherit; font-weight: inherit; }

.dot-unpublished { width: 8px; height: 8px; border-radius: 50%; background: var(--cta); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cta) 18%, transparent); flex: none; }
.dot-text { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- keys: grid ---------- */
.key-list.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.key-list.grid .empty { grid-column: 1 / -1; }
.key-card { --tc: var(--t-text); display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease); min-width: 0; }
.key-card:hover { border-color: color-mix(in srgb, var(--tc) 40%, var(--border)); box-shadow: var(--shadow-md); }
.key-card[data-type="string"] { --tc: var(--t-string); } .key-card[data-type="url"] { --tc: var(--t-url); } .key-card[data-type="bool"] { --tc: var(--t-bool); }
.key-card[data-type="int"] { --tc: var(--t-int); } .key-card[data-type="float"] { --tc: var(--t-float); } .key-card[data-type="color"] { --tc: var(--t-color); }
.key-card[data-type="size"] { --tc: var(--t-size); } .key-card[data-type="scale"] { --tc: var(--t-scale); } .key-card[data-type="enum"] { --tc: var(--t-enum); }
.key-card[data-type="image"] { --tc: var(--t-image); }
.key-card-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.key-card-head .key-name { flex: 1; }
.key-card-value { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); overflow: hidden; }
.key-card-value .preview-text { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.key-card-value .swatch.small { width: 26px; height: 26px; border-radius: 7px; }
.key-card-value .thumb { height: 40px; max-width: 160px; }
.key-card-foot { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: auto; }
.key-card .key-rules { display: flex; flex-direction: column; gap: 2px; margin-top: -2px; }
.key-card .key-rule { --band-from: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding: 2px 0 2px 30px; }
.key-card .key-rule-value { max-width: 100%; }
.key-card .key-rule .key-rule-who::after { display: none; }
.key-card .key-rule::before, .key-card .key-rule::after { left: 12px; }
.key-card .key-rule::before { width: 14px; }
.key-card .key-rule:first-child::before { top: -6px; height: 20px; }
.key-card-foot .type-name { margin-left: auto; color: var(--subtle); }

.inline-field { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.inline-field input { width: 78px; min-height: 30px; padding: 4px 8px; }

/* ---------- keys: View as app ---------- */
.viewas { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; margin-bottom: 14px; border-radius: var(--radius-lg); background: var(--accent-weak); border: 1px solid var(--accent-border); }
.viewas-head { display: flex; align-items: center; gap: 12px; }
.viewas-title { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.viewas-help { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); }
.viewas-head .icon-button { width: 32px; height: 32px; margin: -4px -4px -4px 0; }
/* 1px gaps over a border-colored background draw the lines between fields, also when they wrap */
.viewas-fields { display: flex; flex-wrap: wrap; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.viewas-field {
  flex: 1 0 auto; max-width: 100%; height: auto; min-height: 54px; padding: 8px 14px;
  flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
  border: 0; border-radius: 0; background: var(--surface); text-align: left;
}
.viewas-field:hover { background: var(--hover); }
.viewas-field[aria-expanded="true"] { background: var(--accent-weak); }
.viewas-field:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.viewas-caption { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--subtle); }
.viewas-value { display: flex; align-items: center; gap: 4px; max-width: 100%; color: var(--text-strong); font-size: 14px; font-weight: 650; }
.viewas-value .icon { flex: none; opacity: 0.55; }
.viewas-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.viewas-field.multi .viewas-value { color: var(--accent); }
.viewas-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.viewas-count { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.viewas-warn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--warn); }
.viewas-menu { width: 300px; }
@media (max-width: 640px) {
  .viewas-head { flex-wrap: wrap; }
  .viewas-help { order: 3; flex-basis: 100%; }
  .viewas-head .icon-button { margin-left: auto; }
}
.viewas-intro { margin: 2px 4px 8px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.viewas-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 2px 8px; }
.viewas-chips:empty { display: none; }
.viewas-menu .inline { margin: 0 2px 6px; }
.viewas-menu .inline input { flex: 1; min-height: 32px; padding: 5px 10px; }
.viewas-menu .quick-picks { margin: 4px 2px 6px; }
.menu-scroll.tall { max-height: 320px; }
.menu-check.disabled { cursor: default; }
.menu-check.disabled input { opacity: 0.6; }
.country-option { display: inline-flex; align-items: center; gap: 8px; }
.vv-lines { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vv-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.vv-line .lang-code { flex: none; width: 24px; font-size: 11px; }
.vv-pair { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vv-fallback { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--subtle); }
.vv-fallback .pill { height: 18px; font-size: 11px; }

/* ---------- keys: side by side ---------- */
.key-list.compare { display: block; }
.cmp-wrap { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); overflow: auto; max-height: calc(100vh - 250px); min-height: 220px; }
.cmp { display: table; width: 100%; border-collapse: separate; border-spacing: 0; }
.cmp-row { display: table-row; }
.cmp-row > * { display: table-cell; vertical-align: middle; padding: 10px 14px; border-top: 1px solid var(--border); background: var(--surface); }
.cmp-row:nth-child(odd):not(.head) > * { background: var(--zebra); }
.cmp-row.head > * { position: sticky; top: 0; z-index: 2; border-top: 0; vertical-align: bottom; background: var(--surface-2); box-shadow: inset 0 -1px 0 var(--border); font-size: 13px; font-weight: 650; color: var(--text-strong); }
.cmp-key { position: sticky; left: 0; z-index: 1; width: 260px; min-width: 220px; max-width: 300px; box-shadow: inset -1px 0 0 var(--border); color: inherit; text-decoration: none; cursor: pointer; }
.cmp-row.head .cmp-key { z-index: 3; box-shadow: inset -1px 0 0 var(--border), inset 0 -1px 0 var(--border); }
.cmp-row:not(.head):hover > * { background: var(--hover); }
.cmp-key-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cmp-key .key-name { overflow: hidden; text-overflow: ellipsis; }
.cmp-key .key-desc { display: block; margin-top: 2px; padding-left: 22px; white-space: normal; }
.cmp-key.deprecated .key-name { text-decoration: line-through; color: var(--subtle); }
.cmp-head { min-width: 170px; }
.cmp-part { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.cmp-part.lead { font-size: 13.5px; font-weight: 700; color: var(--text-strong); }
.cmp-cell { min-width: 170px; }
.cmp-value { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.cmp-value .preview-text { white-space: normal; }
.cmp-row:not(.head) > .cmp-cell.diff { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); box-shadow: inset 3px 0 0 var(--accent); }
.cmp-row:not(.head):hover > .cmp-cell.diff { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }

/* ---------- dialogs: in the middle or docked on the right ---------- */
.backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(15, 23, 42, 0.5); backdrop-filter: blur(4px); animation: fade 0.15s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.dialog { width: 100%; max-width: 500px; max-height: calc(100vh - 48px); overflow: auto; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); padding: 22px 26px; animation: pop 0.16s var(--ease); }
@keyframes pop { from { transform: translateY(8px); opacity: 0.6; } }
.dialog.wide { max-width: 1040px; }
.backdrop[data-layout="side"] { place-items: stretch end; padding: 0; }
.backdrop[data-layout="side"] .dialog { max-width: min(880px, 100vw); height: 100vh; max-height: 100vh; border-radius: 0; animation: slide 0.2s var(--ease); display: flex; flex-direction: column; }
@keyframes slide { from { transform: translateX(40px); opacity: 0.5; } }
.dialog-head { display: flex; align-items: center; gap: 12px; margin: -4px 0 10px; }
.dialog-head h2 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; }
.dialog-head-actions { display: flex; gap: 2px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.dialog-foot { grid-column: 1 / -1; position: sticky; bottom: -22px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 0 2px; margin-top: 8px; background: var(--surface); border-top: 1px solid var(--border); }
.dialog-foot .error { margin-right: auto; }

/* ---------- key editor ---------- */
.key-editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0 26px; align-items: start; }
.backdrop[data-layout="side"] .key-editor { flex: 1; }
.key-editor-main { min-width: 0; }
.key-editor-main > section { padding: 18px 0; border-top: 1px solid var(--border); }
.key-editor-main > section:first-child { border-top: 0; padding-top: 4px; }
.key-editor-aside { position: sticky; top: 0; display: flex; flex-direction: column; gap: 4px; padding: 14px 0 0 22px; border-left: 1px solid var(--border); min-width: 0; }
.key-editor.create .key-editor-aside { padding-top: 12px; }
.key-editor-aside > h3 { margin-bottom: 8px; }
.aside-block { margin: 0 0 16px; display: flex; flex-direction: column; gap: 6px; }
.aside-block.field > span:first-child { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--subtle); }
.key-editor-aside .field { margin: 0 0 16px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 8px; }
.type-list { display: flex; flex-direction: column; gap: 4px; }
.type-option { height: auto; justify-content: flex-start; gap: 12px; padding: 8px 10px; text-align: left; white-space: normal; font-weight: 500; border-color: transparent; background: transparent; }
.type-option:hover { background: var(--hover); border-color: transparent; }
.type-option.on { background: var(--accent-weak); border-color: var(--accent-border); }
.type-option-text { display: flex; flex-direction: column; line-height: 1.35; }
.type-option-text strong { color: var(--text-strong); }
.type-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.code-line { width: 100%; justify-content: space-between; height: 38px; background: var(--surface-2); border-color: var(--border); font-weight: 500; color: var(--text-strong); }
.code-line span { overflow: hidden; text-overflow: ellipsis; }
.danger-zone { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 14px; border-top: 1px solid var(--border); }

/* who gets what / on Test and Live: plain sentences under the value and the rules */
.summary { display: flex; flex-direction: column; gap: 10px; }
.summary > h3 { margin-bottom: 2px; }
.sentences { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.sentences li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--border); font-size: 14.5px; line-height: 1.5; transition: background-color 0.15s var(--ease); }
.sentences li:first-child { border-top: 0; }
.sentences li:nth-child(even) { background: var(--zebra); }
.sentences li.hit { background: color-mix(in srgb, var(--ok) 8%, var(--surface)); box-shadow: inset 3px 0 0 var(--ok); }
.sentence { flex: 1; min-width: 0; color: var(--text); }
.sentence-value { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; max-width: 100%; padding: 1px 8px; border-radius: var(--radius-sm); background: var(--surface-2); font-weight: 600; color: var(--text-strong); }
.sentence-value .preview-text { white-space: normal; }
.rule-number { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-weak); color: var(--accent); font-size: 11.5px; font-weight: 750; flex: none; }
.rule-number.everyone { background: var(--surface-2); color: var(--subtle); }
.check-app { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0 14px; background: var(--surface); }
.check-app summary { display: flex; align-items: center; gap: 6px; height: 42px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent); list-style: none; }
.check-app summary::-webkit-details-marker { display: none; }
.check-app[open] summary { border-bottom: 1px solid var(--border); }
.check-fields { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 0 4px; }
.check-fields select { min-height: 32px; padding: 4px 28px 4px 10px; max-width: 200px; }
.check-fields .inline-field input { width: 70px; }
.check-result { display: flex; align-items: center; gap: 6px; margin: 4px 0 12px; font-weight: 600; color: var(--ok); }
.env-sentences { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.env-sentences li { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-lg); border: 1px solid var(--border); font-size: 14.5px; line-height: 1.55; }
.env-sentences li > .icon { margin-top: 3px; }
.env-sentences li.ok { background: var(--ok-weak); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.env-sentences li.ok > .icon { color: var(--ok); }
.env-sentences li.warn { background: var(--warn-weak); border-color: color-mix(in srgb, var(--warn) 28%, transparent); }
.env-sentences li.warn > .icon { color: var(--warn); }
.env-sentences li.todo { background: var(--surface-2); }
.env-sentences li.todo > .icon { color: var(--subtle); }

/* rules */
.rule-list { display: flex; flex-direction: column; gap: 8px; }
.rule-card { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.rule-card.new { border-color: var(--accent); box-shadow: var(--ring); }
.rule-card.flash { animation: rule-flash 1.8s var(--ease); }
@keyframes rule-flash { 0%, 45% { border-color: var(--accent); box-shadow: var(--ring); } 100% { border-color: var(--border); box-shadow: none; } }
.rule-head { display: flex; align-items: center; gap: 4px; padding-right: 4px; background: var(--surface-2); }
.rule-toggle { flex: 1; min-width: 0; height: auto; min-height: 46px; justify-content: flex-start; gap: 10px; padding: 8px 12px; border: 0; border-radius: 0; background: transparent; text-align: left; white-space: normal; font-weight: 600; }
.rule-toggle:hover { background: transparent; }
.rule-who-chips { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; min-width: 0; }
.rule-value { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; max-width: 42%; overflow: hidden; }
.rule-body { padding: 14px; }
.rule-editor { display: flex; flex-direction: column; gap: 14px; }
.rule-editor h4 { margin-bottom: 8px; }
.rule-who { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--radius-lg); background: var(--surface-2); }
.cond { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: var(--radius-sm); font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--muted-bg); color: var(--text); }
.cond[data-kind="platform"] { background: color-mix(in srgb, var(--t-text) 10%, transparent); color: var(--t-text); }
.cond[data-kind="version"] { background: color-mix(in srgb, var(--t-scale) 10%, transparent); color: var(--t-scale); }
.cond[data-kind="build"] { background: color-mix(in srgb, var(--t-string) 12%, transparent); color: var(--t-string); }
.cond[data-kind="country"] { background: color-mix(in srgb, var(--t-size) 11%, transparent); color: var(--t-size); }
.cond[data-kind="rollout"] { background: color-mix(in srgb, var(--t-int) 11%, transparent); color: var(--t-int); }
.cond[data-kind="everyone"] { background: transparent; color: var(--subtle); padding-left: 0; }
.cond-row { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; align-items: start; }
.cond-label { padding-top: 7px; font-size: 13px; font-weight: 650; color: var(--muted); }
.cond-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cond-body .hint { margin: 0; }
.share-row { display: flex; align-items: center; gap: 12px; }
.share-row input[type="range"] { flex: 1; }
.share-row input.short { width: 84px; }

/* country picker and suggestion lists */
.country-picker { display: flex; flex-direction: column; gap: 6px; }
.country-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.country-chips:empty { display: none; }
.country-chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 10px; border-radius: 14px; background: color-mix(in srgb, var(--t-size) 10%, transparent); color: var(--t-size); font-size: 13px; font-weight: 600; }
.suggest-wrap { position: relative; display: block; }
.suggest-wrap.grow { flex: 1; min-width: 140px; }
.suggestions { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; display: flex; flex-direction: column; gap: 1px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); max-height: 260px; overflow: auto; min-width: 220px; }
.suggestions button { justify-content: flex-start; gap: 8px; height: 36px; border: 0; background: transparent; font-weight: 500; padding: 0 8px; }
.suggestions button.on, .suggestions button:hover { background: var(--accent-weak); }
.suggestions .muted { margin-left: auto; }
.flag-emoji { font-size: 15px; }

/* tag input */
.tag-input { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-height: 38px; padding: 4px 6px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); cursor: text; transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease); }
.tag-input:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.tag-input-chips { display: contents; }
.tag-input-field { border: 0; padding: 4px; min-height: 26px; background: transparent; box-shadow: none !important; }

/* ---------- value editors ---------- */
.editor { display: flex; flex-direction: column; gap: 8px; }
.editor.inline { flex-direction: row; align-items: center; flex-wrap: wrap; }
.editor.switch-row { flex-direction: row; align-items: center; align-self: flex-start; cursor: pointer; }
.editor.inline .hint { width: 100%; }
.lang-row { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: start; }
.lang { display: flex; flex-direction: column; padding-top: 7px; font-size: 13px; line-height: 1.3; color: var(--muted); }
.lang-code { font-weight: 750; text-transform: uppercase; font-size: 12px; color: var(--accent); }
.lang .pill { align-self: flex-start; margin-top: 3px; }
.forms { display: flex; flex-direction: column; gap: 6px; }
.form-row { display: grid; grid-template-columns: 52px 1fr; gap: 8px; align-items: start; }
.form-name { padding-top: 9px; font-size: 12.5px; font-weight: 600; color: var(--subtle); }
.color-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.color-label { width: 42px; font-size: 13px; font-weight: 650; color: var(--muted); }
.color-row input.hex { width: 120px; font-family: var(--mono); }
.rgb { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.rgb label { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; color: var(--subtle); }
.rgb input.channel { width: 60px; padding: 6px; text-align: right; }
.swatch-wrap { position: relative; display: inline-block; width: 40px; height: 38px; flex: none; }
.swatch { display: block; width: 40px; height: 38px; border-radius: var(--radius); border: 1px solid var(--border-strong); background-image: linear-gradient(45deg, var(--surface-2) 25%, transparent 25%, transparent 75%, var(--surface-2) 75%), linear-gradient(45deg, var(--surface-2) 25%, transparent 25%, transparent 75%, var(--surface-2) 75%); background-size: 10px 10px; background-position: 0 0, 5px 5px; }
.swatch.unset { border-style: dashed; }
.swatch.small { width: 16px; height: 16px; border-radius: 4px; display: inline-block; }
.swatch-wrap input[type="color"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; padding: 0; border: 0; }
.unit-field { display: inline-flex; align-items: center; gap: 8px; }
.unit-field input { width: 100px; }
.unit { color: var(--subtle); font-size: 12.5px; }
.image-slot { display: grid; grid-template-columns: 44px 160px 1fr; gap: 12px; align-items: center; }
.image-preview { height: 66px; border-radius: var(--radius); border: 1px dashed var(--border-strong); display: grid; place-items: center; overflow: hidden; background: var(--surface-2); }
.image-preview img { width: 100%; height: 100%; object-fit: contain; }
.image-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.image-actions select { max-width: 150px; }
.row-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- publish ---------- */
.publish { display: flex; flex-direction: column; gap: 14px; }
.env-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.env-choice { height: auto; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px; text-align: left; white-space: normal; font-weight: 500; border-radius: var(--radius-lg); }
.env-choice-head { display: flex; align-items: center; gap: 8px; width: 100%; color: var(--text-strong); }
.env-choice-head .badge, .env-choice-head > .muted { margin-left: auto; }
.env-choice.on[data-env="test"] { background: color-mix(in srgb, var(--test) 7%, var(--surface)); border-color: var(--test); box-shadow: 0 0 0 3px color-mix(in srgb, var(--test) 16%, transparent); }
.env-choice.on[data-env="live"] { background: color-mix(in srgb, var(--live) 7%, var(--surface)); border-color: var(--live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 16%, transparent); }
.publish-summary { display: flex; flex-direction: column; gap: 8px; }
.publish-summary:empty { display: none; }
.release-jump { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.big-release { font-size: 24px; font-weight: 800; color: var(--subtle); letter-spacing: -0.02em; }
.big-release.new { color: var(--text-strong); }
.callout { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--radius-lg); font-size: 14px; border: 1px solid transparent; }
.callout.ok { background: var(--ok-weak); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 22%, transparent); }
.callout.warn { background: var(--warn-weak); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 26%, transparent); }
.callout.info { background: var(--accent-weak); color: var(--accent); border-color: var(--accent-border); }
.callout span { flex: 1; min-width: 200px; color: var(--text); }
.change-list { max-height: 46vh; overflow: auto; display: flex; flex-direction: column; gap: 14px; padding-right: 4px; }
.change-group h4 { margin: 2px 0 8px; color: var(--subtle); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.change-item { display: flex; flex-direction: column; gap: 5px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 8px; }
.change-item:nth-child(even) { background: var(--zebra); }
.change-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.change-head .mono { color: var(--text-strong); }
.change-line { display: flex; align-items: flex-start; gap: 7px; padding-left: 38px; font-size: 14px; }
.change-line > .icon { margin-top: 3px; color: var(--subtle); }
.change-line-body { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; min-width: 0; }
.change-when { display: inline-flex; align-items: center; gap: 5px; padding-left: 38px; color: var(--subtle); }
.before-after { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.before-after .old, .before-after q.old { color: var(--subtle); text-decoration: line-through; }
.value-line { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; }
.rule-inline { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.publish-button { font-weight: 700; }

/* ---------- releases, settings, people ---------- */
.env-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.env-card { border-top: 3px solid var(--border-strong); }
.env-card[data-env="test"] { border-top-color: var(--test); }
.env-card[data-env="live"] { border-top-color: var(--live); }
.env-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.env-card-head .badge { margin-left: auto; }
.big-number { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; color: var(--text-strong); }
.two-columns { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; margin-top: 8px; }
.section-title { margin-bottom: 4px; }
.release-row, .person-row { display: grid; grid-template-columns: 56px 1fr auto auto; gap: 12px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--border); }
.release-row:last-child, .person-row:last-child { border-bottom: 0; }
.release-number { color: var(--accent); }
.release-envs, .release-actions { display: flex; gap: 6px; justify-content: flex-end; }
.person-row { grid-template-columns: 34px 1fr auto auto auto; }
.person-main { display: flex; flex-direction: column; min-width: 0; }
.feed { padding: 6px 18px; }
.feed-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.feed-row:last-child { border-bottom: 0; }
.client-key { padding: 14px 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.client-key-head { display: flex; align-items: center; gap: 8px; }
.copy-field { display: flex; align-items: center; gap: 4px; width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 3px 3px 3px 12px; }
.copy-field code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snippet { border: 1px solid var(--border); border-radius: var(--radius-lg); margin-top: 12px; overflow: hidden; }
.snippet-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 2px 14px; background: var(--surface-2); font-weight: 600; font-size: 13px; }
.snippet pre { margin: 0; padding: 14px; overflow: auto; line-height: 1.55; }
.import-result:empty { display: none; }
.import-result { margin-top: 10px; }

/* ---------- guide ---------- */
.guide { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; max-width: 1100px; margin: 0 auto; }
.guide-nav { position: sticky; top: 88px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.guide-nav h3 { margin: 0 0 10px 10px; }
.guide-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); color: var(--muted); font-weight: 600; font-size: 14px; transition: background-color 0.15s var(--ease), color 0.15s var(--ease); }
.guide-nav a:hover { background: var(--hover); color: var(--text-strong); }
.guide-nav a.on { background: var(--accent-weak); color: var(--accent); }
.guide-nav-number { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); font-size: 12px; font-weight: 750; flex: none; }
.guide-nav a.on .guide-nav-number { background: var(--accent); color: var(--accent-text); }
.guide-body { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 34px 40px 40px; box-shadow: var(--shadow-sm); }
.guide-kicker { color: var(--accent); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.07em; }
.guide-body h1 { font-size: 30px; margin: 6px 0 8px; }
.guide-lead { font-size: 17px; color: var(--muted); margin: 0 0 20px; max-width: 660px; }
.guide-body h2 { font-size: 19px; margin: 28px 0 10px; }
.guide-body p, .guide-body li { font-size: 15.5px; line-height: 1.65; max-width: 690px; }
.guide-body ul { padding-left: 20px; }
.steps { list-style: none; padding: 0; margin: 12px 0; counter-reset: step; display: flex; flex-direction: column; gap: 16px; }
.steps > li { counter-increment: step; position: relative; padding-left: 46px; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-weight: 800; font-size: 14px; }
.steps strong { display: block; font-size: 15.5px; margin-bottom: 2px; color: var(--text-strong); }
.shot { margin: 14px 0 6px; border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-md); background: var(--surface-2); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { padding: 9px 14px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); background: var(--surface); }
.tip { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin: 16px 0; border-radius: var(--radius-lg); background: var(--accent-weak); border: 1px solid var(--accent-border); max-width: 710px; }
.tip .icon { color: var(--accent); margin-top: 3px; }
.tip.warn { background: var(--warn-weak); border-color: color-mix(in srgb, var(--warn) 26%, transparent); }
.tip.warn .icon { color: var(--warn); }
.tip p { margin: 0; font-size: 14.5px; }
.example { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; padding: 16px 18px; border-radius: var(--radius-lg); border: 1px dashed var(--border-strong); margin: 12px 0; max-width: 710px; font-size: 14.5px; }
.example dt { font-weight: 650; color: var(--text-strong); }
.example dd { margin: 0; color: var(--muted); }
.flow { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.flow-step { flex: 1 1 140px; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--radius-lg); background: var(--surface-2); border: 1px solid var(--border); }
.flow-step strong { display: flex; align-items: center; gap: 6px; color: var(--text-strong); }
.flow-step[data-tone="test"] { background: color-mix(in srgb, var(--test) 7%, var(--surface)); border-color: color-mix(in srgb, var(--test) 30%, transparent); }
.flow-step[data-tone="live"] { background: color-mix(in srgb, var(--live) 7%, var(--surface)); border-color: color-mix(in srgb, var(--live) 30%, transparent); }
.flow-step[data-tone="accent"] { background: var(--accent-weak); border-color: var(--accent-border); }
.flow-arrow { display: grid; place-items: center; color: var(--subtle); }
.guide-table { width: 100%; max-width: 710px; border-collapse: collapse; margin: 12px 0; font-size: 14.5px; }
.guide-table th, .guide-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.guide-table tr:nth-child(even) td { background: var(--zebra); }
.guide-table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--subtle); }
.guide-next { display: flex; justify-content: space-between; gap: 10px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); }
.guide-next a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: var(--radius); border: 1px solid var(--border); font-weight: 600; transition: border-color 0.15s var(--ease), color 0.15s var(--ease); }
.guide-next a:hover { border-color: var(--accent); color: var(--accent); }
.kbd { display: inline-block; padding: 0 6px; border-radius: 5px; border: 1px solid var(--border-strong); background: var(--surface-2); font-family: var(--mono); font-size: 12px; }

/* ---------- links, keys for the server API ---------- */
.text-link { color: var(--accent); font-weight: 600; }
.text-link:hover { text-decoration: underline; }
.api-key-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-top: 12px; }
.api-key-list > p { padding: 12px 14px; margin: 0; }
.api-key-row { display: grid; grid-template-columns: 32px 1fr auto auto; gap: 12px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--border); }
.api-key-row:first-child { border-top: 0; }
.api-key-row:nth-child(even) { background: var(--zebra); }
.api-key-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius); background: var(--accent-weak); color: var(--accent); }
.api-key-main { display: flex; flex-direction: column; min-width: 0; }
.api-key-main code { font-size: 12px; }
.copy-field.big { padding: 8px 8px 8px 14px; margin: 12px 0 4px; }
.copy-field.big code { font-size: 13.5px; color: var(--text-strong); white-space: normal; word-break: break-all; }

/* ---------- code blocks ---------- */
pre.code { margin: 0; padding: 14px 16px; overflow: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; background: var(--surface-2); border-radius: var(--radius); color: var(--text-strong); }
.docs-section > pre.code { margin: 12px 0; border: 1px solid var(--border); }
.tok-key { color: var(--t-scale); }
.tok-string { color: var(--t-bool); }
.tok-number, .tok-literal { color: var(--t-int); }
.tok-keyword { color: var(--accent); font-weight: 600; }
.tok-comment { color: var(--subtle); font-style: italic; }

/* ---------- API docs ---------- */
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; max-width: 1320px; margin: 0 auto; }
.docs-nav { position: sticky; top: 88px; align-self: start; display: flex; flex-direction: column; gap: 1px; max-height: calc(100vh - 110px); overflow: auto; padding-bottom: 20px; }
.docs-nav h3 { margin: 16px 0 6px 10px; }
.docs-nav h3:first-child { margin-top: 0; }
.docs-nav a { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--radius); color: var(--muted); font-weight: 600; font-size: 14px; transition: background-color 0.15s var(--ease), color 0.15s var(--ease); }
.docs-nav a:hover { background: var(--hover); color: var(--text-strong); }
.docs-nav a.on { background: var(--accent-weak); color: var(--accent); }
.method { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 18px; padding: 0 5px; border-radius: 4px; background: var(--ok-weak); color: var(--ok); font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em; }
.method.big { height: 24px; min-width: 44px; font-size: 12px; }
.docs-content { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 8px 40px 40px; box-shadow: var(--shadow-sm); }
.docs-section { padding: 32px 0 8px; border-top: 1px solid var(--border); scroll-margin-top: 80px; }
.docs-section:first-child { border-top: 0; }
.docs-section h1 { font-size: 30px; margin: 6px 0 8px; }
.docs-section > h2 { font-size: 21px; margin-bottom: 10px; }
.docs-section p, .docs-section li { font-size: 15px; line-height: 1.65; max-width: 760px; }
.docs-section code { font-family: var(--mono); font-size: 12.5px; padding: 1px 6px; border-radius: 5px; background: var(--surface-2); color: var(--text-strong); }
.docs-section pre code { padding: 0; background: none; }
.docs-section .callout { margin: 12px 0; max-width: 760px; }
.docs-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 18px 0 8px; }
.docs-fact { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--zebra); }
.docs-fact select { min-height: 32px; padding: 3px 28px 3px 10px; }
.docs-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.docs-table th, .docs-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.docs-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--subtle); }
.docs-table tr:nth-child(even) td { background: var(--zebra); }
.docs-table td p { margin: 0 0 2px; font-size: 14px; }
.docs-table.params td:first-child { width: 170px; }
.try-field { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.try-field input { max-width: 260px; min-height: 32px; padding: 4px 9px; font-size: 13.5px; }
.try-field .inline input { width: 110px; }
.param-name { font-weight: 700; }
.required { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; color: var(--warn); text-transform: uppercase; letter-spacing: 0.04em; }
.endpoint-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.endpoint-path { font-size: 15px !important; font-weight: 600; padding: 4px 10px !important; }
.endpoint-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 14px; }
.endpoint-grid > div:first-child { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; min-width: 0; }
.endpoint-grid > div:first-child table { margin-top: 0; }
.endpoint-code { display: flex; flex-direction: column; gap: 12px; min-width: 0; position: sticky; top: 80px; }
.code-card, .response-card { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2); }
.code-card pre.code, .response-card pre.code { border-radius: 0; max-height: 420px; }
.code-head { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 8px; border-bottom: 1px solid var(--border); background: var(--surface); }
.code-head .icon-button { margin-left: auto; }
.code-tabs { display: flex; gap: 2px; }
.code-tabs button { height: 30px; padding: 0 10px; border: 0; background: transparent; color: var(--muted); font-size: 13px; border-radius: var(--radius-sm); }
.code-tabs button.on { background: var(--accent-weak); color: var(--accent); }
.response-title { font-weight: 650; font-size: 13px; padding-left: 4px; }
.status-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; font-family: var(--mono); font-size: 12px; font-weight: 700; }
.status-pill.ok { background: var(--ok-weak); color: var(--ok); }
.status-pill.bad { background: var(--danger-weak); color: var(--danger); }

@media (max-width: 1200px) {
  .endpoint-grid { grid-template-columns: 1fr; }
  .endpoint-code { position: static; }
}
@media (max-width: 900px) {
  .docs { grid-template-columns: 1fr; }
  .docs-nav { position: static; max-height: none; flex-direction: row; flex-wrap: wrap; }
  .docs-nav h3 { width: 100%; }
  .docs-content { padding: 4px 18px 24px; }
  .docs-table.params td:first-child { width: auto; }
  .api-key-row { grid-template-columns: 32px 1fr; }
}

/* ---------- translations ---------- */
.tr-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; color: var(--muted); font-size: 14px; }
.tr-summary strong { color: var(--text-strong); }
.dot-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--border-strong); }
.ok-text { display: inline-flex; align-items: center; gap: 5px; color: var(--ok); font-weight: 600; }
.tr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tr-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.tr-card-head { display: flex; align-items: center; gap: 8px; }
.tr-card-head strong { color: var(--text-strong); }
.tr-percent { margin-left: auto; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: var(--text-strong); }
.tr-card.done .tr-percent { color: var(--ok); }
.tr-card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 2px; }
.bar { display: block; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 4px; background: var(--accent); transition: width 0.3s var(--ease); }
.bar.done .bar-fill { background: var(--ok); }
.bar.low .bar-fill { background: var(--warn); }
.tr-problem { display: inline-flex; align-items: center; gap: 4px; color: var(--warn); font-weight: 600; font-size: 12px; }
.tr-by-tag { margin-bottom: 18px; }
.tr-by-tag h3 { margin-bottom: 8px; }
.tr-tag-table { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.tr-tag-row { display: grid; grid-template-columns: minmax(130px, 1.2fr) 70px repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--border); font-size: 14px; }
.tr-tag-row:first-child { border-top: 0; }
.tr-tag-row:nth-child(even) { background: var(--zebra); }
.tr-tag-row.head { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--subtle); background: var(--surface-2); }
.tr-tag-cell { height: auto; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 6px 8px; border: 1px solid transparent; background: transparent; text-align: left; }
.tr-tag-cell:hover { border-color: var(--border); background: var(--surface); }
.tr-tag-percent { font-size: 13px; font-weight: 700; color: var(--text-strong); }
.tr-toolbar { margin-top: 4px; }
.tr-grid-wrap { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); overflow: auto; max-height: 72vh; }
.tr-grid { display: table; width: 100%; border-collapse: collapse; }
.tr-row { display: table-row; }
.tr-row > * { display: table-cell; vertical-align: top; border-top: 1px solid var(--border); }
.tr-row.head > * { position: sticky; top: 0; z-index: 2; border-top: 0; background: var(--surface-2); padding: 10px 12px; font-size: 13px; font-weight: 650; color: var(--text-strong); white-space: nowrap; box-shadow: inset 0 -1px 0 var(--border); }
.tr-row:nth-child(odd):not(.head) > * { background: var(--zebra); }
.tr-row.tr-done > * { opacity: 0.55; }
.tr-key { position: sticky; left: 0; z-index: 1; min-width: 210px; max-width: 280px; padding: 10px 12px; background: var(--surface); box-shadow: inset -1px 0 0 var(--border); }
.tr-row.head .tr-key { z-index: 3; }
.tr-key .key-name { display: block; }
.tr-key .key-desc { display: block; white-space: normal; }
.tr-key .pill { margin-top: 3px; }
.tr-key-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.tr-head-cell .lang-code { margin-right: 6px; }
.tr-head-cell .pill { margin-left: 6px; }
.tr-cell { display: table-cell; min-width: 220px; padding: 10px 12px; background: var(--surface); text-align: left; cursor: text; outline: none; transition: background-color 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.tr-cell:hover { background: var(--accent-weak) !important; }
.tr-cell:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.tr-cell.missing { background: color-mix(in srgb, var(--warn) 6%, var(--surface)) !important; }
.tr-cell.saved { box-shadow: inset 3px 0 0 var(--ok); }
.tr-text { display: block; color: var(--text-strong); line-height: 1.5; white-space: pre-wrap; }
.tr-missing { display: inline-flex; align-items: center; gap: 5px; color: var(--warn); font-weight: 600; font-size: 13px; }
.tr-forms { display: flex; flex-direction: column; gap: 2px; }
.tr-form { display: grid; grid-template-columns: 44px 1fr; gap: 6px; }
.tr-form .form-name { padding-top: 0; font-size: 11.5px; }
.tr-cell .tr-problem { margin-top: 6px; }
.tr-input { width: 100%; min-height: 36px; padding: 6px 8px; font-size: 14.5px; resize: none; border-color: var(--accent); box-shadow: var(--ring); }
.tr-plural { display: flex; flex-direction: column; gap: 8px; min-width: 300px; padding: 6px; }
.tr-plural-head { margin-bottom: 2px; }
.menu-item { width: 100%; justify-content: flex-start; height: 34px; border: 0; background: transparent; font-weight: 500; padding: 0 10px; }
.menu-item:hover { background: var(--hover); }
.checks { display: flex; gap: 14px; }
.checks.wrap { flex-wrap: wrap; gap: 10px 16px; }

/* export and import */
.format-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.format-card { height: auto; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; text-align: left; white-space: normal; font-weight: 500; border-radius: var(--radius-lg); }
.format-card strong { color: var(--text-strong); }
.format-card.on { background: var(--accent-weak); border-color: var(--accent); box-shadow: var(--ring); }
.format-ext { font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: var(--accent); }
.export-options { display: flex; flex-direction: column; }
.dropzone { width: 100%; height: auto; flex-direction: column; gap: 6px; padding: 34px 20px; border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface-2); color: var(--muted); white-space: normal; text-align: center; }
.dropzone strong { color: var(--text-strong); font-size: 15px; }
.dropzone .icon { color: var(--accent); }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-weak); }
.import-body { display: flex; flex-direction: column; gap: 12px; }
.import-file { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); }
.import-file .small.subtle { margin-left: auto; }
.import-choosers select { min-height: 32px; padding: 3px 28px 3px 10px; }
.import-counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.import-count { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.import-count strong { font-size: 22px; font-weight: 800; color: var(--text-strong); }
.import-count.ok strong { color: var(--ok); }
.import-count.accent strong { color: var(--accent); }
.import-count.warn strong { color: var(--warn); }
.import-changes { max-height: 42vh; overflow: auto; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.import-change { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-top: 1px solid var(--border); }
.import-change:first-child { border-top: 0; }
.import-change:nth-child(even) { background: var(--zebra); }
.import-langs { width: 100%; display: flex; flex-direction: column; gap: 3px; }
.import-lang { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; }
.import-lang q.old { color: var(--subtle); text-decoration: line-through; }
.import-skipped summary { cursor: pointer; color: var(--warn); font-weight: 600; }

@media (max-width: 760px) {
  .import-counts { grid-template-columns: repeat(2, 1fr); }
  .tr-key { min-width: 150px; }
  .tr-cell { min-width: 170px; }
}

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text-strong); color: var(--bg); padding: 11px 18px; border-radius: var(--radius-lg); font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); z-index: 100; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast[data-kind="error"] { background: var(--danger); color: #FFFFFF; }

@media (max-width: 1180px) {
  /* Room for the fixed-width tabs: the logo without its name, Guide and API as icons. */
  .topbar:has(.tabs a) .brand-name { display: none; }
  .guide-link span { display: none; }
  .guide-link { padding: 0 10px; }
}

@media (max-width: 1100px) {
  .key-list.rows { --key-cols: 30px min(var(--col-key), 45%) minmax(120px, 1fr) min(var(--col-status), 24%); }
  .key-row .key-tags, .key-head-tags { display: none; }
}

@media (max-width: 900px) {
  .key-editor { grid-template-columns: 1fr; }
  .key-editor-aside { position: static; border-left: 0; padding: 16px 0 0; border-top: 1px solid var(--border); }
  .key-editor.create .key-editor-aside { order: -1; border-top: 0; padding-top: 0; }
  .key-editor.create .type-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .guide { grid-template-columns: 1fr; }
  .guide-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .guide-nav h3 { display: none; }
}

@media (max-width: 760px) {
  .topbar { gap: 6px; padding: 0 12px; }
  .topbar-actions button.cta, .topbar-actions button.primary { padding: 0 10px; }
  .brand-name { display: none; }
  .topbar:has(.tabs a) .brand { display: none; }
  .tabs { overflow-x: auto; scrollbar-width: none; gap: 0; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a, .tabs a:not(.app-name) { width: auto; padding: 0 8px; }
  .publish-button { width: auto; }
  .topbar-actions .guide-link { display: none; } /* Guide and API docs are in the account menu */
  .tabs .app-name { font-size: 0; margin-right: 0; flex: none; }
  .guide-link span { display: none; }
  .topbar-actions { gap: 6px; }
  .main { padding: 18px 14px 60px; }
  .toolbar-end { margin-left: 0; }
  .key-list.rows { --key-cols: 30px minmax(0, 1fr) auto; }
  .key-head { display: none; }
  .key-row .key-status { grid-column: 3; grid-row: 1; align-self: start; align-items: flex-end; }
  .key-value { grid-column: 2 / -1; justify-content: flex-start; }
  /* On phones the rules hang under the value, since the value sits between the icon and them. */
  .key-row .key-rules { grid-column: 2 / -1; display: flex; flex-direction: column; }
  .key-row .key-rule { --band-from: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding-left: 20px; }
  .key-row .key-rule::before, .key-row .key-rule::after { left: 3px; }
  .key-row .key-rule::before { width: 12px; }
  .key-row .key-rule .key-rule-who::after { display: none; }
  .key-row .key-rule:first-child::before { top: -5px; height: 19px; }
  .env-cards, .two-columns, .env-choices { grid-template-columns: 1fr; }
  .lang-row { grid-template-columns: 1fr; }
  .image-slot { grid-template-columns: 44px 1fr; }
  .image-actions { grid-column: 1 / -1; }
  .release-row { grid-template-columns: 48px 1fr; }
  .person-row { grid-template-columns: 34px 1fr; }
  .cond-row { grid-template-columns: 1fr; gap: 4px; }
  .backdrop { padding: 10px; }
  .dialog { padding: 16px 18px; }
  .guide-body { padding: 22px 20px; }
}

/* ---------- AI access ---------- */
.pill.ai { background: var(--ai-weak); color: var(--ai); }
.feed-row .pill.ai { margin: 0 6px; height: 20px; font-size: 11.5px; vertical-align: 1px; }
.api-key-icon.ai { background: var(--ai-weak); color: var(--ai); }
.ai-page .page-head p { max-width: 560px; }
.ai-list { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ai-list li { display: flex; align-items: flex-start; gap: 10px; line-height: 1.5; }
.ai-list li .icon { flex: none; margin-top: 3px; color: var(--accent); }
.ai-list li.yes .icon { color: var(--ok); }
.ai-list li.no .icon { color: var(--danger); }
.ai-steps { gap: 26px; margin-top: 16px; }
.ai-step > p { margin: 2px 0 10px; }
.ai-step > .code-tabs { flex-wrap: wrap; margin: 4px 0 2px; }
.ai-step .api-key-list { margin-top: 14px; }
.ai-step .hint { margin-top: 8px; }
.ai-copy { margin: 8px 0 4px; }
.ai-copy code { font-family: var(--mono); font-size: 13px; line-height: 1.55; word-break: normal; overflow-wrap: anywhere; }
.ai-substeps { margin: 8px 0 0; padding-left: 20px; color: var(--muted); font-size: 14px; display: flex; flex-direction: column; gap: 3px; }
.ai-examples { display: flex; flex-direction: column; gap: 6px; }
.ai-examples .ai-copy { margin: 0; }
.ai-copy.prompt code { font-family: var(--font); font-size: 14px; }
.ai-copy.prompt code::before { content: "“"; color: var(--subtle); }
.ai-copy.prompt code::after { content: "”"; color: var(--subtle); }
.ai-safety .ai-list li .icon { color: var(--subtle); }
.choice-group { border: 0; padding: 0; margin: 16px 0; display: flex; flex-direction: column; gap: 8px; }
.choice-group legend { padding: 0; margin-bottom: 6px; font-weight: 600; font-size: 13.5px; color: var(--text-strong); }
.choice-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.choice-row:hover { background: var(--hover); }
.choice-row:has(input:checked) { border-color: var(--accent-border); background: var(--accent-weak); }
.choice-row input { width: 16px; height: 16px; min-height: 0; margin: 3px 0 0; accent-color: var(--accent); flex: none; }
