:root {
  --ink: #111412;
  --paper: #f5f5ef;
  --white: #ffffff;
  --muted: #68706a;
  --line: #d7dad3;
  --green: #bdfc72;
  --green-dark: #173c2d;
  --blue: #5e7cff;
  --amber: #ffc857;
  --coral: #ff7657;
  --soft-green: #e8f7dc;
  --radius: 8px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Geist, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
}

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

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

button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.page-shell {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.nav {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(1440px, calc(100% - 48px));
  height: 78px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.28);
  color: var(--white);
}

.brand, .nav-links, .nav-action { color: inherit; text-decoration: none; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border: 5px solid var(--green);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #142018;
}

.nav-links { display: flex; gap: 34px; }
.nav-links a { color: inherit; text-decoration: none; opacity: .82; }
.nav-links a:hover { opacity: 1; }

.nav-action {
  justify-self: end;
  padding: 11px 18px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 4px;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: min(760px, 92vh);
  padding: 156px max(28px, calc((100vw - 1440px) / 2)) 92px;
  display: flex;
  align-items: center;
  background: #172119;
  color: var(--white);
  isolation: isolate;
}

.hero-image, .hero-wash {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-image {
  background-image: url("assets/oracle-field.jpg");
  background-size: cover;
  background-position: center 45%;
  filter: grayscale(.35) contrast(1.15) saturate(.85);
  transform: scale(1.02);
}

.hero-wash {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10,18,13,.94) 0%, rgba(10,18,13,.80) 46%, rgba(10,18,13,.18) 78%, rgba(10,18,13,.44) 100%),
    linear-gradient(0deg, rgba(10,18,13,.72) 0%, transparent 48%);
}

.hero-content { width: min(1120px, 100%); }

