/* /epc2026 — temporary EPC 2026 conference companion page.
   Self-contained styling. Tokens mirror the main site (/assets/css/style.css)
   so the page feels native, but the file lives here for clean teardown
   after the conference. */

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

:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-mono: 'JetBrains Mono', monospace;

    --color-bg: #FAF9F7;
    --color-surface: #FFFFFF;
    --color-text: #1a1a1a;
    --color-text-muted: #70706A;
    --color-accent: #B44A2D;
    --color-accent-light: #F5EBE7;
    --color-accent-2: #3B6994;
    --color-accent-2-light: #E9EFF5;
    --color-border: #e5e3de;
    --color-dark: #141414;
    --color-dark-surface: #1c1c1c;

    --color-group-a: #D9471C;
    --color-group-b: #1E5EA3;

    /* Poster palette, reused so the static figures read as the poster's */
    --poster-teal: #1F5D6E;
    --poster-warm: #C8541E;
    --poster-green: #3A6B3E;
    --poster-gold: #D6A02D;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 64px;
    /* overflow: clip prevents the swiped-off card from creating horizontal scroll,
       while NOT making body a scroll container (which would break window.scrollTo). */
    overflow-x: clip;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--color-text);
    color: white;
    padding: 0.6rem 1rem;
    z-index: 9999;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Nav ---------- */

.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(250, 249, 247, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition);
}
.nav.scrolled { border-bottom-color: var(--color-border); }
.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}
.nav-logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.02em;
    text-decoration: none;
}
.nav-logo:hover { color: var(--color-accent); }
.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}
.nav-links a {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    position: relative;
    text-decoration: none;
    transition: color 0.2s;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: var(--color-accent);
    transition: width var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--color-text); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: 0.3s;
}

/* ---------- Eyebrow band (above the swipe hero) ---------- */

.eyebrow-band {
    max-width: 1100px;
    margin: 0.9rem auto 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.eyebrow-band .ev {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-accent);
}
.eyebrow-band .sub {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* ---------- Swipe hero ---------- */

.swipe-hero {
    padding: 0.8rem 1rem 1.4rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.swipe-headline {
    max-width: 720px;
    text-align: center;
    margin: 0.5rem auto 0.9rem auto;
    padding: 0 0.5rem;
}
.swipe-headline h1 {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: clamp(1.45rem, 5.5vw, 2.2rem);
    line-height: 1.15;
    letter-spacing: -0.015em;
}
.swipe-headline h1 em {
    color: var(--color-accent);
    font-style: italic;
}
.swipe-headline p {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Progress dots */
.swipe-progress {
    display: flex;
    gap: 6px;
    margin-bottom: 0.7rem;
}
.swipe-progress span {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--color-border);
    transition: background var(--transition);
}
.swipe-progress span.is-current { background: var(--color-accent); }
.swipe-progress span.is-done { background: var(--color-text-muted); }

/* Card stack */
.swipe-stack {
    position: relative;
    width: 100%;
    max-width: 380px;
    /* Locked aspect ratio so layout doesn't shift between cards */
    aspect-ratio: 3 / 3.85;
    margin: 0 auto;
    perspective: 1200px;
    touch-action: pan-y;
}

.swipe-card {
    position: absolute;
    inset: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.6rem 1.4rem 1.4rem 1.4rem;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
    will-change: transform, opacity;
    transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1),
                opacity 0.35s ease;
}
.swipe-card.is-dragging { transition: none; cursor: grabbing; }
.swipe-card.is-active { z-index: 30; }
.swipe-card[data-depth="1"] { z-index: 20; transform: scale(0.95) translateY(28px); opacity: 0.92; }
.swipe-card[data-depth="2"] { z-index: 10; transform: scale(0.9)  translateY(52px); opacity: 0.55; }
.swipe-card[data-depth="3"] { z-index:  5; transform: scale(0.86) translateY(72px); opacity: 0.22; }
.swipe-card[data-depth="hidden"] { z-index: 0; opacity: 0; pointer-events: none; }

.swipe-card .card-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--color-accent);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.swipe-card .card-eyebrow .step {
    color: var(--color-text-muted);
    font-weight: 500;
}

