:root {
  --ink: #101214;
  --paper: #f6f7f2;
  --white: #fff;
  --cyan: #27d7d2;
  --yellow: #f2d742;
  --coral: #ff705d;
  --muted: #687077;
  --line: #cdd2cf;
  --dark: #171b1d;
  --radius: 6px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Geist, Arial, sans-serif; letter-spacing: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 20; background: #fff; color: #000; padding: 10px; }
.skip:focus { top: 12px; }
main { overflow-x: hidden; width: 100%; max-width: 100%; }
nav { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 5vw, 72px); border-bottom: 1px solid var(--line); }
nav > div, .brand { display: flex; align-items: center; gap: 12px; }
.brand { color: inherit; text-decoration: none; font-weight: 700; }
.brand > span { width: 16px; height: 16px; background: var(--cyan); box-shadow: 8px 8px 0 var(--coral); }
.local { font-size: 13px; color: var(--muted); }
button { border: 1px solid var(--ink); border-radius: var(--radius); background: #fff; color: #111; padding: 10px 14px; font-weight: 600; }
.icon { width: 40px; height: 40px; padding: 0; font-size: 20px; }
.quiet { background: transparent; }
.primary { background: var(--ink); color: #fff; }
.secondary { background: #fff; color: #111; }
.danger { background: var(--coral); color: #111; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.hero { min-height: 500px; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .45fr); gap: 60px; align-items: end; padding: 90px clamp(20px, 5vw, 72px) 70px; background: var(--dark); color: #fff; }
.hero-copy h1 { font-size: clamp(2.6rem, 5vw, 5.2rem); line-height: .98; max-width: 980px; margin: 12px 0 24px; }
.hero-copy h1 em { font-style: normal; color: var(--cyan); }
.hero-copy > p:last-child { max-width: 690px; font-size: 19px; line-height: 1.5; color: #c9d0d0; }
.kicker, .eyebrow { text-transform: uppercase; font-weight: 700; font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.kicker { color: var(--yellow); }
.headline-result { border-top: 4px solid var(--yellow); padding-top: 20px; }
.headline-result span { font-size: 13px; color: #aeb9b8; }
.headline-result strong { display: block; font-size: clamp(1.6rem, 2.5vw, 2.6rem); line-height: 1.05; margin: 12px 0; }
.headline-result p { color: #c9d0d0; line-height: 1.5; }
.lab { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: dense; gap: 18px; padding: 72px clamp(20px, 5vw, 72px); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.controls { grid-column: span 5; }
.visual { grid-column: span 7; background: #eef5f2; }
.comparison { grid-column: span 12; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.panel-head h2, .panel-head h3 { margin: 4px 0 0; }
.panel label { display: grid; gap: 8px; font-size: 14px; font-weight: 600; margin: 16px 0; }
.panel label > span:first-child { display: flex; justify-content: space-between; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
select, input[type=text], input:not([type]) { width: 100%; border: 1px solid var(--line); border-radius: 4px; background: #fff; padding: 12px; color: #111; }
input[type=range] { accent-color: var(--ink); width: 100%; }
fieldset { border: 0; padding: 0; margin: 20px 0; }
legend { font-size: 14px; font-weight: 600; margin-bottom: 9px; }
.segments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: #e9ece9; padding: 4px; border-radius: 6px; }
.segments label { margin: 0; display: block; }
.segments input { position: absolute; opacity: 0; }
.segments span { display: block; text-align: center; padding: 10px 4px; border-radius: 4px; font-size: 12px; }
.segments input:checked + span { background: var(--ink); color: #fff; }
.assumption { padding: 14px; background: #f2f2ed; border-left: 3px solid var(--yellow); font-size: 13px; line-height: 1.5; }
.confidence { font-size: 12px; font-weight: 700; background: var(--cyan); padding: 7px 10px; border-radius: 4px; }
.scale-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; min-height: 250px; align-items: end; margin: 35px 0 20px; }
.scale-node { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; height: var(--h); background: #d8dedb; border-top: 6px solid #89918e; padding: 10px 7px; transition: .3s ease; }
.scale-node.changed { background: var(--cyan); border-color: var(--ink); }
.scale-node.uncertain { background: var(--yellow); border-color: var(--coral); }
.scale-node b { font-size: 12px; overflow-wrap: anywhere; }
.scale-node small { margin-top: 6px; font-size: 10px; color: #3e4545; }
.scale-node.changed:after { content: ""; position: absolute; left: 50%; top: -20px; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 7px rgba(255,112,93,.18); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; background: #89918e; margin-right: 5px; }
.legend i.changed { background: var(--cyan); }
.legend i.uncertain { background: var(--yellow); }
.result-change { margin-top: 25px; border-top: 1px solid var(--line); padding-top: 20px; }
.result-change span { font-size: 12px; color: var(--muted); }
.result-change strong { display: block; font-size: 24px; margin: 5px 0; }
.result-change p { line-height: 1.45; }
.model-rows { display: grid; gap: 12px; }
.model-row { display: grid; grid-template-columns: 160px 1fr 80px; gap: 16px; align-items: center; }
.model-row > span { font-weight: 700; }
.rail { height: 22px; background: #e7eae7; position: relative; overflow: hidden; }
.rail b { display: block; height: 100%; width: var(--reach); background: var(--cyan); }
.model-row.active .rail { outline: 2px solid var(--ink); }
.model-row.active .rail b { background: var(--coral); }
.model-row small { text-align: right; }
.decision { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; padding: 120px clamp(20px, 5vw, 72px); background: var(--ink); color: #fff; }
.decision-title h2 { font-size: clamp(2.3rem, 4vw, 4.8rem); line-height: 1; margin: 12px 0 30px; max-width: 660px; }
.decision-title .scrub { font-size: 20px; line-height: 1.55; color: #d0d6d4; }
.decision-grid { display: grid; gap: 1px; background: #444; }
.decision-grid article { background: #1d2224; padding: 34px; }
.decision-grid span { color: var(--yellow); font-size: 12px; text-transform: uppercase; font-weight: 700; }
.decision-grid strong { display: block; font-size: 22px; line-height: 1.35; margin-top: 10px; }
.outputs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; padding: 100px clamp(20px, 5vw, 72px); }
.outputs > div h2 { font-size: 38px; margin: 8px 0; }
.save-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.saved-item { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 14px 0; }
.saved-item div:last-child { display: flex; gap: 6px; }
.saved-item button { padding: 6px 8px; font-size: 12px; }
.empty, #status { color: var(--muted); font-size: 13px; }
.brief pre { white-space: pre-wrap; background: #f1f3ef; padding: 14px; min-height: 180px; font: 12px/1.45 ui-monospace, monospace; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
footer { display: flex; justify-content: space-between; align-items: center; padding: 50px clamp(20px, 5vw, 72px); border-top: 1px solid var(--line); }
footer p { color: var(--muted); }
footer a { color: inherit; }
dialog { border: 0; border-radius: 6px; max-width: 430px; padding: 30px; }
dialog::backdrop { background: rgba(0,0,0,.55); }
.preview-mode nav, .preview-mode .controls, .preview-mode .comparison, .preview-mode .decision, .preview-mode .outputs, .preview-mode footer { display: none; }
.preview-mode .hero { min-height: 240px; padding: 42px 60px 32px; grid-template-columns: 1.5fr .5fr; }
.preview-mode .hero-copy h1 { font-size: 48px; margin: 8px 0 14px; }
.preview-mode .hero-copy > p:last-child { font-size: 15px; margin: 0; }
.preview-mode .lab { padding: 22px 60px; }
.preview-mode .visual { grid-column: span 12; padding: 20px 28px; }
.preview-mode .scale-strip { min-height: 230px; margin: 12px 0 8px; }
.preview-mode .result-change { position: absolute; right: 78px; top: 420px; width: 340px; background: #fff; padding: 18px; border: 1px solid var(--line); }
@media (max-width: 860px) {
  .local { display: none; }
  .hero { grid-template-columns: 1fr; gap: 30px; padding-top: 60px; }
  .hero-copy h1 { font-size: clamp(2.6rem, 13vw, 4.2rem); }
  .lab { display: block; }
  .panel { margin-bottom: 16px; }
  .field-row { grid-template-columns: 1fr; }
  .scale-strip { overflow-x: auto; grid-template-columns: repeat(7, minmax(70px, 1fr)); }
  .decision { grid-template-columns: 1fr; gap: 35px; padding-top: 80px; padding-bottom: 80px; }
  .outputs { grid-template-columns: 1fr; }
  .outputs > div { margin-bottom: 30px; }
  .model-row { grid-template-columns: 100px 1fr 54px; }
  .segments span { min-height: 52px; display: flex; align-items: center; justify-content: center; }
  footer { align-items: flex-start; gap: 20px; }
}
@media (max-width: 500px) {
  nav { height: 64px; }
  .hero { min-height: 560px; }
  .headline-result strong { font-size: 28px; }
  .scale-strip { min-height: 220px; }
  .model-row { grid-template-columns: 88px 1fr 48px; font-size: 12px; }
  .decision-title .scrub { font-size: 17px; }
  .quiet { display: inline-block; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
