/* Sentinel Systems — design system
   Colour, spacing and elevation tokens live here; components below use them. */

:root {
  --navy-900: #0a1122;
  --navy-850: #0d1526;
  --navy-800: #111c31;
  --navy-750: #16233c;
  --navy-700: #1c2c48;
  --line: rgba(148, 178, 226, 0.14);
  --line-strong: rgba(148, 178, 226, 0.28);

  --brand: #3b82f6;
  --brand-strong: #2563eb;
  --brand-soft: rgba(59, 130, 246, 0.14);

  --text: #e8eefb;
  --text-muted: #93a4c0;
  --text-dim: #67789a;

  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --info: #60a5fa;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 45px -22px rgba(0, 0, 0, 0.85);
  --wrap: 1140px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(59, 130, 246, 0.13), transparent 60%),
    radial-gradient(800px 520px at 0% 12%, rgba(37, 99, 235, 0.09), transparent 60%),
    var(--navy-900);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 { font-family: 'Sora', 'Segoe UI', sans-serif; line-height: 1.2; font-weight: 600; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: #7dabff; }
img { max-width: 100%; display: block; }
main { flex: 1 0 auto; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--navy-900); }
::-webkit-scrollbar-thumb { background: #24365a; border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: #2f4a7a; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--brand);
  color: #fff; padding: .6rem 1rem; z-index: 2000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.wrap { width: min(var(--wrap), 92%); margin-inline: auto; }
.wrap-narrow { width: min(960px, 94%); margin-inline: auto; }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); font-size: .86rem; }
.center { text-align: center; }
.mt { margin-top: 1.25rem; }
.mt-lg { margin-top: 2.5rem; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.row-between { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.grid-2 { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(10, 17, 34, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  width: min(var(--wrap), 94%); margin-inline: auto;
  display: flex; align-items: center; gap: 1.5rem; min-height: 68px;
}
.brand { display: flex; align-items: center; gap: .7rem; color: var(--text); }
.brand-logo { width: 34px; height: 34px; object-fit: contain; }
.brand-name { font-family: 'Sora', sans-serif; font-weight: 600; letter-spacing: -.01em; }
.nav-collapse { display: flex; align-items: center; gap: 1.5rem; margin-left: auto; }
.nav-links { list-style: none; display: flex; gap: 1.4rem; }
.nav-links a {
  color: var(--text-muted); font-size: .93rem; font-weight: 500;
  padding: .35rem 0; position: relative; transition: color .2s var(--ease);
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px;
  background: var(--brand); border-radius: 2px; transition: right .25s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }
.nav-links a.active { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; margin-left: auto; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; }
.nav-toggle span + span { margin-top: 5px; }

/* User chip */
.user-chip { position: relative; }
.user-chip-btn {
  display: flex; align-items: center; gap: .65rem; cursor: pointer;
  background: var(--navy-800); border: 1px solid var(--line);
  border-radius: 999px; padding: .3rem .75rem .3rem .35rem; color: var(--text);
  transition: border-color .2s var(--ease), background .2s var(--ease);
  font-family: inherit;
}
.user-chip-btn:hover { border-color: var(--line-strong); background: var(--navy-750); }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.user-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.user-name { font-size: .86rem; font-weight: 600; }
.rank-pill {
  font-size: .68rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
  color: var(--rank, var(--brand));
  background: color-mix(in srgb, var(--rank, var(--brand)) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--rank, var(--brand)) 40%, transparent);
  border-radius: 999px; padding: 0 .45rem; margin-top: .12rem;
}
.chev { width: 14px; height: 14px; color: var(--text-dim); transition: transform .2s var(--ease); }
.user-chip.open .chev { transform: rotate(180deg); }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 190px;
  background: var(--navy-800); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: .4rem; display: none; flex-direction: column;
}
.user-chip.open .user-menu { display: flex; animation: pop .16s var(--ease); }
.user-menu a { color: var(--text-muted); padding: .55rem .7rem; border-radius: 8px; font-size: .88rem; }
.user-menu a:hover { background: var(--navy-700); color: #fff; }
.user-menu a[aria-current="page"] { background: var(--brand-soft); color: #bfd7ff; }
.nav-misc-active > .user-chip-btn { border-color: rgba(59,130,246,.42); color: #bfd7ff; }
.user-menu a.danger:hover { color: var(--bad); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .72rem 1.35rem; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: .92rem; font-family: inherit; cursor: pointer;
  transition: transform .18s var(--ease), background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 12px 30px -14px var(--brand); }
.btn-primary:hover { background: var(--brand-strong); color: #fff; }
.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { background: #4752c4; color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: var(--navy-750); color: #fff; }
.btn-danger { background: rgba(248, 113, 113, .14); border-color: rgba(248,113,113,.35); color: #fca5a5; }
.btn-danger:hover { background: rgba(248, 113, 113, .22); color: #fecaca; }
.btn-sm { padding: .45rem .9rem; font-size: .84rem; border-radius: 9px; }
.btn .ico { width: 17px; height: 17px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------- Hero ---------- */
.hero { padding: clamp(4rem, 11vw, 8rem) 0 clamp(3.5rem, 8vw, 6rem); text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -40% 20% auto; height: 420px;
  background: radial-gradient(closest-side, rgba(59,130,246,.18), transparent);
  filter: blur(10px); pointer-events: none;
}
.hero-logo { width: 86px; margin: 0 auto 1.5rem; filter: drop-shadow(0 12px 30px rgba(59,130,246,.35)); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .76rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: #9fc0ff;
  background: var(--brand-soft); border: 1px solid rgba(59,130,246,.3);
  padding: .3rem .8rem; border-radius: 999px; margin-bottom: 1.25rem;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); letter-spacing: -.03em; }
.hero p.lead { color: var(--text-muted); font-size: clamp(1rem, 2.2vw, 1.15rem); max-width: 620px; margin: 1rem auto 2rem; }
.hero .row { justify-content: center; }

/* ---------- Sections & cards ---------- */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-alt { background: linear-gradient(180deg, rgba(17,28,49,.7), rgba(17,28,49,0)); border-block: 1px solid var(--line); }
.section-head { max-width: 640px; margin: 0 auto 2.5rem; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); letter-spacing: -.02em; }
.section-head p { color: var(--text-muted); margin-top: .6rem; }

.card {
  background: linear-gradient(180deg, var(--navy-800), var(--navy-850));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow);
}
.card-hover { transition: transform .25s var(--ease), border-color .25s var(--ease); }
.card-hover:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.card h3 { font-size: 1.08rem; margin-bottom: .45rem; }
.card p { color: var(--text-muted); font-size: .94rem; }
.card-icon {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-soft); color: #93c5fd; margin-bottom: 1rem;
}
.card-icon svg { width: 21px; height: 21px; }

.steps { display: grid; gap: 1.1rem; counter-reset: step; }
.step { display: flex; gap: 1.1rem; padding: 1.3rem 1.5rem; background: var(--navy-850); border: 1px solid var(--line); border-radius: var(--radius); }
.step-n {
  flex: 0 0 34px; height: 34px; border-radius: 10px; background: var(--brand-soft);
  color: #9fc0ff; display: grid; place-items: center; font-weight: 700; font-size: .9rem;
}
.step h3 { font-size: 1rem; }
.step p { color: var(--text-muted); font-size: .92rem; }

/* FAQ */
.faq { max-width: 760px; margin-inline: auto; display: grid; gap: .7rem; }
.faq-item { background: var(--navy-850); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; color: var(--text);
  font: 600 1rem/1.5 'Inter', sans-serif; padding: 1.05rem 3rem 1.05rem 1.25rem;
  cursor: pointer; position: relative;
}
.faq-q::after {
  content: ''; position: absolute; right: 1.25rem; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--text-dim); border-bottom: 2px solid var(--text-dim);
  transform: translateY(-70%) rotate(45deg); transition: transform .25s var(--ease);
}
.faq-item.open .faq-q::after { transform: translateY(-30%) rotate(225deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .32s var(--ease); color: var(--text-muted); }
.faq-a div { padding: 0 1.25rem 1.15rem; font-size: .94rem; }

/* ---------- Team ---------- */
.team-cat { margin-bottom: 3rem; }
.team-cat h2 { font-size: 1.6rem; }
.team-cat .rule { height: 1px; background: var(--line); margin: .9rem 0 1.6rem; }
.team-grid { display: grid; gap: 1.15rem; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.member { text-align: center; padding: 1.7rem 1.1rem; background: var(--navy-850); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .25s var(--ease), border-color .25s var(--ease); }
.member:hover { transform: translateY(-5px); border-color: var(--line-strong); }
.member img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin: 0 auto .9rem; border: 2px solid var(--line-strong); }
.member .initials {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto .9rem; display: grid; place-items: center;
  background: var(--brand-soft); color: #9fc0ff; font: 600 1.5rem 'Sora', sans-serif;
}
.member h3 { font-size: 1.05rem; }
.member .role { color: var(--brand); font-size: .88rem; font-weight: 500; }
.member .since { color: var(--text-dim); font-size: .8rem; }

/* ---------- Forms ---------- */
.form-card { background: var(--navy-850); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem); box-shadow: var(--shadow); }
.field { margin-bottom: 1.15rem; }
.field > label, .field-label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .4rem; }
.field .hint { color: var(--text-dim); font-size: .82rem; margin-bottom: .45rem; }
.req { color: var(--bad); }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button]),
select, textarea {
  width: 100%; background: var(--navy-900); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  color: var(--text); padding: .7rem .85rem; font: 400 .94rem/1.5 'Inter', sans-serif;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
textarea { min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.2rem; }
input[type=color] { height: 42px; padding: .2rem; }
.check { display: flex; align-items: flex-start; gap: .6rem; font-size: .9rem; color: var(--text-muted); }
.check input { margin-top: .3rem; accent-color: var(--brand); width: 16px; height: 16px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.1rem; }
legend { padding: 0 .4rem; font-size: .85rem; font-weight: 600; color: var(--text-muted); }

/* ---------- Feedback ---------- */
.flash { margin: 1.5rem 0 0; padding: .85rem 1.1rem; border-radius: var(--radius-sm); font-size: .92rem; border: 1px solid; animation: pop .2s var(--ease); }
.flash-success { background: rgba(52,211,153,.1); border-color: rgba(52,211,153,.32); color: #86efac; }
.flash-error { background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.32); color: #fca5a5; }
.flash-info { background: var(--brand-soft); border-color: rgba(59,130,246,.32); color: #a5c8ff; }
.notice { padding: 1rem 1.15rem; border-left: 3px solid var(--brand); background: var(--navy-800); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-muted); font-size: .92rem; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--text-dim); border: 1px dashed var(--line-strong); border-radius: var(--radius); }

/* Status badges */
.badge {
  display: inline-flex; align-items: center; gap: .35rem; font-size: .74rem; font-weight: 600;
  letter-spacing: .03em; text-transform: uppercase; padding: .2rem .6rem; border-radius: 999px;
  border: 1px solid currentColor; white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-open, .st-pending { color: var(--info); }
.st-processed, .st-approved { color: var(--ok); }
.st-deferred { color: var(--warn); }
.st-no-further-action, .st-rejected, .st-closed { color: var(--bad); }
.badge.solid { background: color-mix(in srgb, currentColor 14%, transparent); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--navy-850); }
table { width: 100%; border-collapse: collapse; font-size: .91rem; }
th, td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); background: rgba(255,255,255,.02); }
tbody tr { transition: background .15s var(--ease); }
tbody tr:hover { background: rgba(255,255,255,.025); }
tbody tr:last-child td { border-bottom: 0; }
td.actions { text-align: right; white-space: nowrap; }
.mini-user { display: flex; align-items: center; gap: .55rem; }
.mini-user img { width: 26px; height: 26px; border-radius: 50%; }

