/* ==========================================================================
   CloudyWorld — night sky theme
   ========================================================================== */

:root {
  --bg: #0b1222;
  --bg-deep: #070c18;
  --surface: #111b33;
  --surface-2: #16223f;
  --surface-3: #1c2a4e;
  --border: rgba(148, 172, 218, .15);
  --border-2: rgba(148, 172, 218, .28);
  --border-gold: rgba(233, 181, 79, .4);
  --text: #eef3fc;
  --text-2: #c3cee3;
  --sub: #95a3bf;
  --muted: #6f7d99;
  --gold: #e9b54f;
  --gold-light: #f5d58f;
  --gold-dark: #c28c33;
  --sky: #71b8ff;
  --green: #5fd38c;
  --red: #ff6f6f;

  --font-display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --font-body: 'Onest', 'Segoe UI', system-ui, sans-serif;

  --r-lg: 20px;
  --r: 16px;
  --r-sm: 11px;
  --gutter: clamp(16px, 5vw, 60px);
  --max: 1220px;
  --header-h: 72px;
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex; flex-direction: column;
  padding-top: var(--header-h);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
}
body.has-hero { padding-top: 0; }
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 520px at 85% -8%, rgba(113, 184, 255, .09), transparent 62%),
    radial-gradient(800px 480px at -8% 35%, rgba(233, 181, 79, .05), transparent 62%),
    url(../img/stars.svg) center top / 800px 600px;
  opacity: .85;
}

img, svg { max-width: 100%; }
a { color: var(--gold-light); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(233, 181, 79, .35); color: #fff; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.18; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 5vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 3.1vw, 2.25rem); }
h3 { font-size: clamp(1rem, 1.5vw, 1.1rem); }
h4 { font-size: .95rem; }
p { margin: 0 0 1em; }
b, strong { font-weight: 600; }
.sub { color: var(--sub); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; padding: 8px 14px; border-radius: 8px; background: var(--gold); color: #1c1305; font-weight: 600; }
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.container.narrow { max-width: calc(520px + var(--gutter) * 2); }
.container.medium { max-width: calc(900px + var(--gutter) * 2); }
main { flex: 1; }
.section { position: relative; padding-block: clamp(64px, 10vw, 116px); }
.section.compact { padding-block: clamp(40px, 6vw, 70px); }

.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.row.center { justify-content: center; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 20px; align-content: start; }
.stack > * { min-width: 0; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center; gap: 18px;
  padding-inline: var(--gutter);
  background: rgba(7, 12, 24, .72);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--border);
  transition: background .3s, box-shadow .3s;
}
.site-header.scrolled { background: rgba(7, 12, 24, .93); box-shadow: 0 12px 36px rgba(0, 0, 0, .35); }

.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand img { width: auto; height: 32px; filter: drop-shadow(0 4px 10px rgba(196, 170, 255, .25)); transition: transform .35s; }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.brand b { color: var(--gold); font-weight: 700; }
.brand small { font-family: var(--font-body); font-weight: 400; font-size: .8rem; color: var(--sub); padding-left: 12px; border-left: 1px solid var(--border-2); }
@media (max-width: 1200px) { .brand small { display: none; } }

.main-nav { display: flex; align-items: center; gap: 2px; margin-inline: auto; }
.main-nav a { position: relative; padding: 9px 14px; border-radius: 10px; color: var(--text-2); font-weight: 500; font-size: .94rem; }
.main-nav a::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 18px; height: 2px; margin-left: -9px; border-radius: 2px; background: var(--gold); opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s; }
.main-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .045); }
.main-nav a[aria-current="page"] { color: var(--gold-light); }
.main-nav a[aria-current="page"]::after, .main-nav a:hover::after { opacity: 1; transform: none; }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.main-nav + .header-actions { margin-left: 0; }

.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border); background: rgba(22, 34, 63, .65); font-size: .8rem; color: var(--text-2); white-space: nowrap; }
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.status-pill.on i { background: var(--green); animation: beacon 2.2s infinite; }
@keyframes beacon { 0% { box-shadow: 0 0 0 0 rgba(95, 211, 140, .55); } 70%, 100% { box-shadow: 0 0 0 8px rgba(95, 211, 140, 0); } }

.user-chip { display: inline-flex; align-items: center; gap: 9px; padding: 4px 14px 4px 4px; border-radius: 999px; border: 1px solid var(--border); background: rgba(22, 34, 63, .65); color: var(--text); font-size: .88rem; font-weight: 500; }
.user-chip:hover { color: var(--text); border-color: var(--border-gold); }
.user-chip .avatar { width: 30px; height: 30px; border-radius: 50%; }

.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--gold); color: #1c1305; font-size: .72rem; font-weight: 700; line-height: 1; }

.header-actions .menu-toggle { display: none; }
@media (max-width: 1040px) {
  .main-nav, .header-actions .status-pill, .header-actions .wide-only { display: none; }
  .header-actions .menu-toggle { display: inline-grid; }
}

