/* LINEAGE — the Time view, the biography block, the tombstone and the review desk
   (docs/LINEAGE.md, public/lineage.js + lineageDesk.js).

   Palette rules inherited from styles.css and kept: --lamp means "unseen" and
   nothing else, so lineage never uses it; lanes keep their hues (--sea world,
   --up markets); structure is cream ink at low opacity, like pencil on chart paper.
   Every overlay-ish block carries its own [hidden] rule (the CSS trap hit three
   times — an author display rule beats the browser's [hidden]). */

body[data-view="time"] #view-time { display: block; }
/* chrome in the UI face; only leads, questions and chapter text read in the body serif */
#view-time .tl-controls,
.lin-review, .lin-card, .lin-bio, .lin-tomb, #lin-hand { font-family: var(--ui); }
#view-time > .lin-map, #view-time > .lin-review { max-width: none; }
body[data-lin-mode="review"] #view-time .lin-map { display: none; }
body:not([data-lin-mode="review"]) #view-time .lin-review { display: none; }

.lin-titlebar { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); max-width: none; }
.lin-modes { display: flex; gap: var(--sp-1); padding-top: .4rem; }
body:not([data-admin="yes"]) .lin-modes { display: none; }

/* ---------- the Time view (public/lineageTime.js, redesigned 2026-10-23) ----------
   The rows are the Front page's rows — serif name, lane ring, letter-spaced meta —
   and each carries a strip of day bars on one shared axis. Structure is cream ink
   at low opacity; the lane hue is the only colour on a strip. */

.tl-controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin: 0 0 var(--sp-2); }
.tl-group { display: inline-flex; flex-wrap: wrap; gap: 2px; }
.tl-sep { width: 1px; height: 1.3rem; background: var(--hairline); }
.tl-window { margin-left: auto; }
.tl-search {
  font: inherit; font-family: var(--ui); font-size: var(--fs-ui); color: var(--tx-1);
  background: var(--bg-0); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: .38rem .7rem; width: min(17rem, 100%);
}
.tl-search::placeholder { color: var(--tx-3); }
.tl-search:focus-visible { outline: none; border-color: var(--rule); background: var(--bg-2); }
/* lane chips draw their own ring: .chip[data-lane] is the chart's filter and app.js
   binds every one of them, so these use data-tl-lane */
.tl-lane-chip::before { content: ''; width: .5rem; height: .5rem; border-radius: 50%; border: 1.5px solid var(--sea); flex: none; }
.tl-lane-chip[data-tl-lane="markets"]::before { border-color: var(--up); }
.tl-lane-chip.on[data-tl-lane="world"]::before { background: var(--sea); }
.tl-lane-chip.on[data-tl-lane="markets"]::before { background: var(--up); }

.tl-legend { display: flex; flex-wrap: wrap; gap: .2rem var(--sp-4); margin: 0 0 var(--sp-4); font-family: var(--ui); font-size: var(--fs-meta); color: var(--tx-3); }
.tl-legend > span { display: inline-flex; align-items: center; gap: .4rem; }
.tl-legend b { color: var(--tx-2); font-weight: 600; }
.tl-key-bar { display: inline-block; width: 13px; height: 13px; background:
  linear-gradient(var(--sea), var(--sea)) 0 100% / 3px 6px no-repeat,
  linear-gradient(var(--sea), var(--sea)) 5px 100% / 3px 13px no-repeat,
  linear-gradient(var(--sea), var(--sea)) 10px 100% / 3px 9px no-repeat; }
.tl-key-born { display: inline-block; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--tx-2); }
.tl-key-ch { font-size: 11px; letter-spacing: .04em; border-left: 1.5px solid var(--tx-1); padding-left: .25rem; }

