/* RankCore — design system */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #0a0a0d;
  --bg-2: #0f0f13;
  --surface: #131318;
  --surface-2: #1a1a21;
  --surface-3: #22222b;
  --border: #23232c;
  --border-2: #31313c;
  --text: #f0f0f3;
  --text-2: #b0b0bd;
  --muted: #7c7c8a;
  --accent: #6d5efc;
  --accent-hover: #5d4ef0;
  --accent-text: #a9a1ff;
  --accent-soft: rgba(109, 94, 252, .12);
  --accent-line: rgba(109, 94, 252, .38);
  --invert: #f0f0f3;
  --invert-text: #0a0a0d;
  --green: #22c55e;
  --yellow: #f5b70a;
  --red: #ef4444;
  --blue: #3b82f6;
  --gold: #e9b949;
  --silver: #b9bec7;
  --bronze: #c98a5a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -12px rgba(0,0,0,.6);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #fafafb;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f4f7;
  --surface-3: #ebebf0;
  --border: #e7e7ed;
  --border-2: #d8d8e0;
  --text: #121217;
  --text-2: #4a4a57;
  --muted: #74747f;
  --accent: #5b4bf5;
  --accent-hover: #4b3ce0;
  --accent-text: #4e3fe6;
  --accent-soft: rgba(91, 75, 245, .08);
  --accent-line: rgba(91, 75, 245, .3);
  --invert: #121217;
  --invert-text: #ffffff;
  --gold: #c9971f;
  --silver: #8d939c;
  --bronze: #a8693c;
  --shadow-sm: 0 1px 2px rgba(16,16,24,.06);
  --shadow: 0 1px 2px rgba(16,16,24,.05), 0 12px 32px -14px rgba(16,16,24,.16);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--font); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.022em; font-weight: 650; }