.drawer {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column;
  padding: 90px var(--gutter) 32px;
  background: rgba(5, 9, 18, .97);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(-24px);
  transition: opacity .3s, transform .35s, visibility .35s;
}
.drawer.open { opacity: 1; visibility: visible; transform: none; }
.drawer a.big { padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.drawer a.big[aria-current="page"] { color: var(--gold); }
.drawer .drawer-close { position: absolute; top: 16px; right: var(--gutter); }
.drawer .drawer-foot { margin-top: 28px; display: grid; gap: 12px; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 26px; border: 1px solid transparent; border-radius: var(--r-sm);
  font-family: var(--font-body); font-size: .95rem; font-weight: 700; line-height: 1.2;
  color: #1f1506; white-space: nowrap; cursor: pointer;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 60%, var(--gold-dark) 100%);
  box-shadow: 0 8px 26px rgba(233, 181, 79, .22), inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -2px 0 rgba(120, 80, 20, .25);
  transition: transform .2s, box-shadow .25s, background-color .25s, border-color .25s, color .2s;
}
.btn::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: skewX(-20deg); transition: left .6s;
}
.btn:hover { color: #1f1506; transform: translateY(-2px); box-shadow: 0 14px 36px rgba(233, 181, 79, .34), inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -2px 0 rgba(120, 80, 20, .25); }
.btn:hover::after { left: 130%; }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn.secondary { color: var(--text); background: rgba(22, 34, 63, .82); border-color: var(--border); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.btn.secondary::after { display: none; }
.btn.secondary:hover { color: var(--text); background: rgba(28, 42, 78, .95); border-color: var(--border-gold); box-shadow: 0 12px 30px rgba(0, 0, 0, .3); }
.btn.quiet { color: var(--text-2); background: transparent; border-color: var(--border); box-shadow: none; }
.btn.quiet::after { display: none; }
.btn.quiet:hover { color: var(--text); border-color: var(--border-2); box-shadow: none; }
.btn.success { color: #05200e; background: linear-gradient(180deg, #a4f1c1, var(--green) 60%, #3aa968); box-shadow: 0 8px 26px rgba(95, 211, 140, .2), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn.success:hover { color: #05200e; box-shadow: 0 14px 36px rgba(95, 211, 140, .32); }
.btn.danger { color: #fff; background: linear-gradient(180deg, #ff9494, #e84b50 60%, #bd343c); box-shadow: 0 8px 26px rgba(232, 75, 80, .2), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn.danger:hover { color: #fff; box-shadow: 0 14px 36px rgba(232, 75, 80, .32); }
.btn.sm { padding: 8px 15px; font-size: .85rem; border-radius: 10px; }
.btn.lg { padding: 16px 32px; font-size: 1rem; }
.btn.block { width: 100%; }
.btn.square { width: 42px; height: 42px; padding: 0; font-size: 1.15rem; }

.text-btn { padding: 0; border: 0; background: none; font: inherit; color: var(--gold-light); cursor: pointer; }
.text-btn:hover { color: var(--gold); }

/* --------------------------------------------------------------------------
   Section headings, dividers, reveal
   -------------------------------------------------------------------------- */

.heading { max-width: 700px; margin-bottom: clamp(34px, 5vw, 54px); }
.heading.center { margin-inline: auto; text-align: center; }
.heading h2 { margin: 0; }
.heading p { margin: 16px 0 0; color: var(--sub); font-size: 1.04rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: 16px;
  font-family: var(--font-display); font-weight: 500; font-size: .66rem;
  letter-spacing: .28em; text-transform: uppercase; color: var(--gold);
}
.eyebrow::before { content: ''; width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 12px rgba(233, 181, 79, .6); }
.center > .eyebrow::after, .eyebrow.both::after { content: ''; width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 12px rgba(233, 181, 79, .6); }

.divider { display: flex; align-items: center; justify-content: center; gap: 16px; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.divider::before, .divider::after { content: ''; flex: 1; max-width: 260px; height: 1px; background: linear-gradient(90deg, transparent, var(--border-gold)); }
.divider::after { background: linear-gradient(90deg, var(--border-gold), transparent); }
.divider img { width: 22px; height: 22px; image-rendering: pixelated; opacity: .9; animation: bob 4s ease-in-out infinite; }

@supports (animation-timeline: view()) {
  .reveal { animation: reveal-up linear both; animation-timeline: view(); animation-range: entry 5% entry 45%; }
  @keyframes reveal-up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
}

/* --------------------------------------------------------------------------
   Night scene (hero, page headers, auth, error)
   -------------------------------------------------------------------------- */

.sky { position: absolute; inset: 0; z-index: -3; overflow: hidden; background: linear-gradient(180deg, #050a15 0%, #0a1430 40%, #11264a 75%, #163452 100%); }
.sky .stars { position: absolute; inset: 0; background: url(../img/stars.svg) 0 0 / 800px 600px; animation: twinkle 5s ease-in-out infinite alternate; }
.sky .stars.far { background-size: 1200px 900px; background-position: 300px 200px; opacity: .55; animation-delay: -2.5s; }
@keyframes twinkle { from { opacity: .4; } to { opacity: 1; } }

.glow-field { position: absolute; inset: -25% -15% 25%; filter: blur(70px); opacity: .5; }
.glow-field span { position: absolute; border-radius: 50%; mix-blend-mode: screen; animation: wander 20s ease-in-out infinite alternate; }
.glow-field span:nth-child(1) { left: 0; top: 25%; width: 50%; height: 42%; background: radial-gradient(closest-side, rgba(90, 214, 176, .5), transparent); }
.glow-field span:nth-child(2) { right: 0; top: 8%; width: 48%; height: 40%; background: radial-gradient(closest-side, rgba(104, 138, 255, .45), transparent); animation-delay: -7s; }
.glow-field span:nth-child(3) { left: 32%; top: 38%; width: 38%; height: 32%; background: radial-gradient(closest-side, rgba(186, 142, 255, .35), transparent); animation-delay: -14s; }
@keyframes wander { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(7%, 3%) scale(1.12); } 100% { transform: translate(-5%, -4%) scale(.94); } }

.moon { position: absolute; top: 15%; right: 13%; width: clamp(64px, 8.5vw, 116px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #fffaea 0%, #f5d58f 50%, #d49c3e 100%);
  box-shadow: 0 0 50px 14px rgba(245, 213, 143, .25), 0 0 150px 50px rgba(245, 213, 143, .08); }
.moon::before, .moon::after { content: ''; position: absolute; border-radius: 50%; background: rgba(194, 140, 51, .3); }
.moon::before { width: 20%; height: 20%; left: 56%; top: 52%; }
.moon::after { width: 12%; height: 12%; left: 30%; top: 30%; }

.meteor { position: absolute; top: 14%; left: 24%; width: 130px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #fff, transparent); opacity: 0; transform: rotate(-20deg); animation: meteor 10s ease-in infinite; }
.meteor.late { top: 30%; left: 64%; width: 90px; animation-delay: 5s; }
@keyframes meteor { 0%, 86% { opacity: 0; transform: translate(0, 0) rotate(-20deg); } 88% { opacity: 1; } 100% { opacity: 0; transform: translate(-280px, 100px) rotate(-20deg); } }

.land { position: absolute; left: 0; right: 0; bottom: 0; pointer-events: none; image-rendering: pixelated; background-repeat: repeat-x; background-position: center bottom; }
@media (max-width: 600px) { .hero .moon { top: 90px; right: 8%; } .drift { display: none; } }
.land.back { z-index: -2; height: 256px; background-image: url(../img/terrain-back.svg); background-size: 960px 256px; }
.land.front { z-index: -1; height: 240px; background-image: linear-gradient(180deg, transparent 42%, rgba(5, 9, 18, .35) 70%, rgba(5, 9, 18, .8)), url(../img/terrain-front.svg); background-size: auto, 800px 240px; background-repeat: no-repeat, repeat-x; }

.drift { position: absolute; left: 0; z-index: -2; image-rendering: pixelated; opacity: .14; pointer-events: none; animation: cloud-move linear infinite; }
.drift.d1 { top: 20%; width: 330px; animation-duration: 115s; animation-delay: -35s; }
.drift.d2 { top: 50%; width: 210px; animation-duration: 150s; animation-delay: -95s; opacity: .09; }
.drift.d3 { top: 7%; width: 430px; animation-duration: 175s; animation-delay: -130s; opacity: .11; }
@keyframes cloud-move { from { transform: translateX(-460px); } to { transform: translateX(calc(100vw + 460px)); } }


.embers { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.embers i { position: absolute; bottom: -8px; width: 4px; height: 4px; background: var(--gold-light); box-shadow: 0 0 10px var(--gold); opacity: 0; animation: ember 13s linear infinite; }
.embers i:nth-child(1) { left: 10%; }
.embers i:nth-child(2) { left: 24%; animation-delay: -4s; animation-duration: 16s; }
.embers i:nth-child(3) { left: 43%; animation-delay: -8s; }
.embers i:nth-child(4) { left: 58%; animation-delay: -2s; animation-duration: 18s; }
.embers i:nth-child(5) { left: 74%; animation-delay: -10s; }
.embers i:nth-child(6) { left: 88%; animation-delay: -6s; animation-duration: 15s; }
.embers i:nth-child(7) { left: 33%; animation-delay: -12s; animation-duration: 20s; background: var(--sky); box-shadow: 0 0 10px var(--sky); }
.embers i:nth-child(8) { left: 67%; animation-delay: -14s; animation-duration: 17s; background: var(--sky); box-shadow: 0 0 10px var(--sky); }
@keyframes ember { 0% { opacity: 0; transform: translate(0, 0); } 12% { opacity: .9; } 85% { opacity: .5; } 100% { opacity: 0; transform: translate(26px, -78vh); } }

.custom-art { position: absolute; inset: 0; z-index: -3; }
.custom-art img { width: 100%; height: 100%; object-fit: cover; }
.shade { position: absolute; inset: 0; z-index: -2; pointer-events: none; background:
  radial-gradient(70% 60% at 50% 45%, rgba(7, 12, 24, .55), rgba(7, 12, 24, .2) 70%),
  linear-gradient(180deg, rgba(7, 12, 24, .7) 0%, rgba(7, 12, 24, .25) 35%, rgba(7, 12, 24, .45) 70%, var(--bg) 100%); }
.hero.with-art { padding-bottom: 150px; }
.hero.with-art .custom-art img { animation: slow-zoom 30s ease-in-out infinite alternate; }
@keyframes slow-zoom { from { transform: scale(1); } to { transform: scale(1.08); } }

/* Home hero */
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: min(100vh, 960px); display: grid; place-items: center; padding: calc(var(--header-h) + 56px) var(--gutter) 250px; text-align: center; }
.hero-content { position: relative; max-width: 860px; }
.hero-logo { width: clamp(130px, 13vw, 180px); height: auto; margin: 0 auto 22px; filter: drop-shadow(0 14px 40px rgba(196, 170, 255, .35)); animation: bob 6s ease-in-out infinite; }
.hero-kicker { margin-bottom: 20px; font-family: var(--font-display); font-weight: 500; font-size: clamp(.6rem, 1.2vw, .74rem); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.hero h1 { margin: 0; text-shadow: 0 10px 40px rgba(0, 0, 0, .55); }
.hero h1 em { font-style: normal; background: linear-gradient(180deg, var(--gold-light), var(--gold) 55%, var(--gold-dark)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 26px rgba(233, 181, 79, .35)); }
.hero-lead { max-width: 600px; margin: 24px auto 0; color: var(--text-2); font-size: clamp(1rem, 1.7vw, 1.14rem); }

.ip-card {
  display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 14px;
  width: fit-content; max-width: 100%; margin: 36px auto 0; padding: 12px 12px 12px 22px;
  border-radius: var(--r); border: 1px solid var(--border-2);
  background: linear-gradient(135deg, rgba(28, 42, 78, .85), rgba(12, 20, 40, .85));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg), 0 0 0 4px rgba(233, 181, 79, .05);
}
.ip-card .label { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ip-card code { font-family: var(--font-display); font-weight: 700; font-size: clamp(.92rem, 2vw, 1.1rem); color: var(--gold-light); overflow-wrap: anywhere; }
.ip-card .ver { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); font-size: .76rem; color: var(--sub); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 20px; }


/* Inner page header */
.page-header { position: relative; isolation: isolate; overflow: hidden; margin-top: calc(var(--header-h) * -1); padding: calc(var(--header-h) + clamp(40px, 6vw, 72px)) var(--gutter) 170px; text-align: center; border-bottom: 1px solid var(--border); }
.page-header .land.back { height: 192px; background-size: 720px 192px; }
.page-header .land.front { height: 180px; background-size: auto, 600px 180px; }
.page-header h1 { margin: 0; font-size: clamp(1.75rem, 4.2vw, 3rem); }
.page-header p { max-width: 620px; margin: 16px auto 0; color: var(--text-2); }
.breadcrumbs { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; font-size: .82rem; color: var(--sub); }
.breadcrumbs a { color: var(--sub); }
.breadcrumbs a:hover { color: var(--gold); }

/* --------------------------------------------------------------------------
   Stats band
   -------------------------------------------------------------------------- */

.stats-band { position: relative; z-index: 5; border-block: 1px solid var(--border); background: linear-gradient(180deg, rgba(17, 27, 51, .94), rgba(9, 15, 30, .94)); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.stats-band .container { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { position: relative; padding: 26px 16px; text-align: center; }
.stat + .stat::before { content: ''; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: var(--border); }
.stat .value { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, 2.3vw, 1.5rem); font-variant-numeric: tabular-nums; }
.stat .value span { color: var(--gold); }
.stat .label { margin-top: 5px; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sub); }
.stat .names { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 10px; }
.stat .names span { padding: 1px 8px; border-radius: 999px; background: rgba(95, 211, 140, .1); color: var(--green); font-size: .72rem; }
.meter { display: block; appearance: none; width: 100%; max-width: 150px; height: 6px; margin: 12px auto 0; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.meter::-webkit-progress-bar { background: rgba(255, 255, 255, .07); }
.meter::-webkit-progress-value { border-radius: 99px; background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); }
.meter::-moz-progress-bar { border-radius: 99px; background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); }
@media (max-width: 760px) {
  .stats-band .container { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3)::before { display: none; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}

/* --------------------------------------------------------------------------
   Panels & cards
   -------------------------------------------------------------------------- */

.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.grid.metrics { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }

.panel { position: relative; padding: clamp(22px, 3vw, 32px); border-radius: var(--r-lg); border: 1px solid var(--border); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.panel.frost { background: linear-gradient(180deg, rgba(22, 34, 63, .8), rgba(12, 20, 40, .8)); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-lg); }
.panel.accent { border-color: var(--border-gold); background: linear-gradient(160deg, rgba(233, 181, 79, .1), transparent 55%), linear-gradient(180deg, var(--surface-2), var(--surface)); }
.panel.good { border-color: rgba(95, 211, 140, .35); background: linear-gradient(160deg, rgba(95, 211, 140, .09), transparent 55%), linear-gradient(180deg, var(--surface-2), var(--surface)); }
.panel.bad { border-color: rgba(255, 111, 111, .35); background: linear-gradient(160deg, rgba(255, 111, 111, .07), transparent 55%), linear-gradient(180deg, var(--surface-2), var(--surface)); }
.panel h2 { font-size: clamp(1.08rem, 2vw, 1.3rem); }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.panel-head h2, .panel-head h3 { margin: 0; }

.feature { overflow: hidden; transition: transform .3s, border-color .3s, box-shadow .3s; }
.feature::after { content: ''; position: absolute; left: 20%; right: 20%; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: 0; transition: opacity .3s, left .4s, right .4s; }
.feature:hover { transform: translateY(-6px); border-color: var(--border-gold); box-shadow: 0 24px 56px rgba(0, 0, 0, .4); }
.feature:hover::after { opacity: 1; left: 8%; right: 8%; }
.feature .icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 20px; border-radius: 15px; border: 1px solid var(--border-gold); background: radial-gradient(circle at 30% 20%, rgba(233, 181, 79, .25), rgba(233, 181, 79, .03) 70%); }
.feature .icon svg { width: 26px; height: 26px; fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { margin-bottom: 10px; }
.feature p { margin: 0; color: var(--sub); }

/* Portal cards with illustrations */
.portals { display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1080px) { .portals { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .portals { grid-template-columns: 1fr; } }
.portal { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: 370px; border-radius: var(--r-lg); border: 1px solid var(--border); color: var(--text); transition: transform .35s, border-color .35s, box-shadow .35s; }
.portal:hover { color: var(--text); transform: translateY(-8px); border-color: var(--border-gold); box-shadow: 0 30px 64px rgba(0, 0, 0, .5); }
.portal > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; transition: transform .6s; }
.portal:hover > img { transform: scale(1.07); }
.portal::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 32%, rgba(7, 12, 24, .7) 64%, rgba(7, 12, 24, .97)); }
.portal .content { padding: 24px; }
.portal .kind { font-family: var(--font-display); font-size: .6rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }
.portal h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 6px; font-size: 1.18rem; }
.portal h3 span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--border-gold); color: var(--gold); font-size: .9rem; transition: transform .3s, background .3s; }
.portal:hover h3 span { transform: rotate(-45deg); background: rgba(233, 181, 79, .12); }
.portal p { margin: 0; color: var(--sub); font-size: .93rem; }

/* Journey steps */
.journey { position: relative; display: grid; gap: 22px; grid-template-columns: repeat(4, 1fr); counter-reset: jstep; }
.journey::before { content: ''; position: absolute; top: 28px; left: 6%; right: 6%; height: 1px; background: repeating-linear-gradient(90deg, var(--border-gold) 0 8px, transparent 8px 16px); }
@media (max-width: 960px) { .journey { grid-template-columns: 1fr 1fr; } .journey::before { display: none; } }
@media (max-width: 560px) { .journey { grid-template-columns: 1fr; } }
.jstep h3 { margin-bottom: 8px; }
.jstep p { margin: 0; color: var(--sub); }
.jstep::before { counter-increment: jstep; content: counter(jstep); display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 20px; border-radius: 50%; border: 1px solid var(--border-gold); background: radial-gradient(circle at 35% 30%, #253663, #0f1a33); box-shadow: 0 0 0 7px var(--bg), 0 10px 30px rgba(0, 0, 0, .35); font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--gold); }

/* Closing CTA */
.closing { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(80px, 12vw, 136px); text-align: center; border-top: 1px solid var(--border); }
.closing::before { content: ''; position: absolute; inset: 0; z-index: -2; background: radial-gradient(55% 75% at 50% 105%, rgba(233, 181, 79, .17), transparent 70%), radial-gradient(40% 50% at 50% -5%, rgba(113, 184, 255, .09), transparent 70%); }
.closing h2 { font-size: clamp(1.7rem, 4.2vw, 2.9rem); }
.closing p { max-width: 560px; margin: 0 auto 30px; color: var(--sub); }
.closing { padding-bottom: clamp(200px, 22vw, 260px); }

/* --------------------------------------------------------------------------
   Rules & FAQ
   -------------------------------------------------------------------------- */

.doc-layout { display: grid; grid-template-columns: 250px 1fr; gap: 36px; align-items: start; }
@media (max-width: 900px) { .doc-layout { grid-template-columns: 1fr; } .doc-nav { position: static !important; } }
.doc-nav { position: sticky; top: calc(var(--header-h) + 24px); }
.doc-nav .panel { padding: 20px; }
.doc-nav h4 { margin-bottom: 12px; font-size: .62rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.doc-nav ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: dn; }
.doc-nav a { display: flex; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--text-2); font-size: .93rem; }
.doc-nav a::before { counter-increment: dn; content: counter(dn, decimal-leading-zero); padding-top: 2px; font-family: var(--font-display); font-size: .68rem; color: var(--gold); }
.doc-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .045); }

.chapter + .chapter { margin-top: 24px; }
.chapter .panel-head { padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.chapter .panel-head h2 { display: flex; align-items: center; gap: 14px; }
.chapter .panel-head img { width: 34px; height: 34px; image-rendering: pixelated; }
.chapter .panel-head .index { padding: 5px 10px; border-radius: 9px; border: 1px solid var(--border-gold); font-family: var(--font-display); font-size: .74rem; color: var(--gold); }
.clauses { list-style: none; margin: 0; padding: 0; }
.clause { display: grid; grid-template-columns: 48px 1fr auto; gap: 16px; align-items: start; padding: 16px 0; border-bottom: 1px dashed var(--border); }
.clause:last-child { padding-bottom: 0; border-bottom: 0; }
.clause .no { padding-top: 2px; font-family: var(--font-display); font-size: .76rem; color: var(--sub); }
.clause .text { color: var(--text-2); }
@media (max-width: 640px) { .clause { grid-template-columns: 38px 1fr; } .clause .chip { grid-column: 2; justify-self: start; white-space: normal; } }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255, 255, 255, .03); color: var(--text-2); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.chip.warn { color: #ff9e9e; border-color: rgba(255, 111, 111, .3); background: rgba(255, 111, 111, .08); }

.faq { display: grid; gap: 12px; }
.faq details { border-radius: var(--r); border: 1px solid var(--border); background: linear-gradient(180deg, var(--surface-2), var(--surface)); transition: border-color .3s; }
.faq details[open] { border-color: var(--border-gold); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 22px; list-style: none; cursor: pointer; font-weight: 600; font-size: 1.04rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 10px; height: 10px; margin-right: 6px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg) translateY(-3px); transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq .answer { padding: 0 22px 20px; color: var(--sub); white-space: pre-line; }

.how-to { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: ht; }
.how-to li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.how-to li::before { counter-increment: ht; content: counter(ht); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border-gold); background: rgba(233, 181, 79, .07); font-family: var(--font-display); font-weight: 700; color: var(--gold); }
.how-to b { display: block; margin-bottom: 2px; }
.how-to p { margin: 0; color: var(--sub); }
.how-to .ip-card { margin: 12px 0 0; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; min-width: 0; align-content: start; }
.field > label, .field .label { font-size: .92rem; font-weight: 600; color: var(--text-2); }
.hint { font-size: .82rem; color: var(--muted); }
.input {
  width: 100%; min-height: 50px; padding: 12px 16px;
  font: inherit; font-size: 1rem; color: var(--text);
  border-radius: var(--r-sm); border: 1px solid var(--border-2);
  background: rgba(5, 9, 18, .5);
  outline: none; transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.input:hover { border-color: rgba(148, 172, 218, .4); }
.input:focus { border-color: var(--gold); background-color: rgba(5, 9, 18, .72); box-shadow: 0 0 0 4px rgba(233, 181, 79, .14); }
.input::placeholder { color: var(--muted); }
.input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 4px rgba(255, 111, 111, .1); }
textarea.input { min-height: 140px; line-height: 1.55; resize: vertical; }
select.input { appearance: none; padding-right: 44px; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; }
select.input option { background: var(--surface); color: var(--text); }
.field-error { color: #ff9e9e; font-size: .85rem; font-weight: 500; }
.char-count { justify-self: end; margin-top: -4px; font-size: .78rem; color: var(--muted); }

.check { display: flex; align-items: flex-start; gap: 12px; color: var(--text-2); font-size: .94rem; cursor: pointer; }
.check input { appearance: none; flex: none; display: grid; place-items: center; width: 22px; height: 22px; margin: 2px 0 0; border-radius: 7px; border: 1px solid var(--border-2); background: rgba(5, 9, 18, .5); cursor: pointer; transition: background-color .2s, border-color .2s; }
.check input:checked { background: var(--gold); border-color: var(--gold); }
.check input:checked::after { content: ''; width: 6px; height: 11px; margin-top: -2px; border: solid #1c1305; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

.captcha { display: grid; grid-template-columns: auto 1fr; gap: 12px; }
.captcha-box { display: flex; overflow: hidden; border-radius: var(--r-sm); border: 1px solid var(--border-2); background: #e2e8f4; }
.captcha-box img { display: block; width: 170px; height: 50px; }
.captcha-box button { padding: 0 13px; border: 0; border-left: 1px solid rgba(0, 0, 0, .12); background: #cbd5e8; color: #1a2849; font-size: 1.15rem; cursor: pointer; }
.captcha-box button:hover { background: #b8c5de; }
@media (max-width: 480px) { .captcha { grid-template-columns: 1fr; } .captcha-box { justify-self: start; } }

.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }

.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.strength i { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); transition: background-color .3s; }
.strength[data-score="1"] i:nth-child(1) { background: var(--red); }
.strength[data-score="2"] i:nth-child(-n+2) { background: #f0a24b; }
.strength[data-score="3"] i:nth-child(-n+3) { background: var(--gold); }
.strength[data-score="4"] i { background: var(--green); }

/* Auth screens */
.auth-screen { position: relative; isolation: isolate; overflow: hidden; min-height: 100vh; margin-top: calc(var(--header-h) * -1); display: grid; place-items: center; padding: calc(var(--header-h) + 40px) var(--gutter) 80px; }
.auth-screen { padding-bottom: 200px; }
.auth-box { width: 100%; max-width: 470px; }
.auth-box .panel { padding: clamp(26px, 5vw, 40px); }
.auth-title { margin-bottom: 26px; text-align: center; }
.auth-title img { width: 90px; height: auto; margin-bottom: 14px; filter: drop-shadow(0 10px 28px rgba(196, 170, 255, .3)); }
.auth-title h1 { margin-bottom: 8px; font-size: clamp(1.4rem, 3vw, 1.75rem); }
.auth-title p { margin: 0; color: var(--sub); }
.auth-switch { margin: 22px 0 0; text-align: center; color: var(--sub); font-size: .92rem; }

/* --------------------------------------------------------------------------
   Feedback: alerts, toasts, badges
   -------------------------------------------------------------------------- */

.alert { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--r-sm); border: 1px solid var(--border); background: rgba(255, 255, 255, .03); color: var(--text-2); font-size: .94rem; }
.alert::before { flex: none; display: grid; place-items: center; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; font-size: .76rem; font-weight: 700; }
.alert.error { border-color: rgba(255, 111, 111, .35); background: rgba(255, 111, 111, .08); }
.alert.error::before { content: '!'; background: var(--red); color: #fff; }
.alert.warning { border-color: var(--border-gold); background: rgba(233, 181, 79, .08); }
.alert.warning::before { content: '!'; background: var(--gold); color: #1c1305; }
.alert.success { border-color: rgba(95, 211, 140, .35); background: rgba(95, 211, 140, .08); }
.alert.success::before { content: '✓'; background: var(--green); color: #05200e; }
.alert.info::before { content: 'i'; background: var(--sky); color: #05142a; }

.toasts { position: fixed; top: calc(var(--header-h) + 16px); right: 16px; z-index: 150; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 14px; padding: 14px 18px 14px 14px; border-radius: var(--r); border: 1px solid var(--border-2); background: linear-gradient(180deg, rgba(28, 42, 78, .97), rgba(14, 22, 44, .97)); box-shadow: var(--shadow-lg); cursor: pointer; animation: toast-in .45s cubic-bezier(.2, .9, .3, 1.2) both; }
.toast .mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(95, 211, 140, .15); color: var(--green); font-weight: 700; }
.toast.error .mark { background: rgba(255, 111, 111, .15); color: var(--red); }
.toast.warning .mark { background: rgba(233, 181, 79, .15); color: var(--gold); }
.toast.info .mark { background: rgba(113, 184, 255, .15); color: var(--sky); }
.toast b { display: block; margin-bottom: 2px; font-family: var(--font-display); font-size: .78rem; }
.toast span { font-size: .9rem; color: var(--text-2); }
.toast.hide { animation: toast-out .35s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateX(40px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(40px); } }

.status { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; border: 1px solid; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.pending { color: var(--gold); border-color: rgba(233, 181, 79, .35); background: rgba(233, 181, 79, .08); }
.status.approved { color: var(--green); border-color: rgba(95, 211, 140, .35); background: rgba(95, 211, 140, .08); }
.status.rejected { color: #ff9e9e; border-color: rgba(255, 111, 111, .35); background: rgba(255, 111, 111, .08); }
.status.revoked { color: #ff7d7d; border-color: rgba(255, 111, 111, .5); background: rgba(255, 111, 111, .14); }
.status.neutral { color: var(--sub); border-color: var(--border); background: rgba(255, 255, 255, .03); }

.role { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255, 255, 255, .03); font-size: .76rem; font-weight: 600; }
.role.admin { color: #ff9e9e; border-color: rgba(255, 111, 111, .35); }
.role.moderator { color: var(--sky); border-color: rgba(113, 184, 255, .35); }
.role.user { color: var(--text-2); }

/* --------------------------------------------------------------------------
   Data display
   -------------------------------------------------------------------------- */

.table-scroll { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--border); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: .94rem; }
.table th, .table td { padding: 14px 18px; text-align: left; vertical-align: middle; }
.table th { border-bottom: 1px solid var(--border); background: rgba(0, 0, 0, .16); font-family: var(--font-display); font-weight: 500; font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--sub); }
.table tbody tr { transition: background-color .2s; }
.table tbody tr + tr td { border-top: 1px solid var(--border); }
.table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.table .actions { text-align: right; }
.who-cell { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.who-cell .avatar { width: 30px; height: 30px; border-radius: 8px; }

.details { display: grid; grid-template-columns: max-content 1fr; gap: 10px 22px; margin: 0; }
.details dt { color: var(--sub); font-size: .92rem; }
.details dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .details { grid-template-columns: 1fr; gap: 2px; } .details dd { margin-bottom: 10px; } }

.note { margin: 0; padding: 15px 18px; border-radius: var(--r-sm); border: 1px solid var(--border); border-left: 3px solid var(--gold); background: rgba(5, 9, 18, .4); color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, 'JetBrains Mono', Consolas, monospace; font-size: .86rem; color: var(--text-2); overflow-wrap: anywhere; }
.empty-state { padding: 40px 16px; text-align: center; color: var(--sub); }
.empty-state img { width: 48px; margin-bottom: 10px; image-rendering: pixelated; opacity: .85; }

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; color: var(--sub); font-size: .9rem; }

.segmented { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px; border-radius: 14px; border: 1px solid var(--border); background: rgba(5, 9, 18, .4); }
.segmented a { padding: 8px 14px; border-radius: 10px; color: var(--sub); font-size: .9rem; font-weight: 500; }
.segmented a:hover { color: var(--text); background: rgba(255, 255, 255, .045); }
.segmented a[aria-current="page"] { color: #1c1305; background: linear-gradient(180deg, var(--gold-light), var(--gold)); }

.search-form { display: flex; gap: 8px; }
.search-form .input { min-height: 44px; min-width: 220px; }
@media (max-width: 520px) { .search-form { width: 100%; } .search-form .input { min-width: 0; } }

.avatar { display: block; flex: none; background: var(--surface-3); image-rendering: pixelated; }
.profile { display: flex; align-items: center; gap: 20px; }
.profile .avatar { width: 84px; height: 84px; border-radius: 20px; border: 1px solid var(--border-gold); box-shadow: 0 16px 40px rgba(0, 0, 0, .4); }
.profile h2 { margin: 0 0 6px; }

.track { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 18px; }
.track span { position: relative; padding-top: 14px; text-align: center; font-size: .78rem; color: var(--muted); }
.track span::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); }
.track span.done { color: var(--text-2); }
.track span.done::before { background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); }
.track span.fail::before { background: var(--red); }
.track span.ok::before { background: var(--green); }

.history { list-style: none; margin: 0; padding: 0; }
.history li { position: relative; padding: 0 0 20px 28px; }
.history li::before { content: ''; position: absolute; left: 5px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(233, 181, 79, .15); }
.history li::after { content: ''; position: absolute; left: 9px; top: 22px; bottom: 0; width: 1px; background: var(--border); }
.history li:last-child { padding-bottom: 0; }
.history li:last-child::after { display: none; }

/* Apply page */
.with-aside { display: grid; grid-template-columns: 1fr 330px; gap: 28px; align-items: start; }
@media (max-width: 960px) { .with-aside { grid-template-columns: 1fr; } .aside { position: static !important; } }
.aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 18px; }
.tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tips li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; color: var(--sub); font-size: .92rem; }
.tips li::before { content: ''; width: 7px; height: 7px; margin-top: 8px; background: var(--gold); transform: rotate(45deg); }
.form-block { display: grid; gap: 18px; padding-top: 26px; border-top: 1px solid var(--border); }
.form-block:first-of-type { padding-top: 0; border-top: 0; }
.form-block > h3 { display: flex; align-items: center; gap: 12px; margin: 0; }
.form-block > h3 span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--border-gold); color: var(--gold); font-size: .76rem; }
.fields-2 { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 600px) { .fields-2 { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Admin
   -------------------------------------------------------------------------- */

.admin-shell { display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: start; padding-block: clamp(28px, 4vw, 44px) 80px; }
@media (max-width: 1000px) { .admin-shell { grid-template-columns: 1fr; } }
.admin-sidebar { position: sticky; top: calc(var(--header-h) + 24px); }
@media (max-width: 1000px) { .admin-sidebar { position: static; } }
.admin-sidebar .panel { padding: 14px; }
.admin-me { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; padding: 8px 8px 16px; border-bottom: 1px solid var(--border); }
.admin-me .avatar { width: 40px; height: 40px; border-radius: 12px; }
.admin-me b { display: block; font-size: .95rem; }
.admin-links { display: grid; gap: 2px; }
@media (max-width: 1000px) { .admin-links { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); } }
.admin-links a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--text-2); font-size: .94rem; font-weight: 500; }
.admin-links svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.admin-links a:hover { color: var(--text); background: rgba(255, 255, 255, .045); }
.admin-links a[aria-current="page"] { color: var(--gold-light); background: linear-gradient(90deg, rgba(233, 181, 79, .15), rgba(233, 181, 79, .02)); box-shadow: inset 2px 0 0 var(--gold); }
.admin-links .count { margin-left: auto; }
.admin-content { min-width: 0; display: grid; gap: 22px; }
.admin-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; }
.admin-top h1 { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); }
.admin-top .eyebrow { margin-bottom: 8px; }

