/* Kriton Shield. Warm paper and ink by day, warm black and lit brass by night. Everything is frosted glass over
   a backdrop with depth: panels afloat on it, lighter tiles raised on the panels, pressed wells for what you
   type into. Oxblood only for what was stopped. */
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/hanken.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --ground: #E6DECE;
  --ink: #0E0D0B;
  --ink-2: #3B352D;
  --ink-3: #463F36;
  --line: rgba(14, 13, 11, .18);
  --rule: rgba(14, 13, 11, .09);
  --brass: #A8894F;
  --ox: #5A1A1F;
  --ox-tint: #F2E3DE;
  --sand: #ECE1CA;
  --bar: #CDBFA6;
  --sel: #E2D2AE;
  --solid: #0E0D0B;
  --solid-a: #37322B;
  --on-solid: #F3EEE4;
  --lvl-read: rgba(255, 255, 255, .8);
  --hover: rgba(14, 13, 11, .055);
  --scrim: rgba(14, 13, 11, .3);
  --dim: rgba(14, 13, 11, .46);

  /* Glass. Panels blur what is behind them; tiles are a lighter sheet on a panel; wells are pressed into either.
     Light comes from the top left, so every sheet has a lit edge there and a soft long shadow opposite. */
  --frost: blur(30px) saturate(1.5);
  --glass: linear-gradient(135deg, rgba(255, 253, 248, .5) 0%, rgba(249, 244, 235, .36) 100%);
  --surface: linear-gradient(135deg, rgba(255, 255, 255, .52) 0%, rgba(255, 255, 255, .24) 100%);
  --surface-2: linear-gradient(135deg, rgba(255, 255, 255, .8) 0%, rgba(255, 255, 255, .44) 100%);
  --knob: linear-gradient(145deg, #FFFFFF 0%, #ECE5D8 100%);
  --field: rgba(255, 255, 255, .46);
  --sticky: rgba(249, 245, 237, .84);
  --well-bg: rgba(14, 13, 11, .06);
  --glass-edge: rgba(255, 255, 255, .74);
  --hi: rgba(255, 255, 255, .5);
  --lo: rgba(84, 62, 28, .16);
  --lo-2: rgba(84, 62, 28, .3);
  --edge: inset 0 1px 0 rgba(255, 255, 255, .92), inset 1px 0 0 rgba(255, 255, 255, .42);
  --e1: -3px -3px 9px var(--hi), 10px 18px 34px -16px var(--lo-2), var(--edge);
  --e2: -4px -4px 12px var(--hi), 16px 28px 46px -18px var(--lo-2), var(--edge);
  --e-s: -1px -1px 3px var(--hi), 4px 7px 14px -6px var(--lo-2), var(--edge);
  --well: inset 2px 3px 6px var(--lo), inset -1px -1px 2px var(--hi);
  --press: inset 3px 4px 7px var(--lo-2), inset -1px -1px 3px var(--hi);
  --float: 0 44px 80px -44px rgba(60, 42, 14, .62), 0 14px 32px -20px rgba(60, 42, 14, .34), var(--edge);
  /* The room behind the glass: window light, a brass lamp, an oxblood corner, ink in the low shadow. */
  --backdrop:
    radial-gradient(58% 50% at 2% -4%, rgba(255, 255, 255, .96) 0%, rgba(255, 255, 255, 0) 66%),
    radial-gradient(circle 24vmin at 60% 30%, rgba(168, 137, 79, .86) 0%, rgba(168, 137, 79, .7) 58%, rgba(168, 137, 79, 0) 100%),
    radial-gradient(48% 46% at 98% 2%, rgba(168, 137, 79, .66) 0%, rgba(168, 137, 79, 0) 72%),
    radial-gradient(58% 56% at 104% 104%, rgba(90, 26, 31, .68) 0%, rgba(90, 26, 31, .46) 44%, rgba(90, 26, 31, 0) 76%),
    radial-gradient(circle 20vmin at 30% 82%, rgba(90, 26, 31, .46) 0%, rgba(90, 26, 31, .36) 58%, rgba(90, 26, 31, 0) 100%),
    radial-gradient(46% 46% at -4% 102%, rgba(14, 13, 11, .6) 0%, rgba(14, 13, 11, .36) 48%, rgba(14, 13, 11, 0) 76%),
    radial-gradient(40% 36% at 44% 60%, rgba(14, 13, 11, .26) 0%, rgba(14, 13, 11, 0) 72%);

  /* The Shield core. */
  --core-a: #FFFFFF;
  --core-b: #E7DFCF;
  --core-hi: #FFFFFF;
  --core-lo: #B9AB92;
  --core-on-a: #3A352E;
  --core-on-b: #0E0D0B;
  --core-mark-on: #F3EEE4;
  --lever-on: #0E0D0B;
  --glare: rgba(255, 255, 255, .7);

  --chev: url("/chevron.svg");
  --chev-on: url("/chevron-paper.svg");
  --side-w: 232px;
  --r-card: 26px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.3, 1.3, .5, 1);
  color-scheme: light;
  interpolate-size: allow-keywords;
}

/* Composed on its own, not inverted: smoked glass over warm black, lit by brass and an oxblood glow. Brass may
   carry words, oxblood lifts to be read. */
:root[data-theme="dark"] {
  --ground: #0B0A09;
  --ink: #F3EEE4;
  --ink-2: #C5BCAC;
  --ink-3: #B8AF9E;
  --line: rgba(243, 238, 228, .2);
  --rule: rgba(243, 238, 228, .1);
  --brass: #C9A86C;
  --ox: #E7A097;
  --ox-tint: #3A1C1E;
  --sand: #3B3425;
  --bar: #5C5346;
  --sel: #5B4A29;
  --solid: #F3EEE4;
  --solid-a: #FFFFFF;
  --on-solid: #0E0D0B;
  --lvl-read: rgba(255, 255, 255, .13);
  --hover: rgba(243, 238, 228, .07);
  --scrim: rgba(0, 0, 0, .5);
  --dim: rgba(0, 0, 0, .62);

  --frost: blur(30px) saturate(1.4);
  --glass: linear-gradient(135deg, rgba(62, 55, 46, .44) 0%, rgba(20, 18, 15, .54) 100%);
  --surface: linear-gradient(135deg, rgba(255, 255, 255, .1) 0%, rgba(255, 255, 255, .03) 100%);
  --surface-2: linear-gradient(135deg, rgba(255, 255, 255, .17) 0%, rgba(255, 255, 255, .06) 100%);
  --knob: linear-gradient(145deg, #2C2823 0%, #1C1A17 100%);
  --field: rgba(255, 255, 255, .06);
  --sticky: rgba(27, 24, 21, .86);
  --well-bg: rgba(0, 0, 0, .3);
  --glass-edge: rgba(255, 255, 255, .13);
  --hi: rgba(255, 255, 255, .04);
  --lo: rgba(0, 0, 0, .38);
  --lo-2: rgba(0, 0, 0, .6);
  --edge: inset 0 1px 0 rgba(255, 255, 255, .17), inset 1px 0 0 rgba(255, 255, 255, .06);
  --float: 0 44px 90px -40px rgba(0, 0, 0, .9), 0 14px 32px -20px rgba(0, 0, 0, .6), var(--edge);
  --backdrop:
    radial-gradient(60% 52% at 3% -8%, rgba(201, 168, 108, .42) 0%, rgba(168, 137, 79, .16) 48%, rgba(168, 137, 79, 0) 74%),
    radial-gradient(circle 24vmin at 60% 30%, rgba(201, 168, 108, .3) 0%, rgba(168, 137, 79, .22) 58%, rgba(168, 137, 79, 0) 100%),
    radial-gradient(58% 56% at 104% 104%, rgba(90, 26, 31, .95) 0%, rgba(90, 26, 31, .5) 46%, rgba(90, 26, 31, 0) 76%),
    radial-gradient(circle 20vmin at 30% 82%, rgba(90, 26, 31, .7) 0%, rgba(90, 26, 31, .5) 58%, rgba(90, 26, 31, 0) 100%),
    radial-gradient(40% 40% at 98% 4%, rgba(201, 168, 108, .3) 0%, rgba(168, 137, 79, 0) 72%);

  --core-a: #3A352E;
  --core-b: #1B1916;
  --core-hi: #575046;
  --core-lo: #040403;
  --core-on-a: #E2C58B;
  --core-on-b: #A8894F;
  --core-mark-on: #0E0D0B;
  --lever-on: #A8894F;
  --glare: rgba(255, 255, 255, .16);

  --chev: url("/chevron-paper.svg");
  --chev-on: url("/chevron.svg");
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
/* The gutter stays whether the page scrolls or not, so a short page and a long one sit in the same place. */
/* The backdrop is fixed to the window and painted on the root, so it also fills the gutter: it is what the glass bends. */
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; background: var(--backdrop), var(--ground); background-attachment: fixed; background-size: 100vw 100vh; background-repeat: no-repeat; }
body {
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font: 400 14px/1.5 "Hanken Grotesk", system-ui, sans-serif;
  font-synthesis: none;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  scrollbar-color: var(--line) transparent;
  caret-color: var(--ink);
}
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 400; text-wrap: balance; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--sel); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-s { width: 16px; height: 16px; }

