/* ============================================================ tokens */
:root {
  --navy: #0b2545; --blue: #1d4e89; --blue-2: #2c64ad; --gold: #c9a227; --gold-soft: #f4ecd2;
  --bg: #f6f4ef; --surface: #ffffff; --surface-2: #faf9f6; --sunken: #efece5;
  --text: #17202e; --muted: #5a6779; --faint: #8a95a5; --border: #e2ddd1; --border-strong: #cfc8b8;
  --accent: var(--blue); --accent-ink: #fff; --accent-soft: #e6eef9;
  --ok: #1f7a4d; --ok-soft: #e3f3ea; --warn: #9a6a00; --warn-soft: #fbf1d6; --bad: #b42318; --bad-soft: #fbe7e5;
  --r-common: #7d8694; --r-uncommon: #2e9d6a; --r-rare: #2f6fdb; --r-epic: #8a3ffc; --r-legendary: #c9921a;
  --radius: 10px; --radius-sm: 6px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.16);
  --serif: "Source Serif 4", Georgia, serif; --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1420; --surface: #131c2b; --surface-2: #172234; --sunken: #0f1724;
    --text: #e6ebf2; --muted: #9eabbd; --faint: #6f7d91; --border: #243247; --border-strong: #324560;
    --accent: #6ea3ea; --accent-ink: #08111e; --accent-soft: #172b47; --gold-soft: #2c2716;
    --ok: #4cc48a; --ok-soft: #12291f; --warn: #e5b440; --warn-soft: #2b2312; --bad: #f2776b; --bad-soft: #2e1614;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
