/* ---------- Home: lead ---------- */
.lead { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-areas: "copy fig" "copy side"; gap: 26px 44px; padding-top: 10px; }
.lead-copy { grid-area: copy; display: flex; flex-direction: column; gap: 18px; }
.lead-kick, .st-kick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font: 500 12.5px var(--f-mono); color: var(--mute); }
.lead h1 { font-size: clamp(30px, 3.7vw, 48px); line-height: 1.1; }
.lead h1 a { text-decoration: none; }
.lead h1 a:hover { color: var(--petrol); }
.lead-dek { font-size: 19px; color: var(--ink-2); max-width: 46ch; }
.lead-gauge { padding: 18px 18px 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.lead-gauge p { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.lead-gauge a { display: inline-flex; align-items: center; font-weight: 600; text-decoration: none; }
.lead-gauge code { font-size: 12.5px; color: var(--ink-2); }
.read-q { margin: 0; padding: 16px 20px; border-radius: var(--r); background: var(--apricot-t); color: var(--ink); font-size: 16.5px; line-height: 1.55; }
.read-q span { display: block; font: 600 11px var(--f-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--on-apricot); margin-bottom: 6px; }
:root[data-theme="dark"] .read-q span { color: var(--apricot); }
.read-q.big { font-size: 18.5px; margin-bottom: 30px; }
.lead-fig { grid-area: fig; margin: 0; position: relative; }
.lead-fig img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r); }
.keynum { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 12px; background: var(--petrol-deep); color: var(--on-petrol); max-width: 260px; }
.lead-fig .keynum { position: absolute; left: 14px; bottom: 14px; }
.keynum b { font: 800 30px/1.1 var(--f-disp); color: var(--apricot); letter-spacing: -0.02em; }
.keynum span { font-size: 13px; line-height: 1.35; opacity: .9; }
.keynum.solo { max-width: none; margin-bottom: 18px; padding: 18px; }
.keynum.solo b { font-size: 40px; }
.lead-side { grid-area: side; }
.side-h { font: 600 11.5px var(--f-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--mute); padding-bottom: 6px; border-bottom: 2px solid var(--ink); }

/* ---------- Home: the track ---------- */
.track-tools { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.cls-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.sort { display: inline-flex; align-items: center; gap: 8px; font: 600 11.5px var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); }
.sort select, .fsel select { padding: 8px 32px 8px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23627880' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; appearance: none; font: 500 14px var(--f-body); color: var(--ink); text-transform: none; letter-spacing: 0; }
.tr { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tr-head, .tr-row { display: grid; grid-template-columns: minmax(210px, 1.05fr) minmax(0, 3fr) 132px; align-items: center; gap: 18px; padding: 10px 18px; }
.tr-head { background: var(--bg-2); font: 600 11px var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); padding-top: 12px; padding-bottom: 12px; }
.tr-stages { display: grid; grid-template-columns: repeat(5, 1fr); }
.tr-stages span { display: flex; gap: 6px; align-items: baseline; padding-left: 8px; border-left: 1px solid var(--line); }
.tr-stages b { color: var(--ink); font-weight: 600; }
.tr-row { border-top: 1px solid var(--line-2); transition: background .12s; }
.tr-row:hover { background: color-mix(in srgb, var(--bg) 60%, var(--card)); }
.tr-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tr-name a { text-decoration: none; min-width: 0; }
.tr-name b { display: block; font-weight: 600; font-size: 15px; line-height: 1.25; }
.tr-name small { display: block; color: var(--mute); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-name a:hover b { color: var(--petrol); text-decoration: underline; }
.tr-lane { position: relative; height: 30px; background: repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 20%); }
.tr-bar { position: absolute; top: 50%; height: 12px; transform: translateY(-50%); left: calc(var(--a) * 20% + 6px); width: calc((var(--b) - var(--a)) * 20% + 10% - 6px); border-radius: 99px; background: color-mix(in srgb, var(--cc) 28%, transparent); }
.tr-dot { position: absolute; top: 50%; left: calc(var(--b) * 20% + 10%); width: 18px; height: 18px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--cc); box-shadow: 0 0 0 3px var(--card), 0 0 0 4px color-mix(in srgb, var(--cc) 50%, transparent); }
.tr-lost { position: absolute; top: 50%; left: calc(var(--i) * 20% + 10%); width: 12px; height: 12px; transform: translate(-50%, -50%) rotate(45deg); border: 2.5px solid var(--down); background: var(--card); border-radius: 2px; }
.tr-last { font-size: 12.5px; }
.tr-last a { display: inline-flex; gap: 6px; align-items: center; }
.tr-last a span { color: var(--ink-2); font-weight: 500; font-family: var(--f-body); }

