/* =====================================================================
   Veritas Crude Trade: shared design system.
   Gold is the asset colour, red is the signal, warm neutrals do the rest.
   Flat surfaces, hairline borders, tabular numbers, one typeface
   (Montserrat). Two themes driven by [data-theme]; brand colours are
   injected from admin settings by brand_css() as --primary (gold) and
   --secondary (red).
   This file holds the base and every shared component. public.css,
   user.css and admin.css add the three shells on top of it.
   ===================================================================== */

:root {
    --font-body: 'Montserrat', 'Segoe UI', Helvetica, Arial, sans-serif;
    --font-heading: var(--font-body);
    --font-accent: var(--font-body);
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 16px;
    --transition: .16s ease;
    --ink: #141414;
    --gold-100: #FBF3DC;
    --gold-300: #F0D27A;
    --red-100: #F9E1DF;
    --green: #1E7F4F;
    --shadow-soft: 0 1px 2px rgba(20, 20, 20, .06);
    --shadow-lift: 0 16px 40px rgba(20, 20, 20, .18);
}

/* ---------------- Theme palettes ---------------- */

[data-theme="light"] {
    --bg:            #F4F1EA;
    --bg-soft:       #E9E4D8;
    --surface:       #FFFFFF;
    --surface-2:     #E9E4D8;
    --card-bg:       #FFFFFF;
    --input-bg:      #FFFFFF;
    --border:        #DDD8CC;
    --border-strong: #A8A090;
    --text:          #141414;
    --text-2:        #3D3A36;
    --muted:         #6B6554;
    --link:          var(--secondary);
    --link-hover:    #8F1D17;
    --gold-text:     var(--primary-text);
    --gold-tint:     #FBF3DC;
    --gold-tint-2:   #F0D27A;
    --red-tint:      #F9E1DF;
    --red-strong:    var(--secondary);
    --green:         #1E7F4F;
    --green-tint:    #E3F2E9;
    --line: var(--border);
    --canvas: var(--bg);
    --shadow: var(--shadow-soft);
    --glass: rgba(255, 255, 255, .96);
    color-scheme: light;
}

[data-theme="dark"] {
    --bg:            #141414;
    --bg-soft:       #1F1D1A;
    --surface:       #1F1D1A;
    --surface-2:     #2A2722;
    --card-bg:       #1B1A17;
    --input-bg:      #1F1D1A;
    --border:        #35312B;
    --border-strong: #5A544A;
    --text:          #F4F1EA;
    --text-2:        #D9D4C7;
    --muted:         #A39C8C;
    --link:          #E04A3F;
    --link-hover:    #F06A60;
    --gold-text:     var(--primary);
    --gold-tint:     #2A2310;
    --gold-tint-2:   #5C4610;
    --red-tint:      #3A1613;
    --red-strong:    #E04A3F;
    --green:         #3FBF7F;
    --green-tint:    #15291E;
    --line: var(--border);
    --canvas: var(--bg);
    --shadow: none;
    --glass: rgba(20, 20, 20, .96);
    color-scheme: dark;
}

/* ---------------- Base ---------------- */

html { scroll-behavior: smooth; overflow-x: hidden; }
body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 15px;
    line-height: 1.6;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}
strong, b, .fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }
::selection { background: var(--gold-tint-2); color: var(--ink); }

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--text); font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
h1, .h1 { font-size: 2rem; }
h2, .h2 { font-size: 1.6rem; }
h3, .h3 { font-size: 1.3rem; }
h4, .h4 { font-size: 1.15rem; }
h5, .h5 { font-size: 1.02rem; }
h6, .h6 { font-size: .92rem; }
.display-4 { font-weight: 800; letter-spacing: -.02em; }
.display-6 { font-weight: 800; }

.brand-tagline { font-size: .95rem; color: var(--muted); letter-spacing: .02em; }
.text-primary { color: var(--gold-text) !important; }
.text-muted { color: var(--muted) !important; }
.form-label { font-weight: 600; font-size: .88rem; color: var(--text-2); }
.badge { font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: .68rem; border-radius: var(--radius-sm); }
small, .small { font-size: .86em; }
code { color: var(--red-strong); }

/* Numbers line up in tables and tiles */
table, .stat-value, .amount-input, .price, .num { font-variant-numeric: tabular-nums; }

/* Logo: one image per theme, the other is hidden */
.brand-logo { display: inline-flex; align-items: center; line-height: 1; }
.brand-logo img { display: block; height: 40px; width: auto; max-width: 100%; }
.brand-logo-full img { height: 64px; }
.brand-logo-mark img { height: 36px; }
[data-theme="dark"] .logo-on-light, [data-theme="light"] .logo-on-dark { display: none; }
.on-dark .logo-on-light, .admin-sidebar .logo-on-light, .portal-sidebar .logo-on-light, .cta-band .logo-on-light, .auth-side .logo-on-light { display: none !important; }
.on-dark .logo-on-dark, .admin-sidebar .logo-on-dark, .portal-sidebar .logo-on-dark, .cta-band .logo-on-dark, .auth-side .logo-on-dark { display: block !important; }
.brand-text { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

/* ---------------- Buttons ---------------- */

.btn {
    border-radius: var(--radius);
    font-weight: 600;
    letter-spacing: .01em;
    padding: .6rem 1.25rem;
    border-width: 2px;
    transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}
.btn-sm { padding: .35rem .8rem; font-size: .84rem; }
.btn-lg { padding: .8rem 1.75rem; font-size: 1rem; }
.btn:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; box-shadow: none; }

.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--ink); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .btn-primary:first-child:active {
    background: var(--primary-deep); border-color: var(--primary-deep); color: #fff;
}
.btn-primary:disabled, .btn-primary.disabled { background: var(--primary); border-color: var(--primary); color: var(--ink); opacity: .5; }

