/* ==========================================================================
   Elizabeth A. Sawyers, OTR — public site styles (light & dark themes)
   Linked with ?v=<file time>, so browsers pick up every change immediately.
   ========================================================================== */

:root {
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --bg: #f4f8fc;
    --bg-alt: #eef4fa;
    --hero-grad: linear-gradient(160deg, #e3f1fa 0%, #e9f0fb 55%, #edeffb 100%);
    --surface: #ffffff;
    --surface-tint: #e9f8fb;
    --surface-tint-border: #bfe9f2;
    --icon-tile-bg: #d5f2f8;
    --border: #e2e8f0;

    --text: #0f172a;
    --text-2: #334155;
    --text-3: #64748b;

    --teal: #0891b2;
    --blue: #2563eb;
    --brand-grad: linear-gradient(90deg, #10b3c7 0%, #2563eb 100%);
    --cta-grad: linear-gradient(115deg, #14b8c9 0%, #3b5bf6 55%, #8b2ff0 100%);
    --icon-grad: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);

    --header-bg: rgba(255, 255, 255, 0.92);
    --nav-active-bg: #d8f4f9;
    --nav-active-text: #0f172a;
    --toggle-bg: #f1f5f9;

    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);

    color-scheme: light;
}

[data-theme="dark"] {
    --bg: #0a0e1c;
    --bg-alt: #0c1122;
    --hero-grad: linear-gradient(160deg, #0a0f20 0%, #0c1024 55%, #120f28 100%);
    --surface: #101830;
    --surface-tint: #0d1b2e;
    --surface-tint-border: #164e63;
    --icon-tile-bg: #123647;
    --border: #1e293f;

    --text: #f1f5f9;
    --text-2: #cbd5e1;
    --text-3: #94a3b8;

    --teal: #22d3ee;
    --blue: #60a5fa;

    --header-bg: rgba(10, 14, 28, 0.92);
    --nav-active-bg: #16213a;
    --nav-active-text: #f1f5f9;
    --toggle-bg: #16213a;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);

    color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 6px; }

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 300;
    background: var(--surface); color: var(--text); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-md);
}
.skip-link:focus { top: 12px; }

/* Theme-dependent visibility -------------------------------------------- */
.only-dark { display: none; }
[data-theme="dark"] .only-dark { display: block; }
[data-theme="dark"] .only-light { display: none; }

