/* Chapter 1's hub (index.html, hub.mjs, panels.mjs), on shared/hub.css: the zoom's rail of stations under the
   introduction, three genomes compared, and the central dogma. */

/* ---------- The zoom ---------- */
.hero-text{max-width:620px}
.hero-text .display{font-size:clamp(44px,5.2vw,80px)}
.zoom{display:flex;align-items:center;gap:10px;margin-top:24px}
.stations{display:flex;gap:2px;flex-wrap:wrap}
.station{display:flex;align-items:baseline;gap:6px;padding:7px 10px;border-radius:999px;border:1px solid transparent;font-size:11px;color:#9fb0ba;transition:color .2s,border-color .2s,background .2s}
.station .n{font-size:9px;letter-spacing:.12em;color:#6f838f;transition:color .2s}
.station[aria-current=step]{color:var(--ink);border-color:var(--line-2);background:#15222c80}
.station[aria-current=step] .n{color:var(--accent)}
@media(hover:hover){.station:hover{color:var(--ink)}}
.tour{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;border:1px solid var(--line-2);background:#15222c80;color:var(--accent)}
.tour svg{width:15px;height:15px;fill:currentColor}
.tour .replay{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tour:not([data-state=playing]) .pause,.tour:not([data-state=paused]) .play,.tour:not([data-state=ended]) .replay{display:none}
@media(hover:hover){.tour:hover{background:#cfe7e21a}}
.station-text{min-height:3.4em;margin:12px 0 0;max-width:52ch;font-size:13px;line-height:1.65;color:#c7d3da;text-wrap:pretty}

/* ---------- The genome: a second row of columns ---------- */
.differences .columns+.columns{margin-top:clamp(28px,4vw,48px)}

/* ---------- Three genomes ---------- */
.genomes,.dogma{margin-top:72px;border-top:1px solid var(--line);padding-top:28px}
.section-lede{max-width:70ch;margin:-8px 0 26px;font-size:13px;line-height:1.75;color:#b3c1ca;text-wrap:pretty}
.genome-table{width:100%;border-collapse:collapse;font-size:13px}
.genome-table th,.genome-table td{padding:16px 14px 16px 0;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}
.genome-table thead th{padding-top:0;font-size:10px;font-weight:500;letter-spacing:.14em;text-transform:uppercase;color:var(--faint)}
.genome-table tbody th{font-family:var(--serif);font-weight:400;font-size:24px;color:var(--ink);white-space:nowrap}
.genome-table td{color:#c7d3da}
.genome-table .value{display:block;margin-top:6px}
.genome-table small{color:var(--faint)}
.bar{display:block;width:min(100%,240px);height:14px;overflow:visible}
.bar .track{fill:#ffffff12}
.size-bar{color:#86d2ec}.size-bar .fill{fill:#86d2ec}
.gene-bar{color:#ecba82}.gene-bar .fill{fill:#ecba82}.gene-bar .range{fill:#ecba8266}
.shapes{display:block;height:28px;width:auto;max-width:100%}
.shapes .chromosome{fill:#a9b6d8}
.shapes .ring{fill:none;stroke:#a9b6d8;stroke-width:3}
.shapes .extra{fill:none;stroke-width:2}
.shapes .plasmid{stroke:#c9bfd8}.shapes .mitochondrial{stroke:#f2a65a}.shapes .chloroplast{stroke:#9fd46e}
.table-note{max-width:78ch;margin:16px 0 0;font-size:12px;line-height:1.7;color:#8e9ea8}
.table-note.units{margin-top:6px;font-variant-numeric:tabular-nums}

/* ---------- The central dogma ---------- */
.dogma-layout{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:clamp(24px,4vw,64px);align-items:center}
.dogma-figure{margin:0}
.dogma-figure svg{display:block;width:100%;height:auto}
.dogma-figure .strand{fill:none;stroke-width:3.2;stroke-linecap:round}
.dogma-figure .template{stroke:var(--template)}.dogma-figure .coding{stroke:var(--coding);stroke-width:2.4}.dogma-figure .rna{stroke:var(--rna)}
.dogma-figure .bead{fill:#8fc2a0;stroke:#070e17;stroke-width:1.5}
.dogma-figure .node{font-family:var(--serif);font-size:22px;fill:var(--ink);text-anchor:middle}
.dogma-figure .flow{fill:none;stroke:#b3c1ca;stroke-width:1.6}
.dogma-figure .flow.dotted{stroke-dasharray:3 5;stroke-linecap:round}
.dogma-figure .head{fill:#b3c1ca}
.dogma-figure .name{font-size:13px;fill:#dfe7ea}
.dogma-figure .enzyme{font-size:11px;fill:#8e9ea8}
.dogma-figure .link .name{fill:var(--accent)}
.dogma-figure .link:focus-visible{outline:none}
.dogma-figure .link:focus-visible .name{text-decoration:underline}
@media(hover:hover){.dogma-figure .link:hover .name{fill:#f3cfa1}}
.dogma-figure .never{font-size:11px;fill:#7e919d;text-anchor:middle;font-style:italic}
.dogma-text p{margin:0 0 14px;font-size:13px;line-height:1.75;color:#b3c1ca;text-wrap:pretty}

@media(max-width:900px){.dogma-layout{grid-template-columns:1fr}}
@media(max-width:780px){
  .zoom{margin-top:18px}.station{padding:6px 9px}.station .name{font-size:10px}
  .station-text{min-height:4.8em}
  .genome-table thead{display:none}
  .genome-table tr{display:grid;grid-template-columns:1fr;padding:14px 0;border-bottom:1px solid var(--line)}
  .genome-table th,.genome-table td{border:0;padding:4px 0}
}
