/* ABAD — clean black & white with the colors of Afghanistan as accents */

:root {
    color-scheme: dark;
    --bg: #0a0a0b;
    --surface: #131315;
    --soft: #1b1b1e;
    --softer: #111113;
    --raised: #26262a;
    --line: #26262a;
    --line-strong: #3a3a40;
    --fg: #fafafa;          /* strongest foreground: headings, primary buttons */
    --on-fg: #0a0a0b;       /* text on --fg backgrounds */
    --ink: #e4e4e7;
    --text: #d4d4d8;
    --muted: #8e8e95;
    --flag-black: #55555c;  /* the flag's black stripe, lifted so it stays visible on dark */
    --red: #e5352a;
    --red-soft: rgba(229, 53, 42, .14);
    --green: #12a150;
    --green-soft: rgba(18, 161, 80, .15);
    --accent: var(--fg);
    --accent-soft: var(--soft);
    --on-accent: var(--on-fg);
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.4), 0 24px 48px rgba(0,0,0,.55);
    --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --header-h: 68px;
}

.accent-red, .portal-red { --accent: var(--red); --accent-soft: var(--red-soft); --on-accent: #fff; }
.accent-green, .portal-green { --accent: var(--green); --accent-soft: var(--green-soft); --on-accent: #fff; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    overflow-x: clip;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { color: var(--fg); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 1em; }
svg { width: 18px; height: 18px; flex-shrink: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
dialog { color: inherit; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.container.narrow, .narrow > .container { max-width: 860px; }
.section { padding: 40px 0; }
.section.narrow { max-width: 560px; margin: 0 auto; padding: 80px 20px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt { margin-top: 48px; }
.mt-xs { margin-top: 8px; }
.mb { margin-bottom: 40px; }
.stack { display: grid; gap: 20px; align-content: start; }
.stack-sm { display: grid; gap: 8px; margin-bottom: 12px; }

/* Flag accent ---------------------------------------------------------- */
.flagline { display: flex; height: 3px; }
.flagline span { flex: 1; }
.flagline span:nth-child(1) { background: var(--flag-black); }
.flagline span:nth-child(2) { background: var(--red); }
.flagline span:nth-child(3) { background: var(--green); }

.flag-dots { display: inline-flex; gap: 4px; }
.flag-dots i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.flag-dots i:nth-child(1) { background: var(--flag-black); }
.flag-dots i:nth-child(2) { background: var(--red); }
.flag-dots i:nth-child(3) { background: var(--green); }

/* Logo ----------------------------------------------------------------- */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { display: inline-flex; gap: 3px; align-items: flex-end; height: 22px; }
.logo-mark i { display: block; width: 6px; border-radius: 3px; }
.logo-mark i:nth-child(1) { height: 22px; background: var(--fg); }
.logo-mark i:nth-child(2) { height: 16px; background: var(--red); }
.logo-mark i:nth-child(3) { height: 11px; background: var(--green); }
.logo-mark.big { height: 36px; margin-bottom: 20px; }
.logo-mark.big i { width: 10px; border-radius: 5px; }
.logo-mark.big i:nth-child(1) { height: 36px; }
.logo-mark.big i:nth-child(2) { height: 26px; }
.logo-mark.big i:nth-child(3) { height: 18px; }
.logo-text { font-weight: 800; font-size: 24px; letter-spacing: -.05em; color: var(--fg); }

/* Header --------------------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(10,10,11,.82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.portal-switch { display: flex; gap: 4px; background: var(--soft); padding: 4px; border-radius: 999px; }
.portal-link {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted);
    transition: background .15s, color .15s;
}
.portal-link:hover { color: var(--fg); }
.portal-link.active { background: var(--raised); color: var(--fg); }
.portal-link.active svg { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }

.icon-btn {
    position: relative; display: inline-grid; place-items: center;
    width: 40px; height: 40px; border-radius: 999px; border: 0; background: transparent; cursor: pointer;
    color: var(--ink); transition: background .15s;
}
.icon-btn:hover { background: var(--soft); }
.icon-btn.danger:hover { background: var(--red-soft); color: var(--red); }
.badge {
    position: absolute; top: 4px; inset-inline-end: 2px;
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
    background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.badge.inline { position: static; display: inline-block; }

.avatar {
    display: inline-grid; place-items: center; flex-shrink: 0;
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--fg); color: var(--on-fg); font-weight: 700; font-size: 13px; letter-spacing: .02em;
}
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-lg { width: 64px; height: 64px; font-size: 22px; }
.avatar-xl { width: 88px; height: 88px; font-size: 30px; }
.avatar-edit { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.avatar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.avatar-actions form { display: contents; }
.avatar-actions .hint { flex-basis: 100%; }
.avatar-actions label.btn { cursor: pointer; }

/* Dropdowns */
.dropdown { position: relative; }
.dropdown summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 999px; font-weight: 600; font-size: 13px; }
.dropdown summary::-webkit-details-marker { display: none; }
.dropdown summary:hover { background: var(--soft); }
.account-menu summary { padding: 2px; }
.dropdown-menu {
    position: absolute; top: calc(100% + 8px); inset-inline-start: 0; min-width: 180px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
    padding: 6px; z-index: 60;
}
.dropdown-right { inset-inline-start: auto; inset-inline-end: 0; min-width: 240px; }
.dropdown-menu a, .dropdown-menu button {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 10px 12px; border-radius: 8px; border: 0; background: none; cursor: pointer; font-size: 14px; text-align: start;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--soft); }
.dropdown-menu a.active { font-weight: 700; }
.dropdown-menu svg { color: var(--muted); }
.dropdown-menu form { margin: 0; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.dropdown-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: grid; }
.dropdown-head small { color: var(--muted); }

/* Buttons -------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border-radius: 999px; border: 1.5px solid transparent;
    font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
    transition: transform .1s, background .15s, border-color .15s, color .15s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 14px 26px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-dark { background: var(--fg); color: var(--on-fg); }
.btn-dark:hover { background: #d4d4d8; }
.btn-light { background: #fff; color: var(--on-fg); }
.btn-light:hover { background: #e4e4e7; }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { opacity: .9; }
.btn-outline { background: transparent; border-color: var(--line-strong); color: var(--fg); }
.btn-outline:hover { border-color: var(--fg); }
.btn-ghost { background: transparent; color: var(--fg); }
.btn-ghost:hover { background: var(--soft); }
.btn-danger { background: var(--red); color: #fff; }
.btn-whatsapp { background: #1fa855; color: #fff; }
.btn-whatsapp:hover { background: #22b85d; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 0; font-weight: 700; text-decoration: underline; cursor: pointer; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.link-arrow:hover svg { transform: translateX(3px); }
.link-arrow svg { transition: transform .15s; }

/* Banners & flashes ---------------------------------------------------- */
.verify-banner { background: var(--soft); color: var(--ink); font-size: 13px; border-bottom: 1px solid var(--line); }
.verify-banner .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.verify-banner span { display: inline-flex; align-items: center; gap: 8px; }
.verify-banner form { margin: 0; }
.verify-banner .link-btn { color: var(--fg); }

.flash-stack { position: fixed; top: calc(var(--header-h) + 16px); left: 50%; transform: translateX(-50%); z-index: 70; display: grid; gap: 8px; max-width: 520px; }
.flash {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 12px 12px 18px; border-radius: 14px; background: var(--raised); color: var(--fg);
    box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500;
    animation: flash-in .25s ease-out;
    border-inline-start: 4px solid var(--line-strong);
}
.flash-success { border-inline-start-color: var(--green); }
.flash-error { border-inline-start-color: var(--red); }
.flash-close { background: none; border: 0; color: var(--fg); opacity: .6; cursor: pointer; display: grid; padding: 4px; }
.flash-close:hover { opacity: 1; }
.flash.hide { opacity: 0; transform: translateY(-8px); transition: .25s; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } }

.notice { padding: 14px 18px; border-radius: 12px; background: var(--soft); margin-bottom: 20px; font-weight: 500; }
.notice-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.draft-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; color: var(--muted); }

/* Hero / home ---------------------------------------------------------- */
.hero { padding: 64px 0 32px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 18px; }
.eyebrow.light { color: rgba(255,255,255,.75); }
.hero-title { font-size: clamp(38px, 6.5vw, 76px); line-height: 1; letter-spacing: -.05em; max-width: 900px; margin-bottom: 18px; }
.hero-sub { font-size: clamp(16px, 2vw, 19px); color: var(--muted); max-width: 560px; margin-bottom: 40px; }

.portal-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.portal-card {
    position: relative; display: flex; flex-direction: column;
    padding: 32px; min-height: 300px; border-radius: 24px;
    background: var(--soft); overflow: hidden;
    transition: transform .2s, box-shadow .2s, background .2s;
}
.portal-card::after {
    content: ""; position: absolute; inset-inline-end: -60px; bottom: -60px; width: 220px; height: 220px;
    border-radius: 50%; background: var(--accent); opacity: .08; transition: transform .35s, opacity .35s;
}
.portal-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); background: var(--surface); }
.portal-card:hover::after { transform: scale(1.6); opacity: .12; }
.portal-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: auto; }
.portal-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--accent); color: var(--on-accent); }
.portal-icon svg { width: 28px; height: 28px; }
.portal-count { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--bg); padding: 6px 12px; border-radius: 999px; }
.portal-card h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -.04em; margin: 48px 0 8px; }
.portal-card p { color: var(--muted); max-width: 360px; margin-bottom: 20px; }
.portal-cta { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent); }
.portal-card:hover .portal-cta svg { transform: translateX(4px); }
.portal-cta svg { transition: transform .2s; }
.portal-cards.compact .portal-card { min-height: 0; padding: 24px; }
.portal-cards.compact h2 { font-size: 22px; margin-top: 24px; }
.portal-cards.compact .portal-icon { width: 44px; height: 44px; border-radius: 12px; }
.portal-cards.compact .portal-icon svg { width: 22px; height: 22px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding: 32px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--soft); margin-bottom: 14px; }
.feature p { color: var(--muted); font-size: 14px; margin: 0; }

