:root {
    --navy-950: #061225;
    --navy-900: #081a35;
    --navy-800: #0d274b;
    --navy-700: #173a67;
    --gold-600: #c87917;
    --gold-500: #e09a32;
    --gold-300: #f2c779;
    --cream-100: #fffaf0;
    --cream-50: #fffdf8;
    --white: #ffffff;
    --ink: #142033;
    --muted: #657084;
    --line: #e7e0d5;
    --success: #237a57;
    --warning: #a96810;
    --danger: #a93434;
    --shadow-sm: 0 8px 25px rgba(8, 26, 53, 0.08);
    --shadow-lg: 0 24px 70px rgba(6, 18, 37, 0.17);
    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --max-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--cream-50);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.skip-link {
    position: fixed;
    left: 1rem;
    top: -100px;
    z-index: 1000;
    padding: .7rem 1rem;
    color: var(--white);
    background: var(--navy-900);
    border-radius: 6px;
}

.skip-link:focus {
    top: 1rem;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: rgba(6, 18, 37, 0.96);
    border-bottom: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(calc(100% - 2rem), var(--max-width));
    min-height: 70px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* =========================================================
   SITE HEADER / BRAND
   ========================================================= */

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: auto;
    height: 52px;
    max-width: 245px;
    object-fit: contain;
}

/* =========================================================
   PRIMARY NAVIGATION
   ========================================================= */

.primary-nav {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.primary-nav a {
    padding: .6rem .85rem;
    color: rgba(255,255,255,.78);
    text-decoration: none;
    border-radius: 999px;
    font-size: .94rem;
}

.primary-nav a:hover,
.primary-nav a:focus,
.primary-nav a.active {
    color: var(--white);
    background: rgba(255,255,255,.08);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 10px;
}

.nav-toggle span:not(.sr-only) {
    display: block;
    height: 2px;
    margin: 4px 0;
    background: var(--white);
}

/* =========================================================
   HOMEPAGE HERO
   ========================================================= */

.hero {
    min-height: 540px;
    padding: 3.5rem max(1rem, calc((100vw - var(--max-width)) / 2)) 4.25rem;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
    position: relative;
    overflow: hidden;
    color: var(--white);
    background:
        radial-gradient(circle at 78% 18%, rgba(224,154,50,.18), transparent 28rem),
        linear-gradient(135deg, var(--navy-950), var(--navy-800));
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black, transparent 92%);
}

.hero-content,
.hero-card {
    position: relative;
    z-index: 2;
}

.eyebrow {
    margin: 0 0 .8rem;
    color: var(--gold-500);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 820px;
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3rem, 6vw, 5.8rem);
    font-weight: 500;
    line-height: .98;
    letter-spacing: -.045em;
}

.hero-copy {
    max-width: 720px;
    margin: 1.25rem 0 0;
    color: rgba(255,255,255,.75);
    font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.75rem;
}

.button {
    min-height: 48px;
    padding: .8rem 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 750;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.button:hover,
.button:focus {
    transform: translateY(-2px);
}

.button-primary {
    color: var(--navy-950);
    background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
    box-shadow: 0 12px 30px rgba(224,154,50,.22);
}

.button-secondary {
    color: var(--navy-900);
    background: var(--white);
    border-color: var(--line);
}

.hero .button-secondary {
    color: var(--white);
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.22);
}

.button-full {
    width: 100%;
}

.hero-trust-row {
    margin-top: 1.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: .8rem 1.4rem;
    color: rgba(255,255,255,.55);
    font-size: .85rem;
}

.hero-trust-row span::before {
    content: "•";
    margin-right: .55rem;
    color: var(--gold-500);
}

.hero-card {
    padding: 2rem;
    background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.055));
    border: 1px solid rgba(255,255,255,.16);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(14px);
}

