:root {
    --nav-height: 86px;
    --nav-bg: rgba(0, 0, 0, 0.98);
    --bg: #000000;
    --fg: #fafafa;
    --muted: #9a9a9a;
    --light: #1a1a1a;
    --accent: #ff3d00;
    --accent-dim: #ff3d0030;
    --code: #00d4aa;
    color-scheme: dark;
}

[data-theme="light"] {
    --nav-bg: rgba(250, 250, 250, 0.95);
    --bg: #fafafa;
    --fg: #0a0a0a;
    --muted: #666;
    --light: #e5e5e5;
    --accent: #ff3d00;
    --accent-dim: #ff3d0020;
    --code: #00d4aa;
    color-scheme: light;
}

[data-theme="light"] .solution-card {
    background: #0a0a0a;
}

[data-theme="light"] .solution-card:hover {
    background: #1a1a1a;
}

[data-theme="light"] .solution-card h3 {
    color: #fafafa;
}

[data-theme="light"] .solution-card p {
    color: #888;
}

body,
nav,
.mobile-nav,
.book-section,
.solution-section,
.cta-section,
.theme-toggle {
    transition: background-color 0.28s ease, color 0.28s ease, border-color 0.28s ease;
}

[data-theme="dark"] .mobile-nav {
    background: #000000;
}

[data-theme="dark"] .solution-section {
    background: #0a0a0a;
    color: var(--fg);
}

[data-theme="dark"] .solution-section .section-label,
[data-theme="dark"] .solution-header p {
    color: var(--muted);
}

[data-theme="dark"] .solution-section .section-title {
    color: var(--fg);
}

[data-theme="dark"] .solution-grid {
    background: #2a2a2a;
}

[data-theme="dark"] .solution-card {
    background: #fafafa;
}

[data-theme="dark"] .solution-card h3 {
    color: #000000;
}

[data-theme="dark"] .solution-card p {
    color: #666;
}

[data-theme="dark"] .cta-section {
    background: #000000;
    color: #fafafa;
}

[data-theme="dark"] .cta-title {
    color: #fafafa;
}

[data-theme="dark"] .cta-subtitle {
    color: #888;
}

[data-theme="dark"] .book-section {
    background: #1a1a1a;
    border-top: 1px solid #2a2a2a;
    border-bottom: 1px solid #2a2a2a;
}

/* Glow effects for dark mode */
[data-theme="dark"] .hero-title .accent {
    text-shadow: 0 0 30px rgba(255, 61, 0, 0.5);
}

[data-theme="dark"] .nav-cta:hover,
[data-theme="dark"] .hero-cta:hover {
    box-shadow: 0 0 30px rgba(255, 61, 0, 0.4);
}

[data-theme="dark"] .solution-card:hover {
    box-shadow: 0 0 40px rgba(255, 61, 0, 0.15);
    background: #e5e5e5;
}

/* Animated gradient accent */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.accent-gradient {
    background: linear-gradient(135deg, #ff3d00, #ff6b00, #ff3d00);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Magnetic button container */
.magnetic {
    display: inline-block;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Custom cursor styles */
.custom-cursor {
    width: 24px;
    height: 24px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    transition: transform 0.1s ease, width 0.2s ease, height 0.2s ease, border-color 0.2s ease;
    transform: translate3d(var(--cursor-x, -100px), var(--cursor-y, -100px), 0) translate(-50%, -50%) scale(var(--cursor-scale, 1));
    background: transparent;
}

.custom-cursor.hover {
    width: 48px;
    height: 48px;
    border-color: var(--accent);
    background: rgba(255, 61, 0, 0.15);
}

.custom-cursor.clicking {
    --cursor-scale: 0.85;
    background: rgba(255, 61, 0, 0.3);
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 100000;
    transform: translate3d(var(--cursor-dot-x, -100px), var(--cursor-dot-y, -100px), 0) translate(-50%, -50%);
}

/* Text scramble effect base */
.scramble-text {
    display: inline-block;
    position: relative;
}

/* Enhanced hover states */
.nav-links a {
    position: relative;
    overflow: hidden;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Enhanced cards with tilt effect */
.tilt-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Parallax layers */
.parallax-slow,
.parallax-fast {
    will-change: auto;
}

@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
    .parallax-slow,
    .parallax-fast {
        will-change: transform;
    }
}

/* Custom cursor only on desktop */
@media (pointer: coarse) {
    .custom-cursor, .cursor-dot {
        display: none !important;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    font-size: 15px;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    -webkit-font-smoothing: antialiased;
}

.solution-section,
.chapters-section,
.book-section,
.cta-section,
footer {
    content-visibility: auto;
}

.solution-section {
    contain-intrinsic-size: 920px;
}

.chapters-section {
    contain-intrinsic-size: 1380px;
}

.book-section {
    contain-intrinsic-size: 1580px;
}

.cta-section {
    contain-intrinsic-size: 520px;
}

footer {
    contain-intrinsic-size: 420px;
}

/* Selection */
::selection {
    background: var(--accent);
    color: white;
}

/* Typography Scale */
.mono {
    font-family: 'JetBrains Mono', monospace;
}

.display {
    font-family: 'Space Grotesk', sans-serif;
}

/* Brackets Syntax */
.bracket {
    color: var(--muted);
    font-weight: 400;
}

.syntax {
    color: var(--code);
    font-family: 'JetBrains Mono', monospace;
}

.comment {
    color: var(--muted);
    font-style: italic;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--fg);
    transition: all 0.2s;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.theme-toggle:hover {
    color: var(--accent);
}

.theme-toggle .bracket {
    color: var(--muted);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--light);
}

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fg);
    text-decoration: none;
    letter-spacing: 0;
    white-space: nowrap;
}

.logo::before {
    content: '// ';
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: color 0.2s;
    font-family: 'JetBrains Mono', monospace;
}

.nav-links a:hover {
    color: var(--fg);
}

.nav-cta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    padding: 0.6rem 1.2rem;
    background: var(--fg);
    color: var(--bg);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.nav-cta:hover {
    background: var(--accent);
}

/* Hero Section */
.hero {
    min-height: min(84vh, 820px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 7rem 5% 3rem;
    position: relative;
}

.hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--light) 1px, transparent 1px),
        linear-gradient(90deg, var(--light) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0.3;
    pointer-events: none;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    gap: 5rem;
    align-items: center;
}

.hero-copy {
    min-width: 0;
    container: hero-copy / inline-size;
}

.hero-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 3rem;
    letter-spacing: 1px;
}

.hero-meta span {
    margin-right: 2rem;
}

.hero-meta .tag {
    color: var(--accent);
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 7rem;
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: 0;
    margin-bottom: 2rem;
}

.hero-title .line {
    display: block;
}

