/* ============ misc views: timeline, clashes, stipulations, gaps, quiz ============ */

/* ---------- shared filter chips (tl / cl / stp) ---------- */
.tl-chip, .cl-chip, .stp-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px;
  padding: 7px 13px 6px; border-radius: 99px; border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--ink-2); font-weight: 700; font-size: 0.88rem; cursor: pointer;
  transition: background 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
}
.tl-chip:hover, .cl-chip:hover, .stp-chip:hover { color: var(--ink); border-color: var(--ink-3); }
.tl-chip[aria-pressed="true"], .cl-chip[aria-pressed="true"], .stp-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tl-chip.k-pl, .cl-chip.k-pl { color: var(--pl); border-color: var(--pl-line); background: var(--pl-soft); }
.tl-chip.k-df, .cl-chip.k-df { color: var(--df); border-color: var(--df-line); background: var(--df-soft); }
.tl-chip.k-ex, .cl-chip.k-ex { color: var(--ex); border-color: var(--ink-3); background: var(--ex-soft); border-radius: 6px; }
.tl-chip.k-ct { color: var(--court); border-color: color-mix(in oklab, var(--court) 35%, transparent); background: var(--court-soft); }
.tl-chip.k-pl[aria-pressed="true"], .cl-chip.k-pl[aria-pressed="true"] { background: var(--pl); border-color: var(--pl); color: var(--bg); }
.tl-chip.k-df[aria-pressed="true"], .cl-chip.k-df[aria-pressed="true"] { background: var(--df); border-color: var(--df); color: var(--bg); }
.tl-chip.k-ex[aria-pressed="true"], .cl-chip.k-ex[aria-pressed="true"] { background: var(--ex); border-color: var(--ex); color: var(--bg); }
.tl-chip.k-ct[aria-pressed="true"] { background: var(--court); border-color: var(--court); color: var(--bg); }
.tl-chip.is-hl[aria-pressed="false"] { background: var(--hi-soft); border-color: color-mix(in oklab, var(--hi) 70%, var(--ink) 15%); color: var(--ink); }
.tl-chip-n, .cl-chip-n, .stp-chip-n { font-family: var(--f-mono); font-size: 0.74rem; opacity: 0.75; }