/* shared inputs (the desk, the hand tools) and the "following" bar */
.lin-input {
  font: inherit; font-family: var(--ui); font-size: var(--fs-ui); color: var(--tx-1);
  background: var(--bg-0); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: .38rem .6rem; min-width: 0; color-scheme: dark;
}
.lin-input::placeholder { color: var(--tx-3); }
.lin-input:focus-visible { outline: none; border-color: var(--rule); background: var(--bg-2); }
.lin-input:disabled { opacity: .45; }
.lin-focus { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2) var(--sp-3); margin: 0 0 var(--sp-3);
  padding: var(--sp-2) var(--sp-3); background: color-mix(in srgb, var(--sea) 9%, var(--bg-1)); border-left: 2px solid var(--sea); border-radius: var(--radius); }
.lin-focus[hidden] { display: none; }
#lin-focus-name { font-family: var(--body); font-weight: 500; font-size: 1.02rem; color: var(--tx-1); }
.lin-redraw-when { font-family: var(--ui); font-size: var(--fs-meta); color: var(--tx-3); white-space: nowrap; }
.lin-done .lin-redraw-glyph { color: var(--tx-1); margin-right: .35rem; }

/* ---------- the board: lives + side rail ---------- */
.lin-board { display: grid; grid-template-columns: minmax(0, 1fr) clamp(17rem, 22vw, 24rem); gap: var(--sp-5); align-items: start; }
@media (max-width: 1100px) { .lin-board { grid-template-columns: minmax(0, 1fr); } }

.tl-lives { position: relative; min-width: 0; --name-w: clamp(14rem, 24vw, 21rem); }
.tl-lives[aria-busy="true"] { opacity: .55; transition: opacity .2s; }

.tl-axis {
  position: sticky; top: -1.5rem; z-index: 3;   /* -1.5rem = the .view top padding, so it pins flush */
  display: grid; grid-template-columns: var(--name-w) minmax(0, 1fr); gap: var(--sp-4);
  padding: .55rem 0 .35rem; background: var(--bg-1); border-bottom: 1px solid var(--rule);
}
.tl-axis-count { font-family: var(--ui); font-size: var(--fs-meta); letter-spacing: .12em; text-transform: uppercase; color: var(--tx-3); align-self: end; }
.tl-scale { position: relative; height: 1.3rem; }
.tl-tick { position: absolute; bottom: 0; transform: translateX(0); padding-left: .3rem; border-left: 1px solid var(--hairline); height: .7rem;
  font-family: var(--ui); font-size: 12px; line-height: 1; color: var(--tx-3); white-space: nowrap; }
.tl-tick:not(:empty) { height: 1.3rem; padding-top: 0; }
.tl-tick-month { border-left-color: var(--rule); color: var(--tx-2); font-weight: 600; letter-spacing: .04em; }
.tl-tick-today { left: auto !important; right: 0; border-left: 0; border-right: 1px dashed var(--tx-3); padding: 0 .3rem 0 0; color: var(--tx-2); }

.tl-list { list-style: none; padding: 0; margin: 0; }
.tl-row {
  display: grid; grid-template-columns: var(--name-w) minmax(0, 1fr); gap: .1rem var(--sp-4); align-items: center;
  border-bottom: 1px solid var(--hairline); padding: .55rem 0 .6rem; position: relative;
  --lane: var(--sea);
}
.tl-row[data-lane="markets"] { --lane: var(--up); }
.tl-row:hover { background: color-mix(in srgb, var(--bg-2) 60%, transparent); }
.tl-row[data-focus="yes"] { background: color-mix(in srgb, var(--sea) 9%, var(--bg-1)); box-shadow: inset 2px 0 0 var(--sea); }
.tl-row[data-depth] .tl-name { padding-left: calc(var(--depth, 1) * 1.1rem); }
.tl-row[data-depth] .tl-name::before { content: '↳'; position: absolute; margin-left: -1.05rem; margin-top: .05rem; color: var(--tx-3); font-family: var(--ui); }