.eyebrow, .small-label {
  margin: 0 0 18px;
  font-size: .76rem;
  line-height: 1.3;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.eyebrow { color: var(--green); }
.eyebrow.dark { color: var(--green-dark); }

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

h1 {
  max-width: 1120px;
  margin-bottom: 28px;
  font-size: clamp(2.8rem, 5vw, 5.2rem);
  line-height: .98;
  font-weight: 650;
}

.hero-copy {
  max-width: 680px;
  margin-bottom: 34px;
  font-size: clamp(1.05rem, 1.7vw, 1.34rem);
  line-height: 1.55;
  color: rgba(255,255,255,.85);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.button {
  min-height: 48px;
  padding: 13px 19px;
  border: 1px solid transparent;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: var(--white);
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  transition: transform .25s ease, background .25s ease, color .25s ease;
}

.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--green); color: #0a130d; }
.button-secondary { border-color: rgba(255,255,255,.55); color: var(--white); background: rgba(10,15,12,.42); }

.workbench-band, .reasoning-band, .example-band, .teaching-band, .footer-band {
  padding: 128px max(24px, calc((100vw - 1440px) / 2));
}

.section-heading { margin-bottom: 48px; }
.wide-heading { width: min(1080px, 100%); }
.section-heading h2, .worked-copy h2, .footer-band h2 {
  margin-bottom: 22px;
  font-size: clamp(2.15rem, 4vw, 4.3rem);
  line-height: 1.04;
  font-weight: 620;
}
.section-heading > p:last-child { max-width: 760px; color: var(--muted); line-height: 1.65; }

.tool-frame {
  overflow: hidden;
  border: 1px solid #282d29;
  border-radius: var(--radius);
  color: var(--white);
  background: #151916;
  box-shadow: 0 28px 80px rgba(21,27,23,.18);
}

.tool-topline {
  min-height: 52px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid #343a35;
  color: #b9c0ba;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .72rem;
}

.tool-topline > div { display: flex; align-items: center; gap: 8px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(189,252,114,.12); }

.tool-grid { display: grid; grid-template-columns: minmax(0, 1.13fr) minmax(360px, .87fr); }
.input-pane { padding: 32px; background: #f8f8f3; color: var(--ink); }
.result-pane { padding: 32px; background: #151916; }

.pane-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 28px; }
.pane-heading h3, .result-pane h3 { margin-bottom: 0; font-size: 1.5rem; }
.small-label { color: #747b75; }

.scenario-actions { display: flex; gap: 8px; }
.text-button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #cdd1ca;
  border-radius: 4px;
  color: var(--ink);
  background: var(--white);
  font-weight: 700;
  cursor: pointer;
}
.text-button[aria-current="true"] { border-color: var(--green-dark); background: var(--soft-green); }

.source-head, .source-row {
  display: grid;
  grid-template-columns: minmax(86px, 1.2fr) minmax(72px, .9fr) minmax(66px, .75fr) minmax(90px, 1fr);
  gap: 10px;
  align-items: center;
}

.source-head {
  padding: 0 10px 8px;
  color: #777e78;
  font-size: .72rem;
  font-weight: 800;
}

.source-rows { border-top: 1px solid var(--line); }
.source-row { min-height: 54px; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.source-name { font-weight: 750; }
.source-row input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 7px 8px;
  border: 1px solid #c7cbc5;
  border-radius: 3px;
  color: var(--ink);
  background: var(--white);
}

.source-state {
  min-height: 27px;
  padding: 6px 8px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #545b55;
  background: #e7e9e4;
  font-size: .68rem;
  font-weight: 850;
}
.source-state.accepted { color: #17412f; background: #dff4ce; }
.source-state.outlier { color: #702714; background: #ffd8cb; }
.source-state.stale { color: #72520a; background: #ffedbd; }

.policy-grid { margin: 28px 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.policy-grid label { color: #69706a; font-size: .74rem; font-weight: 800; }
.input-unit {
  min-height: 42px;
  margin-top: 7px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #c8ccc6;
  border-radius: 4px;
  color: #69706a;
  background: var(--white);
}
.input-unit input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-weight: 800; }

.prediction { margin: 0 0 16px; padding: 0; border: 0; }
.prediction legend { margin-bottom: 9px; color: #69706a; font-size: .75rem; font-weight: 800; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #c8ccc6; border-radius: 4px; overflow: hidden; }
.segmented button { min-height: 42px; border: 0; color: var(--ink); background: var(--white); font-weight: 850; cursor: pointer; }
.segmented button + button { border-left: 1px solid #c8ccc6; }
.segmented button[aria-pressed="true"] { color: var(--white); background: var(--green-dark); }
.button-compute { width: 100%; color: #101611; background: var(--green); }

.result-header { padding-bottom: 24px; border-bottom: 1px solid #343a35; }
.verdict-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.verdict-row strong { font-size: clamp(2.5rem, 5vw, 5rem); line-height: .9; color: var(--green); }
.verdict-row span { color: var(--white); font-size: 1.3rem; font-weight: 800; }
.result-explanation { min-height: 52px; margin: 22px 0; color: #dde2dd; line-height: 1.55; }

.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #343a35; border: 1px solid #343a35; }
.proof-grid div { min-width: 0; padding: 14px; background: #1c211d; }
.proof-grid span { display: block; margin-bottom: 7px; color: #919a92; font-size: .68rem; }
.proof-grid strong { font-size: .95rem; }
.quorum-proof { margin: 18px 0 12px; color: var(--green); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; font-weight: 800; }

.classification { display: grid; gap: 6px; }
.classification-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 8px 10px; color: #c5cbc6; background: #1d221e; font-size: .72rem; }
.classification-row span:last-child { min-width: 58px; text-align: right; font-weight: 800; }
.classification-row .accepted { color: var(--green); }
.classification-row .outlier { color: #ff9a80; }
.classification-row .stale { color: var(--amber); }

.feedback { margin-top: 18px; padding: 13px; border-left: 3px solid var(--blue); color: #d8dcff; background: #20243a; line-height: 1.45; font-size: .84rem; }
.scenario-proof { margin: 14px 0 8px; color: #c9cec9; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .68rem; font-weight: 800; }
.comparison { color: #9da59e; line-height: 1.45; font-size: .82rem; }
.button-export { width: 100%; margin-top: 8px; color: #101611; background: var(--white); }

.reasoning-band { background: var(--white); }
.accordion { min-height: 360px; display: flex; gap: 8px; }
.accordion-panel {
  min-width: 0;
  padding: 28px;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: var(--radius);
  transition: flex .7s cubic-bezier(.2,.8,.2,1), transform .7s ease;
}
.accordion-panel:hover { flex: 1.7 1 0; transform: translateY(-4px); }
.accordion-panel h3 { max-width: 320px; margin-bottom: 12px; font-size: clamp(1.6rem, 3vw, 2.7rem); }
.accordion-panel p { max-width: 460px; margin-bottom: 0; line-height: 1.55; }
.panel-index { margin-bottom: auto; font-size: 1.2rem; font-weight: 900; }
.freshness { color: #0f1b13; background: var(--green); }
.deviation { color: var(--white); background: var(--blue); }
.quorum { color: #211608; background: var(--amber); }

.example-band { background: #171b18; color: var(--white); }
.media-frame { margin: 0 0 96px; overflow: hidden; }
.media-frame img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; display: block; filter: grayscale(.7) contrast(1.2); transition: transform .7s ease; }
.media-frame:hover img { transform: scale(1.05); }
.media-frame figcaption { max-width: 760px; padding-top: 14px; color: #9ca49d; font-size: .78rem; line-height: 1.5; }
.example-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 80px; align-items: end; }
.worked-copy p:last-child, .counter-copy p { color: #bac1bb; line-height: 1.7; }
.counter-copy { padding: 30px; border-left: 5px solid var(--coral); background: #222724; }
.counter-copy h3 { font-size: 1.7rem; }
.counter-copy .counter-result { margin-bottom: 0; color: var(--coral); font-weight: 900; }

.teaching-band { background: #eef0e9; }
.teaching-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: dense; gap: 12px; }
.teaching-grid article { min-height: 240px; padding: 28px; border-radius: var(--radius); }
.teaching-wide { grid-column: span 7; background: var(--white); }
.teaching-side { grid-column: span 5; color: var(--white); background: var(--green-dark); }
.teaching-third { grid-column: span 4; background: var(--white); }
.teaching-third.transfer { background: #dfe6ff; }
.teaching-third.caveat { background: #ffe2da; }
.teaching-grid h3 { margin-bottom: 14px; font-size: 1.45rem; line-height: 1.2; }
.teaching-grid p { line-height: 1.6; }
.carousel-copy { min-height: 120px; }
.carousel-controls { display: flex; align-items: center; gap: 14px; }
.carousel-controls button {
  width: 42px;
  height: 42px;
  border: 1px solid #bfc4bd;
  border-radius: 50%;
  color: var(--ink);
  background: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}
.carousel-position { min-width: 42px; text-align: center; color: var(--muted); font-size: .78rem; }
.assessment-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 24px 0 18px; }
.assessment-actions button { min-height: 44px; border: 1px solid rgba(255,255,255,.45); border-radius: 4px; color: var(--white); background: transparent; font-weight: 800; cursor: pointer; }
.assessment-actions button:hover { color: var(--green-dark); background: var(--green); }
#assessment-feedback { color: #d7e4da; }

.footer-band { min-height: 520px; display: flex; flex-direction: column; justify-content: space-between; color: var(--white); background: #101310; }
.footer-band > div { max-width: 1120px; }
.footer-band p { margin: 80px 0 0; color: #89918a; font-size: .78rem; }

@media (max-width: 900px) {
  .nav { width: calc(100% - 32px); grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .hero { min-height: 700px; padding-left: 24px; padding-right: 24px; }
  .tool-grid, .example-grid { grid-template-columns: 1fr; }
  .result-pane { min-height: 680px; }
  .policy-grid { grid-template-columns: 1fr 1fr; }
  .example-grid { gap: 46px; }
  .teaching-wide, .teaching-side { grid-column: span 12; }
  .teaching-third { grid-column: span 4; }
}

@media (max-width: 620px) {
  .nav { height: 66px; }
  .brand span:last-child { display: none; }
  .nav-action { padding: 9px 12px; font-size: .78rem; }
  .hero { min-height: 650px; padding-top: 126px; padding-bottom: 68px; }
  h1 { font-size: 3rem; line-height: 1; }
  .hero-copy { font-size: 1rem; }
  .workbench-band, .reasoning-band, .example-band, .teaching-band, .footer-band { padding: 96px 16px; }
  .section-heading h2, .worked-copy h2, .footer-band h2 { font-size: 2.35rem; }
  .input-pane, .result-pane { padding: 20px 16px; }
  .tool-topline { align-items: flex-start; flex-direction: column; }
  .pane-heading { flex-direction: column; }
  .scenario-actions { width: 100%; }
  .scenario-actions button { flex: 1; }
  .source-head, .source-row { grid-template-columns: minmax(66px, 1fr) minmax(58px, .8fr) minmax(54px, .7fr) minmax(76px, .9fr); gap: 6px; }
  .source-row { padding-left: 4px; padding-right: 4px; }
  .source-state { padding: 5px 4px; font-size: .58rem; }
  .policy-grid { grid-template-columns: 1fr 1fr; }
  .proof-grid div { padding: 10px 8px; }
  .proof-grid strong { font-size: .78rem; }
  .classification-row { gap: 6px; }
  .accordion { min-height: auto; flex-direction: column; }
  .accordion-panel { min-height: 260px; }
  .accordion-panel:hover { flex: 1 1 0; }
  .media-frame { margin-bottom: 64px; }
  .media-frame img { aspect-ratio: 4 / 3; }
  .teaching-third { grid-column: span 12; }
  .footer-band { min-height: 460px; }
}

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