/* Shared styles for the content pages (generated by landing-src/build_pages.py). The home page keeps its own inline copy of the base rules. */
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("/assets/fonts/BarlowCondensed_600SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("/assets/fonts/BarlowCondensed_700Bold.ttf") format("truetype"); }

:root {
  --ground: #121212; --sheet: #1b1b1b; --raised: #242424; --line: #333333;
  --text: #f2f2f2; --muted: #bdbdbd; --accent: #f97015; --accent-press: #e0620d; --on-accent: #1a0d03; --ok: #3ddb8a;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1160px; --gutter: clamp(20px, 5vw, 48px); --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; background: var(--ground); scrollbar-color: #4a4a4a var(--ground); accent-color: var(--accent); }
body { margin: 0; font-family: var(--body); font-size: 18px; line-height: 1.6; color: var(--text); background: var(--ground); -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent); color: var(--on-accent); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 20; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 8px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; text-transform: uppercase; line-height: 1; letter-spacing: 0; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.9rem, 6.6vw, 5.4rem); line-height: .94; letter-spacing: -.015em; }
h2 { font-size: clamp(2.1rem, 4vw, 3.1rem); line-height: .96; letter-spacing: -.01em; }
h3 { font-size: 1.6rem; line-height: 1.05; }
p { margin: 0; max-width: 68ch; text-wrap: pretty; }
.muted { color: var(--muted); }
section { padding-block: clamp(48px, 7vw, 96px); }

.progress { position: fixed; inset: 0 0 auto 0; z-index: 30; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; pointer-events: none; }
@supports (animation-timeline: scroll()) {
  .progress { animation: grow linear both; animation-timeline: scroll(root); }
  @keyframes grow { to { transform: scaleX(1); } }
}

.top { position: sticky; top: 0; z-index: 10; transition: transform .35s var(--ease); background: rgba(18, 18, 18, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top.hide:not(:focus-within) { transform: translateY(-100%); }
.top .wrap { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.7rem; text-transform: uppercase; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.top nav { display: flex; align-items: center; gap: 4px 22px; margin-left: auto; margin-right: 8px; }
.top nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .95rem; color: var(--muted); text-decoration: none; transition: color .2s; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--text); }
.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 10px; font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; background: var(--accent); color: var(--on-accent); transition: background .2s, transform .2s var(--ease); }
.pill:hover { background: var(--accent-press); }
.pill:active { transform: translateY(1px); }