.btn-outline-primary { color: var(--red-strong); border-color: var(--red-strong); background: transparent; }
.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active { background: var(--secondary); border-color: var(--secondary); color: #fff; }

.btn-secondary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-secondary:hover { background: #2a2a2a; border-color: #2a2a2a; color: #fff; }
[data-theme="dark"] .btn-secondary { background: #F4F1EA; border-color: #F4F1EA; color: var(--ink); }

.btn-danger { background: var(--secondary); border-color: var(--secondary); color: #fff; }
.btn-danger:hover { background: #8F1D17; border-color: #8F1D17; }
.btn-outline-danger { color: var(--red-strong); border-color: var(--red-strong); }
.btn-outline-danger:hover { background: var(--secondary); border-color: var(--secondary); color: #fff; }
.btn-outline-secondary { color: var(--text-2); border-color: var(--border-strong); }
.btn-outline-secondary:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
.btn-success { background: var(--green); border-color: var(--green); }
.btn-link { color: var(--link); font-weight: 600; }
.btn-light { background: var(--surface-2); border-color: var(--surface-2); color: var(--text); }

/* ---------------- Cards, forms, tables ---------------- */

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: none;
    color: var(--text);
}
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    padding: .9rem 1.25rem;
}
.card-footer { background: transparent; border-top: 1px solid var(--border); }
.card-title { font-weight: 700; }

.form-control, .form-select {
    background: var(--input-bg);
    border: 1px solid var(--border-strong);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: .55rem .8rem;
    min-height: 44px;
}
.form-control-sm, .form-select-sm { min-height: 36px; padding: .3rem .6rem; }
.form-control:focus, .form-select:focus {
    background: var(--input-bg);
    color: var(--text);
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(var(--secondary-rgb), .18);
}
.form-control::placeholder { color: var(--muted); opacity: 1; }
.form-control:disabled, .form-control[readonly] { background: var(--surface-2); color: var(--text-2); }
.form-check-input { border-color: var(--border-strong); width: 1.1em; height: 1.1em; }
.form-check-input:checked { background-color: var(--secondary); border-color: var(--secondary); }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(var(--secondary-rgb), .18); border-color: var(--secondary); }
.form-switch .form-check-input:checked { background-color: var(--green); border-color: var(--green); }
.form-text { color: var(--muted); }
.input-group-text { background: var(--surface-2); border-color: var(--border-strong); color: var(--text-2); }
select.form-select option { background: var(--input-bg); color: var(--text); }

.table { color: var(--text); border-color: var(--border); margin-bottom: 0; }
.table > :not(caption) > * > * { background: transparent; color: var(--text); border-color: var(--border); padding: .7rem .8rem; }
.table thead th {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .12em;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table-hover > tbody > tr:hover > * { background: var(--surface-2); color: var(--text); }
.table-striped > tbody > tr:nth-of-type(odd) > * { background: transparent; }
.table td.text-end, .table th.text-end { font-variant-numeric: tabular-nums; }
.table-responsive { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card-bg); }
.table-responsive .table-responsive { border: 0; }
.card .table-responsive { border: 0; border-radius: 0; }

.modal-content { background: var(--card-bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.modal-header, .modal-footer { border-color: var(--border); }
.dropdown-menu { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lift); padding: .4rem; }
.dropdown-item { color: var(--text); border-radius: var(--radius-sm); padding: .5rem .75rem; font-size: .92rem; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--surface-2); color: var(--text); }
.dropdown-item.active, .dropdown-item:active { background: var(--gold-tint); color: var(--text); }
.dropdown-divider { border-color: var(--border); }

.nav-tabs { border-bottom: 1px solid var(--border); gap: .25rem; }
.nav-tabs .nav-link { color: var(--muted); font-weight: 600; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: .6rem .9rem; }
.nav-tabs .nav-link:hover { color: var(--text); border-bottom-color: var(--border-strong); }
.nav-tabs .nav-link.active { background: transparent; color: var(--text); border-bottom: 2px solid var(--primary); }
.nav-pills .nav-link { color: var(--text-2); font-weight: 600; border-radius: var(--radius); }
.nav-pills .nav-link.active { background: var(--ink); color: #fff; }

.alert { border-radius: var(--radius); border-width: 1px; font-weight: 500; }
.alert-success { background: var(--green-tint); border-color: var(--green); color: var(--green); }
.alert-danger { background: var(--red-tint); border-color: var(--red-strong); color: var(--red-strong); }
.alert-warning { background: var(--gold-tint); border-color: var(--primary); color: var(--text); }
.alert-info, .alert-secondary { background: var(--surface-2); border-color: var(--border); color: var(--text-2); }
.alert-dismissible .btn-close { padding: 1rem; }

.accordion { --bs-accordion-bg: var(--card-bg); --bs-accordion-border-color: var(--border); --bs-accordion-color: var(--text); --bs-accordion-btn-color: var(--text); --bs-accordion-active-bg: var(--gold-tint); --bs-accordion-active-color: var(--text); --bs-accordion-btn-focus-box-shadow: none; --bs-accordion-border-radius: var(--radius); --bs-accordion-inner-border-radius: var(--radius); }
.accordion-button { font-weight: 600; }
.accordion-button:not(.collapsed) { box-shadow: none; }
.accordion-button::after { filter: none; }
[data-theme="dark"] .accordion-button::after { filter: invert(1); }

.pagination .page-link { color: var(--text); background: var(--card-bg); border-color: var(--border); }
.pagination .page-item.active .page-link { background: var(--ink); border-color: var(--ink); color: #fff; }
.list-group-item { background: var(--card-bg); color: var(--text); border-color: var(--border); }
.progress { background: var(--surface-2); border-radius: 999px; }
.progress-bar { background: var(--primary); }
.bg-body-tertiary { background: var(--surface-2) !important; }
.border { border-color: var(--border) !important; }
.text-bg-light, .bg-light { background: var(--surface-2) !important; color: var(--text) !important; }
.badge.bg-primary { background: var(--primary) !important; color: var(--ink) !important; }
.badge.bg-success { background: var(--green) !important; }
.badge.bg-danger { background: var(--secondary) !important; }
.badge.bg-warning { background: var(--gold-tint-2) !important; color: var(--ink) !important; }
.badge.bg-secondary { background: var(--surface-2) !important; color: var(--text-2) !important; }
.badge.bg-info { background: var(--surface-2) !important; color: var(--text) !important; }
hr { border-color: var(--border); opacity: 1; }
.btn-close { filter: none; }
[data-theme="dark"] .btn-close { filter: invert(1); }

/* ---------------- Theme toggle ---------------- */

.theme-toggle {
    width: 40px; height: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1rem;
    cursor: pointer;
}
.theme-toggle:hover { border-color: var(--border-strong); background: var(--surface-2); }
[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: inline; }

/* ---------------- Sections and kickers ---------------- */

.section-pad { padding: 72px 0; }
.section-alt { background: var(--surface); }
[data-theme="light"] .section-alt { background: #FFFFFF; }
.section-title { font-weight: 800; letter-spacing: -.02em; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-kicker {
    color: var(--red-strong);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .18em;
    margin-bottom: .5rem;
}

/* ---------------- Scroll reveal (kept, subtle) ---------------- */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.revealed { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .05s; }
.reveal-d2 { transition-delay: .1s; }
.reveal-d3 { transition-delay: .15s; }
.reveal-d4 { transition-delay: .2s; }

/* ---------------- Stat tiles ---------------- */

.stat-card {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: 1.1rem 1.2rem;
    border-radius: var(--radius);
    background: var(--card-bg);
    border: 1px solid var(--border);
    height: 100%;
}
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--text); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; order: -1; }
.stat-card small { color: var(--muted); }
.stat-card-gold { background: var(--gold-tint); border-color: var(--gold-tint-2); }
.stat-card-gold .stat-value { color: var(--gold-text); }
.tilt-card { transform: none !important; }

/* ---------------- Plan and feature cards (shared by public and member pages) ---------------- */

.plan-card {
    position: relative;
    padding: 1.6rem 1.4rem;
    border-radius: var(--radius);
    background: var(--card-bg);
    border: 1px solid var(--border);
    text-align: left;
    height: 100%;
    overflow: hidden;
}
.plan-card h4, .plan-card h5 { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.plan-roi { font-size: 2.4rem; font-weight: 800; color: var(--gold-text); letter-spacing: -.02em; line-height: 1; margin: .5rem 0 .25rem; }
.plan-popular { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.plan-flag {
    position: absolute; top: 0; right: 0;
    background: var(--primary); color: var(--ink);
    font-size: .64rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    padding: .3rem .7rem; border-radius: 0 0 0 var(--radius);
}
.plan-facts li { display: flex; justify-content: space-between; gap: .75rem; padding: .45rem 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.plan-facts li:last-child { border-bottom: 0; }
.plan-facts span { color: var(--muted); }
.plan-facts strong { text-align: right; font-weight: 600; }

.feature-card { padding: 1.5rem 1.4rem; border-radius: var(--radius); background: var(--card-bg); border: 1px solid var(--border); height: 100%; }
.feature-card h5 { font-size: 1rem; margin-bottom: .5rem; }
.feature-icon {
    width: 44px; height: 44px; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; background: var(--gold-tint); color: var(--gold-text); margin-bottom: 1rem;
}

.step-num {
    width: 44px; height: 44px; margin: 0 auto 1rem; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; font-weight: 800; color: var(--ink); background: var(--primary);
}
.step-line { position: relative; }
@media (min-width: 768px) {
    .step-line::after { content: ""; position: absolute; top: 22px; left: calc(50% + 36px); width: calc(100% - 72px); border-top: 1px solid var(--border-strong); }
    .step-line:last-child::after { display: none; }
}

.testi-card { padding: 1.5rem 1.4rem; border-radius: var(--radius); background: var(--card-bg); border: 1px solid var(--border); height: 100%; }
.testi-card .quote { font-size: 2rem; color: var(--primary); line-height: 1; font-weight: 800; }
.testi-name { font-weight: 700; }
.testi-role { color: var(--muted); font-size: .84rem; }

.cta-band {
    position: relative; overflow: hidden;
    border-radius: var(--radius-lg);
    padding: 3.5rem 2rem;
    text-align: center;
    background: var(--ink);
    color: #F4F1EA;
    border: 1px solid #2a2a2a;
}
.cta-band::before { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 240px; background: var(--primary); opacity: .9; clip-path: polygon(60% 0, 100% 0, 100% 100%, 20% 100%); }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #F4F1EA; font-weight: 800; }
.cta-band p { color: #D9D4C7; }

/* ---------------- Auth pages: split screen ---------------- */

.auth-body {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    background: var(--surface);
}
.auth-body::after {
    content: "";
    grid-column: 2;
    grid-row: 1;
    background: var(--ink) url("../images/logo-mark-gold.svg") no-repeat center / 160px auto;
    position: relative;
    border-left: 8px solid var(--primary);
}
.auth-card {
    grid-column: 1; grid-row: 1;
    width: 100%; max-width: 440px;
    margin: auto;
    padding: 3rem 1.5rem;
    background: transparent;
}
.auth-title { font-weight: 800; margin-bottom: 1.4rem; font-size: 1.6rem; letter-spacing: -.02em; }
.auth-logo { display: flex; margin-bottom: 2rem; }
.auth-logo .brand-logo img { height: 48px; }
.auth-links { margin-top: 1.25rem; font-size: .9rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.auth-card .btn-primary { min-height: 48px; }
@media (max-width: 991.98px) {
    .auth-body { grid-template-columns: 1fr; }
    .auth-body::after { display: none; }
    .auth-card { padding: 2rem 1.25rem; }
}

/* ---------------- Page headers inside the portal and admin ---------------- */

.page-header { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.page-title { font-size: 1.4rem; font-weight: 800; margin: 0; letter-spacing: -.02em; }

.balance-card {
    position: relative; overflow: hidden;
    border-radius: var(--radius);
    padding: 1.4rem 1.5rem;
    color: #F4F1EA;
    background: var(--ink);
    border: 1px solid #2a2a2a;
}
.balance-card::after { content: ""; position: absolute; right: -20px; top: -20px; width: 120px; height: 120px; border-radius: 50%; background: var(--primary); opacity: .18; }
.balance-card .stat-value { color: var(--primary); font-size: 1.8rem; }
.balance-card .stat-label { color: #A39C8C; }

.ring { transform: rotate(-90deg); }
.ring .ring-bg { stroke: var(--border); }
.ring .ring-fill { stroke: var(--primary); stroke-linecap: butt; transition: stroke-dashoffset 1s ease; }
.ring-wrap { position: relative; display: inline-flex; }
.ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 700; }

/* ---------------- Status badges, bars, misc ---------------- */

.status { display: inline-block; padding: .2rem .55rem; border-radius: var(--radius-sm); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.status-active, .status-approved { background: var(--green-tint); color: var(--green); }
.status-pending { background: var(--gold-tint); color: var(--gold-text); }
.status-rejected { background: var(--red-tint); color: var(--red-strong); }

.bar-row { margin-bottom: .8rem; }
.bar-label { display: flex; justify-content: space-between; font-size: .84rem; margin-bottom: .3rem; color: var(--muted); }
.bar-value { font-weight: 700; color: var(--text); }
.bar-track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--primary); transition: width 1s ease; }

.ticker-bar { background: var(--ink); color: #F4F1EA; overflow: hidden; white-space: nowrap; font-size: .84rem; padding: 6px 0; border-bottom: 1px solid var(--primary); }
.ticker-bar span { display: inline-block; padding-left: 100%; animation: ticker-scroll 22s linear infinite; }
.ticker-bar a { color: var(--primary); text-decoration: underline; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-100%); } }

.social-links a { display: inline-block; margin: 0 8px; color: var(--muted); font-size: .88rem; font-weight: 600; }
.social-links a:hover { color: var(--primary); }

.copy-field { display: flex; gap: .5rem; }
.copy-field .form-control { font-size: .85rem; }
.qr-box { display: inline-block; padding: 12px; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); }
.secret-code { font-family: ui-monospace, Consolas, monospace; font-size: 1.2rem; letter-spacing: .18em; background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: .6rem 1rem; display: inline-block; }

.demo-bar, .impersonation-bar { text-align: center; padding: .45rem .8rem; font-size: .84rem; font-weight: 600; }
.demo-bar { background: var(--gold-tint-2); color: var(--ink); }
.impersonation-bar { background: var(--secondary); color: #fff; }
.impersonation-bar a { color: #fff; text-decoration: underline; }

.cookie-consent {
    position: fixed; bottom: 16px; left: 16px; right: 16px; max-width: 520px; margin: 0 auto; z-index: 1080;
    background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lift);
    padding: 1rem 1.2rem; font-size: .9rem;
}
.cookie-actions { display: flex; gap: .6rem; margin-top: .8rem; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}
.no-anim *, .no-anim *::before, .no-anim *::after { animation: none !important; transition: none !important; }
.no-anim .reveal { opacity: 1; transform: none; }

/* ---------------- Selling sessions ---------------- */

.sell-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; height: 100%; display: flex; flex-direction: column; }
.sell-plan { font-weight: 800; font-size: 1rem; letter-spacing: -.01em; }
.sell-stat { background: var(--surface-2); border-radius: var(--radius-sm); padding: .55rem .75rem; display: flex; flex-direction: column; }
.sell-stat .stat-label { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sell-stat .stat-value { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.sell-live { display: inline-block; padding: .15rem .55rem; border-radius: var(--radius-sm); background: var(--green-tint); color: var(--green); font-weight: 700; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; margin-right: .35rem; }
.sell-live::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: .4rem; animation: sellPulse 1.2s ease-in-out infinite; }
@keyframes sellPulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.sell-pending { background: var(--gold-tint); border: 1px dashed var(--primary); border-radius: var(--radius-sm); padding: .5rem .75rem; }
.sell-button:disabled { opacity: .5; }

.trade-actions { padding: .25rem 0 .5rem; }
.trade-action-btn { min-width: 180px; letter-spacing: .06em; text-transform: uppercase; font-size: .95rem; font-weight: 700; padding: .85rem 2rem; }
.trade-action-btn.is-live { box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .3); animation: sellGlow 1.6s ease-in-out infinite; }
@keyframes sellGlow { 0%, 100% { box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .3); } 50% { box-shadow: 0 0 0 8px rgba(var(--primary-rgb), .12); } }
@media (max-width: 575px) { .trade-action-btn { min-width: 140px; width: 46%; padding: .75rem 1rem; } }

.explainer-card { background: var(--gold-tint); border: 1px solid var(--gold-tint-2); border-radius: var(--radius); padding: 1.25rem 1.4rem; }
.explainer-card .section-kicker { color: var(--gold-text); }
.sell-timeline td, .sell-timeline th { white-space: nowrap; }

/* ---------------- Homepage shared pieces (story, timetable) ---------------- */

.hero-session { display: inline-block; margin-top: 1.25rem; padding: .55rem 1rem; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); font-size: .88rem; color: #F4F1EA; }
.story-points li { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: .6rem; }
.story-check { flex: 0 0 22px; height: 22px; border-radius: var(--radius-sm); background: var(--primary); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 800; margin-top: .1rem; }
.story-flow { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; }
.story-node { display: flex; gap: 1rem; align-items: center; }
.story-icon { flex: 0 0 44px; height: 44px; border-radius: var(--radius); background: var(--ink); color: var(--primary); font-weight: 800; font-size: 1.1rem; display: inline-flex; align-items: center; justify-content: center; }
.story-arrow { width: 2px; height: 20px; margin: .35rem 0 .35rem 21px; background: var(--border-strong); }
.schedule-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.schedule-item { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; border-top: 3px solid var(--primary); }
.schedule-name { font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: .78rem; color: var(--muted); }
.schedule-times { font-size: 1rem; margin: .25rem 0; font-weight: 600; }
.schedule-next { font-size: .84rem; color: var(--muted); }

/* ---------------- App banner, crypto widget ---------------- */

.app-banner { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--card-bg); border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: var(--radius); padding: .9rem 1.1rem; margin-bottom: 1.25rem; }
.app-banner-icon { width: 44px; height: 44px; border-radius: var(--radius); }
.crypto-widget { background: var(--ink); border: 1px solid #2a2a2a; border-radius: var(--radius); padding: .6rem .5rem .2rem; overflow: hidden; }
.crypto-widget-label { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--primary); font-weight: 700; }
.crypto-widget-note { font-size: .74rem; color: #A39C8C; }
.crypto-widget-home { margin-top: 0; margin-bottom: 0; position: relative; z-index: 2; }
.crypto-widget .binance-widget-marquee { background: var(--ink); border-radius: var(--radius-sm); }
@media (max-width: 575px) { .crypto-widget-note { display: none; } }

/* ======================================================================
   Trade page
   ====================================================================== */
.trade-page { max-width: 980px; margin: 0 auto; }
.trade-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.trade-how { background: var(--gold-tint); border: 1px solid var(--gold-tint-2); border-radius: var(--radius); padding: .9rem 1.1rem; font-size: .92rem; margin-bottom: 1rem; }
.trade-step { margin-bottom: 1.75rem; }
.trade-step-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .85rem; }
.trade-step-head h5 { margin: 0; }
.trade-step-num { width: 30px; height: 30px; border-radius: var(--radius-sm); background: var(--ink); color: var(--primary); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; }

.pkg-card { position: relative; display: block; height: 100%; cursor: pointer; padding: 1.4rem 1.2rem 1.1rem; border-radius: var(--radius); background: var(--card-bg); border: 1px solid var(--border); border-top: 4px solid var(--pkg-colour, var(--primary)); transition: border-color .2s ease, box-shadow .2s ease, opacity .2s ease; }
.pkg-card:hover { border-color: var(--border-strong); }
.pkg-card:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }
.pkg-card.is-selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .25); }
.trade-page:has(.pkg-card.is-selected) .pkg-card:not(.is-selected) { opacity: .7; }
.pkg-flag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: var(--ink); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; padding: .2rem .7rem; border-radius: var(--radius-sm); font-weight: 700; white-space: nowrap; }
.pkg-name { font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; color: var(--muted); }
.pkg-roi { font-size: 2.4rem; font-weight: 800; line-height: 1.05; margin-top: .35rem; color: var(--gold-text); letter-spacing: -.02em; }
.pkg-roi-label { font-size: .78rem; color: var(--muted); margin-bottom: .9rem; }
.pkg-line { display: flex; gap: .55rem; align-items: flex-start; font-size: .86rem; padding: .35rem 0; border-top: 1px solid var(--border); }
.pkg-icon { flex: 0 0 18px; color: var(--gold-text); text-align: center; font-weight: 800; }
.pkg-hint { font-size: .82rem; color: var(--muted); margin-top: .75rem; }
.pkg-check { position: absolute; top: .75rem; right: .75rem; width: 24px; height: 24px; border-radius: var(--radius-sm); background: var(--primary); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 800; transform: scale(0); transition: transform .2s ease; }
.pkg-card.is-selected .pkg-check { transform: scale(1); }

.amount-box { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.4rem; }
.amount-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.amount-field { display: flex; align-items: baseline; gap: .35rem; flex: 1; min-width: 220px; }
.amount-symbol { font-size: 1.8rem; color: var(--gold-text); font-weight: 700; }
.amount-input { border: 0; border-bottom: 2px solid var(--border-strong); background: transparent; width: 100%; font-size: 2.4rem; font-weight: 800; color: var(--text); padding: .1rem 0; outline: none; font-variant-numeric: tabular-nums; }
.amount-input:focus { border-bottom-color: var(--primary); }
.amount-currency { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.amount-currency button { border: 0; background: transparent; color: var(--muted); padding: .4rem .9rem; font-size: .82rem; font-weight: 600; cursor: pointer; }
.amount-currency button.is-on { background: var(--ink); color: #fff; }
.amount-slider { width: 100%; margin: 1.1rem 0 .25rem; accent-color: var(--primary); height: 6px; }
.amount-ends { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); }
.amount-chips { display: flex; gap: .5rem; flex-wrap: wrap; margin: .9rem 0; }
.chip { border: 1px solid var(--border-strong); background: transparent; color: var(--text); border-radius: var(--radius-sm); padding: .35rem .9rem; font-size: .84rem; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--text); }
.chip.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
[data-theme="dark"] .chip.is-on { background: var(--primary); color: var(--ink); border-color: var(--primary); }
.amount-balance { font-size: .9rem; color: var(--muted); }
.amount-warning { margin-top: .75rem; padding: .65rem .9rem; border-radius: var(--radius-sm); background: var(--red-tint); border: 1px solid var(--red-strong); color: var(--red-strong); font-size: .9rem; }

.summary-box { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .9rem; }
.summary-item { background: var(--surface-2); border-radius: var(--radius-sm); padding: .75rem .9rem; display: flex; flex-direction: column; gap: .2rem; }
.summary-label { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.summary-value { font-size: 1.1rem; font-weight: 700; }
.summary-value.gold { color: var(--gold-text); font-size: 1.4rem; }
.timeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin: 1.4rem 0 .5rem; }
.timeline-track { position: absolute; left: 12.5%; right: 12.5%; top: 9px; height: 2px; background: var(--border-strong); }
.timeline-point { text-align: center; position: relative; font-size: .78rem; }
.timeline-point .dot { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--card-bg); border: 3px solid var(--primary); margin: 0 auto .35rem; position: relative; z-index: 1; }
.timeline-point em { display: block; font-style: normal; font-weight: 700; }
.timeline-point small { color: var(--muted); }
.summary-note { font-size: .88rem; color: var(--muted); margin: .75rem 0 0; }
.trade-submit { width: 100%; letter-spacing: .06em; text-transform: uppercase; padding: .95rem; font-weight: 700; }

.trade-done { max-width: 640px; margin: 2rem auto; text-align: center; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem 1.75rem; }
.trade-done-seal { color: var(--green); margin-bottom: 1rem; }
.seal-ring { stroke-dasharray: 190; stroke-dashoffset: 190; animation: sealRing .8s ease forwards; }
.seal-tick { stroke-dasharray: 40; stroke-dashoffset: 40; animation: sealTick .5s ease .6s forwards; }
@keyframes sealRing { to { stroke-dashoffset: 0; } }
@keyframes sealTick { to { stroke-dashoffset: 0; } }
.trade-done-title { font-size: 1.5rem; font-weight: 800; }
.trade-done-steps { text-align: left; display: grid; gap: .6rem; }
.trade-done-steps div { display: flex; gap: .75rem; align-items: flex-start; font-size: .92rem; }
.trade-done-steps span { flex: 0 0 24px; height: 24px; border-radius: var(--radius-sm); background: var(--primary); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 800; }
@media (max-width: 575px) {
    .timeline { grid-template-columns: repeat(2, 1fr); row-gap: 1rem; }
    .timeline-track { display: none; }
    .amount-input { font-size: 1.9rem; }
    .pkg-roi { font-size: 2.1rem; }
}

.placeholders summary { cursor: pointer; color: var(--link); font-weight: 600; }
.placeholders code { background: var(--surface-2); color: var(--text); padding: 0 .3rem; border-radius: var(--radius-sm); }

/* ---------------- Password show or hide ---------------- */
.pw-field { position: relative; }
.pw-field input { padding-right: 2.9rem; }
.pw-toggle { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); font-size: 1.05rem; line-height: 1; padding: .35rem .5rem; border-radius: var(--radius-sm); cursor: pointer; opacity: .75; }
.pw-toggle:hover, .pw-toggle.is-on { opacity: 1; color: var(--text); }
.pw-toggle.is-on::after { content: ''; position: absolute; left: 50%; top: 50%; width: 1.3rem; height: 2px; background: currentColor; transform: translate(-50%, -50%) rotate(-40deg); }

