/* ============================================================
   pdat.io — unified stylesheet
   One file, four themes (class on <html>):
     .theme-splash   index.html
     .theme-hub      school.html
     .theme-course   lessons / references
     .theme-product  ppk.html / ccs.html
   Direction A (Editorial): one unified type + colour system via
   :root tokens — Newsreader for all headings + body, DM Mono
   labels; single blue/red/gold on warm white. Theme classes now
   carry only per-page-type layout, not separate palettes.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&display=swap');

/* ---- global reset (shared) ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ---- design tokens (Direction A — Editorial) ---- */
:root {
  --font-display: 'Newsreader', Georgia, serif;
  --font-body:    'Newsreader', Georgia, serif;
  --font-mono:    'DM Mono', monospace;
  --blue:#1a4fa0; --red:#cc3311; --gold:#cc8800; --green:#1a8c4e;
  --ink:#1a1a18; --ink-2:#555550; --ink-3:#999990; --faint:#b5b0a5;
  --paper:#fdfcf9; --paper-alt:#f5f4f0; --rule:#ddd8d0;
  --gold-bg:#fef8ee; --red-bg:#fef0ee; --blue-bg:#f4f6fc;
  --ink-dk:#1c1c1a; --dk-fg:#e0ddd6; --dk-fg2:#a09a90;
}


/* ---- keyframes / font-face (global) ---- */

@keyframes up {
    from {
        opacity: 0;
        transform: translateY(16px);
        } to {
        opacity: 1;
        transform: translateY(0);
        }
    }

/* ===================== SPLASH (index.html) ===================== */

.theme-splash {
    --dim: var(--ink-2);
    --burn: var(--red);
    }

.theme-splash {
    font-size: 16px
    }

.theme-splash body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem
    }

.theme-splash .brand {
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: 3.5rem;
    opacity: 0;
    animation: up 0.6s ease 0.1s forwards
    }

.theme-splash h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5.5vw, 4.2rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--ink);
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: up 0.7s ease 0.25s forwards
    }

.theme-splash .arc {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 500;
    color: var(--ink);
    letter-spacing: 0.02em;
    margin-bottom: 2rem;
    opacity: 0;
    animation: up 0.7s ease 0.4s forwards
    }

.theme-splash .hero-line {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 400;
    color: var(--ink);
    line-height: 1.6;
    opacity: 0;
    animation: up 0.7s ease 0.52s forwards
    }

.theme-splash .hero-line + .hero-line {
    margin-bottom: 4.5rem;
    animation-delay: 0.62s
    }

.theme-splash .doors {
    display: flex;
    gap: 1px;
    background: var(--rule);
    opacity: 0;
    animation: up 0.7s ease 0.8s forwards
    }

.theme-splash .door {
    background: var(--paper);
    padding: 2.5rem 3rem;
    text-decoration: none;
    color: var(--ink);
    transition: background 0.25s
    }

.theme-splash .door:hover {
    background: var(--paper-alt)
    }

.theme-splash .door-tag {
    font-size: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 0.5rem
    }

.theme-splash .door-tag.course {
    color: var(--blue)
    }

.theme-splash .door-tag.code {
    color: var(--burn)
    }

.theme-splash .door h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: -0.01em
    }

.theme-splash .foot {
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 1rem 2rem;
    text-align: center;
    font-size: 0.52rem;
    color: var(--ink);
    letter-spacing: 0.06em
    }

.theme-splash .foot a {
    color: var(--ink);
    text-decoration: none
    }

.theme-splash .foot a:hover {
    color: var(--ink);
    text-decoration: underline
    }

@media (max-width: 500px) {
    .theme-splash .doors {
        flex-direction: column
        }
    .theme-splash .door {
        padding: 2rem 2.5rem
        }
    }

.theme-splash .corner {
    position: fixed;
    top: 0.9rem;
    right: 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 101;
    opacity: 1;
    transition: opacity 0.3s
    }

.theme-splash .corner:hover {
    opacity: 0.6
    }