/* ---------- Home: watchlist ---------- */
.watch-empty { padding: 18px 20px; border: 1.5px dashed var(--apricot); border-radius: var(--r); background: color-mix(in srgb, var(--apricot-t) 45%, transparent); color: var(--ink-2); }
.watch-empty b { color: var(--ink); }
.watch-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 28px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.watch-mols { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }

/* ---------- Home: tally ---------- */
.tally-in { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.tally-n { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.tally-n li { display: grid; grid-template-columns: 70px 1fr; column-gap: 12px; align-items: baseline; }
.tally-n b { grid-row: span 2; font: 800 46px/1 var(--f-disp); letter-spacing: -0.03em; }
.tally-n span { font: 600 12px var(--f-mono); text-transform: uppercase; letter-spacing: .08em; }
.tally-n small { color: var(--mute); font-size: 13px; line-height: 1.35; }
.tally-n .up b, .tally-n .up span { color: var(--up); }
.tally-n .flat b, .tally-n .flat span { color: var(--flat); }
.tally-n .down b, .tally-n .down span { color: var(--down); }
.tally-chart svg { width: 100%; height: auto; overflow: visible; }
.tally-chart .ax { stroke: var(--line); stroke-width: 1.5; }
.tally-chart .ax-t { fill: var(--mute); font: 500 12px var(--f-mono); text-anchor: middle; }
.tally-chart .tk { transition: opacity .15s; }
.tally-chart .tk.up { fill: var(--up); } .tally-chart .tk.flat { fill: var(--flat); } .tally-chart .tk.down { fill: var(--down); }
.tally-chart a:hover .tk { opacity: .6; }

/* ---------- Home: classes ---------- */
.cls-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cls { display: flex; flex-direction: column; gap: 10px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--cc); border-radius: var(--r); }
.cls-code { font: 600 13px var(--f-mono); letter-spacing: .14em; color: var(--cc); }
.cls h3 { font-size: 20px; }
.cls > p:not(.cls-code) { color: var(--ink-2); font-size: 15px; }
.cls-mols { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.cls .more { margin-top: auto; padding-top: 6px; }

/* ---------- Home: holders ---------- */
.hold { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.hold-h, .hold-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 2.2fr) 170px; gap: 18px; align-items: center; padding: 12px 18px; }
.hold-h { background: var(--bg-2); font: 600 11px var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); }
.hold-row { border-top: 1px solid var(--line-2); }
.hold-co { text-decoration: none; }
.hold-co b { display: block; font-weight: 600; }
.hold-co small { color: var(--mute); font-size: 12.5px; }
.hold-mols { display: flex; flex-wrap: wrap; gap: 6px; }
.hold-top { display: flex; align-items: center; gap: 10px; }

