:root {
  color-scheme: light;
  --ink: #0e1116;
  --muted: #687385;
  --line: #e6e8ec;
  --paper: #fafafa;
  --panel: #ffffff;
  /* Single restrained UI accent (soft violet): chips and highlights only. */
  --accent: #6f5bd6;
  --accent-soft: #efecfb;
  --accent-dark: #5747ad;
  /* Detection green is FUNCTION, not branding: it must match the green baked
     into the server-rendered document panels. */
  --detect: #0f8b4c;
  --blue: #2556a3;
  --warn: #9a5b00;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button,
.upload-zone {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  background: #ffffff;
  color: var(--ink);
  border-color: #d9dde3;
  padding: 0 14px;
  font-weight: 600;
}

button:hover {
  border-color: #c2c8d1;
}

button.primary {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}

.btn-icon {
  width: 15px;
  height: 15px;
  flex: none;
}

/* Reset-demo: quiet outline by default, unmistakable once armed. */
button.danger {
  width: 100%;
  margin-top: 8px;
  color: #9a2424;
  background: #ffffff;
  border-color: #e4c4c4;
}

button.danger.armed {
  color: #ffffff;
  background: #b03030;
  border-color: #b03030;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.app-shell {
  width: min(1480px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 22px 0 36px;
}

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  margin-bottom: 18px;
}

/* Brand mark front and center, full size. The asset has a white background;
   multiply blends it into the near-white page. */
.topbar-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  height: 60px;
  width: auto;
  mix-blend-mode: multiply;
  pointer-events: none;
}

@media (max-width: 1100px) {
  .topbar-logo {
    display: none;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}



h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

h2 {
  margin-bottom: 10px;
  font-size: 16px;
}

.muted {
  color: var(--muted);
  line-height: 1.45;
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 13px;
}

.status-dot,
#mappingCount,
#durationBadge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: #ffffff;
  border: 1px solid var(--line);
}

/* Top-bar scan progress: the pill doubles as a progress bar so the fill level
   reads from across a conference booth, not just up close. */
#durationBadge {
  position: relative;
  justify-content: center;
  overflow: hidden;
  min-width: 240px;
  min-height: 34px;
  padding: 0;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}

.duration-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0%;
  background: rgba(111, 91, 214, 0.18);
  transition: width 240ms ease;
}

#durationBadge.is-done .duration-fill {
  background: rgba(15, 139, 76, 0.22);
}

#durationBadge.is-failed .duration-fill {
  background: rgba(176, 0, 32, 0.3);
}

#durationBadge.is-done {
  border-color: var(--detect);
}

.duration-label {
  position: relative;
  padding: 0 16px;
  white-space: nowrap;
}

.status-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--warn);
}

.status-dot.online::before {
  background: var(--detect);
}

.status-dot.problem::before {
  background: #d14343;
}

.workspace {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.control-panel,
.results-panel,
.analysis-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.control-panel {
  border-radius: 8px;
  overflow: hidden;
}

.panel-section {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.panel-section:last-child {
  border-bottom: 0;
}

.upload-zone {
  display: grid;
  place-items: center;
  min-height: 158px;
  margin: 16px 0 12px;
  padding: 18px;
  text-align: center;
  background: #ffffff;
  border: 1px dashed #c9ced6;
}

.upload-zone.dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.upload-zone input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.upload-title {
  display: block;
  font-weight: 800;
}

.upload-subtitle {
  display: block;
  max-width: 240px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.45;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 84px;
  gap: 10px;
}

.phone-link {
  display: grid;
  justify-items: start;
}

.qr-code {
  width: 132px;
  height: 132px;
  padding: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.phone-link a {
  display: inline-block;
  max-width: 100%;
  margin-top: 10px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.results-panel {
  min-width: 0;
  border-radius: 8px;
  padding: 18px;
}

.image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

figure {
  min-width: 0;
  margin: 0;
}

figcaption {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.image-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef1f5;
}

.image-stage img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f8fafc;
}

.image-stage.has-image img {
  display: block;
}

.image-stage.has-image .empty-state {
  display: none;
}

.empty-state,
.empty-table {
  color: #9aa3b2;
  text-align: center;
  font-family: var(--mono);
  font-size: 12.5px;
}

.analysis-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 14px;
}

.analysis-panel {
  min-width: 0;
  border-radius: 8px;
  box-shadow: none;
  overflow: hidden;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin-bottom: 0;
}

.table-wrap {
  max-height: 320px;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf1f6;
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
}

td {
  overflow-wrap: anywhere;
}

#entityRows td:nth-child(2),
#entityRows td:nth-child(3) {
  font-family: var(--mono);
  font-size: 12px;
}

td:last-child {
  white-space: nowrap;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  box-shadow: var(--shadow);
  transform: translateY(140%);
  transition: transform 160ms ease;
}

.toast:empty {
  display: none;
}

.toast.visible {
  display: block;
  transform: translateY(0);
}

body.capture-mode .phone-link {
  display: none;
}

body.capture-mode .control-panel {
  overflow: hidden;
}

body.capture-mode .panel-section {
  border-right: 0;
  border-bottom: 0;
}

/* Feature 1 — PII overlay on the original image */
.box-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: none;
}