.theme-splash .corner svg {
    width: 28px;
    height: 28px
    }

.theme-splash .popover {
    display: none;
    position: fixed;
    top: 2.8rem;
    right: 1.25rem;
    background: var(--paper);
    border: 1px solid var(--rule);
    width: 260px;
    padding: 1.2rem 1rem;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08)
    }

.theme-splash .popover.open {
    display: block
    }

.theme-splash .popover h3 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 0.6rem
    }

.theme-splash .popover p {
    font-size: 0.65rem;
    line-height: 1.7;
    color: var(--dim);
    margin-bottom: 0.6rem
    }

.theme-splash .popover a {
    color: var(--blue);
    text-decoration: none;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.04em
    }

.theme-splash .popover a:hover {
    text-decoration: underline
    }

/* ===================== HUB (school.html) ===================== */

.theme-hub {
    --dim: var(--ink-2);
    --burn: var(--red);
    --hatch: var(--gold);
    }

.theme-hub {
    font-size: 16px;
    scroll-behavior: smooth
    }

.theme-hub body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased
    }

.theme-hub a {
    color: inherit;
    text-decoration: none
    }



.theme-hub nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 2rem;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--rule)
    }

.theme-hub .n-brand {
    font-weight: 600;
    letter-spacing: 0.14em
    }

.theme-hub .n-back {
    color: var(--dim);
    transition: color 0.15s
    }

.theme-hub .n-back:hover {
    color: var(--ink)
    }



.theme-hub .page-head {
    padding: 4rem 2rem 3rem;
    text-align: center;
    border-bottom: 1px solid var(--rule)
    }

.theme-hub .page-head h1 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem
    }

.theme-hub .page-head p {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--dim)
    }



.theme-hub .section {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 2rem;
    border-bottom: 1px solid var(--rule)
    }

.theme-hub .section:last-of-type {
    border-bottom: none
    }

.theme-hub .section-tag {
    font-size: 0.52rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 1.5rem
    }

.theme-hub .section-tag.curriculum {
    color: var(--blue)
    }

.theme-hub .section-tag.product {
    color: var(--burn)
    }

.theme-hub .section-tag.reference {
    color: var(--hatch)
    }

.theme-hub .section-tag.project {
    color: var(--green)
    }



.theme-hub .items {
    list-style: none
    }

.theme-hub .items li {
    border-bottom: 1px solid var(--rule)
    }

.theme-hub .items li:last-child {
    border-bottom: none
    }

.theme-hub .items a {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.75rem 0.5rem;
    transition: background 0.15s
    }

.theme-hub .items a:hover {
    background: var(--paper-alt)
    }

.theme-hub .item-num {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--dim);
    min-width: 2.5rem
    }

.theme-hub .item-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 400
    }

.theme-hub .item-sub {
    font-size: 0.7rem;
    color: var(--faint);
    margin-left: auto
    }

.theme-hub .items .pending {
    color: var(--rule);
    cursor: default
    }

.theme-hub .items .pending:hover {
    background: transparent
    }

.theme-hub .items .pending .item-num {
    color: var(--rule)
    }

.theme-hub .items .pending .item-title {
    color: var(--rule)
    }



.theme-hub .level-head {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 0.25rem
    }

.theme-hub .level-sub {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--dim);
    font-style: italic;
    margin-bottom: 1.25rem
    }



.theme-hub footer {
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 0.52rem;
    color: var(--ink);
    letter-spacing: 0.06em;
    border-top: 1px solid var(--rule)
    }

.theme-hub footer a {
    color: var(--ink);
    text-decoration: none
    }

.theme-hub footer a:hover {
    text-decoration: underline
    }

/* ===================== COURSE (lessons / references) ===================== */



.theme-course body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    -webkit-font-smoothing: antialiased
    }



.theme-course .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem;
    border-bottom: 1px solid var(--rule)
    }

.theme-course .header-course {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--blue);
    letter-spacing: 0.1em
    }

.theme-course .header-ref {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--red);
    letter-spacing: 0.1em
    }

