/* Applied Coding — gainpips.net/coding. One stylesheet for every page. Light theme; the brand colours of yt_channel_profile.md as accents.
   Font: Ubuntu, the films' and thumbnails' own (Ubuntu Font Licence 1.0), subset to Latin in assets/fonts/. */
@font-face { font-family: 'Ubuntu'; font-weight: 400; font-display: swap; src: url('fonts/ubuntu-400.woff2') format('woff2'); }
@font-face { font-family: 'Ubuntu'; font-weight: 500; font-display: swap; src: url('fonts/ubuntu-500.woff2') format('woff2'); }
@font-face { font-family: 'Ubuntu'; font-weight: 700; font-display: swap; src: url('fonts/ubuntu-700.woff2') format('woff2'); }

:root {
  --paper: #fbfaf6; --card: #ffffff; --ink: #0b0f19; --ink-soft: #475069; --line: #e4e1d6; --tint: #f3f1ea;
  --yellow: #ffd600; --cyan: #00e5ff; --cyan-soft: #d9fbff; --cyan-ink: #0b6477; --purple: #a855f7; --purple-soft: #f3e8ff; --purple-ink: #6d28d9; --green-soft: #e3f3e1; --green-ink: #2d6a2b;
  --radius: 14px; --shadow: 5px 5px 0 var(--ink); --wrap: 1140px;
  --mono: 'Ubuntu Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Ubuntu', 'Segoe UI', system-ui, -apple-system, sans-serif; font-size: 18px; line-height: 1.6; color: var(--ink); background: var(--paper); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
code { font-family: var(--mono); font-size: 0.95em; background: var(--tint); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
:focus-visible { outline: 3px solid var(--purple-ink); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }
[id] { scroll-margin-top: 90px; }

/* ---- header ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251, 250, 246, 0.94); backdrop-filter: blur(8px); border-bottom: 2px solid var(--ink); }
.site-header .wrap { display: flex; align-items: center; gap: 12px 28px; min-height: 68px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; font-size: 1.25rem; letter-spacing: 0.02em; }
.brand img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); }
.brand b { background: linear-gradient(transparent 62%, var(--yellow) 62%); }
.nav { display: flex; gap: 4px 22px; margin-left: auto; flex-wrap: wrap; font-weight: 500; font-size: 1rem; }
.nav a { text-decoration: none; padding: 6px 2px; border-bottom: 3px solid transparent; }
.nav a:hover { border-bottom-color: var(--yellow); }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; gap: 10px; font: inherit; font-weight: 700; text-decoration: none; padding: 13px 22px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); transition: transform 0.12s ease, box-shadow 0.12s ease; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn-primary { background: var(--yellow); }
.btn-small { padding: 8px 14px; font-size: 0.95rem; box-shadow: 3px 3px 0 var(--ink); }
.play { width: 0; height: 0; border-left: 13px solid currentColor; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }

/* ---- hero ---- */
.hero { border-bottom: 2px solid var(--ink); background-color: var(--paper); background-image: radial-gradient(circle, #d9d5c7 1.6px, transparent 1.7px); background-size: 34px 34px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 0.98fr) minmax(0, 1.02fr); gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 0; }
.hero-copy { padding-bottom: 64px; }
.eyebrow { display: inline-block; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cyan-ink); background: var(--cyan-soft); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 14px; margin-bottom: 20px; }
.hero h1 { font-size: clamp(2.9rem, 6.4vw, 5rem); letter-spacing: -0.02em; text-transform: uppercase; }
.hero h1 span { background: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 92%, transparent 92%); }
.tagline { font-size: clamp(1.45rem, 2.9vw, 2.1rem); font-weight: 700; line-height: 1.25; margin-top: 18px; }
.tagline .dim { color: var(--ink-soft); }
.lead { font-size: 1.14rem; color: var(--ink-soft); margin-top: 18px; max-width: 34em; }
.lead strong { color: var(--ink); }
.cta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 30px; }
.handle { margin-top: 18px; font-size: 0.95rem; color: var(--ink-soft); }
.handle a { font-weight: 700; color: var(--ink); }
.hero-art { position: relative; align-self: end; padding: 0 0 120px 45%; }
.hero-figure { position: absolute; left: 0; bottom: -100px; width: 46%; z-index: 2; pointer-events: none; }
.feature { display: block; text-decoration: none; background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transform: rotate(1.4deg); transition: transform 0.15s ease; }
.feature:hover { transform: rotate(0deg) translateY(-3px); }
.feature img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 2px solid var(--ink); }
.feature div { padding: 12px 16px 14px; }
.feature small { display: block; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--purple-ink); }
.feature strong { font-size: 1.12rem; line-height: 1.3; }