.hero-card-top {
    display: flex;
    align-items: center;
    gap: .55rem;
    color: rgba(255,255,255,.65);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.status-dot {
    width: 9px;
    height: 9px;
    display: inline-block;
    background: #5ed09b;
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(94,208,155,.12);
}

.hero-card h2 {
    margin: 1.4rem 0 .7rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.1rem;
    font-weight: 500;
}

.hero-card p {
    color: rgba(255,255,255,.72);
}

.text-link {
    color: var(--gold-300);
    font-weight: 800;
    text-decoration: none;
}

/* =========================================================
   SHARED PAGE SECTIONS
   ========================================================= */

.section-shell,
/* =========================================================
   INTERIOR PAGES
   ========================================================= */

.page-shell {
    width: min(calc(100% - 2rem), var(--max-width));
    margin: 0 auto;
}

.section-shell {
    padding: 6rem 0;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 2.2rem;
}

.section-heading h2,
.mission-panel h2,
.panel h1,
.chat-intro h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -.025em;
}

.section-heading h2,
.mission-panel h2 {
    font-size: clamp(2.2rem, 4vw, 3.7rem);
}

.section-heading > p:last-child {
    color: var(--muted);
    font-size: 1.08rem;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
}

.module-card {
    min-height: 280px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.module-card-active {
    color: var(--white);
    background: linear-gradient(145deg, var(--navy-900), var(--navy-700));
    border-color: transparent;
}

.module-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    background: var(--cream-100);
    border-radius: 14px;
}

.module-card-active .module-icon {
    background: rgba(255,255,255,.12);
}

.module-status {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    padding: .28rem .55rem;
    color: var(--muted);
    background: #f0f2f5;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.module-status.live {
    color: #bff6d8;
    background: rgba(94,208,155,.13);
}

.module-card h3 {
    margin: 1.6rem 0 .55rem;
    font-size: 1.25rem;
}

.module-card p {
    margin: 0;
    color: var(--muted);
}

.module-card-active p {
    color: rgba(255,255,255,.72);
}

.module-card a {
    margin-top: auto;
    padding-top: 1rem;
    color: var(--gold-300);
    font-weight: 800;
    text-decoration: none;
}

.mission-section {
    padding: 1rem 1rem 6rem;
}

.mission-panel {
    width: min(100%, 1100px);
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 5rem);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.mission-copy {
    max-width: 780px;
    margin-top: 2rem;
    color: var(--muted);
    font-size: 1.08rem;
}

.mission-close {
    color: var(--navy-900);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.5rem;
    font-style: italic;
}

/* =========================================================
   SITE FOOTER
   ========================================================= */

.site-footer {
    color: rgba(255,255,255,.72);
    background: var(--navy-950);
}

.footer-inner {
    width: min(calc(100% - 2rem), var(--max-width));
    min-height: 220px;
    margin: 0 auto;
    padding: 3rem 0;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 2rem;
}

.footer-inner strong {
    color: var(--white);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.5rem;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: rgba(255,255,255,.75);
    text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: var(--gold-300);
}

.copyright {
    grid-column: 1 / -1;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,.1);
    font-size: .85rem;
}

.page-shell {
    padding: 4rem 0 6rem;
}

.panel {
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.centered-panel {
    max-width: 720px;
    margin: 2rem auto;
    text-align: center;
}

.centered-panel h1,
.error-panel h1 {
    font-size: clamp(2.3rem, 5vw, 4rem);
}

.centered-panel p,
.error-panel p {
    color: var(--muted);
}

.centered-panel .button {
    margin: .35rem;
}

/* =========================================================
   CHAT INTERFACE
   ========================================================= */

.chat-page {
    min-height: 760px;
}

.chat-intro {
    margin-bottom: 1.6rem;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
}

.chat-intro h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
}

.chat-intro p:last-child {
    max-width: 680px;
    color: var(--muted);
}

.chat-room-badge {
    padding: .6rem .85rem;
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    color: var(--navy-800);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    font-size: .84rem;
    font-weight: 750;
    white-space: nowrap;
}

.chat-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.3rem;
    align-items: start;
}

.chat-panel,
.side-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.chat-panel {
    overflow: hidden;
}