/* ---------- Admin shell ---------- */
.admin-shell { display: grid; grid-template-columns: 250px 1fr; gap: 1.75rem; width: min(1320px, 94%); margin: 2rem auto 4rem; align-items: start; }
.admin-nav { position: sticky; top: 88px; background: var(--navy-850); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; }
.admin-nav h4 { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); padding: .7rem .75rem .35rem; }
.admin-nav a { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; border-radius: 9px; color: var(--text-muted); font-size: .9rem; font-weight: 500; transition: background .16s var(--ease), color .16s var(--ease); }
.admin-nav a:hover { background: var(--navy-750); color: #fff; }
.admin-nav a.active { background: var(--brand-soft); color: #bfd7ff; }
.admin-nav svg { width: 16px; height: 16px; flex: none; }
.page-head { margin-bottom: 1.5rem; }
.page-head h1 { font-size: 1.7rem; letter-spacing: -.02em; }
.page-head p { color: var(--text-muted); font-size: .94rem; margin-top: .25rem; }
.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 1.75rem; }
.stat { background: var(--navy-850); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem 1.25rem; }
.stat .n { font: 700 1.9rem 'Sora', sans-serif; letter-spacing: -.02em; }
.stat .l { color: var(--text-dim); font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; }

/* Threads */
.thread { display: grid; gap: 1rem; }
.msg { display: flex; gap: .9rem; padding: 1.1rem 1.2rem; background: var(--navy-850); border: 1px solid var(--line); border-radius: var(--radius); }
.msg.staff { border-color: rgba(59,130,246,.3); background: linear-gradient(180deg, rgba(59,130,246,.07), var(--navy-850)); }
.msg img { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.msg .who { font-weight: 600; font-size: .92rem; }
.msg .body { color: var(--text-muted); font-size: .94rem; white-space: pre-wrap; margin-top: .35rem; word-break: break-word; }
.answer { border-left: 2px solid var(--line-strong); padding-left: 1rem; margin-bottom: 1.1rem; }
.answer .q { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); }
.answer .a { white-space: pre-wrap; word-break: break-word; }

.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.tabs a { padding: .42rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 500; color: var(--text-muted); border: 1px solid var(--line); }
.tabs a.active { background: var(--brand-soft); border-color: rgba(59,130,246,.35); color: #bfd7ff; }

.legal { background: var(--navy-850); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.75rem); margin: 3rem auto 4rem; }
.legal h2 { color: #9fc0ff; font-size: 1.35rem; margin: 2rem 0 .75rem; }
.legal h1 + p { color: var(--text-dim); }
.legal p, .legal li { color: var(--text-muted); }
.legal ul { margin: 0 0 1.25rem 1.25rem; }

/* ---------- Footer ---------- */
/* ---------- Site footer (v25.5) ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10,17,34,0), rgba(7,12,25,.72));
  padding: 4rem 0 1.75rem; margin-top: 5rem;
}
.footer-inner { display: block; }
.footer-top {
  display: grid; gap: 2.75rem 2rem;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, auto));
  align-items: start;
}
.footer-brand { display: flex; flex-direction: column; gap: 1.35rem; align-items: flex-start; }
.footer-mark { display: inline-flex; align-items: center; gap: .7rem; }
.footer-logo { width: 34px; height: auto; margin: 0; }
.footer-wordmark {
  font-family: 'Sora', 'Segoe UI', sans-serif; font-weight: 700;
  font-size: 1.45rem; letter-spacing: -.02em; color: var(--text); text-transform: uppercase;
}
.footer-tagline { color: var(--text-muted); font-size: .88rem; max-width: 30ch; }
.footer-social { display: flex; gap: .6rem; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(148,178,226,.07); border: 1px solid var(--line);
  color: var(--text-muted);
  transition: color .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.footer-social a svg { width: 17px; height: 17px; }
.footer-social a:hover {
  color: var(--text); background: var(--brand-soft);
  border-color: rgba(59,130,246,.4); transform: translateY(-2px);
}
.footer-social a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.footer-col { display: flex; flex-direction: column; gap: .85rem; }
.footer-col h3 {
  font-family: 'Sora', 'Segoe UI', sans-serif; font-size: .95rem;
  font-weight: 600; color: var(--text); margin: 0;
}
.footer-links { display: flex; flex-direction: column; gap: .7rem; }
.footer-links a {
  color: var(--text-muted); font-size: .88rem; width: fit-content;
  transition: color .18s var(--ease), transform .18s var(--ease);
}
.footer-links a:hover { color: var(--brand); transform: translateX(2px); }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
}
.footer-copy { color: var(--text-muted); font-size: .85rem; }
.footer-legal { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-legal a { color: var(--text-dim); font-size: .85rem; }
.footer-legal a:hover { color: var(--brand); }
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .site-footer { padding-top: 3rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav { position: static; }
}

/* ---------- v23: account links & staff objectives ---------- */
.discord-admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr); gap: 1.25rem; align-items: start; }
.objective-list { display: grid; gap: .75rem; }
.objective-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1rem 1.1rem; border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: var(--radius); background: var(--navy-850); }
.objective-overdue { border-left-color: var(--bad); }
.objective-actions { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.objective-actions select { min-width: 130px; }
@media (max-width: 820px) {
  .discord-admin-grid, .objective-card { grid-template-columns: 1fr; }
  .objective-actions { justify-content: flex-start; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-collapse {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 1rem; padding: 1.1rem 4%; background: var(--navy-850); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-collapse.open { display: flex; animation: pop .18s var(--ease); }
  .nav-links { flex-direction: column; gap: .2rem; }
  .nav-links a { padding: .55rem 0; }
  .nav-collapse > .user-chip { width: 100%; }
  .user-chip-btn { width: 100%; }
  .user-menu { position: static; box-shadow: none; margin-top: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ============================================================
   Threat registry, public lookup & shared utilities (v7)
   ============================================================ */

.alert { border-radius: var(--radius); padding: .9rem 1.1rem; font-size: .92rem; margin-bottom: 1.25rem;
  border: 1px solid var(--line); background: var(--navy-850); color: var(--text-muted); }
.alert-error { border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.08); color: #fecaca; }

.accent-card { position: relative; overflow: hidden; }
.accent-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent); }

.back-link { display: inline-flex; align-items: center; gap: .4rem; font-size: .88rem; color: var(--text-muted); }
.back-link:hover { color: var(--brand); }

.is-muted { opacity: .58; }
.tick-col { width: 34px; }
.tick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.tick-list li { position: relative; padding-left: 1.6rem; color: var(--text-muted); font-size: .93rem; }
.tick-list li::before { content: ''; position: absolute; left: 0; top: .34em; width: 12px; height: 7px;
  border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }

.copyable { cursor: pointer; border-bottom: 1px dashed var(--line); }
.copyable:hover { color: var(--brand); }
.copyable.copied::after { content: ' copied'; color: var(--ok, #4ade80); font-size: .75em; }

/* Severity system */
.sev-low      { color: #7dd3fc; }
.sev-medium   { color: #fbbf24; }
.sev-high     { color: #fb923c; }
.sev-critical { color: #f87171; }

.flag-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .26rem .68rem; border-radius: 999px;
  font-size: .78rem; font-weight: 600; letter-spacing: .01em; color: var(--flag, #94a3b8);
  background: color-mix(in srgb, var(--flag, #94a3b8) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--flag, #94a3b8) 34%, transparent); }
.flag-chip::before { content: ''; width: 6px; height: 6px; border-radius: 2px; background: currentColor; }

.flag-avatar { width: 54px; height: 54px; border-radius: 14px; object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--line); background: var(--navy-900); }
.flag-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.flag-row-main { flex: 1; min-width: 200px; }

.profile-card { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.profile-avatar { width: 84px; height: 84px; border-radius: 20px; object-fit: cover;
  border: 1px solid var(--line); background: var(--navy-900); }

/* Lookup */
.lookup-hero { padding-bottom: 2rem; }
.lookup-form { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
.lookup-form input { flex: 1; min-width: 240px; max-width: 420px; font-size: 1rem; letter-spacing: .02em; }

.verdict { border-radius: var(--radius); border: 1px solid var(--line); background: var(--navy-850);
  padding: clamp(1.4rem, 3vw, 2.2rem); position: relative; overflow: hidden; }
.verdict::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: currentColor; opacity: .85; }
.verdict-clean { color: #4ade80; text-align: center; }
.verdict-clean h2 { margin: .75rem 0 .35rem; font-size: 1.5rem; color: var(--text); }
.verdict-icon svg { width: 54px; height: 54px; }
.verdict-flagged .verdict-head { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.verdict-flagged h2 { font-size: 1.5rem; color: var(--text); }
.verdict-count { text-align: center; min-width: 88px; }
.verdict-count .n { font-family: 'Sora', sans-serif; font-size: 2.2rem; line-height: 1; color: currentColor; }
.verdict-count .l { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); }

.flag-list { display: grid; gap: .85rem; margin-top: 1.5rem; }
.flag-entry { border: 1px solid var(--line); border-radius: 14px; padding: 1.05rem 1.15rem; background: rgba(10,17,34,.55); }
.flag-reason { margin: .7rem 0 0; color: var(--text-muted); font-size: .95rem; line-height: 1.65; }

.evidence { margin-top: .9rem; border: 1px solid rgba(251,191,36,.3); border-radius: 12px; background: rgba(251,191,36,.05); }
.evidence summary { cursor: pointer; padding: .6rem .9rem; font-size: .85rem; font-weight: 600; color: #fcd34d; }
.evidence-body { padding: 0 .9rem .9rem; color: var(--text-muted); font-size: .9rem; line-height: 1.7;
  word-break: break-word; }

.locked-note { display: flex; align-items: center; gap: .55rem; margin-top: .9rem; padding: .6rem .85rem;
  border: 1px dashed var(--line); border-radius: 12px; color: var(--text-dim); font-size: .84rem; }
.locked-note svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Scroll reveal */
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.lookup-strip { padding-top: 2.5rem; padding-bottom: 0; }
.lookup-strip-inner { display: flex; gap: 1.75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.lookup-strip .lookup-form { justify-content: flex-start; }
@media (scripting: none) { .reveal { opacity: 1; transform: none; } }


/* ============================================================
   v8 — homepage lookup panel, admin panels & form polish
   ============================================================ */

/* ---------- Homepage lookup panel ---------- */
.lookup-strip { padding-top: 1rem; padding-bottom: 0; }
.lookup-panel {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr);
  gap: clamp(1.5rem, 4vw, 3rem); align-items: center; padding: clamp(1.6rem, 4vw, 2.5rem);
}
.lookup-panel-copy h2 { font-size: clamp(1.5rem, 3vw, 1.95rem); letter-spacing: -.02em; margin: .35rem 0 .6rem; }
.lookup-panel-copy p { max-width: 52ch; }
.lookup-panel-copy .tick-list { margin-top: 1rem; }
.lookup-panel-form {
  background: rgba(10, 17, 34, .55); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.35rem;
}
.lookup-form.stacked { display: grid; gap: .55rem; }
.lookup-form.stacked input { min-width: 0; max-width: none; width: 100%; }
.lookup-form.stacked .btn { width: 100%; }
.lookup-form.stacked .hint { color: var(--text-dim); font-size: .8rem; }
.lookup-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-top: 1.1rem; }
.stat.compact { padding: .7rem .75rem; text-align: center; border-radius: var(--radius-sm); }
.stat.compact .n { font-size: 1.25rem; }
.stat.compact .l { font-size: .64rem; letter-spacing: .06em; }
@media (max-width: 900px) {
  .lookup-panel { grid-template-columns: 1fr; }
}

.staff-only-note { display: inline-block; margin-top: .5rem; font-size: .78rem; color: var(--warn); }

/* ---------- Panels (admin + account pages) ---------- */
.panel {
  background: linear-gradient(180deg, var(--navy-800), var(--navy-850));
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 1.5rem; overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1rem 1.35rem; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02);
}
.panel-head h2 { font-size: 1.02rem; letter-spacing: -.01em; }
.panel-head p { color: var(--text-dim); font-size: .84rem; margin-top: .15rem; }
.panel-body { padding: 1.35rem; }
.panel-body > .stat-grid:last-child, .panel-body > .table-wrap:last-child { margin-bottom: 0; }
.panel-body .table-wrap { border-radius: var(--radius-sm); }
.panel-subhead {
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim);
  margin: 1.6rem 0 .75rem;
}
.panel-subhead:first-child { margin-top: 0; }
.panel + .panel { margin-top: 0; }
.panel .stat-grid { margin-bottom: 0; }

/* Grouped form rows inside panels */
.field-grid { display: grid; gap: 1rem 1.25rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.field-grid .field { margin-bottom: 0; }
.field-row { display: grid; gap: 1rem 1.25rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.field-row .field { margin-bottom: 0; }
.panel-footer {
  display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; justify-content: flex-end;
  padding: .9rem 1.35rem; border-top: 1px solid var(--line); background: rgba(255,255,255,.015);
}
.panel-footer.spread { justify-content: space-between; }

.colour-input { padding: .2rem; height: 42px; cursor: pointer; }
.field .hint a { font-weight: 500; }

/* ---------- Admin quick actions ---------- */
.quick-actions { display: grid; gap: .85rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-bottom: 1.5rem; }
.quick-action {
  display: flex; align-items: baseline; gap: .6rem; padding: .95rem 1.15rem; border-radius: var(--radius);
  border: 1px solid rgba(59,130,246,.32); background: var(--brand-soft); color: var(--text);
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.quick-action:hover { transform: translateY(-2px); border-color: rgba(59,130,246,.6); color: #fff; }
.quick-action strong { font-family: 'Sora', sans-serif; font-size: 1.5rem; line-height: 1; color: #bfd7ff; }
.quick-action span { color: var(--text-muted); font-size: .88rem; }

/* ---------- Admin nav ---------- */
.admin-nav a span { flex: 1; }
.nav-count {
  font-style: normal; font-size: .7rem; font-weight: 700; padding: .05rem .4rem; border-radius: 999px;
  background: var(--brand); color: #fff; min-width: 20px; text-align: center;
}
.admin-nav h4 + h4 { margin-top: .4rem; }
.admin-nav h4 { margin-top: .35rem; }
.admin-nav-toggle { display: none; width: 100%; margin-bottom: .5rem; }
.admin-nav-body { display: block; }

@media (max-width: 980px) {
  .admin-nav-toggle { display: inline-flex; }
  .admin-nav-body { display: none; }
  .admin-nav.open .admin-nav-body { display: block; animation: pop .16s var(--ease); }
}

/* ---------- Application progress ---------- */
.progress-track { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 0; padding: 0; counter-reset: step; }
.progress-track li { position: relative; padding-top: 1.55rem; color: var(--text-dim); font-size: .85rem; text-align: center; }
.progress-track li::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 14px; height: 14px; border-radius: 50%; background: var(--navy-700); border: 2px solid var(--line-strong);
}
.progress-track li::after { content: ''; position: absolute; top: 6px; left: 50%; width: 100%; height: 2px; background: var(--line); }
.progress-track li:last-child::after { display: none; }
.progress-track li.done { color: var(--text); }
.progress-track li.done::before { background: var(--ok); border-color: var(--ok); }
.progress-track li.current::before { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.progress-track li.stop::before { background: var(--bad); border-color: var(--bad); }

/* ---------- Smoothness ---------- */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.btn, .card, .panel, .admin-nav a { will-change: auto; }


/* ============================================================
   Profiles, coverage & admin information (v10)
   ============================================================ */
.user-menu { min-width: 250px; }
.user-menu-head { display: flex; gap: .7rem; align-items: center; padding: .6rem .7rem .75rem;
  border-bottom: 1px solid var(--line); margin-bottom: .35rem; }
.user-menu-head img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.user-menu-head strong { display: block; font-size: .9rem; }
.user-menu-head .dim { display: block; font-size: .75rem; }

  border: 1px solid var(--line); overflow: hidden; margin: .5rem 0 .35rem; }
  background: linear-gradient(90deg, #3b82f6, #38bdf8); transition: width .5s var(--ease); }

.profile-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.75rem;
  align-items: center; padding: 1.6rem; border-radius: var(--radius);
  border: 1px solid var(--line); background: linear-gradient(160deg, var(--navy-800), var(--navy-850)); }
.profile-identity { display: flex; gap: 1.2rem; align-items: center; min-width: 0; }
.profile-avatar-ring { position: relative; flex: none; padding: 4px; border-radius: 50%;
  background: conic-gradient(from 180deg, var(--rank, #3b82f6), transparent 70%, var(--rank, #3b82f6)); }
.profile-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; display: block;
  border: 3px solid var(--navy-850); }
.profile-avatar-ring.sm .profile-avatar { width: 64px; height: 64px; }
  background: var(--brand); color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  padding: .1rem .5rem; border-radius: 999px; white-space: nowrap; }
.profile-titles h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 .5rem; }
.profile-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.profile-sub { margin-top: .55rem; font-size: .85rem; }
  background: var(--navy-850); padding: 1rem 1.1rem; }
.profile-columns { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.25rem; }

  border: 1px solid var(--line); border-radius: 10px; background: var(--navy-850); padding: .6rem .75rem; }

  border: 1px solid transparent; }

.admin-user-head { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.admin-user-head .grow { flex: 1; min-width: 220px; }
.wrap-row { flex-wrap: wrap; align-items: center; gap: .6rem; }
.copyable { cursor: pointer; }
.copyable.copied::after { content: ' copied'; color: #34d399; font-size: .72rem; }

@media (max-width: 900px) {
  .profile-hero, .profile-columns { grid-template-columns: 1fr; }
  .profile-identity { flex-direction: column; text-align: center; align-items: center; }
  .profile-tags { justify-content: center; }
}

/* ---------- Homepage coverage band ---------- */
.protection-band { padding: 3.25rem 0 3rem; position: relative; overflow: hidden;
  background:
    radial-gradient(900px 340px at 15% 0%, rgba(59,130,246,.16), transparent 65%),
    radial-gradient(700px 320px at 88% 100%, rgba(56,189,248,.12), transparent 60%),
    var(--navy-900, var(--bg)); border-block: 1px solid var(--line); }
.section-head.compact { margin-bottom: 1.5rem; }
.protection-grid { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center;
  gap: 1rem 1.5rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(150deg, var(--navy-800), var(--navy-850)); padding: 1.8rem 1.4rem;
  box-shadow: 0 24px 48px -32px rgba(2,6,23,.9); }
.protection-divider { width: 1px; align-self: stretch; background: linear-gradient(180deg, transparent, var(--line), transparent); }
.protection-stat { text-align: center; min-width: 0; }
.protection-value { display: block; font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 800; line-height: 1.05;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff, #93c5fd); -webkit-background-clip: text;
  background-clip: text; color: transparent; }
.protection-label { display: block; margin-top: .45rem; font-weight: 600; font-size: .95rem; }
.protection-note { display: block; margin-top: .2rem; font-size: .78rem; color: var(--text-dim); }
.protection-sync { text-align: center; margin-top: .9rem; font-size: .78rem; }
@media (max-width: 860px) {
  .protection-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .protection-divider { width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--line), transparent); }
}

/* ---------- Admin information ---------- */
.api-key-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.api-key { flex: 1; min-width: 260px; font-size: .85rem; padding: .6rem .75rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--navy-850); word-break: break-all; }
.api-key.masked { color: transparent; text-shadow: 0 0 9px rgba(226,232,240,.85); user-select: none; }
.inline-form { display: inline-flex; }
.code-block { border: 1px solid var(--line); border-radius: var(--radius); background: var(--navy-850); overflow: hidden; }
.code-title { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim);
  padding: .5rem .8rem; border-bottom: 1px solid var(--line); }
.code-block pre { margin: 0; padding: .85rem; overflow-x: auto; font-size: .8rem; line-height: 1.6; }
.callout { display: flex; flex-direction: column; gap: .25rem; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--navy-850); padding: .9rem 1rem; font-size: .88rem; }
.callout.danger { border-color: rgba(248,113,113,.42); background: rgba(248,113,113,.09); }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: .6rem; }
.perm-item { align-items: flex-start; border: 1px solid var(--line); border-radius: 10px;
  background: var(--navy-850); padding: .65rem .75rem; transition: border-color .18s var(--ease), background .18s var(--ease); }
.perm-item:hover { border-color: rgba(59,130,246,.45); }
.perm-item:has(input:checked) { border-color: rgba(59,130,246,.6); background: var(--brand-soft); }
.perm-tag { font-size: .68rem; font-style: normal; color: #93c5fd; border: 1px solid rgba(59,130,246,.4);
  border-radius: 999px; padding: 0 .4rem; margin-left: .35rem; }
.check.highlight { border: 1px solid rgba(245,158,11,.4); background: rgba(245,158,11,.08);
  border-radius: 10px; padding: .7rem .8rem; align-items: flex-start; }
.mini-list { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.mini-list a { display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .6rem .7rem; border-radius: 10px; border: 1px solid var(--line); background: var(--navy-850);
  text-decoration: none; color: inherit; transition: border-color .18s var(--ease), transform .18s var(--ease); }
.mini-list a:hover { border-color: rgba(59,130,246,.45); transform: translateX(2px); }
.mini-list-main { display: flex; flex-direction: column; gap: .15rem; min-width: 0; font-size: .88rem; }
.mini-list-main .dim { font-size: .74rem; }
.mini-user { display: flex; align-items: center; gap: .6rem; }
.mini-user img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; }
.row-danger { background: rgba(248,113,113,.06); }
.clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
  max-width: 220px; font-size: .74rem; }
.ta-right { text-align: right; }
td.actions { text-align: right; white-space: nowrap; vertical-align: middle; }
.profile-side { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; }
.profile-bio { margin-top: .6rem; font-size: .9rem; color: var(--text-dim); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}


/* ============================================================
   v11 — repaired components, stat cards, notices & polish
   Rules in this section replace/restore component styles that were
   missing or lost their selectors in earlier revisions.
   ============================================================ */

/* ---------- Layout primitives ---------- */
.container { width: min(var(--wrap), 92%); margin-inline: auto; }
.admin-main { min-width: 0; }
.footer-content { display: flex; gap: 1rem 1.5rem; justify-content: space-between;
  align-items: center; flex-wrap: wrap; color: var(--text-dim); font-size: .85rem; padding: 2rem 0; }
.field-wide { grid-column: 1 / -1; }
.panel-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.card-title { font-size: 1.02rem; letter-spacing: -.01em; margin-bottom: .9rem; }
.centered-page { display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }

/* ---------- Statistic cards ---------- */
.stat-grid { display: grid; gap: .85rem; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); }
.stat-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: .15rem;
  padding: 1.05rem 1.15rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(165deg, var(--navy-800), var(--navy-850));
  transition: border-color .22s var(--ease), transform .22s var(--ease);
}
.stat-card::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: linear-gradient(180deg, var(--brand), rgba(59,130,246,0));
}
.stat-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.stat-card .stat-value {
  font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.85rem;
  line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: #fff;
}
.stat-card .stat-label {
  font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-dim);
}
.stat-card.good::before { background: linear-gradient(180deg, var(--ok), rgba(52,211,153,0)); }
.stat-card.good .stat-value { color: #b8f5dd; }
.stat-card.warn::before { background: linear-gradient(180deg, var(--warn), rgba(251,191,36,0)); }
.stat-card.warn .stat-value { color: #fde68a; }
.stat-card.bad::before { background: linear-gradient(180deg, var(--bad), rgba(248,113,113,0)); }
.stat-card.bad .stat-value { color: #fecaca; }
@media (max-width: 520px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { padding: .9rem 1rem; }
  .stat-card .stat-value { font-size: 1.55rem; }
}

/* ---------- Profile side rail (selector was lost) ---------- */
.profile-side {
  display: flex; flex-direction: column; align-items: flex-start; gap: .35rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--navy-850); padding: 1rem 1.1rem;
}
.profile-side code {
  display: inline-flex; align-items: center; gap: .4rem;
  border: 1px solid var(--line); border-radius: 8px; background: var(--navy-800);
  padding: .35rem .6rem; font-size: .85rem; color: #cfe0ff;
}
.profile-bio { margin-top: .6rem; color: var(--text-muted); font-size: .93rem; }
.profile-stats-head { display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.profile-stats-head h2 { font-size: 1.02rem; letter-spacing: -.01em; }
.profile-stats-head p { color: var(--text-dim); font-size: .82rem; }

/* ---------- Progress bar (selectors were lost) ---------- */
.progress { height: 8px; border-radius: 999px; background: var(--navy-800);
  border: 1px solid var(--line); overflow: hidden; margin: .5rem 0 .35rem; }
.progress > span, .progress-fill { display: block; height: 100%;
  background: linear-gradient(90deg, #3b82f6, #38bdf8); transition: width .5s var(--ease); }

/* ---------- Notice / banned / legal pages ---------- */
.notice-card {
  width: min(560px, 100%); text-align: center; padding: clamp(1.6rem, 5vw, 2.6rem);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(165deg, var(--navy-800), var(--navy-850)); box-shadow: var(--shadow);
}
.notice-logo { width: 62px; height: 62px; object-fit: contain; margin: 0 auto 1.1rem; }
.notice-reason {
  margin-top: 1.1rem; text-align: left; border: 1px solid var(--line);
  border-left: 3px solid var(--bad); border-radius: var(--radius-sm);
  background: var(--navy-900); padding: .9rem 1.05rem; color: var(--text-muted);
  font-size: .93rem; white-space: pre-wrap;
}
.official-document {
  margin-top: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--navy-900); padding: 1rem 1.15rem; color: var(--text-dim); font-size: .84rem;
}
.contact-list { list-style: none; display: grid; gap: .45rem; margin: 0 0 1.25rem; }
.contact-list li { color: var(--text-muted); font-size: .93rem; }

/* ---------- Dynamic report form builder ---------- */
.builder-field {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--navy-850); padding: 1.1rem 1.15rem;
}
.builder-field + .builder-field { margin-top: .9rem; }
.builder-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.builder-type {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: #bfd7ff; background: var(--brand-soft); border: 1px solid rgba(59,130,246,.3);
  border-radius: 999px; padding: .15rem .55rem;
}
.form-progress { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.25rem;
  color: var(--text-dim); font-size: .8rem; }

/* ---------- Motion & smoothness ----------
   Reveal is driven by the IntersectionObserver in app.js, which adds `.in`.
   The base state stays visible so content never gets stuck hidden if JS is
   unavailable; `html.js` (set by app.js immediately) opts into the animation. */
.reveal { opacity: 1; transform: none; }
html.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}


/* ================================================================
   v13 — profile banners, table action cells and interface polish
   ================================================================ */

/* --- Discord profile banners --- */
.profile-hero { position: relative; overflow: hidden; padding: 0; display: block; }
.profile-hero-body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.75rem; align-items: center; padding: 1.6rem; }
.profile-banner { height: 132px; background-color: var(--navy-800); background-size: cover;
  background-position: center; border-bottom: 1px solid var(--line); position: relative; }
.profile-banner::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(2,6,23,.05), rgba(2,6,23,.65)); }
.profile-hero:not(.has-banner) .profile-banner { display: none; }
.profile-hero.has-banner .profile-hero-body { padding-top: 1.1rem; }
.profile-hero.has-banner .profile-avatar-frame { margin-top: -3.6rem; }

.profile-avatar-frame { position: relative; flex: none; border-radius: 50%; padding: 4px;
  background: var(--navy-850); box-shadow: 0 12px 30px -18px rgba(2,6,23,.95); }
.profile-avatar-frame .profile-avatar { width: 96px; height: 96px; border-radius: 50%;
  object-fit: cover; display: block; border: 3px solid var(--navy-850); background: var(--navy-800); }
.profile-avatar-frame.sm .profile-avatar { width: 64px; height: 64px; }

.admin-user-banner { height: 124px; border-radius: var(--radius); border: 1px solid var(--line);
  background-color: var(--navy-800); background-size: cover; background-position: center;
  margin-bottom: -2.2rem; }
.admin-user-banner:not(.has-banner) { display: none; }
.admin-user-head { position: relative; z-index: 1; padding-left: .35rem; }

@media (max-width: 900px) {
  .profile-hero-body { grid-template-columns: 1fr; }
  .profile-hero.has-banner .profile-avatar-frame { margin-top: -3rem; }
}

/* --- Table action cells --- */
.row-actions { display: inline-flex; align-items: center; justify-content: flex-end;
  gap: .4rem; flex-wrap: nowrap; }
.row-actions .btn { flex: none; }
.inline-form { display: inline-flex; margin: 0; }
th.col-actions { text-align: right; width: 1%; white-space: nowrap; }
td.actions .btn-sm { min-height: 30px; }
@media (max-width: 720px) {
  .row-actions { flex-wrap: wrap; justify-content: flex-start; }
  td.actions, th.col-actions { text-align: left; white-space: normal; }
}

/* --- Sticky table headers inside scrollable panels --- */
.table-sticky thead th { position: sticky; top: 0; z-index: 2;
  background: color-mix(in srgb, var(--navy-850) 92%, #000); backdrop-filter: blur(6px); }

/* --- Thin page scroll indicator --- */
.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, #3b82f6, #38bdf8); z-index: 90; pointer-events: none;
  transition: opacity .25s var(--ease); will-change: width; }

/* --- Back to top --- */
.to-top { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 80; width: 42px; height: 42px;
  display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line);
  background: var(--navy-800); color: var(--text-muted); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: #fff; border-color: var(--line-strong); background: var(--navy-750); }
.to-top svg { width: 18px; height: 18px; }

/* --- Quick search: rows filtered client-side --- */
tr.is-filtered { display: none; }
.quick-search-empty { padding: 1rem; color: var(--text-dim); font-size: .9rem; }

/* --- Interaction polish --- */
.btn { transition: transform .14s var(--ease), background .18s var(--ease),
  border-color .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn.is-busy { pointer-events: none; opacity: .7; }
:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid #60a5fa; outline-offset: 2px; border-radius: 6px; }
.panel, .card { transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
html { scroll-behavior: smooth; }
::selection { background: rgba(59,130,246,.35); }
* { scrollbar-color: var(--line-strong, #334155) transparent; scrollbar-width: thin; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #334155; background-clip: content-box; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ==========================================================================
   v14 — command palette, toasts, status page, bulk lookup, API docs
   ========================================================================== */

/* ---------- Toast stack (v25.5 — refined notifications) ---------- */
.toast-stack {
  position: fixed; right: 1.15rem; bottom: 1.15rem; z-index: 2200;
  display: flex; flex-direction: column-reverse; gap: .65rem;
  width: min(392px, calc(100vw - 2rem));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr auto; align-items: start;
  gap: .2rem .8rem;
  padding: .85rem .9rem .95rem;
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,0) 46%),
    color-mix(in srgb, var(--navy-800) 82%, #05080f);
  border: 1px solid var(--line-strong);
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 26px 56px -28px rgba(0,0,0,.95), 0 4px 14px -8px rgba(0,0,0,.6);
  color: var(--text); font-size: .89rem; line-height: 1.5;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  animation: toast-in .42s var(--ease) both;
  --toast-accent: var(--info);
}
.toast::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--toast-accent);
  box-shadow: 0 0 18px -2px var(--toast-accent);
}
.toast-success { --toast-accent: var(--ok); }
.toast-error   { --toast-accent: var(--bad); }
.toast-warning { --toast-accent: var(--warn); }
.toast-info    { --toast-accent: var(--info); }

.toast-icon {
  grid-column: 1; grid-row: 1 / span 2;
  width: 30px; height: 30px; flex: none; padding: 6px;
  border-radius: 9px; margin-left: .15rem;
  color: var(--toast-accent);
  background: color-mix(in srgb, var(--toast-accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--toast-accent) 30%, transparent);
}
.toast-body { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.toast-title {
  font-family: 'Sora', 'Segoe UI', sans-serif;
  font-size: .8rem; font-weight: 600; letter-spacing: .01em;
  color: var(--toast-accent);
}
.toast-msg { color: var(--text); overflow-wrap: anywhere; }
.toast-x {
  grid-column: 3; grid-row: 1 / span 2;
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex: none;
  background: none; border: 1px solid transparent; border-radius: 8px;
  color: var(--text-dim); cursor: pointer; padding: 0;
  transition: color .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease);
}
.toast-x svg { width: 14px; height: 14px; }
.toast-x:hover { color: var(--text); background: rgba(255,255,255,.06); border-color: var(--line); }
.toast-x:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.toast-life {
  grid-column: 1 / -1; grid-row: 3;
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--toast-accent), color-mix(in srgb, var(--toast-accent) 25%, transparent));
  animation: toast-life 5600ms linear both;
  opacity: .85;
}
.toast.out { animation: toast-out .28s var(--ease) both; }
.toast-repeat { animation: toast-nudge .4s var(--ease); }

@keyframes toast-in {
  from { opacity: 0; transform: translate3d(0, 16px, 0) scale(.96); }
  60%  { opacity: 1; transform: translate3d(0, -2px, 0) scale(1.005); }
  to   { opacity: 1; transform: none; }
}
@keyframes toast-out { to { opacity: 0; transform: translate3d(0, 6px, 0) scale(.97); filter: blur(1px); } }
@keyframes toast-life { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes toast-nudge { 0%, 100% { transform: none; } 35% { transform: translateX(-4px); } 70% { transform: translateX(3px); } }

@media (prefers-reduced-motion: reduce) {
  .toast, .toast.out { animation: none; }
  .toast-life { animation: none; opacity: .35; }
}

/* ---------- Confirmation dialog ---------- */
body.has-modal { overflow: hidden; }
.confirm-overlay {
  position: fixed; inset: 0; z-index: 2400;
  display: flex; align-items: center; justify-content: center; padding: 1.25rem;
  background: rgba(4, 8, 18, .66);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .2s var(--ease);
}
.confirm-overlay.is-open { opacity: 1; }
.confirm-box {
  width: min(440px, 100%);
  border-radius: 16px; padding: 1.35rem 1.35rem 1.1rem;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0) 40%),
    color-mix(in srgb, var(--navy-800) 90%, #05080f);
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.95);
  transform: translateY(12px) scale(.97); opacity: 0;
  transition: transform .26s var(--ease), opacity .26s var(--ease);
}
.confirm-overlay.is-open .confirm-box { transform: none; opacity: 1; }
.confirm-head { display: flex; gap: .9rem; align-items: flex-start; }
.confirm-mark {
  flex: none; width: 40px; height: 40px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--info);
  background: color-mix(in srgb, var(--info) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--info) 30%, transparent);
}
.confirm-mark.is-danger {
  color: var(--bad);
  background: color-mix(in srgb, var(--bad) 14%, transparent);
  border-color: color-mix(in srgb, var(--bad) 32%, transparent);
}
.confirm-mark svg { width: 20px; height: 20px; }
.confirm-title { display: block; font-family: 'Sora', 'Segoe UI', sans-serif; font-size: 1.02rem; }
.confirm-msg { margin-top: .3rem; color: var(--text-muted); font-size: .9rem; line-height: 1.55; }
.confirm-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.25rem; }
@media (prefers-reduced-motion: reduce) {
  .confirm-overlay, .confirm-box { transition: none; }
}

/* ---------- Command palette ---------- */
.cmdk-trigger {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--navy-800); border: 1px solid var(--line);
  color: var(--text-dim); border-radius: 999px; cursor: pointer;
  padding: .38rem .7rem; font: inherit; font-size: .82rem;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.cmdk-trigger:hover { color: var(--text); border-color: var(--line-strong); background: var(--navy-750); }
.cmdk-trigger svg { width: 14px; height: 14px; }
.cmdk-trigger kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .7rem;
  border: 1px solid var(--line); border-radius: 5px; padding: .05rem .3rem; color: var(--text-dim);
}

.cmdk { position: fixed; inset: 0; z-index: 2400; display: none; }
.cmdk.open { display: block; }
.cmdk-backdrop {
  position: absolute; inset: 0; background: rgba(5, 9, 20, .68);
  backdrop-filter: blur(6px); animation: fade-in .18s var(--ease) both;
}
.cmdk-panel {
  position: relative; width: min(620px, 92vw); margin: 12vh auto 0;
  background: color-mix(in srgb, var(--navy-850) 96%, #000);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.95); overflow: hidden;
  animation: cmdk-in .22s var(--ease) both;
}
@keyframes cmdk-in { from { opacity: 0; transform: translateY(-10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.cmdk-field { display: flex; align-items: center; gap: .7rem; padding: .95rem 1.1rem; border-bottom: 1px solid var(--line); }
.cmdk-field svg { width: 17px; height: 17px; color: var(--text-dim); flex: none; }
.cmdk-input {
  flex: 1; background: none; border: 0; outline: 0; color: var(--text);
  font: inherit; font-size: 1rem;
}
.cmdk-input::placeholder { color: var(--text-dim); }
.cmdk-list { max-height: min(52vh, 420px); overflow-y: auto; padding: .4rem; }
.cmdk-item {
  display: flex; align-items: baseline; gap: .7rem; padding: .6rem .75rem;
  border-radius: var(--radius-sm); color: var(--text); text-decoration: none;
}
.cmdk-item.active { background: var(--brand-soft); color: #fff; }
.cmdk-label { font-weight: 500; }
.cmdk-hint { color: var(--text-dim); font-size: .82rem; margin-left: auto; text-align: right; }
.cmdk-empty { padding: 1.5rem; text-align: center; color: var(--text-dim); font-size: .9rem; }
.cmdk-foot {
  display: flex; gap: 1rem; padding: .6rem 1.1rem; border-top: 1px solid var(--line);
  color: var(--text-dim); font-size: .76rem; flex-wrap: wrap;
}
.cmdk-foot kbd {
  font-family: ui-monospace, monospace; border: 1px solid var(--line);
  border-radius: 4px; padding: 0 .3rem; margin-right: .25rem;
}
body.cmdk-open { overflow: hidden; }

/* ---------- Status page ---------- */
.status-banner {
  display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap;
  padding: 1.4rem 1.5rem; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--navy-850);
  box-shadow: var(--shadow);
}
.status-banner h1 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
.status-banner .status-checked { margin-left: auto; text-align: right; display: grid; }
.status-banner .status-checked strong { font-family: 'Sora', sans-serif; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.status-orb {
  width: 14px; height: 14px; border-radius: 50%; flex: none; background: var(--ok);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent);
  animation: orb-pulse 2.4s var(--ease) infinite;
}
@keyframes orb-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 50%, transparent); }
  70%  { box-shadow: 0 0 0 12px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.state-degraded  .status-orb, .state-degraded  .status-dot { background: var(--warn); }
.state-maintenance .status-orb, .state-maintenance .status-dot { background: var(--info); }
.state-down      .status-orb, .state-down      .status-dot { background: var(--bad); }
.state-unknown   .status-orb, .state-unknown   .status-dot { background: var(--text-dim); }

.status-grid { display: grid; gap: .7rem; }
.status-item {
  display: flex; align-items: center; gap: .85rem;
  padding: .85rem 1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--navy-850);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.status-item:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.status-item > div { display: grid; }
.status-item strong { font-weight: 500; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; }
.status-tag {
  margin-left: auto; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-dim); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .6rem;
}

/* ---------- Metric cards & sparklines ---------- */
.metric-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.metric-card {
  display: grid; gap: .45rem; padding: 1.15rem 1.2rem;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--navy-850), color-mix(in srgb, var(--navy-900) 80%, var(--navy-850)));
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.metric-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.metric-label { color: var(--text-dim); font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; }
.metric-value { font-family: 'Sora', sans-serif; font-size: 2rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.metric-split { display: grid; gap: .15rem; color: var(--text-muted); font-size: .84rem; }
.sparkline { width: 100%; height: 46px; display: block; margin: .2rem 0; }

/* ---------- Bars, legends, timeline ---------- */
.bar-list { display: grid; gap: .85rem; }
.bar-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: .3rem; }
.bar-track { height: 8px; border-radius: 999px; background: rgba(148,178,226,.1); overflow: hidden; }
.bar-fill {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--flag), color-mix(in srgb, var(--flag) 55%, #0b1220));
  animation: bar-grow .8s var(--ease) both;
}
@keyframes bar-grow { from { transform: scaleX(.02); transform-origin: left; } to { transform: none; } }

.severity-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: rgba(148,178,226,.1); }
.severity-bar span { display: block; height: 100%; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: .9rem; }
.legend li { display: inline-flex; align-items: center; gap: .4rem; color: var(--text-muted); font-size: .86rem; }
.legend strong { color: var(--text); font-variant-numeric: tabular-nums; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }

