/* ==========================================================================
   Elementary Tools — site pages (home, about, contact, legal, 404)
   The Deduction Board app itself uses /styles.css instead.
   ========================================================================== */

/* The hidden attribute must always win, even over display rules */
[hidden] { display: none !important; }


:root {
    --bg: #121212;
    --bg-raised: #1c1c1c;
    --bg-card: #202020;
    --border: #333;
    --text: #e0e0e0;
    --text-dim: #9a9a9a;
    --accent: #00c8ff;
    --accent-soft: rgba(0, 200, 255, 0.12);
}

/* Site-wide themes, mirroring the Deduction Board's board themes.
   Applied via data-theme on <html>, chosen from the nav picker and
   shared with the board through localStorage 'et-theme'. */
:root[data-theme="mind-space"] {
    --bg: #0a0e16;
    --bg-raised: #10161f;
    --bg-card: #121a24;
    --border: #27374a;
    --text: #e6edf3;
    --text-dim: #8aa0b0;
}
:root[data-theme="parchment"] {
    --bg: #f4ecd8;
    --bg-raised: #ece1c6;
    --bg-card: #fdf6e3;
    --border: #cbb98f;
    --text: #2b2013;
    --text-dim: #6b5b3e;
    --accent: #a33b20;
    --accent-soft: rgba(163, 59, 32, 0.12);
}
:root[data-theme="noir"] {
    --bg: #050505;
    --bg-raised: #0e0e0e;
    --bg-card: #141414;
    --border: #3a3a3a;
    --text: #f5f5f5;
    --text-dim: #9c9c9c;
    --accent: #ff4444;
    --accent-soft: rgba(255, 68, 68, 0.12);
}
:root[data-theme="corkboard"] {
    --bg: #6f5539;
    --bg-raised: #7b5f40;
    --bg-card: #866a4a;
    --border: #a68c65;
    --text: #f9f2e4;
    --text-dim: #e0d2b8;
    --accent: #ffd166;
    --accent-soft: rgba(255, 209, 102, 0.16);
}
:root[data-theme="scarlet"] {
    --bg: #16090b;
    --bg-raised: #1e0d10;
    --bg-card: #241014;
    --border: #4d2229;
    --text: #f2e6e0;
    --text-dim: #c2a49b;
    --accent: #d8ab3c;
    --accent-soft: rgba(216, 171, 60, 0.14);
}
:root[data-theme="blueprint"] {
    --bg: #0d2137;
    --bg-raised: #102942;
    --bg-card: #12304d;
    --border: #2b527a;
    --text: #eaf6ff;
    --text-dim: #9fbdd6;
    --accent: #7fd4ff;
    --accent-soft: rgba(127, 212, 255, 0.14);
}
:root[data-theme="gaslight"] {
    --bg: #141009;
    --bg-raised: #1b1509;
    --bg-card: #221a0f;
    --border: #4d3d1e;
    --text: #f4e8cf;
    --text-dim: #c9b790;
    --accent: #e8a02c;
    --accent-soft: rgba(232, 160, 44, 0.14);
}
/* Light-ish accents need dark ink on filled controls */
:root[data-theme="corkboard"] .site-nav .nav-cta,
:root[data-theme="corkboard"] .button-primary,
:root[data-theme="corkboard"] .grouping-btn.active,
:root[data-theme="corkboard"] .cipher-tab.active,
:root[data-theme="scarlet"] .site-nav .nav-cta,
:root[data-theme="scarlet"] .button-primary,
:root[data-theme="scarlet"] .grouping-btn.active,
:root[data-theme="scarlet"] .cipher-tab.active,
:root[data-theme="blueprint"] .site-nav .nav-cta,
:root[data-theme="blueprint"] .button-primary,
:root[data-theme="blueprint"] .grouping-btn.active,
:root[data-theme="blueprint"] .cipher-tab.active,
:root[data-theme="gaslight"] .site-nav .nav-cta,
:root[data-theme="gaslight"] .button-primary,
:root[data-theme="gaslight"] .grouping-btn.active,
:root[data-theme="gaslight"] .cipher-tab.active { color: #1a1206; }
:root[data-theme="parchment"] .site-nav .nav-cta,
:root[data-theme="parchment"] .button-primary,
:root[data-theme="parchment"] .grouping-btn.active,
:root[data-theme="parchment"] .cipher-tab.active { color: #fdf6e3; }
:root[data-theme="noir"] .site-nav .nav-cta,
:root[data-theme="noir"] .button-primary,
:root[data-theme="noir"] .grouping-btn.active,
:root[data-theme="noir"] .cipher-tab.active { color: #0a0a0a; }

#site-theme-picker {
    background: var(--bg-card);
    color: var(--text-dim);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.2rem 0.25rem;
    font-family: inherit;
    font-size: 0.75rem;
    max-width: 6.2rem;
    cursor: pointer;
}
#site-theme-picker:hover, #site-theme-picker:focus { border-color: var(--accent); outline: none; }

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.65;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

a { color: var(--accent); }
a:hover { text-decoration: none; }

h1, h2, h3 { line-height: 1.25; }

code {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.1em 0.4em;
    font-size: 0.9em;
}

/* Accessibility: skip link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--accent);
    color: #001018;
    padding: 0.5rem 1rem;
    z-index: 100;
    border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   Header: masthead (brand · epigraph · utilities) + sticky nav rail
   -------------------------------------------------------------------------- */
.site-header {
    background:
        radial-gradient(720px 150px at 10% -30%, var(--accent-soft), transparent 70%),
        radial-gradient(560px 130px at 90% -40%, var(--accent-soft), transparent 75%),
        var(--bg-raised);
    border-bottom: 1px solid var(--border);
}

.site-masthead {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0.9rem 1.25rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--text);
    flex: none;
}
.brand-mark {
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 0 12px var(--accent-soft));
}
.brand-text { line-height: 1.2; }
.brand-name {
    display: block;
    font-weight: bold;
    font-size: 1.32rem;
    letter-spacing: 0.3px;
}
.brand-name em { font-style: normal; color: var(--accent); }
.brand-text small {
    display: block;
    margin-top: 0.1rem;
    color: var(--text-dim);
    font-size: 0.68rem;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

/* The epigraph: one canon line a day, set like a chapter heading */
.masthead-quote {
    margin: 0 auto;
    min-width: 0;
    text-align: center;
    color: var(--text-dim);
    font-style: italic;
    font-size: 0.94rem;
    line-height: 1.4;
}
.masthead-quote .quote-orn {
    display: block;
    color: var(--accent);
    font-style: normal;
    font-size: 0.85rem;
    opacity: 0.85;
}
.masthead-quote cite {
    display: block;
    margin-top: 0.05rem;
    font-style: normal;
    font-size: 0.7rem;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    opacity: 0.75;
}

.masthead-utils {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: none;
}
.util-link {
    color: var(--text-dim);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.26rem 0.75rem;
    font-size: 0.8rem;
    transition: color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}
.util-link .util-heart { color: #ff6b6b; }
.util-link:hover { color: var(--text); border-color: var(--accent); }

/* Nav rail — stays with the reader while the masthead scrolls away */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}
.rail-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.rail-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: stretch;
    gap: 0.2rem;
    flex-wrap: wrap;
}
.rail-links a {
    display: block;
    padding: 0.72rem 0.7rem;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.95rem;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.rail-links a:hover { color: var(--text); border-bottom-color: var(--border); }
.rail-links a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: bold; }
:root[data-theme="corkboard"] .rail-links a[aria-current="page"] { color: #ffe1a3; }
.rail-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0;
}