h1 { font-size: clamp(1.6rem, 2.6vw, 2rem); }
h2 { font-size: 1.25rem; }
h3, .h3 { font-size: 1.05rem; letter-spacing: -.012em; }
code { font-family: var(--mono); font-size: .85em; background: var(--surface-2); border: 1px solid var(--border); padding: .08em .38em; border-radius: 5px; }
pre { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem 1.1rem; overflow-x: auto; font-size: .86rem; line-height: 1.55; }
pre code { background: none; padding: 0; border: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: .35rem 0; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.center { justify-content: center; }
.w-full { width: 100%; }
.mt { margin-top: .75rem; }
.inline { display: inline; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; z-index: 100; background: var(--accent); color: #fff; padding: .5rem 1rem; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: #fff; }

.ic { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }
.ic-sm { width: 15px; height: 15px; }
.ic-lg { width: 22px; height: 22px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 28px; } }
.page { padding-top: 2.2rem; padding-bottom: 3.5rem; }
.narrow { max-width: 860px; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; height: 38px; padding: 0 1rem; border-radius: var(--radius-sm); border: 1px solid transparent; font: 550 .9rem/1 var(--font); letter-spacing: -.005em; cursor: pointer; text-decoration: none !important; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; white-space: nowrap; color: var(--text); background: var(--surface-2); }
.btn .ic { width: 17px; height: 17px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { height: 32px; padding: 0 .75rem; font-size: .84rem; gap: .4rem; }
.btn-sm .ic { width: 15px; height: 15px; }
.btn-lg { height: 44px; padding: 0 1.25rem; font-size: .95rem; }
.btn-primary { background: var(--accent); color: #fff !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.14), var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-invert { background: var(--invert); color: var(--invert-text) !important; }
.btn-invert:hover { opacity: .9; }
.btn-ghost { background: var(--surface); border-color: var(--border-2); color: var(--text) !important; box-shadow: var(--shadow-sm); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-quiet { background: transparent; color: var(--text-2) !important; }
.btn-quiet:hover { background: var(--surface-2); color: var(--text) !important; }
.btn-success { background: var(--green); color: #fff !important; }
.btn-danger { background: var(--red); color: #fff !important; }
.btn-danger-ghost { background: transparent; border-color: rgba(239,68,68,.45); color: var(--red) !important; }
.btn-danger-ghost:hover { background: rgba(239,68,68,.08); }
.btn-count { margin-left: .2rem; padding: .15rem .45rem; border-radius: 5px; background: rgba(255,255,255,.18); font-size: .8em; font-variant-numeric: tabular-nums; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-text); cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-btn.danger, .danger { color: var(--red) !important; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }

/* ── Navigation ──────────────────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; gap: 1.5rem; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.06rem; letter-spacing: -.02em; color: var(--text) !important; text-decoration: none !important; }
.brand img { display: block; }
.nav-links { display: flex; gap: .15rem; }
.nav-links a { color: var(--text-2); padding: .4rem .7rem; border-radius: 7px; font-weight: 500; font-size: .9rem; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-links a.active { color: var(--text); }
.nav-search { flex: 1; max-width: 380px; margin-left: auto; position: relative; }
.nav-search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; pointer-events: none; }
.nav-search input { width: 100%; height: 36px; padding: 0 2.6rem 0 2.2rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: .88rem; }
.nav-search input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.nav-search kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font: 500 .72rem var(--font); color: var(--muted); border: 1px solid var(--border-2); border-radius: 5px; padding: .05rem .38rem; pointer-events: none; }
.nav-right { display: flex; align-items: center; gap: .35rem; }
.notif .dot { position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 2px var(--bg); }
.burger { display: none; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.avatar-btn { display: block; padding: 2px; border-radius: 50%; }
.avatar-btn img { border-radius: 50%; display: block; }
.menu[open] .avatar-btn { box-shadow: 0 0 0 2px var(--accent-line); }
.menu-pop { position: absolute; right: 0; top: calc(100% + 10px); background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 236px; padding: .35rem; display: flex; flex-direction: column; }
.menu-pop a, .menu-pop .link-btn { padding: .48rem .6rem; border-radius: 6px; color: var(--text-2) !important; text-align: left; width: 100%; display: flex; gap: .6rem; align-items: center; font-size: .9rem; }
.menu-pop a .ic, .menu-pop .link-btn .ic { width: 16px; height: 16px; color: var(--muted); }
.menu-pop a:hover, .menu-pop .link-btn:hover { background: var(--surface-2); color: var(--text) !important; text-decoration: none; }
.menu-pop .pill { margin-left: auto; }
.menu-head { padding: .55rem .6rem .6rem; display: flex; flex-direction: column; line-height: 1.35; }
.menu-head small { color: var(--muted); }
.menu-label { padding: .5rem .6rem .2rem; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pill { background: var(--accent); color: #fff; border-radius: 99px; font-size: .7rem; padding: .05rem .45rem; font-weight: 600; }
.theme-dark-only, :root[data-theme="light"] .theme-light-hide { display: none; }
:root[data-theme="light"] .theme-dark-only { display: inline-block; }

@media (max-width: 900px) {
  .burger { display: inline-grid; }
  .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--bg-2); border-bottom: 1px solid var(--border); flex-direction: column; padding: .5rem 16px .8rem; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .6rem .5rem; }
  .nav-search { display: none; }
  .nav-right { margin-left: auto; }
}

/* ── Flash & notices ─────────────────────────────────────────────────── */
.flashes { margin-top: 1rem; display: grid; gap: .5rem; }
.flash, .notice { display: flex; align-items: flex-start; gap: .7rem; padding: .8rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); font-size: .92rem; }
.flash > .ic, .notice > .ic { margin-top: 1px; }
.flash > span, .notice-body { flex: 1; }
.flash-success > .ic, .notice-success > .ic { color: var(--green); }
.flash-error > .ic, .notice-error > .ic { color: var(--red); }
.flash-info > .ic, .notice-info > .ic { color: var(--accent-text); }
.notice-warn > .ic { color: var(--yellow); }
.flash-success { border-color: rgba(34,197,94,.3); }
.flash-error, .notice-error { border-color: rgba(239,68,68,.32); }
.notice-warn { border-color: rgba(245,183,10,.32); }
.notice-info { border-color: var(--accent-line); }
.flash-x { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; display: grid; }
.flash-x:hover { color: var(--text); }
.notice { margin-bottom: 1rem; flex-wrap: wrap; align-items: center; }
.notice strong { font-weight: 600; }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero { position: relative; padding: 5rem 0 3.5rem; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%); opacity: .55; pointer-events: none; }
.hero::after { content: ""; position: absolute; left: 50%; top: -180px; width: 720px; height: 360px; transform: translateX(-50%); background: radial-gradient(closest-side, var(--accent-soft), transparent); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; max-width: 820px; text-align: center; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; letter-spacing: -.04em; line-height: 1.06; margin-bottom: 1rem; }
.hero h1 em { font-style: normal; color: var(--accent-text); }
.lead { font-size: 1.08rem; color: var(--text-2); margin: 0 auto 2rem; max-width: 600px; }
.eyebrow { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .75rem .3rem .4rem; border-radius: 99px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text-2); font-weight: 500; font-size: .82rem; margin-bottom: 1.4rem; box-shadow: var(--shadow-sm); }
.eyebrow b { background: var(--accent-soft); color: var(--accent-text); border-radius: 99px; padding: .1rem .5rem; font-weight: 600; }
.hero-search { display: flex; align-items: center; gap: .35rem; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius); padding: .35rem; max-width: 640px; margin: 0 auto; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.hero-search:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.hero-search.wide { max-width: none; margin-bottom: 1.5rem; }
.hero-search > .ic { color: var(--muted); margin-left: .6rem; }
.hero-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 1rem; padding: .55rem .35rem; outline: none; }
.hero-search select { border: 0; background: var(--surface-2); color: var(--text-2); border-radius: 6px; height: 38px; padding: 0 .6rem; font: inherit; font-size: .88rem; cursor: pointer; }
@media (max-width: 560px) { .hero-search select { display: none; } }
.hero-stats { display: flex; justify-content: center; gap: 2.5rem; margin-top: 2.2rem; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; align-items: center; }
.hero-stats strong { font-size: 1.35rem; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero-stats span { color: var(--muted); font-size: .82rem; }

.categories { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: .6rem; }
.category { display: flex; align-items: center; gap: .65rem; padding: .7rem .8rem; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-sm); color: var(--text) !important; font-weight: 500; font-size: .9rem; transition: border-color .15s, background .15s; }
.category:hover { border-color: var(--accent-line); background: var(--surface-2); text-decoration: none; }
.cat-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.cat-ic .ic { width: 16px; height: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; height: 28px; padding: 0 .65rem; border-radius: 7px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2) !important; font-size: .82rem; font-weight: 500; }
.chip .ic { width: 14px; height: 14px; color: var(--muted); }
a.chip:hover { border-color: var(--accent-line); text-decoration: none; color: var(--text) !important; }
.chip-sm { height: 22px; padding: 0 .5rem; font-size: .74rem; border-radius: 5px; background: var(--surface-2); border-color: transparent; }

/* ── Sections ────────────────────────────────────────────────────────── */
.section { margin: 3rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.section-title { display: flex; align-items: center; gap: .75rem; }
.section-title h2 { margin: 0; }
.section-title p { margin: .1rem 0 0; color: var(--muted); font-size: .88rem; }
.section-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text-2); flex: none; box-shadow: var(--shadow-sm); }
.more { display: inline-flex; align-items: center; gap: .3rem; font-weight: 500; font-size: .88rem; color: var(--text-2) !important; }
.more:hover { color: var(--text) !important; text-decoration: none; }
.more .ic { width: 15px; height: 15px; transition: transform .15s; }
.more:hover .ic { transform: translateX(2px); }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.page-head h1 { margin-bottom: .25rem; }
.page-head p { margin: 0; }
.breadcrumb { display: flex; align-items: center; gap: .35rem; font-size: .84rem; color: var(--muted); margin-bottom: .5rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb .ic { width: 14px; height: 14px; }

/* ── Cards ───────────────────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 1rem; }
.card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s, transform .15s; box-shadow: var(--shadow-sm); }
.card:hover { border-color: var(--border-2); box-shadow: var(--shadow); transform: translateY(-2px); }
.card-featured { border-color: var(--accent-line); }
.card-link { position: absolute; inset: 0; z-index: 1; }
.card-banner { height: 72px; background-size: cover; background-position: center; border-bottom: 1px solid var(--border); }
.card-body { padding: 1.1rem 1.1rem .9rem; flex: 1; display: flex; flex-direction: column; }
.card-head { display: flex; gap: .85rem; align-items: center; margin-bottom: .75rem; }
.card-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--surface-2); object-fit: cover; flex: none; box-shadow: 0 0 0 1px var(--border); }
.card-avatar.sq, .sq { border-radius: 14px !important; }
.card-name { min-width: 0; flex: 1; }
.card-title { font-size: 1rem; font-weight: 600; margin: 0; display: flex; align-items: center; gap: .3rem; letter-spacing: -.012em; }
.card-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-sub { color: var(--muted); font-size: .8rem; }
.rank { margin-left: auto; align-self: flex-start; font-weight: 600; font-size: .76rem; font-variant-numeric: tabular-nums; padding: .12rem .45rem; border-radius: 5px; background: var(--surface-2); color: var(--muted); }
.rank-1 { background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); }
.rank-2 { background: color-mix(in srgb, var(--silver) 16%, transparent); color: var(--silver); }
.rank-3 { background: color-mix(in srgb, var(--bronze) 16%, transparent); color: var(--bronze); }
.card-desc { color: var(--text-2); font-size: .875rem; line-height: 1.55; margin: 0 0 .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.1em; }
.card-tags { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: auto; }
.card-foot { display: flex; align-items: center; gap: 1rem; padding: .65rem 1.1rem; border-top: 1px solid var(--border); color: var(--text-2); font-size: .84rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.card-foot span { display: inline-flex; align-items: center; gap: .35rem; }
.card-foot .ic { width: 15px; height: 15px; color: var(--muted); }
.card-cta { margin-left: auto; position: relative; z-index: 2; }
.verified { display: inline-flex; color: var(--accent-text); flex: none; }
.verified .ic { width: 17px; height: 17px; fill: var(--accent); stroke: #fff; stroke-width: 2; }
.verified.lg .ic { width: 24px; height: 24px; }
.card-plain { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.35rem; margin-bottom: 1.2rem; box-shadow: var(--shadow-sm); }
.card-plain > h3:first-child { margin-bottom: .35rem; }
.empty { text-align: center; padding: 3.2rem 1rem; color: var(--muted); background: var(--surface); border: 1px dashed var(--border-2); border-radius: var(--radius); }
.empty-ic { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--surface-2); color: var(--text-2); margin-bottom: .8rem; }
.empty-ic .ic { width: 22px; height: 22px; }
.empty p { margin: 0 0 1rem; }
.empty p:last-child { margin: 0; }

/* ── CTA & features ──────────────────────────────────────────────────── */
.cta { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding: 2.2rem 2.4rem; margin: 3.5rem 0 1rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-sm); }
.cta::before { content: ""; position: absolute; right: -120px; top: -160px; width: 420px; height: 420px; background: radial-gradient(closest-side, var(--accent-soft), transparent); pointer-events: none; }
.cta > * { position: relative; }
.cta h2 { margin: 0 0 .35rem; font-size: 1.4rem; }
.cta p { margin: 0; color: var(--text-2); max-width: 520px; }
.cta-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 3rem; }
.feature { padding: 1.2rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.feature h3 { margin: .8rem 0 .3rem; font-size: .98rem; }
.feature p { margin: 0; color: var(--text-2); font-size: .88rem; }

/* ── Listing pages ───────────────────────────────────────────────────── */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); flex-wrap: wrap; }
.segmented a { padding: .38rem .8rem; border-radius: 6px; color: var(--text-2) !important; font-weight: 500; font-size: .86rem; display: inline-flex; align-items: center; gap: .4rem; }
.segmented a .ic { width: 15px; height: 15px; }
.segmented a:hover { color: var(--text) !important; text-decoration: none; }
.segmented a.active { background: var(--surface); color: var(--text) !important; box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.tabs { display: flex; gap: 1.4rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 1.2rem; }
.tab { position: relative; padding: .7rem 0; color: var(--text-2) !important; font-weight: 500; font-size: .9rem; background: none; border: 0; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: .45rem; }
.tab .ic { width: 16px; height: 16px; }
.tab:hover { color: var(--text) !important; text-decoration: none; }
.tab.active { color: var(--text) !important; }
.tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }
.tab-count { font-size: .76rem; color: var(--muted); background: var(--surface-2); border-radius: 5px; padding: .05rem .4rem; font-variant-numeric: tabular-nums; }
.toggle { display: inline-flex; align-items: center; gap: .55rem; font-weight: 500; font-size: .88rem; color: var(--text-2); cursor: pointer; user-select: none; }
.switch { appearance: none; -webkit-appearance: none; width: 34px; height: 20px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--border-2); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch:checked { background: var(--accent); border-color: var(--accent); }
.switch:checked::after { transform: translateX(14px); }
.layout-side { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 1.75rem; align-items: start; }
.sidebar { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; padding-right: .25rem; }
.side-label { margin: 0 0 .5rem .55rem; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.tag-list { display: flex; flex-direction: column; gap: 1px; }
.tag-list a { display: flex; align-items: center; gap: .6rem; padding: .42rem .55rem; border-radius: 7px; color: var(--text-2) !important; font-size: .88rem; }
.tag-list a .ic { width: 16px; height: 16px; color: var(--muted); }
.tag-list a span { flex: 1; }
.tag-list a small { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .78rem; }
.tag-list a:hover { background: var(--surface-2); color: var(--text) !important; text-decoration: none; }
.tag-list a.active { background: var(--accent-soft); color: var(--text) !important; }
.tag-list a.active .ic { color: var(--accent-text); }
@media (max-width: 900px) {
  .layout-side { grid-template-columns: 1fr; }
  .sidebar { position: static; max-height: none; }
  .tag-list { flex-direction: row; flex-wrap: wrap; gap: .35rem; }
  .tag-list a { border: 1px solid var(--border); background: var(--surface); }
  .tag-list small { display: none; }
  .tag-list a span { flex: none; }
}
.tag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .7rem; margin-bottom: 2.5rem; }
.tag-tile { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text) !important; }
.tag-tile:hover { border-color: var(--accent-line); text-decoration: none; }
.tag-tile div { display: flex; flex-direction: column; line-height: 1.3; }
.tag-tile strong { font-weight: 550; font-size: .92rem; }
.tag-tile small { color: var(--muted); font-size: .78rem; }

