:root {
  color-scheme: light;
  --ink: #172321;
  --muted: #56615e;
  --paper: #f6f2e9;
  --paper-deep: #ebe4d7;
  --surface: #fffdf8;
  --surface-soft: #f1ede4;
  --forest: #123b37;
  --forest-2: #1f5b52;
  --mint: #bfe4d7;
  --mint-soft: #e4f2ed;
  --coral: #ad4c31;
  --coral-soft: #fbe5db;
  --amber: #c98a2e;
  --amber-soft: #f7ead1;
  --red: #b84b3e;
  --red-soft: #f8dfda;
  --line: #d8d2c7;
  --line-strong: #bcb5a8;
  --shadow: 0 24px 70px rgba(35, 49, 45, 0.11);
  --shadow-small: 0 10px 30px rgba(35, 49, 45, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 15px;
  --radius-sm: 10px;
  --page: min(1440px, calc(100vw - 48px));
  --display: Georgia, "Times New Roman", serif;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  background: var(--paper);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 1%, rgba(232, 121, 79, 0.09), transparent 24rem),
    radial-gradient(circle at 88% 8%, rgba(31, 91, 82, 0.10), transparent 32rem),
    var(--paper);
}

button,
select,
input {
  font: inherit;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--surface);
}

.focus-target:focus {
  outline: 3px solid var(--coral);
  outline-offset: 5px;
  box-shadow: 0 0 0 8px var(--surface);
}

button {
  color: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  min-height: 76px;
  padding: 12px max(24px, calc((100vw - 1440px) / 2));
  border-bottom: 1px solid rgba(188, 181, 168, 0.72);
  background: rgba(246, 242, 233, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--paper);
  background: var(--forest);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 700;
}

.brand > span:last-child {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 5px;
}

.brand strong {
  letter-spacing: -0.04em;
  font-size: 21px;
}

.brand small {
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 30px;
}

.nav a {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: #46514f;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.nav a[aria-disabled="true"] {
  opacity: 0.42;
  pointer-events: none;
}

.nav a[aria-disabled="true"]::after {
  display: none;
}

.nav a::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  background: var(--coral);
  transition: transform 160ms ease;
}

.nav a:hover::after {
  transform: scaleX(1);
}

.top-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 12px;
}

.mode-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mode-picker select {
  width: 230px;
  min-height: 44px;
  max-width: 230px;
  padding: 9px 32px 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface);
  font-size: 12px;
  font-weight: 750;
}

.no-send {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  border: 1px solid #a9cec1;
  border-radius: 999px;
  color: var(--forest-2);
  background: var(--mint-soft);
  font-size: 12px;
  font-weight: 800;
}

.no-send i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--forest-2);
  box-shadow: 0 0 0 4px rgba(31, 91, 82, 0.11);
}

main {
  width: var(--page);
  margin: 0 auto;
}

.truth-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 46px;
  margin: 18px 0 0;
  padding: 9px 16px;
  border: 1px solid #e1c89a;
  border-radius: 13px;
  color: #60491e;
  background: var(--amber-soft);
  font-size: 13px;
}

.truth-strip strong {
  flex: 0 0 auto;
}

.truth-strip span {
  color: #79643a;
}

.text-button {
  min-height: 44px;
  margin-left: auto;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: #60491e;
  background: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.app-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #d7b06b;
  border-radius: 13px;
  color: #553d17;
  background: #fbf1df;
}

.app-status.is-error {
  border-color: #d7a090;
  color: #6f2d22;
  background: var(--red-soft);
}

.app-status > div:first-child {
  min-width: 0;
}

.app-status strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}

.app-status p {
  margin: 0;
  color: currentColor;
  font-size: 12px;
  line-height: 1.45;
}

.app-status-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.status-action {
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid var(--forest);
  border-radius: 10px;
  color: white;
  background: var(--forest);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.status-action-secondary {
  color: var(--forest);
  background: var(--surface);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
  align-items: center;
  gap: clamp(44px, 8vw, 130px);
  min-height: 565px;
  padding: 70px 4vw 74px;
}

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

.eyebrow {
  margin: 0 0 13px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 900px;
  margin-bottom: 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 5.3vw, 82px);
  font-weight: 500;
  letter-spacing: -0.052em;
  line-height: 0.99;
}