.site-nav .nav-cta {
    color: #001018;
    background: var(--accent);
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    transition: filter 0.2s ease;
    white-space: nowrap;
}
.site-nav .nav-cta:hover { filter: brightness(1.15); color: #001018; }

.site-nav .nav-campaign {
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.site-nav .nav-campaign:hover { background: var(--accent-soft); }

/* --------------------------------------------------------------------------
   Lightbox (js/shared/lightbox.js) — click any [data-lightbox] image
   -------------------------------------------------------------------------- */
[data-lightbox] { cursor: zoom-in; }
body.lb-open { overflow: hidden; }
.et-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 2.4rem 1rem 1.6rem;
    background: rgba(4, 5, 8, 0.9);
    backdrop-filter: blur(6px);
}
.et-lightbox.open { display: flex; }
.lb-figure {
    margin: 0;
    max-width: min(1200px, 92vw);
    text-align: center;
}
.lb-img {
    max-width: 100%;
    max-height: 84vh;
    border-radius: 10px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
    background: #101010;
}
.lb-caption {
    margin-top: 0.7rem;
    color: #e8e2d5;
    font-style: italic;
    font-size: 0.95rem;
}
.lb-close, .lb-prev, .lb-next {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #f2ecdf;
    border-radius: 50%;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, border-color 0.15s ease;
    flex: none;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--accent);
}
.lb-close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
}
.lb-prev, .lb-next {
    width: 46px;
    height: 46px;
    font-size: 1.7rem;
    line-height: 1;
}
.lb-counter {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(242, 236, 223, 0.65);
    font-size: 0.8rem;
    letter-spacing: 1.5px;
}
@media (max-width: 640px) {
    .lb-prev, .lb-next {
        position: absolute;
        bottom: 42px;
        z-index: 2;
    }
    .lb-prev { left: 16px; }
    .lb-next { right: 16px; }
}