/* ================= TIMELINE ================= */
.tl-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 0; overflow-x: auto; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.tl-strip-y { display: grid; gap: 6px; text-align: left; padding: 12px 14px 12px; min-height: 44px; border: 0; border-right: 1px solid var(--line); background: none; cursor: pointer; color: var(--ink); transition: background 160ms var(--ease); }
.tl-strip-y:last-child { border-right: 0; }
.tl-strip-y:hover:not([disabled]) { background: var(--hi-soft); }
.tl-strip-y[disabled] { cursor: default; opacity: 0.45; }
.tl-strip-n { font-size: var(--step-2); font-weight: 850; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.tl-strip-ticks { display: flex; gap: 4px; height: 14px; align-items: flex-end; }
.tl-strip-ticks i { width: 6px; height: 10px; border-radius: 2px; background: var(--olive-2); transition: opacity 200ms var(--ease), transform 200ms var(--ease); transform-origin: bottom; }
.tl-strip-ticks i.hl { height: 14px; background: var(--hi); box-shadow: inset 0 0 0 1.5px var(--olive); }
.tl-strip-ticks i.off { opacity: 0.18; transform: scaleY(0.6); }
.tl-strip-c { font-size: 0.82rem; color: var(--ink-2); }
.tl-strip-c b { font-family: var(--f-mono); font-weight: 700; color: var(--ink); }

.tl-page .tl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(24px, 4vw, 56px); align-items: start; margin-top: 28px; }
@media (max-width: 920px) { .tl-page .tl-layout { grid-template-columns: 1fr; } }
.tl-filters { display: grid; gap: 12px; padding-bottom: 16px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.tl-fgroup { display: grid; grid-template-columns: 4.6em 1fr; gap: 8px; align-items: start; }
.tl-flabel, .cl-flabel { font-weight: 800; font-size: 0.86rem; color: var(--ink-2); padding-top: 10px; }
@media (max-width: 560px) { .tl-fgroup { grid-template-columns: 1fr; gap: 4px; } .tl-flabel { padding-top: 0; } }
.tl-status { margin: 0; }

.tl-year { position: relative; }
.tl-year[hidden] { display: none; }
.tl-year-h { position: sticky; top: 60px; z-index: 2; background: var(--bg); padding: 18px 0 8px; margin-top: 8px; font-size: var(--step-3); font-weight: 900; letter-spacing: -0.04em; color: var(--ink); }
.tl-year-h span { padding: 0 0.12em; background: linear-gradient(transparent 58%, var(--hi-mark) 58%, var(--hi-mark) 92%, transparent 92%); }
.tl-list { --tl-date: 8.8rem; list-style: none; margin: 0 0 8px; padding: 0; position: relative; }
.tl-list::before { content: ""; position: absolute; top: 6px; bottom: 6px; left: calc(var(--tl-date) + 16px + 9px); width: 2px; background: var(--line); border-radius: 2px; }
.tl-item { display: grid; grid-template-columns: var(--tl-date) 20px minmax(0, 1fr); column-gap: 16px; padding: 12px 0; position: relative; }
.tl-item[hidden] { display: none; }
.tl-date { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; padding-top: 1px; line-height: 1.35; }
.tl-dot { width: 14px; height: 14px; margin: 4px 0 0 3px; border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 2px var(--olive-2); position: relative; z-index: 1; }
.tl-body { min-width: 0; }
.tl-text { margin: 0 0 6px; font-family: var(--f-read); font-size: 1.04rem; line-height: 1.5; }
.tl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.tl-meta .src { font-size: 0.72rem; }
.tl-phase { font-size: 0.74rem; }
.tl-hl .tl-dot { width: 20px; height: 20px; margin: 1px 0 0; background: var(--hi); box-shadow: 0 0 0 2.5px var(--olive); }
.tl-hl .tl-body { background: var(--hi-soft); border: 1px solid color-mix(in oklab, var(--hi) 70%, var(--ink) 12%); border-radius: var(--r); padding: 12px 14px; margin-top: -6px; }
.tl-hl .tl-text { font-size: 1.12rem; font-weight: 600; }
.tl-hl .tl-date { color: var(--ink); }
.tl-flag { display: inline-block; font-size: 0.74rem; font-weight: 850; padding: 2px 8px 1px; border-radius: 5px; background: var(--hi); color: oklch(0.2 0.02 110); margin-bottom: 6px; }
.tl-hl-links { margin-top: 10px; }
.tl-gap { list-style: none; padding: 0 0 0 calc(var(--tl-date) + 16px + 20px + 16px); font-family: var(--f-mono); font-size: 0.74rem; color: var(--ink-3); line-height: 1; margin: -2px 0; }
@media (max-width: 600px) {
  .tl-list { --tl-date: 0px; }
  .tl-list::before { left: 9px; }
  .tl-item { grid-template-columns: 20px minmax(0, 1fr); column-gap: 12px; }
  .tl-date { grid-column: 2; grid-row: 1; text-align: left; margin-bottom: 4px; }
  .tl-dot { grid-column: 1; grid-row: 1; }
  .tl-body { grid-column: 2; grid-row: 2; }
  .tl-hl .tl-body { margin-top: 0; }
  .tl-gap { padding-left: 32px; }
}
.tl-empty[hidden] { display: none; }

.tl-side { position: sticky; top: 84px; display: grid; gap: 14px; }
@media (max-width: 920px) { .tl-side { position: static; } }
.tl-side-h { font-size: 1.1rem; margin-bottom: 4px; }
.tl-calc .small { margin-bottom: 12px; }
.tl-sel { display: grid; gap: 3px; margin-bottom: 10px; font-size: 0.84rem; font-weight: 750; color: var(--ink-2); }
.tl-sel select { font: inherit; font-weight: 600; font-size: 0.9rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 8px; padding: 9px 10px; min-height: 42px; width: 100%; min-width: 0; }
.tl-out { display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line); }
.tl-out b { font-family: var(--f-mono); font-size: 1.25rem; font-weight: 700; color: var(--ink); line-height: 1.25; }
.tl-out span { font-size: 0.84rem; color: var(--ink-2); }
.tl-side-note p { margin: 0 0 8px; }