.chat-toolbar {
    min-height: 68px;
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--white);
    background: var(--navy-900);
}

.chat-toolbar > div {
    display: flex;
    flex-direction: column;
}

.chat-toolbar span {
    color: rgba(255,255,255,.62);
    font-size: .78rem;
}

.icon-button {
    width: 40px;
    height: 40px;
    color: var(--white);
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;
}

.chat-messages {
    height: 470px;
    padding: 1.2rem;
    overflow-y: auto;
    background:
        linear-gradient(rgba(255,255,255,.9), rgba(255,255,255,.9)),
        radial-gradient(circle at top right, var(--cream-100), transparent 40%);
}

.chat-empty {
    min-height: 100%;
    display: grid;
    place-content: center;
    gap: .3rem;
    color: var(--muted);
    text-align: center;
}

.chat-empty strong {
    color: var(--navy-900);
}

.chat-message {
    max-width: 86%;
    margin-bottom: 1.15rem;
    display: flex;
    gap: .75rem;
}

.message-avatar {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--white);
    background: linear-gradient(145deg, var(--navy-700), var(--navy-900));
    border-radius: 50%;
    font-weight: 800;
}

.message-body {
    min-width: 0;
}

.message-heading {
    display: flex;
    align-items: baseline;
    gap: .6rem;
}

.message-heading time {
    color: var(--muted);
    font-size: .75rem;
}

.message-body p {
    margin: .25rem 0 0;
    padding: .7rem .9rem;
    background: #f3f5f8;
    border-radius: 4px 14px 14px 14px;
    overflow-wrap: anywhere;
}

.chat-composer {
    padding: 1.2rem;
    border-top: 1px solid var(--line);
}

.composer-row + .composer-row {
    margin-top: .9rem;
}

.composer-row label {
    display: block;
    margin-bottom: .35rem;
    color: var(--navy-900);
    font-size: .82rem;
    font-weight: 800;
}

.composer-row input,
.composer-row textarea {
    width: 100%;
    padding: .8rem .9rem;
    color: var(--ink);
    background: var(--white);
    border: 1px solid #cfd5df;
    border-radius: var(--radius-sm);
    outline: none;
}

.composer-row input:focus,
.composer-row textarea:focus {
    border-color: var(--gold-500);
    box-shadow: 0 0 0 4px rgba(224,154,50,.12);
}

.composer-row textarea {
    resize: vertical;
    min-height: 90px;
}

.composer-meta,
.composer-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.composer-meta {
    margin-top: .3rem;
    color: var(--muted);
    font-size: .72rem;
}

.composer-actions {
    margin-top: 1rem;
    align-items: center;
}

.privacy-note {
    color: var(--muted);
    font-size: .76rem;
}

.form-feedback {
    min-height: 1.5rem;
    margin-top: .6rem;
    font-size: .82rem;
    font-weight: 700;
}

.form-feedback.success { color: var(--success); }
.form-feedback.warning { color: var(--warning); }
.form-feedback.error { color: var(--danger); }

.chat-sidebar {
    display: grid;
    gap: 1rem;
}

.side-card {
    padding: 1.3rem;
}

.side-card h2 {
    margin: 0;
    color: var(--navy-900);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
    line-height: 1.2;
}

.side-card p:not(.eyebrow) {
    color: var(--muted);
    font-size: .94rem;
}

.safety-card {
    border-left: 4px solid var(--gold-500);
}

/* =========================================================
   RESPONSIVE: TABLET AND BELOW
   ========================================================= */

@media (max-width: 940px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-top: 3rem;
        padding-bottom: 3.75rem;
    }

    .hero-card {
        max-width: 650px;
    }

    .module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .chat-layout {
        grid-template-columns: 1fr;
    }

    .chat-sidebar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* =========================================================
   RESPONSIVE: MOBILE
   ========================================================= */