/* Corkboard's dim ink lands under 4.5:1 on the raised header bands —
   brighten the header's secondary text there (same convention as the
   tool chrome). */
:root[data-theme="corkboard"] .site-header,
:root[data-theme="corkboard"] .site-nav { --text-dim: #f3e9d2; }

@media (max-width: 960px) {
    .masthead-quote { display: none; }
}
@media (max-width: 640px) {
    .site-masthead { padding: 0.7rem 1rem 0.6rem; gap: 0.8rem; }
    .brand-mark { font-size: 1.6rem; }
    .brand-name { font-size: 1.12rem; }
    .brand-text small { display: none; }
    .util-link .util-label { display: none; }
    .rail-inner { padding: 0 0.6rem; gap: 0.5rem; }
    .rail-links a { padding: 0.6rem 0.5rem; font-size: 0.88rem; }
    .site-nav .nav-cta, .site-nav .nav-campaign { padding: 0.32rem 0.6rem; font-size: 0.88rem; }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.button-primary,
.button-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: bold;
    transition: transform 0.15s ease, filter 0.2s ease;
}

.button-primary {
    background: var(--accent);
    color: #001018;
    box-shadow: 0 4px 20px rgba(0, 200, 255, 0.25);
}
.button-primary:hover { filter: brightness(1.15); transform: translateY(-1px); }

.button-secondary {
    border: 1px solid var(--border);
    color: var(--text);
    background: var(--bg-raised);
}
.button-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
    max-width: 820px;
    margin: 0 auto;
    padding: 4.5rem 1.25rem 3rem;
    text-align: center;
}

.home-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    width: calc(100% - 2.5rem);
    max-width: 1180px;
    min-height: 560px;
    margin: 1.5rem auto 1rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 18px;
    text-align: left;
    background: #0b0c0d;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.home-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(5, 7, 8, 0.96) 0%, rgba(5, 7, 8, 0.82) 39%, rgba(5, 7, 8, 0.14) 68%, rgba(5, 7, 8, 0.08) 100%);
    pointer-events: none;
}