.theme-course .header-school {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--ink-2)
    }



.theme-course .hero {
    padding: 3rem 2rem 2rem;
    text-align: center
    }

.theme-course .hero-course {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--blue);
    letter-spacing: 0.15em;
    margin-bottom: 1rem
    }

.theme-course .hero-ref {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--red);
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem
    }

.theme-course .hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: var(--ink);
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    line-height: 1.1
    }

.theme-course .hero-sub {
    font-size: 1rem;
    color: var(--ink-2);
    margin-bottom: 0.5rem
    }

.theme-course .hero-for {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--ink-3)
    }

.theme-course .hero-date {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--ink-3);
    margin-top: 0.75rem
    }



.theme-course .content {
    max-width: 660px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem
    }

.theme-course .content h2 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ink);
    margin: 2.5rem 0 1rem
    }

.theme-course .content h2:first-child {
    margin-top: 0
    }

.theme-course .content h2.ref {
    color: var(--ink)
    }

.theme-course .content h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink);
    margin: 2rem 0 0.75rem
    }

.theme-course .content p {
    font-size: 0.9rem;
    line-height: 1.85;
    color: var(--ink-2);
    margin-bottom: 1rem
    }

.theme-course .content p b, .theme-course .content p strong {
    color: var(--ink)
    }

.theme-course .content ol, .theme-course .content ul {
    margin: 0.75rem 0 1.25rem 1.5rem;
    font-size: 0.9rem;
    color: var(--ink-2);
    line-height: 1.85
    }

.theme-course .content li {
    margin-bottom: 0.4rem
    }

.theme-course .content em {
    color: var(--ink-3)
    }

.theme-course .content hr {
    border: none;
    border-top: 1px solid var(--rule);
    margin: 2rem 0
    }



.theme-course .observe {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--gold);
    background: var(--gold-bg);
    border-left: 3px solid var(--gold);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    line-height: 1.7
    }



.theme-course .callout {
    background: var(--gold-bg);
    border-left: 3px solid var(--gold);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    font-size: 0.88rem;
    color: var(--gold);
    line-height: 1.7;
    font-style: italic
    }



.theme-course .forbidden {
    background: var(--red-bg);
    border-left: 3px solid var(--red);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0
    }

.theme-course .forbidden ol {
    margin: 0.5rem 0 0 1.25rem
    }

.theme-course .forbidden li {
    color: var(--gold);
    font-size: 0.88rem;
    line-height: 1.7
    }



.theme-course .prereq {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--ink-3);
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 2rem
    }

.theme-course .prereq a {
    color: var(--blue);
    text-decoration: none
    }



.theme-course .diagram-wrap {
    text-align: center;
    margin: 2rem 0
    }

.theme-course .diagram-wrap svg {
    max-width: 500px;
    width: 100%
    }



.theme-course .lesson-end {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid var(--rule);
    margin-top: 3rem
    }

.theme-course .lesson-end p {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--ink-3)
    }

.theme-course .lesson-end a {
    color: var(--blue);
    text-decoration: none
    }



.theme-course .colophon {
    font-size: 0.8rem;
    color: var(--ink-3);
    font-style: italic;
    line-height: 1.7;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule)
    }

.theme-course .sig {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--ink-2);
    margin-top: 1rem
    }



.theme-course footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.65rem;
    color: var(--faint)
    }

.theme-course .sig-line {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    color: var(--blue);
    background: var(--blue-bg);
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 0.9rem 1.1rem;
    margin: 1.25rem 0;
    text-align: center;
    letter-spacing: 0.02em
    }

.theme-course .sig-line b {
    color: var(--red);
    font-weight: 600
    }

.theme-course .sig-line .lbl {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--ink-3);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
    font-weight: 400
    }

.theme-course .two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.25rem 0
    }

.theme-course .col-card {
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 1rem 1.1rem
    }

.theme-course .col-card h4 {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--red);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.5rem
    }

.theme-course .col-card .sig-mini {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--blue);
    margin-bottom: 0.6rem
    }

