/* The Work Creates the Interface — Systead product demo.
   Everything visible is a Plot component (vendor/plot) or a composition of
   Plot tokens. This file only lays out the stage and adds the few
   Systead-specific compositions (morph shells, sheet grid, lens rows). */

:root {
  --frame-w: 1920px;
  --frame-h: 1080px;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
}

/* ─── Stage ──────────────────────────────────────────────────────────── */

.demo {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--bg);
}
.frame {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--frame-w);
  height: var(--frame-h);
  transform-origin: 0 0;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 50% 38%, var(--surface) 0%, transparent 70%),
    radial-gradient(900px 600px at 82% 88%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%),
    var(--bg-tinted);
}
.camera {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  will-change: transform;
}
.chrome {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* ─── Window ─────────────────────────────────────────────────────────── */

.window {
  position: absolute;
  left: 240px;
  top: 116px;
  width: 1440px;
  height: 840px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-5);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}
.window-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 40px;
  padding-inline: 16px;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
}
.window-dots {
  display: flex;
  gap: 8px;
}
.window-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
}
.window-title {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: grid;
  font-size: 13px;
  font-weight: var(--w-medium);
  color: var(--ink-soft);
  letter-spacing: -0.005em;
}
.window-title > span {
  grid-area: 1 / 1;
  justify-self: center;
  white-space: nowrap;
}
.window-body {
  position: absolute;
  left: 0;
  right: 0;
  top: 40px;
  bottom: 0;
}

/* Views stack; the director fades between them. */
.view {
  position: absolute;
  inset: 0;
  opacity: 0;
}

/* ─── Systead app chrome (Plot header vocabulary) ───────────────────── */

.app-head {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  height: 56px;
  padding-inline: 24px;
  border-bottom: 1px solid var(--hairline);
}
.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: var(--w-medium);
  letter-spacing: -0.012em;
}
.app-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: var(--r-3);
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: var(--w-bold);
  box-shadow: inset 0 1px 0 hsl(0 0% 100% / 0.12), 0 1px 2px hsl(0 0% 0% / 0.15);
}
.app-head .m-tabs {
  border-bottom: 0;
  height: 56px;
}
.app-head .m-tabs-tab {
  height: 56px;
}
.app-head .m-tabs-tab::after {
  display: none;
}
.tab-indicator {
  position: absolute;
  bottom: -1px;
  height: 1.5px;
  border-radius: var(--r-full);
  background: var(--ink);
  left: 0;
  width: 0;
}
.app-head-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.app-page {
  padding: 28px 32px 0;
}
.app-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-5);
  margin-bottom: var(--s-5);
}
.app-page-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: var(--w-medium);
  letter-spacing: var(--ls-tight);
  line-height: 1.1;
  margin: 0 0 6px;
}
.app-page-lede {
  font-size: var(--t-body-m);
  color: var(--muted);
  margin: 0;
}

/* Plot matrix table, used as the product's data table. */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.4;
}
.table th,
.table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border-faint);
  white-space: nowrap;
}
.table thead th {
  font-family: var(--font-mono);
  font-size: var(--t-tiny);
  font-weight: var(--w-medium);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg-tinted);
  border-bottom-color: var(--hairline);
}
.table tbody tr {
  transition: background-color var(--dur-quick) var(--ease-quick);
}
@media (hover: hover) and (pointer: fine) {
  .table tbody tr:hover {
    background: var(--bg-tinted);
  }
}
.table .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.table .id {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: var(--w-medium);
  color: var(--ink);
}
.table-card {
  border: 1px solid var(--hairline);
  border-radius: var(--r-4);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.table-card .table tbody tr:last-child td {
  border-bottom: 0;
}

/* Status pill from the Plot component-status atom. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: var(--r-full);
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  font-weight: var(--w-medium);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent);
  flex-shrink: 0;
}
.pill-good { background: hsl(142 70% 95%); color: hsl(142 76% 28%); }
.pill-warn { background: hsl(48 100% 95%); color: hsl(43 100% 32%); }
/* One status language: good carries a check, warn an exclamation, both in
   the same 10px disc. At rest a status is icon + label on no fill; when it
   needs the eye (just changed, or wrong) it is lit: tint + hairline stroke.
   Lit → rest fades fill and stroke only, so nothing moves. */
.pill-good::before,
.pill-warn::before {
  width: 10px;
  height: 10px;
  box-shadow: none;
}
.pill-good::before {
  background: currentColor url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2.6 5.2l1.6 1.6 3.3-3.4' fill='none' stroke='white' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px no-repeat;
}
.pill-warn::before {
  background: currentColor url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 2.6v3' stroke='white' stroke-width='1.4' stroke-linecap='round'/%3E%3Ccircle cx='5' cy='7.4' r='.8' fill='white'/%3E%3C/svg%3E") center / 10px no-repeat;
}
.pill.is-rest {
  background: transparent;
  box-shadow: inset 0 0 0 1px transparent;
}
.pill-good.is-lit { box-shadow: inset 0 0 0 1px hsl(142 60% 85%); }
.pill-warn.is-lit { box-shadow: inset 0 0 0 1px hsl(45 90% 78%); }
.pill.is-rest,
.pill.is-lit {
  transition:
    background-color 420ms cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 420ms cubic-bezier(0.23, 1, 0.32, 1);
}
.pill-quiet { background: var(--bg-tinted); color: var(--muted); }
.pill-quiet::before { box-shadow: none; }
.pill-check::before {
  width: 10px;
  height: 10px;
  box-shadow: none;
  background: currentColor url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2.6 5.2l1.6 1.6 3.3-3.4' fill='none' stroke='white' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px no-repeat;
}
.check {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-good-text);
  flex-shrink: 0;
}
.check::after {
  content: "";
  width: 5px;
  height: 8px;
  margin-top: -2px;
  border: solid var(--surface);
  border-width: 0 1.6px 1.6px 0;
  rotate: 45deg;
}
.signal {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.signal::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: calc(0.35 * (1 - var(--pulse, 0)));
  transform: scale(calc(0.8 + var(--pulse, 0) * 0.9));
}

