/* ═══════════════════════════════════════════════════════════════════════════
   CarrySafe Partner Portal — enterprise shell
   ═══════════════════════════════════════════════════════════════════════════
   Palette and information architecture are taken from design/portal-kit.js
   (P.C, P.NAV.platform, P.TITLES), not invented here. The five nav groups —
   Operations, Accounts, Network, Coverage, Platform — are the design's own.

   The old layout was a single 980px column of stacked cards. That is a
   reading layout, and this is an operating tool: a fixed sidebar, a sticky
   context bar and full-bleed dense workspaces replace it. Nothing scrolls the
   page that should scroll a pane.
   ────────────────────────────────────────────────────────────────────────── */

/* The hidden attribute always wins. Without this, any element whose class
   sets a display value (display: flex on a banner, inline-flex on a button)
   silently overrides the user-agent [hidden] rule and paints anyway. */
[hidden] { display: none !important; }

:root {
  --cs-bg:     #080D18;
  --cs-field:  #080D18;
  --cs-panel:  #0B1120;
  --cs-line:   #34415C;
  --cs-line2:  #202A40;
  --cs-edge:   #52617E;
  --cs-ink:    #F2F5FA;
  --cs-ink2:   #C3CCDE;
  --cs-ink3:   #9AA6BF;
  --cs-ink4:   #8D9AB7;
  --cs-ink5:   #7C89A7;
  --cs-blue:   #4F8DF7;
  --cs-blueHi: #7FA9F9;
  --cs-green:  #3FB984;
  --cs-amber:  #E2A33C;
  --cs-red:    #E25A5A;
  --cs-violet: #8C7BF0;
  --cs-chip:   #131B2D;
  --cs-rail:   248px;
}

html, body { background: var(--cs-bg); color: var(--cs-ink); }
html { color-scheme: dark; }
body {
  margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  /* The app's own stack. Without this the page fell back to the UA serif,
     which is the single loudest way a tool can look unfinished. */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
               "Segoe UI", Roboto, "Helvetica Neue", system-ui, sans-serif;
  font-size: 14px; line-height: 1.5;
}
input, textarea, select, button { font-family: inherit; }

/* The portal is keyboard-operable before any view-specific styling loads.
   Keep the ring outside controls so it survives dark filled buttons as well
   as quiet ones, and make it independent of the browser's mouse heuristic. */
:focus-visible {
  outline: 3px solid var(--cs-blueHi) !important;
  outline-offset: 3px !important;
}

.skip-link {
  position: fixed; top: 10px; left: 12px; z-index: 200;
  min-height: 44px; display: inline-flex; align-items: center;
  padding: 0 16px; border: 1px solid var(--cs-blueHi); border-radius: 8px;
  background: var(--cs-panel); color: var(--cs-ink); font-weight: 700;
  text-decoration: none; transform: translateY(calc(-100% - 18px));
  transition: transform .14s ease;
}
.skip-link:focus-visible { transform: translateY(0); }

.sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important;
  border: 0 !important;
}
.sr-only:focus, .sr-only:active {
  position: static !important; width: auto !important; height: auto !important;
  margin: 0 !important; overflow: visible !important; clip: auto !important;
  white-space: normal !important;
}

/* ── app frame ───────────────────────────────────────────────────────────── */
.app-shell { display: grid; grid-template-columns: var(--cs-rail) 1fr; min-height: 100vh; }
.app-shell.is-collapsed { --cs-rail: 62px; }

/* ── rail ────────────────────────────────────────────────────────────────── */
.rail {
  position: sticky; top: 0; height: 100vh; overflow: hidden auto;
  background: var(--cs-panel); border-right: 1px solid var(--cs-line);
  display: flex; flex-direction: column; scrollbar-width: thin;
}
.rail::-webkit-scrollbar { width: 7px; }
.rail::-webkit-scrollbar-thumb { background: var(--cs-line); border-radius: 4px; }

.rail-top { display: flex; align-items: center; gap: 9px; padding: 15px 14px 13px; border-bottom: 1px solid var(--cs-line2); }
.rail-mark { min-width: 0; display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 800; letter-spacing: -0.3px; color: var(--cs-ink); white-space: nowrap; text-decoration: none; }
.rail-mark > img { width: 32px; height: 32px; flex: none; object-fit: contain; border-radius: 22%; }
.rail-brand-word { overflow: hidden; text-overflow: ellipsis; }
.rail-brand-word span { color: var(--cs-blue); }
.rail-toggle {
  margin-left: auto; width: 26px; height: 26px; flex: none; cursor: pointer;
  display: grid; place-items: center; font: inherit; font-size: 13px;
  background: transparent; color: var(--cs-ink4); border: 1px solid var(--cs-line); border-radius: 7px;
}
.rail-toggle:hover { color: var(--cs-ink); border-color: var(--cs-edge); }
.is-collapsed .rail-brand-word { display: none; }
.is-collapsed .rail-top { padding: 15px 0 13px 16px; }

.rail-nav { padding: 10px 8px 18px; flex: 1; }
.rail-group {
  margin: 14px 0 5px; padding: 0 8px; font-size: 10px; font-weight: 700;
  letter-spacing: 1.1px; text-transform: uppercase; color: var(--cs-ink5);
}
.is-collapsed .rail-group { height: 1px; margin: 12px 10px; padding: 0; background: var(--cs-line2); font-size: 0; overflow: hidden; }

.rail-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 9px; margin-bottom: 1px; border-radius: 8px;
  font: inherit; font-size: 13.5px; text-align: left; text-decoration: none;
  color: var(--cs-ink3); background: transparent; border: 0; cursor: pointer;
}
.rail-item:hover { background: var(--cs-line2); color: var(--cs-ink); }
.rail-item.is-on { background: color-mix(in srgb, var(--cs-blue) 13%, transparent); color: var(--cs-ink); }
.rail-item.is-on .rail-ico { color: var(--cs-blue); }
.rail-ico { width: 17px; flex: none; text-align: center; font-size: 14px; color: var(--cs-ink4); }
.rail-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-badge {
  flex: none; font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 999px;
  background: var(--cs-chip); color: var(--cs-ink3); border: 1px solid var(--cs-line);
}
.rail-badge.is-hot { background: color-mix(in srgb, var(--cs-blue) 20%, transparent); color: var(--cs-blueHi); border-color: transparent; }
.rail-item.is-soon { opacity: .42; cursor: default; }
.rail-item.is-soon:hover { background: transparent; color: var(--cs-ink3); }
.is-collapsed .rail-label, .is-collapsed .rail-badge { display: none; }
.is-collapsed .rail-item { justify-content: center; padding: 9px 0; }

.rail-foot { padding: 11px 12px; border-top: 1px solid var(--cs-line2); }
.rail-seat { display: flex; align-items: center; gap: 9px; min-width: 0; }
.rail-av {
  width: 28px; height: 28px; flex: none; border-radius: 999px; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; color: #08101F;
  background: var(--cs-blueHi); border: 1px solid var(--cs-blue);
}
.rail-who { min-width: 0; flex: 1; }
.rail-who b { display: block; font-size: 12px; font-weight: 600; color: var(--cs-ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-who span { display: block; font-size: 10.5px; color: var(--cs-ink5); }
.is-collapsed .rail-who, .is-collapsed .rail-out { display: none; }
.rail-out {
  margin-top: 9px; width: 100%; padding: 6px; cursor: pointer; font: inherit; font-size: 12px;
  background: transparent; color: var(--cs-ink4); border: 1px solid var(--cs-line); border-radius: 7px;
}
.rail-out:hover { color: var(--cs-ink); border-color: var(--cs-edge); }

/* ── work area ───────────────────────────────────────────────────────────── */
/* min-height so the column has a height to divide, and work-body flexes into
   whatever the sticky context bar leaves. That is what lets .ws use height:100%
   instead of guessing the bar's pixel height. */
.work { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.work-body { flex: 1; min-height: 0; }

/* A flush workspace — the map editor and geo studio — scrolls its own panes,
   so the column is pinned to the viewport and .ws fills exactly what the
   context bar leaves. Without this, `height: 100%` resolves against a parent
   that only has min-height, falls back to content height, and the grid grew
   to 3917px. Scoped with :has so ordinary scrolling views are untouched. */
.work:has(> .work-body.is-flush) { height: 100vh; }

/* The rail already has its own collapse control. This is the MOBILE opener,
   and it was rendering next to it at every width — two hamburgers side by
   side, one of which did nothing visible on desktop. */
#railmob { display: none; }
@media (max-width: 860px) { #railmob { display: grid; } }
.ctx {
  position: sticky; top: 0; z-index: 12; display: flex; align-items: center; gap: 14px;
  padding: 13px 22px; background: color-mix(in srgb, var(--cs-bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--cs-line);
}
.ctx-h { min-width: 0; flex: 1; }
.ctx-h h1 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }
.ctx-h p { margin: 2px 0 0; font-size: 12px; color: var(--cs-ink4); }
.ctx-a { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.work-body { padding: 20px 22px 60px; min-width: 0; }
.work-body.is-flush { padding: 0; }

@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .rail { position: fixed; inset: 0 auto 0 0; width: 240px; z-index: 40; transform: translateX(-100%); transition: transform .22s ease; }
  .app-shell.is-open .rail { transform: none; box-shadow: 24px 0 60px rgba(0,0,0,.5); }
  .work-body { padding: 16px 14px 60px; }
  .ctx { padding: 11px 14px; }
}
@media (max-width: 620px) {
  .ctx {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }
  #railmob { grid-column: 1; grid-row: 1; }
  .ctx-h { grid-column: 2; grid-row: 1; }
  .ctx-h p { max-width: 34ch; }
  .ctx-a { grid-column: 1 / -1; grid-row: 2; width: 100%; min-width: 0; }
  .ctx-a:empty { display: none; }
  #palbtn { grid-column: 3; grid-row: 1; }
}
.rail-scrim { display: none; }
@media (max-width: 860px) {
  .app-shell.is-open .rail-scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(4,7,14,.6); }
  .rail-mark { min-height: 44px; display: inline-flex; align-items: center; }
}

/* ── surfaces ────────────────────────────────────────────────────────────── */
.panel { background: var(--cs-panel); border: 1px solid var(--cs-line); border-radius: 12px; }
.panel + .panel { margin-top: 14px; }
.panel-h { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--cs-line2); }
.panel-h h2 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: -0.2px; }
.panel-h .sub { font-size: 11.5px; color: var(--cs-ink5); }
.panel-h .spacer { flex: 1; }
.panel-b { padding: 16px; }
.panel-b.is-flush { padding: 0; }

.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 12px; }
.metric { background: var(--cs-panel); border: 1px solid var(--cs-line); border-radius: 12px; padding: 14px 16px; }
.metric b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -0.6px; line-height: 1.1; }
.metric span { display: block; margin-top: 3px; font-size: 11.5px; color: var(--cs-ink4); }
.metric i { font-style: normal; font-size: 11px; color: var(--cs-ink5); }

/* ── dense table ─────────────────────────────────────────────────────────── */
.dt { width: 100%; border-collapse: collapse; font-size: 13px; }
.dt thead th {
  position: sticky; top: 0; z-index: 2; text-align: left; padding: 9px 14px;
  background: var(--cs-panel); border-bottom: 1px solid var(--cs-line);
  font-size: 10.5px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--cs-ink5);
}
.dt tbody td { padding: 10px 14px; border-bottom: 1px solid var(--cs-line2); vertical-align: middle; }
.dt tbody tr:hover { background: color-mix(in srgb, var(--cs-blue) 5%, transparent); }
.dt tbody tr:last-child td { border-bottom: 0; }
.dt .num { text-align: right; white-space: nowrap; color: var(--cs-ink3); }
.dt .sub { display: block; font-size: 11px; color: var(--cs-ink5); margin-top: 1px; }
.dt .acts { text-align: right; white-space: nowrap; }
.dt .empty { padding: 34px 14px; text-align: center; color: var(--cs-ink5); }
.tscroll { overflow: auto; max-height: 68vh; }

/* ── atoms ───────────────────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  background: var(--cs-chip); color: var(--cs-ink3); border: 1px solid var(--cs-line);
}
.pill--blue   { color: var(--cs-blueHi); border-color: color-mix(in srgb, var(--cs-blue) 42%, transparent); background: color-mix(in srgb, var(--cs-blue) 13%, transparent); }
.pill--green  { color: var(--cs-green);  border-color: color-mix(in srgb, var(--cs-green) 42%, transparent); background: color-mix(in srgb, var(--cs-green) 12%, transparent); }
.pill--amber  { color: var(--cs-amber);  border-color: color-mix(in srgb, var(--cs-amber) 42%, transparent); background: color-mix(in srgb, var(--cs-amber) 12%, transparent); }
.pill--red    { color: var(--cs-red);    border-color: color-mix(in srgb, var(--cs-red) 42%, transparent);   background: color-mix(in srgb, var(--cs-red) 12%, transparent); }
.pill--violet { color: var(--cs-violet); border-color: color-mix(in srgb, var(--cs-violet) 42%, transparent); background: color-mix(in srgb, var(--cs-violet) 12%, transparent); }

.b {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font: inherit;
  font-size: 12.5px; font-weight: 600; padding: 7px 14px; border-radius: 8px;
  background: var(--cs-blue); color: #08101F; border: 1px solid transparent; white-space: nowrap;
}
.b:hover { background: var(--cs-blueHi); }
.b:disabled { opacity: .4; cursor: not-allowed; }
.b--ghost { background: transparent; color: var(--cs-ink2); border-color: var(--cs-line); }
.b--ghost:hover { background: var(--cs-line2); color: var(--cs-ink); border-color: var(--cs-edge); }
.b--danger { background: transparent; color: var(--cs-red); border-color: color-mix(in srgb, var(--cs-red) 40%, transparent); }
.b--danger:hover { background: color-mix(in srgb, var(--cs-red) 13%, transparent); }
.b--sm { padding: 5px 10px; font-size: 11.5px; }

.fld {
  width: 100%; background: var(--cs-field); color: var(--cs-ink); font: inherit; font-size: 13px;
  border: 1px solid var(--cs-line); border-radius: 8px; padding: 8px 11px;
}
.fld:focus { outline: none; border-color: var(--cs-blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cs-blue) 18%, transparent); }
.lbl { display: grid; gap: 5px; font-size: 11.5px; color: var(--cs-ink4); }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.formgrid .wide { grid-column: 1 / -1; }

.seg { display: inline-flex; padding: 2px; gap: 2px; background: var(--cs-line2); border-radius: 9px; }
.seg button {
  font: inherit; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 7px;
  background: transparent; color: var(--cs-ink4); border: 0; cursor: pointer;
}
.seg button.is-on { background: var(--cs-panel); color: var(--cs-ink); box-shadow: 0 1px 3px rgba(0,0,0,.4); }

.note2 { border-radius: 10px; padding: 12px 14px; font-size: 12.5px; line-height: 1.6; }
.note2 b { display: block; margin-bottom: 3px; font-size: 12.5px; }
.note2--info { background: color-mix(in srgb, var(--cs-blue) 9%, transparent); border: 1px solid color-mix(in srgb, var(--cs-blue) 32%, transparent); color: var(--cs-ink2); }
.note2--warn { background: color-mix(in srgb, var(--cs-amber) 9%, transparent); border: 1px solid color-mix(in srgb, var(--cs-amber) 32%, transparent); color: var(--cs-ink2); }
.note2--err  { background: color-mix(in srgb, var(--cs-red) 9%, transparent);   border: 1px solid color-mix(in srgb, var(--cs-red) 32%, transparent);   color: var(--cs-ink2); }
.note2 .mono { color: var(--cs-ink); }

.mono { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace; font-size: 11.5px; }
.muted { color: var(--cs-ink4); }
.faint { color: var(--cs-ink5); font-size: 11.5px; }
.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── Map & Law Studio ──────────────────────────────────────────────────────
   The approved workspace is an operating surface: a quiet data browser, the
   largest possible live map, a dense evidence inspector, and one truthful
   status rail. Every pane owns its scrolling so the map never jumps. */
