:root {
  color-scheme: dark;
  --bg: #070a0e;
  --bg-deep: #04070a;
  --panel: #0c1218;
  --panel-2: #101822;
  --panel-3: #131d28;
  --text: #edf3f7;
  --muted: #8d98a6;
  --faint: #586574;
  --line: #1d2a36;
  --line-strong: #2c3e4d;
  --cyan: #4de9f2;
  --cyan-soft: rgba(77, 233, 242, .12);
  --green: #80f2b2;
  --gold: #f3cb5b;
  --red: #ff8a9b;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 40;
  transform: translateY(-140%);
  padding: 10px 14px;
  border: 1px solid var(--cyan);
  border-radius: 8px;
  background: #061116;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.ia-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  grid-template-rows: 74px minmax(0, 1fr);
  grid-template-areas:
    "topbar topbar"
    "sidebar stage";
  background: var(--bg);
}

.app-topbar {
  grid-area: topbar;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: #090d13;
}

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

.topbar-brand strong,
.topbar-brand span,
.topbar-brand b,
.topbar-user span {
  min-width: 0;
  white-space: nowrap;
}

.product-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--cyan);
  color: #041014;
  font-size: 15px;
  font-weight: 950;
}

.topbar-brand strong {
  font-size: 18px;
  font-weight: 900;
}

.topbar-brand span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 780;
}

.topbar-brand .event-context {
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
}

.topbar-divider {
  width: 1px;
  height: 28px;
  background: var(--line-strong);
}

.status-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #0c141c;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 800;
}

.topbar-user {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.topbar-user b {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel-2);
  color: #bfc8d2;
  font-size: 12px;
}

.app-sidebar {
  grid-area: sidebar;
  min-width: 0;
  padding: 20px 14px;
  border-right: 1px solid var(--line);
  background: #090d13;
  display: grid;
  align-content: space-between;
  gap: 18px;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.sidebar-item {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
  text-align: left;
}

.sidebar-item span {
  width: 4px;
  height: 22px;
  border-radius: 999px;
  background: var(--cyan);
}

.sidebar-item.active,
.sidebar-item:hover {
  border-color: rgba(77, 233, 242, .35);
  background: rgba(77, 233, 242, .09);
  color: var(--text);
}

.sidebar-safety {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.sidebar-safety b,
.sidebar-safety span {
  display: block;
}

.sidebar-safety b {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.sidebar-safety span {
  color: var(--faint);
  font-size: 13px;
  font-weight: 700;
}

.app-stage {
  grid-area: stage;
  min-width: 0;
  padding: 40px 64px 56px;
}

.workflow-stepper {
  max-width: 1510px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
  margin: 0 auto 38px;
}

.workflow-step {
  min-width: 0;
  min-height: 38px;
  display: grid;
  grid-template-columns: 34px minmax(0, auto);
  align-items: center;
  justify-content: start;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--faint);
  text-transform: uppercase;
}

.workflow-step::after {
  content: "";
  display: block;
  height: 1px;
  grid-column: 3;
  background: var(--line);
}

.workflow-step span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--faint);
  font-size: 13px;
  font-weight: 900;
}