.timeline { list-style: none; display: grid; gap: .55rem; }
.timeline li { display: flex; align-items: center; gap: .6rem; font-size: .9rem; color: var(--text-muted); }
.timeline li .dim { margin-left: auto; }
.timeline-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* ---------- API docs ---------- */
.api-hero { padding-bottom: 1.5rem; }
.method {
  font-family: ui-monospace, monospace; font-size: .7rem; letter-spacing: .06em;
  padding: .18rem .45rem; border-radius: 5px; margin-right: .5rem; vertical-align: middle;
}
.method.get  { background: rgba(52,211,153,.15); color: var(--ok); }
.method.post { background: rgba(59,130,246,.18); color: #7dabff; }
pre.code {
  position: relative; margin-top: .6rem; padding: .95rem 1rem; overflow-x: auto;
  background: color-mix(in srgb, var(--navy-900) 88%, #000);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .84rem;
  line-height: 1.6; color: #cddcf7;
}
pre.code code { font: inherit; white-space: pre; }
.code-copy {
  position: absolute; top: .5rem; right: .5rem; padding: .18rem .55rem;
  font: inherit; font-size: .72rem; cursor: pointer; color: var(--text-dim);
  background: var(--navy-800); border: 1px solid var(--line); border-radius: 6px;
  opacity: 0; transition: opacity .2s var(--ease), color .2s var(--ease);
}
pre.code:hover .code-copy, .code-copy:focus-visible { opacity: 1; }
.code-copy:hover { color: var(--text); }

/* ---------- Lookup: tabs, recents, bulk ---------- */
.tabs { display: inline-flex; gap: .25rem; padding: .25rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--navy-850); }
.tabs button {
  border: 0; background: none; color: var(--text-muted); cursor: pointer;
  font: inherit; font-size: .88rem; padding: .4rem .95rem; border-radius: 999px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.tabs button:hover { color: var(--text); }
.tabs button.active { background: var(--brand); color: #fff; }

.recent-list { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.recent-chip {
  display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .7rem;
  border-radius: 999px; border: 1px solid var(--line); background: var(--navy-850);
  color: var(--text-muted); font-size: .82rem;
  transition: border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.recent-chip:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-1px); }
.recent-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.recent-chip.is-flagged .recent-dot { background: var(--bad); }
.recent-id { font-family: ui-monospace, monospace; }
.recent-state { color: var(--text-dim); font-size: .74rem; }

.bulk-summary {
  display: flex; gap: .8rem; align-items: center; padding: .6rem .2rem 1rem;
  color: var(--text-muted); font-size: .9rem;
}
.bulk-summary .is-bad { color: var(--bad); }
.bulk-summary .is-good { color: var(--ok); }
.bulk-row {
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  padding: .7rem .9rem; margin-bottom: .5rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--navy-850); color: var(--text);
  border-left: 3px solid var(--ok);
  transition: transform .18s var(--ease), border-color .18s var(--ease);
}
.bulk-row:hover { transform: translateX(2px); border-color: var(--line-strong); }
.bulk-row.is-flagged { border-left-color: var(--bad); }
.bulk-row.sev-medium { border-left-color: var(--warn); }
.bulk-row.sev-low { border-left-color: var(--info); }
.bulk-id { font-family: ui-monospace, monospace; font-size: .85rem; }
.bulk-meta { margin-left: auto; display: inline-flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

.skeleton-row {
  height: 46px; margin-bottom: .5rem; border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--navy-850) 25%, var(--navy-750) 37%, var(--navy-850) 63%);
  background-size: 400% 100%; animation: shimmer 1.3s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---------- Homepage trust strip ---------- */
.trust-strip {
  display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  padding: 1.1rem 1.25rem; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--navy-850);
}
.trust-item { display: grid; gap: .1rem; }
.trust-item strong { font-family: 'Sora', sans-serif; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.trust-item span { color: var(--text-dim); font-size: .82rem; }

.draft-note { color: var(--text-dim); font-size: .8rem; min-height: 1.2em; }

@media (max-width: 700px) {
  .status-banner .status-checked { margin-left: 0; text-align: left; }
  .cmdk-trigger .cmdk-trigger-text { display: none; }
  .toast-stack { right: .6rem; left: .6rem; width: auto; }
}

/* Hero utility hint ------------------------------------------------------ */
.hero-hint { margin-top: 1.1rem; font-size: .85rem; }
.hero-hint a { color: var(--text-muted); border-bottom: 1px solid var(--line-strong); }
.hero-hint a:hover { color: #fff; }
.hero-hint kbd {
  display: inline-block; padding: .08rem .34rem; margin: 0 .1rem; border-radius: 5px;
  border: 1px solid var(--line-strong); background: var(--navy-800);
  font-family: inherit; font-size: .72rem; color: var(--text-muted);
}

/* ============================================================ profile fixes
   The hero is rendered by .profile-hero-body / .profile-avatar-frame; the
   older ring + grid rules above are superseded here so the banner, avatar
   and side column can never fight each other. */
.profile-avatar-ring { display: none; }
.profile-hero { display: block; padding: 0; }
.profile-hero-body { align-items: start; gap: 1.75rem; padding: 1.5rem 1.6rem 1.6rem; }
.profile-identity { align-items: flex-start; }
.profile-titles { min-width: 0; }
.profile-titles h1 { line-height: 1.15; overflow-wrap: anywhere; }
.profile-side { align-items: flex-start; gap: .5rem; }
.profile-side .copyable { max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 820px) {
  .profile-hero-body { padding: 1.25rem; }
  .profile-side { align-items: center; text-align: center; width: 100%; }
}

/* ========================================================= server manager */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-head-stats { display: flex; gap: 1.25rem; font-size: .85rem; color: var(--text-dim); }
.page-head-stats strong { color: #fff; font-size: 1.05rem; margin-right: .25rem; }

.guild-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.guild-card { display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem 1rem 1rem;
  background: var(--navy-850); border: 1px solid var(--line); border-radius: var(--radius);
  text-align: center; transition: border-color .18s var(--ease), transform .18s var(--ease); }
.guild-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.guild-card.is-installed { border-color: color-mix(in oklab, var(--ok) 40%, var(--line)); }
.guild-card-top { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.guild-icon { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--navy-800); }
.guild-icon-fallback { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  background: var(--navy-750); color: #cdd8e8; font-weight: 700; letter-spacing: .02em; }
.guild-icon-fallback.sm { width: 40px; height: 40px; font-size: .8rem; }
.guild-name { font-size: .95rem; line-height: 1.3; margin: 0; overflow-wrap: anywhere; }
.guild-tags { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; }
.chip { display: inline-flex; align-items: center; padding: .15rem .5rem; border-radius: 999px;
  font-size: .7rem; font-weight: 600; letter-spacing: .02em; background: var(--navy-750); color: var(--text-muted); }
.chip-ok { background: color-mix(in oklab, var(--ok) 18%, transparent); color: #86efac; }
.chip-dim { color: var(--text-dim); }
.guild-card-action { margin-top: auto; }
.guild-card-action .btn { width: 100%; justify-content: center; }
.btn-add { display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--brand-soft); color: #bfd7ff; border: 1px solid var(--brand); border-radius: 10px;
  padding: .45rem .8rem; font-size: .85rem; font-weight: 600; }
.btn-add:hover { background: var(--brand); color: #fff; }
.btn-add svg { width: 15px; height: 15px; }

.guild-rail-head { display: flex; align-items: center; gap: .65rem; padding: .35rem .5rem .75rem;
  border-bottom: 1px solid var(--line); margin-bottom: .35rem; }
.guild-rail-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.guild-rail-head strong { display: block; font-size: .9rem; line-height: 1.2; overflow-wrap: anywhere; }

.config-health { margin-top: 1rem; padding: .85rem .75rem; border-radius: 12px;
  border: 1px solid var(--line); background: var(--navy-800); }
.config-health.is-valid { border-color: color-mix(in oklab, var(--ok) 45%, var(--line)); }
.config-health.is-invalid { border-color: color-mix(in oklab, var(--warn, #facc15) 40%, var(--line)); }
.config-health-head strong { display: block; font-size: .86rem; }
.config-health-head .dim { font-size: .75rem; }
.config-health .progress { margin: .55rem 0 .7rem; }
.config-health.is-valid .progress > span { background: var(--ok); }
.config-check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.config-check-list li { display: flex; gap: .5rem; align-items: flex-start; font-size: .78rem; }
.config-check-list svg { width: 14px; height: 14px; flex: none; margin-top: .15rem; }
.config-check-list li.ok svg { color: var(--ok); }
.config-check-list li.bad svg { color: var(--bad); }
.config-check-list strong { display: block; font-weight: 600; color: var(--text); font-size: .78rem; }
.config-check-list em { font-style: normal; color: var(--text-dim); }

select[multiple] { width: 100%; padding: .4rem; }
select[multiple] option { padding: .3rem .4rem; border-radius: 6px; }

/* ==================================================================
   Authentication & account settings (v16)
   ================================================================== */

.nav-auth { display: flex; gap: .5rem; align-items: center; }

.auth-section .wrap-narrow { max-width: 520px; }
.auth-section { padding-top: 3.2rem; }

.auth-card {
  background: linear-gradient(180deg, rgba(22, 35, 60, .92), rgba(13, 21, 38, .94));
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  padding: 2.1rem 1.9rem 1.7rem;
}
.auth-head { text-align: center; margin-bottom: 1.4rem; }
.auth-logo { width: 46px; height: 46px; margin: 0 auto .8rem; border-radius: 12px; }
.auth-head h1 { font-size: 1.55rem; margin-bottom: .35rem; }
.auth-head p { font-size: .92rem; }

.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: .3rem;
  background: rgba(10, 17, 34, .7); border: 1px solid var(--line);
  border-radius: 999px; padding: .28rem; margin-bottom: 1.4rem;
}
.auth-tabs a {
  text-align: center; padding: .5rem .8rem; border-radius: 999px;
  font-size: .88rem; font-weight: 600; color: var(--text-muted);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.auth-tabs a:hover { color: var(--text); }
.auth-tabs a.active { background: var(--brand); color: #fff; box-shadow: 0 10px 24px -14px var(--brand); }

.auth-form .field { margin-bottom: 1rem; }
.auth-errors { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1.1rem; }

.btn-block { width: 100%; justify-content: center; }

.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 4.2rem; }
.password-toggle {
  position: absolute; top: 50%; right: .5rem; transform: translateY(-50%);
  background: transparent; border: 0; color: var(--text-muted);
  font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer;
  padding: .25rem .45rem; border-radius: 7px;
}
.password-toggle:hover { color: var(--text); background: var(--navy-750); }

.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .86rem; color: var(--text-muted); margin-bottom: 1.1rem; }
.check input { margin-top: .25rem; flex: 0 0 auto; }

.auth-divider { display: flex; align-items: center; gap: .8rem; margin: 1.2rem 0; color: var(--text-dim); font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.auth-foot { text-align: center; margin-top: 1.2rem; font-size: .88rem; }

/* ---------------------------------------------------------- account */

.account-head { margin-bottom: 1.5rem; }
.account-identity { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.account-avatar { width: 74px; height: 74px; border-radius: 50%; border: 2px solid var(--line-strong); }
.account-identity h1 { font-size: 1.7rem; }
.account-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }

.pill { display: inline-flex; align-items: center; padding: .22rem .7rem; border-radius: 999px; font-size: .76rem; font-weight: 600; border: 1px solid var(--line-strong); color: var(--text-muted); }
.pill-ok { background: rgba(52, 211, 153, .12); border-color: rgba(52, 211, 153, .35); color: #6ee7b7; }
.pill-brand { background: rgba(88, 101, 242, .16); border-color: rgba(88, 101, 242, .4); color: #b3bbff; }
.pill-warn { background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .35); color: #fcd34d; }
.pill-dim { background: rgba(148, 178, 226, .06); }

.account-tabs { margin-bottom: 1.4rem; }
.account-grid { display: grid; gap: 1.15rem; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); align-items: start; }

.detail-list { display: grid; gap: .1rem; }
.detail-list > div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--text-muted); font-size: .87rem; }
.detail-list dd { font-size: .9rem; font-weight: 500; text-align: right; word-break: break-word; }

.connection-row { display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(10, 17, 34, .5); }
.connection-avatar { width: 42px; height: 42px; border-radius: 50%; }
.connection-meta { display: flex; flex-direction: column; line-height: 1.35; margin-right: auto; }

.tick-list { list-style: none; display: grid; gap: .55rem; }
.tick-list li { position: relative; padding-left: 1.5rem; color: var(--text-muted); font-size: .9rem; }
.tick-list li::before { content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, .18); }

@media (max-width: 640px) {
  .auth-card { padding: 1.6rem 1.2rem 1.3rem; }
  .account-grid { grid-template-columns: 1fr; }
  .detail-list > div { flex-direction: column; gap: .1rem; }
  .detail-list dd { text-align: left; }
  .nav-auth { width: 100%; }
  .nav-auth .btn { flex: 1; justify-content: center; }
}


/* ------------------------------------------------ v17: privacy & security */
.btn-xs { padding: .28rem .6rem; font-size: .76rem; border-radius: var(--radius-sm); }
.right { text-align: right; }
.mb { margin-bottom: 1rem; }
.grow { flex: 1 1 auto; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pill-danger { background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .38); color: #fca5a5; }

.panel-inset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.15rem; background: rgba(10, 17, 34, .45); }
.panel-inset h3 { font-size: .98rem; letter-spacing: -.01em; }
.panel-inset.danger { border-color: rgba(248, 113, 113, .38); background: rgba(248, 113, 113, .06); }
.erasure-decision { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }

.account-wide { grid-column: 1 / -1; }
.tick-list.danger li::before { background: var(--danger, #f87171); box-shadow: 0 0 0 3px rgba(248, 113, 113, .16); }

.copy-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.copy-row code { padding: .45rem .6rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(10, 17, 34, .6); font-size: .8rem; }

.subtle-details { border-top: 1px solid var(--line); padding-top: .7rem; }
.subtle-details summary { cursor: pointer; font-size: .85rem; color: var(--text-muted); }
.subtle-details summary:hover { color: var(--text); }

.select-filter { width: 100%; margin-bottom: .45rem; }
.pw-strength { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; font-size: .78rem; color: var(--text-dim); }
.pw-strength .bar { flex: 1 1 auto; height: 5px; border-radius: 999px; background: rgba(148, 178, 226, .14); overflow: hidden; }
.pw-strength .bar i { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .25s var(--ease), background .25s var(--ease); }
.pw-strength[data-level="1"] .bar i { width: 33%;  background: #f87171; }
.pw-strength[data-level="2"] .bar i { width: 66%;  background: #fbbf24; }
.pw-strength[data-level="3"] .bar i { width: 100%; background: #34d399; }

/* =========================================================================
   v18 — navigation polish, form & review layouts
   ========================================================================= */


/* ---------- Navigation dropdowns ---------- */
.user-menu.menu-rich { min-width: 288px; padding: .5rem; }
.menu-label {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-dim); padding: .5rem .65rem .35rem; margin: 0;
}
.user-menu .menu-item {
  display: flex; gap: .75rem; align-items: flex-start;
  padding: .6rem .65rem; border-radius: 10px;
}
.user-menu .menu-item svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: .15rem; color: var(--brand); }
.user-menu .menu-item span { display: flex; flex-direction: column; min-width: 0; }
.user-menu .menu-item strong { font-size: .9rem; font-weight: 600; }
.user-menu .menu-item em { font-style: normal; font-size: .78rem; color: var(--text-dim); }
.user-menu .menu-item[aria-current="page"] { background: var(--brand-soft); }
.menu-sep { height: 1px; background: var(--line); margin: .4rem .25rem; }
.menu-toggle {
  display: flex; width: 100%; align-items: center; justify-content: space-between;
  gap: .75rem; padding: .55rem .7rem; border: 0; border-radius: 10px;
  background: transparent; color: inherit; font: inherit; cursor: pointer;
}
.menu-toggle:hover { background: var(--navy-700); }

/* ---------- Roomier forms (application, report, lookup) ---------- */
.form-card { padding: clamp(1.6rem, 3.2vw, 2.6rem); }
.form-card .field { margin-bottom: 1.6rem; }
.form-card .field-label, .form-card label { font-size: .95rem; }
.form-card input, .form-card select, .form-card textarea {
  padding: .8rem .95rem; font-size: .97rem; line-height: 1.5;
}
.form-card textarea { min-height: 150px; resize: vertical; }
.form-card .hint { margin-bottom: .55rem; line-height: 1.55; }
.form-card .check { padding: .55rem .1rem; }
.form-card > .btn { min-width: 210px; }
.draft-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; border-top: 1px solid var(--line);
  margin: 1.75rem 0 1.4rem; padding-top: 1rem;
}
.lookup-form input { padding: .85rem 1rem; }
.lookup-panel { gap: 2.25rem; align-items: center; }
.lookup-panel-form { padding: 1.5rem; }
@media (min-width: 900px) {
  .form-card .field-grid { gap: 1.4rem 1.6rem; }
}

/* ---------- Review queues (LOA, resignations, applications, reports) ---------- */
.filter-bar { display: flex; gap: .5rem; flex-wrap: wrap; }
.review-list { display: grid; gap: 1.1rem; }
.review-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--navy-850); padding: 1.25rem 1.35rem; box-shadow: var(--shadow);
  display: grid; gap: 1rem;
}
.review-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.review-who { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.review-avatar { width: 42px; height: 42px; border-radius: 50%; flex: 0 0 42px; border: 1px solid var(--line); }
.review-who strong { display: block; font-size: .98rem; }
.review-who .dim { display: block; }
.min-w-0 { min-width: 0; }
.review-meta { display: grid; gap: .75rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 0; }
.review-meta dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--text-dim); }
.review-meta dd { margin: .15rem 0 0; font-size: .92rem; }
.review-body {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--navy-900); padding: 1rem 1.1rem; color: var(--text-muted); font-size: .93rem;
}
.review-actions { display: grid; gap: .6rem; grid-template-columns: minmax(0, 1fr) 170px auto; align-items: center; }
@media (max-width: 720px) { .review-actions { grid-template-columns: 1fr; } }

/* ---------- Live status pill ---------- */
.live-status {
  display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .8rem;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--navy-850); font-size: .85rem; font-weight: 600;
}
.live-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, .18); }
.live-loa i, .live-upcoming i { background: var(--warn); box-shadow: 0 0 0 3px rgba(251, 191, 36, .18); }
.live-resigned i { background: var(--bad); box-shadow: 0 0 0 3px rgba(248, 113, 113, .18); }

/* ---------- API download card ---------- */
.download-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center;
}
.download-copy h2 { margin: .35rem 0 .6rem; }
.download-action { display: grid; gap: .5rem; justify-items: center; }
.download-action .btn { display: inline-flex; align-items: center; gap: .55rem; }
.download-action .btn svg { width: 18px; height: 18px; }
@media (max-width: 820px) {
  .download-card { grid-template-columns: 1fr; }
  .download-action { justify-items: start; }
}


/* ---------------------------------------------- navigation progress bar */
.nav-progress { position: fixed; inset: 0 auto auto 0; height: 2px; width: 0; z-index: 120;
  background: linear-gradient(90deg, var(--brand, #3b82f6), #8ab4ff); opacity: 0; pointer-events: none;
  transition: width .5s cubic-bezier(.2,.8,.2,1), opacity .2s ease; }
.nav-progress.on { opacity: 1; width: 12%; }
.nav-progress.on.wide { width: 88%; transition-duration: 7s; }

/* ----------------------------------------------------- staff panel shell */
.staff-shell .admin-nav h4 { color: var(--text-dim); }
.staff-grid { align-items: start; }
@media (max-width: 900px) { .staff-grid { grid-template-columns: 1fr; } }

/* =========================================================================
   v20 — navbar "More" control, Manage Staff directory & profiles
   ========================================================================= */

/* ---------- Navbar: the More control ---------- */
.nav-more-btn {
  position: relative;
  gap: .55rem;
  padding: .42rem .8rem .42rem .62rem;
  background: linear-gradient(180deg, rgba(28, 44, 72, .85), rgba(17, 28, 49, .92));
  border-color: var(--line);
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: -.005em;
  isolation: isolate;
  overflow: hidden;
}
.nav-more-btn::before {
  content: '';
  position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(135deg, rgba(59, 130, 246, .28), rgba(59, 130, 246, 0) 62%);
  opacity: 0; transition: opacity .25s var(--ease);
}
.nav-more-btn:hover, .nav-more-btn:focus-visible {
  color: #fff;
  border-color: rgba(125, 171, 255, .42);
  box-shadow: 0 10px 26px -16px rgba(59, 130, 246, .9);
}
.nav-more-btn:hover::before, .user-chip.open .nav-more-btn::before { opacity: 1; }
.user-chip.open .nav-more-btn {
  color: #fff;
  border-color: rgba(125, 171, 255, .55);
  background: linear-gradient(180deg, rgba(35, 55, 92, .95), rgba(20, 33, 57, .95));
}

.nav-more-label { font-size: .9rem; font-weight: 600; }

/* Three dots that fan out into a neat column on hover / open. */
.nav-more-glyph {
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  width: 26px; height: 26px; border-radius: 8px; flex: 0 0 26px;
  background: rgba(59, 130, 246, .12);
  border: 1px solid rgba(59, 130, 246, .22);
  transition: background .25s var(--ease), border-color .25s var(--ease), transform .3s var(--ease);
}
.nav-more-glyph i {
  width: 3.5px; height: 3.5px; border-radius: 50%;
  background: #7dabff;
  transition: transform .3s var(--ease), height .3s var(--ease), background .25s var(--ease);
}
.nav-more-btn:hover .nav-more-glyph,
.user-chip.open .nav-more-glyph {
  background: rgba(59, 130, 246, .24);
  border-color: rgba(125, 171, 255, .5);
  transform: rotate(90deg);
}
.nav-more-btn:hover .nav-more-glyph i,
.user-chip.open .nav-more-glyph i { height: 9px; border-radius: 3px; background: #bfd7ff; }

.nav-more-btn .chev { width: 13px; height: 13px; opacity: .75; }
.nav-more-btn:hover .chev, .user-chip.open .nav-more-btn .chev { opacity: 1; color: #bfd7ff; }

.nav-misc-active > .nav-more-btn {
  color: #dbe8ff;
  border-color: rgba(125, 171, 255, .5);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .12);
}
.nav-misc-active > .nav-more-btn .nav-more-glyph i { background: #bfd7ff; }

@media (prefers-reduced-motion: reduce) {
  .nav-more-glyph, .nav-more-glyph i { transition: none; }
}
@media (max-width: 900px) {
  .nav-more-btn { justify-content: flex-start; border-radius: 12px; }
}

/* ---------- Shared bits ---------- */
.crumbs a { font-size: .86rem; color: var(--text-muted); font-weight: 500; }
.crumbs a:hover { color: #bfd7ff; }
.stat-pill {
  display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2;
  padding: .5rem .9rem; border-radius: 12px;
  background: var(--navy-800); border: 1px solid var(--line);
}
.stat-pill strong { font-family: 'Sora', sans-serif; font-size: 1.15rem; }
.stat-pill span { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); }
.page-head-stats { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

/* ---------- Manage Staff: search ---------- */
.staff-search {
  display: flex; align-items: center; gap: .6rem;
  background: var(--navy-800); border: 1px solid var(--line);
  border-radius: 999px; padding: .35rem .45rem .35rem .95rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.staff-search:focus-within { border-color: rgba(125, 171, 255, .45); box-shadow: 0 10px 30px -20px rgba(59,130,246,.9); }
.staff-search svg { width: 17px; height: 17px; flex: 0 0 17px; color: var(--text-dim); }
.staff-search input {
  flex: 1; min-width: 0; background: none; border: 0; outline: none;
  color: var(--text); font: inherit; font-size: .92rem; padding: .35rem 0;
}
.staff-search input::placeholder { color: var(--text-dim); }

/* ---------- Manage Staff: roster ---------- */
.staff-roster { display: flex; flex-direction: column; gap: .6rem; }
.staff-row {
  display: grid; align-items: center; gap: 1rem;
  grid-template-columns: 30px 44px minmax(150px, 1.5fr) minmax(120px, 1fr) minmax(120px, 1fr) auto auto;
  padding: .8rem 1.1rem .8rem .8rem;
  background: linear-gradient(90deg, color-mix(in srgb, var(--rank, var(--brand)) 9%, transparent), transparent 34%), var(--navy-800);
  border: 1px solid var(--line);
  border-left: 3px solid color-mix(in srgb, var(--rank, var(--brand)) 70%, transparent);
  border-radius: var(--radius);
  transition: transform .18s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
  animation: staff-in .35s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 24ms);
}
@keyframes staff-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.staff-row:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  border-left-color: var(--rank, var(--brand));
  box-shadow: var(--shadow);
}
.staff-row-locked { opacity: .72; }
.staff-row-locked:hover { transform: none; box-shadow: none; }
.staff-order {
  font-family: 'Sora', sans-serif; font-size: .95rem; font-weight: 600;
  color: var(--text-dim); text-align: center;
}
.staff-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid color-mix(in srgb, var(--rank, var(--brand)) 45%, transparent); }
.staff-identity { display: flex; flex-direction: column; min-width: 0; }
.staff-identity strong { font-size: .95rem; font-weight: 600; }
.staff-identity .dim { font-size: .8rem; }
.staff-you {
  font-style: normal; font-size: .66rem; text-transform: uppercase; letter-spacing: .08em;
  background: var(--brand-soft); color: #bfd7ff; border-radius: 999px; padding: .05rem .4rem; margin-left: .35rem;
}
.staff-rankcell { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; }
.staff-rankcell .dim { font-size: .74rem; }
.staff-counts { display: flex; flex-direction: column; gap: .1rem; font-size: .76rem; color: var(--text-dim); }
.staff-actions { display: flex; justify-content: flex-end; }
.staff-locked {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; color: var(--text-dim);
  border: 1px dashed var(--line-strong); border-radius: 999px; padding: .3rem .7rem; cursor: not-allowed;
}
.staff-locked svg { width: 14px; height: 14px; }

@media (max-width: 980px) {
  .staff-row { grid-template-columns: 28px 44px 1fr auto; grid-auto-rows: min-content; row-gap: .55rem; }
  .staff-rankcell { grid-column: 3 / -1; flex-direction: row; align-items: center; gap: .5rem; }
  .staff-row .live-status { grid-column: 3 / -1; }
  .staff-counts { grid-column: 3 / 4; flex-direction: row; gap: .75rem; }
  .staff-actions { grid-column: 4 / -1; }
}

/* ---------- Staff profile header ---------- */
.staff-profile-head {
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
  margin-top: 1rem; padding: 1.4rem 1.5rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background:
    radial-gradient(520px 200px at 0% 0%, color-mix(in srgb, var(--rank, var(--brand)) 20%, transparent), transparent 70%),
    var(--navy-800);
}
.staff-profile-avatar {
  width: 76px; height: 76px; border-radius: 50%; object-fit: cover;
  border: 3px solid color-mix(in srgb, var(--rank, var(--brand)) 55%, transparent);
}
.staff-profile-id { min-width: 0; flex: 1; }
.staff-profile-id h1 { font-size: 1.6rem; letter-spacing: -.02em; }
.staff-profile-meta { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; margin-top: .4rem; }
.staff-profile-meta .rank-pill { --rank: var(--rank); }
.staff-profile-stats { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.staff-profile-stats dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-dim); }
.staff-profile-stats dd { font-family: 'Sora', sans-serif; font-size: 1.15rem; font-weight: 600; }

/* ---------- Notice composer ---------- */
.notice-types { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.notice-type { position: relative; cursor: pointer; }
.notice-type input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.notice-type span {
  display: flex; flex-direction: column; gap: .1rem;
  padding: .65rem .8rem; border-radius: 11px;
  border: 1px solid var(--line); background: rgba(10, 17, 34, .45);
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
.notice-type span strong { font-size: .87rem; }
.notice-type span em { font-style: normal; font-size: .74rem; color: var(--text-dim); line-height: 1.35; }
.notice-type:hover span { border-color: var(--line-strong); transform: translateY(-1px); }
.notice-type input:checked + span {
  border-color: color-mix(in srgb, var(--tone, var(--brand)) 60%, transparent);
  background: color-mix(in srgb, var(--tone, var(--brand)) 13%, transparent);
}
.notice-type input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.notice-promotion    { --tone: var(--ok); }
.notice-demotion     { --tone: var(--bad); }
.notice-inactivity   { --tone: var(--warn); }
.notice-warning      { --tone: #f97316; }
.notice-commendation { --tone: var(--info); }
.notice-general      { --tone: var(--brand); }

/* ---------- Notices & notes ---------- */
.staff-notice-list, .staff-note-list { display: flex; flex-direction: column; gap: .75rem; }
.staff-notice-card {
  border: 1px solid var(--line); border-left: 3px solid var(--tone, var(--brand));
  border-radius: var(--radius); padding: .95rem 1.1rem;
  background: rgba(10, 17, 34, .45);
}
.staff-notice-card header { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .5rem; }
.staff-notice-card header strong { font-size: .95rem; }
.staff-notice-tag {
  font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--tone, var(--brand));
  background: color-mix(in srgb, var(--tone, var(--brand)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--tone, var(--brand)) 38%, transparent);
  border-radius: 999px; padding: .1rem .55rem;
}
.staff-notice-card p, .staff-note-card p { color: var(--text-muted); font-size: .9rem; }
.staff-notice-card footer, .staff-note-card footer {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  margin-top: .75rem; padding-top: .6rem; border-top: 1px solid var(--line); flex-wrap: wrap;
}
.staff-note-card {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius);
  padding: .95rem 1.1rem; background: rgba(10, 17, 34, .45);
}
.staff-note-pinned { border-color: rgba(251, 191, 36, .38); background: rgba(251, 191, 36, .06); }
.staff-note-pin {
  position: absolute; top: -9px; left: 14px;
  font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #0a1122; background: var(--warn); border-radius: 999px; padding: .05rem .5rem;
}

.staff-row .live-status { justify-self: start; }
.staff-notice-card p { margin: 0; }

/* ---------- v21 — hand-assigned ranks (admin -> user) ---------- */
.rank-assign-grid { display: grid; gap: .55rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.rank-assign {
  position: relative; display: flex; align-items: flex-start; gap: .7rem; cursor: pointer;
  padding: .75rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(10, 17, 34, .45);
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
.rank-assign::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; border-radius: 3px 0 0 3px;
  background: var(--rank, var(--brand)); opacity: .55;
}
.rank-assign:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.rank-assign input { margin-top: .2rem; accent-color: var(--rank, var(--brand)); flex: none; }
.rank-assign:has(input:checked) {
  border-color: color-mix(in srgb, var(--rank, var(--brand)) 55%, transparent);
  background: color-mix(in srgb, var(--rank, var(--brand)) 10%, rgba(10, 17, 34, .45));
}
.rank-assign:has(input:checked)::before { opacity: 1; }
.rank-assign-body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.rank-assign-top { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.rank-assign-top strong { font-size: .92rem; color: var(--rank, var(--text)); }
.rank-assign-body .dim { font-size: .78rem; }
.rank-assign-locked { cursor: not-allowed; opacity: .55; }
.rank-assign-locked:hover { transform: none; border-color: var(--line); }
.rank-assign-lock { width: 15px; height: 15px; margin-left: auto; flex: none; color: var(--text-dim); }
.rank-assign-current { display: flex; flex-wrap: wrap; gap: .4rem; }

/* ---------- Application & report forms: locked identity, gate, polish ---------- */
.form-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(59,130,246,.06), transparent 220px),
    var(--navy-850);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
}
.form-card::before {
  content: '';
  position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: .7;
}
.form-card .field { position: relative; }
.form-card .field-label, .form-card > .field > label { letter-spacing: -.005em; }
.form-card input:hover:not([disabled]),
.form-card select:hover,
.form-card textarea:hover { border-color: var(--line-strong); }
.form-card input:focus, .form-card select:focus, .form-card textarea:focus {
  box-shadow: 0 0 0 3px var(--brand-soft), 0 8px 24px -18px rgba(59,130,246,.9);
}
.form-card .check {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .85rem 1rem; background: rgba(255,255,255,.015);
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.form-card .check:hover { border-color: var(--line-strong); background: rgba(255,255,255,.03); }
.form-card .confirm-field .check { border-color: rgba(59,130,246,.28); background: var(--brand-soft); color: var(--text); }

.form-actions {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.form-actions .dim { margin: 0; }
.btn-lg { padding: .85rem 1.9rem; font-size: .98rem; border-radius: 11px; }

/* Locked, auto-filled Discord identity questions */
.locked-group {
  border: 1px solid rgba(88,101,242,.28);
  background: linear-gradient(180deg, rgba(88,101,242,.10), rgba(88,101,242,.03));
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem .35rem;
  margin-bottom: 1.9rem;
}
.locked-group-head {
  display: flex; align-items: center; gap: .8rem; margin-bottom: 1.15rem;
}
.locked-group-head strong { display: block; font-size: .92rem; }
.locked-group-head span { display: block; color: var(--text-dim); font-size: .82rem; line-height: 1.45; }
.locked-avatar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); flex: 0 0 40px; object-fit: cover; }
.locked-field { margin-bottom: 1.15rem !important; }
.locked-input { position: relative; display: block; }
.form-card .locked-input input[disabled] {
  background: rgba(10,17,34,.75);
  border-color: rgba(88,101,242,.28);
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  opacity: 1; cursor: not-allowed; padding-right: 6.2rem;
  font-variant-numeric: tabular-nums;
}
.locked-tag {
  position: absolute; right: .55rem; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .7rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: #a9b4ff; background: rgba(88,101,242,.16);
  border: 1px solid rgba(88,101,242,.3); border-radius: 999px; padding: .2rem .55rem;
  pointer-events: none;
}

/* Sign-in / link-Discord gate */
.gate-card {
  text-align: center;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(88,101,242,.09), transparent 60%), var(--navy-850);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(2rem, 5vw, 3.2rem) 1.5rem;
  box-shadow: var(--shadow);
}
.gate-icon {
  display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 1.1rem;
  border-radius: 18px; color: #a9b4ff;
  background: rgba(88,101,242,.14); border: 1px solid rgba(88,101,242,.3);
}
.gate-card h3 { font-size: 1.25rem; }
.gate-card p { max-width: 46ch; margin-inline: auto; }
.form-card .check { display: flex; align-items: flex-start; gap: .7rem; line-height: 1.55; }
.form-card .check input[type=checkbox], .form-card .check input[type=radio] {
  flex: 0 0 17px; width: 17px; height: 17px; margin: .18rem 0 0; accent-color: var(--brand);
}

/* ==================================================================
   v25 — Applications, forms & review queue refinement
   ================================================================== */

/* ---------- Public applications hero ---------- */
.hero-head { max-width: 720px; margin: 0 auto 2.6rem; text-align: center; }
.hero-head h1 { font-size: clamp(2rem, 5vw, 2.9rem); letter-spacing: -.03em; margin-top: .9rem; }
.hero-head > p { color: var(--text-muted); margin-top: .75rem; font-size: 1.02rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .32rem .8rem .32rem .6rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.02);
  font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-muted);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-dim); }