/* Admin bar (only visible when logged in) ------------------------------- */
.admin-bar {
    display: flex; gap: 18px; justify-content: center; align-items: center; flex-wrap: wrap;
    padding: 8px 16px; font-size: 0.88rem;
    background: #0f172a; color: #e2e8f0;
}
.admin-bar a { color: #67e8f9; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.admin-bar svg { width: 15px; height: 15px; }
.admin-bar-draft { background: #fef3c7; color: #78350f; }
.admin-bar-draft a { color: #92400e; text-decoration: underline; }

/* Header ----------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--text); min-width: 0; }
.brand-mark { height: 44px; width: 44px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.brand-text strong { font-size: 1.05rem; font-weight: 700; }
.brand-text small { font-size: 0.78rem; color: var(--text-3); }

.header-actions { display: flex; align-items: center; gap: 6px; }

.site-nav { display: flex; align-items: center; gap: 6px; }

.site-nav a {
    padding: 10px 18px;
    border-radius: 12px;
    color: var(--text-2);
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.site-nav a:hover { color: var(--text); background: var(--toggle-bg); }
.site-nav a.active { background: var(--nav-active-bg); color: var(--nav-active-text); font-weight: 600; }

.theme-toggle, .nav-toggle {
    margin-left: 8px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: var(--toggle-bg);
    color: var(--text-2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.theme-toggle:hover, .nav-toggle:hover { background: var(--nav-active-bg); }
.theme-toggle svg, .nav-toggle svg { width: 20px; height: 20px; }
.theme-toggle .only-light, .theme-toggle .only-dark { display: flex; }
[data-theme="light"] .theme-toggle .only-dark { display: none; }
[data-theme="dark"] .theme-toggle .only-light { display: none; }
[data-theme="dark"] .theme-toggle { color: #fbbf24; }

.nav-toggle { display: none; margin-left: 0; }
.nav-toggle .i-close { display: none; }
.nav-open .nav-toggle .i-open { display: none; }
.nav-open .nav-toggle .i-close { display: flex; }
.nav-toggle span { display: flex; }

/* Layout ----------------------------------------------------------------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container.w-medium { max-width: 880px; }
.container.w-narrow { max-width: 760px; }

.blk { padding: 24px 0; }
.blk.sp-tight { padding: 10px 0; }
.blk.sp-loose { padding: 64px 0; }
.page-blocks > .blk:first-child:not(.blk-hero) { padding-top: 72px; }
.page-blocks > .blk:last-child { padding-bottom: 88px; }
.page-blocks > .blk-hero + .blk { padding-top: 72px; }

.section-head { text-align: center; max-width: 760px; margin: 0 auto 16px; }
.section-head.align-left { text-align: left; margin-left: 0; }
.section-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.section-head p { margin-top: 16px; font-size: 1.15rem; color: var(--text-2); }

.blk-heading { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; }
h3.blk-heading { font-size: 1.3rem; }

/* Hero ------------------------------------------------------------------- */
.hero {
    background: var(--hero-grad);
    text-align: center;
    padding: 64px 0 96px;
}

.hero-logo { max-width: 860px; width: 90%; margin: 0 auto 48px; }

.hero h1 {
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.grad-text {
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lede {
    max-width: 780px;
    margin: 24px auto 40px;
    font-size: 1.25rem;
    color: var(--text-2);
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Buttons ---------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-primary { background: var(--brand-grad); color: #fff; }

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-light { background: #fff; color: #2563eb; }
.btn-light:hover { background: #f0f6ff; }

/* Rich text -------------------------------------------------------------- */
.prose { color: var(--text-2); font-size: 1.05rem; }
.prose > * + * { margin-top: 16px; }
.prose h2 { font-size: 1.5rem; font-weight: 800; color: var(--text); line-height: 1.3; margin-top: 32px; }
.prose h3 { font-size: 1.15rem; font-weight: 700; color: var(--text); line-height: 1.35; margin-top: 24px; }
.prose h3 + p, .prose h2 + p { margin-top: 6px; }
.prose > :first-child { margin-top: 0; }
.prose strong { color: var(--text); }
.prose a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--teal); }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; background: var(--toggle-bg); padding: 2px 6px; border-radius: 6px; }
.prose pre { background: var(--toggle-bg); padding: 16px; border-radius: 12px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose .ql-align-center { text-align: center; }
.prose .ql-align-right { text-align: right; }
.prose .ql-indent-1 { padding-left: 2em; }
.prose .ql-indent-2 { padding-left: 4em; }

blockquote {
    border-left: 4px solid var(--teal);
    padding: 6px 0 6px 24px;
    font-style: italic;
    font-size: 1.15rem;
    color: var(--text-2);
}

/* Feature cards ---------------------------------------------------------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.icon-tile {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--icon-grad);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.icon-tile svg { width: 26px; height: 26px; }

.feature-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; }
.feature-card p { color: var(--text-2); }

/* CTA banner ------------------------------------------------------------- */
.cta-banner {
    background: var(--cta-grad);
    border-radius: 24px;
    text-align: center;
    padding: 72px 32px;
    color: #fff;
}

.cta-banner h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; margin-bottom: 18px; line-height: 1.2; }

.cta-banner p {
    max-width: 640px;
    margin: 0 auto 32px;
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.92);
}

/* Topic cards ------------------------------------------------------------ */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.cat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.cat-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 14px;
}

.dot-list { list-style: none; }

.dot-list li {
    position: relative;
    padding: 5px 0 5px 22px;
    color: var(--text-2);
}

.dot-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--teal);
}

/* Service cards ---------------------------------------------------------- */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 32px;
}

.detail-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.detail-head { display: flex; align-items: flex-start; gap: 18px; }
.detail-head .icon-tile { width: 48px; height: 48px; margin-bottom: 0; border-radius: 12px; }
.detail-head .icon-tile svg { width: 24px; height: 24px; }
.detail-body { min-width: 0; }
.detail-body h3 { font-size: 1.35rem; font-weight: 700; line-height: 1.3; padding-top: 8px; margin-bottom: 8px; }
.detail-desc { color: var(--text-2); font-size: 1.05rem; margin-bottom: 18px; }
.detail-body h4 { font-size: 0.95rem; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.detail-body .dot-list li { font-size: 0.95rem; }

/* Panels & profile ------------------------------------------------------- */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 44px;
    box-shadow: var(--shadow-sm);
}

.panel-tint {
    background: var(--surface-tint);
    border-color: var(--surface-tint-border);
    box-shadow: none;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}
.panel-title h2 { font-size: 1.6rem; font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; }
.panel-title svg { width: 28px; height: 28px; color: var(--teal); flex-shrink: 0; }
.text-plain .panel-title h2 { font-size: 1.8rem; }

.profile-head { display: flex; align-items: center; gap: 22px; margin-bottom: 28px; }

.avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--icon-grad);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.avatar-photo { width: 96px; height: 96px; object-fit: cover; }

