:root {
  color-scheme: light dark;
  --accent: #5e3fc4;
  --accent-strong: #4f35ad;
  --selection: #f0edff;
  --workspace: #f3f2f7;
  --sidebar: #eceaf3;
  --panel: #ffffff;
  --raised: #faf9fc;
  --ink: #14131a;
  --ink-soft: #3a3748;
  --muted: #6b667a;
  --border: rgb(20 19 26 / 12%);
  --border-strong: rgb(20 19 26 / 16%);
  --draft-fill: #f0f0f3;
  --draft-ink: #3a3748;
  --queued-fill: #fff6e0;
  --queued-ink: #9a6700;
  --submitted-fill: #f0edff;
  --submitted-ink: #4f35ad;
  --reviewed-fill: #e8f6ee;
  --reviewed-ink: #1f7a4c;
  --failed-fill: #fef3f2;
  --failed-ink: #b42318;
  --danger: #c6292f;
  --focus: #7a62d6;
  --radius-control: 8px;
  --radius-section: 12px;
  --radius-stage: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #b7a8ff;
    --accent-strong: #c8bcff;
    --selection: #26213a;
    --workspace: #0c0d12;
    --sidebar: #0f1117;
    --panel: #12141a;
    --raised: #161821;
    --ink: #f2f1f7;
    --ink-soft: #c4c0d2;
    --muted: #8f8a9e;
    --border: rgb(255 255 255 / 12%);
    --border-strong: rgb(255 255 255 / 16%);
    --draft-fill: #29292d;
    --draft-ink: #c7c7cc;
    --queued-fill: #2e2410;
    --queued-ink: #e8b84a;
    --submitted-fill: #26213a;
    --submitted-ink: #c8bcff;
    --reviewed-fill: #153528;
    --reviewed-ink: #5dca9f;
    --failed-fill: #2e1514;
    --failed-ink: #f07167;
    --danger: #ff6961;
    --focus: #c8bcff;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--panel);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: var(--accent-strong);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-control);
  background: var(--ink);
  color: var(--panel);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.site-header nav {
  display: flex;
  gap: 24px;
}

.site-header nav a {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 24px;
  fill: var(--accent);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: end;
  padding: clamp(44px, 7vw, 76px) 0 40px;
}

.context,
.toolbar-label,
.section-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.intro h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.intro > div > p:last-child {
  max-width: 720px;
  margin: 28px 0 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 2vw, 20px);
}

.simulation-note {
  display: flex;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-section);
  background: var(--raised);
}

.simulation-note div {
  display: grid;
  gap: 3px;
}

.simulation-note span:last-child {
  color: var(--muted);
  font-size: 14px;
}

.simulation-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--queued-ink);
}

.demo-frame {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--workspace);
}

.demo-toolbar {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--raised);
}

.demo-toolbar h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.toolbar-label {
  margin-bottom: 4px;
}

.persona-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--workspace);
}

.persona-button {
  min-height: 40px;
  padding: 8px 18px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
}

.persona-button.is-active {
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--border);
}

.app-shell {
  display: grid;
  min-height: 690px;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  display: flex;
  flex-direction: column;
  padding: 24px 16px 16px;
  border-right: 1px solid var(--border);
  background: var(--sidebar);
}

.sidebar-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 8px 20px;
}

.sidebar-heading div {
  display: grid;
}

.sidebar-heading .section-label {
  margin: 0 0 4px;
}

.sidebar-heading strong {
  font-size: 15px;
}

.sidebar-heading span:not(.section-label):not(.online-state) {
  color: var(--muted);
  font-size: 12px;
}

.online-state {
  align-self: flex-start;
  color: var(--reviewed-ink);
  font-size: 11px;
  font-weight: 700;
}

#sidebar-nav {
  display: grid;
  gap: 4px;
}

