@charset "UTF-8";

:root {
  --paper: #f4f0e6;
  --paper-2: #ebe5d8;
  --ink: #15241f;
  --muted: #6c756f;
  --line: #c8c2b4;
  --green: #173f35;
  --green-2: #255c4d;
  --yellow: #f2c14e;
  --orange: #ef7a4a;
  --blue: #77aab3;
  --cream: #fffaf0;
  --shadow: 0 24px 70px rgba(31, 47, 41, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, textarea, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: .22;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(21,36,31,.09) 0 .45px, transparent .7px),
    radial-gradient(circle at 80% 70%, rgba(21,36,31,.06) 0 .4px, transparent .65px);
  background-size: 5px 5px, 7px 7px;
}

.topbar {
  width: min(1440px, calc(100% - 48px));
  height: 94px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px 16px 16px 5px;
  color: var(--yellow);
  background: var(--green);
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.08em;
  transform: rotate(-2deg);
}
.brand-mark span { font-size: 12px; }
.brand-copy { display: flex; flex-direction: column; gap: 2px; }
.brand-copy strong { font-size: 18px; letter-spacing: .12em; }
.brand-copy small { font-size: 8px; letter-spacing: .24em; color: var(--muted); }
.topbar nav { display: flex; gap: 38px; font-size: 14px; }
.topbar nav a { position: relative; }
.topbar nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -8px; height: 2px; background: var(--orange); transition: right .25s; }
.topbar nav a:hover::after { right: 0; }
.quiet-button, .primary-button, .upload-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.quiet-button { padding: 11px 18px; background: transparent; border: 1px solid var(--ink); font-size: 13px; }
.quiet-button:hover { background: var(--ink); color: var(--paper); }

main { overflow: hidden; }
.hero {
  width: min(1320px, calc(100% - 48px));
  min-height: 650px;
  margin: 0 auto;
  padding: 84px 0 74px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 80px;
  align-items: end;
}
.hero-copy { max-width: 920px; }
.eyebrow, .section-kicker {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--green-2);
}
.eyebrow { display: flex; align-items: center; gap: 9px; }
.eyebrow span { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 5px rgba(239, 122, 74, .16); }
h1, h2 { margin: 0; font-weight: 760; line-height: .98; letter-spacing: -.065em; }
h1 { max-width: 900px; margin-top: 28px; font-size: clamp(58px, 7.9vw, 116px); }
h1 em { color: var(--green-2); font-style: normal; white-space: nowrap; }
.hero-lede { max-width: 690px; margin: 34px 0 30px; color: var(--muted); font-size: clamp(16px, 1.5vw, 21px); line-height: 1.75; }