/* ================= CLASHES ================= */
.cl-bar { display: grid; gap: 12px; padding: 16px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.cl-fgroup { display: grid; grid-template-columns: 4.8em 1fr; gap: 8px; align-items: start; }
@media (max-width: 560px) { .cl-fgroup { grid-template-columns: 1fr; gap: 4px; } .cl-flabel { padding-top: 0; } }
.cl-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.cl-mode .seg button { min-height: 40px; }
.cl-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 4px; color: var(--ink-2); }
.cl-legend span { display: inline-flex; align-items: center; gap: 7px; }
.cl-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.cl-dot.pl { background: var(--pl); } .cl-dot.df { background: var(--df); } .cl-dot.ex { background: var(--ex-soft); box-shadow: inset 0 0 0 1.5px var(--ink-3); border-radius: 2px; }
.cl-status { min-height: 1.2em; margin: 6px 0 0; }

.cl-list { list-style: none; margin: 8px 0 0; padding: 0; }
.cl-item { padding: 26px 0 24px; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.cl-item[hidden] { display: none; }
.cl-q { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 14px; align-items: baseline; margin-bottom: 14px; }
.cl-n { font-family: var(--f-mono); font-size: 0.9rem; font-weight: 700; color: var(--ink-3); }
.cl-qt { font-size: var(--step-1); font-weight: 800; }
.cl-note { justify-self: end; font-size: 0.78rem; font-weight: 800; padding: 3px 9px 2px; border-radius: 6px; background: var(--hi-soft); border: 1px solid color-mix(in oklab, var(--hi) 70%, var(--ink) 12%); white-space: nowrap; }
@media (max-width: 600px) { .cl-q { grid-template-columns: auto minmax(0, 1fr); } .cl-note { grid-column: 2; justify-self: start; } }
.cl-reveal { margin: 0 0 6px; min-height: 40px; }
.cl-reveal[hidden] { display: none; }
.cl-vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0; align-items: stretch; }
.cl-vs[hidden] { display: none; }
.cl-vs.cl-in { animation: rise 420ms var(--ease) both; }
.cl-vs-mid { align-self: center; font-family: var(--f-read); font-style: italic; color: var(--ink-3); padding: 0 12px; font-size: 1.1rem; }
@media (max-width: 720px) { .cl-vs { grid-template-columns: 1fr; } .cl-vs-mid { padding: 6px 0; text-align: center; } }
.cl-ver { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 12px; min-width: 0; }
.cl-ver.cl-pl { background: var(--pl-soft); border-color: var(--pl-line); }
.cl-ver.cl-df { background: var(--df-soft); border-color: var(--df-line); }
.cl-ver.cl-ex { background: var(--ex-soft); border-color: var(--ink-3); border-radius: 4px; }
.cl-ver.cl-mix { background: var(--surface); border-color: var(--line-strong); }
.cl-ver-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px; }
.cl-ver-k { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; font-weight: 850; font-size: 0.82rem; background: var(--ink); color: var(--bg); }
.cl-ver-t { font-weight: 800; font-size: 0.92rem; }
.cl-ver-s { margin-left: auto; font-size: 0.78rem; font-weight: 700; color: var(--ink-2); }
.cl-pl .cl-ver-s { color: var(--pl); } .cl-df .cl-ver-s { color: var(--df); }
.cl-segs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cl-seg { display: grid; gap: 2px; }
.cl-seg + .cl-seg { padding-top: 10px; border-top: 1px dashed var(--line-strong); }
.cl-who { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 800; color: var(--ink-2); }
.cl-who::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.cl-seg-pl .cl-who { color: var(--pl); } .cl-seg-pl .cl-who::before { background: var(--pl); }
.cl-seg-df .cl-who { color: var(--df); } .cl-seg-df .cl-who::before { background: var(--df); }
.cl-seg-ex .cl-who::before { border-radius: 2px; background: var(--ex-soft); box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.cl-say { font-family: var(--f-read); font-size: 1rem; line-height: 1.55; }
.cl-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 14px; }
.cl-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 10px 4px; border-radius: 8px; font-size: 0.86rem; font-weight: 700; text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: var(--bg); }
.cl-link:hover { border-color: var(--ink-3); color: var(--ink); }
.cl-link.k-pl { color: var(--pl); } .cl-link.k-df { color: var(--df); } .cl-link.k-ct { color: var(--court); }
.cl-link-p { font-family: var(--f-mono); font-size: 0.72rem; font-weight: 500; color: var(--ink-3); }
.cl-empty[hidden] { display: none; }
.cl-foot { margin-top: 32px; }
.cl-more { margin-top: 8px; }