.theme-course .col-card p {
    font-size: 0.82rem;
    line-height: 1.7;
    color: var(--ink-2);
    margin-bottom: 0.6rem
    }

.theme-course .col-card p:last-child {
    margin-bottom: 0
    }

@media (max-width: 600px) {
    .theme-course .two-col {
        grid-template-columns: 1fr
        }
    }

.theme-course .gap {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--gold);
    background: var(--gold-bg);
    border-left: 3px solid var(--gold);
    padding: 0.75rem 1rem;
    margin: 0.75rem 0 0;
    line-height: 1.7
    }

.theme-course .gap-label {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.05em
    }

.theme-course .summary-box {
    background: var(--paper-alt);
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 1.25rem 1.5rem;
    margin-top: 2.5rem
    }

.theme-course .summary-box h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.75rem
    }

.theme-course .summary-box ol {
    margin: 0.5rem 0 0 1.25rem
    }

.theme-course .summary-box li {
    font-size: 0.88rem;
    color: var(--ink-2);
    line-height: 1.7;
    margin-bottom: 0.3rem
    }

.theme-course .summary-box p.note {
    font-size: 0.85rem;
    color: var(--ink-3);
    margin-top: 1rem;
    margin-bottom: 0;
    font-style: italic
    }

/* ===================== PRODUCT (ppk.html / ccs.html) ===================== */

.theme-product {
    --fg: var(--ink);
    --fg-2: var(--ink-2);
    --fg-3: var(--ink-3);
    --bg: var(--paper);
    --bg-alt: var(--paper-alt);
    --bg-dk: var(--ink-dk);
    --accent: var(--blue);
    --burn: var(--red);
    --insp: var(--blue);
    --hatch: var(--gold);
    }

.theme-product {
    font-size: 17px;
    scroll-behavior: smooth
    }

.theme-product body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased
    }



.theme-product header, .theme-product footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2.5rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--fg-3);
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 10;
    border-bottom: 1px solid var(--rule)
    }

.theme-product footer {
    position: static;
    border-bottom: none;
    border-top: 1px solid var(--rule)
    }

.theme-product .mark {
    color: var(--accent);
    font-weight: 500;
    letter-spacing: 0.15em
    }

.theme-product .co {
    letter-spacing: 0.05em
    }



.theme-product section {
    padding: 5rem 2rem
    }

.theme-product .band.dark {
    background: var(--bg-dk);
    color: var(--dk-fg)
    }

.theme-product .band.dark p {
    color: var(--dk-fg2)
    }

.theme-product .band.dark p b, .theme-product .band.dark h2, .theme-product .band.dark h3 {
    color: var(--dk-fg)
    }

.theme-product .band.dark .punch {
    color: var(--dk-fg)
    }

.theme-product .band.dark .callout {
    color: var(--dk-fg)
    }

.theme-product .band.dark a.cta {
    color: var(--dk-fg);
    border-color: var(--dk-fg2)
    }

.theme-product .band.dark a.cta:hover {
    border-color: var(--dk-fg)
    }

.theme-product .band.alt {
    background: var(--bg-alt)
    }

.theme-product .narrow {
    max-width: 680px;
    margin: 0 auto
    }

.theme-product .narrow.center {
    text-align: center
    }

.theme-product .narrow.center p {
    margin-left: auto;
    margin-right: auto;
    max-width: 52ch
    }

.theme-product .narrow > p {
    margin-bottom: 1.25rem;
    color: var(--fg-2)
    }

.theme-product .narrow > p b {
    color: var(--fg);
    font-weight: 600
    }

.theme-product h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em
    }

.theme-product h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 0.4rem
    }



.theme-product .splash {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg)
    }

.theme-product .splash-inner {
    text-align: center
    }

.theme-product .splash-mark {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    color: var(--accent);
    display: block;
    margin-bottom: 1.5rem
    }

.theme-product .splash h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 300;
    color: var(--fg);
    letter-spacing: -0.02em;
    margin-bottom: 3rem
    }