@media (max-width: 760px) {
    .header-inner {
        min-height: 62px;
        gap: 1rem;
    }

    .brand-logo {
        height: 42px;
        max-width: 190px;
    }

    .brand-tagline {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .primary-nav {
        display: none;
        position: absolute;
        top: 62px;
        left: 1rem;
        right: 1rem;
        padding: .75rem;
        flex-direction: column;
        align-items: stretch;
        background: var(--navy-900);
        border: 1px solid rgba(255,255,255,.12);
        border-radius: var(--radius-sm);
        box-shadow: var(--shadow-lg);
    }

    .primary-nav.open {
        display: flex;
    }

    .primary-nav a {
        border-radius: 7px;
    }

    .hero {
        padding-top: 2.25rem;
        padding-bottom: 3rem;
    }

    .hero h1 {
        font-size: clamp(2.8rem, 14vw, 4.7rem);
    }

    .module-grid,
    .chat-sidebar {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-links {
        flex-wrap: wrap;
    }

    .chat-intro {
        align-items: start;
        flex-direction: column;
    }

    .chat-message {
        max-width: 96%;
    }

    .composer-actions,
    .composer-meta {
        align-items: stretch;
        flex-direction: column;
    }

    .composer-actions .button {
        width: 100%;
    }
}

/* =========================================================
   HOMEPAGE HERO — POLISHED LANDING EXPERIENCE
   ========================================================= */

.home-hero {
    position: relative;
    overflow: hidden;
    padding: 1.5rem 1rem 3.75rem;
    color: var(--ink);
    text-align: center;
    background:
        radial-gradient(
            circle at 50% 0,
            rgba(224, 154, 50, 0.12),
            transparent 30rem
        ),
        linear-gradient(
            180deg,
            var(--cream-50) 0%,
            var(--white) 100%
        );
    border-bottom: 1px solid var(--line);
}

.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.55;
    background-image:
        linear-gradient(
            rgba(8, 26, 53, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(8, 26, 53, 0.025) 1px,
            transparent 1px
        );
    background-size: 36px 36px;
    mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.home-hero-inner {
    position: relative;
    z-index: 1;
    width: min(100%, 900px);
    margin: 0 auto;
}

.hero-logo-wrap {
    margin: 0 auto 0.75rem;
}

.hero-logo {
    display: block;
    width: min(100%, 210px);
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 14px 24px rgba(8, 26, 53, 0.12));
}

.hero-content {
    width: min(100%, 780px);
    margin: 0 auto;
}

.hero-kicker {
    margin: 0 0 0.65rem;
    color: var(--gold-600);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.home-hero h1 {
    margin: 0;
    color: var(--navy-900);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.55rem, 6vw, 5rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.hero-introduction {
    width: min(100%, 680px);
    margin: 1.15rem auto 0;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.18rem);
    line-height: 1.7;
    text-wrap: balance;
}

.home-hero .hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
    margin-top: 1.65rem;
}

.home-hero .button {
    min-width: 205px;
}

.home-hero .button-primary {
    color: var(--navy-950);
    background: linear-gradient(
        135deg,
        var(--gold-300),
        var(--gold-500)
    );
    box-shadow: 0 12px 28px rgba(224, 154, 50, 0.2);
}

.home-hero .button-secondary {
    color: var(--navy-900);
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(8, 26, 53, 0.16);
}

.home-hero .button-secondary:hover,
.home-hero .button-secondary:focus {
    background: var(--white);
    border-color: rgba(200, 121, 23, 0.5);
}

.hero-values {
    margin-top: 1.65rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem 1.35rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 650;
}

.hero-values span::before {
    content: "◆";
    margin-right: 0.5rem;
    color: var(--gold-500);
    font-size: 0.52rem;
    vertical-align: middle;
}

/* Tablet adjustments */

@media (max-width: 940px) {
    .home-hero {
        padding-top: 1.25rem;
        padding-bottom: 3.25rem;
    }

    .hero-logo {
        width: min(100%, 190px);
    }
}

/* Phone adjustments */

@media (max-width: 760px) {
    .home-hero {
        padding: 0.85rem 1rem 2.75rem;
    }

    .hero-logo-wrap {
        margin-bottom: 0.55rem;
    }

    .hero-logo {
        width: min(100%, 160px);
    }

    .home-hero h1 {
        font-size: clamp(2.25rem, 12vw, 3.6rem);
        line-height: 1.02;
    }

    .hero-introduction {
        margin-top: 0.9rem;
        line-height: 1.6;
    }

    .home-hero .hero-actions {
        margin-top: 1.3rem;
    }

    .home-hero .button {
        width: 100%;
        max-width: 330px;
    }

    .hero-values {
        margin-top: 1.35rem;
        display: grid;
        gap: 0.4rem;
    }
}
/* =========================================================
   MEMBER ACCOUNT EXPERIENCE
   ========================================================= */

.account-page {
    min-height: 70vh;
}

.account-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 480px);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
}