.eyebrow .dot.live { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.eyebrow .dot.off { background: var(--warn); }
.hero-meta {
  display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem .6rem; margin-top: 1.3rem;
}
.hero-meta span {
  font-size: .8rem; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem;
  background: rgba(255,255,255,.015);
}
.hero-meta strong { color: var(--text); font-weight: 600; }

/* ---------- Application cards ---------- */
.app-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.app-card {
  position: relative; display: flex; flex-direction: column; gap: 1.05rem;
  padding: 1.5rem 1.5rem 1.35rem;
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(180deg, rgba(59,130,246,.055), transparent 180px), var(--navy-850);
  box-shadow: var(--shadow);
  transition: transform .28s var(--ease), border-color .28s var(--ease), box-shadow .28s var(--ease);
  will-change: transform;
}
.app-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: .55; transition: opacity .28s var(--ease);
}
.app-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 26px 60px -30px rgba(0,0,0,.95); }
.app-card:hover::before { opacity: 1; }
.app-card.is-closed { opacity: .78; }
.app-card.is-closed::before { background: linear-gradient(90deg, transparent, var(--text-dim), transparent); opacity: .35; }
.app-card.is-closed:hover { transform: none; }
.app-card-title { display: flex; align-items: flex-start; justify-content: space-between; gap: .9rem; }
.app-card-title h2 { font-size: 1.18rem; letter-spacing: -.015em; }
.app-card-desc { color: var(--text-muted); font-size: .94rem; margin-top: .55rem; }
.app-card-facts { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; padding: 0; }
.app-card-facts li {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .8rem; color: var(--text-muted);
  border: 1px solid var(--line); border-radius: 999px; padding: .28rem .72rem;
  background: rgba(255,255,255,.015);
}
.app-card-facts svg { width: 14px; height: 14px; opacity: .8; }
.app-card-facts .fact-status { gap: .5rem; }
.app-card-facts code { font-size: .74rem; color: var(--text-dim); }
.app-req { border-top: 1px solid var(--line); padding-top: .9rem; }
.app-req summary {
  cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--text-muted);
  list-style: none; display: flex; align-items: center; gap: .4rem;
}
.app-req summary::-webkit-details-marker { display: none; }
.app-req summary::after { content: '+'; margin-left: auto; color: var(--text-dim); font-size: 1rem; line-height: 1; }
.app-req[open] summary::after { content: '–'; }
.app-req summary:hover { color: var(--text); }
.app-req p { color: var(--text-muted); font-size: .9rem; margin-top: .6rem; white-space: pre-line; }
.app-card-foot { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: auto; }
.btn-arrow { width: 16px; height: 16px; transition: transform .22s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---------- Form hero + requirements ---------- */
.form-hero { margin-bottom: 1.4rem; }
.back-link {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .84rem; font-weight: 500; color: var(--text-dim); margin-bottom: .9rem;
}
.back-link svg { width: 15px; height: 15px; }
.back-link:hover { color: var(--text); }
.form-hero-top { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.form-hero-top h1 { font-size: clamp(1.7rem, 4vw, 2.25rem); letter-spacing: -.025em; }
.form-hero > p { color: var(--text-muted); margin-top: .6rem; max-width: 62ch; }
.form-hero-meta { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.form-hero-meta span {
  font-size: .78rem; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: .26rem .7rem;
  background: rgba(255,255,255,.015);
}
.req-panel {
  border: 1px solid rgba(251,191,36,.24); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(251,191,36,.07), transparent 70%), var(--navy-850);
  padding: 1rem 1.15rem; margin-bottom: 1.5rem;
}
.req-panel summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: .92rem; color: #f5d58a;
}
.req-panel summary::-webkit-details-marker { display: none; }
.req-panel summary svg { width: 17px; height: 17px; }
.req-panel p { color: var(--text-muted); font-size: .92rem; margin-top: .7rem; white-space: pre-line; }

/* ---------- Numbered, card-style questions ---------- */
.form-card { counter-reset: q; }
.form-card .field > .field-label,
.form-card .field > label:not(.check) {
  display: flex; align-items: baseline; gap: .6rem;
}
.form-card .field > .field-label::before,
.form-card .field > label::before {
  counter-increment: q; content: counter(q);
  flex: 0 0 22px; height: 22px; border-radius: 7px;
  display: inline-grid; place-items: center;
  font-size: .72rem; font-weight: 700; font-family: 'Sora', sans-serif;
  color: #bfd7ff; background: var(--brand-soft);
  border: 1px solid rgba(59,130,246,.28);
  transform: translateY(1px);
}
.form-card .field .hint { padding-left: 2.05rem; }
.form-card .field > input,
.form-card .field > select,
.form-card .field > textarea,
.form-card .field > .stack,
.form-card .field > .locked-input { margin-left: 2.05rem; width: calc(100% - 2.05rem); }
.form-card .field:focus-within > .field-label::before,
.form-card .field:focus-within > label::before {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
@media (max-width: 560px) {
  .form-card .field .hint,
  .form-card .field > input,
  .form-card .field > select,
  .form-card .field > textarea,
  .form-card .field > .stack,
  .form-card .field > .locked-input { margin-left: 0; width: 100%; padding-left: 0; }
}
.form-card .grid-2 { gap: 0 1.25rem; }
.form-card .field > input,
.form-card .field > select,
.form-card .field > textarea {
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.form-card .draft-bar { border-top: 1px solid var(--line); }

/* ---------- Admin review queue ---------- */
.queue-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: .9rem 1rem; flex-wrap: wrap; margin-bottom: 1.6rem;
}
.queue-bar + .panel { margin-top: 0; }
.queue-bar .tabs { margin-bottom: 0; }
.queue-bar .tabs a { display: inline-flex; align-items: center; gap: .45rem; transition: background .18s var(--ease), color .18s var(--ease); }
.tab-count {
  font-size: .72rem; font-weight: 700; line-height: 1;
  padding: .16rem .38rem; border-radius: 999px;
  background: rgba(255,255,255,.06); color: var(--text-dim);
}
.tabs a.active .tab-count { background: rgba(59,130,246,.3); color: #dbe9ff; }
.queue-search {
  max-width: 320px; width: 100%; padding: .6rem .95rem; margin-left: auto;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--navy-850); color: var(--text); font-size: .88rem;
}
.queue-search:focus { outline: none; border-color: rgba(59,130,246,.45); box-shadow: 0 0 0 3px var(--brand-soft); }
.row-linked { transition: background .16s var(--ease); }
.row-linked:hover { background: rgba(255,255,255,.025); }

/* ---------- Website id pill ---------- */
.wid-pill {
  display: inline-flex; align-items: baseline; gap: .12rem;
  font-family: 'Sora', ui-monospace, monospace; font-size: .86rem; font-weight: 600;
  color: #cfe0ff; background: var(--brand-soft);
  border: 1px solid rgba(59,130,246,.28); border-radius: 8px; padding: .16rem .5rem;
  font-variant-numeric: tabular-nums;
}
.wid-pill span { color: var(--text-dim); font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .app-card, .app-card::before, .btn-arrow, .row-linked { transition: none !important; }
  .app-card:hover { transform: none; }
}


/* ---------- Evidence: links, uploads & galleries ---------- */
.evidence-links { list-style: none; margin: .35rem 0 0; padding: 0; display: grid; gap: .35rem; }
.evidence-links li { font-size: .9rem; word-break: break-word; }
.evidence-links li::before { content: '↗'; color: var(--text-dim); margin-right: .45rem; font-size: .8rem; }
.evidence-links a { color: #cfe0ff; text-decoration: none; border-bottom: 1px solid rgba(59,130,246,.3); }
.evidence-links a:hover { border-bottom-color: rgba(59,130,246,.8); }

.evidence-grid {
  margin-top: .75rem; display: grid; gap: .6rem;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}
.evidence-thumb {
  position: relative; display: block; overflow: hidden; border-radius: 12px;
  border: 1px solid var(--line); background: var(--navy-850);
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.evidence-thumb img { display: block; width: 100%; height: 104px; object-fit: cover; }
.evidence-thumb span {
  position: absolute; inset: auto 0 0 0; padding: .28rem .5rem;
  font-size: .7rem; letter-spacing: .02em; color: #dbe9ff;
  background: linear-gradient(to top, rgba(6,11,24,.9), rgba(6,11,24,0));
}
.evidence-thumb:hover { transform: translateY(-2px); border-color: rgba(59,130,246,.45); box-shadow: 0 12px 26px -18px rgba(0,0,0,.9); }

.evidence-field textarea { margin-bottom: .7rem; }
.dropzone { position: relative; }
.dropzone input[type="file"] {
  position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.dropzone-inner {
  display: flex; align-items: center; gap: .85rem; cursor: pointer;
  padding: .95rem 1.05rem; border-radius: 14px;
  border: 1px dashed rgba(148,163,184,.35); background: rgba(148,163,184,.045);
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
.dropzone-inner:hover, .dropzone.is-over .dropzone-inner {
  border-color: rgba(59,130,246,.6); background: var(--brand-soft);
}
.dropzone.is-over .dropzone-inner { transform: scale(1.005); }
.dropzone input[type="file"]:focus-visible + .dropzone-inner {
  outline: none; border-color: rgba(59,130,246,.7); box-shadow: 0 0 0 3px var(--brand-soft);
}
.dropzone-icon {
  display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px;
  border-radius: 11px; background: var(--brand-soft); color: #cfe0ff;
}
.dropzone-icon svg { width: 19px; height: 19px; }
.dropzone-copy { display: grid; gap: .15rem; }
.dropzone-copy strong { font-size: .92rem; }
.dropzone-copy em { font-style: normal; font-size: .78rem; color: var(--text-dim); }
.dropzone-list { list-style: none; margin: .65rem 0 0; padding: 0; display: grid; gap: .45rem; }
.dropzone-list li {
  display: flex; align-items: center; gap: .6rem; padding: .4rem .55rem;
  border-radius: 10px; border: 1px solid var(--line); background: var(--navy-850);
  animation: dz-in .22s var(--ease) both;
}
@keyframes dz-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.dropzone-thumb {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 8px; overflow: hidden;
  background: rgba(148,163,184,.12); display: block;
}
.dropzone-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dropzone-meta { display: grid; min-width: 0; }
.dropzone-meta strong { font-size: .84rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone-meta em { font-style: normal; font-size: .74rem; color: var(--text-dim); }
.dropzone-warn { font-size: .78rem; color: #fbbf24; border-color: rgba(251,191,36,.3) !important; }

/* ---------- Appeals ---------- */
.form-hero-note {
  margin-top: .6rem; font-size: .88rem; color: var(--text-dim);
  padding: .6rem .8rem; border-radius: 11px;
  border: 1px solid rgba(59,130,246,.22); background: var(--brand-soft);
}
.form-hero-note a { color: #dbe9ff; font-weight: 500; }
.type-hints .hint { margin-top: .45rem; }
.decision-card h3 { font-size: 1.02rem; }
.decision-options { display: grid; gap: .5rem; }
.decision-option {
  display: flex; align-items: flex-start; gap: .65rem; cursor: pointer;
  padding: .65rem .8rem; border-radius: 12px;
  border: 1px solid var(--line); background: var(--navy-850);
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
.decision-option:hover { transform: translateY(-1px); border-color: rgba(148,163,184,.4); }
.decision-option input { margin-top: .2rem; accent-color: #3b82f6; }
.decision-option span { display: grid; gap: .1rem; }
.decision-option strong { font-size: .9rem; }
.decision-option em { font-style: normal; font-size: .78rem; color: var(--text-dim); }
.decision-option:has(input:checked) { border-color: rgba(59,130,246,.55); background: var(--brand-soft); }
.decision-option.decision-st-approved:has(input:checked) { border-color: rgba(52,211,153,.5); background: rgba(52,211,153,.1); }
.decision-option.decision-st-rejected:has(input:checked) { border-color: rgba(248,113,113,.5); background: rgba(248,113,113,.1); }
.decision-option.decision-st-deferred:has(input:checked) { border-color: rgba(251,191,36,.5); background: rgba(251,191,36,.1); }
.decision-note {
  padding: .8rem .95rem; border-radius: 12px;
  border: 1px solid rgba(59,130,246,.25); background: var(--brand-soft);
}
.decision-note strong { display: block; font-size: .86rem; margin-bottom: .3rem; }
.decision-note p { font-size: .92rem; }

@media (max-width: 720px) {
  .queue-search { margin-left: 0; max-width: none; }
  .evidence-thumb img { height: 92px; }
}

/* =====================================================================
   Review sidebar — flag history
   ===================================================================== */
.review-side { display: grid; gap: 1rem; align-content: start; }

.flag-history { position: relative; overflow: hidden; }
.flag-history::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, #34d399, rgba(52,211,153,0));
}
.flag-history.is-flagged::before { background: linear-gradient(90deg, #f87171, rgba(248,113,113,0)); }
.fh-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.fh-head h3 { font-size: 1.02rem; }
.fh-head p { font-size: .82rem; margin-top: .15rem; }
.fh-verdict {
  display: inline-flex; align-items: center; gap: .35rem; flex: none;
  padding: .34rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 600;
  border: 1px solid rgba(148,163,184,.3); background: var(--navy-850);
}
.fh-verdict svg { width: 14px; height: 14px; }
.fh-verdict.ok { color: #6ee7b7; border-color: rgba(52,211,153,.45); background: rgba(52,211,153,.12); }
.fh-verdict.sev-low { color: #93c5fd; border-color: rgba(147,197,253,.45); background: rgba(147,197,253,.12); }
.fh-verdict.sev-medium { color: #fcd34d; border-color: rgba(251,191,36,.45); background: rgba(251,191,36,.12); }
.fh-verdict.sev-high { color: #fdba74; border-color: rgba(251,146,60,.45); background: rgba(251,146,60,.14); }
.fh-verdict.sev-critical { color: #fca5a5; border-color: rgba(248,113,113,.5); background: rgba(248,113,113,.15); }

.fh-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: .9rem;
}
.fh-stats > div {
  padding: .55rem .6rem; border-radius: 12px; border: 1px solid var(--line);
  background: var(--navy-850); text-align: center;
}
.fh-stats strong { display: block; font-size: 1.02rem; }
.fh-stats em { font-style: normal; font-size: .72rem; color: var(--text-dim); }

.fh-clean {
  margin-top: .9rem; padding: .7rem .85rem; border-radius: 12px; font-size: .88rem;
  border: 1px solid rgba(52,211,153,.28); background: rgba(52,211,153,.09);
}
.fh-list { list-style: none; display: grid; gap: .55rem; margin-top: .9rem; padding: 0; }
.fh-item {
  padding: .65rem .75rem; border-radius: 12px; border: 1px solid var(--line);
  background: var(--navy-850); border-left-width: 3px;
}
.fh-item.sev-low { border-left-color: #60a5fa; }
.fh-item.sev-medium { border-left-color: #fbbf24; }
.fh-item.sev-high { border-left-color: #fb923c; }
.fh-item.sev-critical { border-left-color: #f87171; }
.fh-item.is-resolved { opacity: .72; border-left-color: rgba(148,163,184,.5); }
.fh-item-top { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.fh-type {
  font-size: .82rem; font-weight: 600; color: var(--flag, #94a3b8);
  display: inline-flex; align-items: center; gap: .35rem;
}
.fh-type::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--flag, #94a3b8); }
.fh-date { font-size: .74rem; margin-left: auto; }
.fh-reason { font-size: .86rem; margin-top: .35rem; white-space: pre-wrap; }
.fh-item-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .45rem; font-size: .76rem; }
.fh-item-foot a { color: #93c5fd; }
.fh-resolved { margin-top: .8rem; }
.fh-resolved summary { cursor: pointer; font-size: .82rem; color: var(--text-dim); }
.fh-resolved summary:hover { color: var(--text); }
.fh-foot { display: flex; gap: .45rem; margin-top: .95rem; flex-wrap: wrap; }

/* Extra decision colours for reports and applications */
.decision-option.decision-st-open:has(input:checked) { border-color: rgba(96,165,250,.55); background: rgba(96,165,250,.12); }
.decision-option.decision-st-processed:has(input:checked) { border-color: rgba(52,211,153,.5); background: rgba(52,211,153,.1); }
.decision-option.decision-st-pending:has(input:checked) { border-color: rgba(148,163,184,.5); background: rgba(148,163,184,.12); }
.decision-option.decision-st-no-further-action:has(input:checked) { border-color: rgba(148,163,184,.5); background: rgba(148,163,184,.12); }
.decision-option:active { transform: translateY(0) scale(.995); }

/* =====================================================================
   News feed
   ===================================================================== */
.news-hero { padding: 3.2rem 0 1.4rem; text-align: center; }
.news-hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.news-hero .lead { max-width: 620px; margin: .7rem auto 0; }
.news-wrap { padding-bottom: 4rem; display: grid; gap: 1.15rem; }

.news-feature {
  border-radius: 20px; border: 1px solid var(--line); overflow: hidden;
  background: linear-gradient(180deg, var(--navy-800), var(--navy-850));
  box-shadow: 0 22px 48px -32px rgba(2, 6, 23, .9);
}
.news-feature-media { max-height: 320px; overflow: hidden; }
.news-feature-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.news-feature:hover .news-feature-media img { transform: scale(1.03); }
.news-feature-body { padding: 1.4rem 1.5rem 1.5rem; }
.news-feature-body h2 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); margin-top: .5rem; }
.news-summary { color: var(--text-dim); margin-top: .5rem; max-width: 70ch; }

.news-tags { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .78rem; }
.news-pin, .news-cat {
  padding: .18rem .5rem; border-radius: 999px; font-weight: 600; font-size: .72rem;
  border: 1px solid rgba(148,163,184,.3); background: var(--navy-850);
}
.news-pin { color: #fcd34d; border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.12); }
.news-cat { color: #93c5fd; border-color: rgba(96,165,250,.4); background: rgba(96,165,250,.12); }

.news-author { display: flex; align-items: center; gap: .55rem; margin-top: .9rem; }
.news-author img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.news-author span { display: grid; line-height: 1.2; text-align: left; }
.news-author strong { font-size: .88rem; }
.news-author em { font-style: normal; font-size: .74rem; color: var(--text-dim); }

.news-actions { display: flex; gap: .5rem; margin-top: 1.1rem; flex-wrap: wrap; }
.news-actions svg { width: 15px; height: 15px; margin-left: .35rem; transition: transform .25s var(--ease); }
.news-feature.open .news-actions svg { transform: rotate(180deg); }

.news-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); align-items: start; }
.news-card {
  border-radius: 18px; border: 1px solid var(--line); background: var(--navy-800);
  overflow: hidden; transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .25s var(--ease);
}
.news-card:hover { transform: translateY(-2px); border-color: rgba(148,163,184,.35); box-shadow: 0 20px 40px -30px rgba(2,6,23,.95); }
.news-card.open { border-color: rgba(96,165,250,.45); }
.news-card-head {
  width: 100%; display: grid; grid-template-columns: 96px 1fr 18px; gap: .85rem; align-items: start;
  background: none; border: 0; color: inherit; cursor: pointer; text-align: left; padding: .9rem;
  font: inherit;
}
.news-thumb { display: block; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: var(--navy-850); border: 1px solid var(--line); }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-thumb-empty { display: grid; place-items: center; color: rgba(148,163,184,.5); }
.news-thumb-empty svg { width: 30px; height: 30px; }
.news-card-main { display: grid; gap: .3rem; min-width: 0; }
.news-card-title { font-family: var(--font-display, inherit); font-weight: 600; font-size: 1.02rem; }
.news-card-sum { font-size: .85rem; color: var(--text-dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-chev { width: 18px; height: 18px; color: var(--text-dim); margin-top: .35rem; transition: transform .3s var(--ease); }
.news-card.open .news-chev { transform: rotate(180deg); color: #93c5fd; }

.news-article-body {
  max-height: 0; overflow: hidden; padding: 0 1.1rem;
  transition: max-height .32s var(--ease), opacity .3s var(--ease), padding .3s var(--ease);
  opacity: 0;
}
.news-card.open .news-article-body,
.news-feature.open .news-article-body { opacity: 1; padding: .2rem 1.1rem 1.2rem; }
.news-feature .news-article-body { padding-left: 0; padding-right: 0; }
.news-feature.open .news-article-body { padding: .6rem 0 .2rem; }
.news-permalink { margin-top: 1rem; font-size: .84rem; }
.news-permalink a { color: #93c5fd; }

/* Rich article typography (also used inside the editor) */
.news-rich { line-height: 1.72; font-size: .96rem; }
.news-rich > * + * { margin-top: .85rem; }
.news-rich h2 { font-size: 1.35rem; }
.news-rich h3 { font-size: 1.12rem; }
.news-rich h4 { font-size: 1rem; }
.news-rich a { color: #93c5fd; text-decoration: underline; text-underline-offset: 2px; }
.news-rich ul, .news-rich ol { padding-left: 1.25rem; display: grid; gap: .3rem; }
.news-rich blockquote {
  border-left: 3px solid rgba(96,165,250,.5); padding: .3rem 0 .3rem .9rem;
  color: var(--text-dim); font-style: italic;
}
.news-rich hr { border: 0; border-top: 1px solid var(--line); margin: 1.3rem 0; }
.news-rich img { max-width: 100%; height: auto; border-radius: 14px; display: block; border: 1px solid var(--line); }
.news-rich figure { margin: 1.1rem 0; }
.news-rich figure.news-img img { width: 100%; }
.news-rich figcaption { font-size: .78rem; color: var(--text-dim); margin-top: .4rem; text-align: center; }
.news-rich code { background: var(--navy-850); padding: .1rem .35rem; border-radius: 6px; font-size: .88em; }
.news-rich pre { background: var(--navy-850); padding: .8rem; border-radius: 12px; overflow: auto; }
.news-xs { font-size: .74em; } .news-sm { font-size: .86em; } .news-md { font-size: 1em; }
.news-lg { font-size: 1.22em; } .news-xl { font-size: 1.45em; } .news-2xl { font-size: 1.8em; line-height: 1.25; }
.news-left { text-align: left; } .news-center { text-align: center; } .news-right { text-align: right; }
.news-callout { padding: .85rem 1rem; border-radius: 12px; border: 1px solid rgba(96,165,250,.3); background: rgba(96,165,250,.09); }

/* News desk (admin) */
.news-row { display: flex; align-items: center; gap: .65rem; }
.news-row-thumb { width: 54px; height: 40px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); background: var(--navy-850); flex: none; }
.tab-static { padding: .35rem .7rem; font-size: .82rem; color: var(--text-dim); }
.news-editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
.news-editor-side { display: grid; gap: 1rem; align-content: start; }
.news-thumb-preview {
  border-radius: 12px; border: 1px dashed var(--line); background: var(--navy-850);
  min-height: 130px; display: grid; place-items: center; overflow: hidden;
}
.news-thumb-preview img { width: 100%; height: 100%; max-height: 180px; object-fit: cover; }

/* Rich-text editor */
.rte { border: 1px solid var(--line); border-radius: 14px; background: var(--navy-850); overflow: hidden; }
.rte-toolbar {
  display: flex; flex-wrap: wrap; gap: .35rem; padding: .5rem;
  border-bottom: 1px solid var(--line); background: var(--navy-800);
  position: sticky; top: 0; z-index: 2;
}
.rte-group { display: flex; gap: .2rem; padding-right: .35rem; border-right: 1px solid var(--line); }
.rte-group:last-child { border-right: 0; }
.rte-toolbar button {
  min-width: 32px; height: 30px; padding: 0 .45rem; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent; background: transparent; color: var(--text-dim);
  font-size: .84rem; line-height: 1; transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease), transform .16s var(--ease);
}
.rte-toolbar button:hover { background: var(--navy-850); color: var(--text); border-color: var(--line); transform: translateY(-1px); }
.rte-toolbar button:active { transform: translateY(0); }
.rte-body {
  min-height: 340px; padding: 1.1rem 1.2rem; outline: none;
  background: var(--navy-850); color: var(--text);
}
.rte-body:focus { box-shadow: inset 0 0 0 2px rgba(96,165,250,.25); }
.rte-status {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  padding: .45rem .8rem; border-top: 1px solid var(--line); background: var(--navy-800);
  font-size: .76rem; color: var(--text-dim);
}
.rte-error { color: #fca5a5; }

@media (max-width: 980px) {
  .news-editor-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .news-card-head { grid-template-columns: 72px 1fr 16px; }
  .news-thumb { width: 72px; height: 72px; }
  .fh-stats { grid-template-columns: 1fr 1fr; }
}

/* ---------- v25.3: admin user management (categorised workspace) ---------- */
.um-page { display: grid; gap: 1rem; }

.um-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(620px 220px at 0% 0%, rgba(59, 130, 246, .12), transparent 70%),
    linear-gradient(180deg, var(--navy-800), var(--navy-850));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.um-hero::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: linear-gradient(180deg, var(--brand), rgba(59, 130, 246, 0));
}
.um-hero-danger::before { background: linear-gradient(180deg, var(--bad), rgba(248, 113, 113, 0)); }
.um-hero-main { display: flex; align-items: center; gap: 1.1rem; min-width: 0; }
.um-hero-avatar { flex: none; }
.um-hero-id { min-width: 0; }
.um-hero-id h1 { font-size: 1.55rem; letter-spacing: -.02em; margin-top: .1rem; }
.um-hero-tags { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: .55rem; }
.um-handle { font-size: .82rem; color: var(--text-muted); }

.um-hero-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1.4rem; }
.um-hero-facts dt { font-size: .66rem; text-transform: uppercase; letter-spacing: .11em; color: var(--text-dim); }
.um-hero-facts dd { font-size: .87rem; color: var(--text); font-weight: 500; }
.um-hero-facts code { font-size: .78rem; }
.um-hero-actions { display: flex; flex-direction: column; gap: .45rem; }

.um-flagstrip {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .9rem; border-radius: var(--radius-sm);
  border: 1px solid rgba(251, 191, 36, .32); background: rgba(251, 191, 36, .08);
  color: #fcd34d; font-size: .85rem; font-weight: 500;
}
.um-flagstrip svg { width: 18px; height: 18px; flex: none; }

.um-tabs {
  display: flex; gap: .25rem; flex-wrap: wrap;
  padding: .3rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--navy-850);
  position: sticky; top: .6rem; z-index: 5;
  backdrop-filter: blur(8px);
}
.um-tab {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .5rem 1rem; border: 0; border-radius: 999px;
  background: transparent; color: var(--text-muted); cursor: pointer;
  font: inherit; font-size: .85rem; font-weight: 600;
  transition: color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
.um-tab svg { width: 16px; height: 16px; opacity: .8; }
.um-tab:hover { color: var(--text); background: rgba(148, 178, 226, .07); }
.um-tab.is-active {
  color: #fff; background: linear-gradient(180deg, var(--brand), var(--brand-strong));
  box-shadow: 0 8px 20px -12px rgba(59, 130, 246, .9);
}
.um-tab.is-active svg { opacity: 1; }

.um-pane { display: none; }
.um-pane.is-active { display: grid; gap: 1rem; animation: um-fade .28s var(--ease) both; }
@keyframes um-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.um-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.um-cols > .panel { margin: 0; }

.um-checks { list-style: none; display: grid; gap: .4rem; }
.um-checks li {
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem .75rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--navy-850);
  font-size: .86rem; color: var(--text-muted);
}
.um-checks li::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--text-dim); box-shadow: 0 0 0 3px rgba(103, 120, 154, .16);
}
.um-checks .is-ok::before   { background: var(--ok);   box-shadow: 0 0 0 3px rgba(52, 211, 153, .16); }
.um-checks .is-warn::before { background: var(--warn); box-shadow: 0 0 0 3px rgba(251, 191, 36, .16); }
.um-checks .is-bad::before  { background: var(--bad);  box-shadow: 0 0 0 3px rgba(248, 113, 113, .16); }
.um-checks .is-ok, .um-checks .is-warn, .um-checks .is-bad { color: var(--text); }

.um-permbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.um-search {
  display: inline-flex; align-items: center; gap: .5rem; flex: 1 1 240px; max-width: 340px;
  padding: .45rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--navy-850);
  transition: border-color .18s var(--ease);
}
.um-search:focus-within { border-color: var(--brand); }
.um-search svg { width: 16px; height: 16px; color: var(--text-dim); flex: none; }
.um-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: .85rem; outline: none; padding: 0; }

.um-timeline { list-style: none; display: grid; gap: .1rem; padding-left: 1.1rem; border-left: 1px solid var(--line); }
.um-timeline li { position: relative; padding: .55rem 0 .7rem; }
.um-timeline li::before {
  content: ""; position: absolute; left: -1.42rem; top: .95rem;
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .16);
}
.um-timeline li + li { border-top: 1px solid var(--line); }
.um-timeline-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.um-timeline-head code { font-size: .8rem; }
.um-timeline p { font-size: .84rem; margin-top: .15rem; word-break: break-word; }

@media (max-width: 1000px) {
  .um-hero { grid-template-columns: 1fr; align-items: start; }
  .um-hero-actions { flex-direction: row; flex-wrap: wrap; }
  .um-cols { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .um-tabs { border-radius: var(--radius); position: static; }
  .um-tab { flex: 1 1 auto; justify-content: center; }
  .um-hero-facts { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   v13 — Suspension notice (banned.php)
   ============================================================ */
.suspend-body { min-height: 100vh; }
.suspend-topbar { border-bottom: 1px solid var(--line); background: rgba(10, 17, 34, .72); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 20; }
.suspend-topbar-inner { width: min(1040px, 92%); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 0; }
.suspend-brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); font-family: 'Sora', sans-serif; font-weight: 600; letter-spacing: -.01em; }
.suspend-brand img { width: 30px; height: 30px; object-fit: contain; }
.suspend-topbar-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.suspend-page { padding: clamp(1.5rem, 5vw, 3rem) 1rem clamp(2rem, 6vw, 4rem); }
.suspend-wrap { width: min(1040px, 100%); margin-inline: auto; display: grid; gap: 1.15rem; }

/* Hero */
.suspend-hero {
  position: relative; overflow: hidden;
  display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .95fr);
  align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(165deg, var(--navy-800), var(--navy-850));
  box-shadow: var(--shadow); padding: clamp(1.4rem, 4vw, 2.3rem);
}
.suspend-hero::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: linear-gradient(180deg, var(--bad), rgba(248, 113, 113, 0));
}
.suspend-hero::after {
  content: ''; position: absolute; width: 340px; height: 340px; right: -120px; top: -160px;
  background: radial-gradient(circle, rgba(248, 113, 113, .16), transparent 68%); pointer-events: none;
}
.suspend-hero-main { position: relative; z-index: 1; }
.suspend-hero-main h1 { font-size: clamp(1.55rem, 3.6vw, 2.15rem); letter-spacing: -.02em; margin: .75rem 0 .6rem; }
.suspend-hero-main > p { color: var(--text-muted); font-size: .96rem; max-width: 54ch; }
.suspend-hero-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.suspend-chip {
  display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .8rem; border-radius: 999px;
  font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(248, 113, 113, .12); border: 1px solid rgba(248, 113, 113, .38); color: #fca5a5;
}
.suspend-dot { width: 7px; height: 7px; border-radius: 50%; background: #f87171; box-shadow: 0 0 0 0 rgba(248,113,113,.55); animation: suspend-pulse 2.2s infinite; }
@keyframes suspend-pulse { 70% { box-shadow: 0 0 0 8px rgba(248,113,113,0); } 100% { box-shadow: 0 0 0 0 rgba(248,113,113,0); } }

.suspend-hero-card { position: relative; z-index: 1; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(10, 17, 34, .6); padding: 1.1rem 1.2rem; }
.suspend-identity { display: flex; align-items: center; gap: .8rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.suspend-identity strong { display: block; font-size: .98rem; }
.suspend-identity .dim { font-size: .78rem; color: var(--text-dim); }
.suspend-avatar { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line-strong); }
.suspend-facts { display: grid; gap: .1rem; margin-top: .3rem; }
.suspend-facts > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.suspend-facts > div:last-child { border-bottom: 0; }
.suspend-facts dt { color: var(--text-dim); font-size: .8rem; }
.suspend-facts dd { font-size: .86rem; font-weight: 500; text-align: right; word-break: break-word; }

/* Panels */
.suspend-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--navy-850); overflow: hidden; }
.suspend-panel > header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); background: rgba(17, 28, 49, .6); }
.suspend-panel > header h2 { font-size: 1rem; letter-spacing: -.01em; }
.suspend-panel > header p { color: var(--text-dim); font-size: .82rem; }
.suspend-panel-body { padding: 1.15rem 1.25rem; }
.suspend-grid { display: grid; gap: 1.15rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }

.suspend-quote {
  border-left: 3px solid var(--bad); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--navy-900); padding: .9rem 1.05rem; color: var(--text); font-size: .95rem; white-space: pre-wrap;
}

.suspend-list { list-style: none; display: grid; gap: .55rem; }
.suspend-list li { position: relative; padding-left: 1.6rem; color: var(--text-muted); font-size: .9rem; }
.suspend-list li::before { position: absolute; left: 0; top: 0; font-weight: 700; font-size: .85rem; }
.suspend-list li.no::before { content: '✕'; color: #f87171; }
.suspend-list li.yes::before { content: '✓'; color: #34d399; }
.suspend-list.compact { margin: .75rem 0; gap: .4rem; }

.suspend-steps { list-style: none; counter-reset: step; display: grid; gap: .75rem; }
.suspend-steps li { counter-increment: step; position: relative; padding-left: 2.3rem; }
.suspend-steps li::before {
  content: counter(step); position: absolute; left: 0; top: .05rem;
  width: 1.55rem; height: 1.55rem; border-radius: 50%; display: grid; place-items: center;
  font-size: .78rem; font-weight: 700; color: #a5c8ff;
  background: var(--brand-soft); border: 1px solid rgba(59, 130, 246, .34);
}
.suspend-steps strong { display: block; font-size: .92rem; }
.suspend-steps span { display: block; color: var(--text-muted); font-size: .86rem; }

/* Your data */
.suspend-data-grid { display: grid; gap: 1.05rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.suspend-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--navy-900); padding: 1.15rem 1.2rem; }
.suspend-card.danger { border-color: rgba(248, 113, 113, .3); }
.suspend-card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: .6rem; }
.suspend-card-head h3 { font-size: .98rem; letter-spacing: -.01em; }
.suspend-card .field { margin-bottom: .8rem; }
.suspend-card textarea { min-height: 84px; }

.suspend-footer { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--text-dim); font-size: .8rem; padding-top: .5rem; }

.pill-bad, .pill-danger { background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .38); color: #fca5a5; }
.pill-info { background: rgba(96, 165, 250, .12); border-color: rgba(96, 165, 250, .35); color: #a5c8ff; }

@media (max-width: 860px) {
  .suspend-hero { grid-template-columns: 1fr; }
}


/* ==========================================================================
   v25.5 — Discord connection panel, secret reveal
   ========================================================================== */

/* ---------- Admin Discord connection ---------- */
.dc-panel { display: grid; gap: 1rem; }
.dc-card {
  position: relative; overflow: hidden;
  border-radius: 15px; padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  background:
    radial-gradient(520px 200px at 0% 0%, rgba(88,101,242,.13), transparent 65%),
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0) 55%),
    var(--navy-850);
}
.dc-card.is-empty { background: var(--navy-850); }
.dc-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.dc-brand { display: inline-flex; align-items: center; gap: .6rem; }
.dc-brand svg { width: 22px; height: 22px; color: #7c88f5; }
.dc-brand strong {
  font-family: 'Sora', 'Segoe UI', sans-serif; font-size: .95rem; letter-spacing: -.01em;
}
.dc-state {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .76rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: .3rem .65rem; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--state, var(--text-dim)) 34%, transparent);
  background: color-mix(in srgb, var(--state, var(--text-dim)) 13%, transparent);
  color: var(--state, var(--text-dim));
}
.dc-state i {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 0 0 currentColor; animation: dc-pulse 2.4s var(--ease) infinite;
}
@keyframes dc-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 7px transparent; }
}
.dc-identity { display: flex; align-items: center; gap: .95rem; flex-wrap: wrap; }
.dc-avatar-ring {
  position: relative; flex: none; padding: 2px; border-radius: 50%;
  background: conic-gradient(from 180deg, #5865f2, #8b5cf6, #38bdf8, #5865f2);
}
.dc-avatar-ring img {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--navy-850);
}
.dc-avatar-ring::after {
  content: ""; position: absolute; right: 1px; bottom: 1px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--ok); border: 2px solid var(--navy-850);
}
.dc-identity-main { min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.dc-handle { font-family: 'Sora', 'Segoe UI', sans-serif; font-size: 1.02rem; }
.dc-sub { color: var(--text-dim); font-size: .82rem; }
.dc-meta {
  margin-top: 1.05rem; padding-top: .95rem; border-top: 1px dashed var(--line);
  display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.dc-meta div { display: flex; flex-direction: column; gap: .18rem; min-width: 0; }
.dc-meta dt {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-dim);
}
.dc-meta dd { font-size: .88rem; color: var(--text); margin: 0; overflow-wrap: anywhere; }
.dc-meta dd code { font-size: .82rem; }
.dc-empty {
  display: flex; align-items: center; gap: .85rem;
  color: var(--text-muted); font-size: .9rem;
}
.dc-empty svg { width: 34px; height: 34px; flex: none; color: var(--text-dim); opacity: .8; }
.dc-forms { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.dc-form {
  border-radius: 15px; padding: 1.15rem 1.25rem;
  border: 1px solid var(--line); background: var(--navy-850);
  display: flex; flex-direction: column; gap: .8rem;
}
.dc-form.is-danger { border-color: rgba(248,113,113,.26); background: rgba(248,113,113,.045); }
.dc-form h3 { font-size: .95rem; }
.dc-form .hint { margin: 0; }
.dc-form-head { display: flex; align-items: center; gap: .55rem; }
.dc-form-head svg { width: 17px; height: 17px; color: var(--text-dim); }
.dc-form.is-danger .dc-form-head svg { color: var(--bad); }
.dc-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: auto; }
.dc-blocked {
  display: flex; gap: .6rem; align-items: flex-start;
  color: var(--text-muted); font-size: .87rem;
}
.dc-blocked svg { width: 16px; height: 16px; flex: none; margin-top: .22rem; color: var(--warn); }

/* ---------- Click-to-reveal secret ---------- */
.reveal-field { display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap; max-width: 100%; }
.reveal-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86rem;
  padding: .18rem .5rem; border-radius: 7px;
  background: rgba(148,178,226,.07); border: 1px solid var(--line);
  color: var(--text); overflow-wrap: anywhere;
  transition: filter .22s var(--ease), color .22s var(--ease);
}
.reveal-field[data-revealed="false"] .reveal-value {
  filter: blur(5px); user-select: none; color: var(--text-dim);
}
.reveal-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  font: inherit; font-size: .78rem; cursor: pointer;
  padding: .22rem .55rem; border-radius: 7px;
  background: transparent; border: 1px solid var(--line); color: var(--text-muted);
  transition: color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.reveal-btn svg { width: 14px; height: 14px; }
.reveal-btn:hover { color: var(--text); border-color: var(--line-strong); background: rgba(148,178,226,.07); }
.reveal-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.reveal-field[data-revealed="true"] .reveal-eye-off,
.reveal-field[data-revealed="false"] .reveal-eye-on { display: none; }

/* =========================================================================
   v27 — account dropdown & partners directory
   ========================================================================= */

/* ---------- Account chip ---------- */
.account-chip .account-btn {
  padding: .28rem .7rem .28rem .3rem;
  background: linear-gradient(150deg, var(--navy-800), var(--navy-850));
  transition: border-color .22s var(--ease), background .22s var(--ease),
              box-shadow .22s var(--ease), transform .22s var(--ease);
}
.account-chip .account-btn:hover { box-shadow: 0 10px 26px -18px rgba(0,0,0,.9); transform: translateY(-1px); }
.account-chip.open .account-btn {
  border-color: rgba(59,130,246,.45);
  background: linear-gradient(150deg, var(--navy-750), var(--navy-800));
  box-shadow: 0 0 0 3px rgba(59,130,246,.13);
}
.account-avatar-wrap {
  position: relative; display: grid; place-items: center;
  padding: 2px; border-radius: 50%;
  background: conic-gradient(from 140deg, var(--rank, var(--brand)), rgba(148,178,226,.18) 65%, var(--rank, var(--brand)));
}
.account-avatar-wrap .user-avatar { width: 30px; height: 30px; border: 2px solid var(--navy-850); }

/* ---------- Account dropdown ---------- */
.user-menu.account-menu {
  display: flex; visibility: hidden; opacity: 0; pointer-events: none;
  transform: translateY(-8px) scale(.985);
  min-width: 340px; padding: .5rem; gap: .1rem;
  top: calc(100% + 12px);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(59,130,246,.13), transparent 62%),
    linear-gradient(170deg, var(--navy-800), var(--navy-850) 70%);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  box-shadow: 0 30px 70px -32px rgba(0,0,0,.95), 0 0 0 1px rgba(148,178,226,.05) inset;
  backdrop-filter: blur(14px) saturate(120%);
  transition: opacity .2s var(--ease), transform .24s var(--ease), visibility .24s linear;
  z-index: 60;
}
.user-chip.open .user-menu.account-menu {
  visibility: visible; opacity: 1; pointer-events: auto;
  transform: none; animation: none;
}

.account-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: .75rem;
  padding: .7rem .7rem .75rem; margin-bottom: .3rem;
  border-bottom: 1px solid var(--line);
}
.account-card-avatar {
  display: grid; place-items: center; padding: 2px; border-radius: 50%;
  background: conic-gradient(from 140deg, var(--rank, var(--brand)), rgba(148,178,226,.16) 65%, var(--rank, var(--brand)));
}
.account-card-avatar img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--navy-850); }
.account-card-ident { display: flex; flex-direction: column; min-width: 0; }
.account-card-ident strong { font-size: .92rem; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-card-ident em { font-style: normal; font-size: .77rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-card-rank { margin: 0; align-self: center; }

.account-group { display: flex; flex-direction: column; }
.account-group + .account-group { margin-top: .2rem; border-top: 1px solid var(--line); padding-top: .2rem; }
.account-menu .menu-label { padding: .5rem .65rem .3rem; }

.user-menu .account-item {
  position: relative; align-items: center; gap: .7rem;
  padding: .55rem .6rem; border-radius: 12px;
  color: var(--text-muted);
  transition: background .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.user-menu .account-item > svg:first-child {
  width: 32px; height: 32px; flex: 0 0 32px; margin: 0; padding: 7px;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--navy-750); color: #9cc3ff;
  transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.user-menu .account-item:hover { background: var(--navy-700); color: #fff; transform: translateX(2px); }
.user-menu .account-item:hover > svg:first-child { background: var(--brand-soft); border-color: rgba(59,130,246,.4); color: #cfe1ff; }
.user-menu .account-item strong { color: inherit; }
.user-menu .account-item em { font-size: .755rem; line-height: 1.35; }
.account-arrow {
  width: 15px !important; height: 15px !important; flex: 0 0 15px; margin-left: auto;
  color: var(--text-dim); opacity: 0; transform: translateX(-4px);
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.user-menu .account-item:hover .account-arrow,
.user-menu .account-item:focus-visible .account-arrow { opacity: 1; transform: none; }
.user-menu .account-item[aria-current="page"] { background: var(--brand-soft); color: #dbe8ff; }
.user-menu .account-item-key > svg:first-child { color: #c4b5fd; border-color: rgba(167,139,250,.28); background: rgba(167,139,250,.12); }
.user-menu .account-item-key:hover > svg:first-child { background: rgba(167,139,250,.2); border-color: rgba(167,139,250,.45); color: #ddd0ff; }

.account-foot { margin-top: .25rem; padding-top: .3rem; border-top: 1px solid var(--line); }
.account-signout {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .65rem; border-radius: 12px;
  font-size: .875rem; font-weight: 600; color: var(--text-muted);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.account-signout svg { width: 17px; height: 17px; flex: 0 0 17px; }
.account-signout:hover { background: rgba(248,113,113,.12); color: #fca5a5; }

@media (max-width: 860px) {
  .user-menu.account-menu {
    position: static; display: none; min-width: 0; width: 100%;
    visibility: visible; opacity: 1; pointer-events: auto; transform: none;
    box-shadow: none; margin-top: .55rem; backdrop-filter: none;
  }
  .user-chip.open .user-menu.account-menu { display: flex; }
  .account-card { grid-template-columns: auto minmax(0, 1fr); }
  .account-card-rank { grid-column: 2; justify-self: start; }
}

/* ---------- Partners page ---------- */
.partners-hero-section { padding-bottom: 0; }
.partners-hero {
  position: relative; overflow: hidden;
  padding: 2.6rem 2.2rem; border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--navy-800), var(--navy-850) 65%, var(--navy-900));
}
.partners-hero-copy { position: relative; z-index: 1; max-width: 640px; }
.partners-hero h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: -.02em; margin: .35rem 0 .6rem; }
.partners-hero p { color: var(--text-muted); max-width: 58ch; }
.partners-hero-glow {
  position: absolute; inset: auto -10% -60% auto; right: -8%; width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(59,130,246,.22), transparent 62%);
  filter: blur(6px); pointer-events: none;
}
.partners-stats { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.partner-stat {
  display: flex; flex-direction: column; padding: .6rem 1rem;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(10,17,34,.5);
}
.partner-stat strong { font-family: 'Sora', sans-serif; font-size: 1.35rem; line-height: 1.1; color: #fff; font-variant-numeric: tabular-nums; }
.partner-stat span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); font-weight: 600; }

.partner-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.partner-grid-featured { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); margin-bottom: .5rem; }
.mt-xl { margin-top: 3rem; }

.partner-card {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: .9rem;
  padding: 1.3rem; border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, var(--navy-800), var(--navy-850));
  transition: transform .28s var(--ease), border-color .28s var(--ease), box-shadow .28s var(--ease);
}
.partner-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--tier, var(--brand)), transparent 80%);
  opacity: .85;
}
.partner-card-glow {
  position: absolute; z-index: -1; top: -40%; right: -25%; width: 260px; height: 260px;
  background: radial-gradient(circle, color-mix(in srgb, var(--tier, var(--brand)) 22%, transparent), transparent 65%);
  opacity: 0; transition: opacity .35s var(--ease); pointer-events: none;
}
.partner-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--tier, var(--brand)) 38%, var(--line));
  box-shadow: 0 26px 55px -30px rgba(0,0,0,.95);
}
.partner-card:hover .partner-card-glow { opacity: 1; }

