@font-face {
  font-family: Barlow;
  src: url("/workspace-assets/barlow-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url("/workspace-assets/barlow-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url("/workspace-assets/barlow-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/workspace-assets/ibmplexmono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/*
  Design tokens. Every page of Dayton and Dayton Cyber draws from this block.

  Space   4px base unit: 4 8 12 16 24 32 48. No other gaps or paddings.
  Type    six sizes: 12 label, 14 meta, 16 body, 20 section, 28 title, 40 figure.
  Shape   three radii: 4 control, 8 floating layer, pill.
  Colour  90% calm canvas, 8% ink and rules, 2% signal. Signal colour is for
          data, focus, the selected page and status only, and status always
          carries a glyph or a word as well. Tokens are oklch so each status
          hue sits at one perceived lightness per theme. Text pairs hold 4.5:1
          and UI pairs 3:1 in both themes.
  Depth   dark mode steps lightness up by layer (14, 18, 23) and uses a faint
          white hairline. Shadows are for floating layers only.
*/
:root {
  color-scheme: light dark;

  --s1: .25rem;
  --s2: .5rem;
  --s3: .75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;

  --t-label: .75rem;
  --t-meta: .875rem;
  --t-body: 1rem;
  --t-section: 1.25rem;
  --t-title: 1.75rem;
  --t-figure: 2.5rem;
  --t-display: 4rem;

  --r-control: .25rem;
  --r-layer: .5rem;
  --r-pill: 999px;
  --control: 2.5rem;
  --prose: 65ch;

  /* The canvas stays in hex: the theme proof swaps this literal to show the token drives the page.
     In oklch terms it is 0.96 0.011 101 in light and 0.14 0.006 245 in dark. */
  --page: light-dark(#f3f2ea, #07090b);
  --surface: light-dark(oklch(0.975 0.011 101), oklch(0.18 0.01 235));
  --paper: var(--surface);
  --elevated: light-dark(oklch(0.996 0.008 99), oklch(0.23 0.012 232));
  --ink: light-dark(oklch(0.211 0.015 227), oklch(0.96 0.004 122));
  --secondary-ink: light-dark(oklch(0.379 0.027 231), oklch(0.836 0.012 224));
  --muted: light-dark(oklch(0.46 0.023 231), oklch(0.74 0.017 227));
  --on-ink: light-dark(oklch(0.985 0.008 99), oklch(0.16 0.008 240));
  --line: light-dark(oklch(0.211 0.015 227 / 0.14), oklch(1 0 0 / 0.09));
  --grid: light-dark(oklch(0.211 0.015 227 / 0.08), oklch(1 0 0 / 0.06));
  --hover: light-dark(oklch(0.211 0.015 227 / 0.05), oklch(1 0 0 / 0.05));
  --control-line: light-dark(oklch(0.56 0.023 232), oklch(0.62 0.02 230));

  --signal: light-dark(oklch(0.6 0.118 232), oklch(0.733 0.146 230));
  /* The light as a filled control: dark enough in light mode to carry a label. One per page, on the action that waits for a person. */
  --signal-fill: light-dark(oklch(0.5 0.095 232), oklch(0.733 0.146 230));
  --signal-tint: light-dark(oklch(0.6 0.118 232 / 0.14), oklch(0.733 0.146 230 / 0.18));
  --backdrop: light-dark(oklch(0.211 0.015 227 / 0.36), oklch(0 0 0 / 0.62));
  --data: light-dark(oklch(0.5 0.095 232), oklch(0.8 0.12 226));
  --accent: light-dark(oklch(0.44 0.086 228), oklch(0.854 0.104 221));
  --status-good: light-dark(oklch(0.42 0.075 173), oklch(0.84 0.085 172));
  --status-warn: light-dark(oklch(0.45 0.103 56), oklch(0.84 0.1 70));
  --warn: var(--status-warn);
  /* Something failed, or an action removes something. Never used for emphasis. */
  --status-bad: light-dark(oklch(0.45 0.13 27), oklch(0.84 0.085 27));

  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --shadow-layer: 0 .75rem 2rem oklch(0 0 0 / 0.2);

  font: var(--t-body)/1.5 Barlow, system-ui, sans-serif;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--ink);
  background: var(--page);
  /* A ticked box or a chosen option is the light, not the browser's own blue. */
  accent-color: var(--signal-fill);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* Every metric, table, delta and timestamp. Set on the root as well, so a number cannot miss it. */
.numeric, table, time, dd, code { font-variant-numeric: tabular-nums lining-nums; }

* { box-sizing: border-box; }
/* Hidden means gone, whatever display a rule below gives the element. */
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; text-decoration-color: var(--control-line); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.skip-link {
  position: absolute;
  z-index: 2;
  top: var(--s2);
  left: var(--s3);
  padding: var(--s2) var(--s3);
  background: var(--elevated);
  border-radius: var(--r-control);
}
.skip-link:not(:focus) { clip-path: inset(50%); }

/* Top bar */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar {
  max-width: 115rem;
  min-height: var(--s7);
  margin: auto;
  padding: var(--s2) var(--s5);
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--s2) var(--s4);
}
.brand { display: inline-flex; flex: none; text-decoration: none; }
.brand img { display: block; }
.brand .brand-dark, :root[data-theme="dark"] .brand-light { display: none; }
:root[data-theme="dark"] .brand-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .brand-light { display: none; }
  :root:not([data-theme]) .brand-dark { display: block; }
}
/* Area tabs and rail entries. The selected one: ink, heavier, and the one blue marker. */
.area-tabs { display: flex; gap: var(--s1); font-weight: 500; }
.area-tabs a, .section-nav a {
  display: flex;
  align-items: center;
  min-height: var(--control);
  padding: 0 var(--s3);
  border-radius: var(--r-control);
  color: var(--secondary-ink);
  text-decoration: none;
}
.area-tabs a:hover, .section-nav a:hover { background: var(--hover); color: var(--ink); }
.area-tabs a[aria-current], .section-nav a[aria-current] { color: var(--ink); font-weight: 600; border-radius: 0; }
.area-tabs a[aria-current] { box-shadow: inset 0 -2px 0 var(--signal); }
.section-nav a[aria-current] { box-shadow: inset 2px 0 0 var(--signal); background: var(--hover); }
.bar-link { display: inline-flex; align-items: center; min-height: var(--control); color: var(--secondary-ink); font-size: var(--t-meta); }
.product-link-list { margin-block: var(--s2) var(--s4); padding-inline-start: var(--s5); }
.product-link-list li { margin-block: var(--s1); }
.review-key-decline { margin-block-start: var(--s4); }
.account {
  min-width: 0;
  margin-left: auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--s2) var(--s3);
}
.bar-util {
  min-height: var(--s6);
  padding: 0 var(--s2);
  border-color: var(--line);
  color: var(--secondary-ink);
  font-size: var(--t-label);
  font-family: var(--mono);
  white-space: nowrap;
}
.bar-util:not(:disabled):hover {
  border-color: var(--control-line);
  color: var(--ink);
}
.account-name { line-height: 1.2; min-width: 0; overflow-wrap: anywhere; }
.account-name strong, .account-name small { display: block; }
.account-name strong { font-weight: 500; }
.account-name small { margin-top: var(--s1); color: var(--muted); font-size: var(--t-label); }
.appearance {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  color: var(--muted);
  font-size: var(--t-label);
  font-weight: 400;
}
.appearance select { min-height: var(--control); cursor: pointer; font-size: var(--t-meta); }

/*
  The account menu and, on a phone or a review page, the page fold: each a closed
  summary in the bar that opens a floating layer, the one place a shadow is used.
*/
:is(.account-menu, .page-fold) { position: relative; z-index: 4; }
:is(.account-menu, .page-fold) > summary {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-height: var(--control);
  padding: var(--s1) var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  color: var(--ink);
  list-style: none;
}
:is(.account-menu, .page-fold) > summary::-webkit-details-marker { display: none; }
:is(.account-menu, .page-fold) > summary::after { content: "⌄"; content: "⌄" / ""; color: var(--muted); }
:is(.account-menu, .page-fold)[open] > summary::after { transform: rotate(180deg); }
:is(.account-menu, .page-fold)[open] > summary { box-shadow: inset 0 -2px 0 var(--signal); }
.account-menu summary .account-name { max-width: 16rem; }
.page-fold > summary { font-weight: 600; }
:is(.account-menu, .page-fold)[open] > :is(.account-menu-panel, .page-fold-panel) {
  position: absolute;
  top: calc(100% + var(--s1));
  z-index: 10;
  display: grid;
  gap: var(--s3);
  justify-items: start;
  width: min(20rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 5.5rem);
  overflow: auto;
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r-layer);
  background: var(--elevated);
  box-shadow: var(--shadow-layer);
}
.account-menu-panel { right: 0; }
.page-fold-panel { left: 0; justify-items: stretch; }
.account-menu-panel a,
.account-menu-panel .menu-util,
.account-menu-panel .phone-util {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: var(--s5);
  padding: 0;
  border-color: transparent;
  color: var(--secondary-ink);
  font-size: var(--t-body);
  font-weight: 400;
}
.account-menu-panel .menu-util:not(:disabled):hover,
.account-menu-panel .phone-util:not(:disabled):hover {
  color: var(--accent);
  background: transparent;
  border-color: transparent;
}
.account-menu-panel form { margin: 0; }
.page-fold-panel .area-tabs { flex-wrap: wrap; padding-bottom: var(--s3); border-bottom: 1px solid var(--line); }
.page-fold, .account-menu-panel .phone-passkeys, .account-menu-panel .phone-util { display: none; }
.review-top .page-fold { display: block; }