.tl-name { min-width: 0; display: flex; flex-direction: column; gap: .12rem; padding-left: .3rem; }
.tl-head {
  display: flex; align-items: baseline; gap: .5rem; min-width: 0;
  font: inherit; text-align: left; color: var(--tx-1); background: none; border: 0; padding: 0; cursor: pointer;
}
.tl-head .dot { flex: none; width: .55rem; height: .55rem; border-radius: 50%; border: 1.5px solid var(--lane); align-self: flex-start; margin-top: .5rem; }
.tl-row[data-life="moving"] .tl-head .dot { background: var(--lane); }
.tl-row[data-life="quiet"] .tl-head .dot { border-style: dashed; opacity: .75; }
.tl-row[data-life="resolved"] .tl-head .dot, .tl-row[data-life="handed"] .tl-head .dot { border-color: var(--tx-3); }
.tl-title { font-family: var(--body); font-weight: 500; font-size: 1.02rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tl-head:hover .tl-title, .tl-head:focus-visible .tl-title { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.tl-head:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }
.tl-row[data-life="quiet"] .tl-title, .tl-row[data-life="resolved"] .tl-title, .tl-row[data-life="handed"] .tl-title { color: var(--tx-2); }
.tl-meta { display: block; padding-left: 1.05rem; font-family: var(--ui); font-size: var(--fs-meta); color: var(--tx-3); line-height: 1.45; }
.tl-standing { color: var(--tx-2); }
.tl-row[data-life="moving"] .tl-standing { color: var(--tx-1); }

.tl-kin { display: flex; flex-direction: column; gap: .1rem; padding-left: 1.05rem; font-family: var(--ui); font-size: var(--fs-meta); }
.tl-kin-verb { color: var(--tx-3); margin-right: .35rem; }
.tl-link {
  font: inherit; color: var(--tx-1); background: none; border: 0; padding: 0; cursor: pointer; text-align: left;
  text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px;
}
.tl-link:hover, .tl-link:focus-visible { text-decoration-color: var(--tx-1); }
.tl-fold-btn {
  align-self: flex-start; margin: .2rem 0 0 1.05rem; font-family: var(--ui); font-size: var(--fs-meta); color: var(--tx-2);
  background: var(--bg-2); border: 1px solid var(--hairline); border-radius: 999px; padding: .08rem .6rem; cursor: pointer;
}
.tl-fold-btn:hover, .tl-fold-btn:focus-visible, .tl-fold-btn[aria-expanded="true"] { color: var(--tx-1); border-color: var(--rule); }

/* the strip: bars in viewBox units (one unit = one day), marks placed by % */
.tl-track { position: relative; height: 2.4rem; cursor: pointer; }
.tl-track-mini { height: 1.5rem; }
.tl-bars { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tl-bar { fill: var(--lane); opacity: .85; }
.tl-row:hover .tl-track:not(.tl-track-mini) .tl-bar { opacity: 1; }
.tl-span { fill: color-mix(in srgb, var(--lane) 38%, transparent); }
.tl-span-quiet { fill: none; stroke: color-mix(in srgb, var(--tx-3) 70%, transparent); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.tl-row[data-life="resolved"] .tl-bar, .tl-row[data-life="handed"] .tl-bar, .tl-row[data-life="quiet"] .tl-bar { opacity: .55; }
.tl-born { position: absolute; bottom: -3px; width: 9px; height: 9px; margin-left: -4px; border-radius: 50%; background: var(--bg-1); border: 1.5px solid var(--lane); }
.tl-before { position: absolute; left: -.85rem; bottom: -.35rem; color: var(--tx-3); font-family: var(--ui); font-size: 14px; }
.tl-ch { position: absolute; top: -.1rem; bottom: -2px; border-left: 1.5px solid var(--tx-1); padding-left: .22rem;
  font-family: var(--ui); font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--tx-1); line-height: 1; }
.tl-end { position: absolute; bottom: -4px; height: 12px; border-left: 2px solid var(--tx-2); }
.tl-fold { position: absolute; bottom: -.4rem; transform: translateX(-50%); font-family: var(--ui); font-size: 14px; font-weight: 700; color: var(--tx-1); line-height: 1; background: var(--bg-1); }

.tl-absorbed { grid-column: 1 / -1; list-style: none; padding: .35rem 0 0; margin: .3rem 0 0; border-top: 1px dashed var(--hairline); }
.tl-absorbed[hidden] { display: none; }
.tl-row-absorbed { border-bottom: 0; padding: .25rem 0; }
.tl-row-absorbed:hover { background: none; }
.tl-row-absorbed .tl-name { padding-left: 1.4rem; }
.tl-absorbed-name { font-family: var(--body); font-size: .95rem; color: var(--tx-2); }
.tl-row-absorbed .tl-meta { padding-left: 0; }
.tl-row-absorbed .tl-bar { opacity: .45; }

.tl-cursor { position: absolute; top: 2.4rem; bottom: 0; width: 0; border-left: 1px solid color-mix(in srgb, var(--tx-1) 45%, transparent); pointer-events: none; z-index: 2; }
.tl-cursor[hidden], .tl-tip[hidden] { display: none; }
.tl-tip {
  position: absolute; z-index: 4; transform: translate(-50%, -100%); pointer-events: none; white-space: nowrap;
  font-family: var(--ui); font-size: var(--fs-meta); color: var(--tx-1); background: var(--bg-3);
  border: 1px solid var(--rule); border-radius: var(--radius); padding: .15rem .5rem; box-shadow: var(--elev-1);
}
.tl-more { margin-top: var(--sp-3); }

/* ---------- side rail: what changed shape ---------- */
.lin-side { min-width: 0; position: sticky; top: 0; }
.lin-side .stamp { margin-top: .55rem; }
#lin-hand[hidden] { display: none; }
#lin-hand { margin-bottom: var(--sp-4); }
.tl-redraw-day { font-family: var(--ui); font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--tx-3); margin: var(--sp-3) 0 .35rem; }
.tl-redraw { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .3rem; }
.tl-redraw-item {
  display: grid; grid-template-columns: 1.3rem 1fr; gap: .4rem; align-items: baseline;
  padding: var(--sp-2) var(--sp-3); border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-2) 72%, var(--bg-1));
}
.tl-redraw-glyph { font-family: var(--ui); font-size: 13px; font-weight: 700; color: var(--tx-2); text-align: center; }
.tl-redraw-text { font-family: var(--body); font-size: .95rem; line-height: 1.4; color: var(--tx-2); min-width: 0; }
.tl-redraw-text .tl-link { color: var(--tx-1); }
.tl-redraw-house { color: var(--tx-2); }
.tl-redraw-more summary { cursor: pointer; font-family: var(--ui); font-size: var(--fs-meta); color: var(--tx-3); margin-top: .2rem; }
.tl-redraw-more summary:hover { color: var(--tx-1); }
.tl-redraw-more ul { margin: .3rem 0 0; padding-left: 1rem; font-size: .9rem; line-height: 1.5; max-height: 16rem; overflow-y: auto; }
.life-badge[data-life="merged"] { color: var(--tx-1); border-color: var(--tx-2); }
.tl-waiting { margin-left: .4rem; font-family: var(--figures); font-size: 12px; color: var(--bg-0); background: var(--tx-2); border-radius: 999px; padding: 0 .4rem; }
.tl-waiting[hidden] { display: none; }