.partner-card-head { display: flex; gap: 1rem; align-items: flex-start; }
.partner-logo {
  width: 58px; height: 58px; flex: 0 0 58px; border-radius: 14px; object-fit: cover;
  border: 1px solid var(--line); background: var(--navy-900);
}
.partner-logo-fallback {
  display: grid; place-items: center;
  font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.15rem; color: #fff;
  background: linear-gradient(150deg, color-mix(in srgb, var(--tier, var(--brand)) 40%, var(--navy-750)), var(--navy-800));
}
.partner-ident { min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.partner-ident h3 { font-size: 1.06rem; letter-spacing: -.01em; }
.partner-tagline { font-size: .84rem; color: var(--text-muted); }
.partner-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem; align-items: center; }
.partner-tier {
  font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--tier, var(--brand));
  background: color-mix(in srgb, var(--tier, var(--brand)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--tier, var(--brand)) 38%, transparent);
  border-radius: 999px; padding: .1rem .5rem;
}
.partner-since { font-size: .73rem; color: var(--text-dim); }
.partner-desc { font-size: .875rem; color: var(--text-muted); }

.partner-card-foot {
  margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; justify-content: space-between;
}
.partner-facts { display: flex; flex-wrap: wrap; gap: .8rem; }
.partner-fact { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; color: var(--text-dim); }
.partner-fact svg { width: 15px; height: 15px; }
.partner-actions { display: flex; gap: .45rem; flex-wrap: wrap; margin-left: auto; }
.partner-actions .btn svg { width: 15px; height: 15px; }

.partner-card-lg { padding: 1.6rem; gap: 1.05rem; }
.partner-card-lg .partner-logo { width: 68px; height: 68px; flex-basis: 68px; border-radius: 16px; }
.partner-card-lg .partner-ident h3 { font-size: 1.25rem; }

.partner-cta {
  display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; justify-content: space-between;
  margin-top: 2.6rem; padding: 1.6rem 1.8rem; border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(140deg, rgba(59,130,246,.12), var(--navy-850) 60%);
}
.partner-cta h3 { font-size: 1.15rem; }
.partner-cta p { color: var(--text-muted); font-size: .9rem; max-width: 62ch; margin-top: .25rem; }

@media (max-width: 700px) {
  .partners-hero { padding: 1.8rem 1.3rem; }
  .partner-grid, .partner-grid-featured { grid-template-columns: 1fr; }
  .partner-actions { margin-left: 0; width: 100%; }
  .partner-actions .btn { flex: 1 1 auto; }
}

/* ---------- Admin: partners ---------- */
.partner-admin-card { border-left: 3px solid var(--tier, var(--brand)); }
.partner-admin-logo {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px; object-fit: cover;
  border: 1px solid var(--line); background: var(--navy-900);
  display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: #fff;
}

/* =====================================================================
   v27 — Legal documents, admin sidebar scrolling, categorised settings
   ===================================================================== */

/* ---------- Legal documents (Privacy / Terms) ---------- */
.legal-page { width: min(1180px, 94%); margin: 2.25rem auto 4.5rem; }

.legal-hero {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 20px;
  padding: clamp(1.6rem, 4vw, 2.6rem);
  background:
    radial-gradient(760px 340px at 88% -30%, rgba(59,130,246,.22), transparent 62%),
    linear-gradient(150deg, var(--navy-800), var(--navy-850) 62%);
  box-shadow: var(--shadow);
}
.legal-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(59,130,246,.55), transparent 60%);
  height: 2px; top: 0; bottom: auto;
}
.legal-eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: #a9c6ff; padding: .34rem .7rem; border-radius: 999px;
  border: 1px solid rgba(59,130,246,.34); background: var(--brand-soft);
}
.legal-eyebrow svg { width: 13px; height: 13px; }
.legal-hero h1 {
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: clamp(1.9rem, 4.4vw, 2.7rem); line-height: 1.1; letter-spacing: -.03em;
  margin: .9rem 0 .55rem;
}
.legal-hero > p { color: var(--text-muted); font-size: 1rem; max-width: 68ch; }

.legal-meta {
  display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.35rem;
}
.legal-meta span {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; color: var(--text-muted);
  padding: .38rem .72rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(10,17,34,.55);
}
.legal-meta svg { width: 14px; height: 14px; color: var(--info); }

.legal-layout {
  display: grid; grid-template-columns: 258px minmax(0, 1fr);
  gap: 1.85rem; align-items: start; margin-top: 1.85rem;
}