/* ─── Morph shell (shapeshift) ───────────────────────────────────────── */

.shell {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 12px;
  z-index: 20;
}
.shell-bg {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
}
.shell-bg[data-bg="card"] {
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-3);
}
.shell-bg[data-bg="ring"] {
  background: var(--surface);
  border: 1px solid var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.shell-bg[data-bg="field"] {
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  box-shadow: var(--shadow-2);
}
.shell-bg[data-bg="field-focus"] {
  background: var(--surface);
  border: 1px solid var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring), var(--shadow-2);
}
.shell-bg[data-bg="chip"] {
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  box-shadow: var(--shadow-2);
}
.shell-bg[data-bg="dot"] {
  background: var(--accent);
}
.shell-bg[data-bg="good"] {
  background: hsl(142 70% 95%);
  border: 1px solid hsl(142 60% 85%);
}
.shell-clip {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
}
.shell-state {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
}
.shell-state[data-anchor="bottom"] {
  top: auto;
  bottom: 0;
}
.shell-state[data-anchor="right"] {
  left: auto;
  right: 0;
}

/* Inside-card rhythm shared by every Systead component. */
.sc {
  padding: 16px 18px;
  font-size: 13px;
}
.sc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.sc-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: var(--w-medium);
  letter-spacing: var(--ls-snug);
  color: var(--ink);
}
.sc-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-tiny);
  font-weight: var(--w-medium);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.sc-rows {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-border-faint);
}
.sc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border-bottom: 1px solid var(--color-border-faint);
}
.sc-row .grow {
  flex: 1;
  min-width: 0;
}
.sc-sys {
  font-weight: var(--w-medium);
  color: var(--ink);
}
.sc-sub {
  color: var(--muted);
}
.sc-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  color: var(--ink);
}
.sc-old {
  color: var(--muted-soft);
  text-decoration: line-through;
  text-decoration-color: var(--hairline-strong);
}
.sc-arrow {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  margin-inline: 4px;
}
.sc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
}
.sc-foot .cluster {
  display: flex;
  gap: 8px;
}
.sc-note {
  color: var(--muted);
  font-size: 12.5px;
}
.sc-warn { color: var(--color-warn-text); }
.sc-good { color: var(--color-good-text); }
.sys-glyph {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: var(--r-2);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--w-medium);
  color: var(--ink-soft);
  flex-shrink: 0;
}
.sys-mark {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--ink);
  color: var(--bg);
  font-size: 10px;
  font-weight: var(--w-bold);
  flex-shrink: 0;
}

/* ─── Scene: spreadsheet ────────────────────────────────────────────── */

.sheet-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding-inline: 20px;
  border-bottom: 1px solid var(--hairline);
}
.sheet-file {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: var(--w-medium);
}
.sheet-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--hairline-strong);
  position: relative;
}
.sheet-icon::before,
.sheet-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  height: 1px;
  background: var(--hairline-strong);
  top: 6px;
}
.sheet-icon::after { top: 10px; }
.sheet-formula {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding-inline: 20px;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
}
.sheet-ref {
  min-width: 48px;
  padding: 3px 8px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-1);
  text-align: center;
  color: var(--ink);
}
.sheet-fx {
  font-style: italic;
  color: var(--muted);
}
.grid {
  position: relative;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}