/* Frame and rail */
.workspace-frame { max-width: 115rem; min-height: calc(100dvh - 4rem); margin: auto; }
.workspace-frame.has-rail { display: grid; grid-template-columns: 13rem minmax(0, 1fr); }
.workspace-rail { padding: var(--s4) var(--s3); background: var(--surface); border-right: 1px solid var(--line); }
.section-nav { display: grid; gap: var(--s1); }
.section-nav a { min-height: var(--s6); padding: var(--s1) var(--s3); font-size: var(--t-meta); font-weight: 500; }
.today-links { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line); font-size: var(--t-meta); }
main {
  min-width: 0;
  width: 100%;
  max-width: 84rem;
  margin: 0 auto;
  padding: var(--s6) var(--s6) var(--s7);
}

/* Type */
h1, h2, h3 { margin-top: 0; color: var(--ink); overflow-wrap: break-word; text-wrap: balance; }
h1 { font-size: var(--t-title); font-weight: 500; line-height: 1.15; letter-spacing: -.02em; margin-bottom: var(--s5); }
h2 { font-size: var(--t-section); font-weight: 600; line-height: 1.3; letter-spacing: -.01em; margin-bottom: var(--s3); }
h3 { font-size: var(--t-body); font-weight: 600; line-height: 1.5; margin-bottom: var(--s2); }
p, .notice, .empty { max-inline-size: var(--prose); line-height: 1.5; overflow-wrap: break-word; }
small { font-size: var(--t-meta); }
section { margin: var(--s6) 0; }

/*
  A panel is a ruled section, not a box: one hairline above, space, content.
  Nothing on a page sits in a bordered card, so nothing can be a card in a card.
*/
.panel { min-width: 0; margin-block: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line); }
.panel > :last-child { margin-bottom: 0; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
.stack > * { margin: 0; min-width: 0; }
.muted, .empty { color: var(--muted); }
ul.clean { list-style: none; padding: 0; margin: 0; }
.clean li { border-top: 1px solid var(--line); padding: var(--s3) 0; }
.clean li:first-child { border-top: 0; padding-top: 0; }
.clean li:last-child { padding-bottom: 0; }
.clean p, .clean h3 { margin: var(--s1) 0; }
/* A list row has one anchor, its title. The line under it is a note, and steps back. */
.clean li > a, .clean h3 a { font-weight: 600; }
.clean p { font-size: var(--t-meta); color: var(--secondary-ink); }
/* The feature map: a name that opens the place, and one line on what a person does there. */
.guide-list { margin: 0; padding: 0; }
ul.guide-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: var(--s5) var(--s6); }
ol.guide-list { display: grid; gap: var(--s4); padding-left: var(--s5); max-width: var(--prose); }
.guide-list h3 { margin: 0 0 var(--s1); }
.guide-list p { margin: 0; max-width: var(--prose); font-size: var(--t-meta); color: var(--secondary-ink); }
/* A next step offered beside a decision: set off by a rule, named at body size. */
.review-next { padding-top: var(--s4); border-top: 1px solid var(--line); }
.review-next h2 { margin-bottom: var(--s1); font-size: var(--t-body); letter-spacing: 0; }
.review-next p { margin: var(--s1) 0 0; max-width: var(--prose); }
dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s2) var(--s5); margin-block: var(--s3) 0; }
dt { color: var(--muted); font-size: var(--t-meta); font-weight: 400; }
strong { font-weight: 600; }
dd { margin: 0; overflow-wrap: anywhere; }
code { font-family: var(--mono); font-size: .875em; overflow-wrap: anywhere; }
pre { max-width: 100%; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: var(--s3) var(--s4); background: var(--surface); border-left: 2px solid var(--line); font: var(--t-meta)/1.5 var(--mono); }