.legal-toc {
  position: sticky; top: 92px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--navy-850); padding: .85rem;
  max-height: calc(100vh - 116px);
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.legal-toc h2 {
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim); padding: .35rem .6rem .6rem; margin: 0;
}
.legal-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.legal-toc a {
  display: flex; gap: .6rem; align-items: baseline;
  padding: .48rem .6rem; border-radius: 9px;
  font-size: .855rem; font-weight: 500; color: var(--text-muted); line-height: 1.35;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.legal-toc a::before {
  counter-increment: toc; content: counter(toc);
  font-size: .7rem; color: var(--text-dim); font-variant-numeric: tabular-nums;
  min-width: 1.1em; text-align: right;
}
.legal-toc a:hover { background: var(--navy-750); color: #fff; }
.legal-toc a.active { background: var(--brand-soft); color: #bfd7ff; }
.legal-toc a.active::before { color: #7fa9f5; }
.legal-progress {
  height: 3px; border-radius: 999px; background: var(--navy-750);
  margin: .2rem .6rem .7rem; overflow: hidden;
}
.legal-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), #7dd3fc); }

.legal-doc { min-width: 0; display: grid; gap: 1.1rem; }
.legal-doc .legal-intro {
  border: 1px solid var(--line); border-left: 3px solid var(--brand);
  border-radius: var(--radius); background: var(--navy-850);
  padding: 1.25rem 1.4rem; display: grid; gap: .7rem;
}
.legal-doc .legal-intro p { color: var(--text-muted); font-size: .95rem; }

.legal-section {
  scroll-margin-top: 104px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--navy-850); padding: clamp(1.15rem, 2.6vw, 1.7rem);
  transition: border-color .25s var(--ease);
}
.legal-section:hover { border-color: var(--line-strong); }
.legal-section > h2 {
  display: flex; align-items: center; gap: .7rem;
  font-family: 'Sora', 'Inter', sans-serif; font-size: 1.16rem; letter-spacing: -.02em;
  color: var(--text); margin: 0 0 .9rem;
}
.legal-section > h2 .legal-num {
  display: grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 8px;
  font-size: .76rem; font-weight: 700; font-family: 'Inter', sans-serif;
  color: #bfd7ff; background: var(--brand-soft); border: 1px solid rgba(59,130,246,.3);
  font-variant-numeric: tabular-nums;
}
.legal-section h3 {
  font-size: .98rem; color: #cfe0ff; margin: 1.35rem 0 .55rem;
}
.legal-section p, .legal-section li { color: var(--text-muted); font-size: .935rem; line-height: 1.75; }
.legal-section p + p { margin-top: .8rem; }
.legal-section .legal-list + p, .legal-section .legal-chiplist + p, .legal-section ul + p { margin-top: 1rem; }
.legal-section a { color: #8fbaff; text-decoration: underline; text-underline-offset: 2px; }
.legal-section a:hover { color: #bfd7ff; }

.legal-list { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .5rem; }
.legal-list li { position: relative; padding-left: 1.5rem; }
.legal-list li::before {
  content: ''; position: absolute; left: .25rem; top: .72em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.legal-chiplist { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .85rem; }
.legal-chiplist span {
  font-size: .8rem; color: var(--text); padding: .34rem .7rem;
  border-radius: 8px; border: 1px solid var(--line); background: var(--navy-800);
}
.legal-note {
  display: flex; gap: .75rem; align-items: flex-start; margin-top: 1rem;
  padding: .9rem 1.05rem; border-radius: var(--radius-sm);
  border: 1px solid rgba(251,191,36,.32); background: rgba(251,191,36,.08);
  color: #f4dfae; font-size: .89rem; line-height: 1.6;
}
.legal-note svg { width: 17px; height: 17px; flex: none; margin-top: .12rem; color: var(--warn); }
.legal-note.info { border-color: rgba(96,165,250,.32); background: rgba(96,165,250,.08); color: #cfe0ff; }
.legal-note.info svg { color: var(--info); }

.legal-stamp {
  display: flex; flex-wrap: wrap; gap: .9rem 1.4rem; align-items: center; justify-content: space-between;
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  padding: 1.05rem 1.3rem; background: rgba(13,21,38,.6);
}
.legal-stamp strong { font-size: .9rem; }
.legal-stamp p { color: var(--text-dim); font-size: .8rem; margin-top: .2rem; }

@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; max-height: none; }
  .legal-toc ol { display: flex; flex-wrap: wrap; gap: .3rem; }
  .legal-toc a { border: 1px solid var(--line); }
}

/* ---------- Admin sidebar: independent hover scrolling ---------- */
@media (min-width: 861px) {
  .admin-nav {
    max-height: calc(100vh - 112px);
    display: flex; flex-direction: column;
    overflow: hidden;
  }
  .admin-nav-body {
    overflow-y: auto; overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
    padding-right: .2rem; margin-right: -.2rem;
    scroll-behavior: auto;
  }
  .admin-nav-body::-webkit-scrollbar { width: 8px; }
  .admin-nav-body::-webkit-scrollbar-track { background: transparent; }
  .admin-nav-body::-webkit-scrollbar-thumb {
    background: var(--line-strong); border-radius: 999px;
    border: 2px solid transparent; background-clip: padding-box;
  }
  .admin-nav-body::-webkit-scrollbar-thumb:hover { background: rgba(148,178,226,.45); background-clip: padding-box; }
  .admin-nav.is-scrollable::before,
  .admin-nav.is-scrollable::after {
    content: ''; position: absolute; left: 1px; right: 1px; height: 26px;
    pointer-events: none; opacity: 0; transition: opacity .18s var(--ease); z-index: 2;
  }
  .admin-nav.is-scrollable::before {
    top: 1px; border-radius: var(--radius) var(--radius) 0 0;
    background: linear-gradient(to bottom, var(--navy-850), transparent);
  }
  .admin-nav.is-scrollable::after {
    bottom: 1px; border-radius: 0 0 var(--radius) var(--radius);
    background: linear-gradient(to top, var(--navy-850), transparent);
  }
  .admin-nav.at-start::after, .admin-nav.at-mid::after { opacity: 1; }
  .admin-nav.at-mid::before, .admin-nav.at-end::before { opacity: 1; }
  .admin-nav { position: sticky; }
}

/* ---------- Admin: categorised settings pages ---------- */
.admin-subnav {
  display: flex; flex-wrap: wrap; gap: .35rem; padding: .3rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--navy-850); margin-bottom: 1.4rem;
}
.admin-subnav button {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem .95rem; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--text-muted);
  font: inherit; font-size: .86rem; font-weight: 500;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.admin-subnav button svg { width: 15px; height: 15px; }
.admin-subnav button:hover { color: var(--text); background: var(--navy-750); }
.admin-subnav button.active { background: var(--brand); color: #fff; box-shadow: 0 10px 24px -16px var(--brand); }
.admin-subnav button.danger.active { background: var(--bad); box-shadow: 0 10px 24px -16px var(--bad); }

.settings-pane[hidden] { display: none; }
.settings-pane { display: grid; gap: 1.1rem; animation: fade-in .2s var(--ease); }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.setting-group {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--navy-850); overflow: hidden;
}
.setting-group > header {
  display: flex; gap: .8rem; align-items: flex-start;
  padding: 1rem 1.2rem; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(59,130,246,.06), transparent);
}
.setting-group > header svg { width: 18px; height: 18px; color: var(--info); flex: none; margin-top: .15rem; }
.setting-group > header h3 { font-size: .98rem; letter-spacing: -.01em; }
.setting-group > header p { color: var(--text-dim); font-size: .82rem; margin-top: .15rem; }
.setting-group > .setting-body { padding: 1.2rem; display: grid; gap: 1rem; }

.switch-row {
  display: flex; gap: 1rem; align-items: center; justify-content: space-between;
  padding: .85rem 1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--navy-800);
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.switch-row:hover { border-color: var(--line-strong); }
.switch-row .switch-copy strong { display: block; font-size: .9rem; font-weight: 600; color: var(--text); }
.switch-row .switch-copy span { display: block; font-size: .8rem; color: var(--text-dim); margin-top: .15rem; }
.switch { position: relative; flex: none; display: inline-flex; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.switch i {
  width: 42px; height: 24px; border-radius: 999px; display: block;
  background: var(--navy-700); border: 1px solid var(--line-strong);
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.switch i::after {
  content: ''; position: absolute; top: 4px; left: 4px;
  width: 16px; height: 16px; border-radius: 50%; background: var(--text-dim);
  transition: transform .2s var(--ease), background .2s var(--ease);
}
.switch input:checked + i { background: var(--brand); border-color: var(--brand-strong); }
.switch input:checked + i::after { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + i { outline: 2px solid var(--brand); outline-offset: 2px; }

.settings-bar {
  position: sticky; bottom: .9rem; z-index: 5;
  display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between;
  padding: .85rem 1.1rem; border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--navy-800) 88%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}
.settings-bar p { font-size: .82rem; color: var(--text-dim); }

.faq-admin-list { display: grid; gap: .8rem; }
.faq-admin {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--navy-850); overflow: hidden;
}
.faq-admin > summary {
  display: flex; gap: .75rem; align-items: center; cursor: pointer;
  padding: .9rem 1.1rem; font-size: .92rem; font-weight: 500; list-style: none;
}
.faq-admin > summary::-webkit-details-marker { display: none; }
.faq-admin > summary .faq-order {
  display: grid; place-items: center; flex: none; width: 24px; height: 24px;
  border-radius: 7px; font-size: .74rem; font-weight: 700; color: var(--text-muted);
  background: var(--navy-750); border: 1px solid var(--line); font-variant-numeric: tabular-nums;
}
.faq-admin > summary .faq-q { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.faq-admin > summary .chev { width: 16px; height: 16px; color: var(--text-dim); transition: transform .2s var(--ease); flex: none; }
.faq-admin[open] > summary .chev { transform: rotate(180deg); }
.faq-admin[open] > summary { border-bottom: 1px solid var(--line); background: var(--navy-800); }
.faq-admin .faq-body { padding: 1.1rem; }

.info-kv { display: grid; gap: .55rem; }
.info-kv > div {
  display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; justify-content: space-between;
  padding: .7rem .95rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--navy-800);
}
.info-kv dt, .info-kv .k { font-size: .84rem; color: var(--text-muted); }
.info-kv dd, .info-kv .v { font-size: .86rem; color: var(--text); text-align: right; word-break: break-word; }
.info-kv code { font-size: .8rem; }

.danger-zone {
  border: 1px solid rgba(248,113,113,.35); border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(248,113,113,.07), var(--navy-850) 60%);
  overflow: hidden;
}
.danger-zone > header { border-bottom: 1px solid rgba(248,113,113,.25); }
.danger-zone > header svg { color: var(--bad); }

@media (max-width: 640px) {
  .admin-subnav { border-radius: var(--radius); }
  .switch-row { flex-direction: column; align-items: flex-start; }
  .settings-bar { position: static; }
}

/* =====================================================================
   Admin › Teams workspace
   Categorised two-column manager: category rail + per-category panels.
   ===================================================================== */

.stat-card .stat-foot { display: block; margin-top: .35rem; font-size: .74rem; color: var(--text-dim); line-height: 1.35; }
.tm-stats { margin-bottom: 1.5rem; }

.tm-workspace {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

/* ------------------------------------------------------------- the rail */
.tm-rail {
  position: sticky;
  top: 1.25rem;
  background: var(--navy-800, rgba(255,255,255,.02));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .9rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.tm-search { position: relative; display: flex; align-items: center; }
.tm-search svg { position: absolute; left: .7rem; width: 15px; height: 15px; color: var(--text-dim); pointer-events: none; }
/* The global input rule uses a five-deep :not() chain, so this override has
   to match its specificity to win — hence the mirrored selector. */
.tm-search input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button]) {
  width: 100%;
  padding: .55rem .7rem .55rem 2.05rem;
  font: inherit;
  font-size: .87rem;
  color: var(--text);
  background: var(--navy-900, rgba(0,0,0,.25));
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.tm-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 22%, transparent); }
.tm-search input::-webkit-search-cancel-button { filter: invert(.6); }

.tm-rail-label { font-size: .68rem; letter-spacing: .11em; text-transform: uppercase; color: var(--text-dim); padding: 0 .2rem; }
.tm-rail-list { display: flex; flex-direction: column; gap: 2px; }

.tm-rail-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  padding: .55rem .6rem;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: .88rem;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.tm-rail-item:hover { background: var(--navy-750); color: var(--text); }
.tm-rail-item.active {
  background: color-mix(in oklab, var(--brand) 14%, transparent);
  border-color: color-mix(in oklab, var(--brand) 34%, transparent);
  color: #fff;
}
.tm-rail-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.tm-rail-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--ok, #34d399); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ok, #34d399) 18%, transparent); }
.tm-rail-dot.is-hidden { background: var(--text-dim); box-shadow: none; }
.tm-rail-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-rail-count {
  flex: 0 0 auto; min-width: 22px; padding: .1rem .38rem; text-align: center;
  font-size: .72rem; font-variant-numeric: tabular-nums;
  border-radius: 999px; background: var(--navy-750); color: var(--text-dim);
}
.tm-rail-item.active .tm-rail-count { background: rgba(255,255,255,.14); color: #fff; }
.tm-rail-new { margin-top: .35rem; border-style: dashed; border-color: var(--line-strong); color: var(--text-dim); }
.tm-rail-new:hover { color: var(--text); }
.tm-rail-plus { width: 7px; text-align: center; font-weight: 700; }
.tm-rail-hint { font-size: .8rem; color: var(--text-dim); padding: .2rem .2rem 0; }

/* ------------------------------------------------------------- panels */
.tm-panels { min-width: 0; }
.tm-pane { animation: tm-fade .22s ease both; }
@keyframes tm-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tm-pane { animation: none; } }

.tm-pane-head {
  background: var(--navy-800, rgba(255,255,255,.02));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1rem;
}
.tm-pane-title { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.tm-pane-title h2 { font-size: 1.18rem; letter-spacing: -.015em; margin: 0; }
.tm-pane-sub { margin-top: .35rem; font-size: .87rem; color: var(--text-muted); }
.tm-pane-actions { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-top: .9rem; }
.tm-inline-form { display: contents; }

.tm-icon-btn {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px;
  border: 1px solid var(--line-strong); border-radius: 9px;
  background: transparent; color: var(--text-muted);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.tm-icon-btn svg { width: 15px; height: 15px; }
.tm-icon-btn:hover:not(:disabled) { background: var(--navy-750); color: #fff; }
.tm-icon-btn:disabled { opacity: .3; cursor: not-allowed; }
.tm-icon-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

/* ------------------------------------------------------------- drawers */
.tm-drawer {
  background: var(--navy-800, rgba(255,255,255,.02));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1rem;
}
.tm-drawer[hidden] { display: none; }
.tm-drawer-inset { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); background: rgba(0,0,0,.14); }
.tm-form .field { margin-bottom: .9rem; }
.tm-form .grid-2 { gap: 0 1.1rem; }
.tm-form .check { margin-bottom: .9rem; }
.tm-form-foot { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding-top: .2rem; }
.tm-push { margin-left: auto; }

/* ------------------------------------------------------------ member list */
.tm-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.tm-row {
  background: var(--navy-800, rgba(255,255,255,.02));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .15s ease, background .15s ease;
}
.tm-row[hidden] { display: none; }
.tm-row:hover { border-color: var(--line-strong); }
.tm-row-main { display: flex; align-items: center; gap: .85rem; padding: .7rem .9rem; }

.tm-order { flex: 0 0 auto; width: 20px; text-align: center; font-size: .75rem; font-variant-numeric: tabular-nums; color: var(--text-dim); }
.tm-avatar { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: var(--navy-750); border: 1px solid var(--line-strong); }
.tm-avatar-fallback { display: grid; place-items: center; font-weight: 700; font-size: 1rem; color: var(--text-muted); }

.tm-identity { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .12rem; }
.tm-identity strong { font-size: .95rem; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-identity span { font-size: .8rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-identity em { opacity: .6; }

.tm-row-tools { flex: 0 0 auto; display: flex; align-items: center; gap: .35rem; }
.tm-edit-btn { min-height: 32px; }
.tm-empty { margin: 0; }

/* --------------------------------------------------------------- mobile */
@media (max-width: 900px) {
  .tm-workspace { grid-template-columns: minmax(0, 1fr); }
  .tm-rail { position: static; }
  .tm-rail-list { flex-direction: row; overflow-x: auto; gap: .4rem; padding-bottom: .2rem; scrollbar-width: thin; }
  .tm-rail-item { width: auto; flex: 0 0 auto; }
  .tm-rail-new { margin-top: 0; }
}
@media (max-width: 560px) {
  .tm-row-main { flex-wrap: wrap; }
  .tm-identity { flex: 1 1 100%; order: 3; }
  .tm-row-tools { margin-left: auto; }
  .tm-push { margin-left: 0; }
}

/* =====================================================================
   v28 — Partners directory tiles, partner profiles & admin manager
   ===================================================================== */

/* ---------- Public: filter bar ---------- */
.partner-filters {
  display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem; padding: .75rem .85rem;
  border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(150deg, var(--navy-800), var(--navy-850));
}
.partner-search { position: relative; flex: 1 1 260px; min-width: 200px; }
.partner-search svg {
  position: absolute; left: .7rem; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-dim); pointer-events: none;
}
.partner-search input {
  width: 100%; padding: .55rem .8rem .55rem 2.1rem;
  border-radius: 11px; border: 1px solid var(--line);
  background: var(--navy-900); color: var(--text);
  font: inherit; font-size: .875rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.partner-search input:focus { outline: none; border-color: rgba(59,130,246,.5); box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.partner-search input::-webkit-search-cancel-button { filter: invert(.6); }

.partner-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.partner-chip {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  padding: .42rem .75rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--navy-900);
  color: var(--text-muted); font: inherit; font-size: .78rem; font-weight: 600;
  transition: color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
.partner-chip em {
  font-style: normal; font-size: .7rem; color: var(--text-dim);
  padding: 0 .3rem; border-radius: 6px; background: rgba(148,178,226,.1);
}
.partner-chip:hover { color: #fff; border-color: var(--line-strong); transform: translateY(-1px); }
.partner-chip.is-on {
  color: #fff;
  border-color: color-mix(in srgb, var(--tier, var(--brand)) 55%, transparent);
  background: color-mix(in srgb, var(--tier, var(--brand)) 16%, var(--navy-900));
}
.partner-chip.is-on em { background: color-mix(in srgb, var(--tier, var(--brand)) 26%, transparent); color: #fff; }
.partner-empty { margin-top: 1rem; }

/* ---------- Public: clickable tiles ---------- */
.partner-tile {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: .85rem;
  padding: 1.25rem; border-radius: 18px; text-decoration: none; color: inherit;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, var(--navy-800), var(--navy-850));
  transition: transform .26s var(--ease), border-color .26s var(--ease), box-shadow .26s var(--ease);
  will-change: transform;
}
.partner-tile::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--tier, var(--brand)), transparent 80%); opacity: .85;
}
.partner-tile-glow {
  position: absolute; z-index: -1; top: -40%; right: -25%; width: 260px; height: 260px;
  background: radial-gradient(circle, color-mix(in srgb, var(--tier, var(--brand)) 22%, transparent), transparent 65%);
  opacity: 0; transition: opacity .32s var(--ease); pointer-events: none;
}
.partner-tile:hover, .partner-tile:focus-visible {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--tier, var(--brand)) 42%, var(--line));
  box-shadow: 0 26px 55px -30px rgba(0,0,0,.95);
  outline: none;
}
.partner-tile:focus-visible { box-shadow: 0 0 0 3px rgba(59,130,246,.32); }
.partner-tile:hover .partner-tile-glow, .partner-tile:focus-visible .partner-tile-glow { opacity: 1; }

.partner-tile-head { display: flex; gap: 1rem; align-items: flex-start; }
.partner-tile .partner-ident { min-width: 0; display: flex; flex-direction: column; gap: .18rem; }
.partner-tile .partner-name {
  font-family: 'Sora', 'Inter', sans-serif; font-size: 1.05rem; font-weight: 600;
  letter-spacing: -.01em; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.partner-tile .partner-tagline { display: block; font-size: .83rem; color: var(--text-muted); }
.partner-snippet {
  font-size: .862rem; line-height: 1.55; color: var(--text-muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.partner-tile-foot {
  margin-top: auto; padding-top: .85rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; justify-content: space-between;
}
.partner-tile-cta {
  display: inline-flex; align-items: center; gap: .35rem; margin-left: auto;
  font-size: .8rem; font-weight: 600; color: color-mix(in srgb, var(--tier, var(--brand)) 70%, #ffffff);
}
.partner-tile-cta svg { width: 15px; height: 15px; transition: transform .22s var(--ease); }
.partner-tile:hover .partner-tile-cta svg { transform: translateX(3px); }

.partner-tile-lg { padding: 1.55rem; }
.partner-tile-lg .partner-logo { width: 68px; height: 68px; flex-basis: 68px; border-radius: 16px; }
.partner-tile-lg .partner-name { font-size: 1.22rem; }
.partner-tile-lg .partner-snippet { -webkit-line-clamp: 4; }

/* ---------- Public: single partner profile ---------- */
.partner-breadcrumb {
  display: flex; align-items: center; gap: .5rem; margin-bottom: 1.1rem;
  font-size: .82rem; color: var(--text-dim);
}
.partner-breadcrumb a { display: inline-flex; align-items: center; gap: .35rem; color: var(--text-muted); text-decoration: none; }
.partner-breadcrumb a:hover { color: #fff; }
.partner-breadcrumb a svg { width: 15px; height: 15px; }
.partner-breadcrumb strong { color: var(--text); font-weight: 600; }

.partner-profile-hero {
  position: relative; overflow: hidden;
  display: flex; flex-wrap: wrap; gap: 1.4rem; align-items: center; justify-content: space-between;
  padding: clamp(1.5rem, 3.4vw, 2.4rem); border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--navy-800), var(--navy-850) 65%, var(--navy-900));
}
.partner-profile-hero::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--tier, var(--brand)), transparent 75%);
}
.partner-profile-glow {
  position: absolute; right: -6%; top: -60%; width: 460px; height: 460px; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--tier, var(--brand)) 20%, transparent), transparent 62%);
}
.partner-profile-ident { position: relative; z-index: 1; display: flex; gap: 1.15rem; align-items: center; min-width: 0; }
.partner-profile-logo {
  width: 88px; height: 88px; flex: 0 0 88px; border-radius: 20px; object-fit: cover;
  border: 1px solid var(--line); background: var(--navy-900);
  font-size: 1.8rem;
}
.partner-profile-titles { min-width: 0; }
.partner-profile-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .5rem; }
.partner-flag {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: #fde68a; padding: .1rem .5rem; border-radius: 999px;
  border: 1px solid rgba(250,204,21,.32); background: rgba(250,204,21,.12);
}
.partner-flag svg { width: 11px; height: 11px; }
.partner-profile-hero h1 {
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: clamp(1.6rem, 3.6vw, 2.3rem); line-height: 1.12; letter-spacing: -.025em; margin: 0;
}
.partner-profile-tagline { color: var(--text-muted); margin-top: .4rem; font-size: .95rem; }
.partner-profile-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: .5rem; }
.partner-profile-actions .btn svg { width: 16px; height: 16px; }

.partner-profile-grid {
  display: grid; gap: 1.1rem; margin-top: 1.3rem;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  align-items: start;
}
.partner-profile-main, .partner-profile-side { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.panel-lite {
  padding: 1.35rem 1.4rem; border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, var(--navy-800), var(--navy-850));
}
.panel-lite h2 {
  font-family: 'Sora', 'Inter', sans-serif; font-size: 1rem; letter-spacing: -.01em;
  margin: 0 0 .8rem; padding-bottom: .65rem; border-bottom: 1px solid var(--line);
}
.partner-profile-body { color: var(--text-muted); font-size: .93rem; line-height: 1.72; }