/* ================= STIPULATIONS ================= */
.stp-jump { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.stp-jump::-webkit-scrollbar { display: none; }
.stp-jump button { border: 0; background: none; padding: 10px 12px; min-height: 42px; font-weight: 700; color: var(--ink-2); cursor: pointer; white-space: nowrap; border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.stp-jump button:hover { color: var(--ink); border-bottom-color: var(--line-strong); }
.stp-page .section { scroll-margin-top: 76px; }

.stp-caption { border-top: 3px double var(--ink); border-bottom: 3px double var(--ink); padding: 22px clamp(4px, 3vw, 28px); text-align: center; background: var(--court-soft); }
.stp-court { font-weight: 800; font-size: 0.92rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--court); margin-bottom: 16px; }
.stp-parties { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.stp-parties div { display: grid; gap: 2px; }
.stp-parties b { font-size: var(--step-2); font-weight: 850; letter-spacing: -0.02em; line-height: 1.1; }
.stp-parties div:first-child b { color: var(--pl); } .stp-parties div:last-child b { color: var(--df); }
.stp-parties span { font-size: 0.86rem; color: var(--ink-2); font-weight: 650; }
.stp-parties i { font-family: var(--f-read); font-size: 1.4rem; color: var(--ink-3); }
@media (max-width: 560px) { .stp-parties { grid-template-columns: 1fr; gap: 6px; } }
.stp-type { max-width: 62ch; margin: 16px auto 0; font-family: var(--f-read); color: var(--ink-2); }

.stp-sof { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.stp-sof li { display: grid; grid-template-columns: 2.4em minmax(0, 1fr); gap: 12px; padding: 14px 0 4px; border-bottom: 1px solid var(--line); }
.stp-sof-n { font-weight: 900; font-size: 1.5rem; line-height: 1; color: var(--court); font-variant-numeric: tabular-nums; }
.stp-sof p { margin: 0 0 10px; }
.stp-obs { margin: 6px 0 0; padding-left: 1.1em; }
.stp-obs li { margin-bottom: 6px; }

.stp-short { margin-bottom: 18px; }
.stp-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.stp-tools-r { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stp-find input { font: inherit; font-size: 0.92rem; min-height: 40px; width: min(240px, 100%); padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); }
.stp-find input::placeholder { color: var(--ink-3); }
.stp-hint { min-height: 1.2em; margin: 8px 0 0; }
.stp-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); column-gap: clamp(20px, 3vw, 40px); }
.stp-item { display: grid; grid-template-columns: 2.4em minmax(0, 1fr); gap: 12px; padding: 16px 8px 12px; border-bottom: 1px solid var(--line); border-radius: 4px; scroll-margin-top: 90px; }
.stp-item[hidden] { display: none; }
.stp-n { font-weight: 900; font-size: 1.7rem; line-height: 1; color: var(--court); font-variant-numeric: tabular-nums; }
.stp-topic { font-size: 1.05rem; margin: 2px 0 6px; }
.stp-text .read { font-size: 1rem; line-height: 1.6; margin: 0 0 6px; }
.stp-text[hidden] { display: none; }
.stp-show { min-height: 40px; }
.stp-show[hidden] { display: none; }
.stp-rel { margin: 0; color: var(--ink-2); }
.stp-empty[hidden] { display: none; }

.stp-table th[scope="row"] { text-transform: none; letter-spacing: 0; font-size: 0.95rem; color: var(--ink); background: var(--bg); white-space: normal; min-width: 11em; }
.stp-table td { min-width: 7em; }
.stp-table td:first-child { font-weight: 400; }

.stp-ex { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.stp-ex li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; border-bottom: 1px solid var(--line); }
.stp-ex-a { display: grid; grid-template-columns: 3em minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 4px; text-decoration: none; color: var(--ink); flex: 1 1 320px; min-width: 0; }
.stp-ex-a:hover { color: var(--ink); background: var(--surface); }
.stp-ex-id { display: grid; place-items: center; height: 2.4em; font-family: var(--f-mono); font-weight: 700; border: 1.5px solid var(--ink-3); border-radius: 3px; background: var(--ex-soft); color: var(--ex); }
.stp-ex-t { display: grid; gap: 1px; } .stp-ex-t b { font-weight: 750; line-height: 1.3; }
.stp-ex-st { display: flex; gap: 6px; padding: 0 4px 10px; }
.stp-ex-st a { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 10px; border-radius: 99px; background: var(--court-soft); color: var(--court); font-weight: 750; text-decoration: none; }
.stp-ex-st a:hover { color: var(--court); text-decoration: underline; }
.stp-disclaimer { border-top: 1px solid var(--line); padding-top: 18px; }
.stp-disclaimer h2 { font-size: 1rem; margin-bottom: 6px; }
.stp-disclaimer .read { color: var(--ink-2); font-size: 0.98rem; max-width: 70ch; }

/* ================= GAPS ================= */
.gap-rule-in { background: var(--olive-soft); border: 1px solid color-mix(in oklab, var(--olive) 25%, transparent); border-radius: var(--r-lg); padding: clamp(18px, 3vw, 28px); }
.gap-rule-h { font-size: var(--step-1); margin-bottom: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gap-rule-in .read { max-width: 72ch; }
.gap-rules { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.gap-rules li { display: grid; grid-template-columns: 7.2em minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); }
.gap-rk { font-size: 0.8rem; font-weight: 850; justify-self: start; padding: 2px 8px 1px; border-radius: 5px; }
.gap-r-ok .gap-rk { background: color-mix(in oklab, var(--ok) 15%, var(--bg)); color: color-mix(in oklab, var(--ok) 75%, var(--ink)); }
.gap-r-no .gap-rk { background: color-mix(in oklab, var(--warn) 18%, var(--bg)); color: var(--ink); }
.gap-r-x .gap-rk { background: var(--surface-2); color: var(--ink); }
@media (max-width: 560px) { .gap-rules li { grid-template-columns: 1fr; gap: 4px; } }

.gap-intro { max-width: 68ch; color: var(--ink-2); margin-top: -4px; }
.gap-ctrl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gap-ctrl .seg button { min-height: 40px; }
.gap-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.gap-item { border-bottom: 1px solid var(--line); }
.gap-d > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 2em minmax(0, 1fr) 28px; gap: 12px; align-items: baseline; padding: 16px 4px; }
.gap-d > summary::-webkit-details-marker { display: none; }
.gap-d > summary:hover { background: var(--hi-soft); }
.gap-n { font-family: var(--f-mono); font-weight: 700; color: var(--ink-3); }
.gap-t { font-family: var(--f-read); font-size: 1.05rem; line-height: 1.5; }
.gap-tog { justify-self: end; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); position: relative; align-self: center; }
.gap-tog::before, .gap-tog::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.6px; background: var(--ink-2); transform: translate(-50%, -50%); transition: transform 220ms var(--ease); }
.gap-tog::after { transform: translate(-50%, -50%) rotate(90deg); }
.gap-d[open] .gap-tog::after { transform: translate(-50%, -50%) rotate(0deg); }
.gap-body { padding: 0 4px 18px calc(2em + 16px); animation: rise 360ms var(--ease) both; }
@media (max-width: 560px) { .gap-body { padding-left: 4px; } }
.gap-sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.gap-side { border-radius: var(--r); padding: 12px 14px 6px; border: 1px solid; }
.gap-side h3 { font-size: 0.92rem; font-weight: 750; display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--ink-2); }
.gap-side ul { margin: 0; padding-left: 1.1em; }
.gap-side li { margin-bottom: 8px; font-size: 0.95rem; line-height: 1.5; }
.gap-pl { background: var(--pl-soft); border-color: var(--pl-line); }
.gap-df { background: var(--df-soft); border-color: var(--df-line); }
.gap-page[data-side="pl"] .gap-df, .gap-page[data-side="df"] .gap-pl { display: none; }
.gap-go { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.gap-ex-lede { margin-top: -6px; }
.gap-tabs { margin-bottom: 14px; }
.gap-tabs button { min-height: 44px; }
.gap-tab-n { font-family: var(--f-mono); font-size: 0.74rem; color: var(--ink-3); margin-left: 2px; }
.gap-panel-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 8px; }
.gap-panel-h h3 { font-size: var(--step-1); }
.gap-panel-h .btn { margin-left: auto; }
.gap-watch { list-style: none; margin: 0; padding: 0; counter-reset: gw; border-top: 1px solid var(--line); }
.gap-watch li { counter-increment: gw; display: grid; grid-template-columns: 2em minmax(0, 1fr); gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 0.98rem; }
.gap-watch li::before { content: counter(gw); font-family: var(--f-mono); font-size: 0.82rem; color: var(--ink-3); padding-top: 2px; }