.hero-title .accent {
    color: var(--accent);
}

.hero-title .syntax-suffix {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.17em;
    color: var(--accent);
    font-weight: 600;
    margin-top: 0.6rem;
    margin-left: 0.15rem;
    letter-spacing: 0;
}

.hero-subtitle {
    font-size: 1.35rem;
    color: var(--muted);
    max-width: 600px;
    margin-bottom: 3rem;
    line-height: 1.6;
}

.button-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 2.5rem;
    background: var(--fg);
    color: var(--bg);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.hero-cta:hover {
    background: var(--accent);
    transform: translateX(5px);
}

.hero-cta::after {
    content: '→';
    transition: transform 0.2s;
}

.hero-cta:hover::after {
    transform: translateX(5px);
}

.scramble-char {
    color: var(--accent);
}

.hero-product {
    position: relative;
    justify-self: end;
    width: min(100%, 340px);
    height: 470px;
}

.hero-product .hero-cover {
    position: absolute;
    aspect-ratio: 794 / 1123;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    background: var(--bg);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.24);
}

[data-theme="dark"] .hero-product .hero-cover {
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 42px 100px rgba(0, 0, 0, 0.78);
}

.hero-product .hero-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.theme-cover-stack {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    background: var(--bg);
}

.theme-cover-stack .theme-cover {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 280ms ease;
    will-change: opacity;
}

.theme-cover-stack .theme-cover-light {
    opacity: 1;
}

[data-theme="dark"] .theme-cover-stack .theme-cover-light {
    opacity: 0;
}

[data-theme="dark"] .theme-cover-stack .theme-cover-dark {
    opacity: 1;
}

.hero-cover.primary {
    z-index: 2;
    top: 0;
    right: 0;
    width: 72%;
}

.hero-cover.secondary {
    z-index: 1;
    left: 0;
    bottom: 0;
    width: 59%;
    transform: rotate(-4deg);
    opacity: 0.96;
}

/* Section Header */
.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3.2rem;
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: 1.5rem;
}

/* Stats Bar */
.stats-section {
    padding: 4rem 5%;
    border-top: 1px solid var(--light);
    border-bottom: 1px solid var(--light);
}

.stats-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.stat-item {
    position: relative;
}

.stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0;
}

.stat-value .suffix {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.5em;
    color: var(--accent);
    margin-left: 0.2rem;
}

/* Problem Section */
.problem-section {
    padding: 8rem 5%;
}

.problem-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: start;
}

.problem-intro {
    position: sticky;
    top: 100px;
}

.problem-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.problem-item {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--light);
    transition: all 0.3s;
}

.problem-item:first-child {
    border-top: 1px solid var(--light);
}

.problem-item:hover {
    padding-left: 1.5rem;
    background: var(--accent-dim);
}

.problem-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.problem-item h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    letter-spacing: 0;
}

.problem-item p {
    color: var(--muted);
    line-height: 1.7;
    max-width: 90%;
}

/* Solution Section */
.solution-section {
    padding: 8rem 5%;
    background: var(--fg);
    color: var(--bg);
}

.solution-section .section-label {
    color: #888;
}

.solution-section .section-title {
    color: var(--bg);
}

.solution-header {
    max-width: 1400px;
    margin: 0 auto 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.solution-header p {
    color: #888;
    font-size: 1.1rem;
    line-height: 1.7;
}

.solution-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #333;
}

.solution-card {
    background: var(--fg);
    padding: 3rem 2.5rem;
    transition: box-shadow 0.3s ease;
}

.solution-card.reveal {
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.solution-card:hover {
    background: #1a1a1a;
}

.solution-card .num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 2rem;
    display: block;
}

.solution-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--bg);
}

.solution-card p {
    color: #888;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Lead Magnet Section */
.lead-section {
    padding: 7rem 5%;
    background: var(--bg);
}

.lead-card {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
    gap: 4rem;
    align-items: center;
    border-top: 1px solid var(--light);
    border-bottom: 1px solid var(--light);
    padding: 3rem 0;
}

.lead-card p {
    color: var(--muted);
    line-height: 1.7;
    max-width: 720px;
}

.lead-form {
    display: grid;
    gap: 0.9rem;
}

.lead-status,
.lead-download {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
}

.lead-download:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.lead-status {
    min-height: 1.2rem;
    color: var(--muted);
}

.lead-download {
    color: var(--accent);
    text-decoration: none;
    width: fit-content;
}

.lead-download--primary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: var(--fg);
    color: var(--bg);
    font-weight: 700;
    padding: 0.95rem 1.1rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.lead-download--primary:hover {
    background: var(--accent);
    transform: translateY(-1px);
}

/* Chapters Section */
.chapters-section {
    padding: 8rem 5%;
}

.chapters-header {
    max-width: 1400px;
    margin: 0 auto 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.chapters-header p {
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.7;
}

.chapters-list {
    max-width: 1400px;
    margin: 0 auto;
}

.chapter-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 2rem;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--light);
    transition: all 0.2s;
    cursor: pointer;
}

.chapter-item:hover {
    padding-left: 1rem;
    background: var(--accent-dim);
}

.chapter-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent);
}

.chapter-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
}

.chapter-desc {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.chapter-arrow {
    color: var(--light);
    font-size: 1.2rem;
    transition: all 0.2s;
}

.chapter-item:hover .chapter-arrow {
    color: var(--accent);
    transform: translateX(5px);
}

/* Book Preview Section */
.book-section {
    padding: 8rem 5%;
    background: var(--light);
}

.book-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.book-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 560px;
}

.cover-showcase {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 240px));
    gap: 1.25rem;
    justify-content: center;
    align-items: start;
}

.cover-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cover-card:nth-child(2) {
    margin-top: 2.75rem;
}

.cover-frame {
    aspect-ratio: 794 / 1123;
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    background: var(--bg);
    box-shadow: 0 38px 90px rgba(0, 0, 0, 0.24);
}

[data-theme="dark"] .cover-frame {
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 42px 100px rgba(0, 0, 0, 0.75);
}

.cover-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-caption {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--muted);
    line-height: 1.6;
    letter-spacing: 0.3px;
}

.cover-caption strong {
    display: block;
    color: var(--fg);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0;
    margin-bottom: 0.15rem;
}

.sample-previews {
    width: 100%;
    max-width: 1320px;
    margin: 4rem auto 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    align-items: start;
}

.sample-book {
    min-width: 0;
    padding: 0;
    contain: layout paint;
    display: grid;
    grid-template-columns: minmax(260px, 390px) minmax(220px, 1fr);
    grid-template-areas:
        "head head"
        "stage foot";
    column-gap: 1.35rem;
    row-gap: 1rem;
    align-items: center;
}

.sample-book-head {
    grid-area: head;
}

