:root {
  color-scheme: dark;
  --bg: #0b0f12;
  --surface: #121820;
  --surface-2: #171f28;
  --surface-3: #1d2731;
  --line: #2a3542;
  --line-strong: #3a4654;
  --text: #e7edf2;
  --muted: #96a5b4;
  --soft: #c4ced8;
  --cyan: #2ed3c6;
  --green: #43d17c;
  --amber: #f2b84b;
  --red: #f46d6d;
  --violet: #9f86ff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid var(--line);
  background: #0f141a;
  padding: 22px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(130, 165, 255, 0.35);
  border-radius: 14px;
  background: #071019;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.1;
}

.brand-block p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
  border-color: var(--line);
  background: var(--surface-2);
}

.nav-item.active {
  color: var(--cyan);
}

.nav-icon {
  display: grid;
  min-width: 32px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.boundary-note {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.boundary-note strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.boundary-note p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted);
}

.status-dot.ready {
  background: var(--green);
}

.main-shell {
  min-width: 0;
  padding: 30px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 15, 18, 0.94);
  padding: 0 0 24px;
  backdrop-filter: blur(14px);
}

.topbar-title h2 {
  margin-top: 7px;
  font-size: 27px;
  line-height: 1.18;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ghost-button,
.primary-button,
.text-button,
.icon-button,
.segment,
.tab {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
}

kbd {
  min-width: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface-3);
  padding: 2px 5px;
  color: var(--muted);
  font-size: 11px;
}

.segmented,
.tab-strip {
  display: inline-flex;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 3px;
}

.segment,
.tab {
  min-height: 32px;
  border: 0;
  background: transparent;
  padding: 6px 10px;
  color: var(--muted);
}

.segment.active,
.tab.active {
  background: var(--surface-3);
  color: var(--text);
}

.view {
  display: none;
  padding-top: 32px;
}

.view.active {
  display: block;
}

.briefing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  gap: 24px;
}

.readiness-hero,
.event-panel,
.panel,
.scenario-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.readiness-hero {
  display: flex;
  min-height: 220px;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  overflow: hidden;
  padding: 34px;
}

.readiness-hero::before {
  content: "";
  width: 8px;
  min-width: 8px;
  border-radius: 999px;
  background: var(--amber);
}

.hero-copy {
  max-width: 780px;
}

.hero-copy h3 {
  margin-top: 8px;
  font-size: 40px;
  line-height: 1.05;
}

.hero-copy p {
  margin-top: 14px;
  color: var(--soft);
  font-size: 16px;
  line-height: 1.65;
}