/* ================= QUIZ ================= */
.qz-stage { min-height: 360px; }
.qz-start { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: clamp(20px, 4vw, 48px); align-items: start; }
@media (max-width: 820px) { .qz-start { grid-template-columns: 1fr; } }
.qz-h { font-size: var(--step-2); margin-bottom: 14px; }
.qz-rounds { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.qz-round { display: grid; gap: 4px; text-align: left; padding: 20px; border-radius: var(--r-lg); border: 1px solid var(--line-strong); background: var(--bg); cursor: pointer; color: var(--ink); transition: transform 200ms var(--ease), border-color 200ms var(--ease), background 200ms var(--ease); }
.qz-round:hover { transform: translateY(-2px); border-color: var(--olive-2); background: var(--olive-soft); }
.qz-round b { font-size: 1.25rem; font-weight: 850; }
.qz-round span { color: var(--ink-2); font-size: 0.93rem; }
.qz-round .qz-best { margin-top: 6px; font-family: var(--f-mono); font-size: 0.8rem; color: var(--olive); }
.qz-cats { border: 0; padding: 0; margin: 22px 0 0; }
.qz-cats legend { font-weight: 800; margin-bottom: 8px; padding: 0; }
.qz-cats .btn { min-height: 40px; }
.qz-cat-n { font-family: var(--f-mono); font-size: 0.74rem; color: var(--ink-3); }
.qz-how { padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.qz-how p { margin: 0 0 8px; } .qz-how p:last-child { margin: 0; }

.qz-card { max-width: 760px; animation: rise 380ms var(--ease) both; }
.qz-top { display: flex; justify-content: space-between; gap: 12px; font-size: 0.9rem; color: var(--ink-2); margin-bottom: 8px; }
.qz-top b { color: var(--ink); font-family: var(--f-mono); }
.qz-bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-bottom: 22px; }
.qz-bar span { display: block; height: 100%; background: var(--olive-2); transform-origin: 0 50%; transition: transform 420ms var(--ease); }
.qz-cat { margin-bottom: 10px; }
.qz-q { font-size: var(--step-2); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 20px; outline: none; }
.qz-opts { display: grid; gap: 10px; }
.qz-opt { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; text-align: left; min-height: 56px; padding: 10px 14px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); cursor: pointer; font-size: 1.02rem; font-weight: 600; line-height: 1.35; transition: border-color 160ms var(--ease), background 160ms var(--ease), transform 160ms var(--ease); }
.qz-opt:hover:not([disabled]) { border-color: var(--olive-2); background: var(--olive-soft); }
.qz-opt:active:not([disabled]) { transform: translateY(1px); }
.qz-opt[disabled] { cursor: default; }
.qz-opt[disabled]:not(.is-right):not(.is-wrong) { opacity: 0.55; }
.qz-letter { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-family: var(--f-mono); font-weight: 700; font-size: 0.85rem; background: var(--surface-2); color: var(--ink-2); }
.qz-mark { font-size: 0.78rem; font-weight: 800; white-space: nowrap; }
.qz-opt.is-right { border-color: var(--ok); background: color-mix(in oklab, var(--ok) 12%, var(--bg)); }
.qz-opt.is-right .qz-letter { background: var(--ok); color: var(--bg); }
.qz-opt.is-right .qz-mark { color: color-mix(in oklab, var(--ok) 70%, var(--ink)); }
.qz-opt.is-wrong { border-color: var(--warn); background: color-mix(in oklab, var(--warn) 10%, var(--bg)); }
.qz-opt.is-wrong .qz-letter { background: var(--warn); color: oklch(0.2 0.02 110); }
.qz-opt.is-wrong .qz-mark { color: color-mix(in oklab, var(--warn) 60%, var(--ink)); }
@media (max-width: 520px) { .qz-opt { grid-template-columns: 30px minmax(0, 1fr); } .qz-mark { grid-column: 2; } .qz-mark:empty { display: none; } }
.qz-fb { margin-top: 16px; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); animation: rise 320ms var(--ease) both; }
.qz-fb.ok { border-color: color-mix(in oklab, var(--ok) 45%, transparent); }
.qz-verdict { font-weight: 850; font-size: 1.05rem; margin: 0 0 4px; }
.qz-fb.ok .qz-verdict { color: color-mix(in oklab, var(--ok) 70%, var(--ink)); }
.qz-fb.no { border-color: color-mix(in oklab, var(--warn) 45%, transparent); }
.qz-why { font-family: var(--f-read); margin: 0; line-height: 1.55; }
.qz-src .src { font-size: 0.72rem; }
.qz-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.qz-nav .btn { min-height: 44px; }
.qz-nav [hidden] { display: none; }