.sample-book-title {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    line-height: 1.05;
    letter-spacing: 0;
}

.sample-book-meta {
    display: block;
    margin-top: 0.35rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--muted);
    font-size: 0.72rem;
}

.sample-stage {
    grid-area: stage;
    position: relative;
    contain: layout paint;
    touch-action: pan-y;
    user-select: none;
}

.sample-stage.is-dragging .sample-page {
    transition: transform 0.16s ease;
}

.sample-stage.is-changing .sample-page {
    opacity: 0.82;
    transform: translateY(2px) scale(0.992);
}

.sample-page {
    position: relative;
    aspect-ratio: 794 / 1123;
    width: min(100%, 390px);
    border-radius: 5px;
    overflow: hidden;
    background: var(--light);
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.24);
    transform-origin: left center;
    will-change: transform, opacity;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

[data-theme="dark"] .sample-page {
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 38px 110px rgba(0, 0, 0, 0.72);
}

.sample-page.is-flipping {
    animation: pageFlip 0.44s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes pageFlip {
    0% {
        transform: rotateY(0deg) translateX(0) scale(1);
    }
    48% {
        transform: rotateY(-12deg) translateX(-8px) scale(0.992);
    }
    100% {
        transform: rotateY(0deg) translateX(0) scale(1);
    }
}

.sample-page::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(0,0,0,0.22), transparent 9%, transparent 88%, rgba(0,0,0,0.2));
    opacity: 0.16;
    mix-blend-mode: multiply;
}

.sample-page img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.26s ease;
    image-rendering: auto;
    backface-visibility: hidden;
}

[data-theme="light"] .sample-page .sample-img-light,
[data-theme="dark"] .sample-page .sample-img-dark {
    opacity: 1;
}

.sample-foot {
    grid-area: foot;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: 1rem;
    padding: 0;
}

.sample-caption {
    min-height: 0;
    font-family: 'JetBrains Mono', monospace;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.sample-caption strong {
    display: block;
    color: var(--fg);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    letter-spacing: 0;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.sample-dots {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.45rem;
    justify-content: stretch;
}

.sample-dot {
    min-width: 0;
    min-height: 2.35rem;
    border: 0;
    border-left: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.74rem;
    line-height: 1.35;
    text-align: left;
    padding: 0.35rem 0 0.35rem 0.65rem;
    touch-action: manipulation;
}

.sample-dot.is-active {
    border-left-color: var(--accent);
    color: var(--accent);
}

.sample-dot:hover {
    color: var(--accent);
    transform: translateY(-1px);
}

.sample-dot:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 3px;
}

.sample-dot strong {
    display: inline;
    color: var(--accent);
    font-size: inherit;
    margin-right: 0.35rem;
}

.sample-dot span {
    display: inline;
}

.footer-contacts {
    display: grid;
    justify-items: start;
    gap: 0.55rem;
    margin-top: 1rem;
}

.contact-link {
    display: inline-block;
    color: var(--fg);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
}

.contact-link:hover {
    color: var(--accent);
}





.book-details h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 0;
}

.book-details p {
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.spec-list {
    list-style: none;
    margin-bottom: 2.5rem;
}

.spec-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #ccc;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
}

.spec-list li span:first-child {
    color: var(--muted);
}

.spec-list li span:last-child {
    color: var(--fg);
    font-weight: 600;
}

/* CTA Section */
.cta-section {
    padding: 8rem 5%;
    background: var(--fg);
    color: var(--bg);
    text-align: center;
}

.cta-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 2px;
    margin-bottom: 2rem;
}

.cta-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 4.2rem;
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: 1.5rem;
}

.cta-subtitle {
    color: #888;
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 3rem;
}

.price-block {
    text-align: center;
    margin-bottom: 3rem;
}

.price-current {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--accent);
}

.price-note {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.5rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.4rem 3rem;
    background: var(--accent);
    color: white;
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background: #e63600;
    transform: translateY(-2px);
}

.purchase-assurance {
    width: min(920px, 100%);
    margin: 2.5rem auto 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    text-align: left;
}

.purchase-assurance-item {
    min-width: 0;
    padding: 1rem 1.1rem;
}

.purchase-assurance-item strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.7px;
    line-height: 1.4;
}

.purchase-assurance-item span,
.purchase-assurance-item a {
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    line-height: 1.55;
    text-decoration: none;
}

.purchase-assurance-item a:hover {
    color: var(--accent);
}

/* Footer */
footer {
    padding: 4rem 5%;
    border-top: 1px solid var(--light);
}

.footer-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
}

.footer-brand .logo {
    margin-bottom: 1rem;
    display: inline-block;
}

.footer-brand p {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-col h4 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.8rem;
}

.footer-col a {
    color: var(--fg);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    max-width: 1400px;
    margin: 4rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--muted);
}

/* Mobile Navigation */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--fg);
    transition: all 0.3s;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav {
    display: flex;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--nav-height));
    background: var(--bg);
    z-index: 999;
    flex-direction: column;
    padding: 2rem;
    border-top: 1px solid var(--light);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translate3d(0, -10px, 0);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
}

.mobile-nav a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--light);
    color: var(--fg);
    text-decoration: none;
    transition: all 0.2s;
    touch-action: manipulation;
}

.mobile-nav a:hover {
    color: var(--accent);
    padding-left: 1rem;
}

