/* A Guide to Autonomy, PROOF edition. Palette and fonts from the PROOF site. */

/* ── Fonts (local copies, no remote request) ── */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('fonts/jetbrainsmono-latin-ext.woff2?v=7db7affbce1f') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('fonts/jetbrainsmono-latin.woff2?v=1e06740a02a4') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Righteous';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/righteous-latin-ext.woff2?v=6373d7c7c233') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Righteous';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/righteous-latin.woff2?v=17bb3e21ead2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Tokens ── */
:root {
  --black: #080808;
  --white: #ffffff;
  --raised: #0f0d0a;
  --sunk: #0c0c0c;
  --text: rgba(255, 255, 255, 0.86);
  --muted: rgba(255, 255, 255, 0.64);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.28);

  --part-1: #00c896; --part-1-text: #00c896;
  --part-2: #8b5cf6; --part-2-text: #a78bfa;
  --part-3: #f5a623; --part-3-text: #f5a623;
  --accent: var(--white);
  --accent-text: var(--white);
  --focus: var(--white);

  --display: 'Righteous', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --header-h: 64px;
  --tocbar-h: 0px;
  --anchor-offset: calc(var(--header-h) + 24px);
  --pad: clamp(16px, 4vw, 56px);
  --measure: 42rem;
  color-scheme: dark;
}
@media (max-width: 1023px) {
  :root { --tocbar-h: 48px; --anchor-offset: calc(var(--header-h) + var(--tocbar-h) + 16px); }
}