.grid th,
.grid td {
  height: 36px;
  padding: 0 12px;
  border-right: 1px solid var(--color-border-faint);
  border-bottom: 1px solid var(--color-border-faint);
  white-space: nowrap;
  overflow: hidden;
}
.grid thead th {
  height: 28px;
  font-family: var(--font-mono);
  font-size: var(--t-tiny);
  font-weight: var(--w-medium);
  color: var(--muted);
  background: var(--bg-tinted);
  text-align: center;
  border-bottom-color: var(--hairline);
}
.grid .rn {
  width: 44px;
  padding: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--t-tiny);
  color: var(--muted);
  background: var(--bg-tinted);
}
.grid .hdr td {
  font-weight: var(--w-medium);
  color: var(--ink);
}
.grid .num {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.grid td.cell {
  transition: background-color var(--dur-quick) var(--ease-quick);
}
@media (hover: hover) and (pointer: fine) {
  .grid td.cell:hover {
    background: var(--bg-tinted);
  }
}
.sheet-saved {
  font-size: 12px;
  color: var(--muted);
}
.sheet-ribbon {
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-tinted);
}
.rb-tabs {
  display: flex;
  gap: 22px;
  height: 32px;
  align-items: flex-end;
  padding-inline: 20px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.rb-tabs span {
  padding-bottom: 7px;
  border-bottom: 2px solid transparent;
}
.rb-tabs .is-on {
  color: var(--ink);
  font-weight: var(--w-medium);
  border-bottom-color: var(--ink);
}
.rb-tools {
  display: flex;
  align-items: center;
  height: 40px;
  padding-inline: 14px;
  font-size: 12px;
  color: var(--ink-soft);
}
.rb-group {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-inline: 12px;
  border-right: 1px solid var(--hairline);
}
.rb-group:last-child { border-right: 0; }
.rb-group b, .rb-group i, .rb-group u { font-size: 13px; color: var(--ink); width: 12px; text-align: center; }
.rb-sel {
  min-width: 70px;
  padding: 3px 8px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-1);
  background: var(--surface);
  color: var(--ink);
}
.rb-sel-s { min-width: 34px; }
.rb-ico {
  width: 14px;
  height: 10px;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 100% 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) var(--al, 0) 50% / 64% 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat;
  opacity: 0.7;
}
.rb-ac { --al: 50%; }
.rb-ar { --al: 100%; }
.sheet-tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding-inline: 12px;
  border-top: 1px solid var(--hairline);
  background: var(--bg-tinted);
  font-size: 12.5px;
  color: var(--ink-soft);
  z-index: 2;
}
.st-nav, .st-add {
  display: flex;
  align-items: center;
  padding-inline: 10px;
  color: var(--muted);
}
.st-tab {
  display: flex;
  align-items: center;
  padding-inline: 14px;
  border-top: 2px solid transparent;
}
.st-tab.is-on {
  background: var(--surface);
  color: var(--ink);
  font-weight: var(--w-medium);
  border-top-color: #1f7a45;
}
.systead-presence {
  margin-left: auto;
  display: flex;
  align-items: center;
}
.st-status {
  display: flex;
  align-items: center;
  padding-left: 16px;
  font-size: 12px;
  color: var(--muted);
}

/* ─── Scene: imports ─────────────────────────────────────────────────── */

.drop {
  position: relative;
  height: 330px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px dashed var(--hairline-strong);
  border-radius: var(--r-4);
  background: var(--surface);
  text-align: center;
  transition:
    border-color var(--dur-quick) var(--ease-quick),
    background-color var(--dur-quick) var(--ease-quick);
}
.drop.is-over {
  border-color: var(--accent);
  border-style: solid;
  background: var(--accent-soft);
}
.drop .m-empty-state-icon {
  width: 52px;
  height: 52px;
  padding: 13px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 50%;
  color: var(--accent-text);
  box-shadow: var(--shadow-card);
  margin-bottom: 6px;
}
.drop-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: var(--w-medium);
  letter-spacing: var(--ls-tight);
}
.drop-body {
  font-size: 14px;
  color: var(--muted);
}
.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 9px;
  font-size: 13px;
  font-weight: var(--w-medium);
  white-space: nowrap;
}
.file-chip .sc-mono {
  color: var(--muted);
  font-size: 11px;
}
.file-glyph {
  display: grid;
  place-items: center;
  width: 22px;
  height: 26px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--hairline-strong);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: var(--w-medium);
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.map-row {
  display: grid;
  grid-template-columns: 1fr 28px 1fr 104px;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border-bottom: 1px solid var(--color-border-faint);
}
.map-head {
  min-height: 30px;
  background: var(--bg-tinted);
  margin-inline: -18px;
  padding-inline: 18px;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.map-row .theirs {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink);
}
.map-row .theirs small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.map-row .state {
  display: flex;
  justify-content: flex-end;
}
/* Suggestions get their own band: room above to separate them from the
   field they answer, more below before the footer rule. */
.map-suggest {
  display: flex;
  gap: 6px;
  padding: 14px 0 22px;
}
.meter {
  position: relative;
  width: 140px;
  height: 4px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  overflow: hidden;
}
.meter i {
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform-origin: 0 50%;
}