.mobile-nav .mobile-buy-link {
    color: var(--accent);
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .problem-grid,
    .book-grid,
    .solution-header,
    .chapters-header,
    .lead-card {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .solution-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .problem-intro {
        position: relative;
        top: 0;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-product {
        justify-self: start;
        width: min(380px, 100%);
        height: 400px;
    }

    .sample-previews {
        grid-template-columns: 1fr;
        max-width: 920px;
    }

    .sample-page {
        width: min(100%, 390px);
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 64px;
    }

    nav {
        padding: 1rem 1.5rem;
        gap: 0.75rem;
        justify-content: flex-start;
    }

    .nav-cta {
        display: none;
    }

    .theme-toggle {
        margin-left: auto;
        padding: 0.45rem 0.25rem;
        font-size: 0.68rem;
    }

    .mobile-menu-btn {
        flex: 0 0 auto;
        margin-left: 0.25rem;
    }

    .mobile-nav {
        height: calc(100dvh - var(--nav-height));
        padding: 1.4rem 1.5rem 2rem;
    }

    .mobile-nav a {
        font-size: 1rem;
        padding: 1.15rem 0;
    }

    .hero {
        padding: 6rem 1.5rem 3rem;
        min-height: auto;
    }

    .hero-meta {
        font-size: 0.65rem;
        margin-bottom: 2rem;
    }

    .hero-meta span {
        display: block;
        margin-bottom: 0.3rem;
    }

    .hero-title {
        font-size: 3.4rem;
        margin-bottom: 1.5rem;
    }

    .hero-title .syntax-suffix {
        display: block;
        font-size: 0.22em;
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .hero-cta {
        padding: 1rem 1.8rem;
        font-size: 0.75rem;
    }

    .hero-product {
        width: min(300px, 100%);
        height: 330px;
    }

    .stats-section {
        padding: 2.5rem 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    section {
        padding: 4rem 1.5rem !important;
    }

    .book-section {
        padding-inline: 1rem !important;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .problem-item {
        padding: 1.8rem 0;
    }

    .problem-item h3 {
        font-size: 1.2rem;
    }

    .problem-item p {
        font-size: 0.9rem;
    }

    .solution-card {
        padding: 2rem 1.5rem;
    }

    .lead-download--primary {
        width: 100%;
    }

    .chapter-item {
        grid-template-columns: 50px 1fr;
        gap: 1rem;
        padding: 1.5rem 0;
    }

    .chapter-title {
        font-size: 1.1rem;
    }

    .chapter-desc {
        font-size: 0.85rem;
    }

    .book-visual {
        min-height: auto;
    }

    .cover-showcase {
        grid-template-columns: repeat(2, minmax(0, 165px));
        gap: 1rem;
    }

    .cover-card:nth-child(2) {
        margin-top: 1.5rem;
    }

    .sample-previews {
        margin-top: 2.4rem;
        max-width: calc(100vw - 2rem);
    }

    .sample-book {
        grid-template-columns: minmax(270px, 390px) minmax(0, 1fr);
        column-gap: 1.2rem;
        row-gap: 0.9rem;
    }

    .sample-book-head {
        display: block;
    }

    .sample-page {
        width: min(100%, 390px);
    }

    .sample-dot {
        font-size: 0.7rem;
    }

    .reveal,
    .reveal.active {
        opacity: 1;
        transform: none !important;
        transition: none !important;
    }

    .cta-title {
        font-size: 2.7rem;
    }

    .purchase-assurance {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .price-current {
        font-size: 2.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .theme-toggle {
        font-size: 0.62rem;
        padding-inline: 0.15rem;
        letter-spacing: 0;
    }
}

@media (max-width: 480px) {

    .stats-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 2.55rem;
    }

    .section-title,
    .cta-title {
        font-size: 2rem;
    }

    .chapter-arrow {
        display: none;
    }

    .solution-grid {
        gap: 1px;
    }

    .hero-product {
        height: 295px;
    }

    .solution-card {
        padding: 1.8rem 1.2rem;
    }

    .cover-showcase {
        grid-template-columns: minmax(0, 220px);
    }

    .cover-card:nth-child(2) {
        margin-top: 0;
    }

    .sample-page {
        width: min(100%, 335px);
    }

    .sample-previews {
        max-width: calc(100vw - 1.5rem);
    }

    .book-section {
        padding-inline: 0.75rem !important;
    }

    .sample-book {
        grid-template-columns: 1fr;
        grid-template-areas:
            "head head"
            "stage stage"
            "foot foot";
        gap: 0.9rem;
    }

    .sample-book-head {
        grid-column: 1 / -1;
    }

    .sample-book-title {
        font-size: 1.2rem;
    }

    .sample-book-meta {
        font-size: 0.68rem;
    }

    .sample-caption {
        min-height: 0;
        font-size: 0.72rem;
        line-height: 1.5;
    }

    .sample-caption strong {
        font-size: 1.05rem;
        line-height: 1.08;
        margin-bottom: 0.4rem;
    }

    .sample-dots {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.35rem;
    }

    .sample-dot {
        min-height: 2rem;
        padding: 0.25rem 0;
        font-size: 0.68rem;
    }

    .purchase-assurance {
        grid-template-columns: 1fr;
        margin-top: 2rem;
    }

    .spec-list li {
        font-size: 0.75rem;
    }
}

@media (hover: none) {
    .problem-item:hover,
    .chapter-item:hover {
        padding-left: 0;
        background: transparent;
    }

    .solution-card:hover {
        background: #0a0a0a;
        box-shadow: none;
    }

    [data-theme="dark"] .solution-card:hover {
        background: #fafafa;
        box-shadow: none;
    }

    .chapter-item:hover .chapter-arrow,
    .hero-cta:hover::after {
        transform: none;
    }

    .hero-cta:hover,
    .cta-button:hover,
    .mobile-nav a:hover {
        transform: none;
    }

    .mobile-nav a:hover {
        padding-left: 0;
    }

    .hero-cta:active,
    .cta-button:active,
    .mobile-nav a:active,
    .theme-toggle:active {
        color: var(--accent);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .accent-gradient,
    .sample-page.is-flipping {
        animation: none;
    }

    .custom-cursor,
    .cursor-dot {
        display: none !important;
    }

    .parallax-slow,
    .parallax-fast {
        transform: none !important;
        transition: none !important;
        will-change: auto;
    }
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal.active {
        opacity: 1;
        transform: none !important;
        transition: none !important;
    }
}

/* Sample reader */
.hero-cta--secondary {
    appearance: none;
    border: 1px solid color-mix(in srgb, var(--fg) 54%, transparent);
    background: transparent;
    color: var(--fg);
    cursor: pointer;
}

.hero-cta--secondary:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
}

.hero .hero-cta,
.book-details .hero-cta {
    position: relative;
    justify-content: center;
    text-align: center;
}

.hero .hero-cta::after,
.book-details .hero-cta::after {
    position: absolute;
    right: 2.5rem;
}

.hero .button-row,
.book-details .button-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.book-details {
    container: book-details / inline-size;
}

.hero .hero-cta,
.book-details .hero-cta {
    width: 100%;
    min-width: 0;
    min-height: 3.75rem;
    padding: 1rem 3.5rem;
    white-space: nowrap;
}

@container hero-copy (max-width: 640px) {
    .button-row.button-row {
        grid-template-columns: 1fr;
    }
}

@container book-details (max-width: 580px) {
    .button-row.button-row {
        grid-template-columns: 1fr;
    }
}

body.reader-is-open {
    overflow: hidden;
}

.sample-reader[hidden] {
    display: none;
}

.sample-reader {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: grid;
    place-items: center;
    padding: 2.5vh 2vw;
    color: #f7f7f5;
    font-family: 'Inter', sans-serif;
}

.sample-reader-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.86);
    backdrop-filter: blur(14px);
    animation: readerFadeIn 180ms ease both;
}

.sample-reader-panel {
    --reader-line: rgba(255, 255, 255, 0.12);
    position: relative;
    width: min(1500px, 96vw);
    height: min(94dvh, 980px);
    min-height: 620px;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    background: #0b0b0b;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.72);
    animation: readerPanelIn 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.sample-reader-header {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.25rem 1.4rem 1rem;
    border-bottom: 1px solid var(--reader-line);
}

.sample-reader-heading {
    min-width: 0;
}

.sample-reader-kicker,
.reader-control-label {
    display: block;
    color: #858585;
    font: 600 0.62rem/1.2 'JetBrains Mono', monospace;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sample-reader-heading h2 {
    margin-top: 0.35rem;
    color: #ffffff;
    font: 700 clamp(1.35rem, 2vw, 2rem)/1 'Space Grotesk', sans-serif;
}

.sample-reader-heading p {
    margin-top: 0.45rem;
    color: #8f8f8f;
    font-size: 0.78rem;
    line-height: 1.45;
}

.sample-reader-close {
    flex: 0 0 auto;
    width: 2.65rem;
    height: 2.65rem;
    border: 1px solid var(--reader-line);
    background: #151515;
    color: #ffffff;
    cursor: pointer;
    font: 300 1.75rem/1 'Inter', sans-serif;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.sample-reader-close:hover,
.sample-reader-close:focus-visible {
    border-color: var(--accent);
    background: var(--accent);
}

.sample-reader-controls {
    display: flex;
    align-items: end;
    gap: 1rem;
    padding: 0.75rem 1.4rem;
    border-bottom: 1px solid var(--reader-line);
    background: #101010;
}

.reader-control-group {
    display: grid;
    gap: 0.4rem;
}

.reader-segmented {
    display: flex;
    border: 1px solid var(--reader-line);
}

.reader-segment {
    min-height: 2.35rem;
    padding: 0.55rem 0.9rem;
    border: 0;
    border-right: 1px solid var(--reader-line);
    background: transparent;
    color: #8e8e8e;
    cursor: pointer;
    font: 600 0.68rem/1 'JetBrains Mono', monospace;
    white-space: nowrap;
    transition: background 160ms ease, color 160ms ease;
}

.reader-segment:last-child {
    border-right: 0;
}

.reader-segment:hover {
    color: #ffffff;
}

.reader-segment.is-active {
    background: #f4f4f2;
    color: #090909;
}

.reader-zoom {
    margin-left: auto;
    display: grid;
    grid-template-columns: 2.35rem 3.65rem 2.35rem;
    align-items: stretch;
    border: 1px solid var(--reader-line);
}

.reader-zoom button,
.reader-zoom output {
    min-height: 2.35rem;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: #ffffff;
    font: 600 0.72rem/1 'JetBrains Mono', monospace;
}

.reader-zoom button {
    cursor: pointer;
    font-size: 1rem;
}

.reader-zoom button:hover:not(:disabled) {
    background: var(--accent);
}

.reader-zoom button:disabled {
    color: #444444;
    cursor: default;
}

.reader-zoom output {
    border-inline: 1px solid var(--reader-line);
    color: #a0a0a0;
}

.sample-reader-body {
    min-height: 0;
    display: grid;
    grid-template-columns: 245px minmax(0, 1fr);
}

.reader-page-nav {
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border-right: 1px solid var(--reader-line);
    background: #0e0e0e;
}

.reader-document-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.25rem 0.35rem 0.9rem;
    border-bottom: 1px solid var(--reader-line);
    color: #8a8a8a;
    font: 500 0.65rem/1.45 'JetBrains Mono', monospace;
}

.reader-document-meta strong {
    flex: 0 0 auto;
    color: var(--accent);
}

.reader-page-list {
    min-height: 0;
    flex: 1;
    display: grid;
    align-content: start;
    gap: 0.35rem;
    padding: 0.75rem 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #444444 transparent;
}

.reader-page-button {
    width: 100%;
    min-height: 3.25rem;
    display: grid;
    grid-template-columns: 2.1rem minmax(0, 1fr);
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid transparent;
    background: transparent;
    color: #767676;
    cursor: pointer;
    text-align: left;
    transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.reader-page-button:hover {
    color: #ffffff;
    background: #151515;
}

.reader-page-button.is-active {
    border-color: rgba(255, 61, 0, 0.55);
    background: rgba(255, 61, 0, 0.1);
    color: #ffffff;
}

.reader-page-number {
    color: var(--accent);
    font: 700 0.75rem/1 'JetBrains Mono', monospace;
}

.reader-page-name {
    overflow: hidden;
    font: 600 0.68rem/1.35 'JetBrains Mono', monospace;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reader-buy-link {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 2.8rem;
    padding: 0.65rem;
    background: #f4f4f2;
    color: #090909;
    text-decoration: none;
    font: 700 0.66rem/1 'JetBrains Mono', monospace;
    transition: background 160ms ease, color 160ms ease;
}

.reader-buy-link:hover {
    background: var(--accent);
    color: #ffffff;
}

.reader-stage-wrap {
    min-width: 0;
    min-height: 0;
    position: relative;
    display: grid;
    grid-template-columns: 3.25rem minmax(0, 1fr) 3.25rem;
    align-items: stretch;
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        #080808;
    background-size: 34px 34px;
}

.reader-stage {
    min-width: 0;
    min-height: 0;
    position: relative;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.25rem;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #454545 transparent;
}

.reader-stage img {
    z-index: 1;
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #ffffff;
    box-shadow: 0 20px 65px rgba(0, 0, 0, 0.65);
    transition: opacity 140ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    -webkit-user-drag: none;
}

.reader-stage.is-loading img {
    opacity: 0.38;
}

.reader-stage.zoom-125 img,
.reader-stage.zoom-150 img {
    max-width: none;
    max-height: none;
}

.reader-stage.zoom-125,
.reader-stage.zoom-150 {
    align-items: flex-start;
}

.reader-stage.zoom-125 img {
    width: 125%;
}

.reader-stage.zoom-150 img {
    width: 150%;
}

.reader-loading {
    position: absolute;
    z-index: 2;
    inset: 50% auto auto 50%;
    display: flex;
    gap: 0.4rem;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease;
}

.reader-stage.is-loading .reader-loading {
    opacity: 1;
}

.reader-loading span {
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 50%;
    background: var(--accent);
    animation: readerLoading 700ms ease-in-out infinite alternate;
}

.reader-loading span:nth-child(2) {
    animation-delay: 120ms;
}

.reader-loading span:nth-child(3) {
    animation-delay: 240ms;
}

.reader-arrow {
    z-index: 3;
    border: 0;
    border-inline: 1px solid var(--reader-line);
    background: rgba(8, 8, 8, 0.78);
    color: #747474;
    cursor: pointer;
    font: 400 1.25rem/1 'JetBrains Mono', monospace;
    transition: background 160ms ease, color 160ms ease;
}

.reader-arrow:hover:not(:disabled),
.reader-arrow:focus-visible {
    background: var(--accent);
    color: #ffffff;
}

.reader-arrow:disabled {
    color: #2f2f2f;
    cursor: default;
}

.sample-reader-footer {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.4rem;
    border-top: 1px solid var(--reader-line);
    background: #101010;
}

.sample-reader-footer p {
    min-width: 0;
    color: #818181;
    font: 500 0.67rem/1.4 'JetBrains Mono', monospace;
}

.sample-reader-footer p strong {
    margin-right: 0.65rem;
    color: #ffffff;
}

.reader-hint {
    flex: 0 0 auto;
    color: #565656;
    font: 500 0.6rem/1 'JetBrains Mono', monospace;
    text-transform: uppercase;
}

.sample-reader button:focus-visible,
.sample-reader a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@keyframes readerFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes readerPanelIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes readerLoading {
    from { opacity: 0.3; transform: translateY(2px); }
    to { opacity: 1; transform: translateY(-2px); }
}

@media (max-width: 768px) {
    .hero .button-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero .hero-cta {
        width: 100%;
        justify-content: center;
    }

    .hero .hero-cta::after,
    .book-details .hero-cta::after {
        right: 1.8rem;
    }

    #hero-gumroad-link > span {
        transform: translateX(-0.75rem);
    }

    .book-details .button-row {
        grid-template-columns: 1fr;
    }

    .sample-reader {
        padding: 0;
    }

    .sample-reader-panel {
        width: 100vw;
        height: 100dvh;
        min-height: 0;
        padding: 0 !important;
        border: 0;
    }

    .sample-reader-header {
        align-items: center;
        padding: 0.75rem 0.85rem;
    }

    .sample-reader-heading p {
        display: none;
    }

    .sample-reader-heading h2 {
        font-size: 1.25rem;
    }

    .sample-reader-close {
        width: 2.5rem;
        height: 2.5rem;
    }

    .sample-reader-controls {
        align-items: center;
        gap: 0.5rem;
        padding: 0.55rem 0.65rem;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .sample-reader-controls::-webkit-scrollbar {
        display: none;
    }

    .reader-control-label {
        display: none;
    }

    .reader-segment {
        min-height: 2.25rem;
        padding-inline: 0.68rem;
        font-size: 0.61rem;
    }

    .reader-zoom {
        flex: 0 0 auto;
        grid-template-columns: 2.2rem 3.35rem 2.2rem;
    }

    .reader-zoom button,
    .reader-zoom output {
        min-height: 2.25rem;
    }

    .sample-reader-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
    }

    .reader-page-nav {
        display: block;
        padding: 0.45rem 0.65rem;
        border-right: 0;
        border-bottom: 1px solid var(--reader-line);
    }

    .reader-document-meta,
    .reader-buy-link {
        display: none;
    }

    .reader-page-list {
        display: flex;
        gap: 0.35rem;
        padding: 0;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .reader-page-list::-webkit-scrollbar {
        display: none;
    }

    .reader-page-button {
        flex: 0 0 auto;
        width: 3.2rem;
        min-height: 2.25rem;
        display: grid;
        grid-template-columns: 1fr;
        place-items: center;
        padding: 0.35rem;
    }

    .reader-page-name {
        display: none;
    }

    .reader-stage-wrap {
        grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem;
    }

    .reader-stage {
        padding: 0.6rem;
    }

    .reader-arrow {
        font-size: 1rem;
    }

    .sample-reader-footer {
        padding: 0.55rem 0.75rem;
    }

    .sample-reader-footer p {
        display: grid;
        gap: 0.15rem;
        font-size: 0.61rem;
    }

    .sample-reader-footer p strong {
        margin: 0;
    }

    .reader-hint {
        display: none;
    }
}

@media (max-width: 420px) {
    .sample-reader-kicker {
        display: none;
    }

    .reader-segment {
        padding-inline: 0.55rem;
        font-size: 0.57rem;
    }

    .reader-zoom {
        grid-template-columns: 2rem 2.85rem 2rem;
    }

    .reader-zoom output {
        font-size: 0.6rem;
    }
}

@media (max-width: 360px) {
    .hero .hero-cta {
        padding-inline: 2.25rem;
        font-size: 0.67rem;
        letter-spacing: 0.25px;
    }

    .hero .hero-cta::after {
        right: 0.55rem;
    }

    #hero-gumroad-link > span {
        transform: translateX(-0.9rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sample-reader-backdrop,
    .sample-reader-panel,
    .reader-loading span {
        animation: none;
    }
}

/* Sample reader refinement: keep the document dominant */
.sample-reader {
    padding: clamp(0.75rem, 2vh, 1.5rem);
}

.sample-reader-panel {
    width: min(1180px, 97vw);
    height: min(96dvh, 1040px);
    min-height: 600px;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    border-radius: 22px;
    background: #090909;
}

.sample-reader-header {
    align-items: center;
    padding: 0.85rem 1rem 0.55rem 1.25rem;
    border-bottom: 0;
}

.sample-reader-kicker {
    font-size: 0.56rem;
    letter-spacing: 0.1em;
}

.sample-reader-heading h2 {
    margin-top: 0.2rem;
    font-size: clamp(1.15rem, 1.7vw, 1.55rem);
}

.sample-reader-heading p {
    display: none;
}

.sample-reader-close {
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #bdbdbd;
    font-size: 1.4rem;
}

.sample-reader-close:hover,
.sample-reader-close:focus-visible {
    background: var(--accent);
    color: #ffffff;
}

.sample-reader-close:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.sample-reader-controls {
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 1.25rem 0.8rem;
    border-bottom: 0;
    background: transparent;
}

.reader-control-group {
    display: block;
}

.reader-segmented {
    gap: 0.2rem;
    padding: 0.2rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.065);
}

.reader-segment {
    min-height: 2rem;
    padding: 0.48rem 0.8rem;
    border: 0;
    border-radius: 999px;
    font-size: 0.63rem;
}

.reader-segment.is-active {
    background: #f4f4f2;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
}

.reader-zoom {
    grid-template-columns: 2rem 3.2rem 2rem;
    gap: 0.15rem;
    padding: 0.2rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.065);
}

.reader-zoom button,
.reader-zoom output {
    min-height: 2rem;
    border: 0;
    border-radius: 999px;
}

.reader-zoom button:hover:not(:disabled) {
    background: rgba(255, 61, 0, 0.9);
}

.reader-zoom output {
    color: #999999;
}

.sample-reader-body {
    min-height: 0;
    display: block;
    padding: 0 0.75rem;
}

.reader-stage-wrap {
    width: 100%;
    height: 100%;
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 16px;
    background:
        radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.055), transparent 42%),
        #050505;
}

.reader-stage {
    width: 100%;
    height: 100%;
    padding: 0.75rem 4.75rem;
}

.reader-stage img {
    border-radius: 2px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.72);
}

.reader-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 50%;
    background: rgba(22, 22, 22, 0.82);
    color: #c4c4c4;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(12px);
    font: 300 2rem/1 'Inter', sans-serif;
    transform: translateY(-50%);
}

.reader-arrow--previous {
    left: 1rem;
}

.reader-arrow--next {
    right: 1rem;
}

.reader-arrow:hover:not(:disabled),
.reader-arrow:focus-visible {
    background: var(--accent);
    color: #ffffff;
    transform: translateY(-50%) scale(1.06);
}

.reader-arrow:disabled {
    opacity: 0;
    pointer-events: none;
}

.sample-reader-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 1.25rem;
    min-height: 4.25rem;
    padding: 0.6rem 1.25rem;
    border-top: 0;
    background: transparent;
}

.reader-footer-copy {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sample-reader-footer p {
    min-width: 0;
    display: block;
    overflow: hidden;
    color: #707070;
    font-size: 0.62rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sample-reader-footer p strong {
    margin-right: 0.55rem;
    color: #d9d9d9;
}

.reader-page-count {
    flex: 0 0 auto;
    color: var(--accent);
    font: 700 0.62rem/1 'JetBrains Mono', monospace;
}

.reader-page-list {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0;
    overflow: visible;
}

.reader-page-button {
    width: 0.48rem;
    min-width: 0.48rem;
    height: 0.48rem;
    min-height: 0.48rem;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #444444;
    transition: width 180ms ease, background 180ms ease, transform 180ms ease;
}

.reader-page-button:hover {
    background: #8b8b8b;
    transform: scale(1.25);
}

.reader-page-button.is-active {
    width: 1.55rem;
    min-width: 1.55rem;
    border: 0;
    background: var(--accent);
}

.reader-buy-link {
    justify-self: end;
    min-height: 2.2rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.085);
    color: #d8d8d8;
    font-size: 0.6rem;
}

.reader-buy-link:hover {
    background: var(--accent);
    color: #ffffff;
}

@media (max-width: 768px) {
    .sample-reader {
        padding: 0;
    }

    .sample-reader-panel {
        width: 100vw;
        height: 100dvh;
        border-radius: 0;
    }

    .sample-reader-header {
        padding: 0.7rem 0.75rem 0.35rem 0.9rem;
    }

    .sample-reader-close {
        width: 2.35rem;
        height: 2.35rem;
    }

    .sample-reader-controls {
        justify-content: space-between;
        gap: 0.4rem;
        padding: 0.4rem 0.7rem 0.65rem;
        overflow: visible;
    }

    .reader-segmented {
        flex: 0 0 auto;
    }

    .reader-segment {
        min-height: 1.9rem;
        padding-inline: 0.66rem;
        font-size: 0.58rem;
    }

    .reader-zoom {
        display: none;
    }

    .sample-reader-body {
        padding: 0 0.45rem;
    }

    .reader-stage-wrap {
        border-radius: 12px;
    }

    .reader-stage {
        padding: 0.55rem 2.8rem;
    }

    .reader-arrow {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 1.55rem;
        background: rgba(22, 22, 22, 0.72);
    }

    .reader-arrow--previous {
        left: 0.35rem;
    }

    .reader-arrow--next {
        right: 0.35rem;
    }

    .sample-reader-footer {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.7rem;
        min-height: 4rem;
        padding: 0.5rem 0.75rem;
    }

    .reader-footer-copy {
        gap: 0.45rem;
    }

    .sample-reader-footer p span {
        display: none;
    }

    .reader-page-list {
        justify-content: end;
        gap: 0.4rem;
    }

    .reader-buy-link {
        display: none;
    }
}

@media (max-width: 420px) {
    .sample-reader-heading h2 {
        font-size: 1.05rem;
    }

    .sample-reader-kicker {
        display: block;
        font-size: 0.5rem;
    }

    .reader-segment {
        padding-inline: 0.55rem;
        font-size: 0.54rem;
    }

    .reader-zoom {
        grid-template-columns: 1.75rem 2.55rem 1.75rem;
    }

    .reader-stage {
        padding-inline: 2.45rem;
    }
}

/* Continuous PDF sample reader */
.sample-reader {
    --reader-bg: #090909;
    --reader-surface: #111111;
    --reader-page-bed: #050505;
    --reader-text: #f5f5f3;
    --reader-muted: #777777;
    --reader-line: rgba(255, 255, 255, 0.12);
    --reader-shadow: rgba(0, 0, 0, 0.72);
    padding: clamp(0.5rem, 1.5vh, 1.25rem);
}

[data-theme="light"] .sample-reader {
    --reader-bg: #f4f4f1;
    --reader-surface: #ffffff;
    --reader-page-bed: #e8e8e4;
    --reader-text: #111111;
    --reader-muted: #707070;
    --reader-line: rgba(0, 0, 0, 0.12);
    --reader-shadow: rgba(25, 25, 20, 0.2);
}

.sample-reader-backdrop {
    background: rgba(0, 0, 0, 0.78);
}

[data-theme="light"] .sample-reader-backdrop {
    background: rgba(225, 225, 218, 0.82);
}

.sample-reader-panel {
    width: min(1040px, 98vw);
    height: min(97dvh, 1080px);
    min-height: 560px;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    border: 1px solid var(--reader-line);
    border-radius: 14px;
    background: var(--reader-bg);
    color: var(--reader-text);
    box-shadow: 0 28px 90px var(--reader-shadow);
}

.sample-reader-header {
    align-items: center;
    padding: 0.8rem 1.15rem 0.35rem;
    border: 0;
}

.sample-reader-kicker {
    color: var(--reader-muted);
    font-size: 0.54rem;
}

.sample-reader-heading h2 {
    margin-top: 0.18rem;
    color: var(--reader-text);
    font-size: clamp(1.1rem, 1.6vw, 1.45rem);
}

.sample-reader-heading p {
    display: none;
}

.sample-reader-close {
    width: auto;
    height: auto;
    padding: 0.45rem 0.2rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--reader-muted);
    font: 600 0.62rem/1 'JetBrains Mono', monospace;
}

.sample-reader-close:hover,
.sample-reader-close:focus-visible {
    background: transparent;
    color: var(--accent);
}

.sample-reader-controls {
    justify-content: space-between;
    align-items: center;
    gap: clamp(1rem, 7vw, 5rem);
    padding: 0.55rem clamp(1.2rem, 4vw, 3.5rem) 0.9rem;
    border: 0;
    background: transparent;
}

.reader-control-set {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(1.4rem, 5vw, 4rem);
}

.reader-control {
    padding: 0.35rem 0;
    border: 0;
    background: transparent;
    color: var(--reader-muted);
    cursor: pointer;
    font: 600 0.66rem/1 'JetBrains Mono', monospace;
    white-space: nowrap;
    transition: color 160ms ease, transform 160ms ease;
}

.reader-control::before {
    content: "[ ";
}

.reader-control::after {
    content: " ]";
}

.reader-control:hover {
    color: var(--reader-text);
    transform: translateY(-1px);
}

.reader-control.is-active {
    color: var(--accent);
}

.sample-reader-body {
    min-height: 0;
    display: block;
    padding: 0 0.65rem;
}

.reader-stage {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
    padding: clamp(1rem, 3vw, 2.5rem);
    border: 1px solid var(--reader-line);
    border-radius: 9px;
    background: var(--reader-page-bed);
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--reader-muted) transparent;
}

.reader-stage:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: -1px;
}