/* Controls. The primary button is ink. Colour is not spent on buttons. */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); margin-top: var(--s4); }
button, .button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: var(--control);
  border: 1px solid var(--ink);
  border-radius: var(--r-control);
  background: var(--ink);
  color: var(--on-ink);
  font: 600 var(--t-meta)/1.25 Barlow, system-ui, sans-serif;
  padding: var(--s2) var(--s4);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  white-space: normal;
  overflow-wrap: break-word;
}
button:not(:disabled):hover, .button:hover { background: var(--secondary-ink); border-color: var(--secondary-ink); color: var(--on-ink); }
/* A control that cannot be used yet steps back and does not answer the pointer. */
:is(button, input, select, textarea):disabled { opacity: .5; cursor: not-allowed; }
/* A form that only changes what is shown (a day, a filter) is not the page's action, so its button is outlined. */
.secondary, .top button, form[method="get"] button,
.secondary:not(:disabled):hover, .top button:not(:disabled):hover, form[method="get"] button:not(:disabled):hover { color: var(--ink); border-color: var(--control-line); background: transparent; }
.secondary:not(:disabled):hover, .top button:not(:disabled):hover, form[method="get"] button:not(:disabled):hover { background: var(--hover); }
/* A ghost control inside an elevated toolbar or drawer: no resting border, calm hover surface. */
.quiet, .quiet:not(:disabled):hover { border-color: transparent; color: var(--secondary-ink); background: transparent; }
.quiet:not(:disabled):hover { color: var(--ink); background: var(--hover); }
/* An action that removes or disconnects something: outlined in the failure hue, and its words say what is lost. */
.danger, .danger:not(:disabled):hover { color: var(--status-bad); border-color: var(--status-bad); background: transparent; }
.danger:not(:disabled):hover { background: var(--hover); }
/* The light as a filled primary control: at most one per view, on the single action waiting for a person. */
.button.signal, button.signal { border-color: var(--signal-fill); background: var(--signal-fill); color: var(--on-ink); }
.button.signal:not(:disabled):hover, button.signal:not(:disabled):hover { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
label { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s1); min-width: 0; font-size: var(--t-meta); font-weight: 500; color: var(--secondary-ink); }
/* A tick box or an option sits beside its words at its own size; the text-field rules below are not for it. */
label:has(> input:is([type=checkbox], [type=radio])) { display: flex; align-items: flex-start; gap: var(--s2); }
input:is([type=checkbox], [type=radio]) { flex: none; width: var(--s4); height: var(--s4); margin: var(--s1) 0 0; }
input:not([type=hidden], [type=checkbox], [type=radio]), select, textarea {
  min-width: 0;
  max-width: 100%;
  min-height: var(--control);
  border: 1px solid var(--control-line);
  border-radius: var(--r-control);
  color: var(--ink);
  background: var(--surface);
  padding: var(--s2) var(--s3);
  font: var(--t-body)/1.5 Barlow, system-ui, sans-serif;
  font-variant-numeric: tabular-nums lining-nums;
}
input:not([type=hidden], [type=checkbox], [type=radio]), select, textarea { width: 100%; }
textarea { min-height: 8rem; }
/* A field the person has filled in wrongly: the failure hue and a heavier edge, with the browser's own message beside it. */
:is(input, select, textarea):user-invalid { border-color: var(--status-bad); box-shadow: inset 0 0 0 1px var(--status-bad); }
.login { max-width: 27rem; }
/*
  A form is filled top to bottom and is no wider than a line of prose. Its button is
  as wide as its words; a number, a date or a time gets a field its own size.
*/
form { max-inline-size: var(--prose); }
.stack > :is(button, .button) { justify-self: start; }
input:is([type=number], [type=date], [type=time], [type=datetime-local]) { width: auto; min-width: 9rem; justify-self: start; }

/*
  Status lines, in four kinds (notice() in html.mjs). Hue never stands alone: each
  kind has its own mark and its own words. Done is a tick, a caution is "!", a
  failure is a cross, and a plain statement of how things stand carries no mark.
*/
.notice { margin-block: var(--s4); padding: var(--s2) var(--s3); border-left: 2px solid var(--control-line); background: var(--surface); }
.notice::before { margin-right: var(--s2); font-weight: 600; }
.notice.success { border-left-color: var(--status-good); }
.notice.success::before { content: "✓"; content: "✓" / ""; color: var(--status-good); }
.notice.warning { border-left-color: var(--status-warn); }
.notice.warning::before { content: "!"; content: "!" / ""; color: var(--status-warn); }
.notice.error { border-left-color: var(--status-bad); }
.notice.error::before { content: "✕"; content: "✕" / ""; color: var(--status-bad); }
[role=alert]:not(.notice):not(:empty)::before { content: "!"; content: "!" / ""; margin-right: var(--s2); color: var(--status-warn); font-weight: 600; }

/*
  Tables. Dense, ruled, no outer box. A column of numbers is right-aligned by
  the n1..n12 classes that table() in html.mjs sets on the table. Long machine
  values are cut to one line and open in full on hover or when the table has focus.
*/
.table { min-width: 0; max-width: 100%; overflow-x: auto; }
table { width: auto; border-collapse: collapse; min-width: 30rem; font-size: var(--t-meta); }
/* A table of six or more columns takes the full measure. A smaller one keeps its own width, so a number stays near its label. */
table:has(th:nth-child(6)) { width: 100%; }
th, td { text-align: left; vertical-align: top; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); overflow-wrap: break-word; }
td time { white-space: nowrap; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
th { font-size: var(--t-label); font-weight: 500; color: var(--muted); white-space: nowrap; vertical-align: bottom; }
/* Past phone width, a long heading takes a second line between its words before its table scrolls; the rows keep one line. */
@media (width > 38rem) {
  th { white-space: normal; text-wrap: balance; }
  table:has(th:nth-child(6)) :is(th, td) { padding: var(--s2) var(--s1); }
  table:has(th:nth-child(6)) :is(th, td):first-child { padding-left: 0; }
  table:has(th:nth-child(6)) :is(th, td):last-child { padding-right: 0; }
  table:has(th:nth-child(6)) td:first-child:has(p) { min-width: 11rem; }
  table:has(th:nth-child(6)) td:first-child .stack { gap: var(--s1); }
  table:has(th:nth-child(6)) .row-links { white-space: normal; line-height: 1.3; }
  :where(table:has(th:nth-child(6))) td code:not(.hash) { max-width: 11ch; }
  :where(table:has(th:nth-child(6))) td code.hash { max-width: 8ch; }
}
@media (width > 72rem) {
  table:has(th:nth-child(6)) :is(th, td) { padding: var(--s2); }
  table:has(th:nth-child(6)) :is(th, td):first-child { padding-left: 0; }
  table:has(th:nth-child(6)) :is(th, td):last-child { padding-right: 0; }
  table:has(th:nth-child(6)) td:first-child:has(p) { min-width: 18rem; }
  table:has(th:nth-child(6)) .row-links { white-space: nowrap; }
  :where(table:has(th:nth-child(6))) td code:not(.hash) { max-width: 22ch; }
  :where(table:has(th:nth-child(6))) td code.hash { max-width: 12ch; }
}
@media (max-width: 72rem) and (width > 56rem) {
  main { padding: var(--s6) var(--s5) var(--s7); }
}
/* A row has one anchor: its first cell, in ink. The rest of the row steps back. */
td { color: var(--secondary-ink); }
td:first-child { font-weight: 500; color: var(--ink); }
tbody tr:hover { background: var(--hover); }
.n1 :is(th, td):nth-child(1), .n2 :is(th, td):nth-child(2), .n3 :is(th, td):nth-child(3),
.n4 :is(th, td):nth-child(4), .n5 :is(th, td):nth-child(5), .n6 :is(th, td):nth-child(6),
.n7 :is(th, td):nth-child(7), .n8 :is(th, td):nth-child(8), .n9 :is(th, td):nth-child(9),
.n10 :is(th, td):nth-child(10), .n11 :is(th, td):nth-child(11), .n12 :is(th, td):nth-child(12) { text-align: right; }
td code {
  display: inline-block;
  max-width: 30ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  color: var(--secondary-ink);
}
/* A hash or machine id (hashCode() in html.mjs) is told apart by its first characters; a name keeps its 30ch. */
td code.hash { max-width: 12ch; }
p code.hash, dd code.hash { display: inline-block; max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
p code.hash:hover, dd code.hash:hover { max-width: none; white-space: normal; overflow-wrap: anywhere; }
tr:hover td code, .table:focus td code, .table:focus-within td code { max-width: none; white-space: normal; }
/*
  A set of views of one list (a range, a filter): links in a row, the chosen one in
  ink with the blue marker. Each choice is a link, so the view has an address.
*/
.choices { display: flex; flex-wrap: wrap; gap: 0 var(--s4); font-size: var(--t-meta); }
.choices a { display: inline-flex; align-items: center; gap: var(--s1); min-height: var(--control); color: var(--muted); text-decoration: none; white-space: nowrap; }
.choices a:hover { color: var(--ink); }
.choices [aria-current] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--signal); }
/* The line under a filter: how many rows are shown, and the way back to all of them. */
.count { margin: var(--s2) 0 var(--s4); font-size: var(--t-meta); color: var(--muted); }
/* The links at the end of a row: one to a line, never broken across two. */
.row-links { display: grid; gap: var(--s1); justify-items: start; white-space: nowrap; }

