/* ==========================================================================
   Pacer Academy — stylesheet
   Brand colours taken from the ML Pacer Coaching logo (navy + orange).
   ========================================================================== */

:root {
    --navy-900: #0a1c36;
    --navy-800: #0f2a4f;
    --navy-700: #163a6b;
    --navy-600: #1f4d8a;
    --orange-500: #f08a24;
    --orange-600: #e0761a;
    --orange-100: #fdeedd;
    --ink: #13213a;
    --text: #3b4658;
    --muted: #6b7587;
    --line: #e3e7ee;
    --bg: #ffffff;
    --bg-soft: #f5f7fb;
    --cream: #fbf8f2;
    --green-600: #1f8a5b;
    --green-100: #e3f5ec;
    --blue-600: #2563b8;
    --blue-100: #e6eefb;

    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-head: "Montserrat", "Inter", system-ui, sans-serif;

    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(15, 42, 79, .06), 0 2px 8px rgba(15, 42, 79, .05);
    --shadow: 0 10px 30px -10px rgba(15, 42, 79, .22);
    --shadow-lg: 0 30px 60px -20px rgba(10, 28, 54, .45);
    --container: 1180px;
    --header-h: 72px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--orange-600); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--orange-500); outline-offset: 2px; border-radius: 4px; }