.ws {
  display: grid;
  grid-template-columns: clamp(248px, 19vw, 320px) minmax(460px, 1fr) clamp(330px, 25vw, 420px);
  grid-template-rows: minmax(0, 1fr) 36px;
  height: 100%; min-height: 0; overflow: hidden; background: #08101d;
}
.ws-col { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: color-mix(in srgb, var(--cs-panel) 96%, #08101d); border-right: 1px solid var(--cs-line2); }
.studio-inspector { border-right: 0; border-left: 1px solid var(--cs-line2); }
.ws-head { padding: 13px 14px 11px; border-bottom: 1px solid var(--cs-line2); display: grid; gap: 9px; }
.studio-search { display: grid; gap: 6px; color: var(--cs-ink2); font-size: 11.5px; font-weight: 700; }
.studio-search input { min-height: 39px; padding-left: 12px; background: #0a1425; }
.ws-scroll { overflow: auto; flex: 1; padding: 0; scrollbar-width: thin; }
.ws-scroll::-webkit-scrollbar { width: 7px; }
.ws-scroll::-webkit-scrollbar-thumb { background: var(--cs-line); border-radius: 4px; }
.studio-section { padding: 14px; border-bottom: 1px solid var(--cs-line2); }
.studio-section-head { min-height: 26px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.studio-section-head h2 { margin: 0; color: var(--cs-ink2); font-size: 12px; letter-spacing: -.1px; }
.studio-section-head a { color: var(--cs-blueHi); font-size: 10.5px; text-decoration: none; }
.tree-row { width: 100%; min-height: 44px; display: grid; grid-template-columns: 16px minmax(0,1fr) auto; align-items: center; gap: 6px; padding: 7px 8px; border: 0; border-radius: 7px; background: transparent; color: var(--cs-ink3); text-align: left; cursor: pointer; }
.tree-row:hover { background: var(--cs-line2); color: var(--cs-ink); }
.tree-row.is-on { background: color-mix(in srgb, var(--cs-blue) 18%, transparent); color: var(--cs-blueHi); }
.tree-row b { overflow: hidden; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.tree-row small { color: var(--cs-ink5); font-size: 9.5px; text-transform: capitalize; }
.layer-catalog { display: grid; gap: 3px; }
.layer-row { width: 100%; min-height: 44px; display: grid; grid-template-columns: 10px minmax(0,1fr) 18px; gap: 9px; align-items: center; padding: 6px 7px; border: 0; border-radius: 7px; background: transparent; color: var(--cs-ink4); text-align: left; cursor: pointer; }
.layer-row:not(.is-on) i, .layer-row:not(.is-on) strong { opacity: .38; }
.layer-row:hover:not(.is-static) { background: var(--cs-line2); }
.layer-row i { width: 9px; height: 9px; border-radius: 2px; background: var(--cs-blue); }
.layer-row i[data-color="cyan"] { background: #2CB8D5; }
.layer-row i[data-color="violet"] { background: var(--cs-violet); }
.layer-row i[data-color="pink"] { background: #EC4899; }
.layer-row span, .layer-row b, .layer-row small { min-width: 0; display: block; }
.layer-row b { color: var(--cs-ink2); font-size: 11px; }
.layer-row small { color: var(--cs-ink5); font-size: 9.5px; }
.layer-row strong { color: var(--cs-blueHi); font-size: 11px; }
.ws-map { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #07101d; }
#mbx { position: absolute; inset: 0; }
.map-mode, .ws-float, .map-tools, .map-readout { position: absolute; z-index: 5; border: 1px solid color-mix(in srgb, var(--cs-edge) 76%, transparent); background: color-mix(in srgb, #091426 87%, transparent); box-shadow: 0 12px 32px rgba(0,0,0,.22); backdrop-filter: blur(14px) saturate(130%); }
.map-mode { top: 13px; left: 13px; min-height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 13px; border-radius: 8px; color: var(--cs-ink2); font-size: 11px; }
.map-mode i { width: 9px; height: 9px; border-radius: 2px; background: #EC4899; box-shadow: 0 0 14px rgba(236,72,153,.6); }
.map-tools { top: 64px; left: 13px; display: grid; padding: 4px; border-radius: 8px; }
.map-tools button { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-bottom: 1px solid var(--cs-line2); background: transparent; color: var(--cs-ink3); cursor: pointer; font-size: 17px; }
.map-tools button:last-child { border-bottom: 0; }
.map-tools button:hover, .map-tools button.is-on { border-radius: 5px; background: color-mix(in srgb, var(--cs-blue) 26%, transparent); color: #fff; }
.ws-float { display: flex; gap: 7px; flex-wrap: wrap; border-radius: 9px; padding: 6px; }
.map-basemap { left: 13px; bottom: 14px; }
.map-readout { right: 13px; bottom: 14px; min-height: 39px; display: flex; align-items: center; gap: 14px; padding: 0 12px; border-radius: 8px; color: var(--cs-ink3); font: 10.5px/1.2 ui-monospace, "SF Mono", monospace; }
.map-readout span { color: var(--cs-blueHi); }
.studio-status { grid-column: 1 / -1; min-width: 0; display: flex; align-items: center; gap: 26px; padding: 0 14px; border-top: 1px solid var(--cs-line2); background: #08101c; color: var(--cs-ink5); font-size: 10px; }
.studio-status span:first-child { color: var(--cs-ink3); }
.studio-status i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--cs-green); box-shadow: 0 0 8px rgba(63,185,132,.5); }
.studio-status .is-warning i { background: var(--cs-amber); box-shadow: 0 0 8px color-mix(in srgb,var(--cs-amber) 60%,transparent); }
.studio-status .is-error i { background: var(--cs-red); box-shadow: 0 0 8px color-mix(in srgb,var(--cs-red) 60%,transparent); }
.studio-status a { margin-left: auto; color: var(--cs-ink4); text-decoration: none; }
@media (max-width: 1320px) {
  .ws { grid-template-columns: minmax(220px, 26vw) minmax(420px, 1fr); grid-template-rows: minmax(420px, 1fr) minmax(280px, 42vh) 36px; overflow: auto; }
  .studio-inspector { grid-column: 1 / -1; grid-row: 2; border-left: 0; border-top: 1px solid var(--cs-line2); }
  .studio-status { grid-row: 3; }
}
@media (max-width: 900px) {
  .ws { display: block; height: auto; overflow: visible; }
  .studio-browser, .studio-inspector { max-height: none; }
  .ws-map { height: 58vh; min-height: 440px; }
  .studio-status { min-height: 42px; overflow-x: auto; white-space: nowrap; }
  .map-basemap { bottom: 64px; }
  .map-readout { left: 13px; right: 13px; bottom: 13px; justify-content: space-between; overflow: hidden; }
  .map-readout output { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

.hit {
  display: block; width: 100%; text-align: left; font: inherit; cursor: pointer; margin-bottom: 6px;
  background: transparent; color: var(--cs-ink2); border: 1px solid var(--cs-line); border-radius: 9px; padding: 8px 11px;
}
.hit:hover { border-color: color-mix(in srgb, var(--cs-blue) 48%, transparent); background: color-mix(in srgb, var(--cs-blue) 7%, transparent); }
.hit.is-on { border-color: var(--cs-blue); background: color-mix(in srgb, var(--cs-blue) 12%, transparent); }
.hit b { display: block; font-size: 13px; color: var(--cs-ink); }
.hit span { display: block; font-size: 11px; color: var(--cs-ink5); margin-top: 1px; }

.acc { border: 1px solid var(--cs-line); border-radius: 10px; margin-bottom: 9px; overflow: hidden; }
.acc > summary { cursor: pointer; padding: 10px 13px; font-size: 12.5px; font-weight: 600; color: var(--cs-ink2); list-style: none; display: flex; align-items: center; gap: 8px; }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::before { content: "▸"; color: var(--cs-ink5); font-size: 10px; transition: transform .15s ease; }
.acc[open] > summary::before { transform: rotate(90deg); }
.acc[open] > summary { border-bottom: 1px solid var(--cs-line2); color: var(--cs-ink); }
.acc-b { padding: 13px; }

.prop { border: 1px solid var(--cs-line); border-radius: 10px; padding: 11px 13px; margin-bottom: 9px; background: var(--cs-panel); }
.prop-h { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12.5px; }
.diff { margin-top: 8px; border-radius: 8px; overflow: hidden; border: 1px solid var(--cs-line2); }
.diff-r { display: grid; grid-template-columns: minmax(90px, 34%) 1fr; gap: 0; font-size: 11.5px; border-bottom: 1px solid var(--cs-line2); }
.diff-r:last-child { border-bottom: 0; }
.diff-k { padding: 6px 9px; background: var(--cs-line2); color: var(--cs-ink4); }
.diff-v { padding: 6px 9px; color: var(--cs-green); overflow-wrap: anywhere; }
.prop-a { margin-top: 10px; display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }

/* ── auth (unchanged surface, restyled) ──────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 400px; box-sizing: border-box; background: var(--cs-panel); border: 1px solid var(--cs-line); border-radius: 16px; padding: 30px 28px; }
.auth-card :is(h1, h2) { margin: 0 0 6px; font-size: 21px; letter-spacing: -0.4px; }
.auth-mark { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; letter-spacing: -0.3px; margin-bottom: 20px; }
.auth-mark > img { width: 36px; height: 36px; flex: none; object-fit: contain; border-radius: 22%; }
.auth-mark-word > span { color: var(--cs-blue); }

/* ── premium auth stage ────────────────────────────────────────────────────
   The original auth-wrap/auth-card pair remains valid. These classes add an
   optional institutional brand side without changing form behaviour. */
.auth-stage {
  height: 100vh; height: 100dvh; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(400px, .92fr);
  /* One explicit row pinned to the container. Without it the implicit row is
     max-content: it grows to the tallest panel's natural height and the
     overflow clip eats the bottom — the panel never even knows. */
  grid-template-rows: minmax(0, 1fr);
  background: var(--cs-bg);
}
.auth-stage .auth-wrap {
  min-width: 0; padding: clamp(16px, 2.4vh, 40px) clamp(20px, 3vw, 56px);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(10px, 1.8vh, 18px);
}
.auth-stage .auth-card {
  max-width: 440px; border-color: var(--cs-edge); padding: clamp(22px, 3vh, 30px) clamp(24px, 3.5vw, 36px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .36);
  position: relative; z-index: 1; flex: none;
  /* ONE size for every view. The tallest state (the five-door kind picker)
     sets the frame; shorter steps get calm space instead of a card that
     jumps sizes on every click. Small viewports clamp and scroll INSIDE. */
  height: min(640px, calc(100dvh - 32px));
  display: flex; flex-direction: column;
  overflow: hidden;
  background: color-mix(in srgb, var(--cs-panel) 92%, transparent);
  backdrop-filter: blur(6px);
}
.auth-mark { flex: none; }
.auth-card #auth-body { flex: 1 1 auto; min-height: 0; overflow: auto; scrollbar-width: thin; padding-right: 2px; }
.auth-brand {
  min-width: 0; padding: clamp(20px, 3.2vh, 56px) clamp(28px, 4.5vw, 84px);
  /* A rigid three-row grid: lockup / hero / ads. The middle row absorbs all
     spare height (and clips first when there is none), so the ads row is
     INSIDE the panel by construction — a flex column with space-between let
     content push past the edge and the overflow clip ate the ads. */
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(12px, 2.2vh, 32px); overflow: hidden;
  background: var(--cs-panel); border-right: 1px solid var(--cs-line);
  box-shadow: inset 4px 0 0 var(--cs-blue);
}
.auth-brand-lockup {
  display: inline-flex; align-items: center; gap: 12px; width: fit-content;
  color: var(--cs-ink); font-size: 18px; font-weight: 800;
  letter-spacing: -.35px; text-decoration: none;
}
.auth-brand-lockup > img {
  width: 42px; height: 42px; flex: none; object-fit: contain;
  border-radius: 22%; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .28));
}
.auth-hero { width: min(100%, 680px); align-self: center; min-height: 0; overflow: hidden; }
.auth-hero h1 {
  max-width: 16ch; margin: 0; color: var(--cs-ink);
  font-size: clamp(23px, 1.5vw + 2vh, 42px); line-height: 1.06;
  letter-spacing: clamp(-2.6px, -.06em, -1px); font-weight: 760;
}
.auth-hero p {
  max-width: 58ch; margin: clamp(8px, 1.4vh, 16px) 0 0; color: var(--cs-ink3);
  font-size: clamp(12.5px, 1vw, 15px); line-height: 1.58;
}
.auth-trust {
  width: min(100%, 680px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--cs-line); border-radius: 12px; overflow: hidden;
  background: var(--cs-bg);
}
.auth-trust-row {
  min-width: 0; min-height: 76px; padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 10px; color: var(--cs-ink3);
  font-size: 12px; line-height: 1.45;
}
.auth-trust-row + .auth-trust-row { border-left: 1px solid var(--cs-line); }
.auth-trust-row::before {
  content: ""; width: 8px; height: 8px; margin-top: 5px; flex: none;
  border-radius: 999px; background: var(--cs-green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cs-green) 18%, transparent);
}
.auth-trust-row b { display: block; margin-bottom: 2px; color: var(--cs-ink); font-size: 12.5px; }

/* ── owner overview ──────────────────────────────────────────────────────── */
.ov-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px; align-items: start;
}
.ov-main, .ov-side { min-width: 0; display: grid; gap: 14px; }
.ov-side { position: sticky; top: 76px; }

.attention-list {
  overflow: hidden; background: var(--cs-panel);
  border: 1px solid var(--cs-line); border-radius: 12px;
}
.attention-row {
  min-width: 0; min-height: 72px; display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 12px; padding: 12px 14px;
  color: inherit; text-decoration: none;
  border-bottom: 1px solid var(--cs-line2);
}
.attention-row:last-child { border-bottom: 0; }
.attention-row:hover { background: color-mix(in srgb, var(--cs-blue) 6%, transparent); }
.attention-dot {
  width: 10px; height: 10px; flex: none; border-radius: 999px;
  background: var(--cs-blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cs-blue) 15%, transparent);
}
.attention-dot.is-critical, .attention-dot--critical,
.attention-row[data-tone="critical"] .attention-dot {
  background: var(--cs-red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cs-red) 15%, transparent);
}
.attention-dot.is-warning, .attention-dot--warning,
.attention-row[data-tone="warning"] .attention-dot {
  background: var(--cs-amber); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cs-amber) 15%, transparent);
}
.attention-dot.is-ok, .attention-dot--ok,
.attention-row[data-tone="ok"] .attention-dot {
  background: var(--cs-green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cs-green) 15%, transparent);
}
.attention-copy { min-width: 0; }
.attention-copy b { display: block; color: var(--cs-ink); font-size: 13.5px; line-height: 1.35; }
.attention-copy span { display: block; margin-top: 3px; color: var(--cs-ink4); font-size: 11.5px; line-height: 1.45; }
.attention-action {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 10px; border: 1px solid var(--cs-edge); border-radius: 8px;
  background: transparent; color: var(--cs-ink2); font: inherit; font-size: 12px;
  font-weight: 650; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.attention-action:hover { border-color: var(--cs-blueHi); color: var(--cs-ink); }

.health-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.health-item {
  min-width: 0; min-height: 92px; padding: 13px 14px;
  border: 1px solid var(--cs-line); border-radius: 10px; background: var(--cs-bg);
}
.health-item b { display: block; color: var(--cs-ink); font-size: 13px; }
.health-item span { display: block; margin-top: 5px; color: var(--cs-ink4); font-size: 11.5px; line-height: 1.45; }
.health-item[data-status="ok"] { border-top: 3px solid var(--cs-green); }
.health-item[data-status="warning"] { border-top: 3px solid var(--cs-amber); }
.health-item[data-status="critical"] { border-top: 3px solid var(--cs-red); }

.owner-card {
  padding: 16px; background: var(--cs-panel); border: 1px solid var(--cs-line);
  border-top: 3px solid var(--cs-blue); border-radius: 12px;
}
.owner-card h2, .owner-card h3 { margin: 0; color: var(--cs-ink); font-size: 14px; }
.owner-card > p { margin: 7px 0 0; color: var(--cs-ink4); font-size: 12px; line-height: 1.55; }
.owner-links { display: grid; gap: 4px; margin-top: 13px; }
.owner-links a, .owner-links button {
  min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 10px; border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--cs-ink2); font: inherit; font-size: 12.5px;
  text-align: left; text-decoration: none; cursor: pointer;
}
.owner-links a:hover, .owner-links button:hover {
  background: var(--cs-bg); border-color: var(--cs-line); color: var(--cs-ink);
}
.owner-links a::after, .owner-links button::after { content: "›"; color: var(--cs-ink4); font-size: 17px; }

/* ── sensitive-action drawer ───────────────────────────────────────────────
   Intended for a labelled dialog with aria-modal=true. The scrim owns the
   viewport; the drawer owns scrolling so its action bar never disappears. */
.act-scrim {
  position: fixed; inset: 0; z-index: 100; display: grid; justify-items: end;
  background: rgba(4, 7, 14, .72); backdrop-filter: blur(4px);
  animation: act-fade-in .16s ease-out;
}
.act-scrim[hidden] { display: none !important; }
.act-drawer {
  width: min(100%, 500px); height: 100%; min-height: 0;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--cs-panel); border-left: 1px solid var(--cs-edge);
  box-shadow: -24px 0 70px rgba(0, 0, 0, .52);
  animation: act-drawer-in .2s cubic-bezier(.2, .72, .25, 1);
}
.act-head {
  min-height: 70px; display: flex; align-items: flex-start; gap: 14px;
  padding: 17px 20px; border-bottom: 1px solid var(--cs-line);
}
.act-head > :first-child { min-width: 0; flex: 1; }
.act-head h2 { margin: 0; color: var(--cs-ink); font-size: 17px; letter-spacing: -.25px; }
.act-head p { margin: 4px 0 0; color: var(--cs-ink4); font-size: 12px; }
.act-close {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--cs-edge); border-radius: 9px; background: transparent;
  color: var(--cs-ink2); font: inherit; font-size: 24px; cursor: pointer;
}
.act-close:hover { background: var(--cs-line2); color: var(--cs-ink); }
.act-body { min-height: 0; overflow: auto; padding: 20px; scrollbar-width: thin; }
.act-body > * + * { margin-top: 16px; }
.act-summary, .act-impact {
  padding: 13px 14px; border: 1px solid var(--cs-line); border-radius: 10px;
  background: var(--cs-bg); color: var(--cs-ink2); font-size: 12.5px; line-height: 1.55;
}
.act-summary > span { display: block; margin-bottom: 3px; color: var(--cs-ink4); font-size: 10.5px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; }
.act-summary strong, .act-impact strong { display: block; margin-bottom: 4px; color: var(--cs-ink); font-size: 12.5px; }
.act-summary p, .act-impact p { margin: 5px 0 0; }
.act-impact { border-left: 3px solid var(--cs-amber); }
.act-impact.is-danger { border-left-color: var(--cs-red); }
.act-field { display: grid; gap: 6px; color: var(--cs-ink2); font-size: 12px; font-weight: 650; }
.act-field input, .act-field select, .act-field textarea {
  width: 100%; min-height: 44px; box-sizing: border-box;
  padding: 9px 11px; border: 1px solid var(--cs-edge); border-radius: 8px;
  background: var(--cs-field); color: var(--cs-ink); font: inherit; font-weight: 400;
}
.act-field textarea { min-height: 96px; resize: vertical; }
.act-confirm {
  min-height: 52px; display: flex; align-items: flex-start; gap: 10px;
  padding: 12px; border: 1px solid var(--cs-edge); border-radius: 10px;
  background: color-mix(in srgb, var(--cs-amber) 7%, transparent);
  color: var(--cs-ink2); font-size: 12px; line-height: 1.5;
}
.act-confirm input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--cs-blue); }
.act-actions {
  display: flex; justify-content: flex-end; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--cs-line); background: var(--cs-panel);
}
.act-error {
  padding: 11px 12px; border: 1px solid color-mix(in srgb, var(--cs-red) 55%, transparent);
  border-radius: 9px; background: color-mix(in srgb, var(--cs-red) 10%, transparent);
  color: #FFB4B4; font-size: 12.5px; line-height: 1.5;
}
.act-error:empty { display: none; }
.btn--danger-solid { background: var(--cs-red); color: #fff; border-color: var(--cs-red); }
.btn--danger-solid:hover { background: #F06D6D; border-color: #F06D6D; }

/* ── authenticator step-up drawer ──────────────────────────────────────────
   This is deliberately its own interaction, not a generic confirmation. The
   QR and manual key exist only while the drawer is mounted. */
.mfa-drawer { width: min(100%, 540px); }
.mfa-body { color: var(--cs-ink2); }
.mfa-section-title {
  margin: 0; color: var(--cs-ink); font-size: 14px; font-weight: 750;
  letter-spacing: -.1px;
}
.mfa-section-title + .fine { margin-top: 5px; }
.mfa-loading {
  min-height: 120px; display: grid; place-items: center; margin: 0;
  color: var(--cs-ink3); text-align: center;
}
.mfa-factor-list {
  display: grid; gap: 8px; min-width: 0; margin: 16px 0 0; padding: 0;
  border: 0;
}
.mfa-factor {
  min-height: 58px; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--cs-line); border-radius: 10px;
  background: var(--cs-bg); cursor: pointer;
}
.mfa-factor:hover { border-color: var(--cs-edge); }
.mfa-factor:has(input:checked) {
  border-color: var(--cs-blue); background: color-mix(in srgb, var(--cs-blue) 9%, var(--cs-bg));
}
.mfa-factor input {
  width: 20px; height: 20px; flex: none; margin: 0; accent-color: var(--cs-blue);
}
.mfa-factor span { min-width: 0; }
.mfa-factor strong { display: block; color: var(--cs-ink); font-size: 13px; }
.mfa-factor small { display: block; margin-top: 2px; color: var(--cs-ink4); font-size: 11px; }
.mfa-enrollment {
  display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px;
  align-items: center; margin-top: 16px;
}
.mfa-qr {
  width: 190px; min-height: 190px; display: grid; place-items: center;
  box-sizing: border-box; padding: 12px; border-radius: 12px; background: #fff;
}
.mfa-qr img { display: block; width: 166px; height: 166px; object-fit: contain; }
.mfa-manual { min-width: 0; }
.mfa-manual > strong { display: block; color: var(--cs-ink); font-size: 12.5px; }
.mfa-manual > p { margin: 5px 0 10px; color: var(--cs-ink4); font-size: 11.5px; line-height: 1.5; }
.mfa-secret-row { display: grid; gap: 8px; }
.mfa-secret-row code {
  min-height: 44px; display: flex; align-items: center; box-sizing: border-box;
  padding: 9px 10px; border: 1px solid var(--cs-edge); border-radius: 8px;
  background: var(--cs-field); color: var(--cs-ink); font-size: 12px;
  line-height: 1.5; letter-spacing: .7px; overflow-wrap: anywhere; user-select: all;
}
.mfa-secret-row .btn { min-height: 44px; justify-content: center; }
.mfa-copy-status { display: block; min-height: 18px; margin-top: 5px; color: var(--cs-green); font-size: 11px; }
.mfa-code-field { margin-top: 18px; }
.mfa-code-field input {
  height: 54px; text-align: center; font-size: 23px; font-weight: 750;
  font-variant-numeric: tabular-nums; letter-spacing: .42em; text-indent: .42em;
}
.mfa-live { min-height: 18px; margin: 0; color: var(--cs-green); font-size: 12px; }
.mfa-live:empty { display: none; }
@keyframes act-fade-in { from { opacity: 0; } }
@keyframes act-drawer-in { from { transform: translateX(24px); opacity: .65; } }

@media (max-width: 1040px) {
  .ov-layout { grid-template-columns: 1fr; }
  .ov-side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .auth-stage { grid-template-columns: 1fr; }
  .auth-stage .auth-wrap { order: 1; padding: 18px; }
  .auth-stage .auth-card { max-width: 520px; }
  /* One viewport on a phone means the card IS the page; the brand panel's
     hero and ad previews return at desktop widths. */
  .auth-brand { display: none; }
  .auth-hero h1 { max-width: 18ch; font-size: clamp(31px, 8vw, 48px); }
  .auth-trust { grid-template-columns: 1fr; }
  .auth-trust-row { min-height: 52px; }
  .auth-trust-row + .auth-trust-row { border-left: 0; border-top: 1px solid var(--cs-line); }
}
@media (max-width: 680px) {
  .ov-side { grid-template-columns: 1fr; }
  .health-grid { grid-template-columns: 1fr; }
  .attention-row { grid-template-columns: auto minmax(0, 1fr); }
  .attention-action { grid-column: 2; justify-self: start; min-height: 44px; }
  .act-drawer { width: 100%; border-left: 0; }
  .act-head, .act-body { padding-inline: 16px; }
  .act-actions { padding-inline: 16px; }
  .act-actions > * { flex: 1 1 140px; justify-content: center; }
  .mfa-enrollment { grid-template-columns: 1fr; justify-items: center; }
  .mfa-manual { width: 100%; }
}

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: #16233C; border: 1px solid var(--cs-edge); color: var(--cs-ink);
  border-radius: 999px; padding: 10px 20px; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.toast--err { border-color: color-mix(in srgb, var(--cs-red) 55%, transparent); color: #FCA5A5; }

/* ═══════════════════════════════════════════════════════════════════════════
   Legacy view classes, mapped onto the system above.
   The view markup predates this design; rather than rewrite every template
   and risk the behaviour, each old class is re-expressed in the new tokens.
   ═══════════════════════════════════════════════════════════════════════════ */

.card { background: var(--cs-panel); border: 1px solid var(--cs-line); border-radius: 12px; padding: 18px; margin-bottom: 14px; }
.card--narrow { max-width: 420px; margin: 8vh auto; padding: 30px 28px; }
.card h1 { margin: 0 0 8px; font-size: 19px; font-weight: 700; letter-spacing: -0.35px; }
.card h2 { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.card h3 { margin: 20px 0 8px; font-size: 13px; font-weight: 700; letter-spacing: -0.1px; }

.kicker { margin: 0 0 8px; font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--cs-blue); }
.lede { margin: 0 0 14px; font-size: 13.5px; line-height: 1.65; color: var(--cs-ink3); max-width: 76ch; }
.fine { margin: 8px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--cs-ink5); }
.auth-links a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 3px; margin-inline: -3px; }
.mono { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--cs-ink2); }
.count { display: inline-block; font-size: 11px; font-weight: 600; background: var(--cs-chip); border: 1px solid var(--cs-line);
         border-radius: 999px; padding: 2px 9px; color: var(--cs-ink3); vertical-align: middle; margin-left: 6px; }
.warn { color: var(--cs-amber); }
.hidden { display: none !important; }

/* buttons */
.btn, .b {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font: inherit;
  font-size: 12.5px; font-weight: 600; padding: 8px 15px; border-radius: 8px;
  background: var(--cs-blue); color: #08101F; border: 1px solid transparent; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--cs-blueHi); }
.btn:disabled, .btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn--quiet { background: transparent; color: var(--cs-ink2); border-color: var(--cs-line); }
.btn--quiet:hover { background: var(--cs-line2); color: var(--cs-ink); border-color: var(--cs-edge); }
.btn--danger { background: transparent; color: var(--cs-red); border-color: color-mix(in srgb, var(--cs-red) 40%, transparent); }
.btn--danger:hover { background: color-mix(in srgb, var(--cs-red) 13%, transparent); }
.btn--sm { min-height: 44px; padding: 6px 11px; font-size: 11.5px; }

/* forms */
.form { display: grid; gap: 13px; }
.form label { display: grid; gap: 5px; font-size: 11.5px; color: var(--cs-ink4); }
.form input, .form textarea, .form select {
  width: 100%; box-sizing: border-box; background: var(--cs-field); color: var(--cs-ink);
  font: inherit; font-size: 13px; border: 1px solid var(--cs-line); border-radius: 8px; padding: 8px 11px;
}
.form textarea { resize: vertical; min-height: 62px; }
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none; border-color: var(--cs-blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cs-blue) 18%, transparent);
}
.form--row { grid-template-columns: 1fr auto auto; align-items: end; }
.form--wide, .grid2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.span2 { grid-column: 1 / -1; }
@media (max-width: 620px) { .form--row { grid-template-columns: 1fr; } }