.account-intro h1,
.welcome-panel h1 {
    margin: 0;
    color: var(--navy-900);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.6rem, 5vw, 4.7rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -.035em;
}

.account-lead,
.welcome-lead {
    max-width: 720px;
    color: var(--muted);
    font-size: 1.08rem;
}

.membership-benefits {
    margin-top: 2rem;
    padding: 1.4rem;
    background: var(--cream-100);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.membership-benefits h2,
.account-panel h2 {
    margin-top: 0;
    color: var(--navy-900);
    font-family: Georgia, "Times New Roman", serif;
}

.membership-benefits ul {
    margin-bottom: 0;
    padding-left: 1.25rem;
}

.account-panel {
    position: sticky;
    top: 95px;
}

.account-panel > p {
    color: var(--muted);
}

.field-group + .field-group {
    margin-top: 1rem;
}

.field-group label {
    display: block;
    margin-bottom: .35rem;
    color: var(--navy-900);
    font-size: .84rem;
    font-weight: 800;
}

.field-group input {
    width: 100%;
    padding: .82rem .9rem;
    color: var(--ink);
    background: var(--white);
    border: 1px solid #cfd5df;
    border-radius: var(--radius-sm);
    outline: none;
}

.field-group input:focus {
    border-color: var(--gold-500);
    box-shadow: 0 0 0 4px rgba(224,154,50,.12);
}

.field-group small {
    display: block;
    margin-top: .3rem;
    color: var(--muted);
}

.account-panel .button-full {
    margin-top: 1.25rem;
}

.account-alert {
    margin: 1rem 0;
    padding: .85rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

.account-alert.error {
    color: var(--danger);
    background: #fff0f0;
    border: 1px solid #f2caca;
}

.account-footnote {
    margin-bottom: 0;
    text-align: center;
}

.account-footnote a {
    color: var(--gold-600);
    font-weight: 800;
}

.welcome-panel {
    max-width: 850px;
    margin: 2rem auto;
    padding: clamp(2rem, 6vw, 4.5rem);
    text-align: center;
}

.welcome-note {
    margin: 2rem 0;
    padding: 1.2rem;
    display: grid;
    gap: .25rem;
    color: var(--navy-900);
    background: var(--cream-100);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.welcome-note span {
    color: var(--muted);
}

.welcome-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .8rem;
}

@media (max-width: 760px) {
    .account-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .account-panel {
        position: static;
    }

    .welcome-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .welcome-actions .button {
        width: 100%;
    }
}

/* =========================================================
   MEMBERSHIP GATEWAY
   ========================================================= */

.membership-page {
    min-height: 70vh;
}

.membership-hero {
    padding: 1rem 0 2rem;
}

.membership-hero h1 {
    max-width: 900px;
    margin: 0;
    color: var(--navy-900);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.8rem, 6vw, 5.2rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -.045em;
}

.membership-lead {
    max-width: 780px;
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: 1.1rem;
}

.membership-gateway {
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
}

.membership-choice {
    min-height: 300px;
    padding: 1.7rem;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.membership-choice-primary {
    color: var(--white);
    background: linear-gradient(145deg, var(--navy-900), var(--navy-700));
    border-color: transparent;
}

.membership-choice-label {
    margin: 0 0 1rem;
    color: var(--gold-600);
    font-size: .74rem;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.membership-choice-primary .membership-choice-label {
    color: var(--gold-300);
}

.membership-choice h2,
.membership-why h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
    line-height: 1.1;
}

.membership-choice h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.membership-choice p:not(.membership-choice-label) {
    color: var(--muted);
}

.membership-choice-primary p:not(.membership-choice-label) {
    color: rgba(255,255,255,.74);
}

.membership-choice .button {
    margin-top: auto;
    align-self: flex-start;
}

.membership-why {
    padding: clamp(1.7rem, 5vw, 3rem);
}

.membership-why h2 {
    max-width: 800px;
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.membership-benefit-grid {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.membership-benefit-grid article {
    padding: 1.2rem;
    background: var(--cream-100);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.membership-benefit-grid h3 {
    margin: 0 0 .45rem;
    color: var(--navy-900);
}

.membership-benefit-grid p {
    margin: 0;
    color: var(--muted);
}

@media (max-width: 760px) {
    .membership-gateway,
    .membership-benefit-grid {
        grid-template-columns: 1fr;
    }

    .membership-choice {
        min-height: auto;
    }

    .membership-choice .button {
        width: 100%;
    }
}

/* =========================================================
   CONVERSATIONS — GREGORY INTRODUCTION V1
   ========================================================= */

.conversations-intro p:last-child {
    max-width: 720px;
}

.gregory-presence {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(224, 154, 50, .38);
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(224, 154, 50, .13),
            transparent 13rem
        ),
        linear-gradient(145deg, var(--white), var(--cream-100));
}

.gregory-presence::after {
    content: "";
    position: absolute;
    inset: auto -2.5rem -3rem auto;
    width: 8rem;
    height: 8rem;
    pointer-events: none;
    border: 1px solid rgba(224, 154, 50, .18);
    border-radius: 50%;
}

.gregory-presence-top {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
}

.gregory-mark {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    color: var(--navy-950);
    background: linear-gradient(145deg, var(--gold-300), var(--gold-500));
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(200, 121, 23, .22);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
    font-weight: 700;
}

.gregory-status {
    margin: 0 0 .35rem;
    display: flex;
    align-items: center;
    gap: .45rem;
    color: var(--gold-600);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.gregory-status-dot {
    width: 8px;
    height: 8px;
    display: inline-block;
    background: #5ed09b;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(94, 208, 155, .13);
}

.gregory-presence h2 {
    font-size: 1.55rem;
}

.gregory-preview-note {
    margin: 1rem 0;
    padding: .85rem;
    display: grid;
    gap: .15rem;
    color: var(--navy-900);
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: .82rem;
}

.gregory-preview-note span {
    color: var(--muted);
}

.gregory-presence .button[disabled] {
    cursor: default;
    opacity: .78;
    transform: none;
}

/* Give posts more useful width, especially on phones. */

.chat-message {
    max-width: 94%;
}

@media (max-width: 760px) {
    .page-shell {
        width: min(calc(100% - 1rem), var(--max-width));
    }

    .chat-messages {
        padding: .7rem;
    }

    .chat-message {
        max-width: 100%;
        gap: .55rem;
    }

    .message-avatar {
        width: 34px;
        height: 34px;
    }

    .message-body p {
        padding: .65rem .75rem;
    }

    .chat-composer {
        padding: .9rem;
    }
}

/* =========================================================
   AUTHORITATIVE CONVERSATION ROLES — FINAL COLOR LANGUAGE
   ========================================================= */

.chat-message {
    width: min(100%, 780px);
    max-width: 96%;
}

.message-heading {
    flex-wrap: wrap;
}

.message-heading time {
    margin-left: auto;
}

.message-role-label {
    padding: .19rem .48rem;
    border-radius: 999px;
    font-size: .64rem;
    font-weight: 850;
    letter-spacing: .05em;
    text-transform: uppercase;
}

/* Conversation Starter — clear navy anchor */

.message-starter .message-avatar {
    background:
        linear-gradient(
            145deg,
            var(--navy-700),
            var(--navy-950)
        );
    box-shadow: 0 0 0 4px rgba(23, 58, 103, .12);
}

.message-starter .message-heading strong {
    color: var(--navy-800);
}

.message-starter .message-role-label {
    color: var(--white);
    background: var(--navy-700);
}

.message-starter .message-body p {
    color: var(--navy-950);
    background:
        linear-gradient(
            145deg,
            #e7eff8,
            #f0f5fa
        );
    border: 1px solid rgba(23, 58, 103, .22);
    border-left: 5px solid var(--navy-700);
    box-shadow: 0 8px 22px rgba(8, 26, 53, .06);
}

/* Community replies — related, calm, but visibly different */

.message-reply .message-avatar {
    color: var(--navy-900);
    background:
        linear-gradient(
            145deg,
            #f1e4cd,
            #e4d3b7
        );
}

.message-reply .message-body p {
    color: var(--ink);
    background: #fffaf2;
    border: 1px solid rgba(101, 112, 132, .13);
}

.message-reply:nth-of-type(even) .message-avatar {
    background:
        linear-gradient(
            145deg,
            #e2e9f0,
            #d3dde7
        );
}

.message-reply:nth-of-type(even) .message-body p {
    background: #eef3f7;
}

/* Gregory — permanent Truth Tellers identity */

.message-gregory {
    margin-top: 1.45rem;
    margin-bottom: 1.45rem;
}

.message-gregory .message-avatar {
    color: var(--navy-950);
    background:
        linear-gradient(
            145deg,
            var(--gold-300),
            var(--gold-500)
        );
    box-shadow:
        0 0 0 5px rgba(224, 154, 50, .13),
        0 12px 28px rgba(200, 121, 23, .18);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.08rem;
}

.message-gregory .message-heading strong {
    color: var(--gold-600);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.08rem;
}

.message-gregory .message-role-label {
    color: var(--navy-950);
    background:
        linear-gradient(
            135deg,
            var(--gold-300),
            var(--gold-500)
        );
}

.message-gregory .message-body p {
    color: var(--navy-950);
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(224, 154, 50, .14),
            transparent 13rem
        ),
        linear-gradient(
            145deg,
            #fffaf0,
            #fffdf8
        );
    border: 1px solid rgba(224, 154, 50, .42);
    border-left: 6px solid var(--gold-500);
    box-shadow: 0 12px 32px rgba(8, 26, 53, .08);
}

/* Future official roles have reserved hooks. */

.message-grace .message-body p {
    background: #f7f2fb;
    border: 1px solid #d9c9e6;
    border-left: 6px solid #87649f;
}

.message-moderator .message-body p {
    background: #eef6f2;
    border: 1px solid #bfd8cb;
    border-left: 6px solid var(--success);
}

@media (max-width: 760px) {
    .chat-message {
        width: 100%;
        max-width: 100%;
    }

    .message-heading {
        gap: .35rem .5rem;
    }

    .message-heading time {
        margin-left: 0;
    }

    .message-role-label {
        order: 3;
        width: fit-content;
    }
}


/* =========================================================
   PHASE 1 — HOME EXPERIENCE REFIT
   Tighten vertical rhythm without crowding the experience.
   ========================================================= */

/* Bring “The platform” closer to the hero values. */
.home-hero {
    padding-bottom: 2.35rem;
}

.section-shell {
    padding: 3.75rem 0;
}

.section-heading {
    margin-bottom: 1.5rem;
}

.section-heading > p:last-child {
    margin-bottom: 0;
}

/* Reduce unused height inside the Home module cards. */
.module-card {
    min-height: 235px;
    padding: 1.3rem;
}

.module-card h3 {
    margin-top: 1.25rem;
}

.module-card a {
    padding-top: .7rem;
}

/* Tighten the Mission section and its closing line. */
.mission-section {
    padding: .5rem 1rem 3.75rem;
}

.mission-panel {
    padding: clamp(1.8rem, 4vw, 3.5rem);
}

.mission-copy {
    margin-top: 1.35rem;
}

.mission-copy p {
    margin-top: 0;
    margin-bottom: .9rem;
}

.mission-copy .mission-close {
    margin-top: .45rem;
    margin-bottom: 0;
}

/* Compact footer and use dependable ASCII vertical separators. */
.footer-inner {
    min-height: 0;
    padding: 2.25rem 0 1.75rem;
    gap: 1.35rem 2rem;
}

.footer-links {
    align-items: center;
    gap: 0;
}

.footer-links a + a::before {
    content: "|";
    margin: 0 .7rem;
    color: rgba(255,255,255,.35);
}

.copyright {
    margin: 0;
    padding-top: 1rem;
}

@media (max-width: 940px) {
    .home-hero {
        padding-bottom: 2.15rem;
    }

    .section-shell {
        padding: 3.25rem 0;
    }
}

@media (max-width: 760px) {
    .home-hero {
        padding-bottom: 1.85rem;
    }

    .hero-values {
        margin-top: 1rem;
    }

    .section-shell {
        padding: 2.6rem 0;
    }

    .section-heading {
        margin-bottom: 1.15rem;
    }

    .module-card {
        min-height: 0;
        padding: 1.2rem;
    }

    .mission-section {
        padding: 0 .5rem 2.6rem;
    }

    .mission-panel {
        padding: 1.5rem 1.2rem;
    }

    .mission-copy {
        margin-top: 1rem;
    }

    .footer-inner {
        padding: 2rem 0 1.5rem;
        gap: 1rem;
    }

    .footer-links {
        gap: .45rem 0;
    }
}

/* =========================================================
   LET'S TALK MOBILE CONVERSATION WIDTH FIX — AUG. 11, 2026
   Keep Gregory and tag-along replies aligned with the
   original post instead of progressively narrowing on phones.
   ========================================================= */

@media (max-width: 760px) {
    /* Nested replies live inside the parent .message-body.
       Pull the reply branch back across the parent's avatar/gap
       so each reply gets the same useful horizontal starting point. */
    .message-replies {
        width: calc(100% + 34px + .55rem);
        max-width: none;
        margin: .8rem 0 0 calc(-34px - .55rem);
        padding: 0;
    }

    .message-replies .chat-message {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    /* Do not let nested Gregory/tag-along content inherit
       another artificial horizontal offset. */
    .message-replies .message-body {
        min-width: 0;
        flex: 1 1 auto;
    }

    /* Gregory's existing gold avatar/name already identify him.
       Hide any legacy duplicate role badge if an older cached
       chat.js still happens to render one during deployment. */
    .message-gregory .message-role-label,
    .message-utc {
        display: none !important;
    }
}

/* =========================================================
   LET'S TALK — FINAL LAUNCH LAYOUT PASS — AUG. 13, 2026
   Desktop orientation cards, full-width discussion, aligned
   direct replies, and bottom jump-to-top control.
   ========================================================= */

.conversations-page .conversation-orientation {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.conversations-page .conversation-orientation .side-card {
    min-width: 0;
}

.conversations-page .chat-layout.chat-layout-conversation-only {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
}

.conversations-page .chat-layout-conversation-only .chat-panel {
    width: 100%;
    max-width: none;
}

.conversations-page .message-replies {
    width: 100%;
    max-width: none;
    margin: .65rem 0 0;
    padding: 0;
    border-left: 0;
}

.conversations-page .message-replies .chat-message {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.discussion-jump-top {
    padding: .85rem 1.2rem 1.2rem;
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--line);
    background: var(--cream-50);
}

@media (max-width: 940px) {
    .conversations-page .conversation-orientation {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .conversations-page .conversation-orientation {
        grid-template-columns: 1fr;
    }

    .discussion-jump-top .button {
        width: 100%;
    }
}