.hero-lede {
  max-width: 680px;
  margin-bottom: 34px;
  color: #51605d;
  font-size: clamp(18px, 1.45vw, 22px);
  line-height: 1.58;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.primary-button,
.secondary-button,
.approve-button {
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 820;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.primary-button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  gap: 18px;
  padding: 12px 14px 12px 20px;
  color: white;
  background: var(--forest);
  box-shadow: 0 12px 28px rgba(18, 59, 55, 0.22);
}

.primary-button:hover,
.approve-button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(18, 59, 55, 0.28);
}

.primary-button[aria-busy="true"] {
  cursor: wait;
  opacity: 0.72;
}

.primary-button kbd {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 9px;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
  font-family: inherit;
}

.action-note {
  max-width: 180px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.charter-card {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  padding: 28px;
  border: 1px solid rgba(18, 59, 55, 0.18);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.10), transparent 60%),
    var(--forest);
  box-shadow: var(--shadow);
  color: white;
}

.charter-card::before {
  position: absolute;
  top: -80px;
  right: -60px;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(191, 228, 215, 0.14);
  border-radius: 50%;
  box-shadow:
    0 0 0 32px rgba(191, 228, 215, 0.055),
    0 0 0 64px rgba(191, 228, 215, 0.035);
  content: "";
}

.card-kicker {
  position: relative;
  margin-bottom: 52px;
  color: #a8cec1;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.charter-title-row {
  position: relative;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 32px;
}

.charter-title-row h2 {
  margin-bottom: 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.charter-title-row p {
  margin: 0;
  color: #b8cdc7;
  font-size: 14px;
}

.status-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.charter-card .status-pill {
  border-color: rgba(255, 255, 255, 0.18);
}

.status-unprocessed {
  color: #e7ddd0;
  background: rgba(255, 255, 255, 0.08);
}

.status-blocked {
  border-color: #e6ac99 !important;
  color: #873629 !important;
  background: var(--coral-soft) !important;
}

.status-ready {
  border-color: #9bcbbb !important;
  color: #174e46 !important;
  background: var(--mint-soft) !important;
}

.status-approved {
  border-color: #8cc3b1 !important;
  color: white !important;
  background: var(--forest-2) !important;
}

.charter-facts {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 26px;
  padding: 17px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.charter-facts div {
  padding: 0 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.charter-facts div:first-child {
  padding-left: 0;
}

.charter-facts div:last-child {
  border: 0;
}

.charter-facts dt {
  margin-bottom: 6px;
  color: #9fb8b1;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.charter-facts dd {
  margin: 0;
  font-size: 21px;
  font-weight: 760;
}

.mini-risk {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
}

.risk-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(244, 166, 120, 0.4);
  border-radius: 11px;
  color: #ffc39f;
  background: rgba(232, 121, 79, 0.14);
  font-weight: 900;
}

.mini-risk p {
  margin: 0;
  color: #b8cbc6;
  font-size: 12px;
  line-height: 1.45;
}

.mini-risk strong {
  color: white;
}

.history-section,
.result-section {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 34px;
  margin-bottom: 30px;
}

.section-heading h2 {
  max-width: 780px;
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 3.2vw, 52px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.06;
}

.section-heading > p {
  max-width: 480px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.history-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.history-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.72);
  box-shadow: var(--shadow-small);
}

.history-card::after {
  position: absolute;
  right: -34px;
  bottom: -34px;
  width: 100px;
  height: 100px;
  border: 1px solid var(--line);
  border-radius: 50%;
  content: "";
}

.history-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 38px;
}