.workflow-step b {
  overflow: hidden;
  color: inherit;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-step.active,
.workflow-step:not(:disabled):hover {
  color: var(--text);
}

.workflow-step.active span {
  border-color: var(--cyan);
  background: var(--cyan);
  color: #041014;
}

.workflow-step:disabled {
  opacity: .62;
}

.workspace {
  max-width: 1510px;
  min-height: 690px;
  margin: 0 auto;
  position: relative;
}

.step-index {
  position: absolute;
  top: 8px;
  right: 0;
  margin: 0;
  color: var(--faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.screen {
  display: none;
  min-width: 0;
}

.screen.active {
  display: block;
}

.screen-title {
  min-width: 0;
  margin-bottom: 26px;
  padding-right: 130px;
}

.screen-title.compact {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
}

.screen-title h1 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 36px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0;
}

.screen-title p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  font-weight: 650;
}

.panel,
.drop-panel,
.output-tease,
.athlete-card-mini,
.athlete-card-large,
.metric-card,
.source-drawer .drawer-card,
.fix-drawer .drawer-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.panel {
  padding: 24px;
}

.panel-label {
  display: block;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.panel-head,
.drawer-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-head .panel-label {
  margin-bottom: 0;
}

.primary-action,
.secondary-action,
.text-link,
.text-actions button,
.icon-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
}

.primary-action {
  padding: 0 22px;
  border: 1px solid var(--cyan);
  background: var(--cyan);
  color: #041014;
}

.primary-action:disabled {
  border-color: var(--line-strong);
  background: #18222d;
  color: var(--faint);
}

.secondary-action {
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
}

.text-link,
.text-actions button {
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cyan);
}

.icon-button {
  width: 38px;
  min-width: 38px;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
  font-size: 22px;
}

.upload-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 426px);
  gap: 26px;
  align-items: stretch;
}

.drop-panel {
  min-height: 430px;
  position: relative;
  padding: 56px 38px 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-style: dashed;
  border-color: #223647;
  text-align: center;
}

.drop-panel.dragover {
  border-color: var(--cyan);
  background: #0d1a22;
}

.drop-panel input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.upload-glyph {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--panel-2);
  color: var(--cyan);
  font-size: 30px;
  font-weight: 800;
}

.drop-panel h2 {
  margin: 0 0 12px;
  font-size: 26px;
  line-height: 1.1;
}

.drop-panel p {
  max-width: 600px;
  margin: 0 auto 32px;
  color: var(--muted);
  font-size: 16px;
}

.text-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  margin-top: 18px;
}

