:root {
  --ink: #13294B;      /* harbour navy: text, header, board */
  --ink-2: #3A4E66;
  --muted: #5F6E80;
  --paper: #F4F6F8;    /* cool off-white page */
  --white: #FFFFFF;
  --line: #D8DEE5;
  --line-2: #E8ECF0;
  --buy: #0A7B66;  --buy-bg: #E2F3EF;
  --sell: #2D4BC8; --sell-bg: #E7EBFB;
  --signal: #F4C20D;   /* maritime flag yellow: primary actions */
  --signal-hover: #FFD43B;
  --gold-bg: #FFF4C7; --gold-ink: #6B5200;
  --danger: #B42318;
  --r-s: 6px; --r-m: 10px; --r-l: 16px;
  --lift: 0 1px 2px rgba(19,41,75,.06), 0 10px 28px -14px rgba(19,41,75,.25);
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', 'Noto Sans', 'PingFang SC', 'Hiragino Sans', 'Malgun Gothic', 'Noto Sans Arabic', 'Noto Sans Devanagari', sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55;
  color: var(--ink); background: var(--paper);
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; outline: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sell); outline-offset: 2px; border-radius: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; top: 8px; inset-inline-start: 8px; background: var(--signal); padding: 8px 12px; z-index: 50; transform: translateY(-200%); }
.skip:focus { transform: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.top { background: var(--ink); color: var(--white); position: sticky; top: 0; z-index: 20; }
.top-in { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-stretch: 112%; font-size: 19px; letter-spacing: -0.01em; }
.brand svg { color: var(--signal); }
.nav { display: flex; gap: 2px; margin-inline-start: auto; align-items: center; }
.nav a, .nav button {
  color: #D5DDE8; text-decoration: none; font: inherit; font-size: 15px; background: none; border: 0;
  padding: 8px 12px; border-radius: var(--r-s); cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.nav a:hover, .nav button:hover { color: var(--white); background: rgba(255,255,255,.08); }
.nav a[aria-current="page"] { color: var(--white); background: rgba(255,255,255,.1); }
.nav .nav-cta { background: var(--signal); color: var(--ink); font-weight: 700; margin-inline-start: 6px; }
.nav .nav-cta:hover { background: var(--signal-hover); color: var(--ink); }
.lang select {
  font: inherit; font-size: 14px; color: var(--white); background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.22); border-radius: var(--r-s); padding: 7px 8px;
}
.lang option { color: var(--ink); }
.menu-btn { display: none; background: none; border: 0; color: var(--white); padding: 6px; cursor: pointer; }

/* ---------- type ---------- */
h1, h2, h3 { margin: 0; line-height: 1.12; }
.display { font-size: clamp(40px, 5.4vw, 70px); font-weight: 800; font-stretch: 118%; letter-spacing: -0.028em; line-height: 1.0; }
.h1 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; font-stretch: 114%; letter-spacing: -0.02em; }
.h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 750; font-stretch: 110%; letter-spacing: -0.015em; }
.h3 { font-size: 18px; font-weight: 700; }
.lede { font-size: 19px; color: var(--ink-2); max-width: 32em; margin: 22px 0 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 15.5px; text-decoration: none; cursor: pointer; white-space: nowrap;
  padding: 11px 18px; border-radius: var(--r-s); border: 1.5px solid var(--ink);
  background: var(--white); color: var(--ink); transition: background .15s, border-color .15s;
}
.btn:hover { background: #EDF1F5; }
.btn-primary { background: var(--signal); border-color: var(--signal); }
.btn-primary:hover { background: var(--signal-hover); border-color: var(--signal-hover); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: #1F3D69; }
.btn-ghost { border-color: var(--line); }
.btn-ghost:hover { border-color: #B9C3CF; background: var(--white); }
.btn-sm { padding: 7px 12px; font-size: 14px; }
.btn-lg { padding: 14px 22px; font-size: 16.5px; }
.btn-link { background: none; border: 0; padding: 0; color: var(--sell); font-weight: 650; }
.btn-link:hover { background: none; text-decoration: underline; }
.btn-danger { border-color: transparent; color: var(--danger); padding: 6px 10px; font-size: 14px; background: transparent; }
.btn-danger:hover { background: #FDECEA; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field > label, .field-label { font-weight: 650; font-size: 14.5px; }
.field .hint { font-size: 13px; color: var(--muted); }
.field .err { font-size: 13px; color: var(--danger); }
.field .err:empty { display: none; }
.input, select.input, textarea.input {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--white);
  border: 1.5px solid var(--line); border-radius: var(--r-s); padding: 11px 12px; width: 100%;
}
.input:hover { border-color: #BCC6D2; }
.input:focus { border-color: var(--sell); outline: none; box-shadow: 0 0 0 3px rgba(45,75,200,.16); }
.field.invalid .input { border-color: var(--danger); }
textarea.input { min-height: 150px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.seg { display: inline-flex; align-self: flex-start; border: 1.5px solid var(--line); border-radius: var(--r-s); background: var(--white); padding: 3px; gap: 3px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: 8px 14px; cursor: pointer; font-weight: 650; font-size: 14.5px; border-radius: 4px; color: var(--ink-2); }
.seg label:hover { background: var(--paper); }
.seg input:checked + label { background: var(--ink); color: var(--white); }
.seg input[value="buy"]:checked + label { background: var(--buy); }
.seg input[value="sell"]:checked + label { background: var(--sell); }
.seg input:disabled + label { opacity: .45; cursor: not-allowed; }
.seg input:focus-visible + label { outline: 3px solid var(--sell); outline-offset: 1px; }

.tag {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 750; padding: 3px 8px; border-radius: 4px;
  font-stretch: 105%; white-space: nowrap; line-height: 1.3;
}
.tag-buy { background: var(--buy-bg); color: var(--buy); }
.tag-sell { background: var(--sell-bg); color: var(--sell); }
.tag-feat { background: var(--gold-bg); color: var(--gold-ink); }
.tier { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; font-stretch: 108%; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.tier-vip { background: var(--sell-bg); color: var(--sell); }
.tier-super { background: var(--ink); color: var(--signal); }
.tier-free { background: var(--line-2); color: var(--ink-2); }
.top .tier-vip { background: rgba(255,255,255,.14); color: #fff; }
.top .tier-super { background: var(--signal); color: var(--ink); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 72px 0 80px; overflow: hidden; }
/* faint chart grid, a nod to nautical charts */
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(19,41,75,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(19,41,75,.055) 1px, transparent 1px);
  background-size: 56px 56px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 40%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 80% at 30% 40%, #000 30%, transparent 75%);
}
.hero-in { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.search { display: flex; margin-top: 32px; max-width: 580px; border: 2px solid var(--ink); border-radius: var(--r-m); background: var(--white); overflow: hidden; box-shadow: var(--lift); }
.search input { flex: 1; min-width: 0; border: 0; font: inherit; font-size: 17px; padding: 15px 18px; background: transparent; color: var(--ink); }
.search input:focus { outline: none; }
.search:focus-within { box-shadow: 0 0 0 4px rgba(244,194,13,.45); }
.search .btn { border-radius: 0; border: 0; padding-inline: 24px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.hero-stats { display: flex; gap: 32px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); max-width: 580px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-size: 28px; font-weight: 800; font-stretch: 115%; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero-stats span { font-size: 14px; color: var(--muted); }

.board { background: var(--ink); color: #E7ECF3; border-radius: var(--r-l); padding: 22px 24px 12px; box-shadow: 0 30px 60px -30px rgba(19,41,75,.6); }
.board-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.board-head h2 { font-size: 15px; font-weight: 700; color: var(--signal); font-stretch: 110%; display: flex; align-items: center; gap: 8px; }
.live { width: 8px; height: 8px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px rgba(34,197,94,.25); }
.board-head a { font-size: 14px; color: #B9C6D6; }
.board-row {
  display: grid; grid-template-columns: 60px minmax(0,1fr) auto; gap: 12px; align-items: center;
  padding: 11px 0; border-top: 1px solid rgba(255,255,255,.09); text-decoration: none; color: inherit;
}
.board-row:hover .b-title { text-decoration: underline; }
.b-type { font-size: 12px; font-weight: 800; font-stretch: 108%; padding: 3px 0; text-align: center; border-radius: 4px; color: #fff; }
.b-type.buy { background: #0E9C82; }
.b-type.sell { background: #4C68E0; }
.b-title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.b-meta { font-size: 13px; color: #9FB0C4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-when { font-size: 13px; color: #9FB0C4; font-variant-numeric: tabular-nums; text-align: end; white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  .board-row { animation: flip .5s cubic-bezier(.2,.8,.2,1) both; transform-origin: top; }
  .board-row:nth-child(2) { animation-delay: .07s } .board-row:nth-child(3) { animation-delay: .14s }
  .board-row:nth-child(4) { animation-delay: .21s } .board-row:nth-child(5) { animation-delay: .28s }
  .board-row:nth-child(6) { animation-delay: .35s } .board-row:nth-child(7) { animation-delay: .42s }
  @keyframes flip { from { opacity: 0; transform: perspective(500px) rotateX(-70deg); } to { opacity: 1; transform: none; } }
}

/* ---------- sections ---------- */
.section { padding: 64px 0; border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.cat {
  display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--white); border: 1px solid var(--line-2);
  border-radius: var(--r-m); text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
.cat:hover { border-color: #BCC6D2; box-shadow: var(--lift); }
.cat b { display: block; font-weight: 650; font-size: 15px; line-height: 1.25; }
.cat span { font-size: 13px; color: var(--muted); }
.ico { flex: none; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; }
.ico svg { width: 22px; height: 22px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { counter-increment: s; padding-top: 18px; border-top: 3px solid var(--ink); }
.steps li::before { content: counter(s); font-weight: 800; font-stretch: 120%; font-size: 32px; display: block; line-height: 1; margin-bottom: 14px; }
.steps p { margin: 6px 0 0; color: var(--ink-2); }

/* ---------- browse ---------- */
.page { padding: 44px 0 80px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head .actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.quota { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px 6px 8px; }
.quota .bar { width: 64px; height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.quota .bar i { display: block; height: 100%; background: var(--buy); border-radius: 3px; }
.quota.low .bar i { background: var(--danger); }

.filters { display: grid; grid-template-columns: auto 1fr 1fr 1.5fr; gap: 12px; align-items: center; padding: 14px; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-m); }
.filters .input { padding: 10px 12px; }
.qbox { display: flex; border: 1.5px solid var(--line); border-radius: var(--r-s); overflow: hidden; background: var(--white); }
.qbox:focus-within { border-color: var(--sell); box-shadow: 0 0 0 3px rgba(45,75,200,.16); }
.qbox input { flex: 1; min-width: 0; border: 0; font: inherit; font-size: 16px; padding: 10px 12px; color: var(--ink); background: transparent; }
.qbox input:focus { outline: none; }
.qbox .btn { border-radius: 0; border: 0; }
.count { font-size: 14px; color: var(--muted); margin: 18px 0 10px; }

.leads { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.lead {
  display: grid; grid-template-columns: 44px minmax(0,1fr) 250px; gap: 18px; align-items: start;
  padding: 18px; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-m);
}
.lead.is-featured { border-color: #EBCB5C; box-shadow: inset 3px 0 0 var(--signal); }
[dir="rtl"] .lead.is-featured { box-shadow: inset -3px 0 0 var(--signal); }
.lead-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.lead-title { font-weight: 700; font-size: 17.5px; line-height: 1.3; text-decoration: none; }
.lead-title:hover { text-decoration: underline; }
.lead-desc { color: var(--ink-2); font-size: 14.5px; margin: 5px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lead-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.lead-meta b { color: var(--ink); font-weight: 600; }
.lead-side { border-inline-start: 1px solid var(--line-2); padding-inline-start: 18px; min-height: 100%; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.c-mini { font-size: 14px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.c-mini svg { flex: none; color: var(--muted); }
.c-mini span, .c-mini a { direction: ltr; unicode-bidi: isolate; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.c-mini.locked { color: var(--muted); }
.c-mini a { color: var(--ink); font-weight: 600; text-decoration: none; }
.c-mini a:hover { text-decoration: underline; }

.pager { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 28px; }
.empty { padding: 56px 20px; text-align: center; color: var(--ink-2); background: var(--white); border: 1px dashed var(--line); border-radius: var(--r-m); }
.empty .btn { margin-top: 14px; }

/* ---------- detail ---------- */
.detail { display: grid; grid-template-columns: minmax(0,1fr) 370px; gap: 48px; align-items: start; }
.crumb { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 22px; font-size: 15px; color: var(--muted); text-decoration: none; }
.crumb:hover { color: var(--ink); }
.detail h1 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; font-stretch: 110%; letter-spacing: -0.018em; margin: 14px 0 22px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); justify-content: start; gap: 8px 44px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 0 26px; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 3px 0 0; font-weight: 650; }
.body-text { white-space: pre-wrap; max-width: 68ch; font-size: 17px; line-height: 1.7; }
.posted-by { display: flex; align-items: center; gap: 12px; margin-top: 30px; padding: 16px; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-m); max-width: 68ch; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--signal); display: grid; place-items: center; font-weight: 800; flex: none; }
.contact-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-l); padding: 24px; position: sticky; top: 88px; box-shadow: var(--lift); }
.contact-card h2 { font-size: 17px; margin-bottom: 10px; }
.c-line { padding: 12px 0; border-top: 1px solid var(--line-2); }
.c-line dt { font-size: 13px; color: var(--muted); }
.c-line dd { unicode-bidi: plaintext; margin: 3px 0 0; font-weight: 650; font-size: 17px; word-break: break-all; font-variant-numeric: tabular-nums; }
.c-line.locked dd { color: var(--muted); filter: blur(.3px); }
.contact-card .btn { margin-top: 10px; }
.contact-card .note { font-size: 13.5px; color: var(--muted); margin: 12px 0 0; text-align: center; }

/* ---------- pricing ---------- */
.billing { margin: 28px 0 0; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; align-items: stretch; }
.plan { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-l); padding: 28px; display: flex; flex-direction: column; }
.plan.super { background: var(--ink); color: #E7ECF3; border-color: var(--ink); box-shadow: 0 30px 60px -30px rgba(19,41,75,.6); }
.plan-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 26px; }
.plan-name { font-weight: 750; font-size: 18px; font-stretch: 108%; }
.plan.super .plan-name { color: var(--signal); }
.save { background: var(--signal); color: var(--ink); font-weight: 750; font-size: 12.5px; padding: 3px 8px; border-radius: 4px; }
.price { font-size: 50px; font-weight: 800; font-stretch: 115%; letter-spacing: -0.02em; margin: 18px 0 0; font-variant-numeric: tabular-nums; line-height: 1.05; }
.plan.super .price { color: #fff; }
.price small { font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: 0; font-stretch: 100%; }
.plan.super .price small, .plan.super .billed { color: #9FB0C4; }
.billed { font-size: 13.5px; color: var(--muted); min-height: 21px; margin-top: 6px; }
.perks { list-style: none; padding: 0; margin: 22px 0 26px; flex: 1; }
.perks li { padding: 9px 0 9px 28px; position: relative; border-top: 1px solid var(--line-2); font-size: 15px; }
.plan.super .perks li { border-color: rgba(255,255,255,.1); }
.perks li::before { content: ''; position: absolute; left: 4px; top: 15px; width: 12px; height: 7px; border-left: 2.5px solid var(--buy); border-bottom: 2.5px solid var(--buy); transform: rotate(-45deg); }
.plan.super .perks li::before { border-color: var(--signal); }
[dir="rtl"] .perks li { padding: 9px 28px 9px 0; }
[dir="rtl"] .perks li::before { left: auto; right: 4px; }
.perks b { font-weight: 750; }
.plan-note { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* ---------- auth ---------- */
.auth { display: grid; grid-template-columns: 1fr 460px; gap: 0; max-width: 1000px; margin: 0 auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; box-shadow: var(--lift); }
.auth-side { background: var(--ink); color: #E7ECF3; padding: 44px 40px; position: relative; overflow: hidden; }
.auth-side::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
}
.auth-side h2 { font-size: 30px; font-weight: 800; font-stretch: 114%; letter-spacing: -0.015em; color: #fff; position: relative; }
.auth-side ul { list-style: none; padding: 0; margin: 28px 0 0; position: relative; }
.auth-side li { display: flex; gap: 12px; align-items: center; padding: 10px 0; font-size: 16px; }
.auth-side li svg { flex: none; color: var(--signal); }
.auth-form { padding: 40px; }
.auth-form h1 { font-size: 26px; font-weight: 800; font-stretch: 110%; margin-bottom: 22px; }
.gbtn-wrap { min-height: 44px; display: flex; justify-content: center; }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; font: inherit; font-weight: 600; font-size: 15px; padding: 11px 16px; border: 1px solid #DADCE0; border-radius: 6px; background: #fff; color: #3C4043; cursor: pointer; }
.gbtn:hover { background: #F7F8F8; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13.5px; margin: 22px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.form-foot { margin-top: 18px; font-size: 15px; text-align: center; }

/* ---------- panels, account ---------- */
.narrow { max-width: 480px; margin: 0 auto; }
.mid { max-width: 760px; margin: 0 auto; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-l); padding: 28px; }
.panel + .panel { margin-top: 20px; }
.panel h2 { font-size: 18px; margin-bottom: 4px; }
.alert { padding: 12px 16px; border-radius: var(--r-s); margin-bottom: 18px; font-size: 15px; }
.alert-warn { background: #FFF6D6; border: 1px solid #EAC54F; }
.alert-info { background: var(--sell-bg); color: #1E3797; }
.alert-err { background: #FDECEA; color: var(--danger); }
.summary { display: grid; grid-template-columns: 1fr auto; gap: 10px; font-size: 16px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 16px 0 22px; }
.summary .total { font-weight: 800; font-size: 20px; }

.acct-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.acct-who { display: flex; gap: 16px; align-items: center; }
.acct-who .avatar { width: 56px; height: 56px; font-size: 22px; }
.acct-plan { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.meter { min-width: 220px; }
.meter-label { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; gap: 12px; }
.meter-label b { color: var(--ink); }
.meter .bar { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.meter .bar i { display: block; height: 100%; background: var(--buy); border-radius: 4px; }
.acct-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; margin-top: 20px; }
.acct-grid .panel + .panel { margin-top: 20px; }
.rows { list-style: none; padding: 0; margin: 14px 0 0; }
.rows li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-2); font-size: 15px; }
.rows li > a { flex: 1; min-width: 0; font-weight: 650; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows li > a:hover { text-decoration: underline; }
.rows .views { font-size: 13px; color: var(--muted); white-space: nowrap; }
.viewer { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.viewer b { font-weight: 650; }
.viewer span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upsell { margin-top: 14px; padding: 16px; border-radius: var(--r-m); background: var(--gold-bg); color: var(--gold-ink); font-size: 14.5px; }
.upsell .btn { margin-top: 10px; }

/* ---------- dialog, footer, toast ---------- */
dialog { border: 0; border-radius: var(--r-l); padding: 28px; max-width: 420px; width: calc(100% - 40px); box-shadow: 0 30px 80px -20px rgba(19,41,75,.5); color: var(--ink); }
dialog::backdrop { background: rgba(19,41,75,.45); }
dialog h2 { font-size: 20px; margin-bottom: 10px; }
dialog p { margin: 0 0 20px; color: var(--ink-2); }
dialog .actions { display: flex; gap: 10px; justify-content: flex-end; }

.foot { background: var(--white); border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--muted); margin-top: 40px; }
.foot-in { display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; align-items: center; }
.foot-links { display: flex; gap: 18px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: #fff;
  padding: 12px 20px; border-radius: var(--r-s); font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; z-index: 60; max-width: calc(100% - 40px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- badges, translate ---------- */
.tag-ok { background: #DDF3E8; color: #0B6B45; }
.tag-ok svg { margin-inline-end: 1px; }
.tag-official { background: var(--ink); color: #fff; }
.avatar-official { background: var(--signal); color: var(--ink); }
.avatar-official svg { width: 20px; height: 20px; }
.tr-btn { display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 13.5px; font-weight: 650; color: var(--sell); background: none; border: 0; padding: 0; cursor: pointer; }
.tr-btn:hover span { text-decoration: underline; }
.tr-btn[disabled] { color: var(--muted); cursor: progress; }
.tr-row { margin: -10px 0 16px; }
.chk { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; cursor: pointer; white-space: nowrap; user-select: none; }
.chk input { width: 17px; height: 17px; accent-color: var(--buy); margin: 0; }
.chk svg { color: var(--buy); }
.filters { grid-template-columns: auto 1fr 1fr 1.5fr auto; }

/* ---------- admin ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 24px 0 20px; }
.stat { background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-m); padding: 16px 18px; }
.stat b { display: block; font-size: 26px; font-weight: 800; font-stretch: 112%; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat span { font-size: 13.5px; color: var(--muted); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.admin-grid .panel + .panel { margin-top: 0; }
.row-errs ul { margin: 2px 0 0; padding-inline-start: 16px; }
.import-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.import-preview { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 18px; padding: 14px; border: 1px dashed var(--line); border-radius: var(--r-m); }
.import-preview .btn { margin-inline-start: auto; }
.alert-ok { background: #DDF3E8; color: #0B6B45; margin-top: 18px; }
#importOut .alert-err { margin-top: 18px; }
.row-errs { margin: 10px 0 0; padding-inline-start: 18px; font-size: 14px; }
.row-errs li { margin: 4px 0; }
.table-wrap { overflow-x: auto; }
.atable { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 820px; }
.atable th { text-align: start; font-size: 13px; color: var(--muted); font-weight: 600; padding: 10px 10px; border-bottom: 1px solid var(--line); }
.atable td { padding: 12px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.atable .a-title { font-weight: 650; text-decoration: none; }
.atable .a-title:hover { text-decoration: underline; }
.atable .acts { white-space: nowrap; text-align: end; }
.btn.is-off { opacity: .45; pointer-events: none; }

/* User-written text may be in any script; let each line pick its own direction. */
.b-title, .b-meta, .lead-title, .lead-desc, .lead-meta b, .detail h1, .body-text, .facts dd { unicode-bidi: plaintext; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .admin-grid { grid-template-columns: 1fr; gap: 28px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .chk { grid-column: 1 / -1; }
  .hero-in, .detail, .acct-grid, .auth { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 56px; }
  .contact-card { position: static; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .seg, .filters .qbox { grid-column: 1 / -1; }
  .plans { grid-template-columns: 1fr; max-width: 520px; }
  .auth-side { padding: 32px; }
  .acct-top { grid-template-columns: 1fr; }
  .acct-plan { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--ink); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; margin: 0; }
  .nav.open { display: flex; }
  .nav .nav-cta { margin: 6px 0 0; justify-content: center; }
  .lang { margin-inline-start: auto; }
  .steps, .row2 { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .wrap { padding: 0 18px; }
  .lead { grid-template-columns: 40px minmax(0,1fr); padding: 16px; }
  .lead-side { grid-column: 1 / -1; border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--line-2); padding-top: 12px; }
  .hero-stats { gap: 22px; }
  .auth-form { padding: 28px 22px; }
}

/* Subcategories */
.cat { display: block; }
.cat-main { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.cat-subs { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.cat-subs a { font-size: 12.5px; color: var(--muted); text-decoration: none; }
.cat-subs a:hover { color: var(--ink, #13294B); text-decoration: underline; }
.subchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.subchips button { font: inherit; font-size: 13.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--white); color: inherit; cursor: pointer; }
.subchips button:hover { border-color: #BCC6D2; }
.subchips button[aria-current] { background: #13294B; border-color: #13294B; color: #fff; }
.afilters { display: grid; grid-template-columns: 150px 1fr 1fr 1.4fr; gap: 10px; margin: 8px 0 14px; }
.afilters .input { padding: 9px 12px; }
@media (max-width: 860px) { .afilters { grid-template-columns: 1fr 1fr; } .afilters .qbox { grid-column: 1 / -1; } }
.atable th { white-space: nowrap; }

/* ---------- back office ----------
   /admin is its own area: the public header, language switcher and footer are hidden and the
   page carries its own bar, so the admin never looks like a visitor page. */
.admin-mode { background: #EDF0F4; }
.admin-mode .top, .admin-mode .foot, .admin-mode .skip { display: none; }
.admin-mode .page { padding: 0 0 60px; }
.admin-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 24px;
}
.admin-bar h1 { font-size: 19px; margin: 0; letter-spacing: -0.01em; }
.admin-bar .admin-sub { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; margin-top: 3px; }
.admin-bar-actions { display: flex; gap: 8px; align-items: center; }
.admin-gate { max-width: 420px; margin: 8vh auto 0; }

/* Admin header. The public .top is hidden in admin mode, so the back office carries its own bar. */
.admin-top { background: var(--ink); color: var(--white); position: sticky; top: 0; z-index: 20; }
.admin-top .brand { color: var(--white); }
.admin-top .brand b { font-weight: 500; color: var(--signal); margin-inline-start: 4px; }
.admin-top .nav a, .admin-top .nav button {
  color: #D5DDE8; text-decoration: none; font: inherit; font-size: 15px; background: none; border: 0;
  padding: 8px 12px; border-radius: var(--r-s); cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.admin-top .nav a:hover, .admin-top .nav button:hover { background: rgba(255,255,255,.1); color: var(--white); }
.admin-mode main { padding-top: 0; min-width: 0; }

/* Left sidebar: the sections stay put while the content scrolls. */
.admin-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 26px; align-items: start; padding-top: 24px; }
.admin-side { position: sticky; top: 84px; }
.admin-tabs { display: flex; flex-direction: column; gap: 2px; }
.admin-tabs a {
  padding: 11px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px;
  border-inline-start: 3px solid transparent; border-radius: 0 var(--r-s) var(--r-s) 0;
}
.admin-tabs a:hover { color: var(--ink); background: rgba(19,41,75,.04); }
.admin-tabs a[aria-current="page"] { color: var(--ink); background: rgba(19,41,75,.07); border-inline-start-color: var(--ink); }
.admin-tabs:empty { display: none; }
@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; gap: 14px; }
  .admin-side { position: static; }
  .admin-tabs { flex-direction: row; overflow-x: auto; border-bottom: 1px solid var(--line); }
  .admin-tabs a { border-inline-start: 0; border-bottom: 2px solid transparent; border-radius: var(--r-s) var(--r-s) 0 0; white-space: nowrap; }
  .admin-tabs a[aria-current="page"] { border-bottom-color: var(--ink); }
}
.opt-tag { color: var(--muted); font-weight: 400; }
.integrations { display: grid; gap: 12px; }
.integration { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.integration:last-child { border-bottom: 0; }
.integration .hint-inline { font-size: 13px; color: var(--muted); }
.pill-on { background: var(--buy-bg); color: var(--buy); }
.pill-off { background: #FDECEC; color: var(--danger); }

.insight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .insight-grid { grid-template-columns: 1fr; } }
.bar-row { display: flex; align-items: center; gap: 10px; margin: 7px 0; font-size: 14px; }
.bar-label { flex: 0 0 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.bar-track { flex: 1; height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.bar-track i { display: block; height: 100%; background: var(--ink); border-radius: 4px; }
.bar-num { flex: 0 0 44px; text-align: end; color: var(--muted); font-weight: 600; }

.mini-bar { display: inline-block; width: 56px; height: 7px; background: var(--line-2); border-radius: 4px; overflow: hidden; margin-inline-end: 8px; vertical-align: middle; }
.mini-bar i { display: block; height: 100%; border-radius: 4px; }

/* Secondary tabs inside a section */
.sub-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.sub-tabs a {
  padding: 9px 14px; text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 600;
  border-radius: var(--r-s) var(--r-s) 0 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.sub-tabs a:hover { color: var(--ink); background: rgba(19,41,75,.04); }
.sub-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* Wide tables: keep the first column visible and always show the horizontal scrollbar */
.table-wrap { overflow-x: auto; scrollbar-width: thin; overscroll-behavior-x: contain; }
.table-wrap::-webkit-scrollbar { height: 10px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: var(--muted); }
.table-wrap::-webkit-scrollbar-track { background: var(--line-2); border-radius: 5px; }

.atable th:first-child, .atable td:first-child {
  position: sticky; inset-inline-start: 0; background: var(--white);
  box-shadow: 1px 0 0 var(--line-2);
}
.atable thead th { background: var(--white); }

.scroll-hint {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted);
  margin: 0 0 8px;
}
.scroll-hint::before { content: '⟷'; font-size: 14px; color: var(--ink); }

/* Legal pages */
.legal { line-height: 1.75; }
.legal .legal-h { font-size: 16px; margin: 22px 0 8px; color: var(--ink); }
.legal .legal-h:first-child { margin-top: 0; }
.legal .body-text p { margin: 0 0 10px; }
.legal .legal-li { padding-inline-start: 18px; position: relative; }
.legal .legal-li::before { content: '·'; position: absolute; inset-inline-start: 6px; color: var(--muted); }
