/* sci-micrograph: the research site seen through an electron microscope. The family's tokens come from shared.css
   (the main page's, copied by make.py); sizes, buttons and frames follow edu.fatehi.dev's system (learning-site
   atlas.css, README "The look"). Mostly greyscale: the specimen is grey on the blue-black ground, gold is the
   segmentation, the signals and the one action that moves the reader on. */
:root {
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 40px; --s8: 64px;
  --ctl: 40px; --ctl-sm: 32px; --radius: 6px; --radius-lg: 8px;
  --frame: #2A3247; --edge: #3E465C; --edge-hi: #6A7290; --hover: #FFFFFF0D; --press: #FFFFFF17;
  --page-max: 1440px; --gutter: clamp(16px, 5vw, 112px); --measure: 52rem; --side-w: 340px;
  --t-label: 0.72rem; --t-micro: 0.66rem;   /* the two sizes of small mono label: chips, crumbs, bars; and captions inside frames */
  --grey1: #C9CED8; --grey2: #8B92A3; --grey3: #4A5163;
  --gold: #D8B05A; --gold2: #F6DE9C;
  --mono: ui-monospace, 'DejaVu Sans Mono', 'Liberation Mono', monospace;
  --plate: 'Archivo', 'Atkinson Hyperlegible Next', system-ui, sans-serif;
}
html { scrollbar-gutter: stable; }
.wrap { max-width: var(--page-max); padding-inline: var(--gutter); }
/* the brand line, as on edu.fatehi.dev (learning-site/src/atlas.css, "strip"): the family's wordmark, a hairline, then
   this site with its variable on the main page's figure (x1 Research); the header's hairline inside its 56 px */