.image-stage.has-image .box-overlay,
.image-stage.has-overlay .box-overlay {
  display: block;
}

/* Word sweep before (or without) the preview image: give the boxes blank
   paper to land on instead of the stage's empty-state gray. */
.image-stage.has-overlay:not(.has-image) {
  background: #f8fafc;
}

.image-stage.has-overlay:not(.has-image) .empty-state {
  display: none;
}

.image-stage.boxes-off .box-overlay {
  display: none;
}

.box-overlay rect {
  pointer-events: visiblePainted;
  fill: currentColor;
  fill-opacity: 0;
  transition: fill-opacity 90ms ease;
}

.box-overlay rect.is-hover,
.box-overlay rect.is-active {
  fill-opacity: 0.12;
}

/* Scan-result choreography: each detection box draws its border on in reading
   order (stroke-dash animation only - never transform, so the local-tilt
   rotate() attribute on warped-field boxes is preserved), then the
   de-identified panel fades in once the last box has landed. */
.box-overlay rect.reveal {
  opacity: 0;
  animation: box-draw 480ms ease-out forwards;
}

/* In-flight word sweep: the detector's localized words fade in line by line
   over the preview while the vision call runs. Deliberately faint and
   neutral - "found text here" marks, not PII calls. */
.box-overlay rect.probe {
  pointer-events: none;
  fill: rgba(59, 130, 246, 0.07);
  stroke: rgba(37, 99, 235, 0.6);
  stroke-width: 1.4px;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  animation: probe-in 240ms ease-out forwards;
}

