:root {
  --ink: #17211d;
  --muted: #66706a;
  --paper: #f5f3ec;
  --panel: #fffefa;
  --line: #d8d9d1;
  --green: #1e624b;
  --green-soft: #dcebe3;
  --amber: #9a5b12;
  --amber-soft: #fae9ca;
  --red: #a64235;
  --red-soft: #f5dfda;
  --blue: #365f76;
  --blue-soft: #dce9ef;
  --coral: #c65b45;
  --shadow: 0 22px 70px rgba(29, 40, 34, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 0%, rgba(73, 121, 91, 0.10), transparent 31rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, select, input { font: inherit; }

button, select { cursor: pointer; }

.page-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 0 38px 42px;
}

.topbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(23, 33, 29, 0.15);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-mark {
  width: 27px;
  height: 27px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 3px;
  transform: rotate(-12deg);
}

.brand-mark span {
  display: block;
  border-radius: 10px 10px 2px 2px;
  background: var(--green);
}

.brand-mark span:nth-child(1) { height: 45%; }
.brand-mark span:nth-child(2) { height: 75%; }
.brand-mark span:nth-child(3) { height: 100%; }

.proof-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.proof-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #52a477;
  box-shadow: 0 0 0 5px rgba(82, 164, 119, 0.14);
}

.hero {
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.55fr);
  gap: 70px;
  align-items: end;
  padding: 80px 5% 70px;
}