.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.badge { display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 18px 0 14px; border: 1px solid #a6a6a6; border-radius: 11px; background: #000; color: #fff; text-decoration: none; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; transition: transform .2s var(--ease), border-color .2s; }
.badge .glyph { flex: none; width: 30px; height: 30px; }
.badge.play .glyph { width: 28px; height: 28px; }
.b-text { display: flex; flex-direction: column; justify-content: center; line-height: 1; text-align: left; }
.b-text small { font-size: 11px; font-weight: 400; letter-spacing: .02em; margin-bottom: 3px; }
.b-text strong { font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.badge.play .b-text small { letter-spacing: .06em; }
.badge.play .b-text strong { font-size: 22px; font-weight: 500; letter-spacing: 0; }
.badge:hover { border-color: #fff; transform: translateY(-2px); }
.badge.soon { border-style: dashed; border-color: #7a7a7a; cursor: default; }
.badge.soon:hover { border-color: #7a7a7a; transform: none; }
.badge.soon small { color: var(--accent); font-weight: 700; letter-spacing: .08em; }
.pill.soon { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); cursor: default; }
.pill.soon:hover, .pill.soon:active { background: transparent; transform: none; }

/* page hero */
.crumbs { padding-top: 28px; font-size: .9rem; color: var(--muted); }
.crumbs ol { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.crumbs li + li::before { content: "/"; margin-right: 10px; color: #6a6a6a; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.phero { position: relative; overflow: hidden; padding-block: clamp(28px, 5vw, 56px) clamp(40px, 6vw, 80px); border-bottom: 1px solid var(--line); }
.phero .wrap { position: relative; z-index: 1; }
.phero h1 { margin-top: 22px; max-width: 16ch; }
.phero h1 span { color: var(--accent); }
.lede { margin-top: 24px; max-width: 54ch; font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.5; color: var(--text); }
.facts-row { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .92rem; color: var(--muted); background: var(--sheet); }
.chip b { margin-right: 6px; font-family: var(--display); font-size: 1.15rem; color: var(--text); }
.phero .ghost { position: absolute; right: -.03em; top: 50%; translate: 0 -50%; z-index: 0; margin: 0; max-width: none; font-family: var(--display); font-weight: 700; font-size: clamp(11rem, 30vw, 26rem); line-height: .8; text-transform: uppercase; color: transparent; -webkit-text-stroke: 2px #2c2c2c; pointer-events: none; user-select: none; }
@supports (animation-timeline: scroll()) {
  .phero .ghost { animation: ghost-drift linear both; animation-timeline: scroll(root); animation-range: 0 80vh; }
  @keyframes ghost-drift { to { translate: -6% -62%; } }
}
.phero h1, .phero .lede, .phero .facts-row, .crumbs { animation: rise .8s var(--ease) both; }
.phero .lede { animation-delay: .08s; }
.phero .facts-row { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* article layout */
.doc { padding-block: clamp(40px, 6vw, 80px); }
.doc-grid { display: grid; grid-template-columns: minmax(0, 230px) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.toc { position: sticky; top: 96px; }
.toc-h { margin: 0 0 12px; max-width: none; font-family: var(--display); font-weight: 700; font-size: 1.1rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text); }
.toc ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent; font-size: .95rem; line-height: 1.35; color: var(--muted); text-decoration: none; transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--text); }
.toc a.on { color: var(--accent); border-left-color: var(--accent); }
.prose { max-width: 760px; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { margin-top: clamp(44px, 6vw, 72px); scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.7em; }
.prose h2 + *, .prose h3 + * { margin-top: 18px; }
.prose p, .prose li { color: #d6d6d6; }
.prose strong { color: var(--text); }
.prose a { color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: .55em; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul li { position: relative; padding-left: 22px; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.prose ol { counter-reset: n; list-style: none; padding-left: 0; }
.prose ol > li { position: relative; padding-left: 52px; counter-increment: n; }
.prose ol > li::before { content: counter(n); position: absolute; left: 0; top: -.04em; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; font-family: var(--display); font-weight: 700; font-size: 1.35rem; line-height: 1; color: var(--on-accent); background: var(--accent); }
.prose ol > li > strong:first-child { display: block; margin-bottom: 2px; font-family: var(--display); font-size: 1.45rem; line-height: 1.1; text-transform: uppercase; letter-spacing: .01em; }
.prose .src { font-size: .9rem; color: var(--muted); }
.callout { padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--sheet); }
.callout p { color: var(--text); }
.callout .t { margin-bottom: 6px; font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--sheet); }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.45; }
.tbl th, .tbl td { padding: 13px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th { font-family: var(--display); font-weight: 700; font-size: 1rem; line-height: 1.15; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--raised); }
@media (max-width: 640px) { .tbl { min-width: 560px; } }
.tbl td:first-child { font-weight: 600; color: var(--text); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--sheet); }
.stat b { display: block; font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 4vw, 3.6rem); line-height: .9; letter-spacing: -.01em; color: var(--accent); }
.stat span { display: block; margin-top: 8px; font-size: .92rem; line-height: 1.4; color: var(--muted); }

/* module lists (level pages and the topics page) */
.mods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mod { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--sheet); transition: border-color .25s, transform .3s var(--ease); }
.mod:hover { border-color: var(--accent); transform: translateY(-2px); }
.mod h3 { font-size: 1.35rem; }
.mod h3 i { margin-right: 10px; font-style: normal; color: var(--accent); }
.mod p { margin-top: 6px; font-size: .95rem; color: var(--muted); }
.lessons { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: .95rem; }
.lessons li { color: var(--muted); padding-left: 16px; position: relative; }
.lessons li::before { content: ""; position: absolute; left: 0; top: .65em; width: 5px; height: 5px; border-radius: 50%; background: #6a6a6a; }
.topic-level { margin-top: clamp(40px, 6vw, 64px); }
.topic-level:first-child { margin-top: 0; }
.topic-level > .mods { margin-top: 20px; }
.prose .mods .mod { color: inherit; }

.figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.figs figure { margin: 0; }
.figs img { padding: 6px; border-radius: 26px; background: #2c2c2c; box-shadow: 0 0 0 1.5px #4a4a4a inset, 0 24px 40px -20px rgba(0, 0, 0, .7); transition: transform .35s var(--ease); }
.figs figure:hover img { transform: translateY(-4px); }
.figs figcaption { margin-top: 10px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 560px) { .figs { gap: 8px; } .figs figcaption { font-size: .95rem; } }

/* related + cta */
.related { padding-block: clamp(40px, 6vw, 72px); border-top: 1px solid var(--line); background: var(--sheet); }
.related h2 { margin-bottom: 24px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 140px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--ground); text-decoration: none; transition: border-color .25s, transform .35s var(--ease); }
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card b { font-family: var(--display); font-weight: 700; font-size: 1.6rem; line-height: 1.05; text-transform: uppercase; }
.card span { font-size: .95rem; color: var(--muted); }
.card::after { content: ""; margin-top: auto; align-self: flex-end; width: 12px; height: 12px; border-right: 2.5px solid var(--accent); border-top: 2.5px solid var(--accent); transform: rotate(45deg); transition: transform .3s var(--ease); }
.card:hover::after { transform: translateX(4px) rotate(45deg); }
.cta { background: var(--accent); color: var(--on-accent); }
.cta .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.cta h2 { color: var(--on-accent); font-size: clamp(2.6rem, 6vw, 4.6rem); max-width: 12ch; }
.cta p { margin-top: 18px; color: #3a1d07; max-width: 44ch; }
.cta .stores { margin-top: 28px; }
.cta .shot { justify-self: center; width: 100%; max-width: 250px; padding: 8px; border-radius: 34px; background: #2c2c2c; box-shadow: 0 0 0 1.5px #4a4a4a inset, 0 36px 60px -24px rgba(26, 13, 3, .8); transition: transform .5s var(--ease); }
.cta .shot img { border-radius: 27px; width: 100%; }
.cta .shot:hover { transform: translateY(-6px) rotate(-1.5deg); }

/* faq */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 60px; padding: 14px 0; cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 1.5rem; text-transform: uppercase; list-style: none; transition: color .2s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(45deg); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { padding: 0 0 20px; color: var(--muted); }
.faq a { color: var(--accent); }
@supports (interpolate-size: allow-keywords) {
  .faq { interpolate-size: allow-keywords; }
  .faq details::details-content { block-size: 0; overflow: clip; transition: block-size .4s var(--ease), content-visibility .4s allow-discrete; }
  .faq details[open]::details-content { block-size: auto; }
}
.prose .faq { margin-top: 20px; }
.prose .faq p { max-width: none; }
.faq-group { margin-top: clamp(36px, 5vw, 56px); }
.faq-group:first-child { margin-top: 0; }
.faq-group > h2 { margin-bottom: 18px; }

/* scroll reveals, only where the browser can do them natively */
@supports (animation-timeline: view()) {
  .prose h2, .stat, .mod, .card, .callout { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
  @keyframes reveal { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
}

/* footer */
footer { padding-block: clamp(56px, 7vw, 96px) 32px; border-top: 1px solid var(--line); background: var(--sheet); font-size: .95rem; color: var(--muted); }
.f-top { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 2.2fr); gap: 44px clamp(32px, 6vw, 104px); }
.f-brand .brand { color: var(--text); }
.f-brand p { margin-top: 16px; max-width: 26ch; line-height: 1.5; }
.f-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px clamp(24px, 4vw, 64px); }
.f-h { margin: 0 0 14px; max-width: none; font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.f-big { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.f-big a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 2.2vw, 1.95rem); line-height: 1.05; letter-spacing: .01em; text-transform: uppercase; color: var(--text); text-decoration: none; transition: color .25s, padding .4s var(--ease); }
.f-big a::after { content: ""; flex: none; width: 11px; height: 11px; border-right: 2.5px solid var(--accent); border-top: 2.5px solid var(--accent); transform: rotate(45deg); transition: transform .35s var(--ease); }
.f-big a:hover, .f-big a:focus-visible { color: var(--accent); padding-left: 10px; }
.f-big a:hover::after, .f-big a:focus-visible::after { transform: translateX(4px) rotate(45deg); }
.f-util { margin-top: clamp(32px, 5vw, 56px); padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 0 clamp(18px, 3vw, 32px); }
.f-util a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; transition: color .2s; }
.f-util a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; }
.f-util .up { margin-left: auto; }
.f-legal { margin: 14px 0 0; max-width: 80ch; font-size: .88rem; line-height: 1.55; }
.up { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; font-family: var(--display); font-weight: 700; font-size: 1.1rem; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; color: var(--text); border: 1.5px solid var(--line); border-radius: 10px; transition: border-color .2s, color .2s; }
.f-util a.up:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.up svg { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.up:hover svg { transform: translateY(-3px); }
@media (max-width: 900px) {
  .f-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .f-links { grid-template-columns: minmax(0, 1fr); }
  .f-util .up { margin-left: 0; margin-top: 12px; }
}

@media (max-width: 860px) {
  .doc-grid, .cta .wrap { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--sheet); }
  .toc a { padding-block: 5px; }
  .stats, .cards, .mods { grid-template-columns: minmax(0, 1fr); }
  .top nav { display: none; }
  .cta .shot { order: -1; max-width: 200px; }
  .phero .ghost { opacity: .6; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