@media (max-width: 700px) {
  .tl-window { margin-left: 0; }
  .tl-sep { display: none; }
  .tl-search { width: 100%; }
  .tl-legend { display: none; }
  .tl-axis { grid-template-columns: minmax(0, 1fr); top: -1rem; }
  .tl-tick:not(.tl-tick-month):not(.tl-tick-today) { font-size: 0; }
  .tl-axis-count { display: none; }
  .tl-row { grid-template-columns: minmax(0, 1fr); gap: .35rem; }
  .tl-track { height: 1.9rem; }
  .tl-cursor, .tl-tip { display: none !important; }
  .lin-side { position: static; }
}

/* ---------- links that open a storyline ---------- */
.lin-link {
  font: inherit; color: var(--tx-1); background: none; border: 0; padding: 0; cursor: pointer;
  text-align: left; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px;
}
.lin-link:hover, .lin-link:focus-visible { text-decoration-color: var(--tx-1); }
.lin-link-strong { font-weight: 600; }

/* ---------- tombstone ---------- */
.lin-tomb {
  display: grid; grid-template-columns: auto 1fr; gap: .2rem var(--sp-3); align-items: baseline;
  margin: 0 0 var(--sp-3); padding: var(--sp-3) var(--sp-4);
  background: var(--bg-2); border: 1px solid var(--rule); border-left: 3px solid var(--tx-1); border-radius: var(--radius);
}
.lin-tomb[hidden] { display: none; }
.lin-tomb-glyph { grid-row: span 2; font-size: 1.6rem; color: var(--tx-1); line-height: 1; }
.lin-tomb-text { font-size: var(--fs-ui); color: var(--tx-1); }
.lin-tomb-note { font-size: var(--fs-meta); color: var(--tx-3); }