/* ─── Scene: products canvas ─────────────────────────────────────────── */

.product {
  position: absolute;
  width: 272px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-4);
  box-shadow: var(--shadow-card);
  transition:
    border-color var(--dur-quick) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .product:hover {
    border-color: var(--hairline-strong);
    box-shadow: var(--shadow-card-hover);
  }
}
.product.is-lifted {
  border-color: var(--hairline-strong);
  box-shadow: var(--shadow-3);
}
.product-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.product-body {
  display: flex;
  gap: 14px;
  align-items: center;
}
.product-thumb {
  display: grid;
  place-items: end center;
  width: 56px;
  height: 64px;
  border-radius: var(--r-3);
  background: var(--bg-tinted);
  border: 1px solid var(--color-border-faint);
  padding-bottom: 8px;
}
.bottle {
  width: 18px;
  height: 44px;
  border-radius: 6px 6px 5px 5px;
  background: hsl(212 60% 52%);
  position: relative;
  box-shadow: inset -4px 0 0 hsl(212 60% 44%);
}
.bottle::before {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: -7px;
  height: 8px;
  border-radius: 3px 3px 0 0;
  background: var(--gray-800, hsl(0 0% 18%));
}
.product-name {
  font-size: 15px;
  font-weight: var(--w-medium);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.product-id {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
}
.links svg {
  overflow: visible;
}
.links path {
  fill: none;
  stroke: var(--hairline-strong);
  stroke-width: 1.25;
}
.links .hot {
  stroke: var(--ink);
}

/* ─── Scene: command bar ─────────────────────────────────────────────── */

.cmd-line {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding-inline: 16px;
  font-size: 15px;
}
.cmd-line .typed {
  color: var(--ink);
  white-space: pre;
}
.cmd-line .ph {
  color: var(--muted-soft);
}
.cmd-line .end {
  margin-left: auto;
  display: flex;
  gap: 4px;
}
.caret {
  display: inline-block;
  width: 1.5px;
  height: 18px;
  margin-left: 1px;
  background: var(--accent);
  vertical-align: -3px;
}
.plan-query {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 13px;
}
.step-state {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 104px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.step-state > span {
  grid-area: 1 / 1;
}

/* ─── Chrome: caption, keys, cursor, titles ─────────────────────────── */

.caption {
  position: absolute;
  left: 960px;
  top: 1012px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 22px 11px 12px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-2);
  white-space: nowrap;
}
.caption-num {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 26px;
  padding-inline: 6px;
  border-radius: var(--r-full);
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: var(--w-medium);
}
.caption-verb {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: var(--w-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.caption-arrow {
  color: var(--muted);
}
.caption-form {
  font-size: 20px;
  font-weight: var(--w-medium);
  letter-spacing: -0.012em;
  color: var(--ink);
}
.keys {
  position: absolute;
  left: 960px;
  top: 952px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--r-3);
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: var(--w-medium);
  box-shadow: var(--shadow-2);
  white-space: nowrap;
}
.keys .kbd {
  height: 28px;
  min-width: 28px;
  font-size: 14px;
  color: var(--ink);
}
.cursor {
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  z-index: 100;
  filter: drop-shadow(0 1px 1.5px rgb(0 0 0 / 0.25));
}
.cursor svg {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
}
.cursor[data-kind="arrow"] .c-arrow,
.cursor[data-kind="text"] .c-text,
.cursor[data-kind="grab"] .c-grab,
.cursor[data-kind="grabbing"] .c-grabbing {
  opacity: 1;
}
.title-card {
  position: absolute;
  left: 960px;
  top: 540px;
  text-align: center;
  white-space: nowrap;
}
.title-card .t-eyebrow,
.title-eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: var(--w-medium);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.title-line {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: var(--w-medium);
  letter-spacing: var(--ls-tightest);
  line-height: 1.05;
  color: var(--ink);
}
.title-line .soft {
  color: var(--muted);
}
.wordmark {
  position: absolute;
  left: 48px;
  top: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: var(--w-medium);
  letter-spacing: -0.012em;
}

.cell-edit {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 110px;
  height: 36px;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--ink);
}
.cell-edit .typed.is-selected {
  background: var(--selection-bg);
  border-radius: 2px;
}
.cell-edit .caret {
  height: 16px;
}

[hidden] {
  display: none !important;
}

/* ─── Product shell: sidebar + top bar (Plot tokens) ───────────────── */

.app {
  display: grid;
  grid-template-columns: 232px 1fr;
  height: 100%;
}
.side {
  display: flex;
  flex-direction: column;
  padding: 10px 10px 12px;
  background: var(--bg-tinted);
  border-right: 1px solid var(--hairline);
  min-height: 0;
}
.side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 8px;
  font-size: 15px;
  font-weight: var(--w-medium);
  letter-spacing: -0.012em;
}
.side-ws {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: var(--w-medium);
  color: var(--muted);
}
.side-nav {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 10px;
}
.side-item {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--r-2);
  font-size: 13.5px;
  font-weight: var(--w-medium);
  color: var(--ink-soft);
  text-decoration: none;
  cursor: pointer;
  transition: color var(--dur-quick) var(--ease-quick), background-color var(--dur-quick) var(--ease-quick);
}
.side-item svg,
.search svg,
.cmd-q svg,
.bell svg,
.btn-ico {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.side-item svg {
  color: var(--muted);
}
@media (hover: hover) and (pointer: fine) {
  .side-item:hover {
    color: var(--ink);
  }
}
.side-item.is-current {
  color: var(--ink);
}
.side-item.is-current svg {
  color: var(--ink);
}
.side-item .count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.side-active {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 34px;
  border-radius: var(--r-2);
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-1);
}
.side-section {
  margin: 22px 10px 6px;
  font-family: var(--font-mono);
  font-size: var(--t-tiny);
  font-weight: var(--w-medium);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.sys-row,
.pin-row,
.timer-sys {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
  color: var(--ink-soft);
}
.sys-row .meta,
.pin-row .meta,
.timer-sys .meta {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
}
.sys-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-good-text);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-good-text) 16%, transparent);
  flex-shrink: 0;
  transition: background-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.sys-dot.is-warn {
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.sys-dot.is-paused {
  background: var(--muted-soft);
  box-shadow: 0 0 0 3px var(--surface-2);
}
.sys-row.is-warn .meta {
  color: var(--color-warn-text);
}
.pin-empty {
  padding: 4px 10px;
  font-size: 12.5px;
  color: var(--muted-soft);
}
.pin-row {
  border-radius: var(--r-2);
  color: var(--ink);
}
.pin-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pin-ico {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: var(--r-1);
  background: var(--surface);
  border: 1px solid var(--hairline);
  font-size: 9px;
  color: var(--ink-soft);
  flex-shrink: 0;
  letter-spacing: -1px;
}
.pin-ring {
  background: conic-gradient(var(--ink) 0 var(--ring, 100%), var(--surface-2) 0);
  border-radius: 50%;
  border: 0;
  mask: radial-gradient(circle, transparent 5px, #000 5.5px);
  -webkit-mask: radial-gradient(circle, transparent 5px, #000 5.5px);
}
.side-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px 0;
  border-top: 1px solid var(--hairline);
}
.side-user {
  font-size: 13px;
  font-weight: var(--w-medium);
}
.side-role {
  font-size: 11.5px;
  color: var(--muted);
}

.main {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.top {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  padding: 0 24px;
  border-bottom: 1px solid var(--hairline);
  flex-shrink: 0;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 480px;
  height: 36px;
  padding: 0 8px 0 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-2);
  background: var(--surface);
  color: var(--muted);
  font-size: 13.5px;
  transition: border-color var(--dur-quick) var(--ease-quick);
}
@media (hover: hover) and (pointer: fine) {
  .search:hover {
    border-color: var(--hairline-strong);
  }
}
.search .ph {
  color: var(--muted-soft);
}
.search .end {
  margin-left: auto;
  display: flex;
  gap: 3px;
}
.bell {
  position: relative;
  width: 34px;
  height: 34px;
  min-width: 34px;
}
.bell-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  display: grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--accent-fg);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--w-medium);
  box-shadow: 0 0 0 2px var(--surface);
}
.content {
  position: relative;
  flex: 1;
  min-height: 0;
}
.content .app-page {
  padding: 22px 28px 0;
}
.content .m-breadcrumb {
  margin-bottom: 10px;
  font-size: 11px;
}
.content .app-page-head {
  margin-bottom: 16px;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.toolbar-end {
  display: flex;
  gap: 8px;
}
.btn-ico {
  width: 14px;
  height: 14px;
}
.table .cb {
  width: 38px;
  padding-right: 0;
}
.box {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  background: var(--surface);
  vertical-align: -2px;
}
.sort {
  color: var(--ink);
}
.table-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.pager {
  display: flex;
  gap: 4px;
}
.pager span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 22px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-1);
  color: var(--ink-soft);
}
.table tbody td {
  height: 48px;
  padding-block: 0;
}
.table tbody tr {
  position: relative;
}
.prod {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: var(--w-medium);
  color: var(--ink);
}
.prod .product-thumb {
  width: 30px;
  height: 34px;
  padding-bottom: 4px;
  border-radius: var(--r-2);
}
.prod .bottle {
  width: 9px;
  height: 22px;
  border-radius: 3px;
  box-shadow: inset -2px 0 0 hsl(212 60% 44%);
}
.prod .bottle::before {
  left: 1.5px;
  right: 1.5px;
  top: -4px;
  height: 4px;
}
.prod .bottle.green { background: hsl(150 40% 45%); box-shadow: inset -2px 0 0 hsl(150 40% 38%); }
.prod .bottle.gray { background: hsl(0 0% 70%); box-shadow: inset -2px 0 0 hsl(0 0% 60%); }
.drag-handle {
  width: 10px;
  color: var(--muted-soft);
  font-size: 12px;
  letter-spacing: -2px;
  opacity: 0;
  transition: opacity var(--dur-quick) var(--ease-quick);
}
@media (hover: hover) and (pointer: fine) {
  .table tbody tr:hover .drag-handle {
    opacity: 1;
  }
}
.table tbody tr.row-target,
.table tbody tr.row-target:hover {
  background: var(--accent-soft);
}
.table tbody tr.row-target td:first-child {
  box-shadow: inset 2px 0 0 var(--accent);
}
.table tbody tr.row-match {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.table tbody tr.row-lifted {
  background: var(--surface);
  box-shadow: var(--shadow-3), 0 0 0 1px var(--hairline);
  z-index: 5;
}
.table tbody tr.row-merged {
  background: hsl(142 70% 97%);
}
.product .product-thumb.sm,
.product-thumb.sm {
  width: 40px;
  height: 46px;
  padding-bottom: 5px;
}
.product-thumb.sm .bottle {
  width: 12px;
  height: 30px;
}
.toast-slot {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 30;
}
.toast-slot .o-toast {
  max-width: 380px;
  width: 380px;
}
.toast-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
}

