:root {
  color-scheme: light;
  --ink: #18212b;
  --muted: #5d6975;
  --line: #d7dee5;
  --surface: #ffffff;
  --canvas: #f3f6f8;
  --navy: #17324d;
  --blue: #1667c1;
  --blue-dark: #0d4f99;
  --green: #13744a;
  --green-soft: #e7f4ed;
  --amber: #9a5d00;
  --amber-soft: #fff3d6;
  --red: #aa2e2e;
  --red-soft: #fdeaea;
  --shadow: 0 10px 28px rgba(20, 38, 56, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  color: var(--ink);
  letter-spacing: 0;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

.concept-bar {
  padding: 8px 20px;
  border-bottom: 1px solid #6f4c00;
  background: var(--amber-soft);
  color: #5e3e00;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.site-header__inner,
.intro-band__inner,
.workspace,
.evidence-grid,
.scope-band__inner,
footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header__inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand span {
  display: grid;
  gap: 2px;
}

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

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.header-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.intro-band {
  padding: 48px 0 34px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.intro-band__inner {
  display: grid;
  gap: 15px;
}

.eyebrow,
.section-label {
  margin: 0;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  max-width: 800px;
  margin-bottom: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: 0;
}

.intro-copy {
  max-width: 780px;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.flow-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  background: var(--canvas);
}

.flow-strip span {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  color: #344454;
  font-size: 13px;
  font-weight: 700;
}

.flow-strip span:last-child {
  border-right: 0;
}

.workspace-band {
  padding: 32px 0;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 22px;
  align-items: start;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.input-panel,
.output-panel {
  padding: 22px;
}

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

.panel-heading > div,
.section-heading > div {
  display: grid;
  gap: 5px;
}

.source-badge,
.decision-badge {
  min-width: 78px;
  padding: 6px 9px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.source-badge {
  background: #e7eef5;
  color: var(--navy);
}

.decision-badge.tracking {
  background: var(--amber-soft);
  color: var(--amber);
}

.decision-badge.ready {
  background: var(--green-soft);
  color: var(--green);
}

.decision-badge.exception {
  background: var(--red-soft);
  color: var(--red);
}

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

label {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: #3e4c59;
  font-size: 12px;
  font-weight: 800;
}

.field-wide {
  grid-column: 1 / -1;
}

input,
select {
  width: 100%;
  min-height: 43px;
  padding: 9px 11px;
  border: 1px solid #b9c4ce;
  border-radius: 5px;
  outline: none;
  background: #fff;
  color: var(--ink);
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(22, 103, 193, 0.14);
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.button,
.text-button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.button {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 5px;
}

.button.primary {
  background: var(--blue);
  color: #fff;
}

.button.primary:hover {
  background: var(--blue-dark);
}

.button.secondary {
  border: 1px solid #b9c4ce;
  background: #fff;
  color: #344454;
}

.text-button {
  padding: 4px 0;
  background: transparent;
  color: var(--blue-dark);
  font-size: 12px;
}

.decision-summary {
  min-height: 94px;
  padding: 16px 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.decision-summary p {
  margin-bottom: 6px;
  font-size: 20px;
  font-weight: 850;
}

.decision-summary span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.mapping-list {
  margin: 0;
}

.mapping-list > div {
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.mapping-list > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.mapping-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mapping-list dd {
  min-width: 0;
  margin: 0;
  display: grid;
  gap: 5px;
}

.mapping-list dd strong,
.mapping-list dd span {
  overflow-wrap: anywhere;
}

.mapping-list dd strong {
  font-size: 14px;
}

.mapping-list dd span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.evidence-band {
  padding: 30px 0 38px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.evidence-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 28px;
}

.evidence-section {
  min-width: 0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 12px;
}

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

th {
  background: var(--canvas);
  color: #3e4c59;
  font-size: 11px;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.check {
  color: var(--green);
  font-weight: 850;
}

.check.missing {
  color: var(--red);
}

.event-log {
  min-height: 232px;
  max-height: 310px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  list-style: none;
}

.event-log li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: #344454;
  font-size: 12px;
  line-height: 1.45;
}

.event-log time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.event-log strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
}

.scope-band {
  padding: 34px 0;
  border-top: 1px solid #163049;
  background: var(--navy);
  color: #fff;
}

.scope-band__inner {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 42px;
  align-items: center;
}

.scope-band .section-label {
  color: #8bc8ff;
}

.scope-band p:last-child {
  margin: 0;
  color: #d8e4ee;
  line-height: 1.65;
}

footer {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 880px) {
  .workspace,
  .evidence-grid,
  .scope-band__inner {
    grid-template-columns: 1fr;
  }

  .flow-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .flow-strip span:nth-child(2) {
    border-right: 0;
  }

  .flow-strip span:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  .site-header__inner,
  .intro-band__inner,
  .workspace,
  .evidence-grid,
  .scope-band__inner,
  footer {
    width: min(100% - 24px, 1180px);
  }

  .concept-bar {
    padding-inline: 12px;
  }

  .site-header__inner {
    min-height: 60px;
  }

  .brand small,
  .header-status {
    display: none;
  }

  .intro-band {
    padding: 34px 0 24px;
  }

  h1 {
    font-size: 38px;
  }

  .intro-copy {
    font-size: 15px;
  }

  .flow-strip {
    grid-template-columns: 1fr;
  }

  .flow-strip span,
  .flow-strip span:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .flow-strip span:last-child {
    border-bottom: 0;
  }

  .workspace-band {
    padding: 20px 0;
  }

  .input-panel,
  .output-panel {
    padding: 17px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }

  .form-actions {
    display: grid;
  }

  .mapping-list > div {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .event-log li {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  footer {
    padding: 18px 0;
    align-items: flex-start;
    flex-direction: column;
  }
}