.metric { display: block; overflow: hidden; color: var(--text); transition: transform .3s, border-color .3s; }
a.metric:hover { color: var(--text); transform: translateY(-4px); border-color: var(--border-gold); }
.metric .num { font-family: var(--font-display); font-weight: 700; font-size: 2rem; line-height: 1.1; }
.metric .cap { margin-top: 4px; color: var(--sub); font-size: .88rem; }
.metric::after { content: ''; position: absolute; top: -34px; right: -34px; width: 112px; height: 112px; border-radius: 50%; background: radial-gradient(closest-side, var(--tint, rgba(233, 181, 79, .2)), transparent); }
.metric.pending { --tint: rgba(233, 181, 79, .26); } .metric.pending .num { color: var(--gold); }
.metric.approved { --tint: rgba(95, 211, 140, .22); } .metric.approved .num { color: var(--green); }
.metric.rejected { --tint: rgba(255, 111, 111, .22); } .metric.rejected .num { color: #ff9e9e; }
.metric.users { --tint: rgba(113, 184, 255, .22); } .metric.users .num { color: var(--sky); }

.verdict { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .verdict { grid-template-columns: 1fr; } }

.edit-item { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 20px 0; border-top: 1px solid var(--border); }
.edit-item:first-of-type { padding-top: 0; border-top: 0; }
.edit-item .fields { display: grid; gap: 10px; }
.edit-item .fields.pair { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .edit-item, .edit-item .fields.pair { grid-template-columns: 1fr; } }

.temp-password { padding: 18px; border-radius: var(--r-sm); border: 1px dashed var(--border-gold); background: rgba(5, 9, 18, .5); text-align: center; font-family: var(--font-display); font-weight: 700; font-size: clamp(1rem, 2.4vw, 1.4rem); letter-spacing: .08em; color: var(--gold-light); overflow-wrap: anywhere; }

.services { display: grid; gap: 12px; }
.service { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: rgba(5, 9, 18, .3); }
.service .glyph { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .05); font-size: 1.1rem; }
.service div { flex: 1; min-width: 0; }
.service b { display: block; font-size: .95rem; }