/* ---------- Home: memo ---------- */
.memo { margin-top: 64px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: clamp(24px, 4vw, 44px); border-radius: calc(var(--r) + 6px); background: var(--petrol); color: var(--on-petrol); background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 20%); }
:root[data-theme="dark"] .memo { background-color: #0e3a42; }
.memo .kick { color: var(--apricot); }
.memo h2 { font-size: clamp(24px, 3vw, 34px); margin: 8px 0 10px; }
.memo p:not(.kick) { opacity: .9; }
.sub { display: flex; flex-wrap: wrap; gap: 10px; }
.sub input { flex: 1 1 220px; padding: 12px 16px; border-radius: 99px; border: 0; background: var(--card); color: var(--ink); }
.sub-msg { flex-basis: 100%; min-height: 1.4em; font-size: 14px; }

/* ---------- Moves page ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; padding: 3px; background: var(--bg); }
.seg button { border: 0; background: none; padding: 6px 13px; border-radius: 99px; font-weight: 500; font-size: 14px; color: var(--ink-2); }
.seg button.up { color: var(--up); } .seg button.flat { color: var(--flat); } .seg button.down { color: var(--down); }
.seg button.on { background: var(--ink); color: var(--card); }
.fq { flex: 1 1 220px; }
.fq input { width: 100%; padding: 9px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--bg); }
.fq input:focus { outline: none; border-color: var(--petrol); background: var(--card); }
.toggle { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 500; padding: 0 6px; }
.toggle input { accent-color: var(--apricot); width: 17px; height: 17px; }
.cls-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 4px 0; font-size: 13px; color: var(--mute); }
.qtr { margin-top: 34px; }
.qtr-h { display: flex; align-items: baseline; gap: 12px; font-size: 20px; padding-bottom: 10px; margin-bottom: 18px; border-bottom: 2px solid var(--ink); }
.qtr-h small { font: 500 12.5px var(--f-mono); color: var(--mute); letter-spacing: 0; }
.mv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.mv-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- Move page ---------- */
.story { max-width: 1120px; margin: 0 auto; }
.st-head { max-width: 900px; display: flex; flex-direction: column; gap: 16px; padding-top: 6px; }
.crumbs { display: flex; gap: 8px; font: 500 13px var(--f-mono); color: var(--mute); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.st-head h1 { font-size: clamp(28px, 4vw, 46px); line-height: 1.12; }
.st-dek { font-size: 20px; color: var(--ink-2); max-width: 56ch; }
.st-gauge { margin-top: 6px; padding: 20px 20px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.st-gauge p { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin-top: 2px; }
.st-gauge b { font-family: var(--f-disp); font-weight: 700; font-size: 15px; }
.st-gauge span { color: var(--mute); font-size: 14px; }
.st-fig { margin: 28px 0 0; max-width: 720px; }
.st-fig img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r); }
.st-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 52px; margin-top: 36px; align-items: start; }
.watch-for { margin-top: 32px; padding: 18px 20px; border-left: 4px solid var(--petrol); background: var(--card); border-radius: 0 var(--r) var(--r) 0; max-width: 68ch; }
.watch-for span, .source span { display: block; font: 600 11px var(--f-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--petrol); margin-bottom: 4px; }
.source { margin-top: 22px; color: var(--ink-2); font-size: 15px; max-width: 68ch; }
.sheet { position: sticky; top: 88px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.sheet dl { margin: 0; display: grid; gap: 0; }
.sheet dt { font: 600 10.5px var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--mute); padding-top: 12px; }
.sheet dd { margin: 3px 0 0; padding-bottom: 12px; border-bottom: 1px solid var(--line-2); font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.sheet dd a { display: inline-flex; align-items: center; font-weight: 600; text-decoration: none; }
.sheet dd a:hover { text-decoration: underline; }
.sheet dd small { color: var(--mute); font-size: 13px; }
.sheet-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.sheet-act .btn { padding: 8px 14px; font-size: 14px; }
.path-list { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 0; overflow-x: auto; padding-bottom: 6px; }
.path-list li { position: relative; padding: 26px 18px 0 0; }
.path-list li::before { content: ''; position: absolute; top: 9px; left: 0; right: 0; height: 2px; background: var(--line); }
.path-list li::after { content: ''; position: absolute; top: 3px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--card); border: 3px solid var(--seg-past); }
.path-list li.here::after { border-color: var(--apricot); background: var(--apricot); }
.path-list a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.path-list time { font: 500 12px var(--f-mono); color: var(--mute); }
.path-list b { font-weight: 600; font-size: 15px; line-height: 1.35; }
.path-list a:hover b { color: var(--petrol); text-decoration: underline; }
.path-list .glyph { font-size: 11px; }
.path-list code { font-size: 11.5px; color: var(--ink-2); }