.partner-link-list { display: flex; flex-direction: column; gap: .5rem; }
.partner-link {
  display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem;
  border-radius: 13px; border: 1px solid var(--line); background: var(--navy-900);
  text-decoration: none; color: var(--text-muted);
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
.partner-link:hover { color: #fff; border-color: var(--line-strong); background: var(--navy-750); transform: translateX(2px); }
.partner-link-icon {
  display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--navy-800); color: #9cc3ff;
}
.partner-link-icon[data-kind="discord"] { color: #b3c7ff; }
.partner-link-icon svg { width: 17px; height: 17px; }
.partner-link > span { display: flex; flex-direction: column; min-width: 0; }
.partner-link strong { font-size: .88rem; color: #fff; font-weight: 600; }
.partner-link em { font-style: normal; font-size: .76rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.partner-link-arrow { width: 16px; height: 16px; margin-left: auto; flex: 0 0 16px; color: var(--text-dim); }

.partner-facts-list { display: flex; flex-direction: column; gap: .1rem; margin: 0; }
.partner-facts-list > div {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .55rem 0; border-bottom: 1px solid var(--line);
}
.partner-facts-list > div:last-child { border-bottom: 0; }
.partner-facts-list dt { font-size: .78rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.partner-facts-list dd { margin: 0; font-size: .875rem; color: var(--text); text-align: right; }
.partner-side-cta p { font-size: .85rem; line-height: 1.6; }

.partner-mini-grid { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.partner-mini {
  display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem;
  border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--navy-800), var(--navy-850));
  text-decoration: none; color: inherit;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.partner-mini:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tier, var(--brand)) 40%, var(--line)); }
.partner-mini img, .partner-mini-fallback {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; object-fit: cover;
  border: 1px solid var(--line); background: var(--navy-900);
  display: grid; place-items: center; font-weight: 700; font-size: .8rem; color: #fff;
}
.partner-mini > span { display: flex; flex-direction: column; min-width: 0; }
.partner-mini strong { font-size: .88rem; color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.partner-mini em { font-style: normal; font-size: .74rem; color: var(--tier, var(--brand)); font-weight: 600; }

@media (max-width: 900px) {
  .partner-profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .partner-profile-hero { padding: 1.4rem 1.2rem; }
  .partner-profile-ident { gap: .85rem; }
  .partner-profile-logo { width: 62px; height: 62px; flex-basis: 62px; border-radius: 16px; }
  .partner-profile-actions { width: 100%; }
  .partner-profile-actions .btn { flex: 1 1 auto; justify-content: center; }
  .partner-mini-grid { grid-template-columns: 1fr; }
  .partner-filters { flex-direction: column; align-items: stretch; }
}

/* =====================================================================
   v28 — Admin partner manager
   ===================================================================== */
.pm-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat-card.warn .stat-value { color: #fbbf24; }

.pm-inline-form { display: inline-flex; gap: .35rem; align-items: center; }

/* ---------- create panel ---------- */
.pm-create-toggle {
  display: flex; width: 100%; align-items: center; gap: .7rem; cursor: pointer;
  padding: .8rem .95rem; border-radius: 14px;
  border: 1px dashed var(--line-strong); background: var(--navy-900);
  color: var(--text); font: inherit; font-size: .9rem; font-weight: 600;
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.pm-create-toggle svg { width: 17px; height: 17px; color: #9cc3ff; transition: transform .22s var(--ease); }
.pm-create-toggle em { margin-left: auto; font-style: normal; font-size: .76rem; color: var(--text-dim); font-weight: 500; }
.pm-create-toggle:hover { border-color: rgba(59,130,246,.5); background: var(--navy-800); }
.pm-create.is-open .pm-create-toggle { border-style: solid; border-color: rgba(59,130,246,.45); background: var(--brand-soft); }
.pm-create.is-open .pm-create-toggle svg { transform: rotate(45deg); }
.pm-form { margin-top: 1rem; display: flex; flex-direction: column; gap: .9rem; }

.pm-fieldset {
  border: 1px solid var(--line); border-radius: 15px; padding: 1rem 1.1rem 1.1rem;
  background: rgba(10,17,34,.42); margin: 0;
}
.pm-fieldset legend {
  display: flex; align-items: center; gap: .5rem; padding: 0 .45rem; margin-left: -.2rem;
  font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted);
}
.pm-step {
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 7px;
  font-size: .7rem; letter-spacing: 0; color: #cfe1ff;
  background: var(--brand-soft); border: 1px solid rgba(59,130,246,.35);
}
.pm-hint { display: block; margin-top: .3rem; font-size: .74rem; color: var(--text-dim); }
.pm-switches { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-top: .9rem; }
.pm-form-foot { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.pm-form-foot .pm-delete { margin-left: auto; }

/* ---------- toolbar ---------- */
.pm-toolbar {
  display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-end; justify-content: space-between;
  padding-bottom: .9rem; margin-bottom: .35rem;
}
.pm-search { position: relative; flex: 1 1 280px; min-width: 210px; }
.pm-search svg { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-dim); }
.pm-search input {
  width: 100%; padding: .55rem .8rem .55rem 2.1rem; font: inherit; font-size: .86rem;
  border-radius: 11px; border: 1px solid var(--line); background: var(--navy-900); color: var(--text);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.pm-search input:focus { outline: none; border-color: rgba(59,130,246,.5); box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.pm-selects { display: flex; flex-wrap: wrap; gap: .6rem; }
.pm-select { display: flex; flex-direction: column; gap: .25rem; }
.pm-select > span { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); font-weight: 700; }
.pm-select select {
  padding: .5rem .7rem; font: inherit; font-size: .84rem; min-width: 150px;
  border-radius: 11px; border: 1px solid var(--line); background: var(--navy-900); color: var(--text);
}
.pm-select select:focus { outline: none; border-color: rgba(59,130,246,.5); }

.pm-tabs {
  display: flex; flex-wrap: wrap; gap: .35rem; padding: .3rem; margin-bottom: 1rem;
  border: 1px solid var(--line); border-radius: 13px; background: var(--navy-900);
}
.pm-tab {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  padding: .45rem .8rem; border-radius: 10px; border: 1px solid transparent; background: transparent;
  color: var(--text-muted); font: inherit; font-size: .82rem; font-weight: 600;
  transition: color .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease);
}
.pm-tab em { font-style: normal; font-size: .7rem; color: var(--text-dim); padding: 0 .32rem; border-radius: 6px; background: rgba(148,178,226,.1); }
.pm-tab:hover { color: #fff; background: var(--navy-800); }
.pm-tab.is-on { color: #fff; background: var(--brand-soft); border-color: rgba(59,130,246,.38); }
.pm-tab.is-on em { color: #fff; background: rgba(59,130,246,.3); }

/* ---------- rows ---------- */
.pm-list { display: flex; flex-direction: column; gap: .55rem; }
.pm-row {
  border: 1px solid var(--line); border-left: 3px solid var(--tier, var(--brand));
  border-radius: 14px; background: linear-gradient(165deg, var(--navy-800), var(--navy-850));
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.pm-row:hover { border-color: var(--line-strong); }
.pm-row.is-editing { border-color: rgba(59,130,246,.42); box-shadow: 0 0 0 3px rgba(59,130,246,.08); }
.pm-row-main {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .9rem; align-items: center; padding: .85rem .95rem;
}
.pm-logo {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; object-fit: cover;
  border: 1px solid var(--line); background: var(--navy-900);
  display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: #fff;
}
.pm-logo-fallback {
  background: linear-gradient(150deg, color-mix(in srgb, var(--tier, var(--brand)) 38%, var(--navy-750)), var(--navy-800));
}
.pm-row-ident { min-width: 0; }
.pm-row-title { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.pm-row-title strong { font-size: .95rem; color: #fff; font-weight: 600; }
.pm-row-sub { margin: .25rem 0 0; font-size: .8rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-row-facts { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .4rem; font-size: .74rem; color: var(--text-dim); }
.pm-fact-ok { color: #6ee7b7; }

.pm-pill {
  font-size: .66rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: .12rem .48rem; border-radius: 999px; border: 1px solid var(--line); color: var(--text-dim);
}
.pm-pill-live { color: #6ee7b7; border-color: rgba(52,211,153,.32); background: rgba(52,211,153,.1); }
.pm-pill-off  { color: #94a3b8; border-color: rgba(148,163,184,.28); background: rgba(148,163,184,.08); }
.pm-pill-star { color: #fde68a; border-color: rgba(250,204,21,.32); background: rgba(250,204,21,.1); }
.pm-pill-warn { color: #fbbf24; border-color: rgba(251,191,36,.32); background: rgba(251,191,36,.1); }

.pm-row-tools { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }
.pm-icon-btn {
  display: grid; place-items: center; width: 32px; height: 32px; cursor: pointer;
  border-radius: 9px; border: 1px solid var(--line); background: var(--navy-900);
  color: var(--text-muted); padding: 0;
  transition: color .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease), transform .16s var(--ease);
}
.pm-icon-btn svg { width: 15px; height: 15px; }
.pm-icon-btn:hover { color: #fff; border-color: var(--line-strong); background: var(--navy-750); transform: translateY(-1px); }
.pm-icon-btn.is-on { color: #cfe1ff; border-color: rgba(59,130,246,.4); background: var(--brand-soft); }
.pm-edit-btn svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.pm-row.is-editing .pm-edit-btn svg { transform: rotate(180deg); }

.pm-editor { padding: 0 .95rem 1rem; border-top: 1px solid var(--line); }
.pm-editor .pm-form { margin-top: .9rem; }

@media (max-width: 860px) {
  .pm-row-main { grid-template-columns: auto minmax(0, 1fr); }
  .pm-row-tools { grid-column: 1 / -1; justify-content: flex-start; }
  .pm-row-sub { white-space: normal; }
  .pm-toolbar { flex-direction: column; align-items: stretch; }
  .pm-select select { width: 100%; }
}

/* ==========================================================================
   v29 — Threat registry & flag types: categorised, calmer admin surfaces
   ========================================================================== */

/* Collapsible form section inside a panel */
.fold { border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(10, 17, 34, .35); }
.fold > summary {
  cursor: pointer; list-style: none; padding: .78rem 1rem; font-size: .88rem; font-weight: 600;
  color: var(--text-muted); display: flex; align-items: center; gap: .55rem;
  transition: color .18s var(--ease);
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before {
  content: '+'; width: 20px; height: 20px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 6px; font-size: .95rem; line-height: 1;
}
.fold[open] > summary::before { content: '–'; }
.fold > summary:hover { color: var(--text); }
.fold-body { padding: 0 1rem 1.15rem; }

/* Severity tabs + dots */
.reg-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.reg-tabs a { display: inline-flex; align-items: center; gap: .45rem; }
.sev-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; color: var(--text-dim); }

/* Filter bar */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: .55rem; align-items: center;
  padding: .7rem .75rem; margin-bottom: 1.35rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(10, 17, 34, .35);
}
.filter-bar select { max-width: 190px; }
.filter-search { position: relative; flex: 1 1 240px; min-width: 0; display: flex; align-items: center; }
.filter-search svg { position: absolute; left: .65rem; width: 16px; height: 16px; color: var(--text-dim); pointer-events: none; }
.filter-search input { width: 100%; padding-left: 2.1rem; }

/* Severity group */
.sev-group { margin-top: 1.6rem; }
.sev-group:first-of-type { margin-top: 0; }
.sev-group-head { display: flex; align-items: center; gap: .55rem; margin-bottom: .7rem; }
.sev-group-head h3 { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.sev-group-count { margin-left: auto; font-size: .76rem; color: var(--text-dim); }
.sev-group.is-muted .sev-group-head h3 { color: var(--text-dim); }

/* Registry rows */
.reg-list { display: grid; gap: .55rem; }
.reg-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .9rem;
  padding: .8rem .9rem; border: 1px solid var(--line); border-left: 3px solid currentColor;
  border-radius: var(--radius-sm); background: var(--navy-850); color: var(--text-dim);
  transition: background .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.reg-row:hover { background: rgba(59, 130, 246, .05); border-color: var(--line-strong); transform: translateX(2px); }
.reg-avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; background: var(--navy-900); }
.reg-main { min-width: 0; }
.reg-title { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.reg-title strong { color: var(--text); font-size: .96rem; }
.reg-meta { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: .2rem; font-size: .8rem; color: var(--text-dim); }
.reg-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.reg-go {
  display: inline-flex; align-items: center; gap: .3rem; flex: none;
  font-size: .82rem; font-weight: 600; color: var(--text-muted);
}
.reg-go svg { width: 15px; height: 15px; transition: transform .18s var(--ease); }
.reg-row:hover .reg-go { color: var(--text); }
.reg-row:hover .reg-go svg { transform: translateX(3px); }

/* Flag type cards */
.ft-list { display: grid; gap: .55rem; }
.ft-card {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--navy-850); overflow: hidden;
  transition: border-color .18s var(--ease);
}
.ft-card:hover { border-color: var(--line-strong); }
.ft-card.is-retired { opacity: .78; }
.ft-summary {
  cursor: pointer; list-style: none; display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .8rem;
  padding: .8rem .9rem;
}
.ft-summary::-webkit-details-marker { display: none; }
.ft-swatch { width: 10px; height: 26px; border-radius: 3px; background: var(--flag, #94a3b8); flex: none; }
.ft-ident { min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.ft-ident strong { color: var(--text); font-size: .95rem; }
.ft-ident code { font-size: .74rem; color: var(--text-dim); }
.ft-tags { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; justify-content: flex-end; }
.ft-usage { font-size: .76rem; color: var(--text-dim); }
.ft-body { padding: 0 .9rem 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.ft-desc { font-size: .84rem; color: var(--text-dim); margin-bottom: .9rem; }
.ft-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: 1.1rem; }
.ft-actions-spacer { flex: 1 1 auto; }

@media (max-width: 640px) {
  .reg-row { grid-template-columns: auto minmax(0, 1fr); }
  .reg-go { grid-column: 2; justify-self: start; }
  .ft-summary { grid-template-columns: auto minmax(0, 1fr); }
  .ft-tags { grid-column: 2; justify-content: flex-start; }
  .filter-bar select, .filter-bar .btn { flex: 1 1 auto; max-width: none; }
}

/* ============================ Account settings ============================ */
.btn-warn { background: rgba(251,191,36,.14); border-color: rgba(251,191,36,.38); color: #fcd34d; }
.btn-warn:hover { background: rgba(251,191,36,.22); }

.suspend-chip-hold { background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.35); color: #fcd34d; }

.acct-state {
  display: flex; align-items: center; gap: .85rem; flex-wrap: wrap;
  padding: .95rem 1.1rem; border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel);
}
.acct-state p { margin: .15rem 0 0; font-size: .86rem; }
.acct-state-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.acct-state-ok   .acct-state-dot { background: #34d399; box-shadow: 0 0 0 4px rgba(52,211,153,.16); }
.acct-state-hold .acct-state-dot { background: #fbbf24; box-shadow: 0 0 0 4px rgba(251,191,36,.16); }
.acct-state-hold { border-color: rgba(251,191,36,.3); }
.acct-state-reason {
  margin-left: auto; font-size: .8rem; padding: .3rem .6rem; border-radius: 999px;
  border: 1px solid rgba(251,191,36,.3); background: rgba(251,191,36,.1); color: #fcd34d;
}

.acct-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.acct-card {
  display: grid; gap: .7rem; align-content: start;
  padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.02);
}
.acct-card h4 { margin: 0; font-size: .95rem; }
.acct-card .hint { margin: 0; }
.acct-card button { justify-self: start; }
.acct-card-danger { border-color: rgba(248,113,113,.32); background: rgba(248,113,113,.05); }
.acct-fields { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.acct-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .45rem; }
.acct-list li { position: relative; padding-left: 1.5rem; font-size: .88rem; color: var(--muted); }
.acct-list li::before {
  content: ''; position: absolute; left: 0; top: .45rem; width: 9px; height: 9px; border-radius: 3px;
}
.acct-list li.is-removed::before { background: rgba(248,113,113,.75); }
.acct-list li.is-kept::before { background: rgba(52,211,153,.8); }
.acct-list li.is-kept { color: #a7f3d0; }

/* ============================================================================
   Maintenance mode
   Public screen (.mnt-*) and the admin panel controls (.maint-*).
   ========================================================================== */

.mnt-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.mnt-aurora { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.mnt-aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .55;
}
.mnt-aurora span:nth-child(1) {
  width: 46vw; height: 46vw; min-width: 320px; min-height: 320px;
  top: -14vw; right: -10vw;
  background: radial-gradient(circle, rgba(59,130,246,.34), transparent 68%);
  animation: mnt-drift 22s var(--ease) infinite alternate;
}
.mnt-aurora span:nth-child(2) {
  width: 38vw; height: 38vw; min-width: 280px; min-height: 280px;
  bottom: -16vw; left: -8vw;
  background: radial-gradient(circle, rgba(251,191,36,.16), transparent 68%);
  animation: mnt-drift 28s var(--ease) infinite alternate-reverse;
}
@keyframes mnt-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-4%, 5%, 0) scale(1.12); }
}

.mnt-page {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 3.5rem) 1rem;
}
.mnt-wrap { width: 100%; max-width: 760px; }

.mnt-brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  letter-spacing: .01em;
  margin-bottom: 1.15rem;
}
.mnt-brand:hover { color: var(--text); opacity: .9; }
.mnt-brand img { width: 34px; height: 34px; border-radius: 9px; }

.mnt-card {
  background: linear-gradient(180deg, rgba(22,35,60,.92), rgba(13,21,38,.92));
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  padding: clamp(1.4rem, 4vw, 2.6rem);
  backdrop-filter: blur(10px);
  animation: mnt-rise .5s var(--ease) both;
}
@keyframes mnt-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.mnt-chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--warn);
  background: rgba(251,191,36,.1);
  border: 1px solid rgba(251,191,36,.28);
  border-radius: 999px;
  padding: .32rem .75rem;
}
.mnt-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 0 rgba(251,191,36,.6);
  animation: mnt-ping 2s infinite;
}
@keyframes mnt-ping {
  70%  { box-shadow: 0 0 0 9px rgba(251,191,36,0); }
  100% { box-shadow: 0 0 0 0 rgba(251,191,36,0); }
}

.mnt-card h1 {
  margin: 1rem 0 .6rem;
  font-size: clamp(1.55rem, 4vw, 2.25rem);
  letter-spacing: -.015em;
}
.mnt-lede { color: var(--text-muted); font-size: 1.02rem; max-width: 60ch; }

.mnt-eta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .3rem .8rem;
  margin-top: 1.35rem;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(59,130,246,.07);
}
.mnt-eta-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); width: 100%; }
.mnt-eta-time { font-family: 'Sora', sans-serif; font-size: 1.05rem; }
.mnt-eta-count { color: var(--info); font-size: .92rem; }

.mnt-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.5rem; }
.mnt-note { margin-top: 1.1rem; color: var(--text-dim); font-size: .9rem; }

.mnt-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
  margin-top: 1.6rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: .85rem;
  color: var(--text-dim);
}
.mnt-live { display: inline-flex; align-items: center; gap: .5rem; }
.mnt-pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  animation: mnt-blink 1.6s ease-in-out infinite;
}
@keyframes mnt-blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.mnt-ell i { animation: mnt-blink 1.4s infinite; font-style: normal; }
.mnt-ell i:nth-child(2) { animation-delay: .2s; }
.mnt-ell i:nth-child(3) { animation-delay: .4s; }

.mnt-legal { margin-top: 1.2rem; text-align: center; color: var(--text-dim); font-size: .8rem; }

@media (prefers-reduced-motion: reduce) {
  .mnt-aurora span, .mnt-dot, .mnt-pulse, .mnt-ell i, .mnt-card { animation: none !important; }
}

/* ---- Admin panel controls ---- */
.maint-status {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.02);
  margin-bottom: 1.1rem;
}
.maint-status > div { flex: 1 1 auto; min-width: 0; }
.maint-status strong { display: block; font-family: 'Sora', sans-serif; }
.maint-status .dim { color: var(--text-dim); font-size: .87rem; }
.maint-led {
  flex: none;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--text-dim);
}
.maint-status.is-off { border-color: rgba(52,211,153,.25); }
.maint-status.is-off .maint-led { background: var(--ok); box-shadow: 0 0 12px rgba(52,211,153,.6); }
.maint-status.is-on { border-color: rgba(251,191,36,.32); background: rgba(251,191,36,.06); }
.maint-status.is-on .maint-led { background: var(--warn); box-shadow: 0 0 0 0 rgba(251,191,36,.55); animation: mnt-ping 2s infinite; }

.maint-form .field + .field, .maint-form .field-grid + .field { margin-top: .9rem; }
.maint-form .callout { margin-top: 1rem; }
.maint-form .form-actions { margin-top: 1.1rem; }

.maint-people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: .6rem;
}
.maint-person {
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: auto auto;
  column-gap: .6rem;
  align-items: center;
  padding: .55rem .7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.02);
  color: var(--text);
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}
.maint-person:hover { border-color: var(--line-strong); transform: translateY(-1px); color: var(--text); }
.maint-person img { grid-row: 1 / span 2; width: 34px; height: 34px; border-radius: 50%; }
.maint-person .n { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.maint-person .r { color: var(--text-dim); font-size: .76rem; }

/* Slim banner shown to bypass holders while maintenance mode is on. */
.maint-bar {
  position: relative;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .55rem;
  padding: .5rem 1rem;
  font-size: .85rem;
  color: #1b1405;
  background: linear-gradient(90deg, #fbbf24, #f6d167);
  animation: mnt-rise .35s var(--ease) both;
}
.maint-bar strong { font-weight: 700; }
.maint-bar a { color: #1b1405; text-decoration: underline; font-weight: 600; }
.maint-bar a:hover { color: #000; }
.maint-bar-led {
  width: 8px; height: 8px; border-radius: 50%;
  background: #7a5200;
  animation: mnt-blink 1.6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .maint-bar, .maint-bar-led { animation: none !important; } }

/* ==========================================================================
   Admin — Ranks & permissions
   ========================================================================== */
.rk-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}
.rk-stat {
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--navy-800), var(--navy-850));
  display: grid;
  gap: .15rem;
}
.rk-stat-n { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; }
.rk-stat-l { font-size: .78rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }
.rk-notice { margin-bottom: 1.5rem; }

.rk-toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.rk-toolbar-actions { display: flex; gap: .4rem; }
.rk-search {
  display: flex; align-items: center; gap: .5rem;
  flex: 1 1 260px; min-width: 0; max-width: 380px;
  padding: .5rem .75rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--navy-850);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.rk-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.rk-search svg { width: 16px; height: 16px; color: var(--text-dim); flex: none; }
.rk-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: .85rem; outline: none; padding: 0; }
.rk-search-sm { max-width: 100%; margin-bottom: .85rem; }

.rk-list { display: grid; gap: .7rem; }
.rk-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--navy-850);
  overflow: hidden;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.rk-card:hover { border-color: var(--line-strong); }
.rk-card.is-open { border-color: color-mix(in srgb, var(--rank, var(--brand)) 45%, var(--line)); box-shadow: var(--shadow); }

.rk-head {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .85rem;
  padding: .85rem 1rem;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .18s var(--ease);
}
.rk-head:hover { background: rgba(148, 178, 226, .05); }
.rk-swatch {
  width: 10px; height: 34px; border-radius: 999px; flex: none;
  background: var(--rank, var(--brand));
  box-shadow: 0 0 14px -2px var(--rank, var(--brand));
}
.rk-head-main { min-width: 0; display: grid; gap: .15rem; }
.rk-name { font-weight: 650; font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-meta { font-size: .78rem; color: var(--text-dim); display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.rk-meta code { font-size: .75rem; }
.rk-tags { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
.rk-tag {
  font-style: normal; font-size: .72rem; font-weight: 600;
  padding: .2rem .5rem; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--text-muted);
  white-space: nowrap;
}
.rk-tag-admin { border-color: rgba(251, 191, 36, .45); color: var(--warn); background: rgba(251, 191, 36, .1); }
.rk-tag-count { border-color: var(--line); color: var(--text-dim); font-variant-numeric: tabular-nums; }
.rk-chev { width: 18px; height: 18px; color: var(--text-dim); transition: transform .25s var(--ease); }
.rk-card.is-open .rk-chev { transform: rotate(180deg); }

.rk-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease); }
.rk-card.is-open .rk-body { grid-template-rows: 1fr; }
.rk-body-inner { overflow: hidden; min-height: 0; }
.rk-card.is-open .rk-body-inner { overflow: visible; }

.rk-section { padding: 1rem; border-top: 1px solid var(--line); }
.rk-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.rk-section-title {
  margin: 0 0 .75rem; font-size: .76rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em; color: var(--text-dim);
}
.rk-section-head .rk-section-title { margin-bottom: .75rem; }
.rk-permsummary { font-size: .8rem; font-variant-numeric: tabular-nums; }
.rk-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem; }
.rk-fields-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.rk-switches { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .6rem; margin-top: .85rem; }
.rk-permnote {
  margin-bottom: .85rem; padding: .6rem .8rem;
  border: 1px solid rgba(251, 191, 36, .35);
  background: rgba(251, 191, 36, .08);
  color: var(--warn); border-radius: var(--radius-sm); font-size: .82rem;
}

.rk-groups { display: grid; gap: .6rem; }
.rk-group {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--navy-800);
  transition: border-color .18s var(--ease);
}
.rk-group.has-any { border-color: color-mix(in srgb, var(--brand) 32%, var(--line)); }
.rk-group-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center; gap: .7rem;
  padding: .65rem .8rem;
  border-bottom: 1px solid var(--line);
}
.rk-group-icon {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--info);
}
.rk-group-icon svg { width: 16px; height: 16px; }
.rk-group-main { min-width: 0; display: grid; gap: .1rem; }
.rk-group-name { font-weight: 650; font-size: .88rem; }
.rk-group-blurb { font-size: .76rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; }
.rk-group-count { font-size: .78rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.rk-perms { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: .4rem; padding: .6rem; }
.rk-perm {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .6rem;
  align-items: start;
  padding: .6rem .7rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .16s var(--ease), border-color .16s var(--ease);
}
.rk-perm:hover { background: rgba(148, 178, 226, .06); border-color: var(--line); }
.rk-perm input { position: absolute; opacity: 0; width: 0; height: 0; }
.rk-perm-box {
  width: 18px; height: 18px; margin-top: .12rem; border-radius: 6px;
  border: 1px solid var(--line-strong); background: var(--navy-750);
  display: grid; place-items: center; flex: none;
  transition: background .16s var(--ease), border-color .16s var(--ease), transform .16s var(--ease);
}
.rk-perm-box svg { width: 12px; height: 12px; color: #fff; opacity: 0; transform: scale(.6); transition: opacity .16s var(--ease), transform .16s var(--ease); }
.rk-perm input:checked + .rk-perm-box { background: var(--brand); border-color: var(--brand); }
.rk-perm input:checked + .rk-perm-box svg { opacity: 1; transform: scale(1); }
.rk-perm input:focus-visible + .rk-perm-box { box-shadow: 0 0 0 3px var(--brand-soft); }
.rk-perm input:checked ~ .rk-perm-text strong { color: var(--text); }
.rk-perm-text { display: grid; gap: .15rem; min-width: 0; }
.rk-perm-text strong { font-size: .86rem; font-weight: 620; color: var(--text-muted); }
.rk-perm-text .dim { font-size: .76rem; line-height: 1.45; }
.rk-perm-key { justify-self: start; font-size: .68rem; color: var(--text-dim); opacity: .75; }
.rk-card.is-admin .rk-perms { opacity: .58; }

.rk-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; flex-wrap: wrap;
  padding: .8rem 1rem;
  border-top: 1px solid var(--line);
  background: var(--navy-800);
}
.rk-actions-btns { display: flex; gap: .5rem; margin-left: auto; }
.rk-dirty { display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; color: var(--warn); }
.rk-dirty-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); animation: mnt-blink 1.6s ease-in-out infinite; }
.rk-empty { color: var(--text-dim); font-size: .85rem; padding: .6rem .2rem; }
.rk-add .hint { margin-top: .75rem; }

