/* ==========================================================================
   VouchTrader — "Emerald trust" design system
   Forest #052E2B · Gold #E9B949 · Lime #84CC16 · Cream #FAF8F3
   ========================================================================== */

@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/inter-regular.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/inter-medium.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/inter-semibold.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/inter-bold.woff") format("woff"); }
@font-face { font-family: "Lora"; font-weight: 400 700; font-style: normal; font-display: swap; src: url("../fonts/lora-variable.woff") format("woff"); }
@font-face { font-family: "Lora"; font-weight: 400 700; font-style: italic; font-display: swap; src: url("../fonts/lora-italic-variable.woff") format("woff"); }

:root {
    /* Brand */
    --forest-950: #021C1A;
    --forest-900: #052E2B;
    --forest-800: #0A3D38;
    --forest-700: #0E4D46;
    --emerald-600: #0B6B5C;
    --emerald-500: #12866F;
    --gold-300: #F6DD94;
    --gold-400: #EFC963;
    --gold-500: #E9B949;
    --gold-600: #D4A12E;
    --gold-700: #8A6410;
    --lime-400: #A3E635;
    --lime-500: #84CC16;
    --lime-700: #3F6212;
    --facebook: #1877F2;

    /* Neutrals */
    --cream: #FAF8F3;
    --cream-2: #F3EFE4;
    --surface: #FFFFFF;
    --ink: #0F1F1C;
    --ink-2: #2A3A36;
    --muted: #5E6C67;
    --border: #E6E0D2;
    --border-strong: #D8D0BD;

    /* Feedback */
    --success-bg: #ECF7E3; --success-text: #2F5A0D;
    --error-bg: #FCEBEA;   --error-text: #9B1C1C;
    --info-bg: #E8F3F0;    --info-text: #0B5446;

    /* Type */
    --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-serif: "Lora", Georgia, "Times New Roman", serif;

    /* Shape & depth */
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(5, 46, 43, .06), 0 1px 1px rgba(5, 46, 43, .04);
    --shadow: 0 10px 30px -12px rgba(5, 46, 43, .22), 0 2px 6px rgba(5, 46, 43, .05);
    --shadow-lg: 0 30px 70px -20px rgba(2, 28, 26, .55);
    --ring: 0 0 0 3px rgba(233, 185, 73, .45);

    --container: 1160px;
    color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--emerald-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--forest-900); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.15; letter-spacing: -.015em; color: var(--forest-900); margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 3vw, 2.4rem); }
