/* ============================================================
   RIAGLO - Main Stylesheet
   Brand: Navy #073869 | Gold var(--gold) | Teal var(--teal)
   Fonts: Playfair Display (headings), Open Sans (body), PT Sans (buttons)
   ============================================================ */

/* === Design tokens (v2 — "go4" direction: navy/gold/cream, Fraunces) === */
:root {
    --navy: #0E1C2F; --navy-deep: #0A1525; --navy-mid: #16304f;
    --gold: #C9973A; --gold-dark: #9B7230; --gold-soft: #efe3c8;
    --teal: #5f9aa2; --teal-soft: #e6f1f2;
    --ink: #1C1610; --muted: #8A7A62; --line: #E4D9C8;
    --paper: #F6F1E9;   /* warm cream page ground */
    --card: #FEFCF8;    /* parchment card */
    --card-2: #F1EADE;  /* slightly recessed surface */
    --link: #9B7230;    /* readable gold link */
    --ok: #1e9e63; --danger: #c0392b;
    --radius: 12px; --radius-lg: 16px; --radius-pill: 999px;
    --shadow-sm: 0 1px 2px rgba(28,22,16,.04), 0 6px 18px rgba(28,22,16,.05);
    --shadow-md: 0 12px 34px rgba(28,22,16,.10);
    --serif: 'Fraunces', 'Playfair Display', Georgia, serif;
    --sans: 'Inter', system-ui, -apple-system, sans-serif;
    --mono: 'DM Mono', ui-monospace, 'SF Mono', monospace;
    color-scheme: light;
}
/* ---- Dark theme (go4's night mode) ---- */
:root[data-theme="dark"] {
    --navy: #0A1525; --navy-deep: #070F1C; --navy-mid: #16304f;
    --gold: #D0A24A; --gold-dark: #C9973A; --gold-soft: #241d0e;
    --ink: #EEE4D4; --muted: #9A8B72; --line: #24374F;
    --paper: #0E1C2F;   /* night ground */
    --card: #17273E;    /* elevated card */
    --card-2: #1E2E46;
    --link: #D0A24A;
    --teal-soft: #14283a;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.3);
    --shadow-md: 0 14px 40px rgba(0,0,0,.45);
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --navy: #0A1525; --navy-deep: #070F1C; --gold: #D0A24A; --gold-dark: #C9973A;
        --gold-soft: #241d0e; --ink: #EEE4D4; --muted: #9A8B72; --line: #24374F;
        --paper: #0E1C2F; --card: #17273E; --card-2: #1E2E46; --link: #D0A24A;
        --teal-soft: #14283a;
        --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.3);
        --shadow-md: 0 14px 40px rgba(0,0,0,.45); color-scheme: dark;
    }
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* visible keyboard focus everywhere (was missing) */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 3px; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--gold); }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

/* === Typography === */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--ink); text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: 2.5rem; margin-bottom: 1rem; letter-spacing: -.01em; }
h2 { font-size: 2rem; margin-bottom: 0.8rem; }
h3 { font-size: 1.4rem; margin-bottom: 0.6rem; }
p { margin-bottom: 1rem; }
.lead { font-size: 1.15rem; line-height: 1.7; }
.text-gold { color: var(--gold-dark); }
.text-white { color: #fff; }
.text-muted { color: var(--muted); }
.text-error { color: var(--danger); }
.text-center { text-align: center; }
/* Signature: small-caps gold eyebrow used to label sections meaningfully */
.eyebrow { font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-dark); font-weight: 500; }
blockquote {
    border-left: 3px solid var(--gold);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    background: var(--gold-soft);
    border-radius: 0 10px 10px 0;
    font-size: 1.1rem;
}
cite { display: block; margin-top: 0.5rem; font-style: normal; color: var(--muted); }

/* === Layout === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; }
.bg-white { background: var(--card); }
.bg-light { background: var(--paper); }
.bg-navy { background: var(--navy); }
.bg-transparent { background: transparent !important; border: none !important; box-shadow: none !important; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1.5rem; }
.mt-4 { margin-top: 3rem; }
.mb-2 { margin-bottom: 1.5rem; }

/* === Navigation === */
.navbar {
    background: var(--navy);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; }
.logo-text {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 2px;
}
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.nav-menu a {
    color: #fff;
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 4px;
    transition: background 0.2s;
}
.nav-menu a:hover { background: rgba(255,255,255,0.1); color: var(--gold); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: 0.3s; }
.caret { font-size: 0.7rem; }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--navy);
    border-radius: 4px;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 100;
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu li a { display: block; padding: 0.6rem 1rem; white-space: nowrap; }