.swipe-card .card-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.01em;
    color: var(--color-text);
    /* Slight balance for nicer wrapping on titles like
       "However Far Away? The Spatial Contingencies..." */
    text-wrap: balance;
}
.swipe-card .card-title em {
    color: var(--color-accent);
    font-style: italic;
}
/* Author byline, journal-style: italic, muted, sits below the title. */
.swipe-card .card-authors {
    margin-top: 0.45rem;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.92rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--color-border);
}
.swipe-card .card-body {
    margin-top: 0.7rem;
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.55;
}
.swipe-card .card-body p + p { margin-top: 0.5rem; }
.swipe-card .card-body .accent { color: var(--color-accent); font-weight: 600; }
.swipe-card .card-body .card-rq {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1rem;
    color: var(--color-text);
    line-height: 1.4;
    margin-bottom: 0.6rem;
}

/* For the simulations card — looks like a paper but is a tool.
   Keep the accent slightly different so the eye registers it
   as not-quite-a-paper. */
.swipe-card-tool .card-eyebrow { color: var(--color-accent-2); }
.swipe-card-tool .card-authors { font-style: normal; font-size: 0.85rem; }

/* First card: the poster you just scanned. A small portrait thumbnail of the
   poster sits beside the title so the visitor instantly recognises it. */
.swipe-card-poster .card-poster-row {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 0.2rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--color-border);
}
.swipe-card-poster .card-poster-thumb {
    position: relative;
    flex: 0 0 40%;
    display: block;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    line-height: 0;
}
.swipe-card-poster .card-poster-thumb img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none; /* let the anchor handle the tap; drag still works on the card */
}
.swipe-card-poster .card-poster-zoom {
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem;
    color: #fff;
    background: rgba(26, 26, 26, 0.62);
    border-radius: 50%;
    line-height: 1;
}
.swipe-card-poster .card-poster-meta {
    flex: 1 1 auto;
    min-width: 0;
}
.swipe-card-poster .card-title { font-size: 1.16rem; line-height: 1.16; }
.swipe-card-poster .card-authors {
    border-bottom: none;
    padding-bottom: 0;
    font-size: 0.82rem;
    margin-top: 0.4rem;
}

.swipe-card .reveal {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px dashed var(--color-border);
    color: var(--color-text);
    font-size: 0.9rem;
    line-height: 1.55;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease, margin-top 0.4s ease, padding-top 0.4s ease;
}
.swipe-card.is-revealed .reveal {
    max-height: 240px;
    opacity: 1;
}
.swipe-card .reveal .accent {
    color: var(--color-accent);
    font-weight: 600;
}

.swipe-card .card-foot {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* A small, carefully chosen figure that anchors the bottom of each card,
   sitting just above the call to action. object-fit: cover keeps a clean,
   uniform strip across cards regardless of each figure's native ratio. */
.swipe-card .card-figure {
    margin: 0 0 0.1rem 0;
    width: 100%;
    height: 118px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    line-height: 0;
}
.swipe-card .card-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    pointer-events: none;
}
.swipe-card .card-figure figcaption {
    display: none;
}
/* For figures whose whole shape is the message (e.g. a trend line), show the
   full figure on a white panel instead of cropping it. */
.swipe-card .card-figure--contain {
    background: var(--color-surface);
}
.swipe-card .card-figure--contain img {
    object-fit: contain;
}
/* A taller strip for cards whose body text is short, so a contained figure
   reads at a comfortable size. */
.swipe-card .card-figure--tall {
    height: 146px;
}
.swipe-card .reveal-btn {
    align-self: flex-start;
    background: none;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.55rem 0.9rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color var(--transition), color var(--transition);
}
.swipe-card .reveal-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}
.swipe-card.is-revealed .reveal-btn { display: none; }
.swipe-card .card-hint {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-text-muted);
    letter-spacing: 0.08em;
    text-align: center;
}

/* Swipe affordance overlays — centered Tinder-style stamps that fade in
   while the card is dragged. Green for match, warm for skip. */