h2 { font-size: clamp(1.35rem, 2vw, 1.6rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.main { padding-top: 32px; padding-bottom: 64px; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--gold-500); color: var(--forest-900); padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 600; }
.skip-link:focus { left: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(5, 46, 43, .92);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; }
.brand-name { font-family: var(--font-serif); font-weight: 700; font-size: 1.32rem; letter-spacing: -.02em; color: #fff; }
.brand-name span { color: var(--gold-500); }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a, .nav .link-button {
    color: rgba(255, 255, 255, .82); text-decoration: none; font-weight: 500; font-size: .95rem;
    padding: 8px 12px; border-radius: 999px; transition: background .15s, color .15s; white-space: nowrap;
}
.nav a:hover, .nav .link-button:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav .btn { margin-left: 6px; }
@media (max-width: 720px) {
    .nav .nav-optional { display: none; }
    .nav { gap: 0; }
    .nav a, .nav .link-button { padding: 8px 9px; font-size: .9rem; }
    .brand-name { font-size: 1.15rem; }
}

/* ---------- Buttons ---------- */
.btn {
    --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-border: var(--border-strong);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: inherit; font-weight: 600; font-size: .98rem; line-height: 1.2; text-decoration: none; cursor: pointer;
    color: var(--btn-fg); background: var(--btn-bg); border: 1px solid var(--btn-border);
    border-radius: 999px; padding: 12px 22px; white-space: nowrap;
    transition: transform .12s ease, box-shadow .15s ease, background .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); color: var(--btn-fg); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-sm { padding: 7px 14px; font-size: .88rem; }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }
.btn-primary { --btn-bg: linear-gradient(180deg, var(--gold-400), var(--gold-500)); --btn-fg: var(--forest-900); --btn-border: var(--gold-600); background: linear-gradient(180deg, var(--gold-400), var(--gold-500)); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 6px 18px -8px rgba(212, 161, 46, .8); }
.btn-primary:hover { filter: brightness(1.04); }
.btn-secondary { --btn-bg: var(--surface); --btn-fg: var(--forest-900); --btn-border: var(--border-strong); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--muted); --btn-border: var(--border); }
.btn-ghost:hover { --btn-fg: var(--forest-900); background: var(--cream-2); box-shadow: none; }
.btn-outline-light { --btn-bg: rgba(255,255,255,.04); --btn-fg: #fff; --btn-border: rgba(255,255,255,.28); }
.btn-outline-light:hover { background: rgba(255,255,255,.1); --btn-fg: #fff; }
.btn-facebook { --btn-bg: var(--facebook); --btn-fg: #fff; --btn-border: #1464cc; }
.btn-facebook:hover { filter: brightness(1.06); --btn-fg: #fff; }
.btn-danger { --btn-bg: #B42318; --btn-fg: #fff; --btn-border: #9a1d14; margin-top: 14px; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--emerald-600); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Forms ---------- */
input, textarea, select {
    width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface);
    border: 1px solid var(--border-strong); border-radius: 12px; padding: 12px 14px;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus { outline: none; border-color: var(--gold-600); box-shadow: var(--ring); }
input[readonly] { background: var(--cream); color: var(--ink-2); }
label { display: block; font-weight: 600; font-size: .92rem; color: var(--ink-2); margin: 14px 0 6px; }
form.stack > button { margin-top: 16px; }
form.inline { display: inline; }
.field-error { color: var(--error-text); font-size: .88rem; display: block; margin-top: 6px; }
.copy-field { display: flex; gap: 8px; margin: 10px 0 12px; }
.copy-field input { flex: 1; font-size: .9rem; min-width: 0; }

/* ---------- Cards & layout ---------- */
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 26px; margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.card h2 { font-size: 1.3rem; }
.card.narrow { max-width: 600px; margin-left: auto; margin-right: auto; }
.card.highlight { border-color: var(--gold-400); background: linear-gradient(180deg, #FFFBEF, var(--surface)); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.grid-2 > .card { margin-bottom: 0; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Alerts ---------- */
.alert { border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; border: 1px solid transparent; }
.alert-success { background: var(--success-bg); color: var(--success-text); border-color: #D3EBC0; }
.alert-error { background: var(--error-bg); color: var(--error-text); border-color: #F5CFCB; }
.alert-info { background: var(--info-bg); color: var(--info-text); border-color: #CFE5DF; }

/* ---------- Avatars ---------- */
.avatar {
    position: relative; display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; flex-shrink: 0;
    background: linear-gradient(135deg, var(--emerald-500), var(--forest-800)); color: var(--gold-300); font-weight: 700;
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--gold-400);
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 38px; height: 38px; font-size: .78rem; }
.avatar-md { width: 46px; height: 46px; font-size: .92rem; }
.avatar-lg { width: 76px; height: 76px; font-size: 1.45rem; }
.avatar-xl { width: 124px; height: 124px; font-size: 2.2rem; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--gold-500), var(--shadow); }

/* ---------- Pills & badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; background: #FBF1D3; color: var(--gold-700); border-radius: 999px; padding: 3px 11px; font-size: .82rem; font-weight: 600; white-space: nowrap; }
.pill-muted { background: var(--cream-2); color: var(--muted); }
.badge-verified {
    display: inline-flex; align-items: center; gap: 6px; background: #EEF8E2; color: var(--lime-700);
    border: 1px solid #D5EDB8; border-radius: 999px; padding: 3px 10px 3px 6px; font-size: .8rem; font-weight: 600; margin-right: 8px;
}
.badge-verified::before {
    content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--lime-500) no-repeat center / 10px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.3 5 8.6l4.5-5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---------- Profile / dashboard ---------- */
.profile-header {
    position: relative; overflow: hidden; display: flex; gap: 24px; align-items: center;
    background: radial-gradient(600px 220px at 85% -40%, rgba(233, 185, 73, .28), transparent 70%),
                linear-gradient(135deg, var(--forest-900), var(--forest-800));
    border: 0; color: #fff; padding: 32px;
}
.profile-header::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 18px 18px;
    mask-image: linear-gradient(90deg, transparent, #000 70%);
}
.profile-header > * { position: relative; z-index: 1; }
.profile-header h1 { color: #fff; margin-bottom: .25em; }
.profile-header .muted { color: rgba(255,255,255,.72); }
.profile-header .muted a { color: var(--gold-400); }
.profile-header .badge-verified { background: rgba(132, 204, 22, .14); color: var(--lime-400); border-color: rgba(132, 204, 22, .35); }
.profile-header .avatar { box-shadow: 0 0 0 4px var(--forest-900), 0 0 0 6px var(--gold-500); }
.profile-header-body { flex: 1; min-width: 0; }
.profile-mini { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.stats { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
.stat {
    min-width: 128px; padding: 12px 16px; border-radius: 14px;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
}
.stat strong { display: block; font-family: var(--font-serif); font-size: 1.9rem; line-height: 1.05; color: var(--gold-400); }
.stat span { color: rgba(255,255,255,.75); font-size: .82rem; font-weight: 500; }
@media (max-width: 620px) {
    .profile-header { flex-direction: column; text-align: center; padding: 28px 20px; }
    .stats { justify-content: center; }
    .stat { min-width: 0; flex: 1 1 90px; }
}

.trader-list, .item-list { list-style: none; margin: 14px 0 0; padding: 0; }
.trader-row {
    display: flex; align-items: center; gap: 14px; padding: 14px 12px; margin: 0 -12px;
    border-radius: 14px; text-decoration: none; color: var(--ink); transition: background .15s;
}
.trader-row:hover { background: var(--cream); color: var(--ink); }
.trader-list li + li { border-top: 1px solid var(--border); }
.trader-row-name { flex: 1; font-weight: 600; }
.item-list li { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.item-list li:first-child { border-top: 0; }
.item-text { flex: 1; min-width: 180px; }
.item-text a { font-weight: 600; text-decoration: none; }
.comment { display: block; color: var(--muted); font-family: var(--font-serif); font-style: italic; margin-top: 2px; }

blockquote { margin: 14px 0; padding: 12px 18px; border-left: 3px solid var(--gold-500); background: var(--cream); border-radius: 0 12px 12px 0; color: var(--ink-2); font-family: var(--font-serif); font-style: italic; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
code { background: var(--cream-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; }
.prose li { margin-bottom: 6px; }

/* ==========================================================================
   Home page
   ========================================================================== */
.section { padding: 88px 0; }
.section-tight { padding: 64px 0; }
.section-head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.section-head h2, .hero h1, .cta-band h2 { text-wrap: balance; }
.section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--gold-700); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }

/* Hero */
.hero {
    position: relative; overflow: hidden; color: #fff;
    background:
        radial-gradient(900px 500px at 85% 10%, rgba(233, 185, 73, .20), transparent 60%),
        radial-gradient(700px 500px at 0% 100%, rgba(18, 134, 111, .35), transparent 60%),
        linear-gradient(180deg, var(--forest-900) 0%, var(--forest-950) 100%);
    padding: 72px 0 140px;
}
.hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px;
    background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); font-size: .86rem; color: rgba(255,255,255,.88); margin-bottom: 22px;
}
.hero-badge b { background: var(--gold-500); color: var(--forest-900); border-radius: 999px; padding: 2px 10px; font-size: .75rem; letter-spacing: .04em; }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 5.2vw, 4rem); line-height: 1.04; letter-spacing: -.03em; margin-bottom: 22px; }
.hero h1 em { font-style: italic; color: var(--gold-400); }
.hero-lead { font-size: clamp(1.05rem, 1.5vw, 1.22rem); color: rgba(255,255,255,.8); max-width: 560px; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 0; color: rgba(255,255,255,.78); font-size: .92rem; }
.hero-trust li { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust svg { width: 18px; height: 18px; color: var(--lime-400); flex-shrink: 0; }

/* Hero visual: mock profile card */
.hero-visual { position: relative; min-height: 460px; }
.mock-card {
    position: relative; z-index: 2; max-width: 430px; margin-left: auto;
    background: var(--surface); color: var(--ink); border-radius: 24px; padding: 22px;
    box-shadow: var(--shadow-lg); transform: rotate(-1.5deg);
    border: 1px solid rgba(255,255,255,.6);
}
.mock-top { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.mock-top .avatar { width: 58px; height: 58px; font-size: 1.15rem; }
.mock-name { font-family: var(--font-serif); font-weight: 700; font-size: 1.25rem; color: var(--forest-900); line-height: 1.2; }
.mock-url { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.mock-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 16px 0; }
.mock-stats div { background: var(--cream); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; }
.mock-stats b { display: block; font-family: var(--font-serif); font-size: 1.5rem; color: var(--forest-900); line-height: 1.1; }
.mock-stats span { font-size: .74rem; color: var(--muted); font-weight: 500; }
.mock-label { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 2px 0 6px; }
.mock-vouches { list-style: none; margin: 0; padding: 0; }
.mock-vouches li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); font-size: .88rem; }
.mock-vouches li:first-child { border-top: 0; }
.mock-vouches .avatar { width: 32px; height: 32px; font-size: .7rem; box-shadow: none; }
.mock-vouches .who { flex: 1; min-width: 0; }
.mock-vouches .who b { display: block; color: var(--ink); font-weight: 600; }
.mock-vouches .who i { color: var(--muted); font-family: var(--font-serif); font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.mock-vouches time { color: var(--muted); font-size: .76rem; white-space: nowrap; }
.mock-toast {
    position: absolute; z-index: 3; left: -8px; bottom: -34px; display: flex; align-items: center; gap: 10px;
    background: var(--surface); color: var(--ink); border-radius: 16px; padding: 12px 16px 12px 12px; box-shadow: var(--shadow-lg);
    font-size: .9rem; animation: float 6s ease-in-out infinite;
}
.mock-toast .tick { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--lime-500); color: #fff; }
.mock-toast .tick svg { width: 18px; height: 18px; }
.mock-toast small { display: block; color: var(--muted); font-size: .76rem; }
.mock-deal {
    position: absolute; z-index: 3; right: -8px; top: -14px; display: flex; align-items: center; gap: 8px;
    background: var(--forest-800); border: 1px solid rgba(255,255,255,.16); color: #fff; border-radius: 999px; padding: 8px 14px;
    font-size: .82rem; font-weight: 600; box-shadow: var(--shadow-lg); animation: float 7s ease-in-out infinite reverse;
}
.mock-deal span { color: var(--gold-400); }
.hero-bullion { position: absolute; z-index: 3; right: -36px; bottom: -64px; width: 210px; opacity: .95; filter: drop-shadow(0 18px 30px rgba(0,0,0,.35)); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .mock-toast, .mock-deal { animation: none; } html { scroll-behavior: auto; } }

@media (max-width: 960px) {
    .hero { padding: 40px 0 132px; }
    .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
    .hero-visual { min-height: 0; max-width: 460px; margin: 0 auto; width: 100%; }
    .mock-card { margin: 0 auto; }
    .hero-bullion { width: 150px; right: -14px; bottom: -58px; }
    .mock-toast { bottom: -30px; left: 0; right: auto; max-width: calc(100% - 120px); }
    .mock-deal { right: 0; top: -18px; }
}

/* Search band overlapping hero */
.search-band { position: relative; z-index: 5; margin-top: -76px; scroll-margin-top: 96px; } /* clears the sticky header when jumping to #find */
.search-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow);
    padding: 26px 28px; display: grid; grid-template-columns: auto 1fr; gap: 10px 28px; align-items: center;
}
.search-card h2 { margin: 0; font-size: 1.35rem; }
.search-card p { margin: 2px 0 0; color: var(--muted); font-size: .95rem; }
.search-form { display: flex; gap: 10px; }
.search-input { position: relative; flex: 1; }
.search-input svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search-input input { padding-left: 44px; height: 52px; border-radius: 999px; }
.search-form .btn { height: 52px; }
@media (max-width: 860px) { .search-card { grid-template-columns: 1fr; padding: 22px; } }
@media (max-width: 520px) { .search-form { flex-direction: column; } }

.results { margin-top: 18px; }
.results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }

/* Problem → solution */
.compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 28px; align-items: stretch; }
.compare-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.compare-col h3 { display: flex; align-items: center; gap: 10px; }
.compare-tag { font-family: var(--font-sans); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.compare-tag.before { background: var(--error-bg); color: var(--error-text); }
.compare-tag.after { background: #EEF8E2; color: var(--lime-700); }
.compare-arrow { display: grid; place-items: center; color: var(--gold-600); }
.compare-arrow svg { width: 40px; height: 40px; }
.chat { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.chat li { display: flex; gap: 10px; align-items: flex-start; }
.chat .avatar { width: 30px; height: 30px; font-size: .62rem; box-shadow: none; background: #D9DED9; color: #56635F; }
.chat .bubble { background: #F0F2F5; border-radius: 16px; padding: 8px 12px; font-size: .9rem; color: #1c1e21; }
.chat .bubble b { display: block; font-size: .78rem; }
.chat .faded { opacity: .55; }
.share-preview { margin-top: 16px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #fff; }
.share-preview .sp-img { height: 130px; background: linear-gradient(135deg, var(--forest-900), var(--emerald-600)); position: relative; display: flex; align-items: center; gap: 14px; padding: 0 20px; color: #fff; }
.share-preview .sp-img .avatar { width: 56px; height: 56px; }
.share-preview .sp-img b { font-family: var(--font-serif); font-size: 1.2rem; display: block; }
.share-preview .sp-img span { color: var(--gold-400); font-weight: 600; font-size: .9rem; }
.share-preview .sp-meta { padding: 12px 16px; background: #F0F2F5; }
.share-preview .sp-meta small { color: #65676b; text-transform: uppercase; font-size: .72rem; letter-spacing: .04em; }
.share-preview .sp-meta div { font-weight: 600; color: #1c1e21; font-size: .95rem; }
@media (max-width: 860px) { .compare { grid-template-columns: 1fr; } .compare-arrow { transform: rotate(90deg); } }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px 26px 26px; box-shadow: var(--shadow-sm); }
.step::before {
    counter-increment: step; content: counter(step, decimal-leading-zero);
    position: absolute; right: 22px; top: 18px; font-family: var(--font-serif); font-size: 2.6rem; font-weight: 700; color: var(--cream-2); line-height: 1;
}
.step-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px; background: linear-gradient(135deg, var(--forest-900), var(--emerald-500)); color: var(--gold-400); box-shadow: 0 10px 20px -10px rgba(5,46,43,.6); }
.step-icon svg { width: 28px; height: 28px; }
.step p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Features */
.features-wrap { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { padding: 26px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--cream); transition: transform .15s, box-shadow .15s, border-color .15s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--gold-400); }
.feature-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #FBF1D3; color: var(--gold-700); margin-bottom: 14px; }
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.12rem; margin-bottom: 6px; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }
@media (max-width: 960px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .features { grid-template-columns: 1fr; } }

/* Communities */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; color: var(--forest-900); box-shadow: var(--shadow-sm); }
.chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--gold-500); display: inline-block; }
.chip:nth-child(3n+2) i { background: var(--emerald-500); }
.chip:nth-child(3n) i { background: var(--lime-500); }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 0 22px; box-shadow: var(--shadow-sm); }
.faq details[open] { border-color: var(--gold-400); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; font-size: 1.04rem; color: var(--forest-900); display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--gold-600); line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 0 0 18px; }

/* CTA band */
.cta-band {
    position: relative; overflow: hidden; border-radius: 28px; padding: 56px 48px; color: #fff; text-align: center;
    background: radial-gradient(600px 300px at 50% -20%, rgba(233,185,73,.35), transparent 70%), linear-gradient(135deg, var(--forest-900), var(--forest-700));
    box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.cta-band p { color: rgba(255,255,255,.8); font-size: 1.1rem; max-width: 560px; margin: 0 auto 26px; }
.cta-band .btn { margin: 4px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest-950); color: rgba(255,255,255,.7); padding: 56px 0 28px; margin-top: 0; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { font-family: var(--font-sans); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: rgba(255,255,255,.82); text-decoration: none; }
.footer-grid a:hover { color: var(--gold-400); }
.footer-tagline { margin-top: 14px; max-width: 340px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .84rem; color: rgba(255,255,255,.5); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

/* Body wrapper so footer sits at the bottom on short pages */
body { min-height: 100vh; display: flex; flex-direction: column; }
.page { flex: 1; }

@media (max-width: 520px) {
    .hero h1 { font-size: 2.35rem; }
    .hero-actions .btn { width: 100%; }
    .mock-card { padding: 18px; transform: none; }
    .mock-stats b { font-size: 1.25rem; }
    .mock-vouches time { display: none; }
    .mock-deal { font-size: .74rem; padding: 6px 12px; }
    .mock-vouches li:nth-child(3) { display: none; }
    .mock-toast { bottom: -52px; max-width: 80%; }
    .section { padding: 64px 0; }
    .cta-band { padding: 40px 22px; }
    .cta-band .btn { width: 100%; margin: 6px 0; }
}

/* ---------- Profile layout ---------- */
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
/* Not sticky: a sticky sidebar taller than the window (e.g. with the report form open) can't be scrolled to the bottom. */
.profile-aside { position: static; }
.item-list li[hidden] { display: none; }
/* Search box above a long "Vouched for by" list. */
.list-search { margin: 14px 0 0; }
.list-search .search-input { display: block; }
.list-search .search-input input { height: 44px; border-radius: 999px; }
.list-search-status { margin: 8px 4px 0; min-height: 1em; }
.list-search-status:empty { display: none; }
.profile-aside .card h2 { font-size: 1.15rem; }
.disclaimer { padding: 0 6px; }
.date-chip { font-size: .78rem; font-weight: 600; color: var(--muted); background: var(--cream); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 26px 10px 10px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; color: var(--gold-600); margin-bottom: 8px; }
.empty p { margin: 0; }
@media (max-width: 900px) {
    .profile-layout { grid-template-columns: minmax(0, 1fr); }
    /* Phones: the action buttons (Ask, Record a deal, Report) come before the vouch list. */
    .profile-layout.actions-first .profile-aside { order: -1; }
}

/* ---------- Checkbox ---------- */
label.checkbox { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; color: var(--ink-2); margin: 18px 0 4px; cursor: pointer; line-height: 1.45; }
label.checkbox input[type="checkbox"] { width: 20px; height: 20px; flex-shrink: 0; margin: 1px 0 0; padding: 0; accent-color: var(--emerald-600); cursor: pointer; }
label.checkbox + .field-error + .btn, label.checkbox + .field-error + button { margin-top: 16px; }

/* ---------- Policy pages ---------- */
.policy h2 { scroll-margin-top: 90px; }
.policy-summary { background: linear-gradient(180deg, #FFFBEF, var(--surface)); border: 1px solid var(--gold-400); border-radius: 16px; padding: 18px 22px; margin: 18px 0 24px; }
.policy-summary h2 { margin: 0 0 8px; font-size: 1.15rem; }
.policy-summary ul { margin: 0; padding-left: 20px; }
.policy-toc { background: var(--cream); border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px; margin-bottom: 8px; font-size: .95rem; }
.policy-toc ol { margin: 8px 0 0; padding-left: 22px; columns: 2; column-gap: 32px; }
.policy-toc li { margin-bottom: 4px; break-inside: avoid; }
@media (max-width: 620px) { .policy-toc ol { columns: 1; } }
.table-wrap { overflow-x: auto; margin: 12px 0 16px; }
.policy-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.policy-table th, .policy-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.policy-table th { background: var(--cream); font-weight: 700; color: var(--forest-900); }
.policy-table td:last-child { width: 38%; color: var(--ink-2); }
.callout { border-left: 4px solid var(--gold-500); background: var(--cream); border-radius: 0 12px 12px 0; padding: 14px 18px; margin: 14px 0; }
.prose.policy, article.card.prose { margin-left: auto; margin-right: auto; max-width: 860px; }

.stop-emails { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Primary + secondary action on one row (wraps on small screens) */
.form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
form.stack > .form-actions > button { margin-top: 0; }
@media (max-width: 480px) { .form-actions { flex-direction: column-reverse; align-items: stretch; } .form-actions .btn { width: 100%; } }

/* ---------- Moderation: paused / unavailable profiles (neutral, never alarming) ---------- */
.paused-pill {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 8px 14px; border-radius: 999px;
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.85);
    font-weight: 600; font-size: .88rem;
}
.paused-pill svg { width: 16px; height: 16px; }
.paused-notice {
    display: flex; gap: 14px; align-items: flex-start; background: #F1F3F2; border: 1px solid #DDE2E0; color: var(--ink-2);
    border-radius: 14px; padding: 18px 20px; margin-bottom: 20px;
}
.paused-notice svg { flex: 0 0 22px; width: 22px; height: 22px; color: #5E6C67; margin-top: 2px; }
.paused-notice strong { display: block; font-size: 1.02rem; margin-bottom: 4px; color: var(--ink); }
.paused-notice p { margin: 0 0 6px; color: #3D4B47; }
.paused-notice p:last-child { margin-bottom: 0; }
.empty.paused svg { color: #8A9692; }
.tips { margin: 12px 0 0; padding-left: 18px; color: var(--ink-2); }
.tips li { margin: 6px 0; }
.unavailable { max-width: 560px; margin: 40px auto; text-align: center; }
.unavailable svg { width: 44px; height: 44px; color: #8A9692; margin-bottom: 10px; }
.unavailable h1 { font-size: 1.6rem; }

/* ---------- Reporting ---------- */
.report-link { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; margin-left: 4px; }
.report-link:hover { color: var(--ink-2); }
/* Profile action buttons (Ask to vouch, Record a deal, Report this profile) – each opens a side panel. */
.trade-actions h2 { margin-bottom: 4px; }
.trade-actions .btn { display: flex; width: 100%; margin: 10px 0 0; white-space: normal; text-align: center; }
.trade-actions .report-profile-btn, .report-profile-btn { margin-top: 14px; }
.vouched-note { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-weight: 600; color: var(--emerald-600); }
.vouched-note svg { width: 18px; height: 18px; flex-shrink: 0; }
.report-link svg { width: 13px; height: 13px; }
/* Side panels on the profile: narrower than the admin/dashboard ones, since they hold one short form. */
.case-panel.profile-panel { width: min(500px, 94vw); }
.case-panel.profile-panel:focus { outline: none; }
.vouch-summary { margin: 0 0 16px; padding: 0 14px; background: var(--cream); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.vouch-summary li { padding: 12px 0; }
.vouch-summary:not(:has(li > *)) { display: none; }
/* "Report this profile": the note about vouches only shows once "Fake or misleading vouches" is chosen. */
.field-help.fake-only { display: none; }
.report-form:has(#reportReason option[value="FakeVouches"]:checked) .field-help.fake-only { display: block; }

/* ---------- Admin area ---------- */
.nav-admin { color: var(--gold-400) !important; }
.admin-nav {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; margin: 0 0 20px; padding: 8px 10px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
}
.admin-nav a { padding: 6px 12px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .92rem; }
.admin-nav a:hover { background: var(--cream-2); }
.admin-nav a.active { background: var(--forest-900); color: #fff; }
.admin-nav-title { font-weight: 700; color: var(--forest-900); padding: 0 8px 0 4px; }
.admin-nav-help { margin-left: auto; font-size: .8rem; color: var(--muted); padding-right: 6px; }
.admin-title { font-size: 1.7rem; margin-bottom: 14px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-tile {
    display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px;
    color: var(--ink); text-decoration: none;
}
a.stat-tile:hover { border-color: var(--gold-400); }
.stat-tile strong { display: block; font-family: var(--font-serif); font-size: 1.8rem; line-height: 1.1; color: var(--forest-900); }
.stat-tile span { color: var(--muted); font-size: .85rem; }
.stat-tile.attention { border-color: var(--gold-500); background: #FFFBEF; }
.admin-list { list-style: none; margin: 8px 0 14px; padding: 0; }
.admin-list li { padding: 8px 0; border-top: 1px solid var(--border); }
.admin-list li:first-child { border-top: 0; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th, .admin-table td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--border); }
.admin-table th { background: var(--cream); font-weight: 700; color: var(--forest-900); white-space: nowrap; }
.admin-filter { display: grid; grid-template-columns: minmax(0, 1fr) 200px auto; gap: 12px; align-items: end; }
.admin-filter label { margin-top: 0; }
@media (max-width: 700px) { .admin-filter { grid-template-columns: minmax(0, 1fr); } }
.admin-inline-form { display: flex; gap: 6px; align-items: center; min-width: 220px; }
.admin-inline-form input { padding: 6px 10px; font-size: .85rem; }
.admin-trader-head { display: flex; gap: 20px; align-items: flex-start; }
.admin-trader-head h1 { font-size: 1.6rem; margin-bottom: 6px; }
.admin-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 10px 0 0; font-size: .92rem; }
.admin-facts dt { color: var(--muted); }
.admin-facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 620px) { .admin-trader-head { flex-direction: column; } .admin-facts { grid-template-columns: minmax(0, 1fr); } }
.admin-tabs { display: flex; gap: 6px; margin: 0 0 16px; }
.admin-tabs a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.admin-tabs a.active { background: var(--forest-900); color: #fff; border-color: var(--forest-900); }
.admin-report-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.admin-quote { margin: 12px 0; padding: 10px 14px; border-left: 3px solid var(--border-strong); background: var(--cream); border-radius: 0 10px 10px 0; white-space: pre-wrap; }
.admin-resolve { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; margin-top: 10px; }
@media (max-width: 620px) { .admin-resolve { grid-template-columns: minmax(0, 1fr); } }
.status-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; border: 1px solid var(--border); background: var(--cream); color: var(--ink-2); white-space: nowrap; }
.status-active { background: #EEF8E2; border-color: #D5EDB8; color: var(--lime-700); }
.status-paused { background: #F1F3F2; border-color: #DDE2E0; color: #3D4B47; }
.status-removed { background: #ECEDEC; border-color: #D3D6D4; color: #5E6C67; text-decoration: line-through; }

/* ---------- Report form (stricter, with error summary) ---------- */
.report-form .req { font-weight: 500; font-size: .78rem; color: var(--muted); margin-left: 6px; }
.field-help { display: block; font-size: .82rem; color: var(--muted); margin-top: 6px; }
.input-error, input.input-error, select.input-error, textarea.input-error { border-color: var(--error-text); }
.error-summary { border: 2px solid var(--error-text); background: var(--error-bg); color: var(--error-text); border-radius: 12px; padding: 12px 16px; margin: 10px 0 6px; }
.error-summary:focus { outline: none; box-shadow: var(--ring); }
.error-summary ul { margin: 6px 0 0; padding-left: 18px; }
.error-summary a { color: var(--error-text); }
.ref-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; white-space: nowrap; }

/* ---------- Admin: shared bits ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.span-all { grid-column: 1 / -1; margin: 0; }
.admin-subtitle { font-size: 1.05rem; color: var(--muted); margin: 6px 0 10px; }
.pill-warn { background: #FFF1DC; color: #8A4B08; text-decoration: none; }
.alert-warn { background: #FFF6E5; color: #7A4706; border-color: #F3D9A8; }
.admin-inline-form.wrap { flex-wrap: wrap; }
.admin-inline-form.wrap input { flex: 1 1 200px; }
.grid-2.tight { gap: 14px; margin-bottom: 0; }
.grid-2.tight h3 { font-size: 1rem; margin: 0; }
.overdue { color: var(--error-text); font-weight: 700; }
.stage-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; border: 1px solid var(--border); white-space: nowrap; }
.stage-new { background: #FFF1DC; border-color: #F3D9A8; color: #8A4B08; }
.stage-underreview { background: #FBF1D3; border-color: #F0DC9E; color: var(--gold-700); }
.stage-awaitingtrader { background: #E8F3F0; border-color: #CFE5DF; color: var(--info-text); }
.stage-replyreceived { background: #E7EEFC; border-color: #C9D8F6; color: #1D4ED8; }
.stage-decided { background: #EEF8E2; border-color: #D5EDB8; color: var(--lime-700); }
.stage-closed { background: var(--cream-2); color: var(--muted); }
.status-choices { border: 0; padding: 0; margin: 0; }
.status-choices legend { font-weight: 600; font-size: .92rem; color: var(--ink-2); margin: 14px 0 6px; }
label.radio { display: inline-flex; align-items: center; gap: 6px; margin: 0 14px 6px 0; font-weight: 500; cursor: pointer; }
label.radio input { width: 18px; height: 18px; margin: 0; accent-color: var(--emerald-600); }
.block-detail h2 { margin-bottom: 10px; }
.block-detail h3 { font-size: 1rem; margin: 18px 0 6px; }
.ref-lookup { grid-template-columns: minmax(0, 1fr) auto; }
.ref-lookup input[name="ref"] { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-transform: uppercase; }

/* ---------- Admin: cases list + side panel (full screen on phones) ---------- */
.case-table tr[data-href] { cursor: pointer; }
.case-table tr[data-href]:hover td { background: #FFFBEF; }
.case-table tr.selected td { background: #FBF1D3; }
.case-panel-backdrop { position: fixed; inset: 0; background: rgba(2, 28, 26, .35); z-index: 90; }
.case-panel {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(680px, 94vw); z-index: 100;
    background: var(--surface); box-shadow: var(--shadow-lg); overflow-y: auto; overscroll-behavior: contain;
    padding: 0 24px 40px;
}
.case-panel-head { position: sticky; top: 0; background: var(--surface); padding: 16px 0 12px; border-bottom: 1px solid var(--border); margin-bottom: 14px; z-index: 1; }
.case-panel-head h2 { font-size: 1.35rem; margin: 6px 0; }
.case-panel-head p { margin: 4px 0; }
.case-panel-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.case-panel-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.case-panel-links .btn { margin-top: 0; }
.case-panel-close { display: inline-block; font-weight: 600; text-decoration: none; color: var(--emerald-600); }
.panel-section { border-bottom: 1px solid var(--border); padding: 4px 0 18px; margin-bottom: 14px; }
.panel-section h3 { font-size: 1.05rem; margin: 6px 0 10px; }
.panel-section h4 { font-size: .92rem; color: var(--muted); margin: 14px 0 6px; }
details.panel-action > summary { cursor: pointer; font-weight: 700; color: var(--forest-900); padding: 6px 0; }
details.panel-action.danger > summary { color: #B42318; }
.hold-box { background: #FFF6E5; border: 1px solid #F3D9A8; border-radius: var(--radius-sm); padding: 12px 14px 16px; }
.case-report { padding: 10px 0; border-top: 1px solid var(--border); }
.case-report:first-of-type { border-top: 0; }
.case-report-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.case-report .admin-quote { margin: 8px 0 0; }
.evidence-list { list-style: none; margin: 0; padding: 0; }
.evidence-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--border); }
.evidence-list li:first-child { border-top: 0; }
.evidence-list li.reported { background: #FFFBEF; }
/* Evidence: signals, filters and bulk delete (case panel). */
.evidence-list li[hidden] { display: none; }
.evidence-form .evidence-list li { justify-content: flex-start; flex-wrap: nowrap; gap: 10px; align-items: flex-start; }
.evidence-pick { flex-shrink: 0; margin: 0; padding-top: 2px; cursor: pointer; }
.evidence-pick input { width: 18px; height: 18px; margin: 0; padding: 0; accent-color: #B42318; cursor: pointer; }
.evidence-body { min-width: 0; flex: 1; }
.evidence-line { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.evidence-comment { margin-top: 2px; color: var(--ink-2); }
.sig-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.sig-row:not(:has(*)) { display: none; }
.sig { display: inline-block; font-size: .74rem; font-weight: 700; border-radius: 999px; padding: 2px 9px; white-space: nowrap; border: 1px solid transparent; }
.sig-warn { background: #FFF1DC; color: #8A4B08; border-color: #F3D9A8; }
.sig-strong { background: #FDECEA; color: #A3261B; border-color: #F5C6C0; }
.sig-weak { background: var(--cream-2); color: var(--muted); border-color: var(--border); border-style: dashed; }
.sig-good { background: #E6F4EC; color: #1C6B43; border-color: #BFE3CF; }
.signal-strip { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.signal-chip { font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; border-radius: 999px; padding: 4px 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink-2); }
.signal-chip.chip-strong { border-color: #F5C6C0; color: #A3261B; }
.signal-chip.chip-warn { border-color: #F3D9A8; color: #8A4B08; }
.signal-chip.chip-weak { border-style: dashed; color: var(--muted); }
.signal-chip.chip-good { border-color: #BFE3CF; color: #1C6B43; }
.signal-chip.active { background: var(--forest-900); border-color: var(--forest-900); color: #fff; }
.signal-help { margin: 6px 0 4px; }
.evidence-show-all { margin: 8px 0 0 !important; }
.evidence-show-all[hidden] { display: none; }
.evidence-filter-status:empty { display: none; }
.bulk-bar { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: center; background: var(--surface); padding: 10px 0; border-top: 1px solid var(--border); margin-top: 12px; }
.bulk-bar input { flex: 1; min-width: 0; }
.bulk-bar .btn { margin: 0; white-space: nowrap; }
.bulk-bar .btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.note-form textarea { min-height: 64px; }
.note-form button { margin-top: 8px !important; }
.timeline { list-style: none; margin: 14px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 0 0 14px 12px; }
.timeline li::before { content: ""; position: absolute; left: -21px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--forest-900); border: 2px solid var(--surface); }
.timeline li.kind-report::before { background: var(--gold-500); }
.timeline li.kind-auto::before { background: var(--border-strong); }
.timeline li.kind-to-trader::before { background: var(--emerald-500); }
.timeline li.kind-from-trader::before { background: #1D4ED8; }
.timeline li.kind-to-trader .timeline-text { background: #EEF8F4; border-left: 3px solid var(--emerald-500); padding: 6px 10px; border-radius: 0 8px 8px 0; }
.timeline li.kind-from-trader .timeline-text { background: #EEF3FD; border-left: 3px solid #1D4ED8; padding: 6px 10px; border-radius: 0 8px 8px 0; }
.timeline-head { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.timeline-text { white-space: pre-wrap; margin-top: 2px; }
@media (max-width: 700px) {
    .case-panel { width: 100vw; padding: 0 16px 32px; box-shadow: none; }
    .case-panel-backdrop { background: var(--surface); }
    body:has(.case-panel:not([hidden])) { overflow: hidden; }
    .case-panel.profile-panel { width: 100vw; }
}

/* Block reason only shows once "Removed" is chosen (radio on the case panel, select on the trader page). */
.removal-only { display: none; }
form:has(input[name="status"][value="Removed"]:checked) .removal-only,
form:has(select[name="status"] option[value="Removed"]:checked) .removal-only { display: block; }

/* ---------- Review messages (information requests and replies) ---------- */
.pill-danger { background: var(--error-bg); color: var(--error-text); }
.pause-only, .ask-only { display: none; }
form:has(input[name="status"][value="Paused"]:checked) .pause-only,
form:has(select[name="status"] option[value="Paused"]:checked) .pause-only { display: block; }
form:has(.ask-toggle:checked) .ask-only { display: block; }

/* ---------- Case panel: "at a glance" summary and the status form ---------- */
.case-summary { background: var(--cream); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px 14px; }
.start-review { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.start-review .btn { margin: 0; }
.put-back { margin: 4px 0 0; font-size: .86rem; }
.put-back > summary { cursor: pointer; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; width: fit-content; list-style: none; }
.put-back > summary::-webkit-details-marker { display: none; }
.put-back[open] > summary { color: var(--ink-2); margin-bottom: 6px; }
.put-back .btn { margin: 0; }
.summary-grid { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: .92rem; }
.summary-grid dt { font-weight: 700; color: var(--muted); }
.summary-grid dd { margin: 0; }
/* Status form: only the choices show until one is picked; then only that status's fields, email line and help. */
.status-fields { display: none; }
form:has(input[name="status"]:checked) .status-fields { display: block; }
.notify-row, .for-paused, .for-removed, .for-active { display: none; }
form:has(input[name="status"][value="Paused"]:checked) .notify-row,
form:has(input[name="status"][value="Removed"]:checked) .notify-row,
form:has(input[name="status"][value="Active"]:checked) .notify-row.can-restore { display: block; }
form:has(input[name="status"][value="Paused"]:checked):has(.ask-toggle:checked) .notify-row { display: none; } /* always emailed when asking */
form:has(input[name="status"][value="Paused"]:checked) .for-paused,
form:has(input[name="status"][value="Removed"]:checked) .for-removed,
form:has(input[name="status"][value="Active"]:checked) .for-active { display: inline; }
.status-help { margin-top: 10px; }
.email-note { font-size: .88rem; background: #EEF8F4; border-left: 3px solid var(--emerald-500); padding: 8px 12px; border-radius: 0 8px 8px 0; margin: 10px 0 0; }
.wording-warning { background: #FFF6E5; border: 1px solid #F3D9A8; color: #7A4706; border-radius: var(--radius-sm); padding: 10px 14px; margin-top: 12px; }
.wording-warning p { margin: 0; }
.wording-warning label.checkbox { margin-top: 8px; }
.info-request { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; margin: 10px 0; }
.info-request.open { border-color: var(--emerald-500); }
.info-request-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.admin-quote.to-trader { border-left-color: var(--emerald-500); background: #EEF8F4; }
.admin-quote.from-trader { border-left-color: #1D4ED8; background: #EEF3FD; }
.case-search { grid-template-columns: minmax(0, 1fr) auto; }

/* Trader's review page */
.review-page .review-ref { font-size: .95rem; color: var(--muted); }
.review-thread { list-style: none; margin: 0; padding: 0; }
.review-thread li { border-radius: 12px; padding: 12px 16px; margin: 10px 0; white-space: pre-wrap; }
.review-thread li.from-us { background: #EEF8F4; border: 1px solid #CFE5DF; }
.review-thread li.from-you { background: var(--cream); border: 1px solid var(--border); margin-left: 24px; }
.review-thread .who { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 4px; white-space: normal; }

/* Dashboard: "My activity" tabs */
.activity-tabs { flex-wrap: wrap; }
#activity h3 { font-size: 1.05rem; margin: 6px 0 4px; }

/* Dashboard: "Find a trader" side panel (reuses .case-panel: right-hand panel on desktop, full screen on phones) */
.label-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 14px 0 6px; }
.label-row label { margin: 0; }
.find-trader-cta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.find-form { display: flex; gap: 8px; margin-top: 10px; }
.find-form input { flex: 1; }
.find-results li { align-items: flex-start; }
.find-results .item-text .small { display: block; }
.find-ask { flex-basis: 100%; }
.find-ask > summary { list-style: none; display: inline-flex; }
.find-ask > summary::-webkit-details-marker { display: none; }
.find-ask[open] > summary { margin-bottom: 4px; }
@media (min-width: 701px) { .find-ask { flex-basis: auto; } .find-ask[open] { flex-basis: 100%; } }

/* Dashboard: Register a deal */
.label-row .label-text { font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.label-row .req, #register .req { font-weight: 500; font-size: .78rem; color: var(--muted); margin-left: 6px; }
.selected-trader.empty.input-error { border-color: var(--error-text); border-style: solid; }
.selected-trader { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--cream); }
.selected-trader.empty { display: block; background: none; border-style: dashed; margin: 0; }
/* Deal descriptions can have several lines */
.item-text em, .pre-line { white-space: pre-line; }

/* Dashboard: review a deal before confirming */
.deal-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 18px 0; }
.deal-facts dt { color: var(--muted); font-size: .9rem; }
.deal-facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 520px) { .deal-facts { grid-template-columns: minmax(0, 1fr); } .deal-facts dd { margin-bottom: 6px; } }
.deal-comment { display: block; color: var(--ink-2); white-space: pre-line; margin-top: 2px; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Dashboard: sub-sections inside the profile and vouch-link cards */
.card-subsection { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.card-subsection > h3 { font-size: 1.15rem; margin: 0 0 4px; }

/* Dashboard: Register a deal panel */
.profile-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.register-panel .label-text { display: block; font-weight: 600; font-size: .92rem; color: var(--ink-2); margin: 14px 0 6px; }
.register-panel .req { font-weight: 500; font-size: .78rem; color: var(--muted); margin-left: 6px; }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; }
.search-row .btn, form.stack .search-row > button { margin-top: 0; }
.selected-trader .selected-change { margin: 0 0 0 auto !important; }
.find-results.compact li { padding: 10px 0; align-items: center; }
.find-results.compact li > button { margin-top: 0 !important; }

/* Search results: count, "Show more", and the Register a deal box that shows 5 at a time */
.results-count { margin: 10px 0 0; }
.show-more { margin: 10px 0 4px !important; }
.results-box { position: relative; max-height: 300px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 12px; margin-top: 8px; }
.results-box .find-results { margin: 0; }
.results-box .find-results.compact li { min-height: 60px; box-sizing: border-box; }
.results-box.more-below { -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent); mask-image: linear-gradient(to bottom, #000 82%, transparent); }

.panel-subtitle { font-size: 1.05rem; margin: 16px 0 4px; }

/* "How do you know them?" on the vouch page, and the label on profiles */
.how-know { border: 0; padding: 0; margin: 6px 0 4px; }
.how-know legend { font-weight: 600; font-size: .95rem; color: var(--ink-2); margin-bottom: 6px; }
.how-know .req { font-weight: 500; font-size: .78rem; color: var(--muted); margin-left: 6px; }
.how-know.has-error { border-left: 3px solid var(--error-text); padding-left: 12px; }
label.radio-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-weight: 500; cursor: pointer; }
label.radio-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--emerald-600); flex-shrink: 0; }
.other-only { display: none; margin: 4px 0 0 28px; }
.how-know:has(input[value="Other"]:checked) .other-only { display: block; }
.vouch-how { display: inline-block; font-size: .78rem; font-weight: 600; color: var(--emerald-600); background: #EEF8F4; border-radius: 999px; padding: 1px 9px; margin-left: 6px; vertical-align: middle; }