.eyebrow, .section-index {
  margin: 0 0 18px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 900px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(50px, 6.3vw, 94px);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.hero h1 em {
  color: var(--green);
  font-weight: 400;
}

.hero-scribble {
  width: min(520px, 76%);
  height: 34px;
  margin: 4px 0 -2px 6px;
  overflow: visible;
}

.hero-scribble path {
  fill: none;
  stroke: var(--coral);
  stroke-linecap: round;
  stroke-width: 1.45;
  opacity: 0.72;
}

.hero-lede {
  max-width: 680px;
  margin: 30px 0 0;
  color: #4f5b55;
  font-size: 18px;
  line-height: 1.7;
}

.hero-note {
  padding: 25px;
  border-left: 2px solid var(--green);
  background: rgba(255,255,255,0.44);
}

.note-kicker, .control-label {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-note p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.workspace {
  padding: 48px;
  border: 1px solid rgba(23, 33, 29, 0.13);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.workspace-header,
.panel-heading,
.action-row,
.audit-card-header,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.workspace h2,
.audit-section h2,
.architecture h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(31px, 4vw, 52px);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.company-context {
  display: grid;
  gap: 7px;
  min-width: 290px;
}

.company-context label,
.select-wrap {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

select {
  width: 100%;
  padding: 12px 38px 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

select:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(54, 95, 118, 0.25);
  outline-offset: 2px;
}

.flow-strip {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin: 42px 0 36px;
  padding: 20px 24px;
  border-radius: 16px;
  background: #f4f5f0;
}

.flow-step {
  display: grid;
  grid-template-columns: 28px auto;
  column-gap: 10px;
  align-items: center;
  color: #8b928e;
}

.flow-step span {
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #cfd2cc;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}

.flow-step strong { font-size: 13px; }
.flow-step small { font-size: 11px; }
.flow-step.is-complete { color: var(--green); }
.flow-step.is-complete span { color: #fff; border-color: var(--green); background: var(--green); }
.flow-step.is-active { color: var(--ink); }
.flow-step.is-active span { border-color: var(--ink); }
.flow-line { height: 1px; background: #d5d7d2; }

.survey-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.survey-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.source-panel { background: #fbfaf6; }

.panel-heading {
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.year-tag {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.panel-heading h3 {
  margin: 5px 0 0;
  font-size: 17px;
}

.status-pill, .mapping-pill {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-submitted, .status-ready, .mapping-auto { color: var(--green); background: var(--green-soft); }
.status-empty { color: var(--muted); background: #ecece8; }
.mapping-review { color: var(--amber); background: var(--amber-soft); }
.mapping-new { color: var(--blue); background: var(--blue-soft); }
.mapping-retired { color: var(--red); background: var(--red-soft); }

.question-list { min-height: 430px; }

.question-item {
  padding: 20px 24px;
  border-bottom: 1px solid #ecece7;
}

.question-item:last-child { border-bottom: 0; }

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.question-id {
  overflow: hidden;
  color: #7c8580;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.question-text {
  min-height: 42px;
  margin: 0;
  color: #38433d;
  font-size: 13px;
  line-height: 1.55;
}

.answer-box {
  margin-top: 13px;
  padding: 11px 13px;
  border: 1px solid #dfe0db;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

input.answer-box {
  width: 100%;
}

.answer-box.is-blank {
  border-style: dashed;
  color: #929995;
  background: #fafaf7;
}

.answer-source {
  display: block;
  margin-top: 7px;
  color: #7b847f;
  font-size: 10px;
}

.retired-row { opacity: 0.72; }

.empty-target {
  display: grid;
  place-items: center;
}

.empty-state {
  max-width: 290px;
  padding: 30px;
  color: #808883;
  text-align: center;
}

.empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border: 1px solid #d8dbd5;
  border-radius: 50%;
  color: var(--green);
  font-size: 22px;
}

.empty-state p { margin: 0; font-size: 13px; line-height: 1.65; }

.mapping-control {
  display: grid;
  grid-template-columns: 1.4fr minmax(270px, 0.6fr);
  gap: 34px;
  align-items: end;
  margin-top: 20px;
  padding: 22px 24px;
  border: 1px solid #ead8b9;
  border-radius: 15px;
  background: #fffaf0;
}

.mapping-control p {
  margin: 8px 0 0;
  color: #665c4b;
  font-size: 13px;
  line-height: 1.6;
}

.select-wrap { display: grid; gap: 8px; }

.action-row {
  gap: 15px;
  margin-top: 28px;
}

.primary-button {
  padding: 14px 20px;
  border: 0;
  border-radius: 10px;
  color: white;
  background: var(--green);
  font-weight: 750;
  box-shadow: 0 8px 20px rgba(30, 98, 75, 0.18);
}

.primary-button:hover { background: #164f3d; }

.text-button {
  padding: 12px 8px;
  border: 0;
  color: var(--muted);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.snapshot-summary {
  margin: 0 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.audit-section {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 70px;
  align-items: start;
  padding: 120px 5%;
}

.audit-copy > p:not(.section-index) {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.7;
}

.model-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 25px;
}

.model-chips span {
  padding: 7px 10px;
  border: 1px solid #ccd1cb;
  border-radius: 999px;
  background: rgba(255,255,255,0.55);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.audit-card {
  overflow: hidden;
  border: 1px solid #29332e;
  border-radius: 18px;
  color: #e6eee9;
  background: #17211d;
  box-shadow: var(--shadow);
}

.audit-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid #344039;
  color: #9fb0a7;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.audit-log {
  min-height: 330px;
  margin: 0;
  padding: 13px 20px 22px;
  list-style: none;
  counter-reset: audit;
}

.audit-log li {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid #2d3933;
  color: #d4ddd8;
  font-size: 12px;
  line-height: 1.55;
}

.audit-log li:last-child { border-bottom: 0; }
.audit-log time { color: #809088; font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; }
.audit-log strong { color: #fff; font-weight: 650; }
.audit-placeholder { display: block !important; color: #7f8e86 !important; padding-top: 38px !important; }

.architecture {
  padding: 70px 5% 110px;
}

.architecture-heading {
  display: grid;
  grid-template-columns: 0.55fr 1.45fr;
  gap: 50px;
  align-items: start;
}

.architecture-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 55px;
  border: 1px solid var(--line);
  background: var(--line);
}

.architecture-grid article {
  min-height: 270px;
  padding: 28px;
  background: var(--paper);
}

.architecture-number {
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-style: italic;
}

.architecture-grid h3 { margin: 50px 0 12px; font-size: 17px; }
.architecture-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

footer {
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid rgba(23, 33, 29, 0.15);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 60px; }
  .hero-note { max-width: 600px; }
  .workspace { padding: 30px; }
  .survey-grid, .audit-section { grid-template-columns: 1fr; }
  .audit-section { gap: 45px; }
  .architecture-heading { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 720px) {
  .page-shell { padding: 0 15px 25px; }
  .topbar { min-height: 68px; }
  .proof-label { display: none; }
  .hero { gap: 35px; padding: 50px 8px; }
  .hero h1 { font-size: clamp(43px, 14vw, 64px); }
  .hero-lede { font-size: 16px; }
  .workspace { padding: 22px 16px; border-radius: 20px; }
  .workspace-header { align-items: start; flex-direction: column; gap: 24px; }
  .company-context { width: 100%; min-width: 0; }
  .flow-strip { grid-template-columns: 1fr; gap: 10px; }
  .flow-line { width: 1px; height: 18px; margin-left: 14px; }
  .mapping-control { grid-template-columns: 1fr; gap: 22px; }
  .action-row { align-items: flex-start; flex-wrap: wrap; }
  .snapshot-summary { width: 100%; margin: 0; }
  .audit-section { padding: 80px 8px; }
  .architecture { padding: 50px 8px 80px; }
  .architecture-grid { grid-template-columns: 1fr; }
  .architecture-grid article { min-height: 220px; }
  footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