/* ---------- buttons and controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 17px; border-radius: 999px;
  border: 1px solid var(--glass-edge); background: var(--surface-2); color: var(--ink); box-shadow: var(--e-s);
  font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: box-shadow 200ms var(--ease), translate 200ms var(--ease), opacity 200ms var(--ease);
}
.btn:hover { translate: 0 -1px; box-shadow: -3px -3px 8px var(--hi), 5px 7px 14px var(--lo-2), var(--edge); }
.btn:active { translate: 0 0; box-shadow: var(--press); transition-duration: 80ms; }
.btn:disabled { opacity: .45; cursor: not-allowed; translate: 0 0; box-shadow: var(--e-s); }
.btn-primary { background: linear-gradient(145deg, var(--solid-a), var(--solid)); border-color: transparent; color: var(--on-solid); }
.btn-primary:active { box-shadow: inset 2px 3px 6px rgba(0, 0, 0, .45); }
.btn-s { height: 32px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; height: 44px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background-color 180ms var(--ease), color 180ms var(--ease), box-shadow 180ms var(--ease);
}
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn:active { box-shadow: var(--press); }
.icon-btn-s { width: 28px; height: 28px; }

input:not([type="radio"]):not([type="checkbox"]), textarea, select {
  width: 100%; border: 1px solid transparent; border-radius: 14px; background: var(--well-bg); box-shadow: var(--well);
  padding: 10px 14px; font-size: 15px; color: var(--ink);
}
input:not([type="radio"]):not([type="checkbox"]) { height: 46px; }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 1; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--ink); width: 18px; height: 18px; margin: 2px 0 0; flex: none; }

/* A pressed track with a raised knob. The big one on the overview is .lever, further down. */
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; cursor: pointer; }
.switch-track { position: relative; width: 52px; height: 30px; border-radius: 999px; background: var(--well-bg); box-shadow: var(--well); transition: background-color 320ms var(--ease); }
.switch-track::after {
  content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--knob); box-shadow: -1px -1px 3px var(--hi), 2px 3px 6px var(--lo-2), var(--edge);
  transition: transform 380ms var(--spring);
}
.switch[aria-checked="true"] .switch-track { background: var(--lever-on); }
.switch[aria-checked="true"] .switch-track::after { transform: translateX(22px); }
.switch:disabled { opacity: .5; cursor: progress; }
.switch-s .switch-track { width: 40px; height: 24px; }
.switch-s .switch-track::after { top: 4px; left: 4px; width: 16px; height: 16px; }
.switch-s[aria-checked="true"] .switch-track::after { transform: translateX(16px); }
.switch-text { font-size: 13px; color: var(--ink-3); min-width: 22px; text-align: left; }
.switch-text::before { content: "Off"; }
.switch[aria-checked="true"] .switch-text { color: var(--ink); }
.switch[aria-checked="true"] .switch-text::before { content: "On"; }

/* ---------- glass: the top bar, the rail, the page, the live column, dialogs, sign-in ---------- */
.top, .side, .main, .live-card, .picker, .gate-card, .tour-card {
  background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--float);
  -webkit-backdrop-filter: var(--frost); backdrop-filter: var(--frost);
}