.theme-product .splash-line {
    font-size: 0.95rem;
    color: var(--fg-3);
    line-height: 1.7;
    margin-bottom: 3rem
    }

.theme-product .splash-doors {
    display: flex;
    gap: 1.5rem
    }

.theme-product .splash-door {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 1.5rem 2.5rem;
    transition: border-color 0.2s;
    min-width: 200px
    }

.theme-product .splash-door:hover {
    border-color: var(--accent)
    }

.theme-product .door-title {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--fg)
    }

.theme-product .door-sub {
    font-size: 0.75rem;
    color: var(--fg-3);
    margin-top: 0.3rem
    }

@media (max-width: 500px) {
    .theme-product .splash-doors {
        flex-direction: column
        }
    }



.theme-product .hero {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(180deg, #f0f4ff 0%, var(--bg) 100%)
    }

.theme-product .big {
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    font-weight: 300;
    line-height: 1.25;
    color: var(--fg);
    max-width: 16ch;
    margin-bottom: 1.5rem
    }

.theme-product .intro {
    font-size: 0.92rem;
    color: var(--fg-3);
    max-width: 42ch;
    line-height: 1.9
    }

.theme-product .hero-pre {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fg-3);
    margin-bottom: 0.75rem
    }

.theme-product .hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--fg);
    margin-bottom: 1.5rem
    }

.theme-product .hero-sub {
    font-size: 1rem;
    color: var(--fg-2);
    max-width: 40ch;
    line-height: 1.85;
    margin: 0 auto
    }

.theme-product .hero-nums {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2.5rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--fg-3)
    }

.theme-product .hero-nums b {
    color: var(--fg);
    font-weight: 500;
    font-size: 1.15em
    }

.theme-product .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--fg-3)
    }

.theme-product .lead {
    font-size: 1.05rem;
    line-height: 1.9
    }



.theme-product a.cta {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 0.75rem 1.5rem;
    margin-top: 1.5rem;
    transition: border-color 0.2s
    }

.theme-product a.cta:hover {
    border-color: var(--accent)
    }



.theme-product .target-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin: 1rem 0
    }

.theme-product .target-row span {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--fg);
    font-weight: 500;
    background: var(--bg-alt);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: 1px solid var(--rule)
    }



.theme-product .aside-note {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--fg-3);
    margin-top: 0.5rem
    }



.theme-product .punch {
    font-weight: 600;
    color: var(--fg) !important;
    font-size: 1.05em
    }

.theme-product .callout {
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    padding: 1.5rem 0;
    font-style: italic
    }



.theme-product .card-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin: 2rem 0
    }

.theme-product .card {
    background: var(--bg);
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 1.5rem
    }

.theme-product .card-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0.75rem
    }

.theme-product .card h3 {
    font-size: 0.92rem;
    margin-bottom: 0.4rem
    }

.theme-product .card p {
    font-size: 0.85rem;
    color: var(--fg-2);
    line-height: 1.7
    }



.theme-product .nums {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    padding: 1.25rem 0;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--fg-3)
    }

.theme-product .nums b {
    font-weight: 500;
    color: var(--fg);
    font-size: 1.15em
    }



.theme-product .surfaces {
    margin: 1.5rem 0
    }

.theme-product .sf {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 1.25rem
    }

.theme-product .sf-dot {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 0.45rem
    }

.theme-product .sf-dot.burn {
    background: var(--burn)
    }

.theme-product .sf-dot.inspect {
    background: var(--insp)
    }

.theme-product .sf-dot.hatch {
    background: var(--hatch)
    }

.theme-product .sf h3 {
    margin-bottom: 0.15rem
    }

.theme-product .sf p {
    font-size: 0.88rem;
    color: var(--fg-2);
    margin: 0
    }



.theme-product .proof-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: 10px;
    overflow: hidden;
    margin: 1.5rem 0;
    text-align: center
    }

.theme-product .proof-cell {
    background: var(--bg);
    padding: 1.25rem 0.75rem;
    font-family: var(--font-mono)
    }