@media (max-width: 720px) {
  .rk-head { grid-template-columns: auto minmax(0, 1fr) auto; }
  .rk-tags { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .rk-body { transition: none; }
  .rk-dirty-dot { animation: none; }
}

/* =====================================================================
   v32 — Voluntary Service Agreement
   ===================================================================== */

/* ---- status pill ---- */
.vsa-pill {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .28rem .7rem; border-radius: 999px;
  font-size: .74rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
  border: 1px solid var(--line); background: rgba(10, 17, 34, .5); color: var(--text-dim);
}
.vsa-pill i { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; flex: none; }
.vsa-pill-sm { font-size: .68rem; padding: .2rem .55rem; justify-self: start; }
.vsa-accepted { color: #6ee7b7; border-color: color-mix(in srgb, #34d399 40%, transparent); background: color-mix(in srgb, #34d399 12%, transparent); }
.vsa-pending  { color: #fcd34d; border-color: color-mix(in srgb, #fbbf24 40%, transparent); background: color-mix(in srgb, #fbbf24 12%, transparent); }
.vsa-outdated { color: #fdba74; border-color: color-mix(in srgb, #f97316 40%, transparent); background: color-mix(in srgb, #f97316 12%, transparent); }
.vsa-void     { color: #fca5a5; border-color: color-mix(in srgb, #f87171 40%, transparent); background: color-mix(in srgb, #f87171 12%, transparent); }
.vsa-none     { color: var(--text-dim); }
.vsa-stat.vsa-accepted { color: #6ee7b7; }
.vsa-stat.vsa-pending, .vsa-stat.vsa-outdated { color: #fcd34d; }
.vsa-stat.vsa-void, .vsa-stat.vsa-none { color: #fca5a5; }

/* the roster gains an agreement column */
.staff-row { grid-template-columns: 30px 44px minmax(150px, 1.5fr) minmax(120px, 1fr) minmax(110px, .9fr) auto auto auto; }
@media (max-width: 900px) {
  .staff-row { grid-template-columns: 28px 44px 1fr auto; }
  .staff-row .vsa-pill-sm { grid-column: 3 / -1; }
}

/* ---- the agreement page ---- */
.vsa-page { padding-bottom: 4rem; }
.vsa-hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 1.6rem; padding: 1.6rem 1.7rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background:
    radial-gradient(680px 240px at 0% 0%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%),
    var(--navy-800);
  animation: vsa-rise .45s var(--ease) both;
}
.vsa-hero h1 { margin: .3rem 0 .35rem; }
.vsa-hero code { font-size: .82em; }
@keyframes vsa-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.vsa-callout {
  display: flex; gap: .9rem; align-items: flex-start;
  margin-top: 1rem; padding: 1rem 1.1rem;
  border: 1px solid color-mix(in srgb, #fbbf24 35%, transparent); border-radius: var(--radius);
  background: color-mix(in srgb, #fbbf24 9%, var(--navy-800));
  animation: vsa-rise .45s var(--ease) .05s both;
}
.vsa-callout svg { width: 22px; height: 22px; flex: none; color: #fcd34d; margin-top: .1rem; }
.vsa-callout div { display: flex; flex-direction: column; gap: .2rem; }
.vsa-callout span { color: var(--text-dim); font-size: .9rem; }
.vsa-callout-ok { border-color: color-mix(in srgb, #34d399 35%, transparent); background: color-mix(in srgb, #34d399 9%, var(--navy-800)); }
.vsa-callout-ok svg { color: #6ee7b7; }

.vsa-layout { display: grid; gap: 1.25rem; grid-template-columns: 260px minmax(0, 1fr); margin-top: 1.25rem; align-items: start; }
@media (max-width: 980px) { .vsa-layout { grid-template-columns: 1fr; } }

.vsa-toc {
  position: sticky; top: 5.2rem; padding: 1.1rem 1.2rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--navy-800);
}
@media (max-width: 980px) { .vsa-toc { position: static; } }
.vsa-toc h2 { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); margin: 0 0 .6rem; }
.vsa-toc ol { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .3rem; }
.vsa-toc a { font-size: .84rem; color: var(--text-dim); text-decoration: none; transition: color .16s var(--ease); }
.vsa-toc a:hover { color: var(--text); }
.vsa-progress { height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .08); margin-top: .9rem; overflow: hidden; }
.vsa-progress span { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--brand); transition: width .12s linear; }
.vsa-progress-label { margin: .4rem 0 0; font-size: .74rem; }

.vsa-document { scroll-behavior: smooth; }
.vsa-section { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.vsa-section:first-child { padding-top: .2rem; }
.vsa-section:last-of-type { border-bottom: 0; }
.vsa-section h2 { display: flex; align-items: center; gap: .65rem; font-size: 1.02rem; margin: 0 0 .6rem; scroll-margin-top: 6rem; }
.vsa-num {
  display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; flex: none;
  border-radius: 8px; font-size: .78rem; font-weight: 700;
  background: var(--brand-soft); color: #bfd7ff;
}
.vsa-section p { margin: 0 0 .7rem; color: var(--text-dim); line-height: 1.72; font-size: .93rem; }
.vsa-section ul { margin: 0 0 .5rem; padding-left: 1.15rem; display: flex; flex-direction: column; gap: .38rem; }
.vsa-section li { color: var(--text-dim); line-height: 1.6; font-size: .91rem; }
.vsa-section li::marker { color: var(--brand); }

.vsa-sign { margin-top: 1.25rem; }
.vsa-checks { display: grid; gap: .55rem; }
.vsa-check {
  padding: .7rem .85rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(10, 17, 34, .45);
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.vsa-check:hover { border-color: var(--line-strong); }
.vsa-check:has(input:checked) { border-color: color-mix(in srgb, #34d399 45%, transparent); background: color-mix(in srgb, #34d399 8%, transparent); }
.vsa-signature input {
  font-family: 'Sora', sans-serif; font-size: 1.05rem; letter-spacing: .01em;
}
#vsa-submit { transition: opacity .18s var(--ease), transform .18s var(--ease); }
#vsa-submit[disabled] { opacity: .5; cursor: not-allowed; }
.vsa-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.25rem; }

/* ---- management block on the staff record ---- */
.vsa-facts { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 0 0 1rem; }
.vsa-facts dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-dim); }
.vsa-facts dd { margin: .2rem 0 0; font-size: .92rem; font-weight: 600; word-break: break-word; }
.vsa-manage { border-top: 1px solid var(--line); padding-top: 1rem; }
.vsa-manage-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .8rem; }
.vsa-manage-actions button[disabled] { opacity: .45; cursor: not-allowed; }
.vsa-timeline { display: flex; flex-direction: column; gap: .5rem; }
.vsa-timeline-row {
  display: flex; align-items: center; gap: .7rem; flex-wrap: wrap;
  padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(10, 17, 34, .4); font-size: .85rem;
}
.vsa-timeline-row code { font-size: .8rem; }

@media (prefers-reduced-motion: reduce) {
  .vsa-hero, .vsa-callout { animation: none; }
  .vsa-progress span { transition: none; }
}

/* ============================================================
   Overview pages (staff + admin panels)
   A single component set used by both panel overviews so the
   two dashboards feel like one product.
   ============================================================ */

.ov { display: grid; gap: 1.25rem; }
.ov-mt { margin-top: 1.25rem; }

/* ---------- Hero ---------- */
.ov-hero {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px);
  padding: 1.9rem 1.9rem;
  background:
    radial-gradient(760px 320px at 88% -30%, rgba(59, 130, 246, .28), transparent 62%),
    radial-gradient(520px 300px at 4% 120%, rgba(52, 211, 153, .12), transparent 60%),
    linear-gradient(160deg, var(--navy-800), var(--navy-850) 60%, var(--navy-900));
  box-shadow: var(--shadow);
  animation: ov-rise .5s var(--ease) both;
}
.ov-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 178, 226, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 178, 226, .05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(560px 260px at 82% 0%, #000, transparent 70%);
  opacity: .7;
}
.ov-hero-inner {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  align-items: center; justify-content: space-between;
}
.ov-hero-id { display: flex; align-items: center; gap: 1.05rem; min-width: 0; }
.ov-hero-avatar {
  width: 66px; height: 66px; border-radius: 20px; object-fit: cover; flex: none;
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .12), var(--shadow);
}
.ov-hero h1 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.05rem); letter-spacing: -.02em; }
.ov-hero .eyebrow {
  display: inline-block; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-dim); font-weight: 600; margin-bottom: .3rem;
}
.ov-hero-sub { color: var(--text-muted); font-size: .93rem; margin-top: .15rem; }
.ov-hero-side { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }

.ov-chip {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .42rem .8rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
  border: 1px solid var(--line-strong); background: rgba(10, 17, 34, .55); color: var(--text);
}
.ov-chip svg { width: 15px; height: 15px; }
.ov-chip.is-ok { border-color: rgba(52, 211, 153, .4); color: #86efc5; }
.ov-chip.is-warn { border-color: rgba(251, 191, 36, .42); color: #fcd34d; }
.ov-chip.is-bad { border-color: rgba(248, 113, 113, .42); color: #fca5a5; }
.ov-chip.is-brand { border-color: rgba(59, 130, 246, .45); color: #9dc2ff; background: var(--brand-soft); }

/* ---------- KPI tiles ---------- */
.ov-kpis { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.ov-kpi {
  position: relative; overflow: hidden;
  display: block; padding: 1.15rem 1.2rem 1.2rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(165deg, var(--navy-800), var(--navy-850));
  color: inherit;
  transition: transform .28s var(--ease), border-color .28s var(--ease), box-shadow .28s var(--ease);
  animation: ov-rise .5s var(--ease) both;
}
a.ov-kpi:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); color: inherit; }
.ov-kpi::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: linear-gradient(180deg, var(--tone, var(--brand)), transparent);
  opacity: .9;
}
.ov-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.ov-kpi-icon {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--tone, var(--brand)) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--tone, var(--brand)) 34%, transparent);
  color: var(--tone, var(--brand));
}
.ov-kpi-icon svg { width: 17px; height: 17px; }
.ov-kpi-label { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); font-weight: 600; }
.ov-kpi-value {
  font-family: 'Sora', sans-serif; font-weight: 600; letter-spacing: -.03em;
  font-size: 2.1rem; line-height: 1.1; margin-top: .55rem;
}
.ov-kpi-note { color: var(--text-muted); font-size: .84rem; margin-top: .2rem; }
.ov-kpi-bar { height: 4px; border-radius: 999px; background: rgba(148, 178, 226, .12); margin-top: .85rem; overflow: hidden; }
.ov-kpi-bar i { display: block; height: 100%; border-radius: 999px; background: var(--tone, var(--brand)); animation: ov-fill .9s var(--ease) both; }

/* staggered entrance */
.ov-kpi:nth-child(2), .ov-card:nth-child(2) { animation-delay: .05s; }
.ov-kpi:nth-child(3), .ov-card:nth-child(3) { animation-delay: .1s; }
.ov-kpi:nth-child(4), .ov-card:nth-child(4) { animation-delay: .15s; }
.ov-kpi:nth-child(5) { animation-delay: .2s; }
.ov-kpi:nth-child(6) { animation-delay: .25s; }

/* ---------- Cards / columns ---------- */
.ov-cols { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; }
.ov-cols-even { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.ov-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(170deg, var(--navy-800), var(--navy-850));
  overflow: hidden; animation: ov-rise .5s var(--ease) both;
}
.ov-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem 1.25rem; border-bottom: 1px solid var(--line);
  background: rgba(10, 17, 34, .35);
}
.ov-card-head h2 { font-size: 1.02rem; letter-spacing: -.01em; }
.ov-card-head p { color: var(--text-dim); font-size: .82rem; margin-top: .1rem; }
.ov-card-body { padding: 1.15rem 1.25rem; }
.ov-card-body.is-flush { padding: 0; }
.ov-empty { color: var(--text-dim); font-size: .88rem; text-align: center; padding: 1.6rem 1rem; }

/* ---------- Rows ---------- */
.ov-list { display: flex; flex-direction: column; }
.ov-row {
  display: flex; align-items: center; gap: .85rem;
  padding: .85rem 1.25rem; border-bottom: 1px solid var(--line);
  color: inherit; transition: background .2s var(--ease);
}
.ov-row:last-child { border-bottom: 0; }
a.ov-row:hover { background: rgba(59, 130, 246, .07); color: inherit; }
.ov-row-avatar { width: 34px; height: 34px; border-radius: 11px; flex: none; border: 1px solid var(--line); }
.ov-row-main { min-width: 0; flex: 1; }
.ov-row-title { font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-row-meta { color: var(--text-dim); font-size: .8rem; margin-top: .1rem; }
.ov-row-side { flex: none; text-align: right; font-size: .8rem; color: var(--text-dim); }

/* ---------- Timeline ---------- */
.ov-timeline { position: relative; padding: .35rem 1.25rem .35rem 1.25rem; }
.ov-timeline::before {
  content: ''; position: absolute; top: .9rem; bottom: .9rem; left: 1.7rem; width: 1px;
  background: linear-gradient(180deg, transparent, var(--line-strong), transparent);
}
.ov-tl-item { position: relative; padding: .6rem 0 .6rem 1.6rem; }
.ov-tl-item::before {
  content: ''; position: absolute; left: -.05rem; top: 1.05rem;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--tone, var(--brand)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone, var(--brand)) 18%, transparent);
}
.ov-tl-item .t { font-size: .9rem; font-weight: 500; }
.ov-tl-item .m { color: var(--text-dim); font-size: .78rem; margin-top: .1rem; }

/* ---------- Quick links ---------- */
.ov-actions { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.ov-action {
  display: flex; align-items: center; gap: .7rem; padding: .8rem .9rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(10, 17, 34, .45); color: inherit; font-size: .9rem; font-weight: 500;
  transition: transform .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.ov-action:hover { transform: translateY(-2px); border-color: rgba(59, 130, 246, .45); background: var(--brand-soft); color: inherit; }
.ov-action svg { width: 17px; height: 17px; color: var(--brand); flex: none; }

/* ---------- Meter / progress ---------- */
.ov-meter { display: grid; gap: .75rem; }
.ov-meter-row .lbl { display: flex; justify-content: space-between; font-size: .84rem; margin-bottom: .35rem; }
.ov-meter-row .lbl b { font-weight: 600; }
.ov-meter-row .bar { height: 7px; border-radius: 999px; background: rgba(148, 178, 226, .12); overflow: hidden; }
.ov-meter-row .bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--tone, var(--brand)), color-mix(in srgb, var(--tone, var(--brand)) 45%, transparent)); animation: ov-fill 1s var(--ease) both; }

@keyframes ov-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes ov-fill { from { width: 0 !important; } }

@media (max-width: 940px) {
  .ov-cols { grid-template-columns: minmax(0, 1fr); }
  .ov-hero { padding: 1.4rem; }
  .ov-hero-avatar { width: 54px; height: 54px; border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .ov-hero, .ov-kpi, .ov-card, .ov-kpi-bar i, .ov-meter-row .bar i { animation: none; }
}

/* ----------------------------------------- service agreement configuration */
.page-head-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.page-head-actions form { margin: 0; }
textarea.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .86rem; line-height: 1.6; tab-size: 2; resize: vertical;
}
.vsa-intro { color: var(--text-muted); max-width: 70ch; margin: 0 0 1rem; }

/* ── Report view (report_view.php) ─────────────────────────────── */
.rv-crumbs { display: flex; gap: .5rem; align-items: center; font-size: .84rem; color: var(--text-dim); margin-bottom: 1rem; }
.rv-crumbs a { color: var(--text-muted); text-decoration: none; }
.rv-crumbs a:hover { color: #fff; }

.rv-head { display: flex; gap: 1.25rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1.6rem; }
.rv-head-main { min-width: 0; flex: 1 1 380px; }
.rv-head-tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .7rem; }
.rv-head h1 { font-size: clamp(1.45rem, 3vw, 1.9rem); letter-spacing: -.02em; line-height: 1.2; word-break: break-word; }
.rv-head-sub { margin-top: .45rem; color: var(--text-muted); font-size: .92rem; }
.rv-head-sub strong { color: #fff; font-weight: 600; }
.rv-chip { display: inline-flex; align-items: center; padding: .22rem .6rem; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(148,178,226,.06); color: var(--text-muted); font-size: .78rem; letter-spacing: .01em; }
.mono, .rv-chip.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .76rem; }

.rv-status-card { flex: 0 1 260px; background: var(--navy-850); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.rv-status-label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--text-dim); }
.rv-status-value { display: block; margin-top: .25rem; font-size: 1.1rem; font-weight: 650; letter-spacing: -.01em; }
.rv-status-card p { margin-top: .35rem; font-size: .84rem; color: var(--text-muted); line-height: 1.45; }

.rv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.25rem; align-items: start; }
.rv-main { display: grid; gap: 1.25rem; min-width: 0; }
.rv-side { display: grid; gap: 1.25rem; position: sticky; top: 96px; }

.rv-panel { background: linear-gradient(180deg, rgba(148,178,226,.035), transparent 140px), var(--navy-850); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rv-panel-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .95rem 1.25rem; border-bottom: 1px solid var(--line); }
.rv-panel-head h2 { font-size: .95rem; font-weight: 650; letter-spacing: -.01em; margin: 0; }
.rv-count { font-size: .78rem; color: var(--text-dim); }
.rv-panel-body { padding: 1.25rem; display: grid; gap: 1.25rem; }

.rv-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .85rem; }
.rv-fact { background: rgba(148,178,226,.05); border: 1px solid var(--line); border-radius: var(--radius-sm, 10px); padding: .7rem .85rem; min-width: 0; }
.rv-fact-label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--text-dim); margin-bottom: .3rem; }
.rv-fact-value { font-size: .95rem; word-break: break-word; }
.rv-block { min-width: 0; }
.rv-body-text { white-space: pre-wrap; word-break: break-word; color: var(--text-muted); font-size: .95rem; line-height: 1.65; }
.rv-answers { display: grid; gap: .9rem; }
.rv-answers .answer { margin-bottom: 0; }
.rv-evidence { display: grid; gap: .6rem; }

.rv-thread { display: grid; gap: .85rem; }
.rv-msg { display: flex; gap: .85rem; padding: 1rem 1.05rem; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(148,178,226,.035); }
.rv-msg.staff { border-color: rgba(59,130,246,.32); background: linear-gradient(180deg, rgba(59,130,246,.09), rgba(148,178,226,.02)); }
.rv-msg.internal { border-color: rgba(251,191,36,.35); background: linear-gradient(180deg, rgba(251,191,36,.08), rgba(148,178,226,.02)); }
.rv-msg.mine { border-color: var(--line-strong); }
.rv-msg-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; object-fit: cover; }
.rv-msg-main { flex: 1; min-width: 0; }
.rv-msg-head { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.rv-msg-who { font-weight: 620; font-size: .92rem; }
.rv-msg-time { margin-left: auto; font-size: .78rem; color: var(--text-dim); white-space: nowrap; }
.rv-msg-body { margin-top: .4rem; color: var(--text-muted); font-size: .94rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.rv-tag { font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; padding: .12rem .45rem; border-radius: 999px; border: 1px solid currentColor; }
.rv-tag.tag-staff { color: var(--info); }
.rv-tag.tag-internal { color: var(--warn); }

.rv-composer { display: grid; gap: .6rem; padding-top: 1.1rem; border-top: 1px dashed var(--line-strong); }
.rv-composer label { font-size: .82rem; color: var(--text-muted); }
.rv-composer textarea { width: 100%; min-height: 130px; resize: vertical; padding: .8rem .9rem; border-radius: var(--radius-sm, 10px); border: 1px solid var(--line-strong); background: rgba(4,10,22,.55); color: inherit; font: inherit; line-height: 1.55; transition: border-color .18s var(--ease); }
.rv-composer textarea:focus { outline: none; border-color: rgba(96,165,250,.6); }
.rv-composer-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.rv-counter { font-size: .78rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.rv-locked { font-size: .86rem; padding-top: 1rem; border-top: 1px dashed var(--line-strong); }

.rv-side-panel .rv-panel-body { gap: .9rem; }
.rv-meta { display: grid; gap: .55rem; }
.rv-meta-row { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; font-size: .86rem; }
.rv-meta-row span { color: var(--text-dim); }
.rv-meta-row strong { font-weight: 600; text-align: right; word-break: break-word; }
.rv-person { display: flex; align-items: center; gap: .65rem; }
.rv-person img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.rv-person div { display: grid; min-width: 0; }
.rv-person span { font-size: .76rem; }

.rv-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; position: relative; }
.rv-timeline li { display: flex; gap: .7rem; align-items: flex-start; font-size: .85rem; }
.rv-timeline li div { display: grid; gap: .1rem; min-width: 0; }
.rv-timeline strong { font-weight: 600; }
.rv-timeline .dim { font-size: .78rem; }
.rv-dot { width: 9px; height: 9px; margin-top: .35rem; border-radius: 50%; flex: none; background: var(--line-strong); box-shadow: 0 0 0 3px rgba(148,178,226,.08); }
.rv-dot.current { background: var(--info); box-shadow: 0 0 0 3px rgba(96,165,250,.18); }

@media (max-width: 900px) {
  .rv-grid { grid-template-columns: minmax(0, 1fr); }
  .rv-side { position: static; }
  .rv-status-card { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .rv-panel, .rv-composer textarea { transition: none; }
}

/* ── Admin report viewer (admin/report.php) ────────────────────── */
.ar .rv-crumbs { margin-bottom: .85rem; }
.ar-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.ar-head-main { flex: 1 1 380px; min-width: 0; }
.ar-head h1 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); letter-spacing: -.02em; line-height: 1.2; word-break: break-word; }
.ar-head-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ar-head-actions form { margin: 0; }

.ar-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.ar-stat { background: var(--navy-850); border: 1px solid var(--line); border-radius: var(--radius-sm, 10px); padding: .7rem .9rem; display: grid; gap: .15rem; }
.ar-stat span { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--text-dim); }
.ar-stat strong { font-size: 1.05rem; font-weight: 650; letter-spacing: -.01em; }

.ar-grid { grid-template-columns: minmax(0, 1fr) 320px; }
.ar .rv-side-panel .decision-options { margin-top: .1rem; }
.ar .rv-side-panel form { margin: 0; }
.ar .rv-side-panel .btn { justify-self: start; }

.ar-internal { display: flex; gap: .6rem; align-items: flex-start; padding: .7rem .85rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm, 10px); background: rgba(148,178,226,.04); cursor: pointer; transition: border-color .18s var(--ease), background .18s var(--ease); }
.ar-internal input { margin-top: .2rem; accent-color: #fbbf24; }
.ar-internal span { display: grid; gap: .1rem; }
.ar-internal strong { font-size: .88rem; }
.ar-internal em { font-style: normal; font-size: .78rem; color: var(--text-dim); }
.ar-composer.is-internal .ar-internal { border-color: rgba(251,191,36,.5); background: rgba(251,191,36,.08); }
.ar-composer.is-internal textarea:focus { border-color: rgba(251,191,36,.6); }

@media (max-width: 1000px) {
  .ar-grid { grid-template-columns: minmax(0, 1fr); }
  .ar .rv-side { position: static; }
}

/* ==========================================================================
   Second opinions — report approval workflow
   ========================================================================== */

.ap-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border-color: color-mix(in srgb, var(--warn) 45%, transparent);
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  color: color-mix(in srgb, var(--warn) 78%, var(--text));
}

.ap-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--warn) 60%, transparent);
  animation: ap-pulse 2.4s ease-out infinite;
}

@keyframes ap-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--warn) 55%, transparent); }
  70%  { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.ap-mini {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-left: .4rem;
  padding: .12rem .42rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent);
  background: color-mix(in srgb, var(--warn) 10%, transparent);
  color: color-mix(in srgb, var(--warn) 80%, var(--text));
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .02em;
  vertical-align: middle;
}

.ap-inbox-notice a { font-weight: 600; }

/* Pending panel ---------------------------------------------------------- */

.ap-panel.is-pending {
  border-color: color-mix(in srgb, var(--warn) 38%, var(--line));
  box-shadow: 0 18px 40px -30px color-mix(in srgb, var(--warn) 70%, transparent);
}

.ap-panel.is-pending .rv-panel-head {
  background: linear-gradient(120deg,
    color-mix(in srgb, var(--warn) 13%, transparent),
    transparent 70%);
}

.ap-count {
  margin-left: auto;
  padding: .16rem .55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--warn) 16%, transparent);
  color: color-mix(in srgb, var(--warn) 82%, var(--text));
  font-size: .74rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.ap-proposal-label {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--dim);
}

.ap-proposal-flow {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .45rem;
}

.ap-arrow {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--dim);
}

.ap-note {
  margin: .6rem 0 0;
  padding: .55rem .7rem;
  border-left: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 0 8px 8px 0;
  background: color-mix(in srgb, var(--text) 4%, transparent);
  font-size: .84rem;
  line-height: 1.5;
  color: var(--text);
}

.ap-progress {
  position: relative;
  height: 6px;
  margin: .95rem 0 .8rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 9%, transparent);
  overflow: hidden;
}

.ap-progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--pct, 0%);
  border-radius: 999px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--accent) 70%, transparent),
    var(--accent));
  transition: width .5s cubic-bezier(.4, 0, .2, 1);
}

/* Sign-off list ---------------------------------------------------------- */

.ap-signoffs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .45rem;
}

.ap-sign {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .55rem .65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--text) 2.5%, transparent);
}

.ap-sign.is-done {
  border-color: color-mix(in srgb, var(--ok) 32%, var(--line));
  background: color-mix(in srgb, var(--ok) 7%, transparent);
}

.ap-sign.is-waiting {
  border-style: dashed;
  opacity: .8;
}

.ap-sign-avatar {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}

.ap-sign-ghost {
  display: grid;
  place-items: center;
  font-size: .8rem;
  font-weight: 700;
  color: var(--dim);
  background: color-mix(in srgb, var(--text) 6%, transparent);
}

.ap-sign-main {
  display: grid;
  gap: .1rem;
  min-width: 0;
  font-size: .82rem;
}

.ap-sign-main em {
  font-style: normal;
  font-size: .74rem;
  color: var(--dim);
}

.ap-sign-note {
  margin-top: .2rem;
  font-size: .78rem;
  color: var(--text);
}

.ap-sign-tick {
  width: 16px;
  height: 16px;
  margin-left: auto;
  flex: none;
  color: var(--ok);
}

.ap-actions {
  display: grid;
  gap: .45rem;
  margin-top: .9rem;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
}

.ap-field {
  font-size: .74rem;
  font-weight: 600;
  color: var(--dim);
}

.ap-actions-btns {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
}

.ap-locked {
  margin: .85rem 0 0;
  padding: .55rem .7rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--text) 4%, transparent);
  font-size: .8rem;
  color: var(--dim);
}

.ap-withdraw { margin-top: .5rem; }

.ap-bypass-note {
  display: flex;
  gap: .55rem;
  margin: 0 0 .8rem;
  padding: .6rem .7rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  font-size: .8rem;
  line-height: 1.45;
}

.ap-bypass-note svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--accent);
}

.ap-rule { margin: 0 0 .8rem; font-size: .82rem; line-height: 1.5; }

.ap-current-tag {
  margin-left: .35rem;
  font-style: normal;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--dim);
}

.decision-option.is-current { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }

/* Decision log ----------------------------------------------------------- */

.ap-log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .55rem;
}

.ap-log-item {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  font-size: .8rem;
}

.ap-log-main { display: grid; gap: .12rem; min-width: 0; }
.ap-log-main .dim { font-size: .72rem; }
.ap-log-note { margin-top: .15rem; color: var(--text); }

/* Approval queue --------------------------------------------------------- */

.ap-queue { display: grid; gap: .9rem; }

.ap-card {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2, color-mix(in srgb, var(--text) 2%, transparent));
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.ap-card:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  transform: translateY(-1px);
  box-shadow: 0 20px 40px -34px rgba(0, 0, 0, .8);
}

.ap-card.is-signed { opacity: .82; }

.ap-card-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.ap-card-ident h3 { margin: .25rem 0 .2rem; font-size: 1rem; }
.ap-card-ident .dim { font-size: .76rem; }

.ap-card-ref {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--dim);
}

.ap-card-flow { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

.ap-card-progress {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: .85rem;
}

.ap-card-progress .ap-progress { flex: 1; margin: 0; }

.ap-card-count {
  font-size: .74rem;
  font-weight: 700;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ap-card-people {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-top: .7rem;
}

.ap-face {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .18rem .55rem .18rem .2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ok) 8%, transparent);
  font-size: .74rem;
}

.ap-face img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.ap-face em { font-style: normal; }

.ap-face-empty {
  width: 30px;
  height: 30px;
  padding: 0;
  justify-content: center;
  border-style: dashed;
  background: none;
  color: var(--dim);
  font-weight: 700;
}

.ap-card-foot {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .95rem;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
}

.ap-card-form {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  align-items: center;
  flex: 1;
  min-width: 240px;
}

.ap-card-form input[type="text"] { flex: 1; min-width: 150px; }

.ap-threshold {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .ap-card-head { flex-direction: column; }
  .ap-card-form { min-width: 100%; }
}

/* ==========================================================================
   Rank icons
   ========================================================================== */

.rank-pill {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  padding: .16rem .58rem .16rem .22rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--rank, var(--accent)) 42%, transparent);
  background: color-mix(in srgb, var(--rank, var(--accent)) 14%, transparent);
  color: color-mix(in srgb, var(--rank, var(--accent)) 85%, var(--text));
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .015em;
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: middle;
}

.rank-pill:not(.has-icon) { padding-left: .58rem; }

.rank-pill-icon {
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: color-mix(in srgb, var(--rank, var(--accent)) 22%, transparent);
}

.rank-pill.lg { font-size: .8rem; padding: .24rem .7rem .24rem .28rem; }
.rank-pill.lg .rank-pill-icon { width: 22px; height: 22px; }
.rank-pill.sm { font-size: .66rem; }
.rank-pill.sm .rank-pill-icon { width: 15px; height: 15px; }

/* Rank admin icon controls ---------------------------------------------- */

.rk-swatch.has-icon { position: relative; overflow: hidden; }
.rk-swatch img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.rk-icon-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .7rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--text) 2.5%, transparent);
}

.rk-icon-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 12px;
  overflow: hidden;
  background: color-mix(in srgb, var(--rank, var(--accent)) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--rank, var(--accent)) 35%, transparent);
}

.rk-icon-preview img { width: 100%; height: 100%; object-fit: cover; }
.rk-icon-preview svg { width: 22px; height: 22px; color: color-mix(in srgb, var(--rank, var(--accent)) 75%, var(--text)); }

.rk-icon-main { display: grid; gap: .25rem; min-width: 0; flex: 1; }

.rk-icon-title { font-size: .78rem; font-weight: 700; }

.rk-icon-main .dim { font-size: .72rem; line-height: 1.45; }

.rk-icon-actions {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-wrap: wrap;
  margin-top: .15rem;
}

.rk-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .32rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 4%, transparent);
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.rk-icon-btn:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  transform: translateY(-1px);
}

.rk-icon-btn svg { width: 15px; height: 15px; }

.rk-icon-btn input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.rk-icon-remove {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .74rem;
  color: var(--dim);
}

@media (max-width: 560px) {
  .rk-icon-row { flex-direction: column; align-items: flex-start; }
}

/* Staff overview hero: rank badge sits inline with the summary line. */
.ov-hero-sub .ov-hero-rank { vertical-align: -2px; margin-right: .15rem; }
.account-badges .rank-pill { vertical-align: middle; }