.nav-section-label {
  margin: 18px 10px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-button {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.nav-button:hover,
.nav-button.is-active {
  background: var(--selection);
  color: var(--accent-strong);
}

.nav-button svg,
.sync-strip svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.sync-strip {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding: 14px 10px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.sync-strip div {
  display: grid;
}

.sync-strip strong {
  color: var(--ink-soft);
  font-size: 13px;
}

.sync-strip span {
  font-size: 11px;
}

.content-panel {
  min-width: 0;
  padding: clamp(24px, 4vw, 48px);
  background: var(--workspace);
}

.content-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.content-header h3 {
  margin: 2px 0 5px;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.content-header p {
  margin: 0;
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-draft {
  background: var(--draft-fill);
  color: var(--draft-ink);
}

.status-queued {
  background: var(--queued-fill);
  color: var(--queued-ink);
}

.status-submitted {
  background: var(--submitted-fill);
  color: var(--submitted-ink);
}

.status-reviewed {
  background: var(--reviewed-fill);
  color: var(--reviewed-ink);
}

.status-failed {
  background: var(--failed-fill);
  color: var(--failed-ink);
}

.list-surface,
.grouped-section,
.media-stage,
.confirmation {
  border: 1px solid var(--border);
  border-radius: var(--radius-section);
  background: var(--raised);
}

.entry-row {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.entry-row:first-child {
  border-radius: var(--radius-section) var(--radius-section) 0 0;
}

.entry-row:last-child {
  border-bottom: 0;
  border-radius: 0 0 var(--radius-section) var(--radius-section);
}

.entry-row:hover {
  background: var(--selection);
}

.entry-row > span:first-child {
  display: grid;
  gap: 4px;
}

.entry-row strong {
  font-size: 16px;
  line-height: 1.25;
}

.entry-row small,
.muted {
  color: var(--muted);
}

.row-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row-arrow {
  color: var(--muted);
  font-size: 20px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.65fr);
  gap: 20px;
}

.grouped-section,
.media-stage {
  padding: 20px;
}

.grouped-section h4,
.media-stage h4 {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.grouped-section p {
  margin: 6px 0 0;
}

.metadata-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.metadata-list div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.metadata-list div:last-child {
  border-bottom: 0;
}

.metadata-list dt {
  color: var(--muted);
}

.metadata-list dd {
  margin: 0;
}

.media-stage {
  display: grid;
  min-height: 220px;
  align-content: center;
  justify-items: center;
  background: var(--panel);
  text-align: center;
}

.waveform {
  display: flex;
  height: 72px;
  align-items: center;
  gap: 5px;
  margin-bottom: 18px;
  color: var(--accent);
}

.waveform span {
  width: 5px;
  border-radius: 999px;
  background: currentColor;
}

.waveform span:nth-child(1),
.waveform span:nth-child(9) { height: 22%; }
.waveform span:nth-child(2),
.waveform span:nth-child(8) { height: 45%; }
.waveform span:nth-child(3),
.waveform span:nth-child(7) { height: 72%; }
.waveform span:nth-child(4),
.waveform span:nth-child(6) { height: 88%; }
.waveform span:nth-child(5) { height: 100%; }

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.command-button,
.secondary-button,
.text-button {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--radius-control);
  cursor: pointer;
  font-weight: 650;
}

.command-button {
  border: 1px solid var(--accent-strong);
  background: var(--accent-strong);
  color: white;
}

@media (prefers-color-scheme: dark) {
  .command-button {
    color: #14131a;
  }
}

.secondary-button {
  border: 1px solid var(--border-strong);
  background: var(--panel);
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--accent-strong);
}

.simulation-tag {
  display: inline-block;
  margin-left: 7px;
  padding: 2px 5px;
  border: 1px solid currentColor;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  vertical-align: 2px;
}

.feedback-marker {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.feedback-marker:last-child {
  border-bottom: 0;
}

.feedback-marker time {
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.feedback-marker p {
  margin: 0;
}

.editor-field {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
}

.editor-field label {
  font-size: 13px;
  font-weight: 700;
}

.editor-field textarea,
.editor-field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
}

.editor-field textarea {
  min-height: 110px;
  resize: vertical;
}

.simulation-disclosure {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--queued-ink);
  background: var(--queued-fill);
  color: var(--queued-ink);
  font-size: 13px;
}

.confirmation {
  max-width: 620px;
  padding: 32px;
}

.confirmation h3 {
  margin: 12px 0 8px;
  font-size: 30px;
}

.confirmation p {
  color: var(--ink-soft);
}

.evidence-boundary {
  padding: 80px 0;
}

.evidence-boundary h2 {
  margin: 0 0 28px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-top: 1px solid var(--border);
}

.boundary-grid p {
  margin: 0;
  padding: 22px 24px 0 0;
  color: var(--ink-soft);
}

.boundary-grid strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
}

footer {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 820px) {
  .intro,
  .detail-grid,
  .boundary-grid {
    grid-template-columns: 1fr;
  }

  .intro {
    gap: 32px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

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

  #sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-section-label {
    grid-column: 1 / -1;
  }

  .sync-strip {
    margin-top: 18px;
  }

  .app-shell {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .site-header,
  main,
  footer {
    width: min(100% - 24px, 1180px);
  }

  .site-header nav a:last-child {
    display: none;
  }

  .intro {
    padding-top: 52px;
  }

  .demo-toolbar,
  .content-header {
    align-items: stretch;
    flex-direction: column;
  }

  .persona-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .content-panel {
    padding: 24px 16px;
  }

  .entry-row {
    grid-template-columns: 1fr;
  }

  .row-meta {
    justify-content: space-between;
  }

  .metadata-list div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