mark { background: #ffe2bf; color: inherit; padding: 0 .15em; border-radius: 3px; }
kbd { font-family: var(--font-body); font-size: .72rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; color: var(--muted); background: #fff; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 860px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--navy-800); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 1000; }
.skip-link:focus { left: 8px; color: #fff; }

.eyebrow {
    font-family: var(--font-head);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--orange-600);
    margin-bottom: .8rem;
}
.lead { font-size: 1.18rem; color: var(--muted); max-width: 46rem; }
.accent { color: var(--orange-500); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font-family: var(--font-head); font-weight: 700; font-size: .95rem;
    padding: .85rem 1.4rem; border-radius: 999px; border: 2px solid transparent;
    text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--orange-500); color: #fff; box-shadow: 0 8px 20px -8px rgba(240, 138, 36, .7); }
.btn-primary:hover { background: var(--orange-600); color: #fff; }
.btn-light { background: #fff; color: var(--navy-800); }
.btn-light:hover { color: var(--orange-600); }
.btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-ghost:hover { color: #fff; border-color: #fff; }
.btn-outline { color: var(--navy-800); border-color: var(--line); background: #fff; }
.btn-outline:hover { border-color: var(--navy-800); color: var(--navy-800); }
.btn-small { padding: .45rem .9rem; font-size: .82rem; }
.btn-block { width: 100%; }
.text-link { font-family: var(--font-head); font-weight: 700; text-decoration: none; color: var(--navy-700); }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand img { width: 56px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; color: var(--navy-800); letter-spacing: -.01em; }
.brand-sub { font-size: .72rem; color: var(--muted); font-weight: 500; letter-spacing: .02em; }
.brand-light .brand-name { color: #fff; }
.brand-light .brand-sub { color: rgba(255, 255, 255, .6); }
.brand-light img { background: #fff; border-radius: 10px; padding: 6px; width: 68px; }

.main-nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
    display: block; padding: .5rem .9rem; border-radius: 999px;
    font-family: var(--font-head); font-weight: 600; font-size: .95rem;
    color: var(--ink); text-decoration: none;
}
.main-nav a:hover { background: var(--bg-soft); color: var(--navy-700); }
.main-nav a[aria-current="page"] { color: var(--orange-600); background: var(--orange-100); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.search-trigger {
    display: flex; align-items: center; gap: 8px;
    border: 1px solid var(--line); background: var(--bg-soft);
    color: var(--muted); font: inherit; font-size: .9rem;
    padding: .45rem .6rem .45rem .8rem; border-radius: 999px; cursor: pointer; min-width: 180px;
    transition: border-color .15s ease, background .15s ease;
}
.search-trigger:hover { border-color: var(--navy-600); background: #fff; }
.search-trigger span { margin-right: auto; }
.search-trigger svg, .hero-search svg, .search-dialog-form svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; flex-shrink: 0; }

.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 12px; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.menu-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Search overlay ---------- */
.search-overlay {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(10, 28, 54, .55);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    display: flex; justify-content: center; align-items: flex-start;
    padding: 10vh 16px 16px;
    animation: fade .15s ease;
}
.search-overlay[hidden] { display: none; }
.search-dialog { width: 100%; max-width: 680px; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .18s ease; }
.search-dialog-form { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-dialog-form input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 1.1rem; color: var(--ink); background: transparent; min-width: 0; }
.search-dialog-form input::-webkit-search-cancel-button { display: none; }
.search-close { border: 1px solid var(--line); background: var(--bg-soft); border-radius: 8px; font-size: .75rem; color: var(--muted); padding: 4px 8px; cursor: pointer; }
.live-results { max-height: min(60vh, 520px); overflow-y: auto; }
.live-results:empty { display: none; }
.live-result { display: block; padding: 14px 20px; text-decoration: none; border-bottom: 1px solid var(--line); color: var(--text); }
.live-result:last-child { border-bottom: 0; }
.live-result:hover, .live-result.is-active { background: var(--bg-soft); color: var(--text); }
.live-result-cat { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-600); }
.live-result-title { display: block; font-family: var(--font-head); font-weight: 700; color: var(--ink); margin: 2px 0 4px; }
.live-result-snippet { display: block; font-size: .88rem; color: var(--muted); line-height: 1.5; }
.live-footer { display: block; padding: 12px 20px; font-size: .9rem; font-weight: 600; background: var(--bg-soft); text-decoration: none; }
.live-empty { padding: 22px 20px; color: var(--muted); }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    background: linear-gradient(160deg, var(--navy-800) 0%, var(--navy-900) 70%);
    color: rgba(255, 255, 255, .82);
    padding: clamp(64px, 9vw, 120px) 0 clamp(72px, 10vw, 130px);
}
.hero-bg {
    position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(600px 400px at 85% 20%, rgba(240, 138, 36, .18), transparent 60%),
        radial-gradient(700px 500px at 10% 110%, rgba(31, 77, 138, .55), transparent 60%);
}
.hero-bg::after {
    content: ""; position: absolute; left: -10%; right: -10%; bottom: -55%;
    height: 90%; border-radius: 50%; border-top: 1px solid rgba(255, 255, 255, .18);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; margin-bottom: 1.2rem; }
.hero .lead { color: rgba(255, 255, 255, .75); margin-bottom: 2rem; }
.hero .eyebrow { color: var(--orange-500); }

.hero-search {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border-radius: 999px; padding: 6px 6px 6px 20px;
    box-shadow: var(--shadow-lg); max-width: 560px; color: var(--muted);
}
.hero-search input { flex: 1; border: 0; outline: 0; font: inherit; color: var(--ink); background: transparent; min-width: 0; padding: .55rem 0; }
.hero-search-light { box-shadow: var(--shadow); border: 1px solid var(--line); margin: 1.5rem 0 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }

.hero-visual { position: relative; height: 420px; }
.ring {
    position: absolute; inset: 0; margin: auto; width: 380px; height: 380px; border-radius: 50%;
    border: 2px dashed rgba(240, 138, 36, .7);
    animation: spin 60s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pace-card {
    position: absolute; display: flex; flex-direction: column; gap: 2px;
    background: rgba(255, 255, 255, .97); color: var(--ink); border-radius: 16px;
    padding: 16px 20px; box-shadow: var(--shadow-lg); min-width: 200px;
    animation: float 6s ease-in-out infinite;
}
.pace-card-1 { top: 30px; left: 0; }
.pace-card-2 { top: 160px; right: 0; animation-delay: -2s; }
.pace-card-3 { bottom: 30px; left: 40px; background: var(--orange-500); color: #fff; min-width: 0; animation-delay: -4s; }
.pace-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.pace-time { font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: var(--navy-800); letter-spacing: -.02em; }
.pace-detail { font-size: .85rem; color: var(--muted); }
.pace-card-3 .pace-detail { color: rgba(255, 255, 255, .9); }
.pace-flag { font-family: var(--font-head); font-weight: 800; font-size: 1.4rem; letter-spacing: .12em; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 7vw, 96px) 0; }
.section-tight { padding: 40px 0 80px; }
.section-tint { background: var(--bg-soft); }
.section-head { margin-bottom: 40px; max-width: 720px; }
.section-head h2 { margin-bottom: .4rem; }
.section-intro { color: var(--muted); font-size: 1.08rem; }
.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; max-width: none; gap: 24px; }
.section-head-row h2 { margin-bottom: 0; }

/* Journey */
.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.journey-step a {
    position: relative; display: flex; flex-direction: column; height: 100%;
    padding: 28px; border-radius: var(--radius); border: 1px solid var(--line);
    background: #fff; text-decoration: none; color: var(--text); overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.journey-step a::before {
    content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 0;
    background: linear-gradient(90deg, var(--orange-500), var(--orange-600)); transition: width .3s ease;
}
.journey-step a:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.journey-step a:hover::before { width: 100%; }
.journey-num { font-family: var(--font-head); font-weight: 800; font-size: 2.4rem; color: var(--orange-100); line-height: 1; margin-bottom: 14px; -webkit-text-stroke: 1.5px var(--orange-500); }
.journey-title { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--ink); margin-bottom: 6px; }
.journey-desc { color: var(--muted); font-size: .95rem; margin-bottom: 18px; }
.journey-count { margin-top: auto; font-size: .85rem; font-weight: 700; color: var(--navy-600); }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
    display: flex; flex-direction: column; background: #fff; border-radius: var(--radius);
    border: 1px solid var(--line); overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card-cover {
    position: relative; display: flex; align-items: flex-end; justify-content: space-between;
    height: 160px; padding: 18px 22px; overflow: hidden; text-decoration: none; color: #fff;
    background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
}
.card-cover::before {
    content: ""; position: absolute; right: -40px; top: -60px; width: 190px; height: 190px; border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, .28); transition: transform .6s ease;
}
.card:hover .card-cover::before { transform: rotate(60deg); }
.cover-icon { position: relative; width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .16); }
.cover-icon svg { width: 100%; height: 100%; }
.cover-part { position: relative; font-family: var(--font-head); font-weight: 800; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.cover-pacing-philosophy { background: linear-gradient(135deg, #f39a3d, #d9681a); }
.cover-recruitment { background: linear-gradient(135deg, #7a55c7, #4b2f95); }
.cover-technology { background: linear-gradient(135deg, #2f74cf, #173f86); }
.cover-training { background: linear-gradient(135deg, #2aa26d, #146a46); }
.cover-race-day { background: linear-gradient(135deg, #1f4d8a, #0a1c36); }
.cover-race-day .cover-icon { background: var(--orange-500); }
.cover-after-the-race { background: linear-gradient(135deg, #e6a91d, #b77a06); }
.card-body { display: flex; flex-direction: column; padding: 24px; flex: 1; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .8rem; color: var(--muted); margin-bottom: 14px; }
.card-title { font-size: 1.15rem; margin-bottom: .55rem; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--orange-600); }
.card-summary { font-size: .95rem; color: var(--muted); margin-bottom: 18px; }
.card-link { margin-top: auto; font-family: var(--font-head); font-weight: 700; font-size: .88rem; text-decoration: none; color: var(--navy-700); }
.card-link span { display: inline-block; transition: transform .2s ease; }
.card:hover .card-link span { transform: translateX(4px); }
.card-featured { border-top: 4px solid var(--orange-500); }

/* Pills, chips, tags */
.pill {
    display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    padding: .3rem .7rem; border-radius: 999px; text-decoration: none;
    background: var(--blue-100); color: var(--blue-600);
}
.pill:hover { filter: brightness(.96); }
.pill-pacing-philosophy { background: var(--orange-100); color: #b65a0c; }
.pill-recruitment { background: #efe8fb; color: #6a3fb5; }
.pill-technology { background: var(--blue-100); color: var(--blue-600); }
.pill-training { background: var(--green-100); color: var(--green-600); }
.pill-race-day { background: #fde7e7; color: #c0392b; }
.pill-after-the-race { background: #fff4d6; color: #9a6a00; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.chip {
    display: inline-flex; align-items: center; gap: 8px; padding: .5rem 1rem; border-radius: 999px;
    border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none;
    font-weight: 600; font-size: .9rem; transition: all .15s ease;
}
.chip span { font-size: .75rem; color: var(--muted); background: var(--bg-soft); padding: 0 .5rem; border-radius: 999px; }
.chip:hover { border-color: var(--navy-700); color: var(--navy-700); }
.chip.is-active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.chip.is-active span { background: rgba(255, 255, 255, .15); color: #fff; }
.chip-small { padding: .3rem .8rem; font-size: .82rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 0; }
.tag { font-size: .85rem; padding: .3rem .75rem; border-radius: 8px; background: var(--bg-soft); color: var(--muted); text-decoration: none; }
.tag:hover { background: var(--orange-100); color: var(--orange-600); }

/* Quote */
.quote-section { background: var(--navy-800); position: relative; overflow: hidden; }
.quote-section::before {
    content: "\201C"; position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
    font-family: Georgia, serif; font-size: 280px; color: rgba(240, 138, 36, .15); line-height: 1;
}
.big-quote { position: relative; margin: 0 auto; max-width: 860px; text-align: center; }
.big-quote p { font-family: var(--font-head); font-size: clamp(1.3rem, 2.6vw, 1.9rem); font-weight: 600; color: #fff; line-height: 1.45; }
.big-quote em { color: var(--orange-500); font-style: normal; }
.big-quote footer { color: rgba(255, 255, 255, .6); font-size: .95rem; margin-top: 1.2rem; }

/* About teaser */
.about-teaser { display: grid; grid-template-columns: 340px 1fr; gap: 56px; align-items: center; }
.about-logo { background: var(--cream); border-radius: 24px; padding: 24px; box-shadow: var(--shadow); }

/* ---------- Page hero ---------- */
.page-hero { background: linear-gradient(180deg, var(--bg-soft), #fff); padding: 48px 0 32px; border-bottom: 1px solid var(--line); }
.page-hero-center { text-align: center; padding: 96px 0; border: 0; }
.page-hero-center .lead { margin-left: auto; margin-right: auto; }
.page-hero-center .hero-search { margin-left: auto; margin-right: auto; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: var(--muted); margin-bottom: 20px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--orange-600); }
.suggestions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); }

/* ---------- Article ---------- */
.reading-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.reading-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--orange-500), var(--orange-600)); }
.article-hero { background: linear-gradient(180deg, var(--bg-soft), #fff); padding: 48px 0 40px; }
.article-hero h1 { font-size: clamp(2rem, 4vw, 3rem); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; font-size: .9rem; color: var(--muted); margin-top: 1.4rem; }
.author-chip { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.author-chip img { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: #fff; }

.article-layout { display: grid; grid-template-columns: minmax(0, 760px); justify-content: center; gap: 56px; padding-top: 24px; padding-bottom: 80px; }
.article-layout.has-toc { grid-template-columns: 240px minmax(0, 760px); }
.toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; font-size: .9rem; border-left: 2px solid var(--line); padding-left: 18px; }
.toc-title { font-family: var(--font-head); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; color: var(--muted); }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0 0 .55rem; }
.toc .toc-l3 { padding-left: 12px; font-size: .85rem; }
.toc a { color: var(--muted); text-decoration: none; display: block; line-height: 1.4; }
.toc a:hover, .toc a.is-active { color: var(--orange-600); }
.toc a.is-active { font-weight: 600; }

.prose { font-size: 1.08rem; color: var(--text); }
.prose > *:first-child { margin-top: 0; }
.prose h2 { margin-top: 2.2em; font-size: 1.65rem; }
.prose h3 { margin-top: 1.8em; font-size: 1.25rem; }
.prose h2, .prose h3 { position: relative; }
.prose .anchor { margin-left: .4em; color: var(--line); text-decoration: none; opacity: 0; transition: opacity .15s ease; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.prose li { margin-bottom: .6em; padding-left: .2em; }
.prose ul li::marker { color: var(--orange-500); }
.prose ol li::marker { color: var(--orange-600); font-weight: 700; font-family: var(--font-head); }
.prose blockquote { margin: 1.6em 0; padding: 1em 1.4em; border-left: 4px solid var(--orange-500); background: var(--cream); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose img { border-radius: var(--radius-sm); }

.figure { margin: 2em 0; }
.figure img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.figure figcaption { font-size: .88rem; color: var(--muted); text-align: center; margin-top: .7em; font-style: italic; }

.table-wrap { overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--line); border-radius: var(--radius-sm); -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 560px; }
.prose th { background: var(--navy-800); color: #fff; text-align: left; font-family: var(--font-head); font-weight: 600; font-size: .82rem; padding: .8em 1em; vertical-align: bottom; }
.prose td { padding: .75em 1em; border-top: 1px solid var(--line); vertical-align: top; }
.prose tbody tr:nth-child(even) td { background: var(--bg-soft); }
.prose td strong { color: var(--navy-700); }

.callout { position: relative; margin: 1.8em 0; padding: 1.1em 1.3em 1.1em 1.3em; border-radius: var(--radius-sm); border: 1px solid; font-size: 1rem; }
.callout p:last-child { margin-bottom: 0; }
.callout-label { display: block; font-family: var(--font-head); font-weight: 800; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .35em; }
.callout-note { background: var(--blue-100); border-color: #c9daf5; }
.callout-note .callout-label { color: var(--blue-600); }
.callout-tip { background: var(--green-100); border-color: #bfe6d2; }
.callout-tip .callout-label { color: var(--green-600); }
.callout-warning { background: var(--orange-100); border-color: #f7cfa6; }
.callout-warning .callout-label { color: var(--orange-600); }
.callout-quote { background: transparent; border: 0; border-left: 4px solid var(--orange-500); border-radius: 0; font-family: var(--font-head); font-size: 1.25rem; font-weight: 600; color: var(--navy-800); padding: .4em 0 .4em 1.2em; }
.callout-quote strong { color: var(--orange-600); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.share span { margin-right: 6px; font-weight: 600; }

.series-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.series-link { display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: all .2s ease; }
.series-link span { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--orange-600); font-weight: 700; }
.series-link strong { font-family: var(--font-head); color: var(--ink); line-height: 1.35; }
.series-link:hover { border-color: var(--orange-500); box-shadow: var(--shadow); }
.series-link.next { text-align: right; grid-column: 2; }

/* ---------- Search page ---------- */
.result-count { color: var(--muted); margin-bottom: 24px; }
.search-results { list-style: none; margin: 0; padding: 0; }
.search-result { padding: 24px 0; border-bottom: 1px solid var(--line); }
.search-result h2 { font-size: 1.3rem; margin: .6rem 0 .4rem; }
.search-result h2 a { color: var(--ink); text-decoration: none; }
.search-result h2 a:hover { color: var(--orange-600); }
.search-result p { color: var(--muted); margin: 0; font-size: .97rem; }

.empty-state { text-align: center; padding: 56px 24px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 48px; }
.pagination a { min-width: 42px; height: 42px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; }
.pagination a:hover { border-color: var(--navy-700); }
.pagination a[aria-current="page"] { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }

/* ---------- About ---------- */
.about-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 64px; align-items: start; }
.about-aside { position: sticky; top: calc(var(--header-h) + 24px); }
.profile-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); text-align: center; }
.profile-card img { background: var(--cream); border-radius: 16px; padding: 12px; margin: 0 auto 20px; }
.profile-card h2 { font-size: 1.4rem; margin-bottom: .2rem; }
.profile-role { color: var(--muted); font-size: .9rem; }
.facts { list-style: none; padding: 0; margin: 20px 0 24px; text-align: left; font-size: .92rem; }
.facts li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.facts strong { min-width: 72px; color: var(--orange-600); font-family: var(--font-head); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255, 255, 255, .65); padding: 72px 0 0; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; padding-bottom: 48px; }
.footer-brand p { margin-top: 18px; max-width: 420px; }
.site-footer a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.site-footer a:hover { color: var(--orange-500); }
.footer-title { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 18px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; padding-bottom: 24px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; }
.footer-bottom p { margin: 0; }
.footer-motto strong { color: var(--orange-500); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .article-layout.has-toc { grid-template-columns: minmax(0, 760px); }
    .toc { display: none; }
}
@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { display: none; }
    .journey, .card-grid { grid-template-columns: repeat(2, 1fr); }
    .about-teaser { grid-template-columns: 1fr; gap: 32px; }
    .about-logo { max-width: 300px; }
    .about-layout { grid-template-columns: 1fr; gap: 40px; }
    .about-aside { position: static; max-width: 420px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    body { font-size: 16px; }
    .menu-toggle { display: flex; }
    .main-nav {
        position: absolute; top: var(--header-h); left: 0; right: 0;
        background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
        padding: 12px 16px 20px; display: none;
    }
    .main-nav.is-open { display: block; animation: fade .15s ease; }
    .main-nav ul { flex-direction: column; gap: 2px; }
    .main-nav a { padding: .8rem 1rem; border-radius: 10px; }
    .search-trigger { min-width: 0; padding: .55rem; width: 44px; height: 44px; justify-content: center; }
    .search-trigger span, .search-trigger kbd { display: none; }
    .brand-sub { display: none; }
    .container { padding: 0 16px; }
    .journey, .card-grid { grid-template-columns: 1fr; }
    .section-head-row { flex-direction: column; align-items: flex-start; }
    .hero-search { padding-left: 16px; }
    .hero-search .btn { padding: .7rem 1rem; }
    .series-nav { grid-template-columns: 1fr; }
    .series-link.next { grid-column: auto; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .prose { font-size: 1.02rem; }
}

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

@media print {
    .site-header, .site-footer, .toc, .share, .series-nav, .reading-progress, .search-overlay { display: none !important; }
    .article-layout { display: block; }
    body { font-size: 12pt; }
}

/* ==========================================================================
   Member accounts, read tracking and cover photos
   ========================================================================== */

/* Header */
.signin-link { font-family: var(--font-head); font-weight: 600; font-size: .95rem; color: var(--ink); text-decoration: none; padding: .5rem .6rem; }
.signin-link:hover { color: var(--orange-600); }
.join-btn { padding: .55rem 1rem; }
.account-link {
    display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink);
    font-family: var(--font-head); font-weight: 600; font-size: .92rem;
    padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
    transition: border-color .15s ease;
}
.account-link:hover, .account-link.is-active { border-color: var(--orange-500); color: var(--ink); }
.avatar {
    width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--orange-500), var(--orange-600)); color: #fff; font-weight: 800; font-size: .9rem;
}
.nav-mobile-only { display: none; }

.badge { display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 800; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; padding: .2rem .5rem; border-radius: 999px; line-height: 1.2; }
.badge-new { background: var(--orange-500); color: #fff; }
.account-link .badge-new { min-width: 20px; padding: .2rem .4rem; }

/* Flash messages and alerts */
.flash-wrap { padding-top: 16px; }
.alert { position: relative; padding: .9rem 2.6rem .9rem 1.1rem; border-radius: var(--radius-sm); border: 1px solid; margin-bottom: 16px; font-size: .95rem; }
.alert-success { background: var(--green-100); border-color: #bfe6d2; color: #145c3c; }
.alert-error { background: #fde7e7; border-color: #f5c2c2; color: #9b2c2c; }
.alert-close { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: none; font-size: 1.3rem; line-height: 1; color: inherit; opacity: .6; cursor: pointer; }
.alert-close:hover { opacity: 1; }

/* Auth pages */
.auth-page { padding: clamp(40px, 6vw, 80px) 0; background: linear-gradient(180deg, var(--bg-soft), #fff 60%); }
.auth-grid { display: grid; grid-template-columns: 1fr 460px; gap: 64px; align-items: center; }
.auth-narrow { max-width: 480px; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); }
.auth-card h2, .auth-card .h2 { font-size: 1.6rem; }
.auth-intro h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.benefits { list-style: none; padding: 0; margin: 24px 0 0; }
.benefits li { position: relative; padding: 0 0 16px 40px; color: var(--muted); }
.benefits li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--orange-100); color: var(--orange-600); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: .85rem; }
.benefits strong { color: var(--ink); }
.auth-switch { text-align: center; margin: 20px 0 0; color: var(--muted); font-size: .95rem; }
.muted { color: var(--muted); }

.form .field { margin-bottom: 18px; }
.form label { display: block; font-weight: 600; font-size: .9rem; color: var(--ink); margin-bottom: 6px; }
.form input[type="text"], .form input[type="email"], .form input[type="password"] {
    width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
    border: 1px solid #cfd6e1; border-radius: 10px; padding: .75rem .9rem; transition: border-color .15s ease, box-shadow .15s ease;
}
.form input:focus { outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 4px rgba(31, 77, 138, .12); }
.form input:disabled { background: var(--bg-soft); color: var(--muted); }
.field-check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--text); font-size: .9rem; line-height: 1.5; }
.field-check input { margin-top: 4px; accent-color: var(--orange-500); width: 16px; height: 16px; flex-shrink: 0; }
.field-hint { font-size: .82rem; color: var(--muted); margin: 6px 0 0; }
.field-error { font-size: .85rem; color: #c0392b; margin: 6px 0 0; }
.has-error input { border-color: #e57373; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.label-row a { font-size: .85rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-danger:hover { background: #a53125; color: #fff; }

/* Read toggle */
.read-toggle-form { margin: 0; }
.read-toggle {
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap;
    font-family: var(--font-head); font-weight: 700; font-size: .82rem;
    padding: .5rem .9rem; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--navy-700);
    transition: all .15s ease;
}
.read-toggle:hover { border-color: var(--navy-700); }
.read-toggle .when-read { display: none; }
.read-toggle.is-read { background: var(--green-100); border-color: #9fd8bd; color: var(--green-600); }
.read-toggle.is-read .when-read { display: inline; }
.read-toggle.is-read .when-unread { display: none; }
.read-toggle-lg { font-size: .92rem; padding: .7rem 1.2rem; }
.read-toggle:disabled { opacity: .6; cursor: wait; }
.hero-read { margin-top: 1.4rem; }

.finish-box {
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
    margin-top: 40px; padding: 22px 24px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--line);
}
.finish-box strong { display: block; font-family: var(--font-head); color: var(--ink); }
.finish-box span { color: var(--muted); font-size: .92rem; }
.finish-box-cta { background: linear-gradient(135deg, var(--navy-800), var(--navy-700)); border: 0; }
.finish-box-cta strong { color: #fff; }
.finish-box-cta span { color: rgba(255, 255, 255, .75); }
.finish-actions { display: flex; gap: 10px; }
.finish-box-cta .btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }

/* Article hero with cover photo */
.article-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: center; }
.article-cover img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow-lg); transform: rotate(1.5deg); }

/* Card cover photos and status */
.card-cover.has-photo { height: 160px; }
.card-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-cover img { transform: scale(1.05); }
.card-cover.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 28, 54, 0) 40%, rgba(10, 28, 54, .7)); }
.card-cover.has-photo::before { display: none; }
.card-cover.has-photo .cover-icon, .card-cover.has-photo .cover-part { z-index: 1; }
.card-cover.has-photo .cover-icon { background: rgba(255, 255, 255, .22); backdrop-filter: blur(6px); }
.cover-status { position: absolute; top: 14px; right: 14px; z-index: 2; font-family: var(--font-head); font-weight: 800; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; padding: .3rem .65rem; border-radius: 999px; }
.status-read { background: #fff; color: var(--green-600); }
.status-new { background: var(--orange-500); color: #fff; box-shadow: 0 4px 12px rgba(240, 138, 36, .5); }
.card.is-read .card-title a { color: var(--muted); }

.figure-small { max-width: 360px; margin-left: auto; margin-right: auto; }
.figure-small img { border: 0; }

/* About page */
.about-photo { width: 100%; max-width: 340px; aspect-ratio: 480 / 511; object-fit: cover; border-radius: 24px; box-shadow: var(--shadow-lg); }
.profile-photo { width: 100%; border-radius: 16px; margin-bottom: 20px; aspect-ratio: 480 / 511; object-fit: cover; }
.profile-card .profile-logo { max-width: 160px; margin: 24px auto 0; background: var(--cream); border-radius: 12px; padding: 8px; }

/* Account / progress page */
.account-hero { padding-bottom: 40px; }
.account-hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
.account-hero .lead { margin-bottom: 1.4rem; }
.new-link { color: var(--orange-600); font-weight: 600; }
.done-msg { font-weight: 600; color: var(--green-600); }
.progress-ring { position: relative; width: 168px; height: 168px; }
.progress-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 12; }
.ring-fg { fill: none; stroke: var(--orange-500); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-label span { font-family: var(--font-head); font-weight: 800; font-size: 2.1rem; color: var(--navy-800); line-height: 1; }
.ring-label small { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin-top: 4px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; }
.stat-num { font-family: var(--font-head); font-weight: 800; font-size: 1.9rem; color: var(--navy-800); line-height: 1.1; }
.stat-label { font-size: .85rem; color: var(--muted); }
.stat-new .stat-num { color: var(--orange-600); }

.progress-group { margin-bottom: 32px; }
.progress-group-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.progress-group-head h2 { display: flex; align-items: center; gap: 12px; font-size: 1.2rem; margin: 0; }
.progress-group-head .cover-icon { width: 36px; height: 36px; padding: 8px; color: #fff; border-radius: 10px; }
.group-count { font-size: .85rem; color: var(--muted); font-weight: 600; }
.progress-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.progress-item { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--line); transition: background .15s ease; }
.progress-item:first-child { border-top: 0; }
.progress-item:hover { background: var(--bg-soft); }
.status-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cfd6e1; flex-shrink: 0; position: relative; transition: all .2s ease; }
.progress-item.is-read .status-dot { background: var(--green-600); border-color: var(--green-600); }
.progress-item.is-read .status-dot::after { content: "✓"; position: absolute; inset: 0; color: #fff; font-size: .75rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.progress-main { flex: 1; min-width: 0; }
.progress-title { display: block; font-family: var(--font-head); font-weight: 700; color: var(--ink); text-decoration: none; line-height: 1.35; }
.progress-title:hover { color: var(--orange-600); }
.progress-item.is-read .progress-title { color: var(--muted); }
.progress-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); margin-top: 2px; }

.settings { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.settings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.settings-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.settings-card h3 { font-size: 1.05rem; }
.danger-zone { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.danger-zone summary { cursor: pointer; color: #c0392b; font-weight: 600; font-size: .9rem; }
.danger-zone form { margin-top: 14px; }

@media (max-width: 960px) {
    .auth-grid { grid-template-columns: 1fr; gap: 32px; }
    .article-hero-grid { grid-template-columns: 1fr; }
    .article-cover { max-width: 300px; }
    .article-cover img { transform: none; }
    .settings-grid { grid-template-columns: 1fr; }
    .stat-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
    .signin-link, .join-btn, .account-label { display: none; }
    .account-link { padding: 4px; }
    .nav-mobile-only { display: block; }
    .account-hero-grid { grid-template-columns: 1fr; }
    .progress-ring { width: 130px; height: 130px; }
    .progress-item { flex-wrap: wrap; padding: 14px; }
    .progress-item .read-toggle-form { margin-left: 38px; }
    .auth-card { padding: 24px 20px; }
    .finish-box { flex-direction: column; align-items: flex-start; }
}

/* Prevent long content from widening grids on small screens */
.hero-grid > *, .account-hero-grid > *, .article-hero-grid > *, .auth-grid > * { min-width: 0; }
.account-hero .btn { white-space: normal; text-align: left; }
@media (max-width: 760px) {
    .progress-main { flex-basis: calc(100% - 40px); }
    .hero-search .btn { padding: .7rem .9rem; }
}

/* ---------- About the Author ---------- */
.author-hero {
    position: relative; overflow: hidden; color: rgba(255, 255, 255, .8);
    background: linear-gradient(160deg, var(--navy-800) 0%, var(--navy-900) 75%);
    padding: clamp(48px, 7vw, 96px) 0;
}
.author-hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(560px 380px at 80% 30%, rgba(240, 138, 36, .16), transparent 60%);
}
.author-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 56px; align-items: center; }
.author-hero h1 { color: #fff; margin-bottom: .3rem; }
.author-hero .eyebrow { color: var(--orange-500); }
.author-role { font-family: var(--font-head); font-weight: 600; color: var(--orange-500); font-size: 1.05rem; margin-bottom: 1.2rem; }
.author-hero .lead { color: rgba(255, 255, 255, .78); }
.breadcrumbs-light, .breadcrumbs-light a { color: rgba(255, 255, 255, .6); }
.breadcrumbs-light a:hover { color: #fff; }
.author-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 2rem 0 0; }
.author-stats div { padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.author-stats dt { font-family: var(--font-head); font-weight: 800; color: #fff; font-size: 1.15rem; line-height: 1.2; }
.author-stats dd { margin: 4px 0 0; font-size: .8rem; color: rgba(255, 255, 255, .65); line-height: 1.35; }
.author-portrait { position: relative; max-width: 400px; justify-self: center; width: 100%; }
.author-portrait img { position: relative; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 22px; box-shadow: var(--shadow-lg); }
.portrait-ring {
    position: absolute; width: 112%; aspect-ratio: 1; left: -6%; top: 8%; border-radius: 50%;
    border: 2px dashed rgba(240, 138, 36, .65); animation: spin 80s linear infinite;
}

.author-story { display: grid; grid-template-columns: 280px minmax(0, 720px); gap: 56px; justify-content: center; }
.story-head { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
.story-head h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }

.career-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.career-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.career-card h3 { display: flex; align-items: center; gap: 12px; font-size: 1.15rem; margin-bottom: 1.2rem; }
.career-card .cover-icon { width: 38px; height: 38px; padding: 9px; border-radius: 10px; color: #fff; flex-shrink: 0; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.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: 120px minmax(0, 1fr); gap: 12px; padding: 0 0 16px 26px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--orange-500); }
.timeline-years { font-family: var(--font-head); font-weight: 700; font-size: .85rem; color: var(--orange-600); padding-top: 1px; white-space: nowrap; }
.timeline-body { display: flex; flex-direction: column; line-height: 1.45; }
.timeline-body strong { color: var(--ink); font-size: .97rem; }
.timeline-body span { color: var(--muted); font-size: .9rem; }

.author-cta { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; align-items: center; max-width: 960px; }
.author-cta img { background: var(--cream); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); }

@media (max-width: 960px) {
    .author-hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .author-portrait { max-width: 320px; order: -1; }
    .author-stats { grid-template-columns: repeat(2, 1fr); }
    .author-story { grid-template-columns: 1fr; gap: 16px; }
    .story-head { position: static; }
    .career-grid { grid-template-columns: 1fr; }
    .author-cta { grid-template-columns: 1fr; gap: 28px; }
    .author-cta img { max-width: 220px; }
}
@media (max-width: 520px) {
    .timeline li { grid-template-columns: 1fr; gap: 2px; }
    .career-card { padding: 22px 18px; }
}

/* ---------- Admin ---------- */
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.admin-head .lead { margin-bottom: 0; }
.stat-row-5 { grid-template-columns: repeat(5, 1fr); }
.stat-sm { font-size: 1.25rem; }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 20px; }
.admin-toolbar input, .admin-toolbar select {
    font: inherit; font-size: .95rem; padding: .55rem .9rem; border: 1px solid #cfd6e1; border-radius: 999px; background: #fff; color: var(--ink);
}
.admin-toolbar input { flex: 1; min-width: 200px; max-width: 360px; }
.table-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.admin-table th { text-align: left; font-family: var(--font-head); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px 16px; background: var(--bg-soft); border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.admin-table tbody tr:first-child td { border-top: 0; }
.admin-table tbody tr:hover td { background: #fafbfd; }
.admin-table td a { text-decoration: none; color: var(--ink); font-weight: 600; }
.admin-table td a:hover { color: var(--orange-600); }
.member-cell { display: flex; align-items: center; gap: 12px; }
.member-cell strong { display: block; }
.member-cell small { display: block; color: var(--muted); font-weight: 400; }
.cell-actions { text-align: right; }
.mini-progress { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.mini-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.mini-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--orange-500), var(--orange-600)); border-radius: 999px; }
.mini-label { font-size: .82rem; color: var(--muted); white-space: nowrap; min-width: 52px; }
.status-chip { display: inline-block; font-size: .8rem; font-weight: 600; padding: .2rem .65rem; border-radius: 999px; background: var(--bg-soft); color: var(--muted); white-space: nowrap; }
.status-chip.is-read { background: var(--green-100); color: var(--green-600); }
.admin-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.admin-section { margin-top: 56px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 960px) { .stat-row-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
    .admin-table thead { display: none; }
    .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
    .admin-table tr { padding: 12px 16px; border-top: 1px solid var(--line); }
    .admin-table tbody tr:first-child { border-top: 0; }
    .admin-table td { border: 0; padding: 4px 0; }
    .admin-table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .8rem; }
    .cell-actions { text-align: left; }
}
@media (min-width: 961px) {
    .career-grid .career-card:nth-child(1) { grid-column: 1; grid-row: 1; }
    .career-grid .career-card:nth-child(2) { grid-column: 1; grid-row: 2; }
    .career-grid .career-card:nth-child(3) { grid-column: 2; grid-row: 1 / span 3; }
    .career-grid .career-card:nth-child(4) { grid-column: 1; grid-row: 3; }
}

/* ==========================================================================
   Pacer recruitment
   ========================================================================== */
.h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.h3 { font-size: 1.25rem; }
.mt { margin-top: 2rem; }
.req { color: #c0392b; font-weight: 700; }
.label { display: block; font-weight: 600; font-size: .9rem; color: var(--ink); margin-bottom: 6px; }
.link-btn { border: 0; background: none; color: var(--navy-600); font: inherit; font-size: .85rem; cursor: pointer; padding: 0; text-decoration: underline; }

/* Header bell */
.bell-link { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.bell-link:hover, .bell-link.is-active { border-color: var(--orange-500); color: var(--orange-600); }
.bell-link svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #e0452b; color: #fff; font-size: .68rem; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
@media (max-width: 1180px) { .search-trigger { min-width: 0; } .search-trigger span, .search-trigger kbd { display: none; } .search-trigger { width: 40px; height: 40px; padding: 0; justify-content: center; } }

/* Status chips */
.status-chip.status-submitted { background: var(--blue-100); color: var(--blue-600); }
.status-chip.status-in_review { background: #efe8fb; color: #6a3fb5; }
.status-chip.status-shortlisted { background: #fff4d6; color: #9a6a00; }
.status-chip.status-selected { background: var(--green-100); color: var(--green-600); }
.status-chip.status-backup { background: #e3f3f7; color: #1d7488; }
.status-chip.status-rejected { background: #f1f2f4; color: #6b7587; }
.status-chip.status-open { background: var(--green-100); color: var(--green-600); }
.status-chip.status-upcoming { background: #fff4d6; color: #9a6a00; }
.status-chip.status-closed { background: #f1f2f4; color: #6b7587; }
.margin-chip { display: inline-block; font-size: .78rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; white-space: nowrap; }
.margin-ok { background: var(--green-100); color: var(--green-600); }
.margin-below { background: var(--orange-100); color: #b65a0c; }
.margin-unverified { background: #f1f2f4; color: #6b7587; }
.role-badge { display: inline-block; font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: .15rem .45rem; border-radius: 6px; background: var(--navy-800); color: #fff; vertical-align: middle; }
.badge-draft { background: #fff4d6; color: #9a6a00; display: inline-block; margin-bottom: 10px; }

/* Home: recruiting band */
.recruit-band { background: var(--orange-100); border-bottom: 1px solid #f7cfa6; padding: 14px 0; }
.recruit-band .container { display: flex; flex-direction: column; gap: 8px; }
.recruit-band-item { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); flex-wrap: wrap; }
.recruit-band-item:hover { color: var(--ink); }
.recruit-band-item:hover .recruit-cta { transform: translateX(3px); }
.recruit-cta { margin-left: auto; font-family: var(--font-head); font-weight: 800; color: var(--orange-600); transition: transform .2s ease; }
.recruit-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; margin-top: 12px; border-radius: var(--radius); background: var(--orange-100); border: 1px solid #f7cfa6; }
.my-apps { margin-bottom: 36px; }
.my-apps .progress-group-head h2 { font-size: 1.2rem; margin: 0; }

/* Events */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.event-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.event-card-media { position: relative; display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--navy-700), var(--navy-900)); overflow: hidden; }
.event-card-media img { width: 100%; height: 100%; object-fit: cover; }
.event-card-media .window { position: absolute; top: 12px; left: 12px; }
.event-card h2.card-title { font-size: 1.2rem; }
.window { display: inline-block; font-family: var(--font-head); font-weight: 800; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; padding: .3rem .7rem; border-radius: 999px; }
.window-open { background: #22a06b; color: #fff; }
.window-upcoming { background: #f6c142; color: #4a3500; }
.window-closed { background: rgba(255, 255, 255, .85); color: #4b5563; }

.event-hero { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--navy-800), var(--navy-900)); color: rgba(255, 255, 255, .85); padding: 56px 0 48px; }
.event-hero.has-banner { padding-top: clamp(140px, 20vw, 260px); }
.event-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.event-hero.has-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 28, 54, .15) 0%, rgba(10, 28, 54, .9) 75%); }
.event-hero-inner { position: relative; z-index: 1; }
.event-hero h1 { color: #fff; margin-bottom: .6rem; }
.event-hero .eyebrow { color: var(--orange-500); }
.event-facts { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-weight: 600; }
.event-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
.event-aside { position: sticky; top: calc(var(--header-h) + 24px); }
.apply-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.apply-card h3 { margin: 0; }
.apply-dates { margin: 0 0 4px; }
.apply-dates div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.apply-dates dt { color: var(--muted); }
.apply-dates dd { margin: 0; font-weight: 600; color: var(--ink); text-align: right; }
.apply-note { color: var(--muted); margin: 0; }
.apply-status { margin: 0; }
.slot-groups { display: grid; gap: 20px; margin-top: 16px; }
.slot-group h3 { font-size: 1rem; margin-bottom: 10px; }
.slot-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.slot-list li { display: flex; flex-direction: column; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.slot-list strong { font-family: var(--font-head); font-size: 1.2rem; color: var(--navy-800); }
.slot-list span { font-size: .85rem; color: var(--muted); }
.slot-list small { font-size: .75rem; color: var(--orange-600); font-weight: 600; margin-top: 4px; }

/* Application form */
.apply-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
.apply-nav { position: sticky; top: calc(var(--header-h) + 24px); }
.apply-nav ol { list-style: none; margin: 0 0 12px; padding: 0; counter-reset: s -1; border-left: 2px solid var(--line); }
.apply-nav li { counter-increment: s; }
.apply-nav a { display: block; padding: 7px 14px; color: var(--muted); text-decoration: none; font-size: .92rem; margin-left: -2px; border-left: 2px solid transparent; }
.apply-nav a::before { content: counter(s) " · "; color: var(--orange-600); font-weight: 700; }
.apply-nav a:hover { color: var(--ink); border-left-color: var(--orange-500); }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin: 0 0 24px; min-width: 0; }
.form-card > legend, .form-card > h2 { float: left; width: 100%; padding: 0; margin: 0 0 18px; font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: var(--ink); display: flex; align-items: center; gap: 12px; }
.form-card > legend + * { clear: both; }
.form-card > legend small { font-family: var(--font-body); font-weight: 400; color: var(--muted); font-size: .9rem; }
.step-num { width: 32px; height: 32px; border-radius: 50%; background: var(--orange-500); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .95rem; flex-shrink: 0; }
.sub-head { font-size: 1.05rem; margin: 24px 0 14px; padding-top: 20px; border-top: 1px solid var(--line); clear: both; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; clear: both; }
.form-grid.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14px; }
.span-2 { grid-column: span 2; }
.span-4 { grid-column: 1 / -1; }
.form select, .form textarea, .form input[type="url"], .form input[type="tel"], .form input[type="date"], .form input[type="datetime-local"], .form input[type="number"], .form input.flatpickr-input, .add-slot input, .add-slot select {
    width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
    border: 1px solid #cfd6e1; border-radius: 10px; padding: .7rem .85rem;
}
.form textarea { resize: vertical; line-height: 1.55; }
.form select:focus, .form textarea:focus, .form input:focus { outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 4px rgba(31, 77, 138, .12); }
.form input:disabled { background: var(--bg-soft); }
.has-error select, .has-error textarea, .has-error input[type="url"], .has-error input[type="tel"] { border-color: #e57373; }
.input-group { display: flex; gap: 8px; }
.input-group select { width: 46%; flex-shrink: 0; }
.inline-check { display: flex !important; gap: 8px; align-items: center; font-weight: 400 !important; font-size: .9rem !important; margin: 8px 0 0; color: var(--text) !important; }
.inline-check input { accent-color: var(--orange-500); width: 16px; height: 16px; }
.notice { color: #b65a0c; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-pill { display: inline-flex !important; align-items: center; gap: 8px; padding: .5rem .9rem; border: 1px solid #cfd6e1; border-radius: 999px; cursor: pointer; font-weight: 500 !important; font-size: .92rem !important; margin: 0 !important; background: #fff; }
.radio-pill:has(input:checked) { border-color: var(--orange-500); background: var(--orange-100); }
.radio-pill input { accent-color: var(--orange-500); }
.field-inline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.field-inline label { margin: 0; }
.field-inline select { width: auto; min-width: 120px; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 8px; }
.sticky-actions { position: sticky; bottom: 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 30%); padding: 20px 0 16px; z-index: 5; }

.slot-picker-group { margin-bottom: 16px; }
.slot-picker-group h3 { font-size: .95rem; margin-bottom: 8px; color: var(--muted); }
.slot-options { display: flex; flex-wrap: wrap; gap: 10px; }
.slot-option { position: relative; cursor: pointer; margin: 0 !important; }
.slot-option input { position: absolute; opacity: 0; pointer-events: none; }
.slot-option span { display: flex; flex-direction: column; align-items: center; min-width: 92px; padding: 10px 14px; border: 1.5px solid #cfd6e1; border-radius: 12px; background: #fff; transition: all .15s ease; }
.slot-option strong { font-family: var(--font-head); font-size: 1.1rem; color: var(--navy-800); }
.slot-option small { font-size: .78rem; color: var(--muted); }
.slot-option input:checked + span { border-color: var(--orange-500); background: var(--orange-100); box-shadow: 0 0 0 3px rgba(240, 138, 36, .2); }
.slot-option input:focus-visible + span { outline: 3px solid var(--orange-500); outline-offset: 2px; }
.slot-picker.has-error .slot-option span { border-color: #e57373; }

.advice-card { display: flex; gap: 14px; align-items: flex-start; margin-top: 16px; padding: 16px 18px; border-radius: 14px; background: var(--blue-100); border: 1px solid #c9daf5; }
.advice-card p { margin: 4px 0 0; font-size: .93rem; }
.advice-icon { font-size: 1.3rem; line-height: 1.2; }

.history-block { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; padding: 0 18px; clear: both; }
.history-block > summary { cursor: pointer; padding: 14px 0; font-family: var(--font-head); font-weight: 700; color: var(--ink); }
.history-block[open] { padding-bottom: 18px; }
.repeater-row { border: 1px dashed #cfd6e1; border-radius: 12px; padding: 14px 16px 6px; margin: 12px 0; background: var(--bg-soft); }
.repeater-row.has-error { border-color: #e57373; background: #fff7f7; }
.row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: .9rem; }
.verify-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.verify-choice .label { margin: 0 6px 0 0; }
.file-current { font-size: .9rem; margin: 0 0 8px; }
.word-count.is-ok { color: var(--green-600); }
.word-count.is-bad { color: #c0392b; }
.consent label { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); }
.consent.has-error label { border-color: #e57373; background: #fff7f7; }
.guidelines { margin: 8px 0 4px; padding-left: 1.3em; }
.guidelines li { margin-bottom: 4px; }

/* Candidate status page */
.status-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.status-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow-sm); }
.status-card h2 { font-size: 1.5rem; }
.status-card-selected { border-top: 5px solid var(--green-600); }
.status-card-backup { border-top: 5px solid #1d7488; }
.status-steps { list-style: none; margin: 22px 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.status-steps li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.status-steps li::before { content: ""; position: absolute; top: 10px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.status-steps li:first-child::before { display: none; }
.status-steps li.is-done::before, .status-steps li.is-current::before { background: var(--orange-500); }
.step-dot { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--line); }
.status-steps li.is-done .step-dot { background: var(--orange-500); border-color: var(--orange-500); }
.status-steps li.is-current .step-dot { border-color: var(--orange-500); box-shadow: 0 0 0 5px rgba(240, 138, 36, .2); }
.status-steps li.is-current { color: var(--ink); font-weight: 700; }
.status-steps li.is-rejected .step-dot { border-color: #9aa3b2; background: #9aa3b2; box-shadow: none; }
.status-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.summary-details { margin-top: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 24px; }
.summary-details > summary { cursor: pointer; padding: 18px 0; font-family: var(--font-head); font-weight: 700; color: var(--ink); }
.summary-details[open] { padding-bottom: 24px; }

/* Application summary */
.summary-block { padding: 20px 0; border-top: 1px solid var(--line); }
.summary-block:first-child { border-top: 0; padding-top: 0; }
.summary-block h3 { font-size: 1.05rem; margin-bottom: 12px; }
.summary-block h4 { font-size: .95rem; margin: 14px 0 8px; }
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin: 0; }
.summary-grid dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.summary-grid dd { margin: 2px 0 0; color: var(--ink); overflow-wrap: anywhere; }
.answer { background: var(--bg-soft); border-radius: 10px; padding: 14px 16px; white-space: normal; }
.admin-table.compact td, .admin-table.compact th { padding: 8px 12px; }

/* Review */
.review-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.review-layout > div:first-child { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.review-aside { display: flex; flex-direction: column; gap: 16px; }
.score-card, .side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.side-card h3 { font-size: 1rem; }
.score-main { display: flex; align-items: baseline; gap: 10px; }
.score-main span { font-family: var(--font-head); font-weight: 800; font-size: 2.6rem; color: var(--navy-800); line-height: 1; }
.score-main small { color: var(--muted); }
.score-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 8px; }
.score-split div { background: var(--bg-soft); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; }
.score-split strong { font-family: var(--font-head); font-size: 1.3rem; color: var(--ink); }
.score-split small { font-size: .78rem; color: var(--muted); }
.score-parts { list-style: none; padding: 0; margin: 10px 0 0; font-size: .88rem; }
.score-parts li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.score-parts small { display: block; color: var(--muted); font-size: .78rem; }
.margin-line { font-size: .88rem; margin: 12px 0 4px; display: flex; flex-direction: column; gap: 6px; }
.margin-line .margin-chip { align-self: flex-start; }
.status-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.status-option { margin: 0 !important; cursor: pointer; }
.status-option input { position: absolute; opacity: 0; }
.status-option .status-chip { border: 2px solid transparent; padding: .3rem .7rem; }
.status-option input:checked + .status-chip { border-color: var(--ink); }
.status-option input:focus-visible + .status-chip { outline: 3px solid var(--orange-500); }
.score-picker { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-bottom: 14px; }
.score-picker label { margin: 0 !important; cursor: pointer; }
.score-picker input { position: absolute; opacity: 0; }
.score-picker span { display: flex; align-items: center; justify-content: center; height: 34px; border-radius: 8px; border: 1px solid #cfd6e1; font-weight: 700; font-size: .9rem; }
.score-picker input:checked + span { background: var(--orange-500); border-color: var(--orange-500); color: #fff; }
.score-picker input:focus-visible + span { outline: 3px solid var(--navy-600); }
.review-item { padding: 12px 0; border-top: 1px solid var(--line); }
.review-item:first-of-type { border-top: 0; }
.review-item p { margin: 6px 0; font-size: .92rem; }
.review-head { display: flex; justify-content: space-between; }
.review-score { font-family: var(--font-head); font-weight: 800; color: var(--orange-600); }
.log-list { list-style: none; margin: 0; padding: 0; }
.log-list li { padding: 6px 0; }
.composite { font-family: var(--font-head); font-size: 1.05rem; color: var(--navy-800); }
.capacity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 20px; }
.capacity-card { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-decoration: none; color: var(--text); font-size: .82rem; }
.capacity-card strong { font-family: var(--font-head); color: var(--ink); font-size: 1rem; }
.capacity-card:hover, .capacity-card.is-active { border-color: var(--orange-500); color: var(--text); }
.cap-line.is-full { color: var(--green-600); font-weight: 700; }
.event-review-list { display: grid; gap: 12px; margin-top: 16px; }
.event-review-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-decoration: none; color: var(--text); flex-wrap: wrap; }
.event-review-card:hover { border-color: var(--orange-500); color: var(--text); box-shadow: var(--shadow-sm); }
.event-review-card strong { display: block; font-family: var(--font-head); color: var(--ink); font-size: 1.1rem; }
.event-review-card small { color: var(--muted); }

/* Admin tabs and event editor */
.admin-tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-tabs a { padding: .5rem 1rem; border-radius: 999px; text-decoration: none; font-family: var(--font-head); font-weight: 600; font-size: .92rem; color: var(--ink); border: 1px solid var(--line); background: #fff; }
.admin-tabs a[aria-current="page"] { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.admin-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.event-form .form-card h2 { font-size: 1.2rem; margin-bottom: 14px; }
.banner-preview img { max-width: 420px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; margin-bottom: 8px; border: 1px solid var(--line); }
.publish-toggle { align-items: flex-start !important; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); margin-top: 26px !important; }
.publish-toggle input { margin-top: 3px; }
.slots-table td { padding: 8px 12px; }
.slots-table tr.is-disabled td { opacity: .5; }
.slots-table tr.is-disabled td:first-child { opacity: 1; }
.num-input { width: 72px !important; padding: .4rem .5rem !important; font-size: .9rem !important; }
.leader-select { min-width: 160px; font-size: .85rem !important; padding: .3rem !important; }
.add-slot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.add-slot select, .add-slot input { width: auto; padding: .5rem .7rem; }
.danger-form { margin-top: 24px; text-align: right; }
.role-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 24px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.role-card p { margin: 4px 0 0; }

/* Notifications */
.notification-list { display: flex; flex-direction: column; gap: 8px; }
.notification { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; font: inherit; color: var(--text); padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.notification:hover { border-color: var(--orange-500); }
.notification.is-unread { background: #fffaf3; border-color: #f7cfa6; }
.notification-dot { width: 10px; height: 10px; border-radius: 50%; background: transparent; flex-shrink: 0; }
.notification.is-unread .notification-dot { background: var(--orange-500); }
.notification-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.notification-body small { color: var(--muted); }

/* flatpickr theme tweaks */
.flatpickr-day.selected, .flatpickr-day.selected:hover { background: var(--orange-500); border-color: var(--orange-500); }

@media (max-width: 1080px) {
    .apply-layout { grid-template-columns: 1fr; }
    .apply-nav { display: none; }
    .review-layout, .status-layout, .event-layout { grid-template-columns: 1fr; }
    .event-aside { position: static; }
}
@media (max-width: 760px) {
    .form-card { padding: 20px 16px; }
    .form-grid, .form-grid.grid-4 { grid-template-columns: 1fr; }
    .span-2, .span-4 { grid-column: auto; }
    .summary-grid { grid-template-columns: 1fr; }
    .status-steps { font-size: .75rem; }
    .input-group { flex-direction: column; }
    .input-group select { width: 100%; }
    .bell-link { width: 40px; height: 40px; }
}

.add-slot input[type="text"] { width: 200px !important; }
.add-slot select { width: auto !important; }
.flatpickr-input[readonly] { background: #fff; cursor: pointer; }
@media (max-width: 420px) { .brand-name { font-size: 1rem; } .brand img { width: 46px; } .header-actions { gap: 6px; } }

/* ---------- RunAway.fit recommendation ---------- */
.section-tight-top { padding-top: 0; }
.runaway {
    display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: center;
    padding: clamp(28px, 4vw, 48px); border-radius: 24px; position: relative; overflow: hidden;
    background: linear-gradient(135deg, #fff7ee 0%, #fdeedd 55%, #fbe1c4 100%); border: 1px solid #f7cfa6;
}
.runaway::after {
    content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
    border: 2px dashed rgba(240, 138, 36, .35); pointer-events: none;
}
.runaway h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.runaway-copy p { color: var(--text); }
.runaway-copy a:not(.btn) { color: var(--orange-600); font-weight: 600; }
.runaway-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; position: relative; z-index: 1; }
.runaway-features li { display: flex; gap: 14px; align-items: flex-start; background: #fff; border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow-sm); }
.runaway-features strong { display: block; font-family: var(--font-head); color: var(--ink); margin-bottom: 2px; }
.runaway-features span:last-child { color: var(--muted); font-size: .95rem; line-height: 1.5; }
.runaway-icon { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; background: var(--orange-100); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.runaway-wrap { margin-top: 48px; }
.runaway-mini { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; padding: 16px 18px; border-radius: 16px; background: var(--orange-100); border: 1px solid #f7cfa6; color: var(--text); text-decoration: none; font-size: .92rem; line-height: 1.45; }
.runaway-mini:hover { border-color: var(--orange-500); color: var(--text); }
.runaway-mini strong { display: block; color: var(--ink); font-family: var(--font-head); }
.runaway-mini-icon { font-size: 1.3rem; }
@media (max-width: 860px) { .runaway { grid-template-columns: 1fr; gap: 24px; } }
.num-input.is-locked { background: var(--bg-soft) !important; color: var(--muted); }

/* ==========================================================================
   Leadership, informed status, team summary, profile photos
   ========================================================================== */
.block { display: block; }
.settings-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* Profile photos */
.photo { display: inline-flex; flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #e8ecf2; color: #9aa6b8; align-items: center; justify-content: center; overflow: hidden; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.photo-placeholder svg { width: 62%; height: 62%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.photo-sm { width: 36px; height: 36px; }
.photo-md { width: 64px; height: 64px; }
.photo-lg { width: 80px; height: 80px; }
.photo-xl { width: 104px; height: 104px; }
.photo-empty { border: 2px dashed #cfd6e1; box-shadow: none; background: #fff; font-size: 1.4rem; color: #b3bcc9; }
.avatar-upload { display: flex; align-items: center; gap: 16px; }
.candidate-head { display: flex; align-items: center; gap: 20px; }
.candidate-head .lead { margin-bottom: .3rem; }

/* Qualities */
.qualities { margin-top: 8px; }
.quality-field label { display: flex !important; align-items: center; gap: 8px; }
.quality-num { width: 24px; height: 24px; border-radius: 50%; background: var(--navy-800); color: #fff; font-size: .78rem; display: inline-flex; align-items: center; justify-content: center; }
.quality-list { margin: 0; padding-left: 1.3em; }
.quality-list li { background: var(--bg-soft); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; }

/* Informed status */
.inform-chip { display: inline-block; font-size: .76rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; background: #f1f2f4; color: #6b7587; white-space: nowrap; }
.inform-done { background: var(--green-100); color: var(--green-600); }
.inform-pending { background: #fff1d6; color: #9a5b00; }
.badge-pending { background: #fff1d6; color: #9a5b00; }
.inform-card.is-pending { border: 2px solid var(--orange-500); }
.inform-facts { margin: 12px 0 16px; }
.inform-facts div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.inform-facts dt { color: var(--muted); }
.inform-facts dd { margin: 0; text-align: right; }
.inform-ok { color: var(--green-600); font-weight: 600; margin: 0; }
.publish-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 20px; border-radius: 14px; background: #fff7e8; border: 1px solid #f7cfa6; }

/* Views and roles */
.view-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.view-tabs a { padding: .7rem 1.1rem; text-decoration: none; color: var(--muted); font-family: var(--font-head); font-weight: 700; font-size: .95rem; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.view-tabs a span { font-size: .75rem; background: var(--bg-soft); padding: 0 .45rem; border-radius: 999px; margin-left: 4px; }
.view-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--orange-500); }
.role-badge.role-lead { background: var(--orange-500); }
.row-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.copy-input { font: inherit; font-size: .78rem; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 8px; width: 220px; background: #fff; color: var(--muted); }
.alert .copy-input { width: 100%; margin-top: 8px; }
.invite-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.invite-form input[type="email"] { flex: 1; min-width: 220px; font: inherit; padding: .55rem .8rem; border: 1px solid #cfd6e1; border-radius: 10px; }
.invite-form select { font: inherit; padding: .55rem .8rem; border: 1px solid #cfd6e1; border-radius: 10px; }
.invite-banner { padding: 16px 18px; border-radius: 14px; background: var(--orange-100); border: 1px solid #f7cfa6; margin-bottom: 20px; }
.invite-banner strong:first-child { display: block; font-family: var(--font-head); }
.invite-list { display: grid; gap: 12px; margin-bottom: 32px; }
.invite-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 20px; border-radius: var(--radius); background: #fff7ee; border: 2px solid var(--orange-500); }
.invite-card .eyebrow { margin-bottom: 4px; }
.invite-card p.muted { margin: 4px 0 0; font-size: .88rem; }
.lead-events { margin: 6px 0 0; padding-left: 1.2em; }
.team-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .88rem; margin: 0 !important; font-weight: 500 !important; }
.switch input { width: 36px; height: 20px; appearance: none; -webkit-appearance: none; background: #cfd6e1; border-radius: 999px; position: relative; cursor: pointer; transition: background .2s ease; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s ease; }
.switch input:checked { background: var(--green-600); }
.switch input:checked::after { transform: translateX(16px); }
.vote-toggle { margin: 0; }

/* Team summary */
.summary-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.summary-toolbar p { margin: 0; }
.team-distance { margin-bottom: 36px; }
.team-distance > h2 { font-size: 1.35rem; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.team-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.team-slot { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; break-inside: avoid; }
.team-slot header { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.team-slot h3 { margin: 0 auto 0 0; font-size: 1.3rem; }
.team-slot h3 small { font-size: .8rem; color: var(--muted); font-family: var(--font-body); font-weight: 400; }
.team-slot .cap-line { font-size: .8rem; color: var(--muted); font-weight: 600; }
.team-group { padding-top: 10px; border-top: 1px dashed var(--line); margin-top: 10px; }
.team-group h4 { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 10px; }
.team-selected h4 { color: var(--green-600); }
.team-backup h4 { color: #1d7488; }
.team-shortlisted h4 { color: #9a6a00; }
.team-people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 12px; }
.team-people li a, .team-open { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; text-decoration: none; color: var(--ink); }
.team-people li a:hover .tp-name { color: var(--orange-600); }
.tp-name { font-size: .8rem; font-weight: 600; line-height: 1.25; }
.tp-meta { font-size: .72rem; color: var(--muted); }
.team-open .tp-name { color: #b3bcc9; font-weight: 500; }

@media (max-width: 1080px) { .team-layout { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .candidate-head { flex-direction: column; align-items: flex-start; } .team-slots { grid-template-columns: 1fr; } }
@media print {
    .view-tabs, .publish-bar, .summary-toolbar button, .admin-tabs, .admin-head-actions, .breadcrumbs { display: none !important; }
    .team-slot { box-shadow: none; }
}