.selected-files {
  width: min(640px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 22px;
}

.file-chip {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090f15;
  text-align: left;
}

.file-chip strong,
.file-chip span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-chip strong {
  font-size: 12px;
}

.file-chip span {
  margin-top: 4px;
  color: var(--faint);
  font-size: 11px;
}

.output-tease {
  padding: 30px 26px;
}

.athlete-card-mini,
.athlete-card-large {
  padding: 22px;
  background: var(--panel-2);
}

.athlete-card-mini {
  min-height: 238px;
}

.athlete-card-mini small,
.athlete-card-large small {
  display: block;
  color: #8896a5;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.athlete-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.athlete-card-top em {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #090f15;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.athlete-card-mini .score-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 22px 0 4px;
}

.athlete-card-mini strong,
.athlete-card-large strong {
  display: block;
  color: var(--text);
  font-size: 52px;
  line-height: 1;
  font-weight: 950;
}

.athlete-card-mini .score-line span,
.athlete-card-large span {
  color: var(--faint);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.athlete-card-mini b,
.athlete-card-large b,
.athlete-card-mini em,
.athlete-card-large em {
  display: block;
  font-style: normal;
}

.athlete-card-mini b,
.athlete-card-large b {
  margin-top: 10px;
  font-size: 17px;
}

.athlete-card-mini em,
.athlete-card-large em {
  color: var(--muted);
  font-size: 14px;
}

.athlete-card-mini .athlete-card-top em {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}

.mini-card-bottom {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 28px;
}

.mini-stat-grid,
.large-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 16px;
}

.mini-stat-grid span,
.large-stat-grid span {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090f15;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.mini-stat-grid b,
.large-stat-grid b {
  margin: 0;
  color: var(--text);
  font-size: 11px;
}

.passport-chip {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090f15;
}

.passport-chip b,
.passport-chip span {
  display: block;
}

.passport-chip b {
  color: var(--cyan);
  font-size: 12px;
  text-transform: uppercase;
}

.passport-chip span {
  margin-top: 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.qr-mock {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 5px, rgba(237, 243, 247, .24) 6px, transparent 7px),
    linear-gradient(transparent 5px, rgba(237, 243, 247, .18) 6px, transparent 7px),
    #1a2530;
  background-size: 10px 10px;
}

.athlete-card-mini code {
  overflow: hidden;
  color: var(--cyan);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.output-tease p {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.recipe-strip {
  margin-top: 36px;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.recipe-grid button {
  min-width: 0;
  min-height: 92px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
}

.recipe-grid b,
.recipe-grid span {
  display: block;
  min-width: 0;
}

.recipe-grid b {
  font-size: 17px;
}

.recipe-grid span {
  margin-top: 4px;
  color: var(--faint);
  font-size: 14px;
}

.analysis-layout,
.summary-grid,
.approval-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 18px;
}

.analysis-progress #analysis-progress,
.source-signal-grid,
.source-list,
.issue-summary-list,
.readiness-list,
.package-list,
.complete-grid,
.asset-table {
  display: grid;
  gap: 10px;
}

.progress-row {
  min-height: 52px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090f15;
}

.progress-row span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--cyan-soft);
  color: var(--cyan);
  font-weight: 950;
}

.found-panel {
  display: grid;
  align-content: start;
}

#analysis-found {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

#analysis-found div,
.metric-card,
.package-list article,
.complete-grid .metric-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090f15;
}

#analysis-found strong,
.metric-card strong,
.package-list strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.metric-card.green strong {
  color: var(--green);
}

.metric-card.orange strong {
  color: var(--gold);
}

.metric-card.red strong {
  color: var(--red);
}

#analysis-found span,
.metric-card span,
.metric-card small,
.package-list span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.source-band {
  margin-top: 18px;
}

.manual-fallback {
  margin-top: 18px;
}

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

.source-signal-grid article {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090f15;
}

.source-signal-grid b,
.source-signal-grid span,
.source-signal-grid small {
  display: block;
}

.source-signal-grid b {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-signal-grid span {
  margin-top: 12px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 950;
}

.source-signal-grid small {
  margin-top: 4px;
  color: var(--faint);
}

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.summary-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(300px, .9fr);
}

.manual-region-layout {
  display: grid;
  grid-template-columns: minmax(220px, .32fr) minmax(0, 1fr);
  gap: 14px;
}

.manual-steps {
  display: grid;
  gap: 8px;
}

.manual-steps span {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090f15;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.manual-steps b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--cyan-soft);
  color: var(--cyan);
  font-size: 11px;
}

.sheet-mini {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090f15;
}

.sheet-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.sheet-row:last-child {
  border-bottom: 0;
}

.sheet-row b,
.sheet-row span {
  min-width: 0;
  overflow: hidden;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-row b {
  border-right: 1px solid var(--line);
  color: var(--faint);
  text-align: right;
}

.sheet-row.header,
.sheet-row.start,
.sheet-row.end {
  background: rgba(77, 233, 242, .08);
}

.sheet-row.header b,
.sheet-row.header span,
.sheet-row.start b,
.sheet-row.start span,
.sheet-row.end b,
.sheet-row.end span {
  color: var(--text);
}

.sheet-row.ignore span {
  color: var(--faint);
}

.delta-summary,
.output-locks {
  display: grid;
  gap: 10px;
}

.delta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.delta-grid article,
.output-locks article,
.trust-note {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090f15;
}

.delta-grid strong,
.delta-grid span,
.delta-grid small,
.trust-note b,
.trust-note span,
.output-locks span,
.output-locks b,
.output-locks small {
  display: block;
  min-width: 0;
}

.delta-grid strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1;
}

.delta-grid span,
.output-locks span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.delta-grid small,
.trust-note span,
.output-locks small {
  margin-top: 3px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 760;
}

.trust-note b {
  color: var(--gold);
  font-size: 13px;
}