/* Reviews */
.review-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.wording-comparison { display: grid; gap: var(--s2); }
.wording-comparison h2, .wording-comparison p { margin: 0; }
.wording-comparison .review-text { padding: var(--s3) var(--s4); border-left: 2px solid var(--line); background: var(--surface); }
.wording-comparison ins { text-decoration: underline; text-underline-offset: .18em; font-weight: 600; }
.wording-comparison del { text-decoration-thickness: 1px; color: var(--muted); }
.wording-comparison p + h2 { margin-top: var(--s3); }
.wording-comparison p:last-child { border-color: var(--ink); }
.decision-question h2, .brief-selection h2 { margin-block-end: var(--s2); }
.decision-question p { margin: 0; }
.brief-selection { margin: var(--s3) 0; }
.brief-passages { list-style: none; padding: 0; max-width: var(--prose); }
.brief-passages li { padding: var(--s3) var(--s4); border-inline-start: 2px solid var(--ink); background: var(--surface); }
.brief-passages li + li { margin-block-start: var(--s2); }
summary { cursor: pointer; }
.daily-activity summary h2 { display: inline; }

/* Below tablet width the rail and top area tabs move into the page fold so the bar stays strictly one row. */
@media (max-width: 56rem) {
  .workspace-frame.has-rail { display: block; }
  .workspace-rail { display: none; }
  .page-fold { display: block; }
  .bar { flex-wrap: nowrap; gap: var(--s3); padding-inline: var(--s4); }
  .bar > .area-tabs, .account > .bar-link { display: none; }
  .account-menu-panel .phone-passkeys { display: inline-flex; }
  main { padding: var(--s5) var(--s4) var(--s7); }
}
/*
  A phone: one row. The wordmark, the page fold (which also holds the area tabs) and the
  account menu. Both summaries shrink and cut their text, so no name widens the page, and
  both panels open across the bar instead of from their summary.
*/
@media (max-width: 40rem) {
  .bar { position: relative; flex-wrap: nowrap; gap: var(--s3); }
  .bar > .area-tabs, .account > .shield-pill, .account > .bar-link, .account > .bar-util { display: none; }
  .account-menu-panel .phone-passkeys, .account-menu-panel .phone-util { display: inline-flex; }
  .brand img { width: 6.25rem; height: auto; }
  .account { flex-wrap: nowrap; }
  :is(.account-menu, .page-fold) { position: static; min-width: 0; }
  :is(.account-menu, .page-fold) > summary { min-width: 0; }
  .page-fold > summary > span, .account-menu summary .account-name { min-width: 0; }
  .page-fold > summary > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .account-menu summary .account-name { max-width: 7rem; }
  .account-menu summary .account-name :is(strong, small) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  :is(.account-menu, .page-fold)[open] > :is(.account-menu-panel, .page-fold-panel) {
    left: var(--s3);
    right: var(--s3);
    width: auto;
  }
}
@media (max-width: 24rem) {
  .bar { padding-inline: var(--s2); gap: var(--s2); }
  .brand img { width: 4.5rem; }
  :is(.account-menu, .page-fold) > summary { padding: var(--s1) var(--s2); gap: var(--s1); }
  .page-fold > summary { font-size: var(--t-meta); }
  .account-menu summary .account-name { max-width: 4.5rem; font-size: var(--t-label); }
  .stacks td:nth-child(n) { grid-template-columns: 7rem minmax(0, 1fr); gap: var(--s2); }
  .stacks .row-links { white-space: normal; }
}
@media (max-width: 38rem) {
  .review-top + .workspace-frame main { padding-top: var(--s4); padding-bottom: var(--s6); }
  .review-top + .workspace-frame .stack,
  .review-top + .workspace-frame label:has(> input[type=date]) { grid-template-columns: minmax(0, 1fr); }
  .review-top + .workspace-frame input[type=date] { min-inline-size: 0; }
  .review-top + .workspace-frame main > h1 { margin-bottom: var(--s4); }
  .appearance select { font-size: var(--t-body); }
  dl { grid-template-columns: 1fr; gap: var(--s1); }
  dd + dt { margin-top: var(--s2); }
  .daily-activity table { min-width: 0; }
  /* A table of up to four columns wraps to the screen instead of scrolling sideways. */
  table:not(:has(th:nth-child(5))) { min-width: 0; }
  /*
    A wide list (table() with stacks) becomes one block per row: the row's name, then
    each value beside its column's name. Nothing is scrolled sideways to reach a link.
  */
  .stacks { overflow-x: visible; }
  .stacks :is(table, tbody, tr, td) { display: block; }
  .stacks table { width: 100%; min-width: 0; }
  .stacks thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .stacks tr { padding-block: var(--s4); border-bottom: 1px solid var(--line); }
  .stacks tr:first-child { padding-top: 0; }
  .stacks tbody tr:hover { background: transparent; }
  .stacks td:nth-child(n) { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); column-gap: var(--s3); row-gap: 0; padding: var(--s1) 0; border: 0; text-align: left; }
  .stacks td::before { content: attr(data-label); content: attr(data-label) / ""; font-size: var(--t-label); color: var(--muted); grid-column: 1; }
  .stacks td > * { grid-column: 2; }
  .stacks td:first-child:nth-child(n) { display: block; padding-bottom: var(--s2); font-size: var(--t-body); }
  .stacks td:first-child::before { content: none; }
  .stacks td:first-child > * { grid-column: auto; }
  .stacks td code { max-width: 100%; }
  .daily-activity th, .daily-activity td { padding-inline: var(--s1); overflow-wrap: normal; }
}
@media (max-width: 22rem) {
  .daily-activity th, .daily-activity td { font-size: var(--t-label); padding-inline: 0; }
}