.swipe-card .stamp {
    position: absolute;
    top: 50%;
    left: 50%;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: clamp(1.6rem, 6vw, 2.1rem);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    padding: 0.55rem 1.4rem;
    border-radius: var(--radius-sm);
    border: 3px solid currentColor;
    background: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transition: opacity 0.1s linear;
    pointer-events: none;
    white-space: nowrap;
}
.swipe-card .stamp-yes {
    color: #1FA85A;
    transform: translate(-50%, -50%) rotate(-12deg);
}
.swipe-card .stamp-skip {
    color: var(--color-group-a);
    transform: translate(-50%, -50%) rotate(12deg);
}

/* Action buttons — float in front of the deck, straddling the bottom edge of
   the cards (cards sit behind, z-index < 40). */
.swipe-actions {
    position: relative;
    z-index: 40;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    margin-top: -28px;
}
.swipe-actions button {
    width: 52px; height: 52px;
    border-radius: 50%;
    border: 1.5px solid var(--color-border);
    background: var(--color-surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--color-text);
    transition: transform var(--transition),
                border-color var(--transition),
                color var(--transition),
                box-shadow var(--transition);
}
.swipe-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
.swipe-actions .btn-skip:hover { border-color: var(--color-group-a); color: var(--color-group-a); }
.swipe-actions .btn-yes:hover  { border-color: var(--color-group-b); color: var(--color-group-b); }
.swipe-actions .btn-yes {
    width: 60px; height: 60px;
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
    font-size: 1.6rem;
}
.swipe-actions .btn-yes:hover { background: #9c3f25; border-color: #9c3f25; color: #fff; }

.swipe-skip-link {
    margin-top: 0.9rem;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.swipe-skip-link a {
    color: var(--color-text-muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: color var(--transition), border-color var(--transition);
}
.swipe-skip-link a:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

/* End-of-stack card (replaces stack when finished) */
.swipe-end {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem 1.4rem;
    background: var(--color-accent-light);
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-md);
}
.swipe-stack.is-finished .swipe-end { display: flex; }
.swipe-stack.is-finished .swipe-card { display: none; }
.swipe-end h2 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    margin-bottom: 0.6rem;
    color: var(--color-text);
}
.swipe-end p {
    font-size: 0.9rem;
    color: var(--color-text);
    margin-bottom: 1.2rem;
    line-height: 1.5;
}
.swipe-end .btn-down {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: var(--color-accent);
    color: #fff;
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background var(--transition), transform var(--transition);
}
.swipe-end .btn-down:hover {
    background: #9c3f25;
    transform: translateY(-2px);
}
.swipe-end .replay {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Sections (scrollable narrative) ---------- */

.section {
    padding: 4.5rem 0;
    /* Account for the fixed 64px nav when scrolled to via #anchor */
    scroll-margin-top: 72px;
}
.agenda-item { scroll-margin-top: 88px; }

/* When an agenda item is the URL :target, give it a subtle pulse so the
   visitor can see what they landed on after a card swipe-right. */
.agenda-item:target {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px var(--color-accent-light);
    animation: agenda-pulse 1.6s ease-out 1;
}
@keyframes agenda-pulse {
    0%   { box-shadow: 0 0 0 0  var(--color-accent-light); }
    40%  { box-shadow: 0 0 0 10px var(--color-accent-light); }
    100% { box-shadow: 0 0 0 4px var(--color-accent-light); }
}
.section.alt { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.section.dark {
    background: var(--color-dark);
    color: #f5f5f3;
    border-top: 1px solid #2a2a2a;
    border-bottom: 1px solid #2a2a2a;
}
.section.dark .section-label { color: #c8a487; }
.section.dark .section-desc { color: #d8d6d2; }
.section.dark h2 em { color: #d9846b; }

.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-header {
    margin-bottom: 2rem;
}
.section-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--color-accent);
    display: block;
    margin-bottom: 0.6rem;
}
.section-header h2 {
    font-family: var(--font-serif);
    font-size: clamp(1.7rem, 4.5vw, 2.4rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.015em;
}
.section-header h2 em { color: var(--color-accent); font-style: italic; font-weight: 400; }

.prose p { margin: 0.9rem 0; font-size: 1rem; line-height: 1.75; }
.prose p:first-child { margin-top: 0; }
.prose a {
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
}
.section.dark .prose a { color: #d9846b; }
.prose a:hover { color: var(--color-text); border-bottom-color: var(--color-text); }
.section.dark .prose a:hover { color: #fff; border-bottom-color: #fff; }

.callout {
    margin: 1.4rem 0;
    padding: 1.1rem 1.2rem;
    background: var(--color-accent-light);
    border-left: 3px solid var(--color-accent);
    border-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.6;
}
.callout strong { color: var(--color-accent); }
.section.dark .callout {
    background: rgba(217, 132, 107, 0.08);
    border-left-color: #d9846b;
}
.section.dark .callout strong { color: #e7a08a; }

/* Agenda list */
.agenda-list {
    list-style: none;
    margin: 1.4rem 0 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.agenda-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    background: var(--color-surface);
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.agenda-item:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
.agenda-item .tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-text-muted);
    margin-bottom: 0.4rem;
}
.agenda-item.is-poster .tag { color: var(--color-accent); }
.agenda-item.is-feature .tag { color: var(--color-group-b); }
.agenda-item h3 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    line-height: 1.25;
}
.agenda-item .agenda-authors {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.88rem;
    color: var(--color-text-muted);
    margin-bottom: 0.45rem;
    line-height: 1.4;
}
.agenda-item p {
    font-size: 0.92rem;
    color: var(--color-text-muted);
    line-height: 1.55;
}
.agenda-item .links {
    margin-top: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}
.agenda-item .links a {
    color: var(--color-accent);
    text-decoration: none;
    margin-right: 1rem;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition);
}
.agenda-item .links a:hover { border-bottom-color: currentColor; }

/* Simulation list */
.sim-list {
    list-style: none;
    margin: 1.4rem 0 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
}
.sim-list a {
    display: block;
    padding: 0.95rem 1.1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    text-decoration: none;
    color: var(--color-text);
    transition: border-color var(--transition), transform var(--transition);
}
.sim-list a:hover { border-color: var(--color-accent); transform: translateY(-1px); }
.sim-list .sim-name {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
}
.sim-list .sim-desc {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* CTA row */
.cta-row {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}
.cta {
    display: inline-block;
    padding: 0.7rem 1.1rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.cta.primary {
    background: var(--color-accent);
    color: #fff;
}
.cta.primary:hover { background: #9c3f25; transform: translateY(-2px); }
.cta.ghost {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}
.section.dark .cta.ghost { color: #fff; border-color: #3a3a3a; }
.cta.ghost:hover { border-color: var(--color-accent); color: var(--color-accent); }
.section.dark .cta.ghost:hover { color: #d9846b; border-color: #d9846b; }

/* Pull quote — inherits color from the section so it works on both
   light and dark backgrounds (previously hardcoded black on black). */
.pull {
    margin: 1.8rem 0;
    padding: 0;
    border: none;
}
.pull blockquote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.15rem, 2.8vw, 1.4rem);
    line-height: 1.4;
    color: inherit;
    border-left: 3px solid var(--color-accent);
    padding-left: 1.1rem;
}
.section.dark .pull blockquote { border-left-color: #d9846b; }

/* Figures inside the prose sections. Sit edge-to-edge of the container
   on mobile, with a soft frame so SVG/PNG backgrounds don't bleed into
   the dark section background. */
.paper-figure {
    margin: 1.8rem 0;
    padding: 0;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
}
.section.dark .paper-figure {
    border-color: #2a2a2a;
    background: #fafaf6;
}
.paper-figure img {
    display: block;
    width: 100%;
    height: auto;
}
.paper-figure figcaption {
    padding: 0.8rem 1rem 1rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
}
.section.dark .paper-figure figcaption {
    color: #6b6b6b;
    border-top-color: #e5e3de;
}
/* Light-section variant: faint tint so white-background PNGs still read as
   framed figures against the white surface of the alt section. */
.paper-figure.light { background: #fbfaf6; }
.fold-body .paper-figure { margin: 1.2rem 0; }

/* ---------- About-the-poster layout ---------- */
.about-grid { margin-top: 0.5rem; }
.poster-embed {
    margin: 0 auto 1.6rem auto;
    max-width: 360px;
}
.poster-embed a {
    position: relative;
    display: block;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);
    line-height: 0;
}
.poster-embed img { width: 100%; height: auto; display: block; }
.poster-embed-zoom {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(26, 26, 26, 0.68);
    padding: 0.35rem 0.7rem;
    border-radius: 100px;
    line-height: 1;
    white-space: nowrap;
}

/* ---------- Fold-out study details ---------- */
.fold-prompt {
    margin: 1.6rem 0 0.8rem 0;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.fold-group { display: flex; flex-direction: column; gap: 0.55rem; }
.fold {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    overflow: hidden;
}
.fold > summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1.1rem;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--color-accent);
    transition: background var(--transition);
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary:hover { background: var(--color-accent-light); }
.fold-x {
    flex: 0 0 auto;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--color-text-muted);
    transition: transform var(--transition);
}
.fold[open] > summary { border-bottom: 1px solid var(--color-border); }
.fold[open] > summary .fold-x { transform: rotate(45deg); color: var(--color-accent); }
.fold-body {
    padding: 1rem 1.2rem 1.2rem 1.2rem;
}
.fold-body p {
    margin: 0 0 0.8rem 0;
    font-size: 0.98rem;
    line-height: 1.7;
}
.fold-body p:last-child { margin-bottom: 0; }
.fold-body .paper-figure figcaption { font-size: 0.82rem; }
.fold-list {
    margin: 0 0 0.9rem 0;
    padding: 0;
    list-style: none;
}
.fold-list:last-child { margin-bottom: 0; }
.fold-list li {
    position: relative;
    padding: 0 0 0 1.15rem;
    margin: 0 0 0.6rem 0;
    font-size: 0.95rem;
    line-height: 1.6;
}
.fold-list li:last-child { margin-bottom: 0; }
.fold-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-accent);
}
.fold-list strong { font-weight: 600; }
.fold-sub {
    margin: 0 0 0.5rem 0;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.fold-cite {
    margin: 0.9rem 0 0 0;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--color-text-muted);
}
.fold-cite a { color: var(--color-accent); }

/* Footer */
.footer {
    padding: 2.5rem 0;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--color-border);
}
.footer a { color: var(--color-accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed;
        top: 64px;
        left: 0; right: 0;
        background: var(--color-bg);
        flex-direction: column;
        padding: 1.5rem;
        border-bottom: 1px solid var(--color-border);
        /* Closed state: pushed up AND fully hidden, so nothing peeks
           through the translucent nav blur. */
        transform: translateY(-110%);
        opacity: 0;
        visibility: hidden;
        transition: transform var(--transition),
                    opacity 0.2s ease,
                    visibility 0s linear var(--transition);
        gap: 1rem;
    }
    .nav-links.is-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        transition: transform var(--transition),
                    opacity 0.2s ease,
                    visibility 0s linear 0s;
    }
    .swipe-stack { max-width: 340px; }
    /* The conference/author band duplicates info that is already in the nav
       and the cards, so it is hidden on small screens to save vertical space. */
    .eyebrow-band { display: none; }
}

@media (min-width: 768px) {
    .swipe-stack { max-width: 400px; }
    .swipe-hero { min-height: calc(100vh - 64px); justify-content: center; padding-top: 2rem; }
    .section { padding: 5.5rem 0; }
    .sim-list { grid-template-columns: 1fr 1fr; }
    /* The poster now stands on its own; keep it centred above the figures. */
    .poster-embed { max-width: 340px; }
}

@media (max-width: 380px) {
    .swipe-card { padding: 1.3rem 1.1rem 1.1rem 1.1rem; }
    .swipe-card h2 { font-size: 1.35rem; }
    .swipe-actions { gap: 1.2rem; }
}

/* ---------- Paper 4 interactive: opportunity decomposition ---------- */
.p4-explorer {
    margin: 1.8rem 0;
    padding: 1.4rem 1.3rem 1.2rem 1.3rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
.p4-kicker {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}
.p4-explorer-head h3 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}
.p4-explorer-head p {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--color-text-muted);
}

.p4-seg {
    display: inline-flex;
    margin: 1.2rem 0 0.4rem 0;
    padding: 3px;
    gap: 2px;
    border: 1px solid var(--color-border);
    border-radius: 100px;
    background: var(--color-bg);
}
.p4-seg button {
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.35rem 0.95rem;
    border-radius: 100px;
    color: var(--color-text-muted);
    transition: background var(--transition), color var(--transition);
}
.p4-seg button.is-on { background: var(--color-accent); color: #fff; }

/* Q badge + header row, echoing the poster's teal square badges. */
.p4-qhead {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.5rem;
}
.p4-qhead .p4-kicker { margin-bottom: 0; }
.p4-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 5px;
    background: var(--poster-teal);
    color: #fff;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.01em;
}

/* ---- Q2 dumbbell chart (poster style) ---- */
.p4-chart {
    margin: 1rem 0 0.4rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.p4-chart.is-women { --p4-c: var(--poster-warm); }
.p4-chart.is-men { --p4-c: var(--poster-teal); }
.p4-row {
    display: grid;
    grid-template-columns: 90px 1fr 78px;
    align-items: center;
    gap: 0.7rem;
}
.p4-row-label {
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.15;
    text-align: right;
    color: var(--color-text);
}
.p4-track {
    position: relative;
    height: 24px;
}
/* Horizontal axis baseline. */
.p4-axis {
    position: absolute;
    left: 0; right: 0; top: 50%;
    height: 1px;
    background: var(--color-border);
    transform: translateY(-50%);
}
/* Dashed 1x anchor (different education). */
.p4-ref {
    position: absolute;
    left: 0; top: 2px; bottom: 2px;
    width: 0;
    border-left: 1.5px dashed var(--color-text-muted);
}
/* Connector from current estimate to baseline. */
.p4-link {
    position: absolute;
    top: 50%;
    height: 3px;
    transform: translateY(-50%);
    background: var(--p4-c);
    border-radius: 2px;
    transition: left 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), width 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
/* When a channel pushes the estimate up instead of down (residential suppression). */
.p4-link.is-up {
    background: var(--color-text-muted);
    opacity: 0.55;
}
.p4-dot {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: left 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
/* Hollow circle = baseline. */
.p4-dot-base {
    background: var(--color-surface);
    border: 2.5px solid var(--p4-c);
    z-index: 1;
}
/* Filled circle = current step. */
.p4-dot-cur {
    background: var(--p4-c);
    border: 2.5px solid var(--color-surface);
    z-index: 2;
}
.p4-val {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}
.p4-v-base { color: var(--color-text-muted); }
.p4-v-arrow { margin: 0 0.18em; color: var(--color-text-muted); }
.p4-v-cur { color: var(--color-text); font-weight: 700; }

/* Dumbbell legend, echoing the poster's baseline / full-model key. */
.p4-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 1rem;
    margin: 0.3rem 0 0.2rem 0;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.74rem;
    color: var(--color-text-muted);
}
.p4-leg-item { display: inline-flex; align-items: center; gap: 0.4rem; }
.p4-leg-dot {
    width: 13px; height: 13px;
    border-radius: 50%;
    flex: 0 0 auto;
}
.p4-leg-dot.is-base { background: var(--color-surface); border: 2.5px solid var(--color-text-muted); }
.p4-leg-dot.is-cur { background: var(--color-text-muted); border: 2.5px solid var(--color-surface); }
.p4-leg-note { font-style: italic; }

.p4-stepper { margin: 1.2rem 0 0.2rem 0; }
#p4-range { width: 100%; accent-color: var(--color-accent); cursor: pointer; }
.p4-ticks {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    margin-top: 0.45rem;
}
.p4-tick {
    flex: 1;
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    padding: 0.25rem 0 0 0;
    border-top: 2px solid transparent;
}
.p4-tick.is-on { color: var(--color-accent); border-top-color: var(--color-accent); font-weight: 600; }

.p4-readout {
    margin: 1rem 0 0.2rem 0;
    padding: 0.9rem 1rem;
    background: var(--color-accent-light);
    border-radius: 6px;
    font-size: 0.92rem;
    line-height: 1.55;
}
.p4-readout strong { color: var(--color-accent); }
.p4-foot {
    margin-top: 1rem;
    font-size: 0.76rem;
    line-height: 1.5;
    color: var(--color-text-muted);
}

/* ---- Poster-style static figures (slope + dose), shown before the interactive ---- */
.p4-fig {
    margin: 1.8rem 0;
    padding: 1.4rem 1.3rem 1.2rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
.p4-fig h3 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.6rem;
}
.p4-fig-cap {
    margin-top: 1rem;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--color-text-muted);
}

/* A figure that breaks out of the 760px reading column to push the margins.
   Centred on the viewport; the text inside stays at a readable line length. */
.p4-fig--wide {
    width: min(100vw - 2rem, 940px);
    margin-left: 50%;
    transform: translateX(-50%);
    padding-left: 1.8rem;
    padding-right: 1.8rem;
}
.p4-fig--wide h3,
.p4-fig--wide .p4-slope-legend,
.p4-fig--wide .p4-fig-cap {
    max-width: 700px;
}

/* slope chart */
.p4-slope-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.1rem;
    margin: 0.3rem 0 0.9rem;
}
.p4-slope-legend .lg {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--c);
}
.p4-slope-legend .lg::before {
    content: "";
    width: 11px; height: 11px;
    border-radius: 50%;
    background: var(--c);
    border: 2px solid var(--color-surface);
    box-shadow: 0 0 0 1.5px var(--c);
    margin-right: 0.45rem;
}
.p4-slope { display: block; width: 100%; height: auto; }
.p4-slope .grid { stroke: #cfcabd; stroke-width: 0.8; }
.p4-slope .guide { stroke: #e2ddd1; stroke-width: 0.8; }
.p4-slope .axis { stroke: var(--color-text); stroke-width: 1; }
.p4-slope .seg { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.p4-slope .pt { stroke: var(--color-surface); stroke-width: 2; }
.p4-slope .glab { fill: var(--color-text-muted); font-family: var(--font-mono); font-size: 13px; }
.p4-slope .xlab { fill: var(--color-text); font-family: var(--font-sans); font-size: 15px; font-weight: 700; }
.p4-slope .ytitle { fill: var(--color-text-muted); font-family: var(--font-sans); font-size: 13px; }

/* dose-response bars */
.p4-dose-sub {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--poster-teal);
    font-weight: 700;
    margin: 0.2rem 0 0.85rem;
}
.p4-dose { display: flex; flex-direction: column; gap: 0.6rem; }
.p4-dose-row {
    display: grid;
    grid-template-columns: 66px 1fr 46px;
    align-items: center;
    gap: 0.7rem;
}
.p4-dose-lab { font-size: 0.8rem; font-weight: 600; text-align: right; }
.p4-dose-track {
    position: relative;
    height: 26px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 5px;
}
.p4-dose-fill { height: 100%; background: var(--poster-teal); border-radius: 4px; min-width: 4px; }
.p4-dose-val { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 700; color: var(--poster-teal); }

@media (max-width: 480px) {
    .p4-row { grid-template-columns: 62px 1fr 66px; gap: 0.45rem; }
    .p4-row-label { font-size: 0.7rem; }
    .p4-val { font-size: 0.64rem; }
    .p4-v-arrow { margin: 0 0.08em; }
    .p4-tick { font-size: 0.53rem; }
    .p4-badge { width: 26px; height: 26px; font-size: 0.78rem; }
    .p4-explorer-head h3 { font-size: 1.2rem; }
    .p4-fig h3 { font-size: 1.2rem; }
    .p4-dose-row { grid-template-columns: 56px 1fr 40px; gap: 0.5rem; }
    .p4-slope .xlab { font-size: 13px; }
    .p4-slope .glab, .p4-slope .ytitle { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
    html { scroll-behavior: auto; }
}