.output-locks article {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(86px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.output-locks b {
  color: var(--text);
  font-size: 12px;
  text-align: right;
}

.output-locks .green b {
  color: var(--green);
}

.output-locks .orange b {
  color: var(--gold);
}

.output-locks .red b {
  color: var(--red);
}

.issue-summary-list button,
.readiness-list article,
.source-list article,
.asset-table article {
  min-width: 0;
  display: grid;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090f15;
}

.issue-summary-list button {
  grid-template-columns: 46px minmax(0, 1fr);
  color: var(--text);
  text-align: left;
}

.issue-summary-list b {
  color: var(--cyan);
  font-size: 20px;
}

.issue-summary-list span,
.readiness-list span,
.source-list span,
.asset-table span {
  color: var(--muted);
  font-size: 13px;
}

.readiness-list article,
.source-list article,
.asset-table article {
  grid-template-columns: minmax(0, 1fr) auto;
}

.source-list article {
  grid-template-columns: minmax(0, 1fr) 92px;
}

.source-list b,
.asset-table b {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.readiness-list b,
.source-list strong,
.asset-table strong {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 950;
  text-align: right;
  text-transform: uppercase;
}

.readiness-list .locked {
  color: var(--gold);
}

.review-board {
  display: grid;
  grid-template-columns: minmax(180px, 230px) minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
}

.count-stack {
  display: grid;
  gap: 12px;
}

.count-stack strong {
  display: block;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090f15;
  font-size: 24px;
}

.count-stack span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

#issue-list {
  display: grid;
  gap: 8px;
}

.issue-row {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090f15;
  color: var(--text);
  text-align: left;
}

.issue-row.active,
.issue-row:hover {
  border-color: rgba(77, 233, 242, .44);
  background: #0c1820;
}

.issue-row.resolved {
  border-color: rgba(128, 242, 178, .32);
}

.issue-row b {
  color: var(--cyan);
  font-size: 20px;
}

.issue-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.issue-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}

.issue-detail h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.issue-detail p,
.fix-stack p,
.fix-stack code {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.decision-box {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(77, 233, 242, .28);
  border-radius: 8px;
  background: var(--cyan-soft);
}

.decision-box span {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.impact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.impact-tags span,
.impact-tags b {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090f15;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.affected-table {
  display: grid;
  gap: 0;
  margin-top: 20px;
  font-size: 13px;
}

.affected-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr .85fr 1.2fr .85fr;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.affected-row.head {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.affected-row b,
.affected-row span,
.affected-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.affected-row span {
  color: var(--muted);
}

.affected-row strong.ok {
  color: var(--green);
}

.affected-row strong.warn {
  color: var(--gold);
}

.affected-row strong.bad {
  color: var(--red);
}

.detail-actions,
.drawer-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.preview-grid {
  display: grid;
  grid-template-columns: minmax(290px, 390px) minmax(0, 1fr) minmax(280px, 330px);
  gap: 18px;
}

.athlete-card-large {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.athlete-card-large strong {
  margin-top: 40px;
  font-size: 80px;
}

.athlete-card-large .large-stat-grid {
  margin-top: 22px;
}

.athlete-card-large code {
  margin-top: 28px;
  color: var(--cyan);
  font-size: 13px;
}

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

.brand-panel dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.brand-panel div,
.approval-stats strong {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090f15;
}

.brand-panel dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.brand-panel dd {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.approval-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(280px, 360px);
}

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

.plain-list li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090f15;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.locked-panel {
  border-color: rgba(243, 203, 91, .28);
}

.locked-panel .panel-label {
  color: var(--gold);
}

.approval-stats {
  display: grid;
  gap: 8px;
}

.approval-stats strong {
  color: var(--text);
  font-size: 15px;
}

.approval-check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 18px 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.approval-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan);
}

.complete-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.asset-table {
  gap: 8px;
}

.asset-table article {
  grid-template-columns: minmax(180px, .9fr) minmax(0, 1fr) 110px;
}

.next-actions {
  margin-top: 18px;
}

.source-drawer,
.fix-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 30;
  width: min(560px, 100%);
  padding: 18px;
  display: none;
  background: rgba(3, 6, 9, .72);
}

.source-drawer.open,
.fix-drawer.open {
  display: block;
}

.drawer-card {
  height: 100%;
  overflow: auto;
  padding: 24px;
  box-shadow: -30px 0 80px rgba(0, 0, 0, .45);
}

.drawer-head h2 {
  margin: 0;
  font-size: 26px;
}

.source-detail-list,
.mapping-table,
.fix-stack {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.source-detail-list article,
.mapping-row,
.fix-stack article {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090f15;
}

.source-detail-list article {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}

.source-detail-list b,
.source-detail-list span,
.source-detail-list strong,
.source-detail-list em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-detail-list span,
.source-detail-list em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.source-detail-list strong {
  color: var(--cyan);
  font-size: 12px;
}

.mapping-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 96px;
}

.mapping-row.head {
  background: var(--panel-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.mapping-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fix-stack article span {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.fix-stack code {
  display: block;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.toast {
  position: fixed;
  left: 286px;
  right: auto;
  bottom: 22px;
  z-index: 35;
  max-width: min(360px, calc(100% - 44px));
  padding: 12px 14px;
  border: 1px solid rgba(77, 233, 242, .38);
  border-radius: 8px;
  background: #0b151c;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .app-stage {
    padding: 30px 28px 44px;
  }

  .upload-grid,
  .summary-grid,
  .review-board,
  .preview-grid,
  .approval-grid {
    grid-template-columns: 1fr;
  }

  .source-signal-grid,
  .delta-grid,
  .complete-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manual-region-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .ia-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "topbar"
      "stage"
      "sidebar";
  }

  .app-topbar {
    align-items: flex-start;
    padding: 14px 18px;
  }

  .topbar-brand {
    flex-wrap: wrap;
    gap: 10px;
  }

  .topbar-user span,
  .topbar-divider.optional {
    display: none;
  }

  .app-sidebar {
    border-top: 1px solid var(--line);
    border-right: 0;
    padding: 12px;
    display: block;
  }

  .sidebar-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }

  .sidebar-item {
    width: auto;
    min-width: 118px;
  }

  .sidebar-safety {
    display: none;
  }

  .toast {
    left: 14px;
    right: 14px;
    max-width: none;
  }

  .workflow-stepper {
    display: flex;
    overflow-x: auto;
    gap: 18px;
    padding-bottom: 8px;
    margin-bottom: 24px;
  }

  .workflow-step {
    min-width: 124px;
  }

  .workflow-step::after {
    display: none;
  }

  .screen-title,
  .screen-title.compact {
    display: block;
    padding-right: 0;
  }

  .screen-title .primary-action,
  .screen-title .secondary-action {
    margin-top: 16px;
  }

  .step-index {
    position: static;
    margin-bottom: 14px;
  }

  .analysis-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .app-topbar {
    gap: 10px;
  }

  .topbar-brand strong,
  .topbar-brand span,
  .topbar-brand .event-context {
    font-size: 13px;
  }

  .product-mark {
    width: 28px;
    height: 28px;
  }

  .app-stage {
    padding: 22px 14px 32px;
  }

  .screen-title h1 {
    font-size: 28px;
  }

  .screen-title p {
    font-size: 15px;
  }

  .panel,
  .drop-panel,
  .output-tease {
    padding: 18px;
  }

  .drop-panel {
    min-height: 390px;
  }

  .drop-panel h2 {
    font-size: 24px;
  }

  .selected-files,
  .recipe-grid,
  .summary-metrics,
  .source-signal-grid,
  .delta-grid,
  .package-list,
  .complete-grid,
  #analysis-found {
    grid-template-columns: 1fr;
  }

  .asset-table article,
  .affected-row,
  .source-detail-list article,
  .mapping-row,
  .output-locks article {
    grid-template-columns: 1fr;
  }

  .output-locks b {
    text-align: left;
  }

  .sheet-mini {
    overflow-x: auto;
  }

  .sheet-row {
    min-width: 620px;
  }

  .source-drawer,
  .fix-drawer {
    width: 100%;
    padding: 10px;
  }
}