.part-1 { --accent: var(--part-1); --accent-text: var(--part-1-text); }
.part-2 { --accent: var(--part-2); --accent-text: var(--part-2-text); }
.part-3 { --accent: var(--part-3); --accent-text: var(--part-3-text); }

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--black); color: var(--text);
  font-family: var(--mono); font-size: 16px; line-height: 1.7;
  font-variant-ligatures: none;
}
main { flex: 1 0 auto; }
main:focus { outline: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
ol, ul { list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, h3[tabindex="-1"]:focus { outline: none; }
::selection { background: var(--white); color: var(--black); }
mark { background: rgba(255, 255, 255, 0.2); color: var(--white); padding: 0 0.1em; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 1000;
  padding: 12px 16px; background: var(--white); color: var(--black);
  font-size: 13px; letter-spacing: 0.06em; text-decoration: none;
}
.skip-link:focus { top: 10px; outline: 3px solid var(--part-1); }

.noscript { max-width: 40rem; margin: 96px auto; padding: 0 var(--pad); }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(8, 8, 8, 0.96);
  border-bottom: 1px solid var(--line);
}
@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .site-header { background: rgba(8, 8, 8, 0.86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
}
.header-inner {
  max-width: 1440px; height: 100%; margin: 0 auto; padding: 0 var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand {
  min-width: 0; min-height: 44px;
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  color: var(--white); text-decoration: none;
}
.brand-title {
  font-family: var(--display); font-size: 19px; line-height: 1.1;
  text-transform: uppercase; letter-spacing: 0.03em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-sub {
  font-size: 10.5px; line-height: 1.3; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}
.wm { font-family: var(--display); letter-spacing: 0.04em; color: var(--white); }
.preview-tag {
  margin-left: 4px; padding: 1px 6px;
  border: 1px solid var(--line-strong); color: var(--white);
}
.brand:hover .brand-title { color: var(--muted); }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.hbtn {
  min-width: 44px; min-height: 44px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: transparent; border: 1px solid var(--line-strong); color: var(--white);
  font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  transition: border-color 0.15s, background 0.15s;
}
.hbtn:hover { border-color: rgba(255, 255, 255, 0.7); }
.hbtn-icon { width: 18px; height: 18px; flex: none; }
.hbtn-kbd {
  font-family: inherit; font-size: 11px; line-height: 1; color: var(--muted);
  border: 1px solid var(--line-strong); padding: 3px 6px;
}
.hbtn--lang { font-family: var(--display); font-size: 14px; letter-spacing: 0.08em; }

.lang { position: relative; }
.lang-panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60;
  width: min(340px, calc(100vw - 24px));
  padding: 18px 18px 8px;
  background: var(--raised); border: 1px solid var(--line-strong);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}
.lang-title { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.lang-list { margin-top: 10px; }
.lang-item {
  display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--line);
}
.lang-code { font-family: var(--display); font-size: 1.05rem; color: var(--muted); }
.lang-item.is-current .lang-code { color: var(--white); }
.lang-body { display: flex; flex-direction: column; gap: 2px; }
.lang-name { color: var(--white); font-size: 0.95rem; }
.lang-state { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--part-1-text); }
.lang-note { font-size: 0.82rem; line-height: 1.5; color: var(--muted); }

@media (max-width: 760px) {
  .hbtn { padding: 0; }
  .hbtn-label, .hbtn-kbd {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
}
@media (max-width: 420px) {
  .brand-title { font-size: 14px; }
  .brand-sub { font-size: 9.5px; letter-spacing: 0.1em; }
  .header-actions { gap: 6px; }
}

/* ── Reading progress ── */
.read-progress {
  position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 45;
  height: 2px; pointer-events: none;
}
.read-progress i {
  display: block; height: 100%; background: var(--accent);
  transform-origin: left; transform: scaleX(var(--p, 0));
}

/* ── Buttons ── */
.btn {
  min-height: 52px; padding: 12px 22px;
  display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
  font-family: var(--display); font-size: 15px; line-height: 1.15;
  letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  border: 1px solid currentColor;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.btn-sub {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: none; opacity: 0.8;
}
.btn--dark { background: var(--black); color: var(--white); border-color: var(--black); }
.btn--dark:hover { opacity: 0.86; }
.btn--line { color: var(--black); }
.btn--line:hover { background: var(--black); color: var(--white); }

.btn-quiet, .link-btn {
  background: none; border: 0;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.btn-quiet {
  min-height: 44px; padding: 0;
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.btn-quiet:hover { color: var(--white); }
.btn-quiet[data-armed] {
  padding: 0 14px; border: 1px solid #ff5a5a; color: #ff7a7a; text-decoration: none;
}
.link-btn { display: inline-block; padding: 4px 0; color: var(--white); }

/* ── Cover ── */
.cover {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  border-bottom: 1px solid var(--line);
}
.cover-main {
  container-type: inline-size;
  display: flex; flex-direction: column; justify-content: space-between; gap: 56px;
  padding: clamp(40px, 6vw, 88px) var(--pad);
}
.cover-kicker, .block-kicker, .ch-kicker, .path-no {
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}
.cover-title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(3rem, 9vw, 8rem);
  font-size: clamp(3rem, 15.5cqi, 9.5rem);
  line-height: 0.86; letter-spacing: -0.01em; text-transform: uppercase;
  color: var(--white);
}
.cover-line { display: block; }
.cover-line.is-outlined {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--white);
  padding: 0.04em 0;
}
@supports not (-webkit-text-stroke: 1px white) {
  .cover-line.is-outlined { color: var(--muted); }
}
.cover-parts { display: grid; }
.cover-parts li {
  position: relative;
  display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) auto; align-items: baseline; gap: 4px 16px;
  padding: 16px 0 14px;
  border-top: 1px solid var(--line);
}
.cp-no { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-text); }
/* A fixed colour marker per part: a key to the part colours, not a measure of anything. */
.cp-no::before {
  content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px;
  vertical-align: 0.05em; background: var(--accent);
}
.cp-name { font-family: var(--display); font-size: clamp(1.1rem, 1.6vw, 1.45rem); text-transform: uppercase; letter-spacing: 0.03em; color: var(--white); }
.cp-range { font-size: 12px; letter-spacing: 0.06em; color: var(--muted); white-space: nowrap; }

.cover-side {
  --focus: var(--black);
  container-type: inline-size;
  background: var(--white); color: var(--black);
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: clamp(40px, 6vw, 88px) var(--pad);
}
.cover-side ::selection { background: var(--black); color: var(--white); }
.wordmark { display: flex; flex-direction: column; }
.wm-big {
  font-family: var(--display); line-height: 0.88; text-transform: uppercase; letter-spacing: 0.01em;
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-size: clamp(3.5rem, 23cqi, 8rem);
}
.wm-conf { margin-top: 8px; font-size: clamp(13px, 1.3vw, 17px); letter-spacing: 0.15em; color: rgba(8, 8, 8, 0.68); }
.edition-line {
  margin-top: 28px; padding-top: 14px; border-top: 1px solid rgba(8, 8, 8, 0.16);
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
}
.edition-by { margin-top: 4px; font-size: 13px; color: rgba(8, 8, 8, 0.7); }
.cover-intro { display: grid; gap: 14px; max-width: 34rem; }
.cover-intro p { font-size: 15px; line-height: 1.75; color: rgba(8, 8, 8, 0.78); }
.cover-intro p:first-child { font-size: 16px; color: var(--black); }
.cover-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.cover-alt { font-size: 13px; color: rgba(8, 8, 8, 0.72); }
.cover-alt a { display: inline-block; padding: 6px 0; text-underline-offset: 3px; }
.cover-alt a:hover { color: var(--black); }

/* ── Page layout with local table of contents ── */
.page-layout {
  max-width: 1440px; margin: 0 auto;
  padding: 0 var(--pad) clamp(72px, 9vw, 128px);
  display: grid; grid-template-columns: 15rem minmax(0, 1fr);
  column-gap: clamp(40px, 5vw, 88px);
}
.page-layout.no-toc { grid-template-columns: minmax(0, 1fr); }
.page-main { min-width: 0; }
.page-main [id] { scroll-margin-top: var(--anchor-offset); }

.toc-aside {
  align-self: start;
  position: sticky; top: var(--header-h);
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: clamp(40px, 5vw, 72px) 4px 32px;
}
.toc-toggle { display: none; }
.toc-title { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.toc-list { border-left: 1px solid var(--line); }
.toc-sub { margin-left: 14px; }
.toc-list a {
  min-height: 44px; margin-left: -1px; padding: 8px 8px 8px 14px;
  display: flex; align-items: center; gap: 10px;
  border-left: 2px solid transparent;
  font-size: 13px; line-height: 1.45; color: var(--muted); text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}
.toc-list a:hover { color: var(--white); }
.toc-list a:focus-visible { outline-offset: -3px; }
.toc-list a[aria-current] { color: var(--white); border-left-color: var(--accent); }
.toc-no { flex: none; font-size: 11px; color: var(--accent-text); }

@media (max-width: 1023px) {
  .page-layout { grid-template-columns: minmax(0, 1fr); }
  .toc-aside {
    position: sticky; top: var(--header-h); z-index: 30;
    max-height: none; overflow: visible; padding: 0;
    margin: 0 calc(var(--pad) * -1);
    background: rgba(8, 8, 8, 0.97);
    border-bottom: 1px solid var(--line);
  }
  .toc-toggle {
    display: flex; align-items: center; gap: 12px;
    width: 100%; min-height: var(--tocbar-h); padding: 0 var(--pad);
    background: transparent; border: 0; text-align: left;
    font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  }
  .toc-toggle-label { flex: none; color: var(--white); }
  .toc-current {
    flex: 1 1 auto; min-width: 0;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    color: var(--muted); letter-spacing: 0.04em; text-transform: none; font-size: 13px;
  }
  .toc-chevron {
    flex: none; width: 10px; height: 10px; margin-left: auto;
    border-right: 1.5px solid var(--white); border-bottom: 1.5px solid var(--white);
    transform: translateY(-3px) rotate(45deg); transition: transform 0.2s;
  }
  .toc-toggle[aria-expanded="true"] .toc-chevron { transform: translateY(2px) rotate(-135deg); }
  .toc-toggle:focus-visible { outline-offset: -3px; }
  .page-toc {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    max-height: min(70vh, 560px); overflow-y: auto; overscroll-behavior: contain;
    padding: 12px var(--pad) 20px;
    background: var(--raised);
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-strong);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.55);
  }
  .toc-aside.is-open .page-toc { display: block; }
  .page-toc .toc-title { display: none; }
}

/* ── Blocks (cover sections, orientation page) ── */
.block { padding-top: clamp(56px, 7vw, 96px); }
.block > h2, .page-head h1 {
  font-family: var(--display); font-weight: 400; text-transform: uppercase; color: var(--white);
}
.block > h2 { margin-top: 10px; font-size: clamp(1.9rem, 3.4vw, 2.9rem); line-height: 1; }
.block-lead { margin-top: 16px; max-width: var(--measure); color: var(--muted); }
.block-text { margin-top: 24px; max-width: var(--measure); display: grid; gap: 14px; }
.block-text p { color: var(--text); }

.parts-grid {
  margin-top: 36px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px clamp(24px, 3vw, 40px);
}
.part-col { border-top: 3px solid var(--accent); padding-top: 14px; }
.part-col h3 { display: flex; flex-direction: column; gap: 4px; }
.part-no { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-text); }
.part-name { font-family: var(--display); font-weight: 400; font-size: 1.5rem; line-height: 1.1; text-transform: uppercase; color: var(--white); }
@media (max-width: 1239px) { .parts-grid { grid-template-columns: minmax(0, 1fr); } }
.ch-list.contents-extra { max-width: 46rem; margin-top: 28px; }
.parts-grid + .contents-extra { margin-top: 40px; }