/* Administration */
.org-admin, .org-admin-side { display: grid; gap: 0; }
.org-admin-grid { display: grid; gap: 0 var(--s7); grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); align-items: start; }
.org-admin-side { min-width: 0; }
.org-admin section { margin: 0 0 var(--s6); }
.org-admin p:last-child { margin-bottom: 0; }
.org-admin-connections, .org-admin-products { list-style: none; margin: 0; padding: 0; }
.org-admin-connections > li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: start;
  gap: var(--s2) var(--s4);
  padding: var(--s3) 0;
  border-top: 1px solid var(--line);
}
.org-admin-connections > li:last-child { border-bottom: 1px solid var(--line); }
.org-admin-connections h3 { margin-bottom: 0; }
.org-admin-connections code { color: var(--muted); }
.org-admin-enrollment { display: grid; gap: var(--s1); justify-items: end; margin-left: auto; }
.org-admin-enrollment strong { color: var(--status-good); }
.org-admin-enrollment strong::before { content: "✓ "; content: "✓ " / ""; }
.org-admin-enrollment span { color: var(--muted); font-size: var(--t-meta); }
.org-admin-products { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }
.org-admin-products > li { font-weight: 600; }
.org-admin-products > li::before { content: "✓ "; content: "✓ " / ""; color: var(--status-good); }
.org-admin table { min-width: 0; }
.status-live {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  color: var(--status-good);
  font-weight: 600;
  white-space: nowrap;
}
.status-ready {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}
.admin-mode-pill {
  display: inline-flex;
  align-items: center;
  padding: 0 var(--s2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--secondary-ink);
  font-size: var(--t-label);
  font-weight: 500;
  white-space: nowrap;
}

/* The quiet shield pill: protection is on. Not a status alarm, not a button. */
.shield-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  min-height: var(--s5);
  padding: 0 var(--s2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--status-good);
  font-size: var(--t-label);
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
}
a.shield-pill:hover { color: var(--status-good); background: var(--hover); }
.shield-dot { width: var(--s2); height: var(--s2); border-radius: var(--r-pill); background: var(--status-good); }

/* Cyber Shield executive hero, KPI strip & ruled Protection running status table */
.cyber-shield-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: var(--s5);
  align-items: start;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  margin: 0 0 var(--s2);
  font-size: var(--t-meta);
  font-weight: 500;
  color: var(--muted);
}
.signal-dot {
  width: var(--s2);
  height: var(--s2);
  border-radius: var(--r-pill);
  background: var(--signal);
  flex: none;
}
.cyber-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s6);
  align-items: start;
  margin-bottom: var(--s6);
}
.cyber-posture {
  display: grid;
  gap: var(--s2);
  min-width: 0;
  align-content: start;
}
.cyber-posture .actions { margin-top: var(--s3); }
.cyber-hero-fig {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s3);
  margin: var(--s1) 0 var(--s2);
}
.cyber-spotlight { margin: 0; }
.cyber-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  gap: var(--s4) var(--s6);
  margin: 0 0 var(--s6);
  padding-top: var(--s5);
  border-top: 1px solid var(--line);
}
.cyber-kpi {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: var(--s1);
  min-width: 0;
}
.cyber-kpi dt { color: var(--muted); font-size: var(--t-meta); font-weight: 400; }
.cyber-kpi dd { margin: 0; }
.cyber-status-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s2);
  margin-bottom: var(--s3);
}
.cyber-status-head h2 { margin: 0; }
.cyber-all-running {
  font-size: var(--t-meta);
  font-weight: 500;
  color: var(--status-good);
}
.cyber-status-list { display: grid; }
.cyber-status-row {
  display: grid;
  grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr) auto;
  gap: var(--s2) var(--s5);
  align-items: baseline;
  padding: var(--s3) 0;
  border-top: 1px solid var(--line);
}
.cyber-status-name { font-weight: 600; color: var(--ink); font-size: var(--t-meta); }
.cyber-status-detail { min-width: 0; font-size: var(--t-meta); color: var(--secondary-ink); }
.cyber-status-detail code.hash {
  display: inline-block;
  max-width: 16ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
.cyber-status-detail code.hash:hover {
  max-width: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
.cyber-status-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s3);
  justify-content: flex-end;
  font-size: var(--t-meta);
  white-space: nowrap;
}
.cyber-inline-dl {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s4);
  margin: 0;
}
.cyber-inline-item {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s2);
}
.cyber-inline-item dt { color: var(--muted); font-size: var(--t-meta); }
.cyber-inline-item dd { margin: 0; color: var(--ink); font-weight: 500; }
.cyber-brief-drawer { margin-top: var(--s2); }
.cyber-brief-drawer > summary { color: var(--accent); font-size: var(--t-meta); font-weight: 500; }
.cyber-brief-drawer[open] > form { margin-top: var(--s3); }
@media (max-width: 72rem) {
  .cyber-status-row {
    grid-template-columns: minmax(10rem, 13rem) minmax(0, 1fr) minmax(0, 14rem);
    gap: var(--s2) var(--s4);
  }
  .cyber-status-links {
    white-space: normal;
    text-align: right;
  }
}
@media (max-width: 48rem) {
  .cyber-hero { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .cyber-status-row { grid-template-columns: minmax(0, 1fr); gap: var(--s1); }
  .cyber-status-links { justify-content: flex-start; text-align: left; white-space: normal; }
}

/* Calm Inbox & Bridge Strip */
.bridge-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  margin: 0 0 var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--surface);
  font-size: var(--t-meta);
}
.bridge-strip.is-calm { border-left: 3px solid var(--status-good); color: var(--secondary-ink); }
.bridge-strip.is-takeover { border-left: 3px solid var(--status-warn); background: var(--elevated); }
.inbox-circuit-breaker { border-left: 3px solid var(--status-bad); }
.inbox-queue { display: grid; gap: var(--s3); }
.inbox-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--s3);
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--surface);
}
.inbox-card-main { display: grid; gap: var(--s1); min-width: 0; }
.inbox-card-main h3 { margin: 0; }
.inbox-meta { margin: 0; font-size: var(--t-meta); color: var(--muted); }
.inbox-badges { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.inbox-freshness { font-size: var(--t-meta); color: var(--secondary-ink); }

/* Zero-Hallucination Epistemic Proof Workbench */
.ep-workbench { display: grid; gap: var(--s4); margin: var(--s4) 0; }
.ep-mobile-tabs { display: none; gap: var(--s2); }
.ep-panes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s5);
  align-items: start;
}
.ep-pane {
  display: grid;
  gap: var(--s3);
  min-width: 0;
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r-layer);
  background: var(--surface);
}
.ep-workbench-header { display: grid; gap: var(--s2); }
.ep-workbench-header h2, .ep-evidence-heading { margin: 0; }
.ep-decision-question { margin: 0; color: var(--secondary-ink); }
.ep-risk, .ep-pill, .ep-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  padding: var(--s1) var(--s2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--t-label);
  font-weight: 500;
  width: fit-content;
}
.ep-badge-verified, .ep-source-fresh { color: var(--status-good); }
.ep-badge-blocked, .ep-source-stale { color: var(--status-bad); }
.ep-risk-2 { color: var(--status-warn); }
.ep-risk-3 { color: var(--accent); }
.ep-objections {
  padding: var(--s3) var(--s4);
  border: 1px solid var(--line);
  border-left: 3px solid var(--status-bad);
  border-radius: var(--r-control);
  background: var(--elevated);
}
.ep-assertions { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.ep-assertion {
  display: grid;
  gap: var(--s2);
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--elevated);
}
.ep-assertion.is-blocked { border-left: 3px solid var(--status-bad); }
.ep-assertion.is-verified { border-left: 3px solid var(--status-good); }
.ep-assertion-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); }
.ep-assertion-kind { font-size: var(--t-label); color: var(--muted); text-transform: uppercase; }
.ep-assertion-text { margin: 0; }
.ep-cite-list { display: flex; flex-wrap: wrap; gap: var(--s1); }
.ep-cite-chip {
  min-height: auto;
  padding: var(--s1) var(--s2);
  border: 1px solid var(--control-line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--accent);
  font-size: var(--t-label);
  cursor: pointer;
}
.ep-cite-chip.is-invalid { color: var(--status-bad); border-color: var(--status-bad); }
.ep-cite-chip[aria-pressed="true"] { background: var(--signal-fill); color: var(--on-ink); border-color: var(--signal-fill); }
.ep-cite-mark { background: transparent; color: inherit; }
.ep-cite-mark[data-cite-active="true"] {
  background: var(--signal-tint);
  color: var(--ink);
  border-left: 2px solid var(--signal);
  border-radius: var(--r-control);
  padding: 0 var(--s1);
}
.ep-source-card {
  display: grid;
  gap: var(--s3);
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--elevated);
}
.ep-source-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.ep-source-title-row h3 { margin: 0; }
.ep-source-meta { display: flex; flex-wrap: wrap; gap: var(--s2); font-size: var(--t-label); color: var(--muted); }
.ep-source-text {
  margin: 0;
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--page);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: var(--t-meta);
}
.ep-failure-list { margin: 0; padding-left: var(--s4); color: var(--status-bad); font-size: var(--t-meta); }
.ep-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.ep-block-reason { margin: 0; font-size: var(--t-meta); color: var(--status-bad); }
.ep-calc-detail {
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--elevated);
  font-size: var(--t-meta);
}
.ep-live-status { margin: 0; font-size: var(--t-label); color: var(--muted); }