.run-code {
  color: var(--forest-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 850;
}

.synthetic-tag {
  padding: 5px 7px;
  border-radius: 7px;
  color: #785d2b;
  background: var(--amber-soft);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.history-card h3 {
  max-width: 270px;
  margin-bottom: 8px;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.history-card p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
}

.history-meta {
  display: flex;
  gap: 8px;
  color: #6e7774;
  font-size: 11px;
  font-weight: 720;
}

.history-meta span {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.empty-workspace {
  display: grid;
  min-height: 420px;
  place-items: center;
  padding: 70px 20px 105px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.empty-workspace > * {
  max-width: 650px;
}

.empty-workspace h2 {
  margin-bottom: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.empty-workspace p {
  margin-bottom: 20px;
  color: var(--muted);
  line-height: 1.65;
}

.empty-workspace .secondary-button {
  min-height: 46px;
}

.empty-graphic {
  position: relative;
  display: flex;
  align-items: center;
  width: min(510px, 90vw);
  margin: 0 auto 36px;
}

.empty-graphic span {
  display: grid;
  width: 76px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--forest-2);
  background: var(--surface);
  box-shadow: var(--shadow-small);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
}

.empty-graphic i {
  height: 1px;
  flex: 1;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 4px, transparent 4px 8px);
}

.empty-graphic b {
  position: absolute;
  right: -12px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--coral);
  box-shadow: 0 7px 18px rgba(232, 121, 79, 0.25);
}

.workspace {
  animation: reveal 420ms ease both;
}

.journey-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin-top: 28px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
}

.journey-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.journey-steps li {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.journey-steps li > span {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 850;
}

.journey-steps strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-steps .is-complete {
  color: var(--forest-2);
}

.journey-steps .is-complete > span {
  border-color: var(--forest-2);
  color: white;
  background: var(--forest-2);
}

.journey-steps .is-current {
  color: var(--ink);
}

.journey-steps .is-current > span {
  border: 2px solid var(--coral);
  color: var(--coral);
  background: var(--surface);
}

.journey-next {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.journey-next p {
  max-width: 390px;
  margin: 0;
}

.journey-next strong,
.journey-next span {
  display: block;
}

.journey-next strong {
  margin-bottom: 3px;
  font-size: 12px;
}

.journey-next span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.journey-button {
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid var(--forest);
  border-radius: 10px;
  color: white;
  background: var(--forest);
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.journey-button:hover:not(:disabled) {
  background: var(--forest-2);
}

.journey-button:disabled {
  border-color: var(--line);
  color: var(--muted);
  background: var(--surface-soft);
  cursor: not-allowed;
}

.result-section,
#journey-command,
#questions-heading,
#timeline-heading,
#proof-heading,
#questions-complete,
#approval-note,
#app-status {
  scroll-margin-top: 92px;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-heading {
  align-items: center;
}

.origin-badge {
  display: inline-flex;
  max-width: 330px;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid #e0c68f;
  border-radius: 12px;
  color: #6f5729;
  background: var(--amber-soft);
  font-size: 11px;
  font-weight: 780;
  line-height: 1.35;
}

.origin-badge::before {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--amber);
  content: "";
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.metric {
  min-height: 102px;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border: 0;
}

.metric strong {
  display: block;
  margin-bottom: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.metric span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metric.metric-alert strong {
  color: var(--coral);
}

.protocol-layout {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 18px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h3 {
  margin-bottom: 5px;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.panel-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.legend {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.legend i {
  width: 12px;
  height: 8px;
  border-radius: 3px;
  background: var(--mint);
}

.matrix-header,
.matrix-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.75fr) repeat(3, minmax(78px, 0.65fr)) minmax(90px, 0.75fr);
  align-items: center;
  gap: 8px;
}

.matrix-header {
  min-height: 39px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: #56615e;
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.matrix-row {
  min-height: 73px;
  width: 100%;
  padding: 9px 16px;
  border-top: 0;
  border-right: 0;
  border-bottom: 1px solid #e8e3da;
  border-left: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 140ms ease;
}

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

.matrix-row:hover {
  background: #f8f5ee;
}

.matrix-row.is-blocked {
  box-shadow: inset 3px 0 0 var(--coral);
}

.step-cell {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.day-chip {
  display: inline-grid;
  min-height: 34px;
  place-items: center;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--forest-2);
  background: var(--surface-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 850;
}

.step-cell strong {
  display: block;
  overflow: hidden;
  margin-bottom: 3px;
  text-overflow: ellipsis;
  font-size: 12px;
  white-space: nowrap;
}

.step-cell small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-chip {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 5px;
  padding: 6px 7px;
  border: 1px solid #abd2c4;
  border-radius: 8px;
  color: #1d5a50;
  background: var(--mint-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 850;
}

.source-run-code {
  color: var(--forest-2);
  font-weight: 900;
}

.source-message-code {
  color: #385f58;
}

.source-chip::before {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--forest-2);
  content: "";
}

.source-chip.is-missing {
  border-color: var(--line-strong);
  color: var(--muted);
  background: var(--surface-soft);
}

.source-chip.is-missing::before {
  background: var(--line-strong);
}

.matrix-state {
  justify-self: start;
}

.matrix-state.status-pill {
  min-height: 28px;
  font-size: 11px;
}

.questions-panel {
  position: static;
  grid-column: 1;
  grid-row: 1;
  overflow: hidden;
}

.matrix-panel {
  grid-column: 1;
  grid-row: 2;
}

.count-badge {
  display: grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  color: white;
  background: var(--coral);
  font-size: 11px;
  font-weight: 850;
}

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

.question-card {
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}

.question-card:last-child {
  border-right: 0;
}

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

.question-rank span:first-child {
  color: var(--coral);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.unlock-chip {
  padding: 5px 7px;
  border-radius: 7px;
  color: var(--forest-2);
  background: var(--mint-soft);
  font-size: 11px;
  font-weight: 800;
}

.question-card h4 {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.42;
}

.question-card p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.answer-preview {
  display: grid;
  gap: 5px;
  margin-bottom: 11px;
}

.answer-preview span {
  display: flex;
  gap: 6px;
  color: #43504d;
  font-size: 11px;
  line-height: 1.4;
}

.answer-preview b {
  color: var(--ink);
  font-weight: 800;
}

.resolve-button {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--forest);
  border-radius: 10px;
  color: var(--forest);
  background: white;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  transition: color 140ms ease, background 140ms ease;
}

.resolve-button:hover {
  color: white;
  background: var(--forest);
}

.questions-complete {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 25px 20px;
  color: var(--forest-2);
  background: var(--mint-soft);
}

.questions-complete > span {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--forest-2);
  font-weight: 900;
}

.questions-complete strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
}

.questions-complete p {
  margin: 0;
  color: #467269;
  font-size: 11px;
  line-height: 1.4;
}

.questions-complete .journey-button {
  margin-left: auto;
}

.timeline-list {
  position: relative;
  display: grid;
  gap: 9px;
}

.timeline-list::before {
  position: absolute;
  top: 30px;
  bottom: 30px;
  left: 118px;
  width: 1px;
  background: var(--line-strong);
  content: "";
}

.timeline-card {
  position: relative;
  display: grid;
  grid-template-columns: 96px 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  width: 100%;
  padding: 12px 16px 12px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(35, 49, 45, 0.045);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.timeline-card:hover {
  transform: translateX(3px);
  box-shadow: var(--shadow-small);
}

.timeline-date {
  color: var(--muted);
  text-align: right;
}

.timeline-date strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 12px;
}

.timeline-date span {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.timeline-node {
  position: relative;
  z-index: 2;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 4px solid var(--surface);
  border-radius: 50%;
  background: var(--forest-2);
  box-shadow: 0 0 0 1px var(--forest-2);
}

.timeline-card.is-blocked .timeline-node {
  background: var(--coral);
  box-shadow: 0 0 0 1px var(--coral);
}

.timeline-copy {
  min-width: 0;
}

.timeline-title {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.timeline-draft {
  display: -webkit-box;
  color: var(--muted);
  overflow: hidden;
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 7px;
}

.channel-chip {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.inspect-cue {
  color: var(--forest-2);
  font-size: 11px;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.section-action {
  display: grid;
  max-width: 480px;
  justify-items: end;
  gap: 10px;
}

.section-action p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: right;
}

.proof-section {
  padding-bottom: 100px;
}

.model-proof-card {
  margin-bottom: 18px;
  padding: 22px;
  background:
    radial-gradient(circle at 92% 8%, rgba(197, 222, 210, 0.52), transparent 26%),
    var(--surface);
}

.model-proof-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.model-proof-heading .eyebrow {
  margin-bottom: 5px;
}

.model-proof-heading h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
}

.model-proof-facts {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
}

.model-proof-facts > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 13px;
  background: var(--surface-soft);
}

.model-proof-facts span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.model-proof-facts strong {
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-proof-note {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.proof-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.preflight-card,
.benchmark-card {
  overflow: hidden;
}

.preflight-list,
.benchmark-list {
  display: grid;
  padding: 8px 20px 2px;
}

.check-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border-bottom: 1px solid #e9e4dc;
}

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

.check-icon {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 7px;
  color: white;
  background: var(--forest-2);
  font-size: 10px;
  font-weight: 900;
}

.check-row.is-fail .check-icon {
  background: var(--coral);
}

.check-row strong {
  font-size: 12px;
}

.check-row span:last-child {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.human-gate {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  margin: 10px 20px 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.human-gate > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.human-gate strong {
  font-size: 12px;
}

.human-gate p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.approve-button {
  width: calc(100% - 40px);
  min-height: 46px;
  margin: 14px 20px 9px;
  color: white;
  background: var(--forest);
}

.approve-button:disabled {
  cursor: not-allowed;
  color: #8f9693;
  background: #e1ddd4;
}

.approval-note,
.benchmark-caveat {
  margin: 0 20px 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.benchmark-caveat {
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

footer {
  display: flex;
  justify-content: space-between;
  width: var(--page);
  margin: 0 auto;
  padding: 28px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

footer p {
  margin: 0;
}

.inspector,
.truth-dialog {
  width: min(680px, calc(100vw - 30px));
  max-height: min(820px, calc(100vh - 36px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 30px 120px rgba(17, 37, 34, 0.32);
}

.inspector::backdrop,
.truth-dialog::backdrop {
  background: rgba(15, 32, 29, 0.56);
  backdrop-filter: blur(4px);
}

.inspector-shell,
.truth-dialog form {
  position: relative;
  margin: 0;
  padding: 30px;
}

.close-button {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface-soft);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.inspector-title {
  padding-right: 42px;
}

.inspector-title h2,
.truth-dialog h2 {
  margin-bottom: 9px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.inspector-title p,
.truth-dialog p {
  color: var(--muted);
  line-height: 1.6;
}

.inspector-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.inspector-section h3 {
  margin-bottom: 11px;
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.draft-box {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.inspector-facts,
.inspector-sources {
  display: grid;
  gap: 8px;
}

.fact-row,
.inspector-source {
  display: grid;
  grid-template-columns: minmax(140px, 0.35fr) 1fr;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
}

.fact-row code,
.inspector-source code {
  color: var(--forest-2);
  font-weight: 800;
}

.fact-row span.is-missing {
  color: var(--red);
  font-weight: 800;
}

.inspector-source span {
  color: var(--muted);
  line-height: 1.45;
}

.secondary-button {
  min-height: 42px;
  padding: 9px 16px;
  color: white;
  background: var(--forest);
}

.truth-dialog form > p:not(.eyebrow) {
  margin-bottom: 22px;
}

.toast {
  position: fixed;
  z-index: 40;
  right: 24px;
  bottom: 24px;
  max-width: min(430px, calc(100vw - 48px));
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 13px;
  color: white;
  background: var(--forest);
  box-shadow: 0 18px 48px rgba(17, 37, 34, 0.28);
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  background: var(--red);
}

@media (max-width: 1180px) {
  :root {
    --page: min(1120px, calc(100vw - 34px));
  }

  .topbar {
    padding-right: 17px;
    padding-left: 17px;
  }

  .nav {
    display: none;
  }

  .topbar {
    grid-template-columns: 1fr auto;
  }

  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 44px;
    padding-right: 1vw;
    padding-left: 1vw;
  }

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

  .questions-panel {
    position: static;
    grid-column: 1;
    grid-row: 1;
  }

  .matrix-panel {
    grid-column: 1;
    grid-row: 2;
  }

  .question-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .question-card {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }
}

@media (max-width: 860px) {
  .mode-picker > span {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 62px 0;
  }

  .charter-card {
    max-width: 560px;
  }

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

  .section-action {
    max-width: none;
    align-items: start;
    justify-items: start;
  }

  .section-action p {
    text-align: left;
  }

  .journey-command {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .journey-next {
    justify-content: space-between;
    padding-top: 12px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .history-cards,
  .proof-grid {
    grid-template-columns: 1fr;
  }

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

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

  .metric {
    border-bottom: 1px solid var(--line);
  }

  .metric:nth-child(2n) {
    border-right: 0;
  }

  .metric:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }

  .matrix-panel {
    overflow: hidden;
  }

  .matrix-header {
    display: none;
  }

  .matrix-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
    padding: 14px;
  }

  .step-cell {
    grid-column: 1 / -1;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }

  .step-cell strong,
  .step-cell small {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .source-chip {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .matrix-state {
    grid-column: 1 / -1;
  }

  .timeline-list::before {
    left: 84px;
  }

  .timeline-card {
    grid-template-columns: 62px 20px minmax(0, 1fr);
  }

  .timeline-meta {
    grid-column: 3;
  }

  .question-list {
    grid-template-columns: 1fr;
  }

  .question-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  :root {
    --page: calc(100vw - 24px);
  }

  .topbar {
    min-height: 66px;
    padding: 9px 12px;
  }

  .top-actions {
    align-items: flex-end;
    flex-direction: column;
    gap: 4px;
  }

  .no-send {
    min-height: 24px;
    padding: 4px 8px;
    font-size: 11px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand small {
    display: none;
  }

  .mode-picker select {
    width: min(210px, calc(100vw - 112px));
  }

  .app-status {
    align-items: stretch;
    flex-direction: column;
  }

  .app-status-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .truth-strip {
    align-items: start;
    flex-wrap: wrap;
    gap: 5px 9px;
  }

  .truth-strip span {
    width: calc(100% - 120px);
  }

  .journey-command {
    margin-top: 18px;
    padding: 12px;
  }

  .journey-steps {
    gap: 5px;
  }

  .journey-steps li {
    align-items: start;
    flex-direction: column;
    gap: 5px;
  }

  .journey-steps strong {
    overflow: visible;
    font-size: 11px;
    line-height: 1.25;
    text-overflow: clip;
    white-space: normal;
  }

  .journey-next {
    align-items: stretch;
    flex-direction: column;
  }

  .journey-button {
    width: 100%;
  }

  .text-button {
    margin-left: 0;
  }

  .hero {
    padding: 46px 0 60px;
  }

  h1 {
    font-size: 47px;
  }

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

  .primary-button {
    width: 100%;
    justify-content: space-between;
  }

  .charter-card {
    min-height: 340px;
    padding: 23px;
  }

  .card-kicker {
    margin-bottom: 38px;
  }

  .charter-title-row {
    align-items: start;
    flex-direction: column;
  }

  .history-section,
  .result-section {
    padding: 54px 0;
  }

  .empty-graphic {
    transform: scale(0.84);
  }

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

  .metric {
    min-height: 90px;
    padding: 17px;
  }

  .timeline-list::before {
    display: none;
  }

  .timeline-card {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
  }

  .timeline-node {
    display: none;
  }

  .timeline-meta {
    grid-column: 2;
    flex-wrap: wrap;
  }

  .questions-complete {
    align-items: start;
    flex-wrap: wrap;
  }

  .questions-complete .journey-button {
    margin-left: 48px;
    width: calc(100% - 48px);
  }

  .inspector-shell,
  .truth-dialog form {
    padding: 24px 18px;
  }

  .fact-row,
  .inspector-source {
    grid-template-columns: 1fr;
  }

  footer {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 360px) {
  .brand > span:last-child {
    display: none;
  }

  .mode-picker select {
    width: min(214px, calc(100vw - 86px));
  }
}

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