/* --------------------------------------------------------------------------
   Error page
   -------------------------------------------------------------------------- */

.error-screen { position: relative; isolation: isolate; overflow: hidden; min-height: 100vh; margin-top: calc(var(--header-h) * -1); display: grid; place-items: center; padding: calc(var(--header-h) + 40px) var(--gutter) 230px; text-align: center; }
.error-screen .digits { font-family: var(--font-display); font-weight: 800; font-size: clamp(5rem, 18vw, 11rem); line-height: 1; background: linear-gradient(180deg, var(--gold-light), var(--gold-dark)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 20px 50px rgba(233, 181, 79, .25)); }
.error-screen h1 { margin: 10px 0 12px; font-size: clamp(1.4rem, 3vw, 2rem); }
.error-screen p { max-width: 480px; margin: 0 auto 28px; color: var(--sub); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer { margin-top: auto; padding: 64px var(--gutter) 0; border-top: 1px solid var(--border); background: var(--bg-deep); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; max-width: var(--max); margin: 0 auto; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid .intro { grid-column: 1 / -1; } }
.footer-grid .intro p { max-width: 38ch; margin: 16px 0 0; color: var(--sub); font-size: .94rem; }
.footer-grid h4 { margin-bottom: 18px; font-family: var(--font-display); font-weight: 500; font-size: .62rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid ul a { color: var(--text-2); font-size: .94rem; }
.footer-grid ul a:hover { color: var(--gold-light); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; max-width: var(--max); margin: 48px auto 0; padding: 22px 0 28px; border-top: 1px solid var(--border); color: var(--muted); font-size: .82rem; }
.footer-bottom i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--red); vertical-align: 1px; }
.footer-bottom i.on { background: var(--green); }