body.market {
  --accent: #b4461d; --accent-soft: #fbeee6; --accent-ink: #fff;
}
@media (prefers-color-scheme: dark) { body.market { --accent: #f0895e; --accent-soft: #34190f; --accent-ink: #1b0b04; } }

/* ============================================================ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--sans); }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); } h2 { font-size: 1.45rem; } h3 { font-size: 1.15rem; } h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
code, .mono { font-family: var(--mono); font-size: .88em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.boot { min-height: 80vh; display: grid; place-content: center; justify-items: center; color: var(--muted); gap: 12px; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: .86rem; } .tiny { font-size: .76rem; }
.center { text-align: center; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .row.tight { gap: 6px; } .row.between { justify-content: space-between; }
.stack { display: grid; gap: 16px; } .stack.tight { gap: 8px; }
.grow { flex: 1; } .hide { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break { overflow-wrap: anywhere; }

/* ============================================================ shell */
.gov-banner { background: var(--navy); color: #c9d6ea; font-size: .78rem; }
.gov-banner .container { display: flex; gap: 10px; align-items: center; padding-block: 5px; }
.gov-banner strong { color: #fff; font-weight: 600; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: 20px; }
@media (max-width: 600px) { .container { padding-inline: 16px; } }

.header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.header .container { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; }
.brand img { width: 38px; height: 38px; }
.brand b { font-family: var(--serif); font-size: 1.12rem; display: block; line-height: 1.1; }
.brand small { color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.nav { display: flex; gap: 2px; flex: 1; }
.nav a { color: var(--muted); padding: 8px 11px; border-radius: var(--radius-sm); font-weight: 500; font-size: .92rem; white-space: nowrap; }
.nav a:hover { background: var(--sunken); color: var(--text); text-decoration: none; }
.nav a.active { color: var(--accent); background: var(--accent-soft); }
.nav a.market-link { color: #b4461d; } @media (prefers-color-scheme: dark) { .nav a.market-link { color: #f0895e; } }
.header-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.btn.menu-btn { display: none; }
@media (max-width: 1020px) {
  .btn.menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); flex-direction: column; padding: 8px 16px 16px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); }
  .nav.open { display: flex; }
}
.market-header { background: linear-gradient(90deg, #3b1408, #6b2410); border-bottom: 0; }
.market-header .brand b, .market-header .nav a { color: #fbe3d6; }
.market-header .brand small { color: #f0b89c; }
.market-header .nav a:hover, .market-header .nav a.active { background: rgba(255,255,255,.12); color: #fff; }
@media (max-width: 1020px) { .market-header .nav { background: #4a1a0b; } }

main { min-height: 70vh; padding-block: 28px 56px; }
.footer { background: var(--navy); color: #aebbd0; padding: 36px 0 24px; font-size: .86rem; }
.footer a { color: #dbe5f3; } .footer h4 { color: #fff; font-family: var(--sans); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.footer .cols { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 24px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
@media (max-width: 760px) { .footer .cols { grid-template-columns: 1fr 1fr; } }

/* ============================================================ components */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  padding: 9px 15px; border-radius: var(--radius-sm); font: 600 .9rem/1.1 var(--sans); cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--sunken); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #1b1404; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn.danger.solid { background: var(--bad); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; } .btn.ghost:hover { background: var(--sunken); }
.btn.sm { padding: 6px 10px; font-size: .82rem; } .btn.lg { padding: 13px 22px; font-size: 1rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn svg, .icon { width: 1.1em; height: 1.1em; flex: none; }
.market-header .btn.ghost { color: #fbe3d6; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .pad, .pad { padding: 20px; } .card .pad-lg { padding: 28px; }
.card-head { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.card-head h3, .card-head h2 { margin: 0; }
.card.link { transition: border-color .12s, transform .12s; color: inherit; display: block; text-decoration: none !important; }
.card.link:hover { border-color: var(--accent); transform: translateY(-1px); }
.list > * + * { border-top: 1px solid var(--border); }
.list-item { padding: 14px 20px; display: flex; gap: 12px; align-items: flex-start; }
a.list-item { color: inherit; text-decoration: none !important; } a.list-item:hover { background: var(--surface-2); }

.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.split.left { grid-template-columns: 240px minmax(0, 1fr); }
@media (max-width: 900px) { .split, .split.left { grid-template-columns: 1fr; } }

.field { display: grid; gap: 6px; }
.field > span, label.lbl { font-weight: 600; font-size: .88rem; }
.field small { color: var(--muted); font-size: .8rem; }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: var(--radius-sm); padding: 10px 12px; font: inherit; }
textarea.input { min-height: 120px; resize: vertical; }
.input:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; cursor: pointer; } .check input { margin-top: 3px; }
.form { display: grid; gap: 16px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: .74rem; font-weight: 600; background: var(--sunken); color: var(--muted); white-space: nowrap; text-transform: capitalize; }
.badge.blue { background: var(--accent-soft); color: var(--accent); } .badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.gold { background: var(--gold-soft); color: #8a6a0a; } @media (prefers-color-scheme: dark) { .badge.gold { color: var(--gold); } }
.badge.official { background: var(--navy); color: var(--gold); }

.callout { border: 1px solid var(--border); border-left: 4px solid var(--accent); background: var(--surface); border-radius: var(--radius-sm); padding: 12px 16px; display: flex; gap: 12px; align-items: flex-start; }
.callout.warn { border-left-color: var(--warn); background: var(--warn-soft); } .callout.bad { border-left-color: var(--bad); background: var(--bad-soft); }
.callout.ok { border-left-color: var(--ok); background: var(--ok-soft); } .callout p:last-child { margin: 0; }
.callout > .icon { margin-top: 3px; }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs a, .tabs button { padding: 10px 14px; color: var(--muted); font-weight: 600; font-size: .9rem; border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; font-family: inherit; }
.tabs a:hover, .tabs button:hover { color: var(--text); text-decoration: none; }
.tabs .active { color: var(--accent); border-bottom-color: var(--accent); }

.crumbs { font-size: .84rem; color: var(--muted); margin-bottom: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); } .crumbs span::before { content: "/"; margin-right: 6px; color: var(--faint); }
.page-head { margin-bottom: 24px; } .page-head p { color: var(--muted); max-width: 70ch; font-size: 1.02rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .74rem; font-weight: 700; color: var(--accent); margin-bottom: 6px; display: block; }

.stat { padding: 18px 20px; } .stat b { font: 700 1.7rem/1.1 var(--serif); display: block; } .stat span { color: var(--muted); font-size: .84rem; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.empty .icon { width: 36px; height: 36px; margin: 0 auto 10px; color: var(--faint); }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 20px; align-items: center; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: .85rem; color: #fff; flex: none; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.4rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: .9rem; } .kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }

/* prose (laws, news, posts) */
.prose { font-size: 1rem; line-height: 1.7; max-width: 75ch; }
.prose h2 { font-size: 1.6rem; margin-top: 0; } .prose h3 { font-size: 1.2rem; margin-top: 1.8em; padding-top: .6em; border-top: 1px solid var(--border); } .prose h4 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1em; } .prose li { margin-bottom: .35em; }
.prose blockquote { margin: 0 0 1em; padding: 4px 16px; border-left: 3px solid var(--border-strong); color: var(--muted); }
.prose code { background: var(--sunken); padding: 1px 5px; border-radius: 4px; }
.post-body { font-size: .96rem; } .post-body p:last-child { margin: 0; }

/* hero */
.hero { background: radial-gradient(1200px 400px at 80% -20%, rgba(201,162,39,.25), transparent), linear-gradient(135deg, var(--navy), #163a6b); color: #fff; border-radius: 16px; padding: clamp(28px, 5vw, 56px); position: relative; overflow: hidden; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.1rem); max-width: 18ch; }
.hero p { color: #cdd9ec; font-size: 1.08rem; max-width: 56ch; }
.hero .seal-bg { position: absolute; right: -40px; bottom: -40px; width: 320px; opacity: .12; }
.hero .eyebrow { color: var(--gold); }
.market-hero { background: linear-gradient(135deg, #4a1a0b, #8a3414 60%, #c2621e); }

/* steps (citizenship progress) */
.steps { display: flex; gap: 0; counter-reset: s; margin-bottom: 28px; }
.steps li { list-style: none; flex: 1; position: relative; padding-top: 34px; font-size: .82rem; color: var(--muted); text-align: center; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 26px; height: 26px; border-radius: 50%; background: var(--sunken); border: 2px solid var(--border-strong); display: grid; place-items: center; font-weight: 700; font-size: .78rem; z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 12px; left: -50%; width: 100%; height: 2px; background: var(--border-strong); }
.steps li:first-child::after { display: none; }
.steps li.done::before { content: "✓"; background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.done::after, .steps li.current::after { background: var(--ok); }
.steps li.current { color: var(--text); font-weight: 600; } .steps li.current::before { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.steps { padding: 0; }

/* dropzone + camera */
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted); cursor: pointer; background: var(--surface-2); transition: border-color .12s, background .12s; display: grid; gap: 6px; justify-items: center; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.has { border-style: solid; border-color: var(--ok); background: var(--ok-soft); color: var(--text); }
.dropzone .icon { width: 28px; height: 28px; }
.camera { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.camera video, .camera img { width: 100%; height: 100%; object-fit: cover; }
.camera .frame { position: absolute; inset: 12% 26%; border: 3px solid rgba(255,255,255,.7); border-radius: 50% / 42%; pointer-events: none; }
.liveness { background: var(--gold-soft); border: 1px solid var(--gold); border-radius: var(--radius-sm); padding: 12px 14px; font-weight: 600; }

/* modal + toast */
.modal-bg { position: fixed; inset: 0; background: rgba(6,12,24,.55); z-index: 50; display: grid; place-items: center; padding: 16px; animation: fade .15s; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 14px; width: min(520px, 100%); box-shadow: var(--shadow-lg); animation: pop .18s; }
.modal.wide { width: min(760px, 100%); }
.modal-head { padding: 18px 22px 0; display: flex; gap: 12px; align-items: flex-start; }
.modal-head h3 { margin: 2px 0 4px; } .modal-body { padding: 16px 22px 22px; }
.modal-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.modal-icon.gold { background: var(--gold-soft); color: var(--gold); }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
#toasts { position: fixed; bottom: 18px; right: 18px; z-index: 60; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 36px)); }
.toast { background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 8px; box-shadow: var(--shadow-lg); font-size: .9rem; animation: pop .2s; }
.toast.bad { background: var(--bad); color: #fff; } .toast.ok { background: var(--ok); color: #fff; }

/* secure-op details */
.secure-summary { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; font-size: .9rem; }
.secure-trace { font-family: var(--mono); font-size: .74rem; color: var(--muted); background: var(--sunken); border-radius: 6px; padding: 10px 12px; overflow-wrap: anywhere; max-height: 140px; overflow-y: auto; }
.secure-trace div { padding: 2px 0; } .secure-trace .ok { color: var(--ok); } .secure-trace .bad { color: var(--bad); }
.keyfile { font-family: var(--mono); font-size: .72rem; background: var(--sunken); border-radius: 6px; padding: 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow-y: auto; }
.epoch-ring { --p: 0; width: 46px; height: 46px; border-radius: 50%; background: conic-gradient(var(--gold) calc(var(--p) * 1%), var(--sunken) 0); display: grid; place-items: center; flex: none; }
.epoch-ring::after { content: ""; width: 34px; height: 34px; border-radius: 50%; background: var(--surface); }

/* passport */
.passport-frame { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); background: #e9e1cc; }
.passport-frame img { width: 100%; }

/* tokens */
.tokens { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.token { text-align: center; font-size: .74rem; padding: 10px 6px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); cursor: default; position: relative; }
.token svg { width: 72px; height: 72px; margin: 0 auto 6px; display: block; }
.token.selectable { cursor: pointer; } .token.selected { outline: 3px solid var(--accent); }
.token .lock { position: absolute; top: 6px; right: 6px; }
.rarity-common { color: var(--r-common); } .rarity-uncommon { color: var(--r-uncommon); } .rarity-rare { color: var(--r-rare); } .rarity-epic { color: var(--r-epic); } .rarity-legendary { color: var(--r-legendary); }
.bar { height: 8px; border-radius: 99px; background: var(--sunken); overflow: hidden; display: flex; }
.bar > i { display: block; height: 100%; }
.money { font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.money::after { content: " SGL"; font-size: .78em; color: var(--muted); font-weight: 400; }

/* market */
.listing-card { overflow: hidden; display: flex; flex-direction: column; }
.listing-card .thumb { aspect-ratio: 4 / 3; background: var(--sunken); display: grid; place-items: center; color: var(--faint); overflow: hidden; }
.listing-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.listing-card .body { padding: 12px 14px 14px; display: grid; gap: 4px; }
.listing-card .title { font-weight: 600; color: var(--text); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gallery { display: grid; gap: 10px; } .gallery .main { aspect-ratio: 4 / 3; background: var(--sunken); border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.gallery .thumbs { display: flex; gap: 8px; } .gallery .thumbs img { width: 70px; height: 56px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
.gallery .thumbs img.active { border-color: var(--accent); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--border-strong); background: var(--surface); font-size: .84rem; color: var(--text); cursor: pointer; text-transform: capitalize; }
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); text-decoration: none; }
.chip:hover { text-decoration: none; border-color: var(--accent); }
.stars { color: #e0a100; letter-spacing: 1px; }
.messages { display: grid; gap: 10px; max-height: 420px; overflow-y: auto; padding: 16px 20px; }
.msg { background: var(--sunken); border-radius: 10px; padding: 8px 12px; max-width: 80%; font-size: .9rem; }
.msg.me { background: var(--accent-soft); margin-left: auto; }

/* forum */
.post { display: grid; grid-template-columns: 170px minmax(0, 1fr); }
.post .who { padding: 16px; border-right: 1px solid var(--border); background: var(--surface-2); font-size: .82rem; display: grid; gap: 6px; align-content: start; }
.post .what { padding: 16px 20px; display: grid; gap: 12px; }
@media (max-width: 640px) { .post { grid-template-columns: 1fr; } .post .who { border-right: 0; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: center; } }

/* departments */
.dept-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.dept-icon .icon { width: 22px; height: 22px; }
.branch { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 700; }

/* timeline */
.timeline { display: grid; gap: 0; }
.timeline > div { display: grid; grid-template-columns: 110px 18px minmax(0, 1fr); gap: 12px; padding: 10px 0; }
.timeline .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); margin-top: 6px; box-shadow: 0 0 0 4px var(--gold-soft); }
@media (max-width: 600px) { .timeline > div { grid-template-columns: 14px minmax(0, 1fr); } .timeline .when { grid-column: 2; order: 2; } }

.vote-bar { height: 10px; border-radius: 99px; overflow: hidden; display: flex; background: var(--sunken); }
.vote-bar .y { background: var(--ok); } .vote-bar .n { background: var(--bad); } .vote-bar .a { background: var(--faint); }
.hash { font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 230px; padding: 6px; z-index: 30; display: none; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 6px; color: var(--text); font: inherit; font-size: .9rem; width: 100%; background: none; border: 0; cursor: pointer; text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--sunken); text-decoration: none; }
.dropdown-menu .sep { height: 1px; background: var(--border); margin: 6px 0; }
.wallet-pill { display: inline-flex; gap: 6px; align-items: center; padding: 6px 11px; border-radius: 99px; background: var(--gold-soft); color: var(--text); font-weight: 600; font-size: .85rem; text-decoration: none !important; }
.market-header .wallet-pill { background: rgba(255,255,255,.14); color: #fff; }
.elev { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; color: var(--ok); font-weight: 600; }
.vote-bar > i { display: block; height: 100%; }
.preview-img { max-height: 220px; border-radius: var(--radius-sm); margin: 0 auto; }
