/* Tree of Experiments: ink on warm paper. Galvani's frog is the trunk; below it one column per discipline
   (physics, biology, mathematics, computer science), each with its own colour and a heading where it enters the
   story. Lines show who built directly on whom; the oldest is at the top.
   Desktop (body.fit, set by main.js): one screen, no page scroll. Smaller screens: the page scrolls, and the
   chosen experiment opens in a sheet over the bottom of the screen (docked on the right on wide tablets). */
:root {
  --paper: #f4eee2;
  --paper-2: #ebe3d2;
  --ink: #261d16;
  --ink-2: #4c4137;
  --mute: #7a6d60;
  --line: rgba(38, 29, 22, .14);
  --trunk: #3b2c20;
  --field: #261d16;
  --phys: #24609f;
  --bio: #b8462a;
  --math: #8a3d7d;
  --cs: #1b7a5a;
  --gold: #b07f08;
  --gold-soft: rgba(246, 199, 64, .5);
  --sans: "IBM Plex Sans Condensed", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --side-w: clamp(350px, 28vw, 520px);
  --t-title: 30px; --t-text: 16px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--serif); }
/* a faint paper grain */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(120, 90, 60, .08) 1px, transparent 1.2px), radial-gradient(rgba(120, 90, 60, .05) 1px, transparent 1.2px);
  background-size: 7px 7px, 11px 11px; background-position: 0 0, 3px 5px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--bio); outline-offset: 2px; border-radius: 4px; }
a { color: var(--ink); }
.lane-trunk { --c: var(--trunk); } .lane-field { --c: var(--field); } .lane-phys { --c: var(--phys); }
.lane-bio { --c: var(--bio); } .lane-math { --c: var(--math); } .lane-cs { --c: var(--cs); }
.crown { width: 13px; height: 9px; flex: none; fill: var(--gold); }

/* ---------------------------------------------------------------- page header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 16px 12px; }
.top h1 { margin: 0; font: 600 17px/1.2 var(--sans); letter-spacing: .01em; }
.top .sub { margin: 3px 0 0; font: 400 14px/1.35 var(--serif); color: var(--ink-2); }
.top cite { font-style: italic; }
.link-btn { flex: none; background: none; border: 1px solid rgba(38, 29, 22, .22); border-radius: 999px; padding: 6px 14px; font: 500 13px/1 var(--sans); color: var(--ink-2); cursor: pointer; }
.link-btn:hover { border-color: rgba(38, 29, 22, .5); color: var(--ink); }

/* ---------------------------------------------------------------- the tree */
.tree { position: relative; }
/* the discipline columns: tinted, each headed where the discipline enters the story */
.lanes { position: absolute; inset: 0; pointer-events: none; }
.lane { position: absolute; border-top: 3px solid var(--c); border-radius: 3px 3px 0 0; transition: opacity .3s;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--c) 11%, transparent), color-mix(in srgb, var(--c) 5%, transparent) 260px); }
.lane-head { margin: 0; padding: 8px 10px 0 27px; font: 700 12.5px/1 var(--sans); letter-spacing: .15em; text-transform: uppercase; color: var(--c); white-space: nowrap; }
.lane-head span { font-weight: 600; letter-spacing: .1em; opacity: .7; }
.lane-legend { display: none; }
.branches { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.br { fill: none; stroke-width: 2.2; stroke-linecap: round; transition: opacity .25s, stroke-width .2s; }
.br.trunk { stroke-width: 7; stroke-linecap: butt; }
.br.across { stroke-width: 1.7; }
.br.also { opacity: 0; }
.br.on { opacity: 1; stroke-width: 3.4; }
.br.dim { opacity: .12; }
.grid line { stroke: rgba(38, 29, 22, .1); stroke-width: 1; }

.ruler { position: absolute; left: 0; top: 0; bottom: 0; width: var(--gutter, 52px); pointer-events: none; }
.tick { position: absolute; right: 8px; transform: translateY(-50%); font: 500 11.5px/1 var(--sans); color: var(--mute); font-variant-numeric: tabular-nums; }

/* an experiment: a dot on its line, the label beside it */
.node { position: absolute; left: 0; top: 0; transform: translate(var(--x, 0), var(--y, 0)); z-index: 1; display: block; max-width: calc(var(--lab-w) + 20px);
  padding: 0 0 0 20px; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; transition: opacity .3s; -webkit-tap-highlight-color: transparent; }
.ready .node { transition: opacity .3s, transform .45s ease; }
.node .dot { position: absolute; left: 2px; top: 5px; z-index: 1; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--c); background: var(--paper);
  transition: transform .2s, box-shadow .2s; }