/* ---- sections ---- */
section { padding: 76px 0; }
.section-head { max-width: 46em; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
.section-head p:not(.kicker) { color: var(--ink-soft); margin-top: 12px; font-size: 1.1rem; }
.kicker { font-weight: 700; font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--purple-ink); margin-bottom: 10px; }
.alt { background: var(--tint); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }

/* how a guide works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; counter-reset: step; }
.steps li { counter-increment: step; background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); padding: 22px 20px 24px; position: relative; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); background: var(--yellow); font-weight: 700; font-size: 1.2rem; margin-bottom: 14px; }
.steps li:nth-child(2)::before { background: #ffb4a8; } .steps li:nth-child(3)::before { background: var(--cyan); } .steps li:nth-child(4)::before { background: #d6b4fd; }
.steps h3 { font-size: 1.2rem; margin-bottom: 8px; }
.steps p { color: var(--ink-soft); font-size: 1rem; }

/* guide cards */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
.card { display: flex; flex-direction: column; background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card > a.thumb { display: block; border-bottom: 2px solid var(--ink); background: var(--ink); }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.25s ease; }
.card > a.thumb:hover img { transform: scale(1.03); }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; font-size: 0.8rem; font-weight: 700; }
.tags li { border: 1.5px solid var(--ink); border-radius: 999px; padding: 2px 11px; background: var(--tint); }
.tags .pattern { background: var(--purple-soft); color: var(--purple-ink); border-color: var(--purple-ink); }
.tags .lc { background: var(--cyan-soft); color: var(--cyan-ink); border-color: var(--cyan-ink); }
.card h3 { font-size: 1.45rem; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { background: linear-gradient(transparent 62%, var(--yellow) 62%); }
.card p { color: var(--ink-soft); font-size: 1.02rem; }
.card .more { margin-top: auto; padding-top: 6px; font-weight: 700; }
.card .more a { text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 4px; }

/* patterns */
.patterns { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.patterns li { border: 2px dashed #b9b4a3; border-radius: 12px; padding: 14px 16px 16px; background: transparent; }
.patterns li.live { border: 2px solid var(--ink); background: var(--card); box-shadow: 3px 3px 0 var(--ink); }
.patterns h3 { font-size: 1.08rem; display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.patterns p { color: var(--ink-soft); font-size: 0.96rem; margin-top: 6px; font-style: italic; }
.patterns .state { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; border-radius: 999px; padding: 2px 9px; white-space: nowrap; color: var(--ink-soft); background: var(--tint); border: 1.5px solid #b9b4a3; }
.patterns .live .state { color: var(--green-ink); background: var(--green-soft); border-color: var(--green-ink); }
.patterns a { text-decoration: none; }
.patterns a:hover { background: linear-gradient(transparent 62%, var(--yellow) 62%); }

/* the checklist */
.checklist { margin: 0; padding: 0; list-style: none; counter-reset: q; columns: 2; column-gap: 40px; }
.checklist li { counter-increment: q; break-inside: avoid; display: flex; gap: 14px; align-items: baseline; padding: 11px 0; border-bottom: 1.5px solid var(--line); font-weight: 500; }
.checklist li::before { content: counter(q, decimal-leading-zero); font-family: var(--mono); font-weight: 700; color: var(--purple-ink); }

/* about */
.about { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.about p + p { margin-top: 16px; }
.quote { border: 2px solid var(--ink); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); padding: 26px 28px; }
.quote p { font-size: 1.3rem; font-weight: 700; line-height: 1.35; }
.quote p + p { margin-top: 18px; }
.quote .before { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: #e0533d; text-decoration-thickness: 2px; }
.quote .after span { background: linear-gradient(transparent 58%, var(--yellow) 58%); }
.notlist { margin: 18px 0 0; padding-left: 1.2em; color: var(--ink-soft); }
.notlist li { margin: 4px 0; }

/* subscribe band — the banner's colours */
.band { background: var(--ink); color: #f8fafc; padding: 64px 0; }
.band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.band h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.band h2 span { color: var(--yellow); }
.band p { color: #b9c3d6; margin-top: 10px; max-width: 34em; }
.band .btn { box-shadow: 4px 4px 0 var(--cyan); border-color: var(--ink); }
.band .btn:hover { box-shadow: 6px 6px 0 var(--cyan); }

/* footer */
.site-footer { padding: 36px 0 44px; font-size: 0.95rem; color: var(--ink-soft); border-top: 2px solid var(--ink); }
.site-footer .wrap { display: flex; gap: 14px 32px; justify-content: space-between; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 6px 22px; flex-wrap: wrap; }
.site-footer a { color: var(--ink); font-weight: 500; }
.site-footer .fine { flex-basis: 100%; font-size: 0.85rem; }

@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 44px; }
  .hero-copy { padding-bottom: 8px; }
  .hero-art { max-width: 600px; margin: 0 auto; width: 100%; padding-top: 36px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 17px; }
  section { padding: 56px 0; }
  .wrap { padding: 0 18px; }
  .nav { margin-left: 0; width: 100%; gap: 2px 18px; font-size: 0.95rem; }
  .site-header .btn { margin-left: auto; }
  .brand { font-size: 1.1rem; }
  .cards, .steps { grid-template-columns: 1fr; }
  .checklist { columns: 1; }
  .hero-art { padding-bottom: 96px; }
  .hero-figure { bottom: -70px; }
  .site-header .btn { order: 2; }
  .nav { order: 3; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }

/* ---- guide pages (articles) ---- */
.article-head { border-bottom: 2px solid var(--ink); background-color: var(--paper); background-image: radial-gradient(circle, #d9d5c7 1.6px, transparent 1.7px); background-size: 34px 34px; padding: 52px 0 44px; }
.article-head .wrap { max-width: 900px; }
.crumbs { font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 18px; }
.crumbs a { color: var(--ink-soft); }
.article-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); letter-spacing: -0.02em; }
.article-head h1 span { background: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 92%, transparent 92%); }
.standfirst { font-size: 1.25rem; color: var(--ink-soft); margin-top: 18px; max-width: 36em; }
.meta { display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: center; margin-top: 22px; font-size: 0.9rem; color: var(--ink-soft); }
.article { max-width: 900px; margin: 0 auto; padding: 0 24px 40px; }
.prose { max-width: 720px; }
.prose h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); margin: 64px 0 18px; }
.prose h3 { font-size: 1.25rem; margin: 36px 0 12px; }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 1.3em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--purple-ink); font-weight: 700; }
.prose a { text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.chapter { font-weight: 700; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--purple-ink); display: block; margin-bottom: 6px; }
.prose h2 .chapter { margin-bottom: 8px; }
figure { margin: 28px 0 32px; }
figure img { width: 100%; border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
figure.wide { margin-left: calc(50% - 50vw + 24px); margin-right: calc(50% - 50vw + 24px); max-width: 1100px; margin-left: auto; margin-right: auto; }
figcaption { font-size: 0.95rem; color: var(--ink-soft); margin-top: 12px; line-height: 1.5; }
figcaption b { color: var(--ink); }
.video-box { text-decoration: none; color: inherit; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: center; background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin: 28px 0 40px; }
.video-box img { width: 100%; border-radius: 10px; border: 2px solid var(--ink); }
.video-box h3 { margin: 0 0 8px; font-size: 1.2rem; }
.video-box p { margin: 0 0 14px; color: var(--ink-soft); font-size: 1rem; }
.toc { border: 2px solid var(--ink); border-radius: var(--radius); background: var(--tint); padding: 18px 22px; margin: 32px 0; }
.toc strong { display: block; margin-bottom: 8px; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--purple-ink); }
.toc ol { margin: 0; padding-left: 1.4em; columns: 2; column-gap: 28px; font-size: 1rem; }
.toc li { break-inside: avoid; margin: 3px 0; }
.toc a { text-decoration: none; } .toc a:hover { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; }
.callout { border: 2px solid var(--ink); border-left-width: 10px; border-radius: 12px; padding: 16px 20px; margin: 24px 0 28px; background: var(--card); }
.callout.key { border-left-color: var(--yellow); background: #fffbe0; }
.callout.think { border-left-color: var(--purple); background: var(--purple-soft); }
.callout.aside { border-left-color: var(--cyan); background: var(--cyan-soft); }
.callout p:last-child { margin-bottom: 0; }
.callout .label { font-weight: 700; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; display: block; margin-bottom: 6px; }
.formula { font-family: var(--mono); font-size: clamp(1.05rem, 2.4vw, 1.5rem); font-weight: 700; background: var(--card); border: 2px solid var(--ink); border-radius: 12px; padding: 18px 22px; margin: 24px 0; overflow-x: auto; white-space: nowrap; box-shadow: var(--shadow); }
.formula .c-skip { color: var(--cyan-ink); } .formula .c-rob { color: var(--green-ink); } .formula .dim { color: var(--ink-soft); font-weight: 400; }
pre { font-family: var(--mono); font-size: 0.98rem; line-height: 1.55; background: #0f1524; color: #e6edf7; border: 2px solid var(--ink); border-radius: 12px; padding: 18px 0; margin: 22px 0 26px; overflow-x: auto; box-shadow: var(--shadow); tab-size: 4; counter-reset: line; }
pre code { display: block; background: none; border: 0; padding: 0; font-size: inherit; color: inherit; min-width: max-content; }
pre .ln { display: block; padding: 0 22px 0 0; white-space: pre; }
pre .ln::before { counter-increment: line; content: counter(line); display: inline-block; width: 2.2em; margin-right: 1.4em; padding-left: 18px; text-align: right; color: #5d6f8d; user-select: none; border-right: 1.5px solid #253050; margin-right: 1.6em; }
pre .ln.hl { background: rgba(255, 214, 0, 0.13); box-shadow: inset 4px 0 0 var(--yellow); }
pre .ln.hl::before { color: var(--yellow); }
pre .k { color: #ff9ecd; } pre .f { color: #7dd3fc; } pre .n { color: #fcd34d; } pre .c { color: #8b9bb4; font-style: italic; }
.dp-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 22px 0 28px; font-size: 1rem; background: var(--card); border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.dp-table th, .dp-table td { padding: 10px 12px; text-align: center; border-bottom: 1.5px solid var(--line); }
.dp-table th { background: var(--tint); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.dp-table tr:last-child td { border-bottom: 0; }
.dp-table td.win { font-weight: 700; }
.dp-table td.best { font-weight: 700; background: #fffbe0; font-family: var(--mono); font-size: 1.05rem; }
.dp-table .c-skip { color: var(--cyan-ink); } .dp-table .c-rob { color: var(--green-ink); }
.dp-table .mono { font-family: var(--mono); }
.street { display: flex; gap: 10px; justify-content: center; align-items: flex-end; margin: 22px 0 8px; flex-wrap: wrap; }
.house { width: 92px; text-align: center; font-weight: 700; }
.house .roof { width: 0; height: 0; margin: 0 auto; border-left: 46px solid transparent; border-right: 46px solid transparent; border-bottom: 30px solid #c86a4a; }
.house .body { border: 2px solid var(--ink); border-top: 0; border-radius: 0 0 8px 8px; background: #f8efd8; padding: 10px 0 8px; font-size: 1.25rem; }
.house.off .body { background: #ebe9e2; color: var(--ink-soft); } .house.off .roof { border-bottom-color: #b8b2a6; }
.house.on .body { background: #e3f3e1; } .house.on .roof { border-bottom-color: #2d6a2b; }
.house.no .body { background: #f6c9c6; } .house.no .roof { border-bottom-color: #c93b3b; }
.house small { display: block; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-top: 6px; font-weight: 700; }
/* try your own street */
.lab { border: 2px solid var(--ink); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); padding: 22px 24px 24px; margin: 30px 0 36px; }
.lab h3 { margin: 0 0 6px; }
.lab p { color: var(--ink-soft); margin: 0 0 14px; font-size: 1rem; }
.lab-inputs { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.lab-inputs input { width: 72px; font: inherit; font-weight: 700; text-align: center; padding: 8px 6px; border: 2px solid var(--ink); border-radius: 10px; background: #f8efd8; }
.lab-inputs button { font: inherit; font-weight: 700; padding: 8px 14px; border: 2px solid var(--ink); border-radius: 10px; background: var(--card); cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
.lab-inputs button:hover { background: var(--yellow); }
.lab-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 12px 0 8px; }
.lab-out div { border: 2px solid var(--ink); border-radius: 10px; padding: 10px 14px; background: var(--tint); }
.lab-out b { display: block; font-size: 1.3rem; }
.lab-out small { color: var(--ink-soft); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.72rem; }
.lab-out .good { background: #e3f3e1; } .lab-out .bad { background: #f6c9c6; }
.lab .dp-table { margin-bottom: 0; box-shadow: none; }
.lab noscript p { color: var(--ink); }
.steps-3 { list-style: none; margin: 22px 0 28px; padding: 0; display: grid; gap: 14px; counter-reset: s3; }
.steps-3 li { counter-increment: s3; display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; border: 2px solid var(--ink); border-radius: 12px; padding: 16px 18px; background: var(--card); }
.steps-3 li::before { content: counter(s3); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); background: var(--yellow); font-weight: 700; font-size: 1.2rem; }
.steps-3 li:nth-child(2)::before { background: var(--cyan); } .steps-3 li:nth-child(3)::before { background: #d6b4fd; }
.steps-3 strong { display: block; font-size: 1.1rem; margin-bottom: 4px; }
.steps-3 p { margin: 0; color: var(--ink-soft); }
.practice { list-style: none; margin: 22px 0 28px; padding: 0; display: grid; gap: 12px; }
.practice li { border: 2px dashed #b9b4a3; border-radius: 12px; padding: 14px 18px; }
.practice li strong { display: block; margin-bottom: 4px; }
.practice li p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.practice .lvl { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--purple-ink); margin-right: 8px; }
.next-up { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: center; margin: 32px 0; padding: 20px; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--tint); }
.next-up img { width: 100%; border: 2px solid var(--ink); border-radius: 10px; }
.next-up h3 { margin: 0 0 8px; } .next-up p { margin: 0; color: var(--ink-soft); }
.pager { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 40px 0 0; padding-top: 24px; border-top: 2px solid var(--line); }
@media (max-width: 760px) {
  .toc ol { columns: 1; }
  .video-box, .next-up { grid-template-columns: 1fr; }
  .dp-table { font-size: 0.9rem; } .dp-table th, .dp-table td { padding: 8px 6px; }
  .house { width: 64px; } .house .roof { border-left-width: 32px; border-right-width: 32px; border-bottom-width: 22px; } .house .body { font-size: 1rem; }
  .steps-3 li { grid-template-columns: 44px 1fr; }
}
pre .s { color: #a5f3c4; }
/* the Sudoku lab */
.sgrid { display: grid; grid-template-columns: repeat(9, 1fr); width: min(100%, 468px); aspect-ratio: 1; border: 3px solid var(--ink); border-radius: 8px; overflow: hidden; background: var(--card); margin: 14px auto 0; font-family: var(--mono); font-weight: 700; font-size: clamp(0.9rem, 3.4vw, 1.3rem); }
.sgrid div { display: grid; place-items: center; border-right: 1px solid #cfcbbf; border-bottom: 1px solid #cfcbbf; color: var(--ink); }
.sgrid div:nth-child(9n) { border-right: 0; }
.sgrid div:nth-child(3n) { border-right: 2.5px solid var(--ink); } .sgrid div:nth-child(9n) { border-right: 0; }
.sgrid div:nth-child(n+19):nth-child(-n+27), .sgrid div:nth-child(n+46):nth-child(-n+54) { border-bottom: 2.5px solid var(--ink); }
.sgrid div:nth-child(n+73) { border-bottom: 0; }
.sgrid .put { color: var(--purple-ink); background: #faf6ff; }
.sgrid .cur { background: var(--yellow); }
.sgrid .bad { background: #f6c9c6; color: #b3261e; }
.sgrid .done { color: var(--green-ink); }
.lab-stats { display: flex; gap: 10px 22px; flex-wrap: wrap; justify-content: center; margin: 14px 0 4px; font-size: 0.95rem; color: var(--ink-soft); }
.lab-stats b { color: var(--ink); font-family: var(--mono); font-size: 1.15rem; }
.lab-inputs select { font: inherit; font-weight: 700; padding: 8px 10px; border: 2px solid var(--ink); border-radius: 10px; background: var(--card); }
.sgrid div { position: relative; }
.sgrid .badge { font-size: 0.62em; color: #ffffff; background: #5a6472; border-radius: 999px; width: 1.55em; height: 1.55em; display: grid; place-items: center; font-family: var(--mono); }
.sgrid .badge.b1 { background: var(--green-ink); } .sgrid .badge.b0 { background: #b3261e; }
.series { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border: 2px solid var(--ink); border-radius: 12px; background: var(--tint); padding: 10px 16px; margin: 32px 0 0; font-size: 0.95rem; }
.series b { color: var(--purple-ink); letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.78rem; }
.series a { font-weight: 700; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0 28px; }
.compare div { border: 2px solid var(--ink); border-radius: 12px; padding: 14px 18px; background: var(--card); text-align: center; }
.compare b { display: block; font-size: 2.2rem; line-height: 1.1; }
.compare small { font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.75rem; color: var(--ink-soft); }
.compare .old b { color: #b3261e; } .compare .new b { color: var(--green-ink); }

/* ---- the trailer in the hero (it takes the feature card's place and tilt; it straightens once it plays) ---- */
.trailer { margin: 0; }
.trailer.playing { transform: none; }
.trailer-media { position: relative; aspect-ratio: 16 / 9; background: var(--ink); border-bottom: 2px solid var(--ink); }
.trailer-media video, .trailer-media iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: cover; }
.trailer.js:not(.playing) video::-webkit-media-controls { display: none !important; }
.trailer-play { font-family: inherit; position: absolute; inset: 0; display: grid; place-items: center; width: 100%; border: 0; background: rgba(23, 28, 38, 0.06); cursor: pointer; }
.trailer-play::after { content: "Watch the 1-minute trailer"; position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); white-space: nowrap; font-weight: 700; font-size: 0.9rem; line-height: 1; color: var(--ink); background: var(--card); border: 2px solid var(--ink); border-radius: 999px; padding: 7px 14px; }
.trailer-play .play { width: 76px; height: 76px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); display: grid; place-items: center; transition: transform 0.15s ease; }
.trailer-play .play::before { content: ""; margin-left: 6px; border-style: solid; border-width: 15px 0 15px 24px; border-color: transparent transparent transparent var(--ink); }
.trailer-play:hover .play, .trailer-play:focus-visible .play { transform: scale(1.08); }
.trailer figcaption { padding: 12px 16px 14px; }
.trailer figcaption small { display: block; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--purple-ink); }
.trailer figcaption strong { font-size: 1.05rem; line-height: 1.3; }
/* the length of each guide's video on its card */
.card > a.thumb { position: relative; }
.card .dur { position: absolute; right: 10px; bottom: 10px; font-family: var(--mono); font-weight: 700; font-size: 0.8rem; color: #fff; background: rgba(23, 28, 38, 0.86); border-radius: 6px; padding: 3px 8px; }
.trailer .trailer-media { padding: 0; }   /* .feature div pads its caption box; the video box takes no padding */
@media (max-width: 680px) {
  .hero-art { padding: 28px 0 190px 0; }
  .hero-figure { width: 34%; bottom: -40px; }
  .trailer-play::after { font-size: 0.8rem; bottom: 8px; padding: 5px 11px; }
  .trailer-play .play { width: 60px; height: 60px; }
}