@keyframes probe-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes box-draw {
  0% {
    opacity: 1;
    stroke-dashoffset: var(--perim);
  }
  100% {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

.image-stage img {
  transition: opacity 620ms ease;
}

.image-stage.is-veiled img {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .box-overlay rect.reveal,
  .box-overlay rect.probe {
    opacity: 1;
    animation: none;
  }

  .image-stage img {
    transition: none;
  }
}

/* --- Act 2 of the wait: entity-resolution emulation in the empty result box ---
   While the vision/OCR call runs (~20-30s) the blank de-identified box previews
   HOW entity resolution works, on a loop, from an entirely fake, scripted scene
   (never the uploaded data): a person's profile hub builds attribute by
   attribute, then two near-duplicate identities are compared and merged. Torn
   down and swapped for the real de-identified image on completion. Mirrors the
   real identity graph's node vocabulary so the preview reads as "it became
   real". */
.graph-emu {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: none;
}

.image-stage.is-resolving {
  background: #f8fafc;
}

.image-stage.is-resolving .graph-emu,
.image-stage.is-resolving .graph-emu-caption {
  display: block;
}

.image-stage.is-resolving .empty-state {
  display: none;
}

.graph-emu .ge-edge {
  stroke: #c4ccd6;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.graph-emu .ge-edge.ge-compare {
  stroke: var(--accent);
  stroke-dasharray: 4 4;
}

.graph-emu .ge-shape {
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.graph-emu .ge-label {
  font-family: var(--mono);
  font-size: 9px;
  fill: var(--muted);
}

.graph-emu .ge-label.ge-label-center {
  fill: var(--ink);
  font-size: 10px;
  font-weight: 600;
}

/* node fade+scale-in: created hidden, gets .ge-in on the next frame */
.graph-emu .ge-in-node {
  opacity: 0;
  transform: scale(0.4);
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 500ms ease, transform 500ms cubic-bezier(0.2, 0.8, 0.3, 1.2);
}

.graph-emu .ge-in-node.ge-in {
  opacity: 1;
  transform: scale(1);
}

/* a hub fades in as a unit, and fades out when two hubs merge into one */
.graph-emu .ge-hub {
  transition: opacity 700ms ease;
}

.graph-emu-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  margin: 0;
  padding: 0 12px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .graph-emu .ge-in-node {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .graph-emu .ge-hub {
    transition: none;
  }
}

.build-stamp {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}

.box-tooltip {
  position: fixed;
  z-index: 30;
  max-width: 240px;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: var(--shadow);
  pointer-events: none;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 90ms ease;
}

.box-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.box-tooltip .tt-sub {
  color: #9fb3cd;
  font-size: 11px;
}

/* Quiet toolbar inside the original stage */
.stage-toolbar {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  backdrop-filter: blur(2px);
}

.image-stage.has-image .stage-toolbar {
  display: inline-flex;
}

.stage-toggle {
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
}

.stage-toggle.is-on {
  background: #e9f7ef;
  color: var(--accent-dark);
}


/* Feature 2 — Leak-guard QA strip */
.qa-strip {
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
  font-size: 13px;
}

.qa-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.qa-leak {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.qa-leak::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}

.qa-leak.is-clean {
  color: var(--accent-dark);
}

.qa-leak.is-clean::before {
  background: var(--accent);
}

.qa-leak.is-warn {
  color: var(--warn);
}

.qa-leak.is-warn::before {
  background: var(--warn);
}

.qa-leak .qa-sub {
  color: var(--muted);
  font-weight: 400;
}

.qa-box-toggle {
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.qa-box-toggle.has-warn {
  background: #fff4e2;
  color: var(--warn);
  border-color: #f0dcbb;
}

.qa-caret {
  font-size: 9px;
  transition: transform 120ms ease;
}

.qa-box-toggle[aria-expanded="true"] .qa-caret {
  transform: rotate(90deg);
}

.qa-warnings {
  list-style: none;
  margin: 8px 0 2px;
  padding: 0;
  display: grid;
  gap: 7px;
}

.qa-warnings li {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 8px;
  align-items: start;
  font-size: 12px;
  line-height: 1.4;
}

.qa-warnings li.is-linked {
  cursor: pointer;
}

.qa-warnings li.is-linked:hover .qa-code {
  text-decoration: underline;
}

.qa-sev {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--warn);
}

.qa-sev.is-error {
  background: #b00020;
}

.qa-code {
  font-weight: 700;
  color: var(--ink);
}

.qa-msg {
  color: var(--muted);
}

/* Feature 3 — Segmented view switch + identity graph */
.view-switch {
  display: inline-flex;
  gap: 4px;
  margin-top: 14px;
  padding: 4px;
  border-radius: 999px;
  background: #eef2f7;
  border: 1px solid var(--line);
}

.view-pill {
  min-height: 32px;
  padding: 0 16px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 700;
}

.view-pill.is-active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.analysis-view {
  margin-top: 14px;
}

.analysis-view[hidden] {
  display: none;
}

.graph-panel .section-heading {
  border-bottom: 1px solid var(--line);
}

.graph-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr) minmax(0, 0.9fr);
  gap: 1px;
  background: var(--line);
}

.graph-list,
.graph-canvas,
.graph-details {
  background: var(--panel);
  min-height: 320px;
  padding: 12px;
}

.graph-list {
  max-height: 380px;
  overflow: auto;
}

.graph-list-summary {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
}

.cluster-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 6px;
  padding: 8px 10px;
  text-align: left;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 400;
}

.cluster-row:hover {
  border-color: #c4d0e0;
}