.node.major .dot { left: -1.5px; top: 1.5px; width: 18px; height: 18px; background: var(--c); display: grid; place-items: center;
  font: 700 10px/1 var(--sans); color: var(--paper); font-variant-numeric: tabular-nums; }
.node .lab { position: relative; z-index: 1; display: block; padding: 1px 5px 2px; border-radius: 5px; background: var(--paper); }
/* one flowing line where the column is wide enough: the year and names in the column's colour, then the words */
.node .lab { font-size: 12px; line-height: 1.3; }                /* a small strut, so a line is only as tall as its text */
.node .yr { display: inline; font: 500 11.5px/1.3 var(--sans); color: var(--c); letter-spacing: .01em; }
.node .yr b { font-weight: 700; }
.node .ph { display: inline; margin-left: 5px; font: 400 12.5px/1.3 var(--serif); color: var(--ink-2); }
.node.major .yr { font-size: 12.5px; }
.node.major .ph { font-size: 14px; font-weight: 500; color: var(--ink); }
.node:hover .ph, .node:focus-visible .ph { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--c) 55%, transparent); text-underline-offset: 2px; }
.node:hover .dot { transform: scale(1.18); }
.node.sel { z-index: 3; }
.node.sel .dot { transform: scale(1.3); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 24%, transparent); }
.node.sel .lab { background: #efe0c2; box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--c) 45%, transparent); }
.node.sel .ph { color: var(--ink); font-weight: 650; }
.node.hov { z-index: 2; }
.node.dim { opacity: .3; }
.node:hover { z-index: 4; }
/* an experiment that won its authors the Nobel Prize: a golden glow, a crown and the year of the prize */
.halo { position: absolute; left: -16px; top: -13px; width: 47px; height: 47px; border-radius: 50%; z-index: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(246, 199, 64, .85) 0, rgba(246, 199, 64, .45) 38%, rgba(246, 199, 64, 0) 70%); }
.node.nobel .lab { background: linear-gradient(100deg, #f6dc93, #f5e8c6 55%, var(--paper)); }
.node.nobel.sel .lab { background: linear-gradient(100deg, #f4d47c, #efe0c2 70%); }
.nb { display: inline-flex; align-items: center; gap: 3px; margin-left: 7px; vertical-align: 1px; white-space: nowrap;
  font: 700 10px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
/* a discipline's first experiment that joins from outside the tree (Golgi and Cajal: from the microscope) */
.graft { position: absolute; left: 7.5px; bottom: calc(100% + 2px); transform: translateX(-50%); padding: 0 4px; white-space: nowrap;
  background: color-mix(in srgb, var(--paper) 80%, transparent); font: italic 400 12px/1.2 var(--serif); color: var(--c); }
.node.nobel .graft { bottom: calc(100% + 13px); }
/* the field itself: where the branches meet */
.node.band { width: var(--band-w); max-width: none; padding: 11px 18px 12px; text-align: center; border-radius: 14px; background: var(--ink); color: var(--paper);
  box-shadow: 0 10px 28px rgba(38, 29, 22, .18); }
.node.band .dot { display: none; }
.node.band .lab { background: none; padding: 0; }
.node.band .yr { color: #e6c7a5; font-size: 12.5px; }
.node.band .ph { color: var(--paper); font: 600 18px/1.25 var(--serif); }
.node.band:hover .ph { text-decoration-color: rgba(244, 238, 226, .6); }
.node.band.sel { box-shadow: 0 0 0 4px rgba(184, 70, 42, .35), 0 10px 28px rgba(38, 29, 22, .2); }
.node.band.sel .lab { background: none; box-shadow: none; }
/* big screens: bigger labels */
.tree.roomy .node .yr { font-size: 13px; } .tree.roomy .node.major .yr { font-size: 14px; }
.tree.roomy .node .ph { font-size: 14px; } .tree.roomy .node.major .ph { font-size: 16px; }
.tree.roomy2 .node .yr { font-size: 14.5px; } .tree.roomy2 .node.major .yr { font-size: 15.5px; }
.tree.roomy2 .node .ph { font-size: 15.5px; } .tree.roomy2 .node.major .ph { font-size: 18px; }
.tree.roomy2 .node.band .ph { font-size: 21px; } .tree.roomy2 .lane-head { font-size: 14px; }
/* busy screens: smaller labels, then only the main stops keep their words (the rest show them on hover) */
.tree.compact .node .yr { font-size: 11px; }
.tree.compact .node .ph { font-size: 12px; }
.tree.compact .node.major .ph { font-size: 13px; }
.tree.compact2 .node:not(.major):not(.sel):not(.band) .ph { display: none; }
.ph-t { display: none; }
.tree.compact3 .node.major:not(.band) .ph { display: none; }
.tree.compact3 .node.major .ph-t, .tree.compact4 .node.major .ph-t { display: inline; margin-left: 5px; font: 500 12.5px/1.25 var(--serif); color: var(--ink); }
.tree.compact3 .node.band { padding: 8px 16px 9px; }
.tree.compact3 .node.band .ph { font-size: 16px; }
.tree.compact4 .node:not(.band) .ph { display: none; }
.tree.compact5 .node:not(.band) .ph, .tree.compact5 .node .ph-t { display: none !important; }
.tree.compact5 .nb { font-size: 0; gap: 0; margin-left: 4px; }                   /* only the crown */
.tree.compact5 .node .yr { font-size: 10.5px; }
.tree.compact2 .node:not(.major):not(.band):hover .ph, .tree.compact2 .node:not(.major):not(.band):focus-visible .ph,
.tree.compact3 .node.major:not(.band):hover .ph, .tree.compact3 .node.major:not(.band):focus-visible .ph,
.tree.compact4 .node:not(.band):hover .ph, .tree.compact4 .node:not(.band):focus-visible .ph {
  display: block; position: absolute; left: 0; top: calc(100% + 3px); z-index: 5; width: max-content; max-width: 220px; padding: 5px 8px 6px;
  border-radius: 8px; background: var(--paper); box-shadow: 0 6px 18px rgba(38, 29, 22, .2); white-space: normal; text-decoration: none; }
.tree.scroll { overflow-y: auto; scrollbar-width: thin; }

/* ---------------------------------------------------------------- the chosen experiment */
.panel { min-height: 0; }
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 12px; font: 500 12.5px/1.3 var(--sans); color: var(--mute); letter-spacing: .03em; text-transform: uppercase; }
.k-year { display: none; }
.lane-tag { display: inline-flex; align-items: center; gap: 7px; color: var(--c); font-weight: 700; letter-spacing: .1em; }
.lane-tag::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.p-year { margin: 0; font: 600 16px/1.2 var(--sans); color: var(--ink-2); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.p-title { margin: 3px 0 6px; font: 600 var(--t-title)/1.1 var(--serif); letter-spacing: -.012em; text-wrap: balance; }
.p-who { margin: 0 0 12px; font: 500 14.5px/1.35 var(--sans); color: var(--ink-2); }
.p-nobel { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 12px; padding: 8px 11px; border-radius: 10px;
  background: linear-gradient(100deg, rgba(246, 199, 64, .45), rgba(246, 199, 64, .14)); font: 400 13.5px/1.35 var(--sans); color: var(--ink-2); }
.p-nobel .crown { width: 17px; height: 12px; margin-top: 2px; }
.p-nobel b { display: block; font-weight: 700; color: var(--ink); letter-spacing: .02em; }
.p-did { margin: 0 0 14px; font-size: var(--t-text); line-height: 1.5; text-wrap: pretty; }
/* What they did / Built on and led to: tabs only when the panel is too short for both */
.p-tabs { display: none; gap: 4px; margin: 0 0 10px; }
.p-tabs [role=tab] { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--ink-2); font: 600 13px/1.2 var(--sans); cursor: pointer; }
.p-tabs [role=tab]:hover { border-color: rgba(38, 29, 22, .4); color: var(--ink); }
.p-tabs [role=tab][aria-selected=true] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.p-tabs span { margin-left: 3px; font-weight: 500; opacity: .7; }
.panel.tabbed .p-tabs { display: flex; flex-wrap: wrap; }
.panel.tabbed .p-sec { display: none; }
.panel.tabbed[data-view="story"] .p-story, .panel.tabbed[data-view="built"] .p-built, .panel.tabbed[data-view="led"] .p-led { display: block; }
.p-story { margin-bottom: 12px; }
.panel.tabbed .p-story { margin-bottom: 0; }
.rel-h { margin: 0 0 4px; font: 700 12px/1.2 var(--sans); color: var(--mute); text-transform: uppercase; letter-spacing: .1em; }
.rels { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 2px; }
.rel-row { display: block; width: 100%; padding: 5px 8px 6px; margin-left: -8px; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; transition: background-color .15s;
  font-size: 13px; line-height: 1.35; }
.rel-row:hover, .rel-row:focus-visible { background: color-mix(in srgb, var(--c) 9%, transparent); }
.rr-who { display: flex; align-items: center; gap: 7px; font: 600 13.5px/1.3 var(--sans); color: var(--c); }
.rr-who b { font-weight: 700; }
.rr-who .cdot, .key .cdot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.rr-why { display: block; margin-top: 1px; padding-left: 16px; font: 400 14.5px/1.4 var(--serif); color: var(--ink-2); }
.rel-none { margin: 0 0 12px; font: italic 14.5px/1.4 var(--serif); color: var(--c, var(--ink-2)); }
.p-orig { margin: 0; font: italic 400 13.5px/1.45 var(--serif); color: var(--mute); }
.p-orig span { margin-right: 6px; font: 700 11.5px/1 var(--sans); font-style: normal; text-transform: uppercase; letter-spacing: .1em; }
.key { list-style: none; margin: 2px 0 16px; padding: 0; display: grid; gap: 7px; font: 700 13.5px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.key li { display: flex; align-items: center; gap: 9px; color: var(--c); }
.nb-key { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: 6px; background: rgba(246, 199, 64, .4);
  font: 700 11px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }

/* Back and Next: the main controls, under the chosen experiment */
.steps { display: flex; gap: 10px; }
.steps button { height: 58px; border-radius: 14px; cursor: pointer; }
.steps .arr { font: 600 19px/1 var(--sans); }
.steps .prev { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 0 18px 0 14px; background: none; border: 1.5px solid rgba(38, 29, 22, .3); color: var(--ink); font: 600 15px/1 var(--sans); }
.steps .prev:hover:not(:disabled) { border-color: var(--ink); }
.steps .prev:disabled { opacity: .3; cursor: default; }
.steps .next { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-content: center; column-gap: 12px; row-gap: 4px; padding: 0 18px 0 20px;
  background: var(--ink); color: var(--paper); border: 0; text-align: left; box-shadow: 0 8px 22px rgba(38, 29, 22, .22); transition: background-color .15s, box-shadow .15s; }
.steps .next:hover { background: #3a2c21; box-shadow: 0 8px 26px rgba(38, 29, 22, .32); }
.steps .next .arr { grid-area: 1 / 2 / 3 / 3; transition: transform .15s; }
.steps .next:hover .arr { transform: translateX(3px); }
.steps .n-l { grid-area: 1 / 1; font: 700 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; opacity: .62; }
.steps .n-t { grid-area: 2 / 1; font: 600 17px/1.2 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-close { display: none; }

/* ---------------------------------------------------------------- sources */
.sources { max-width: min(680px, calc(100vw - 32px)); max-height: min(80vh, 720px); padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); color: var(--ink); box-shadow: 0 20px 60px rgba(38, 29, 22, .3); }
.sources::backdrop { background: rgba(38, 29, 22, .35); }
.sources-in { padding: 22px 24px 18px; }
.sources h2 { margin: 0 0 10px; font: 600 22px/1.2 var(--serif); }
.sources p { margin: 0 0 12px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.sources ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14.5px; line-height: 1.4; }
.sources a { text-decoration-color: rgba(38, 29, 22, .35); }
.sources .close { position: sticky; bottom: 0; margin-top: 14px; padding: 9px 16px; border-radius: 999px; border: 0; background: var(--ink); color: var(--paper); font: 600 14px/1 var(--sans); cursor: pointer; }

/* ================================================================ desktop: everything on one screen */
body.fit { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
body.fit .swb-bar { flex: none; }
body.fit .top { position: absolute; top: 0; left: 236px; right: 24px; height: 82px; padding: 0; z-index: 6; pointer-events: none; }
body.fit .top > * { pointer-events: auto; }
body.fit .app { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) var(--side-w); }
body.fit .treecol { min-height: 0; padding: 6px 22px 16px 14px; }
body.fit .tree { height: 100%; }
body.fit .side { min-height: 0; display: flex; flex-direction: column; padding: 22px 28px 18px; border-left: 1px solid var(--line); background: color-mix(in srgb, var(--paper-2) 70%, transparent); }
body.fit .panel { flex: 1 1 auto; overflow: hidden; }
body.fit .panel.tight { --t-title: 26px; --t-text: 15px; }
body.fit .panel.tight .p-did { line-height: 1.45; margin-bottom: 10px; }
body.fit .panel.tight .rr-why { font-size: 14px; }
body.fit .panel.tighter { --t-title: 23px; --t-text: 14.2px; }
body.fit .panel.tighter .kicker { margin-bottom: 8px; }
body.fit .panel.tighter .p-who { margin-bottom: 8px; }
body.fit .panel.tighter .rr-why { font-size: 13.4px; line-height: 1.35; }
body.fit .panel.tighter .rel-row { padding: 3px 8px 4px; }
body.fit .panel.tightest { --t-title: 21px; --t-text: 13.6px; }
body.fit .panel.tightest .p-did { line-height: 1.38; margin-bottom: 8px; }
body.fit .panel.tightest .p-who { font-size: 13px; }
body.fit .panel.tightest .p-year { display: none; }
body.fit .panel.tightest .k-year { display: inline; color: var(--ink-2); font-weight: 600; }
body.fit .panel.tightest .p-nobel { padding: 5px 9px; font-size: 12.5px; }
body.fit .panel.tightest .rr-who { font-size: 12.5px; }
body.fit .panel.tightest .rr-why { font-size: 12.8px; }
body.fit .panel.tightest .rels { margin-bottom: 8px; gap: 0; }
body.fit .panel.tightest .rel-row { padding: 2px 8px 3px; }
body.fit .panel.tightest .rr-why { line-height: 1.3; }
/* at the tightest, each link is one flowing line: who, then what was taken */
body.fit .panel.tightest .rr-who { display: inline-flex; margin-right: 5px; }
body.fit .panel.tightest .rr-why { display: inline; padding-left: 0; }
body.fit .panel.tightest .p-orig { font-size: 12.5px; line-height: 1.35; }
body.fit .panel.scroll { overflow-y: auto; scrollbar-width: thin; }
body.fit .steps { flex: none; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-height: 760px) { body.fit .steps { margin-top: 10px; padding-top: 10px; } body.fit .steps button { height: 50px; } body.fit .steps .n-t { font-size: 16px; }
  body.fit .side { padding: 16px 24px 14px; } }
@media (min-width: 1700px) and (min-height: 900px) { :root { --t-title: 34px; --t-text: 17px; } .rr-why { font-size: 15.5px; } }

/* ================================================================ smaller screens: the page scrolls */
body:not(.fit) .treecol { padding: 6px 16px 150px; }
body:not(.fit) .ruler, body:not(.fit) .lane-head { display: none; }
body:not(.fit) .lane { border-top: 0; border-radius: 7px; background: color-mix(in srgb, var(--c) 12%, transparent); }
body:not(.fit) .lane-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; max-width: 640px; margin: 0 auto 14px; padding: 0; list-style: none;
  font: 700 11.5px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
body:not(.fit) .lane-legend li { display: flex; align-items: center; gap: 6px; color: var(--c); }
body:not(.fit) .lane-legend .cdot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
body:not(.fit).sheet .treecol { padding-bottom: 72vh; }
body:not(.fit) .tree { max-width: 640px; margin: 0 auto; }
body:not(.fit) .node { width: 100%; max-width: none; padding: 0 0 0 var(--label-x); }
body:not(.fit) .node .dot { left: calc(var(--dx) - 5.5px); top: 5px; }
body:not(.fit) .node.major .dot { left: calc(var(--dx) - 9px); top: 1.5px; }
body:not(.fit) .halo { left: calc(var(--dx) - 23.5px); }
body:not(.fit) .node .lab { padding: 0 4px 1px; }
body:not(.fit) .node:not(.nobel) .lab { background: none; }
body:not(.fit) .node .yr { font-size: 12.5px; }
body:not(.fit) .node .ph { font-size: 15px; }
body:not(.fit) .node.major .ph { font-size: 16px; }
body:not(.fit) .graft { position: static; display: block; transform: none; margin: 0 0 1px; padding: 0 4px; background: none; font-size: 12.5px; text-align: left; }
body:not(.fit) .node.band { padding: 14px 16px; }
/* the chosen experiment: a sheet over the bottom of the screen, with Back and Next always at hand */
body:not(.fit) .side { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; flex-direction: column; max-height: 68vh; max-height: 68dvh;
  background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(38, 29, 22, .16); }
body:not(.fit) .panel { display: none; overflow-y: auto; padding: 20px 18px 12px; overscroll-behavior: contain; }
body:not(.fit).sheet .panel { display: block; }
body:not(.fit).sheet .sheet-close { display: grid; place-items: center; position: absolute; top: 10px; right: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper); font: 400 24px/1 var(--sans); color: var(--ink-2); cursor: pointer; }
body:not(.fit) .kicker { padding-right: 44px; }
body:not(.fit) .steps { flex: none; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper-2); }
body:not(.fit) .steps button { height: 52px; }
body:not(.fit) .steps .next { padding: 0 16px; }
body:not(.fit) .steps .n-l { font-size: 10.5px; }
body:not(.fit) .steps .n-t { font-size: 16px; }
/* wide but not desktop (a tablet held sideways, a short window): the tree on the left, the chosen experiment docked on the right */
@media (min-width: 960px) {
  body:not(.fit) .tree, body:not(.fit) .lane-legend { margin-left: 0; max-width: calc(100vw - 440px - 56px); }
  body:not(.fit) .side { left: auto; top: 0; width: 440px; max-height: none; border-left: 1px solid var(--line); border-top: 0; box-shadow: -10px 0 30px rgba(38, 29, 22, .1); }
  body:not(.fit) .panel, body:not(.fit).sheet .panel { display: block; flex: 1 1 auto; }
  body:not(.fit).sheet .sheet-close { display: none; }
  body:not(.fit) .kicker { padding-right: 0; }
  body:not(.fit).sheet .treecol { padding-bottom: 150px; }
  body:not(.fit) .top { padding-right: 456px; }
}
@media (max-width: 560px) { :root { --t-title: 25px; --t-text: 15.5px; } .top { padding: 0 16px 10px; } .top h1 { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