.qz-end { max-width: 820px; }
.qz-result { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.qz-big { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.qz-big b { font-size: clamp(3.4rem, 2.6rem + 4vw, 5.6rem); font-weight: 900; line-height: 0.9; letter-spacing: -0.05em; }
.qz-big span { font-size: 1.4rem; font-weight: 700; color: var(--ink-3); }
.qz-pct { font-size: var(--step-2); font-weight: 850; margin: 0 0 4px; }
.qz-newbest { display: inline-block; vertical-align: middle; font-size: 0.8rem; font-weight: 850; padding: 3px 9px 2px; border-radius: 6px; background: var(--hi); color: oklch(0.2 0.02 110); }
.qz-result .muted { margin: 0; max-width: 46ch; }
.qz-cats-res { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 8px; max-width: 520px; }
.qz-cats-res li { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) 3em; gap: 12px; align-items: center; font-size: 0.92rem; font-weight: 700; }
.qz-meter { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.qz-meter i { display: block; height: 100%; background: var(--olive-2); transform-origin: 0 50%; transition: transform 600ms var(--ease); }
.qz-cr { font-family: var(--f-mono); font-size: 0.82rem; text-align: right; color: var(--ink-2); }
.qz-again { margin: 6px 0 28px; }
.qz-again .btn { min-height: 44px; }
.qz-rev-h { font-size: var(--step-1); margin-bottom: 8px; }
.qz-review { list-style: none; margin: 0; padding: 0; counter-reset: qr; border-top: 1px solid var(--line); }
.qz-review li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.qz-rq { font-weight: 800; margin: 0 0 8px; }
.qz-ra { display: grid; grid-template-columns: 5.4em minmax(0, 1fr); gap: 10px; margin: 0 0 4px; font-size: 0.95rem; }
.qz-ra span { font-size: 0.78rem; font-weight: 850; padding-top: 2px; }
.qz-ra.no span { color: color-mix(in oklab, var(--warn) 60%, var(--ink)); } .qz-ra.no { color: var(--ink-2); text-decoration: line-through; text-decoration-color: color-mix(in oklab, var(--warn) 70%, transparent); }
.qz-ra.no span { text-decoration: none; display: inline-block; }
.qz-ra.ok span { color: color-mix(in oklab, var(--ok) 70%, var(--ink)); } .qz-ra.ok { font-weight: 700; }
.qz-review .qz-why { margin-top: 8px; color: var(--ink-2); }

/* long multi-page cites may wrap inside these views (narrow screens) */
.tl-meta .cite, .gap-side .cite, .gap-watch .cite, .qz-why .cite, .stp-page .cite, .cl-page .cite { white-space: normal; overflow-wrap: anywhere; }

/* tap targets: shared .btn.small is 34px; these pages are used on phones */
.tl-page .btn.small, .cl-page .btn.small, .stp-page .btn.small, .gap-page .btn.small, .qz-page .btn.small { min-height: 40px; }