/* Chapter lists (contents, paths, drawer) */
.ch-list { margin-top: 14px; border-top: 1px solid var(--line); }
.ch-row {
  min-height: 56px; padding: 12px 4px;
  display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 2px 10px; align-content: center;
  border-bottom: 1px solid var(--line); text-decoration: none;
}
.ch-n { grid-row: span 2; font-size: 12px; line-height: 1.9; color: var(--accent-text); }
.ch-t { font-size: 0.95rem; line-height: 1.45; color: var(--white); }
.ch-s { font-size: 11.5px; letter-spacing: 0.04em; color: var(--muted); }
a.ch-row { transition: background 0.15s; }
a.ch-row:hover { background: rgba(255, 255, 255, 0.04); }
a.ch-row:hover .ch-t { color: var(--accent-text); }
a.ch-row:focus-visible { outline-offset: -3px; }
a.ch-row[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); padding-left: 12px; }
.ch-item.is-planned .ch-t { color: var(--muted); }
.ch-item.is-planned .ch-n { color: var(--muted); }
.ch-item.is-read .ch-n::after { content: ' ✓'; }

/* Stats */
.stats {
  margin-top: 28px; max-width: 46rem;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.stat { background: var(--black); padding: 22px 20px; display: flex; flex-direction: column; gap: 8px; }
.stat-n { font-family: var(--display); font-size: clamp(2.4rem, 4.4vw, 3.6rem); line-height: 1; color: var(--white); font-variant-numeric: tabular-nums; }
.stat-n small { font-size: 0.42em; color: var(--muted); }
.stat-l { font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.stat .bar { margin-top: 6px; }
.stat .bar i { background: var(--white); }

.bar { display: block; position: relative; height: 4px; overflow: hidden; background: rgba(255, 255, 255, 0.1); }
.bar i {
  position: absolute; inset: 0; background: var(--accent);
  transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 0.3s ease;
}

/* ── Orientation page ── */
.page-head { padding-top: clamp(48px, 6vw, 88px); }
.page-title { margin-top: 12px; font-size: clamp(2.6rem, 6.4vw, 5.6rem); line-height: 0.92; }
.page-title--md { font-size: clamp(2rem, 4.6vw, 3.8rem); }
.start-lead { margin-top: 28px; max-width: 44rem; display: grid; gap: 10px; }
.start-lead p { font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem); line-height: 1.55; color: var(--white); }
.start-lead p + p { color: var(--text); }

.paths {
  margin-top: clamp(40px, 5vw, 64px);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.path {
  background: var(--black);
  padding: clamp(22px, 3vw, 36px);
  box-shadow: inset 0 3px 0 var(--accent);
  display: flex; flex-direction: column;
}
.path-no { color: var(--accent-text); }
.path h2 {
  margin-top: 10px; font-family: var(--display); font-weight: 400;
  font-size: clamp(1.45rem, 2.2vw, 1.9rem); line-height: 1.1; color: var(--white);
}
.path-desc { margin-top: 12px; color: var(--text); font-size: 0.95rem; }
.path-sub { margin-top: 22px; font-size: 11.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.path .ch-list { margin-top: 18px; }
.path-sub + .ch-list { margin-top: 10px; }
.path-avail { margin-top: auto; padding-top: 18px; font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 1239px) { .paths { grid-template-columns: minmax(0, 1fr); } }

.anatomy {
  margin-top: 28px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
}
.anatomy li { padding: 16px 20px 18px 0; display: flex; flex-direction: column; gap: 6px; }
.anatomy li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.an-no { font-size: 12px; color: var(--muted); }
.an-t { font-family: var(--display); font-size: 1.15rem; line-height: 1.15; text-transform: uppercase; color: var(--white); }
.an-d { font-size: 0.88rem; line-height: 1.55; color: var(--text); }
@media (max-width: 1239px) {
  .anatomy { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .anatomy li:nth-child(3) { padding-left: 0; border-left: 0; }
  .anatomy li:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .anatomy { grid-template-columns: minmax(0, 1fr); }
  .anatomy li, .anatomy li + li { padding-left: 0; border-left: 0; }
  .anatomy li + li { border-top: 1px solid var(--line); }
}

/* Notices (planned chapter, unknown page) */
.is-notice .page-main { max-width: 52rem; }
.notice {
  margin-top: 32px; padding: 24px;
  border: 1px solid var(--line-strong); border-top: 3px solid var(--accent);
  background: var(--raised);
  display: grid; gap: 14px;
}
.notice strong { color: var(--white); font-weight: 500; }
.notice-links { display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 13px; letter-spacing: 0.06em; }
.notice-links a, .notice-links .link-btn { display: inline-flex; align-items: center; min-height: 44px; color: var(--white); text-underline-offset: 3px; }

/* ── Chapter ── */
.chapter-head {
  padding: clamp(44px, 5.5vw, 80px) 0 clamp(28px, 3.5vw, 44px);
  border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 40px; align-items: end;
}
.ch-kicker { grid-column: 1; color: var(--accent-text); }
.ch-title {
  grid-column: 1; margin-top: 14px; max-width: 18ch;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 4.4rem); line-height: 0.95; text-transform: uppercase; color: var(--white);
}
.ch-bignum {
  grid-column: 2; grid-row: 1 / span 3; align-self: start;
  font-family: var(--display); font-size: clamp(5rem, 11vw, 10.5rem); line-height: 0.8;
  color: transparent; -webkit-text-stroke: 1.5px var(--accent);
  user-select: none;
}
@supports not (-webkit-text-stroke: 1px white) { .ch-bignum { color: var(--accent); opacity: 0.35; } }
.ch-meta {
  grid-column: 1; margin-top: 24px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px;
  font-size: 12.5px; letter-spacing: 0.06em; color: var(--muted);
}
.ch-meta a { display: inline-flex; align-items: center; min-height: 44px; color: var(--white); text-underline-offset: 3px; }
.ch-readstate:not(:empty)::before { content: '✓ '; color: var(--accent-text); }
.ch-readstate:empty { display: none; }
@media (max-width: 640px) {
  .chapter-head { grid-template-columns: minmax(0, 1fr); }
  .ch-bignum { grid-column: 1; grid-row: auto; order: -1; margin-bottom: 18px; font-size: 4.5rem; }
}

/* Prose */
.prose { font-size: clamp(15px, 0.86rem + 0.18vw, 16.5px); }
.sec { position: relative; display: flex; flex-direction: column; padding-top: clamp(52px, 6vw, 80px); }
.sec > * { max-width: var(--measure); }
.sec > .compare, .sec > .sec-kicker { max-width: none; }
.sec-kicker {
  display: flex; align-items: center; gap: 14px;
  padding-top: 14px; margin-bottom: 14px;
  border-top: 1px solid var(--line);
  font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}
.sec-no { color: var(--accent-text); }
.sec h2 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.55rem, 2.6vw, 2.25rem); line-height: 1.12; letter-spacing: 0.005em; color: var(--white);
}
.prose p { margin-top: 1.05em; color: var(--text); }
.sec h2 + p { margin-top: 0.9em; }
.prose strong { color: var(--white); font-weight: 500; }
.prose a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 0.2em; overflow-wrap: break-word; }
.prose a:hover { color: var(--white); }
.prose a.ext::after { content: '\2009\2197'; content: '\2009\2197' / ''; font-size: 0.8em; }

