:root {
  color-scheme: light;
  --bg: #f7f8f4;
  --surface: #fff;
  --ink: #252b28;
  --muted: #636b64;
  --line: #dfe3dc;
  --soft: #f0f2ed;
  --accent: #aa461d;
  --accent-soft: #fcf0e9;
  --success: #276149;
  --success-soft: #eaf3ed;
  --danger: #a62e37;
  --danger-soft: #fbebec;
  --warning: #805a15;
  --warning-soft: #faf2df;
  --blue: #456c92;
  --rail: #202722;
  --rail-muted: #aab8ad;
  --mono: Consolas, "SFMono-Regular", monospace;
  --font:
    "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont,
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.55 var(--font);
}
button,
input,
select {
  font: inherit;
}
button,
a,
select,
input[type="range"] {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  transition:
    background 0.16s,
    border-color 0.16s;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  min-height: 40px;
  padding: 8px 14px;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
button:hover:not(:disabled) {
  background: var(--soft);
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
button svg {
  flex-shrink: 0;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.2;
}
.primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  min-height: 44px;
}
.primary:hover:not(:disabled) {
  background: #414c43;
}
.primary > span {
  font-size: 21px;
  font-weight: 400;
}
.secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}
.mono,
code {
  font-family: var(--mono);
  font-size: 12px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  background: white;
  padding: 12px;
  z-index: 20;
}
.skip-link:focus {
  top: 10px;
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.sidebar {
  width: 238px;
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--rail);
  color: #f1f5ee;
  display: flex;
  flex-direction: column;
  padding: 30px 18px 20px;
  z-index: 2;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 650;
  font-size: 18px;
  letter-spacing: -0.7px;
  text-decoration: none;
  padding: 0 8px 30px;
}
.brand-mark {
  display: flex;
  align-items: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -3px;
  border: 1px solid #8e9c8e;
  width: 30px;
  height: 32px;
  padding: 5px;
  border-radius: 6px 6px 11px 11px;
}
.brand-mark span {
  transform: translateY(3px);
}
.workspace-label {
  font-size: 10px;
  letter-spacing: 1.6px;
  color: var(--rail-muted);
  padding: 0 12px 12px;
}
.workspace-name {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 28px;
  font-weight: 600;
}
.workspace-name small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--rail-muted);
}
.workspace-avatar {
  background: #455547;
  border: 1px solid #607060;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
}
.nav-current {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #354238;
  border: 1px solid #4e6050;
  border-radius: 6px;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 13px;
}
.nav-current > span:first-child {
  font-size: 20px;
}
.count {
  margin-left: auto;
  background: #506151;
  font: 11px var(--mono);
  padding: 3px 6px;
  border-radius: 4px;
}
.history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 8px 12px;
}
.history-heading h2 {
  font-size: 12px;
  color: #d4ddd2;
  font-weight: 500;
}
.history-heading > span {
  font-size: 10px;
  color: var(--rail-muted);
}
#historyFilter {
  width: 100%;
  background: var(--rail);
  color: #d4ddd2;
  border: 1px solid #526054;
  border-radius: 5px;
  padding: 8px;
  margin-bottom: 12px;
  font-size: 12px;
}
#history {
  overflow: auto;
  min-height: 80px;
  flex: 1;
}
.history-row {
  width: 100%;
  background: none;
  border-color: transparent;
  color: #c7d1c7;
  text-align: left;
  border-radius: 5px;
  padding: 11px 10px;
  margin-bottom: 6px;
  display: grid;
  gap: 5px;
}
.history-row strong {
  font-size: 12px;
  font-weight: 550;
}
.history-row small {
  font: 10px var(--mono);
  color: var(--rail-muted);
}
.history-row:hover:not(:disabled) {
  background: #303c32;
}
.history-row.chosen {
  background: #354238;
  border-color: #617661;
  color: white;
}
.history-top {
  display: flex;
  gap: 8px;
  align-items: center;
}
.history-row .dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  background: #bbbcaf;
}
.history-row .dot.success {
  background: #9ac3a4;
}
.history-row .dot.danger {
  background: #f09e97;
}
.history-row .dot.warning {
  background: #e3c487;
}
.sidebar-empty {
  padding: 12px 8px;
  color: var(--rail-muted);
  font-size: 12px;
}
.sidebar-foot {
  padding: 20px 8px 0;
  font-size: 11px;
  color: #d3ddd1;
  border-top: 1px solid #435045;
  margin-top: 16px;
}
.sidebar-foot small {
  display: block;
  color: var(--rail-muted);
  font-size: 10px;
  margin-top: 6px;
}
.light,
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--muted);
  border-radius: 50%;
}
.light {
  margin-right: 7px;
}
.light.online {
  background: #a1c69c;
}
.workspace {
  margin-left: 238px;
}
.topbar {
  height: 62px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.topbar span:not(.light) {
  margin: 0 12px;
  color: #899185;
}
.topbar strong {
  font-weight: 500;
  color: var(--ink);
}
.synthetic-label {
  font-size: 11px;
}
.synthetic-label .light {
  background: var(--accent);
}
main {
  max-width: 1510px;
  margin: auto;
  padding: 34px 36px 20px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.page-heading h1 {
  font-size: 30px;
  letter-spacing: -1.2px;
  margin: 8px 0;
}
.page-heading h1 > span {
  color: var(--accent);
}
.page-heading p {
  color: var(--muted);
  font-size: 13px;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 10px;
  padding-top: 30px;
}
.page-footer > span:first-child {
  font-size: 9px;
  letter-spacing: 1px;
}
.footer-divider {
  margin: 0 10px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 4px;
  background: var(--soft);
  color: var(--muted);
  white-space: nowrap;
}
.badge .dot {
  background: currentColor;
  width: 5px;
  height: 5px;
}
.badge.success {
  background: var(--success-soft);
  color: var(--success);
}
.badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.badge.warning {
  background: var(--warning-soft);
  color: var(--warning);
}
.release-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}
.release-head h2 {
  font-size: 21px;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.release-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
}
.head-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.head-actions button {
  font-size: 12px;
}
.result-banner {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 17px 20px;
  background: var(--success-soft);
  border: 1px solid #d4e2d5;
  border-radius: 7px;
  margin-bottom: 20px;
}
.result-banner.danger {
  background: var(--danger-soft);
  border-color: #ead1d3;
}
.result-banner.warning {
  background: var(--warning-soft);
  border-color: #e9debb;
}
.result-banner.neutral {
  background: var(--soft);
  border-color: var(--line);
}
.result-icon {
  width: 32px;
  height: 32px;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--success);
}
.danger .result-icon {
  color: var(--danger);
}
.warning .result-icon {
  color: var(--warning);
}
.neutral .result-icon {
  color: var(--muted);
}
.result-banner h3 {
  font-size: 13px;
  margin-bottom: 3px;
}
.result-banner p {
  font-size: 12px;
  color: var(--muted);
  max-width: 85ch;
}
.result-banner > button {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 12px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  margin-bottom: 24px;
}
.stat {
  padding: 19px 22px;
  border-right: 1px solid var(--line);
}
.stat:last-child {
  border: 0;
}
.stat-label {
  font-size: 11px;
  color: var(--muted);
}
.stat strong {
  display: block;
  font-weight: 500;
  font-size: 27px;
  line-height: 1.3;
  letter-spacing: -1px;
  margin: 5px 0;
  font-variant-numeric: tabular-nums;
}
.stat strong small {
  font-size: 16px;
  color: var(--muted);
  letter-spacing: 0;
}
.stat > small {
  font-size: 10px;
  color: var(--muted);
  display: block;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-head h2 {
  font-size: 15px;
  letter-spacing: -0.2px;
}
.section-head p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.section-head .tag {
  font: 10px var(--mono);
  color: var(--accent);
  padding: 4px 7px;
  border: 1px solid #d9b9a5;
  border-radius: 3px;
  background: var(--accent-soft);
}
.review-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}
.playback-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcf9;
}
.playback-label {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.playback-label strong {
  font-weight: 600;
  color: var(--ink);
}
.playback-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.playback-controls button {
  font-size: 11px;
  min-height: 36px;
  padding: 7px 10px;
}
.playback-controls .play {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
}
.playback-controls select {
  padding: 7px 3px;
  border: 0;
  background: transparent;
  font-size: 11px;
  color: var(--muted);
  min-height: 36px;
}
.playback-controls .icon {
  width: 14px;
  height: 14px;
}
.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  min-height: 332px;
}
.chart-panel {
  padding: 23px 24px 16px;
  min-width: 0;
}
.chart-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.chart-heading h3 {
  font-size: 14px;
}
.chart-heading p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.legend {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 10px;
  color: var(--muted);
  margin: 18px 0 0;
  flex-wrap: wrap;
}
.legend i {
  display: inline-block;
  width: 16px;
  border-top: 2px solid var(--accent);
  vertical-align: middle;
  margin-right: 5px;
}
.legend .stable {
  border-color: var(--blue);
  border-top-style: dashed;
}
.legend .limit {
  border-color: var(--danger);
  border-top-style: dotted;
}
.chart {
  display: block;
  width: 100%;
  height: 224px;
  overflow: visible;
}
.chart text {
  font-family: var(--mono);
  fill: var(--muted);
  font-size: 11px;
}
.chart .grid {
  stroke: var(--line);
  stroke-width: 1;
}
.chart .threshold {
  stroke: var(--danger);
  stroke-dasharray: 5 5;
  stroke-width: 1;
}
.chart .candidate {
  stroke: var(--accent);
  fill: none;
  stroke-width: 2.5;
}
.chart .stable {
  stroke: var(--blue);
  fill: none;
  stroke-width: 2;
  stroke-dasharray: 5 4;
}
.chart .point {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 2.5;
}
.chart .stable-point {
  fill: var(--surface);
  stroke: var(--blue);
  stroke-width: 2;
}
.chart-caption {
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.story-aside {
  background: #f8f9f5;
  border-left: 1px solid var(--line);
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.story-aside .step-index {
  font: 10px var(--mono);
  color: var(--accent);
  letter-spacing: 0.5px;
}
.story-aside h3 {
  font-size: 20px;
  letter-spacing: -0.6px;
  margin: 16px 0 12px;
  line-height: 1.3;
}
.story-aside p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.75;
}
.route-block {
  margin-top: auto;
  padding-top: 22px;
}
.route-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 7px;
}
.route-label strong {
  font: 13px var(--mono);
}
.route-track {
  display: flex;
  height: 7px;
  border-radius: 2px;
  background: #dde5e9;
  overflow: hidden;
}
.route-track span {
  background: var(--accent);
}
.route-block small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 7px;
}
.step-strip {
  border-top: 1px solid var(--line);
  padding: 14px 18px;
  display: flex;
  gap: 7px;
  overflow: auto;
}
.step-button {
  flex: 1;
  min-width: 75px;
  min-height: 44px;
  border: 0;
  background: transparent;
  border-radius: 4px;
  text-align: left;
  padding: 6px 8px;
  color: var(--muted);
  font-size: 10px;
}
.step-button:before {
  content: "";
  display: block;
  height: 3px;
  background: var(--line);
  margin-bottom: 8px;
  border-radius: 1px;
}
.step-button.past:before {
  background: #9cae9e;
}
.step-button.current {
  background: var(--accent-soft);
  color: var(--accent);
}
.step-button.current:before {
  background: var(--accent);
}
.step-button span {
  font-family: var(--mono);
  margin-right: 5px;
}
.scrub {
  padding: 0 23px 15px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.scrub input {
  flex: 1;
  min-width: 0;
  accent-color: var(--accent);
  height: 20px;
}
.scrub label {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.price-chart {
  display: grid;
  gap: 20px;
  margin-top: 28px;
  margin-bottom: 23px;
}
.price-row {
  display: grid;
  grid-template-columns: 80px 1fr 64px;
  gap: 12px;
  align-items: center;
  font-size: 11px;
}
.price-row strong {
  font: 13px var(--mono);
  text-align: right;
}
.price-track {
  height: 23px;
  background: var(--soft);
  border-radius: 2px;
  overflow: hidden;
}
.price-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 2px;
}
.price-row.expected .price-fill {
  background: #687668;
}
.price-row.candidate .price-fill {
  background: var(--accent);
}
.price-input {
  padding: 10px 12px;
  background: var(--soft);
  border-radius: 4px;
  color: var(--muted);
  font-size: 11px;
}
.no-chart {
  min-height: 245px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
}
.no-chart .large-number {
  font: 40px var(--mono);
  color: #b3bcb0;
}
.no-chart h3 {
  font-size: 20px;
  letter-spacing: -0.5px;
}
.no-chart p {
  color: var(--muted);
  font-size: 12px;
  max-width: 48ch;
}
.window-focus {
  font-size: 11px;
  margin-top: 6px;
  color: var(--muted);
}
.window-focus strong {
  color: var(--ink);
  font-weight: 600;
}
.evidence {
  margin-top: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 7px;
  overflow: hidden;
}
.evidence > summary {
  padding: 17px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}
.evidence > summary > span {
  float: right;
  font-weight: 400;
  color: var(--muted);
  font-size: 11px;
  margin-top: 1px;
}
.evidence-content {
  border-top: 1px solid var(--line);
  padding: 20px;
}
.evidence-content h3 {
  font-size: 13px;
  margin: 4px 0 12px;
}
.table-scroll {
  overflow: auto;
  margin-bottom: 20px;
}
table {
  border-collapse: collapse;
  width: 100%;
  white-space: nowrap;
  font-size: 11px;
  text-align: left;
}
th {
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
  background: var(--soft);
}
th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
td button {
  font-size: 11px;
  min-height: 30px;
  padding: 3px 8px;
}
.note {
  font-size: 11px;
  color: var(--muted);
  margin: 8px 0 20px;
}
.raw-failure {
  border: 1px solid var(--line);
  margin: 8px 0;
  border-radius: 4px;
}
.raw-failure summary {
  padding: 10px;
  font-size: 12px;
  cursor: pointer;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--soft);
  padding: 12px;
  font: 11px/1.7 var(--mono);
}
.event-log {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.event-log li {
  display: grid;
  grid-template-columns: 95px 1fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.event-log time {
  color: var(--muted);
  font: 10px/1.7 var(--mono);
}
.identity {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 8px 0;
  font-size: 11px;
}
.identity span {
  color: var(--muted);
}
.identity code {
  overflow-wrap: anywhere;
  font-size: 10px;
}
.stable-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 10px;
  color: var(--muted);
  padding-top: 15px;
}
.stable-foot code {
  font-size: 10px;
}
.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 60px 40px;
}
.empty-state h2 {
  font-size: 29px;
  letter-spacing: -1px;
  margin: 14px 0;
}
.empty-state > p {
  max-width: 58ch;
  color: var(--muted);
}
.empty-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
  margin-top: 35px;
}
.empty-steps span {
  font: 13px var(--mono);
  color: var(--accent);
}
.empty-steps h3 {
  font-size: 15px;
  margin: 8px 0;
}
.empty-steps p {
  font-size: 12px;
  color: var(--muted);
}
#notice {
  padding: 13px 16px;
  background: var(--warning-soft);
  border: 1px solid #d8c7a2;
  border-radius: 6px;
  margin-bottom: 18px;
  font-size: 12px;
}
dialog {
  width: min(530px, calc(100% - 32px));
  max-height: 90vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  padding: 30px;
  box-shadow: 0 24px 100px #15201633;
}
dialog::backdrop {
  background: #17211bb3;
}
dialog .close {
  float: right;
  border: 0;
  font-size: 24px;
  width: 40px;
  padding: 0;
  line-height: 1;
}
dialog h2 {
  font-size: 27px;
  letter-spacing: -1px;
  margin: 15px 0 12px;
  max-width: 350px;
}
dialog > p {
  font-size: 13px;
  color: var(--muted);
}
#scenarios {
  display: grid;
  gap: 10px;
  margin: 23px 0;
}
.scenario {
  display: flex;
  text-align: left;
  gap: 15px;
  align-items: flex-start;
  padding: 16px;
}
.scenario:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.scenario-number {
  font: 12px var(--mono);
  color: var(--accent);
  padding-top: 3px;
}
.scenario b {
  font-size: 15px;
  font-weight: 600;
}
.scenario small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin: 3px 0 7px;
}
.scenario em {
  display: block;
  font-size: 12px;
  font-style: normal;
  color: var(--muted);
}
.scenario > .icon {
  margin-left: auto;
  margin-top: 4px;
}
.dialog-note {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
}
.error {
  color: var(--danger);
  margin: 10px 0;
}
.error:empty {
  display: none;
}
@media (min-width: 1500px) {
  .story-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
  .chart {
    height: 260px;
  }
  .story-aside {
    padding: 30px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 210px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .workspace {
    margin-left: 210px;
  }
  main {
    padding: 26px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .story-layout {
    grid-template-columns: minmax(0, 1fr) 235px;
  }
  .story-aside {
    padding: 20px;
  }
  .chart-panel {
    padding: 20px 18px 14px;
  }
  .stat {
    padding: 17px;
  }
  .playback-bar {
    flex-wrap: wrap;
  }
  .head-actions button {
    padding: 8px 10px;
  }
  .head-actions .icon {
    display: none;
  }
}
@media (max-width: 900px) {
  .sidebar {
    position: relative;
    width: auto;
    padding: 16px 22px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
  }
  .brand {
    padding: 0;
  }
  .workspace-label,
  .workspace-name,
  .nav-current,
  .history-heading,
  .sidebar-foot {
    display: none;
  }
  #historyFilter {
    width: 145px;
    margin: 0;
  }
  #history {
    grid-column: 1/-1;
    display: flex;
    gap: 8px;
    overflow: auto;
    min-height: 0;
    max-height: 112px;
  }
  .history-row {
    min-width: 180px;
    max-width: 210px;
    flex-shrink: 0;
    margin: 0;
  }
  .workspace {
    margin: 0;
  }
  .topbar {
    height: 48px;
  }
  .page-heading {
    margin-bottom: 25px;
  }
  .page-heading h1 {
    font-size: 28px;
  }
  .stats {
    margin-bottom: 22px;
  }
  .stat strong {
    font-size: 25px;
  }
  .story-layout {
    grid-template-columns: minmax(0, 1fr) 245px;
  }
}
@media (max-width: 640px) {
  body {
    font-size: 14px;
  }
  main {
    padding: 25px 16px 18px;
  }
  .sidebar {
    padding: 16px;
  }
  .brand {
    font-size: 16px;
  }
  .brand-mark {
    width: 26px;
    height: 28px;
    font-size: 12px;
  }
  #historyFilter {
    width: 126px;
    font-size: 12px;
  }
  .topbar {
    padding: 0 16px;
  }
  .topbar .synthetic-label {
    font-size: 10px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 10px;
  }
  .page-heading h1 {
    font-size: 24px;
    letter-spacing: -0.9px;
  }
  .page-heading .eyebrow {
    font-size: 9px;
  }
  .page-heading p {
    font-size: 11px;
    max-width: 190px;
  }
  .page-heading > .primary {
    font-size: 11px;
    padding: 7px 10px;
    white-space: nowrap;
    margin-top: 20px;
  }
  .release-head {
    flex-direction: column;
    gap: 12px;
  }
  .release-head h2 {
    font-size: 20px;
  }
  .head-actions {
    width: 100%;
  }
  .head-actions button {
    flex: 1;
    min-height: 44px;
  }
  .result-banner {
    padding: 14px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .result-banner > div:nth-child(2) {
    flex: 1;
  }
  .result-banner h3 {
    font-size: 12px;
  }
  .result-banner p {
    font-size: 11px;
  }
  .result-banner > button {
    margin-left: 42px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat {
    padding: 14px 16px;
  }
  .stat:nth-child(2) {
    border-right: 0;
  }
  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .stat strong {
    font-size: 26px;
  }
  .story-layout {
    grid-template-columns: 1fr;
  }
  .story-aside {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 20px;
  }
  .story-aside h3 {
    font-size: 20px;
    margin: 10px 0;
  }
  .route-block {
    padding-top: 18px;
  }
  .chart-panel {
    padding: 18px 15px;
  }
  .chart {
    height: 210px;
  }
  .playback-bar {
    padding: 12px;
    gap: 10px;
  }
  .playback-label {
    font-size: 10px;
  }
  .playback-controls {
    width: 100%;
    justify-content: space-between;
    gap: 4px;
  }
  .playback-controls button {
    font-size: 10px;
    padding: 7px;
    min-height: 44px;
  }
  .playback-controls select {
    min-height: 44px;
  }
  .step-strip {
    padding: 12px;
    gap: 4px;
  }
  .step-button {
    min-width: 76px;
  }
  .scrub {
    padding: 0 14px 12px;
  }
  .section-head p {
    font-size: 10px;
  }
  .section-head .tag {
    font-size: 9px;
  }
  .price-row {
    grid-template-columns: 65px 1fr 56px;
    gap: 8px;
  }
  .price-input {
    font-size: 10px;
  }
  .evidence > summary {
    font-size: 12px;
    padding: 16px;
  }
  .evidence > summary > span {
    display: none;
  }
  .evidence-content {
    padding: 15px;
  }
  .event-log li {
    grid-template-columns: 75px 1fr;
  }
  .identity {
    grid-template-columns: 85px 1fr;
    gap: 10px;
  }
  .page-footer {
    font-size: 9px;
  }
  .page-footer > span:last-child {
    display: none;
  }
  .empty-state {
    padding: 30px 23px;
  }
  .empty-state h2 {
    font-size: 25px;
  }
  .empty-steps {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .no-chart {
    min-height: 220px;
  }
  dialog {
    padding: 24px;
  }
  dialog h2 {
    font-size: 25px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