/* ─── Command shell cards ─────────────────────────────────────────── */

.cmd-q {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid var(--hairline);
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
}
.cmd-q svg {
  color: var(--muted);
}
.cmd-q-bar {
  height: 36px;
  padding: 0 12px;
  border-bottom: 0;
  font-size: 13.5px;
}
.cmd-q .ph {
  color: var(--muted-soft);
}
.cmd-q .q-text {
  white-space: pre;
}
.q-kind {
  margin-left: auto;
}
.kpi-block {
  margin-left: auto;
  text-align: right;
}
.kpi {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: var(--w-medium);
  letter-spacing: var(--ls-tight);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.kpi-row {
  display: flex;
  gap: 32px;
  margin-bottom: 8px;
}
.kpi-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 2px;
}
.sw {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}
.sw-a { background: var(--ink); }
.sw-b { background: var(--viz-2); }
.chart {
  display: block;
  width: 100%;
  height: 150px;
  overflow: visible;
}
.chart .grid-line {
  stroke: var(--color-border-faint);
  stroke-width: 1;
}
.chart .line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.chart .area {
  fill: color-mix(in srgb, var(--ink) 6%, transparent);
}
.chart .forecast {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 4 5;
}
.chart .dot-end {
  fill: var(--ink);
  stroke: var(--surface);
  stroke-width: 2;
}
.chart .dot-zero {
  fill: var(--accent);
  stroke: var(--surface);
  stroke-width: 2;
}
.chart .bar-a { fill: var(--ink); }
.chart .bar-b { fill: var(--viz-2); }
.chart .bar-hi { fill: var(--accent); }
.chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
}
.chart-axis-abs {
  position: relative;
  height: 14px;
}
.chart-axis-abs span {
  position: absolute;
  top: 0;
  white-space: nowrap;
}
.chart-axis-abs span:last-child { transform: translateX(-50%); }
.chart-axis-abs span:nth-child(2), .chart-axis-abs span:nth-child(3) { transform: translateX(-50%); }
.chart-axis.even span {
  flex: 1;
  text-align: center;
}
.timer-body {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 20px 22px;
}
.ring {
  position: relative;
  width: 132px;
  height: 132px;
  flex-shrink: 0;
}
.ring svg {
  width: 100%;
  height: 100%;
  rotate: -90deg;
}
.ring-track {
  fill: none;
  stroke: var(--surface-2);
  stroke-width: 7;
}
.ring-bar {
  fill: none;
  stroke: var(--ink);
  stroke-width: 7;
  stroke-linecap: round;
}
.ring-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: var(--w-medium);
  font-variant-numeric: tabular-nums;
}
.ring-text small {
  font-size: 10.5px;
  font-weight: var(--w-regular);
  color: var(--muted);
}
.timer-info {
  flex: 1;
  min-width: 0;
}
.timer-sys {
  padding: 0;
  height: 26px;
}
.timeline {
  display: flex;
  flex-direction: column;
}
.tl-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border-faint);
}
.tl-row .grow {
  flex: 1;
  min-width: 0;
}
.tl-av {
  width: 26px;
  height: 26px;
  min-width: 26px;
  font-size: 10px;
}
.sys-mark.tl-av {
  border-radius: 7px;
  font-size: 11px;
}
.flyer {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-3);
  font-size: 13px;
  font-weight: var(--w-medium);
  white-space: nowrap;
  opacity: 0;
  z-index: 40;
  pointer-events: none;
}
.sync-drift {
  display: none;
}
.shell-bg[data-bg="warn"] {
  background: hsl(48 100% 95%);
}
.sync-cell {
  display: inline-grid;
  justify-items: start;
  align-items: center;
}
.sync-cell > * {
  grid-area: 1 / 1;
}
.drift-pill::before {
  box-shadow: 0 0 0 calc(2px + var(--pulse, 0) * 3px) color-mix(in srgb, currentColor calc(30% - var(--pulse, 0) * 22%), transparent);
}
.src-tags {
  display: flex;
  gap: 4px;
}
.chart .bar {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

/* ─── Scene: document sorter ─────────────────────────────────────────── */

.docs-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
}
.intake {
  position: relative;
  height: 548px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-4);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.intake-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid var(--hairline);
}
.intake-drop {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 60px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed var(--hairline-strong);
  border-radius: var(--r-3);
  text-align: center;
  transition: border-color var(--dur-quick) var(--ease-quick), background-color var(--dur-quick) var(--ease-quick);
}
.intake-drop.is-over {
  border-color: var(--accent);
  border-style: solid;
  background: var(--accent-soft);
}
.intake-drop .m-empty-state-icon {
  width: 48px;
  height: 48px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 50%;
  color: var(--accent-text);
  box-shadow: var(--shadow-card);
  margin-bottom: 4px;
}
.doc-grid {
  position: absolute;
  left: 0;
  top: 44px;
  right: 0;
  bottom: 0;
}
.doc {
  position: absolute;
  width: 108px;
  opacity: 0;
}
.doc-page {
  position: relative;
  height: 132px;
  padding: 12px 11px;
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: 6px;
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.doc-page .hd {
  height: 7px;
  width: 46%;
  border-radius: 2px;
  background: var(--ink);
  opacity: 0.75;
  margin-bottom: 9px;
}
.doc-page .ln {
  height: 3px;
  border-radius: 2px;
  background: var(--hairline-strong);
  margin-bottom: 6px;
}
.doc-page .tb {
  height: 26px;
  margin: 8px 0;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  background: repeating-linear-gradient(to bottom, transparent 0 7px, var(--hairline) 7px 8px);
}
.doc-page .scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 26px;
  top: -30px;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
}
.doc.is-scan .doc-page {
  border-color: var(--accent);
}
.doc-name {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  height: 22px;
  margin-top: 4px;
  opacity: 0;
}
.doc-label .tag {
  padding: 1px 6px;
  font-size: 10.5px;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-conf {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-good-text);
}
.doc.is-low .doc-conf {
  color: var(--color-warn-text);
}
.doc.is-low .doc-page {
  border-color: hsl(43 90% 60%);
  box-shadow: 0 0 0 3px hsl(48 100% 93%);
}
.folders {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.folder {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 82px;
  padding: 0 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-4);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: border-color var(--dur-quick) var(--ease-out), background-color var(--dur-base) var(--ease-out);
}
.folder.is-hit {
  border-color: var(--hairline-strong);
  background: var(--bg-tinted);
}
.folder-pile {
  position: relative;
  width: 40px;
  height: 50px;
  flex-shrink: 0;
}
.folder-pile i {
  position: absolute;
  inset: 0;
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  background: var(--surface);
}
.folder-pile i:last-child {
  background:
    linear-gradient(var(--ink), var(--ink)) 7px 8px / 14px 3px no-repeat,
    repeating-linear-gradient(to bottom, var(--hairline-strong) 0 2px, transparent 2px 6px) 7px 17px / 24px 22px no-repeat,
    var(--surface);
  background-blend-mode: normal;
}
.folder-pile i:last-child { opacity: 1; }
.folder-pile i:nth-child(1) { transform: translate(6px, -4px) rotate(4deg); opacity: 0.6; }
.folder-pile i:nth-child(2) { transform: translate(3px, -2px) rotate(2deg); opacity: 0.8; }
.folder-body {
  flex: 1;
  min-width: 0;
}
.folder-name {
  font-size: 14px;
  font-weight: var(--w-medium);
}
.folder-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.folder-count {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: var(--w-medium);
  letter-spacing: var(--ls-tight);
  font-variant-numeric: tabular-nums;
}
.review-pop .sc-row {
  min-height: 34px;
}
.prob {
  position: relative;
  width: 70px;
  height: 4px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  overflow: hidden;
}
.prob i {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--ink);
  border-radius: inherit;
}
.ghost-pile {
  position: absolute;
  left: 0;
  top: 0;
  width: 76px;
  height: 96px;
  z-index: 60;
  opacity: 0;
}
.gp-sheet {
  position: absolute;
  inset: 0;
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: 5px;
  box-shadow: var(--shadow-2);
  background-image: linear-gradient(var(--hairline-strong), var(--hairline-strong)), repeating-linear-gradient(to bottom, transparent 0 8px, var(--hairline) 8px 10px);
  background-size: 40% 5px, 70% 60px;
  background-position: 10px 12px, 10px 26px;
  background-repeat: no-repeat;
}
.gp-sheet:nth-child(1) { transform: rotate(-7deg) translate(-6px, 2px); }
.gp-sheet:nth-child(2) { transform: rotate(5deg) translate(5px, 0); }
.gp-count {
  position: absolute;
  right: -10px;
  top: -10px;
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--accent-fg);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: var(--w-medium);
  box-shadow: 0 0 0 2px var(--surface), var(--shadow-2);
}
.grid .hdr td.r { text-align: right; }