/* ---------- biography ---------- */
.lin-bio[hidden] { display: none; }
.lin-bio { margin-top: var(--sp-4); }
.lin-edges { list-style: none; padding: 0; margin: 0 0 var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-1); }
.lin-edge { display: grid; grid-template-columns: 1.4rem 1fr auto; gap: var(--sp-2); align-items: baseline; font-size: var(--fs-ui); }
.lin-edge-glyph { color: var(--tx-1); text-align: center; }
.lin-edge-verb { color: var(--tx-3); margin-right: .4rem; }
.lin-edge-when { font-size: var(--fs-meta); color: var(--tx-3); white-space: nowrap; }

.lin-chapters { list-style: none; padding: 0; margin: 0 0 var(--sp-3); position: relative; }
.lin-chapters::before { content: ""; position: absolute; left: .7rem; top: .8rem; bottom: .8rem; border-left: 1px solid var(--rule); }
.lin-ch { display: grid; grid-template-columns: 1.4rem 1fr; gap: var(--sp-3); padding: var(--sp-2) 0; position: relative; }
.lin-ch-mark {
  width: 1.4rem; height: 1.4rem; border-radius: 50%; display: grid; place-items: center;
  font-size: 10px; font-weight: 700; letter-spacing: .02em; color: var(--tx-2);
  background: var(--bg-1); border: 1px solid var(--rule); z-index: 1;
}
.lin-ch-now .lin-ch-mark { color: var(--bg-0); background: var(--tx-1); border-color: var(--tx-1); }
.lin-ch-head { display: flex; flex-wrap: wrap; gap: .2rem var(--sp-3); align-items: baseline; }
.lin-ch-name { font-weight: 600; color: var(--tx-1); font-size: var(--fs-ui); }
.lin-ch-span, .lin-ch-n { font-size: var(--fs-meta); color: var(--tx-3); }
.lin-ch-q { font-family: var(--body); font-style: italic; color: var(--tx-2); font-size: 1rem; margin-top: .2rem; }
.lin-ch-lead { margin-top: .35rem; font-size: var(--fs-ui); color: var(--tx-2); }
.lin-ch-lead summary { cursor: pointer; font-size: var(--fs-meta); color: var(--tx-3); letter-spacing: .04em; }
.lin-ch-lead p { margin-top: .4rem; font-family: var(--body); line-height: 1.5; }
.lin-ch-title { font-family: var(--ui) !important; font-weight: 600; color: var(--tx-1); }
.lin-foot { margin-top: var(--sp-1); }
.lin-foot-btn { padding-left: 0; }
.lin-bio[data-eventful="no"] .lin-chapters::before { display: none; }

/* ---------- the review desk ---------- */
.lin-review { max-width: 72rem; }
.lin-desk-status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); font-size: var(--fs-meta); color: var(--tx-3); margin-bottom: var(--sp-3); }
.lin-desk-tabs { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-bottom: var(--sp-4); }
.lin-tab { display: inline-flex; gap: .45rem; align-items: baseline; }
.lin-tab-n { font-family: var(--figures); font-size: 12px; color: var(--tx-3); }
.lin-tab.on .lin-tab-n { color: var(--tx-1); }
.lin-desk-body { display: flex; flex-direction: column; gap: var(--sp-4); }
.lin-desk-body[aria-busy="true"] { opacity: .55; }

