/* Home page — paper & terracotta editorial theme */
:root {
    --paper: #f5efe4;
    --paper-2: #ece3d2;
    --card: #fbf8f2;
    --ink: #1f1a15;
    --ink-soft: #5c5247;
    --ink-faint: #8a7f72;
    --line: #dbcdb6;
    --terra: #c0582f;
    --terra-deep: #9b4220;
    --terra-soft: #f1d8c7;
    --sage: #8c9a74;
    --shell: 1180px;
    --serif: "Fraunces", Georgia, serif;
    --sans: "Inter", "Segoe UI", Arial, sans-serif;
    --hand: "Caveat", cursive;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* decorative shapes and the tilted ribbon bleed past the edges */
html, body { overflow-x: clip; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* paper grain */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    opacity: .35;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.28 0 0 0 0 0.2 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; }

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 24px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
    position: absolute; left: 16px; top: -48px; z-index: 200;
    background: var(--ink); color: var(--paper);
    padding: 8px 14px; border-radius: 6px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; }

/* ---------- type ---------- */
.eyebrow {
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--terra-deep);
}
.eyebrow-light { color: var(--terra-soft); }

.display, .headline {
    font-family: var(--serif);
    font-weight: 400;
    letter-spacing: -.02em;
    line-height: 1.05;
}
.display { font-size: clamp(44px, 6.4vw, 84px); }
.headline { font-size: clamp(32px, 4.2vw, 54px); }
.display em, .headline em { font-style: italic; color: var(--terra); }

.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-soft); max-width: 34ch; margin: 24px 0 0; }
.fine { font-size: 13px; color: var(--ink-faint); margin: 8px 0 0; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 24px;
    border-radius: 999px;
    font-weight: 600; font-size: 15px;
    text-decoration: none;
    transition: transform .2s ease, background-color .2s ease;
}
.btn-solid { background: var(--terra); color: #fff; }
.btn-solid:hover { background: var(--terra-deep); transform: translateY(-2px); }

.btn-link {
    display: inline-flex; gap: 6px;
    font-weight: 600; font-size: 15px;
    text-decoration: none;
    border-bottom: 1.5px solid currentColor;
    padding-bottom: 2px;
}
.btn-link:hover { color: var(--terra); }

/* ---------- nav ---------- */
.site-nav {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease;
}
.site-nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.monogram {
    font-family: var(--serif); font-size: 34px; font-weight: 600;
    text-decoration: none; line-height: 1;
}
.monogram span { color: var(--terra); }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink-soft); }
.nav-links a:hover { color: var(--ink); }
.nav-links .nav-cta {
    color: var(--ink); border: 1.5px solid var(--ink);
    padding: 8px 18px; border-radius: 999px;
}
.nav-links .nav-cta:hover { background: var(--ink); color: var(--paper); }

.nav-toggle {
    display: none;
    background: none; border: 1.5px solid var(--ink); border-radius: 999px;
    width: 44px; height: 44px; font-size: 16px; color: var(--ink); cursor: pointer;
}

/* ---------- hero ---------- */
.hero {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 56px;
    align-items: center;
    padding-top: 64px;
    padding-bottom: 88px;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin-top: 36px; }

.portrait-stack { position: relative; margin: 0; max-width: 420px; justify-self: center; width: 100%; }

.print {
    position: relative; z-index: 2;
    background: var(--card);
    padding: 12px 12px 48px;
    box-shadow: 0 1px 0 var(--line), 0 24px 40px -24px rgba(60, 35, 15, .45);
    transform: rotate(-3deg);
}
.print img { aspect-ratio: 4 / 5; object-fit: cover; object-position: center 15%; width: 100%; }

.paper { position: absolute; z-index: 1; display: block; }
.paper-sun {
    width: 62%; aspect-ratio: 1; border-radius: 50%;
    background: var(--terra); top: -8%; right: -14%;
    box-shadow: 0 10px 0 -2px var(--terra-deep);
}
.paper-leaf {
    width: 46%; aspect-ratio: 1; background: var(--sage);
    bottom: -6%; left: -14%;
    border-radius: 0 70% 0 70%;
    transform: rotate(8deg);
}
.paper-steps {
    position: absolute; z-index: 3; width: 38%;
    right: -10%; bottom: 4%;
    fill: var(--paper-2);
    filter: drop-shadow(0 6px 6px rgba(60, 35, 15, .2));
}
.note {
    position: absolute; z-index: 4; left: 10%; bottom: 10px;
    font-family: var(--hand); font-size: 30px; color: var(--ink);
    transform: rotate(-3deg);
}

/* ---------- ribbon ---------- */
.ribbon {
    position: relative;
    background: var(--ink); color: var(--paper);
    overflow: hidden;
    transform: rotate(-1.2deg);
    margin: 0 -12px;
}
.ribbon-track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.ribbon.paused .ribbon-track { animation-play-state: paused; }
.ribbon-list { display: flex; list-style: none; margin: 0; padding: 18px 0; }
.ribbon-list li {
    font-family: var(--serif); font-style: italic; font-size: 26px;
    padding: 0 28px; white-space: nowrap;
}
.ribbon-list li::after { content: "✦"; color: var(--terra); font-style: normal; margin-left: 56px; font-size: 18px; vertical-align: middle; }
.ribbon-pause {
    position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
    background: var(--paper); color: var(--ink);
    border: 0; border-radius: 999px; padding: 6px 14px;
    font: 600 12px var(--sans); letter-spacing: .08em; text-transform: uppercase;
    cursor: pointer;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding-top: 112px; padding-bottom: 8px; }
.section-head { margin-bottom: 48px; max-width: 720px; }