.profile-head h2 { font-size: 1.7rem; font-weight: 800; line-height: 1.25; }
.profile-head .role { color: var(--teal); font-weight: 600; }

.expertise-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px 32px;
}

.expertise-grid li { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 1.05rem; }
.expertise-grid svg { width: 20px; height: 20px; color: var(--teal); flex-shrink: 0; }

/* Info (contact) cards --------------------------------------------------- */
.contact-stack { display: grid; gap: 24px; }

.contact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px 36px;
    box-shadow: var(--shadow-sm);
}

.contact-title { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }

.contact-title .tile {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--icon-tile-bg);
    color: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-title .tile svg { width: 22px; height: 22px; }
.contact-title h3 { font-size: 1.3rem; font-weight: 700; }

.contact-card .prose > * + * { margin-top: 4px; }
.contact-card .prose strong { font-weight: 600; }
.contact-card .prose a { color: var(--text-2); text-decoration: none; }
.contact-card .prose a:hover { color: var(--teal); }
.contact-card hr { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
.contact-card .muted { color: var(--text-3); font-size: 0.92rem; margin-top: 6px; }

/* Quote ------------------------------------------------------------------ */
.quote-block blockquote { font-size: 1.35rem; line-height: 1.5; padding: 8px 0 8px 28px; }
.quote-block figcaption { margin-top: 12px; padding-left: 32px; color: var(--text-3); font-weight: 600; }

/* Image & embed ---------------------------------------------------------- */
.image-block { margin: 0 auto; }
.image-block img { border-radius: 16px; margin: 0 auto; }
.image-block.size-large { max-width: 80%; }
.image-block.size-medium { max-width: 60%; }
.image-block.size-small { max-width: 40%; }
.image-block figcaption, .embed-block figcaption { margin-top: 10px; text-align: center; color: var(--text-3); font-size: 0.92rem; }

.embed-ratio { position: relative; width: 100%; border-radius: 16px; overflow: hidden; background: var(--toggle-bg); }
.embed-ratio.r-16x9 { aspect-ratio: 16 / 9; }
.embed-ratio.r-4x3 { aspect-ratio: 4 / 3; }
.embed-ratio.r-1x1 { aspect-ratio: 1 / 1; }
.embed-ratio.r-9x16 { aspect-ratio: 9 / 16; max-width: 420px; margin: 0 auto; }
.embed-ratio > iframe, .embed-ratio > video, .embed-ratio > embed, .embed-ratio > object {
    position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0;
}
.embed-auto { width: 100%; }
.embed-auto iframe { max-width: 100%; border: 0; }

/* Divider ---------------------------------------------------------------- */
.divider { border: none; border-top: 1px solid var(--border); }
.divider.spacer-s { margin: 4px 0; }
.divider.spacer-m { margin: 20px 0; }
.divider.spacer-l { margin: 48px 0; }
.spacer.spacer-s { height: 12px; }
.spacer.spacer-m { height: 40px; }
.spacer.spacer-l { height: 96px; }

.feed-more { margin-top: 36px; }

/* Resources: toolbar ----------------------------------------------------- */
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 0.92rem; color: var(--text-3); margin-bottom: 18px; }
.crumbs a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-weight: 600; }
.crumbs a:hover { color: var(--teal); }
.crumbs svg { width: 16px; height: 16px; }
.resources-top .crumbs { justify-content: center; }