/* ---------- Screener ---------- */
.screener-wrap { margin-top: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.screener { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.screener th { text-align: left; padding: 0; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.screener th button { width: 100%; display: flex; justify-content: space-between; gap: 6px; padding: 12px 14px; border: 0; background: none; font: 600 11px var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); text-align: left; }
.screener th button:hover, .screener th[aria-sort="ascending"] button, .screener th[aria-sort="descending"] button { color: var(--ink); }
.screener th i { font-style: normal; opacity: .7; }
.screener td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.screener tr:last-child td { border-bottom: 0; }
.screener tbody tr:hover { background: color-mix(in srgb, var(--bg) 60%, var(--card)); }
.screener td a { text-decoration: none; }
.screener td a:hover { text-decoration: underline; }
.screener small { display: block; color: var(--mute); font-size: 12.5px; }
.sc-name b { font-weight: 600; font-size: 15.5px; }
.sc-stage { white-space: nowrap; }
.sc-stage code { margin-left: 8px; }
.sc-star { width: 52px; }
.screener .empty { border: 0; }

/* ---------- Molecule page ---------- */
.mol-head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; padding: clamp(20px, 3vw, 34px); background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--cc); border-radius: var(--r); }
.mol-title { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.mol-title h1 { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.05; word-break: break-word; }
.mol-ids { font: 500 13px var(--f-mono); color: var(--mute); }
.mol-blurb { font-size: 18px; color: var(--ink-2); max-width: 52ch; }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ladder li { display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; align-items: baseline; padding: 10px 14px; border-radius: 10px; border: 1px dashed var(--line); color: var(--mute); }
.ladder li b { font-weight: 600; color: var(--ink-2); }
.ladder li small { grid-column: 2; font-size: 12.5px; line-height: 1.35; }
.ld-n { grid-row: span 2; font: 600 12px var(--f-mono); }
.ladder li.past { border-style: solid; background: var(--bg); }
.ladder li.run { border-style: solid; border-color: color-mix(in srgb, var(--cc) 40%, transparent); background: color-mix(in srgb, var(--cc) 10%, transparent); }
.ladder li.now { border: 0; background: var(--cc); color: #fff; }
.ladder li.now b { color: #fff; font-family: var(--f-disp); }
:root[data-theme="dark"] .ladder li.now, :root[data-theme="dark"] .ladder li.now b { color: var(--petrol-deep); }
.facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 18px 0 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.facts > div { padding: 14px 18px; border-left: 1px solid var(--line-2); }
.facts > div:first-child { border-left: 0; }
.facts dt { font: 600 10.5px var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--mute); }
.facts dd { margin: 4px 0 0; font-weight: 500; }
.facts dd a { text-decoration: none; font-weight: 600; }
.facts dd small { display: block; color: var(--mute); font-size: 12.5px; font-weight: 400; }
.mlog { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.mlog li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; }
.mlog time { font: 600 13px var(--f-mono); color: var(--ink-2); padding-top: 18px; }
.mlog-card { padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--flat); border-radius: 0 var(--r) var(--r) 0; display: grid; gap: 8px; }
.mlog li.up .mlog-card { border-left-color: var(--up); }
.mlog li.down .mlog-card { border-left-color: var(--down); }
.mlog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12px; }
.mlog-card h3 { font-size: 18px; }
.mlog-card h3 a { text-decoration: none; }
.mlog-card h3 a:hover { text-decoration: underline; color: var(--petrol); }
.mlog-card p:last-child { color: var(--ink-2); font-size: 15px; }

