/* Shared style for the pages around the home page (guides, links).
   Same palette, type and spacing as index.html: warm paper, ink, serif section names, Barlow wordmark, rust accent. */
@font-face {
  font-family: 'Barlow Condensed';
  font-weight: 800;
  font-style: italic;
  font-display: swap;
  src: url('/assets/barlow-condensed-800i.ttf') format('truetype');
}
:root {
  color-scheme: light;
  --paper: #f8f6f1;
  --ink: #211f23;
  --secondary: #565252;
  --rule: #d8d4ce;
  --accent: #a83d32;
  --serif: Georgia, 'Times New Roman', serif;
  --wordmark: 'Barlow Condensed', Impact, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); overflow-x: clip; }
body { font-family: 'DM Sans', Arial, sans-serif; -webkit-font-smoothing: antialiased; }
::selection { color: #fff; background: #743a31; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
:where(a, button):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.page { max-width: 1480px; margin: auto; padding: 0 clamp(20px, 4vw, 64px) clamp(64px, 7vw, 104px); }

/* type */
.eyebrow { font-size: 13px; font-weight: 650; color: #87392c; }
.page-title { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -.055em; }
.section-name { font-family: var(--serif); font-weight: 400; font-size: clamp(31px, 3.3vw, 44px); line-height: 1.04; letter-spacing: -.055em; }
.lede { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.45; letter-spacing: -.025em; color: var(--ink); max-width: 46ch; }
.muted { color: var(--secondary); }
.text-link { color: var(--accent); font-weight: 650; font-size: 13px; text-underline-offset: 3px; }
.text-link:hover { text-decoration: underline; }
.wordmark { font-family: var(--wordmark); font-weight: 800; font-style: italic; letter-spacing: -.045em; line-height: .89; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 16px; width: max-content; min-height: 40px; padding: 9px 14px;
  font-size: 13px; font-weight: 650; color: #fff; background: var(--ink); border-radius: 5px; }
.btn:hover { background: #483839; }
.btn .arrow { font-size: 17px; line-height: 1; transition: transform .16s; }
.btn:hover .arrow { transform: translateX(3px); }
.btn.ghost { color: var(--ink); background: transparent; box-shadow: inset 0 0 0 1px #bdb5ac; }
.btn.ghost:hover { background: #ece7df; }

/* guide list (used on /guides and the home page) */
.guide-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 22px; }
.guide-card { display: block; }
.guide-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 5px; background: #e4ded5; }
.guide-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.guide-card:hover .guide-thumb img { transform: scale(1.025); }
.guide-thumb .len { position: absolute; right: 7px; bottom: 7px; padding: 2px 6px; border-radius: 3px; font-size: 11px; font-weight: 600;
  color: #fff; background: rgb(24 21 23 / .82); font-variant-numeric: tabular-nums; }
.guide-card :is(h2, h3) { margin-top: 12px; font-size: 17px; font-weight: 700; line-height: 1.22; letter-spacing: -.035em; }
.guide-card:hover :is(h2, h3) { color: var(--accent); }
.guide-card p { margin-top: 5px; font-size: 13px; line-height: 1.5; color: var(--secondary); }

/* guide page */
.crumb { font-size: 13px; color: var(--secondary); margin-top: 26px; }
.crumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.guide-head { margin-top: 14px; max-width: 900px; }
.guide-head .lede { margin-top: 16px; }
.guide-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 14px; font-size: 12px; color: var(--secondary); }
.guide-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(32px, 5.5vw, 80px); margin-top: 32px; }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #1c1a1c; }
.player img { width: 100%; height: 100%; object-fit: cover; }
.player button { position: absolute; inset: 0; display: grid; place-items: center; }
.player button span { display: flex; align-items: center; gap: 10px; padding: 11px 16px 11px 13px; border-radius: 5px;
  background: rgb(248 246 241 / .94); color: var(--ink); font-size: 14px; font-weight: 650; transition: transform .16s; }
.player button:hover span { transform: scale(1.03); }
.player button svg { width: 15px; height: 15px; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.watch-on { margin-top: 10px; font-size: 12px; color: var(--secondary); }
.watch-on a { text-decoration: underline; text-underline-offset: 3px; }
.notes h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.5vw, 34px); letter-spacing: -.05em; line-height: 1.05; }
.notes > * + h2 { margin-top: 34px; }
.notes p { margin-top: 12px; font-size: 15px; line-height: 1.6; color: var(--secondary); max-width: 60ch; }
.notes p strong { color: var(--ink); font-weight: 650; }
.chapters { list-style: none; padding: 0; margin-top: 14px; border-top: 1px solid var(--rule); }
.chapters li { border-bottom: 1px solid var(--rule); }
.chapters button { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; width: 100%; padding: 10px 0; text-align: left; font-size: 14px; line-height: 1.4; }
.chapters button time { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.chapters button:hover span { text-decoration: underline; text-underline-offset: 3px; }
.specs { margin-top: 14px; font-size: 14px; }
.specs > div { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.specs > div:first-child { border-top: 1px solid var(--rule); }
.specs dt { color: var(--secondary); }
.specs dd { font-weight: 550; line-height: 1.45; }
.specs dd small { display: block; font-weight: 400; color: var(--secondary); font-size: 12px; margin-top: 2px; }
.code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 12px; padding: 12px 14px; border-radius: 6px; background: #efebe4; }
.code-row code { font: 12px/1.5 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; flex: 1 1 220px; }
.copy { color: var(--accent); font-weight: 600; font-size: 12px; }
.copy:hover { text-decoration: underline; text-underline-offset: 2px; }
.drills { list-style: none; counter-reset: d; padding: 0; margin-top: 14px; border-top: 1px solid var(--rule); }
.drills li { counter-increment: d; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 4px 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.drills li::before { content: counter(d); color: var(--accent); font-weight: 650; }
.drills li small { grid-column: 2; color: var(--secondary); font-size: 12px; }
.drills li .copy { grid-row: 1; grid-column: 3; }
.aside-card { padding: 22px 0 0; border-top: 1px solid var(--rule); }
.aside-card h3 { font-size: 20px; font-weight: 700; letter-spacing: -.045em; line-height: 1.2; }
.aside-card p { margin-top: 8px; font-size: 14px; line-height: 1.55; color: var(--secondary); }
.aside-card .btn { margin-top: 14px; }
.aside-card + .aside-card { margin-top: 28px; }
.next-guide { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: center; margin-top: 12px; }
.next-guide .guide-thumb { border-radius: 4px; }
.next-guide strong { display: block; font-size: 15px; line-height: 1.25; letter-spacing: -.03em; }
.next-guide:hover strong { color: var(--accent); }
.next-guide small { display: block; margin-top: 3px; font-size: 12px; color: var(--secondary); }

/* links page */
.links-page { max-width: 560px; margin: auto; padding: 0 20px clamp(48px, 6vw, 80px); }
.links-cover { position: relative; isolation: isolate; padding: 54px 0 26px; }
.links-cover .map-print { position: absolute; inset: 0 -40px; z-index: -1; overflow: hidden; mix-blend-mode: multiply;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.55) 45%, transparent 85%), linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.55) 45%, transparent 85%), linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  mask-composite: intersect; }
.links-cover .map-print img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.links-cover .avatar { display: block; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: #ded6cd; }
.links-cover .avatar img { width: 100%; height: 100%; object-fit: cover; }
.links-cover h1 { font-size: clamp(64px, 17vw, 92px); margin-top: 18px; padding-right: .12em; }
.links-cover p { margin-top: 10px; font-size: 17px; letter-spacing: -.03em; }
.links-cover .stats { margin-top: 6px; font-size: 13px; color: var(--secondary); }
.link-list { list-style: none; padding: 0; margin-top: 8px; border-top: 1px solid var(--rule); }
.link-list li { border-bottom: 1px solid var(--rule); }
.link-list a { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 15px 2px; }
.link-list svg { width: 18px; height: 18px; }
.link-list strong { display: block; font-size: 16px; letter-spacing: -.03em; }
.link-list small { display: block; margin-top: 2px; font-size: 12px; color: var(--secondary); }
.link-list .go { color: var(--secondary); transition: transform .16s, color .16s; }
.link-list a:hover strong { color: var(--accent); }
.link-list a:hover .go { transform: translate(2px, -2px); color: var(--ink); }
.link-list .primary strong { font-size: 18px; }
.link-group { margin-top: 26px; font-size: 12px; font-weight: 650; letter-spacing: .02em; color: var(--secondary); text-transform: uppercase; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 12px); opacity: 0; padding: 9px 14px; border-radius: 5px;
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; pointer-events: none; transition: opacity .18s, transform .18s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-layout { grid-template-columns: 1fr; }
}
@media (max-width: 570px) {
  .guide-grid { grid-template-columns: 1fr; gap: 24px; }
  .specs > div { grid-template-columns: 104px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .enter { animation: arrive 480ms cubic-bezier(.18,.78,.22,1) 60ms both; }
}
@keyframes arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