/* App download (below the features) */
.app-download { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 32px 0 0; }
.app-download h2 { font-size: 22px; margin: 0 0 4px; }
.app-download p { margin: 0; font-size: 15px; }
.store-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.store-btn {
    display: inline-flex; align-items: center; gap: 10px; min-width: 168px; padding: 9px 18px 9px 14px;
    border-radius: 12px; background: #000; color: #fff; border: 1px solid var(--line-strong); text-decoration: none;
    transition: border-color .15s, transform .15s;
}
a.store-btn:hover { border-color: var(--fg); transform: translateY(-1px); }
.store-btn svg { width: 26px; height: 26px; flex-shrink: 0; }
.store-btn span { display: grid; line-height: 1.15; text-align: start; }
.store-btn small { font-size: 11px; font-weight: 500; color: #c7c7cc; }
.store-btn strong { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.store-btn.is-soon { opacity: .55; cursor: default; }

.section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.section-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 24px; letter-spacing: -.03em; }
.section-title { font-size: 20px; margin: 40px 0 16px; }

.cta-band {
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    padding: 48px; border-radius: 28px; background: var(--surface); border: 1px solid var(--line); color: #fff; position: relative; overflow: hidden;
}
.cta-band::before {
    content: ""; position: absolute; inset-inline-end: 0; top: 0; bottom: 0; width: 12px;
    background: linear-gradient(var(--flag-black) 0 33%, var(--red) 33% 66%, var(--green) 66%);
}
.cta-band h2 { color: #fff; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.04em; }
.cta-band p { color: rgba(255,255,255,.7); margin: 0; }

/* Cards ---------------------------------------------------------------- */
.grid-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-cards.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card { position: relative; display: flex; flex-direction: column; border-radius: var(--radius); background: transparent; }
.card-media { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-media img { transform: scale(1.04); }
.card-placeholder { display: grid; place-items: center; height: 100%; color: #3a3a40; }
.card-placeholder svg { width: 48px; height: 48px; }
.card-pill { position: absolute; top: 12px; inset-inline-start: 12px; }
.card-body { padding: 12px 2px 4px; display: grid; gap: 4px; }
.card-price { font-weight: 800; font-size: 17px; color: var(--fg); letter-spacing: -.02em; }
.card-title { font-size: 14px; font-weight: 600; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.card-title a:hover { text-decoration: underline; }
.card-specs { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 13px; color: var(--muted); }
.card-specs span:not(:last-child)::after { content: "·"; margin: 0 6px; }
.card-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.card-meta span { display: inline-flex; align-items: center; gap: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.card-meta svg { width: 13px; height: 13px; }

.fav-form { margin: 0; }
.card .fav-form { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2; }
.fav-btn {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
    background: rgba(10,10,11,.72); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.4); backdrop-filter: blur(6px); transition: transform .15s;
}
.fav-btn:hover { transform: scale(1.08); }
.fav-btn.is-fav svg, .fav-btn-wide.is-fav svg { fill: var(--red); color: var(--red); }
.fav-btn-wide.is-fav { color: var(--red); }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--ink); }
.pill.accent-red, .pill.accent-green { background: var(--accent-soft); color: var(--accent); }
.pill-dark { background: var(--fg); color: var(--on-fg); }
.status-active { background: var(--green-soft); color: var(--green); }
.status-inactive { background: var(--soft); color: var(--muted); }
.status-sold { background: var(--fg); color: var(--on-fg); }
.status-draft { background: rgba(250, 204, 21, .14); color: #facc15; }

/* Portal hero / search ------------------------------------------------- */
.portal-hero { background: #000; border-bottom: 1px solid var(--line); color: #fff; padding: 40px 0 36px; position: relative; overflow: hidden; }
.portal-hero::after {
    content: ""; position: absolute; inset-inline-end: -120px; top: -160px; width: 420px; height: 420px; border-radius: 50%;
    background: var(--accent); opacity: .35; filter: blur(30px);
}
.portal-hero .container { position: relative; z-index: 1; }
.portal-hero-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.portal-hero h1 { color: #fff; margin: 0; font-size: clamp(30px, 4.5vw, 48px); letter-spacing: -.045em; }
.portal-hero .eyebrow { margin-bottom: 10px; text-transform: none; letter-spacing: .01em; font-size: 14px; }
.searchbar { display: flex; gap: 8px; background: var(--surface); border: 1px solid var(--line); padding: 8px; border-radius: 20px; box-shadow: var(--shadow-lg); }
.searchbar-field { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 12px; color: var(--fg); min-width: 0; }
.searchbar-field + .searchbar-field { border-inline-start: 1px solid var(--line); border-radius: 0; }
.searchbar-field.grow { flex: 1; }
.searchbar-field svg { color: var(--muted); }
.searchbar input[type=search], .searchbar select { border: 0; outline: 0; box-shadow: none; background-color: transparent; border-radius: 0; padding: 10px 0; width: 100%; min-width: 0; font-weight: 500; }
.searchbar select { cursor: pointer; max-width: 200px; }

/* Results -------------------------------------------------------------- */
.results-layout { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; scrollbar-width: thin; }
.filters-form { background: var(--softer); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.filters-head h3 { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.filters-head a { font-weight: 600; text-decoration: underline; }
.results-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.results-head h2 { margin: 6px 0 0; font-size: 22px; }
.results-tools { display: flex; gap: 8px; align-items: center; }
.results-tools form { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 12px; border-radius: 999px; background: var(--soft); font-size: 13px; font-weight: 500; }
.chip svg { width: 14px; height: 14px; color: var(--muted); }
.chip:hover { background: var(--line); }

.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 40px; }
.page-link { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.page-link:hover { background: var(--soft); }
.page-link.active { background: var(--fg); color: var(--on-fg); }
.page-gap { display: grid; place-items: center; width: 24px; color: var(--muted); }

.empty { text-align: center; padding: 64px 20px; border: 1.5px dashed var(--line); border-radius: 20px; }
.empty-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--soft); margin-bottom: 16px; }
.empty-icon svg { width: 28px; height: 28px; }

/* Forms ---------------------------------------------------------------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink); }
.field-row { display: flex; justify-content: space-between; align-items: center; }
.field-row a { font-weight: 500; color: var(--muted); }
.field-row a:hover { color: var(--fg); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=search], select, textarea {
    width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    background: var(--softer); color: var(--fg); outline: none; transition: border-color .15s, box-shadow .15s; font-size: 15px;
}
select {
    appearance: none; -webkit-appearance: none; cursor: pointer; padding-inline-end: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
}
[dir=rtl] select { background-position: left 14px center; }
.searchbar select { background-position: right 0 center; padding-inline-end: 20px; }
input:focus, select:focus, textarea:focus { border-color: var(--fg); box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
textarea { resize: vertical; min-height: 44px; }
.select-sm { padding: 8px 32px 8px 14px; font-size: 13px; font-weight: 600; border-radius: 999px; width: auto; }
.hint { color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.hint.ok { color: var(--green); }
.hint svg { width: 14px; height: 14px; }
.field-error { color: var(--red); font-size: 13px; font-weight: 500; }
.field:has(.field-error) input, .field:has(.field-error) select, .field:has(.field-error) textarea { border-color: var(--red); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; padding: 4px 0; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--fg); flex-shrink: 0; }
.check a { text-decoration: underline; font-weight: 600; }
.check.align-end { align-self: end; padding-bottom: 12px; }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.range:has(> :only-child) { grid-template-columns: 1fr; }
.input-group { display: flex; }
.input-group input { border-start-end-radius: 0; border-end-end-radius: 0; }
.input-group select { width: auto; border-start-start-radius: 0; border-end-start-radius: 0; border-inline-start: 0; background-color: var(--soft); font-weight: 600; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.check-card { cursor: pointer; }
.check-card input { position: absolute; opacity: 0; pointer-events: none; }
.check-card span { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 14px; font-weight: 500; transition: .15s; }
.check-card svg { width: 16px; height: 16px; opacity: .25; }
.check-card input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.check-card input:checked + span svg { opacity: 1; }
.check-card input:focus-visible + span { box-shadow: 0 0 0 3px rgba(255,255,255,.12); }

/* Panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 18px; }
.panel-danger { border-color: rgba(229,53,42,.35); }
.step { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 700; }
.listing-form { gap: 20px; }
.listing-form .panel { display: grid; gap: 16px; }
.listing-form .panel h2 { margin-bottom: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; position: sticky; bottom: 0; padding: 16px 0; background: linear-gradient(transparent, var(--bg) 30%); }

.dropzone {
    display: grid; justify-items: center; gap: 6px; padding: 32px 20px; text-align: center; cursor: pointer;
    border: 2px dashed var(--line); border-radius: var(--radius); background: var(--softer); transition: .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone svg { width: 32px; height: 32px; color: var(--muted); }
.dropzone small { color: var(--muted); }
.preview-grid, .image-manager { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.preview-grid:empty { display: none; }
.preview-grid img, .image-tile img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; }
.image-tile { display: grid; gap: 4px; }
.tile-opt { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; cursor: pointer; }
.tile-opt input { accent-color: var(--fg); margin: 0; }
.tile-opt.danger { color: var(--red); }
.tile-opt.danger input { accent-color: var(--red); }

/* Page head & tabs ----------------------------------------------------- */
.page-head { padding: 40px 0 0; border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: 20px; }
.page-head .eyebrow { color: var(--accent); }
.page-head.accent-red, .page-head.accent-green { border-bottom: 0; padding-bottom: 8px; }
.account-hello { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.account-hello h1 { margin: 0 0 4px; font-size: 28px; }
.account-hello p { margin: 0; font-size: 14px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-bottom: -1px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--fg); }
.tabs a.active { color: var(--fg); border-bottom-color: var(--fg); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { display: grid; gap: 2px; padding: 20px; border-radius: var(--radius); background: var(--soft); transition: .15s; }
.stat:hover { background: var(--raised); box-shadow: var(--shadow); }
.stat-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: var(--on-accent); margin-bottom: 12px; }
.stat-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.stat strong { font-size: 32px; font-weight: 800; letter-spacing: -.04em; color: var(--fg); line-height: 1.1; }
.stat small { color: var(--muted); font-size: 12px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.segmented { display: inline-flex; gap: 4px; padding: 4px; background: var(--soft); border-radius: 999px; }
.segmented a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); }
.segmented a.active { background: var(--raised); color: var(--fg); }
.segmented-sm a { padding: 6px 12px; font-size: 13px; gap: 6px; }
.segmented-sm svg { width: 16px; height: 16px; }

.my-list { display: grid; gap: 10px; }
.my-item { display: flex; align-items: center; gap: 16px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.my-thumb { display: grid; place-items: center; width: 112px; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; background: var(--soft); flex-shrink: 0; color: #3a3a40; }
.my-thumb img { width: 100%; height: 100%; object-fit: cover; }
.my-info { flex: 1; min-width: 0; display: grid; gap: 6px; }
.my-title { font-weight: 700; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-title:hover { text-decoration: underline; }
.my-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.my-meta span { display: inline-flex; align-items: center; gap: 4px; }
.my-meta svg { width: 14px; height: 14px; }
.my-actions { display: flex; align-items: center; gap: 4px; }
.my-actions form { margin: 0; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

/* Listing detail ------------------------------------------------------- */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 20px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--fg); }
.breadcrumb svg { width: 14px; height: 14px; }
[dir=rtl] .breadcrumb svg, [dir=rtl] .gallery-nav svg, [dir=rtl] .link-arrow svg, [dir=rtl] .portal-cta svg,
[dir=rtl] .page-link svg, [dir=rtl] .chat-head .icon-btn svg { transform: scaleX(-1); }
[dir=rtl] .link-arrow:hover svg { transform: scaleX(-1) translateX(3px); }
[dir=rtl] .portal-card:hover .portal-cta svg { transform: scaleX(-1) translateX(4px); }
[dir=rtl] .searchbar select { background-position: left 0 center; }
.listing-layout { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
.listing-main { display: grid; gap: 20px; min-width: 0; }
.gallery-main { position: relative; aspect-ratio: 16/10; border-radius: 20px; overflow: hidden; background: var(--soft); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.gallery-main.empty-media { display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); }
.gallery-main.empty-media svg { width: 80px; height: 80px; opacity: .4; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(10,10,11,.72); color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow); }
.gallery-nav.prev { inset-inline-start: 14px; }
.gallery-nav.next { inset-inline-end: 14px; }
.gallery-count { position: absolute; bottom: 14px; inset-inline-end: 14px; background: rgba(0,0,0,.7); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.gallery-thumbs button { flex: 0 0 92px; aspect-ratio: 4/3; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: none; opacity: .6; transition: .15s; }
.gallery-thumbs button.active, .gallery-thumbs button:hover { opacity: 1; }
.gallery-thumbs button.active { border-color: var(--fg); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.listing-tags { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.listing-head h1 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 8px; }
.listing-location { display: flex; align-items: center; gap: 6px; color: var(--muted); margin: 0; }
.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0; margin: 0; }
.specs div { padding: 12px 0; border-bottom: 1px solid var(--line); margin-inline-end: 20px; }
.specs dt { font-size: 12px; color: var(--muted); font-weight: 500; }
.specs dd { margin: 2px 0 0; font-weight: 700; color: var(--fg); }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.feature-list li { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.feature-list svg { color: var(--accent); }
.description { white-space: normal; overflow-wrap: anywhere; }
.listing-footnote { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.listing-footnote svg { width: 14px; height: 14px; }
.listing-side .sticky { position: sticky; top: calc(var(--header-h) + 20px); }
.listing-side { display: grid; gap: 16px; }
.price-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.price { font-size: 30px; font-weight: 800; letter-spacing: -.04em; color: var(--fg); }
.seller { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.seller > div { display: grid; }
.contact-form { gap: 10px; margin-top: 4px; }
.safety { display: flex; gap: 12px; padding: 16px; border-radius: var(--radius); background: var(--soft); font-size: 13px; color: var(--muted); }
.safety p { margin: 0; }
.safety svg { color: var(--green); }

/* Messages ------------------------------------------------------------- */
.conv-list { display: grid; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.conv { display: flex; align-items: center; gap: 14px; padding: 16px; border-bottom: 1px solid var(--line); transition: background .15s; }
.conv:last-child { border-bottom: 0; }
.conv:hover { background: var(--softer); }
.conv-thumb { width: 56px; height: 56px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--soft); flex-shrink: 0; }
.conv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.conv-body { flex: 1; min-width: 0; display: grid; gap: 1px; }
.conv-top { display: flex; justify-content: space-between; gap: 10px; }
.conv-listing { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-last { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv.unread .conv-last { color: var(--fg); font-weight: 600; }

.chat-page { padding-top: 24px; }
.chat { border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; height: calc(100vh - var(--header-h) - 80px); min-height: 480px; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-who { flex: 1; min-width: 0; display: grid; }
.chat-who a { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-who a:hover { color: var(--fg); }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 8px; background: var(--softer); }
.chat-day { text-align: center; margin: 8px 0; }
.chat-day span { font-size: 12px; color: var(--muted); background: var(--surface); padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); }
.msg { display: grid; max-width: 75%; gap: 2px; }
.msg small { font-size: 11px; color: var(--muted); padding: 0 6px; }
.msg.mine { align-self: flex-end; justify-items: end; }
.bubble { padding: 10px 14px; border-radius: 18px; background: var(--raised); border: 1px solid var(--line); overflow-wrap: anywhere; }
.msg.mine .bubble { background: var(--fg); color: var(--on-fg); border-color: var(--fg); border-end-end-radius: 6px; }
.msg.theirs .bubble { border-end-start-radius: 6px; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--surface); align-items: flex-end; }
.chat-form textarea { border-radius: 22px; padding: 11px 18px; max-height: 160px; }
.chat-form .btn { width: 46px; height: 46px; padding: 0; flex-shrink: 0; }

/* Auth ----------------------------------------------------------------- */
.auth { display: grid; place-items: center; padding: 56px 20px 80px; min-height: calc(100vh - var(--header-h) - 200px); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 32px; margin-bottom: 6px; }
.auth-card > .muted { margin-bottom: 28px; }
.auth-switch { text-align: center; margin-top: 24px; color: var(--muted); font-size: 14px; }
.auth-switch a { color: var(--fg); font-weight: 700; text-decoration: underline; }

/* Static / error ------------------------------------------------------- */
.prose { max-width: 720px; }
.prose p { color: var(--text); font-size: 16px; }
.error-code { font-size: 120px; font-weight: 800; letter-spacing: -.06em; line-height: 1; background: linear-gradient(90deg, var(--fg) 0 33%, var(--red) 33% 66%, var(--green) 66%); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 16px; }

/* Modal ---------------------------------------------------------------- */
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 32px; max-width: 560px; width: calc(100% - 32px); box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(4px); }
.modal h3 { font-size: 22px; margin-bottom: 20px; }
.modal-close-form { position: absolute; top: 16px; inset-inline-end: 16px; margin: 0; }
.picker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.picker-item { display: grid; gap: 6px; padding: 20px; border-radius: 16px; background: var(--soft); transition: .15s; }
.picker-item:hover { background: var(--accent-soft); }
.picker-item svg { width: 28px; height: 28px; color: var(--accent); margin-bottom: 8px; }
.picker-item small { color: var(--muted); }

/* Footer --------------------------------------------------------------- */
.site-footer { margin-top: 64px; border-top: 1px solid var(--line); background: var(--softer); }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; padding-top: 48px; padding-bottom: 32px; flex-wrap: wrap; }
.footer-brand p { color: var(--muted); max-width: 300px; margin-top: 12px; font-size: 14px; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-cols h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.footer-cols a { display: block; padding: 4px 0; font-size: 14px; font-weight: 500; }
.footer-cols a:hover { text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

.show-mobile { display: none !important; }

/* Responsive ----------------------------------------------------------- */
/* Maps (Leaflet + OpenStreetMap) */
.map { position: relative; z-index: 0; width: 100%; height: 340px; border-radius: var(--radius-sm); overflow: hidden; background: #1a1a1d; }
.map-detail { height: 300px; }
.results-map { position: relative; }
.results-map .map { height: calc(100vh - 220px); min-height: 460px; border-radius: var(--radius); border: 1px solid var(--line); }
.map-empty {
    position: absolute; inset: 0; z-index: 500; display: grid; place-content: center; justify-items: center; gap: 10px;
    pointer-events: none; color: var(--fg); font-weight: 600; text-align: center; padding: 20px;
}
.map-empty svg { width: 32px; height: 32px; }
.map-empty span { background: rgba(10, 10, 11, .8); padding: 8px 14px; border-radius: 999px; }
/* Dark map: invert the light OSM tiles */
.leaflet-container { font: inherit; background: #1a1a1d; }
.leaflet-container { direction: ltr; }
[dir=rtl] .map-popup div { direction: rtl; text-align: right; }
.leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9) saturate(.6); }
.leaflet-control-attribution { background: rgba(10, 10, 11, .75) !important; color: var(--muted) !important; font-size: 10px; }
.leaflet-control-attribution a { color: var(--text) !important; }
.leaflet-bar { border: 1px solid var(--line) !important; box-shadow: none !important; }
.leaflet-bar a, .leaflet-bar a:hover { background: var(--surface); color: var(--fg); border-bottom-color: var(--line); }
.leaflet-bar a:hover { background: var(--raised); }
.leaflet-bar a.leaflet-disabled { background: var(--surface); color: var(--muted); }

.map-field .hint { margin-top: -2px; margin-bottom: 4px; }
.map-picker .map { cursor: crosshair; border: 1.5px solid var(--line); }
.map-picker.is-set .map { border-color: var(--green); }
.map-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.map-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.map-status svg { width: 16px; height: 16px; }
.map-picker.is-set .map-status { color: var(--green); }

.map-pin { background: none; border: 0; }
.map-pin span {
    display: block; width: 28px; height: 28px; margin: 2px 0 0;
    border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
    background: var(--accent); border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .5);
}
.map-pin span::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
.map-cluster { display: grid; place-items: center; }
.map-cluster span {
    display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%;
    background: var(--accent); color: #fff; font-weight: 700; font-size: 13px;
    border: 3px solid rgba(255, 255, 255, .9); box-shadow: 0 3px 12px rgba(0, 0, 0, .5);
}
.map-popup-wrap .leaflet-popup-content-wrapper { background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 14px; padding: 0; overflow: hidden; }
.map-popup-wrap .leaflet-popup-content { margin: 0; width: 240px !important; }
.map-popup-wrap .leaflet-popup-tip { background: var(--surface); border: 1px solid var(--line); }
.map-popup-wrap a.leaflet-popup-close-button { color: #fff; background: rgba(0, 0, 0, .55); border-radius: 50%; top: 6px; right: 6px; width: 24px; height: 24px; line-height: 22px; }
.map-popup { display: block; color: var(--fg); }
.map-popup img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--soft); }
.map-popup div { display: grid; gap: 3px; padding: 12px 14px 14px; }
.map-popup strong { font-size: 16px; }
.map-popup span { font-size: 13px; line-height: 1.35; color: var(--text); }
.map-popup small { font-size: 12px; color: var(--muted); }

@media (max-width: 1100px) {
    .grid-cards { grid-template-columns: repeat(3, 1fr); }
    .grid-cards.cols-3 { grid-template-columns: repeat(2, 1fr); }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .hide-md { display: none; }
}

@media (max-width: 900px) {
    .results-layout { grid-template-columns: 1fr; }
    .filters {
        position: fixed; inset: 0; z-index: 80; max-height: none; background: rgba(0,0,0,.7);
        display: none; padding: 0;
    }
    .filters.open { display: block; }
    .filters-form { position: absolute; inset-block: 0; inset-inline-end: 0; width: min(380px, 92vw); border-radius: 0; overflow-y: auto; background: var(--surface); }
    .show-mobile { display: inline-flex !important; }
    .listing-layout { grid-template-columns: 1fr; }
    .listing-side .sticky { position: static; }
    .settings-grid { grid-template-columns: 1fr; }
    .portal-switch .portal-link span { display: none; }
    .portal-link { padding: 8px 12px; }
}

@media (max-width: 720px) {
    .results-map .map { height: 70vh; min-height: 380px; }
    .map { height: 300px; }
    .segmented-sm span { display: none; }
    :root { --header-h: 60px; }
    .container { padding: 0 16px; }
    .header-inner { gap: 10px; }
    .hide-sm { display: none !important; }
    .lang-switch summary span { display: none; }
    .post-btn { padding: 0 !important; width: 34px; height: 34px; }
    .post-btn span { display: none; }
    .lang-switch summary { padding: 8px; }
    .portal-switch { padding: 3px; }
    .portal-link { padding: 7px 10px; }
    .header-actions { gap: 4px; }
    .header-actions .btn-sm { padding: 7px 12px; }
    .logo { gap: 7px; }
    .logo-text { font-size: 21px; }
    .hero { padding-top: 40px; }
    .portal-cards { grid-template-columns: 1fr; gap: 14px; }
    .portal-card { min-height: 220px; padding: 24px; }
    .portal-card h2 { margin-top: 28px; }
    .features { grid-template-columns: 1fr; gap: 24px; }
    .grid-cards, .grid-cards.cols-3 { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .card-price { font-size: 15px; }
    .card .fav-btn { width: 34px; height: 34px; }
    .portal-hero-head { flex-direction: column; align-items: flex-start; }
    .searchbar { flex-wrap: wrap; border-radius: 16px; }
    .searchbar-field.grow { flex-basis: 100%; }
    .searchbar-field + .searchbar-field { border-inline-start: 0; flex: 1; background: var(--soft); border-radius: 10px; }
    .searchbar .btn span { display: none; }
    .results-head { flex-direction: column; }
    .form-grid { grid-template-columns: 1fr; }
    .panel { padding: 18px; }
    .cta-band { padding: 32px 24px; }
    .my-item { flex-wrap: wrap; }
    .my-thumb { width: 88px; }
    .my-actions { width: 100%; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 8px; }
    .picker-grid { grid-template-columns: 1fr; }
    .footer-cols { gap: 32px; }
    .chat { height: calc(100vh - var(--header-h) - 40px); border-radius: 16px; }
    .chat-page { padding-top: 12px; }
    .msg { max-width: 88%; }
    .stat strong { font-size: 26px; }
    .account-tabs a svg { display: none; }
}

@media (max-width: 380px) {
    .grid-cards, .grid-cards.cols-3 { grid-template-columns: 1fr; }
}

/* Legal pages ---------------------------------------------------------- */
.legal { display: grid; grid-template-columns: 260px 1fr; gap: 56px; align-items: start; }
.legal-toc { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; font-size: 13px; padding: 20px; border-radius: var(--radius); background: var(--softer); border: 1px solid var(--line); }
.legal-toc strong { display: block; margin-bottom: 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.legal-toc ol { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; }
.legal-toc a { color: var(--text); }
.legal-toc a:hover { color: var(--fg); text-decoration: underline; }
.legal-body { max-width: 760px; }
.legal-body h1 { margin-bottom: 20px; }
.legal-intro { font-size: 17px; padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.legal-section { padding-top: 28px; scroll-margin-top: calc(var(--header-h) + 16px); }
.legal-section h2 { font-size: 20px; display: flex; gap: 10px; align-items: baseline; }
.legal-section h2 span { color: var(--red); font-weight: 800; white-space: nowrap; }
.legal-body p, .legal-body li { font-size: 15px; line-height: 1.7; }
.legal-body ul { padding-inline-start: 20px; margin: 0 0 1em; display: grid; gap: 4px; }
.legal-body a { text-decoration: underline; font-weight: 600; }
@media (max-width: 900px) {
    .legal { grid-template-columns: 1fr; gap: 24px; }
    .legal-toc { position: static; max-height: none; }
}