.home-hero-image {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.home-hero-content {
    width: min(54%, 38rem);
    padding: clamp(3rem, 6vw, 5.5rem) clamp(2rem, 5vw, 4.5rem);
}

.home-hero h1,
.home-hero .hero-lead strong { color: #f7f2e9; }
.home-hero .hero-lead,
.home-hero .hero-note { color: #c8c4bc; }
.home-hero .hero-actions { justify-content: flex-start; }
.home-hero .button-secondary {
    color: #f7f2e9;
    background: rgba(13, 15, 16, 0.72);
    border-color: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(6px);
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    color: var(--accent);
    margin: 0 0 1rem;
}

.hero h1 {
    font-size: clamp(2.1rem, 5.5vw, 3.4rem);
    margin: 0 0 1.25rem;
}

.hero-lead {
    font-size: 1.15rem;
    color: var(--text-dim);
    margin: 0 auto 2rem;
    max-width: 46rem;
}
.hero-lead strong { color: var(--text); }

.hero-actions {
    display: flex;
    gap: 0.9rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-note {
    margin-top: 1.1rem;
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section {
    max-width: 1060px;
    margin: 0 auto;
    padding: 2.75rem 1.25rem;
    border-top: 1px solid var(--border);
    width: 100%;
}

.section h2 {
    font-size: 1.7rem;
    margin: 0 0 1.5rem;
    text-align: center;
}

.home-section-visual {
    position: relative;
    overflow: hidden;
    margin: 0 0 1.4rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-raised);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.home-section-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: inherit;
    pointer-events: none;
}

.home-section-visual img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 1;
    object-fit: cover;
}

/* Steps */
.steps {
    list-style: none;
    counter-reset: step;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.steps li {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.4rem;
}

.step-number {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 50%;
    font-weight: bold;
}

.steps h3 { margin: 0.8rem 0 0.4rem; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--text-dim); font-size: 0.95rem; }

/* Feature grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.4rem;
    transition: border-color 0.25s ease, transform 0.15s ease;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.feature-icon { font-size: 1.8rem; }
.feature-card h3 { margin: 0.6rem 0 0.4rem; font-size: 1.1rem; }
.feature-card p { margin: 0; color: var(--text-dim); font-size: 0.95rem; }
.feature-card-link { display: block; text-decoration: none; color: var(--text); }
.home-cat {
    text-align: center;
    font-size: 1.05rem;
    color: var(--text-dim);
    letter-spacing: 0.5px;
    margin: 1.8rem 0 1rem;
}
.section-more { text-align: center; margin: 1.4rem 0 0; }
.section-more a { font-weight: bold; text-decoration: none; }
.section-more a:hover { text-decoration: underline; }

/* Privacy strip */
.section-privacy {
    text-align: center;
}
.section-privacy p {
    max-width: 46rem;
    margin: 0 auto;
    color: var(--text-dim);
}
.section-privacy strong { color: var(--text); }

/* FAQ */
.faq {
    max-width: 46rem;
    margin: 0 auto;
}
.faq-entry { margin-bottom: 1.4rem; }
.faq dt { font-weight: bold; font-size: 1.05rem; color: var(--text); }
.faq dd { margin: 0.4rem 0 0; color: var(--text-dim); }

/* Bottom CTA */
.section-cta { text-align: center; }
.section-cta h2 { margin-bottom: 0.4rem; }
.section-cta p { color: var(--text-dim); margin: 0 0 1.4rem; }

.section-cta-illustrated {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 330px;
    margin-bottom: 3rem;
    padding: 4.75rem 2rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: #0a1118;
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.24);
}

.section-cta-illustrated::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(7, 12, 17, 0.9) 0%, rgba(7, 12, 17, 0.74) 50%, rgba(7, 12, 17, 0.34) 100%);
}