/* ---------- gate: setup and sign-in ---------- */
.gate { min-height: calc(100dvh - 40px); display: flex; flex-direction: column; align-items: center; padding: 48px 0 32px; }
.gate-logo { height: 30px; width: auto; color: var(--ink); }
.gate-demo { margin-top: 14px; }
.gate-card { width: min(540px, 100%); margin-top: 32px; padding: 36px 40px 32px; border-radius: 32px; animation: pop 420ms var(--ease) both; }
.gate-card-wide { width: min(1120px, 100%); }
.gate-card h1, .step legend h1 { font-size: 26px; line-height: 1.2; letter-spacing: -.015em; }
.gate-card .lede { margin-top: 10px; color: var(--ink-2); font-size: 14.5px; max-width: 62ch; }
.steps { display: flex; gap: 6px; }
.steps span { flex: 1; height: 3px; border-radius: 3px; background: var(--well-bg); box-shadow: var(--well); transition: background-color 300ms var(--ease); }
.steps span.done { background: var(--ink); box-shadow: none; }
.step-count { margin: 12px 0 22px; font-size: 12.5px; color: var(--ink-3); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
.field { display: grid; gap: 6px; margin-top: 18px; font-size: 13.5px; color: var(--ink-2); }
.field-note { font-size: 12.5px; color: var(--ink-3); }
.hint { margin-top: 6px; font-size: 12.5px; color: var(--ink-3); }
.form-error { margin-top: 16px; min-height: 1.4em; color: var(--ox); font-size: 13.5px; }
.form-error:empty { min-height: 0; margin: 0; }
.form-nav { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.group-names { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin-top: 4px; }
.review { display: grid; grid-template-columns: 170px 1fr; gap: 10px 16px; margin: 6px 0 18px; padding: 16px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.review dt { color: var(--ink-3); }
#wizard-map { margin-top: 20px; }
.step-h { margin-top: 22px; font-size: 13.5px; color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.step .choices { margin-top: 10px; }
#boot-error { text-align: left; }

/* ---------- the shell: a top bar, a rail, the page and live activity, each a sheet of glass afloat ---------- */
.shell {
  display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr) 340px; grid-template-rows: auto 1fr; gap: 0 24px;
  max-width: 1700px; min-height: calc(100dvh - 40px); margin: 0 auto;
}
.shell-person { grid-template-columns: var(--side-w) minmax(0, 1fr); }

/* The top bar is a pill that stays put, so the page slides under it and blurs. */
.top {
  grid-column: 1 / -1; position: sticky; top: 14px; z-index: 6;
  display: flex; align-items: center; gap: 10px; height: 64px; margin-bottom: 20px; padding: 0 8px 0 26px; border-radius: 999px;
}
.brand { flex: none; margin-right: auto; color: var(--ink); border-radius: 10px; }
.brand-word { display: block; height: 36px; width: auto; overflow: visible; }
.brand-word .w-stroke { fill: none; stroke: currentColor; stroke-width: 16; }
:root[data-theme="dark"] .brand-word .w-product { color: var(--brass); }
.side-state {
  display: flex; align-items: center; gap: 9px; min-width: 0; height: 40px; margin: 0; padding: 0 16px 0 14px;
  border-radius: 999px; background: var(--well-bg); box-shadow: var(--well); font-size: 13px; color: var(--ink-2); white-space: nowrap;
}
.side-state .dot { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--ink-3); transition: background-color 300ms var(--ease), border-color 300ms var(--ease); }
.side-state[data-on="true"] .dot { background: var(--brass); border-color: var(--brass); }
.side-state[data-on="true"] .dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid var(--brass); opacity: 0; animation: ping 3.2s var(--ease) infinite; }
@keyframes ping { 0% { opacity: .7; scale: .5; } 70%, 100% { opacity: 0; scale: 1.25; } }
.theme-toggle { position: relative; flex: none; width: 44px; height: 44px; border: 1px solid var(--glass-edge); background: var(--surface-2); box-shadow: var(--e-s); }
.theme-toggle:hover { background: var(--surface-2); }
.theme-toggle .icon { position: absolute; inset: 0; margin: auto; transition: opacity 300ms var(--ease), rotate 520ms var(--ease), scale 520ms var(--ease); }
.theme-toggle .t-moon { opacity: 0; rotate: -70deg; scale: .5; }
:root[data-theme="dark"] .theme-toggle .t-sun { opacity: 0; rotate: 70deg; scale: .5; }
:root[data-theme="dark"] .theme-toggle .t-moon { opacity: 1; rotate: 0deg; scale: 1; }
.demo-tag { flex: none; padding: 2px 10px; border: 1px solid var(--brass); border-radius: 999px; font-size: 12px; color: var(--ink); white-space: nowrap; }
.me { display: flex; align-items: center; gap: 10px; flex: none; height: 48px; padding: 0 5px; border: 1px solid var(--glass-edge); border-radius: 999px; background: var(--surface); box-shadow: var(--e-s); }
.avatar { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(145deg, var(--solid-a), var(--solid)); color: var(--on-solid); font-size: 13px; letter-spacing: .02em; }
.avatar-s { width: 32px; height: 32px; background: var(--sand); color: var(--ink); font-size: 12px; box-shadow: var(--well); }
.me-text { display: grid; min-width: 0; max-width: 200px; }
.me-name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-role { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* The rail: a capsule of round buttons, the current one filled. Open, each button carries its name. */
.side {
  position: sticky; top: 98px; z-index: 4; align-self: start;
  display: flex; flex-direction: column; margin-top: 22px; padding: 9px; border-radius: 32px;
}
.navs { position: relative; }
/* One column that may shrink: a link's label can't hold the rail open. */
.nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.navs .nav + .nav { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line); }
.nav a {
  position: relative; z-index: 1; display: flex; align-items: center; height: 44px; padding: 0 11px;
  border-radius: 999px; color: var(--ink-2); font-size: 14.5px; text-decoration: none;
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}
.nav a:hover { background: var(--hover); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--on-solid); background: linear-gradient(145deg, var(--solid-a), var(--solid)); box-shadow: 3px 6px 12px -5px var(--lo-2); }
/* Where a glider is present it is the filled pill, so the link itself stays bare and the pill can slide. */
.navs .nav a[aria-current="page"] { background: none; box-shadow: none; }
.nav-text, .nav-co { flex: 1 1 0; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-indent: 12px; transition: opacity 220ms var(--ease); }
.nav-glider {
  position: absolute; left: 0; right: 0; top: 0; height: 44px; border-radius: 999px; pointer-events: none;
  background: linear-gradient(145deg, var(--solid-a), var(--solid)); box-shadow: 3px 6px 12px -5px var(--lo-2); transform: translateY(var(--y, 0)); opacity: 0;
}
.nav-glider.ready { opacity: 1; transition: transform 460ms var(--ease), opacity 300ms var(--ease); }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--solid); color: var(--on-solid); font-size: 12px; }
.nav .count { position: absolute; right: 11px; top: 11px; }
.nav-short { display: none; }
.nav a[aria-current="page"] .count { background: var(--on-solid); color: var(--solid); }
.side-note { margin: 0; padding: 14px 8px 4px; }
.side-toggle {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; margin-top: 9px; padding: 0;
  border: 1px solid var(--glass-edge); border-radius: 50%; background: var(--surface-2); box-shadow: var(--e-s); color: var(--ink-2); cursor: pointer;
  transition: box-shadow 200ms var(--ease), color 200ms var(--ease);
}
.side-toggle:hover { color: var(--ink); }
.side-toggle:active { box-shadow: var(--press); }
.side-toggle .icon { transition: rotate 460ms var(--ease); }

/* Closed, the rail is the round buttons alone, each with its name on hover. Phones get a tab bar instead. */
@media (min-width: 761px) {
  :root[data-side="rail"] { --side-w: 64px; }
  :root[data-side="rail"] .side-toggle .icon { rotate: 180deg; }
  :root[data-side="rail"] :is(.nav-text, .nav-co) { opacity: 0; }
  :root[data-side="rail"] .nav .count { right: -5px; top: -5px; scale: .8; }
  :root[data-side="rail"] .nav a[data-tip]::after {
    content: attr(data-tip); position: absolute; left: calc(100% + 20px); top: 50%; translate: -6px -50%;
    padding: 6px 11px; border-radius: 999px; background: var(--solid); color: var(--on-solid); font-size: 12.5px; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity 160ms var(--ease), translate 220ms var(--ease);
  }
  :root[data-side="rail"] .nav a[data-tip]:is(:hover, :focus-visible)::after { opacity: 1; translate: 0 -50%; }
  :root[data-side="rail"] .side-note { display: none; }
}