.person { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.person .section-head { margin-bottom: 0; }
.person-body p { margin: 0 0 20px; color: var(--ink-soft); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 8px 0 0; padding: 0; }
.tags li {
    border: 1px solid var(--line); background: var(--card);
    border-radius: 999px; padding: 6px 14px;
    font-size: 14px; font-weight: 500;
}
.tags-sm li { font-size: 13px; padding: 4px 12px; }

/* ---------- work ---------- */
.work-item {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 56px;
    align-items: center;
    padding: 48px 0;
    border-top: 1px solid var(--line);
}
.work-item:nth-of-type(even) .work-media { order: 2; }

.work-media {
    border-radius: 18px;
    overflow: hidden;
    background: var(--paper-2);
    border: 1px solid var(--line);
    aspect-ratio: 16 / 10;
}
.work-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

.work-num {
    display: inline-block;
    font-family: var(--serif); font-size: 15px; font-weight: 600;
    color: var(--terra);
    border: 1.5px solid var(--terra);
    border-radius: 999px; padding: 2px 12px;
    margin-bottom: 18px;
}
.work-body h3 { font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.2; letter-spacing: -.01em; }
.work-body p { color: var(--ink-soft); margin: 14px 0 18px; }
.work-body .tags { margin-bottom: 24px; }

/* real screenshot shown at its natural ratio inside a browser frame */
.work-shot {
    aspect-ratio: auto;
    background: var(--card);
    box-shadow: 0 24px 40px -28px rgba(60, 35, 15, .5);
}
.work-shot img { height: auto; }
.dash { display: block; width: 100%; height: auto; font-family: var(--sans); }
.dash .serif { font-family: var(--serif); }
.browser-bar {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
}
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.browser-bar i:first-child { background: var(--terra); }
.browser-bar span {
    margin-left: 10px; padding: 2px 12px;
    background: var(--paper); border-radius: 999px;
    font-size: 12px; color: var(--ink-faint);
}

/* mocks for projects without screenshots */
.mock { display: flex; align-items: center; justify-content: center; padding: 32px; }

.mock-ledger { background: var(--terra-soft); }
.mock-card {
    width: 100%; max-width: 380px;
    background: var(--card); border-radius: 14px; padding: 22px;
    box-shadow: 0 18px 30px -18px rgba(60, 35, 15, .4);
}
.mock-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-faint); }
.mock-figure { display: block; font-family: var(--serif); font-size: 28px; margin: 4px 0 18px; }
.mock-bars { display: flex; align-items: flex-end; gap: 8px; height: 110px; }
.mock-bars i { flex: 1; height: var(--h); background: var(--terra); border-radius: 4px 4px 0 0; opacity: .85; }
.mock-bars i:last-child { background: var(--terra-deep); opacity: 1; }
.mock-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-size: 12px; color: var(--ink-faint); }