.prose ul { margin-top: 1em; }
.prose ul > li { position: relative; margin-top: 0.7em; padding-left: 1.6em; color: var(--text); }
.prose ul > li::before {
  content: ''; position: absolute; left: 0; top: 0.85em;
  width: 0.8em; height: 1px; background: var(--accent);
}

/* Subheadings and numbered lists (part openings, chapter 9 level 2, chapter 12 questions) */
.sec h3 {
  margin-top: 2.2em;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.2rem, 1.8vw, 1.45rem); line-height: 1.2; color: var(--white);
}
.prose ol:not(.steps) { margin-top: 1em; padding-left: 1.8em; list-style: decimal; }
.prose ol:not(.steps) > li { margin-top: 0.6em; padding-left: 0.3em; color: var(--text); }
.prose ol:not(.steps) > li::marker { color: var(--accent-text); }

/* Glossary terms */
.prose p.term { padding-left: 16px; border-left: 2px solid var(--line-strong); }
.prose p.term.is-target { border-left-color: var(--accent); background: rgba(255, 255, 255, 0.05); }

/* In brief */
.sec--brief p {
  padding-left: 20px; border-left: 3px solid var(--accent);
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem); line-height: 1.6; color: var(--white);
}

/* Cited sources next to an explanation */
.sec-cited {
  margin-top: 26px; padding-top: 12px; border-top: 1px dashed var(--line-strong);
  font-size: 12.5px;
}
.sec-cited-label { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.prose .sec-cited ul { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 0 18px; }
.prose .sec-cited li { margin: 0; padding: 0; }
.prose .sec-cited li::before { display: none; }
.sec-cited a { display: inline-block; padding: 4px 0; }
@media (min-width: 1360px) {
  .sec { display: block; padding-top: 80px; }
  .sec-cited {
    position: absolute; right: 0; top: 128px;
    width: calc(100% - var(--measure) - 56px); max-width: 17rem;
    margin: 0; padding: 12px 0 0;
  }
  .prose .sec-cited ul { flex-direction: column; }
}

/* Comparisons */
.compare { margin: 28px 0 6px; }
.compare + p, .compare + .compare { margin-top: 1.4em; }
.compare-cap {
  display: flex; justify-content: space-between; gap: 16px; padding-bottom: 10px;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.compare-hint { display: none; color: var(--accent-text); }
.compare.is-scrollable .compare-hint { display: inline; }
.table-scroll {
  overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line-strong); background: var(--sunk);
}
.table-scroll:focus-visible { outline-offset: 2px; }
.table-scroll table {
  width: 100%; min-width: 52rem;
  border-collapse: separate; border-spacing: 0;
  font-size: 13.5px; line-height: 1.6;
}
.table-scroll th, .table-scroll td {
  min-width: 9rem; padding: 14px 16px;
  text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.table-scroll thead th {
  font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-text); background: #141210;
}
.table-scroll td { color: var(--text); }
.table-scroll tbody th[scope="row"] { font-weight: inherit; }
.table-scroll th:first-child, .table-scroll td:first-child {
  position: sticky; left: 0; z-index: 1;
  min-width: 9.5rem; max-width: 12rem;
  background: var(--sunk); border-right: 1px solid var(--line);
  color: var(--white);
}
.table-scroll thead th:first-child { background: #141210; z-index: 2; }
.table-scroll tbody tr:last-child td, .table-scroll tbody tr:last-child th[scope="row"] { border-bottom: 0; }
.table-scroll tbody tr.is-target td, .table-scroll tbody tr.is-target th[scope="row"] { background: #1b1914; }
.table-scroll tbody tr.is-target td:first-child, .table-scroll tbody tr.is-target th[scope="row"]:first-child { box-shadow: inset 3px 0 0 var(--accent); }
@media (max-width: 640px) {
  .table-scroll table { font-size: 13px; min-width: 46rem; }
  .table-scroll th:first-child, .table-scroll td:first-child { min-width: 8rem; max-width: 9rem; }
  .table-scroll th, .table-scroll td { padding: 12px 12px; min-width: 8.5rem; }
}

/* Steps */
.prose .steps { margin-top: 1.4em; border-top: 1px solid var(--line); counter-reset: step; }
.prose .steps > li {
  position: relative; counter-increment: step;
  margin: 0; padding: 18px 4px 18px 3.6em;
  border-bottom: 1px solid var(--line); color: var(--text);
}
.prose .steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 14px;
  font-family: var(--display); font-size: 1.55em; line-height: 1.2; color: var(--accent-text);
}
.prose .steps > li.is-target { background: rgba(255, 255, 255, 0.05); box-shadow: inset 3px 0 0 var(--accent); padding-left: calc(3.6em + 8px); }
.prose .steps > li.is-target::before { left: 12px; }

/* Mistakes to avoid */
.sec--pitfalls ul { padding: 4px 22px; border: 1px solid var(--line); background: var(--raised); }
.prose .sec--pitfalls ul > li { margin: 0; padding: 14px 0 14px 1.8em; border-bottom: 1px solid var(--line); }
.prose .sec--pitfalls ul > li:last-child { border-bottom: 0; }
.prose .sec--pitfalls ul > li::before {
  content: '\00d7'; width: auto; height: auto; background: none;
  top: 13px; font-size: 1.1em; line-height: 1.5; color: var(--accent-text);
}

/* Go further, sources */
.prose ul.refs > li { font-size: 0.92em; line-height: 1.6; }
.sec--sources ul.refs { border-top: 1px solid var(--line); }
.prose .sec--sources ul.refs > li { margin: 0; padding: 10px 0 10px 1.6em; border-bottom: 1px solid var(--line); color: var(--muted); }
.prose .sec--sources ul.refs > li::before { top: 1.35em; }
.prose .sec--sources a { overflow-wrap: anywhere; }

/* Checklist */
.checklist {
  margin-top: 22px; padding: clamp(18px, 3vw, 28px);
  background: var(--raised);
  border: 1px solid var(--line-strong); border-top: 3px solid var(--accent);
}
.cl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.cl-count { font-size: 13px; letter-spacing: 0.06em; color: var(--muted); }
.prose .cl-count { margin: 0; }
.cl-count strong { font-family: var(--display); font-weight: 400; font-size: 1.35rem; color: var(--white); }
.cl-head .bar { flex: 1 1 140px; }
.prose ul.actions { margin-top: 16px; border-top: 1px solid var(--line); }
.prose ul.actions > li { margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.prose ul.actions > li::before { display: none; }
.action-row {
  min-height: 56px; padding: 14px 4px;
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: start; gap: 6px 16px;
  cursor: pointer;
}
.action-cb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; margin-top: 1px;
  border: 1.5px solid rgba(255, 255, 255, 0.6); background: transparent;
  cursor: pointer; transition: background-color 0.15s, border-color 0.15s;
}
.action-cb:hover { border-color: var(--white); }
.action-cb:checked {
  background-color: var(--accent); border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.4l3.3 3.2L13 4.6' fill='none' stroke='%23080808' stroke-width='2.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 17px;
}
.action-text { color: var(--white); line-height: 1.55; }
.action-text a { color: var(--accent-text); }
.effort {
  margin-top: 1px; padding: 3px 8px; white-space: nowrap;
  border: 1px solid currentColor;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text);
}
.action.is-done .action-text { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.35); }
.action.is-done .effort { color: var(--muted); }
.action.is-target { background: rgba(255, 255, 255, 0.05); box-shadow: inset 3px 0 0 var(--accent); }
.action.is-target .action-row { padding-left: 12px; }
.prose .cl-hint { margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.prose .cl-hint a { color: var(--white); }

/* All actions page: 1 checklist per chapter */
.sec .cl-title {
  margin: 0 0 14px;
  font-family: var(--display); font-weight: 400;
  font-size: 1.2rem; line-height: 1.2; text-transform: uppercase; color: var(--white);
}
.prose .cl-title a { display: inline-flex; gap: 12px; min-height: 44px; align-items: center; color: inherit; text-decoration: none; }
.prose .cl-title a:hover { color: var(--accent-text); }
.cl-title-n { font-family: var(--mono); font-size: 12px; color: var(--accent-text); }
@media (max-width: 560px) {
  .action-row { grid-template-columns: 28px minmax(0, 1fr); }
  .effort { grid-column: 2; justify-self: start; }
}
@media (forced-colors: active) {
  .action-cb:checked { background-color: Highlight; border-color: Highlight; }
  .bar i, .read-progress i { background: Highlight; }
}

/* End of chapter */
.chapter-end { margin-top: clamp(56px, 6vw, 80px); max-width: 60rem; }
.read-row {
  min-height: 56px; padding: 12px 18px;
  display: inline-flex; align-items: center; gap: 14px;
  border: 1px solid var(--line-strong); cursor: pointer;
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--white);
}
.read-row:hover { border-color: var(--white); }
.read-row .read-cb {
  -webkit-appearance: none; appearance: none; flex: none;
  width: 24px; height: 24px; border: 1.5px solid rgba(255, 255, 255, 0.6); cursor: pointer;
}
.read-row .read-cb:checked {
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.4l3.3 3.2L13 4.6' fill='none' stroke='%23080808' stroke-width='2.4'/%3E%3C/svg%3E") center / 16px no-repeat;
  border-color: var(--accent);
}
@media (forced-colors: active) {
  .read-row .read-cb:checked { background-color: Highlight; border-color: Highlight; }
}
.pager {
  margin-top: 40px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.pager > * { background: var(--black); padding: 22px 24px; min-height: 104px; display: flex; flex-direction: column; gap: 8px; }
.pager a { text-decoration: none; color: var(--white); transition: background 0.15s; }
.pager a:hover { background: #121212; }
.pager a:focus-visible { outline-offset: -3px; }
.pager-dir { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.pager-title { font-family: var(--display); font-size: 1.2rem; line-height: 1.2; text-transform: uppercase; }
.pager-next { text-align: right; align-items: flex-end; }
.pager a:hover .pager-title { color: var(--accent-text); }
.pager-end .pager-title { color: var(--muted); }
.pager-note { font-size: 13px; color: var(--muted); }
.chapter-end > .pager-note { margin-top: 14px; }
.pager-note a { color: var(--white); text-underline-offset: 3px; }
.ch-kicker a { color: inherit; text-underline-offset: 3px; }
@media (max-width: 640px) {
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager-next { text-align: left; align-items: flex-start; }
}

/* ── Dialogs ── */
.dialog {
  border: 0; padding: 0; background: transparent; color: var(--text);
  max-width: none; max-height: none;
}
.dialog::backdrop { background: rgba(0, 0, 0, 0.72); }
html:has(dialog[open]) { overflow: hidden; }
.dialog-box {
  display: flex; flex-direction: column;
  background: var(--raised); border: 1px solid var(--line-strong);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}
.dialog-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line);
}
.dialog-title { font-family: var(--display); font-weight: 400; font-size: 1.2rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--white); }
.dialog-close {
  min-width: 44px; min-height: 44px; padding: 0 12px;
  display: inline-flex; align-items: center; gap: 10px;
  background: transparent; border: 1px solid var(--line-strong);
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
}
.dialog-close:hover { border-color: var(--white); }
.dialog-esc { font-size: 10px; color: var(--muted); border: 1px solid var(--line-strong); padding: 2px 5px; }
.dialog-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }

.dialog--search { width: min(760px, calc(100% - 24px)); margin: clamp(12px, 9vh, 104px) auto auto; }
.dialog--search .dialog-box { max-height: calc(100vh - clamp(12px, 9vh, 104px) - 24px); max-height: calc(100dvh - clamp(12px, 9vh, 104px) - 24px); }
.search-form { padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.search-label { display: block; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.search-input {
  width: 100%; min-height: 52px; margin-top: 8px; padding: 0 14px;
  background: var(--black); border: 1px solid var(--line-strong); border-radius: 0;
  font-size: 17px; color: var(--white);
  -webkit-appearance: none; appearance: none;
}
.search-input:focus-visible { outline-offset: 0; border-color: var(--white); }
.search-scope { margin-top: 10px; font-size: 12px; line-height: 1.55; color: var(--muted); }
.search-suggest { padding: 18px 20px 22px; }
.search-suggest-title { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.search-suggest ul { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 14px;
  background: transparent; border: 1px solid var(--line-strong);
  font-size: 13px; color: var(--white);
}
.chip:hover { border-color: var(--white); }
.result {
  display: flex; flex-direction: column; gap: 3px;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
}
.result:hover { background: rgba(255, 255, 255, 0.05); }
.result:focus-visible { outline-offset: -3px; background: rgba(255, 255, 255, 0.05); }
.r-kind { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text); }
.r-title { font-size: 0.98rem; line-height: 1.45; color: var(--white); }
.r-snip { font-size: 0.84rem; line-height: 1.55; color: var(--muted); }
.results-empty { padding: 20px; color: var(--muted); }
.results-plan { padding: 16px 20px 22px; border-top: 1px solid var(--line-strong); }
.results-plan-title { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.results-plan li { display: flex; gap: 12px; padding: 8px 0; color: var(--muted); font-size: 0.92rem; }
.r-n { color: var(--accent-text); font-size: 12px; line-height: 1.9; }

.dialog--drawer { margin: 0 0 0 auto; width: min(460px, 100%); height: 100%; }
.dialog--drawer .dialog-box { height: 100%; border-width: 0 0 0 1px; }
.drawer { padding: 8px 20px 28px; }
.drawer-links { display: flex; flex-wrap: wrap; gap: 0 22px; padding-bottom: 6px; }
.drawer-links a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--white); text-underline-offset: 3px;
}
.drawer-part { margin-top: 22px; }
.drawer-part-title {
  padding-top: 10px; border-top: 3px solid var(--accent);
  font-family: var(--display); font-weight: 400; font-size: 1.15rem; text-transform: uppercase; color: var(--white);
}
.drawer-part-title span { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--accent-text); }
.drawer .ch-list { margin-top: 8px; }
.drawer-scope { margin-top: 22px; font-size: 12px; color: var(--muted); }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner {
  max-width: 1440px; margin: 0 auto; padding: 32px var(--pad) 40px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px 40px;
  font-size: 12px; line-height: 1.7; color: var(--muted);
}
.footer-mark { font-family: var(--display); font-size: 1rem; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.03em; color: var(--white); }
.site-footer a { color: var(--white); text-underline-offset: 3px; }