/* ---------- Company ---------- */
.co-mols { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.co-mol { padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; gap: 8px; }
.co-mol > p:first-child { font-size: 13px; color: var(--mute); display: flex; align-items: center; }
.co-mol h3 { font-size: 20px; }
.co-mol h3 a { text-decoration: none; }
.co-foot { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 8px; }
.co-foot .gauge { width: 150px; }
.co-foot span { font: 600 12px var(--f-mono); }
.co-foot .star { margin-left: auto; }

/* ---------- Method / disclaimer ---------- */
.method { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.method > section { padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; gap: 12px; }
.method h2 { font-size: 20px; }
.method ul, .method ol { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.method.narrow { display: block; max-width: 720px; font-size: 17.5px; line-height: 1.65; }
.method.narrow > * + * { margin-top: 14px; }
.m-stages { list-style: none; padding: 0 !important; }
.m-stages li { display: grid; grid-template-columns: 70px 90px 1fr; gap: 12px; align-items: center; font-size: 14.5px; }
.m-stages span { color: var(--mute); }
.m-sig { list-style: none; padding: 0 !important; }
.m-sig li { display: grid; grid-template-columns: 80px 1fr; gap: 12px; font-size: 14.5px; }
.m-sig li.up b { color: var(--up); } .m-sig li.flat b { color: var(--flat); } .m-sig li.down b { color: var(--down); }
.m-types { margin: 0; display: grid; gap: 8px; }
.m-types div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; font-size: 14.5px; }
.m-types dt { font-weight: 600; }
.m-types dd { margin: 0; color: var(--ink-2); }
.nf { padding-top: 60px; }
.nf .gauge { max-width: 320px; margin-bottom: 30px; }

/* ---------- Staff ---------- */
body.staff #ticker { display: none; }
.auth { display: grid; place-items: center; padding: 40px 0; }
.auth-card { width: 100%; max-width: 400px; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.auth-card h1 { font-size: 24px; margin: 8px 0 6px; }
.auth-card .btn { margin-top: 20px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--card); }
.admin-table th, .admin-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.admin-table th { font: 600 11px var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--mute); background: var(--bg-2); }
.admin-table .actions { white-space: nowrap; }
.add-mol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.add-mol h3 { grid-column: 1 / -1; font-size: 16px; }
.subs { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.subs li { display: flex; justify-content: space-between; padding: 9px 14px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 30px; align-items: start; }
.ed-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ed-2.tight { gap: 8px; }
.ed-side { position: sticky; top: 84px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 16px 16px; }
.preview { padding: 18px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--r); max-width: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .lead { grid-template-columns: 1fr; grid-template-areas: "fig" "copy" "side"; }
  .lead-dek { max-width: none; }
  .cls-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-grid { grid-template-columns: 1fr; gap: 30px; }
  .sheet { position: static; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts > div:nth-child(4) { border-left: 0; }
  .facts > div:nth-child(n + 4) { border-top: 1px solid var(--line-2); }
  .editor { grid-template-columns: 1fr; }
  .ed-side { position: static; }
}
@media (max-width: 820px) {
  .tr-head { grid-template-columns: 1fr; }
  .tr-head > span { display: none; }
  .tr-stages span small { display: none; }
  .tr-row { grid-template-columns: 1fr auto; gap: 8px 12px; padding: 12px 14px; }
  .tr-name { grid-column: 1; }
  .tr-last { grid-column: 2; grid-row: 1; text-align: right; }
  .tr-last a span { display: none; }
  .tr-lane { grid-column: 1 / -1; }
  .tr-head { padding-left: 14px; padding-right: 14px; }
  .tr-stages span { padding-left: 4px; font-size: 10px; }
  .watch-in, .tally-in, .memo { grid-template-columns: 1fr; }
  .tally-n { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tally-n li { grid-template-columns: 1fr; }
  .tally-n b { grid-row: auto; font-size: 36px; }
  .tally-n small { display: none; }
  .hold-h { display: none; }
  .hold-row { grid-template-columns: 1fr; gap: 8px; }
  .mv-grid.three { grid-template-columns: 1fr; }
  .mol-head { grid-template-columns: 1fr; }
  .method { grid-template-columns: 1fr; }
  .mlog li { grid-template-columns: 1fr; gap: 6px; }
  .mlog time { padding-top: 0; }
  .add-mol { grid-template-columns: 1fr 1fr; }
  /* Screener rows become cards */
  .screener thead { display: none; }
  .screener, .screener tbody, .screener tr, .screener td { display: block; width: 100%; }
  .screener tr { position: relative; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .screener td { padding: 3px 0; border: 0; }
  .screener td[data-l]:not(.sc-name)::before { content: attr(data-l); display: inline-block; width: 92px; font: 600 10.5px var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); }
  .screener td small { display: inline; margin-left: 6px; }
  .screener .sc-name small { display: block; margin: 0; }
  .sc-star { position: absolute; top: 12px; right: 12px; width: auto !important; padding: 0 !important; }
  .sc-name { padding-right: 40px !important; margin-bottom: 4px; }
}
@media (max-width: 560px) {
  .cls-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div { border-left: 0 !important; border-top: 1px solid var(--line-2); }
  .facts > div:nth-child(-n + 2) { border-top: 0; }
  .lead h1 { font-size: 28px; }
  .lead-fig .keynum { position: static; margin-top: 10px; max-width: none; }
  .filters { padding: 10px; }
  .seg { width: 100%; justify-content: space-between; }
  .seg button { padding: 6px 9px; font-size: 13px; }
  .fsel { flex: 1 1 140px; }
  .fsel select { width: 100%; }
  .m-stages li { grid-template-columns: 64px 1fr; }
  .m-stages li span { grid-column: 2; }
  .ed-2 { grid-template-columns: 1fr; }
  .add-mol { grid-template-columns: 1fr; }
  .st-dek { font-size: 18px; }
  .prose { font-size: 17px; }
}

/* ---------- Segment deck: one panel open at a time instead of one long scroll ---------- */
.deck { margin-top: 44px; }
.deck-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 6px; background: color-mix(in srgb, var(--card) 70%, transparent); border: 1px solid var(--line); border-radius: calc(var(--r) + 6px); backdrop-filter: blur(6px); }
.deck.slim .deck-tabs { grid-template-columns: repeat(2, minmax(0, 220px)); justify-content: start; }
.deck-tabs button { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: baseline; text-align: left; padding: 12px 14px; border: 0; border-radius: var(--r); background: transparent; color: var(--ink-2); transition: background .15s, color .15s; }
.deck-tabs button:hover { background: var(--bg); color: var(--ink); }
.deck-tabs i { grid-row: span 2; font: 600 11px var(--f-mono); font-style: normal; color: var(--mute); }
.deck-tabs b { font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em; }
.deck-tabs small { font: 500 11.5px var(--f-mono); color: var(--mute); }
.deck-tabs button[aria-selected="true"] { background: var(--ink); color: var(--card); }
.deck-tabs button[aria-selected="true"] i, .deck-tabs button[aria-selected="true"] small { color: var(--apricot); }
.deck-panel { margin-top: 14px; min-height: 420px; outline: none; }
.deck.slim .deck-panel { min-height: 0; }
.seg-note { color: var(--mute); max-width: 72ch; margin: 4px 0 16px; }
.swap { animation: swap .32s ease-out; }
@keyframes swap { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .swap { animation: none; } }
.year-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.year-tabs button { display: inline-flex; align-items: baseline; gap: 8px; padding: 9px 16px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); }
.year-tabs button small { font: 500 11.5px var(--f-mono); color: var(--mute); }
.year-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--card); }
.year-tabs button[aria-selected="true"] small { color: var(--apricot); }
.year-tabs button:disabled { opacity: .4; cursor: default; }
.lead-copy .lead-gauge { margin-top: 4px; }
.memo { margin-top: 44px; }
@media (max-width: 960px) {
  .deck-tabs { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); overflow-x: auto; scrollbar-width: none; }
  .deck.slim .deck-tabs { grid-auto-columns: minmax(150px, 1fr); }
}