/* Counterfactual Policy Flight Simulator */
.sim-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: var(--s4);
  margin: var(--s4) 0;
}
.sim-tile {
  display: grid;
  gap: var(--s1);
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--surface);
}
.sim-tile-label { font-size: var(--t-label); color: var(--muted); }
.sim-tile-value { font-size: var(--t-figure); font-weight: 600; line-height: 1.1; }
.sim-splits { border-left: 3px solid var(--status-warn); }

/* Workstation Bridge overview */
.bridge-overview { display: grid; gap: var(--s5); }
.bridge-portal-card { display: grid; gap: var(--s3); }
.bridge-takeover-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }

/* Phase 0 Calm primitives: figures, priority lead block, and quiet Noticed line */
.fig {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s1);
  font-family: Barlow, system-ui, sans-serif;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}
.fig-title { font-size: var(--t-title); }
.fig-figure { font-size: var(--t-figure); }
.fig-display { font-size: var(--t-display); font-weight: 500; line-height: .95; letter-spacing: -.035em; }
:root[data-theme="dark"] .fig-display { font-weight: 400; letter-spacing: -.03em; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .fig-display { font-weight: 400; letter-spacing: -.03em; }
}
@media (max-width: 38rem) {
  .fig-display { font-size: var(--t-figure); }
}
.fig-unit { font-size: var(--t-meta); font-weight: 400; letter-spacing: 0; color: var(--muted); }
.fig-display .fig-unit { font-size: var(--t-section); }
.fig-pair { display: grid; gap: var(--s2); align-content: start; min-width: 0; }
.fig-pair p { margin: 0; font-size: var(--t-meta); color: var(--secondary-ink); }
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: var(--s5) var(--s6); margin: 0; }

.lead {
  min-width: 0;
  margin: 0 0 var(--s6);
  padding: var(--s1) 0 var(--s1) var(--s5);
  border-left: 2px solid var(--signal);
  overflow-wrap: anywhere;
}
.lead-title {
  max-inline-size: 30ch;
  margin: var(--s3) 0;
  font-size: var(--t-title);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--ink);
  text-wrap: balance;
}
.lead-title:first-child { margin-top: 0; }
.lead-body { margin: 0; color: var(--secondary-ink); }
.lead .actions { margin-top: var(--s5); }
.lead.is-calm { border-left-color: var(--line); }
.lead.is-calm .lead-title::before { content: "✓ "; content: "✓ " / ""; color: var(--status-good); }

.noticed { display: grid; gap: var(--s1); margin: var(--s6) 0 0; max-inline-size: var(--prose); }
.noticed-k { font-size: var(--t-meta); font-weight: 500; color: var(--muted); }
.noticed-t { font-size: var(--t-body); line-height: 1.5; color: var(--ink); }
.noticed-a { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s4); font-size: var(--t-meta); }
.noticed-a:empty { display: none; }
.noticed-a a { color: var(--secondary-ink); font-weight: 500; }
.noticed-a a:hover { color: var(--ink); }

@media (max-width: 56rem) {
  .ep-mobile-tabs { display: flex; }
  .ep-panes { grid-template-columns: minmax(0, 1fr); }
  .ep-workbench[data-ep-active-tab="claims"] .ep-evidence-pane { display: none; }
  .ep-workbench[data-ep-active-tab="evidence"] .ep-claims-pane { display: none; }
}

/* Counterfactual 90-day Replay Outcome Strip & Plain-English Diff Compare */
.sim-replay-bar {
  display: block;
  width: 100%;
  height: var(--s2);
  margin: var(--s3) 0;
  border-radius: var(--r-pill);
  overflow: hidden;
  background: var(--grid);
}
.sim-seg-good { fill: var(--status-good); }
.sim-seg-signal { fill: var(--signal); }
.sim-seg-warn { fill: var(--status-warn); }
.sim-seg-bad { fill: var(--status-bad); }
.sim-replay-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s3);
  margin: var(--s3) 0 var(--s4);
  padding: var(--s3) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.sim-replay-cell {
  display: grid;
  gap: var(--s1);
  min-width: 0;
  align-content: start;
}
.sim-replay-cell + .sim-replay-cell {
  border-left: 1px solid var(--line);
  padding-left: var(--s3);
}
.sim-replay-cell > button,
.sim-replay-cell > a {
  justify-content: flex-start;
  text-align: left;
  padding: var(--s1) var(--s2);
}
.sim-diff-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s4);
  margin: var(--s4) 0;
}
.sim-diff-compare > * {
  min-width: 0;
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--surface);
}
.sim-diff-compare > :last-child {
  border-left: 2px solid var(--signal);
}
@media (max-width: 40rem) {
  .sim-replay-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sim-replay-cell + .sim-replay-cell { border-left: 0; padding-left: 0; }
  .sim-diff-compare { grid-template-columns: minmax(0, 1fr); }
}