.theme-product .proof-cell b {
    display: block;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--fg)
    }

.theme-product .proof-cell.green b {
    color: var(--green)
    }

.theme-product .proof-cell span {
    font-size: 0.65rem;
    color: var(--fg-3);
    text-transform: uppercase;
    letter-spacing: 0.08em
    }



.theme-product .diagram {
    display: block;
    width: 100%;
    max-width: 440px;
    margin: 1.5rem auto
    }

.theme-product .diagram.wide {
    max-width: 560px
    }



.theme-product .rant-block {
    background: var(--bg-alt);
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0
    }

.theme-product .rant-block h3 {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--burn);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem
    }

.theme-product .rant-block p {
    font-size: 0.9rem;
    color: var(--fg-2);
    line-height: 1.8;
    margin-bottom: 0.75rem
    }

.theme-product .rant-block p:last-of-type {
    margin-bottom: 0
    }



.theme-product .story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin: 2rem 0
    }

.theme-product .story-card {
    background: var(--bg);
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 1.5rem
    }

.theme-product .story-card:last-child:nth-child(odd) {
    grid-column: 1/-1;
    max-width: calc(50% - 0.625rem)
    }



.theme-product .peer-comment {
    border-left: 3px solid var(--accent);
    padding-left: 1.5rem;
    margin: 1.5rem 0
    }

.theme-product .peer-attr {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--accent);
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem
    }

.theme-product .peer-comment p {
    font-size: 0.92rem;
    color: var(--fg-2);
    line-height: 1.85;
    margin-bottom: 1rem
    }

.theme-product .peer-comment p b {
    color: var(--fg);
    font-weight: 600
    }

.theme-product .story-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 0.75rem
    }

.theme-product .story-card h3 {
    font-size: 0.92rem;
    margin-bottom: 0.4rem
    }

.theme-product .story-card p {
    font-size: 0.85rem;
    color: var(--fg-2);
    line-height: 1.7
    }



.theme-product .up {
    opacity: 0;
    transform: translatey(16px);
    transition: opacity 0.6s ease, transform 0.6s ease
    }

.theme-product .in {
    opacity: 1;
    transform: translatey(0)
    }



@media (max-width: 640px) {
    .theme-product {
        font-size: 15px
        }
    .theme-product section {
        padding: 3.5rem 1.25rem
        }
    .theme-product header {
        padding: 1rem 1.25rem
        }
    .theme-product .big {
        font-size: 1.6rem
        }
    .theme-product .card-row {
        grid-template-columns: 1fr
        }
    .theme-product .proof-grid {
        grid-template-columns: repeat(2, 1fr)
        }
    .theme-product .story-grid {
        grid-template-columns: 1fr
        }
    .theme-product .story-card:last-child:nth-child(odd) {
        max-width: 100%
        }
    }

/* ---- unified heading treatment (all themes) ---- */
/* every heading: Newsreader, dark ink; large titles 400, section heads 500 */
.theme-splash h1, .theme-hub .page-head h1,
.theme-course .hero h1,
.theme-product .big, .theme-product .hero h1, .theme-product .splash h1 {
  font-family: var(--font-display); font-weight: 400; color: var(--ink);
}
.theme-hub .level-head, .theme-hub .item-title,
.theme-course .content h2, .theme-course .content h3, .theme-course .summary-box h3,
.theme-product h2, .theme-product h3 {
  font-family: var(--font-display); font-weight: 500; color: var(--ink);
}

/* ---- lesson nav (back-to-course + prev/next) ---- */
.theme-course .lesson-nav {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 1.5rem;
  margin-bottom: 1.25rem; font-family: var(--font-mono); font-size: 0.75rem;
}
.theme-course .lesson-nav a { color: var(--blue); text-decoration: none; }
.theme-course .lesson-nav a:hover { text-decoration: underline; }

/* ---- lesson top nav bar ---- */
.theme-course .lesson-nav-top {
  border-bottom: 1px solid var(--rule);
  padding: 0.7rem 2rem; margin: 0;
}