.hero-status {
  display: flex;
  min-width: 180px;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.decision-code {
  color: var(--muted);
  font-size: 12px;
}

.event-panel,
.panel,
.scenario-panel {
  padding: 26px;
}

.event-panel h3 {
  margin-top: 18px;
  color: var(--red);
  font-size: 22px;
  line-height: 1.2;
}

.event-panel p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.panel-heading,
.section-heading,
.module-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h3,
.module-intro h3 {
  margin-top: 7px;
  font-size: 22px;
  line-height: 1.22;
}

.module-intro {
  margin-bottom: 24px;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.view-switcher {
  display: inline-flex;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 3px;
}

.mode-button {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 6px 12px;
  cursor: pointer;
}

.mode-button.active,
.mode-button:hover {
  background: var(--surface-3);
  color: var(--text);
}

.workspace-mode {
  display: block;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.pill.green {
  border-color: rgba(67, 209, 124, 0.35);
  background: rgba(67, 209, 124, 0.1);
  color: #91efb4;
}

.pill.amber {
  border-color: rgba(242, 184, 75, 0.35);
  background: rgba(242, 184, 75, 0.12);
  color: #ffd27d;
}

.pill.red {
  border-color: rgba(244, 109, 109, 0.35);
  background: rgba(244, 109, 109, 0.12);
  color: #ffaaa4;
}

.pill.dark {
  background: var(--surface-3);
  color: var(--soft);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.filter-bar.compact {
  margin-top: 18px;
  margin-bottom: 0;
}

.filter-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.filter-chip {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  padding: 7px 12px;
  color: var(--soft);
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  border-color: rgba(46, 211, 198, 0.45);
  color: var(--cyan);
}

.metric-card {
  display: grid;
  min-height: 164px;
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 22px;
  text-align: left;
  cursor: pointer;
}

.metric-card:hover,
.action-row:hover,
.dimension-card:hover,
.report-card:hover,
.status-matrix button:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.metric-card strong {
  margin-top: 18px;
  font-size: 34px;
  line-height: 1;
}

.metric-card span:last-child {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.dashboard-layout,
.readiness-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 24px;
  margin-top: 24px;
}

.coverage-list,
.action-stack,
.rule-list,
.boundary-grid {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.coverage-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(90px, 180px) auto;
  align-items: center;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.coverage-row strong,
.action-row strong,
.rule-list strong,
.boundary-grid strong,
.status-matrix strong {
  display: block;
  font-size: 14px;
}

.coverage-row span,
.action-row span,
.rule-list span,
.boundary-grid span,
.status-matrix span,
.report-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--cyan);
}

.bar.danger span {
  background: var(--red);
}

.action-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 16px;
  text-align: left;
  cursor: pointer;
}

.severity {
  width: 8px;
  min-height: 100%;
  border-radius: 999px;
  background: var(--muted);
}

.severity.red {
  background: var(--red);
}

.severity.amber {
  background: var(--amber);
}

.severity.green {
  background: var(--green);
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--cyan);
  padding: 4px 0;
}

.primary-button {
  min-height: 42px;
  border-color: rgba(46, 211, 198, 0.45);
  background: #123033;
  color: #b9fff8;
  padding: 10px 14px;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.room-tile {
  min-height: 122px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 16px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.room-tile strong {
  display: block;
}

.room-tile span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.room-tile.ready {
  border-top-color: var(--green);
}

.room-tile.warning {
  border-top-color: var(--amber);
}

.purpose-source {
  display: grid;
  gap: 3px;
  min-width: max-content;
}

.purpose-source small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.sample-object-list {
  display: grid;
  gap: 18px;
}

.sample-object-row {
  display: grid;
  gap: 18px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(23, 31, 40, 0.98), rgba(18, 24, 32, 0.98));
  padding: 24px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.sample-object-row:hover {
  border-color: rgba(46, 211, 198, 0.36);
  background: linear-gradient(180deg, rgba(27, 38, 49, 0.98), rgba(18, 25, 33, 0.98));
}

.sample-primary,
.sample-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.object-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.sample-primary strong {
  display: block;
  font-size: 22px;
  line-height: 1.18;
}

.sample-title-row {
  align-items: baseline;
}

.sample-title-row strong {
  color: var(--text);
  font-size: 17px;
}

.sample-title-row span {
  color: var(--muted);
  font-size: 14px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sample-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
}

.sample-badge.purpose {
  border-color: rgba(46, 211, 198, 0.32);
  background: rgba(46, 211, 198, 0.08);
  color: #a7fff7;
}

.sample-badge.source {
  border-color: rgba(159, 134, 255, 0.34);
  background: rgba(159, 134, 255, 0.08);
  color: #cabdff;
}

.sample-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.sample-meta-grid span {
  color: var(--soft);
  font-size: 13px;
  line-height: 1.45;
}

.sample-meta-grid small {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.sample-context-card {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
  cursor: pointer;
}

.sample-context-card span {
  color: var(--muted);
  font-size: 12px;
}

.register-shell {
  margin-top: 24px;
}

.workspace-mode .register-shell:first-child {
  margin-top: 0;
}

.register-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr);
  align-items: end;
  gap: 14px;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 31, 40, 0.68);
  padding: 16px;
}

.register-search {
  display: grid;
  gap: 7px;
}

.saved-view-row {
  grid-column: 1 / -1;
}

.register-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.register-search span,
.column-shelf > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.register-search input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e141a;
  color: var(--text);
  outline: 0;
  padding: 0 13px;
}