/* ---------------- Identity verification ---------------- */
.kyc-prompt { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--card-bg); border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: var(--radius); padding: .85rem 1.1rem; margin-bottom: 1.25rem; }
.kyc-prompt.is-pending { border-left-color: var(--border-strong); }
.kyc-prompt.is-declined { border-left-color: var(--red-strong); }
.kyc-prompt-icon { font-size: 1.4rem; }
.kyc-state { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem 1.5rem; }
.kyc-state-icon { width: 50px; height: 50px; border-radius: var(--radius); display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: .75rem; background: var(--gold-tint); color: var(--gold-text); }
.kyc-approved .kyc-state-icon { background: var(--green-tint); color: var(--green); }
.kyc-details { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; margin: 0; font-size: .92rem; }
.kyc-details dt { color: var(--muted); font-weight: 600; }
.kyc-details dd { margin: 0; }
.kyc-form .kyc-section { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.3rem; margin-bottom: 1rem; }
.kyc-section-head { display: flex; align-items: center; gap: .7rem; font-weight: 700; margin-bottom: 1rem; }
.kyc-section-head span { width: 26px; height: 26px; border-radius: var(--radius-sm); background: var(--ink); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 800; }
.kyc-drop { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .25rem; padding: 1.4rem 1rem; border: 2px dashed var(--border-strong); border-radius: var(--radius); cursor: pointer; height: 100%; }
.kyc-drop:hover { border-color: var(--primary); background: var(--gold-tint); }
.kyc-drop.has-file { border-style: solid; border-color: var(--green); background: var(--green-tint); }
.kyc-drop-icon { font-size: 1.6rem; }
.kyc-drop small { color: var(--muted); }
.kyc-drop em { font-style: normal; font-size: .82rem; color: var(--green); word-break: break-all; }
.kyc-review.is-pending { border-left: 4px solid var(--primary); }
.kyc-thumb { display: inline-flex; flex-direction: column; align-items: center; gap: .25rem; text-decoration: none; color: var(--muted); }
.kyc-thumb img { width: 150px; height: 100px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.kyc-thumb-pdf { width: 150px; height: 100px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); font-weight: 700; }
@media (max-width: 575px) { .kyc-details { grid-template-columns: 1fr; gap: .1rem; } .kyc-details dt { margin-top: .5rem; } }