.prompt-card {
  max-width: 770px;
  padding: 20px 22px 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 250, 240, .78);
  box-shadow: var(--shadow);
  transition: border-color .2s, transform .2s;
}
.prompt-card:focus-within { border-color: var(--green-2); transform: translateY(-2px); }
.prompt-card > label { display: block; margin-bottom: 8px; color: var(--green-2); font-size: 12px; font-weight: 700; }
.prompt-card textarea { width: 100%; min-height: 68px; resize: vertical; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 17px; line-height: 1.65; }
.prompt-card textarea::placeholder { color: #9d9b91; }
.prompt-actions { display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid #ded8ca; }
.upload-button { display: inline-flex; align-items: center; gap: 6px; padding: 10px 13px; background: var(--paper-2); font-size: 12px; }
.upload-button input { display: none; }
.file-name { max-width: 180px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.primary-button { margin-left: auto; padding: 12px 19px; color: white; background: var(--green); font-size: 13px; font-weight: 700; }
.primary-button:disabled { cursor: wait; opacity: .62; }
.primary-button span { display: inline-block; margin-left: 8px; transition: transform .2s; }
.primary-button:hover span { transform: translateX(4px); }
.prompt-feedback { margin-top: 13px; display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 14px; background: rgba(23,63,53,.065); }
.prompt-feedback[hidden] { display: none; }
.prompt-feedback img { width: 58px; height: 58px; border-radius: 10px; object-fit: cover; }
.prompt-feedback div { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 4px; }
.prompt-feedback strong { color: var(--green); font-size: 11px; }
.prompt-feedback small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.prompt-feedback button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: transparent; cursor: pointer; font-size: 9px; }
.try-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.try-row > span { margin-right: 4px; color: var(--muted); font-size: 11px; }
.try-row button { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer; font-size: 11px; }
.try-row button:hover { border-color: var(--orange); background: #fff7ea; }
.scenario-entry { width: fit-content; margin-top: 15px; display: flex; align-items: center; gap: 9px; color: var(--green); font-size: 12px; font-weight: 700; }
.scenario-entry span { padding: 4px 7px; color: var(--cream); border-radius: 999px; background: var(--orange); font-size: 8px; letter-spacing: .08em; }
.scenario-entry b { transition: transform .2s; }
.scenario-entry:hover b { transform: translateX(5px); }

.hero-note { align-self: center; padding-left: 28px; border-left: 1px solid var(--line); }
.note-index { color: var(--orange); font-family: Georgia, serif; font-size: 52px; font-style: italic; }
.hero-note p { margin: 18px 0 24px; font-family: Georgia, "Songti SC", serif; font-size: 21px; line-height: 1.65; }
.note-line { width: 58px; height: 2px; margin-bottom: 20px; background: var(--yellow); }
.hero-note small { color: var(--muted); font-size: 10px; line-height: 1.8; }

.lab-section { padding: 78px max(24px, calc((100vw - 1440px) / 2)); background: var(--green); color: var(--cream); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 38px; }
.section-heading h2, .how-intro h2 { margin-top: 13px; font-size: clamp(48px, 6vw, 84px); }
.lab-section .section-kicker { color: #a9c2b8; }
.mode-switch { padding: 4px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; }
.mode-switch button { padding: 9px 15px; border: 0; border-radius: 999px; color: #a9bdb6; background: transparent; cursor: pointer; font-size: 12px; }
.mode-switch button.active { color: var(--green); background: var(--yellow); font-weight: 700; }
.mode-tools { display: flex; align-items: flex-end; flex-direction: column; gap: 9px; }
.achievement-summary { color: #a9c2b8; font-family: ui-monospace, monospace; font-size: 9px; letter-spacing: .08em; }

.ai-solution { margin: -12px 0 28px; padding: 22px; border: 1px solid rgba(255,255,255,.18); border-radius: 22px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 60px rgba(0,0,0,.16); }
.ai-solution[hidden] { display: none; }
.ai-solution-head { display: flex; align-items: center; justify-content: space-between; }
.ai-solution-head > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ai-badge, .confidence-badge { padding: 5px 8px; border-radius: 999px; font-family: ui-monospace, monospace; font-size: 8px; letter-spacing: .09em; }
.ai-badge { color: var(--yellow); background: var(--green); }
.confidence-badge { color: var(--green); background: rgba(23,63,53,.09); }
.ai-solution-head > button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: transparent; cursor: pointer; font-size: 18px; line-height: 1; }
.ai-solution h3 { margin: 14px 0 5px; font-family: Georgia, "Songti SC", serif; font-size: 25px; }
.ai-solution > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.given-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.given-list span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--green); font-size: 9px; }
.story-timeline { position: relative; display: grid; grid-template-columns: repeat(var(--story-count, 4), minmax(0, 1fr)); gap: 6px; margin-top: 18px; }
.story-timeline button { min-width: 0; padding: 9px 6px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.story-timeline button.active { border-color: var(--orange); color: var(--cream); background: var(--orange); }
.story-detail { margin-top: 10px; display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px; border-radius: 14px; background: var(--paper-2); }
.story-detail > span { color: var(--orange); font-family: ui-monospace, monospace; font-size: 9px; letter-spacing: .08em; }
.story-detail strong { display: block; font-size: 13px; }
.story-detail p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.story-detail code { display: inline-block; margin-top: 7px; padding: 4px 7px; border-radius: 6px; color: var(--green); background: rgba(23,63,53,.08); font-family: Georgia, serif; font-size: 11px; }
.story-controls { display: flex; gap: 5px; }
.story-controls button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--green); background: transparent; cursor: pointer; font-size: 9px; }
.story-controls button:nth-child(2) { border-color: var(--green); color: var(--cream); background: var(--green); }
.story-controls button:disabled { cursor: not-allowed; opacity: .38; }
.ai-warning { margin-top: 10px !important; padding-left: 10px; border-left: 2px solid var(--orange); color: #9a4b31 !important; }

.lab-shell {
  display: grid;
  grid-template-columns: 220px minmax(420px, 1fr) 300px;
  min-height: 710px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 30px;
  background: #102e27;
  box-shadow: 0 36px 100px rgba(0, 0, 0, .24);
}
.experiment-menu { display: flex; min-height: 0; flex-direction: column; border-right: 1px solid rgba(255,255,255,.12); }
.experiment-tab { flex: 1 1 0; min-height: 72px; display: flex; align-items: center; gap: 13px; padding: 14px 17px; border: 0; border-bottom: 1px solid rgba(255,255,255,.1); color: #b8cac3; background: transparent; text-align: left; cursor: pointer; }
.experiment-tab:last-child { border-bottom: 0; }
.experiment-tab:hover { background: rgba(255,255,255,.04); }
.experiment-tab.active { color: var(--ink); background: var(--yellow); }
.tab-number { align-self: flex-start; font-family: ui-monospace, monospace; font-size: 10px; opacity: .65; }
.experiment-tab strong { display: block; margin-bottom: 7px; font-size: 15px; }
.experiment-tab small { font-size: 9px; opacity: .7; }
.stage-column { min-width: 0; }
.stage-toolbar { height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid rgba(255,255,255,.1); color: #b8cac3; font-size: 11px; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #83d59f; box-shadow: 0 0 0 4px rgba(131,213,159,.12); }
.stage-buttons { display: flex; gap: 7px; }
.stage-buttons button { padding: 7px 11px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; color: #dbe7e2; background: transparent; cursor: pointer; font-size: 10px; }
.stage-buttons button:hover { background: rgba(255,255,255,.08); }
.canvas-wrap { position: relative; min-height: 470px; background: #ecede6; }
#experimentCanvas { display: block; width: 100%; height: 470px; }
.stage-label { position: absolute; left: 20px; top: 18px; display: flex; flex-direction: column; color: var(--ink); }
.stage-label > span { font-family: Georgia, serif; font-size: clamp(18px, 2vw, 27px); font-style: italic; }
.stage-label small { margin-top: 4px; color: var(--muted); font-size: 9px; letter-spacing: .12em; }
.formula-fraction { display: inline-grid; min-width: 1.65em; margin: 0 .12em; grid-template-rows: auto auto; vertical-align: middle; color: inherit; font-size: .82em; font-style: normal; line-height: 1.05; text-align: center; }
.formula-fraction > span:first-child { padding: 0 .25em .12em; border-bottom: 1.5px solid currentColor; }
.formula-fraction > span:last-child { padding: .12em .25em 0; }
.challenge-card { position: absolute; right: 18px; top: 18px; width: min(325px, calc(100% - 36px)); max-height: calc(100% - 36px); overflow: auto; padding: 15px; border: 1px solid transparent; border-radius: 16px; color: var(--ink); background: rgba(255,250,240,.95); box-shadow: 0 14px 40px rgba(35,48,42,.14); opacity: 0; pointer-events: none; transform: translateY(-8px); transition: .25s; }
.challenge-card.visible { opacity: 1; pointer-events: auto; transform: none; }
.challenge-card.success { border-color: #72a989; box-shadow: 0 14px 40px rgba(55,111,81,.2); }
.challenge-top { display: flex; align-items: center; justify-content: space-between; }
.challenge-top span { color: var(--orange); font-family: ui-monospace, monospace; font-size: 8px; letter-spacing: .16em; }
.challenge-top small { color: var(--muted); font-family: ui-monospace, monospace; font-size: 8px; }
.challenge-levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 10px; }
.challenge-levels button { padding: 5px 3px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; font-size: 8px; }
.challenge-levels button.active { border-color: var(--green); color: var(--cream); background: var(--green); }
.challenge-levels button.completed::before { content: "✓ "; color: #5d9673; }
.challenge-levels button.active.completed::before { color: var(--yellow); }
.challenge-card strong { display: block; margin-top: 6px; font-size: 12px; }
.challenge-card p { margin: 6px 0 10px; color: var(--muted); font-size: 9px; }
.challenge-conditions { display: grid; gap: 5px; margin: 9px 0; }
.challenge-condition { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 8px; color: var(--muted); background: rgba(21,36,31,.055); font-size: 9px; }
.challenge-condition b { color: var(--ink); font-weight: 650; }
.challenge-condition.pass { color: #417357; background: rgba(65,115,87,.1); }
.challenge-condition.fail { color: #b65335; background: rgba(182,83,53,.09); }
.challenge-score { height: 5px; overflow: hidden; border-radius: 5px; background: var(--paper-2); }
.challenge-score i { display: block; width: 0; height: 100%; background: var(--orange); transition: width .25s; }
.challenge-status { min-height: 15px; margin-top: 7px; color: var(--muted); font-size: 9px; }
.challenge-actions { display: grid; grid-template-columns: .8fr 1.2fr; gap: 6px; margin-top: 8px; }
.challenge-actions[hidden] { display: none; }
.challenge-actions button { padding: 7px 6px; border: 1px solid var(--line); border-radius: 8px; color: var(--green); background: transparent; cursor: pointer; font-size: 9px; }
.challenge-actions button:last-child { border-color: var(--green); color: var(--cream); background: var(--green); }
.challenge-actions button:disabled { cursor: not-allowed; opacity: .45; }
.challenge-history { display: grid; gap: 3px; margin-top: 7px; color: var(--muted); font-family: ui-monospace, monospace; font-size: 8px; }
.challenge-history:empty { display: none; }
.readout-row { min-height: 122px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.1); }
.readout { padding: 20px; border-right: 1px solid rgba(255,255,255,.1); }
.readout:last-child { border-right: 0; }
.readout span { display: block; margin-bottom: 8px; color: #89a399; font-size: 9px; letter-spacing: .12em; }
.readout strong { font-family: Georgia, serif; font-size: 27px; font-weight: 400; }
.readout strong small { margin-left: 4px; font-family: system-ui, sans-serif; font-size: 9px; color: #89a399; }

.control-panel { padding: 24px 20px; border-left: 1px solid rgba(255,255,255,.12); background: #13362e; }
.panel-heading { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.12); }
.panel-heading span { color: #8ea89e; font-size: 9px; letter-spacing: .12em; }
.panel-heading strong { font-size: 13px; }
.control-help { margin: 12px 0 -6px; color: #78968b; font-size: 8px; line-height: 1.55; }
.control { margin-top: 24px; }
.control.locked { opacity: .72; }
.control-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.control-head label { color: #c7d6d0; font-size: 11px; }
.control-lock { margin-left: 6px; padding: 2px 5px; border-radius: 8px; color: var(--yellow); background: rgba(242,193,78,.12); font-size: 7px; letter-spacing: .04em; }
.control-adapted { margin-left: 5px; padding: 2px 5px; border-radius: 8px; color: #8fc5b2; background: rgba(143,197,178,.1); font-size: 7px; letter-spacing: .04em; }
.control-output { display: flex; align-items: baseline; justify-content: flex-end; gap: 3px; }
.control-output input { width: 78px; padding: 3px 5px; border: 0; border-bottom: 1px solid rgba(242,193,78,.42); outline: 0; color: var(--yellow); background: transparent; font-family: Georgia, serif; font-size: 17px; text-align: right; }
.control-output input:focus { border-color: var(--yellow); background: rgba(255,255,255,.05); }
.control-output input:disabled { opacity: .7; }
.control-output small { font-family: system-ui, sans-serif; font-size: 8px; color: #8ea89e; }
input[type="range"] { width: 100%; height: 4px; appearance: none; border-radius: 5px; outline: none; background: rgba(255,255,255,.16); }
input[type="range"]::-webkit-slider-thumb { width: 17px; height: 17px; appearance: none; border: 3px solid var(--green); border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 1px rgba(255,255,255,.35); cursor: grab; }
.range-ends { display: flex; justify-content: space-between; margin-top: 7px; color: #718e83; font-size: 8px; }
.insight-card { margin-top: 30px; padding: 17px; border-radius: 17px; color: var(--ink); background: var(--paper); }
.insight-label { color: var(--orange); font-family: ui-monospace, monospace; font-size: 8px; letter-spacing: .13em; }
.insight-card p { min-height: 62px; margin: 10px 0; font-family: Georgia, "Songti SC", serif; font-size: 13px; line-height: 1.65; }
.insight-card button { padding: 0; border: 0; border-bottom: 1px solid var(--ink); background: transparent; cursor: pointer; font-size: 10px; }
.why-answer { max-height: 0; overflow: hidden; margin-top: 0; color: var(--muted); font-size: 10px; line-height: 1.6; transition: max-height .3s, margin-top .3s; }
.why-answer.open { max-height: 150px; margin-top: 10px; }

.how-section { width: min(1320px, calc(100% - 48px)); margin: 0 auto; padding: 130px 0; display: grid; grid-template-columns: .9fr 1.1fr; gap: 110px; }
.how-intro h2 { margin: 18px 0 30px; }
.how-intro > p { max-width: 520px; color: var(--muted); font-size: 16px; line-height: 1.8; }
.process-list { margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.process-list li { display: grid; grid-template-columns: 70px 1fr; padding: 25px 0; border-bottom: 1px solid var(--line); }
.process-list li > span { color: var(--orange); font-family: ui-monospace, monospace; font-size: 10px; }
.process-list strong { font-size: 21px; }
.process-list p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.gallery-section { padding: 110px max(24px, calc((100vw - 1320px) / 2)); background: var(--paper-2); }
.gallery-heading > p { max-width: 450px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery-card { position: relative; min-height: 360px; overflow: hidden; padding: 25px; border: 0; border-radius: 24px; color: var(--ink); text-align: left; cursor: pointer; transition: transform .25s, box-shadow .25s; }
.gallery-card:hover { transform: translateY(-7px); box-shadow: var(--shadow); }
.gallery-card > span { font-size: 10px; letter-spacing: .15em; }
.gallery-card strong { position: relative; z-index: 2; display: block; margin-top: 36px; font-size: clamp(24px, 2.4vw, 38px); line-height: 1.18; letter-spacing: -.05em; }
.gallery-card i { position: absolute; left: 25px; bottom: 25px; font-size: 11px; font-style: normal; }
.gallery-card b { position: absolute; right: -20px; bottom: 25px; font-family: Georgia, serif; font-size: 170px; font-weight: 400; opacity: .14; transform: rotate(-12deg); }
.projectile-card { background: #f0c452; }
.force-card { color: white; background: #295f50; }
.spring-card { background: #e98a5e; }
.circuit-card { background: #8cb8bf; }
.collision-card { background: #d9ad4d; }
.wave-card { background: #9bbccc; }
.circular-card { color: white; background: #b85f45; }
.magnetic-card { color: white; background: #294f68; }
.induction-card { background: #b7a0cf; }

footer { min-height: 190px; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; gap: 30px; width: min(1320px, calc(100% - 48px)); margin: 0 auto; }
footer > p { text-align: center; font-family: Georgia, "Songti SC", serif; font-size: 18px; }
footer > span { color: var(--muted); text-align: right; font-size: 10px; letter-spacing: .12em; }
footer .footer-meta { line-height: 2; }
footer .footer-meta a { color: inherit; text-decoration: none; }
footer .footer-meta a:hover { color: var(--ink); text-decoration: underline; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 80; padding: 12px 18px; border-radius: 999px; color: white; background: var(--ink); box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.report-dialog { width: min(820px, calc(100% - 28px)); max-height: calc(100vh - 28px); padding: 0; overflow: auto; border: 0; border-radius: 26px; color: var(--ink); background: var(--paper); box-shadow: 0 40px 120px rgba(0,0,0,.34); }
.report-dialog::backdrop { background: rgba(9,24,20,.72); backdrop-filter: blur(5px); }
.report-sheet { padding: 30px; }
.report-heading { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.report-heading span { color: var(--orange); font-family: ui-monospace, monospace; font-size: 9px; letter-spacing: .14em; }
.report-heading h2 { margin-top: 8px; font-size: 42px; }
.report-heading button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; font-size: 24px; line-height: 1; }
.report-preview { padding: 24px 0; }
.report-summary { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; }
.report-block { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,250,240,.65); }
.report-block > span { display: block; margin-bottom: 8px; color: var(--muted); font-family: ui-monospace, monospace; font-size: 8px; letter-spacing: .12em; }
.report-block strong { font-size: 16px; }
.report-block p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.report-formula { color: var(--ink); font-family: Georgia, serif; font-size: 16px; font-style: italic; }
.report-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.report-value { padding: 14px; border-radius: 13px; color: var(--cream); background: var(--green); }
.report-value span { display: block; margin-bottom: 7px; color: #9fb8ae; font-size: 8px; }
.report-value strong { color: var(--yellow); font-family: Georgia, serif; font-size: 20px; font-weight: 400; }
.report-parameters { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.report-parameters span { padding: 7px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 9px; }
.report-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.report-actions button { padding: 11px 16px; border: 1px solid var(--ink); border-radius: 999px; background: transparent; cursor: pointer; font-size: 11px; }
.report-actions button:first-child { color: var(--cream); background: var(--green); }

@media (max-width: 1120px) {
  .lab-shell { grid-template-columns: 160px minmax(380px, 1fr); }
  .control-panel { grid-column: 1 / -1; display: grid; grid-template-columns: 160px 1fr 280px; gap: 24px; border-top: 1px solid rgba(255,255,255,.12); border-left: 0; }
  .panel-heading { display: block; }
  .panel-heading strong { display: block; margin-top: 8px; }
  #controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .control { margin-top: 0; }
  .insight-card { margin-top: 0; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .topbar { width: calc(100% - 28px); height: 76px; }
  .topbar nav { display: none; }
  .quiet-button { padding: 9px 12px; font-size: 11px; }
  .brand-mark { width: 42px; height: 42px; border-radius: 13px 13px 13px 4px; }
  .brand-copy strong { font-size: 15px; }
  .hero { width: calc(100% - 28px); min-height: auto; padding: 58px 0 65px; display: block; }
  h1 { font-size: clamp(52px, 16vw, 78px); }
  .hero-lede { margin-top: 25px; }
  .hero-note { display: none; }
  .prompt-card { padding: 17px; border-radius: 20px; }
  .prompt-actions { flex-wrap: wrap; }
  .file-name { order: 3; width: 100%; }
  .try-row > span { width: 100%; }
  .lab-section { padding: 60px 14px; }
  .ai-solution { margin-top: -6px; padding: 17px; }
  .story-timeline { grid-template-columns: repeat(2, 1fr); }
  .story-detail { grid-template-columns: 1fr; gap: 9px; }
  .story-controls { flex-wrap: wrap; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .mode-tools { align-items: flex-start; }
  .section-heading h2, .how-intro h2 { font-size: 48px; }
  .lab-shell { display: block; border-radius: 24px; }
  .experiment-menu { display: grid; grid-template-columns: repeat(3, 1fr); border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .experiment-tab { min-height: 68px; justify-content: center; padding: 9px 4px; border-right: 1px solid rgba(255,255,255,.1); border-bottom: 1px solid rgba(255,255,255,.1); }
  .experiment-tab > span:last-child small, .tab-number { display: none; }
  .experiment-tab strong { margin: 0; font-size: 11px; text-align: center; }
  .canvas-wrap, #experimentCanvas { min-height: 360px; height: 360px; }
  .challenge-card { top: auto; bottom: 14px; }
  .readout { padding: 16px 10px; }
  .readout strong { font-size: 21px; }
  .control-panel { display: block; padding: 22px 17px; }
  #controls { display: block; }
  .control { margin-top: 22px; }
  .insight-card { margin-top: 26px; }
  .how-section { width: calc(100% - 28px); padding: 90px 0; display: block; }
  .process-list { margin-top: 60px; }
  .gallery-section { padding: 85px 14px; }
  .gallery-heading > p { margin-top: 0; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-card { min-height: 270px; }
  footer { width: calc(100% - 28px); padding: 50px 0; display: flex; flex-direction: column; }
  footer > p, footer > span { text-align: center; }
  .report-sheet { padding: 20px; }
  .report-heading h2 { font-size: 34px; }
  .report-summary, .report-values { grid-template-columns: 1fr; }
  .report-actions { align-items: stretch; flex-direction: column; }
}

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