/* Pending review Passkey enrollment callout & BEC fraud flag emphasis */
.review-passkey-callout {
  padding: var(--s4);
  border: 1px solid var(--line);
  border-left: 2px solid var(--signal);
  border-radius: var(--r-control);
  background: var(--surface);
}
.review-flag-bad { color: var(--status-bad); font-weight: 600; }
.review-flag-warn { color: var(--status-warn); font-weight: 600; }

/* Global Command Palette (Cmd/Ctrl+K) & Opt-in Guided Tour (?) */
dialog.cmd-palette,
dialog.tour-dialog {
  width: min(36rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 4rem);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-layer);
  background: var(--elevated);
  color: var(--ink);
  box-shadow: var(--shadow-layer);
  overflow: hidden;
}
dialog.cmd-palette::backdrop,
dialog.tour-dialog::backdrop {
  background: var(--backdrop);
}
.cmd-palette-head {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--line);
}
.cmd-palette-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: var(--s1) 0;
  min-height: var(--s6);
}
.cmd-palette-input:focus-visible { outline: none; }
.cmd-palette-close {
  min-height: var(--s5);
  padding: 0 var(--s2);
  font-family: var(--mono);
  font-size: var(--t-label);
}
.cmd-palette-list {
  list-style: none;
  margin: 0;
  padding: var(--s2) var(--s3);
  max-height: 22rem;
  overflow-y: auto;
  display: grid;
  gap: var(--s1);
}
.cmd-palette-group {
  padding: var(--s2) var(--s2) var(--s1);
  font-size: var(--t-label);
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cmd-palette-item {
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: var(--s3);
  min-height: var(--s6);
  padding: var(--s2) var(--s3);
  font-weight: 500;
  color: var(--ink);
  text-align: left;
}
.cmd-palette-item-main {
  display: grid;
  gap: var(--s1);
  min-width: 0;
  flex: 1 1 auto;
}
.cmd-palette-label {
  overflow-wrap: anywhere;
}
.cmd-palette-sub {
  font-size: var(--t-label);
  font-weight: 400;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cmd-palette-meta {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  flex: none;
}
.cmd-palette-badge {
  display: inline-flex;
  align-items: center;
  padding: 0 var(--s2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--t-label);
  font-weight: 500;
  color: var(--secondary-ink);
  white-space: nowrap;
}
.cmd-palette-badge.is-bad {
  color: var(--status-bad);
  border-color: var(--status-bad);
}
.cmd-palette-badge.is-warn {
  color: var(--status-warn);
  border-color: var(--status-warn);
}
.cmd-palette-badge.is-good {
  color: var(--status-good);
  border-color: var(--status-good);
}
.cmd-palette-item.is-active {
  background: var(--hover);
  border-color: var(--line);
  box-shadow: inset 2px 0 0 var(--signal);
}
.cmd-palette-hint {
  font-size: var(--t-label);
  color: var(--muted);
  font-family: var(--mono);
  white-space: nowrap;
}
.cmd-palette-status {
  padding: var(--s2) var(--s3);
  font-size: var(--t-label);
  color: var(--muted);
}
.cmd-palette-empty {
  padding: var(--s4) var(--s2);
  font-size: var(--t-meta);
  color: var(--muted);
}
.cmd-palette-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  padding: var(--s2) var(--s4);
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: var(--t-label);
  color: var(--muted);
}
.cmd-palette-foot-link {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.cmd-palette-foot-link:hover {
  text-decoration: underline;
}

.tour-dialog-head,
.tour-dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
}
.tour-dialog-head { border-bottom: 1px solid var(--line); }
.tour-dialog-foot { border-top: 1px solid var(--line); background: var(--surface); }
.tour-counter { font-size: var(--t-label); color: var(--muted); font-family: var(--mono); }
.tour-dialog-body {
  display: grid;
  gap: var(--s2);
  padding: var(--s5) var(--s4);
}
.tour-kicker {
  margin: 0;
  font-size: var(--t-label);
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tour-dialog-body h2 { margin: 0; }
.tour-copy { margin: 0; color: var(--secondary-ink); }
.tour-refs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s2);
  font-size: var(--t-meta);
}
.tour-dots { display: flex; align-items: center; gap: var(--s2); }
.tour-dot {
  width: var(--s2);
  height: var(--s2);
  border-radius: var(--r-pill);
  background: var(--line);
}
.tour-dot.is-active { background: var(--signal); }
.tour-nav { display: flex; align-items: center; gap: var(--s2); }
.tour-next { border-color: var(--signal); color: var(--ink); }

/* V4.2 Living Company Ontology, Autonomous Triggers & Shadow Proposals */
.admin-ontology-types {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: var(--s2) 0;
}
.admin-risk-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  padding: 0 var(--s2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--secondary-ink);
  font-size: var(--t-label);
  font-weight: 500;
  white-space: nowrap;
}
.admin-risk-pill.is-elevated {
  color: var(--status-warn);
  border-color: var(--status-warn);
}
.admin-risk-pill.is-high {
  color: var(--status-bad);
  border-color: var(--status-bad);
}
.admin-ontology-link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
}
.admin-ontology-link-title {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
  font-weight: 600;
  color: var(--ink);
}
.sim-shadow-card {
  display: grid;
  gap: var(--s2);
  padding: var(--s4) 0;
  border-top: 1px solid var(--line);
}
.sim-shadow-card:first-child {
  border-top: 0;
  padding-top: 0;
}
.sim-shadow-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2) var(--s3);
}
.sim-shadow-head h3 {
  margin: 0;
}
.sim-shadow-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
}
.sim-shadow-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s4);
  font-size: var(--t-meta);
  color: var(--secondary-ink);
}
.audit-pack-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s4);
  font-size: var(--t-meta);
  color: var(--secondary-ink);
}
.admin-inline-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
}
.admin-inline-action-row form {
  margin: 0;
}
.admin-inline-action-row button.secondary {
  min-height: var(--s6);
  padding: var(--s1) var(--s3);
  font-size: var(--t-label);
}
@media (max-width: 38rem) {
  .cyber-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s3) var(--s4);
  }
}