/* ---------- Front page (round 4: news first) ---------- */
.dateline { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 0 0 14px; margin-bottom: 22px; border-bottom: 2px solid var(--ink); font: 600 12px var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.dateline span:first-child { color: var(--ink); }
.front { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 34px; }
.front-lead { display: flex; flex-direction: column; gap: 12px; }
.front-img { position: relative; display: block; border-radius: var(--r); overflow: hidden; }
.front-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.front-img .keynum { position: absolute; left: 14px; bottom: 14px; }
.front-lead h1 { font-size: clamp(28px, 3.3vw, 42px); line-height: 1.1; }
.front-lead h1 a, .side-story h2 a, .nrow h3 a { text-decoration: none; }
.front-lead h1 a:hover, .side-story h2 a:hover, .nrow h3 a:hover { color: var(--petrol); text-decoration: underline; text-decoration-thickness: 2px; }
.front-lead .lead-dek { max-width: 62ch; }
.front-mol { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; }
.front-mol a { display: inline-flex; align-items: center; font-weight: 600; text-decoration: none; }
.front-mol code { font-size: 12px; color: var(--ink-2); }
.front-side { display: flex; flex-direction: column; gap: 22px; }
.side-story { display: flex; flex-direction: column; gap: 8px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.side-story:last-child { border-bottom: 0; padding-bottom: 0; }
.side-img { display: block; border-radius: var(--r); overflow: hidden; }
.side-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.side-story h2 { font-size: 20px; line-height: 1.25; letter-spacing: -0.015em; }
.side-dek { color: var(--ink-2); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-h { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 10px; margin-bottom: 18px; border-bottom: 2px solid var(--ink); }
.row-h h2 { font-size: clamp(20px, 2.2vw, 26px); }
.row-h p { color: var(--mute); }
.row-h .more { margin: 0; }
.latest, .kinds, .board-h { margin-top: 52px; }
.board-h + .deck { margin-top: 0; }
.mv-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mv-grid.four .mv h3 { font-size: 16.5px; }
.kinds .year-tabs { margin: 0 0 18px; }
.news-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; }
.nrow { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.nrow:hover { border-color: var(--petrol); }
.nrow-img { display: block; border-radius: 10px; overflow: hidden; align-self: start; }
.nrow-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.nrow-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nrow h3 { font-size: 17px; line-height: 1.3; }
.nrow-body > p:not(.mv-meta):not(.nrow-mol) { color: var(--ink-2); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nrow-mol { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; font-size: 13.5px; }
.nrow-mol a, .nrow-mol span { display: inline-flex; align-items: center; font-weight: 600; text-decoration: none; }
.nrow-mol code { font-size: 11.5px; color: var(--mute); }
@media (max-width: 1080px) {
  .front { grid-template-columns: 1fr; }
  .front-side { flex-direction: row; }
  .side-story { flex: 1; border-bottom: 0; padding-bottom: 0; }
  .mv-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-list { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .front-side { flex-direction: column; }
  .side-story { border-bottom: 1px solid var(--line); padding-bottom: 18px; }
  .mv-grid.four { grid-template-columns: 1fr; }
  .nrow { grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 10px; }
  .nrow-body > p:not(.mv-meta):not(.nrow-mol) { display: none; }
  .front-img .keynum { position: static; margin-top: 10px; max-width: none; }
  .dateline span:not(:first-child) { display: none; }
}
@media (max-width: 640px) {
  /* Latest news becomes a swipe strip instead of four stacked cards. */
  .mv-grid.four { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut) 8px; scrollbar-width: none; }
  .mv-grid.four .mv { flex: 0 0 78%; scroll-snap-align: start; }
}

/* ---------- Board page link on the front page ---------- */
.deck.flush { margin-top: 6px; }
.board-link { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 52px; padding: 22px 26px; border-radius: calc(var(--r) + 4px); background: var(--card); border: 1px solid var(--line); text-decoration: none; background-image: repeating-linear-gradient(90deg, color-mix(in srgb, var(--petrol) 7%, transparent) 0 1px, transparent 1px 20%); }
.board-link:hover { border-color: var(--petrol); color: var(--ink); }
.board-link span { display: flex; flex-direction: column; gap: 4px; color: var(--ink-2); }
.board-link b { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.board-link i { font-style: normal; font-size: 26px; color: var(--petrol); transition: transform .15s; }
.board-link:hover i { transform: translateX(4px); }

/* Long reads (lib/reading.js): cover kept to a reading width, lede, "In this story" list, numbered section heads. */
.st-fig { max-width: 640px; }
.prose { counter-reset: sec; }
.prose .lede { font-size: 20px; line-height: 1.6; color: var(--ink); font-weight: 500; }
.prose h2 { display: flex; align-items: baseline; gap: 12px; scroll-margin-top: 110px; }
.prose h2:not(#conclusion) { counter-increment: sec; }
.prose h2:not(#conclusion)::before { content: counter(sec, decimal-leading-zero); flex: none; padding: 4px 9px; border-radius: 99px; background: var(--apricot-t); color: var(--ink); font: 600 12px/1 var(--f-mono); transform: translateY(-3px); }
.in-story { margin: 1.4em 0 1.9em; padding: 16px 20px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--petrol); border-radius: var(--r-sm); }
.in-story-h { margin: 0 0 10px; font: 600 11px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.in-story ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; display: grid; gap: 7px; }
.in-story li { counter-increment: toc; display: flex; gap: 12px; margin: 0; font-size: 16px; line-height: 1.4; font-weight: 600; }
.in-story li + li { margin-top: 0; }
.in-story li::before { content: counter(toc, decimal-leading-zero); flex: none; font: 600 12px/1.7 var(--f-mono); color: var(--petrol); }
.in-story li.end::before { content: '·'; }
.in-story a { color: var(--ink); text-decoration: none; }
.in-story a:hover, .in-story a:focus-visible { color: var(--petrol); text-decoration: underline; }