.register-search input:focus {
  border-color: rgba(46, 211, 198, 0.62);
}

.saved-view-row,
.register-actions,
.column-shelf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.saved-view,
.toolbar-button,
.column-shelf button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--soft);
  padding: 7px 10px;
  cursor: pointer;
}

.saved-view.active,
.saved-view:hover,
.toolbar-button:hover,
.column-shelf button:hover {
  border-color: rgba(46, 211, 198, 0.42);
  color: var(--cyan);
}

.column-shelf {
  margin-top: 14px;
}

.enterprise-register {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 24, 32, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.enterprise-register::-webkit-scrollbar {
  height: 10px;
}

.enterprise-register::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--line-strong);
}

.register-table {
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
}

.register-table th,
.register-table td {
  border-bottom: 1px solid rgba(42, 53, 66, 0.88);
  padding: 20px 16px;
}

.register-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #121820;
}

.register-table tbody tr {
  outline: 0;
}

.register-table tbody tr:hover,
.register-table tbody tr:focus-visible {
  background: rgba(23, 31, 40, 0.82);
}

.register-table tbody tr:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(46, 211, 198, 0.55);
}

.register-table .pin-col {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 220px;
  background: #121820;
  box-shadow: 1px 0 0 var(--line);
}

.register-table th.pin-col {
  z-index: 3;
}

.register-table tbody tr:hover .pin-col,
.register-table tbody tr:focus-visible .pin-col {
  background: #171f28;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
  font: inherit;
  text-transform: inherit;
}

.sort-button span {
  color: var(--muted);
  font-size: 10px;
}

.register-identity,
.stacked-cell {
  display: grid;
  gap: 5px;
}

.register-identity strong,
.stacked-cell strong,
.register-table td > strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
}

.register-identity span,
.stacked-cell span,
.row-note,
.custody-state {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.38;
}

.row-note {
  margin-top: 6px;
}

.scenario-answer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.answer-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.scenario-answer strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.55;
}

.finding-grid,
.dimension-grid,
.report-grid,
.status-matrix,
.readiness-evidence-grid {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

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

.finding {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 18px;
}

button.finding {
  color: inherit;
  text-align: left;
  cursor: pointer;
}

button.finding:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
}

.finding span,
.dimension-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.finding strong {
  display: block;
  margin-top: 8px;
  font-size: 16px;
}

.finding p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.finding.blocker {
  border-top-color: var(--red);
}

.finding.warning,
.finding.watch {
  border-top-color: var(--amber);
}

.dimension-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dimension-card,
.report-card,
.status-matrix button,
.readiness-evidence-grid button,
.history-strip button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 18px;
  text-align: left;
  cursor: pointer;
}

.readiness-evidence-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.readiness-evidence-grid button {
  border-top-color: rgba(46, 211, 198, 0.42);
}

.readiness-evidence-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.readiness-evidence-grid strong,
.history-strip strong {
  display: block;
  margin-top: 8px;
}

.readiness-evidence-grid small,
.history-strip span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.4;
}

.dimension-card strong {
  display: block;
  margin-top: 10px;
  font-size: 18px;
}

.dimension-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.35;
}

.dimension-card.ready {
  border-top-color: var(--green);
}

.dimension-card.warning,
.dimension-card.constraint {
  border-top-color: var(--amber);
}

.table-wrap {
  width: 100%;
  margin-top: 24px;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 18px 14px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

td {
  color: var(--soft);
  font-size: 13px;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background: var(--surface-2);
}

.timeline {
  display: grid;
  gap: 24px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  border-left: 2px solid var(--line-strong);
  min-height: 58px;
  padding-left: 22px;
}

.timeline li::before {
  position: absolute;
  top: 3px;
  left: -8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cyan);
  content: "";
}

.timeline strong,
.timeline span {
  display: block;
}

.timeline strong {
  font-size: 15px;
}

.timeline span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.material-panel {
  display: none;
}

.material-panel.active {
  display: block;
}

