/*
 * LinkSwap - shared styles for the customer, owner and admin sites.
 * The same file is copied into all three sites.
 *
 * Colours: deep navy for trust, muted gold for premium and sponsored spots,
 * green only for "verified", red only for errors and delete.
 *
 * Light / dark mode: colours are tokens below. html[data-theme="dark"] switches them.
 */

/* ---------- Colour tokens: light (navy + gold) ---------- */
:root {
    color-scheme: light;
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-2: #f9fafb;
    --text: #16202e;
    --muted: #5a6577;
    --line: #e1e5eb;
    --line-strong: #c9d0da;
    --accent: #1b3a6b;          /* deep navy: buttons and links */
    --accent-hover: #132b52;
    --accent-bg: #e9eef6;
    --on-accent: #ffffff;
    --gold: #b08d57;            /* premium details */
    --mark: #c9a66b;            /* sponsored label */
    --mark-text: #261b07;
    --sponsor-bg: #fbf7ef;
    --ok: #1f7a55;   --ok-bg: #e4f3eb;
    --warn: #8f5a00; --warn-bg: #fbf0dc;
    --bad: #b42318;  --bad-bg: #fde8e6;
    --info: #1b3a6b; --info-bg: #e9eef6;
    --focus: #1b3a6b;
}
body.area-admin { --accent: #2a3445; --accent-hover: #1b2230; --accent-bg: #e8eaee; --focus: #2a3445; }

/* ---------- Colour tokens: dark ---------- */
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0f141c;
    --surface: #171d27;
    --surface-2: #1d2430;
    --text: #e7eaef;
    --muted: #9aa4b2;
    --line: #273040;
    --line-strong: #364154;
    --accent: #8fb0e8;
    --accent-hover: #b5ccf2;
    --accent-bg: #1c2a42;
    --on-accent: #0b1424;
    --gold: #c9a66b;
    --mark: #c9a66b;
    --mark-text: #1e1606;
    --sponsor-bg: #221e15;
    --ok: #5fc79a;   --ok-bg: #16302a;
    --warn: #f0b860; --warn-bg: #33270f;
    --bad: #f59a92;  --bad-bg: #3a1c1a;
    --info: #8fb0e8; --info-bg: #1c2a42;
    --focus: #8fb0e8;
}
:root[data-theme="dark"] body.area-admin { --accent: #b7c1d1; --accent-hover: #d6dce6; --accent-bg: #252c38; --on-accent: #12161d; --focus: #b7c1d1; }

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: "Schibsted Grotesk", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 2rem; letter-spacing: -0.02em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
code { background: var(--accent-bg); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
ol, ul { padding-left: 1.25rem; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.main { flex: 1; padding-top: 28px; padding-bottom: 56px; }
.narrow { max-width: 520px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 1rem; }
.mb-0 { margin-bottom: 0; }
.inline { display: inline; }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* ---------- Top bar ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-inner { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; letter-spacing: -0.02em; }
.brand:hover { color: var(--text); text-decoration: none; }
.brand-mark { color: var(--gold); display: inline-flex; }
.brand-tag { font-size: .9rem; font-weight: 500; color: var(--muted); letter-spacing: 0; padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--line-strong); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.nav a { color: var(--muted); padding: 7px 10px; border-radius: 6px; font-weight: 500; text-decoration: none; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav a.btn-nav { background: var(--accent); color: var(--on-accent); margin-left: 6px; }
.nav a.btn-nav:hover { background: var(--accent-hover); }
.nav-toggle {
    display: none; margin-left: auto; background: none; color: var(--text);
    border: 1px solid var(--line-strong); border-radius: 6px; font-size: 1.1rem; padding: 4px 10px; cursor: pointer;
}
.theme-toggle {
    flex-shrink: 0; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
    background: none; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 6px; cursor: pointer;
}
.theme-toggle:hover { color: var(--text); border-color: var(--muted); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .nav { display: none; position: absolute; left: 0; right: 0; top: 60px; background: var(--surface); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; border-bottom: 1px solid var(--line); }
    .nav.open { display: flex; }
    .nav a.btn-nav { margin: 6px 0 0; text-align: center; }
    .nav a.active { box-shadow: inset 2px 0 0 var(--accent); }
}

/* ---------- Footer (always deep navy, in light and dark mode) ---------- */
.footer {
    --f-bg: #12284a;
    --f-bottom: #0b1a31;
    --f-text: #e9edf3;
    --f-muted: #a9b5c8;
    --f-line: rgba(255, 255, 255, .12);
    --f-gold: #c9a66b;
    background: var(--f-bg);
    color: var(--f-muted);
    margin-top: 0;
}
:root[data-theme="dark"] .footer { --f-bg: #0c1b33; --f-bottom: #07122a; border-top: 1px solid var(--line); }
.footer a { color: var(--f-text); text-decoration: none; }
.footer a:hover { color: var(--f-gold); text-decoration: underline; text-underline-offset: 3px; }
.footer a:focus-visible { outline-color: var(--f-gold); }

.footer-main {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
    gap: 40px;
    padding-top: 56px;
    padding-bottom: 48px;
}
.footer-logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; }
.footer-logo svg { color: var(--f-gold); }
.footer-logo:hover { text-decoration: none !important; }
.footer-brand p { margin: 14px 0 16px; max-width: 34ch; line-height: 1.6; }
.footer-contact { font-weight: 600; }

.footer-col h2 { color: var(--f-text); font-size: 1rem; font-weight: 700; margin: 4px 0 14px; letter-spacing: 0; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li + li { margin-top: 10px; }
.footer-col a { color: var(--f-muted); }

.footer-bottom { background: var(--f-bottom); border-top: 1px solid var(--f-line); }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; font-size: .88rem; }
.footer-top { color: var(--f-muted) !important; }
.footer-slim { background: var(--f-bottom); }

@media (max-width: 860px) {
    .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    .footer-main { grid-template-columns: 1fr; padding-top: 40px; }
}

/* ---------- Panels (cards) ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 22px; }
.card + .card { margin-top: 18px; }
.grid > .card, .grid > form.card, form.grid > .card { margin-top: 0; }
.grid + .card, .grid + form.card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
    padding: 9px 16px; border-radius: 6px; font: inherit; font-weight: 600; cursor: pointer; line-height: 1.2;
    text-decoration: none;
}
.btn:hover { text-decoration: none; color: var(--text); border-color: var(--muted); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-success { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.btn-success:hover { color: var(--surface); opacity: .9; }
.btn-danger-outline { color: var(--bad); border-color: var(--bad-bg); background: var(--surface); }
.btn-danger-outline:hover { color: var(--bad); border-color: var(--bad); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 5px 10px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ---------- Forms ---------- */
.form-row { margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
.hint { font-weight: 400; color: var(--muted); font-size: .85rem; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], select, textarea {
    width: 100%; font: inherit; color: var(--text); background: var(--surface);
    border: 1px solid var(--line-strong); border-radius: 6px; padding: 9px 12px;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
textarea { min-height: 110px; resize: vertical; }
input[type=file] { font: inherit; color: var(--muted); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 10px 0 16px; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; }
.errors { background: var(--bad-bg); color: var(--bad); border-radius: 6px; padding: 10px 14px 10px 32px; margin: 0 0 16px; }
.errors li { margin: 2px 0; }

/* ---------- Alerts ---------- */
.alert { position: relative; padding: 11px 40px 11px 14px; border-radius: 6px; margin-bottom: 16px; font-weight: 500; border-left: 3px solid currentColor; }
.alert-success { background: var(--ok-bg); color: var(--ok); }
.alert-error { background: var(--bad-bg); color: var(--bad); }
.alert-info { background: var(--info-bg); color: var(--info); }
.alert-warning { background: var(--warn-bg); color: var(--warn); }
.alert-close { position: absolute; right: 10px; top: 7px; background: none; border: 0; font-size: 1.3rem; color: inherit; cursor: pointer; opacity: .6; }

/* ---------- Badges ---------- */
.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: 1px 8px; border-radius: 4px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge-approved, .badge-active { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge-pending { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge-rejected, .badge-banned, .badge-cancelled { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.badge-info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.badge-muted { background: transparent; }
/* Listing type is information, not a status, so it reads as plain text */
.badge-sell, .badge-exchange, .badge-both { background: none; border: 0; padding: 0; font-size: .92rem; font-weight: 500; color: var(--muted); }
.badge-verified { background: transparent; border: 0; padding: 0; color: var(--ok); }
.badge-verified::before { content: "✓ "; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; position: relative; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .82rem; color: var(--muted); font-weight: 600; border-bottom-color: var(--line-strong); }
tr:last-child td { border-bottom: 0; }
td .sub { display: block; color: var(--muted); font-size: .85rem; }

/* ---------- Stats (dashboards): one summary bar, not separate tiles ---------- */
.grid:has(> .stat) { gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.stat { padding: 16px 20px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-label { color: var(--muted); font-size: .88rem; }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.2; margin: 2px 0 2px; font-variant-numeric: tabular-nums; }
.stat a, .stat span { font-size: .85rem; }
@media (max-width: 960px) {
    .stat:nth-child(3) { border-left: 0; }
    .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 620px) {
    .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
}

/* =========================================================
   Customer site
   ========================================================= */

/* Home: intro */
.intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 24px 0 56px; border-bottom: 1px solid var(--line); }
.intro h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; max-width: 15ch; }
.intro .lead { font-size: 1.12rem; color: var(--muted); max-width: 52ch; }
@media (max-width: 860px) { .intro { grid-template-columns: 1fr; gap: 32px; } }

/* Home: the "how a link works" illustration */
.link-demo { position: relative; display: grid; gap: 14px; }
.demo-page { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.demo-bar { display: flex; align-items: center; gap: 8px; padding: 7px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.demo-bar::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); box-shadow: 12px 0 0 var(--line-strong), 24px 0 0 var(--line-strong); margin-right: 26px; }
.demo-body { padding: 14px 16px 16px; font-size: .95rem; }
.demo-body .line { height: 8px; border-radius: 4px; background: var(--line); margin: 7px 0; }
.demo-body p { margin: 10px 0; line-height: 1.6; }
.demo-body a { font-weight: 600; }
.demo-arrow { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .88rem; padding-left: 28px; }
.demo-arrow svg { flex-shrink: 0; color: var(--accent); }
.demo-target { margin-left: 56px; }
.demo-target .demo-body { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.demo-target strong { font-size: 1.05rem; }
.demo-gain { color: var(--ok); font-weight: 600; font-size: .9rem; }
@media (max-width: 520px) { .demo-target { margin-left: 20px; } .demo-arrow { padding-left: 8px; } }

/* Home: explanation sections */
.explain { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; padding: 44px 0; border-bottom: 1px solid var(--line); }
.explain > h2 { font-size: 1.35rem; margin: 0; }
.explain-body { max-width: 760px; }
.explain-body > p { color: var(--muted); max-width: 64ch; }
@media (max-width: 760px) { .explain { grid-template-columns: 1fr; gap: 12px; padding: 32px 0; } }

.ways { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.ways > div { padding: 20px 22px; }
.ways > div + div { border-left: 1px solid var(--line); }
.ways h3 { margin-bottom: 6px; }
.ways p { color: var(--muted); margin-bottom: 10px; }
.ways .fit { font-size: .9rem; margin: 0; }
@media (max-width: 620px) { .ways { grid-template-columns: 1fr; } .ways > div + div { border-left: 0; border-top: 1px solid var(--line); } }

.terms { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0; margin: 0; }
.terms dt { font-weight: 700; padding: 12px 24px 12px 0; border-top: 1px solid var(--line); }
.terms dd { margin: 0; padding: 12px 0; border-top: 1px solid var(--line); color: var(--muted); }
.terms dt:first-of-type, .terms dt:first-of-type + dd { border-top: 0; }
@media (max-width: 520px) { .terms { grid-template-columns: 1fr; } .terms dd { border-top: 0; padding-top: 0; } }

/* Home: categories as a directory */
.browse-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 48px 0 14px; }
.browse-head h2 { font-size: 1.6rem; margin: 0; letter-spacing: -0.02em; }
.cat-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.cat-list li { border-top: 1px solid var(--line); }
.cat-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 14px 0; text-decoration: none; color: var(--text); }
.cat-list a:hover .cat-name { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.cat-name { font-weight: 700; font-size: 1.05rem; }
.cat-count { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; align-self: center; grid-row: span 2; }
.cat-desc { color: var(--muted); font-size: .9rem; }
@media (max-width: 620px) { .cat-list { grid-template-columns: 1fr; } }

.owner-band { margin-top: 56px; padding: 28px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.owner-band h2 { margin: 0 0 4px; }
.owner-band p { margin: 0; color: var(--muted); max-width: 60ch; }

.section-title { display: flex; justify-content: space-between; align-items: baseline; margin: 40px 0 14px; gap: 12px; }
.section-title h2 { margin: 0; }

/* Listings: one card per website */
.listings { display: grid; gap: 12px; }
.listing {
    display: grid; grid-template-columns: 132px minmax(0, 1fr) 190px; gap: 22px; align-items: stretch;
    padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; position: relative;
    transition: border-color .15s, box-shadow .15s;
}
.listing:hover { border-color: var(--line-strong); box-shadow: 0 6px 18px -12px rgba(16, 32, 64, .35); }

.listing-thumb { text-decoration: none; display: block; align-self: start; }
.listing-thumb:hover .site-thumb { border-color: var(--gold); }

/* A website's picture in a small browser frame */
.site-thumb {
    display: flex; flex-direction: column; width: 132px; flex: none; border-radius: 9px; overflow: hidden;
    border: 1px solid var(--line-strong); background: var(--surface); box-shadow: 0 4px 12px -8px rgba(16, 32, 64, .45);
    transition: border-color .15s;
}
.site-thumb-bar { display: flex; gap: 4px; align-items: center; height: 14px; padding: 0 7px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.site-thumb-bar i { width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); }
.site-thumb-view { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; background: var(--accent-bg); overflow: hidden; }
.site-thumb-view img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.site-thumb-letter { font-size: 2rem; font-weight: 800; color: var(--accent); }
.site-thumb.lg { width: 180px; margin: 0 auto 6px; }

.listing-main { min-width: 0; display: flex; flex-direction: column; }
.listing-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.listing-name { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; line-height: 1.3; }
.listing-name:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.listing-title .badge-verified { font-size: .84rem; }
.listing-host { color: var(--muted); font-size: .9rem; margin: 2px 0 0; }
.listing-desc { color: var(--text); opacity: .85; font-size: .93rem; margin: 10px 0 0; max-width: 65ch; }

.listing-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.listing-stats > div { display: flex; align-items: baseline; gap: 6px; padding: 5px 10px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }
.listing-stats dt { font-size: .8rem; color: var(--muted); order: 2; }
.listing-stats dd { margin: 0; font-weight: 700; font-size: .95rem; font-variant-numeric: tabular-nums; order: 1; }
.listing-stats .stat-da { background: var(--accent-bg); border-color: transparent; }
.listing-stats .stat-da dd { color: var(--accent); }

.listing-seller {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap; align-self: stretch;
    margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: .88rem; color: var(--muted); text-decoration: none;
}
.listing-seller strong { color: var(--text); font-weight: 600; }
.listing-seller:hover strong { color: var(--accent); text-decoration: underline; }
/* old */ .seller-dot-unused { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--on-accent); font-size: .66rem; font-weight: 700; }
.listing-seller-rating { display: inline-flex; align-items: center; gap: 4px; color: var(--text); }
.listing-seller-rating .stars { font-size: .85rem; }

.listing-offer {
    display: flex; flex-direction: column; align-items: flex-end; justify-content: center; text-align: right;
    padding-left: 22px; border-left: 1px solid var(--line);
}
.offer-type { font-size: .78rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.offer-sell { background: var(--accent-bg); color: var(--accent); border-color: transparent; }
.offer-exchange { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.offer-both { background: var(--sponsor-bg); color: var(--gold); border-color: var(--gold); }
.price { font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 10px; line-height: 1.1; }
.price small { font-weight: 400; color: var(--muted); font-size: .8rem; letter-spacing: 0; }
.price-note { color: var(--muted); font-size: .82rem; }
.listing-offer .btn { margin-top: 12px; width: 100%; justify-content: center; text-align: center; }

@media (max-width: 860px) {
    .listing { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 16px; }
    .listing .site-thumb { width: 72px; }
    .listing .site-thumb-bar { height: 10px; }
    .listing .site-thumb-letter { font-size: 1.4rem; }
    .listing-offer {
        grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px 10px;
        padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line); text-align: left;
    }
    .listing-offer .price { margin: 0 0 0 auto; font-size: 1.25rem; }
    .listing-offer .offer-type { order: -1; }
    .listing-offer .btn { width: auto; margin: 0; }
}
@media (max-width: 600px) {
    .listing { grid-template-columns: minmax(0, 1fr); }
    .listing-thumb { display: none; }
    .listing-offer .btn { width: 100%; }
}

/* Sponsored = highlighted */
.listing.is-sponsored { background: var(--sponsor-bg); border-color: var(--gold); }
.sponsor-label { display: inline-block; align-self: flex-start; background: var(--mark); color: var(--mark-text); font-size: .76rem; font-weight: 700; letter-spacing: .02em; padding: 1px 8px; border-radius: 3px; margin-bottom: 6px; }
.sponsored-slot { margin-bottom: 18px; }
.slot-free { border: 1px dashed var(--line-strong); border-radius: 10px; padding: 14px 18px; color: var(--muted); font-size: .92rem; margin-bottom: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Category page filters */
.filters { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 18px; }
.filters .form-row { margin: 0; min-width: 118px; flex: 1 1 118px; }
.filters .form-row label { white-space: nowrap; }
.filters .form-row:has(#type) { flex-basis: 150px; min-width: 150px; }
.filters .check { margin: 0 0 10px; white-space: nowrap; }
.filters .btn { flex: none; }
.result-count { color: var(--muted); font-size: .92rem; margin: 0 0 10px; }

/* Site detail page */
.detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .detail-grid { grid-template-columns: 1fr; } }
.shot { border-radius: 8px; border: 1px solid var(--line); overflow: hidden; background: var(--surface-2); }
.shot-empty { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0; margin: 0; }
.kv dt { color: var(--muted); padding: 9px 16px 9px 0; border-top: 1px solid var(--line); white-space: nowrap; }
.kv dd { margin: 0; min-width: 0; font-weight: 600; text-align: right; padding: 9px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.kv dt:first-of-type, .kv dt:first-of-type + dd { border-top: 0; }
.empty { text-align: center; padding: 36px 20px; color: var(--muted); }

.link-list { padding-left: 18px; }
.link-list li { margin: 6px 0; }

/* =========================================================
   Owner + admin
   ========================================================= */
.ad-preview { display: grid; gap: 5px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.ad-preview div { border-radius: 3px; background: var(--surface); border: 1px solid var(--line); height: 16px; }
.ad-preview div.hl { background: var(--gold); border-color: var(--gold); }
.ad-preview div.big { height: 28px; }
.summary-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.summary-box .total { font-size: 1.7rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.preview-img { margin-top: 10px; max-width: 260px; border-radius: 6px; border: 1px solid var(--line); }
.auth-card { max-width: 420px; margin: 24px auto; }
details summary { cursor: pointer; }

/* =========================================================
   Purchaser account (customer site: account.php)
   ========================================================= */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.account { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }

.account-side {
    position: sticky; top: 84px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
    padding: 22px;
}
.account-id { display: flex; align-items: center; gap: 12px; }
.account-id strong { display: block; font-size: 1.05rem; overflow-wrap: anywhere; }
.account-id div > span { display: block; color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.account-id { min-width: 0; }
.account-avatar {
    flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent); color: var(--on-accent);
    font-weight: 700; font-size: 1.05rem; letter-spacing: .02em;
}
.account-avatar.has-logo { background: transparent; overflow: hidden; }
.account-avatar.has-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.account-since { color: var(--muted); font-size: .85rem; margin: 14px 0 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }

.account-nav { display: grid; gap: 2px; margin-bottom: 18px; }
.account-nav a {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 6px;
    color: var(--muted); font-weight: 600; text-decoration: none;
}
.account-nav a:hover { background: var(--surface-2); color: var(--text); }
.account-nav a[aria-current="page"] { background: var(--accent-bg); color: var(--accent); box-shadow: inset 3px 0 0 var(--gold); }
.account-nav a span { font-size: .8rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }

.account-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.account-head h1 { margin: 0 0 4px; }
.account-head p { margin: 0; color: var(--muted); max-width: 60ch; }

.account-summary {
    margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
}
.account-summary > div { padding: 16px 20px; }
.account-summary > div + div { border-left: 1px solid var(--line); }
.account-summary dt { color: var(--muted); font-size: .85rem; }
.account-summary dd { margin: 4px 0 0; font-size: 1.5rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.account-summary > div:last-child dd { color: var(--gold); }
.account-note { color: var(--muted); font-size: .85rem; margin: 10px 2px 20px; max-width: 80ch; }

.account-empty { text-align: center; padding: 44px 24px; }
.account-empty p { color: var(--muted); max-width: 46ch; margin: 0 auto 18px; }

.deal-table { padding: 0; overflow: hidden; }
.deal-table th { padding-top: 14px; }
.deal-table th:first-child, .deal-table td:first-child { padding-left: 20px; }
.deal-table th:last-child, .deal-table td:last-child { padding-right: 16px; }
.deal-name { font-weight: 700; color: var(--text); text-decoration: none; }
a.deal-name:hover { color: var(--accent); text-decoration: underline; }
.deal-status select { width: auto; min-width: 140px; padding: 6px 10px; font-size: .9rem; font-weight: 600; }
.deal-status select.status-agreed { color: var(--warn); }
.deal-status select.status-live { color: var(--ok); }
.deal-status select.status-closed { color: var(--muted); }
.deal-remove { color: var(--muted); border-color: transparent; }
.deal-remove:hover { color: var(--bad); border-color: var(--bad-bg); }

.account-form { max-width: 560px; }
.account-form .btn-primary { margin-top: 4px; }

@media (max-width: 860px) {
    .account { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .account-side { position: static; }
    .account-nav { grid-template-columns: repeat(3, auto); justify-content: start; }
    .account-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .account-summary > div:nth-child(3) { border-left: 0; }
    .account-summary > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Phones: each deal becomes a small card instead of a wide table row */
@media (max-width: 620px) {
    .deal-table thead { display: none; }
    .deal-table table, .deal-table tbody { display: block; }
    .deal-table tr {
        display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px;
        padding: 16px 18px; border-bottom: 1px solid var(--line);
    }
    .deal-table tr:last-child { border-bottom: 0; }
    .deal-table td, .deal-table td:first-child, .deal-table td:last-child { display: block; padding: 0; border: 0; text-align: left; }
    .deal-table td:nth-child(1) { grid-column: 1 / -1; }
    .deal-table td:nth-child(2) { color: var(--muted); font-size: .9rem; }
    .deal-table td:nth-child(3) { text-align: right; font-weight: 600; }
    .deal-table td:nth-child(4) { grid-column: 1 / -1; color: var(--muted); font-size: .85rem; }
    .deal-table td:nth-child(4)::before { content: "Contacted "; }
    .deal-table td:nth-child(5) { margin-top: 8px; }
    .deal-table td:nth-child(6) { margin-top: 8px; align-self: center; }
    .account-nav a span { margin-left: 2px; }
}

/* =========================================================
   Listing form fields (owner form + Admin > Listing form)
   ========================================================= */
.form-grid .form-row.full { grid-column: 1 / -1; }
.optional { font-weight: 400; color: var(--muted); font-size: .82rem; margin-left: 4px; }
.field-editor { margin-bottom: 18px; border-color: var(--accent); }
.field-table tr.is-hidden td { opacity: .55; }
.field-table td:first-child { width: 70px; font-variant-numeric: tabular-nums; }
.fixed-section { background: var(--surface-2); border-style: dashed; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { color: #fff; opacity: .9; border-color: var(--bad); }
.field-editor.danger { border-color: var(--bad); }
.delete-summary { padding-left: 1.2rem; margin: 0 0 16px; color: var(--muted); }
.delete-summary li + li { margin-top: 6px; }
.delete-summary strong { color: var(--text); }
.section-pos { font-size: .8rem; font-weight: 500; color: var(--muted); margin-left: 8px; }

/* =========================================================
   Featured ads (top of a category page, up to 3 at once)
   ========================================================= */
.featured { margin: 4px 0 26px; }
.featured-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 12px; color: var(--muted); letter-spacing: 0; }
.featured-grid { display: grid; gap: 18px; }
.featured-2 .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.featured-3 .featured-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.featured-card {
    display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
    box-shadow: 0 1px 0 var(--line), 0 12px 28px -18px rgba(18, 40, 74, .45);
    transition: border-color .15s;
}
.featured-card:hover { border-color: var(--gold); }

.featured-cover {
    position: relative; display: block; aspect-ratio: 1200 / 630;
    background: #12284a; overflow: hidden;
}
.featured-cover img { width: 100%; height: 100%; object-fit: cover; }
.featured-cover-text {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px;
    color: #f3f5f8; font-size: clamp(1.3rem, 2.4vw, 1.9rem); font-weight: 700; letter-spacing: -0.02em; text-align: center;
    background: radial-gradient(120% 90% at 85% 10%, rgba(201, 166, 107, .28), transparent 60%);
}
.featured-cover .sponsor-label { position: absolute; top: 12px; left: 12px; margin: 0; }

.featured-body { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 18px; flex: 1; }
.featured-name { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.featured-name:hover { color: var(--accent); text-decoration: underline; }
.featured-body .listing-host { margin: 0; }
.featured-desc { color: var(--muted); font-size: .92rem; margin: 6px 0 0; }
.featured-foot {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line);
}
.featured-desc + .featured-foot, .listing-host + .featured-foot { margin-top: 14px; }
.featured-stats { color: var(--muted); font-size: .9rem; }
.featured-stats strong { color: var(--text); font-variant-numeric: tabular-nums; }
.featured-offer small { color: var(--muted); }
.featured-foot .btn { margin-left: auto; }

/* One featured site: a wide banner, cover on the left */
.featured-1 .featured-card { flex-direction: row; }
.featured-1 .featured-cover { flex: 0 0 46%; aspect-ratio: auto; min-height: 250px; }
.featured-1 .featured-body { padding: 24px 28px; justify-content: center; }
.featured-1 .featured-name { font-size: 1.5rem; }
.featured-1 .featured-desc { font-size: 1rem; max-width: 56ch; }
.featured-1 .featured-foot { margin-top: 18px; }

@media (max-width: 960px) {
    .featured-3 .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .featured-2 .featured-grid, .featured-3 .featured-grid { grid-template-columns: minmax(0, 1fr); }
    .featured-1 .featured-card { flex-direction: column; }
    .featured-1 .featured-cover { flex: none; aspect-ratio: 1200 / 630; min-height: 0; }
    .featured-1 .featured-body { padding: 16px 18px 18px; }
    .featured-1 .featured-name { font-size: 1.2rem; }
}

.cover-thumb { display: block; width: 120px; margin-top: 6px; border-radius: 4px; border: 1px solid var(--line); }
#cover-row[hidden] { display: none; }

/* =========================================================
   Checkout, card form, receipts, link orders
   ========================================================= */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.checkout-main h1 { margin: 2px 0 4px; }
.checkout-main > .muted { margin-bottom: 18px; }
.checkout-form { padding: 26px; }
.checkout-form section + section, .checkout-form section + .pay-card { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.checkout-form h2 { font-size: 1.15rem; margin: 0 0 14px; }

.checkout-summary { position: sticky; top: 84px; }
.checkout-summary h2 { font-size: 1.1rem; margin-bottom: 14px; }
.summary-cover { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 6px; margin-bottom: 14px; }
.summary-site { display: grid; gap: 2px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.summary-site span { color: var(--muted); font-size: .9rem; }
.summary-lines { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 14px 0; }
.summary-lines dt { color: var(--muted); }
.summary-lines dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; margin-bottom: 12px; border-top: 1px solid var(--line-strong); }
.summary-total strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }

.pay-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pay-head h2 { margin: 0 !important; }
.card-brands { display: flex; gap: 6px; }
.brand-chip {
    font-size: .68rem; font-weight: 800; letter-spacing: .03em; padding: 3px 7px; border-radius: 4px;
    border: 1px solid var(--line-strong); color: var(--text); background: var(--surface); transition: opacity .15s;
}
.brand-chip.is-dim { opacity: .3; }
.test-note {
    background: var(--warn-bg); color: var(--warn); border-radius: 6px; padding: 10px 14px;
    font-size: .9rem; margin: 0 0 16px; line-height: 1.55;
}
.test-note code { background: rgba(0, 0, 0, .06); color: inherit; white-space: nowrap; }
.card-number-wrap { position: relative; }
.card-number-wrap input { padding-right: 140px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.card-brand-detected { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: .85rem; font-weight: 700; color: var(--muted); }
#card_expiry, #card_cvc { font-variant-numeric: tabular-nums; }
.pay-btn { padding: 13px 18px; font-size: 1.05rem; margin-top: 6px; }
.pay-btn:disabled { opacity: .7; cursor: progress; }
.pay-small { color: var(--muted); font-size: .82rem; margin: 10px 0 0; text-align: center; }
.buy-btn { padding: 12px 16px; font-size: 1rem; }

.receipt-wrap { max-width: 720px; margin: 0 auto; }
.receipt-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.receipt { padding: 32px; }
.receipt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.receipt-brand { color: var(--gold); font-weight: 800; }
.receipt-head h1 { margin: 2px 0 0; }
.receipt-paid { text-align: right; }
.receipt-paid strong { display: block; font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.receipt-paid span { color: var(--muted); font-size: .9rem; }
.receipt-kv { margin-bottom: 20px; }
.receipt-lines { margin-bottom: 18px; }
.receipt-lines tfoot th { font-size: 1rem; color: var(--text); border-top: 1px solid var(--line-strong); border-bottom: 0; }
.receipt-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-radius: 8px; background: var(--surface-2); margin-bottom: 10px; }
.receipt-status > span:first-child { color: var(--muted); }

.order-card.is-open { border-left: 3px solid var(--gold); }
.order-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.order-top h2 { font-size: 1.1rem; margin: 0 0 2px; }
.order-price { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.order-price strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.order-kv { grid-template-columns: minmax(130px, max-content) minmax(0, 1fr); }
.order-kv dd { text-align: left; font-weight: 500; overflow-wrap: anywhere; }
.order-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.order-live { display: flex; gap: 6px; flex: 1; min-width: 260px; }
.order-live input { padding: 6px 10px; font-size: .9rem; }
.order-decline summary { color: var(--muted); font-size: .9rem; }
.order-decline form { display: flex; gap: 6px; margin-top: 8px; }
.order-decline input { padding: 6px 10px; font-size: .9rem; }

.badge-unpaid { background: var(--warn-bg); color: var(--warn); border-color: transparent; }

@media (max-width: 900px) {
    .checkout { grid-template-columns: minmax(0, 1fr); }
    .checkout-summary { position: static; order: -1; }
}
@media (max-width: 520px) {
    .checkout-form, .receipt { padding: 20px; }
    .card-number-wrap input { padding-right: 12px; }
    .card-brand-detected { display: none; }
    .order-kv { grid-template-columns: 1fr; }
    .order-kv dd { padding-top: 0; border-top: 0; }
}

@media print {
    .topbar, .footer, .no-print, .theme-toggle { display: none !important; }
    body { background: #fff; }
    .receipt { border: 0; box-shadow: none; padding: 0; }
}
.order-live .btn, .order-actions .btn { white-space: nowrap; }

/* ----- Payment methods (checkout) ----- */
.pay h2 { margin-bottom: 4px !important; }
.pay-intro { color: var(--muted); margin: 0 0 16px; }
.pay-methods { border: 0; padding: 0; margin: 0 0 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pay-method {
    position: relative; display: flex; align-items: center; gap: 12px;
    margin: 0; padding: 16px 40px 16px 16px; min-height: 72px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px;
    font-weight: 400; transition: border-color .15s, box-shadow .15s;
}
.pay-method:hover { border-color: var(--muted); }
.pay-method input { position: absolute; opacity: 0; pointer-events: none; }
.pay-method:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.pay-method.is-selected, .pay-method:has(input:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.pay-method-wide { grid-column: 1 / -1; }
.pm-text { display: grid; gap: 1px; min-width: 0; }
.pm-text strong { font-size: 1.02rem; }
.pm-text small { color: var(--muted); font-size: .82rem; }
.pm-icon { flex: 0 0 auto; display: inline-flex; color: var(--text); }
.pm-icon:empty { display: none; }
.pm-check {
    position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 50%;
    border: 1.5px solid var(--line-strong); background: var(--surface);
}
.pay-method.is-selected .pm-check, .pay-method:has(input:checked) .pm-check {
    border-color: var(--text); background: var(--text);
    box-shadow: inset 0 0 0 4px var(--surface);
}
.pay-email { padding-top: 18px; border-top: 1px solid var(--line); }
.pay-box { border: 1px solid var(--line-strong); border-radius: 10px; padding: 18px 20px 20px; margin-bottom: 18px; }
.pay-box-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.pay-box-head h3 { margin: 0; font-size: 1.02rem; }
.pay-redirect { background: var(--surface-2); color: var(--muted); }
.cvc-wrap { position: relative; }
.cvc-wrap input { padding-right: 44px; }
.cvc-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
    background: none; border: 0; border-radius: 6px; color: var(--muted); cursor: pointer;
}
.cvc-toggle:hover, .cvc-toggle[aria-pressed="true"] { color: var(--text); }
[data-for-method][hidden] { display: none !important; }
@media (max-width: 520px) {
    .pay-methods { grid-template-columns: minmax(0, 1fr); }
}

/* Payment tiles with an official logo image (assets/img/payments/) */
.pay-method.has-logo { justify-content: center; padding: 10px 36px; }
.pm-logo { display: flex; align-items: center; justify-content: center; width: 100%; height: 40px; }
/* Fill the tile; logo files with lots of empty space around them still show at a good size */
.pm-logo img { height: 100%; width: auto; max-width: 100%; object-fit: contain; }
/* Logos are made for light backgrounds, so they sit on a white plate in dark mode */
:root[data-theme="dark"] .pm-logo { background: #fff; border-radius: 6px; padding: 4px 12px; }

/* =========================================================
   Admin dashboard charts (validated: blue + amber, light and dark)
   ========================================================= */
.viz-root { --series-1: #2a78d6; --series-2: #eda100; --chart-grid: #e6e9ee; --chart-ink: var(--muted); }
:root[data-theme="dark"] .viz-root { --series-1: #3987e5; --series-2: #c98500; --chart-grid: #2a313c; }

.dash-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 30px 0 14px; }
.dash-toolbar h2 { margin: 0; }
.range-tabs { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; padding: 3px; background: var(--surface); }
.range-tabs a { padding: 6px 12px; border-radius: 6px; color: var(--muted); font-weight: 600; font-size: .88rem; text-decoration: none; }
.range-tabs a:hover { color: var(--text); }
.range-tabs a[aria-current="page"] { background: var(--accent); color: var(--on-accent); }

.dash-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dash-charts .card + .card { margin-top: 0; }
.dash-wide { grid-column: 1 / -1; }
.chart-card { padding: 20px 22px 16px; }
.chart-head { margin-bottom: 8px; }
.chart-head h3 { margin: 0 0 2px; font-size: 1.05rem; }
.chart-head p { margin: 0; color: var(--muted); font-size: .9rem; }
.chart-head strong { color: var(--text); font-variant-numeric: tabular-nums; }

.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart-grid.is-base { stroke: var(--line-strong); }
.chart-axis { fill: var(--chart-ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.chart-cat { fill: var(--text); font-size: 15px; }
.chart-value { fill: var(--text); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-direct { fill: var(--text); font-size: 14px; font-weight: 600; }
.chart-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-end { stroke: var(--surface); stroke-width: 2; }
.chart-bar { transition: opacity .12s; }
.chart-hit { fill: transparent; cursor: default; outline: none; }
.chart-crosshair { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; pointer-events: none; }
.chart.is-hover .chart-crosshair { opacity: .8; }

.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; font-size: .85rem; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i, .chart-tip i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.chart-table { margin-top: 8px; font-size: .88rem; }
.chart-table summary { color: var(--muted); }
.chart-table table { margin-top: 6px; }
.chart-table th, .chart-table td { padding: 6px 10px; }

.chart-tip {
    position: fixed; z-index: 50; pointer-events: none; min-width: 150px;
    background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: 8px;
    padding: 8px 10px; font-size: .85rem; box-shadow: 0 8px 24px rgba(16, 24, 40, .14);
}
.chart-tip strong { display: block; margin-bottom: 4px; }
.chart-tip span { display: flex; align-items: center; gap: 6px; }
.chart-tip b { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
    .dash-charts { grid-template-columns: minmax(0, 1fr); }
}

/* Admin > Ads: description boxes show the whole text */
.autogrow { resize: vertical; min-height: 64px; overflow: hidden; line-height: 1.5; }

/* ---------- Seller profiles and reviews ---------- */
.stars {
    --fill: 0%;
    display: inline-block; font-size: 1rem; line-height: 1; letter-spacing: 1px; vertical-align: -1px;
    background: linear-gradient(90deg, var(--gold) var(--fill), var(--line-strong) var(--fill));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stars-lg { font-size: 1.5rem; letter-spacing: 2px; }

.seller-avatar {
    flex: none; width: 72px; height: 72px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 1.5rem;
    box-shadow: none;
}
.seller-avatar.md { width: 44px; height: 44px; font-size: 1rem; }
.seller-avatar.sm { width: 26px; height: 26px; font-size: .68rem; box-shadow: none; }
.seller-avatar.has-logo { background: transparent; overflow: hidden; }
.seller-avatar.has-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.seller-head { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.seller-head h1 { margin: 0 0 2px; }
.seller-id { flex: 1 1 240px; min-width: 0; }
.seller-rating { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--text); text-decoration: none; }
.seller-rating:hover strong { text-decoration: underline; }
.seller-facts { display: flex; gap: 28px; margin: 0; }
.seller-facts div { text-align: center; }
.seller-facts dt { color: var(--muted); font-size: .82rem; }
.seller-facts dd { margin: 2px 0 0; font-size: 1.4rem; font-weight: 700; }
.seller-about { margin-top: 1rem; max-width: 72ch; }
.seller-about h2 { font-size: 1.05rem; margin: 0 0 8px; }

.seller-mini { display: flex; align-items: center; gap: 14px; margin-bottom: 1rem; color: var(--text); text-decoration: none; }
.seller-mini:hover { border-color: var(--gold); }
.seller-mini-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.seller-mini-go { color: var(--accent); font-weight: 600; white-space: nowrap; }

.reviews-section { margin-top: 2rem; }
.reviews-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.rating-summary { text-align: center; }
.rating-big { font-size: 3rem; font-weight: 700; line-height: 1; margin-bottom: 6px; }
.rating-bars { list-style: none; padding: 0; margin: 14px 0 0; text-align: left; }
.rating-bars li { display: grid; grid-template-columns: 34px 1fr 26px; gap: 8px; align-items: center; font-size: .88rem; margin: 6px 0; }
.rating-bars li span:last-child { text-align: right; }
.rating-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.rating-bar i { display: block; height: 100%; background: var(--gold); border-radius: 4px; }

.review-form h3 { margin: 0 0 12px; }
.review-form { margin-bottom: 18px; }
.review-note { background: var(--surface-2, var(--accent-bg)); border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; }
.star-input { border: 0; padding: 0; margin: 0 0 14px; }
.star-input legend { font-weight: 600; margin-bottom: 4px; padding: 0; }
.star-row { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 2rem; line-height: 1; cursor: pointer; color: var(--line-strong); padding: 0 2px; transition: color .1s; }
.star-input label:hover, .star-input label:hover ~ label,
.star-input input:checked ~ label { color: var(--gold); }
.star-input input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.review-list { list-style: none; padding: 0; margin: 0; }
.review { padding: 16px 0; border-top: 1px solid var(--line); }
.review:first-child { border-top: 0; padding-top: 4px; }
.review-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.review-top > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.review-avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-bg); color: var(--accent); font-weight: 700; font-size: .85rem; }
.review-meta { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.review-verified { font-size: .82rem; white-space: nowrap; }
.reviews-main > .review-list { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 20px; }

.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.review-filter { margin-bottom: 16px; flex-wrap: wrap; }
.range-tabs a[aria-current="page"] .muted { color: inherit; opacity: .75; }

@media (max-width: 760px) {
    .reviews-layout, .profile-grid { grid-template-columns: minmax(0, 1fr); }
    .seller-facts { width: 100%; justify-content: space-around; gap: 12px; }
    .review-verified { display: none; }
}

/* Admin has more menu items: tighter spacing, and the menu button below 1180px */
body.area-admin .nav a { padding: 7px 8px; font-size: .94rem; }
@media (min-width: 861px) and (max-width: 1180px) {
    body.area-admin .nav-toggle { display: block; }
    body.area-admin .nav { display: none; position: absolute; left: 0; right: 0; top: 60px; background: var(--surface); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; border-bottom: 1px solid var(--line); }
    body.area-admin .nav.open { display: flex; }
    body.area-admin .nav a.btn-nav { margin: 6px 0 0; text-align: center; }
    body.area-admin .nav a.active { box-shadow: inset 2px 0 0 var(--accent); }
}
.only-narrow { display: none; }
@media (max-width: 700px) {
    .only-wide { display: none; }
    .only-narrow { display: block; }
    .chart-axis { font-size: 17px; }
    .chart-cat, .chart-value, .chart-direct { font-size: 18px; }
}

/* Seller page: no reviews yet */
.reviews-layout.is-empty { grid-template-columns: minmax(0, 1fr); }
.reviews-empty { text-align: center; padding: 34px 20px; }
.reviews-empty h3 { margin: 10px 0 4px; }
.reviews-empty p { color: var(--muted); margin: 0 auto 16px; max-width: 46ch; }
.reviews-empty p:last-child { margin-bottom: 0; }

/* Logo upload on the profile forms */
.logo-field { display: flex; gap: 18px; align-items: center; padding: 14px; margin-bottom: 18px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--surface-2); }
.logo-field > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.logo-field > div > label:first-child { font-weight: 600; }
.logo-field .check { margin: 2px 0 0; }
.logo-field input[type=file] { max-width: 100%; }

/* Admin > Owners: logo and name together */
.owner-cell { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.owner-cell:hover strong { color: var(--accent); text-decoration: underline; }
.owner-cell .seller-avatar.md { box-shadow: none; }

/* All categories */
.category-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.category-card {
    display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 20px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none;
    border-top: 3px solid var(--accent); transition: border-color .15s, box-shadow .15s;
}
.category-card:hover { border-color: var(--line-strong); border-top-color: var(--gold); box-shadow: 0 8px 20px -14px rgba(16, 32, 64, .45); }
.category-card.is-empty { border-top-color: var(--line-strong); }
.category-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.category-card-top strong { font-size: 1.15rem; }
.category-count { color: var(--muted); font-size: .88rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.category-desc { color: var(--muted); font-size: .92rem; }
.category-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.category-facts span { font-size: .82rem; padding: 3px 9px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.category-facts b { color: var(--text); font-variant-numeric: tabular-nums; }
.category-go { margin-top: auto; padding-top: 10px; color: var(--accent); font-weight: 600; font-size: .92rem; }
.category-card:hover .category-go { text-decoration: underline; text-underline-offset: 3px; }

/* Owner > My websites */
.owner-sites { display: grid; gap: 12px; }
.owner-site {
    display: grid; grid-template-columns: 132px minmax(0, 1fr) 200px; gap: 22px; padding: 20px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px; border-left: 4px solid var(--line-strong);
}
.owner-site.status-approved { border-left-color: var(--ok); }
.owner-site.status-pending { border-left-color: var(--warn); }
.owner-site.status-rejected { border-left-color: var(--bad); }
.owner-site-main { min-width: 0; }
.owner-site > .site-thumb { align-self: start; }
.owner-site-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.owner-site-top h2 { font-size: 1.15rem; margin: 0; }
.site-status { font-size: .78rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.status-approved .site-status { background: var(--ok-bg); color: var(--ok); }
.status-pending .site-status { background: var(--warn-bg); color: var(--warn); }
.status-rejected .site-status { background: var(--bad-bg); color: var(--bad); }
.owner-site .listing-host a { color: var(--muted); }
.owner-site-note { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--bad-bg); color: var(--bad); font-size: .9rem; }
.owner-site-note strong { display: block; }
.owner-site-hint { margin: 10px 0 0; color: var(--muted); font-size: .9rem; }
.owner-site-orders { display: inline-block; margin-top: 12px; font-size: .9rem; font-weight: 600; }
.owner-site-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding-left: 22px; border-left: 1px solid var(--line); text-align: right; }
.owner-site-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.owner-site-buttons > :only-child, .owner-site-buttons .wide { grid-column: 1 / -1; }
.owner-site-actions form .btn-link-danger { background: none; border: 0; padding: 0; color: var(--bad); font-size: .82rem; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.owner-site-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.owner-site-actions .offer-type { align-self: flex-end; }
.owner-site-actions .price { margin: 2px 0 0; }
.owner-site-actions .price-note { margin-bottom: 6px; }
.owner-site-buttons .btn { width: 100%; text-align: center; justify-content: center; }
.owner-site-date { color: var(--muted); font-size: .8rem; margin-top: 2px; }
.owner-empty { text-align: center; padding: 40px 20px; }
.owner-empty h2 { margin: 12px 0 6px; }
.owner-empty p { color: var(--muted); max-width: 52ch; margin: 0 auto 18px; }

@media (max-width: 860px) {
    .owner-site { grid-template-columns: 90px minmax(0, 1fr); gap: 14px; padding: 16px; }
    .owner-site .site-thumb { width: 90px; }
    .owner-site-actions {
        grid-column: 1 / -1; padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line);
        flex-direction: row; flex-wrap: wrap; align-items: center; text-align: left;
    }
    .owner-site-actions .offer-type { order: -1; align-self: center; }
    .owner-site-actions .price { margin: 0; }
    .owner-site-actions .price-note { margin: 0 auto 0 0; }
    .owner-site-buttons { width: 100%; }
    .owner-site-foot { width: 100%; }
}
@media (max-width: 520px) {
    .owner-site { grid-template-columns: minmax(0, 1fr); }
    .owner-site .site-thumb { display: none; }
    .logo-field { flex-direction: column; align-items: flex-start; }
}

/* Buyer avatar on reviews (logo or initials) */
.seller-avatar.review { width: 36px; height: 36px; font-size: .85rem; background: var(--accent-bg); color: var(--accent); }
.seller-avatar.review.has-logo { background: transparent; }

/* ---------- Link tracking ---------- */
.order-top > .seller-avatar { align-self: flex-start; }
.order-who { flex: 1; min-width: 200px; }
.order-card.is-problem { border-left: 3px solid var(--bad); }
.order-report { margin: 14px 0 0; }
.order-track {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    margin-top: 14px; padding: 12px 14px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line);
}
.order-track > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.order-track .sub { flex-basis: 100%; }
.order-track-label { font-weight: 600; font-size: .9rem; }
.track-alert a { font-weight: 600; }

.track-steps { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; }
.track-steps li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 0 6px; }
.track-steps li::before { content: ""; position: absolute; top: 15px; right: 50%; width: 100%; height: 2px; background: var(--line-strong); z-index: 0; }
.track-steps li:first-child::before { display: none; }
.track-steps li.is-done::before { background: var(--ok); }
.track-dot {
    position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem;
    background: var(--surface); border: 2px solid var(--line-strong); color: var(--muted);
}
.track-steps li.is-done .track-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.track-steps li.is-next .track-dot { border-color: var(--accent); color: var(--accent); }
.track-steps strong { font-size: .92rem; }

.track-check.is-problem { border-color: var(--bad); box-shadow: inset 3px 0 0 var(--bad); }
.track-check .card-head { margin-bottom: 8px; }
.check-history { list-style: none; padding: 0; margin: 0; }
.check-history li { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.check-history li:first-child { border-top: 0; padding-top: 0; }
.check-history .small:last-child { flex-basis: 100%; color: var(--muted); }

tr.row-problem td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.track-report { color: var(--bad); }

@media (max-width: 600px) {
    .track-steps strong { font-size: .8rem; }
    .track-steps .small { font-size: .72rem; }
}

/* Card picture: the website's cover image, with the company logo on its corner */
.listing { grid-template-columns: 220px minmax(0, 1fr) 190px; }
.listing-cover { position: relative; display: block; align-self: start; text-decoration: none; padding-bottom: 16px; }
.listing-cover-img {
    display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 16 / 10;
    border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--accent-bg); transition: border-color .15s;
}
.listing-cover-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.listing-cover:hover .listing-cover-img { border-color: var(--gold); }
.listing-cover-blank {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 10px; text-align: center;
    background: linear-gradient(135deg, #1b3a6b, #0f2346); color: #fff; font-weight: 700; font-size: .95rem; overflow-wrap: anywhere;
}
.seller-avatar.cover {
    position: absolute; left: 12px; bottom: 0; width: 44px; height: 44px; border-radius: 10px; font-size: .95rem;
    border: 2px solid var(--surface); box-shadow: 0 2px 8px -3px rgba(16, 32, 64, .45);
}
.seller-avatar.cover.has-logo { background: #fff; padding: 3px; }
@media (max-width: 860px) {
    .listing { grid-template-columns: minmax(0, 1fr); }
    .listing-cover-img { aspect-ratio: 16 / 7; }
    .listing-offer { grid-column: auto; }
}

/* Website page: one main button, the second choice as a quiet link */
.contact-pay { text-align: center; margin: 8px 0 0; }
.contact-form { margin: 0; }
.contact-link {
    display: block; width: 100%; margin-top: 14px; padding: 12px 0 0; border: 0; border-top: 1px solid var(--line);
    background: none; font: inherit; font-weight: 600; font-size: .92rem; color: var(--accent); text-align: center; cursor: pointer;
    text-decoration: underline; text-underline-offset: 3px;
}
.contact-link:hover { color: var(--accent-hover); }

/* Website page: the company logo beside the name */
.site-title { display: flex; align-items: center; gap: 14px; margin: 6px 0 4px; }
.site-title h1 { margin: 0; }
.seller-avatar.title { width: 52px; height: 52px; border-radius: 12px; font-size: 1.1rem; border: 1px solid var(--line); }
.seller-avatar.title.has-logo { background: #fff; padding: 4px; }
@media (max-width: 600px) { .seller-avatar.title { width: 42px; height: 42px; border-radius: 10px; } }

/* No cover image: the card simply has no picture column */
.listing.no-cover { grid-template-columns: minmax(0, 1fr) 190px; }
.owner-site.no-cover { grid-template-columns: minmax(0, 1fr) 200px; }
@media (max-width: 860px) {
    .listing.no-cover { grid-template-columns: minmax(0, 1fr); }
    .owner-site.no-cover { grid-template-columns: minmax(0, 1fr); }
}

/* Link swaps: the two links of a swap, side by side */
.swap-side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.swap-side-head strong { font-size: 1.02rem; }
.swap-side .kv { margin-bottom: 8px; }
.swap-card.is-problem, .swap-side.is-problem .swap-side-head strong { color: var(--bad); }
.swap-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 14px; }
.swap-sides > div { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); min-width: 0; }
.swap-sides .kv dt, .swap-sides .kv dd { border-color: var(--line-strong); }
.swap-message { margin: 12px 0 0; padding: 10px 14px; border-left: 3px solid var(--gold); background: var(--surface-2); border-radius: 0 8px 8px 0; color: var(--text); }
.swap-accept { margin-top: 14px; padding: 14px 16px; border-radius: 10px; background: var(--accent-bg); }
.swap-accept-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; margin-top: 10px; }
.swap-accept-row .form-row { margin-bottom: 10px; }
.swap-how { margin: 0 0 18px; padding-left: 20px; color: var(--muted); }
.swap-how li { margin-bottom: 6px; }
.swap-with { display: flex; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.swap-with > span:last-child { display: flex; flex-direction: column; }
.contact-link + .contact-form .contact-link, .contact-link + .contact-link { border-top: 0; margin-top: 8px; padding-top: 0; font-weight: 500; }
@media (max-width: 860px) {
    .swap-sides, .swap-accept-row { grid-template-columns: minmax(0, 1fr); }
}
.swap-change { margin-top: 12px; }
.swap-change summary { cursor: pointer; color: var(--muted); font-size: .88rem; }
.swap-change .order-live { margin-top: 8px; }
.swap-edit { margin-top: 10px; padding: 12px 14px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.swap-edit .form-row { margin-bottom: 10px; }

/* Header: "More" dropdown with the other categories */
.nav-more { position: relative; }
.nav-more-btn {
    display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border: 0; border-radius: 6px;
    background: none; color: var(--muted); font: inherit; font-weight: 500; cursor: pointer;
}
.nav-more-btn svg { transition: transform .15s; }
.nav-more-btn:hover, .nav-more.open .nav-more-btn { color: var(--text); background: var(--surface-2); }
.nav-more.open .nav-more-btn svg { transform: rotate(180deg); }
.nav-more-btn.active { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav-more-menu {
    display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 210px; padding: 6px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 28px -12px rgba(16, 32, 64, .35);
}
.nav-more.open .nav-more-menu { display: block; }
.nav .nav-more-menu a { display: block; padding: 8px 12px; border-radius: 6px; white-space: nowrap; }
.nav .nav-more-menu a.active { box-shadow: inset 2px 0 0 var(--accent); border-radius: 0 6px 6px 0; color: var(--text); }
.nav .nav-more-menu a.nav-more-all { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); border-radius: 0 0 6px 6px; color: var(--accent); font-weight: 600; }
@media (hover: hover) and (min-width: 1091px) {
    .nav-more:hover .nav-more-menu { display: block; }
    .nav-more:hover .nav-more-btn svg { transform: rotate(180deg); }
    .nav-more-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }   /* keeps hover alive across the gap */
}
/* The public menu (with "More") needs more room: menu button below 1090px */
@media (min-width: 861px) and (max-width: 1090px) {
    body.area-public .nav-toggle { display: block; }
    body.area-public .nav { display: none; position: absolute; left: 0; right: 0; top: 60px; background: var(--surface); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; border-bottom: 1px solid var(--line); }
    body.area-public .nav.open { display: flex; }
    body.area-public .nav a.btn-nav { margin: 6px 0 0; text-align: center; }
    body.area-public .nav a.active { box-shadow: inset 2px 0 0 var(--accent); }
}
@media (max-width: 1090px) {
    .nav-more-btn { width: 100%; justify-content: space-between; padding: 7px 10px; }
    .nav-more-btn.active { box-shadow: inset 2px 0 0 var(--accent); }
    .nav-more-menu { position: static; min-width: 0; padding: 0 0 4px 12px; border: 0; box-shadow: none; background: none; }
}