.lin-card {
  background: color-mix(in srgb, var(--bg-2) 72%, var(--bg-1)); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3);
}
.lin-card-done { opacity: .62; }
.lin-card-done .lin-actions { display: none; }
.lin-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--sp-2); }
.lin-card-title { font-family: var(--ui); font-weight: 600; font-size: 1.1rem; color: var(--tx-1); }
.lin-card-help { font-size: var(--fs-meta); color: var(--tx-3); line-height: 1.5; }
.lin-card-err { font-size: var(--fs-meta); color: var(--alert-red); }
.lin-score { font-family: var(--ui); font-size: var(--fs-meta); padding: .05rem .55rem; border-radius: 999px; border: 1px solid var(--rule); color: var(--tx-2); white-space: nowrap; }
.lin-score[data-band="high"] { color: var(--tx-1); border-color: var(--tx-2); }
.lin-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.lin-go { border-color: var(--tx-2); }
.lin-settled { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-ui); color: var(--tx-1); opacity: 1; }
.lin-card-done .lin-settled { opacity: 1; }

.lin-members { display: flex; flex-direction: column; gap: var(--sp-2); }
.lin-story { background: var(--bg-1); border: 1px solid var(--hairline); border-left: 3px solid var(--sea); border-radius: var(--radius); padding: var(--sp-2) var(--sp-3); }
.lin-story[data-lane="markets"] { border-left-color: var(--up); }
.lin-story[data-role="keeper"] { border-color: var(--tx-2); border-left-width: 3px; background: var(--bg-3); }
.lin-story[data-role="out"] { opacity: .5; }
.lin-story-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2); }
.lin-story-name { font-weight: 600; }
.lin-story-id { font-family: var(--figures); font-size: 12px; color: var(--tx-3); }
.lin-story-facts { font-size: var(--fs-meta); color: var(--tx-3); margin-top: .2rem; }
.lin-story-lead { font-family: var(--body); font-size: 1rem; line-height: 1.45; color: var(--tx-2); margin-top: .35rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* three plain choices per name (lineageDesk.js familyCard) */
.lin-seg { display: inline-flex; margin-bottom: .45rem; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; }
.lin-seg-btn { font-family: var(--ui); font-size: var(--fs-meta); color: var(--tx-3); background: none; border: 0; padding: .2rem .75rem; cursor: pointer; }
.lin-seg-btn + .lin-seg-btn { border-left: 1px solid var(--hairline); }
.lin-seg-btn:hover:not(:disabled) { color: var(--tx-1); }
.lin-seg-btn.on { color: var(--bg-0); background: var(--tx-1); }
.lin-seg-btn[data-choice="out"].on { color: var(--tx-1); background: var(--bg-3); }
.lin-seg-btn:disabled:not(.on) { opacity: .35; cursor: default; }
.lin-story[data-role="keeper"]::after { content: 'keeps its page and id'; display: block; margin-top: .35rem; font-size: var(--fs-meta); color: var(--tx-3); }
.lin-tab-help { font-size: var(--fs-ui); color: var(--tx-2); margin: 0 0 var(--sp-1); max-width: 62rem; }
.lin-review input[type="checkbox"], .lin-review input[type="radio"] { accent-color: var(--tx-1); }
.lin-pick { display: inline-flex; gap: var(--sp-2); margin-right: var(--sp-2); }
.lin-pick label { display: inline-flex; align-items: center; gap: .25rem; font-size: var(--fs-meta); color: var(--tx-3); cursor: pointer; }

.lin-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: var(--sp-3); align-items: start; }
.lin-pair-arrow { align-self: center; font-size: 1.5rem; color: var(--tx-2); }
@media (max-width: 760px) { .lin-pair { grid-template-columns: 1fr; } .lin-pair-arrow { justify-self: center; transform: rotate(90deg); } }
.lin-frame { background: var(--bg-1); border: 1px solid var(--hairline); border-radius: var(--radius); padding: var(--sp-3); }
.lin-frame-lead { font-family: var(--body); font-size: 1rem; line-height: 1.5; color: var(--tx-1); }
.lin-frame-qs { margin: var(--sp-2) 0 0; padding-left: 1.1rem; font-family: var(--body); font-style: italic; color: var(--tx-2); font-size: .95rem; }
.lin-turn-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.lin-turn-when { font-size: var(--fs-ui); color: var(--tx-1); font-weight: 600; }
.lin-curve { background: var(--bg-1); border: 1px solid var(--hairline); border-radius: var(--radius); }
.lin-curve-line { fill: none; stroke: var(--sea); stroke-width: 1.6; }
.lin-curve-mark { stroke: var(--tx-1); stroke-width: 1.5; stroke-dasharray: 2 2; }
.lin-names { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.lin-names .lin-input { flex: 1 1 14rem; }

.lin-split-bar { display: flex; align-items: center; gap: var(--sp-1); margin-bottom: var(--sp-2); }
.lin-clusters { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--sp-3); }
.lin-cluster { background: var(--bg-1); border: 1px solid var(--hairline); border-radius: var(--radius); padding: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-2); }
.lin-cluster[data-role="spin"] { border-color: var(--tx-2); }
.lin-cluster[data-role="stay"] { opacity: .75; }
.lin-cluster-head { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: baseline; }
.lin-cluster-n { font-size: var(--fs-meta); color: var(--tx-3); }
.lin-cluster-samples { margin: 0; padding-left: 1rem; font-size: var(--fs-meta); color: var(--tx-2); line-height: 1.45; }