.strip { border-block-end: 0; box-shadow: inset 0 -1px 0 var(--rule); }
.brand { display: flex; align-items: center; gap: var(--s3); margin: 0; flex: none; font-variant-numeric: normal; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--moon); text-decoration: none; font-family: var(--serif); font-size: 1.15rem; font-weight: 420; line-height: 1.6; }
.wordmark svg { width: 28px; height: 28px; flex: none; color: var(--sodium); }
.site { color: var(--moon); text-decoration: none; font-family: var(--serif); font-size: 1.15rem; font-weight: 420; padding-inline-start: var(--s3); border-inline-start: 1px solid var(--rule); line-height: 1.3; }
.site i { color: var(--sodium); font-style: italic; font-weight: 400; }
.site sub { position: relative; font-size: 0.62em; line-height: 0; vertical-align: baseline; top: 0.3em; color: var(--sodium); margin-inline-end: 6px; }
.wordmark:hover, .site:hover { color: #fff; }
.strip nav a[aria-current="page"] { color: var(--moon); box-shadow: inset 0 -1px 0 var(--sodium); }
.strip nav .ext::after { content: ' \2197'; font-size: 0.8em; opacity: 0.6; }

/* small labels over a group: edu's one style */
.kicker { font-family: var(--sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sodium); margin: 0 0 var(--s2); }
.tag { font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.05em; color: var(--grey2); text-transform: uppercase; }
.tag b { color: var(--moon); font-weight: 600; }
.draft { color: var(--haze); font-style: italic; background: repeating-linear-gradient(135deg, #ffffff06 0 6px, transparent 6px 12px); border: 1px dashed #97A0BE55; border-radius: 4px; padding: 0 4px; }
.num { font-variant-numeric: lining-nums tabular-nums; }

/* buttons: edu's */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: var(--ctl); padding: 0 var(--s4); border: 1px solid var(--edge); border-radius: var(--radius); background: #FFFFFF06; box-shadow: inset 0 1px 0 #FFFFFF0A; color: var(--moon); font-family: var(--sans); font-size: 0.875rem; font-weight: 500; line-height: 1.2; letter-spacing: 0.005em; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s; }
.btn:hover { border-color: var(--edge-hi); background: var(--hover); color: #fff; }
.btn:active { background: var(--press); box-shadow: none; }
.btn:focus-visible { outline-offset: 2px; }
.btn.pri { border-color: var(--sodium); background: var(--sodium); box-shadow: 0 0 0 0 #E9D49C00, inset 0 1px 0 #FFFFFF59; color: #0B1021; font-weight: 600; }
.btn.pri:hover { border-color: #F6E8C3; background: #F6E8C3; box-shadow: 0 0 18px #E9D49C40, inset 0 1px 0 #FFFFFF73; color: #0B1021; }
.btn.pri:active { border-color: #D8C189; background: #D8C189; box-shadow: none; }
.btn.sm { min-height: var(--ctl-sm); padding: 0 var(--s3); font-size: 0.8125rem; }
.btn[aria-pressed="true"] { border-color: var(--sodium); color: var(--sodium); }
/* a square icon button (zoom, close): its own size wins over .btn.sm */
.btn.ibtn { width: var(--ctl-sm); min-height: var(--ctl-sm); padding: 0; font-family: var(--mono); font-size: 15px; }
/* a placeholder in a button's place: not a link, so it does not look like one */
.btn[aria-disabled="true"] { cursor: default; border-style: dashed; box-shadow: none; pointer-events: none; }
/* on a touch screen every control is at least a finger wide */
@media (pointer: coarse) { .databar .btn, .card .btn { min-height: var(--ctl); } .databar .ibtn, .card .ibtn { width: var(--ctl); } }

/* ---------- home ---------- */
.intro { padding-block: var(--s5) var(--s6); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: var(--s5) var(--s8); align-items: start; }   /* the title block and the intro start on one line */
.intro h1 { font-size: var(--t-3xl); font-weight: 300; font-variation-settings: 'opsz' 72; line-height: 1; margin-block-start: var(--s2); }
.intro .heads p { font-size: 1.05rem; color: var(--haze); margin: 0 0 var(--s2); max-width: 44rem; }
.intro .heads p b { color: var(--moon); font-weight: 450; }

/* the instrument: a bezel round the field, a header bar and the data bar under it */
.scope { position: relative; border: 1px solid var(--frame); border-radius: var(--radius-lg); background: #05070D; overflow: hidden; }
.scope .bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s2) var(--s5); flex-wrap: wrap; padding: var(--s1) var(--s3); border-block-end: 1px solid var(--frame); background: #0A0D17; font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.05em; color: var(--grey2); min-height: var(--ctl); }
.scope .bar .left, .scope .bar .right { display: flex; align-items: center; gap: var(--s2) var(--s4); flex-wrap: wrap; }
.scope .bar b { color: var(--moon); font-weight: 600; }
.lamp { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 6px var(--gold); margin-inline-end: 6px; vertical-align: 1px; }
.field { position: relative; touch-action: pan-y; cursor: crosshair; }
.field.zoomed { touch-action: none; cursor: grab; }
.field.dragging { cursor: grabbing; }
.field canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.field .hits { position: absolute; inset: 0; }
.field .hits a { position: absolute; display: block; border-radius: 50%; outline-offset: 2px; }
.field .hits a:focus-visible { outline: 2px solid var(--sodium); }
.databar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s2) var(--s5); min-height: var(--ctl); padding: var(--s1) var(--s3); border-block-start: 1px solid var(--frame); background: #0A0D17; font-family: var(--mono); font-size: var(--t-label); color: var(--grey2); letter-spacing: 0.05em; }
.databar .cells { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); }
.databar .cells span b { color: var(--moon); font-weight: 600; }
.databar .sbar { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.databar .sbar i { display: block; height: 5px; border: 1px solid var(--grey1); border-block-start: 0; }
.databar .ctl { display: flex; gap: var(--s2); align-items: center; }
/* under the time axis's year labels, so it never covers them */
.readout { position: absolute; pointer-events: none; font-family: var(--mono); font-size: var(--t-label); color: var(--grey2); letter-spacing: 0.05em; background: #05070Dcc; padding: var(--s1) var(--s2); border: 1px solid var(--frame); border-radius: 4px; inset-block-start: 28px; inset-inline-end: 8px; opacity: 0; transition: opacity .2s; white-space: nowrap; }
.field:hover .readout { opacity: 1; }
.demo-note { position: absolute; inset-block-end: 10px; inset-inline-start: 50%; transform: translateX(-50%); white-space: nowrap; pointer-events: none; font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.05em; color: var(--night); background: var(--sodium); padding: var(--s1) var(--s2); border-radius: 4px; }

.legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4) var(--s5); padding-block: var(--s5) var(--s8); align-items: start; }
.legend div { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--s3); align-items: start; font-family: var(--sans); font-size: 0.86rem; color: var(--haze); line-height: 1.4; }
.legend canvas { width: 44px; height: 32px; margin-block-start: 2px; }
.legend b { color: var(--moon); font-weight: 500; display: block; }

/* the index of the field: every item once, for the keyboard, a reader and the phone */
.index { padding-block: var(--s6) var(--s8); }
.index h2 { font-size: var(--t-xl); margin-block-end: var(--s4); }
.index table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 0.92rem; }
.index th { text-align: start; font-family: var(--mono); font-size: var(--t-micro); letter-spacing: 0.05em; text-transform: uppercase; color: var(--grey2); font-weight: 400; padding: var(--s2) var(--s3) var(--s2) 0; border-block-end: 1px solid var(--rule); }
.index td { padding: var(--s2) var(--s3) var(--s2) 0; border-block-end: 1px solid var(--rule); vertical-align: baseline; color: var(--haze); }
.index td:first-child { font-family: var(--mono); font-size: var(--t-label); color: var(--grey2); white-space: nowrap; }
.index td a { color: var(--moon); text-decoration: none; font-family: var(--serif); font-size: 1rem; }
.index tr:hover td a, .index tr.on td a { color: var(--sodium); }
.index tr.on td:first-child, .index tr:hover td:first-child { color: var(--sodium); }
.index td a.plink { font-family: var(--sans); font-size: 0.92rem; text-decoration: underline; text-decoration-color: var(--grey2); text-underline-offset: 3px; }   /* the status of a study with a paper opens the paper page */
.index tr.dummy td { opacity: 0.55; }
.index .key { font-family: var(--mono); color: var(--gold); font-size: var(--t-label); white-space: nowrap; }

/* the callout card: the main page's card (dark, gold corner brackets) */
.card { position: fixed; z-index: 20; inset-block-start: 0; inset-inline-start: 0; width: 22rem; max-width: calc(100vw - 24px); background: #0A0D17f5; border: 1px solid var(--frame); border-radius: var(--radius-lg); box-shadow: 0 20px 56px #0009, 0 0 0 1px #E9D49C14; padding: var(--s4); opacity: 0; transform: translateY(4px); transition: opacity .18s, transform .18s; pointer-events: none; }
.card.open { opacity: 1; transform: none; pointer-events: auto; }
.card::before, .card::after { content: ''; position: absolute; width: 12px; height: 12px; border-color: var(--sodium); border-style: solid; opacity: 0.85; }
.card::before { inset-block-start: -1px; inset-inline-start: -1px; border-width: 1px 0 0 1px; border-start-start-radius: var(--radius-lg); }
.card::after { inset-block-end: -1px; inset-inline-end: -1px; border-width: 0 1px 1px 0; border-end-end-radius: var(--radius-lg); }
.card .tag { display: flex; justify-content: space-between; gap: var(--s3); padding-block-end: var(--s2); border-block-end: 1px solid var(--rule); margin-block-end: var(--s2); }
.card h3 { font-size: 1.22rem; font-weight: 420; margin: 0 0 var(--s2); line-height: 1.25; }
.card p { font-size: 0.95rem; line-height: 1.5; color: var(--haze); margin: 0 0 var(--s3); }
.card .meas { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s1) var(--s3); margin: 0 0 var(--s3); font-family: var(--sans); font-size: 0.84rem; color: var(--haze); line-height: 1.4; }
.card .meas b { font-family: var(--mono); font-weight: 400; color: var(--gold2); white-space: nowrap; font-size: var(--t-label); }
.card .row { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.card .x { display: none; }

/* ---------- inner pages: the instrument's frame ---------- */
.crumbs { font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.05em; color: var(--grey2); padding-block-start: var(--s5); display: flex; gap: var(--s2); flex-wrap: wrap; }
.crumbs a { color: var(--grey2); text-decoration: none; } .crumbs a:hover { color: var(--sodium); }
.phead { padding-block: var(--s4) var(--s6); display: grid; gap: var(--s3); }
.phead:last-child { padding-block-end: var(--s8); }   /* the not-found page: the same space above the footer as every page */
.phead + .pgrid { padding-block-start: 0; }   /* one gap (--s6) from the page header to what follows */
.phead h1, .list-page h1 { font-size: clamp(2.4rem, 4vw, 3.2rem); font-weight: 300; font-variation-settings: 'opsz' 72; line-height: 1.08; max-width: 48rem; text-wrap: balance; }
.phead .sub { font-family: var(--sans); color: var(--haze); font-size: 1.02rem; max-width: 46rem; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.05em; text-transform: uppercase; color: var(--grey1); border: 1px solid var(--edge); border-radius: 4px; padding: var(--s1) var(--s2); line-height: 1.2; }
.chip.gold { color: var(--sodium); border-color: #E9D49C66; }

/* the detector readout strip: the milestones as peaks on a line profile */
.strip-readout { border: 1px solid var(--frame); border-radius: var(--radius-lg); background: #05070D; overflow: hidden; }
.strip-readout .bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); flex-wrap: wrap; min-height: var(--ctl-sm); padding: 0 var(--s3); border-block-end: 1px solid var(--frame); background: #0A0D17; font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.05em; color: var(--grey2); }
.strip-readout .bar b { color: var(--moon); font-weight: 600; }
.strip-readout canvas { display: block; width: 100%; height: 248px; }   /* one height on every page (page.js grows it only if labels would not fit) */

.pgrid { display: grid; grid-template-columns: minmax(0, var(--measure)) var(--side-w); gap: var(--s6) clamp(32px, 4vw, 64px); justify-content: space-between; padding-block: var(--s6) var(--s8); }
.pmain > section { margin-block-end: var(--s6); }
.pmain h2 { font-size: var(--t-xl); font-weight: 360; margin: 0 0 var(--s2); }
.pmain p, .pmain li { max-width: var(--measure); }
.pmain ol, .pmain ul { padding-inline-start: 1.2em; margin: 0; }
.pmain li { margin-block-end: var(--s2); }
.pmain > section, .pmain > .keyfig { max-width: var(--measure); }   /* one text width for prose, panels and cards */
.pmain > section:last-child { margin-block-end: 0; }
.pmain > section > :last-child, .pmain > section > :last-child > li:last-child { margin-block-end: 0; }
.pmain li::marker { color: var(--grey2); font-family: var(--mono); font-size: 0.8em; }
.lead { font-size: var(--t-lg); line-height: 1.45; font-weight: 340; }

/* measurement panels: a finding as an instrument's reading */
.meas-list { display: grid; gap: var(--s3); }
.mpanel { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: var(--s4); border: 1px solid var(--frame); border-radius: var(--radius-lg); background: #0A0D17; padding: var(--s3) var(--s4); transition: border-color .2s, background-color .2s; position: relative; }
.mpanel:hover, .mpanel.on { border-color: #E9D49C77; background: linear-gradient(to right, #E9D49C10, #0A0D17 70%); }
.mpanel .val { font-family: var(--mono); font-size: 1.15rem; color: var(--gold2); line-height: 1.3; font-variant-numeric: tabular-nums; }
.mpanel .val small { display: block; font-size: var(--t-micro); letter-spacing: 0.05em; color: var(--grey2); text-transform: uppercase; margin-block-start: var(--s1); }
.mpanel p { margin: 0; font-size: 1rem; line-height: 1.5; }
.mpanel .src { display: block; font-family: var(--mono); font-size: var(--t-micro); letter-spacing: 0.05em; color: var(--grey2); margin-block-start: var(--s2); }
.mpanel .src a { color: var(--grey2); } .mpanel .src a:hover { color: var(--sodium); }

.linkrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--s3); }
.lcard { display: grid; gap: var(--s1); border: 1px solid var(--frame); border-radius: var(--radius-lg); padding: var(--s3) var(--s4); text-decoration: none; color: var(--moon); background: #0A0D17; transition: border-color .2s, background-color .2s; }
.lcard:hover { border-color: var(--edge-hi); background: #10141f; }
.lcard .tag { color: var(--sodium); }
.lcard span:last-child { font-family: var(--serif); font-size: 1.05rem; }
.lcard.dim { border-style: dashed; color: var(--haze); }

/* the right-hand column: one frame, sticky beside the text (edu's habit) */
.pside { position: relative; }
.pside .col { position: sticky; inset-block-start: var(--s5); border: 1px solid var(--frame); border-radius: var(--radius-lg); background: #05070D; overflow: hidden; }
.pside .col .bar { min-height: var(--ctl-sm); padding: 0 var(--s3); border-block-end: 1px solid var(--frame); background: #0A0D17; font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.05em; color: var(--grey2); display: flex; justify-content: space-between; align-items: center; gap: var(--s2); }
.pside .col .bar b { color: var(--moon); font-weight: 600; }
.pside canvas.spec { display: block; width: 100%; aspect-ratio: 1 / 1; }
.pside .facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s2) var(--s4); padding: var(--s3) var(--s4) var(--s4); font-family: var(--sans); font-size: 0.86rem; border-block-start: 1px solid var(--frame); margin: 0; }
.pside .facts dt { font-family: var(--mono); font-size: var(--t-micro); letter-spacing: 0.05em; text-transform: uppercase; color: var(--grey2); padding-block-start: 0.2em; }
.pside .facts dd { margin: 0; color: var(--moon); }

/* paper page: the key figure */
.keyfig { border: 1px solid var(--frame); border-radius: var(--radius-lg); background: #05070D; overflow: hidden; margin-block-end: var(--s6); }
.keyfig canvas { display: block; width: 100%; aspect-ratio: 16 / 5.4; }
.phead h1.long { font-size: clamp(1.8rem, 3vw, 2.5rem); max-width: 56rem; line-height: 1.15; }
.keyfig .bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; min-height: var(--ctl-sm); padding: 0 var(--s3); border-block-end: 1px solid var(--frame); background: #0A0D17; font-family: var(--mono); font-size: var(--t-label); color: var(--grey2); letter-spacing: 0.05em; }
.keyfig .bar b { color: var(--moon); }
.keyfig figcaption { padding: var(--s3) var(--s4); border-block-start: 1px solid var(--frame); max-width: none; font-family: var(--sans); }
.cite { font-family: var(--serif); border-inline-start: 2px solid var(--sodium); padding: var(--s1) 0 var(--s1) var(--s4); margin: 0 0 var(--s4); line-height: 1.55; }
.cite .t { font-style: italic; }
.btnrow { display: flex; flex-wrap: wrap; gap: var(--s2); }
/* a long label wraps inside its button, never past the screen's edge */
.btnrow .btn { white-space: normal; overflow-wrap: anywhere; max-width: 100%; text-align: center; padding-block: var(--s1); }
.pside .facts dd { overflow-wrap: anywhere; }

/* hypothesis page: maturity as focus */
.focus { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s2); }
.focus figure { margin: 0; border: 1px solid var(--frame); border-radius: var(--radius-lg); overflow: hidden; background: #05070D; }
.focus figure.on { border-color: var(--sodium); box-shadow: 0 0 0 1px #E9D49C55; }
.focus canvas { display: block; width: 100%; aspect-ratio: 1 / 0.8; }
.focus figcaption { font-family: var(--mono); font-size: var(--t-micro); letter-spacing: 0.05em; text-transform: uppercase; padding: var(--s1) var(--s2); line-height: 1.4; min-height: calc(2 * 1.4em + 2 * var(--s1)); color: var(--grey2); max-width: none; border-block-start: 1px solid var(--frame); }
.focus figure.on figcaption { color: var(--sodium); }
.evid canvas { display: block; width: 100%; height: 150px; border: 1px solid var(--frame); border-radius: var(--radius-lg); background: #05070D; margin-block-end: var(--s3); }
.evid ul { list-style: none; padding: 0; }
/* the columns hug their contents and still line up from row to row (one grid for the list, each row a subgrid) */
.evid ul { display: grid; grid-template-columns: auto auto minmax(0, 1fr); column-gap: var(--s4); }
.evid li { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; gap: var(--s3) var(--s4); padding: var(--s2) 0; margin: 0; border-block-end: 1px solid var(--rule); font-size: 0.98rem; }
.evid li .d { font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.05em; color: var(--grey2); padding-block-start: 0.2em; }
.evid li .dir { font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.05em; text-transform: uppercase; padding-block-start: 0.2em; }
.evid li .dir.for { color: var(--sodium); } .evid li .dir.against { color: #9FB6F0; }

/* footer additions */
.foot .legal a { white-space: nowrap; }

@media (max-width: 1100px) {
  .pgrid { grid-template-columns: minmax(0, 1fr); }
  .pside { order: -1; }
  .pside .col { position: static; display: grid; grid-template-columns: minmax(0, var(--side-w)) minmax(0, 1fr); }
  .pside .col .bar { grid-column: 1 / -1; }
  .pside .facts { border-block-start: 0; border-inline-start: 1px solid var(--frame); align-content: start; }
  .legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* the side column now sits above the text at the full width: panels, cards and the key figure end at the same
     right edge as the frames above them; prose keeps its line length */
  .pmain > section, .pmain > .keyfig { max-width: none; }
}
@media (max-width: 720px) {
  .intro { grid-template-columns: minmax(0, 1fr); }
  .phead h1, .list-page h1 { font-size: 2.4rem; }
  .intro h1 { font-size: 2.75rem; }
  .scope .bar .right { display: none; }
  .databar { grid-template-columns: minmax(0, 1fr) auto; }
  .databar .cells { grid-column: 1 / -1; order: 3; }
  .legend { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
  .index table th:nth-child(4), .index table td:nth-child(4) { display: none; }
  .card { inset: auto 8px 8px 8px !important; width: auto; max-width: none; transform: translateY(12px); background: #05070D; }
  .readout { display: none; }
  .card .x { display: inline-flex; }
  .pside .col { grid-template-columns: minmax(0, 1fr); }
  .pside .facts { border-inline-start: 0; border-block-start: 1px solid var(--frame); }
  .strip-readout canvas { height: 230px; }
  .keyfig canvas { aspect-ratio: 1 / 1.25; }
  .keyfig .bar > :last-child { display: none; }
  .keyfig .bar { padding-block: var(--s2); line-height: 1.4; }   /* a title that wraps keeps its space inside the bar */
  .mpanel { grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
  .focus { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* on a phone each entry is date and direction on one line, its text the full width under them */
  .evid ul { display: block; }
  .evid li { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s3); }
  .evid li .d, .evid li .dir { padding-block-start: 0; }
  .evid li > span:last-child { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .card, .btn, .mpanel { transition: none; } }
.by-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .by-mouse { display: none; } .by-touch { display: inline; } }
/* the Publications list: group headings; on a phone the status (with the paper's link) and the date move under the
   item's title, so the Status and When columns can go without losing a link */
.index tr.grp th { font-family: var(--sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sodium); padding: var(--s5) 0 var(--s2); border-block-end: 1px solid var(--rule); }
.index tbody:first-of-type tr.grp th { padding-block-start: var(--s3); }
.index .on-phone { display: none; }
@media (max-width: 720px) {
  .index table th:nth-child(3), .index table td:nth-child(3), .index table th:nth-child(4), .index table td:nth-child(4) { display: none; }
  .index .on-phone { display: block; margin-block-start: var(--s1); font-size: 0.86rem; color: var(--haze); }
}
@media (max-width: 720px) { .pside canvas.spec { aspect-ratio: 1 / 0.8; } }

/* sci-micrograph-phase-portrait: the legend in two groups, one per instrument */
.legend .lgrp { grid-column: 1 / -1; margin: 0; font-family: var(--mono); font-size: var(--t-micro); letter-spacing: 0.05em; text-transform: uppercase; color: var(--grey2); border-block-end: 1px solid var(--rule); padding-block-end: var(--s1); }
.legend .lgrp:not(:first-child) { margin-block-start: var(--s2); }

/* the Bio-images legend's note: every study has its own shape (2026-11-21) */

/* live site (2026-11-21): what were inline styles in the prototype, which the site's Content-Security-Policy forbids */
.dum { color: var(--sodium); }
.mhist { margin-top: var(--s3); }
h3.hh { font-size: 1.05rem; margin: var(--s4) 0 var(--s2); font-family: var(--sans); font-weight: 500; }
h3.hh.first { margin-top: 0; }

/* the site mark's sprite, hidden (was an inline style) */
.sprite { position: absolute; }

/* the Publications and Literature pages (2026-11-21) */
.list-page { padding-block: var(--s5) var(--s8); }
.list-page > .kicker, .list-page h1 { margin-block-end: var(--s3); }
.list-page .lede { font-family: var(--sans); font-size: 1.02rem; line-height: 1.6; color: var(--haze); max-width: 46rem; margin: 0; }   /* the same intro line as an inner page's .sub */

/* a study's Paper block: the paper's card the full width, then Preprint, Code and Dataset as equal cards in one row
   (one under the other on a phone) */
.linkrow.paperrow { display: flex; flex-wrap: wrap; }
.paperrow > .lcard { flex: 1 1 0; min-width: 0; }
.paperrow > .lcard.main { flex-basis: 100%; }
.paperrow > .lcard span:last-child { overflow-wrap: anywhere; }
@media (max-width: 720px) { .paperrow > .lcard { flex-basis: 100%; } }
/* the paper page's buttons on a phone: one under another, the full width, as edu's */
@media (max-width: 720px) { .btnrow { display: grid; grid-template-columns: minmax(0, 1fr); } .btnrow .btn { width: 100%; } }

/* the milestones as a list under the readout, when on a phone too many fall close together to label on the chart */
.ro-list { list-style: none; margin: 0; padding: var(--s2) var(--s3) var(--s3); border-block-start: 1px solid var(--frame); background: #0A0D17; display: grid; gap: var(--s2); font-family: var(--sans); font-size: 0.9rem; color: var(--moon); }
.ro-list[hidden] { display: none; }
.ro-list li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: var(--s3); }
.ro-list b { font-family: var(--mono); font-size: var(--t-label); font-weight: 600; color: var(--gold2); padding-block-start: 0.2em; }

/* the Publications page as a paper list (2026-11-22): title, authors, then venue · status · year and the preprint */
.pubgrp { margin-block-start: var(--s6); max-width: var(--measure); }
.pubgrp h2.kicker { border-block-end: 1px solid var(--rule); padding-block-end: var(--s2); line-height: inherit; }
.publist { list-style: none; margin: 0; padding: 0; }
.publist li { padding-block: var(--s4); border-block-end: 1px solid var(--rule); }
.publist .pt { display: block; font-family: var(--serif); font-size: 1.12rem; line-height: 1.35; color: var(--moon); text-decoration: none; }
/* a paper's title opens its explanation: underlined in gold like the site's other text links */
.publist a.pt { text-decoration: underline; text-decoration-color: rgba(216, 176, 90, 0.55); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a.pt:hover, a.pt:focus-visible { color: var(--sodium); text-decoration-color: var(--sodium); }
.publist .pa { margin: var(--s2) 0 0; font-family: var(--sans); font-size: 0.9rem; color: var(--haze); }
.publist .pa b { color: var(--moon); font-weight: 500; }
.publist .pv { margin: var(--s1) 0 0; font-family: var(--sans); font-size: 0.86rem; color: var(--grey2); }
.publist .pt + .pv { margin-block-start: var(--s2); }   /* an entry with no authors line (In preparation): the same title-to-text gap
   as the others */
.publist .pv a { color: var(--moon); text-underline-offset: 3px; text-decoration-color: var(--grey2); }
.publist .pv a:hover { color: var(--sodium); }

/* short pages (Literature, Publications, the not-found page): the footer sits at the bottom of the window */
body:is([data-page="literature"], [data-page="publications"], [data-page="notfound"]) { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body:is([data-page="literature"], [data-page="publications"], [data-page="notfound"]) > main { flex: 1 0 auto; width: 100%; }

/* the footer exactly as on the main site (Arash, 2026-11-22: the Colophon's place was wrong): the page's margins and
   width are the main site's (:root), so header, content and footer share one left edge; the Colophon keeps its
   line length */
.foot .colophon { max-width: 62ch; }

/* the side column across the page (721 to 1100 px wide): the picture at a fixed width beside the facts, a little
   less tall than wide, and the facts as ruled rows, so the two sides end close to each other */
@media (min-width: 721px) and (max-width: 1100px) {
  .pside .col { grid-template-columns: 300px minmax(0, 1fr); }
  .pside canvas.spec { aspect-ratio: 4 / 3; }
  .pside .facts { grid-template-columns: max-content minmax(0, 1fr); gap: 0 var(--s5); padding: var(--s1) var(--s5); align-items: baseline; }
  .pside .facts dt, .pside .facts dd { padding-block: var(--s2); border-block-end: 1px solid var(--rule); }
  .pside .facts dt:nth-last-of-type(1), .pside .facts dd:last-of-type { border-block-end: 0; }
}

/* last polish items (2026-11-22): link cards keep their label and title at the top when a neighbour's title wraps;
   the stacked specimen panel's short facts list sits in the middle of the picture's height; Region A's legend fills
   whole rows at laptop width; a long panel subtitle ends in an ellipsis on a phone instead of wrapping one word */
.lcard { align-content: start; }
@media (min-width: 721px) and (max-width: 1100px) {
  .pside .facts { align-content: center; }
  .legend { grid-template-columns: repeat(4, minmax(0, 1fr)); }   /* four, as at 1440: no item left alone in a row */
}
@media (max-width: 480px) {
  .keyfig .bar .sub, .keyfig .bar small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}