.cluster-row.is-selected {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.cluster-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: #e9f7ef;
  color: var(--accent-dark);
}

.cluster-chip.is-location {
  background: #e7eefb;
  color: var(--blue);
}

.cluster-main {
  min-width: 0;
}

.cluster-surrogate {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.cluster-primary {
  display: block;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.cluster-count {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.graph-canvas {
  position: relative;
  display: grid;
  place-items: center;
}

.graph-svg {
  width: 100%;
  height: 100%;
  min-height: 300px;
}

.graph-svg .gnode-label {
  font-size: 11px;
  font-weight: 700;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.graph-svg .gedge {
  stroke: var(--line);
  stroke-width: 1.5;
}

.graph-fade {
  animation: graphFade 180ms ease;
}

@keyframes graphFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.graph-details {
  font-size: 13px;
}

.graph-details .gd-surrogate {
  font-size: 15px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.graph-details .gd-meta {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.graph-details table {
  font-size: 12px;
}

.graph-details .gd-address {
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.role-tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #eef2f7;
  color: var(--muted);
}

.role-tag.is-primary {
  background: #e9f7ef;
  color: var(--accent-dark);
}

.role-tag.is-alias {
  background: #e7eefb;
  color: var(--blue);
}

.graph-empty {
  padding: 18px 4px;
}

@media (max-width: 1050px) {
  .workspace,
  .analysis-row {
    grid-template-columns: 1fr;
  }

  .graph-grid {
    grid-template-columns: 1fr;
  }

  .control-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .panel-section {
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }

  .panel-section:last-child {
    border-right: 0;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100vw - 20px, 720px);
    padding-top: 12px;
  }

  .topbar,
  .status-strip {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .topbar {
    flex-direction: column;
  }

  h1 {
    font-size: 28px;
  }

  .control-panel,
  .image-grid {
    grid-template-columns: 1fr;
  }

  .panel-section {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .image-stage {
    min-height: 310px;
  }
}

/* === Enterprise chrome: icon rail + getting-started cards === */
.side-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 56px;
  padding: 14px 0;
  background: #16181d;
  border-right: 1px solid #16181d;
}


.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rail-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 9px;
  background: transparent;
  border-color: transparent;
  color: #9aa3b2;
}

.rail-button svg {
  width: 19px;
  height: 19px;
}

.rail-button:hover {
  background: #23262d;
  border-color: transparent;
  color: #e7e9ee;
}

.rail-button.is-active {
  background: #2a2d35;
  color: #ffffff;
}

.app-shell {
  margin-left: 56px;
  width: auto;
  padding-left: 28px;
  padding-right: 28px;
}


.starter-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 0;
  padding: 4px 0;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-weight: 400;
}

.starter-card:hover {
  border-color: #cdd2da;
}

.card-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.card-icon svg {
  width: 17px;
  height: 17px;
}

.card-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.card-title {
  font-weight: 600;
  font-size: 14px;
}

.card-desc {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.build-stamp {
  font-family: var(--mono);
}

/* Phone capture page: just the capture controls, no booth chrome. */
body.capture-mode .side-rail,
body.capture-mode .starter-card {
  display: none;
}

body.capture-mode .app-shell {
  margin-left: 0;
  padding-left: 16px;
  padding-right: 16px;
}

@media (max-width: 900px) {
  .side-rail {
    display: none;
  }

  .app-shell {
    margin-left: 0;
  }

}

/* Capture-token gate: a stale phone link shows this instead of the uploader. */
.capture-gate {
  max-width: 460px;
  margin: 48px auto 0;
  padding: 26px 24px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.capture-gate h2 {
  margin-bottom: 6px;
}

/* The hidden attribute must always win, even over display: grid/flex rules. */
[hidden] {
  display: none !important;
}

/* Linked person attributes in the identity-graph detail panel. */
.gd-attrs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 4px;
}

.attr-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11.5px;
}

.attr-chip .attr-type {
  color: var(--accent-dark);
  font-weight: 600;
}

/* Identity-graph cross-document badge (Level 3). */
.graph-badge {
  font-size: 11px;
  font-weight: 600;
  fill: var(--accent-dark);
}
