:root {
  color-scheme: light;
  --navy-950: #111d2d;
  --navy-800: #24364d;
  --navy-600: #4c6179;
  --ink: #263342;
  --muted: #677382;
  --line: #d8dde3;
  --line-strong: #bcc5cf;
  --paper: #ffffff;
  --canvas: #f3f5f7;
  --soft: #eef1f4;
  --accent: #2f6274;
  --warning: #8a5a19;
  --danger: #9a3f3f;
  --success: #2f6b54;
  font-family: Meiryo, "メイリオ", "Yu Gothic UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.65;
}

button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .56; }
[hidden] { display: none !important; }

.access-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background: var(--navy-950);
}

.access-panel {
  width: min(100%, 420px);
  background: var(--paper);
  border-top: 4px solid var(--accent);
  padding: 34px 36px 30px;
  box-shadow: 0 14px 36px rgb(5 15 27 / 22%);
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.access-panel h1, .app-header h1 {
  margin: 0;
  color: var(--navy-950);
  font-size: 24px;
  line-height: 1.35;
  letter-spacing: .02em;
}

.access-description { margin: 18px 0 24px; color: var(--muted); }
.access-panel label { display: block; margin-bottom: 7px; font-weight: 700; }
.access-panel input {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  color: var(--navy-950);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  outline: none;
}
.access-panel input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgb(47 98 116 / 15%); }
.access-panel .button { width: 100%; margin-top: 16px; }
.form-error { margin: 9px 0 0; color: var(--danger); font-weight: 700; }
.storage-note { margin: 18px 0 0; color: var(--muted); font-size: 11px; }