.mock-chat { flex-direction: column; align-items: stretch; gap: 12px; background: var(--ink); }
.bubble { max-width: 80%; padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.45; }
.bubble-me { align-self: flex-end; background: var(--terra); color: #fff; border-bottom-right-radius: 4px; }
.bubble-ai { align-self: flex-start; background: #2e2822; color: var(--paper); border-bottom-left-radius: 4px; }

.mock-devotional { position: relative; gap: 14px; background: #e3e6d6; }

/* "published" emphasis for apps that are publicly available */
.live-ribbon {
    position: absolute; top: 16px; left: 16px;
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--ink); color: var(--paper);
    padding: 7px 14px; border-radius: 999px;
    font-size: 12px; font-weight: 600; letter-spacing: .02em;
}
.live-ribbon i { color: #7fcf9a; }

.work-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.work-badges .work-num { margin-bottom: 0; }
.live-pill {
    display: inline-flex; align-items: center; gap: 8px;
    background: #e2efe5; color: #2f6b46;
    border-radius: 999px; padding: 3px 12px;
    font-size: 13px; font-weight: 600;
}
.live-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #3f8f5f;
    box-shadow: 0 0 0 0 rgba(63, 143, 95, .5);
    animation: pulse 2s ease-out infinite;
}
@keyframes pulse { to { box-shadow: 0 0 0 8px rgba(63, 143, 95, 0); } }

.work-body strong { color: var(--ink); font-weight: 600; }
.work-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.btn-store { padding: 12px 20px; }
/* CP Devotional sample content */
.mock-devotional { aspect-ratio: auto; padding: 64px 24px 24px; display: block; }
.dev-grid {
    display: grid; grid-template-columns: 1.1fr 1fr; gap: 12px;
    text-align: left;
}
.dev-devotion { grid-row: span 2; }
.dev-card {
    background: var(--card); border-radius: 14px; padding: 16px;
    box-shadow: 0 14px 24px -16px rgba(60, 35, 15, .45);
    display: flex; flex-direction: column; gap: 6px;
}
.dev-card h4 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 17px; line-height: 1.2; color: var(--ink); }
.dev-card p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); }
.dev-kicker {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
    color: var(--terra-deep);
}
.dev-kicker i { font-size: 11px; }
.dev-devotion h4 { font-size: 22px; }
.dev-devotion blockquote {
    margin: 4px 0 0; padding-left: 10px; border-left: 2px solid var(--terra);
    font-family: var(--serif); font-style: italic; font-size: 14px; line-height: 1.4; color: var(--ink);
}
.dev-devotion cite { font-style: normal; font-size: 11px; font-weight: 600; color: var(--ink-faint); margin-bottom: 4px; }
.dev-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.dev-actions span {
    font-size: 11px; font-weight: 600; padding: 5px 12px; border-radius: 999px;
    background: var(--ink); color: var(--paper);
}
.dev-actions span + span { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.dev-testimony h4 { font-size: 15px; }
.dev-player { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.dev-player h4 { font-size: 15px; }
.dev-play {
    flex: none; width: 34px; height: 34px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--terra); color: #fff; font-size: 11px; padding-left: 2px;
}
.dev-meta { font-size: 11.5px; color: var(--ink-faint); }
.dev-progress { display: block; height: 4px; border-radius: 2px; background: var(--line); margin-top: 6px; overflow: hidden; }
.dev-progress i { display: block; width: 38%; height: 100%; background: var(--terra); border-radius: 2px; }

/* ---------- AI band ---------- */
.ai-band { background: var(--ink); color: var(--paper); margin-top: 112px; padding: 88px 0; }
.ai-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 40px; align-items: center; }
.ai-band .headline em { color: #e98a62; }
.ai-copy { color: #c9bfb1; margin: 16px 0 0; max-width: 52ch; }
.ai-star { width: 88px; fill: var(--terra); animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- strengths ---------- */
.strengths {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.strengths li {
    background: var(--card); border: 1px solid var(--line); border-radius: 18px;
    padding: 28px;
    transition: transform .25s ease, border-color .25s ease;
}
.strengths li:hover { transform: translateY(-4px); border-color: var(--terra); }
.strengths h3 { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.25; }
.strengths p { color: var(--ink-soft); margin: 10px 0 0; font-size: 15px; }

/* ---------- tools ---------- */
.tool-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.tool-groups h3 {
    font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
    color: var(--ink-faint); padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.tool-groups ul { list-style: none; margin: 0; padding: 0; }
.tool-groups li {
    font-family: var(--serif); font-size: 22px;
    padding: 10px 0; border-bottom: 1px dashed var(--line);
}

/* ---------- explore ---------- */
.explore { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.explore-card {
    position: relative; display: block; text-decoration: none;
    background: var(--paper-2); border-radius: 18px; padding: 28px 28px 64px;
    transition: background-color .25s ease, color .25s ease;
}
.explore-card h3 { font-family: var(--serif); font-weight: 600; font-size: 26px; }
.explore-card p { color: var(--ink-soft); margin: 8px 0 0; font-size: 15px; }
.explore-card .arrow { position: absolute; right: 28px; bottom: 22px; font-size: 26px; transition: transform .25s ease; }
.explore-card:hover { background: var(--terra); color: #fff; }
.explore-card:hover p, .explore-card:hover .eyebrow { color: var(--terra-soft); }
.explore-card:hover .arrow { transform: translateX(6px); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); margin-top: 112px; padding: 96px 0 48px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr .6fr; gap: 48px; align-items: end; }
.site-footer .headline { margin-bottom: 32px; }
.site-footer .headline em { color: #e98a62; }
.footer-name { font-family: var(--serif); font-size: 24px; margin: 0; }
.footer-tag { color: #c9bfb1; margin: 4px 0 20px; }
.socials { display: flex; gap: 18px; font-size: 22px; }
.socials a { color: var(--paper); }
.socials a:hover { color: var(--terra); }
.site-footer .fine { color: #8a7f72; margin-top: 24px; }

/* ---------- reveal ---------- */
/* only hidden once home.js has started and can reveal it again */
.reveal-on .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal-on .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
    .hero, .person, .work-item, .ai-inner, .footer-inner { grid-template-columns: 1fr; }
    .hero { gap: 64px; padding-top: 40px; }
    .work-item { gap: 28px; }
    .work-item:nth-of-type(even) .work-media { order: 0; }
    .strengths, .tool-groups, .explore { grid-template-columns: 1fr 1fr; }
    .ai-star { width: 64px; }
}

@media (max-width: 720px) {
    body { font-size: 16px; }
    .shell { padding: 0 16px; }
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .nav-links {
        display: none;
        position: absolute; top: 72px; left: 0; right: 0;
        flex-direction: column; align-items: flex-start; gap: 18px;
        padding: 20px 16px 28px;
        background: var(--paper); border-bottom: 1px solid var(--line);
    }
    .nav-links.open { display: flex; }
    .portrait-stack { max-width: 300px; }
    .strengths, .tool-groups, .explore { grid-template-columns: 1fr; }
    .section { padding-top: 80px; }
    .ribbon-list li { font-size: 20px; }
    .ribbon-pause { right: 12px; }
    .hero { padding-bottom: 72px; }
    .mock { padding: 20px; aspect-ratio: auto; }
    .mock-devotional { padding: 60px 16px 16px; }
    .dev-grid { grid-template-columns: 1fr; }
    .dev-devotion { grid-row: auto; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .ribbon-track, .ai-star, .live-dot { animation: none; }
    .reveal-on .reveal { opacity: 1; transform: none; transition: none; }
}

/* keep anchored sections clear of the sticky nav */
[id] { scroll-margin-top: 88px; }

/* ================= About page ================= */
.about-hero .display { font-size: clamp(42px, 5.6vw, 76px); }
.about-hero .lede { max-width: 46ch; }
.portrait-about .print { transform: rotate(2.5deg); }
.portrait-about .paper-sun { left: -16%; right: auto; top: auto; bottom: -8%; background: var(--sage); box-shadow: 0 10px 0 -2px #6f7c5a; }
.portrait-about .paper-leaf { left: auto; right: -12%; top: -6%; bottom: auto; background: var(--terra); transform: rotate(-12deg); }
.portrait-about .note { left: auto; right: 12%; }

.stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    width: min(calc(var(--shell) - 48px), calc(100% - 48px)); padding: 0;
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat { padding: 32px 24px 32px 0; display: flex; flex-direction: column; gap: 6px; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat-num { font-family: var(--serif); font-size: clamp(36px, 4vw, 52px); line-height: 1; letter-spacing: -.02em; }
.stat-num em { font-style: normal; color: var(--terra); }
.stat-label { font-size: 14px; color: var(--ink-soft); max-width: 22ch; }

.chapters { list-style: none; margin: 0; padding: 0; }
.chapter {
    display: grid; grid-template-columns: 120px 1fr; gap: 24px;
    padding: 36px 0; border-top: 1px solid var(--line);
}
.chapter:last-child { border-bottom: 1px solid var(--line); }
.chapter .work-num { justify-self: start; align-self: start; }
.chapter h3 { font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.2; }
.chapter p { color: var(--ink-soft); margin: 12px 0 0; max-width: 68ch; }

.pullquote {
    margin: 0; padding: 56px clamp(24px, 6vw, 88px);
    background: var(--terra); color: #fff; border-radius: 24px;
    position: relative; overflow: hidden;
}
.pullquote::before {
    content: "“"; position: absolute; top: -12px; right: 32px;
    font-family: var(--serif); font-size: 280px; line-height: 1; color: rgba(255, 255, 255, .14);
}
.pullquote p {
    position: relative; margin: 0;
    font-family: var(--serif); font-style: italic; font-size: clamp(26px, 3.2vw, 42px); line-height: 1.25;
}

.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; max-width: 820px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; display: grid; grid-template-columns: 80px 1fr; gap: 16px; padding: 14px 0; }
.timeline li::before {
    content: ""; position: absolute; left: -28px; top: 21px;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--paper); border: 2px solid var(--terra);
}
.timeline .t-year { font-family: var(--serif); font-weight: 600; font-size: 20px; color: var(--terra-deep); }
.timeline p { margin: 2px 0 0; font-size: 17px; }
.timeline .t-now::before { background: var(--terra); box-shadow: 0 0 0 6px var(--terra-soft); }
.timeline .t-now p { font-weight: 600; }

@media (max-width: 960px) {
    .stats { grid-template-columns: 1fr 1fr; }
    .stat:nth-child(3) { padding-left: 0; border-left: 0; }
    .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
    .chapter { grid-template-columns: 1fr; gap: 12px; padding: 28px 0; }
    .stat, .stat + .stat { padding: 24px 12px 24px 0; }
    .stat:nth-child(even) { padding-left: 16px; }
    .timeline li { grid-template-columns: 1fr; gap: 2px; }
    .pullquote::before { font-size: 180px; top: -8px; right: 16px; }
    .stats { width: calc(100% - 32px); }
}

/* ================= Resume page ================= */
.resume { padding-top: 56px; }
.cv-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.cv-name { font-size: clamp(44px, 6vw, 80px); }
.cv-role { margin: 14px 0 0; font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-soft); }
.cv-role span { color: var(--terra); margin: 0 4px; }
.cv-actions .btn { border: 0; cursor: pointer; font-family: var(--sans); }

.cv-contact {
    list-style: none; margin: 32px 0 0; padding: 18px 0;
    display: flex; flex-wrap: wrap; gap: 12px 32px;
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    font-size: 15px;
}
.cv-contact li { display: inline-flex; align-items: center; gap: 10px; }
.cv-contact i { color: var(--terra); width: 16px; text-align: center; }
.cv-contact a { text-decoration: none; }
.cv-contact a:hover { color: var(--terra); }

.cv-grid { display: grid; grid-template-columns: 1fr 320px; gap: 64px; margin-top: 48px; }
.cv-section + .cv-section { margin-top: 48px; }
.cv-h {
    font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
    color: var(--terra-deep); padding-bottom: 12px; margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
}
.cv-summary { margin: 0; font-family: var(--serif); font-size: clamp(19px, 1.8vw, 23px); line-height: 1.5; }

.cv-item + .cv-item { margin-top: 32px; }
.cv-item-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.cv-item h3 { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.25; }
.cv-date {
    font-size: 13px; font-weight: 600; color: var(--terra-deep);
    background: var(--terra-soft); padding: 3px 12px; border-radius: 999px; white-space: nowrap;
}
.cv-org { margin: 4px 0 10px; font-size: 15px; font-weight: 500; color: var(--ink-faint); }
.cv-item ul { margin: 0; padding-left: 18px; }
.cv-item li { color: var(--ink-soft); margin: 6px 0; }
.cv-item li::marker { color: var(--terra); }
.cv-item li strong { color: var(--ink); font-weight: 600; }

.cv-projects { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cv-project {
    display: block; text-decoration: none;
    background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px;
    transition: border-color .2s ease, transform .2s ease;
}
.cv-project:hover { border-color: var(--terra); transform: translateY(-2px); }
.cv-project h3 { font-family: var(--serif); font-weight: 600; font-size: 19px; }
.cv-project p { margin: 4px 0 0; font-size: 14px; color: var(--ink-soft); }

.cv-skills { margin: 0; }
.cv-skill { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.cv-skill:first-child { padding-top: 0; }
.cv-skill:last-child { border-bottom: 0; }
.cv-skill dt {
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--ink);
}
.cv-skill dt i {
    width: 26px; height: 26px; border-radius: 8px; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--terra-soft); color: var(--terra-deep); font-size: 12px;
}
.cv-skill dd { margin: 8px 0 0 36px; font-size: 14.5px; line-height: 1.7; color: var(--ink-soft); }
.cv-skill dd .sk { white-space: nowrap; }
.cv-skill dd .sk:not(:last-child)::after { content: "·"; color: var(--terra); margin: 0 3px 0 7px; }
.cv-item-tight h3 { font-size: 19px; }
.cv-item-tight .cv-date { display: inline-block; margin-bottom: 8px; }
.cv-item-tight .cv-org { margin-bottom: 6px; }
.cv-side .cv-item li { font-size: 14px; }

@media (max-width: 960px) {
    .cv-grid { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 720px) {
    .resume { padding-top: 32px; }
    .cv-projects { grid-template-columns: 1fr; }
    .cv-contact { gap: 10px 20px; font-size: 14px; }
}

/* ---------- print: a clean one-column document ---------- */
@media print {
    @page { margin: 14mm 14mm; }
    body { background: #fff; font-size: 11pt; }
    body::before, .site-nav, .site-footer, .skip-link, .no-print { display: none !important; }
    .reveal-on .reveal { opacity: 1 !important; transform: none !important; }
    .resume { padding: 0; }
    .shell { max-width: none; padding: 0; }
    .cv-name { font-size: 30pt; }
    .cv-contact { margin-top: 12px; padding: 8px 0; font-size: 9.5pt; }
    .cv-grid { grid-template-columns: 1fr 34%; gap: 28px; margin-top: 18px; }
    .cv-section + .cv-section { margin-top: 18px; }
    .cv-h { margin-bottom: 10px; padding-bottom: 6px; }
    .cv-summary { font-size: 12pt; }
    .cv-item + .cv-item { margin-top: 14px; }
    .cv-item h3 { font-size: 13pt; }
    .cv-item li, .cv-side .cv-item li { font-size: 10pt; margin: 3px 0; }
    .cv-item, .cv-side .cv-section { break-inside: avoid; }
    .cv-h { break-after: avoid; }
    .resume .cv-head .eyebrow { display: none; }
    .cv-projects { grid-template-columns: 1fr 1fr; gap: 8px; }
    .cv-project { padding: 8px 10px; }
    .cv-project h3 { font-size: 11pt; }
    .cv-project p { font-size: 9pt; }
    .cv-skill { padding: 6px 0; }
    .cv-skill dt { font-size: 9.5pt; }
    .cv-skill dt i { width: 18px; height: 18px; font-size: 8pt; border-radius: 5px; }
    .cv-skill dd { margin: 3px 0 0 28px; font-size: 9.5pt; line-height: 1.5; }
    a { color: inherit; text-decoration: none; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- copy email ---------- */
.footer-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.copy-email {
    display: inline-flex; align-items: center; gap: 10px;
    background: transparent; color: var(--paper);
    border: 1.5px solid rgba(245, 239, 228, .35); border-radius: 999px;
    padding: 12px 20px; font: 500 15px var(--sans); cursor: pointer;
    transition: border-color .2s ease, color .2s ease;
}
.copy-email:hover { border-color: var(--paper); }
.copy-email.copied { border-color: #7fcf9a; color: #7fcf9a; }
.copy-mini {
    background: none; border: 0; padding: 2px 4px; margin-left: 2px;
    color: var(--ink-faint); cursor: pointer; font-size: 13px;
}
.copy-mini:hover { color: var(--terra); }
.copy-mini.copied { color: #3f8f5f; }

/* ================= Tiny projects hub ================= */
.tp-hero {
    display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: end;
    padding-top: 64px; padding-bottom: 40px;
}
.tp-hero .lede { max-width: 46ch; }
/* one panel, three equal columns: number on top, label below so numbers always align */
.tp-stats {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 0;   /* equal columns, sized to the widest label */
    background: var(--card); border: 1px solid var(--line); border-radius: 20px;
}
.tp-stats div { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 12px; padding: 18px 24px; }
.tp-stats div + div { border-left: 1px solid var(--line); }
.tp-stats dd { margin: 0; font-family: var(--serif); font-size: 40px; line-height: 1; }
.tp-stats dt {
    display: flex; align-items: center; gap: 7px;
    font-size: 13px; font-weight: 600; color: var(--ink-soft); white-space: nowrap;
}
.tp-stats dt i { font-size: 11px; color: var(--ink-faint); }
.tp-stat-live dd { color: var(--terra); }

.tp-browser { padding-bottom: 24px; }
.tp-toolbar {
    position: sticky; top: 72px; z-index: 20;
    display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
    padding: 14px 0; background: color-mix(in srgb, var(--paper) 92%, transparent);
    backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.tp-search {
    flex: 1 1 320px; max-width: 520px; display: flex; align-items: center; gap: 12px;
    background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; padding: 0 18px;
    transition: border-color .2s ease;
}
.tp-search:focus-within { border-color: var(--terra); }
.tp-search i { color: var(--ink-faint); }
.tp-search input {
    flex: 1; border: 0; background: transparent; outline: none;
    font: 400 16px var(--sans); color: var(--ink); padding: 13px 0;
}
.tp-status { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--paper-2); }
.tp-status button {
    border: 0; background: transparent; cursor: pointer; border-radius: 999px;
    padding: 8px 16px; font: 600 14px var(--sans); color: var(--ink-soft);
}
.tp-status button.is-active { background: var(--ink); color: var(--paper); }

.tp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.tp-chip {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    border: 1px solid var(--line); background: var(--card); color: var(--ink);
    border-radius: 999px; padding: 7px 14px; font: 500 14px var(--sans);
    transition: border-color .2s ease, background-color .2s ease;
}
.tp-chip span {
    font-size: 12px; font-weight: 600; color: var(--ink-faint);
    background: var(--paper-2); border-radius: 999px; padding: 1px 8px;
}
.tp-chip:hover { border-color: var(--terra); }
.tp-chip.is-active { background: var(--terra); border-color: var(--terra); color: #fff; }
.tp-chip.is-active span { background: rgba(255, 255, 255, .22); color: #fff; }

.tp-count { margin: 22px 0 16px; font-size: 14px; color: var(--ink-faint); }

.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.tp-card[hidden] { display: none; }

/* category tones: icon tile background and glyph colour */
.tone-0 { --tone-bg: #f1d8c7; --tone-fg: #9b4220; }
.tone-1 { --tone-bg: #dfe6d3; --tone-fg: #4f6136; }
.tone-2 { --tone-bg: #d9e1ef; --tone-fg: #33497a; }
.tone-3 { --tone-bg: #f3e3bd; --tone-fg: #8a6214; }
.tone-4 { --tone-bg: #e8dbe9; --tone-fg: #6c3e72; }
.tone-5 { --tone-bg: #d6e9e6; --tone-fg: #2d6a62; }

.tp-card {
    position: relative; display: flex; flex-direction: column;
    background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.tp-card.is-live:hover {
    transform: translateY(-4px); border-color: var(--terra);
    box-shadow: 0 22px 36px -26px rgba(60, 35, 15, .45);
}
.tp-card:not(.is-live) { background: transparent; border-style: dashed; }
.tp-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.tp-icon {
    width: 48px; height: 48px; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--tone-bg); color: var(--tone-fg); font-size: 19px;
}
.tp-card:not(.is-live) .tp-icon { opacity: .75; }
.tp-badge {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 12px; font-weight: 600; border-radius: 999px; padding: 4px 11px;
    letter-spacing: normal; text-transform: none;
}
.tp-badge-live { background: #e2efe5; color: #2f6b46; }
.tp-badge-workshop { background: var(--paper-2); color: var(--ink-soft); }
.tp-badge-workshop i { font-size: 10px; }
.tp-category { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--tone-fg); }
.tp-title { font-family: var(--serif); font-weight: 600; font-size: 23px; line-height: 1.2; margin: 0; }
.tp-link { text-decoration: none; }
.tp-link::after { content: ""; position: absolute; inset: 0; border-radius: 20px; }
.tp-summary { color: var(--ink-soft); font-size: 15px; margin: 10px 0 16px; flex: 1; }
.tp-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; }
.tp-tags li { font-size: 12px; font-weight: 500; color: var(--ink-soft); background: var(--paper-2); border-radius: 6px; padding: 3px 8px; }
.tp-foot {
    display: flex; align-items: center; gap: 16px;
    border-top: 1px solid var(--line); padding-top: 14px; font-size: 14px;
}
.tp-date { color: var(--ink-faint); margin-right: auto; }
.tp-docs { position: relative; z-index: 1; font-weight: 600; text-decoration: none; color: var(--ink-soft); }
.tp-docs:hover { color: var(--terra); }
.tp-go { font-weight: 600; color: var(--terra); transition: transform .25s ease; }
.tp-card.is-live:hover .tp-go { transform: translateX(4px); }

.tp-empty { text-align: center; padding: 64px 16px; border: 1px dashed var(--line); border-radius: 20px; }
.tp-empty i { font-size: 32px; color: var(--sage); }
.tp-empty h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; margin: 14px 0 6px; }
.tp-empty p { color: var(--ink-soft); margin: 0 0 22px; }
.tp-empty .btn { border: 0; cursor: pointer; font-family: var(--sans); }

.tp-idea {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
    background: var(--paper-2); border-radius: 24px; padding: clamp(28px, 5vw, 48px);
}
.tp-idea p:not(.eyebrow) { color: var(--ink-soft); margin: 12px 0 0; }

/* ================= Tool pages (e.g. Number to Words) ================= */
.tool-page { padding-top: 40px; }
.crumbs a { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink-soft); }
.crumbs a:hover { color: var(--terra); }
.tool-head { margin: 28px 0 36px; }
.tool-head .eyebrow { display: flex; align-items: center; gap: 10px; }
.tool-head .lede { max-width: 48ch; }
.tool-head .tags { margin-top: 20px; }
.tool-panel { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; }
.tool-form, .tool-result { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: clamp(22px, 3vw, 32px); }
.tool-label { display: block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 12px; }
.tool-input-row { display: flex; gap: 10px; }
.tool-input-row input {
    flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 14px; background: var(--paper);
    padding: 14px 16px; font: 500 22px var(--sans); color: var(--ink); letter-spacing: .02em;
}
.tool-input-row input:focus { outline: none; border-color: var(--terra); }
.tool-input-row .btn { border: 0; cursor: pointer; font-family: var(--sans); justify-content: center; }
.tool-examples { margin: 16px 0 0; font-size: 14px; color: var(--ink-faint); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tool-examples a {
    text-decoration: none; color: var(--ink); font-weight: 500;
    border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px;
}
.tool-examples a:hover { border-color: var(--terra); color: var(--terra); }
.tool-result { display: flex; flex-direction: column; justify-content: center; min-height: 220px; background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tool-figure { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .06em; color: #c9bfb1; }
.tool-words { margin: 10px 0 0; font-family: var(--serif); font-size: clamp(24px, 2.8vw, 36px); line-height: 1.3; }
.tool-placeholder { margin: 0; font-family: var(--serif); font-style: italic; font-size: 24px; color: #8a7f72; }
.tool-error { margin: 0; font-size: 17px; color: #f0a98a; }
.tool-actions { display: flex; align-items: center; gap: 20px; margin-top: 22px; }
.tool-actions .copy-mini, .tool-actions .btn-link { color: var(--paper); font-size: 14px; }
.tool-actions .copy-mini:hover, .tool-actions .btn-link:hover { color: #e98a62; }
.tool-actions .copy-mini.copied { color: #7fcf9a; }
.tool-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.tool-notes > div { background: var(--paper-2); border-radius: 18px; padding: 26px; }
.tool-notes h3 { font-family: var(--serif); font-weight: 600; font-size: 22px; }
.tool-notes p { color: var(--ink-soft); margin: 10px 0 0; }
.tool-more { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 36px; }

@media (max-width: 960px) {
    .tp-hero { grid-template-columns: 1fr; gap: 28px; }
    .tool-panel, .tool-notes { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .tp-hero { padding-top: 40px; }
    .tp-stats { width: 100%; }
    .tp-stats div { padding: 12px 10px; gap: 8px; justify-content: center; }
    .tp-stats dd { font-size: 28px; }
    .tp-stats dt { font-size: 12px; align-items: flex-start; white-space: normal; line-height: 1.25; }
    .tp-stats dt i, .tp-stats dt .live-dot { margin-top: 3px; flex: none; }
    .tp-search { max-width: none; }
    .tp-status { width: 100%; }
    .tp-status button { flex: 1; }
    .tp-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
    .tp-chip { white-space: nowrap; }
    .tool-input-row { flex-direction: column; }
}

/* ---------- documentation blocks on tool pages ---------- */
.docs-intro { color: var(--ink-soft); margin: 16px 0 0; max-width: 60ch; }
.docs-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; }
.docs-block { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 3vw, 30px); min-width: 0; }
.docs-wide { grid-column: 1 / -1; }
.docs-block h3 { font-family: var(--serif); font-weight: 600; font-size: 22px; margin-bottom: 14px; }
.docs-block h3 + * { margin-top: 0; }
.docs-block * + h3 { margin-top: 26px; }
.docs-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.docs-table th { text-align: left; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); padding: 0 12px 10px 0; border-bottom: 1px solid var(--line); }
.docs-table td { padding: 12px 12px 12px 0; border-bottom: 1px dashed var(--line); vertical-align: top; color: var(--ink-soft); }
.docs-table td:nth-child(2) { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); font-weight: 600; }
.docs-table td:last-child { font-family: var(--serif); color: var(--ink); }
.docs-table tr:last-child td { border-bottom: 0; }
.docs-list, .docs-steps { margin: 0; padding-left: 20px; color: var(--ink-soft); }
.docs-list li, .docs-steps li { margin: 8px 0; }
.docs-list li::marker, .docs-steps li::marker { color: var(--terra); font-weight: 600; }
.docs-block code { font-family: ui-monospace, Consolas, monospace; font-size: .9em; background: var(--paper-2); border-radius: 5px; padding: 1px 6px; color: var(--ink); }
.docs-code { margin: 0; background: var(--ink); color: var(--paper); border-radius: 14px; padding: 18px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; }
.docs-code code { background: none; color: inherit; padding: 0; }
.docs-note { margin: 18px 0 0; padding: 14px 16px; background: #e2efe5; color: #2f6b46; border-radius: 12px; font-size: 14.5px; }
@media (max-width: 960px) {
    .docs-grid { grid-template-columns: 1fr; }
    .docs-table td:nth-child(2) { white-space: normal; }
}

/* ---------- problem-solving walkthrough ---------- */
.walk { list-style: none; margin: 0; padding: 0; position: relative; }
.walk::before {
    content: ""; position: absolute; left: 21px; top: 24px; bottom: 24px;
    width: 2px; background: var(--line);
}
.walk-step {
    position: relative; display: grid; grid-template-columns: .9fr 1.1fr; gap: 28px;
    padding: 0 0 44px 64px; align-items: start;
}
.walk-step:last-child { padding-bottom: 8px; }
.walk-num {
    position: absolute; left: 0; top: 0;
    width: 44px; height: 44px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--paper); border: 2px solid var(--terra); color: var(--terra);
    font-family: var(--serif); font-weight: 600; font-size: 16px;
}
.walk-text h3 { font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.2; margin: 6px 0 12px; }
.walk-text p { color: var(--ink-soft); margin: 0 0 12px; }
.walk-text code, .docs-source summary code {
    font-family: ui-monospace, Consolas, monospace; font-size: .88em;
    background: var(--paper-2); border-radius: 5px; padding: 1px 6px; color: var(--ink);
}
.walk-q { padding-left: 12px; border-left: 3px solid var(--terra-soft); }
.walk-q strong, .walk-decision strong { color: var(--ink); }
.walk-decision { background: var(--terra-soft); border-radius: 12px; padding: 12px 14px; color: var(--ink) !important; }
.walk-points { margin: 0 0 12px; padding-left: 20px; color: var(--ink-soft); }
.walk-points li { margin: 6px 0; }
.walk-points li::marker { color: var(--terra); }
.walk-code, .docs-code {
    margin: 0; min-width: 0; overflow-x: auto;
    background: var(--ink); color: #efe6d8; border-radius: 16px; padding: 20px 22px;
    font: 13.5px/1.65 ui-monospace, Consolas, "Courier New", monospace; tab-size: 4;
}
.walk-code code, .docs-code code { background: none; padding: 0; color: inherit; font: inherit; white-space: pre; }

/* syntax colours in the site palette (highlight.js token classes) */
.hljs-keyword, .hljs-built_in, .hljs-literal { color: #e98a62; }
.hljs-string, .hljs-subst { color: #b5cf8f; }
.hljs-number { color: #e9c46a; }
.hljs-comment { color: #9b8f80; font-style: italic; }
.hljs-title, .hljs-title.function_ { color: #8fb8de; }
.hljs-params, .hljs-variable { color: #efe6d8; }
.hljs-meta { color: #c9a0dc; }

.docs-reference { margin-top: 48px; }
.docs-source {
    margin-top: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
}
.docs-source summary {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 18px 24px; cursor: pointer; list-style: none; font-weight: 600;
}
.docs-source summary::-webkit-details-marker { display: none; }
.docs-source summary i { color: var(--terra); margin-right: 8px; }
.docs-source-hint { font-size: 14px; color: var(--terra); }
.docs-source[open] .docs-source-hint { font-size: 0; }
.docs-source[open] .docs-source-hint::after { content: "Hide"; font-size: 14px; }
.docs-source .docs-code { border-radius: 0; max-height: 640px; }

@media (max-width: 960px) {
    .walk-step { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 720px) {
    .walk::before { left: 17px; }
    .walk-step { padding-left: 50px; }
    .walk-num { width: 36px; height: 36px; font-size: 14px; }
    .walk-text h3 { font-size: 21px; margin-top: 2px; }
    .walk-code, .docs-code { font-size: 12.5px; padding: 16px; }
}

/* ================= AI Advisor case study ================= */
.adv-hero .lede { max-width: 58ch; }
.adv-split { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; }
.adv-split .section-head { margin-bottom: 0; }
.adv-prose p { color: var(--ink-soft); margin: 0 0 16px; font-size: 17px; }
.adv-prose strong { color: var(--ink); }
.adv-quote {
    margin: 22px 0; padding: 18px 22px; border-left: 3px solid var(--terra);
    background: var(--card); border-radius: 0 14px 14px 0;
    font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.4; color: var(--ink);
}
.adv-data { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.adv-data li { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.adv-data i {
    width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--terra-soft); color: var(--terra-deep); font-size: 15px; margin-bottom: 14px;
}
.adv-data h3 { font-family: var(--serif); font-weight: 600; font-size: 19px; }
.adv-data p { margin: 6px 0 0; font-size: 14px; color: var(--ink-soft); }
.adv-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: none; }
.adv-flow li { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 20px; }
.adv-flow li:not(:last-child)::after {
    content: "→"; position: absolute; right: -14px; top: 30px; z-index: 1;
    width: 14px; text-align: center; color: var(--terra); font-weight: 600;
}
.adv-flow h3 { font-family: var(--serif); font-weight: 600; font-size: 19px; margin-top: 14px; }
.adv-flow p { margin: 8px 0 0; font-size: 14.5px; color: var(--ink-soft); }
.adv-flow li:last-child { background: var(--ink); border-color: var(--ink); }
.adv-flow li:last-child h3 { color: var(--paper); }
.adv-flow li:last-child p { color: #c9bfb1; }
.adv-band { margin-top: 112px; }
.adv-beauty { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.adv-beauty li { border-top: 1px solid rgba(245, 239, 228, .2); padding-top: 18px; }
.adv-beauty h3 { font-family: var(--serif); font-weight: 600; font-size: 21px; color: var(--paper); }
.adv-beauty p { margin: 8px 0 0; color: #c9bfb1; font-size: 15px; }
.adv-questions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.adv-questions article { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.adv-q { margin: 0; font-family: var(--serif); font-size: 20px; line-height: 1.4; }
.adv-uses { margin: 14px 0 0; font-size: 13px; font-weight: 600; color: var(--terra-deep); letter-spacing: .02em; }
.adv-stack { margin-top: 0; }
.adv-note { color: var(--ink-soft); font-size: 14.5px; margin: 18px 0 0; }
@media (max-width: 1100px) {
    .adv-flow { grid-template-columns: 1fr 1fr; }
    .adv-flow li::after { display: none; }
}
@media (max-width: 960px) {
    .adv-split { grid-template-columns: 1fr; gap: 24px; }
    .adv-beauty, .adv-questions { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .adv-flow { grid-template-columns: 1fr; }
    .adv-quote { font-size: 18px; }
}

/* ================= SCusH case study ================= */
.sc-hero { display: grid; grid-template-columns: .95fr 1.05fr; gap: 48px; align-items: center; }
.sc-hero .tool-head { margin-bottom: 0; }
.sc-hero .lede strong { color: var(--terra); font-weight: 600; }
.sc-facts { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
.sc-facts li { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); font-size: 15.5px; }
.sc-facts li strong { color: var(--ink); }
.sc-facts i { width: 16px; text-align: center; color: var(--terra); }
.sc-shot { box-shadow: 0 30px 50px -30px rgba(60, 35, 15, .55); }
.sc-psi { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sc-psi li { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px; }
.sc-psi li:last-child { background: var(--terra); border-color: var(--terra); color: #fff; }
.sc-psi li:last-child p { color: var(--terra-soft); }
.sc-tag {
    display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    padding: 4px 10px; border-radius: 999px; background: var(--paper-2); color: var(--terra-deep);
}
.sc-psi li:last-child .sc-tag { background: rgba(255, 255, 255, .2); color: #fff; }
.sc-psi h3 { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.25; margin: 16px 0 10px; }
.sc-psi p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }
.sc-modules { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sc-area { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px; }
.sc-area h3 { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-weight: 600; font-size: 22px; margin-bottom: 14px; }
.sc-area h3 i {
    width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--terra-soft); color: var(--terra-deep); font-size: 15px;
}
.sc-area ul { margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: 15px; }
.sc-area li { margin: 8px 0; }
.sc-area li::marker { color: var(--terra); }
.sc-area strong { color: var(--ink); }
.sc-band { margin-top: 112px; }
.sc-controls { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: start; }
.sc-control-list { grid-template-columns: 1fr 1fr; }
.sc-control-list h3 { display: flex; align-items: center; gap: 10px; }
.sc-control-list h3 i { color: #e98a62; font-size: 15px; }
.sc-code { border: 1px solid rgba(245, 239, 228, .15); background: #17130f; }
.sc-timeline { max-width: none; margin-bottom: 8px; }
.sc-timeline li { grid-template-columns: 70px 1fr; padding: 10px 0; }
.sc-timeline p { font-size: 15.5px; }
.sc-disclaimer { margin: 18px 0 0; font-size: 13.5px; color: var(--ink-faint); }
@media (max-width: 1100px) {
    .sc-controls { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
    .sc-hero { grid-template-columns: 1fr; gap: 32px; }
    .sc-psi, .sc-modules { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .sc-control-list { grid-template-columns: 1fr; }
    .sc-timeline li { grid-template-columns: 1fr; }
}

/* ================= CP Devotional case study ================= */
.cp-actions { margin-top: 28px; }
.cp-disclosure {
    margin-top: 40px; padding: 18px 22px; border-radius: 16px;
    background: var(--card); border: 1px solid var(--terra);
}
.cp-disclosure p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }
.cp-disclosure strong { color: var(--ink); }
.cp-facts {
    margin: 20px 0 0; display: grid; grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.cp-facts div { padding: 18px 20px 18px 0; }
.cp-facts div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.cp-facts dt { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.cp-facts dd { margin: 6px 0 0; font-family: var(--serif); font-size: 19px; line-height: 1.3; }
.cp-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.cp-toc a {
    display: inline-flex; gap: 8px; align-items: center; text-decoration: none;
    font-size: 14px; font-weight: 500; color: var(--ink);
    border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px;
}
.cp-toc a span { font-family: var(--serif); font-weight: 600; color: var(--terra); }
.cp-toc a:hover { border-color: var(--terra); }

.cp-practices { grid-template-columns: repeat(3, 1fr); }
.cp-prose { margin-top: 28px; max-width: 760px; }

.cp-diagram {
    margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 20px;
    padding: 24px 20px 18px; overflow-x: auto;
}
.cp-diagram svg { display: block; width: 100%; min-width: 560px; height: auto; font-family: var(--sans); }
.cp-lines line { stroke: var(--line); stroke-width: 2; }
.cp-node rect { fill: var(--paper); stroke: var(--line); stroke-width: 1.5; }
.cp-server rect { fill: var(--terra-soft); stroke: var(--terra); stroke-width: 2; }
.cp-dots circle { fill: var(--terra); }
.cp-diagram text { text-anchor: middle; fill: var(--ink-soft); font-size: 12px; }
.cp-diagram .cp-t1 { fill: var(--ink); font-size: 15px; font-weight: 600; font-family: var(--serif); }
.cp-diagram .cp-t2 { fill: var(--ink-faint); font-size: 11.5px; }
.cp-diagram figcaption { margin: 12px 4px 0; font-size: 14px; color: var(--ink-faint); }
.cp-why { grid-template-columns: repeat(3, 1fr); }

.cp-group {
    display: flex; align-items: center; gap: 14px; margin: 8px 0 8px;
    font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--terra-deep);
}
.cp-group::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.cp-note { color: var(--ink-soft); margin: 0 0 24px; max-width: 680px; }
.cp-fork { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cp-track { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.cp-track-label { margin: 0 0 16px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--terra-deep); }
.cp-steps { list-style: none; margin: 0; padding: 0; }
.cp-steps li { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 14px; padding-bottom: 20px; }
.cp-steps li:last-child { padding-bottom: 0; }
.cp-steps li:not(:last-child)::after {
    content: ""; position: absolute; left: 17px; top: 38px; bottom: 2px; width: 2px; background: var(--line);
}
.cp-steps li > span {
    width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--terra); color: #fff; font-family: var(--serif); font-weight: 600; font-size: 14px;
}
.cp-steps h4 { margin: 6px 0 4px; font-family: var(--serif); font-weight: 600; font-size: 18px; }
.cp-steps p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.cp-steps em { display: block; margin-top: 6px; font-size: 14px; color: var(--ink-faint); }
.cp-merge { display: flex; justify-content: center; height: 34px; }
.cp-merge i { width: 2px; background: var(--terra); }
.cp-joined, .cp-music { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.cp-joined { border-color: var(--terra); margin-bottom: 48px; }
.cp-music { columns: 2; column-gap: 32px; }
.cp-music li { break-inside: avoid; }

.cp-cost { align-items: start; }
.cp-table td:nth-child(2), .cp-table .cp-amt { text-align: right; white-space: nowrap; font-family: var(--sans); font-weight: 600; color: var(--ink); }
.cp-table th.cp-amt { text-align: right; }
.cp-total td { border-top: 2px solid var(--ink); border-bottom: 0; font-family: var(--serif) !important; font-size: 17px; color: var(--ink) !important; }

.cp-problems { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cp-problems article { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.cp-problems h3 { font-family: var(--serif); font-weight: 600; font-size: 21px; line-height: 1.25; margin: 14px 0 10px; }
.cp-problems p { color: var(--ink-soft); font-size: 15px; margin: 0 0 10px; }
.cp-attr { font-size: 13px !important; font-weight: 600; color: var(--terra-deep) !important; }
.cp-shows { margin: 14px 0 0 !important; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 14px !important; font-style: italic; }
.cp-shows::before { content: "What this shows: "; font-style: normal; font-weight: 600; color: var(--terra-deep); }
.cp-cta { margin-top: 48px; }

@media (max-width: 960px) {
    .cp-facts { grid-template-columns: 1fr 1fr; }
    .cp-facts div:nth-child(3) { padding-left: 0; border-left: 0; }
    .cp-facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
    .cp-why, .cp-practices { grid-template-columns: 1fr; }
    .cp-fork, .cp-problems { grid-template-columns: 1fr; }
    .cp-music { columns: 1; }
}
@media (max-width: 720px) {
    .cp-facts dd { font-size: 16px; }
    .cp-facts div, .cp-facts div + div { padding: 14px 10px 14px 0; }
    .cp-facts div:nth-child(even) { padding-left: 14px; }
}