.reader-pages {
    width: min(100%, 820px);
    margin: 0 auto;
    display: grid;
    gap: clamp(1rem, 2.4vw, 2rem);
}

.reader-page {
    position: relative;
    aspect-ratio: 1800 / 2547;
    margin: 0;
    overflow: hidden;
    background: var(--reader-surface);
    box-shadow: 0 18px 56px var(--reader-shadow);
}

.reader-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg, transparent 35%, color-mix(in srgb, var(--reader-text) 7%, transparent) 50%, transparent 65%),
        var(--reader-surface);
    background-size: 220% 100%;
    animation: readerPageLoading 1.1s ease-in-out infinite;
}

.reader-page.is-loaded::before {
    display: none;
}

.reader-page img {
    width: 100%;
    height: auto;
    max-width: none;
    max-height: none;
    display: block;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    transition: opacity 180ms ease;
}

.reader-page.is-loaded img {
    opacity: 1;
}

.sample-reader-footer {
    min-height: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 1.15rem;
    border: 0;
    background: transparent;
}

.reader-scroll-hint {
    color: var(--reader-muted);
    font: 500 0.57rem/1 'JetBrains Mono', monospace;
}

.reader-buy-link {
    min-height: 0;
    padding: 0.45rem 0;
    border-radius: 0;
    background: transparent;
    color: var(--reader-text);
    font-size: 0.62rem;
}