/* chips + tags */
.chip, .tag {
  display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; white-space: nowrap;
  padding: 3px 9px; border-radius: 999px; background: var(--cs-chip);
  color: var(--cs-ink3); border: 1px solid var(--cs-line);
}
.chip--approved, .chip--verified { color: var(--cs-green); border-color: color-mix(in srgb, var(--cs-green) 42%, transparent); background: color-mix(in srgb, var(--cs-green) 12%, transparent); }
.chip--rejected, .chip--suspended { color: var(--cs-red);   border-color: color-mix(in srgb, var(--cs-red) 42%, transparent);   background: color-mix(in srgb, var(--cs-red) 12%, transparent); }
.chip--needs_info { color: var(--cs-amber); border-color: color-mix(in srgb, var(--cs-amber) 42%, transparent); background: color-mix(in srgb, var(--cs-amber) 12%, transparent); }
.chip--pending, .chip--pending_review, .chip--in_review, .chip--sent {
  color: var(--cs-amber); border-color: color-mix(in srgb, var(--cs-amber) 42%, transparent); background: color-mix(in srgb, var(--cs-amber) 12%, transparent);
}
.chip--active { color: var(--cs-green); border-color: color-mix(in srgb, var(--cs-green) 42%, transparent); background: color-mix(in srgb, var(--cs-green) 12%, transparent); }
.chip--draft, .chip--paused { color: var(--cs-ink4); border-color: var(--cs-line); background: transparent; }
.chip--ended { color: var(--cs-ink5); border-color: var(--cs-line2); background: transparent; }
.tag--staff   { color: var(--cs-blueHi); border-color: color-mix(in srgb, var(--cs-blue) 42%, transparent); background: color-mix(in srgb, var(--cs-blue) 12%, transparent); }
.tag--partner { color: var(--cs-green);  border-color: color-mix(in srgb, var(--cs-green) 42%, transparent); background: color-mix(in srgb, var(--cs-green) 12%, transparent); }
.tag--banned  { color: var(--cs-red);    border-color: color-mix(in srgb, var(--cs-red) 42%, transparent);   background: color-mix(in srgb, var(--cs-red) 12%, transparent); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chipb {
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
  background: transparent; color: var(--cs-ink4);
  border: 1px solid var(--cs-line); border-radius: 999px; padding: 6px 13px;
}
.chipb:hover { color: var(--cs-ink); border-color: var(--cs-edge); }
.chipb.is-on { color: var(--cs-blueHi); border-color: color-mix(in srgb, var(--cs-blue) 48%, transparent); background: color-mix(in srgb, var(--cs-blue) 12%, transparent); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 11px; margin: 16px 0 0; }
.stat { background: var(--cs-bg); border: 1px solid var(--cs-line); border-radius: 11px; padding: 13px 15px; }
.stat b { display: block; font-size: 25px; font-weight: 800; letter-spacing: -0.6px; line-height: 1.1; }
.stat span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--cs-ink4); }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.filters input[type="search"], input[type="search"] {
  flex: 1 1 240px; min-width: 0; box-sizing: border-box;
  background: var(--cs-field); color: var(--cs-ink); font: inherit; font-size: 13px;
  border: 1px solid var(--cs-line); border-radius: 8px; padding: 9px 12px;
}
input[type="search"]:focus { outline: none; border-color: var(--cs-blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cs-blue) 18%, transparent); }

/* tables */
.seats, .accounts { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 14px; }
.seats th, .seats td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--cs-line2); }
.seats th { font-size: 10.5px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--cs-ink5); border-bottom: 1px solid var(--cs-line); }
.seats tbody tr:hover { background: color-mix(in srgb, var(--cs-blue) 5%, transparent); }
.accounts td { vertical-align: top; }
.accounts .sub { display: block; color: var(--cs-ink5); font-size: 11px; margin-top: 2px; }
.accounts .num { text-align: right; white-space: nowrap; color: var(--cs-ink3); }
.accounts .empty { color: var(--cs-ink5); text-align: center; padding: 34px 12px; }
.acts { text-align: right; white-space: nowrap; }
.acts .btn { padding: 5px 11px; font-size: 11.5px; margin-left: 5px; }

/* notes */
.note { border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; font-size: 12.5px; line-height: 1.6;
        background: color-mix(in srgb, var(--cs-blue) 9%, transparent);
        border: 1px solid color-mix(in srgb, var(--cs-blue) 32%, transparent); color: var(--cs-ink2); }
.note-h { margin: 0 0 4px; font-weight: 700; font-size: 12.5px; color: var(--cs-ink); }
.note p { margin: 0; font-size: 12.5px; }
.note .btn { margin-top: 10px; }
.note--err { background: color-mix(in srgb, var(--cs-red) 9%, transparent); border-color: color-mix(in srgb, var(--cs-red) 34%, transparent); }
.note--err .note-h { color: #FCA5A5; }

/* automatic checks */
.checks { margin-top: 16px; border: 1px solid var(--cs-line); border-radius: 11px; overflow: hidden; }
.checks-h { margin: 0; padding: 9px 13px; background: var(--cs-line2); font-size: 10.5px; font-weight: 700;
            letter-spacing: .7px; text-transform: uppercase; color: var(--cs-ink5); }
.checks ul { list-style: none; margin: 0; padding: 0; }
.check { display: flex; gap: 10px; padding: 10px 13px; border-top: 1px solid var(--cs-line2); }
.check-dot { width: 7px; height: 7px; border-radius: 999px; margin-top: 6px; flex: none; background: var(--cs-ink5); }
.check.pass .check-dot, .check--pass .check-dot { background: var(--cs-green); }
.check.fail .check-dot, .check--fail .check-dot { background: var(--cs-red); }
.check.warn .check-dot, .check.unknown .check-dot,
.check--warn .check-dot, .check--unknown .check-dot { background: var(--cs-amber); }
.check-l { margin: 0; font-size: 12.5px; color: var(--cs-ink2); }
.check-s { color: var(--cs-ink4); font-weight: 600; }
.check-d { margin: 3px 0 0; font-size: 11.5px; color: var(--cs-ink5); }

/* review desk queue */
.q { border: 1px solid var(--cs-line); border-radius: 11px; padding: 14px; margin-top: 12px; background: var(--cs-bg); }
.q-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.q-head h2 { margin: 0; font-size: 15px; }
.q-head small { color: var(--cs-ink5); font-weight: 400; font-size: 11.5px; }
.q-meta { margin: 6px 0 0; font-size: 12px; color: var(--cs-ink4); }
.q-note { margin-top: 9px; }
.q-actions { margin-top: 11px; display: flex; gap: 7px; flex-wrap: wrap; }

/* modules grid */
.modules { margin-top: 22px; }
.modgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.mod { border: 1px solid var(--cs-line); border-radius: 11px; padding: 13px; display: grid; gap: 3px; background: var(--cs-bg); }
.mod b { font-size: 13px; }
.mod span { color: var(--cs-ink5); font-size: 11.5px; }

/* choices / kinds (apply flow) */
.choices { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 14px; }
.kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 9px; }
.kind { border: 1px solid var(--cs-line); border-radius: 10px; padding: 11px 13px; cursor: pointer; font-size: 12.5px; color: var(--cs-ink3); background: transparent; text-align: left; }
.kind.is-on { border-color: var(--cs-blue); background: color-mix(in srgb, var(--cs-blue) 11%, transparent); color: var(--cs-ink); }

/* map editor pieces reused inside the workspace */
.jhead { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; flex-wrap: wrap; }
.jhead h2 { margin: 0; font-size: 17px; letter-spacing: -0.3px; }
.kidlist { max-height: 300px; overflow: auto; }
.mres, .hit {
  display: block; width: 100%; text-align: left; font: inherit; cursor: pointer; margin-bottom: 6px;
  background: transparent; color: var(--cs-ink2); border: 1px solid var(--cs-line); border-radius: 9px; padding: 8px 11px;
}
.mres:hover, .hit:hover { border-color: color-mix(in srgb, var(--cs-blue) 48%, transparent); background: color-mix(in srgb, var(--cs-blue) 7%, transparent); }
.mres b { display: block; font-size: 13px; color: var(--cs-ink); }
.mres span { display: block; font-size: 11px; color: var(--cs-ink5); margin-top: 1px; }

.medit { border: 1px solid var(--cs-line); border-radius: 10px; margin-bottom: 9px; overflow: hidden; }
.medit > summary { cursor: pointer; padding: 10px 13px; font-size: 12.5px; font-weight: 600; color: var(--cs-ink2); list-style: none; display: flex; align-items: center; gap: 8px; }
.medit > summary::-webkit-details-marker { display: none; }
.medit > summary::before { content: "▸"; color: var(--cs-ink5); font-size: 10px; transition: transform .15s ease; }
.medit[open] > summary::before { transform: rotate(90deg); }
.medit[open] > summary { border-bottom: 1px solid var(--cs-line2); color: var(--cs-ink); }
.medit-form { padding: 13px; }