/* V4.3 Day-1 Activation Checklist, Autonomy Heartbeat, Morning Brief & In-Page Audit Verifier */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.kpi {
  display: flex;
  flex-direction: column-reverse;
  gap: var(--s1);
  min-width: 0;
  align-content: start;
}
.kpi-k {
  font-size: var(--t-label);
  color: var(--muted);
}
.kpi-v {
  font-family: Barlow, system-ui, sans-serif;
  font-size: var(--t-title);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--ink);
}
.onboarding-bar {
  border-left: 2px solid var(--signal);
  padding-left: var(--s4);
}
.onboarding-bar-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s3);
}
.onboarding-bar-head h2,
.onboarding-bar-head p {
  margin: 0;
}
.onboarding-bar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
  font-size: var(--t-meta);
}
.onboarding-dismiss-form {
  margin: 0;
}
.onboarding-steps {
  display: grid;
  gap: var(--s2);
}
.onboarding-step {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
  padding: var(--s3) 0;
  border-top: 1px solid var(--line);
}
.onboarding-step:first-child {
  border-top: 0;
  padding-top: var(--s1);
}
.onboarding-step-main {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  min-width: 0;
}
.onboarding-step-main p {
  margin: var(--s1) 0 0;
  font-size: var(--t-meta);
}
.onboarding-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--s5);
  height: var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: var(--t-label);
  color: var(--secondary-ink);
  flex: 0 0 auto;
}
.onboarding-step.is-done strong {
  color: var(--secondary-ink);
}
.onboarding-step-action {
  font-size: var(--t-meta);
  font-weight: 500;
  white-space: nowrap;
}

.autonomy-telemetry-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
  padding: var(--s3) var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--elevated);
  font-size: var(--t-meta);
}
.autonomy-telemetry-head,
.autonomy-telemetry-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s4);
}
.activity-ledger-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
}
.activity-ledger-head h2 {
  margin: 0;
}
.activity-ledger-head .actions {
  margin-top: 0;
}
.button.secondary.is-active {
  background: var(--hover);
  border-color: var(--signal);
  color: var(--ink);
  font-weight: 600;
}
.stacks td > :is(.badge, .admin-risk-pill, .admin-mode-pill, .compare-sev-badge, .compliance-pill, .status-live) {
  justify-self: start;
  width: fit-content;
}
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s4);
}
@media (max-width: 48rem) {
  .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.connector-row-actions {
  margin-top: 0;
  gap: var(--s1) var(--s2);
}
.connector-row-actions form {
  margin: 0;
}
.connector-row-actions button {
  min-height: var(--s5);
  padding: var(--s1) var(--s2);
  font-size: var(--t-label);
}
.team-seat-cell {
  display: grid;
  gap: var(--s1);
  min-width: 0;
}
.team-seat-name {
  white-space: nowrap;
}
.team-seat-ref {
  font-family: var(--mono);
  font-size: var(--t-label);
  overflow-wrap: anywhere;
}
.team-role-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s1);
}
.team-principals-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1);
}
.admin-trigger-form {
  margin: 0;
}
.admin-trigger-form button.secondary {
  min-height: var(--s6);
  padding: var(--s1) var(--s3);
  font-size: var(--t-label);
}

.morning-brief-card,
.water-morning-brief {
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--surface);
  padding: var(--s3) var(--s4);
}
.morning-brief-card summary,
.water-morning-brief summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s2);
  cursor: pointer;
  font-size: var(--t-meta);
  color: var(--ink);
}
.water-brief-k {
  font-weight: 600;
  color: var(--accent);
}
.water-brief-title {
  color: var(--secondary-ink);
}
.morning-brief-sections {
  display: grid;
  gap: var(--s3);
  margin-top: var(--s3);
  padding-top: var(--s3);
  border-top: 1px solid var(--line);
}
.water-morning-brief .morning-brief-sections {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--s3) var(--s4);
}
.morning-brief-section {
  display: grid;
  gap: var(--s1);
  align-content: start;
  min-width: 0;
}
.morning-brief-section p {
  margin: 0;
  font-size: var(--t-meta);
}
.water-welcome-shortcuts {
  font-weight: 500;
}

.ontology-filter-form {
  max-inline-size: none;
}
.ontology-filter-form > .actions {
  align-items: end;
}
.ontology-filter-form label {
  flex: 1 1 11rem;
  min-width: 0;
}
.ontology-filter-form input,
.ontology-filter-form select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.audit-verify-drawer {
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--elevated);
  padding: var(--s3) var(--s4);
}
.audit-verify-drawer summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--ink);
}
.audit-verify-drawer > div {
  margin-top: var(--s3);
  display: grid;
  gap: var(--s3);
}
.audit-verify-meta {
  display: grid;
  grid-template-columns: minmax(8rem, auto) minmax(0, 1fr);
  align-items: baseline;
  gap: var(--s2) var(--s4);
  margin: 0;
  padding: var(--s3) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.audit-verify-meta dt {
  font-size: var(--t-label);
  color: var(--muted);
  white-space: nowrap;
}
.audit-verify-meta dd {
  margin: 0;
  font-size: var(--t-meta);
  overflow-wrap: anywhere;
}
.audit-verify-invariants {
  display: grid;
  gap: 0;
}
.audit-verify-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s3);
  font-size: var(--t-meta);
}
.setup-finish-form {
  max-inline-size: none;
}
.wf-catalog-section table :is(th, td) {
  padding-inline: var(--s3);
}
.wf-catalog-section table :is(th, td):first-child {
  padding-left: 0;
}
.wf-catalog-section table :is(th, td):last-child {
  padding-right: 0;
  white-space: nowrap;
}
td code.bec-domain-code {
  max-width: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 72rem) {
  .stacks:has(th:nth-child(9)) { overflow-x: visible; }
  .stacks:has(th:nth-child(9)) :is(table, tbody, tr, td) { display: block; }
  .stacks:has(th:nth-child(9)) table { width: 100%; min-width: 0; }
  .stacks:has(th:nth-child(9)) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .stacks:has(th:nth-child(9)) tr { padding-block: var(--s4); border-bottom: 1px solid var(--line); }
  .stacks:has(th:nth-child(9)) tr:first-child { padding-top: 0; }
  .stacks:has(th:nth-child(9)) tbody tr:hover { background: transparent; }
  .stacks:has(th:nth-child(9)) td:nth-child(n) { display: grid; grid-template-columns: 12rem minmax(0, 1fr); column-gap: var(--s3); row-gap: 0; padding: var(--s1) 0; border: 0; text-align: left; }
  .stacks:has(th:nth-child(9)) td::before { content: attr(data-label); content: attr(data-label) / ""; font-size: var(--t-label); color: var(--muted); grid-column: 1; }
  .stacks:has(th:nth-child(9)) td > * { grid-column: 2; justify-self: start; }
  .stacks:has(th:nth-child(9)) td:first-child:nth-child(n) { display: block; padding-bottom: var(--s2); font-size: var(--t-body); font-weight: 600; }
  .stacks:has(th:nth-child(9)) td:first-child::before { content: none; }
  .stacks:has(th:nth-child(9)) td:first-child > * { grid-column: auto; }
  .stacks:has(th:nth-child(9)) td code { max-width: 100%; }
}
@media (max-width: 38rem) {
  .stacks:has(th:nth-child(9)) td:nth-child(n) { grid-template-columns: 8.5rem minmax(0, 1fr); }
}