/* ─── Korean ─────────────────────────────────────────────────────────── */
/* Pretendard carries the Hangul; Latin keeps Aeonik / Geist Mono.
   Subset to the film's strings by scripts/subset-pretendard.sh. */
@font-face {
  font-family: "Pretendard";
  src: url("../../assets/fonts/pretendard/Pretendard-Regular.subset.woff2") format("woff2");
  font-weight: 400;
  font-display: block;
}
@font-face {
  font-family: "Pretendard";
  src: url("../../assets/fonts/pretendard/Pretendard-Medium.subset.woff2") format("woff2");
  font-weight: 500;
  font-display: block;
}
@font-face {
  font-family: "Pretendard";
  src: url("../../assets/fonts/pretendard/Pretendard-Bold.subset.woff2") format("woff2");
  font-weight: 700;
  font-display: block;
}
/* Geist Mono's space is a full cell wide, which splits Korean words apart
   ("배송  완료"); take the space glyph from Pretendard instead. */
@font-face {
  font-family: "Pretendard Space";
  src: url("../../assets/fonts/pretendard/Pretendard-Regular.subset.woff2") format("woff2");
  unicode-range: U+0020;
  font-display: block;
}
:root:lang(ko) {
  --font-display: "Aeonik", "Pretendard", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Aeonik", "Pretendard", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Pretendard Space", "Geist Mono", "Pretendard", ui-monospace, monospace;
}
:root:lang(ko) body {
  word-break: keep-all;
}