/* Mobile nav */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--navy);
        padding: 1rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }
    .nav-menu.active { display: flex; }
    /* On touch, hover can't open submenus -- show them expanded when the menu
       is open (otherwise the grouped items are unreachable on mobile). */
    .nav-menu.active .dropdown-menu {
        display: block; position: static; box-shadow: none;
        padding-left: 1rem; min-width: 0; background: transparent;
    }
    .nav-menu.active .dropdown > a { opacity: .7; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; pointer-events: none; }
    .nav-menu.active .dropdown > a .caret { display: none; }
    .nav-menu.active .dropdown-menu li a { padding-left: 0; }
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 0.7rem 1.8rem;
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 100px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-gold { background: var(--gold); color: #073869; border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-dark); color: #073869; }
.btn-navy { background: var(--navy); color: #fff; border-color: #073869; }
.btn-navy:hover { background: #052d55; color: #fff; }
.btn-outline { background: transparent; color: var(--ink); border-color: #073869; }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-outline-white { background: transparent; color: #fff; border-color: #fff; }
.btn-outline-white:hover { background: #fff; color: #073869; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1rem; }
.btn-sm { padding: 0.4rem 1.2rem; font-size: 0.8rem; }

/* === Hero === */
.hero {
    background: linear-gradient(140deg, var(--navy-deep) 0%, var(--navy) 45%, var(--navy-mid) 100%);
    color: #fff;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}
/* a soft gold glow -- the summit light of the ascent */
.hero::after { content:""; position:absolute; right:-120px; top:-120px; width:380px; height:380px;
    border-radius:50%; background:radial-gradient(circle, rgba(207,159,52,.16), transparent 70%); pointer-events:none; }
.hero > * { position: relative; z-index: 1; }
/* Headings inside the navy hero must be white (global h1 colour is navy). */
.hero h1, .hero h2, .hero h3 { color: #fff; }
.hero .eyebrow { color: var(--gold); }
.hero p { color: rgba(255,255,255,0.85); }
/* Any dark/navy ground: headings white, body text light, gold accent stays.
   (Catches every bg-navy section heading, which otherwise inherits navy.) */
.bg-navy h1, .bg-navy h2, .bg-navy h3, .bg-navy h4,
.bg-navy .section-title, .bg-navy p, .bg-navy li, .bg-navy .lead { color: #fff; }
.bg-navy p, .bg-navy .lead, .bg-navy li { color: rgba(255,255,255,0.85); }
.bg-navy a { color: #fff; }
.bg-navy a:hover { color: var(--gold); }
/* gold accent words/eyebrows must survive the white heading rule (higher spec) */
.bg-navy .eyebrow, .bg-navy .text-gold, .hero .text-gold { color: var(--gold); }
/* a card explicitly marked navy must actually be navy (beats the base .card bg) */
.card.bg-navy { background: var(--navy); border-color: transparent; color: #fff; }
.card.bg-transparent .text-gold { color: var(--gold); }
.hero-sm { padding: 3rem 0; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hero-title { font-size: 3.5rem; color: #fff; }
.hero-subtitle { font-size: 1.3rem; color: var(--gold); margin-bottom: 1rem; }
.hero-desc { color: rgba(255,255,255,0.9); margin-bottom: 2rem; }
.hero-graphic { text-align: center; }
.bird-graphic { max-width: 300px; margin: 0 auto; }
@media (max-width: 768px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-title { font-size: 2.5rem; }
    .hero-image { display: none; }
}

/* === Section Titles === */
.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

/* === Cards === */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.three-col { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.card-link { text-decoration: none; color: inherit; display: block; }

/* === Steps === */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; text-align: center; }
.step-number {
    width: 50px; height: 50px; line-height: 50px;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    font-weight: 700;
    font-size: 1.3rem;
    margin: 0 auto 1rem;
}
.bg-navy .step p, .bg-navy .step h3 { color: #fff; }

/* === Testimonials === */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.testimonial { padding: 2rem; background: var(--card); border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.testimonial blockquote { border-left-color: var(--gold); }

/* === Stats === */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; }
.stat { text-align: center; padding: 1.5rem; }
.stat-number { display: block; font-size: 2.5rem; font-weight: 800; color: var(--gold); font-family: var(--serif); }

/* === Forms === */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.3rem; font-weight: 600; font-size: 0.9rem; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.input-field {
    display: block;
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--card);
    color: var(--ink);              /* was unset -> inherited light text in dark mode = invisible */
    font-family: var(--sans);
    transition: border-color 0.2s;
}
.input-field::placeholder { color: var(--muted); opacity: .85; }
.input-field:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(220,177,60,0.15); }
.input-field-sm { padding: 0.5rem 0.7rem; width: 80px; display: inline-block; text-align: center; }
textarea.input-field { resize: vertical; }

/* === Auth Card === */
.auth-card {
    max-width: 480px;
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--line);
    padding: 2.6rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}
.auth-card h1 { margin-top: .3rem; }
.auth-link { text-align: center; margin-top: 1.5rem; }

/* === Content Pages === */
.content-page { max-width: 800px; margin: 0 auto; }
.content-page h2 { margin-top: 2rem; }
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
@media (max-width: 768px) { .content-grid, .two-col, .contact-grid { grid-template-columns: 1fr; } }

/* Legal */
.legal-page h2 { font-size: 1.3rem; margin-top: 2rem; color: var(--ink); }
.highlight-box { background: var(--card-2); padding: 2rem; border-radius: 12px; margin-bottom: 2rem; }

/* === Accordion === */
.accordion-item { border-bottom: 1px solid var(--line); }
.accordion-header {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; padding: 1rem 0; background: none; border: none;
    font-size: 1rem; font-weight: 600; cursor: pointer; text-align: left;
    font-family: var(--sans); color: var(--ink);
}
.accordion-body { max-height: 0; overflow: hidden; transition: max-height 0.3s; padding: 0 0; }
.accordion-item.active .accordion-body { max-height: 500px; padding: 0 0 1rem; }
.accordion-item.active .accordion-icon { transform: rotate(45deg); }
.accordion-icon { transition: transform 0.3s; font-size: 1.3rem; }

/* === Dashboard Tools === */
.tool-card {
    background: var(--card);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Mood Grid */
.mood-grid { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin: 1.5rem 0; }
.mood-btn {
    font-size: 2rem;
    padding: 1rem;
    border: 2px solid var(--line);
    border-radius: 12px;
    background: var(--card);
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
}
.mood-btn:hover { border-color: var(--gold); transform: scale(1.05); }
.mood-btn.active { border-color: var(--gold); background: var(--gold-soft); }

/* Quote */
.quote-display { font-size: 1.3rem; min-height: 80px; }

/* === Budget Table === */
.budget-table-wrapper { overflow-x: auto; }
.budget-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.budget-table th, .budget-table td { padding: 0.6rem 0.8rem; text-align: right; border-bottom: 1px solid var(--line); }
.budget-table th { background: var(--navy); color: #fff; text-align: center; font-size: 0.85rem; }
.budget-table th:first-child, .budget-table td:first-child { text-align: left; }
.budget-table input { width: 80px; padding: 0.4rem; border: 1px solid var(--line); border-radius: 4px; text-align: right; }
.total-row td { font-weight: 700; }
.income-row td { color: #27ae60; }
.expense-row td { color: #c0392b; }

/* Chart */
.chart-container { max-width: 500px; margin: 0 auto; }
.chart-toggle { text-align: center; margin-bottom: 1rem; }

/* === Allocation Tool === */
.alloc-row {
    display: grid;
    grid-template-columns: 150px 80px 30px 100px;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--line);
}
.alloc-summary { font-size: 1.1rem; font-weight: 600; }

/* === Magic Budget === */
.magic-input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 768px) { .magic-input-grid { grid-template-columns: 1fr; } }

/* === Income Tool === */
.income-source-row { border-bottom: 1px solid var(--line); padding: 0.8rem 0; }
.income-total { font-size: 1.3rem; }

/* === Calculator === */
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 768px) { .tool-grid { grid-template-columns: 1fr; } }
.calc-result { background: var(--paper); padding: 1.5rem; border-radius: 8px; }

/* === Tips === */
.tips-container { text-align: center; }
.tip-progress { height: 6px; background: #eee; border-radius: 3px; overflow: hidden; margin-bottom: 1rem; }
.tip-progress-bar { height: 100%; background: var(--gold); transition: width 0.3s; }
.tip-card { padding: 1.5rem; min-height: 60px; font-size: 1.1rem; margin-bottom: 1rem; }

/* === Pricing === */
.pricing-highlight {
    background: linear-gradient(135deg, var(--card-2), var(--paper));
    padding: 3rem;
    border-radius: 20px;
    margin-bottom: 2rem;
}
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.pricing-card {
    background: var(--card);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    text-align: center;
    position: relative;
}
.pricing-card.featured { border: 2px solid var(--gold); }
.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: #fff;
    padding: 0.3rem 1rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}
.price { font-size: 2.5rem; font-weight: 800; color: var(--ink); margin: 1rem 0; font-family: var(--serif); }
.price span { font-size: 1rem; font-weight: 400; color: var(--muted); }
.pricing-card ul { text-align: left; margin: 1.5rem 0; }
.pricing-card li { padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.pricing-card li::before { content: "\2713 "; color: var(--gold); font-weight: 700; }

/* === Blog === */
.blog-card { overflow: hidden; padding: 0; }
.blog-card-img { height: 200px; background-size: cover; background-position: center; background-color: var(--paper); }
.blog-card-body { padding: 1.5rem; }

/* === Badges === */
.badge {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 100px;
    text-transform: uppercase;
    background: var(--card-2);
    color: var(--ink);
}
.badge-free { background: var(--card-2); color: var(--ink); }
.badge-standard { background: var(--gold); color: var(--ink); }
.badge-premium { background: var(--navy); color: #fff; }
.badge-beta { background: var(--teal); color: #fff; }
.badge-draft { background: var(--gold-soft); color: var(--gold-dark); }

/* === Newsletter === */
.newsletter-form { display: flex; gap: 0.5rem; justify-content: center; max-width: 500px; margin: 0 auto; }
.newsletter-form .input-field { flex: 1; }
@media (max-width: 768px) { .newsletter-form { flex-direction: column; } }

/* === Profile === */
.profile-info p { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }

/* === Submissions === */
.submission-item { padding: 1rem; border-bottom: 1px solid var(--line); }
.submission-header { display: flex; gap: 1rem; align-items: center; }

/* === Flash Messages === */
.flash-messages { position: fixed; top: 78px; right: 1.2rem; z-index: 1200; width: min(360px, calc(100vw - 2rem)); display: flex; flex-direction: column; gap: .5rem; }
.flash {
    padding: .85rem 1rem .85rem 1.1rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .8rem;
    box-shadow: var(--shadow-md);
    border-left: 4px solid currentColor;
    background: var(--card);
    animation: flash-in .3s cubic-bezier(.2,.9,.3,1.1);
}
@keyframes flash-in { from { transform: translateX(120%); opacity: 0; } to { transform: none; opacity: 1; } }
.flash {
    border-left-width: 5px;
    font-family: var(--sans);
    font-size: .92rem;
}
.flash > :first-child { color: var(--ink); font-weight: 500; }
/* On-brand parchment cards with a coloured accent, not a tinted framework toast.
   Success uses Riaglo gold (the brand mark), so a confirmation reads as Riaglo. */
.flash-success { color: var(--gold-dark); background: var(--card); }
.flash-error { color: var(--danger); background: var(--card); }
.flash-info { color: var(--navy-mid); background: var(--card); }
.flash-close { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--muted); line-height: 1; }
.flash-close:hover { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } }
@media (max-width: 560px) { .flash-messages { top: auto; bottom: 1rem; right: 1rem; left: 1rem; width: auto; } }

/* === Branded confirm modal (replaces the browser's grey confirm() box) === */
.riaglo-modal-open { overflow: hidden; }
.riaglo-modal-overlay {
    position: fixed; inset: 0; z-index: 3000;
    display: flex; align-items: center; justify-content: center; padding: 1.2rem;
    background: rgba(10, 21, 37, .55); backdrop-filter: blur(3px);
    animation: rm-fade .18s ease;
}
.riaglo-modal {
    background: var(--card); color: var(--ink);
    border: 1px solid var(--line); border-top: 4px solid var(--gold);
    border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.35);
    width: min(420px, 100%); padding: 1.5rem 1.5rem 1.3rem;
    animation: rm-pop .22s cubic-bezier(.2,.9,.3,1.1);
}
.riaglo-modal-title { font-family: var(--serif); font-size: 1.3rem; margin: 0 0 .5rem; color: var(--ink); }
.riaglo-modal-body { color: var(--muted); margin: 0 0 1.3rem; line-height: 1.6; }
.riaglo-modal-actions { display: flex; justify-content: flex-end; gap: .6rem; }
.riaglo-modal-danger { background: var(--danger); color: #fff; border: 1px solid var(--danger); }
.riaglo-modal-danger:hover { filter: brightness(.93); }
@keyframes rm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rm-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .riaglo-modal-overlay, .riaglo-modal { animation: none; } }

/* === Footer === */
.footer {
    background: var(--navy-deep);
    border-top: 2px solid var(--gold-dark);
    color: rgba(255,255,255,0.8);
    padding: 3rem 0 1.5rem;
}
.footer h3 { color: var(--gold); font-size: 1.1rem; margin-bottom: 1rem; }
.footer a { color: rgba(255,255,255,0.8); }
.footer a:hover { color: var(--gold); }
.footer ul li { padding: 0.3rem 0; }
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
}

/* Logo image in nav */
.nav-logo-img { height: 40px; margin-right: 0.5rem; vertical-align: middle; }
.nav-logo { display: flex; align-items: center; }

/* === Forum === */
.forum-categories { display: flex; flex-direction: column; gap: 1rem; }
.forum-cat-card {
    display: grid;
    grid-template-columns: 60px 1fr 150px;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--card);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}
.forum-cat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.forum-cat-icon { font-size: 2.5rem; text-align: center; }
.forum-cat-info h3 { margin-bottom: 0.3rem; }
.forum-cat-info p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.forum-cat-stats { display: flex; flex-direction: column; gap: 0.3rem; text-align: right; font-size: 0.85rem; color: var(--muted); }
@media (max-width: 768px) {
    .forum-cat-card { grid-template-columns: 40px 1fr; }
    .forum-cat-stats { display: none; }
}

.thread-list { display: flex; flex-direction: column; gap: 0.5rem; }
.thread-row {
    display: grid;
    grid-template-columns: 1fr 150px;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--card);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}
.thread-row:hover { background: var(--paper); }
.thread-info h3 { margin-bottom: 0.2rem; font-size: 1.1rem; }
.thread-stats { display: flex; flex-direction: column; text-align: right; font-size: 0.85rem; color: var(--muted); }

.forum-post {
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    background: var(--paper);
}
.forum-post.op { background: var(--card-2); border-left: 4px solid var(--gold); }
.post-meta { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.8rem; font-size: 0.9rem; flex-wrap: wrap; }
.post-body { line-height: 1.7; white-space: pre-wrap; }
.inline-form { display: inline; }
.btn-text { background: none; border: none; cursor: pointer; font-size: 0.85rem; padding: 0; text-decoration: underline; }
.reply-form { background: var(--paper); padding: 2rem; border-radius: 12px; }
.pagination { display: flex; gap: 1rem; align-items: center; justify-content: center; }

/* ---- Forum rich text + reactions (added 2026-07-18) ---- */
.post-body.rich { white-space: normal; }
.post-body.rich p { margin: 0 0 0.8rem; }
.post-body.rich p:last-child { margin-bottom: 0; }
.post-body.rich ul, .post-body.rich ol { margin: 0 0 0.8rem 1.4rem; }
.post-body.rich blockquote {
    margin: 0 0 0.8rem; padding: 0.5rem 1rem;
    border-left: 3px solid var(--gold); background: var(--gold-soft); color: var(--ink); border-radius: 0 6px 6px 0;
}
.post-body.rich pre {
    background: var(--navy); color: #F6F1E9; padding: 0.8rem 1rem; border-radius: 8px;
    overflow-x: auto; font-size: 0.9rem;
}
.post-body.rich code { background: rgba(7,56,105,0.08); padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.9em; }
.post-body.rich pre code { background: none; padding: 0; }
.post-body.rich a { color: var(--ink); text-decoration: underline; }
.post-body.rich a:hover { color: var(--gold); }

.reaction-bar { display: flex; gap: 0.4rem; margin-top: 0.9rem; flex-wrap: wrap; }
.reaction-btn {
    display: inline-flex; align-items: center; gap: 0.35rem;
    background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
    padding: 0.25rem 0.7rem; cursor: pointer; font-size: 0.95rem; line-height: 1;
    color: var(--muted); transition: background .15s, border-color .15s, transform .1s;
}
.reaction-btn:hover { border-color: var(--gold); transform: translateY(-1px); }
.reaction-btn.reacted { background: var(--gold-soft); border-color: var(--gold); color: var(--ink); font-weight: 600; }
.reaction-btn:disabled { opacity: 0.6; cursor: default; }
.reaction-emoji { font-size: 1.05rem; }
.reaction-count { font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.markdown-hint { font-size: 0.8rem; margin-top: 0.4rem; }

/* ---- Icon system + pillar accents (2026-07-18) ---- */
.ic { display: inline-block; vertical-align: middle; flex: 0 0 auto; }
.forum-cat-card { align-items: center; }
.forum-cat-icon {
    width: 58px; height: 58px; border-radius: 15px; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #073869, #0a4d8c); color: var(--gold);
    box-shadow: 0 6px 16px rgba(7,56,105,.18);
}
.cat-journey-junction .forum-cat-icon { background: linear-gradient(135deg, #0a5560, var(--teal)); color: #fff; }
.cat-money-talks     .forum-cat-icon { background: linear-gradient(135deg, #073869, #0a4d8c); color: var(--gold); }
.cat-qa              .forum-cat-icon { background: linear-gradient(135deg, var(--gold-dark), var(--gold)); color: #fff; }
.cat-fitlife         .forum-cat-icon { background: linear-gradient(135deg, #8a2b3a, #e07a86); color: #fff; }
.forum-cat-stats span { display: inline-flex; align-items: center; gap: .35rem; }
.forum-cat-stats .ic { color: var(--teal); }
/* reaction icons inherit button colour; keep count aligned */
.reaction-btn .ic { color: inherit; }

/* ---- Member profiles + directory (2026-07-18) ---- */
.visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
.container-narrow { max-width: 760px; }

.m-avatar { border-radius:50%; object-fit:cover; display:inline-flex; align-items:center;
    justify-content:center; background: var(--navy); color:var(--gold); font-weight:700;
    font-family: var(--serif); border:3px solid #fff; box-shadow:0 4px 14px rgba(7,56,105,.16); flex:0 0 auto; }
.m-avatar-initials { letter-spacing:.5px; }

.rank-badge { display:inline-flex; align-items:center; gap:.3rem; padding:.2rem .6rem;
    border-radius:999px; font-size:.8rem; font-weight:600; background: var(--navy); color:#fff; }
.rank-newcomer{background:var(--muted);} .rank-riser{background:#0a5560;}
.rank-contributor{background: var(--navy);} .rank-mentor{background:var(--gold-dark);}
.rank-trailblazer{background:#8a4b1f;} .rank-legend{background:linear-gradient(135deg,var(--gold),#a8801f);color:#2a1f05;}
.points-chip, .tier-chip, .pillar-chip { display:inline-flex; align-items:center; gap:.3rem;
    padding:.2rem .55rem; border-radius:999px; font-size:.78rem; background:var(--paper); color:var(--muted); border:1px solid var(--line); }
.tier-chip { background:var(--gold-soft); color:var(--gold-dark); border-color:var(--gold); font-weight:600; }
.pillar-growth{background:var(--teal-soft);color:#0a5560;border-color:var(--teal);}
.pillar-finance{background:var(--gold-soft);color:var(--gold-dark);border-color:var(--gold);}
.pillar-health{background:#fdecee;color:#8a2b3a;border-color:#e07a86;}

.profile-cover { height:150px; background:linear-gradient(135deg,#073869,#0a4d8c 60%,var(--teal));
    background-size:cover; background-position:center; }
.profile-section { padding-top:0; }
/* Only the avatar straddles the cover; the (taller) name column stays below it. */
.profile-head { display:flex; gap:1.5rem; align-items:flex-start; flex-wrap:wrap; margin-top:0; margin-bottom:1.5rem; padding-top:1rem; }
.profile-avatar-wrap { position:relative; margin-top:-72px; }
.avatar-upload { position:absolute; right:0; bottom:6px; margin:0; }
.avatar-upload-btn { display:flex; align-items:center; justify-content:center; width:36px; height:36px;
    border-radius:50%; background:var(--gold); color:#fff; cursor:pointer; border:2px solid #fff; box-shadow:0 3px 10px rgba(0,0,0,.18); }
.avatar-upload-btn:hover { background:var(--gold-dark); }
.profile-id { flex:1 1 260px; }
.profile-id h1 { margin:0 0 .35rem; }
.profile-badges { display:flex; gap:.4rem; flex-wrap:wrap; margin-bottom:.5rem; }
.profile-meta { display:flex; gap:1rem; flex-wrap:wrap; color:var(--muted); font-size:.9rem; margin:0 0 .5rem; }
.profile-meta span { display:inline-flex; align-items:center; gap:.35rem; }
.profile-pillars { display:flex; gap:.4rem; flex-wrap:wrap; }
.profile-actions { margin-left:auto; }

.profile-nudge { background:var(--gold-soft); border:1px solid var(--gold); border-radius:12px; padding:1rem 1.2rem; margin-bottom:1.5rem; }
.nudge-head { display:flex; justify-content:space-between; align-items:center; gap:1rem; flex-wrap:wrap; margin-bottom:.6rem; }
.nudge-head strong { display:inline-flex; align-items:center; gap:.4rem; }
.progress-track { height:8px; background:var(--line); border-radius:999px; overflow:hidden; }
.progress-fill { height:100%; background:linear-gradient(90deg,var(--gold),var(--teal)); border-radius:999px; transition:width .4s ease; }
.btn-xs { padding:.25rem .7rem; font-size:.8rem; }

.profile-stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); gap:1rem; margin-bottom:1.5rem; }
.pstat { background:var(--paper); border:1px solid var(--line); border-radius:12px; padding:1rem; text-align:center; }
.pstat-n { display:block; font-size:1.6rem; font-weight:800; color: var(--ink); font-family: var(--serif); font-variant-numeric:tabular-nums; }
.pstat-l { font-size:.8rem; color:var(--muted); }
.rank-progress { background:var(--paper); border-radius:12px; padding:1rem 1.2rem; margin-bottom:1.5rem; }
.rank-progress p { display:flex; align-items:center; gap:.4rem; flex-wrap:wrap; margin:0 0 .6rem; }

.profile-grid { display:grid; grid-template-columns:1fr 300px; gap:1.5rem; align-items:start; }
.profile-main { display:flex; flex-direction:column; gap:1.2rem; }
.profile-side { display:flex; flex-direction:column; gap:1.2rem; }
.card { background: var(--card); border:1px solid var(--line); border-radius:14px; padding:1.3rem;
    box-shadow:0 6px 22px rgba(7,56,105,.05); }
.card h3, .card h4 { display:flex; align-items:center; gap:.5rem; margin:0 0 .8rem; }
.rank-card { text-align:center; }
.rank-card-icon { width:60px; height:60px; margin:0 auto .7rem; border-radius:16px; display:flex;
    align-items:center; justify-content:center; background:linear-gradient(135deg,#073869,#0a4d8c); color:var(--gold); }
.plain-list { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:.6rem; }
.plain-list li { padding-bottom:.6rem; border-bottom:1px solid var(--line); }
.plain-list li:last-child { border-bottom:none; padding-bottom:0; }

.members-toolbar { display:flex; justify-content:space-between; gap:1rem; flex-wrap:wrap; margin-bottom:1rem; }
.member-search { display:flex; gap:.5rem; align-items:center; position:relative; flex:1 1 320px; }
.member-search .input-field { padding-left:2.3rem; margin:0; }
.search-icon { position:absolute; left:.7rem; color:var(--muted); display:flex; }
.sort-tabs { display:flex; gap:.4rem; flex-wrap:wrap; }
.sort-tab { padding:.4rem .9rem; border-radius:999px; font-size:.85rem; background:var(--paper); border:1px solid var(--line); color:var(--muted); }
.sort-tab.active { background: var(--navy); color:#fff; border-color:#073869; }
.member-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(215px,1fr)); gap:1.1rem; margin-top:1rem; }
.member-card { background: var(--card); border:1px solid var(--line); border-radius:14px; padding:1.3rem 1rem; text-align:center;
    display:flex; flex-direction:column; align-items:center; gap:.45rem; transition:transform .15s, box-shadow .15s; }
.member-card:hover { transform:translateY(-3px); box-shadow:0 10px 26px rgba(7,56,105,.1); border-color:var(--gold); }
.member-card h3 { margin:.4rem 0 0; font-size:1.05rem; }
.member-card p { margin:0; font-size:.85rem; }
.member-card p.small { font-size:.78rem; display:inline-flex; align-items:center; gap:.25rem; }
.member-card-badges, .member-card-pillars { display:flex; gap:.3rem; flex-wrap:wrap; justify-content:center; }
.member-card-stats { display:flex; gap:.8rem; margin-top:.4rem; color:var(--muted); font-size:.8rem; }
.member-card-stats span { display:inline-flex; align-items:center; gap:.25rem; }

.edit-photo-row { display:flex; gap:1.2rem; align-items:center; margin-bottom:1.2rem; flex-wrap:wrap; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
.form-label { display:block; font-weight:600; margin-bottom:.35rem; color: var(--ink); font-size:.9rem; }
.pillar-picker { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:.7rem; }
.pillar-option { display:flex; align-items:center; gap:.6rem; padding:.85rem 1rem; border:2px solid var(--line);
    border-radius:12px; cursor:pointer; background: var(--card); transition:border-color .15s, background .15s; }
.pillar-option:hover { border-color:var(--gold); }
.pillar-option.selected, .pillar-option:has(input:checked) { border-color:var(--gold); background:var(--gold-soft); font-weight:600; }
.pillar-option input { accent-color:var(--gold); }

@media (max-width: 820px) {
    .profile-grid { grid-template-columns:1fr; }
    .form-row { grid-template-columns:1fr; }
    .profile-actions { margin-left:0; width:100%; }
}

/* ---- Forum tags (2026-07-18) ---- */
.tag-row { display:flex; flex-wrap:wrap; gap:.4rem; margin:.6rem 0 1rem; }
.tag-chip { display:inline-flex; align-items:center; gap:.3rem; padding:.25rem .7rem;
    border-radius:999px; font-size:.82rem; background:var(--teal-soft); color:var(--ink);
    border:1px solid var(--teal); transition:background .15s, transform .1s; }
.tag-chip:hover { background:var(--teal); color:#fff; transform:translateY(-1px); }
.tag-chip.active { background: var(--navy); color:#fff; border-color:var(--navy); }
.tag-chip.tag-all { background:var(--gold-soft); border-color:var(--gold); color:var(--gold-dark); }
.tag-count { font-size:.72rem; opacity:.75; font-variant-numeric:tabular-nums; }
.tag-lg { font-size:.95rem; padding:.4rem 1rem; }
.tag-cloud { display:flex; flex-wrap:wrap; gap:.55rem; margin-top:1rem; }
.forum-tags-strip { margin-top:2rem; padding-top:1.5rem; border-top:1px solid var(--line); }
.forum-tags-strip h3 { display:flex; align-items:center; gap:.5rem; margin-bottom:.5rem; }
/* tag/search results list -- renamed from .thread-list/.thread-row to avoid
   colliding with the forum category card list above (was a live render bug). */
.ttl-list { list-style:none; padding:0; margin:1rem 0 0; }
.ttl-row { padding:1rem 0; border-bottom:1px solid var(--line); }
.thread-title { font-weight:600; font-size:1.05rem; }
.thread-meta { display:flex; gap:1rem; flex-wrap:wrap; font-size:.82rem; margin-top:.3rem; }
.thread-meta span { display:inline-flex; align-items:center; gap:.28rem; }

/* ---- Blog layout with sidebar + discussion (2026-07-18) ---- */
.blog-layout { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:2.5rem; align-items:start; }
.blog-article { min-width:0; max-width:none; }
.blog-header .badge { display:inline-block; margin-bottom:.6rem; }
.blog-header h1 { margin:.2rem 0 .6rem; }
.blog-byline { display:flex; gap:1.1rem; flex-wrap:wrap; font-size:.9rem; margin-bottom:1.2rem; }
.blog-byline span { display:inline-flex; align-items:center; gap:.35rem; }
.blog-hero { margin:0 0 1.6rem; border-radius:14px; overflow:hidden; box-shadow:0 10px 30px rgba(7,56,105,.12); }
.blog-hero img { width:100%; height:auto; display:block; }
/* keep body text at a readable measure even in the wider column */
.blog-content { max-width:70ch; font-size:1.05rem; line-height:1.75; }
.blog-content img { border-radius:10px; margin:1.2rem 0; }
.blog-content h2 { margin-top:2rem; }

/* Tables in imported blog HTML (and rich forum posts) had no spacing — give them
   a clean, well-padded brand look with a navy header and zebra rows. Wide tables
   scroll inside themselves on small screens instead of blowing out the page. */
.blog-content table, .post-body.rich table, .rich table {
    width:100%; border-collapse:collapse; margin:1.6rem 0;
    font-size:.95rem; background:var(--card);
    border:1px solid var(--line); border-radius:10px; overflow:hidden;
    display:block; overflow-x:auto;   /* horizontal scroll if it can't fit */
}
.blog-content thead, .post-body.rich thead, .rich thead { background:var(--navy); }
.blog-content th, .post-body.rich th, .rich th {
    background:var(--navy); color:#fff; text-align:left; font-weight:600;
    padding:.7rem .95rem; border-bottom:1px solid var(--line); white-space:nowrap;
}
.blog-content td, .post-body.rich td, .rich td {
    padding:.65rem .95rem; border-bottom:1px solid var(--line); vertical-align:top;
}
.blog-content tbody tr:nth-child(even),
.post-body.rich tbody tr:nth-child(even),
.rich tbody tr:nth-child(even) { background:var(--paper); }
.blog-content tr:last-child td, .post-body.rich tr:last-child td, .rich tr:last-child td { border-bottom:none; }

.blog-sidebar { display:flex; flex-direction:column; gap:1.2rem; position:sticky; top:1.5rem; }
.side-posts { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:.9rem; }
.side-posts a { display:flex; gap:.7rem; align-items:center; }
.side-posts img { width:56px; height:56px; object-fit:cover; border-radius:8px; flex:0 0 auto; }
.side-posts strong { display:block; font-size:.9rem; line-height:1.35; color: var(--ink); }
.side-posts a:hover strong { color:var(--gold); }
.side-posts em { font-style:normal; font-size:.78rem; }
.side-cta { background:linear-gradient(135deg,#073869,#0a4d8c); color:#fff; }
.side-cta h4, .side-cta p { color:#fff; }
.side-cta .text-muted { color:rgba(255,255,255,.75); }

.blog-discussion { margin-top:3rem; padding-top:2rem; border-top:2px solid var(--line); }
.blog-discussion h2 { display:flex; align-items:center; gap:.55rem; }
.discussion-list { display:flex; flex-direction:column; gap:1.2rem; margin:1.2rem 0; }
.discussion-item { display:flex; gap:.9rem; }
.discussion-meta { display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; margin-bottom:.35rem; font-size:.9rem; }
.discussion-body { flex:1; min-width:0; background:var(--paper); border-radius:12px; padding:.9rem 1.1rem; }
.discussion-form { margin-top:1.2rem; }

/* ---- Markdown composer toolbar ---- */
.md-toolbar { display:flex; flex-wrap:wrap; gap:.3rem; align-items:center; padding:.45rem .5rem;
    background:var(--paper); border:1px solid var(--line); border-bottom:none; border-radius:10px 10px 0 0; }
.md-btn { display:inline-flex; align-items:center; justify-content:center; min-width:32px; height:30px;
    padding:0 .5rem; border:1px solid transparent; border-radius:7px; background:transparent; cursor:pointer;
    font-size:.9rem; color: var(--ink); font-family: var(--sans); line-height:1; }
.md-btn:hover { background: var(--card); border-color:var(--gold); }
.md-bold { font-weight:800; } .md-italic { font-style:italic; } .md-strike { text-decoration:line-through; }
.md-heading { font-weight:700; font-family: var(--serif); }
.md-image { font-size:1rem; }
.md-status { font-size:.8rem; color:var(--muted); margin-left:.4rem; }
.md-toolbar + .input-field, .md-toolbar + textarea { border-radius:0 0 10px 10px; margin-top:0; }
textarea.drag-over { border-color:var(--gold); background:var(--gold-soft); }

/* ---- Composer Write / Preview tabs ---- */
.md-editor { display:flex; flex-direction:column; }
.md-tabs { display:flex; gap:.25rem; margin-bottom:-1px; }
.md-tab { appearance:none; border:1px solid var(--line); border-bottom:none; background:var(--paper);
    color:var(--muted); font-family:var(--sans); font-size:.85rem; font-weight:600; cursor:pointer;
    padding:.4rem .95rem; border-radius:9px 9px 0 0; line-height:1; }
.md-tab:hover { color:var(--ink); }
.md-tab.on { background:var(--card); color:var(--ink); border-color:var(--line); position:relative; z-index:1; }
.md-editor .md-toolbar { border-top-left-radius:0; }
/* When previewing, the toolbar is irrelevant — hide it and round the preview. */
.md-editor.previewing .md-toolbar { display:none; }
.md-preview { min-height:120px; padding:.9rem 1rem; border:1px solid var(--line);
    border-radius:0 10px 10px 10px; background:var(--card); }
.md-preview-empty { color:var(--muted); font-style:italic; margin:0; }

@media (max-width: 980px) {
    .blog-layout { grid-template-columns:1fr; gap:1.8rem; }
    .blog-sidebar { position:static; }
    .blog-content { max-width:none; }
}

/* ---- Community Home + notifications (2026-07-18) ---- */
.ch-welcome { display:flex; justify-content:space-between; align-items:center; gap:1.5rem;
    flex-wrap:wrap; margin-bottom:1.5rem; }
.ch-welcome h1 { margin:0 0 .3rem; }
.ch-grid { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:1.5rem; align-items:start; }
.ch-main, .ch-side { display:flex; flex-direction:column; gap:1.2rem; }
.ch-side { position:sticky; top:1.5rem; }
.ch-posts { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:1rem; }
.ch-post { display:flex; flex-direction:column; gap:.5rem; border:1px solid var(--line); border-radius:12px;
    overflow:hidden; background: var(--card); transition:transform .15s, box-shadow .15s; }
.ch-post:hover { transform:translateY(-3px); box-shadow:0 10px 24px rgba(7,56,105,.1); border-color:var(--gold); }
.ch-post img { width:100%; height:110px; object-fit:cover; }
.ch-post span { padding:0 .8rem .9rem; display:flex; flex-direction:column; gap:.35rem; }
.ch-post strong { font-size:.92rem; line-height:1.35; color: var(--ink); }
.ch-post .badge { align-self:flex-start; }
.ch-member { display:flex; justify-content:space-between; align-items:center; gap:.5rem; }
.ch-member a { display:flex; align-items:center; gap:.5rem; }
.ch-newest { display:flex; flex-wrap:wrap; gap:.4rem; }
.notif-badge { display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:18px;
    padding:0 5px; border-radius:999px; background:#c0392b; color:#fff; font-size:.7rem; font-weight:700;
    margin-left:.35rem; font-variant-numeric:tabular-nums; }
.nav-bell { display:inline-flex; align-items:center; position:relative; }
.notif-list li, .plain-list li.notif-unread { display:flex; justify-content:space-between; gap:1rem;
    align-items:center; flex-wrap:wrap; }
.notif-unread { background:var(--gold-soft); border-radius:8px; padding:.5rem .7rem !important; }
.notif-unread a { font-weight:600; }
.plain-list a { display:inline-flex; align-items:center; gap:.4rem; }
.thread-head { display:flex; justify-content:space-between; align-items:center; gap:1rem; flex-wrap:wrap; }
.thread-head h1 { margin:0; }
@media (max-width: 980px) {
    .ch-grid { grid-template-columns:1fr; }
    .ch-side { position:static; }
}

/* ---- Mentions, quoting, moderation (2026-07-29) ---- */
.thread-head-actions { display:flex; gap:.4rem; flex-wrap:wrap; }
.mod-flag { color:var(--gold); display:inline-flex; vertical-align:middle; }
.post-footer { display:flex; justify-content:space-between; align-items:center; gap:1rem; flex-wrap:wrap; margin-top:.9rem; }
.post-actions { display:flex; gap:.3rem; }
.post-action { display:inline-flex; align-items:center; gap:.3rem; background:none; border:none; cursor:pointer;
    color:var(--muted); font-size:.82rem; padding:.25rem .5rem; border-radius:6px; font-family: var(--sans); }
.post-action:hover { background:var(--paper); color: var(--ink); }
.post-action:disabled { opacity:.6; cursor:default; }
.post-body.rich a[href^="/members/"] { color:#0a5560; font-weight:600; text-decoration:none; background:var(--teal-soft); padding:0 .25rem; border-radius:4px; }
.profile-handle { color:var(--teal); font-weight:600; margin:0 0 .4rem; }
.handle-input { display:flex; align-items:center; gap:.4rem; }
.handle-input > span { font-weight:700; color: var(--ink); font-size:1.1rem; }
.handle-input .input-field { margin:0; }
.mod-list { display:flex; flex-direction:column; gap:1.2rem; margin-top:1rem; }
.mod-item-head { display:flex; justify-content:space-between; gap:1rem; flex-wrap:wrap; margin-bottom:.6rem; align-items:center; }
.mod-reason { font-style:italic; color:#8a2b3a; margin:0 0 .8rem; }
.mod-target { background:var(--paper); border-radius:10px; padding:1rem; margin-bottom:1rem; }
.mod-actions { display:flex; gap:.5rem; flex-wrap:wrap; }

/* ---- Weekly tracker + motivation + leaderboard + dinar (2026-07-29) ---- */
.wt-steps { display:flex; gap:.5rem; margin:1rem 0 1.5rem; flex-wrap:wrap; }
.wt-step { padding:.4rem .9rem; border-radius:999px; background:var(--paper); color:var(--muted); font-size:.85rem; border:1px solid var(--line); }
.wt-step.active { background: var(--navy); color:#fff; border-color:#073869; }
.wt-step.done { background:var(--teal-soft); color:var(--ink); border-color:var(--teal); }
.wt-grid-scroll { overflow-x:auto; }
.wt-grid { width:100%; border-collapse:collapse; min-width:520px; }
.wt-grid th, .wt-grid td { padding:.55rem .4rem; text-align:center; border-bottom:1px solid var(--line); }
.wt-grid th { background: var(--navy); color:#fff; font-size:.82rem; }
.wt-grid th:first-child, .wt-habit { text-align:left; }
.wt-habit { font-weight:600; color: var(--ink); font-size:.9rem; white-space:nowrap; }
.wt-check { width:20px; height:20px; accent-color:var(--gold); cursor:pointer; }
.wt-done { color:#0a5560; } .wt-miss { color:#c3ccd6; }
.wt-rating { display:flex; gap:.3rem; }
.wt-star { background:none; border:none; cursor:pointer; color:#d7dee6; padding:0; }
.wt-star.on, .star-on { color:var(--gold); }
.wt-nav { display:flex; gap:.6rem; margin-top:1.5rem; }
.wt-nav .btn:first-child { margin-right:auto; }
.wt-summary h3 { display:flex; align-items:center; gap:.5rem; }
.wt-widget-body h2 { display:flex; align-items:center; gap:.5rem; }
.motivation-strip { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:1rem; }
.motiv-card { border-radius:14px; padding:1.3rem; color:#fff; }
.motiv-card h4 { color:#fff; margin:.6rem 0 .3rem; }
.motiv-card p { color:rgba(255,255,255,.85); font-size:.88rem; margin:0; }
.motiv-icon { display:inline-flex; }
.motiv-growth { background:linear-gradient(135deg,#0a5560,var(--teal)); }
.motiv-finance { background:linear-gradient(135deg,#073869,#0a4d8c); }
.motiv-finance .motiv-icon { color:var(--gold); }
.motiv-health { background:linear-gradient(135deg,#8a2b3a,#e07a86); }
.submission-item { display:block; border:1px solid var(--line); border-radius:10px; margin-bottom:.7rem;
    padding:.9rem 1.1rem; transition:border-color .15s; }
.submission-item:hover { border-color:var(--gold); }
.submission-header { display:flex; align-items:center; gap:.7rem; flex-wrap:wrap; }
.submission-header .ic { margin-left:auto; color:var(--muted); }
.badge-draft { background:var(--gold-soft); color:var(--gold-dark); border:1px solid var(--gold); }
.submission-raw { background:#0b1a2b; color:#e8eef5; padding:1rem; border-radius:8px; overflow-x:auto; font-size:.85rem; }

.flair-chip { display:inline-flex; align-items:center; gap:.3rem; padding:.2rem .6rem; border-radius:999px;
    font-size:.78rem; font-weight:600; background:linear-gradient(135deg,var(--gold),#a8801f); color:#2a1f05; }
.wallet-banner { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:1rem; margin:1.2rem 0 1.6rem; }
.wallet-banner > div { background:var(--paper); border:1px solid var(--line); border-radius:12px; padding:1rem; text-align:center; }
.wallet-n { display:block; font-size:1.6rem; font-weight:800; color: var(--ink); font-family: var(--serif); }
.wallet-l { font-size:.82rem; color:var(--muted); display:inline-flex; align-items:center; gap:.3rem; }
.lb-grid { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:1.5rem; align-items:start; }
.lb-list { list-style:none; padding:0; margin:.6rem 0 0; counter-reset:none; }
.lb-list li { display:flex; align-items:center; gap:.7rem; padding:.6rem .4rem; border-bottom:1px solid var(--line); }
.lb-list li a { display:flex; align-items:center; gap:.5rem; }
.lb-me { background:var(--gold-soft); border-radius:8px; }
.lb-rank { width:26px; text-align:center; font-weight:700; color:var(--muted); font-variant-numeric:tabular-nums; }
.lb-score { margin-left:auto; font-weight:700; color: var(--ink); font-variant-numeric:tabular-nums; }
.lb-list.compact li { padding:.4rem .3rem; }
.lb-side { display:flex; flex-direction:column; gap:1.2rem; }
.flair-row { display:flex; align-items:center; gap:.5rem; margin-bottom:.6rem; flex-wrap:wrap; }
.flair-row .btn, .flair-row .badge { margin-left:auto; }
@media (max-width: 900px) { .lb-grid { grid-template-columns:1fr; } }

/* ============================================================
   MY ZONE (v2) + persistent 7-minute timer  (2026-07-29)
   ============================================================ */
.mz { background:var(--paper); padding:2.5rem 0 3.5rem; }
.mz-header { margin-bottom:1.6rem; }
.mz-header h1 { margin-bottom:.2rem; }
.mz-grid { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:1.4rem; align-items:start; }
.mz-main { display:flex; flex-direction:column; gap:1.4rem; }
.mz-side { display:flex; flex-direction:column; gap:1.4rem; position:sticky; top:1.5rem; }
.small { font-size:.8rem; }

.mz-card { background: var(--card); border:1px solid var(--line); border-radius:18px; padding:1.5rem;
    box-shadow:0 1px 2px rgba(7,56,105,.04), 0 10px 30px rgba(7,56,105,.05); }
.mz-h { font-size:1.35rem; margin:0 0 1rem; }
.mz-h3 { font-size:1rem; display:flex; align-items:center; gap:.4rem; margin:0 0 .8rem; }
.mz-card-head { display:flex; justify-content:space-between; align-items:baseline; gap:1rem; margin-bottom:1rem; flex-wrap:wrap; }
.mz-card-head .mz-h { margin:0; }
.mz-note { font-size:.82rem; color:var(--muted); min-height:1em; margin:.6rem 0 0; }

/* mood */
.mood-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(88px,1fr)); gap:.55rem; }
.mood-btn { display:flex; flex-direction:column; align-items:center; gap:.35rem; padding:.8rem .4rem;
    border:1.5px solid var(--line); border-radius:14px; background: var(--card); cursor:pointer; font-size:.72rem;
    color:var(--muted); font-family: var(--sans); line-height:1.2; transition:border-color .15s, transform .1s, background .15s; }
.mood-btn span { font-size:1.6rem; }
.mood-btn:hover { border-color:var(--gold); transform:translateY(-2px); }
.mood-btn.active { border-color:var(--gold); background:var(--gold-soft); color: var(--ink); font-weight:600; }

/* daily steps */
.steps-row { display:grid; grid-template-columns:repeat(3,1fr); gap:.8rem; }
.step-tile { position:relative; display:flex; flex-direction:column; align-items:center; gap:.45rem;
    padding:1.1rem .6rem; border:1.5px solid var(--line); border-radius:14px; background: var(--card); cursor:pointer;
    transition:border-color .15s, transform .1s, background .15s; }
.step-tile:hover { transform:translateY(-2px); }
.step-ic { color:var(--muted); display:inline-flex; }
.step-name { font-weight:600; color: var(--ink); font-size:.9rem; }
.step-tick { position:absolute; top:.55rem; right:.55rem; width:22px; height:22px; border-radius:50%;
    background:#1e9e63; color:#fff; display:flex; align-items:center; justify-content:center;
    opacity:0; transform:scale(.4); transition:.15s; }
.step-tile.on { background:#eefaf3; border-color:#1e9e63; }
.step-tile.on .step-ic { color:#1e9e63; }
.step-tile.on .step-tick { opacity:1; transform:scale(1); }
.step-growth:hover { border-color:var(--teal); } .step-growth.on { background:var(--teal-soft); border-color:#3f9aa6; }
.step-finance:hover { border-color:var(--gold); } .step-finance.on { background:var(--gold-soft); border-color:var(--gold-dark); }
.step-health:hover { border-color:#e07a86; } .step-health.on { background:#fdeef0; border-color:#d05f6e; }
.step-growth.on .step-ic,.step-finance.on .step-ic,.step-health.on .step-ic { color: var(--ink); }
.streaks { margin-top:1.2rem; display:flex; flex-direction:column; gap:.5rem; }
.streak { display:flex; align-items:center; gap:.9rem; }
.streak-label { width:72px; font-size:.82rem; color:var(--muted); }
.streak-dots { display:flex; gap:.35rem; }
.dot { width:13px; height:13px; border-radius:50%; background:var(--line); }
.dot.on { background:var(--gold); }

/* 7-minute reset */
.reset-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:.8rem; }
.rtile { text-align:left; border:1.5px solid var(--line); border-radius:14px; padding:1rem; background: var(--card); cursor:pointer;
    display:flex; flex-direction:column; gap:.3rem; border-top:3px solid var(--c,var(--gold)); transition:transform .12s, box-shadow .15s; }
.rtile:hover { transform:translateY(-3px); box-shadow:0 10px 24px rgba(7,56,105,.09); }
.rtile-ic { color:var(--c,var(--gold)); display:inline-flex; }
.rtile-name { font-weight:700; color: var(--ink); }
.rtile-sub { font-size:.78rem; color:var(--muted); }
.reset-foot { display:flex; gap:.6rem; flex-wrap:wrap; margin-top:1.1rem; }
.mz-affirm { margin:1.2rem 0 0; border-left:4px solid var(--gold); background:#fbf7ec; padding:.9rem 1.1rem;
    border-radius:0 10px 10px 0; font-style:italic; color: var(--ink); }
.journal-box { margin-top:1.2rem; }
.journal-box textarea { width:100%; border:1.5px solid var(--line); border-radius:12px; padding:.9rem 1rem;
    font-family:inherit; font-size:.95rem; resize:vertical; }
.journal-box textarea:focus { outline:none; border-color:var(--gold); box-shadow:0 0 0 3px rgba(220,177,60,.15); }
.journal-actions { display:flex; gap:.5rem; align-items:center; margin-top:.7rem; flex-wrap:wrap; }
.journal-entry p:last-child { white-space:pre-wrap; }
.journal-list { display:flex; flex-direction:column; gap:1rem; }

/* small goals / to-do */
.goal-add { display:flex; gap:.5rem; margin-bottom:1rem; }
.goal-add input { flex:1; border:1.5px solid var(--line); border-radius:10px; padding:.6rem .8rem; font-family:inherit; }
.goal-add input:focus { outline:none; border-color:var(--gold); box-shadow:0 0 0 3px rgba(220,177,60,.15); }
.goal-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:.4rem; }
.goal { display:flex; align-items:center; gap:.7rem; padding:.55rem .7rem; border:1px solid var(--line); border-radius:10px; background: var(--card); }
.goal-check { flex:0 0 auto; width:22px; height:22px; border-radius:6px; border:1.5px solid var(--line); background: var(--card);
    color:transparent; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.goal.done .goal-check { background:#1e9e63; border-color:#1e9e63; color:#fff; }
.goal-text { flex:1; color: var(--ink); }
.goal.done .goal-text { text-decoration:line-through; color: var(--muted); }
.goal-del { flex:0 0 auto; background:none; border:none; color:#c3ccd6; cursor:pointer; display:inline-flex; }
.goal-del:hover { color:#c0392b; }

/* weekly tracker */
.wt-scroll { overflow-x:auto; }
.wt { width:100%; border-collapse:collapse; min-width:520px; }
.wt th, .wt td { padding:.55rem .4rem; text-align:center; border-bottom:1px solid var(--line); }
.wt th { background: var(--navy); color:#fff; font-size:.82rem; }
.wt th:first-child, .wt-habit { text-align:left; }
.wt-habit { font-weight:600; color: var(--ink); font-size:.9rem; white-space:nowrap; }
.wt-check { width:19px; height:19px; accent-color:var(--gold); cursor:pointer; }
.wt-foot { display:flex; gap:.8rem; align-items:center; margin-top:1rem; flex-wrap:wrap; }

/* sidebar */
.mz-quote blockquote { border:none; background:none; padding:0; margin:0 0 .4rem; font-size:1.05rem; color: var(--ink); font-style:italic; }
.mz-quote cite { color:var(--muted); }
.side-list { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:.7rem; }
.side-list li { display:flex; justify-content:space-between; gap:.6rem; font-size:.88rem; }
.side-list em { color: var(--muted); font-style:normal; flex:0 0 auto; }
.mz-tools { display:flex; flex-direction:column; }
.mz-tools a { display:flex; align-items:center; gap:.55rem; padding:.55rem 0; border-bottom:1px solid var(--line); color: var(--ink); }
.mz-tools a:last-child { border-bottom:none; }
.mz-tools a:hover { color:var(--gold); }

/* toast */
.mz-toast { position:fixed; left:50%; bottom:1.5rem; transform:translate(-50%,140%); z-index:1100;
    background: var(--navy); color:#fff; padding:.7rem 1.2rem; border-radius:999px; font-size:.9rem; font-weight:600;
    box-shadow:0 10px 30px rgba(7,56,105,.3); transition:transform .3s cubic-bezier(.2,.9,.3,1.2); }
.mz-toast.show { transform:translate(-50%,0); }

/* ---- persistent floating focus timer ---- */
.rt-widget { position:fixed; right:1.1rem; bottom:1.1rem; z-index:1050; display:flex; gap:.9rem; align-items:center;
    background:rgba(11,26,43,.86); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); color:#fff;
    border-radius:18px; padding:.75rem 1rem .75rem .7rem; box-shadow:0 16px 44px rgba(0,0,0,.4); width:280px;
    animation:rt-in .35s cubic-bezier(.2,.9,.3,1.1); touch-action:none; user-select:none; }
/* Collapsed = a small draggable puck showing just the ring; tap to expand. */
.rt-widget.rt-min { width:auto; padding:.45rem; gap:0; cursor:grab; }
.rt-widget.rt-min .rt-info { display:none; }
.rt-widget.rt-min .rt-ring, .rt-widget.rt-min .rt-ring svg { width:50px; height:50px; }
.rt-widget.rt-min .rt-time { font-size:.82rem; }
.rt-widget.rt-dragging { cursor:grabbing; opacity:.92; box-shadow:0 20px 50px rgba(0,0,0,.5); }
.rt-ring { cursor:pointer; }
/* Keep it clear of the mobile bottom nav. */
@media (max-width:900px){ .rt-widget { bottom:82px; right:.8rem; } }
@keyframes rt-in { from { transform:translateY(120%); opacity:0; } to { transform:none; opacity:1; } }
.rt-ring { position:relative; width:66px; height:66px; flex:0 0 auto; }
.rt-ring svg { width:66px; height:66px; transform:rotate(-90deg); display:block; }
.rt-track { fill:none; stroke:rgba(255,255,255,.14); stroke-width:7; }
.rt-prog { fill:none; stroke:var(--rt-color,var(--gold)); stroke-width:7; stroke-linecap:round; transition:stroke-dashoffset 1s linear; }
.rt-time { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:1.05rem;
    font-weight:800; font-variant-numeric:tabular-nums; letter-spacing:.5px; }
.rt-info { min-width:0; flex:1; }
.rt-name { font-weight:700; font-family: var(--serif); font-size:1.05rem; line-height:1.1;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rt-cycle { font-size:.72rem; color:rgba(255,255,255,.55); margin-bottom:.5rem; }
.rt-controls { display:flex; gap:.35rem; }
.rt-btn { background:rgba(255,255,255,.1); color:#fff; border:none; border-radius:8px; padding:.3rem .55rem;
    font-size:.72rem; cursor:pointer; font-family: var(--sans); }
.rt-btn:hover { background:var(--rt-color,var(--gold)); color:#0b1a2b; }
.rt-widget.rt-paused .rt-time { opacity:.55; }
.rt-widget.rt-done { border:1.5px solid #1e9e63; }
.rt-widget.rt-done .rt-time { color:#37c47f; }

@media (prefers-reduced-motion: reduce) {
    .rt-widget { animation:none; } .rt-prog { transition:none; }
    .mz-toast { transition:opacity .2s; } .step-tile:hover,.mood-btn:hover,.rtile:hover { transform:none; }
}
@media (max-width: 980px) {
    .mz-grid { grid-template-columns:1fr; }
    .mz-side { position:static; }
    /* timer becomes a slim dock at the bottom */
    .rt-widget { right:.6rem; left:.6rem; bottom:.6rem; width:auto;
        padding-bottom:calc(.8rem + env(safe-area-inset-bottom)); }
}
@media (max-width: 560px) {
    .steps-row { grid-template-columns:1fr; }
    .rt-ring, .rt-ring svg { width:54px; height:54px; }
}

/* ---- Inspiration videos (2026-07-29) ---- */
.insp-filters { display:flex; gap:.5rem; flex-wrap:wrap; margin-bottom:1.2rem; }
.insp-add { margin-bottom:1.5rem; }
.insp-add summary { cursor:pointer; font-weight:600; color: var(--ink); }
.insp-add form { margin-top:1rem; }
.video-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:1.5rem; }
.video-card { border:1px solid var(--line); border-radius:14px; overflow:hidden; background: var(--card);
    box-shadow:0 6px 22px rgba(7,56,105,.05); transition:transform .15s, box-shadow .15s; }
.video-card:hover { transform:translateY(-3px); box-shadow:0 12px 30px rgba(7,56,105,.1); }
.video-embed { position:relative; width:100%; padding-top:56.25%; background:#0b1a2b; }
.video-embed iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }
.video-body { padding:1rem 1.2rem 1.2rem; }
.video-body h3 { font-size:1.05rem; margin:.5rem 0 .3rem; }

/* ============================================================
   COMMUNITY HOME / HUB (post-login landing)  (2026-07-29)
   ============================================================ */
.hub { background:var(--paper); padding:2.2rem 0 3.5rem; }
.hub-head { display:flex; justify-content:space-between; align-items:center; gap:1.5rem; flex-wrap:wrap; margin-bottom:1.4rem; }
.hub-hello h1 { margin:0 0 .5rem; }
.hub-chips { display:flex; gap:.4rem; flex-wrap:wrap; align-items:center; }
.streak-chip { display:inline-flex; align-items:center; gap:.3rem; padding:.2rem .6rem; border-radius:var(--radius-pill);
    background:#fff3e0; color:#a8600f; border:1px solid var(--gold); font-size:.78rem; font-weight:600; }

/* today's practice band */
.hub-practice { background:linear-gradient(135deg,var(--navy),var(--navy-mid)); color:#fff;
    border-radius:var(--radius-lg); padding:1.4rem 1.5rem; margin-bottom:1.2rem; box-shadow:var(--shadow-md); }
.practice-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:1rem; }
.practice-head h2 { color:#fff; margin:0; display:flex; align-items:center; gap:.5rem; font-size:1.2rem; }
.practice-row { display:grid; grid-template-columns:repeat(4,1fr); gap:.8rem; }
.practice-item { display:flex; flex-direction:column; gap:.25rem; padding:.9rem 1rem; border-radius:12px;
    background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.12); color:#fff; transition:background .15s, transform .1s; }
.practice-item:hover { background:rgba(255,255,255,.16); transform:translateY(-2px); color:#fff; }
.pi-ic { color:var(--teal); display:inline-flex; }
.pi-label { font-weight:700; font-size:.9rem; }
.pi-state { font-size:.78rem; color:rgba(255,255,255,.7); }
.practice-item.done { background:rgba(46,158,99,.22); border-color:rgba(55,196,127,.5); }
.practice-item.done .pi-ic { color:#5fe0a0; }
.practice-item.part { border-color:rgba(220,177,60,.5); }
.hub-rank { margin-top:1.1rem; }
.hub-rank-text { display:flex; align-items:center; gap:.4rem; font-size:.85rem; margin-bottom:.5rem; color:rgba(255,255,255,.9); }
.hub-practice .progress-track { background:rgba(255,255,255,.18); }

.hub-nudge { display:flex; align-items:center; gap:1rem; justify-content:space-between; flex-wrap:wrap;
    background:var(--gold-soft); border:1px solid var(--gold); border-radius:12px; padding:.8rem 1.1rem;
    margin-bottom:1.2rem; color: var(--ink); font-weight:600; font-size:.9rem; }
.hub-nudge:hover { color: var(--ink); }
.progress-track.sm { width:140px; height:6px; flex:0 0 auto; }

.hub-grid { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:1.3rem; align-items:start; }
.hub-main { display:flex; flex-direction:column; gap:1.3rem; }
.hub-side { display:flex; flex-direction:column; gap:1.3rem; position:sticky; top:1.5rem; }
.hub-card-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:1rem; }
.hub-card-head .mz-h { margin:0; font-size:1.15rem; }

.hub-topics { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; }
.hub-topics li { padding:.7rem 0; border-bottom:1px solid var(--line); }
.hub-topics li:last-child { border-bottom:none; }
.hub-topic-title { font-weight:600; color: var(--ink); }
.hub-topic-title:hover { color:var(--gold); }
.hub-topic-meta { display:flex; gap:.8rem; flex-wrap:wrap; margin-top:.3rem; font-size:.8rem; color:var(--muted); }
.hub-topic-meta span { display:inline-flex; align-items:center; gap:.25rem; }

.hub-posts { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:.9rem; }
.hub-post { display:flex; flex-direction:column; border:1px solid var(--line); border-radius:12px; overflow:hidden; background: var(--card); transition:transform .12s, box-shadow .15s; }
.hub-post:hover { transform:translateY(-3px); box-shadow:var(--shadow-md); }
.hub-post img { width:100%; height:100px; object-fit:cover; }
.hub-post span { padding:.7rem .8rem; display:flex; flex-direction:column; gap:.3rem; }
.hub-post strong { font-size:.9rem; color: var(--ink); line-height:1.3; }
.hub-post .badge { align-self:flex-start; }

.hub-videos { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:.9rem; }
.hub-video { display:flex; flex-direction:column; gap:.4rem; }
.hub-video img { width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:10px; }
.hub-video span { font-size:.82rem; color: var(--ink); line-height:1.3; }
.hub-video:hover span { color:var(--gold); }

.hub-notifs { list-style:none; margin:0 0 .6rem; padding:0; display:flex; flex-direction:column; gap:.2rem; }
.hub-notifs li a { display:flex; gap:.4rem; align-items:center; padding:.4rem .5rem; border-radius:8px; font-size:.85rem; color:var(--ink); }
.hub-notifs li.unread a { background:var(--gold-soft); font-weight:600; }
.hub-people { display:flex; flex-wrap:wrap; gap:.6rem; margin-bottom:.6rem; }
.hub-person { display:flex; flex-direction:column; align-items:center; gap:.25rem; width:52px; }
.hub-person span { font-size:.72rem; color:var(--muted); text-align:center; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; width:100%; }
.hub-lb { list-style:none; margin:0 0 .6rem; padding:0; }
.hub-lb li { display:flex; align-items:center; gap:.6rem; padding:.35rem 0; }
.hub-lb .lb-rank { width:20px; color:var(--muted); font-weight:700; font-variant-numeric:tabular-nums; }
.hub-lb .lb-score { margin-left:auto; font-weight:700; color: var(--ink); font-variant-numeric:tabular-nums; }

@media (max-width: 980px) { .hub-grid { grid-template-columns:1fr; } .hub-side { position:static; } .practice-row { grid-template-columns:1fr 1fr; } }
@media (max-width: 520px) { .practice-row { grid-template-columns:1fr; } }

/* ============================================================
   THE ASCENT — standing band, medallion, ladder  (2026-07-29)
   ============================================================ */
.standing { margin-top:1.4rem; background:linear-gradient(140deg,var(--navy-deep),var(--navy) 55%,var(--navy-mid));
    border-radius:22px; padding:2.1rem 2.2rem; color:#eaf1f8; position:relative; overflow:hidden; box-shadow:var(--shadow-md); }
.standing::after { content:""; position:absolute; right:-90px; top:-90px; width:340px; height:340px; border-radius:50%;
    background:radial-gradient(circle, rgba(207,159,52,.16), transparent 70%); pointer-events:none; }
.standing-in { display:grid; grid-template-columns:1fr auto; gap:2rem; align-items:center; position:relative; z-index:1; }
.standing-text h1 { color:#fff; font-size:2.3rem; margin:.5rem 0 .3rem; }
.standing-sub { color:#a9c2da; max-width:48ch; margin:0; }
.standing-meta { display:flex; gap:1.6rem; margin-top:1.3rem; flex-wrap:wrap; }
.standing-meta > div { display:flex; flex-direction:column; }
.standing-meta .k { font-size:.7rem; letter-spacing:.13em; text-transform:uppercase; color:#7fa0bf; }
.standing-meta .v { font-family:var(--serif); font-size:1.45rem; color:#fff; font-variant-numeric:tabular-nums; display:flex; align-items:center; gap:.25rem; }
.standing-meta .v .u { font-size:.75rem; color:#a9c2da; font-family: var(--sans); }

.medallion { display:flex; flex-direction:column; align-items:center; gap:.55rem; color:#fff; }
.med-ring { position:relative; width:150px; height:150px; }
.med-ring svg { width:150px; height:150px; transform:rotate(-90deg); display:block; }
.med-prog { transition:stroke-dashoffset 1.1s ease; }
.med-seal { position:absolute; inset:24px; border-radius:50%; display:grid; place-items:center; color:#3a2c07;
    background:radial-gradient(circle at 38% 32%,#f4dd96,var(--gold) 58%,var(--gold-dark));
    box-shadow:inset 0 2px 6px rgba(255,255,255,.4), 0 6px 16px rgba(0,0,0,.3); }
.med-rank { font-family:var(--serif); font-size:1.15rem; }
.med-next { font-size:.76rem; color:#a9c2da; }

.ladder { position:relative; z-index:1; margin-top:1.7rem; padding-top:1.3rem; border-top:1px solid rgba(255,255,255,.12); }
.rungs { display:flex; justify-content:space-between; position:relative; }
.rungs-line { position:absolute; left:0; right:0; top:9px; height:2px; background:rgba(255,255,255,.14); }
.rungs-fill { position:absolute; left:0; top:9px; height:2px; width:var(--reach,0%);
    background:linear-gradient(90deg,var(--gold-dark),var(--gold)); transition:width 1s ease; }
.rung { position:relative; display:flex; flex-direction:column; align-items:center; gap:.5rem; z-index:1; }
.rung i { width:12px; height:12px; border-radius:50%; background:#2b4360; border:2px solid var(--navy); }
.rung.done i { background:var(--gold); border-color:var(--navy); }
.rung.here i { background: var(--card); box-shadow:0 0 0 4px rgba(207,159,52,.5); width:16px; height:16px; }
.rung .rl { font-size:.72rem; color:#8aa6c2; }
.rung.here .rl { color:#fff; font-weight:700; }
.rung.legend .rl { color:var(--gold); font-weight:700; }

@media (prefers-reduced-motion:reduce){ .med-prog,.rungs-fill{ transition:none; } }
@media (max-width:820px){
    .standing-in { grid-template-columns:1fr; text-align:center; }
    .medallion { order:-1; }
    .standing-meta { justify-content:center; }
    .rung .rl { font-size:.62rem; }
}

/* ---- Onboarding checklist + profile medallion card (2026-07-29) ---- */
.onboard { background:var(--card); border:1px solid var(--line); border-radius:var(--radius-lg);
    padding:1.3rem 1.5rem; margin-bottom:1.2rem; box-shadow:var(--shadow-sm); }
.onboard-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:1rem; }
.onboard-head h2 { font-size:1.25rem; margin:.2rem 0 0; }
.onboard-count { font-family:var(--serif); font-size:1.4rem; color:var(--gold-dark); font-variant-numeric:tabular-nums; }
.onboard-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:.6rem; }
.onboard-item { display:flex; align-items:center; gap:.6rem; padding:.65rem .8rem; border:1px solid var(--line);
    border-radius:10px; background:var(--paper); color:var(--ink); font-size:.9rem; transition:border-color .15s; }
.onboard-item:hover { border-color:var(--gold); color:var(--ink); }
.ob-check { width:22px; height:22px; flex:0 0 auto; border-radius:50%; border:1.5px solid var(--muted);
    color:transparent; display:grid; place-items:center; }
.onboard-item.done { background:rgba(30,158,99,.08); border-color:var(--ok); }
.onboard-item.done .ob-check { background:var(--ok); border-color:var(--ok); color:#fff; }
.onboard-item.done span:last-child { color:var(--muted); text-decoration:line-through; }

.med-card { background:linear-gradient(140deg,var(--navy-deep),var(--navy) 60%,var(--navy-mid));
    border-radius:var(--radius-lg); padding:1.4rem; text-align:center; color:#eaf1f8; box-shadow:var(--shadow-sm); }
.med-card .med-ring { width:120px; height:120px; margin:0 auto .6rem; }
.med-card .med-ring svg { width:120px; height:120px; transform:rotate(-90deg); }
.med-card .med-seal { inset:20px; }
.med-card .med-rank { font-family:var(--serif); font-size:1.25rem; color:#fff; }
.med-card .med-blurb { font-size:.82rem; color:#a9c2da; margin:.3rem 0 .6rem; }
.med-card .med-next { font-size:.78rem; color:var(--gold); font-weight:600; }

/* ---- Financial tool save bar (2026-07-29) ---- */
.tool-save-bar { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap;
    margin:2rem auto 0; max-width:760px; background:var(--gold-soft); border:1px solid var(--gold);
    border-radius:var(--radius); padding:1rem 1.3rem; }
.tool-save-bar .tsb-right { display:flex; align-items:center; gap:.8rem; flex-wrap:wrap; }
.tool-save-status { font-size:.85rem; color:var(--gold-dark); font-weight:600; }

/* ---- Annual budget planner (2026-07-29) ---- */
.ab-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:1rem; margin-bottom:1.5rem; }
.ab-stat { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:1rem; }
.ab-stat .k { display:block; font-size:.72rem; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); }
.ab-stat .v { font-family:var(--serif); font-size:1.5rem; color: var(--ink); font-variant-numeric:tabular-nums; }
.ab-stat .v.neg { color:var(--danger); }
.ab-bal { background:linear-gradient(140deg,var(--navy),var(--navy-mid)); border-color:transparent; }
.ab-bal .k { color:rgba(255,255,255,.7); } .ab-bal .v { color:#fff; } .ab-bal .v.neg { color:#ffb4a8; }
.ab-scroll { overflow-x:auto; border:1px solid var(--line); border-radius:var(--radius); }
.ab-table { width:100%; border-collapse:collapse; min-width:900px; font-size:.85rem; }
.ab-table th { background:var(--navy); color:#fff; padding:.55rem .4rem; font-weight:600; position:sticky; top:0; }
.ab-table td { padding:.3rem; border-bottom:1px solid var(--line); text-align:center; }
.ab-table td:first-child, .ab-table th:first-child { text-align:left; position:sticky; left:0; background:var(--card); z-index:1; }
.ab-table th:first-child { background:var(--navy); }
.ab-name { width:130px; border:1px solid transparent; background:transparent; font-weight:600; color: var(--ink); padding:.3rem; border-radius:6px; }
.ab-name:focus { border-color:var(--line); background: var(--card); outline:none; }
.ab-cell { width:56px; border:1px solid var(--line); border-radius:6px; padding:.3rem; text-align:right; font-variant-numeric:tabular-nums; }
.ab-cell:focus { outline:none; border-color:var(--gold); }
.ab-row-total, .ab-net { font-weight:700; color: var(--ink); font-variant-numeric:tabular-nums; }
.ab-income .ab-name { color:var(--ok); }
.ab-foot td { background:var(--paper); font-weight:700; }
.ab-net.neg { color:var(--danger); }
.ab-actions { display:flex; gap:.5rem; flex-wrap:wrap; margin-top:1rem; }
.ab-tips { display:flex; align-items:center; gap:1rem; flex-wrap:wrap; }
.ab-tips p { margin:0; flex:1; min-width:200px; }

/* ---- Blog filter chips (2026-07-29) ---- */
.blog-filter { display:flex; flex-wrap:wrap; gap:.5rem; margin-bottom:1.5rem; }

/* ---- Error pages (2026-07-29) ---- */
.err-code { font-size: 6rem; line-height: 1; color: var(--ink); margin: .3rem 0 .5rem; letter-spacing: -.02em; }

/* ---- Theme toggle button (v2) ---- */
.theme-toggle { background:transparent; border:none; cursor:pointer; color:#fff; display:inline-flex;
    align-items:center; padding:.5rem .6rem; border-radius:8px; }
.theme-toggle:hover { background:rgba(255,255,255,.1); color:var(--gold); }
.theme-toggle .tt-sun { display:none; }
:root[data-theme="dark"] .theme-toggle .tt-moon { display:none; }
:root[data-theme="dark"] .theme-toggle .tt-sun { display:inline-flex; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle .tt-moon { display:none; } :root:not([data-theme="light"]) .theme-toggle .tt-sun { display:inline-flex; } }

/* ---- Design version switcher ---- */
.skin-switch { margin-top:.6rem; font-size:.78rem; opacity:.85; display:flex; gap:.4rem; align-items:center; justify-content:center; flex-wrap:wrap; }
.skin-opt { background:transparent; border:1px solid rgba(255,255,255,.3); color:inherit; cursor:pointer; padding:.15rem .6rem; border-radius:999px; font:inherit; font-size:.78rem; }
.skin-opt.on { background:var(--gold); color:var(--navy); border-color:var(--gold); font-weight:600; }
.skin-opt:hover { border-color:var(--gold); }

/* ============================================================
   v2 "Aurum" APP-SHELL (go4): left sidebar + AscentArc + mobile nav
   Only rendered for logged-in members on the v2 skin (body.has-shell)
   ============================================================ */
.app-shell { display: flex; align-items: flex-start; min-height: 100vh; background: var(--paper); }
.shell-sidebar {
    width: 232px; flex-shrink: 0; position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column; background: var(--navy-deep);
    border-right: 1px solid #162038; overflow-y: auto;
}
.shell-brand { display: flex; align-items: center; gap: .5rem; padding: 1.6rem 1.5rem .5rem; text-decoration: none; }
.shell-brand img { height: 26px; width: auto; }
.shell-brand span { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; letter-spacing: -.4px; color: var(--gold); }

.shell-medallion { display: flex; flex-direction: column; align-items: center; padding: .25rem 1rem .4rem; text-decoration: none; }
.ascent-arc { display: block; }
.arc-seg { transition: fill .3s; }
.arc-past { fill: #7A5820; }
.arc-current { fill: #C9973A; filter: drop-shadow(0 0 6px rgba(201,151,58,.55)); }
.arc-future { fill: #223650; }
.arc-rank { font-family: var(--serif); font-size: 13px; fill: #C9973A; font-weight: 500; }
.arc-sub { font-family: var(--mono); font-size: 9px; fill: #7A6A52; letter-spacing: .04em; }
.shell-streak { display: inline-flex; align-items: center; gap: .35rem; margin-top: -.4rem; font-family: var(--mono); font-size: .62rem; color: var(--gold); }
.shell-streak svg { color: var(--gold); }

.shell-divider { height: 1px; background: #162038; margin: .9rem 1.25rem; }

.shell-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 .75rem; }
.shell-nav-secondary { flex: 1; }
.shell-link {
    display: flex; align-items: center; gap: .65rem; padding: .65rem .75rem; border-radius: 8px;
    font-family: var(--sans); font-size: .875rem; color: #7A6A52; text-decoration: none;
    background: transparent; border: none; cursor: pointer; text-align: left; width: 100%; transition: color .15s, background .15s;
}
.shell-link.sm { font-size: .8rem; padding: .5rem .75rem; color: #4A5A72; }
.shell-link:hover { color: var(--gold); }
.shell-link.on { background: var(--gold); color: var(--navy); font-weight: 500; }
.shell-link.on svg { color: var(--navy); }
.shell-link svg { flex-shrink: 0; }
.shell-badge { margin-left: auto; background: var(--gold); color: var(--navy); font-family: var(--mono); font-size: .6rem; font-weight: 600; padding: .05rem .4rem; border-radius: 999px; }

.shell-foot { padding: 0 .75rem 1.4rem; }
.shell-theme .tt-sun { display: none; }
:root[data-theme="dark"] .shell-theme .tt-moon { display: none; }
:root[data-theme="dark"] .shell-theme .tt-sun { display: inline-flex; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .shell-theme .tt-moon { display: none; } :root:not([data-theme="light"]) .shell-theme .tt-sun { display: inline-flex; } }
.shell-theme span { display: inline-flex; align-items: center; gap: .65rem; }
.shell-user { display: flex; align-items: center; gap: .6rem; padding: .55rem .65rem; margin: .3rem 0; border-radius: 12px; background: #162038; text-decoration: none; }
.shell-user img, .shell-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.shell-avatar { display: grid; place-items: center; background: var(--gold); color: var(--navy); font-family: var(--serif); font-weight: 600; }
.shell-user-txt { display: flex; flex-direction: column; line-height: 1.2; }
.shell-user-txt .n { font-family: var(--sans); font-size: .78rem; color: #EEE4D4; font-weight: 500; }
.shell-user-txt .r { font-family: var(--mono); font-size: .58rem; color: #5A6A82; letter-spacing: .04em; }
.shell-skins { margin-top: .5rem; justify-content: flex-start; }
.shell-skins .skin-opt { border-color: rgba(255,255,255,.2); }

.shell-main { flex: 1; min-width: 0; }
.shell-main > main { display: block; }

/* Mobile top bar + bottom nav (hidden on desktop) */
.shell-topbar { display: none; }
.shell-mobilenav { display: none; }

/* Off-canvas drawer bits (hidden on desktop; activated in the mobile block). */
.shell-overlay { display: none; }
.shell-hamburger { display: none; }

@media (max-width: 900px) {
    /* Sidebar becomes a slide-in drawer from the left. */
    .shell-sidebar {
        position: fixed; top: 0; left: 0; bottom: 0; z-index: 60;
        width: 268px; max-width: 84vw; height: 100vh;
        transform: translateX(-100%); transition: transform .28s ease;
        box-shadow: 0 0 40px rgba(0,0,0,.45);
    }
    .has-shell.drawer-open .shell-sidebar { transform: translateX(0); }
    .shell-overlay {
        display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.5);
        opacity: 0; visibility: hidden; transition: opacity .28s, visibility .28s;
    }
    .has-shell.drawer-open .shell-overlay { opacity: 1; visibility: visible; }
    .shell-hamburger {
        display: inline-grid; place-items: center; width: 40px; height: 40px;
        background: none; border: none; color: var(--gold); cursor: pointer; padding: 0;
    }
    .shell-topbar {
        display: flex; align-items: center; gap: .3rem; justify-content: space-between;
        padding: .7rem 1rem; background: var(--navy-deep); position: sticky; top: 0; z-index: 40;
        border-bottom: 1px solid #162038;
    }
    .shell-topbar-brand { margin-right: auto; }
    .shell-topbar-brand { display: flex; align-items: center; gap: .45rem; text-decoration: none; }
    .shell-topbar-brand img { height: 24px; }
    .shell-topbar-brand span { font-family: var(--serif); font-size: 1.15rem; color: var(--gold); font-weight: 500; }
    .shell-topbar-actions { display: flex; align-items: center; gap: .3rem; }
    .shell-topbar-actions .theme-toggle, .shell-topbar-actions .nav-bell { color: var(--gold); }
    .shell-main > main { padding-bottom: 74px; }
    .shell-mobilenav {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
        background: var(--card); border-top: 1px solid var(--line);
    }
    .shell-mobilenav a {
        flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
        padding: .55rem 0 .65rem; color: var(--muted); text-decoration: none; font-family: var(--sans);
    }
    .shell-mobilenav a span { font-size: .58rem; }
    .shell-mobilenav a.on { color: var(--gold); }
}

/* ============================================================
   v2 "Aurum" CONTENT LAYER (go4) — refines page content inside the
   app-shell so every member page matches the go4 card/type treatment.
   Scoped to .has-shell so v1/v3 and logged-out pages are untouched.
   ============================================================ */

/* Comfortable reading column like go4 (max-w-4xl, generous padding). */
.has-shell main .container { max-width: 940px; padding: 0 2rem; }
.has-shell main .section { padding: 2.4rem 0; }
.has-shell main > .section:first-child,
.has-shell main > .hero:first-child,
.has-shell main > *:first-child { padding-top: 2.2rem; }

/* --- Hero becomes a light in-page header on the parchment ground --- */
.has-shell:not(.shell-guest) main .hero,
.has-shell:not(.shell-guest) main .hero-sm {
    background: none; color: var(--ink); padding: 0 0 1.6rem; overflow: visible;
}
.has-shell:not(.shell-guest) main .hero::after { display: none; }
.has-shell:not(.shell-guest) main .hero h1, .has-shell:not(.shell-guest) main .hero h2, .has-shell:not(.shell-guest) main .hero h3,
.has-shell:not(.shell-guest) main .hero-sm h1, .has-shell:not(.shell-guest) main .hero-sm h2 { color: var(--ink); }
.has-shell:not(.shell-guest) main .hero p, .has-shell:not(.shell-guest) main .hero-sm p { color: var(--muted); }
.has-shell:not(.shell-guest) main .hero .eyebrow, .has-shell:not(.shell-guest) main .hero-sm .eyebrow { color: var(--gold-dark); }
.has-shell:not(.shell-guest) main .hero .btn-outline { border-color: var(--gold); color: var(--gold-dark); }
.has-shell:not(.shell-guest) main .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }
.has-shell:not(.shell-guest) main .hero-title { color: var(--ink); font-size: 2.4rem; }

/* --- go4 typography: Fraunces display headings, tight, light weight --- */
.has-shell main h1 { font-family: var(--serif); font-weight: 400; letter-spacing: -.5px; line-height: 1.12; font-size: 2rem; }
.has-shell main h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.3px; }
.has-shell main .eyebrow { font-size: .66rem; letter-spacing: .14em; }

/* --- go4 cards: soft parchment, 16px radius, hairline border, quiet shadow --- */
.has-shell main .card,
.has-shell main .mz-card {
    background: var(--card); border: 1px solid var(--line); border-radius: 16px;
    box-shadow: var(--shadow-sm);
}
.has-shell main .card-grid { gap: 1.25rem; }
.has-shell main .card-link:hover .card { border-color: var(--gold); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.has-shell main .card, .has-shell main .mz-card { transition: border-color .18s, box-shadow .18s, transform .18s; }

/* --- Buttons: go4 pill treatment --- */
.has-shell main .btn { border-radius: 999px; font-family: var(--sans); font-weight: 500; }
.has-shell main .btn-gold { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.has-shell main .btn-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); }

/* --- Pillar accent chips (growth/finance/health) consistent with go4 --- */
.has-shell main .tag-chip, .has-shell main .pillar-chip {
    font-family: var(--mono); font-size: .6rem; letter-spacing: .05em; text-transform: uppercase;
    border-radius: 5px; padding: .12rem .5rem; font-weight: 500;
}

/* --- Member profile stats + forum rows: quiet go4 surfaces --- */
.has-shell main .pstat { background: var(--card-2); border-radius: 12px; }
.has-shell main .pstat-n { font-family: var(--serif); }
.has-shell main .progress-track { background: var(--card-2); border-radius: 999px; }
.has-shell main .progress-fill { background: var(--gold); }

/* --- Section headers (mz-h etc.) get the mono eyebrow feel --- */
.has-shell main .mz-h, .has-shell main .hub-card-head h3, .has-shell main .mz-h3 { font-family: var(--serif); font-weight: 500; }

/* Reserve room so the mobile bottom nav never covers content. */
@media (max-width: 900px) {
    .has-shell main .container { padding: 0 1.1rem; }
    .has-shell main h1 { font-size: 1.7rem; }
}

/* --- Pillar colours aligned to the go4 Figma export (has-shell only) ---
   growth #3B7A57 on #E8F4EC · finance #8B6914/gold on #F8F0D8 · health #2E6E8E on #E2F0F8 */
.shell-v2 .pillar-growth  { background:#E8F4EC; color:#3B7A57; border-color:#3B7A57; }
.shell-v2 .pillar-finance { background:#F8F0D8; color:#8B6914; border-color:var(--gold); }
.shell-v2 .pillar-health  { background:#E2F0F8; color:#2E6E8E; border-color:#2E6E8E; }
:root[data-theme="dark"] .shell-v2 .pillar-growth  { background:rgba(59,122,87,.16);  color:#7Fc09a; border-color:#3B7A57; }
:root[data-theme="dark"] .shell-v2 .pillar-finance { background:var(--gold-soft);      color:var(--gold); border-color:var(--gold); }
:root[data-theme="dark"] .shell-v2 .pillar-health  { background:rgba(46,110,142,.18);  color:#8fc0da; border-color:#2E6E8E; }

/* Homepage hero helpers */
.hero-cta { display:flex; gap:.8rem; flex-wrap:wrap; margin-top:.6rem; }
.hero-note { margin-top:1rem; font-size:.85rem; color:rgba(255,255,255,.72); }

/* content lists keep markers (global ul reset strips them) */
.post-body ul, .post-body.rich ul, .blog-content ul, .rich ul { list-style: disc; padding-left: 1.3rem; margin: .6rem 0; }
.post-body ol, .post-body.rich ol, .blog-content ol, .rich ol { list-style: decimal; padding-left: 1.3rem; margin: .6rem 0; }

/* ============================================================
   PUBLIC (logged-out) polish — brings marketing/auth pages up to the
   same go4/Aurum quality as the app shell, minus the sidebar.
   ============================================================ */
body:not(.has-shell) main .card { border-radius: 16px; box-shadow: var(--shadow-sm); transition: border-color .18s, box-shadow .18s, transform .18s; }
body:not(.has-shell) main .card-link:hover .card { border-color: var(--gold); box-shadow: var(--shadow-md); transform: translateY(-3px); }
body:not(.has-shell) main .btn { border-radius: 999px; font-family: var(--sans); font-weight: 500; }
body:not(.has-shell) main .eyebrow { font-size: .68rem; letter-spacing: .14em; }
body:not(.has-shell) main .section-title { font-family: var(--serif); font-weight: 500; letter-spacing: -.3px; }
/* modern navbar: subtle bottom hairline + tighter type */
.navbar { border-bottom: 1px solid rgba(255,255,255,.06); }
.nav-menu a { font-family: var(--sans); }

/* ---- Guest sidebar (logged-out shell) ---- */
.shell-cta { padding: 1.3rem 1.25rem .3rem; text-align: center; }
.shell-cta-line { font-family: var(--serif); font-size: 1.05rem; color: #EEE4D4; margin: .2rem 0 .8rem; line-height:1.25; }
.shell-cta .btn-block { display:block; width:100%; }
.shell-cta-login { display:inline-block; margin-top:.55rem; color:#8294ab; font-size:.85rem; text-decoration:none; }
.shell-cta-login:hover { color: var(--gold); }
/* Guest slim footer inside the shell-main */
.shell-footer { padding: 1.3rem 2rem 5rem; margin-top: 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:.5rem; }
.shell-footer a { color: var(--muted); text-decoration: none; margin-right: 1.1rem; }
.shell-footer a:hover { color: var(--gold); }
@media (max-width:900px){ .shell-footer { padding: 1.2rem 1.1rem 5rem; } }

/* Prevent whole-page sideways scroll in the shell on mobile */
.app-shell, .app-shell .shell-main { max-width: 100%; }
.app-shell .shell-main { overflow-x: hidden; }
.app-shell .shell-main > main { min-width: 0; }

/* Outline button on the dark hero: light text + gold border (was dark ink -> clashed) */
.hero .btn-outline, .shell-guest main .hero .btn-outline { color:#fff; border-color:var(--gold); background:transparent; }
.hero .btn-outline:hover, .shell-guest main .hero .btn-outline:hover { background:var(--gold); color:var(--navy); border-color:var(--gold); }

/* Mobile topbar skin switcher (always reachable on phones, v2 + v3) */
.topbar-skins { display:inline-flex; gap:2px; }
.shell-topbar .topbar-skins .skin-opt { padding:.2rem .5rem; font-size:.68rem; text-transform:uppercase; color:#cdd6df; border-color:rgba(255,255,255,.25); }
.shell-topbar .topbar-skins .skin-opt.on { background:var(--gold); color:var(--navy); border-color:var(--gold); }

/* Sidebar avatar: show initials only if the photo fails to load */
.shell-user img + .shell-avatar-fallback { display:none; }

/* ============================================================
   Global responsiveness guard: never let the PAGE scroll sideways.
   'clip' (not hidden) so it doesn't break the sticky sidebar.
   Wide things (tables, grids) still scroll inside their own containers.
   ============================================================ */
html, body { overflow-x: clip; max-width: 100%; }
main, .shell-main, .app-shell, .container { max-width: 100%; }
img, svg, video { max-width: 100%; height: auto; }
.container { overflow-x: clip; }

/* ============================================================
   My Zone mobile hardening: grid/flex children default to min-width:auto and
   refuse to shrink below their content, overflowing the page (then clipped
   off-screen). Force them to shrink; wrap long words; cap widths.
   ============================================================ */
.mz-grid, .mz-main, .mz-side { min-width: 0; }
.mz-main > *, .mz-side > *, .mz-card, .reset-grid, .steps-row { min-width: 0; max-width: 100%; }
.mz-card { overflow-wrap: anywhere; }
.reset-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
@media (max-width: 480px) { .reset-grid { grid-template-columns: 1fr 1fr; } }
/* Timer: a small corner puck above the bottom nav (was fighting an old full-width dock rule) */
@media (max-width: 900px) {
    .rt-widget { left: auto; right: .7rem; bottom: 84px; width: 260px; max-width: calc(100vw - 1.4rem); }
    .rt-widget.rt-min { width: auto; }
}

/* ============================================================
   GLOBAL responsive hardening (site-wide, not just My Zone):
   grid/flex columns must be allowed to shrink or they overflow the page,
   and long words/URLs must wrap. Applies to every 2-col / card layout.
   ============================================================ */
body { overflow-wrap: break-word; }
.profile-grid, .blog-layout, .hub-grid, .mz-grid, .card-grid, .steps-grid,
.three-col, .two-col, .content-grid, .discussion { min-width: 0; }
.profile-grid > *, .blog-layout > *, .hub-grid > *, .mz-grid > *, .card-grid > *,
.steps-grid > *, .discussion > *, .forum-post, .thread-row, .video-card { min-width: 0; }
pre { overflow-x: auto; max-width: 100%; }

/* Hero on mobile: stack, and centre the text + buttons */
@media (max-width: 760px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-text { text-align: center; }
    .hero-cta { justify-content: center; }
    .hero-note { text-align: center; }
}