.section-cta-image {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.section-cta-content {
    max-width: 34rem;
    padding: 1.5rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(8, 12, 16, 0.52);
    backdrop-filter: blur(7px);
}

.section-cta-illustrated h2 { color: #f7f2e9; }
.section-cta-illustrated p:not(.hero-eyebrow) { color: #d2d0cb; }

/* --------------------------------------------------------------------------
   Content pages (about, contact, legal, 404)
   -------------------------------------------------------------------------- */
.content-page {
    max-width: 46rem;
    margin: 0 auto;
    padding: 3rem 1.25rem 3.5rem;
    width: 100%;
}

.content-page h1 { font-size: 2.1rem; margin: 0 0 0.5rem; }
.content-page h2 { font-size: 1.35rem; margin: 2rem 0 0.6rem; color: var(--accent); }
.content-page .lead { font-size: 1.1rem; color: var(--text-dim); }
.content-page .lead strong, .content-page .lead a { color: var(--accent); }
.content-meta { color: var(--text-dim); font-size: 0.85rem; margin-top: 0; }
.content-page ul { padding-left: 1.3rem; }
.content-page li { margin-bottom: 0.4rem; }
.content-cta { margin-top: 2.5rem; text-align: center; }

/* 404 */
.page-404 { text-align: center; }
.glyph-404 { font-size: 4rem; margin: 0; }
.page-404 ul { list-style: none; padding: 0; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    background: var(--bg-raised);
}

.footer-inner {
    max-width: 1060px;
    margin: 0 auto;
    padding: 1.75rem 1.25rem;
    text-align: center;
}

.footer-brand { margin: 0 0 0.75rem; color: var(--text); }

.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    padding: 0;
    margin: 0 0 0.75rem;
    flex-wrap: wrap;
}
.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
}
.footer-links a:hover { color: var(--accent); }

.footer-copy { color: var(--text-dim); font-size: 0.8rem; margin: 0; }

/* --------------------------------------------------------------------------
   Responsive image-led layouts
   -------------------------------------------------------------------------- */
@media (max-width: 760px) {
    .home-hero {
        min-height: 0;
        display: flex;
        flex-direction: column;
        background: var(--bg-raised);
    }

    .home-hero::after { display: none; }

    .home-hero-image {
        position: relative;
        z-index: 0;
        aspect-ratio: 16 / 10;
        height: auto;
        object-position: 73% center;
    }

    .home-hero-content {
        width: 100%;
        padding: 2.25rem 1.35rem 2rem;
    }

    .home-hero h1,
    .home-hero .hero-lead strong { color: var(--text); }
    .home-hero .hero-lead,
    .home-hero .hero-note { color: var(--text-dim); }
    .home-hero .button-secondary {
        color: var(--text);
        background: var(--bg-card);
        border-color: var(--border);
    }

    .home-section-visual img {
        aspect-ratio: 16 / 8;
        object-position: center;
    }

    .section-cta-illustrated {
        width: calc(100% - 2.5rem);
        min-height: 430px;
        padding: 2rem 1rem;
    }

    .section-cta-image { object-position: 68% center; }
    .section-cta-content { padding: 1.35rem 1.1rem; }
}

/* ==============================================================
   Account, support, and admin pages
   ============================================================== */

.nav-account {
    font-size: 1.05rem;
    padding: 0.2rem 0.45rem !important;
    border: 1px solid var(--border, #333);
    border-radius: 50%;
    line-height: 1;
}

.account-card {
    background: var(--surface, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border, #333);
    border-radius: 14px;
    padding: 1.2rem 1.4rem;
    margin: 1.1rem 0;
}
.account-card h2 { margin-top: 0; font-size: 1.15rem; }
.account-note { color: var(--muted, #9a9a9a); font-size: 0.88rem; }
.account-list { line-height: 1.9; padding-left: 1.2rem; }

.account-profile { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.account-profile img { border-radius: 50%; border: 2px solid var(--accent, #00c8ff); }
.account-profile h2 { margin: 0; }
.account-profile .account-note { margin: 0.15rem 0; }

.tier-badge {
    margin-left: auto;
    background: rgba(150, 150, 150, 0.15);
    border: 1px solid var(--border, #444);
    color: var(--muted, #aaa);
    border-radius: 999px;
    padding: 0.3rem 0.9rem;
    font-size: 0.85rem;
    white-space: nowrap;
}
.tier-badge.supporter {
    background: rgba(255, 209, 102, 0.12);
    border-color: #ffd166;
    color: #ffd166;
}

.usage-meter { margin: 0.8rem 0; }
.usage-label { display: flex; justify-content: space-between; font-size: 0.88rem; margin-bottom: 0.3rem; }
.usage-track {
    height: 8px;
    background: rgba(128, 128, 128, 0.18);
    border-radius: 999px;
    overflow: hidden;
}
.usage-fill {
    height: 100%;
    width: 0;
    background: var(--accent, #00c8ff);
    border-radius: 999px;
    transition: width 0.4s ease;
}
.usage-fill.full { background: #ff6b6b; }

.account-btn {
    background: var(--accent, #00c8ff);
    color: #001018;
    border: none;
    border-radius: 9px;
    padding: 0.5rem 1.1rem;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: bold;
    cursor: pointer;
    transition: filter 0.2s ease;
}
.account-btn:hover { filter: brightness(1.12); }
.account-btn.secondary {
    background: transparent;
    color: var(--muted, #9a9a9a);
    border: 1px solid var(--border, #444);
    font-weight: normal;
}
.account-btn.secondary:hover { color: var(--accent, #00c8ff); border-color: var(--accent, #00c8ff); filter: none; }

/* Subscription plan cards */
.plan-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.9rem;
    margin: 1rem 0;
}
.plan-card {
    position: relative;
    border: 1px solid var(--border, #333);
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    background: var(--surface, rgba(255, 255, 255, 0.03));
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.plan-card.best { border-color: #ffd166; box-shadow: 0 0 22px rgba(255, 209, 102, 0.12); }
.plan-card h3 { margin: 0; font-size: 1.05rem; }
.plan-flag {
    position: absolute;
    top: -10px;
    right: 12px;
    background: #ffd166;
    color: #2b2013;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
}
.plan-price { font-size: 1.9rem; font-weight: bold; margin: 0.1rem 0; line-height: 1; }
.plan-price span { font-size: 0.82rem; font-weight: normal; color: var(--muted, #9a9a9a); }
.plan-buy, .plan-card .account-btn {
    margin-top: auto;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.donate-buttons { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.donate-btn {
    display: inline-block;
    border: 1px solid var(--border, #444);
    border-radius: 10px;
    padding: 0.55rem 1.2rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}
.donate-btn:hover { border-color: var(--accent, #00c8ff); color: var(--accent, #00c8ff); transform: translateY(-1px); }

.support-tiers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
    margin: 1.2rem 0;
}
.support-tier {
    border: 1px solid var(--border, #333);
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    background: var(--surface, rgba(255, 255, 255, 0.03));
}
.support-tier.featured {
    border-color: #ffd166;
    box-shadow: 0 0 24px rgba(255, 209, 102, 0.12);
}
.support-tier h3 { margin: 0 0 0.2rem; }
.tier-price { color: var(--muted, #9a9a9a); font-size: 0.85rem; margin: 0 0 0.6rem; }
.support-tier ul { margin: 0; padding-left: 1.15rem; line-height: 1.75; font-size: 0.92rem; }
.support-steps { line-height: 2; }

.admin-row { display: flex; gap: 0.8rem; align-items: flex-end; flex-wrap: wrap; }
.admin-row label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; }
.admin-row input {
    background: rgba(128, 128, 128, 0.08);
    border: 1px solid var(--border, #444);
    border-radius: 8px;
    padding: 0.45rem 0.6rem;
    color: inherit;
    font-family: inherit;
    width: 90px;
}
.admin-note-field { flex: 1; }
.admin-note-field input { width: 100%; min-width: 200px; }
#admin-password { width: 100%; max-width: 320px; }
.admin-output {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border, #333);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    font-size: 0.85rem;
    overflow-x: auto;
    white-space: pre;
}

/* ==============================================================
   Admin console
   ============================================================== */

.nav-admin {
    font-size: 1.05rem;
    padding: 0.2rem 0.45rem !important;
    border: 1px solid #ffd166;
    border-radius: 8px;
    line-height: 1;
}
.nav-account img { border-radius: 50%; display: block; }

.admin-console { max-width: 1080px; }
.admin-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.admin-head h1 { margin-bottom: 0.2rem; }

.admin-tabs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin: 1.2rem 0 1rem;
    border-bottom: 1px solid var(--border, #333);
    padding-bottom: 0.6rem;
}
.admin-tab {
    background: none;
    border: 1px solid transparent;
    color: var(--muted, #9a9a9a);
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.4rem 0.9rem;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.18s ease;
}
.admin-tab:hover { color: var(--accent, #00c8ff); }
.admin-tab.is-active {
    color: var(--accent, #00c8ff);
    border-color: var(--accent, #00c8ff);
    background: rgba(0, 200, 255, 0.08);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}
.stat-card {
    background: var(--surface, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border, #333);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.stat-icon { font-size: 1.1rem; }
.stat-value { font-size: 1.7rem; font-weight: bold; line-height: 1.1; }
.stat-label { color: var(--muted, #9a9a9a); font-size: 0.8rem; }

.split-bar {
    display: flex;
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(128, 128, 128, 0.15);
}
.split-in { background: var(--accent, #00c8ff); }
.split-anon { background: #6d7684; }
.split-empty { color: var(--muted, #9a9a9a); font-size: 0.85rem; padding-left: 0.5rem; }

.admin-table-wrap { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    min-width: 620px;
}
.admin-table th, .admin-table td {
    text-align: left;
    padding: 0.6rem 0.7rem;
    border-bottom: 1px solid var(--border, #2a2a2a);
    vertical-align: top;
}
.admin-table th {
    color: var(--muted, #9a9a9a);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.admin-table code { font-size: 0.9rem; letter-spacing: 0.5px; }
.admin-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.mini-badge {
    display: inline-block;
    background: rgba(128, 128, 128, 0.18);
    border-radius: 999px;
    padding: 0.1rem 0.55rem;
    font-size: 0.72rem;
    color: var(--muted, #aaa);
}
.mini-badge.supporter { background: rgba(255, 209, 102, 0.15); color: #ffd166; }
.mini-badge.admin { background: rgba(0, 200, 255, 0.15); color: #00c8ff; }

.mini-btn {
    background: transparent;
    border: 1px solid var(--border, #444);
    color: var(--muted, #aaa);
    border-radius: 7px;
    padding: 0.22rem 0.55rem;
    font-family: inherit;
    font-size: 0.76rem;
    cursor: pointer;
    transition: all 0.18s ease;
}
.mini-btn:hover { border-color: var(--accent, #00c8ff); color: var(--accent, #00c8ff); }
.mini-btn.warn:hover { border-color: #ff6b6b; color: #ff6b6b; }

.usage-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.35rem;
    height: 190px;
    padding-top: 0.5rem;
}
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.35rem; height: 100%; }
.chart-stack {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 2px;
    min-height: 0;
}
.chart-bar { width: 100%; border-radius: 4px 4px 0 0; min-height: 0; }
.chart-bar.calls { background: var(--accent, #00c8ff); }
.chart-bar.voice { background: #ffd166; }
.chart-label { color: var(--muted, #8c96a2); font-size: 0.68rem; white-space: nowrap; }
.chart-legend { color: var(--muted, #9a9a9a); font-size: 0.8rem; margin-top: 0.6rem; }
.legend-key {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin: 0 0.25rem 0 0.9rem;
}
.legend-key.calls { background: var(--accent, #00c8ff); }
.legend-key.voice { background: #ffd166; }

@media (max-width: 640px) {
    .stat-value { font-size: 1.4rem; }
    .usage-chart { height: 150px; }
    .chart-label { display: none; }
}

/* Upgrade offer on the account page */
.upgrade-card { border-color: rgba(255, 209, 102, 0.45); }
.upgrade-lead { font-size: 1.05rem; margin-top: 0.2rem; }

.upgrade-cta {
    text-decoration: none;
    white-space: nowrap;
    background: #ffd166;
    color: #2b2013;
}
.upgrade-cta:hover { filter: brightness(1.08); }

.benefit-list {
    list-style: none;
    margin: 1rem 0 1.2rem;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.75rem 1.4rem;
}
.benefit-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    line-height: 1.45;
}
.benefit-icon { font-size: 1.15rem; flex-shrink: 0; }
.benefit-list .account-note { display: inline-block; margin-top: 0.1rem; }

.plan-buy-soon { cursor: default; }