/* ─── Brand vs workspace ─────────────────────────────────────────────── */
/* Systead is the product (its mark, its title bar); the customer's workspace
   lives inside it, as a workspace does in Slack. Customer-identifying text
   (workspace, people, counterparties) is blurred like a real customer
   recording, while the product and the work stay legible. */
.app-mark svg,
.sys-mark svg {
  width: 64%;
  height: auto;
  fill: var(--bg);
  display: block;
}
.redact {
  display: inline-block;
  filter: blur(3.6px);
  opacity: 0.9;
  user-select: none;
}
.side-brand {
  gap: 8px;
}
.ws-div {
  width: 1px;
  height: 18px;
  background: var(--hairline-strong);
  margin: 0 2px;
}
.ws-av {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, hsl(212 70% 58%), hsl(262 60% 62%));
  color: #fff;
  font-size: 11px;
  font-weight: var(--w-bold);
  flex-shrink: 0;
}
.ws-name {
  font-size: 14px;
  font-weight: var(--w-medium);
  min-width: 0;
  white-space: nowrap;
}
.ws-chev {
  width: 14px;
  height: 14px;
  margin-left: auto;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wt-app {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
}
.wt-app svg {
  width: 17px;
  height: auto;
  fill: var(--ink);
}
.wt-sep {
  margin: 0 8px;
  color: var(--muted-soft);
}
.window-title [data-title="app"] {
  display: inline-flex;
  align-items: center;
}
.title-lockup {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 9px;
  margin-bottom: 22px;
}
.title-lockup svg {
  fill: var(--ink);
  flex-shrink: 0;
}
/* Sizes from the lockup: mark 2000×1252, wordmark 1262×340. */
.title-lockup .tl-word { width: 82px; height: 22px; }
.title-lockup .tl-mark { width: 30px; height: 19px; margin-bottom: 1px; }
.wordmark svg { fill: var(--ink); height: 20px; width: auto; }

/* 01 · sync the rest of the sheet */
.sync-all {
  position: absolute;
  left: 0;
  top: 0;
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow: var(--shadow-3);
  opacity: 0;
  z-index: 21;
}
.sa-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.sa-note {
  margin-bottom: 16px;
  line-height: 1.5;
}
.grid td.g-head {
  font-weight: var(--w-medium);
  color: var(--ink);
}

/* Closing logo */
.logo-seq {
  position: absolute;
  left: 960px;
  top: 540px;
  opacity: 0;
}
.logo-seq svg { display: block; fill: #0b0b0b; overflow: visible; }