.lin-spark-rows { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--sp-1); }
.lin-spark-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: var(--sp-2); align-items: center; padding: var(--sp-2) var(--sp-3); background: var(--bg-1); border: 1px solid var(--hairline); border-radius: var(--radius); }
.lin-spark-row.lin-card-done { opacity: .55; }
.lin-spark-row .lin-settled { grid-column: 1 / -1; }
.lin-spark-names { font-size: var(--fs-ui); color: var(--tx-2); }
.lin-spark-into { color: var(--tx-1); }
.lin-spark-arrow { color: var(--tx-3); }
@media (max-width: 700px) { .lin-spark-row { grid-template-columns: 1fr auto auto; } .lin-spark-row .lin-score { display: none; } }

.lin-done { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--sp-1); }
.lin-done-row { flex-direction: row; align-items: baseline; padding: var(--sp-2) var(--sp-3); gap: var(--sp-3); }
.lin-done-text { flex: 1; font-size: var(--fs-ui); color: var(--tx-2); }

.lin-picker { position: relative; display: flex; flex-direction: column; gap: var(--sp-1); }
.lin-picker-out { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; max-height: 16rem; overflow-y: auto; }
.lin-picker-row { font: inherit; font-size: var(--fs-meta); text-align: left; color: var(--tx-2); background: var(--bg-1); border: 1px solid var(--hairline); padding: .4rem .6rem; cursor: pointer; }
.lin-picker-row:hover, .lin-picker-row:focus-visible { color: var(--tx-1); border-color: var(--rule); }
.lin-hand-card { gap: var(--sp-3); }

@media (max-width: 700px) {
  .lin-titlebar { flex-direction: column; }
  .lin-count-n { font-size: 1.5rem; }
  .lin-card { padding: var(--sp-3); }
}

/* ---------- since-you-left: the map redrew (public/sinceLeft.js) ---------- */
.sinceleft-redrawn { margin: var(--sp-3) 0; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--rule); border-left: 3px solid var(--tx-1); border-radius: var(--radius); background: var(--bg-2); font-family: var(--ui); }
.sinceleft-redrawn-row { display: grid; grid-template-columns: 1.2rem 1fr; gap: var(--sp-2); align-items: baseline; padding: .25rem 0; font-size: var(--fs-ui); color: var(--tx-2); }
.sinceleft-redrawn-glyph { color: var(--tx-1); text-align: center; }
.sinceleft-redrawn a { color: var(--tx-1); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