/* The page: one large frosted panel. The cards on it are lighter tiles. */
.main { min-width: 0; padding: 26px 28px 34px; border-radius: 36px; container-type: inline-size; }
.main:focus { outline: none; }
/* A result of a click floats at the foot of the window. It never pushes the page down and back up. */
.notice {
  position: fixed; left: 50%; bottom: 28px; z-index: 30; display: flex; align-items: center; gap: 9px; width: max-content; max-width: min(560px, calc(100vw - 32px));
  padding: 11px 18px; border-radius: 999px; background: var(--solid); color: var(--on-solid); font-size: 13.5px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .55);
  translate: -50% 14px; opacity: 0; visibility: hidden;
  transition: opacity 200ms var(--ease), translate 320ms var(--ease), visibility 0s linear 320ms;
}
.notice.show { translate: -50% 0; opacity: 1; visibility: visible; transition-delay: 0s; }
.notice[data-tone="error"] { background: #5A1A1F; color: #F3EEE4; }

.live-card {
  position: sticky; top: 98px; display: flex; flex-direction: column; max-height: calc(100dvh - 118px);
  padding: 22px 20px 20px; border-radius: 32px;
}
.live-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.live-head h2 { font-size: 19px; letter-spacing: -.01em; }
.live-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.live-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--ink-3); }
.live-state[data-state="live"]::before { background: var(--brass); border-color: var(--brass); }
.live-state[data-state="demo"]::before { border-color: var(--brass); }
.live-list { flex: 1; overflow-y: auto; margin: 0 -6px 16px; padding: 0 6px; scrollbar-width: thin; }
.live-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--rule); }
.live-row:first-child { border-top: 0; }
.live-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--well-bg); box-shadow: var(--well); color: var(--ink-2); }
.live-mark[data-tone="stop"] { background: var(--ox-tint); color: var(--ox); }
.live-mark[data-tone="held"] { background: var(--sand); color: var(--ink); }
.live-mark[data-tone="warn"] { color: var(--ink); box-shadow: var(--well), inset 0 0 0 1px var(--brass); }
.live-text { display: grid; min-width: 0; }
.live-name { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-what { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-when { font-size: 12px; color: var(--ink-3); white-space: nowrap; }

/* A new entry settles in. */
.fresh { animation: settle 420ms var(--ease); }
@keyframes settle { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- page parts ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-title { min-width: 0; }
.page-head h1 { font-size: 31px; line-height: 1.15; letter-spacing: -.02em; }
.page-sub { margin-top: 8px; max-width: 64ch; color: var(--ink-2); font-size: 14.5px; }
.page-actions { display: flex; align-items: center; gap: 14px; flex: none; }
.save-state { margin: 0; }

.card { background: var(--surface); border: 1px solid var(--glass-edge); border-radius: var(--r-card); padding: 20px 22px; box-shadow: var(--e1); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-title { font-size: 17px; letter-spacing: -.01em; }
.card-meta { font-size: 13px; color: var(--ink-3); }
.card-lede { margin: -6px 0 10px; font-size: 13px; color: var(--ink-3); }

/* ---------- the Shield core: plates stacked in depth that lean toward the pointer ---------- */
.core-card {
  --lift: 5px;
  display: grid; grid-template-columns: 184px minmax(0, 1fr) auto; align-items: center; gap: 12px 30px;
  margin-bottom: 18px; padding: 16px 36px 16px 18px; border-radius: 32px;
  background: var(--surface); border: 1px solid var(--glass-edge); box-shadow: var(--e1);
}
.core-card[data-on="true"] { --lift: 11px; }
.core-card.tracking { --lift: 9px; }
.core-card.tracking[data-on="true"] { --lift: 15px; }
.core { position: relative; width: 184px; height: 184px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; perspective: 760px; }
.core:active { --lift: 1px; }
.core-tilt { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--rx, 9deg)) rotateY(var(--ry, -13deg)); transition: transform 800ms var(--ease); }
.core-card.tracking .core-tilt { transition: transform 140ms linear; }
.core-tilt > * { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transition: transform 620ms var(--ease); }
.core-tilt > .core-well { inset: 5px; width: auto; height: auto; border-radius: 50%; background: var(--well-bg); box-shadow: var(--well), inset 0 0 0 1px var(--glass-edge); }
.core-ring { transform: translateZ(var(--lift)); }
.core-plate { transform: translateZ(calc(var(--lift) * 2.2)); filter: drop-shadow(5px 9px 8px var(--lo-2)); }
.core-inner { transform: translateZ(calc(var(--lift) * 3.4)); }
.core-mark { transform: translateZ(calc(var(--lift) * 4.6)); }
.core-tilt > .core-glare {
  inset: 5px; width: auto; height: auto; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at var(--gx, 32%) var(--gy, 24%), var(--glare), transparent 56%);
  transform: translateZ(calc(var(--lift) * 5)); transition: opacity 500ms var(--ease), transform 620ms var(--ease);
}
.core-card.tracking .core-glare { opacity: 1; }
.ring-ticks { fill: none; stroke: var(--ink-3); stroke-width: 5; stroke-dasharray: 1.2 8.015; opacity: .5; }
.ring-track { fill: none; stroke: var(--line); stroke-width: 1.5; }
.ring-arc {
  fill: none; stroke: var(--brass); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 490.1 494; stroke-dashoffset: 492;
  transform: rotate(-90deg); transform-origin: 100px 100px; transition: stroke-dashoffset 1200ms var(--ease);
}
.core-card[data-on="true"] .ring-arc { stroke-dashoffset: 0; }
.core-card[data-busy="true"] .ring-arc { stroke-dasharray: 96 394.1; stroke-dashoffset: 0; transition: none; animation: turn 1.1s linear infinite; }
@keyframes turn { to { transform: rotate(270deg); } }
.plate-hi { fill: var(--core-hi); }
.plate-lo { fill: var(--core-lo); }
.cg-a { stop-color: var(--core-a); }
.cg-b { stop-color: var(--core-b); }
.con-a { stop-color: var(--core-on-a); }
.con-b { stop-color: var(--core-on-b); }
.inner-off { fill: var(--well-bg); }
.inner-on { opacity: 0; transition: opacity 600ms var(--ease); }
.core-card[data-on="true"] .inner-on { opacity: 1; }
.core-scan { opacity: 0; }
.core-card[data-on="true"] .core-scan { opacity: 1; animation: scan 5.4s cubic-bezier(.45, 0, .55, 1) infinite; }
@keyframes scan { 0% { transform: translateY(10px); } 55%, 100% { transform: translateY(190px); } }
.core-mark path { fill: var(--ink-3); transition: fill 500ms var(--ease); }
.core-card[data-on="true"] .core-mark path { fill: var(--core-mark-on); }
.core-text { min-width: 0; }
.core-title { font-size: 28px; line-height: 1.15; letter-spacing: -.02em; }
.core-note { margin-top: 6px; max-width: 52ch; font-size: 14.5px; color: var(--ink-2); }
.core-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.lever { position: relative; flex: none; width: 96px; height: 50px; padding: 0; border: 0; border-radius: 999px; background: var(--well-bg); box-shadow: var(--well); cursor: pointer; transition: background-color 460ms var(--ease); }
.lever-knob {
  position: absolute; top: 5px; left: 5px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--knob); box-shadow: -1px -1px 3px var(--hi), 3px 5px 10px var(--lo-2), var(--edge);
  transition: transform 520ms var(--spring), scale 160ms var(--ease);
}
.lever-knob::after { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--ink-3); transition: background-color 400ms var(--ease); }
.lever[aria-checked="true"] { background: var(--lever-on); }
.lever[aria-checked="true"] .lever-knob { transform: translateX(46px); }
.lever[aria-checked="true"] .lever-knob::after { background: var(--brass); }
.lever:active .lever-knob { scale: .93; }
.core-card[data-busy="true"] :is(.lever, .core) { cursor: progress; }
.lever[aria-disabled="true"] .lever-knob::after { width: 16px; height: 16px; border-radius: 50%; background: none; border: 2px solid var(--line); border-top-color: var(--ink); animation: turn-flat 800ms linear infinite; }
@keyframes turn-flat { to { rotate: 360deg; } }

.alert { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 14px 16px 14px 18px; background: var(--surface); border: 1px solid var(--brass); border-radius: 18px; box-shadow: var(--e-s); }
.alert > .icon { color: var(--ox); }
.alert-text { flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink-2); }
.alert-title { font-size: 14.5px; color: var(--ink); }

.totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.total {
  display: grid; gap: 4px; padding: 18px 20px 18px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--glass-edge); border-radius: var(--r-card); box-shadow: var(--e1);
  transition: translate 320ms var(--ease), box-shadow 320ms var(--ease);
}
a.total:hover { translate: 0 -3px; box-shadow: var(--e2); }
a.total:active { translate: 0 0; box-shadow: var(--e-s); transition-duration: 100ms; }
.total-top { display: flex; align-items: center; justify-content: space-between; color: var(--ink-2); font-size: 13.5px; }
.total-top .icon { color: var(--ink-3); transition: translate 320ms var(--ease); }
a.total:hover .total-top .icon { translate: 3px 0; }
.total-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 16px; }
.total-nums { display: grid; gap: 6px; min-width: 0; }
.total-num { font-size: 40px; line-height: 1; letter-spacing: -.035em; }
.total-tile { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 15px; background: var(--well-bg); box-shadow: var(--well); color: var(--ink); }
.total-tile[data-tile="ox"] { background: var(--ox-tint); color: var(--ox); }
.total-tile[data-tile="sand"] { background: var(--sand); }
.total-tile .icon { width: 22px; height: 22px; }
.total-num[data-tone="stop"] { color: var(--ox); }
.total-sub { font-size: 12.5px; color: var(--ink-3); }

.row-2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: start; }
.row-2-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* chart */
.chart-readout { display: flex; flex-wrap: wrap; gap: 4px 14px; min-height: 21px; margin-bottom: 14px; font-size: 13.5px; color: var(--ink-2); }
.ro-day { color: var(--ink); }
.ro-stop { color: var(--ox); }
.chart { display: grid; grid-template-columns: 36px minmax(0, 1fr); grid-template-rows: 176px auto; column-gap: 10px; }
.chart-axis { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; font-size: 11.5px; color: var(--ink-3); }
.chart-axis span { line-height: 0; }
.chart-svg { width: 100%; height: 176px; overflow: visible; }
.chart-grid, .chart-base { stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-base { stroke: var(--line); }
.bar { cursor: default; outline: none; }
.bar-hit { fill: transparent; }
.bar-all { fill: var(--bar); transition: fill 200ms var(--ease); }
.bar-stop { fill: var(--ox); }
.bar.on .bar-all { fill: var(--ink); }
.bar:focus-visible .bar-hit { fill: var(--hover); }
.chart-days { grid-column: 2; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin-top: 8px; font-size: 11.5px; color: var(--ink-3); text-align: center; }
.chart-legend { display: flex; gap: 18px; margin-top: 14px; font-size: 12.5px; color: var(--ink-2); }
.key { display: inline-flex; align-items: center; gap: 7px; }
.key::before { content: ""; width: 10px; height: 10px; border-radius: 3px; }
.key-all::before { background: var(--bar); }
.key-stop::before { background: var(--ox); }

/* waiting */
.holds { display: grid; }
.hold { padding: 14px 0 16px; border-top: 1px solid var(--rule); }
.hold:first-child { border-top: 0; padding-top: 0; }
.hold-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hold-who { display: grid; min-width: 0; }
.hold-name { font-size: 14px; }
.hold-group { font-size: 12.5px; color: var(--ink-3); }
.hold-clock { display: grid; justify-items: end; gap: 6px; flex: none; }
.hold-left { font-size: 12.5px; color: var(--ink); }
.hold-bar { position: relative; width: 64px; height: 4px; border-radius: 4px; background: var(--well-bg); box-shadow: var(--well); overflow: hidden; }
.hold-bar::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(var(--left, 1)); transition: transform 1s linear; } /* atelier: allow, one tick a second */
.hold-prompt { margin-top: 10px; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hold-files, .hold-reason { margin-top: 6px; font-size: 12.5px; color: var(--ink-2); }
.hold-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* facts and top */
.facts { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
.facts div { padding: 10px 0 12px; border-top: 1px solid var(--rule); }
.facts dt { font-size: 12.5px; color: var(--ink-3); }
.facts dd { margin-top: 2px; font-size: 19px; letter-spacing: -.01em; }
.people-top li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); }
.people-top li:first-child { border-top: 0; padding-top: 0; }
.pt-text { display: grid; min-width: 0; }
.pt-name { font-size: 14px; }
.pt-group { font-size: 12.5px; color: var(--ink-3); }
.pt-n { font-size: 13px; color: var(--ox); }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 7px; border-radius: 999px; font-size: 12.5px; white-space: nowrap; color: var(--ink-2); border: 1px solid var(--line); width: fit-content; }
.chip[data-tone="stop"] { background: var(--ox-tint); border-color: transparent; color: var(--ox); }
.chip[data-tone="held"] { background: var(--sand); border-color: transparent; color: var(--ink); }
.chip[data-tone="warn"] { border-color: var(--brass); color: var(--ink); }