.res-toolbar { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: 28px; }

.res-search {
    position: relative;
    width: 100%;
    max-width: 520px;
    display: flex;
    align-items: center;
}
.res-search > svg { position: absolute; left: 16px; width: 20px; height: 20px; color: var(--text-3); pointer-events: none; }
.res-search input {
    width: 100%;
    padding: 14px 44px 14px 48px;
    font: inherit;
    font-size: 1rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}
.res-search input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 18%, transparent); }
.res-search input::-webkit-search-cancel-button { display: none; }
.res-search-clear { position: absolute; right: 12px; color: var(--text-3); display: flex; padding: 4px; }
.res-search-clear svg { width: 18px; height: 18px; }

.chip-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 0.92rem;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover { border-color: var(--teal); color: var(--text); }
.chip.active { background: var(--nav-active-bg); border-color: var(--surface-tint-border); color: var(--nav-active-text); }
.chip small { color: var(--text-3); font-weight: 500; }
.chip-tag { font-weight: 500; }

.res-count { color: var(--text-3); margin-bottom: 18px; text-align: center; }

/* Resources: cards ------------------------------------------------------- */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 28px;
}

.post-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.post-card-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--toggle-bg); }
.post-card-img > img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.post-card:hover .post-card-img > img { transform: scale(1.03); }
.post-card-ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: var(--cta-grad); }
.post-card-ph img { width: 30%; opacity: 0.9; }

.post-card-body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 24px; flex: 1; }
.post-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.85rem; color: var(--text-3); font-weight: 600; }
.post-meta a { color: var(--teal); }
.post-meta .dot { opacity: 0.6; }
.post-card h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.35; }
.post-card h3 a { color: var(--text); }
.post-card h3 a:hover { color: var(--teal); }
.post-card p { color: var(--text-2); font-size: 0.98rem; }
.read-more { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.95rem; }
.read-more svg { width: 16px; height: 16px; transition: transform 0.2s; }
.read-more:hover svg { transform: translateX(3px); }

.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-top: 44px; }
.pager-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 600; justify-self: start; }
.pager-btn:last-child { justify-self: end; }
.pager-btn svg { width: 16px; height: 16px; }
.pager-info { color: var(--text-3); font-size: 0.92rem; }

.tag-cloud { margin-top: 64px; padding-top: 36px; border-top: 1px solid var(--border); text-align: center; }
.tag-cloud h2 { display: inline-flex; align-items: center; gap: 10px; font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }
.tag-cloud h2 svg { width: 20px; height: 20px; color: var(--teal); }

.empty-state { text-align: center; padding: 56px 24px; background: var(--surface); border: 1px dashed var(--border); border-radius: 20px; }
.empty-state > svg { width: 44px; height: 44px; color: var(--teal); margin: 0 auto 12px; }
.empty-state h2 { font-size: 1.4rem; margin-bottom: 6px; }
.empty-state p { color: var(--text-2); margin-bottom: 20px; }