.reader-buy-link:hover {
    background: transparent;
    color: var(--accent);
}

.sample-reader button:focus-visible,
.sample-reader a:focus-visible,
.reader-stage:focus-visible {
    outline: none;
}

.reader-control:focus-visible,
.sample-reader-close:focus-visible,
.reader-buy-link:focus-visible {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 0.3rem;
}

@keyframes readerPageLoading {
    from { background-position: 110% 0; }
    to { background-position: -110% 0; }
}

@media (max-width: 768px) {
    .sample-reader {
        padding: 0;
    }

    .sample-reader-panel {
        width: 100vw;
        height: 100dvh;
        min-height: 0;
        border: 0;
        border-radius: 0;
    }

    .sample-reader-header {
        padding: 0.65rem 0.85rem 0.25rem;
    }

    .sample-reader-controls {
        gap: 1rem;
        padding: 0.45rem 0.9rem 0.7rem;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .sample-reader-controls::-webkit-scrollbar {
        display: none;
    }

    .reader-control-set {
        flex: 0 0 auto;
        gap: clamp(1.1rem, 7vw, 2rem);
    }

    .reader-control {
        font-size: 0.59rem;
    }

    .sample-reader-body {
        padding: 0 0.35rem;
    }

    .reader-stage {
        padding: 0.65rem;
        border-radius: 7px;
    }

    .reader-pages {
        gap: 0.75rem;
    }

    .reader-page {
        box-shadow: 0 10px 34px var(--reader-shadow);
    }

    .sample-reader-footer {
        min-height: 3rem;
        padding: 0.45rem 0.85rem;
    }

    .reader-scroll-hint {
        display: none;
    }

    .reader-buy-link {
        display: inline-flex;
        margin-left: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reader-stage {
        scroll-behavior: auto;
    }

    .reader-page::before {
        animation: none;
    }
}

/* Desktop reading desk */
@media (min-width: 769px) {
    .sample-reader-panel {
        width: min(1480px, 98vw);
        height: min(98dvh, 1120px);
        grid-template-columns: minmax(190px, 240px) minmax(520px, 1fr) minmax(190px, 240px);
        grid-template-rows: minmax(0, 1fr);
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .sample-reader-header {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 2rem 1.5rem 1.6rem;
        border: 0;
    }

    .sample-reader-heading h2 {
        margin-top: 0.5rem;
        font-size: clamp(1.55rem, 2.2vw, 2.25rem);
        line-height: 0.98;
    }

    .sample-reader-kicker {
        font-size: 0.58rem;
    }

    .sample-reader-close {
        position: absolute;
        top: 1.6rem;
        right: 1.5rem;
        z-index: 4;
        padding: 0.4rem 0;
    }

    .sample-reader-controls {
        display: contents;
    }

    .reader-control-set {
        z-index: 2;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 1.4rem;
        padding-inline: 1.5rem;
    }

    .reader-control-set:first-child {
        grid-column: 1;
        grid-row: 1;
        align-self: center;
    }

    .reader-control-set:nth-child(2) {
        grid-column: 3;
        grid-row: 1;
        align-self: center;
        margin-top: 0;
    }

    .reader-control {
        font-size: 0.68rem;
    }

    .sample-reader-body {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        min-height: 0;
        padding: 0;
    }

    .reader-stage {
        height: 100%;
        padding: 1.25rem;
        border-block: 0;
        border-radius: 0;
        background: var(--reader-page-bed);
        overflow: auto;
    }

    .reader-pages {
        max-width: none;
        transition: width 180ms ease;
    }

    .sample-reader-footer {
        z-index: 2;
        grid-column: 3;
        grid-row: 1;
        align-self: end;
        min-height: 0;
        display: flex;
        justify-content: flex-start;
        padding: 1.5rem;
        border: 0;
    }

    .reader-buy-link {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .sample-reader-controls {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 0.75rem;
        overflow: visible;
    }

    .reader-control-set {
        min-width: 0;
        justify-content: center;
        gap: 0.38rem;
        color: var(--reader-muted);
        font: 600 0.59rem/1 'JetBrains Mono', monospace;
        white-space: nowrap;
    }

    .reader-control-set::before {
        content: "[";
    }

    .reader-control-set::after {
        content: "]";
    }

    .reader-control {
        font-size: 0.59rem;
    }

    .reader-control::before,
    .reader-control::after {
        content: none;
    }

    .reader-control + .reader-control::before {
        content: "|";
        margin-right: 0.38rem;
        color: var(--reader-muted);
    }

    .reader-pages {
        width: min(100%, 820px) !important;
    }
}