/* ── Mobile composition ── */
@media (max-width: 900px) {
  .cover { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .cover-main { gap: 40px; padding-top: 48px; padding-bottom: 40px; }
  .cover-side { padding-top: 44px; padding-bottom: 48px; }
}
@media (max-width: 560px) {
  .cover-parts li { grid-template-columns: minmax(0, 1fr) auto; }
  .cp-no { grid-column: 1 / -1; }
  .cover-actions .btn { width: 100%; }
  .stats { grid-template-columns: minmax(0, 1fr); }
}

/* ── Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── Print ── */
@media print {
  .site-header, .site-footer, .toc-aside, .read-progress, .pager, .read-row, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .page-layout { display: block; padding: 0; }
  .prose p, .prose li, .table-scroll td, .table-scroll tbody th[scope="row"], .ch-title, .sec h2, .action-text { color: #000 !important; }
  .table-scroll { overflow: visible; border-color: #999; background: #fff; }
  .table-scroll table { min-width: 0; }
  .table-scroll th:first-child, .table-scroll td:first-child { position: static; background: #fff; }
}

/* ── PROOF site integration (appended to styles.css by build_integration.py) ── */

/* Header: links next to the buttons (contents without JavaScript, PROOF site, Lithuanian edition) */
a.hbtn { text-decoration: none; }
.hbtn--site .wm { font-size: 14px; letter-spacing: 0.06em; }

/* Checkboxes stay disabled until the script has read the saved ticks */
.action-cb:disabled, .read-row .read-cb:disabled { cursor: not-allowed; opacity: 0.45; }

/* Former checkbox IDs of the checklist (/book/en/<chapter>/#<chapter>-<n>), kept as anchors */
.legacy-anchor { display: block; height: 0; }

/* Talk recordings on the cover (#replays): the cards are styled by replays.css, appended to guide.css */
.block-text a { color: var(--white); text-underline-offset: 3px; }

/* Footer links back to the conference site */
.footer-links a { display: inline-block; padding: 4px 0; }

/* Legal page: the SHA-256 of the source archive wraps on narrow screens */
.legal-hash { overflow-wrap: anywhere; word-break: break-all; }

/* ── Talk recordings of the cover (#replays) ──
   Scoped copy of the replay styles of the conference home page (style.css, sections "AFTER THE CONFERENCE" and
   "Replays: thumbnail on the right"), same cards, thumbnail, white button and player box as the home page.
   Everything sits under .guide-replays so no other part of the guide is affected. Host colours map to the guide
   variables: --border -> --line, --c-priv -> --part-1, --c-dece -> --part-2, --c-mono -> --part-3.
   The markup comes from site/build_site.py replay_item; the player is replays.js, the host player with an embed-only referrer policy. */
.guide-replays { margin-top: 28px; max-width: 46rem; }
.guide-replays .rp-list { list-style: none; margin: 0; padding: 0; }
.guide-replays .rp-item {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  padding: 18px 22px; margin-bottom: 8px;
  background: rgba(255,255,255,0.03);
  border-left: 2px solid var(--line);
}
.guide-replays .rp-item.priv { border-left-color: var(--part-1); }
.guide-replays .rp-item.auto { border-left-color: var(--part-2); }
.guide-replays .rp-item.mono { border-left-color: var(--part-3); }
.guide-replays .rp-text { flex: 1 1 0; min-width: 0; }
.guide-replays .rp-title { font-size: 15px; line-height: 1.45; color: var(--white); }
.guide-replays .rp-spk { font-size: 12px; margin-top: 6px; }
.guide-replays .rp-item.priv .rp-spk { color: var(--part-1-text); }
.guide-replays .rp-item.auto .rp-spk { color: var(--part-2-text); }
.guide-replays .rp-item.mono .rp-spk { color: var(--part-3-text); }
.guide-replays .rp-badge {
  flex-shrink: 0;
  font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); border: 1px solid rgba(255,255,255,0.15);
  padding: 5px 9px; white-space: nowrap;
}
.guide-replays .rp-has-video { padding: 22px; column-gap: 28px; row-gap: 20px; }
.guide-replays .rp-alt { font-size: 12px; margin-top: 8px; color: var(--muted); }
.guide-replays .rp-alt a { color: var(--white); text-underline-offset: 3px; }
.guide-replays .rp-ext { color: var(--white); border-color: rgba(255,255,255,0.5); text-decoration: none; }
.guide-replays .rp-play {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 18px;
  font-family: var(--display); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--black); background: var(--white); border: 1px solid var(--white);
  padding: 11px 18px; text-decoration: none; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.guide-replays .rp-play::before {
  content: ''; width: 0; height: 0;
  border-left: 9px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}
.guide-replays .rp-play:hover { background: transparent; color: var(--white); }
.guide-replays .rp-play:focus-visible, .guide-replays .rp-thumb:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.guide-replays .rp-thumb {
  flex: 0 0 280px; position: relative; display: block; overflow: hidden;
  aspect-ratio: 16 / 9; background: #000; cursor: pointer;
}
.guide-replays .rp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s, opacity 0.4s; }
.guide-replays .rp-thumb::before {
  content: ''; position: absolute; z-index: 1; left: 50%; top: 50%; width: 52px; height: 52px;
  transform: translate(-50%, -50%); border-radius: 50%; background: rgba(255,255,255,0.92);
  transition: transform 0.2s;
}
.guide-replays .rp-thumb::after {
  content: ''; position: absolute; z-index: 2; left: 50%; top: 50%; width: 0; height: 0;
  transform: translate(-35%, -50%);
  border-left: 15px solid #000; border-top: 9px solid transparent; border-bottom: 9px solid transparent;
}
.guide-replays .rp-thumb:hover img { transform: scale(1.03); opacity: 0.85; }
.guide-replays .rp-thumb:hover::before { transform: translate(-50%, -50%) scale(1.08); }
.guide-replays .rp-playing .rp-thumb, .guide-replays .rp-playing .rp-play { display: none; }
.guide-replays .rp-embed { flex: 1 1 100%; aspect-ratio: 16 / 9; }
.guide-replays .rp-embed iframe, .guide-replays .rp-embed video { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.guide-replays .rp-kicker { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--part-3-text); margin-bottom: 8px; }
.guide-replays .rp-closing { margin-top: 20px; background: rgba(255,255,255,0.06); border-left-width: 4px; }
@media (max-width: 768px) {
  .guide-replays .rp-item { flex-direction: column; align-items: flex-start; gap: 12px; }
  .guide-replays .rp-text, .guide-replays .rp-thumb, .guide-replays .rp-embed { flex: none; width: 100%; }
  .guide-replays .rp-thumb { order: -1; }
}
@media (prefers-reduced-motion: reduce) {
  .guide-replays .rp-thumb img, .guide-replays .rp-thumb::before, .guide-replays .rp-play { transition: none; }
}