/* activity */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
/* Pill tabs: a glass capsule. The filled pill under the current choice is .glider, measured so it can slide. */
.segmented { position: relative; display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; border: 1px solid var(--glass-edge); background: var(--surface-2); box-shadow: var(--e-s); border-radius: 999px; }
.seg { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13.5px; color: var(--ink-2); text-decoration: none; transition: color 200ms var(--ease); }
.seg:hover { color: var(--ink); }
button.seg { border: 0; background: none; font: inherit; cursor: pointer; }
.chart-sum { margin: -6px 0 10px; }
.seg[aria-current="true"] { color: var(--on-solid); }
.glider { position: absolute; left: 0; top: 0; width: var(--w, 0); height: 32px; border-radius: 999px; background: linear-gradient(145deg, var(--solid-a), var(--solid)); box-shadow: 3px 6px 12px -5px var(--lo-2); transform: translate(var(--x, 0), var(--y, 0)); pointer-events: none; }
.glider[data-vt="days"] { view-transition-name: seg-days; }
.glider[data-vt="filter"] { view-transition-name: seg-filter; }
.seg-n { font-size: 12px; }
.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px 0 14px; background: var(--well-bg); box-shadow: var(--well); border-radius: 999px; color: var(--ink-3); width: 196px; }
.search-wide { width: min(360px, 100%); }
.search input:not([type="radio"]) { height: 36px; border: 0; padding: 0; background: transparent; box-shadow: none; font-size: 14px; }
.search input:focus-visible { outline: none; }
.search:focus-within { outline: 2px solid var(--ink); outline-offset: 1px; }
.feed-card { padding: 6px 18px; }
.feed > li { border-top: 1px solid var(--rule); }
.feed > li:first-child { border-top: 0; }
.feed-main { display: grid; grid-template-columns: 132px minmax(0, 1.1fr) minmax(0, 1fr) 92px; align-items: center; gap: 14px; padding: 12px 0; }
.feed-row > .feed-main { padding-right: 32px; }
.feed-who { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.feed-name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-group { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-what { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-time { font-size: 12.5px; color: var(--ink-3); text-align: right; white-space: nowrap; }
.feed-note { margin: -6px 32px 12px 146px; font-size: 12.5px; color: var(--ink-3); }
.feed-details summary { display: grid; grid-template-columns: minmax(0, 1fr) 20px; align-items: center; gap: 12px; list-style: none; cursor: pointer; }
.feed-details summary::-webkit-details-marker { display: none; }
.feed-details summary:hover .feed-name { text-decoration: underline; text-decoration-color: var(--line); }
.feed-chev { color: var(--ink-3); transition: transform 320ms var(--ease); }
.feed-details[open] .feed-chev { transform: rotate(90deg); }
/* A row opens and closes by height where the browser can animate to auto; elsewhere it just opens. */
.feed-details::details-content { block-size: 0; overflow: clip; opacity: 0; transition: block-size 380ms var(--ease), opacity 300ms var(--ease), content-visibility 380ms allow-discrete; }
.feed-details[open]::details-content { block-size: auto; opacity: 1; }
.feed-body { display: grid; gap: 14px; padding: 2px 32px 20px 146px; }
.feed-body .feed-note { margin: 0; }
.feed-label { margin-bottom: 4px; font-size: 12px; color: var(--ink-3); }
.feed-reason { font-size: 14px; max-width: 72ch; }
.feed-text { max-height: 260px; overflow: auto; padding: 12px 14px; background: var(--well-bg); box-shadow: var(--well); border-radius: 14px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 80ch; }
.feed-code { font-size: 13px; }
.feed-meta { font-size: 12.5px; color: var(--ink-3); }
.feed-files { display: grid; gap: 6px; }
.file { font-size: 13.5px; }
.file summary { cursor: pointer; width: fit-content; }
.file pre { margin: 6px 0 0; padding: 12px 14px; background: var(--well-bg); box-shadow: var(--well); border-radius: 14px; font: inherit; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow: auto; }
.calls { display: grid; gap: 6px; }
.calls li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.call-why { color: var(--ink-2); }
.feed-more { padding: 12px 0 14px; border-top: 1px solid var(--rule); font-size: 12.5px; color: var(--ink-3); }

/* people */
.acting { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.acting > .icon { color: var(--ink-2); }
.acting-text { flex: 1; min-width: 0; }
.acting-title { font-size: 15px; }
.acting-sub { font-size: 13px; color: var(--ink-2); }
.people > li { display: grid; grid-template-columns: 32px minmax(0, 1.4fr) minmax(0, 1fr) 92px 196px; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--rule); }
.people > li:first-child { border-top: 0; padding-top: 2px; }
.person-text { display: grid; min-width: 0; }
.person-name { font-size: 14px; }
.person-sub { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-group { font-size: 13.5px; color: var(--ink-2); }
.person-code { font-size: 12.5px; color: var(--ink-2); }
.person-code.muted { color: var(--ink-3); }
.person-acts { display: flex; gap: 8px; justify-content: flex-end; }

/* the sign-in code: shown once, in a well, with its copy button beside it */
.code-row { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 8px 8px 8px 20px; border-radius: 18px; background: var(--well-bg); box-shadow: var(--well); }
.code { flex: 1; min-width: 0; font-size: 26px; letter-spacing: .06em; overflow-wrap: anywhere; user-select: all; }
.code-copy { flex: none; min-width: 126px; }
.code-copy[data-done="true"] .icon { color: var(--brass); }

/* settings */
.settings { display: grid; gap: 18px; }
.msg-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.msg-cols .field { margin-top: 0; }
textarea { resize: vertical; min-height: 124px; line-height: 1.5; }
.preview-label { font-size: 13.5px; color: var(--ink-2); margin-bottom: 6px; }
/* A terminal is dark in both themes. */
.preview-screen { padding: 18px 20px; border-radius: 16px; background: #0E0D0B; color: #F3EEE4; min-height: 124px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 6px 8px 18px var(--lo); }
.preview-prompt { color: #C9A86C; font-size: 13.5px; }
.preview-prompt::before { content: "> "; }
.preview-msg { margin-top: 12px; font-size: 14px; overflow-wrap: anywhere; }
.choices { display: grid; gap: 10px; }
.choice { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid transparent; border-radius: 16px; background: var(--well-bg); box-shadow: var(--well); cursor: pointer; transition: box-shadow 260ms var(--ease), background 260ms var(--ease), border-color 260ms var(--ease); }
.choice:has(input:checked) { border-color: var(--ink); background: var(--surface); box-shadow: var(--e-s); }
.choice-text { display: grid; gap: 3px; }
.choice-title { font-size: 14.5px; }
.choice-risk { font-size: 13px; color: var(--ink-2); max-width: 74ch; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill span { display: inline-flex; align-items: center; height: 38px; padding: 0 18px; border: 1px solid var(--glass-edge); border-radius: 999px; background: var(--surface-2); box-shadow: var(--e-s); font-size: 14px; transition: box-shadow 220ms var(--ease), color 220ms var(--ease); }
.pill input:checked + span { background: linear-gradient(145deg, var(--solid-a), var(--solid)); border-color: transparent; color: var(--on-solid); box-shadow: inset 2px 3px 6px rgba(0, 0, 0, .4); }
.pill input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.save-bar { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }

/* protection map */
.map-card { padding: 6px 0 4px; overflow: hidden; }
.map-scroll { overflow-x: auto; scrollbar-width: thin; }
.map-scroll.more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); }
.map { width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 0; }
.map th, .map td { padding: 11px 6px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: middle; font-weight: 400; }
.map tbody tr:last-child > * { border-bottom: 0; }
.map thead th { padding-top: 14px; padding-bottom: 12px; vertical-align: bottom; }
.map-corner { padding-left: 20px !important; font-size: 12.5px; color: var(--ink-3); }
.map-group-name { display: block; font-size: 13.5px; }
.map-group-kind { display: block; font-size: 12px; color: var(--ink-3); }
/* The first column stays while the rest slides under it, so it is the one tile here with a blur of its own. */
.map-row { position: sticky; left: 0; z-index: 1; min-width: 186px; padding-left: 20px !important; padding-right: 38px !important; background: var(--sticky); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.map-row-name { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.map-row-name .icon { color: var(--ink-3); }
.map-row-name[data-depth] { position: relative; padding-left: 22px; }
.map-row-name[data-depth="2"] { padding-left: 44px; }
.map-row-name[data-depth="3"] { padding-left: 66px; }
.map-row-name[data-depth]::before { content: ""; position: absolute; top: -6px; width: 11px; height: 14px; border-left: 1px solid var(--brass); border-bottom: 1px solid var(--brass); border-bottom-left-radius: 4px; left: 6px; }
.map-row-name[data-depth="2"]::before { left: 28px; }
.map-row-name[data-depth="3"]::before { left: 50px; }
.map-row-path { display: block; padding-left: 46px; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.map-remove { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.map-nested { background: transparent; }
select.level {
  appearance: none; width: auto; min-width: 76px; height: 32px; padding: 0 24px 0 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px;
  background: var(--field) var(--chev) no-repeat right 8px center / 12px 12px; box-shadow: 2px 3px 6px var(--lo); cursor: pointer;
  transition: box-shadow 200ms var(--ease), background-color 200ms var(--ease);
}
select.level:hover:not(:disabled) { box-shadow: 3px 5px 10px var(--lo-2); }
select.level:is([data-level="none"], [data-level="closed"]) { color: var(--ink-3); border-color: var(--rule); box-shadow: none; }
select.level[data-level="read"] { background-color: var(--lvl-read); }
select.level[data-level="write"] { background-color: var(--sand); border-color: transparent; }
select.level[data-level="full"] { background: var(--solid) var(--chev-on) no-repeat right 8px center / 12px 12px; border-color: var(--solid); color: var(--on-solid); }
select.level:disabled { cursor: not-allowed; opacity: .7; }
.map-cap { display: block; max-width: 88px; margin-top: 5px; font-size: 11px; line-height: 1.3; color: var(--ink-3); }
.map-tools th, .map-tools td { background: var(--hover); }
.map-tools .map-row { background: linear-gradient(var(--hover), var(--hover)) var(--sticky); }
/* A kind of place heads its rows. Its name stays at the left edge while the groups scroll. */
.map-section th { padding: 20px 20px 7px !important; font-size: 12.5px; color: var(--ink-3); }
.map-section span { position: sticky; left: 20px; }
/* The row a link from What needs protecting points at. */
.map-at td { background: var(--hover); }
.map-at .map-row { background: linear-gradient(var(--hover), var(--hover)) var(--sticky); }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 18px 0 6px; font-size: 13px; }
.map-legend div { display: flex; gap: 6px; }
.map-legend dd { color: var(--ink-3); }

/* what needs protecting: a card per kind, one row per place, who can reach it beside its name */
.places { display: grid; gap: 18px; }
.place { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) auto; align-items: center; gap: 6px 16px; padding: 11px 0; border-top: 1px solid var(--rule); }
.place:first-child { border-top: 0; padding-top: 2px; }
.place:last-child { padding-bottom: 2px; }
.place-name { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 14px; }
.place-name .icon { color: var(--ink-3); }
.place-text { display: grid; min-width: 0; overflow-wrap: anywhere; }
.place-sub { font-size: 12.5px; color: var(--ink-3); }
.reach { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); }
.reach-level { margin-right: 7px; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--ink); }
.reach-none { font-size: 13px; color: var(--ink-3); }
.place-acts { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 126px; }
.pins { grid-column: 1 / -1; font-size: 13px; }
.pins summary { width: fit-content; padding: 2px 0; color: var(--ink-2); cursor: pointer; }
.pins summary:hover { color: var(--ink); }
.pin-list { margin-top: 8px; }
.pin-list li { display: flex; align-items: center; gap: 10px; padding: 3px 0; }
.pin-list code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; overflow-wrap: anywhere; }
.pin-class { flex: 1; color: var(--ink-3); }
.pin-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.pin-form input:not([type="radio"]) { flex: 1 1 220px; width: auto; max-width: 360px; height: 36px; font-size: 14px; }
.place-kinds { margin-top: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* the tour: the dialog fills the window and is clear; the ring's own shadow dims everything but what it rings */
.tour { position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: none; color: var(--ink); overflow: hidden; }
.tour::backdrop { background: none; }
.tour-ring { position: fixed; left: var(--x, 0); top: var(--y, 0); width: var(--w, 0); height: var(--h, 0); border-radius: var(--r, 16px); box-shadow: 0 0 0 2px var(--brass), 0 0 0 100vmax var(--dim); pointer-events: none; }
.tour-card { position: fixed; left: var(--x, 16px); top: var(--y, 16px); width: min(360px, calc(100% - 32px)); padding: 18px 20px 16px; border-radius: 24px; }
.tour-count { font-size: 12.5px; color: var(--ink-3); }
.tour-card h2 { margin-top: 4px; font-size: 19px; letter-spacing: -.01em; }
.tour-text { margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.tour-nav { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.tour-skip { margin-right: auto; padding: 0 8px; border-color: transparent; background: none; box-shadow: none; color: var(--ink-2); }

/* dialogs */
.picker { width: min(560px, calc(100vw - 32px)); padding: 0; border-radius: 30px; color: var(--ink); }
.picker[open] { animation: pop 340ms var(--ease); }
.picker::backdrop { background: var(--scrim); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade 300ms ease both; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes fade { from { opacity: 0; } }
.picker-inner { padding: 22px 22px 24px; }
.picker-head { display: flex; align-items: center; justify-content: space-between; }
.picker-head h2 { font-size: 20px; letter-spacing: -.01em; }
.picker-lede { margin-top: 6px; font-size: 13.5px; color: var(--ink-2); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 16px 0 10px; font-size: 13.5px; }
.crumb { padding: 2px 6px; border: 0; border-radius: 6px; background: none; color: var(--ink-2); cursor: pointer; }
.crumb:hover { background: var(--hover); color: var(--ink); }
.crumb[aria-current] { color: var(--ink); }
.crumb-sep { color: var(--ink-3); }
.picker-list { max-height: min(50vh, 420px); overflow-y: auto; background: var(--well-bg); box-shadow: var(--well); border-radius: 16px; }
.picker-list .state-empty, .picker-list .state-loading, .picker-list .state-error { margin: 12px; }
.picker-entry { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-top: 1px solid var(--rule); }
.picker-entry:first-child { border-top: 0; }
.picker-name { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; height: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: none; text-align: left; font-size: 14px; cursor: pointer; }
.picker-name:hover:not(:disabled) { background: var(--hover); }
.picker-name:disabled { cursor: default; color: var(--ink); }
.picker-name .icon { color: var(--ink-3); }
.picker-go { margin-left: auto; }
.picker-on { font-size: 12.5px; color: var(--ink-3); padding-right: 6px; }
.picker-typed { margin: 12px; }
.picker-error { flex-basis: 100%; padding: 0 10px 6px; font-size: 12.5px; color: var(--ox); }

/* the person's page */
.access li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--rule); }
.access li:first-child { border-top: 0; padding-top: 0; }
.access-nested { padding-left: 24px !important; }
.access-name { display: flex; align-items: center; gap: 8px; font-size: 14px; min-width: 0; }
.access-name .icon { color: var(--ink-3); }
.access-level { display: grid; justify-items: end; text-align: right; }
.level-tag { font-size: 13.5px; }
.access-plain { font-size: 12px; color: var(--ink-3); }
.mine li { padding: 11px 0; border-top: 1px solid var(--rule); }
.mine li:first-child { border-top: 0; padding-top: 0; }
.mine-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.mine-reason { margin-top: 6px; font-size: 13px; color: var(--ink-2); }

/* list states */
.state-empty { padding: 22px 2px; }
.state-title { font-size: 15px; }
.state-line { margin-top: 4px; max-width: 52ch; font-size: 13.5px; color: var(--ink-2); }
.state-error { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px; background: var(--ox-tint); color: var(--ink); }
.state-error > .icon { color: var(--ox); }
.state-error p { flex: 1; min-width: 200px; font-size: 14px; }
.state-loading { display: grid; gap: 12px; padding: 16px 0; }
.skeleton { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--well-bg) 20%, var(--glass-edge) 50%, var(--well-bg) 80%) 0 0 / 240% 100%; animation: shimmer 1.8s linear infinite; }
.skeleton:nth-child(3n + 1) { width: 92%; }
.skeleton:nth-child(3n + 2) { width: 68%; }
.skeleton:nth-child(3n) { width: 80%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -140% 0; } }

/* ---------- vendor view ---------- */
.co-table { width: 100%; border-collapse: collapse; }
.co-table th, .co-table td { padding: 13px 10px; border-top: 1px solid var(--rule); text-align: right; font-weight: 400; white-space: nowrap; }
.co-table thead th { border-top: 0; font-size: 12.5px; color: var(--ink-3); padding-top: 4px; }
.co-table th:first-child, .co-table td:first-child { text-align: left; padding-left: 0; }
.co-table td:first-child a { font-size: 14.5px; text-decoration: none; }
.co-table td:first-child a:hover { text-decoration: underline; }
.co-table .sub { display: block; font-size: 12.5px; color: var(--ink-3); }
.co-table .stop { color: var(--ox); }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 10px; font-size: 13.5px; color: var(--ink-2); text-decoration: none; }
.back:hover { color: var(--ink); }

/* ---------- moving between views ----------
   Where the browser can, a change of page crossfades and rises, the raised pill of a tab slides to its new
   place, the menu folds, and the theme opens from its button. Elsewhere the new view simply appears. */
#page { view-transition-name: page; }
::view-transition-old(root) { display: none; }
::view-transition-new(root) { animation: none; }
::view-transition-group(*) { animation-duration: 360ms; animation-timing-function: var(--ease); }
::view-transition-old(page) { animation: vt-out 150ms ease-in both; }
::view-transition-new(page) { animation: vt-in 260ms ease-out both; }
html.vt-route::view-transition-old(page) { animation: vt-leave 170ms ease-in both; }
html.vt-route::view-transition-new(page) { animation: vt-rise 440ms var(--ease) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }
@keyframes vt-leave { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-rise { from { opacity: 0; transform: translateY(14px); } }
html.vt-side .side { view-transition-name: side; }
html.vt-side .live { view-transition-name: live; }
html.vt-side::view-transition-group(*) { animation-duration: 480ms; }
html.vt-side::view-transition-old(side), html.vt-side::view-transition-new(side) { inline-size: auto; block-size: 100%; }
html.vt-side::view-transition-old(page), html.vt-side::view-transition-new(page) { inline-size: auto; block-size: auto; animation-duration: 480ms; animation-timing-function: var(--ease); }
html.vt-theme #page, html.vt-theme .glider { view-transition-name: none; }
html.vt-theme::view-transition-old(root) { display: block; animation: none; mix-blend-mode: normal; }
html.vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- widths ---------- */
@container (max-width: 600px) {
  .core-card { grid-template-columns: 150px minmax(0, 1fr); padding: 14px 22px 18px 14px; }
  .core { width: 150px; height: 150px; }
  .lever { grid-column: 2; justify-self: start; }
}
@container (max-width: 640px) {
  .totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row-2, .row-2-even { grid-template-columns: minmax(0, 1fr); }
  .feed-main { grid-template-columns: 124px minmax(0, 1fr) 70px; }
  .feed-what { grid-column: 2; grid-row: 2; margin-top: -10px; }
  .feed-note, .feed-body { margin-left: 0; padding-left: 0; }
  .people > li { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .person-group, .person-code { display: none; }
  .msg-cols { grid-template-columns: minmax(0, 1fr); }
  .page-head { flex-wrap: wrap; align-items: flex-start; }
  .place { grid-template-columns: minmax(0, 1fr) auto; }
  .place > :is(.reach, .reach-none) { grid-column: 1 / -1; grid-row: 2; }
  .place-acts { min-width: 0; }
}
@container (max-width: 460px) {
  .core-card { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 14px 18px 22px; }
  .core-facts { justify-content: center; }
  .lever { grid-column: 1; justify-self: center; }
  /* A phone: the verdict and the time on one line, who and what under it at full width. */
  .feed-main { grid-template-columns: minmax(0, 1fr) auto; }
  .feed-time { grid-column: 2; grid-row: 1; }
  .feed-who { grid-column: 1 / -1; grid-row: 2; }
  .feed-what { grid-column: 1 / -1; grid-row: 3; margin-top: -8px; }
}
/* Cells tighten below 1400. The map scrolls sideways only when its groups need more room than the column has. */
@media (max-width: 1399px) {
  .map { min-width: 0; }
  .map th, .map td { padding: 10px 3px; }
  .map-row { min-width: 164px; padding-left: 16px !important; padding-right: 34px !important; }
  select.level { min-width: 62px; padding: 0 20px 0 9px; font-size: 12.5px; background-position: right 6px center; }
  select.level[data-level="full"] { background-position: right 6px center; }
  .map-cap { max-width: 70px; }
}
@media (max-width: 1279px) {
  .shell { grid-template-columns: var(--side-w) minmax(0, 1fr) 296px; gap: 0 18px; }
  .main { padding: 22px 22px 28px; }
  .totals { gap: 14px; }
  .total-num { font-size: 34px; }
}
@media (max-width: 1099px) {
  .shell { grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .live { grid-column: 2; padding: 20px 0 6px; }
  .live-card { position: static; max-height: none; }
}
@media (max-width: 760px) {
  :root { --r-card: 20px; }
  body { padding: 12px; }
  .shell, .shell-person { grid-template-columns: minmax(0, 1fr); padding-bottom: 72px; }
  .top { position: static; gap: 6px; height: 56px; margin-bottom: 12px; padding: 0 5px 0 18px; }
  .brand-word { height: 30px; }
  .side-state { height: 32px; padding: 0 12px; }
  .side-state-text, .me-text { display: none; }
  .theme-toggle { width: 40px; height: 40px; }
  .me { gap: 2px; height: 44px; padding: 0 3px; }
  /* The rail becomes a tab bar afloat at the foot of the window: round buttons, the current one a filled pill with its name. */
  .side { position: fixed; top: auto; bottom: 12px; left: 50%; z-index: 20; translate: -50% 0; flex-direction: row; width: max-content; max-width: calc(100vw - 24px); margin: 0; padding: 7px; }
  .side-toggle, .nav-glider { display: none; }
  .navs, .nav { display: flex; gap: 3px; min-width: 0; }
  .navs .nav + .nav { margin: 0; padding: 0; border: 0; }
  .nav li { flex: none; min-width: 0; }
  .nav li:has([aria-current="page"]) { flex: 0 1 auto; }
  .nav-text, .nav-co { flex: 0 1 auto; text-indent: 9px; font-size: 13.5px; }
  .nav-text { display: none; }
  .nav a[aria-current="page"] { padding-right: 16px; }
  .nav a[aria-current="page"] .nav-text { display: block; }
  .nav-long { display: none; }
  .nav-short { display: inline; }
  .tour-open { width: 40px; height: 40px; }
  /* The demo's tag and the help button share a phone's top bar: the tag shortens and the initials step aside. */
  .demo-more, .demo-tag:not([hidden]) ~ .me .avatar { display: none; }
  .tour-nav .btn { height: 40px; }
  .navs .nav a[aria-current="page"] { background: linear-gradient(145deg, var(--solid-a), var(--solid)); box-shadow: 3px 6px 12px -5px var(--lo-2); }
  .nav .count { right: -4px; top: -4px; scale: .8; }
  /* The vendor's list is companies, not pages, so it stays a list with names, under the top bar. */
  .vendor .shell { padding-bottom: 0; }
  .vendor .side { position: static; translate: none; flex-direction: column; width: auto; max-width: none; margin-bottom: 12px; padding: 10px; border-radius: 26px; }
  .vendor .nav { flex-wrap: wrap; gap: 5px; }
  .vendor .nav a { padding-right: 16px; }
  .live { grid-column: 1; }
  .main { padding: 18px 14px 24px; border-radius: 28px; }
  .live-card { border-radius: 28px; }
  .core-card { border-radius: 24px; }
  .gate-card { padding: 28px 20px; border-radius: 26px; }
  .group-names { grid-template-columns: 1fr; }
  .notice { bottom: 84px; border-radius: 18px; }
}
/* No backdrop blur: the same sheets, solid, so nothing has to be read through bare transparency. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: #F1EBDF; --surface: #FBF9F4; --surface-2: #FFFFFF; --field: #FFFFFF; --sticky: #FBF9F4; --well-bg: #E8E0D1; }
  :root[data-theme="dark"] { --glass: #171513; --surface: #23201C; --surface-2: #2C2823; --field: #2C2823; --sticky: #23201C; --well-bg: #100F0D; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