.pagination { display: flex; justify-content: center; gap: .3rem; margin-top: 2.2rem; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 36px; height: 36px; padding: 0 .6rem; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; gap: .3rem; border: 1px solid var(--border); background: var(--surface); color: var(--text-2) !important; font-weight: 500; font-size: .86rem; font-variant-numeric: tabular-nums; }
.pagination .ic { width: 15px; height: 15px; }
.pagination a:hover { background: var(--surface-2); color: var(--text) !important; text-decoration: none; }
.pagination .current { background: var(--accent); border-color: var(--accent); color: #fff !important; }
.pagination .gap { border: 0; background: none; }

/* ── Profile (bot / server / user) ───────────────────────────────────── */
.profile-banner { height: 150px; position: relative; background: var(--bg-2); background-size: cover; background-position: center; border-bottom: 1px solid var(--border); overflow: hidden; }
.profile-banner.plain::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 40px 40px; opacity: .6; -webkit-mask-image: linear-gradient(to bottom, #000, transparent); mask-image: linear-gradient(to bottom, #000, transparent); }
.profile-banner.plain::after { content: ""; position: absolute; left: 10%; top: -140px; width: 560px; height: 320px; background: radial-gradient(closest-side, var(--accent-soft), transparent); }
.user-banner { height: 140px; }
.profile { padding-top: 0; }
.profile-head { display: flex; gap: 1.5rem; align-items: flex-end; margin-top: -52px; margin-bottom: 1.8rem; flex-wrap: wrap; position: relative; z-index: 2; }
.profile-avatar { width: 120px; height: 120px; border-radius: 50%; border: 5px solid var(--bg); background: var(--surface); object-fit: cover; flex: none; box-shadow: var(--shadow); }
.profile-info { flex: 1; min-width: 240px; padding-top: 58px; }
.profile-info h1 { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .3rem; }
.profile-short { color: var(--text-2); font-size: 1rem; margin: 0 0 .8rem; max-width: 720px; }
.profile-meta { display: flex; gap: 1.1rem; flex-wrap: wrap; color: var(--muted); font-size: .85rem; margin-bottom: .8rem; }
.profile-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.profile-meta .ic { width: 15px; height: 15px; }
.profile-actions { display: flex; gap: .55rem; flex-wrap: wrap; }
.profile .notice { margin-top: 1.2rem; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.75rem; align-items: start; }
@media (max-width: 980px) { .profile-grid { grid-template-columns: 1fr; } }
.sticky-tabs { position: sticky; top: 60px; background: var(--bg); z-index: 5; }
.profile-side { display: flex; flex-direction: column; gap: 1rem; }
.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.15rem; box-shadow: var(--shadow-sm); }
.side-card h4 { margin: 0 0 .8rem; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.side-foot { display: flex; justify-content: flex-end; }
.stat-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stat-pair div { background: var(--surface); padding: .9rem 1rem; display: flex; flex-direction: column; }
.stat-pair strong { font-size: 1.25rem; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-pair small { color: var(--muted); font-size: .78rem; }
.info { display: grid; grid-template-columns: auto 1fr; gap: .55rem 1rem; margin: 0; font-size: .88rem; }
.info dt { color: var(--muted); display: flex; align-items: center; gap: .45rem; }
.info dt .ic { width: 15px; height: 15px; }
.info dd { margin: 0; text-align: right; font-weight: 500; min-width: 0; font-variant-numeric: tabular-nums; }
.info dd code { font-size: .74rem; white-space: nowrap; }
.copy { cursor: pointer; }
.link-list { display: flex; flex-direction: column; gap: 2px; margin: 0 -.4rem; }
.link-list a { display: flex; align-items: center; gap: .65rem; padding: .5rem .45rem; border-radius: 7px; color: var(--text) !important; font-weight: 500; font-size: .9rem; }
.link-list a .ic { color: var(--muted); width: 17px; height: 17px; }
.link-list a .ic:last-child { margin-left: auto; width: 14px; height: 14px; opacity: .6; }
.link-list a:hover { background: var(--surface-2); text-decoration: none; }
.owner { display: flex; align-items: center; gap: .65rem; padding: .35rem 0; color: var(--text) !important; font-weight: 500; font-size: .9rem; }
.owner img { border-radius: 50%; }
.owner small { margin-left: auto; font-weight: 400; }
.owner:hover { text-decoration: none; }
.owner:hover span { text-decoration: underline; text-underline-offset: 3px; }
.owner.big img { width: 52px; height: 52px; }
.online-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: .4rem; vertical-align: middle; }
.widget-preview { border-radius: 10px; width: 100%; height: auto; margin-bottom: .5rem; border: 1px solid var(--border); }
.staff-card form { margin-bottom: .5rem; }
.badge { display: inline-flex; align-items: center; gap: .3rem; height: 22px; font-size: .72rem; font-weight: 600; padding: 0 .5rem; border-radius: 5px; background: var(--surface-2); color: var(--text-2); letter-spacing: .01em; vertical-align: middle; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge.no-dot::before { display: none; }
.badge-green { background: rgba(34,197,94,.12); color: #4ade80; }
.badge-yellow { background: rgba(245,183,10,.12); color: #fbbf24; }
.badge-red { background: rgba(239,68,68,.12); color: #f87171; }
.badge-blue { background: rgba(59,130,246,.12); color: #60a5fa; }
.badge-purple { background: var(--accent-soft); color: var(--accent-text); }
:root[data-theme="light"] .badge-green { color: #15803d; }
:root[data-theme="light"] .badge-yellow { color: #a16207; }
:root[data-theme="light"] .badge-red { color: #b91c1c; }
:root[data-theme="light"] .badge-blue { color: #1d4ed8; }
.mod-actions .decline-form input { min-width: 200px; }

/* ── Markdown ────────────────────────────────────────────────────────── */
.markdown { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; overflow-wrap: anywhere; line-height: 1.7; box-shadow: var(--shadow-sm); }
.markdown > :first-child { margin-top: 0; }
.markdown > :last-child { margin-bottom: 0; }
.markdown h1 { font-size: 1.6rem; }
.markdown h1, .markdown h2, .markdown h3 { margin-top: 1.6em; }
.markdown h2 { padding-bottom: .4em; border-bottom: 1px solid var(--border); }
.markdown img { border-radius: 8px; height: auto; }
.markdown blockquote { margin: 1.2em 0; padding: .5em 1em; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 6px 6px 0; color: var(--text-2); }
.markdown table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; margin: 1.2em 0; font-size: .92em; }
.markdown th, .markdown td { border: 1px solid var(--border); padding: .5em .8em; text-align: left; }
.markdown th { background: var(--surface-2); font-weight: 600; }
.markdown ul, .markdown ol { padding-left: 1.4em; }
.markdown li + li { margin-top: .25em; }
.markdown hr { margin: 2em 0; }

/* ── Reviews ─────────────────────────────────────────────────────────── */
.reviews { margin-top: 2.5rem; }
.rating-box { display: flex; gap: 2.2rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.5rem; margin-bottom: 1rem; flex-wrap: wrap; box-shadow: var(--shadow-sm); }
.rating-big { display: flex; flex-direction: column; align-items: center; gap: .3rem; min-width: 110px; }
.rating-big strong { font-size: 2.6rem; line-height: 1; font-weight: 700; letter-spacing: -.04em; }
.rating-bars { flex: 1; min-width: 220px; display: grid; gap: .35rem; }
.rbar { display: grid; grid-template-columns: 1.5rem 1fr 2rem; gap: .7rem; align-items: center; font-size: .82rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.rbar small { color: var(--muted); text-align: right; }
.rbar-track { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.rbar-fill { height: 100%; background: var(--yellow); border-radius: 99px; }
.stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.stars svg { width: 14px; height: 14px; fill: var(--surface-3); }
.stars svg.on { fill: var(--yellow); }
.stars.lg svg { width: 18px; height: 18px; }
.review-form { display: grid; gap: .7rem; }
.review-form-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { cursor: pointer; display: grid; }
.star-input label svg { width: 24px; height: 24px; fill: var(--surface-3); transition: fill .1s; }
.star-input input:checked ~ label svg, .star-input label:hover svg, .star-input label:hover ~ label svg { fill: var(--yellow); }
.star-input input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 4px; }
.review { display: flex; gap: .9rem; padding: 1.1rem 0; border-bottom: 1px solid var(--border); }
.review:last-of-type { border-bottom: 0; }
.review-avatar { border-radius: 50%; flex: none; }
.review-body { flex: 1; min-width: 0; }
.review-body p { margin: .35rem 0; white-space: pre-line; overflow-wrap: anywhere; color: var(--text-2); font-size: .92rem; }
.review-head { display: flex; gap: .65rem; align-items: center; flex-wrap: wrap; }
.review-head a { color: var(--text) !important; font-weight: 600; font-size: .92rem; }
.review-head small { font-size: .8rem; }
.owner-reply { margin-top: .6rem; padding: .7rem .9rem; border: 1px solid var(--border); background: var(--surface-2); border-radius: 8px; font-size: .9rem; }
.owner-reply strong { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--text-2); font-weight: 600; }
.owner-reply strong .ic { width: 14px; height: 14px; }
.owner-reply p { margin: .3rem 0 0; }
.review-actions { display: flex; gap: 1.1rem; align-items: flex-start; flex-wrap: wrap; font-size: .84rem; }
.inline-details summary { list-style: none; cursor: pointer; }
.inline-details summary::-webkit-details-marker { display: none; }
.inline-details form { display: grid; gap: .45rem; margin-top: .5rem; min-width: 280px; }

/* ── Forms ───────────────────────────────────────────────────────────── */
.fieldset-head { margin: -.2rem 0 1.1rem; }
.fieldset-head h3 { margin: 0 0 .2rem; display: flex; align-items: center; gap: .5rem; }
.fieldset-head h3 .ic { color: var(--muted); }
.fieldset-head p { margin: 0; color: var(--muted); font-size: .86rem; }
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.1rem; }
.field:last-child { margin-bottom: 0; }
.field > span { font-weight: 550; font-size: .88rem; display: flex; gap: .4rem; align-items: baseline; }
.field b { color: var(--red); font-weight: 600; }
.hint { color: var(--muted); font-size: .8rem; }
.field-error { color: var(--red); font-weight: 500; font-size: .82rem; display: flex; align-items: center; gap: .3rem; }
.field :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea), :where(.row-form, .secret, .modal-body, .review-form, .inline-details, .decline-form, .notice, .side-card, .table, .mod-actions, .md-editor) :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  width: 100%; height: 38px; padding: 0 .75rem; border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: var(--bg-2); color: var(--text); font: inherit; font-size: .9rem; transition: border-color .15s, box-shadow .15s;
}
:where(.field, .row-form, .secret, .modal-body, .review-form, .inline-details, .md-editor) textarea { height: auto; padding: .6rem .75rem; line-height: 1.55; }
:where(.field, .row-form, .secret, .modal-body, .review-form, .inline-details, .decline-form, .notice, .side-card, .table, .mod-actions, .md-editor) :where(input, select, textarea):focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 80px; }
select { cursor: pointer; }
#long_desc { font-family: var(--mono); font-size: .85rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.two > .field { margin-bottom: 1.1rem; }
@media (max-width: 640px) { .two { grid-template-columns: 1fr; } }
.check { display: flex; gap: .6rem; align-items: center; cursor: pointer; font-size: .9rem; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.tag-picker { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag-check input { position: absolute; opacity: 0; }
.tag-check span { display: inline-flex; align-items: center; gap: .4rem; height: 32px; padding: 0 .7rem; border-radius: 7px; border: 1px solid var(--border-2); cursor: pointer; font-size: .84rem; font-weight: 500; user-select: none; background: var(--bg-2); color: var(--text-2); transition: all .12s; }
.tag-check span .ic { width: 15px; height: 15px; color: var(--muted); }
.tag-check span:hover { border-color: var(--accent-line); color: var(--text); }
.tag-check input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.tag-check input:checked + span .ic { color: var(--accent-text); }
.tag-check input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix span { display: flex; align-items: center; padding: 0 .7rem; background: var(--surface-2); border: 1px solid var(--border-2); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); color: var(--muted); font-size: .86rem; white-space: nowrap; }
.input-prefix input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important; min-width: 0; }
.counter { margin-left: auto; color: var(--muted); font-weight: 400; font-size: .78rem; font-variant-numeric: tabular-nums; }
.counter.bad { color: var(--red); }
.md-tabs { margin-bottom: .6rem; align-items: center; }
.md-preview { min-height: 200px; box-shadow: none; }
.form-actions { display: flex; gap: .6rem; margin: 1.2rem 0 2rem; }
.row-form { display: flex; gap: .5rem; align-items: center; }
.row-form.wrap { flex-wrap: wrap; }
.row-form input, .row-form select { width: auto !important; flex: 1; min-width: 0; }
.row-gap { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.danger-zone { border-color: rgba(239,68,68,.35); }
.danger-zone h3 { color: var(--red); }
.secret { display: flex; gap: .5rem; margin-bottom: .9rem; }
.secret input { font-family: var(--mono); font-size: .82rem !important; }

/* ── Vote page ───────────────────────────────────────────────────────── */
.vote-page { display: grid; place-items: center; min-height: 72vh; }
.vote-card { width: 100%; max-width: 440px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 2.3rem 1.9rem 1.9rem; box-shadow: var(--shadow); }
.vote-avatar { width: 96px; height: 96px; border-radius: 50%; margin-bottom: 1.1rem; object-fit: cover; box-shadow: 0 0 0 1px var(--border), var(--shadow); }
.vote-card h1 { font-size: 1.45rem; display: flex; align-items: center; justify-content: center; gap: .4rem; }
.vote-card > p { color: var(--text-2); font-size: .92rem; }
.vote-card .stat-pair { margin: 1.4rem 0; text-align: left; }
.vote-form { display: grid; gap: .8rem; justify-items: center; }
.vote-wait { padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); margin-bottom: 1rem; }
.vote-wait p { margin: 0; color: var(--text-2); font-size: .88rem; display: flex; align-items: center; justify-content: center; gap: .4rem; }
.countdown { font-size: 2rem; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: .2rem; }
.vote-note { margin: .9rem 0 0; font-size: .82rem; }
.vote-links { margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid var(--border); display: flex; justify-content: center; gap: 1.4rem; font-size: .86rem; }
.vote-links a { display: inline-flex; align-items: center; gap: .35rem; color: var(--text-2) !important; }
.vote-links .ic { width: 15px; height: 15px; }

/* ── Dashboard & staff ───────────────────────────────────────────────── */
.manage-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-sm); }
.manage-row { display: flex; gap: 1rem; align-items: center; padding: .95rem 1.1rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.manage-row:last-child { border-bottom: 0; }
.manage-row > img { border-radius: 50%; flex: none; box-shadow: 0 0 0 1px var(--border); }
.manage-info { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: .2rem; }
.manage-info > div { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.manage-info a { color: var(--text) !important; font-weight: 600; }
.manage-info small { font-size: .82rem; }
.queue-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.decline-form { display: inline-flex; gap: .4rem; }
.decline-form input { width: 190px !important; height: 32px !important; font-size: .84rem !important; }
.staff-nav { margin-bottom: 1.6rem; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .8rem; margin-bottom: 1.6rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .15rem; box-shadow: var(--shadow-sm); }
.stat small { color: var(--muted); font-weight: 500; font-size: .8rem; display: flex; align-items: center; gap: .4rem; }
.stat small .ic { width: 15px; height: 15px; }
.stat strong { font-size: 1.6rem; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat em { font-style: normal; font-size: .8rem; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1rem; box-shadow: var(--shadow-sm); }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { padding: .7rem 1rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { color: var(--muted); font-weight: 500; font-size: .78rem; background: var(--bg-2); }
.table tr:last-child td { border-bottom: 0; }
.table .owner { padding: 0; }
.table-num { text-align: right !important; font-variant-numeric: tabular-nums; }
.audit { list-style: none; padding: 0; margin: 0 0 .8rem; display: grid; font-size: .87rem; }
.audit li { padding: .55rem 0; border-bottom: 1px solid var(--border); display: flex; gap: .5rem; flex-wrap: wrap; align-items: baseline; }
.audit li:last-child { border-bottom: 0; }
.audit code { font-size: .78rem; }
.notif-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.notif-item { display: flex; gap: .85rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--border); color: var(--text) !important; }
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { text-decoration: none; background: var(--surface-2); }
.notif-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); color: var(--text-2); flex: none; }
.notif-ic .ic { width: 17px; height: 17px; }
.notif-item.unread .notif-ic { background: var(--accent-soft); color: var(--accent-text); }
.notif-item strong { font-weight: 600; font-size: .92rem; }
.notif-item p { margin: .15rem 0; color: var(--text-2); font-size: .88rem; }
.notif-item small { font-size: .78rem; }
.voter-list { list-style: none; margin: 0; padding: 0; counter-reset: v; }
.voter-list li { display: flex; align-items: center; gap: .7rem; padding: .45rem 0; border-bottom: 1px solid var(--border); counter-increment: v; }
.voter-list li:last-child { border-bottom: 0; }
.voter-list li::before { content: counter(v); width: 1.4rem; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.voter-list .owner { flex: 1; }
.voter-list strong { font-variant-numeric: tabular-nums; }

/* ── Chart (single series bar) ───────────────────────────────────────── */
.chart-head { display: flex; justify-content: space-between; align-items: baseline; }
.bar-chart { position: relative; height: 240px; padding: 8px 0 24px 34px; margin-top: .6rem; }
.bar-grid { position: absolute; inset: 8px 0 24px 34px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.gl { border-top: 1px solid var(--border); position: relative; height: 0; }
.gl:last-child { border-top-color: var(--border-2); }
.gl span { position: absolute; left: -34px; top: -.65em; width: 28px; text-align: right; font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.bars { position: relative; height: 100%; display: flex; align-items: flex-end; gap: 2px; }
.bar-col { flex: 1; height: 100%; display: flex; align-items: flex-end; position: relative; cursor: default; outline: none; }
.bar { width: 100%; max-width: 20px; margin: 0 auto; background: var(--accent); border-radius: 4px 4px 0 0; transition: filter .1s; }
.bar-col:hover .bar, .bar-col:focus-visible .bar { filter: brightness(1.2); }
.bar-col:hover::after, .bar-col:focus-visible::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--invert); color: var(--invert-text); font-size: .76rem; font-weight: 550; padding: .3rem .55rem; border-radius: 6px; white-space: nowrap; z-index: 3; pointer-events: none; }
.bar-col:hover::before { content: ""; position: absolute; inset: 0; background: var(--accent-soft); border-radius: 4px; }
.bar-x { position: absolute; left: 34px; right: 0; bottom: 0; display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); }

/* ── Modal ───────────────────────────────────────────────────────────── */
.modal { border: 1px solid var(--border-2); border-radius: 14px; padding: 0; background: var(--surface); color: var(--text); width: min(460px, calc(100vw - 32px)); box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(2px); }
.modal-body { padding: 1.4rem; }
.modal-body h3 { display: flex; align-items: center; gap: .5rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .4rem; }

/* ── Docs ────────────────────────────────────────────────────────────── */
.docs { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 2rem; align-items: start; }
.docs-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 1px; }
.docs-nav a { padding: .42rem .65rem; border-radius: 7px; color: var(--text-2) !important; font-size: .88rem; }
.docs-nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text) !important; }
.method { display: inline-block; font: 600 .7rem var(--mono); padding: .12rem .4rem; border-radius: 4px; min-width: 42px; text-align: center; }
.method-get { background: rgba(34,197,94,.12); color: #4ade80; }
.method-post { background: rgba(59,130,246,.12); color: #60a5fa; }
:root[data-theme="light"] .method-get { color: #15803d; }
:root[data-theme="light"] .method-post { color: #1d4ed8; }
@media (max-width: 860px) { .docs { grid-template-columns: 1fr; } .docs-nav { position: static; flex-direction: row; flex-wrap: wrap; } }

/* ── Error ───────────────────────────────────────────────────────────── */
.error-page { text-align: center; padding: 6rem 16px; }
.error-code { font-size: .85rem; font-weight: 600; color: var(--accent-text); letter-spacing: .1em; margin-bottom: .6rem; }
.error-page h1 { font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -.035em; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); background: var(--bg-2); margin-top: 3rem; padding-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid p { font-size: .88rem; max-width: 320px; }
.footer-grid h4 { font-size: .8rem; font-weight: 600; color: var(--text); margin-bottom: .8rem; letter-spacing: 0; }
.footer-grid div > a:not(.brand) { display: block; color: var(--muted) !important; padding: .22rem 0; font-size: .88rem; }
.footer-grid div > a:not(.brand):hover { color: var(--text) !important; text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--border); margin-top: 2.5rem; padding-top: 1.2rem; padding-bottom: 1.4rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
@media (max-width: 560px) {
  .profile-head { justify-content: center; text-align: center; }
  .profile-info { padding-top: 0; }
  .profile-info h1, .profile-meta { justify-content: center; }
  .profile .chips { justify-content: center; }
  .profile-actions { width: 100%; }
  .profile-actions .btn { flex: 1; }
  .page-head > .btn, .page-head > .row-gap { width: 100%; }
  .page-head > .btn { justify-content: center; }
  .hero { padding-top: 3.5rem; }
  .hero-stats { gap: 1.5rem; }
  .cta { padding: 1.6rem; }
}
.error-logo { display: block; margin: 0 auto 1.4rem; }