.button {
  min-height: 38px;
  padding: 7px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--paper);
  color: var(--navy-800);
  font-weight: 700;
}
.button:hover { border-color: var(--navy-600); background: var(--soft); }
.button.primary { border-color: var(--navy-950); background: var(--navy-950); color: #fff; }
.button.primary:hover { background: var(--navy-800); }
.button.quiet { color: var(--muted); }
.button.small { min-height: 30px; padding: 3px 10px; font-size: 12px; }

.app-header {
  position: sticky;
  z-index: 10;
  top: 0;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 15px max(24px, calc((100vw - 1480px) / 2));
  border-bottom: 1px solid var(--line-strong);
  background: rgb(255 255 255 / 96%);
}

.read-only-label { margin: 2px 0 0; color: var(--muted); font-size: 10px; letter-spacing: .12em; }
.header-controls { display: flex; align-items: center; gap: 8px; }
.updated-at { min-width: 170px; padding-right: 14px; text-align: right; line-height: 1.4; }
.updated-at span { display: block; color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.updated-at time { color: var(--navy-800); font-size: 12px; font-variant-numeric: tabular-nums; }

.app-main { width: min(1480px, 100%); margin: 0 auto; padding: 22px 24px 72px; }
.status-bar { min-height: 26px; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.status-bar[data-state="ready"] { color: var(--success); }
.status-bar[data-state="error"] { color: var(--danger); }
.error-panel {
  display: flex;
  gap: 14px;
  margin: 0 0 18px;
  padding: 12px 15px;
  border: 1px solid #d9bcbc;
  border-left: 4px solid var(--danger);
  background: #fffafa;
  color: var(--danger);
}

.view-switch {
  width: fit-content;
  display: flex;
  margin: 4px 0 18px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
}
.view-tab {
  min-width: 122px;
  min-height: 38px;
  padding: 7px 18px;
  border: 0;
  border-right: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
}
.view-tab:last-child { border-right: 0; }
.view-tab:hover { background: var(--soft); color: var(--navy-950); }
.view-tab.active { background: var(--navy-950); color: #fff; }
.view-tab:focus-visible, .agent-station:focus-visible {
  outline: 3px solid rgb(47 98 116 / 30%);
  outline-offset: 2px;
}

.office-brief {
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 20px 22px;
  border: 1px solid var(--line-strong);
  border-left: 5px solid var(--navy-800);
  background: var(--paper);
}
.office-brief h2 { margin: 2px 0 0; color: var(--navy-950); font-size: 23px; }
.office-brief > div > p:last-child { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.office-clock { display: flex; gap: 22px; margin: 0; text-align: right; }
.office-clock div { min-width: 175px; }
.office-clock dt { color: var(--muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.office-clock dd { margin: 2px 0 0; color: var(--navy-800); font-size: 12px; font-variant-numeric: tabular-nums; }

.office-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.office-metric { min-height: 88px; padding: 14px 16px; border-right: 1px solid var(--line); }
.office-metric:last-child { border-right: 0; }
.office-metric-label { margin: 0; color: var(--muted); font-size: 10px; }
.office-metric-value { display: block; margin-top: 8px; color: var(--navy-950); font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.office-metric-value small { margin-left: 4px; color: var(--muted); font-size: 9px; font-weight: 400; }
.office-metric.alert .office-metric-value { color: var(--danger); }

.office-workspace, .office-pipeline-section {
  margin-top: 18px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
}
.office-section-heading {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 17px;
  border-bottom: 1px solid var(--line);
}
.office-section-heading h2 { margin: 0; color: var(--navy-950); font-size: 17px; }
.office-section-heading > p { margin: 0; color: var(--muted); font-size: 10px; text-align: right; }

.office-floor {
  position: relative;
  display: grid;
  grid-template-columns: minmax(250px, .9fr) 76px minmax(360px, 1.35fr);
  grid-template-areas:
    "executive executive executive"
    "threads corridor reading"
    "quality corridor commerce";
  gap: 14px;
  padding: 38px 22px 22px;
  background: #e9ecea;
  box-shadow: inset 0 0 0 6px #dfe3e1;
}
.floor-wayfinding {
  position: absolute;
  top: 10px;
  left: 22px;
  color: #7c8581;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .2em;
}
.office-room {
  min-width: 0;
  padding: 13px;
  border: 1px solid #b9c0bd;
  border-top: 4px solid var(--navy-800);
  background: #f9faf9;
  box-shadow: 0 2px 0 rgb(17 29 45 / 7%);
}
.office-room > header { display: flex; align-items: baseline; gap: 9px; margin-bottom: 10px; }
.office-room > header span { color: var(--accent); font-size: 8px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.office-room > header h3 { margin: 0; color: var(--navy-950); font-size: 13px; }
.executive-room { grid-area: executive; min-height: 150px; border-top-color: var(--navy-950); }
.threads-room { grid-area: threads; min-height: 210px; }
.reading-room { grid-area: reading; min-height: 210px; }
.quality-room { grid-area: quality; min-height: 210px; }
.commerce-room { grid-area: commerce; min-height: 210px; }
.floor-corridor {
  grid-area: corridor;
  display: grid;
  place-items: center;
  border-right: 1px dashed #b9c0bd;
  border-left: 1px dashed #b9c0bd;
  color: #929a96;
}
.floor-corridor span { font-size: 8px; font-weight: 700; letter-spacing: .18em; writing-mode: vertical-rl; }
.station-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.threads-room .station-list, .quality-room .station-list, .commerce-room .station-list { grid-template-columns: 1fr; }

.agent-station {
  position: relative;
  min-width: 0;
  min-height: 111px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-areas: "marker identity" "marker status";
  gap: 2px 10px;
  padding: 11px 10px 9px;
  border: 1px solid #ccd2cf;
  border-left: 3px solid var(--line-strong);
  border-radius: 1px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  text-align: left;
}
.agent-station:hover { border-color: var(--navy-600); background: #fbfcfc; }
.station-marker { position: relative; grid-area: marker; align-self: start; }
.station-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid #9ca9b5;
  border-radius: 50%;
  background: var(--soft);
  color: var(--navy-800);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
}
.state-indicator {
  width: 9px;
  height: 9px;
  display: inline-block;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--line-strong);
}
.station-marker .state-indicator { position: absolute; right: -1px; bottom: -1px; }
.station-identity { grid-area: identity; min-width: 0; }
.station-name, .station-role, .state-label, .activity-label, .activity-time { display: block; }
.station-name { color: var(--navy-950); font-size: 12px; overflow-wrap: anywhere; }
.station-role { color: var(--muted); font-size: 8px; line-height: 1.4; }
.station-status { grid-area: status; min-width: 0; margin-top: 4px; }
.state-label { color: var(--navy-600); font-size: 9px; font-weight: 700; letter-spacing: .03em; }
.activity-label { margin-top: 1px; font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.activity-time { margin-top: 3px; color: var(--muted); font-size: 8px; font-variant-numeric: tabular-nums; }
.station-open { position: absolute; right: 7px; bottom: 4px; color: #9aa2aa; font-size: 7px; letter-spacing: .1em; }
.state-running { border-left-color: var(--success); }
.state-running .state-indicator { background: var(--success); animation: office-pulse 1.8s ease-out infinite; }
.state-running .state-label { color: var(--success); }
.state-ceo_attention, .state-revision_required { border-left-color: var(--warning); }
.state-ceo_attention .state-indicator, .state-revision_required .state-indicator { background: var(--warning); animation: office-wait 2.4s ease-in-out infinite; }
.state-ceo_attention .state-label, .state-revision_required .state-label { color: var(--warning); }
.state-error { border-left-color: var(--danger); background: #fffafa; }
.state-error .state-indicator { background: var(--danger); }
.state-error .state-label { color: var(--danger); }
.state-queued .state-indicator, .state-waiting .state-indicator { background: var(--accent); }
.state-recent_success .state-indicator { background: var(--success); }
.state-telemetry_unavailable .station-avatar { border-style: dashed; background: #f6f7f7; color: var(--muted); }

@keyframes office-pulse {
  0% { transform: scale(.8); opacity: .55; }
  45% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(.8); opacity: .55; }
}
@keyframes office-wait {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}

.office-pipeline { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; padding: 16px; list-style: none; }
.pipeline-stage { position: relative; min-height: 84px; padding: 11px 20px 9px 11px; border: 1px solid var(--line); border-right: 0; background: #fcfcfd; }
.pipeline-stage:last-child { border-right: 1px solid var(--line); }
.pipeline-stage:not(:last-child)::after { content: "→"; position: absolute; z-index: 1; top: 29px; right: -12px; width: 23px; color: var(--accent); background: var(--paper); font-size: 13px; text-align: center; }
.pipeline-stage-heading { display: flex; justify-content: space-between; gap: 8px; }
.pipeline-stage-heading strong { color: var(--navy-800); font-size: 10px; }
.pipeline-count { color: var(--accent); font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pipeline-stage p { margin: 7px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.pipeline-stage.not_active_yet { background: #f5f6f6; }
.pipeline-stage.not_active_yet .pipeline-count, .pipeline-stage.not_active_yet strong { color: var(--muted); }

.detail-backdrop { position: fixed; z-index: 30; inset: 0; background: rgb(17 29 45 / 34%); }
.agent-detail {
  position: fixed;
  z-index: 31;
  top: 0;
  right: 0;
  width: min(440px, 100%);
  height: 100vh;
  overflow-y: auto;
  border-left: 1px solid var(--line-strong);
  background: var(--paper);
  box-shadow: -12px 0 32px rgb(17 29 45 / 16%);
}
.detail-open { overflow: hidden; }
.detail-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; border-bottom: 1px solid var(--line); }
.detail-header h2 { margin: 0; color: var(--navy-950); font-size: 18px; }
.detail-content { padding: 20px; }
.detail-state { padding: 14px; border: 1px solid var(--line); border-left: 4px solid var(--line-strong); background: #fcfcfd; }
.detail-state .state-indicator { margin-right: 7px; border-color: #fcfcfd; }
.detail-state p { margin: 6px 0 0; color: var(--ink); }
.detail-list { margin: 18px 0 0; border-top: 1px solid var(--line); }
.detail-list div { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--muted); font-size: 10px; }
.detail-list dd { margin: 0; color: var(--navy-800); font-size: 11px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.dashboard-section {
  margin-top: 22px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.section-heading {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.section-heading > div { display: flex; align-items: baseline; gap: 12px; }
.section-heading h2 { margin: 0; color: var(--navy-950); font-size: 17px; letter-spacing: .02em; }
.section-heading > p { margin: 0; color: var(--muted); font-size: 11px; text-align: right; }
.section-number { margin: 0; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .1em; }

.overview-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
}
.metric {
  min-height: 116px;
  padding: 18px;
  border-right: 1px solid var(--line);
}
.metric:last-child { border-right: 0; }
.metric-label { min-height: 38px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.metric-value { margin: 8px 0 0; color: var(--navy-950); font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.metric-value small { margin-left: 3px; font-size: 11px; font-weight: 400; }
.metric.alert .metric-value { color: var(--danger); }

.subsection { padding: 18px; border-bottom: 1px solid var(--line); }
.subsection:last-child { border-bottom: 0; }
.subsection-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.subsection-heading h3 { margin: 0; color: var(--navy-800); font-size: 14px; }
.count-badge {
  min-width: 24px;
  padding: 1px 7px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.record-list { display: grid; gap: 9px; }
.record {
  display: grid;
  grid-template-columns: minmax(180px, .7fr) minmax(300px, 2fr);
  gap: 18px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: #fcfcfd;
}
.record-meta { margin: 0; }
.record-meta div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.record-meta dt { color: var(--muted); font-size: 10px; }
.record-meta dd { margin: 0; color: var(--navy-800); font-size: 12px; overflow-wrap: anywhere; }
.record-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.record-body.compact { color: var(--muted); }
.record-actions { margin-top: 10px; }
.issue-list { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 0; padding: 0; list-style: none; }
.issue-list li { padding: 2px 7px; border: 1px solid #d8c29e; background: #fffbf3; color: var(--warning); font-size: 10px; }

.empty-state { margin: 0; padding: 16px; border: 1px dashed var(--line-strong); color: var(--muted); text-align: center; }

.agent-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.agent-group { padding: 18px; }
.agent-group + .agent-group { border-left: 1px solid var(--line); }
.agent-group h3 { margin: 0 0 10px; color: var(--navy-800); font-size: 13px; }
.agent-list { display: grid; gap: 8px; }
.agent-row { padding: 12px 13px; border: 1px solid var(--line); background: #fcfcfd; }
.agent-primary { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.agent-name { margin: 0; color: var(--navy-950); font-weight: 700; }
.agent-role { margin: 0; color: var(--muted); font-size: 10px; }
.agent-statuses { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.label { padding: 2px 7px; border: 1px solid var(--line-strong); color: var(--muted); font-size: 10px; white-space: nowrap; }
.label.runtime-running { border-color: #8ab2a0; color: var(--success); }
.label.runtime-recent-failure { border-color: #d7adad; color: var(--danger); }
.runtime-detail { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--line); }
.runtime-detail span { display: block; color: var(--muted); font-size: 9px; }
.runtime-detail strong { display: block; margin-top: 2px; color: var(--navy-800); font-size: 11px; font-weight: 400; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
th { background: var(--soft); color: var(--navy-600); font-size: 9px; letter-spacing: .04em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
td { color: var(--ink); font-variant-numeric: tabular-nums; }
.id-cell { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.status-text { font-weight: 700; }
.status-text.failed { color: var(--danger); }
.status-text.running { color: var(--success); }
.status-text.needs-approval { color: var(--warning); }

.app-footer { padding: 22px 24px 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; text-align: center; }

@media (max-width: 1180px) {
  .office-summary { grid-template-columns: repeat(3, 1fr); }
  .office-metric:nth-child(3) { border-right: 0; }
  .office-metric:nth-child(-n + 3) { border-bottom: 1px solid var(--line); }
  .office-pipeline { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .pipeline-stage, .pipeline-stage:last-child { border-right: 1px solid var(--line); }
  .pipeline-stage:not(:last-child)::after { display: none; }
  .overview-grid { grid-template-columns: repeat(4, 1fr); }
  .metric { border-bottom: 1px solid var(--line); }
  .metric:nth-child(4n) { border-right: 0; }
  .metric:nth-last-child(-n + 3) { border-bottom: 0; }
}

@media (max-width: 800px) {
  .app-header { position: static; align-items: flex-start; padding: 14px 16px; }
  .header-controls { flex-wrap: wrap; justify-content: flex-end; }
  .updated-at { width: 100%; padding: 0; }
  .app-main { padding: 12px 12px 48px; }
  .office-brief { align-items: flex-start; }
  .office-clock { display: block; }
  .office-clock div + div { margin-top: 8px; }
  .office-floor {
    grid-template-columns: minmax(220px, 1fr) 48px minmax(280px, 1.2fr);
    overflow-x: auto;
  }
  .office-summary { grid-template-columns: repeat(2, 1fr); }
  .office-metric:nth-child(n) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .office-metric:nth-child(2n) { border-right: 0; }
  .office-metric:last-child { border-bottom: 0; }
  .section-heading { align-items: flex-start; }
  .overview-grid { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(n) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .metric:nth-child(2n) { border-right: 0; }
  .metric:last-child { border-bottom: 0; }
  .record { grid-template-columns: 1fr; gap: 10px; }
  .agent-groups { grid-template-columns: 1fr; }
  .agent-group + .agent-group { border-top: 1px solid var(--line); border-left: 0; }
  .runtime-detail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .access-panel { padding: 28px 22px; }
  .app-header { display: block; }
  .header-controls { justify-content: flex-start; margin-top: 13px; }
  .updated-at { text-align: left; }
  .view-switch { width: 100%; }
  .view-tab { width: 50%; min-width: 0; }
  .office-brief { display: block; padding: 17px; }
  .office-clock { display: grid; grid-template-columns: 1fr; gap: 6px; margin-top: 14px; text-align: left; }
  .office-clock div { min-width: 0; }
  .office-clock div + div { margin-top: 0; }
  .office-summary { grid-template-columns: 1fr; }
  .office-metric:nth-child(n) { min-height: 72px; border-right: 0; border-bottom: 1px solid var(--line); }
  .office-metric-value { margin-top: 4px; font-size: 19px; }
  .office-section-heading { display: block; }
  .office-section-heading > p { margin-top: 4px; text-align: left; }
  .office-floor {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 34px 10px 10px;
    overflow: visible;
    box-shadow: inset 0 0 0 4px #dfe3e1;
  }
  .office-room { width: 100%; min-height: 0; }
  .floor-corridor { display: none; }
  .station-list, .threads-room .station-list, .quality-room .station-list, .commerce-room .station-list { grid-template-columns: 1fr; }
  .agent-station { min-height: 104px; }
  .office-pipeline { grid-template-columns: 1fr; gap: 7px; padding: 10px; }
  .pipeline-stage { min-height: 66px; }
  .agent-detail { top: auto; bottom: 0; width: 100%; height: min(82vh, 700px); border-top: 1px solid var(--line-strong); border-left: 0; }
  .detail-header, .detail-content { padding: 16px; }
  .detail-list div { grid-template-columns: 128px minmax(0, 1fr); }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 4px; text-align: left; }
  .overview-grid { grid-template-columns: 1fr; }
  .metric:nth-child(n) { min-height: 90px; border-right: 0; }
  .metric-label { min-height: auto; }
  .record-meta div { grid-template-columns: 74px 1fr; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tbody tr { padding: 9px 12px; border-bottom: 1px solid var(--line); }
  tbody tr:last-child { border-bottom: 0; }
  td { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 8px; padding: 4px 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  td::before { content: attr(data-label); color: var(--muted); font-size: 9px; }
  .id-cell { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
