:root {
  color-scheme: light;
  font-family: "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  --navy: #082e3a;
  --navy-2: #0c4250;
  --teal: #087f78;
  --mint: #4fe0c1;
  --lime: #b8f35b;
  --coral: #ff7d66;
  --sky: #86cce6;
  --paper: #fffdf5;
  --canvas: #edf4ed;
  --ink: #112f39;
  --muted: #5b747b;
  --line: #cbdcd6;
  --soft: #e8f1ed;
  --shadow: 0 24px 70px rgba(5, 38, 47, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 18px; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--canvas); font-size: 1rem; line-height: 1.5; }
body::before { content: ""; position: fixed; inset: 0; z-index: -2; background: linear-gradient(90deg, rgba(237,244,237,.94), rgba(237,244,237,.78)), url("lab-background.png") center / cover fixed; }
body::after { content: ""; position: fixed; inset: 0; z-index: -1; opacity: .2; pointer-events: none; background-image: radial-gradient(#0b706b 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(to bottom, #000, transparent 45%); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(18px, 4vw, 66px); border-bottom: 1px solid rgba(8,46,58,.12); background: rgba(255,253,245,.9); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 20; }
.brand img { display: block; width: 257px; height: 57px; }
.header-meta { display: flex; align-items: center; gap: 10px; }
.profile-chip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 10px 13px; border-radius: 999px; background: var(--soft); color: var(--navy); font-size: .78rem; font-weight: 800; }
.ghost-button { min-height: 42px; border: 1px solid var(--line); border-radius: 12px; padding: 9px 14px; background: transparent; color: var(--navy); font-weight: 800; }

main { width: min(1380px, calc(100% - 36px)); margin: 0 auto; min-height: calc(100vh - 152px); }
.kicker { margin: 0 0 12px; color: var(--teal); font-size: .75rem; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
h1 { margin: 0; color: var(--navy); font-size: clamp(2.8rem, 6vw, 6.3rem); line-height: .94; letter-spacing: -.065em; }
h1 em { color: var(--teal); font-family: Georgia, serif; font-weight: 400; }
.lead { max-width: 670px; margin: 25px 0 30px; color: #49656c; font-size: clamp(1rem, 1.6vw, 1.24rem); line-height: 1.62; }

.welcome-screen { min-height: calc(100vh - 152px); display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(26px, 5vw, 74px); align-items: center; padding: clamp(40px, 8vh, 92px) 0; }
.method-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.method-strip span { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid rgba(8,46,58,.14); border-radius: 999px; background: rgba(255,253,245,.68); color: var(--muted); font-size: .78rem; font-weight: 700; }
.method-strip b { color: var(--coral); }
.launch-card { position: relative; padding: 31px 34px; border: 1px solid rgba(255,255,255,.4); border-radius: 36px 8px 36px 8px; background: linear-gradient(150deg, #0d4a55, var(--navy)); color: white; box-shadow: var(--shadow); }
.research-board { margin: 0 0 22px; padding-bottom: 21px; border-bottom: 1px solid #ffffff22; }
.research-board .kicker { color: var(--mint); }
.research-board > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.research-board span { display: grid; padding: 11px; border: 1px solid #ffffff1f; border-radius: 10px; background: #ffffff0a; color: white; font-size: .78rem; font-weight: 800; }
.research-board b { color: var(--lime); font-size: .62rem; letter-spacing: .08em; }
.research-board small { margin-top: 3px; color: #94b3b7; font-size: .63rem; font-weight: 600; }
form > p { margin: 0 0 11px; font-weight: 900; }
.guest-fields { display: grid; grid-template-columns: 1fr 1fr .55fr; gap: 9px; }
label { display: grid; gap: 6px; color: inherit; font-size: .72rem; font-weight: 800; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 10px; outline: none; background: white; color: var(--ink); }
input { min-height: 44px; padding: 10px 12px; }
textarea { min-height: 108px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
select { min-height: 42px; padding: 8px 11px; }
.launch-card input { border-color: #5a7880; background: #174f5b; color: white; }
.launch-card label { color: #d7e6e7; }
.launch-card input::placeholder { color: #89a8ad; }
.primary, .secondary, .report-button, .action-button { min-height: 46px; border-radius: 11px; padding: 11px 17px; border: 0; font-weight: 900; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 13px; background: var(--lime); color: var(--navy); }
.launch-card .primary { width: 100%; margin-top: 11px; }
.course-note { margin: 13px 0 0; color: #88a7ab; font-size: .68rem; text-align: center; }

.research-workspace { padding: 14px 0 48px; }
.workspace-hero { position: relative; overflow: hidden; min-height: 118px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 17px 26px; border-radius: 18px 6px 18px 6px; background: linear-gradient(112deg, rgba(8,46,58,.98), rgba(10,75,82,.9)), url("lab-background.png") center / cover; color: white; box-shadow: 0 12px 34px rgba(5,38,47,.14); }
.workspace-hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 70% 10%, rgba(184,243,91,.25), transparent 35%); pointer-events: none; }
.workspace-hero > div { position: relative; z-index: 1; }
.workspace-hero .kicker { margin-bottom: 6px; font-size: .64rem; }
.workspace-hero h1 { color: white; font-size: clamp(1.7rem, 2.8vw, 2.75rem); line-height: 1; letter-spacing: -.045em; white-space: nowrap; }
.workspace-hero h1 em { color: var(--mint); }
.workspace-hero p:not(.kicker) { max-width: 700px; margin: 7px 0 0; color: #c7dcdd; font-size: .74rem; }
.hero-formulas { position: relative; z-index: 1; display: flex; align-content: center; gap: 6px; padding-left: 0; }
.hero-formulas span { display: block; width: fit-content; padding: 6px 9px; border: 1px solid #ffffff2c; border-radius: 8px; background: #ffffff0b; color: white; font-family: Georgia, serif; font-size: .84rem; transform: none; }
.hero-formulas span:nth-child(2) { color: var(--lime); }
.hero-formulas span:nth-child(3) { color: var(--mint); }
.variant-chip { display: inline-flex; gap: 7px; margin-top: 8px; padding: 5px 8px; border-radius: 7px; background: #ffffff13; color: #c8dddd; font-size: .65rem; }
.variant-chip strong { color: var(--lime); }

.lab-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 11px 0 10px; }
.lab-tab { min-height: 68px; display: grid; grid-template-columns: 34px 1fr auto; gap: 9px; align-items: center; border: 1px solid var(--line); border-radius: 13px; padding: 9px 11px; background: rgba(255,253,245,.9); color: var(--muted); text-align: left; transition: .2s ease; }
.lab-tab:hover { transform: translateY(-2px); border-color: var(--teal); }
.lab-tab[aria-selected="true"] { border-color: var(--navy); background: var(--navy); color: white; box-shadow: 0 12px 30px rgba(8,46,58,.17); }
.tab-number { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 9px; background: var(--soft); color: var(--navy); font-size: .68rem; font-weight: 900; }
.lab-tab[aria-selected="true"] .tab-number { background: var(--lime); }
.tab-copy { display: grid; gap: 4px; }
.tab-copy strong { color: inherit; font-size: .82rem; }
.tab-copy small { font-size: .66rem; }
.tab-state { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: .65rem; }
.lab-tab.complete .tab-state { border-color: var(--mint); background: var(--mint); color: var(--navy); }

.lab-panel { border: 1px solid var(--line); border-radius: 7px 28px 7px 28px; background: rgba(255,253,245,.97); box-shadow: var(--shadow); outline: none; }
.theory-band { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; padding: 34px 38px; border-bottom: 1px solid var(--line); background: linear-gradient(120deg, #f9fff9, #e9f5ef); }
.theory-band h2 { margin: 0 0 9px; color: var(--navy); font-size: clamp(1.65rem, 3vw, 2.6rem); letter-spacing: -.035em; }
.theory-band > div > p { margin: 0; color: var(--muted); line-height: 1.55; }
.theory-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.formula-card { min-height: 86px; display: grid; align-content: center; padding: 14px; border: 1px solid #b9d8ce; border-radius: 12px; background: white; }
.formula-card small { color: var(--teal); font-weight: 900; }
.formula-card strong { margin-top: 4px; color: var(--navy); font-family: Georgia, serif; font-size: 1.18rem; }
.mentor-tip { display: grid; grid-template-columns: 38px 1fr; gap: 11px; align-items: center; margin-top: 17px; padding: 11px 14px; border-radius: 12px; background: #0d4b56; color: white; }
.mentor-tip > span { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #ffffff28; border-radius: 9px; color: var(--lime); font-family: Georgia, serif; font-size: 1.35rem; }
.mentor-tip p { margin: 0; color: #d6e6e7; font-size: .78rem; line-height: 1.4; }
.mentor-tip strong { color: var(--lime); }

.research-brief { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 21px 38px; background: var(--navy); color: white; }
.research-brief h3 { margin: 0; font-size: 1.05rem; }
.research-brief p { margin: 4px 0 0; color: #b7ced1; font-size: .78rem; }
.brief-code { flex: 0 0 auto; padding: 7px 10px; border-radius: 8px; background: var(--lime); color: var(--navy); font-size: .72rem; font-weight: 900; }

.research-grid { display: grid; grid-template-columns: .82fr 1.35fr .83fr; gap: 14px; padding: 20px; }
.research-grid.scored-grid { grid-template-columns: minmax(0, 1.55fr) minmax(290px, .75fr); align-items: start; }
.research-task { min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.task-heading { display: grid; grid-template-columns: 33px 1fr; gap: 10px; align-items: start; margin-bottom: 15px; }
.task-heading > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--soft); color: var(--teal); font-weight: 900; font-size: .75rem; }
.task-heading h3 { margin: 0; color: var(--navy); font-size: 1rem; }
.task-heading p { margin: 4px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.4; }
.field-label { display: grid; gap: 7px; color: var(--navy); font-size: .75rem; font-weight: 900; }
.field-note { margin: 7px 0 0; color: #7c9094; font-size: .67rem; }
.field-note.ok { color: var(--teal); }
.task-complete { border-color: #8ed6bd; box-shadow: inset 0 0 0 1px #c6eadc; }
.assistant-panel { display: grid; grid-template-columns: 58px 1fr; gap: 13px; align-items: start; margin: 0 0 14px; padding: 12px; border: 1px solid #b9d8ce; border-radius: 12px; background: linear-gradient(120deg, #f8fcfa, #edf6f1); }
.assistant-photo { width: 58px; height: 58px; display: block; border: 2px solid white; border-radius: 12px; background-image: url("expert-portraits.png"); background-repeat: no-repeat; background-size: 200% 200%; box-shadow: 0 4px 12px rgba(8,46,58,.16); }
.photo-analyst { background-position: 0 0; }
.photo-compression { background-position: 100% 0; }
.photo-communications { background-position: 0 100%; }
.photo-automation { background-position: 100% 100%; }
.assistant-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: var(--navy); color: var(--lime); font-family: Georgia, serif; font-size: 1.2rem; }
.assistant-panel strong, .assistant-panel small { display: block; }
.assistant-panel strong { color: var(--navy); font-size: .78rem; }
.assistant-panel small { margin-top: 2px; color: var(--teal); font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.assistant-panel p { margin: 6px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.4; }
.task-guide { margin: 0 0 14px; padding: 14px; border: 1px solid #b9d8ce; border-radius: 12px; background: #fffef8; }
.task-guide h4 { margin: 0 0 10px; color: var(--navy); font-size: .82rem; }
.task-guide dl { display: grid; gap: 8px; margin: 0; }
.task-guide dl > div { display: grid; grid-template-columns: 112px 1fr; gap: 10px; align-items: start; }
.task-guide dt { color: var(--teal); font-size: .66rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.task-guide dd { margin: 0; color: var(--navy); font-size: .72rem; line-height: 1.4; }
.challenge-card { position: sticky; top: 78px; display: grid; gap: 14px; }
.challenge-card .task-heading { margin-bottom: 0; }
.mission-stack { position: sticky; top: 92px; display: grid; gap: 12px; align-self: start; }
.mission-summary { display: grid; gap: 5px; padding: 14px 16px; border-radius: 13px; background: var(--navy); color: white; box-shadow: 0 10px 28px rgba(8,46,58,.16); }
.mission-summary strong { color: var(--lime); font-size: 1rem; }
.mission-summary span { color: #d4e5e5; font-size: .84rem; }
.mission-card { display: grid; gap: 12px; padding: 17px; }
.mission-card .task-heading { margin: 0; }
.mission-card .target-box { padding: 11px 13px; }
.mission-card .challenge-button { width: 100%; }
.mission-card .result-feedback { min-height: 0; }
.active-mission { border: 2px solid var(--teal); box-shadow: 0 14px 34px rgba(8,127,120,.13); }
.current-step { margin: 0; color: var(--teal); font-size: .78rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.mission-row { display: grid; grid-template-columns: 36px 1fr; gap: 11px; align-items: center; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.mission-row > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; font-weight: 900; }
.mission-row strong, .mission-row small { display: block; }
.mission-row strong { color: var(--navy); font-size: .9rem; line-height: 1.35; }
.mission-row small { margin-top: 3px; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.mission-row.completed { border-color: #9bd6bc; background: #eef9f3; }
.mission-row.completed > span { background: #d9f3e5; color: #176b4d; }
.mission-row.completed small { color: #176b4d; }
.mission-row.locked { background: #f2f5f3; opacity: .68; }
.mission-row.locked > span { background: #e2e8e5; color: #6d7e7b; }
.sequence-complete { display: grid; gap: 4px; padding: 16px; border: 1px solid #88d4b8; border-radius: 13px; background: #e9f8ef; }
.sequence-complete strong { color: #176b4d; }
.sequence-complete span { color: var(--muted); font-size: .84rem; }
.score-meta { display: grid; gap: 6px; padding: 11px; border-radius: 10px; background: var(--soft); color: var(--muted); font-size: .7rem; }
.score-meta strong { color: var(--navy); }
.target-box { display: grid; gap: 4px; padding: 14px; border-left: 3px solid var(--teal); border-radius: 8px; background: #f2f8f5; }
.target-box small { color: var(--teal); font-size: .62rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.target-box strong { color: var(--navy); font-size: .9rem; }
.target-box span { color: var(--muted); font-size: .68rem; line-height: 1.35; }
.challenge-button:disabled { cursor: default; opacity: 1; background: #dff5e8; color: #12664a; }
.result-feedback { min-height: 62px; padding: 12px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.result-feedback.retry { border-color: #efb8aa; background: #fff2ee; color: #8c493b; }
.result-feedback.success { border-style: solid; border-color: #9bd6bc; background: #eaf8f0; color: #176b4d; }
.dataset-preview { min-height: 52px; max-height: 86px; overflow: auto; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf8; color: var(--navy); font-family: Consolas, monospace; font-size: .72rem; line-height: 1.45; overflow-wrap: anywhere; }
.custom-text-field { margin-top: 12px; }
.custom-text-field textarea { min-height: 110px; font-size: .92rem; }
.custom-text-field > span { color: var(--muted); font-size: .78rem; font-weight: 600; }

.model { display: grid; gap: 14px; }
.model-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.model-row label { color: var(--muted); }
.model-row output { min-width: 62px; color: var(--navy); font-weight: 900; text-align: right; }
input[type="range"] { appearance: none; height: 8px; padding: 0; border: 0; border-radius: 8px; background: var(--soft); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 22px; height: 22px; border: 4px solid white; border-radius: 50%; background: var(--coral); box-shadow: 0 2px 9px #0003; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.metrics.four { grid-template-columns: repeat(4, 1fr); }
.metric { padding: 11px; border-radius: 11px; background: var(--soft); }
.metric small { display: block; color: var(--muted); font-size: .62rem; }
.metric strong { display: block; margin-top: 5px; color: var(--navy); font-size: 1.05rem; }
.info-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.info-presets button { display: grid; gap: 4px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--muted); font-size: .68rem; text-align: left; }
.info-presets button:hover, .info-presets button:focus-visible { border-color: var(--teal); background: #edfaf5; }
.info-presets strong { color: var(--navy); font-size: .8rem; }
.live-explanation { padding: 12px 14px; border-left: 3px solid var(--teal); border-radius: 8px; background: #edf7f2; color: var(--muted); font-size: .74rem; line-height: 1.45; }
.live-explanation strong { color: var(--navy); }
.action-button { border: 1px solid var(--teal); background: white; color: var(--teal); }
.action-button:hover { background: #edfaf5; }
.observation-table { width: 100%; border-collapse: collapse; font-size: .7rem; }
.observation-table th, .observation-table td { padding: 7px; border-bottom: 1px solid var(--line); text-align: left; }
.observation-table th { color: var(--muted); }
.empty-data { padding: 13px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: .72rem; text-align: center; }
.table-wrap { max-height: 190px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.table-wrap .observation-table th { position: sticky; top: 0; background: #f5faf7; }
.entropy-viz, .signal-viz, .control-viz { min-height: 120px; border-radius: 12px; overflow: hidden; background: linear-gradient(180deg, #f5faf7, #e8f2ed); }
.entropy-viz svg, .control-viz svg { display: block; width: 100%; height: 140px; }
.axis { stroke: #8aa4a1; stroke-width: 1; }
.plot-line { fill: none; stroke: var(--coral); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.plot-dot { fill: var(--navy); stroke: white; stroke-width: 2; }
.personal-note { padding: 10px 12px; border-left: 3px solid var(--coral); background: #fff1ed; color: #77483f; font-size: .72rem; line-height: 1.4; }
.experiment-protocol { display: grid; gap: 6px; margin: 0 0 14px; padding: 12px 12px 12px 31px; border-radius: 11px; background: #f4f8f5; color: var(--muted); font-size: .7rem; line-height: 1.35; }
.experiment-protocol li::marker { color: var(--teal); font-weight: 900; }
.controls-grid { align-content: start; }
.signal-viz { display: grid; gap: 6px; padding: 12px; }
.signal-viz small { color: var(--muted); font-size: .65rem; }
.bit-stream { display: flex; flex-wrap: wrap; gap: 3px; }
.bit-stream span { width: 19px; height: 22px; display: grid; place-items: center; border-radius: 5px; background: white; color: var(--navy); font-family: Consolas, monospace; font-size: .7rem; font-weight: 800; }
.bit-stream span.changed { background: #ffe0da; color: #bd4332; outline: 1px solid var(--coral); }

.report-dock { position: sticky; bottom: 14px; display: grid; grid-template-columns: minmax(230px, .7fr) minmax(140px, 1fr) auto; gap: 20px; align-items: center; margin: 16px 0 0; padding: 16px 19px; border: 1px solid #ffffff35; border-radius: 15px; background: rgba(8,46,58,.94); color: white; box-shadow: 0 14px 40px rgba(4,32,40,.26); backdrop-filter: blur(15px); z-index: 12; }
.report-dock .kicker { margin-bottom: 4px; color: var(--mint); }
.report-dock strong { font-size: .82rem; }
.report-track { height: 7px; overflow: hidden; border-radius: 10px; background: #ffffff20; }
.report-track span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--lime), var(--mint)); transition: width .3s; }
.report-button { background: var(--lime); color: var(--navy); }

.report-screen { max-width: 1120px; margin: 44px auto; padding: clamp(24px, 5vw, 56px); border: 1px solid var(--line); border-radius: 8px 32px 8px 32px; background: rgba(255,253,245,.98); box-shadow: var(--shadow); }
.report-heading { display: grid; grid-template-columns: 1fr 270px; align-items: center; border-bottom: 1px solid var(--line); }
.report-heading h1 { font-size: clamp(2.7rem, 5vw, 5rem); }
.report-heading > div > p:last-child { color: var(--muted); line-height: 1.5; }
.report-seal { justify-self: end; width: 210px; min-height: 190px; display: grid; place-items: center; align-content: center; gap: 13px; border: 1px solid var(--line); border-radius: 50%; background: radial-gradient(circle, #fff 0 50%, #edf5f0 51%); text-align: center; }
.report-seal img { width: 58px; height: 58px; }
.report-seal span { color: var(--navy); font-family: Georgia, serif; font-size: 1rem; line-height: 1.45; }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 25px 0; }
.report-lab { padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.report-lab h3 { margin: 0 0 12px; color: var(--navy); }
.report-lab p { margin: 8px 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.report-lab p strong { color: var(--ink); }
.evidence-list { display: flex; gap: 6px; flex-wrap: wrap; }
.evidence-list span { padding: 5px 8px; border-radius: 7px; background: var(--soft); color: var(--muted); font-size: .65rem; font-weight: 800; }
.evidence-list span.done { background: #dff5e8; color: #167451; }
.rubric { padding: 18px; border-radius: 13px; background: var(--navy); color: white; }
.rubric h3 { margin: 0 0 9px; }
.rubric p { margin: 0; color: #bcd2d4; line-height: 1.5; }
.rubric strong { color: var(--lime); }
.report-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.secondary { border: 1px solid var(--line); background: white; color: var(--navy); }

footer { width: min(1380px, calc(100% - 36px)); min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: auto; border-top: 1px solid var(--line); color: var(--muted); font-size: .74rem; }

/* Readable learning typography: important text should never look like a footnote. */
.profile-chip, .method-strip span { font-size: .88rem; }
.kicker, .workspace-hero .kicker, .brief-code, .task-heading > span { font-size: .8rem; }
.workspace-hero p:not(.kicker), .research-brief p, .mentor-tip p { font-size: .9rem; line-height: 1.55; }
.lab-tab { min-height: 80px; }
.tab-copy strong { font-size: .96rem; line-height: 1.25; }
.tab-copy small { font-size: .8rem; line-height: 1.3; }
.tab-number, .tab-state { font-size: .8rem; }
.task-heading h3 { font-size: 1.12rem; line-height: 1.3; }
.task-heading p,
.assistant-panel p,
.task-guide dd,
.result-feedback,
.dataset-preview,
.live-explanation,
.observation-table,
.empty-data,
.personal-note,
.experiment-protocol,
.report-lab p { font-size: .9rem; line-height: 1.55; }
.experiment-protocol { gap: 9px; }
.field-label, label { font-size: .88rem; }
.field-note, .score-meta, .target-box span, .signal-viz small, .report-dock strong, footer { font-size: .84rem; line-height: 1.45; }
.assistant-panel strong, .task-guide h4 { font-size: .96rem; }
.assistant-panel small, .task-guide dt, .target-box small, .metric small { font-size: .78rem; }
.task-guide dl > div { grid-template-columns: 138px 1fr; }
.target-box strong { font-size: 1rem; }
.metric strong { font-size: 1.15rem; }
.info-presets button { font-size: .86rem; line-height: 1.35; }
.info-presets strong { font-size: .98rem; }
.primary, .secondary, .report-button, .action-button, input, select { font-size: .95rem; }
.research-board span { font-size: .9rem; }
.research-board b, .research-board small, .course-note, .variant-chip, .evidence-list span { font-size: .78rem; }
footer img { width: 175px; height: 42px; }
footer p { margin: 0; }

@media (max-width: 1100px) {
  .welcome-screen { grid-template-columns: 1fr; }
  .launch-card { margin-top: 70px; }
  .research-grid { grid-template-columns: 1fr 1fr; }
  .research-task.experiment { grid-column: 1 / -1; grid-row: 1; }
  .research-grid.scored-grid { grid-template-columns: 1fr; }
  .scored-grid .research-task.experiment { grid-column: auto; grid-row: auto; }
  .challenge-card { position: static; }
  .mission-stack { position: static; }
  .lab-tabs { grid-template-columns: 1fr 1fr; }
  .hero-formulas { display: none; }
}
@media (max-width: 760px) {
  .topbar { height: 67px; }
  .brand img { width: 185px; height: 45px; }
  .profile-chip { display: none; }
  main { width: min(100% - 20px, 620px); }
  .guest-fields, .research-grid, .theory-band, .report-heading, .report-grid { grid-template-columns: 1fr; }
  .workspace-hero { grid-template-columns: 1fr; min-height: 106px; padding: 15px 18px; }
  .workspace-hero h1 { white-space: normal; font-size: 1.75rem; }
  .workspace-hero p:not(.kicker) { display: none; }
  .lab-tabs { display: flex; overflow-x: auto; padding-bottom: 5px; scroll-snap-type: x mandatory; }
  .lab-tab { min-width: 245px; scroll-snap-align: start; }
  .theory-band, .research-brief { padding: 24px 19px; }
  .research-grid { padding: 10px; }
  .research-task.experiment { grid-column: auto; grid-row: auto; }
  .metrics { grid-template-columns: 1fr; }
  .metrics.four { grid-template-columns: 1fr 1fr; }
  .task-guide dl > div { grid-template-columns: 1fr; gap: 3px; }
  .report-dock { position: static; grid-template-columns: 1fr auto; }
  .report-track { grid-column: 1 / -1; grid-row: 2; }
  .report-seal { justify-self: center; width: 170px; min-height: 170px; }
  .report-actions { flex-direction: column; }
  footer { justify-content: center; }
  footer p { display: none; }
}
@media (max-width: 470px) {
  h1 { font-size: 3.1rem; }
  .welcome-screen { padding: 35px 0; }
  .launch-card { padding: 24px 17px; }
  .research-board > div { grid-template-columns: 1fr; }
  .method-strip span { flex: 1 1 44%; }
  .report-dock { grid-template-columns: 1fr; }
  .report-track { grid-column: auto; grid-row: auto; }
}
@media print {
  .topbar, .lab-tabs, .report-dock, footer, .report-actions { display: none !important; }
  body::before, body::after { display: none; }
  main { width: 100%; }
  .report-screen { display: block !important; margin: 0; border: 0; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