.status-matrix {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.state-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.state-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  padding: 8px 11px;
  color: var(--soft);
  font-size: 13px;
}

.state-row.tools span {
  border-color: rgba(159, 134, 255, 0.34);
}

.history-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

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

.report-card {
  min-height: 140px;
}

.report-card strong {
  display: block;
  font-size: 17px;
}

.rule-list div,
.boundary-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.boundary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 30;
  width: min(560px, 100vw);
  height: 100vh;
  transform: translateX(105%);
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 180ms ease;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 28px;
}

.drawer-header h3 {
  margin-top: 7px;
  font-size: 24px;
}

.drawer-body {
  display: grid;
  gap: 22px;
  padding: 28px;
}

.drawer-body p {
  color: var(--muted);
  line-height: 1.55;
}

.drawer-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.drawer-facts div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 14px;
}

.drawer-facts span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.drawer-facts strong {
  display: block;
  margin-top: 7px;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.35;
}

.drawer-kpi {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 20px;
}

.drawer-kpi strong {
  display: block;
  font-size: 28px;
}

.drawer-kpi span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
}

.palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: start center;
  background: rgba(0, 0, 0, 0.58);
  padding: 8vh 18px 18px;
}

.command-palette {
  width: min(780px, 100%);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
}

.palette-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.palette-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.palette-brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
}

.command-palette input {
  width: 100%;
  height: 46px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e141a;
  color: var(--text);
  outline: 0;
  padding: 0 14px;
}

.command-palette input:focus {
  border-color: rgba(46, 211, 198, 0.65);
}

.query-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.query-examples span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  padding: 5px 9px;
  color: var(--muted);
  font-size: 12px;
}

.command-results {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  max-height: 360px;
  overflow: auto;
}

.command-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.command-result:hover,
.command-result.active {
  border-color: rgba(46, 211, 198, 0.6);
}

.command-result strong,
.command-result span {
  display: block;
}

.command-result span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

@media (min-width: 1241px) {
  .register-toolbar {
    grid-template-columns: minmax(360px, 1fr) auto;
  }

  .register-search {
    grid-column: 1;
    grid-row: 1;
  }

  .register-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .saved-view-row {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 1240px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .dimension-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .readiness-evidence-grid,
  .history-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .register-toolbar {
    grid-template-columns: 1fr;
  }

  .sample-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .briefing-grid,
  .dashboard-layout,
  .readiness-workspace {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .main-shell,
  .sidebar {
    padding: 14px;
  }

  .nav-list,
  .metric-grid,
  .room-grid,
  .finding-grid,
  .dimension-grid,
  .report-grid,
  .status-matrix,
  .boundary-grid,
  .readiness-evidence-grid,
  .history-strip {
    grid-template-columns: 1fr;
  }

  .topbar-actions,
  .readiness-hero,
  .panel-heading,
  .section-heading,
  .module-intro,
  .intro-actions,
  .scenario-answer {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions,
  .scenario-answer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .readiness-hero {
    min-height: auto;
  }

  .readiness-hero::before {
    width: 100%;
    height: 8px;
    min-width: 0;
  }

  .hero-status {
    align-items: flex-start;
  }

  .hero-copy h3 {
    font-size: 32px;
  }

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

  .segmented,
  .tab-strip {
    width: 100%;
    overflow-x: auto;
  }

  .segment,
  .tab,
  .mode-button {
    flex: 1;
  }

  .register-toolbar,
  .column-shelf {
    align-items: stretch;
  }

  .saved-view-row,
  .register-actions,
  .column-shelf {
    display: grid;
    grid-template-columns: 1fr;
  }

  .register-table th,
  .register-table td {
    padding: 17px 14px;
  }

  .register-table .pin-col {
    min-width: 190px;
  }

  .sample-object-row {
    padding: 20px;
  }

  .sample-primary,
  .sample-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .sample-meta-grid {
    grid-template-columns: 1fr;
  }

  .drawer-facts {
    grid-template-columns: 1fr;
  }
}