.sponsor-line { display: flex; align-items: center; gap: .6rem; margin-top: .55rem; font-size: .9rem; }
.sponsor-avatar { width: 30px; height: 30px; border-radius: var(--radius-sm); background: var(--primary); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: 0 0 30px; }
.sponsor-avatar.is-unknown { background: var(--surface-2); color: var(--muted); }

.gw-section-title { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--border); padding-bottom: .3rem; margin-top: .25rem; }
.gw-card { border-left: 4px solid var(--border-strong); }
.gw-card:has(.badge.bg-success) { border-left-color: var(--green); }
.gw-card:has(.badge.bg-warning) { border-left-color: var(--primary); }
.pay-details { display: grid; grid-template-columns: max-content 1fr auto; gap: .45rem .9rem; align-items: center; font-size: .92rem; }
.pay-details .k { color: var(--muted); }
.pay-details .v { font-weight: 600; word-break: break-all; }

.payout-method { display: flex; gap: .9rem; align-items: center; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: .85rem 1rem; }
.payout-method-icon { width: 42px; height: 42px; border-radius: var(--radius); background: var(--ink); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; flex: 0 0 42px; }

/* ---------------- Compensation plan and opportunity ---------------- */
.goal { padding: .9rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card-bg); }
.goal-prestige { border-color: var(--primary); background: var(--gold-tint); }
.club-tile { border: 1px solid var(--border); border-radius: var(--radius); padding: .7rem .9rem; height: 100%; background: var(--card-bg); }
.opp-hero { padding: 4rem 0 2.5rem; }
.opp-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.02em; }
.opp-intro { max-width: 760px; margin: 1rem auto 1.5rem; color: var(--muted); font-size: 1.05rem; }
.opp-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem 1.4rem; text-align: center; height: 100%; }
.opp-num { font-size: 2.2rem; font-weight: 800; color: var(--gold-text); letter-spacing: -.02em; }
.opp-num.small { font-size: 1.4rem; }
.opp-reward { margin-top: .75rem; padding: .55rem .8rem; border-radius: var(--radius-sm); background: var(--gold-tint); font-weight: 600; font-size: .92rem; }
.opp-table th { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.opp-prestige { margin-top: 1rem; padding: 1.1rem 1.4rem; border-radius: var(--radius); background: var(--ink); color: var(--primary); font-weight: 700; }

/* ---------------- Barrels (catalogue) ---------------- */
.cat-hero { padding: 3.5rem 0 1.5rem; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
.cat-card { display: block; text-decoration: none; color: inherit; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: default; transition: border-color .2s ease; }
.cat-card:hover { border-color: var(--border-strong); color: inherit; }
.cat-img { display: block; position: relative; aspect-ratio: 1 / 1; background: var(--surface-2); overflow: hidden; }
.cat-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-caption { padding: .7rem .9rem; font-weight: 600; font-size: .9rem; text-align: center; border-top: 1px solid var(--border); }
.cat-lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(20, 20, 20, .94); display: flex; align-items: center; justify-content: center; }
.cat-lightbox figure { margin: 0; max-width: min(92vw, 1100px); max-height: 90vh; text-align: center; }
.cat-lightbox img { max-width: 100%; max-height: 82vh; border-radius: var(--radius); background: #fff; }
.cat-lightbox figcaption { color: #F4F1EA; margin-top: .75rem; font-weight: 700; }
.cat-lightbox button { position: absolute; border: 0; background: rgba(255, 255, 255, .1); color: #F4F1EA; width: 46px; height: 46px; border-radius: var(--radius); font-size: 1.7rem; line-height: 1; cursor: pointer; }
.cat-lightbox button:hover { background: var(--primary); color: var(--ink); }
.cat-close { top: 1rem; right: 1rem; } .cat-prev { left: 1rem; top: 50%; transform: translateY(-50%); } .cat-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.cat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.cat-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.cat-admin-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card-bg); padding: .6rem; cursor: grab; }
.cat-admin-item.is-dragging { opacity: .45; }
.cat-admin-item.is-hidden .cat-admin-img img { opacity: .4; filter: grayscale(1); }
.cat-admin-img { position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); margin-bottom: .5rem; }
.cat-admin-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-handle { position: absolute; top: .4rem; right: .5rem; background: rgba(0, 0, 0, .5); color: #fff; border-radius: var(--radius-sm); padding: 0 .35rem; font-size: .9rem; }
.cat-badge { position: absolute; top: .6rem; left: .6rem; background: var(--primary); color: var(--ink); font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: .25rem .55rem; border-radius: var(--radius-sm); }
.cat-badge-out { background: var(--ink); color: #fff; left: auto; right: .6rem; }
.cat-body { padding: .85rem .9rem .95rem; border-top: 1px solid var(--border); }
.cat-name { font-weight: 700; font-size: 1rem; }
.cat-size { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.cat-price-row { display: flex; justify-content: space-between; align-items: center; margin-top: .55rem; gap: .5rem; }
.cat-price { font-weight: 700; color: var(--text); font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.cat-price small { font-size: .7rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.cat-lb-name { font-size: 1.1rem; font-weight: 700; }
.cat-lb-meta { color: #A39C8C; font-size: .9rem; margin-top: .2rem; }
.cat-lb-desc { color: #F4F1EA; font-size: .9rem; max-width: 640px; margin: .4rem auto 0; opacity: .85; }
.buy-box { position: relative; background: var(--card-bg); color: var(--text); border-radius: var(--radius-lg); padding: 1.5rem; width: min(94vw, 520px); max-height: 92vh; overflow: auto; }
.buy-box .cat-close { top: .6rem; right: .6rem; width: 36px; height: 36px; font-size: 1.3rem; background: var(--surface-2); color: var(--text); }
@media (max-width: 575px) { .cat-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; } .cat-lightbox button { width: 38px; height: 38px; } }

.saved-address { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; border: 1px solid var(--green); background: var(--green-tint); border-radius: var(--radius); padding: .8rem 1rem; }
.ref-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; }
.member-link { font-weight: 600; text-decoration: none; white-space: nowrap; }
.member-link:hover { text-decoration: underline; }

.wallet-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.wallet-option { display: flex; flex-direction: column; gap: .15rem; border: 1px solid var(--border-strong); border-radius: var(--radius); padding: .7rem .8rem; cursor: pointer; position: relative; background: var(--card-bg); }
.wallet-option input { position: absolute; top: .7rem; right: .7rem; }
.wallet-option:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(var(--primary-rgb), .35); }
.wallet-option.is-low { opacity: .65; }
.wallet-name { font-size: .78rem; color: var(--muted); padding-right: 1.4rem; font-weight: 600; }
.wallet-amount { font-weight: 700; font-size: 1.05rem; }
.wallet-cards .stat-card small { display: block; }
.pay-split { font-size: .88rem; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: .6rem .8rem; }

/* ---------------- AI assistant ---------------- */
.ai-chat { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 1070; font-size: .93rem; }
.ai-bubble { display: inline-flex; align-items: center; gap: .55rem; border: 0; border-radius: var(--radius); padding: .7rem 1.1rem .7rem .8rem; background: var(--ink); color: var(--primary); font-weight: 700; box-shadow: var(--shadow-lift); cursor: pointer; }
.ai-bubble:hover { background: #2a2a2a; }
.ai-bubble-icon { display: inline-flex; }
.ai-chat.is-open .ai-bubble { display: none; }
.ai-panel { width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100dvh - 40px)); display: flex; flex-direction: column; background: var(--card-bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lift); overflow: hidden; }
.ai-panel[hidden] { display: none; }
.ai-head { display: flex; align-items: center; gap: .65rem; padding: .8rem .9rem; background: var(--ink); color: #F4F1EA; border-bottom: 1px solid #2a2a2a; }
.ai-avatar { width: 38px; height: 38px; border-radius: var(--radius); background: var(--primary); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.05rem; flex: 0 0 38px; }
.ai-head-text { flex: 1; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.ai-head-text small { color: #A39C8C; font-size: .75rem; }
.ai-icon-btn { border: 0; background: transparent; color: #A39C8C; width: 32px; height: 32px; border-radius: var(--radius-sm); font-size: 1.25rem; line-height: 1; cursor: pointer; }
.ai-icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.ai-log { flex: 1; overflow-y: auto; padding: .9rem; display: flex; flex-direction: column; gap: .55rem; overscroll-behavior: contain; }
.ai-msg { display: flex; }
.ai-msg .ai-text { max-width: 86%; padding: .55rem .8rem; border-radius: var(--radius); white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; line-height: 1.45; }
.ai-assistant .ai-text { background: var(--surface-2); border: 1px solid var(--border); }
.ai-user { justify-content: flex-end; }
.ai-user .ai-text { background: var(--ink); color: #F4F1EA; }
.ai-msg.is-note .ai-text { background: transparent; border: 1px dashed var(--border-strong); color: var(--muted); }
.ai-text a { color: var(--link); text-decoration: underline; word-break: break-all; }
.ai-user .ai-text a { color: var(--primary); }
.ai-typing .ai-text { display: inline-flex; gap: 4px; align-items: center; }
.ai-typing .ai-text span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: ai-dot 1s infinite ease-in-out; }
.ai-typing .ai-text span:nth-child(2) { animation-delay: .15s; }
.ai-typing .ai-text span:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ai-form { display: flex; gap: .45rem; padding: .6rem; border-top: 1px solid var(--border); align-items: flex-end; }
.ai-form textarea { flex: 1; resize: none; border: 1px solid var(--border-strong); border-radius: var(--radius); padding: .55rem .75rem; background: var(--input-bg); color: var(--text); font: inherit; max-height: 120px; outline: none; }
.ai-form textarea:focus { border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(var(--secondary-rgb), .18); }
.ai-send { width: 42px; height: 42px; flex: 0 0 42px; border: 0; border-radius: var(--radius); background: var(--primary); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ai-send:disabled { opacity: .5; cursor: default; }
.ai-foot { font-size: .7rem; color: var(--muted); padding: 0 .9rem .6rem; text-align: center; }
@media (max-width: 575px) {
    .ai-chat { right: 12px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
    .public-body .ai-chat { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
    .ai-bubble-label { display: none; }
    .ai-bubble { padding: .8rem; }
    .ai-chat.is-open { top: 0; left: 0; right: 0; bottom: auto; height: 100%; height: 100dvh; }
    .ai-panel { width: 100%; height: 100%; max-height: none; border-radius: 0; border: 0; box-shadow: none; }
    .ai-head { padding-top: calc(.8rem + env(safe-area-inset-top, 0px)); }
    .ai-head .ai-icon-btn { width: 40px; height: 40px; }
    .ai-foot { padding-bottom: calc(.6rem + env(safe-area-inset-bottom, 0px)); }
    .ai-form textarea { font-size: 16px; }
}
html.ai-locked, html.ai-locked body { overflow: hidden; overscroll-behavior: none; }
@media print { .ai-chat { display: none !important; } }
.ai-transcript { display: flex; flex-direction: column; gap: .8rem; }
.ai-line { padding: .6rem .8rem; border-radius: var(--radius); border: 1px solid var(--border); }
.ai-line-user { background: var(--surface-2); }
.ai-line.is-flagged { border-color: var(--red-strong); }
.ai-line-who { font-weight: 700; font-size: .85rem; margin-bottom: .2rem; }
.ai-line-text { white-space: normal; }

@media (max-width: 575px) { .row.g-5, .row.gx-5 { --bs-gutter-x: 1.5rem; } }

/* ---------------- About page and long-form pages ---------------- */
.article-body { line-height: 1.75; font-size: 1rem; color: var(--text-2); }
.article-body h2, .article-body h3 { color: var(--text); margin-top: 2rem; margin-bottom: .75rem; }
.article-body h2 { font-size: 1.4rem; }
.article-body h3 { font-size: 1.15rem; }
.article-body p { margin-bottom: 1.1rem; }
.article-body ul, .article-body ol { padding-left: 1.3rem; margin-bottom: 1.1rem; }
.article-body img { max-width: 100%; height: auto; border-radius: var(--radius); }
.article-body blockquote { border-left: 3px solid var(--primary); padding: .5rem 1rem; margin: 1.5rem 0; color: var(--text); font-weight: 500; background: var(--gold-tint); border-radius: 0 var(--radius) var(--radius) 0; }
.article-body table { width: 100%; border-collapse: collapse; margin-bottom: 1.25rem; }
.article-body td, .article-body th { border: 1px solid var(--border); padding: .5rem .7rem; }

.about-wrap { max-width: 1100px; }
.about-body { color: var(--text-2); line-height: 1.75; }
.about-body h2 { font-size: 1.5rem; margin: 0 0 .9rem; color: var(--text); font-weight: 800; letter-spacing: -.02em; }
.about-intro { max-width: 820px; margin: 0 0 3rem; }
.about-lead { font-size: 1.2rem; font-weight: 500; color: var(--text); }
.about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-bottom: 3rem; }
.about-card, .amb-card, .about-hq { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem 1.5rem; }
.about-kicker, .amb-country { color: var(--red-strong); text-transform: uppercase; letter-spacing: .16em; font-size: .68rem; font-weight: 700; margin-bottom: .45rem; }
.about-role { color: var(--muted); margin-top: -.5rem; }
.about-section { margin-bottom: 3rem; }
.about-timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--border-strong); }
.about-timeline li { position: relative; padding: 0 0 1.3rem 1.5rem; display: flex; flex-direction: column; }
.about-timeline li:last-child { padding-bottom: 0; }
.about-timeline li::before { content: ""; position: absolute; left: -7px; top: .45rem; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); border: 2px solid var(--bg); }
.about-when { font-weight: 800; color: var(--gold-text); }
.about-what { color: var(--text-2); }
.about-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-bottom: 3rem; }
.about-stat { border-top: 3px solid var(--primary); padding-top: 1rem; }
.about-stat strong { display: block; font-size: 2rem; font-weight: 800; letter-spacing: -.02em; color: var(--text); line-height: 1.1; }
.about-stat span { color: var(--muted); font-size: .88rem; }
.amb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.amb-name { font-size: 1.15rem; font-weight: 800; margin-top: .35rem; }
.amb-role { color: var(--muted); font-size: .88rem; }
.about-hq { text-align: center; }
.about-model { color: var(--muted); font-size: .9rem; margin-bottom: 0; }
.footer-address { color: var(--muted); }
@media (max-width: 767px) {
    .about-grid, .amb-grid, .about-stats { grid-template-columns: 1fr; }
    .about-lead { font-size: 1.05rem; }
}

/* ---------------- Public page banner (shared by every inner public page) ---------------- */
.page-banner { background: var(--ink); color: #F4F1EA; padding: 3.25rem 0 2.75rem; border-bottom: 4px solid var(--primary); }
.page-banner .section-kicker { color: var(--primary); }
.page-banner h1 { color: #F4F1EA; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; margin: 0; }
.page-banner p { color: #D9D4C7; max-width: 680px; margin: .75rem 0 0; font-size: 1.02rem; }
.crumbs { font-size: .78rem; color: #A39C8C; margin-bottom: .75rem; letter-spacing: .04em; }
.crumbs a { color: #A39C8C; }
.crumbs a:hover { color: var(--primary); }
.crumbs span::before { content: "/"; margin: 0 .5rem; opacity: .5; }
.page-body { padding: 3rem 0 4rem; }
.measure { max-width: 780px; }