/* Article ---------------------------------------------------------------- */
.article-head { padding: 56px 0 28px; }
.article-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.article-cats .chip { padding: 5px 14px; font-size: 0.85rem; }
.article-head h1 { font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.article-lede { margin-top: 16px; font-size: 1.2rem; color: var(--text-2); }
.article-meta { display: flex; align-items: center; gap: 8px; margin-top: 20px; color: var(--text-3); font-weight: 600; font-size: 0.95rem; }
.article-meta svg { width: 18px; height: 18px; color: var(--teal); }
.badge-soft { padding: 2px 10px; border-radius: 999px; background: var(--nav-active-bg); color: var(--nav-active-text); font-size: 0.8rem; }

.article-hero { margin: 8px 0 12px; }
.article-hero img { width: 100%; border-radius: 20px; box-shadow: var(--shadow-md); }

.article-body { padding: 16px 0 8px; }
.article-body .blk { padding: 14px 0; }
.article-body .blk.sp-tight { padding: 6px 0; }
.article-body .blk.sp-loose { padding: 32px 0; }
.article-body .prose { font-size: 1.1rem; line-height: 1.75; }
.article-body .section-head { text-align: left; margin-left: 0; }
.article-body .image-block img { margin: 0 auto; }

.sources { margin-top: 40px; padding: 28px 32px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; }
.sources h2 { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 700; margin-bottom: 14px; }
.sources h2 svg { width: 22px; height: 22px; color: var(--teal); }
.sources ol { padding-left: 1.4em; color: var(--text-2); }
.sources li { padding: 6px 0; }
.sources li::marker { color: var(--teal); font-weight: 700; }
.sources .src-text { margin-right: 8px; }
.sources a { display: inline-flex; align-items: center; gap: 4px; word-break: break-word; font-weight: 600; }
.sources a svg { width: 14px; height: 14px; flex-shrink: 0; }

.article-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 28px; }
.article-tags > svg { width: 20px; height: 20px; color: var(--text-3); }

.related { background: var(--bg-alt); border-top: 1px solid var(--border); margin-top: 64px; }
.related + .site-footer, main > .related:last-child { margin-bottom: -40px; }

.notfound { margin-bottom: 32px; }

/* Footer ----------------------------------------------------------------- */
.site-footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 64px 0 0;
    margin-top: 40px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px;
}

.footer-col h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }
.footer-col p { color: var(--text-2); margin-bottom: 8px; }
.footer-muted { color: var(--text-3); font-size: 0.95rem; }

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

.footer-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    color: var(--text-2);
}

.footer-list a { color: var(--text-2); word-break: break-word; }
.footer-list a:hover { color: var(--teal); }

.footer-icon { width: 20px; height: 20px; color: var(--teal); flex-shrink: 0; margin-top: 3px; }

.footer-bottom {
    max-width: 1200px;
    margin: 48px auto 0;
    padding: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-3);
    font-size: 0.95rem;
}

/* Responsive ------------------------------------------------------------- */
@media (max-width: 900px) {
    .nav-toggle { display: flex; }
    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 12px 16px 18px;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        display: none;
    }
    .nav-open .site-nav { display: flex; }
    .site-nav a { padding: 12px 16px; }
}

@media (max-width: 760px) {
    .container { padding: 0 16px; }
    .header-inner { padding: 10px 16px; }
    .brand-mark { height: 38px; width: 38px; }
    .brand-text strong { font-size: 0.98rem; }
    .brand-text small { font-size: 0.72rem; }
    .blk.sp-loose { padding: 44px 0; }
    .page-blocks > .blk:first-child:not(.blk-hero), .page-blocks > .blk-hero + .blk { padding-top: 48px; }
    .page-blocks > .blk:last-child { padding-bottom: 56px; }
    .hero { padding: 40px 0 64px; }
    .hero-logo { margin-bottom: 32px; }
    .hero-lede { font-size: 1.1rem; }
    .panel, .cta-banner { padding: 28px 22px; }
    .contact-card, .detail-card { padding: 24px 22px; }
    .cta-banner { padding: 48px 22px; }
    .profile-head { flex-direction: column; align-items: flex-start; }
    .image-block.size-large, .image-block.size-medium { max-width: 100%; }
    .image-block.size-small { max-width: 70%; }
    .detail-head { flex-direction: column; gap: 14px; }
    .detail-body h3 { padding-top: 0; }
    .sources { padding: 22px 20px; }
    .pager { grid-template-columns: 1fr 1fr; }
    .pager-info { grid-column: 1 / -1; grid-row: 1; text-align: center; }
}

@media (max-width: 420px) {
    .brand-text small { display: none; }
    .theme-toggle { margin-left: 0; }
    .btn { padding: 13px 22px; }
}

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