.prow { border: 1px solid var(--cs-line); border-radius: 10px; padding: 11px 13px; margin-bottom: 9px; background: var(--cs-bg); }
.prow-h { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12.5px; }
.prow-diff { margin-top: 8px; border-radius: 8px; overflow: hidden; border: 1px solid var(--cs-line2); font-size: 11.5px; }
.prow-diff > div { display: grid; grid-template-columns: minmax(90px, 36%) 1fr; border-bottom: 1px solid var(--cs-line2); }
.prow-diff > div:last-child { border-bottom: 0; }
.prow-diff .mono { padding: 6px 9px; background: var(--cs-line2); color: var(--cs-ink4); display: block; }
.prow-a { margin-top: 10px; display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.prow-a .btn { padding: 6px 12px; font-size: 11.5px; }

/* the map workspace */
.map-card { padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; }
.map-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.lvlchips { margin-top: 8px; }

/* ── live place geometry workbench ─────────────────────────────────────────
   Numbered DOM markers stay large enough to drag without covering the
   premises. The map colour communicates edit state only; legal meaning is
   carried by the adjacent text and remains server-authored. */
.place-search { margin-top: 12px; }
.place-results { max-height: 240px; overflow: auto; margin-top: 8px; }
.place-page-controls { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 7px; color: var(--cs-ink5); font-size: 9.5px; }
.place-page-controls .btn { min-height: 36px; }
.place-workbench { margin-top: 12px; border-top: 1px solid var(--cs-line2); padding-top: 12px; }
.geom-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.geom-head h3 { margin: 1px 0 0; font-size: 16px; }
.geom-meaning { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 11px 0; }
.geom-meaning > div { border: 1px solid var(--cs-line); border-radius: 9px; padding: 9px 10px; }
.geom-meaning b, .geom-meaning span { display: block; }
.geom-meaning b { font-size: 12px; color: var(--cs-ink); }
.geom-meaning span { margin-top: 3px; color: var(--cs-ink4); font-size: 11px; line-height: 1.45; }
.geom-meaning [data-kind="legal"] { border-left: 3px solid var(--cs-blue); }
.geom-meaning [data-kind="advisory"] { border-left: 3px solid var(--cs-amber); }
.geom-status { border: 1px solid var(--cs-line); border-radius: 9px; padding: 9px 10px; margin-bottom: 10px; }
.geom-status b, .geom-status span { display: block; }
.geom-status b { font-size: 12px; }
.geom-status span { margin-top: 2px; color: var(--cs-ink4); font-size: 11.5px; }
.geom-status[data-ok="true"] { border-color: color-mix(in srgb, var(--cs-green) 55%, var(--cs-line)); }
.geom-status[data-ok="false"] { border-color: color-mix(in srgb, var(--cs-amber) 55%, var(--cs-line)); }
.geom-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.geom-vertex {
  width: 44px; height: 44px; display: grid; place-items: center; padding: 0;
  border-radius: 50%; border: 10px solid transparent; background: #2563eb; background-clip: padding-box; color: #fff;
  box-shadow: inset 0 0 0 2px #fff, 0 2px 8px rgba(0,0,0,.5); cursor: grab; font: 700 9px/1 ui-monospace, monospace;
}
.geom-vertex.is-selected { background: #22c55e; outline: 3px solid rgba(134,239,172,.35); }
.geom-vertex:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.geom-coordinates { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin: 10px 0 0; padding: 10px; border: 1px solid var(--cs-line); border-radius: 9px; }
.geom-coordinates legend { padding: 0 5px; color: var(--cs-ink4); font-size: 10px; font-weight: 700; }
.geom-coordinates label { font-size: 10px; }
.geom-coordinates input { min-width: 0; }
.geom-measure { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 0; color: var(--cs-ink4); }
.geom-measure b { color: var(--cs-green); font-size: 13px; }
.geom-measure span { font-size: 10.5px; }
@media (max-width: 520px) { .geom-meaning { grid-template-columns: 1fr; } }

/* Proposal-backed map mutations. The tools sit before fine-grained place
   geometry because creating/moving a pin and tracing a premises footprint are
   different operations with different review contracts. */
.map-edit-studio { margin-bottom: 13px; padding-bottom: 13px; border-bottom: 1px solid var(--cs-line2); }
.map-edit-studio__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.map-edit-studio__head h3 { margin: 2px 0 3px; color: var(--cs-ink); font-size: 15px; letter-spacing: -.22px; }
.map-edit-studio__head > div > p:last-child { max-width: 35rem; margin: 0; color: var(--cs-ink4); font-size: 10.5px; line-height: 1.48; }
.map-edit-security { min-height: 25px; display: inline-flex; align-items: center; flex: none; padding: 0 8px; border: 1px solid color-mix(in srgb, var(--cs-amber) 48%, var(--cs-line)); border-radius: 999px; color: var(--cs-amber); font-size: 9px; font-weight: 750; white-space: nowrap; }
.map-edit-security.is-on { border-color: color-mix(in srgb, var(--cs-green) 48%, var(--cs-line)); color: #70D4A8; }
.map-edit-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 10px 0; }
.map-edit-actions > button { min-width: 0; min-height: 68px; display: grid; grid-template-columns: 28px minmax(0,1fr); grid-template-rows: auto auto; column-gap: 8px; align-content: center; padding: 9px; border: 1px solid var(--cs-line); border-radius: 9px; background: color-mix(in srgb, var(--cs-panel) 94%, #15213a); color: var(--cs-ink2); text-align: left; cursor: pointer; }
.map-edit-actions > button > span { grid-row: 1 / 3; width: 28px; height: 28px; display: grid; place-items: center; align-self: center; border-radius: 7px; background: color-mix(in srgb, var(--cs-blue) 18%, transparent); color: var(--cs-blueHi); font-size: 16px; }
.map-edit-actions > button b, .map-edit-actions > button small { min-width: 0; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-edit-actions > button b { align-self: end; color: var(--cs-ink); font-size: 10.5px; }
.map-edit-actions > button small { align-self: start; color: var(--cs-ink5); font-size: 9px; }
.map-edit-actions > button:hover:not(:disabled) { border-color: color-mix(in srgb, var(--cs-blue) 70%, var(--cs-line)); background: color-mix(in srgb, var(--cs-blue) 11%, var(--cs-panel)); }
.map-edit-actions > button:disabled { opacity: .4; cursor: not-allowed; }
.map-edit-dependency { margin: 8px 0; padding: 8px 9px; border-left: 2px solid var(--cs-amber); background: color-mix(in srgb, var(--cs-amber) 7%, transparent); color: var(--cs-ink4); font-size: 9.5px; line-height: 1.45; }
.map-edit-dependency b { color: var(--cs-amber); }
.map-edit-selection { min-height: 48px; display: flex; align-items: center; gap: 9px; margin-top: 9px; padding: 7px 9px; border: 1px solid color-mix(in srgb, var(--cs-blue) 42%, var(--cs-line)); border-radius: 8px; background: color-mix(in srgb, var(--cs-blue) 8%, transparent); }
.map-edit-selection.is-zone { border-color: color-mix(in srgb, var(--cs-amber) 42%, var(--cs-line)); background: color-mix(in srgb, var(--cs-amber) 8%, transparent); }
.map-edit-selection__icon { width: 29px; height: 29px; flex: none; display: grid; place-items: center; border-radius: 8px; background: #2563eb; color: #fff; }
.map-edit-selection.is-zone .map-edit-selection__icon { background: #b46e08; }
.map-edit-selection div, .map-edit-selection b, .map-edit-selection span, .map-edit-selection small { min-width: 0; display: block; }
.map-edit-selection small { color: var(--cs-ink5); font-size: 8.5px; text-transform: uppercase; letter-spacing: .08em; }
.map-edit-selection b { overflow: hidden; color: var(--cs-ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.map-edit-selection div > span { color: var(--cs-ink4); font-size: 9px; text-transform: capitalize; }
.map-edit-retire { min-height: 44px; margin-top: 7px; padding: 0; border: 0; background: transparent; color: #F18A8A; cursor: pointer; font-size: 10px; text-decoration: underline; text-underline-offset: 3px; }
.map-edit-retire:disabled { opacity: .42; cursor: not-allowed; }
.map-edit-form { margin-top: 11px; padding: 11px; border: 1px solid color-mix(in srgb, var(--cs-blue) 45%, var(--cs-line)); border-radius: 10px; background: linear-gradient(150deg, color-mix(in srgb, #102442 38%, var(--cs-panel)), var(--cs-panel)); box-shadow: 0 12px 32px rgba(0,0,0,.16); }
.map-edit-form > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.map-edit-form > header h4 { margin: 2px 0 0; color: var(--cs-ink); font-size: 13px; }
.map-edit-form__error { margin-bottom: 9px; padding: 8px 9px; border: 1px solid color-mix(in srgb, var(--cs-red) 54%, var(--cs-line)); border-radius: 7px; background: color-mix(in srgb, var(--cs-red) 9%, transparent); color: #FFB1B1; font-size: 10px; line-height: 1.45; }
.map-edit-form__error[hidden] { display: none; }
.map-edit-mode-instruction { min-height: 47px; display: flex; align-items: center; gap: 9px; margin-bottom: 10px; padding: 7px 9px; border: 1px dashed color-mix(in srgb, var(--cs-blue) 65%, var(--cs-line)); border-radius: 8px; background: color-mix(in srgb, var(--cs-blue) 7%, transparent); }
.map-edit-mode-instruction > span { width: 27px; height: 27px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--cs-blue); color: #fff; font-size: 10px; font-weight: 800; }
.map-edit-mode-instruction b, .map-edit-mode-instruction small { display: block; }
.map-edit-mode-instruction b { color: var(--cs-ink2); font-size: 10px; }
.map-edit-mode-instruction small { color: var(--cs-ink5); font: 9px/1.4 ui-monospace, "SF Mono", monospace; }
.map-edit-mode-instruction.is-ready { border-style: solid; border-color: color-mix(in srgb, var(--cs-green) 54%, var(--cs-line)); }
.map-edit-mode-instruction.is-ready > span { background: var(--cs-green); }
.map-edit-draw-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: -2px 0 10px; }
.map-edit-draw-actions > span { margin-left: auto; color: var(--cs-ink5); font: 8.5px/1.2 ui-monospace, "SF Mono", monospace; }
.map-edit-fields { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; margin-top: 9px; }
.map-edit-fields--two { grid-template-columns: 1fr 1fr; }
.map-edit-fields label { min-width: 0; display: grid; gap: 4px; color: var(--cs-ink3); font-size: 9.5px; font-weight: 650; }
.map-edit-fields label.is-wide { grid-column: 1 / -1; }
.map-edit-fields label > span small { color: var(--cs-ink5); font-size: 8px; font-weight: 500; }
.map-edit-fields input, .map-edit-fields select, .map-edit-fields textarea { width: 100%; min-width: 0; min-height: 40px; box-sizing: border-box; padding: 8px 9px; border: 1px solid var(--cs-line); border-radius: 7px; background: #081323; color: var(--cs-ink); font-size: 10.5px; line-height: 1.4; }
.map-edit-fields textarea { min-height: 68px; resize: vertical; }
.map-edit-fields input[readonly] { color: var(--cs-ink4); cursor: default; }
.map-edit-fields label > small { color: var(--cs-ink5); font-size: 8.5px; font-weight: 450; line-height: 1.4; }
.map-edit-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; margin-top: 11px; }
.map-edit-form-actions .btn { min-height: 44px; }
.map-edit-receipt { display: flex; align-items: flex-start; gap: 10px; margin-top: 11px; padding: 11px; border: 1px solid color-mix(in srgb, var(--cs-green) 52%, var(--cs-line)); border-radius: 9px; background: color-mix(in srgb, var(--cs-green) 8%, transparent); }
.map-edit-receipt > span { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--cs-green); color: #fff; font-weight: 850; }
.map-edit-receipt h4 { margin: 2px 0; color: var(--cs-ink); font-size: 12px; }
.map-edit-receipt p:last-child { margin: 0; color: var(--cs-ink4); font-size: 9.5px; line-height: 1.45; }
.map-edit-boundary { margin: 10px 0 0; color: var(--cs-ink5); font-size: 9px; line-height: 1.45; }
.map-edit-boundary b { color: var(--cs-ink3); }
@media (max-width: 520px) {
  .map-edit-studio__head { display: grid; }
  .map-edit-security { justify-self: start; }
  .map-edit-actions, .map-edit-fields--two { grid-template-columns: 1fr; }
  .map-edit-fields label.is-wide { grid-column: auto; }
}

/* Selected jurisdiction inspector. The first tab gives decision context;
   raw records remain available without dominating the default screen. */
.studio-inspector .ws-scroll { padding-bottom: 22px; }
.inspector-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 15px 12px; }
.inspector-head h2 { margin: 2px 0 1px; font-size: 17px; letter-spacing: -.3px; }
.inspector-head p { margin: 0; color: var(--cs-ink5); font-size: 10.5px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--cs-ink4); cursor: pointer; letter-spacing: 2px; }
.icon-btn:hover { background: var(--cs-line2); color: var(--cs-ink); }
.authority-line { min-height: 42px; display: flex; align-items: center; gap: 6px; padding: 0 15px; border-top: 1px solid var(--cs-line2); border-bottom: 1px solid var(--cs-line2); color: var(--cs-ink4); font-size: 10.5px; }
.authority-line strong { color: var(--cs-green); }
.authority-line .chip { margin-left: auto; }
.inspector-tabs { display: grid; grid-template-columns: repeat(4,1fr); border-bottom: 1px solid var(--cs-line2); }
.inspector-tabs button { min-width: 0; min-height: 45px; padding: 0 4px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--cs-ink5); cursor: pointer; font-size: 10.5px; }
.inspector-tabs button:hover { color: var(--cs-ink2); }
.inspector-tabs button.is-on { border-bottom-color: var(--cs-blue); color: var(--cs-blueHi); }
.inspector-panel { padding: 12px 13px; }
.inspector-card { margin-bottom: 8px; padding: 12px; border: 1px solid var(--cs-line); border-radius: 9px; background: linear-gradient(145deg, color-mix(in srgb, var(--cs-panel) 94%, #15213a), var(--cs-panel)); }
.inspector-card h3 { margin: 3px 0; color: var(--cs-ink); font-size: 12px; }
.inspector-card > p:not(.kicker) { margin: 2px 0 0; color: var(--cs-ink4); font-size: 10.5px; line-height: 1.5; }
.inspector-card .btn { width: 100%; justify-content: center; margin-top: 10px; }
.readiness-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.readiness-card > span { width: 50px; height: 50px; flex: none; display: grid; place-items: center; border: 4px solid var(--cs-green); border-left-color: color-mix(in srgb, var(--cs-green) 20%, transparent); border-radius: 50%; color: var(--cs-ink); font-size: 12px; font-weight: 800; }
.inspector-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.warning-card { border-color: color-mix(in srgb, var(--cs-amber) 48%, var(--cs-line)); }
.warning-card h3 { color: #F6C869; }
.inspector-primary { width: 100%; min-height: 42px; justify-content: center; margin-top: 4px; }
.inspector-disclaimer { margin: 0; padding: 0 15px 2px; color: var(--cs-ink5); font-size: 9.5px; line-height: 1.45; }
.inspector-empty { margin: 14px; padding: 22px 16px; border: 1px dashed var(--cs-line); border-radius: 10px; text-align: center; }
.inspector-empty b { color: var(--cs-ink2); }
.inspector-empty p { margin: 5px 0 0; color: var(--cs-ink5); font-size: 11px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.section-heading h3 { margin: 2px 0 0; font-size: 14px; }
.law-record > summary { display: grid; grid-template-columns: 10px minmax(0,1fr) auto; }
.law-record > summary span:nth-child(2), .law-record > summary b, .law-record > summary small { min-width: 0; display: block; }
.law-record > summary b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.law-record > summary small { margin-top: 2px; color: var(--cs-ink5); font-size: 9.5px; }
.rule-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--cs-amber); }
.rule-dot--prohibited { background: var(--cs-red); }
.rule-dot--restricted { background: #F97316; }
.rule-dot--permitted, .rule-dot--permitted_with_conditions { background: var(--cs-green); }
.rule-dot--unclear { background: var(--cs-ink5); }
.source-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--cs-line2); }
.source-row:last-child { border-bottom: 0; }
.source-row a { color: var(--cs-blueHi); font-size: 10.5px; }

/* Guided Law Studio — the map is a persistent backdrop while editing stays
   explicit, reviewable and separate from the production release pipeline. */
.law-studio { --law-rail-offset: 0px; position: fixed; inset: 0 0 0 var(--law-rail-offset); z-index: 70; display: grid; grid-template-columns: clamp(250px, 21vw, 360px) minmax(510px, 1fr) clamp(280px, 21vw, 350px); grid-template-rows: 68px minmax(0,1fr) 68px; background: radial-gradient(circle at 52% 12%, #102341 0, #091426 34%, #07101d 75%); color: var(--cs-ink); }
.law-studio__header { grid-column: 2 / -1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 18px; border-bottom: 1px solid var(--cs-line2); background: color-mix(in srgb, #07101d 94%, transparent); }
.law-studio__header > div:first-child { min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.law-studio__header .kicker { display: none; }
.law-studio__header h1 { margin: 0; font-size: 20px; letter-spacing: -.5px; white-space: nowrap; }
.law-studio__header > div:first-child > p:last-child { min-width: 0; margin: 0; padding-left: 10px; border-left: 1px solid var(--cs-line); color: var(--cs-ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.law-studio__header-actions { display: flex; align-items: center; gap: 12px; }
.law-studio__save-state { color: var(--cs-green); font-size: 10.5px; }
.law-studio__draft-state { padding: 4px 9px; border: 1px solid var(--cs-line); border-radius: 999px; color: var(--cs-ink3); font-size: 9.5px; font-weight: 700; }
.law-studio__close { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 50%; background: transparent; color: var(--cs-ink3); cursor: pointer; font-size: 25px; line-height: 1; }
.law-studio__close:hover { border-color: var(--cs-line); background: var(--cs-line2); color: var(--cs-ink); }
.law-studio__close:focus-visible { outline: 3px solid var(--cs-blueHi); outline-offset: 2px; }
.law-studio__map-context { grid-column: 1; grid-row: 1 / 4; min-width: 0; min-height: 0; position: relative; isolation: isolate; overflow: hidden; border-right: 1px solid var(--cs-line2); background: #07101d; }
.law-studio__map-context::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(90deg, transparent 68%, rgba(7,16,29,.42)); }
.law-studio__map-heading { position: absolute; z-index: 4; top: 13px; left: 13px; right: 13px; padding: 10px 12px; border: 1px solid var(--cs-line); border-radius: 8px; background: color-mix(in srgb, #081425 86%, transparent); backdrop-filter: blur(10px); }
.law-studio__map-heading h2 { margin: 2px 0; font-size: 14px; }
.law-studio__map-heading p:last-child { margin: 0; color: var(--cs-ink4); font-size: 10px; }
.law-studio__mini-map { position: absolute; z-index: 0; inset: 0; overflow: hidden; background: #081321; }
.law-studio__mini-map > p { padding: 120px 16px; color: var(--cs-ink5); }
.law-studio__map-error, .law-studio__map-boundary-note { position: absolute; z-index: 6; top: 148px; right: 12px; left: 12px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--cs-amber) 55%, var(--cs-line)); border-radius: 8px; background: rgba(8,20,37,.95); color: var(--cs-amber); box-shadow: 0 12px 28px rgba(0,0,0,.24); }
.law-studio__map-error p, .law-studio__map-boundary-note p { margin: 3px 0 0; color: var(--cs-ink3); font-size: 9.5px; line-height: 1.45; }
.law-studio__map-error .btn { min-height: 34px; margin-top: 9px; }
.law-studio__map-boundary-note { border-color: color-mix(in srgb, var(--cs-blueHi) 42%, var(--cs-line)); color: var(--cs-blueHi); }
.law-studio__map-error[hidden], .law-studio__map-boundary-note[hidden] { display: none; }
.law-studio__map-controls { position: absolute; z-index: 5; left: 12px; bottom: 86px; display: grid; overflow: hidden; border: 1px solid var(--cs-line); border-radius: 8px; background: rgba(8,20,37,.92); backdrop-filter: blur(10px); }
.law-studio__map-controls button { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-bottom: 1px solid var(--cs-line2); background: transparent; color: var(--cs-ink2); cursor: pointer; font: 700 17px/1 system-ui, sans-serif; }
.law-studio__map-controls button:last-child { border-bottom: 0; }
.law-studio__map-controls button:hover:not(:disabled) { background: var(--cs-line2); color: var(--cs-blueHi); }
.law-studio__map-controls button:disabled { opacity: .35; cursor: wait; }
.law-studio__map-legend { position: absolute; z-index: 4; right: 12px; bottom: 12px; left: 12px; display: grid; gap: 5px; padding: 10px; border: 1px solid var(--cs-line); border-radius: 8px; background: color-mix(in srgb, #081425 88%, transparent); backdrop-filter: blur(10px); }
.law-studio__map-legend span { color: var(--cs-ink2); font-size: 10.5px; }
.law-studio__map-legend i { display: inline-block; width: 10px; height: 8px; margin-right: 7px; border: 1px dashed #69aaff; background: rgba(50,137,255,.18); }
.law-studio__map-legend small { color: var(--cs-ink5); font-size: 9px; line-height: 1.45; }
.law-studio__workflow { grid-column: 2; grid-row: 2; min-width: 0; min-height: 0; overflow: auto; }
.law-studio__steps { position: sticky; top: 0; z-index: 4; display: grid; grid-template-columns: repeat(7,1fr); padding: 14px 18px 11px; border-bottom: 1px solid var(--cs-line2); background: color-mix(in srgb, #0a172b 94%, transparent); backdrop-filter: blur(12px); }
.law-studio__steps button { position: relative; display: grid; justify-items: center; gap: 5px; border: 0; background: transparent; color: var(--cs-ink5); cursor: pointer; }
.law-studio__steps button::after { content: ""; position: absolute; z-index: -1; top: 15px; left: 57%; width: 86%; height: 2px; background: var(--cs-line); }
.law-studio__steps button:last-child::after { display: none; }
.law-studio__steps button > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: #78849a; color: #07101d; font-size: 11px; font-weight: 800; }
.law-studio__steps button small { font-size: 9.5px; }
.law-studio__steps button.is-current { color: var(--cs-blueHi); }
.law-studio__steps button.is-current > span { background: #61A6FF; }
.law-studio__steps button.is-complete > span { background: #70D660; }
.law-studio__steps button.is-complete::after { background: #70D660; }
.law-studio__step { width: min(100%, 980px); box-sizing: border-box; margin: 0 auto; padding: 24px 28px 50px; }
.law-studio__step-copy { margin-bottom: 18px; }
.law-studio__step-copy h2 { margin: 3px 0 5px; font-size: 18px; letter-spacing: -.35px; }
.law-studio__step-copy h2:focus { outline: 0; }
.law-studio__step-copy > p:last-child { margin: 0; color: var(--cs-ink4); font-size: 11.5px; }
.law-studio fieldset { min-width: 0; margin: 0 0 17px; padding: 0; border: 0; }
.law-studio fieldset > legend { margin-bottom: 9px; color: var(--cs-ink2); font-size: 11px; font-weight: 700; }
.law-source-grid, .law-category-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.law-rule-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 9px; }
.law-choice-card, .law-rule-card, .law-category-card { min-width: 0; position: relative; display: block; cursor: pointer; }
.law-choice-card input, .law-rule-card input, .law-category-card input { position: absolute; opacity: 0; pointer-events: none; }
.law-choice-card > span, .law-rule-card > span, .law-category-card > span { min-height: 92px; box-sizing: border-box; display: grid; align-content: start; gap: 5px; padding: 13px; border: 1px solid var(--cs-line); border-radius: 8px; background: color-mix(in srgb, var(--cs-panel) 86%, transparent); transition: .15s ease; }
.law-rule-card > span { min-height: 142px; position: relative; align-content: center; justify-items: center; padding: 14px 10px 20px; text-align: center; }
.law-rule-card__icon { width: 32px; height: 32px; display: grid; place-items: center; margin-bottom: 2px; color: var(--cs-ink3); }
.law-rule-card__icon svg { width: 29px; height: 29px; display: block; }
.law-rule-card__radio { position: absolute; right: 9px; bottom: 9px; width: 12px; height: 12px; border: 1px solid var(--cs-ink5); border-radius: 50%; }
.law-rule-card.is-selected .law-rule-card__radio { border: 4px solid currentColor; }
.law-category-card > span { min-height: 68px; }
.law-choice-card b, .law-rule-card b, .law-category-card b { color: var(--cs-ink); font-size: 11.5px; }
.law-choice-card small, .law-rule-card small, .law-category-card small { color: var(--cs-ink4); font-size: 9.5px; line-height: 1.45; }
.law-choice-card em { color: var(--cs-green); font-size: 9px; font-style: normal; }
.law-choice-card em.is-warning { color: var(--cs-amber); }
.law-choice-card.is-selected > span, .law-category-card.is-selected > span { border-color: var(--cs-blue); background: color-mix(in srgb, var(--cs-blue) 12%, transparent); }
.law-rule-card.is-selected > span { border-color: var(--cs-red); box-shadow: inset 0 0 0 1px var(--cs-red); }
.law-rule-card--permitted.is-selected > span, .law-rule-card--permitted_with_conditions.is-selected > span { border-color: var(--cs-green); box-shadow: inset 0 0 0 1px var(--cs-green); }
.law-rule-card--restricted.is-selected > span { border-color: #F97316; box-shadow: inset 0 0 0 1px #F97316; }
.law-rule-card--permitted.is-selected .law-rule-card__icon, .law-rule-card--permitted_with_conditions.is-selected .law-rule-card__icon { color: var(--cs-green); }
.law-rule-card--restricted.is-selected .law-rule-card__icon { color: #F97316; }
.law-rule-card--prohibited.is-selected .law-rule-card__icon { color: var(--cs-red); }
.law-rule-card input:focus-visible + span, .law-choice-card input:focus-visible + span, .law-category-card input:focus-visible + span { outline: 3px solid var(--cs-blueHi); outline-offset: 2px; }
.law-field { display: grid; gap: 6px; margin-top: 14px; color: var(--cs-ink2); font-size: 11px; font-weight: 600; }
.law-field small { color: var(--cs-ink5); font-size: 9.5px; font-weight: 400; }
.law-field :is(input, select, textarea) { width: 100%; min-height: 44px; box-sizing: border-box; border: 1px solid var(--cs-line); border-radius: 8px; background: #081425; color: var(--cs-ink); }
.law-field textarea { min-height: 92px; }
.law-field--summary textarea { min-height: 68px; }
.law-field--detail textarea { min-height: 88px; }
.law-field :is(input, select, textarea):focus-visible { border-color: var(--cs-blueHi); outline: 3px solid color-mix(in srgb, var(--cs-blueHi) 28%, transparent); outline-offset: 1px; }
.law-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.law-field-grid .law-field:first-child { grid-column: 1 / -1; }
.law-studio textarea { resize: vertical; }
.law-jurisdiction-card, .law-evidence-card, .law-preview-card, .law-app-preview, .law-submit-summary, .law-confirmation { margin-bottom: 13px; padding: 15px; border: 1px solid var(--cs-line); border-radius: 9px; background: color-mix(in srgb, var(--cs-panel) 88%, transparent); }
.law-jurisdiction-card, .law-evidence-card > div:first-child { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.law-jurisdiction-card h3, .law-evidence-card h3, .law-preview-card h3 { margin: 3px 0; }
.law-jurisdiction-card dl, .law-evidence-card dl, .law-preview-card dl { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.law-jurisdiction-card dt, .law-evidence-card dt, .law-preview-card dt { color: var(--cs-ink5); font-size: 9px; }
.law-jurisdiction-card dd, .law-evidence-card dd, .law-preview-card dd { margin: 2px 0 0; color: var(--cs-ink2); font-size: 10.5px; }
.law-confirmation { display: flex; gap: 10px; cursor: pointer; }
.law-confirmation input { width: 18px; height: 18px; flex: none; }
.law-confirmation b, .law-confirmation small { display: block; }
.law-confirmation small { margin-top: 3px; color: var(--cs-ink4); font-size: 10px; }
.law-preview-card header { display: flex; justify-content: space-between; gap: 8px; color: var(--cs-ink5); font-size: 9.5px; }
.law-preview-card__rule { padding: 3px 7px; border-radius: 999px; color: #fff; background: var(--cs-red); }
.law-preview-categories div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.law-preview-categories span { padding: 4px 7px; border-radius: 6px; background: var(--cs-line2); color: var(--cs-blueHi); font-size: 9.5px; }
.law-preview-authority { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--law-border-soft, var(--cs-line2)); }
.law-preview-authority b { color: var(--cs-ink2); font-size: 10px; }
.law-preview-authority p { margin: 5px 0; color: var(--cs-ink3); font-size: 9.5px; line-height: 1.5; white-space: pre-wrap; }
.law-preview-authority small { color: var(--cs-ink5); font-size: 8.8px; }
.law-app-preview > div { display: flex; align-items: center; gap: 10px; }
.law-app-preview > div > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: #111927; color: var(--cs-blueHi); font-weight: 900; }
.law-app-preview p { margin: 0; }
.law-app-preview b { display: block; }
.law-submit-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; text-align: center; }
.law-submit-summary span, .law-submit-summary small { display: block; }
.law-submit-summary span { font-size: 24px; font-weight: 800; }
.law-submit-summary small { color: var(--cs-ink5); font-size: 9.5px; }
.law-submit-checks { margin: 0 0 14px; padding: 13px; border: 1px solid var(--cs-line); border-radius: 9px; background: color-mix(in srgb, var(--cs-panel) 88%, transparent); }
.law-submit-checks > h3 { margin: 0 0 9px; font-size: 12px; }
.law-submit-checks .law-check { margin-bottom: 7px; }
.law-submit-checks .law-check:last-child { margin-bottom: 0; }
.law-submit-checks h4 { margin: 1px 0 4px; font-size: 10.5px; }
.law-studio__errors { margin-bottom: 14px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--cs-red) 55%, var(--cs-line)); border-radius: 8px; background: color-mix(in srgb, var(--cs-red) 8%, transparent); }
.law-studio__errors ul { margin: 6px 0 0; padding-left: 18px; color: var(--cs-ink3); font-size: 10.5px; }
.law-studio__review { grid-column: 3; grid-row: 2; min-width: 0; min-height: 0; overflow: auto; padding: 15px 12px; border-left: 1px solid var(--cs-line2); background: color-mix(in srgb, var(--cs-panel) 94%, transparent); }
.law-studio__review-heading { padding: 2px 4px 12px; }
.law-studio__review-heading h2 { margin: 3px 0; font-size: 15px; }
.law-studio__review-heading p:last-child { margin: 0; color: var(--cs-ink4); font-size: 10px; }
.law-check { display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 8px; padding: 12px 10px; border: 1px solid var(--cs-line); border-radius: 8px; margin-bottom: 8px; }
.law-check > span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; border: 1px solid currentColor; color: var(--cs-blueHi); font-size: 10px; }
.law-check h3 { margin: 1px 0 4px; font-size: 10.5px; }
.law-check p { margin: 0; color: var(--cs-ink4); font-size: 9.5px; line-height: 1.45; }
.law-check--pass > span { color: var(--cs-green); }
.law-check--warning > span, .law-check--blocker > span { color: var(--cs-amber); }
.law-studio__review-boundary { padding: 12px; border: 1px solid color-mix(in srgb, var(--cs-blue) 38%, var(--cs-line)); border-radius: 8px; color: var(--cs-blueHi); }
.law-studio__review-boundary p { margin: 3px 0 0; color: var(--cs-ink4); font-size: 9.5px; }
.law-studio__authority { margin-top: 10px; padding: 13px; border: 1px solid var(--cs-line); border-radius: 8px; background: color-mix(in srgb, #081425 88%, transparent); }
.law-studio__authority header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.law-studio__authority h3 { margin: 3px 0 0; font-size: 12px; }
.law-studio__authority-state { padding: 3px 6px; border: 1px solid var(--cs-line); border-radius: 999px; color: var(--cs-amber); font-size: 8px; white-space: nowrap; }
.law-studio__authority-state.is-verified { color: var(--cs-green); }
.law-studio__authority dl { display: grid; gap: 8px; margin: 12px 0 0; }
.law-studio__authority dl > div { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 8px; }
.law-studio__authority dt { color: var(--cs-ink5); font-size: 9px; }
.law-studio__authority dd { margin: 0; color: var(--cs-ink3); font-size: 9.5px; line-height: 1.4; }
.law-submit-lock { padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--cs-amber) 50%, var(--cs-line)); border-radius: 8px; color: var(--cs-amber); font-size: 10px; }
.law-studio__footer { grid-column: 2 / 4; grid-row: 3; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 18px; border-top: 1px solid var(--cs-line2); background: #07101d; }
.law-studio__live { color: var(--cs-ink4); font-size: 10px; }
.law-studio__footer-buttons { display: flex; gap: 10px; }
.law-studio__footer-buttons .btn { min-width: 128px; justify-content: center; }
.law-studio__save-button { border-color: color-mix(in srgb, var(--cs-blueHi) 35%, var(--cs-line)); }
.law-studio.is-pending :is(.law-studio__workflow, .law-studio__review, .law-studio__map-context) { cursor: progress; }
.law-studio__success { text-align: center; padding: 70px 20px; }
.law-studio__success > span { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 50%; background: var(--cs-green); color: #06120d; font-size: 24px; }
.law-mini-map-unavailable { height: 100%; display: grid; place-content: center; padding: 20px; color: var(--cs-ink4); text-align: center; }
@media (max-width: 1180px) {
  .law-studio { grid-template-columns: 220px minmax(0,1fr); grid-template-rows: 68px minmax(0,1fr) auto 68px; }
  .law-studio__header { grid-column: 2; }
  .law-studio__map-context { grid-row: 1 / 5; }
  .law-studio__workflow { grid-column: 2; grid-row: 2; }
  .law-studio__review { grid-column: 2; grid-row: 3; display: block; max-height: 250px; border-top: 1px solid var(--cs-line2); border-left: 0; }
  .law-studio__footer { grid-column: 2; grid-row: 4; }
  .law-rule-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 860px) {
  .law-studio { --law-rail-offset: 0px; inset: 0; display: block; overflow: auto; }
  .law-studio__header { position: sticky; top: 0; z-index: 8; min-height: 64px; }
  .law-studio__map-context { height: 270px; border-right: 0; border-bottom: 1px solid var(--cs-line2); }
  .law-studio__workflow { overflow: visible; }
  .law-studio__steps { top: 64px; }
  .law-studio__review { max-height: none; overflow: visible; }
  .law-studio__footer { position: sticky; bottom: 0; min-height: 68px; }
}
@media (max-width: 640px) {
  .law-studio__header > div:first-child > p:last-child, .law-studio__save-state, .law-studio__steps small { display: none; }
  .law-studio__header { padding-inline: 12px; }
  .law-studio__header h1 { font-size: 17px; }
  .law-studio__draft-state { display: none; }
  .law-studio__steps { padding-inline: 8px; }
  .law-studio__step { padding: 18px 14px 100px; }
  .law-rule-grid, .law-source-grid, .law-category-grid, .law-field-grid { grid-template-columns: 1fr; }
  .law-field-grid .law-field:first-child { grid-column: auto; }
  .law-studio__live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .law-studio__footer > [data-law-actions] { width: 100%; }
  .law-studio__footer-buttons { width: 100%; }
  .law-studio__footer-buttons { display: grid; grid-template-columns: .72fr .86fr 1.42fr; }
  .law-studio__footer-buttons .btn { min-width: 0; padding-inline: 7px; white-space: normal; text-align: center; line-height: 1.2; }
  .law-studio__map-controls { bottom: 82px; }
}

/* Approved Law Studio fidelity pass — permanent map, guided authoring canvas,
   deterministic review rail, and the same compact operational hierarchy as
   the accepted Camden concept. */
.law-studio {
  --law-bg: #07111f;
  --law-panel: #0a182b;
  --law-panel-hi: #0d1e35;
  --law-border: rgba(137, 162, 198, .24);
  --law-border-soft: rgba(137, 162, 198, .14);
  --law-muted: #a8b5c8;
  --law-faint: #8290a6;
  grid-template-columns: clamp(238px, 18vw, 300px) minmax(600px, 1fr) clamp(288px, 20vw, 330px);
  grid-template-rows: 70px minmax(0, 1fr) 74px;
  background: radial-gradient(circle at 45% 10%, #102844 0, #09182c 31%, var(--law-bg) 74%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.law-studio :is(button, input, select, textarea) { font-family: inherit; }
.law-studio__header {
  padding: 0 26px 0 30px;
  border-color: var(--law-border-soft);
  background: rgba(6, 17, 31, .96);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
}
.law-studio__header > div:first-child { gap: 13px; }
.law-studio__header h1 { font-size: 21px; font-weight: 750; letter-spacing: -.55px; }
.law-studio__header > div:first-child > p:last-child {
  padding-left: 13px;
  border-color: rgba(166, 184, 211, .32);
  color: #b7c3d5;
  font-size: 12px;
}
.law-studio__header-actions { gap: 13px; }
.law-studio__save-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #73dc64;
  font-size: 11px;
  white-space: nowrap;
}
.law-studio__save-indicator > svg { width: 18px; height: 18px; padding: 1px; border: 1.5px solid currentColor; border-radius: 50%; }
.law-studio__save-state { color: inherit; font-size: inherit; }
.law-studio__draft-state {
  padding: 4px 11px;
  border: 0;
  background: rgba(37, 148, 71, .25);
  color: #79df71;
  font-size: 10px;
}
.law-studio__close {
  width: auto;
  min-width: 88px;
  height: 40px;
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid rgba(145, 165, 194, .38);
  border-radius: 6px;
  background: transparent;
  color: #e7edf7;
  font-size: 11px;
  font-weight: 650;
}
.law-studio__close span, .law-studio__close svg { width: 17px; height: 17px; display: block; }
.law-studio__close:hover { border-color: rgba(113, 173, 255, .62); background: rgba(75, 143, 238, .11); }

.law-studio__map-context { border-color: var(--law-border-soft); background: #07111f; }
.law-studio__map-context::after {
  z-index: 3;
  background:
    linear-gradient(180deg, rgba(3, 12, 23, .16), transparent 22%, transparent 70%, rgba(3, 12, 23, .54)),
    linear-gradient(90deg, transparent 70%, rgba(7, 17, 31, .3));
}
.law-studio__mini-map { background: #081321; }
.law-studio__map-heading {
  top: 76px;
  right: 16px;
  left: 16px;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  text-shadow: 0 2px 9px #020916, 0 0 22px #020916;
}
.law-studio__map-heading .kicker { color: #8dbcf9; font-size: 8.5px; letter-spacing: .13em; }
.law-studio__map-heading h2 { margin: 5px 0 2px; color: #f5f8fd; font-size: 17px; letter-spacing: -.25px; }
.law-studio__map-heading p:last-child { color: #c0cadd; font-size: 10px; text-transform: capitalize; }
.law-studio__map-heading :is(.kicker, h2, p) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.law-studio__map-controls {
  left: 14px;
  bottom: 108px;
  border-color: rgba(145, 165, 194, .42);
  border-radius: 6px;
  background: rgba(5, 17, 31, .9);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .28);
}
.law-studio__map-controls button { width: 42px; height: 42px; color: #dbe5f3; }
.law-studio__map-controls button svg { width: 18px; height: 18px; }
.law-studio__map-controls button:hover:not(:disabled) { background: rgba(78, 146, 242, .16); }
.law-studio__map-legend {
  right: 14px;
  bottom: 14px;
  left: 14px;
  gap: 4px;
  padding: 10px 11px;
  border-color: rgba(145, 165, 194, .3);
  border-radius: 6px;
  background: rgba(5, 17, 31, .86);
}
.law-studio__map-legend span { font-size: 10px; }
.law-studio__map-legend small { color: #94a3b8; font-size: 8.5px; }

.law-studio__workflow { background: linear-gradient(180deg, rgba(13, 31, 55, .34), rgba(7, 17, 31, .12)); scrollbar-color: rgba(113, 173, 255, .34) transparent; }
.law-studio__steps {
  min-height: 94px;
  box-sizing: border-box;
  padding: 14px 22px 12px;
  border-color: var(--law-border-soft);
  background: rgba(9, 25, 45, .96);
  box-shadow: 0 9px 24px rgba(0, 0, 0, .12);
}
.law-studio__steps button {
  min-width: 0;
  min-height: 62px;
  gap: 6px;
  padding: 0 3px;
  color: #96a3b8;
  font-weight: 500;
}
.law-studio__steps button::after { top: 16px; left: 60%; width: 80%; height: 1.5px; background: #526078; }
.law-studio__steps button > span { width: 32px; height: 32px; background: #8c98aa; font-size: 11px; }
.law-studio__steps button small { color: inherit; font-size: 10px; white-space: nowrap; }
.law-studio__steps button.is-current { color: #69aaff; }
.law-studio__steps button.is-current > span { background: #63a9ff; box-shadow: 0 0 0 4px rgba(99, 169, 255, .1); }
.law-studio__steps button.is-complete { color: #dbe5f3; }
.law-studio__steps button.is-complete > span { background: #72d864; box-shadow: 0 0 0 4px rgba(114, 216, 100, .08); }
.law-studio__steps button.is-complete::after { background: linear-gradient(90deg, #72d864, #63a9ff); }
.law-studio__steps button:disabled:not(.is-current):not(.is-complete) { cursor: default; opacity: .76; }
.law-studio__step { width: min(100%, 1060px); padding: 25px 30px 42px; }
.law-studio__step-copy { margin-bottom: 18px; }
.law-studio__step-copy .kicker { display: none; }
.law-studio__step-copy h2 { margin: 0 0 5px; color: #f4f7fc; font-size: 18px; font-weight: 720; letter-spacing: -.35px; }
.law-studio__step-copy > p:last-child { max-width: 780px; color: var(--law-muted); font-size: 10.5px; line-height: 1.5; }
.law-studio fieldset { margin-bottom: 16px; }
.law-studio fieldset > legend { margin-bottom: 9px; color: #dfe7f2; font-size: 10.5px; }

.law-rule-grid { gap: 8px; }
.law-rule-card > span {
  min-height: 145px;
  gap: 7px;
  padding: 14px 8px 25px;
  border-color: rgba(142, 165, 197, .38);
  border-radius: 6px;
  background: rgba(8, 23, 41, .76);
}
.law-rule-card:hover > span { border-color: rgba(111, 171, 250, .65); background: rgba(17, 41, 70, .74); transform: translateY(-1px); }
.law-rule-card__icon { width: 36px; height: 36px; color: #a9b5c8; }
.law-rule-card__icon svg { width: 34px; height: 34px; }
.law-rule-card--prohibited .law-rule-card__icon { color: #ff3945; }
.law-rule-card--restricted .law-rule-card__icon { color: #ff821f; }
.law-rule-card--permitted_with_conditions .law-rule-card__icon { color: #ffc01f; }
.law-rule-card--permitted .law-rule-card__icon { color: #72d864; }
.law-rule-card--posted_discretion .law-rule-card__icon { color: #53a7ff; }
.law-rule-card--unclear .law-rule-card__icon { color: #aab6c9; }
.law-choice-card b, .law-rule-card b, .law-category-card b { color: #f0f4fa; font-size: 10.5px; line-height: 1.25; }
.law-rule-card small { max-width: 116px; color: #b0bccd; font-size: 9px; line-height: 1.42; }
.law-rule-card__radio { right: 50%; bottom: 10px; width: 14px; height: 14px; transform: translateX(50%); }
.law-rule-card.is-selected .law-rule-card__radio { border-width: 4px; }
.law-rule-card.is-selected > span { background: rgba(255, 57, 69, .045); box-shadow: inset 0 0 0 1px var(--cs-red), 0 8px 22px rgba(0, 0, 0, .13); }
.law-rule-card--restricted.is-selected > span { background: rgba(255, 130, 31, .045); }
.law-rule-card--permitted_with_conditions.is-selected > span { border-color: #ffc01f; background: rgba(255, 192, 31, .045); box-shadow: inset 0 0 0 1px #ffc01f; }
.law-rule-card--permitted.is-selected > span { background: rgba(114, 216, 100, .045); }
.law-rule-card--posted_discretion.is-selected > span { border-color: #53a7ff; background: rgba(83, 167, 255, .045); box-shadow: inset 0 0 0 1px #53a7ff; }
.law-rule-card--unclear.is-selected > span { border-color: #aab6c9; background: rgba(170, 182, 201, .045); box-shadow: inset 0 0 0 1px #aab6c9; }

.law-field { gap: 6px; margin-top: 12px; color: #e1e8f2; font-size: 10.5px; }
.law-field__title { min-width: 0; display: flex; align-items: baseline; gap: 4px; }
.law-field__title > em { color: #9faec2; font-style: normal; font-weight: 400; }
.law-field__title > i { margin-left: auto; color: #8797ad; font-size: 9px; font-style: normal; font-weight: 400; }
.law-field small { color: #8999b0; font-size: 9px; line-height: 1.45; }
.law-field :is(input, select, textarea) {
  min-height: 42px;
  padding: 10px 12px;
  border-color: rgba(142, 165, 197, .45);
  border-radius: 6px;
  background: rgba(7, 20, 36, .9);
  color: #edf3fb;
  font-size: 11px;
  line-height: 1.45;
}
.law-field :is(input, select, textarea)::placeholder { color: #77879f; }
.law-field--detail textarea { min-height: 68px; }
.law-field--summary textarea { min-height: 42px; height: 42px; resize: vertical; }
.law-map-impact-fields { margin-top: 17px; padding-top: 17px; border-top: 1px solid var(--law-border-soft); }
.law-map-impact-fields--inline { margin-top: 18px; }
.law-category-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.law-category-card { flex: 0 1 auto; }
.law-category-card > span {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-color: rgba(142, 165, 197, .36);
  border-radius: 6px;
  background: rgba(7, 20, 36, .72);
}
.law-category-card > span > i { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 4px; background: rgba(77, 147, 242, .14); color: #6eb0ff; font-size: 10px; font-style: normal; font-weight: 800; }
.law-category-card small { display: none; }
.law-category-card.is-selected > span { border-color: rgba(79, 153, 255, .62); background: rgba(61, 134, 236, .2); }
.law-category-card.is-selected > span > i { background: #397fd7; color: #fff; }
.law-field-grid--impact { grid-template-columns: minmax(250px, 1.1fr) minmax(180px, .8fr) minmax(220px, 1fr); gap: 0 12px; }
.law-field-grid--impact .law-field:first-child { grid-column: auto; }
.law-buffer-field { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 8px; align-items: start; }
.law-buffer-unit { margin-top: 31px; }
.law-buffer-unit select { padding-right: 30px; }

.law-choice-card > span, .law-jurisdiction-card, .law-evidence-card, .law-preview-card, .law-app-preview, .law-submit-summary, .law-confirmation, .law-submit-checks {
  border-color: var(--law-border);
  border-radius: 7px;
  background: rgba(9, 24, 43, .82);
}
.law-confirmation { min-height: 44px; box-sizing: border-box; align-items: flex-start; }
.law-confirmation input { margin-top: 1px; accent-color: #4a97ff; }

.law-studio__review {
  padding: 14px 8px 16px;
  border-color: var(--law-border-soft);
  background: rgba(8, 22, 40, .96);
  scrollbar-color: rgba(113, 173, 255, .34) transparent;
}
.law-studio__review-heading { display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 8px; align-items: start; padding: 5px 8px 13px; }
.law-studio__review-heading > span { width: 23px; height: 23px; color: #63a9ff; }
.law-studio__review-heading > span svg { width: 100%; height: 100%; }
.law-studio__review-heading h2 { margin: 1px 0 7px; color: #f0f4fa; font-size: 15px; letter-spacing: -.2px; }
.law-studio__review-heading p { margin: 0; color: #aebace; font-size: 9.5px; line-height: 1.45; }
.law-check {
  grid-template-columns: 23px minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 7px;
  padding: 11px 9px;
  border-color: rgba(142, 165, 197, .29);
  border-radius: 6px;
  background: rgba(8, 23, 42, .6);
}
.law-check > span { width: 21px; height: 21px; padding: 2px; border: 0; }
.law-check > span svg { width: 100%; height: 100%; }
.law-check h3 { color: #ecf1f8; font-size: 10px; line-height: 1.35; }
.law-check p { color: #9eacc0; font-size: 8.8px; line-height: 1.48; }
.law-check--info > span { color: #63a9ff; }
.law-check--warning > span, .law-check--blocker > span { color: #f7bd23; }
.law-studio__review-boundary {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin: 12px 6px 0;
  padding: 4px 2px 13px;
  border: 0;
  border-bottom: 1px solid var(--law-border-soft);
  border-radius: 0;
  color: #5ba8ff;
}
.law-studio__review-boundary > span, .law-studio__review-boundary svg { width: 22px; height: 22px; }
.law-studio__review-boundary p { margin: 0; color: #a7b4c8; font-size: 8.8px; line-height: 1.5; }
.law-studio__review-boundary b { color: #dce6f4; }
.law-studio__authority { margin: 10px 6px 0; padding: 12px; border-color: var(--law-border); border-radius: 6px; background: rgba(8, 23, 42, .66); }
.law-studio__authority h3 { font-size: 11px; }
.law-studio__authority-state { border-color: rgba(142, 165, 197, .34); font-size: 7.5px; }
.law-studio__authority dl { gap: 9px; }
.law-studio__authority dl > div { grid-template-columns: 46px minmax(0, 1fr); }
.law-studio__authority dd { text-align: right; color: #c4cfde; font-size: 8.7px; }

.law-studio__footer {
  padding: 0 26px;
  border-color: var(--law-border-soft);
  background: rgba(6, 16, 29, .98);
  box-shadow: 0 -12px 28px rgba(0, 0, 0, .12);
}
.law-studio__footer-buttons { gap: 12px; }
.law-studio__footer-buttons .btn { min-width: 110px; min-height: 42px; border-radius: 5px; font-size: 10.5px; }
.law-studio__footer-buttons .btn svg { width: 17px; height: 17px; flex: none; }
.law-studio__save-button { min-width: 160px !important; color: #64aaff; }
.law-studio__continue { min-width: 230px !important; background: linear-gradient(135deg, #337fe7, #4e94f4); box-shadow: 0 8px 24px rgba(45, 126, 232, .2); }
.law-studio__live { color: #94a2b7; font-size: 9px; }
.law-studio__errors { border-radius: 6px; }

.law-instrument-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.law-instrument-heading > div { min-width: 0; }
.law-instrument-heading > div > p:last-child { max-width: 760px; margin: 0; color: var(--law-muted); font-size: 10.5px; line-height: 1.5; }
.law-instrument-heading > .btn { min-width: 84px; min-height: 36px; flex: none; justify-content: center; }
.law-instrument-refresh-error { margin: -3px 0 14px; padding: 10px 12px; border: 1px solid rgba(255, 101, 111, .48); border-radius: 6px; background: rgba(255, 57, 69, .07); color: #ffadb3; font-size: 10px; line-height: 1.45; }
.law-instrument-readiness { margin-bottom: 16px; padding: 13px 15px; border: 1px solid rgba(115, 161, 224, .3); border-radius: 7px; background: linear-gradient(135deg, rgba(24, 58, 96, .33), rgba(8, 23, 42, .74)); }
.law-instrument-readiness > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.law-instrument-readiness h3 { margin: 0 0 3px; color: #edf4fc; font-size: 11.5px; }
.law-instrument-readiness header p { margin: 0; color: #a9b8cc; font-size: 9.5px; text-transform: capitalize; }
.law-instrument-readiness header > span { padding: 4px 8px; border: 1px solid rgba(92, 164, 255, .38); border-radius: 999px; color: #73b3ff; font-size: 8.5px; white-space: nowrap; }
.law-instrument-readiness dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; }
.law-instrument-readiness dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-top: 9px; border-top: 1px solid rgba(142, 165, 197, .18); }
.law-instrument-readiness dt { color: #92a1b6; font-size: 8.8px; }
.law-instrument-readiness dd { margin: 0; color: #eaf1fa; font-size: 14px; font-weight: 750; }
.law-instrument-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 0 0 18px; padding: 0; list-style: none; }
.law-instrument-steps li { min-width: 0; display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 8px; align-items: start; padding: 10px 11px; border-left: 2px solid rgba(94, 162, 250, .5); background: rgba(8, 23, 41, .5); }
.law-instrument-steps li > span { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: rgba(72, 145, 241, .18); color: #72b3ff; font-size: 9px; font-weight: 800; }
.law-instrument-steps p { margin: 0; color: #98a8bd; font-size: 8.8px; line-height: 1.45; }
.law-instrument-steps b { display: block; margin-bottom: 2px; color: #e0e8f3; font-size: 9.5px; }
.law-instrument-sources { margin-bottom: 15px !important; }
.law-instrument-group + .law-instrument-group { margin-top: 17px; padding-top: 15px; border-top: 1px solid var(--law-border-soft); }
.law-instrument-group > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.law-instrument-group h3 { margin: 0; color: #dfe8f4; font-size: 10.5px; }
.law-instrument-group header p { max-width: 660px; margin: 0; color: #8f9fb5; font-size: 8.8px; line-height: 1.45; text-align: right; }
.law-instrument-group--inherited { padding: 12px; border: 1px solid rgba(86, 153, 243, .22) !important; border-radius: 7px; background: rgba(26, 55, 90, .14); }
.law-instrument-card > span { min-height: 112px; border-color: rgba(142, 165, 197, .34); border-radius: 6px; background: rgba(7, 21, 38, .74); }
.law-instrument-card:hover:not(.is-disabled) > span { border-color: rgba(104, 169, 255, .62); background: rgba(14, 35, 61, .82); }
.law-instrument-card__meta { display: flex; flex-wrap: wrap; gap: 5px; }
.law-instrument-card__meta i { padding: 2px 5px; border-radius: 3px; background: rgba(74, 147, 244, .13); color: #79b5ff; font-size: 7.8px; font-style: normal; font-weight: 700; text-transform: capitalize; }
.law-instrument-card.is-disabled { cursor: not-allowed; }
.law-instrument-card.is-disabled > span { border-style: dashed; background: rgba(9, 21, 36, .46); }
.law-instrument-card.is-disabled :is(b, small) { color: #7f8da1; }
.law-instrument-card.is-disabled em.is-warning { color: #e7b84c; line-height: 1.4; }
.law-version-picker { margin: 0 0 18px; }
.law-instrument-intake, .law-instrument-receipt, .law-instrument-intake__unavailable { margin-top: 20px; padding: 16px; border: 1px solid rgba(96, 160, 246, .34); border-radius: 7px; background: linear-gradient(145deg, rgba(11, 31, 55, .92), rgba(7, 20, 36, .78)); }
.law-instrument-intake > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.law-instrument-intake h3, .law-instrument-receipt h3, .law-instrument-intake__unavailable b { margin: 0 0 4px; color: #eef4fb; font-size: 12px; }
.law-instrument-intake header p, .law-instrument-intake__unavailable p { margin: 0; color: #9dacbf; font-size: 9.5px; line-height: 1.5; }
.law-intake-mode { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.law-intake-mode > legend { grid-column: 1 / -1; }
.law-intake-mode > label { min-width: 0; position: relative; cursor: pointer; }
.law-intake-mode input { position: absolute; opacity: 0; }
.law-intake-mode label > span { min-height: 62px; box-sizing: border-box; display: grid; align-content: center; gap: 3px; padding: 10px 12px; border: 1px solid rgba(142, 165, 197, .34); border-radius: 6px; background: rgba(6, 19, 34, .72); }
.law-intake-mode label b { color: #e7eef7; font-size: 10px; }
.law-intake-mode label small { color: #8f9fb5; font-size: 8.8px; line-height: 1.4; }
.law-intake-mode input:checked + span { border-color: #4e98f5; background: rgba(58, 132, 229, .15); box-shadow: inset 0 0 0 1px rgba(78, 152, 245, .22); }
.law-intake-mode input:focus-visible + span { outline: 3px solid rgba(105, 170, 255, .56); outline-offset: 2px; }
.law-intake-mode input:disabled + span { opacity: .45; cursor: not-allowed; }
.law-instrument-source-fields .law-field:first-child, .law-instrument-version-fields .law-field:first-child { grid-column: auto; }
.law-instrument-source-fields .law-field:nth-child(3), .law-instrument-version-fields .law-field:nth-child(5) { grid-column: 1 / -1; }
.law-instrument-existing { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 10px 0 2px; padding: 9px 11px; border-left: 2px solid #4e98f5; background: rgba(59, 128, 218, .08); }
.law-instrument-existing b { color: #dde8f5; font-size: 10px; }
.law-instrument-existing span { color: #91a2b9; font-size: 8.8px; text-align: right; }
.law-instrument-intake__errors { margin: 0 0 12px; padding: 10px 12px; border: 1px solid rgba(255, 91, 102, .45); border-radius: 6px; background: rgba(255, 57, 69, .07); }
.law-instrument-intake__errors b { color: #ffc2c7; font-size: 10px; }
.law-instrument-intake__errors ul { margin: 6px 0 0; padding-left: 18px; color: #d7aeb2; font-size: 9.5px; line-height: 1.5; }
.law-instrument-intake__actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.law-instrument-intake__actions .btn { min-width: 210px; justify-content: center; }
.law-instrument-receipt { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: start; border-color: rgba(82, 196, 132, .38); }
.law-instrument-receipt > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(73, 194, 124, .14); color: #67d99a; }
.law-instrument-receipt > span svg { width: 22px; height: 22px; }
.law-instrument-receipt p { margin: 4px 0 0; color: #a8b7c9; font-size: 9.5px; line-height: 1.5; }
.law-instrument-receipt p b { color: #ebf4fa; }
.law-instrument-receipt small { display: block; margin-top: 6px; color: #75dba2; font-size: 8.8px; }
.law-instrument-receipt .btn { min-width: 142px; justify-content: center; }
.law-instrument-intake__unavailable { border-color: rgba(142, 165, 197, .24); }

@media (max-width: 1340px) {
  .law-studio { grid-template-columns: 220px minmax(550px, 1fr) 286px; }
  .law-studio__step { padding-inline: 22px; }
  .law-rule-card > span { min-height: 150px; }
  .law-field-grid--impact { grid-template-columns: 1fr 1fr; }
  .law-buffer-field { grid-column: 1 / -1; }
  .law-instrument-steps { grid-template-columns: 1fr; }
  .law-instrument-steps li { min-height: 44px; }
}
@media (max-width: 1180px) {
  .law-studio { grid-template-columns: 210px minmax(0, 1fr); grid-template-rows: 70px minmax(0, 1fr) auto 74px; }
  .law-studio__review { max-height: 248px; padding: 13px 14px; }
  .law-studio__review > [data-law-review-list] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .law-studio__review .law-check { margin: 0; }
  .law-studio__review-boundary, .law-studio__authority { margin-inline: 0; }
}
@media (max-width: 860px) {
  .law-studio { display: block; }
  .law-studio__header { min-height: 64px; padding-inline: 16px; }
  .law-studio__map-context { height: 260px; }
  .law-studio__map-heading { top: 22px; }
  .law-studio__map-error, .law-studio__map-boundary-note { top: 92px; }
  .law-studio__steps { min-height: 82px; }
  .law-studio__review > [data-law-review-list] { grid-template-columns: 1fr; }
  .law-studio__footer { min-height: 70px; padding-inline: 14px; }
  .law-instrument-heading, .law-instrument-group > header { display: grid; }
  .law-instrument-group header p { text-align: left; }
  .law-instrument-readiness > header { display: grid; }
  .law-instrument-readiness header > span { width: fit-content; }
}
@media (max-width: 680px) {
  .law-studio__header h1 { font-size: 17px; }
  .law-studio__header-actions { gap: 8px; }
  .law-studio__close { min-width: 44px; width: 44px; padding: 0; font-size: 0; }
  .law-studio__close span, .law-studio__close svg { width: 18px; height: 18px; }
  .law-studio__steps { padding-inline: 8px; }
  .law-studio__steps button { min-height: 54px; }
  .law-studio__steps button > span { width: 29px; height: 29px; }
  .law-studio__steps button::after { top: 14px; }
  .law-studio__step { padding: 20px 14px 104px; }
  .law-rule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .law-rule-card > span { min-height: 138px; }
  .law-source-grid, .law-field-grid--impact { grid-template-columns: 1fr; }
  .law-buffer-field { grid-column: auto; grid-template-columns: minmax(0, 1fr) 104px; }
  .law-category-card { flex: 1 1 calc(50% - 7px); }
  .law-studio__footer-buttons { grid-template-columns: .7fr .95fr 1.4fr; gap: 7px; }
  .law-studio__footer-buttons .btn { min-width: 0 !important; padding-inline: 7px; }
  .law-studio__footer-buttons .btn svg { display: none; }
  .law-instrument-readiness dl, .law-intake-mode, .law-instrument-source-fields, .law-instrument-version-fields { grid-template-columns: 1fr; }
  .law-instrument-source-fields .law-field:nth-child(3), .law-instrument-version-fields .law-field:nth-child(5) { grid-column: auto; }
  .law-instrument-receipt { grid-template-columns: 34px minmax(0, 1fr); }
  .law-instrument-receipt .btn { grid-column: 1 / -1; width: 100%; }
  .law-instrument-intake__actions .btn { width: 100%; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .law-rule-card > span { transition: none; }
  .law-rule-card:hover > span { transform: none; }
}

/* ── Dormant campaign studio ───────────────────────────────────────────────
 * Authoring and previews live here; serving remains a separate, disabled
 * backend plane. The persistent lock banner makes that fact unambiguous. */
.delivery-lock {
  display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start;
  margin-bottom: 14px; padding: 14px 16px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--cs-blue) 42%, var(--cs-line));
  background: linear-gradient(120deg, color-mix(in srgb, var(--cs-blue) 12%, var(--cs-panel)), var(--cs-panel));
}
.delivery-lock > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--cs-line2); color: var(--cs-blueHi); font-size: 20px; }
.delivery-lock b, .delivery-lock p { display: block; }
.delivery-lock b { font-size: 13px; color: var(--cs-ink); }
.delivery-lock p { margin: 4px 0 0; max-width: 920px; color: var(--cs-ink4); font-size: 12px; line-height: 1.55; }
.campaign-layout { display: grid; grid-template-columns: minmax(220px, 290px) minmax(0, 1fr); gap: 14px; align-items: start; }
.campaign-list { position: sticky; top: 86px; overflow: hidden; }
.campaign-list-items { max-height: min(68vh, 720px); overflow-y: auto; }
.campaign-list-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--cs-line2); background: transparent; color: var(--cs-ink2); text-align: left; cursor: pointer; }
.campaign-list-item:hover { background: var(--cs-line2); }
.campaign-list-item.is-on { box-shadow: inset 3px 0 var(--cs-blue); background: color-mix(in srgb, var(--cs-blue) 9%, transparent); }
.campaign-list-item > span:first-child, .campaign-list-item b, .campaign-list-item small { min-width: 0; display: block; }
.campaign-list-item b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.campaign-list-item small { margin-top: 3px; color: var(--cs-ink5); font-size: 10.5px; }
.campaign-empty { display: grid; gap: 4px; padding: 22px 16px; color: var(--cs-ink4); font-size: 12px; line-height: 1.5; }
.campaign-empty b { color: var(--cs-ink2); }
.campaign-work { min-width: 0; }
.campaign-form fieldset, .creative-editor fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.campaign-form > fieldset > legend, .creative-editor form > fieldset > legend { margin-bottom: 12px; font-size: 12px; font-weight: 700; color: var(--cs-ink2); }
.campaign-form small { color: var(--cs-ink5); font-size: 10.5px; line-height: 1.45; }
.category-fieldset { margin-top: 16px !important; }
.category-fieldset legend { margin-bottom: 7px; color: var(--cs-ink4); font-size: 11.5px; }
.category-options { display: flex; flex-wrap: wrap; gap: 7px; }
.category-options label { display: block; cursor: pointer; }
.category-options input { position: absolute; opacity: 0; pointer-events: none; }
.category-options span { display: block; padding: 7px 10px; border: 1px solid var(--cs-line); border-radius: 999px; color: var(--cs-ink4); font-size: 11.5px; transition: .15s ease; }
.category-options input:checked + span { color: var(--cs-blueHi); border-color: color-mix(in srgb, var(--cs-blue) 55%, var(--cs-line)); background: color-mix(in srgb, var(--cs-blue) 12%, transparent); }
.category-options input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--cs-blueHi) 70%, transparent); outline-offset: 2px; }
.money-input { display: grid; grid-template-columns: 32px 1fr; align-items: center; }
.money-input i { display: grid; place-items: center; align-self: stretch; border: 1px solid var(--cs-line); border-right: 0; border-radius: 8px 0 0 8px; background: var(--cs-line2); color: var(--cs-ink4); font-style: normal; }
.money-input input { border-radius: 0 8px 8px 0 !important; }
.campaign-form-actions { margin-top: 15px; }
.campaign-review-note { color: var(--cs-amber); font-size: 11.5px; }
.campaign-metrics { margin-bottom: 2px; }
.campaign-run-hint { color: var(--cs-blueHi); }
.placement-grid, .creative-review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.creative-review-card { min-width: 0; padding: 13px; border: 1px solid var(--cs-line); border-radius: 11px; background: color-mix(in srgb, var(--cs-panel) 92%, var(--cs-line2)); }
.placement-card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.placement-card-h .kicker { margin: 0 0 2px; }
.placement-card-h h3 { margin: 0; font-size: 13px; line-height: 1.35; }
.creative-review-card .adp { margin: 10px 0; }

/* placement tiles — the picker is the preview */
.placement-tile { min-width: 0; overflow: hidden; border: 1px solid var(--cs-line); border-radius: 11px; background: color-mix(in srgb, var(--cs-panel) 92%, var(--cs-line2)); }
.placement-tile.is-muted { opacity: .68; padding: 13px; }
.placement-tile-open {
  display: grid; width: 100%; margin: 0; padding: 0; border: 0; background: transparent;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.placement-tile-open:hover { background: color-mix(in srgb, var(--cs-blue) 6%, transparent); }
.placement-tile-open:focus-visible { outline: 2px solid var(--cs-blue); outline-offset: -2px; border-radius: 11px; }
.placement-tile-well { display: block; position: relative; height: 148px; overflow: hidden; background: #0A101B; border-bottom: 1px solid var(--cs-line2); }
.placement-tile-mini { display: block; width: 161.3%; transform: scale(.62); transform-origin: top left; padding: 10px; }
.placement-tile-copy { display: grid; gap: 7px; padding: 12px 13px 13px; }
.placement-tile-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.placement-tile-h .kicker { display: block; margin: 0 0 2px; font-style: normal; }
.placement-tile-h b { display: block; font-size: 13px; line-height: 1.35; color: var(--cs-ink); }
.placement-tile-copy > small { color: var(--cs-ink4); font-size: 11px; line-height: 1.55; }
.placement-tile-note { color: var(--cs-amber); font-size: 11px; line-height: 1.5; }
.placement-tile-note b { color: inherit; }
.placement-tile-cta { color: var(--cs-blue); font-size: 11.5px; font-weight: 650; }
.placement-tile-cta i { font-style: normal; display: inline-block; transition: transform .18s ease; }
.placement-tile-open:hover .placement-tile-cta i { transform: translateX(3px); }

/* the campaign's review journey; the final step is honest about the lock */
.status-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.status-steps li { min-width: 0; padding: 8px 10px 9px; border: 1px solid var(--cs-line2); border-radius: 9px; background: color-mix(in srgb, var(--cs-panel) 92%, var(--cs-line2)); }
.status-steps b { display: block; font-size: 11.5px; color: var(--cs-ink5); }
.status-steps small { display: block; margin-top: 2px; font-size: 9px; color: var(--cs-ink5); letter-spacing: .05em; text-transform: uppercase; }
.status-steps li.is-done { border-color: color-mix(in srgb, var(--cs-green) 38%, var(--cs-line2)); }
.status-steps li.is-done b { color: var(--cs-green); }
.status-steps li.is-current { border-color: color-mix(in srgb, var(--cs-blue) 52%, var(--cs-line2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cs-blue) 32%, transparent); }
.status-steps li.is-current b { color: var(--cs-ink); }
.status-steps li.is-returned { border-color: color-mix(in srgb, var(--cs-amber) 48%, var(--cs-line2)); }
.status-steps li.is-returned b { color: var(--cs-amber); }
.status-steps li.is-locked small::before { content: "⊘ "; }

/* submit readiness — creatives_not_ready should never be a surprise */
.campaign-submit { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--cs-line2); }
.campaign-submit b, .campaign-submit span { display: block; }
.campaign-submit b { font-size: 12.5px; }
.campaign-submit > div > span { margin-top: 2px; color: var(--cs-ink5); font-size: 11px; }
.submit-checklist { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.submit-checklist li { display: grid; grid-template-columns: 18px 1fr; gap: 7px; align-items: start; }
.submit-checklist i { font-style: normal; color: var(--cs-ink5); }
.submit-checklist li.is-done i { color: var(--cs-green); }
.submit-checklist b { font-size: 11.5px; color: var(--cs-ink3); }
.submit-checklist small { display: block; color: var(--cs-ink5); font-size: 10.5px; line-height: 1.45; }

/* first-run hero — the three formats before any campaign exists */
.studio-hero { margin-top: 14px; }
.studio-hero h2 { margin: 2px 0 6px; }
.studio-hero-sub { max-width: 760px; margin: 0 0 14px; color: var(--cs-ink4); font-size: 12px; line-height: 1.6; }
.studio-hero-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.studio-hero-item > .placement-tile-well { border: 1px solid var(--cs-line2); border-radius: 11px; }
.studio-hero-item > b { display: block; margin-top: 8px; font-size: 12px; color: var(--cs-ink2); }

/* creative editor — form beside a live, sticky device stage */
.creative-editor { scroll-margin-top: 92px; }
.creative-editor .panel-h > div h2 { margin-top: 2px; }
.creative-editor-grid { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(320px, 1.1fr); gap: 18px; align-items: start; }
.creative-preview-pane { position: sticky; top: 96px; display: grid; gap: 10px; min-width: 0; }
.creative-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.creative-preview-head .kicker { margin: 0; }
.editor-pane-toggle { display: none; }
.editor-dirty {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 16px; padding: 10px 12px; border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--cs-amber) 48%, var(--cs-line));
  background: color-mix(in srgb, var(--cs-amber) 9%, var(--cs-panel));
  color: var(--cs-ink2); font-size: 12px;
}
.editor-dirty span { margin-right: auto; }
.field-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.field-err { display: block; color: var(--cs-red); font-size: 11px; line-height: 1.5; }
.count { margin-left: auto; color: var(--cs-ink5); font-size: 10.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.count.is-near { color: var(--cs-amber); }
.count.is-max { color: var(--cs-red); }
.form [aria-invalid="true"] { border-color: color-mix(in srgb, var(--cs-red) 55%, var(--cs-line)); }

/* the device stage around a preview */
.ad-stage { display: grid; gap: 8px; margin: 0; min-width: 0; }
.ad-stage-device {
  position: relative; overflow: hidden; padding: 8px 10px 12px; border-radius: 20px;
  border: 1px solid var(--cs-line); background: #070B13;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .38), inset 0 0 0 1px rgba(255, 255, 255, .03);
}
.ad-stage-bar { display: flex; justify-content: space-between; padding: 2px 6px 8px; color: var(--cs-ink5); font-size: 9px; letter-spacing: .06em; }
.ad-stage-bar i { font-style: normal; }
.ad-stage figcaption { color: var(--cs-ink5); font-size: 10.5px; line-height: 1.5; }

/* ── the placement previews (.adp) — same visual language as the sign-in
   showcase (.adx), namespaced so the auth layout stays untouched ─────────── */
.adp { position: relative; overflow: hidden; min-width: 0; border: 1px solid color-mix(in srgb, var(--cs-line) 82%, transparent); border-radius: 12px; background: #0E141F; }
.adp--assistant { display: grid; gap: 10px; padding: 12px; }
.adp-chat { display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: start; }
.adp-chat img { display: block; width: 24px; height: 24px; border-radius: 8px; object-fit: cover; }
.adp-chat p { margin: 3px 0 0; color: var(--cs-ink3); font-size: 11.5px; line-height: 1.5; }
.adp-card { display: grid; gap: 7px; padding: 11px; border: 1px solid var(--cs-line); border-radius: 11px; background: #131A26; }
.adp-brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.adp-logo { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border: 1px solid var(--cs-line2); border-radius: 8px; background: var(--cs-line2); font-size: 15px; }
.adp-names { min-width: 0; display: block; }
.adp-names b { display: block; color: var(--cs-ink); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adp-names small { display: block; color: var(--cs-ink5); font-size: 9.5px; letter-spacing: .04em; text-transform: uppercase; }
.adp-badge {
  display: grid; place-items: center; flex: none; margin-left: auto; width: 16px; height: 16px;
  border-radius: 999px; background: color-mix(in srgb, var(--cs-green) 22%, transparent);
  color: var(--cs-green); font-style: normal; font-size: 9px;
}
.adp-headline { color: #fff; font-size: 13px; line-height: 1.4; }
.adp-body { margin: 0; color: var(--cs-ink4); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.adp-cta { display: flex; align-items: baseline; gap: 5px; color: var(--cs-blue); font-size: 11.5px; font-weight: 650; }
.adp-cta i { font-style: normal; }
.adp-cta small { margin-left: auto; color: var(--cs-ink5); font-weight: 400; font-size: 9.5px; }

.adp--map {
  min-height: 200px;
  background-image:
    url("/assets/ads/map-real.webp"),
    linear-gradient(90deg, transparent 24%, var(--cs-line2) 24.5%, transparent 25%),
    linear-gradient(0deg, transparent 38%, var(--cs-line2) 38.5%, transparent 39%),
    linear-gradient(52deg, transparent 62%, var(--cs-line2) 62.4%, transparent 63%),
    linear-gradient(-38deg, transparent 55%, var(--cs-line2) 55.4%, transparent 56%);
  background-size: cover, auto, auto, auto, auto;
  background-position: center;
}
.adp-pin { position: absolute; left: 55%; top: 32%; width: 14px; height: 14px; }
.adp-pin i {
  position: absolute; inset: 0; border-radius: 999px 999px 999px 0; transform: rotate(-45deg);
  background: var(--cs-blue); box-shadow: 0 4px 10px rgba(0, 0, 0, .45);
  animation: adx-drop .4s cubic-bezier(.2, .9, .3, 1.3) both;
}
.adp-pin::after {
  content: ""; position: absolute; inset: -7px; border-radius: 999px;
  border: 2px solid color-mix(in srgb, var(--cs-blue) 55%, transparent);
  animation: adx-ring 2.4s ease-out infinite;
}
.adp-callout {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: block; white-space: nowrap; padding: 5px 9px; border-radius: 9px;
  background: color-mix(in srgb, var(--cs-panel) 96%, transparent);
  border: 1px solid var(--cs-line); box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
}
.adp-callout::after {
  content: ""; position: absolute; left: 50%; bottom: -5px; width: 8px; height: 8px;
  transform: translateX(-50%) rotate(45deg);
  background: inherit; border-right: 1px solid var(--cs-line); border-bottom: 1px solid var(--cs-line);
}
.adp-callout b { display: block; color: var(--cs-ink); font-size: 10px; line-height: 1.2; max-width: 148px; overflow: hidden; text-overflow: ellipsis; }
.adp-callout small { display: block; color: var(--cs-ink5); font-size: 7.5px; letter-spacing: .1em; }
.adp-plate {
  position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 8px 10px; border-radius: 9px;
  background: color-mix(in srgb, var(--cs-panel) 94%, transparent); border: 1px solid var(--cs-line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}
.adp-plate-copy { display: block; min-width: 0; }
.adp-plate small { display: block; color: var(--cs-ink5); font-size: 8.5px; letter-spacing: .09em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adp-plate b { display: block; margin-top: 1px; color: var(--cs-ink); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adp-plate span { display: block; margin-top: 2px; color: var(--cs-ink4); font-size: 10px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.adp-attrib {
  position: absolute; right: 6px; top: 6px; padding: 2px 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--cs-bg) 72%, transparent);
  color: var(--cs-ink5); font-size: 7.5px; letter-spacing: .02em;
}

.adp--feed { display: grid; gap: 8px; padding: 10px; }
.adp--feed .adp-card { border-color: color-mix(in srgb, var(--cs-blue) 30%, var(--cs-line)); }
.adp-ghost { display: grid; gap: 5px; padding: 4px 2px; }
.adp-ghost span { display: block; height: 8px; border-radius: 4px; background: var(--cs-line2); opacity: .55; }
.adp-ghost span:last-child { width: 62%; }

@media (max-width: 1120px) {
  .placement-grid, .creative-review-grid, .studio-hero-row { grid-template-columns: 1fr; }
  .placement-tile-well { height: 172px; }
}
@media (max-width: 860px) {
  .campaign-layout { grid-template-columns: 1fr; }
  .campaign-list { position: static; }
  .campaign-list-items { max-height: 260px; }
  .creative-editor-grid { grid-template-columns: 1fr; }
  .creative-preview-pane { position: static; }
  .editor-pane-toggle { display: inline-flex; justify-self: start; }
  .creative-editor-grid:not(.is-preview) .creative-preview-pane { display: none; }
  .creative-editor-grid.is-preview .creative-editor-form { display: none; }
  .status-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .campaign-submit { align-items: stretch; flex-direction: column; }
  .campaign-submit .btn { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .adp-pin i, .adp-pin::after { animation: none; }
  .placement-tile-cta i { transition: none; }
}

.gap-t { margin-top: 14px; }
.split2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; align-items: start; }
@media (max-width: 1050px) { .split2 { grid-template-columns: 1fr; } }
.metric i { display: block; margin-top: 4px; }
.dt .sub.mono { color: var(--cs-ink5); }

/* loading placeholder — shape only, never fake content */
.skel-stack { display: grid; gap: 10px; }
.skel-stack .skel:nth-child(3n+2) { width: 82%; }
.skel-stack .skel:nth-child(4n+3) { width: 91%; }
.skel { height: 38px; border-radius: 9px; background: linear-gradient(90deg, var(--cs-line2) 25%, var(--cs-line) 37%, var(--cs-line2) 63%);
        background-size: 400% 100%; animation: skel 1.3s ease infinite; }
@keyframes skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

/* ── command palette ─────────────────────────────────────────────────────── */
.pal-scrim { position: fixed; inset: 0; z-index: 80; background: rgba(4,7,14,.62);
  backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.pal { width: 100%; max-width: 560px; background: var(--cs-panel); border: 1px solid var(--cs-edge);
  border-radius: 14px; box-shadow: 0 28px 70px rgba(0,0,0,.6); overflow: hidden;
  animation: palIn 140ms cubic-bezier(.2,.7,.3,1); }
@keyframes palIn { from { opacity: 0; transform: translateY(-8px) scale(.985); } }
@media (prefers-reduced-motion: reduce) { .pal { animation: none; } }
.pal-in { width: 100%; box-sizing: border-box; background: transparent; color: var(--cs-ink);
  font: inherit; font-size: 15px; border: 0; border-bottom: 1px solid var(--cs-line); padding: 15px 18px; outline: none; }
.pal-in::placeholder { color: var(--cs-ink5); }
.pal-list { max-height: 46vh; overflow: auto; padding: 6px; }
.pal-row { display: flex; align-items: baseline; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  font: inherit; background: transparent; border: 0; border-radius: 8px; padding: 9px 12px; color: var(--cs-ink2); }
.pal-row.is-on { background: color-mix(in srgb, var(--cs-blue) 15%, transparent); color: var(--cs-ink); }
.pal-l { font-size: 13.5px; font-weight: 600; }
.pal-h { margin-left: auto; font-size: 11px; color: var(--cs-ink5); }
.pal-empty { padding: 22px; text-align: center; color: var(--cs-ink5); font-size: 12.5px; }
.pal-foot { display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--cs-line);
  font-size: 11px; color: var(--cs-ink5); }
.pal-foot b { color: var(--cs-ink3); font-weight: 700; }

.kbd-hint { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font: inherit; font-size: 12px;
  background: var(--cs-bg); color: var(--cs-ink4); border: 1px solid var(--cs-line); border-radius: 8px; padding: 6px 9px; }
.kbd-hint:hover { color: var(--cs-ink2); border-color: var(--cs-edge); }
.kbd-hint kbd { font-family: inherit; font-size: 10.5px; font-weight: 700; color: var(--cs-ink3);
  background: var(--cs-line2); border-radius: 4px; padding: 2px 5px; }
@media (max-width: 700px) { .kbd-hint span { display: none; } }

/* ── brand loader ─────────────────────────────────────────────────────────
   The same canonical artwork as the native app. It says "Loading" and
   nothing else — no invented percentage or fake progress steps. */
.bl-host { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center;
           background: var(--cs-bg, #0B1120); opacity: 1; transition: opacity .2s ease; }
.bl-host.is-out { opacity: 0; pointer-events: none; }
.bl-stage { display: grid; justify-items: center; gap: 14px; padding: 24px; }

.bl-logo {
  width: clamp(132px, 22vw, 184px); height: auto; display: block;
  object-fit: contain; border-radius: 22%;
  filter: drop-shadow(0 24px 42px rgba(0, 0, 0, .45));
  animation: bl-breathe 1.8s ease-in-out infinite;
}
@keyframes bl-breathe { 0%,100% { transform: scale(.985); opacity: .92; } 50% { transform: scale(1); opacity: 1; } }

.bl-word { font-size: 19px; font-weight: 800; letter-spacing: -.3px; color: var(--cs-ink, #F2F5FA); }
.bl-word span { color: var(--cs-blue, #4F8DF7); }
.bl-sub { font-size: 12.5px; color: var(--cs-ink5, #75819F); }

/* Not a lesser version: the sweep stops at its end state, fully lit. */
@media (prefers-reduced-motion: reduce) {
  .bl-logo { animation: none; }
  .bl-host { transition: none; }
}

.noscript-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.noscript-card { width: min(100%, 420px); box-sizing: border-box; padding: 28px; text-align: center;
  background: var(--cs-panel); border: 1px solid var(--cs-edge); border-radius: 16px; }
.noscript-card img { width: 84px; height: 84px; object-fit: contain; border-radius: 22%; }
.noscript-card h1 { margin: 14px 0 6px; font-size: 22px; }
.noscript-card p { margin: 0; color: var(--cs-ink3); line-height: 1.55; }

/* ── interaction accessibility baseline ───────────────────────────────────
   Full-size targets are the default. Fine-pointer desktop tables may use the
   compact button variant below; touch and narrow layouts retain 44px. */
:where(
  .btn, .b, .rail-toggle, .rail-out, .rail-item, .chipb, .hit, .mres,
  .kind, .kbd-hint, .pal-row, .seg button, .acc > summary,
  .medit > summary, .attention-action, .owner-links a, .owner-links button
) { min-height: 44px; }

.rail-toggle { width: 44px; height: 44px; }

:where(.fld, .form input, .form textarea, .form select,
       .filters input[type="search"], input[type="search"]) {
  min-height: 44px; box-sizing: border-box; border-color: var(--cs-edge);
}

:where(.btn--quiet, .b--ghost, .rail-toggle, .rail-out, .chipb,
       .hit, .mres, .kind, .kbd-hint) { border-color: var(--cs-edge); }

@media (min-width: 861px) and (pointer: fine) {
  .btn--sm, .b--sm,
  .dt .btn, .dt .b, .seats .btn, .accounts .btn, .acts .btn {
    min-height: 36px;
  }
}

@media (max-width: 620px) {
  .toast { width: calc(100% - 28px); box-sizing: border-box; text-align: center; border-radius: 10px; }
  .ctx-a .btn, .ctx-a .b { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .skip-link { transition: none; }
  .act-scrim, .act-drawer { animation: none; }
}

/* ── mail studio ─────────────────────────────────────────────────────────────
 * Two-pane workspace: template rail on the left, preview on the right. The
 * preview iframe is a sandboxed blob: document — the email's own CSS runs in
 * there, never in the portal, and vice versa. */
.ms { display: flex; flex-direction: column; gap: 14px; }
.ms-tabs { align-self: flex-start; }
.ms-split { display: grid; grid-template-columns: clamp(230px, 21vw, 320px) minmax(0, 1fr); gap: 14px; align-items: start; }
.ms-rail { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 12px; max-height: calc(100vh - 90px); overflow: auto; padding-right: 2px; }
.ms-fam { border: 1px solid var(--cs-line); border-radius: 12px; background: var(--cs-panel); padding: 10px; }
.ms-fam-t { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--cs-ink); padding: 2px 3px 8px; }
.ms-fam-note { padding: 0 3px 8px; margin: 0; }
.ms-group { margin-top: 6px; }
.ms-group-t { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--cs-ink5); padding: 6px 3px 4px; }
.ms-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; text-align: left;
  padding: 7px 9px; border: 1px solid transparent; border-radius: 8px; background: transparent; cursor: pointer; font: inherit; position: relative; }
.ms-item b { font-size: 12.5px; font-weight: 600; color: var(--cs-ink2); }
.ms-item .mono { font-size: 10.5px; color: var(--cs-ink5); }
.ms-item i { position: absolute; right: 9px; top: 8px; font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--cs-ink4);
  background: var(--cs-line2); border-radius: 999px; padding: 1px 7px; }
.ms-item:hover { background: var(--cs-line2); }
.ms-item.is-on { background: color-mix(in srgb, var(--cs-blue) 13%, transparent); border-color: color-mix(in srgb, var(--cs-blue) 34%, transparent); }
.ms-item.is-on b { color: var(--cs-ink); }
.ms-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ms-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.ms-head h2 { display: inline; font-size: 17px; margin: 0 8px 0 0; }
.ms-head .mono { font-size: 11px; color: var(--cs-ink5); margin-right: 8px; }
.ms-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ms-meta { border: 1px solid var(--cs-line); border-radius: 10px; background: var(--cs-panel); padding: 10px 13px; display: flex; flex-direction: column; gap: 4px; }
.ms-meta > div { font-size: 12.5px; color: var(--cs-ink2); display: flex; gap: 10px; align-items: baseline; }
.ms-meta b { color: var(--cs-ink); font-weight: 700; }
.ms-meta-k { flex: 0 0 76px; font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--cs-ink5); }
.ms-frame { border: 1px solid var(--cs-line); border-radius: 12px; overflow: hidden; background: #0B1120; display: flex; justify-content: center; }
.ms-frame iframe { width: min(100%, var(--msw, 640px)); height: min(72vh, 760px); border: 0; background: #0B1120; display: block; }
.ms-gate .mono { display: block; margin-top: 6px; word-break: break-word; }
.ms-vars { background: var(--cs-panel); }
.ms-vars > summary { user-select: none; }
.ms-vars .fine { padding: 8px 13px 0; margin: 0; }
.ms-varsbox { width: calc(100% - 26px); margin: 8px 13px; min-height: 150px; resize: vertical; font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px; line-height: 1.5; color: var(--cs-ink); background: var(--cs-bg); border: 1px solid var(--cs-line); border-radius: 8px; padding: 10px; }
.ms-varsbox:focus { outline: none; border-color: color-mix(in srgb, var(--cs-blue) 55%, transparent); }
.ms-varbtns { display: flex; gap: 8px; padding: 0 13px 12px; }
@media (max-width: 900px) {
  .ms-split { grid-template-columns: 1fr; }
  .ms-rail { position: static; max-height: none; }
}


/* ── auth: the traced country ────────────────────────────────────────────────
 * 51 real state outlines, zoomed past the frame, each traced by one dash rule
 * (pathLength=1) with a CSSOM-set stagger. Reduced motion shows the end
 * state — the whole map faintly lit — statically. */
.auth-map { position: absolute; inset: -14% -34% -28% -20%; pointer-events: none; }
.am-svg { width: 100%; height: 100%; }
.am-svg path { fill: none; stroke-linejoin: round; }
.am-base path { stroke: color-mix(in srgb, var(--cs-blue) 34%, transparent); stroke-width: 1; }
.am-trace path {
  stroke: color-mix(in srgb, var(--cs-blue) 90%, #fff 0%);
  stroke-width: 1.4;
  stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0;
  animation: am-trace 11s linear calc(var(--i, 0) * .16s) infinite;
}
@keyframes am-trace {
  0%   { stroke-dashoffset: 1; opacity: 0; }
  6%   { opacity: .85; }
  42%  { stroke-dashoffset: 0; opacity: .5; }
  72%  { stroke-dashoffset: 0; opacity: .14; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .am-trace path { animation: none; stroke-dashoffset: 0; opacity: .3; }
}

/* ── auth: safeguards line + ad previews ──────────────────────────────────── */
.auth-trust-line { margin: clamp(10px, 1.8vh, 18px) 0 0; color: var(--cs-ink4); font-size: 12px; letter-spacing: .01em; }
.auth-trust-line b { color: var(--cs-ink2); font-weight: 650; }
/* ── the ad showcase ─────────────────────────────────────────────────────────
 * Bottom of the LEFT panel: an assistant reply with the sponsored unit under
 * it (the shape the platform actually sells) and the sponsored map pin
 * beside it. Sized by its own content — the old fixed-height crop is what
 * made the cards look torn off at the bottom. */
.auth-ads {
  width: min(100%, 680px); min-height: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.auth-ads-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-ads-head b { color: var(--cs-ink2); font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.adx-tabs { display: inline-flex; gap: 2px; padding: 2px; background: var(--cs-line2); border-radius: 8px; }
.adx-tabs button {
  font: inherit; font-size: 11px; font-weight: 650; cursor: pointer;
  padding: 4px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--cs-ink4);
  transition: color .15s ease, background .15s ease;
}
.adx-tabs button:hover { color: var(--cs-ink2); }
.adx-tabs button.is-on { background: var(--cs-panel); color: var(--cs-ink); box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.adx { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; align-items: stretch; }
.auth-ads-fine { margin: 0; color: var(--cs-ink5); font-size: 10.5px; line-height: 1.5; }

/* The assistant reply + sponsored unit */
.adx-unit {
  min-width: 0; display: flex; flex-direction: column; gap: 6px;
  padding: 9px; border: 1px solid var(--cs-line); border-radius: 14px; background: var(--cs-bg);
}
.adx-chat { display: flex; align-items: flex-start; gap: 8px; }
.adx-chat::before {
  content: ""; width: 18px; height: 18px; flex: none; border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, var(--cs-blueHi), var(--cs-blue));
}
.adx-chat p { margin: 1px 0 0; color: var(--cs-ink3); font-size: 12px; line-height: 1.5; }
.adx-card {
  border: 1px solid var(--cs-line); border-radius: 12px; padding: 0 11px 9px;
  background: var(--cs-panel); overflow: hidden;
  display: flex; flex-direction: column; gap: 5px;
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.adx-card:focus-visible { outline: 2px solid var(--cs-blue); outline-offset: 2px; }
.adx-card:hover {
  border-color: color-mix(in srgb, var(--cs-blue) 45%, transparent);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
}
.adx-card.is-in .adx-body, .adx-card.is-in .adx-chips, .adx-card.is-in .adx-names b { animation: adx-in .35s ease both; }
@keyframes adx-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.adx-brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.adx-logo {
  width: 30px; height: 30px; flex: none; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--cs-blue) 22%, var(--cs-bg)); color: var(--cs-blueHi);
  font-size: 14px; font-weight: 800;
}
.adx-names { min-width: 0; display: block; }
.adx-names b { display: block; color: var(--cs-ink); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adx-names small { display: block; color: var(--cs-ink5); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.adx-badge {
  margin-left: auto; flex: none; font-style: normal; width: 18px; height: 18px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--cs-green) 20%, transparent); color: var(--cs-green);
  font-size: 10px; font-weight: 800;
}
.adx-body { margin: 0; color: var(--cs-ink3); font-size: 11.5px; line-height: 1.5; }
.adx-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.adx-chips span {
  padding: 3px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 600;
  background: var(--cs-line2); color: var(--cs-ink3); border: 1px solid var(--cs-line);
  transition: border-color .15s ease, color .15s ease;
}
.adx-card:hover .adx-chips span { color: var(--cs-ink2); border-color: var(--cs-edge); }
.adx-cta { color: var(--cs-blue); font-size: 11.5px; font-weight: 650; }
.adx-cta i { font-style: normal; display: inline-block; transition: transform .18s ease; }
.adx-card:hover .adx-cta i { transform: translateX(3px); }

/* The sponsored map pin */
.adx-map {
  position: relative; min-height: 118px; border: 1px solid var(--cs-line); border-radius: 14px;
  overflow: hidden; background: var(--cs-bg);
}
.adx-map-roads {
  position: absolute; inset: 0; opacity: .5;
  background:
    linear-gradient(90deg, transparent 24%, var(--cs-line2) 24.5%, transparent 25%),
    linear-gradient(0deg, transparent 38%, var(--cs-line2) 38.5%, transparent 39%),
    linear-gradient(52deg, transparent 62%, var(--cs-line2) 62.4%, transparent 63%),
    linear-gradient(-38deg, transparent 55%, var(--cs-line2) 55.4%, transparent 56%);
}
.adx-pin { position: absolute; left: 58%; top: 30%; width: 14px; height: 14px; }
.adx-pin i {
  position: absolute; inset: 0; border-radius: 999px 999px 999px 0; transform: rotate(-45deg);
  background: var(--cs-blue); box-shadow: 0 4px 10px rgba(0, 0, 0, .45);
}
.adx-pin::after {
  content: ""; position: absolute; inset: -7px; border-radius: 999px;
  border: 2px solid color-mix(in srgb, var(--cs-blue) 55%, transparent);
  animation: adx-ring 2.4s ease-out infinite;
}
.adx-pin.is-drop i { animation: adx-drop .4s cubic-bezier(.2, .9, .3, 1.3) both; }
@keyframes adx-drop { from { transform: rotate(-45deg) translate(-10px, -10px); opacity: 0; } to { transform: rotate(-45deg); opacity: 1; } }
@keyframes adx-ring { 0% { transform: scale(.5); opacity: .9; } 80%, 100% { transform: scale(1.9); opacity: 0; } }
.adx-map-card {
  position: absolute; left: 8px; right: 8px; bottom: 8px;
  padding: 7px 10px; border-radius: 9px;
  background: color-mix(in srgb, var(--cs-panel) 94%, transparent); border: 1px solid var(--cs-line);
}
.adx-map-card small { display: block; color: var(--cs-ink5); font-size: 8.5px; letter-spacing: .09em; }
.adx-map-card b { display: block; color: var(--cs-ink); font-size: 11px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  .adx-pin::after, .adx-pin.is-drop i, .adx-card.is-in .adx-body, .adx-card.is-in .adx-chips, .adx-card.is-in .adx-names b { animation: none; }
}
/* Short windows compress the showcase instead of tearing it. */
@media (max-height: 600px) {
  .adx { grid-template-columns: minmax(0, 1fr); }
  .adx-map { display: none; }
  .adx-chat { display: none; }
}
@media (max-height: 480px) { .auth-ads { display: none; } }

/* ── auth: federated doors, divider, identity chip ────────────────────────── */
.oauth-col { display: grid; gap: 9px; margin: 4px 0 0; }
.btn-oauth {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 10px 16px; border-radius: 9px; cursor: pointer;
  font: inherit; font-size: 13.5px; font-weight: 650; border: 1px solid transparent;
}
.btn-oauth--google { background: #fff; color: #1f1f1f; }
.btn-oauth--google:hover { background: #f1f3f6; }
.btn-oauth--apple { background: #000; color: #fff; border-color: var(--cs-edge); }
.btn-oauth--apple:hover { background: #111; }
.btn-oauth:disabled { opacity: .5; cursor: progress; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--cs-ink5); font-size: 11px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--cs-line); }
.auth-idchip {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  margin: 6px 0 12px; padding: 7px 12px; border-radius: 999px; cursor: pointer;
  background: var(--cs-line2); border: 1px solid var(--cs-line); color: var(--cs-ink2);
  font: inherit; font-size: 12.5px;
}
.auth-idchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-idchip i { font-style: normal; color: var(--cs-blue); font-weight: 650; }
.auth-idchip:hover { border-color: var(--cs-edge); color: var(--cs-ink); }


/* ── sign-up: the kind picker ────────────────────────────────────────────────
 * Five doors, one per organization type. Buttons, not radios: choosing is the
 * step, so it advances the step. */
.kind-pick { display: grid; gap: 8px; margin: 6px 0 2px; }
.kind-pick-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  gap: 2px 10px; text-align: left; cursor: pointer; font: inherit;
  padding: 10px 13px; border: 1px solid var(--cs-line); border-radius: 10px;
  background: var(--cs-line2); color: var(--cs-ink2); min-height: 44px;
}
.kind-pick-item b { grid-column: 1; grid-row: 1; justify-self: start; color: var(--cs-ink); font-size: 13px; }
.kind-pick-item small { grid-column: 1; grid-row: 2; color: var(--cs-ink4); font-size: 11px; line-height: 1.45; }
.kind-pick-item i { grid-column: 2; grid-row: 1 / span 2; font-style: normal; color: var(--cs-ink5); font-size: 15px; }
.kind-pick-item:hover { border-color: color-mix(in srgb, var(--cs-blue) 45%, transparent); background: color-mix(in srgb, var(--cs-blue) 9%, transparent); }
.kind-pick-item:hover i { color: var(--cs-blue); }

/* ── the waiting room ────────────────────────────────────────────────────────
 * A vertical timeline: two done, one live, one still to come. The live dot
 * breathes; under reduced motion it simply stays lit. */
.wait-steps { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 0; }
.wait-step { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; position: relative; padding-bottom: 18px; }
.wait-step:last-child { padding-bottom: 0; }
.wait-step::before {
  content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px;
  background: var(--cs-line);
}
.wait-step:last-child::before { display: none; }
.wait-step > i {
  width: 22px; height: 22px; border-radius: 999px; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--cs-line); background: var(--cs-panel); z-index: 1;
}
.wait-step[data-state="done"] > i { border-color: var(--cs-green); background: color-mix(in srgb, var(--cs-green) 20%, var(--cs-panel)); }
.wait-step[data-state="done"] > i::after { content: "✓"; color: var(--cs-green); font-size: 11px; font-weight: 800; }
.wait-step[data-state="now"] > i { border-color: var(--cs-blue); }
.wait-step[data-state="now"] > i::after {
  content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--cs-blue);
  animation: wait-pulse 2.2s ease-in-out infinite;
}
.wait-step[data-state="attn"] > i { border-color: var(--cs-amber); }
.wait-step[data-state="attn"] > i::after { content: "!"; color: var(--cs-amber); font-size: 12px; font-weight: 800; }
.wait-step[data-state="todo"] > i::after { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--cs-ink5); }
.wait-step b { display: block; color: var(--cs-ink); font-size: 13.5px; }
.wait-step[data-state="todo"] b { color: var(--cs-ink3); }
.wait-step span { display: block; margin-top: 2px; color: var(--cs-ink4); font-size: 12px; line-height: 1.5; }
@keyframes wait-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.72); } }
@media (prefers-reduced-motion: reduce) { .wait-step[data-state="now"] > i::after { animation: none; } }
.waitroom .note2 { margin-top: 16px; }


/* ── the ad cover band: a drawn scene per advertiser, never a fake photo ── */
.adx-media {
  height: 44px; margin: 0 -11px 3px; position: relative; overflow: hidden;
  border-bottom: 1px solid var(--cs-line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--cs-blue) 14%, var(--cs-bg)), var(--cs-bg));
}
.adx-media svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.adx-card.is-in .adx-media svg { animation: adx-media-in .45s ease both; }
@keyframes adx-media-in { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }

/* storefront */
.a-wall   { fill: color-mix(in srgb, var(--cs-blue) 10%, var(--cs-panel)); }
.a-stripe-a { fill: color-mix(in srgb, var(--cs-blue) 55%, var(--cs-panel)); }
.a-stripe-b { fill: color-mix(in srgb, var(--cs-blue) 24%, var(--cs-panel)); }
.a-awning { animation: a-shimmer 5.5s ease-in-out infinite; }
@keyframes a-shimmer { 0%, 100% { opacity: 1; } 50% { opacity: .75; } }
.a-glass  { fill: color-mix(in srgb, var(--cs-blueHi) 16%, var(--cs-bg)); stroke: var(--cs-line); }
.a-door   { fill: color-mix(in srgb, var(--cs-blue) 30%, var(--cs-bg)); }
.a-knob   { fill: var(--cs-blueHi); }
.a-shelf  { fill: color-mix(in srgb, var(--cs-ink3) 40%, transparent); }

/* range lanes */
.a-lane   { fill: color-mix(in srgb, var(--cs-blue) 13%, var(--cs-bg)); stroke: var(--cs-line); stroke-width: .5; }
.a-target { transform-box: fill-box; transform-origin: center; animation: a-pulse 3.2s ease-in-out infinite; }
.a-target:nth-child(2) { animation-delay: .5s; }
.a-target:nth-child(3) { animation-delay: 1s; }
.a-target:nth-child(4) { animation-delay: 1.5s; }
@keyframes a-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(.88); } }
.a-ring1  { fill: none; stroke: color-mix(in srgb, var(--cs-blue) 70%, transparent); stroke-width: 1.6; }
.a-ring2  { fill: none; stroke: color-mix(in srgb, var(--cs-blue) 40%, transparent); stroke-width: 1.2; }
.a-ring3  { fill: var(--cs-blueHi); }

/* instructor */
.a-board  { fill: color-mix(in srgb, var(--cs-blue) 12%, var(--cs-panel)); stroke: var(--cs-line); }
.a-chalk  { fill: none; stroke: color-mix(in srgb, var(--cs-blueHi) 75%, transparent); stroke-width: 1.4; stroke-linecap: round;
            stroke-dasharray: 60; stroke-dashoffset: 60; animation: a-draw 2.6s ease .3s forwards; }
@keyframes a-draw { to { stroke-dashoffset: 0; } }
.a-cap-top  { fill: color-mix(in srgb, var(--cs-blue) 55%, var(--cs-panel)); }
.a-cap-body { fill: none; stroke: color-mix(in srgb, var(--cs-blue) 45%, transparent); stroke-width: 2; }
.a-tassel   { fill: none; stroke: var(--cs-blueHi); stroke-width: 1.4; stroke-linecap: round; }
.a-check    { fill: none; stroke: var(--cs-green); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
              stroke-dasharray: 40; stroke-dashoffset: 40; animation: a-draw 1s ease .6s forwards; }

/* ── map unit: blocks, self-drawing route, travelling pin ── */

.adx-route { position: absolute; inset: 0; width: 100%; height: 100%; }
.adx-route path {
  fill: none; stroke: color-mix(in srgb, var(--cs-blueHi) 75%, transparent);
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 0;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 3px color-mix(in srgb, var(--cs-blue) 60%, transparent));
}
.adx-route path.is-draw { animation: adx-route-draw 1.1s ease-out both; }
@keyframes adx-route-draw {
  from { stroke-dashoffset: 1; opacity: 0; }
  20% { opacity: 1; }
  to { stroke-dashoffset: 0; opacity: 1; }
}
.adx-pin { transition: left .5s cubic-bezier(.3, .8, .3, 1), top .5s cubic-bezier(.3, .8, .3, 1); }

/* ── the rotation clock ── */
.adx-tabs { position: relative; }
.adx-progress {
  position: absolute; left: 6px; right: 6px; bottom: -4px; height: 2px;
  border-radius: 2px; background: var(--cs-line2); overflow: hidden;
}
.adx-progress::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: color-mix(in srgb, var(--cs-blue) 60%, transparent); border-radius: 2px;
}
.adx-progress.is-run::after { animation: adx-clock 7s linear forwards; }
.adx-progress.is-held::after { animation-play-state: paused; }
@keyframes adx-clock { to { transform: translateX(0); } }

@media (prefers-reduced-motion: reduce) {
  .a-awning, .a-target, .a-chalk, .a-check, .adx-card.is-in .adx-media svg, .adx-route path.is-draw, .adx-progress.is-run::after, .adx-nav-dot.is-go, .adx-pin.is-drop .adx-callout { animation: none; }
  .adx-callout { opacity: 1; }
  .adx-nav-dot { opacity: 0; }
  .a-chalk, .a-check { stroke-dashoffset: 0; }
  .adx-route path { stroke-dashoffset: 0; opacity: 1; }
  .adx-pin { transition: none; }
}
@media (max-height: 640px) { .adx-media { display: none; } }

/* ── generated ad assets (see assets/ads/README.md) ── */
.adx-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.adx-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.adx-logo { overflow: hidden; }
.adx-map-base {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: .55; filter: saturate(.8);
}
.adx-map-base ~ .adx-map-roads { opacity: .25; }
.adx-map-base ~ .adx-map-blocks { display: none; }

/* ── the application flow ────────────────────────────────────────────────────
 * A step rail on the left, one small step at a time on the right, review at
 * the end. The rail's done-steps are buttons back in time; todo-steps are
 * not — the road ahead is walked, not jumped. */
.af-card { max-width: 880px; }
.af-split { display: grid; grid-template-columns: clamp(150px, 18vw, 210px) minmax(0, 1fr); gap: clamp(16px, 3vw, 34px); align-items: start; }
.af-rail { list-style: none; margin: 6px 0 0; padding: 0; position: sticky; top: 76px; display: grid; }
.af-rail-step { display: flex; align-items: center; gap: 10px; position: relative; padding: 9px 0; color: var(--cs-ink4); font-size: 12.5px; }
.af-rail-step::before { content: ""; position: absolute; left: 11px; top: 30px; bottom: -4px; width: 2px; background: var(--cs-line); }
.af-rail-step:last-child::before { display: none; }
.af-rail-step i {
  width: 23px; height: 23px; flex: none; border-radius: 999px; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 11px; font-weight: 700;
  border: 2px solid var(--cs-line); background: var(--cs-panel); color: var(--cs-ink4);
}
.af-rail-step[data-state="done"] { color: var(--cs-ink3); cursor: pointer; }
.af-rail-step[data-state="done"] i { border-color: var(--cs-green); color: var(--cs-green); background: color-mix(in srgb, var(--cs-green) 14%, var(--cs-panel)); }
.af-rail-step[data-state="done"]:hover { color: var(--cs-ink); }
.af-rail-step[data-state="now"] { color: var(--cs-ink); font-weight: 650; }
.af-rail-step[data-state="now"] i { border-color: var(--cs-blue); color: var(--cs-blueHi); }
.af-main { min-width: 0; }
.af-step { animation: af-in .28s ease both; }
@keyframes af-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.af-why { margin: 12px 0 16px; }
.af-field { display: block; }
.af-label i { font-style: normal; color: var(--cs-ink5); font-weight: 400; font-size: 11px; }
.af-field small { display: block; margin-top: 4px; color: var(--cs-ink4); font-size: 11.5px; line-height: 1.5; }
.af-field .is-bad { border-color: color-mix(in srgb, var(--cs-red) 60%, transparent); }
.af-err { display: block; margin-top: 4px; color: var(--cs-red); font-size: 11.5px; font-style: normal; }
.af-state { text-transform: uppercase; width: 90px; }
.af-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; }
.af-nav .btn:last-child { margin-left: auto; }
.af-draftnote { margin-top: 10px; color: var(--cs-ink5); }
.af-review { border: 1px solid var(--cs-line); border-radius: 12px; overflow: hidden; margin: 14px 0 16px; }
.af-review table { width: 100%; border-collapse: collapse; }
.af-review th, .af-review td { padding: 9px 13px; font-size: 12.5px; text-align: left; border-bottom: 1px solid var(--cs-line2); vertical-align: top; }
.af-review tr:last-child :is(th, td) { border-bottom: 0; }
.af-review th { color: var(--cs-ink4); font-weight: 600; width: 34%; }
.af-review td { color: var(--cs-ink); }
.af-edit { width: 1%; }
.af-edit button { font: inherit; font-size: 11.5px; font-weight: 650; color: var(--cs-blue); background: none; border: 0; cursor: pointer; padding: 0; }
.af-edit button:hover { color: var(--cs-blueHi); }
@media (prefers-reduced-motion: reduce) { .af-step { animation: none; } }
@media (max-width: 720px) { .af-split { grid-template-columns: 1fr; } .af-rail { position: static; display: flex; gap: 14px; overflow-x: auto; } .af-rail-step { padding: 4px 0; } .af-rail-step::before { display: none; } .af-rail-step span { white-space: nowrap; } }

/* ── sign-up flow chrome (inside the auth card) ── */
.af-progress { height: 3px; border-radius: 3px; background: var(--cs-line2); overflow: hidden; margin-bottom: 12px; }
.af-progress i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--cs-blue); transition: width .35s ease; }
.af-linklike { font: inherit; font-size: inherit; color: var(--cs-blue); background: none; border: 0; padding: 0; cursor: pointer; }
.af-linklike:hover { color: var(--cs-blueHi); }
#auth-body .af-review { margin: 12px 0 14px; }
#auth-body .af-review th { width: 38%; }
@media (prefers-reduced-motion: reduce) { .af-progress i { transition: none; } }

/* ── the license gate ── */
.ffl-gate { border: 1px solid var(--cs-line); border-radius: 12px; padding: 12px 14px; background: var(--cs-bg); display: grid; gap: 8px; animation: af-in .25s ease both; }
.ffl-gate[data-tone="ok"] { border-color: color-mix(in srgb, var(--cs-green) 40%, transparent); }
.ffl-gate[data-tone="warn"] { border-color: color-mix(in srgb, var(--cs-amber) 45%, transparent); }
.ffl-gate > b { color: var(--cs-ink); font-size: 13px; }
.ffl-gate[data-tone="ok"] > b { color: var(--cs-green); }
.ffl-gate[data-tone="warn"] > b { color: var(--cs-amber); }
.ffl-gate > span { color: var(--cs-ink4); font-size: 11.5px; line-height: 1.5; }
.ffl-gate .af-nav { margin-top: 2px; }
.ffl-record { border: 1px solid var(--cs-line2); border-radius: 9px; padding: 9px 12px; background: var(--cs-panel); }
.ffl-record-name { color: var(--cs-ink); font-size: 13.5px; font-weight: 700; }
.ffl-record-meta { color: var(--cs-ink3); font-size: 11.5px; margin-top: 1px; }
.ffl-record-line { color: var(--cs-ink4); font-size: 11px; margin-top: 5px; line-height: 1.45; }
.ffl-record-line b { color: var(--cs-ink2); }
@media (prefers-reduced-motion: reduce) { .ffl-gate { animation: none; } }

/* ── the email-code panel inside the license gate (flag-gated) ── */
.ffl-code { border: 1px solid var(--cs-line2); border-radius: 9px; padding: 10px 12px; background: var(--cs-panel); display: grid; gap: 6px; }
.ffl-code[data-tone="ok"] { border-color: color-mix(in srgb, var(--cs-green) 40%, transparent); }
.ffl-code > b { color: var(--cs-ink); font-size: 12.5px; }
.ffl-code[data-tone="ok"] > b { color: var(--cs-green); }
.ffl-code > span { color: var(--cs-ink4); font-size: 11px; line-height: 1.5; }
.ffl-code > span b { color: var(--cs-ink2); }
.ffl-code .btn { justify-self: start; }
.ffl-code-row { display: flex; gap: 8px; }
.ffl-code-row input { width: 110px; text-align: center; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 15px; letter-spacing: 4px; }


/* ── hero: entrance, highlight, live chips ───────────────────────────────────
 * The entrance runs once — authShell repaints only the card body afterwards,
 * so step changes never replay it. */
.auth-hero .kicker, .auth-hero h1, .auth-hero > p, .auth-hero .auth-trust-line {
  animation: hero-up .55s cubic-bezier(.2, .7, .3, 1) both;
}
.auth-hero h1 { animation-delay: .08s; }
.auth-hero > p { animation-delay: .16s; }
.auth-hero .auth-trust-line { animation-delay: .26s; }
@keyframes hero-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-hl { font-style: normal; position: relative; white-space: nowrap; }
.hero-hl::after {
  content: ""; position: absolute; left: 1%; right: 1%; bottom: .04em; height: .12em;
  border-radius: 99px; background: linear-gradient(90deg, var(--cs-blue), color-mix(in srgb, var(--cs-blue) 30%, transparent));
  transform-origin: left center; transform: scaleX(0);
  animation: hero-underline .7s cubic-bezier(.2, .7, .2, 1) .55s forwards;
  z-index: -1; opacity: .8;
}
@keyframes hero-underline { to { transform: scaleX(1); } }
.auth-trust-line { display: flex; flex-wrap: wrap; gap: 8px; }
.trust-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--cs-line); background: color-mix(in srgb, var(--cs-panel) 70%, transparent);
  transition: border-color .2s ease, transform .2s ease;
}
.trust-chip:hover { border-color: color-mix(in srgb, var(--cs-green) 40%, transparent); transform: translateY(-1px); }
.trust-chip i {
  width: 7px; height: 7px; border-radius: 999px; background: var(--cs-green);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--cs-green) 45%, transparent);
  animation: chip-pulse 3s ease-out infinite;
}
.trust-chip:nth-child(2) i { animation-delay: 1s; }
.trust-chip:nth-child(3) i { animation-delay: 2s; }
@keyframes chip-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--cs-green) 45%, transparent); } 60%, 100% { box-shadow: 0 0 0 7px transparent; } }
.trust-chip b { color: var(--cs-ink2); font-size: 12px; font-weight: 650; }

/* ── showcase: pans, logo pins, map thumbs ── */
.adx-media img { transition: transform 6s ease; }
.adx-card:hover .adx-media img { transform: scale(1.08) translateX(-8px); }
.adx-card:active { transform: translateY(0) scale(.995); }
.adx-map { cursor: pointer; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.adx-map:hover { border-color: color-mix(in srgb, var(--cs-blue) 45%, transparent); transform: translateY(-1px); box-shadow: 0 10px 28px rgba(0, 0, 0, .35); }
.adx-map:focus-visible { outline: 2px solid var(--cs-blue); outline-offset: 2px; }
.adx-map-base { opacity: .8; filter: saturate(.9); }
.adx-map:hover .adx-pin i { transform: rotate(-45deg) scale(1.15); }
.adx-pin i { transition: transform .2s ease; }
/* The driving dot: CSS motion path along the same street route. */
.adx-nav-dot { fill: var(--cs-blueHi); opacity: 0; offset-rotate: 0deg; }
.adx-nav-dot.is-go { animation: adx-drive 1.15s cubic-bezier(.4, 0, .3, 1) both; }
@keyframes adx-drive {
  0% { offset-distance: 0%; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}

/* The callout IS the pin ad — the third placement, anchored to its pin. */
.adx-callout {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 5px 9px; border-radius: 9px;
  background: color-mix(in srgb, var(--cs-panel) 96%, transparent);
  border: 1px solid var(--cs-line); box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
}
.adx-callout::after {
  content: ""; position: absolute; left: 50%; bottom: -5px; width: 8px; height: 8px;
  transform: translateX(-50%) rotate(45deg);
  background: inherit; border-right: 1px solid var(--cs-line); border-bottom: 1px solid var(--cs-line);
}
.adx-pin.is-drop .adx-callout { animation: adx-callout-pop .3s cubic-bezier(.2, .9, .3, 1.4) 1.05s both; }
@keyframes adx-callout-pop { from { opacity: 0; transform: translateX(-50%) translateY(6px) scale(.85); } to { opacity: 1; transform: translateX(-50%); } }
.adx-callout-thumb { width: 20px; height: 20px; flex: none; border-radius: 5px; overflow: hidden; border: 1px solid var(--cs-line2); }
.adx-callout-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adx-callout-copy b { display: block; color: var(--cs-ink); font-size: 10px; line-height: 1.2; max-width: 128px; overflow: hidden; text-overflow: ellipsis; }
.adx-callout-copy small { display: block; color: var(--cs-ink5); font-size: 7.5px; letter-spacing: .1em; }
.adx-map:hover .adx-callout { border-color: color-mix(in srgb, var(--cs-blue) 45%, transparent); }

.adx-map-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; opacity: .92; }
.adx-attrib {
  position: absolute; right: 6px; top: 6px;
  padding: 2px 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--cs-bg) 72%, transparent);
  color: var(--cs-ink5); font-size: 7.5px; letter-spacing: .02em;
}
/* The listing plate — the SECOND ad on this unit, distinct from the pin
   callout: the callout sells the pin placement, the plate sells the listing. */
.adx-map-card { display: flex; align-items: center; gap: 9px; }
.adx-map-thumb { width: 34px; height: 34px; flex: none; border-radius: 7px; overflow: hidden; border: 1px solid var(--cs-line2); }
.adx-map-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adx-map-copy { min-width: 0; }
.adx-map-copy b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  .auth-hero .kicker, .auth-hero h1, .auth-hero > p, .auth-hero .auth-trust-line { animation: none; }
  .hero-hl::after { animation: none; transform: scaleX(1); }
  .trust-chip i { animation: none; }
  .adx-media img, .adx-pin i, .trust-chip, .adx-map { transition: none; }
}

/* ── the living map ──────────────────────────────────────────────────────────
 * The whole scene — image, route, pin — drifts as ONE transform, so the route
 * can never detach from the streets it traces. */
.adx-map-scene { position: absolute; inset: 0; animation: map-drift 26s ease-in-out infinite alternate; transition: transform .6s ease; }
@keyframes map-drift { from { transform: scale(1.02) translate(0.6%, -0.5%); } to { transform: scale(1.07) translate(-1.2%, 0.8%); } }
.adx-map:hover .adx-map-scene { animation-play-state: paused; transform: scale(1.06); }

/* Traffic on the route: a fine dash that starts flowing once the draw lands. */
.adx-route-flow {
  fill: none; stroke: color-mix(in srgb, #fff 65%, var(--cs-blueHi));
  stroke-width: .9; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: .012 .05; opacity: 0;
  vector-effect: non-scaling-stroke;
}
.adx-route-flow.is-flowing { animation: flow-in .4s ease 1.25s forwards, flow-run 2.6s linear 1.25s infinite; }
@keyframes flow-in { to { opacity: .9; } }
@keyframes flow-run { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -.31; } }

/* Arrival: one expanding burst when the dot reaches the pin. */
.adx-pin.is-drop i::before {
  content: ""; position: absolute; inset: -3px; border-radius: inherit;
  border: 2px solid var(--cs-blueHi); opacity: 0;
  animation: pin-burst .6s ease-out 1.1s;
}
@keyframes pin-burst { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }

/* ── the sponsored card, dressed up ──────────────────────────────────────────
 * A gradient hairline that brightens on hover, a scrim under the cover, a
 * breathing assistant avatar, staggered chips, a CTA that fills. */
.adx-card { border: 1px solid transparent; background-clip: padding-box; }
.adx-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: 13px; padding: 1px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--cs-blue) 55%, transparent), transparent 45%, color-mix(in srgb, var(--cs-blue) 25%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none; opacity: .5; transition: opacity .25s ease;
}
.adx-card { position: relative; }
.adx-card:hover::before { opacity: 1; }
.adx-media::after {
  content: ""; position: absolute; inset: 55% 0 0 0;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--cs-panel) 85%, transparent));
  pointer-events: none;
}
.adx-chat::before { animation: avatar-breathe 3.4s ease-in-out infinite; }
@keyframes avatar-breathe {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--cs-blue) 35%, transparent); }
  50% { box-shadow: 0 0 0 5px transparent; }
}
.adx-chat p.is-typing { min-height: 1.2em; min-width: 40px; }
.adx-chat p.is-typing::after {
  content: "● ● ●"; font-size: 7px; letter-spacing: 2px; color: var(--cs-ink4);
  animation: typing-fade 1s ease-in-out infinite;
}
@keyframes typing-fade { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.adx-chat p.is-said { animation: adx-in .3s ease both; }
.adx-card.is-in .adx-chips span { animation: adx-in .3s ease both; }
.adx-card.is-in .adx-chips span:nth-child(2) { animation-delay: .06s; }
.adx-card.is-in .adx-chips span:nth-child(3) { animation-delay: .12s; }
.adx-badge { transition: transform .2s ease; }
.adx-card.is-in .adx-badge { animation: badge-pop .35s cubic-bezier(.2, .9, .3, 1.5) .2s both; }
@keyframes badge-pop { from { transform: scale(0); } to { transform: scale(1); } }
.adx-cta {
  align-self: flex-start; padding: 4px 11px; margin: 1px -2px 0;
  border-radius: 999px; border: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.adx-card:hover .adx-cta {
  background: color-mix(in srgb, var(--cs-blue) 15%, transparent);
  border-color: color-mix(in srgb, var(--cs-blue) 35%, transparent);
  color: var(--cs-blueHi);
}
@media (prefers-reduced-motion: reduce) {
  .adx-map-scene, .adx-route-flow.is-flowing, .adx-pin.is-drop i::before,
  .adx-chat::before, .adx-chat p.is-typing::after, .adx-chat p.is-said,
  .adx-card.is-in .adx-chips span, .adx-card.is-in .adx-badge { animation: none; }
  .adx-route-flow { opacity: 0; }
  .adx-map-scene { transform: none; }
}

/* ── the flight between states ───────────────────────────────────────────────
 * The departing city lifts off — up and away with a blur — while the arriving
 * one lands from altitude. Two half-second moves that read as one camera. */
.adx-scene-ghost { pointer-events: none; z-index: 2; animation: scene-liftoff .55s cubic-bezier(.5, 0, .8, .4) both; }
@keyframes scene-liftoff {
  from { opacity: 1; transform: scale(1); filter: blur(0); }
  to { opacity: 0; transform: scale(.55); filter: blur(4px); }
}
.adx-map-scene.is-landing { animation: scene-land .7s cubic-bezier(.2, .7, .25, 1) .25s both, map-drift 26s ease-in-out 1s infinite alternate; }
@keyframes scene-land {
  from { opacity: 0; transform: scale(1.9); filter: blur(5px); }
  to { opacity: 1; transform: scale(1.02); filter: blur(0); }
}

/* The city label on the plate. */
.adx-map-copy small i { font-style: normal; color: var(--cs-ink4); }

/* Covers get room to be photographs. */
.adx-media { height: clamp(48px, 9vh, 78px); }
@media (prefers-reduced-motion: reduce) {
  .adx-scene-ghost { animation: none; display: none; }
  .adx-map-scene.is-landing { animation: none; }
}

/* ── the flight's altitude beat: the country between two cities ── */
.adx-nation { position: absolute; inset: 0; z-index: 3; background: var(--cs-bg); animation: nation-in .35s ease .3s both; }
@keyframes nation-in { from { opacity: 0; } to { opacity: 1; } }
.adx-nation svg { width: 100%; height: 100%; transition: transform .5s cubic-bezier(.5, 0, .8, .4); }
.adx-nation.is-diving svg { transform: scale(2.6); }
.adx-nation.is-diving { animation: nation-out .3s ease .25s both; }
@keyframes nation-out { to { opacity: 0; } }
.adx-nation-states path { fill: color-mix(in srgb, var(--cs-panel) 60%, transparent); stroke: color-mix(in srgb, var(--cs-blue) 26%, transparent); stroke-width: 1; }
.adx-nation-states path.is-from { fill: color-mix(in srgb, var(--cs-blue) 18%, transparent); stroke: color-mix(in srgb, var(--cs-blue) 55%, transparent); }
.adx-nation-states path.is-to { fill: color-mix(in srgb, var(--cs-blue) 30%, transparent); stroke: var(--cs-blueHi); stroke-width: 2; animation: state-beacon 1s ease-in-out infinite; }
@keyframes state-beacon { 0%, 100% { fill-opacity: .5; } 50% { fill-opacity: 1; } }
.adx-arc { fill: none; stroke: var(--cs-blueHi); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; vector-effect: non-scaling-stroke; }
.adx-arc.is-flying { animation: arc-draw .7s ease-out .35s both; }
@keyframes arc-draw { from { stroke-dashoffset: 1; opacity: 0; } 15% { opacity: .95; } to { stroke-dashoffset: 0; opacity: .95; } }
.adx-arc-dot { fill: #fff; opacity: 0; }
.adx-arc-dot.is-flying { animation: arc-fly .7s ease-out .35s both; }
@keyframes arc-fly { 0% { offset-distance: 0%; opacity: 0; } 12% { opacity: 1; } 90% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
.adx-map-scene.is-waiting { opacity: 0; }

/* ── the big map behind the card: a closer, slower camera, with life ── */
.auth-map { inset: -30% -55% -45% -35%; }
.am-camera { position: absolute; inset: 0; animation: am-drift 70s ease-in-out infinite alternate; }
@keyframes am-drift { from { transform: scale(1.05) translate(1.2%, -1%); } to { transform: scale(1.24) translate(-2.4%, 1.6%); } }
.am-ping { position: absolute; width: 7px; height: 7px; border-radius: 999px; background: var(--cs-blueHi); opacity: 0; }
.am-ping::after { content: ""; position: absolute; inset: -6px; border-radius: 999px; border: 1.5px solid var(--cs-blueHi); }
.am-ping:nth-of-type(1) { left: 30%; top: 43%; animation: am-ping 9s ease-out .5s infinite; }
.am-ping:nth-of-type(2) { left: 55%; top: 60%; animation: am-ping 9s ease-out 2.7s infinite; }
.am-ping:nth-of-type(3) { left: 68%; top: 34%; animation: am-ping 9s ease-out 5.1s infinite; }
.am-ping:nth-of-type(4) { left: 42%; top: 68%; animation: am-ping 9s ease-out 7.3s infinite; }
@keyframes am-ping {
  0%, 86% { opacity: 0; transform: scale(.4); }
  88% { opacity: .95; transform: scale(1); }
  96% { opacity: .35; transform: scale(1.7); }
  100% { opacity: 0; transform: scale(2); }
}
@media (prefers-reduced-motion: reduce) {
  .adx-nation, .adx-nation.is-diving, .adx-nation-states path.is-to, .adx-arc.is-flying, .adx-arc-dot.is-flying, .am-camera, .am-ping { animation: none; }
  .adx-nation { display: none; }
  .adx-map-scene.is-waiting { opacity: 1; }
  .am-ping { opacity: 0; }
}
