/* 7API console — dark glass on a phosphor-green field, lifted from the bot banner. */
:root {
  color-scheme: dark;
  --ink-0: #050807;          /* page */
  --ink-1: #0b120f;
  --surface-1: #0f1613;      /* chart surface */
  --glass: rgba(16, 28, 22, .52);
  --glass-hi: rgba(28, 48, 38, .55);
  --glass-line: rgba(140, 255, 196, .11);
  --glass-line-hi: rgba(140, 255, 196, .26);
  --text-primary: #ecfff5;
  --text-secondary: #a6c2b4;
  --text-muted: #6d8a7c;
  --neon: #22f08a;           /* banner green */
  --neon-2: #20d070;
  --mint: #c0f0e0;
  --neon-glow: rgba(34, 240, 138, .45);
  --neon-ink: #03140b;
  /* data viz — validated dark categorical (green/blue/orange) */
  --series-1: #1aa864;
  --series-2: #3987e5;
  --series-3: #d95926;
  --good: #0ca30c; --warning: #fab219; --critical: #d03b3b;
  --r-lg: 22px; --r-md: 14px; --r-sm: 10px;
  --f-display: 'Unbounded', 'Onest', sans-serif;
  --f-body: 'Onest', ui-sans-serif, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--ink-0);
  color: var(--text-primary);
  font: 15px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: var(--neon); color: var(--neon-ink); }
:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; border-radius: 8px; }

/* ---------- atmosphere ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg__grid {
  position: absolute; inset: -50% -10% 0;
  background-image:
    linear-gradient(rgba(34, 240, 138, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 240, 138, .07) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(700px) rotateX(58deg) translateY(30%);
  transform-origin: 50% 100%;
  mask-image: linear-gradient(to top, #000 0%, transparent 62%);
  animation: gridrun 14s linear infinite;
}
@keyframes gridrun { to { background-position: 0 56px, 0 0; } }
.bg__orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; }
.bg__orb--a { width: 620px; height: 620px; left: -180px; top: -220px; background: radial-gradient(circle, #0e8f4f, transparent 70%); animation: drift 22s ease-in-out infinite alternate; }
.bg__orb--b { width: 520px; height: 520px; right: -160px; top: 20%; background: radial-gradient(circle, #0a5c3a, transparent 70%); animation: drift 26s ease-in-out infinite alternate-reverse; }
.bg__orb--c { width: 380px; height: 380px; left: 40%; bottom: -200px; background: radial-gradient(circle, #1ad07a, transparent 70%); opacity: .25; }
@keyframes drift { to { transform: translate(80px, 60px) scale(1.1); } }
.bg__grain {
  position: absolute; inset: 0; opacity: .08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- glass ---------- */
.glass {
  background: linear-gradient(155deg, var(--glass-hi), var(--glass) 46%);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-lg);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 30px 60px -30px rgba(0, 0, 0, .7);
  position: relative;
}
.glass::before { /* specular rim */
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1px;
  background: linear-gradient(140deg, rgba(160, 255, 210, .35), transparent 30%, transparent 70%, rgba(34, 240, 138, .18));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

/* ---------- type ---------- */
.display { font: 800 clamp(34px, 5vw, 64px)/1.02 var(--f-display); letter-spacing: -.035em; margin: 0 0 18px; }
.display--md { font-size: clamp(28px, 3.6vw, 44px); font-weight: 700; margin-bottom: 6px; }
.display--sm { font-size: clamp(26px, 3vw, 38px); font-weight: 700; margin: 0; }
.glow { color: var(--neon); text-shadow: 0 0 24px var(--neon-glow), 0 0 2px #fff6; }
.h2 { font: 700 24px/1.2 var(--f-display); letter-spacing: -.02em; margin: 4px 0 22px; }
.h3 { font: 600 14px/1.3 var(--f-display); letter-spacing: .01em; margin: 0; color: var(--text-primary); }
.eyebrow { font: 500 11px/1 var(--f-mono); letter-spacing: .22em; text-transform: uppercase; color: var(--neon); margin-bottom: 10px; }
.lede { color: var(--text-secondary); font-size: 17px; max-width: 54ch; margin: 0; }
.lede--sm { font-size: 15px; margin-top: 10px; }
.muted { color: var(--text-secondary); }
.small { font-size: 13px; }
.mono { font-family: var(--f-mono); }
.accent { color: var(--neon); }
.link { color: var(--neon); }
.link:hover { text-decoration: underline; }
.mt { margin-top: 22px !important; }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background .2s, border-color .2s;
}
.btn:active { transform: scale(.97); }
.btn--primary {
  background: linear-gradient(180deg, #5dffb0, var(--neon) 40%, var(--neon-2));
  color: var(--neon-ink);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .25) inset, 0 10px 30px -8px var(--neon-glow);
}
.btn--primary:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, .35) inset, 0 12px 40px -6px rgba(34, 240, 138, .75); transform: translateY(-1px); }
.btn--ghost { background: rgba(140, 255, 196, .05); border-color: var(--glass-line-hi); color: var(--text-primary); }
.btn--ghost:hover { background: rgba(140, 255, 196, .1); border-color: rgba(140, 255, 196, .45); }
.btn--sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-busy { opacity: .6; pointer-events: none; }
.btn.is-busy::after { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid transparent;
  background: transparent; cursor: pointer; color: var(--text-secondary); transition: .2s;
}
.icon-btn:hover { color: var(--neon); background: rgba(34, 240, 138, .08); border-color: var(--glass-line); }

.field { display: grid; gap: 8px; }
.field__label { font: 500 12px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.field__wrap { position: relative; display: block; }
.field__eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--text-muted); cursor: pointer; padding: 6px; }
.input {
  width: 100%; height: 48px; padding: 0 16px; border-radius: var(--r-md);
  background: rgba(3, 10, 7, .6); border: 1px solid var(--glass-line-hi); color: var(--text-primary);
  font: 15px var(--f-body); transition: border-color .2s, box-shadow .2s;
}
.input.mono { font-family: var(--f-mono); font-size: 14px; }
.input::placeholder { color: var(--text-muted); }
.input:focus { outline: none; border-color: var(--neon); box-shadow: 0 0 0 4px rgba(34, 240, 138, .14); }
.form-error { color: #ff8a8a; font-size: 13px; min-height: 1em; margin: 8px 0 0; }

/* ---------- login ---------- */
/* One viewport tall on desktop: top bar, then hero + card centred in the rest.
   The banner is an ambient backdrop on the right, never a block that pushes
   the headline down. */
.login {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr;
  padding: 0 clamp(20px, 5vw, 72px);
}
.login__art { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.login__art img {
  position: absolute; right: -4%; top: 50%; transform: translateY(-50%);
  width: min(62vw, 1100px); height: auto; opacity: .55;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 60% 50%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 60% 50%, #000 30%, transparent 75%);
  animation: artin 1.4s var(--ease) both;
}
@keyframes artin { from { opacity: 0; transform: translateY(-50%) scale(1.04); } }
.login__top {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; width: 100%; margin: 0 auto; padding-top: clamp(24px, 4.5vh, 44px);
}
.login__body {
  position: relative; z-index: 1; width: 100%; max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: clamp(32px, 6vw, 96px);
  align-items: center; padding: clamp(16px, 4vh, 48px) 0 clamp(32px, 8vh, 96px);
}
.login__hero { min-width: 0; }
.login__hero > * { animation: rise .9s var(--ease) both; }
.login__hero > :nth-child(2) { animation-delay: .06s; }
.login__hero > :nth-child(3) { animation-delay: .12s; }
.login__hero > :nth-child(4) { animation-delay: .18s; }
.login .display { font-size: clamp(34px, 4.2vw, 56px); margin-bottom: 20px; }
.login .lede { font-size: clamp(15px, 1.25vw, 17px); max-width: 46ch; }
.login__ticks { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.login__ticks li {
  padding: 10px 14px; border-radius: 12px; border: 1px solid var(--glass-line);
  background: rgba(10, 20, 15, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: grid; gap: 1px;
}
.login__ticks b { font: 600 13px var(--f-display); color: var(--neon); }
.login__ticks span { font-size: 12px; color: var(--text-secondary); }
.login__card { padding: 30px; animation: rise .9s .15s var(--ease) both; }
.login__card .h2 { margin: 0 0 22px; font-size: 22px; }
.keyform { display: grid; gap: 14px; }
.keyform .form-error { margin: 0; min-height: 0; }
.keyform .form-error:empty { display: none; }
.tg-login { display: grid; gap: 18px; margin-bottom: 18px; justify-items: center; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 12px; width: 100%; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--glass-line-hi); }
.login__alt { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--glass-line); display: grid; gap: 12px; }
.login__alt p { margin: 0; }
.login__alt .form-error:empty { display: none; }
#saveCard { display: grid; gap: 16px; }
#saveCard[hidden] { display: none; }
#saveCard .h2 { margin: 0; }
.save__lede { margin: -4px 0 0; line-height: 1.55; }
.save__key { margin: 0; padding: 14px 16px; }
.save__key .secret__val { white-space: normal; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; user-select: all; }
.save__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.save__actions .btn.is-done { border-color: var(--neon); color: var(--neon); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--text-secondary); cursor: pointer; line-height: 1.45; }
.check input { appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border-radius: 6px; border: 1.5px solid var(--glass-line-hi);
  background: rgba(255, 255, 255, .04); display: grid; place-items: center; cursor: pointer; transition: background .15s, border-color .15s; }
.check input::after { content: ''; width: 10px; height: 6px; border: 2px solid #04140b; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check input:checked { background: var(--neon); border-color: var(--neon); }
.check input:checked::after { opacity: 1; }
.check input:focus-visible { outline: 2px solid var(--neon); outline-offset: 2px; }
.check:has(input:disabled) { cursor: not-allowed; opacity: .55; }
.check input:disabled { cursor: not-allowed; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 16px; margin: 16px 0 16px 16px; height: calc(100vh - 32px);
  display: flex; flex-direction: column; padding: 22px 14px; border-radius: 26px;
  overflow-y: auto; scrollbar-width: none;
}
.side::-webkit-scrollbar { display: none; }
.brand { display: flex; align-items: center; justify-content: center; padding: 0 8px 22px; }
.brand__logo { display: block; height: 72px; width: auto; filter: drop-shadow(0 0 14px rgba(34, 240, 138, .28)); }
.brand--sm { padding: 0; justify-content: flex-start; }
.brand--sm .brand__logo { height: 52px; }
.topbar .brand__logo { height: 40px; }
.nav { display: grid; gap: 3px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px;
  color: var(--text-secondary); font-weight: 500; position: relative; transition: color .2s, background .2s;
}
.nav a:hover { color: var(--text-primary); background: rgba(140, 255, 196, .05); }
.nav a.is-active { color: var(--text-primary); background: linear-gradient(90deg, rgba(34, 240, 138, .16), rgba(34, 240, 138, .02)); }
.nav a.is-active::before {
  content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--neon); box-shadow: 0 0 12px var(--neon);
}
.nav a.is-active svg { color: var(--neon); filter: drop-shadow(0 0 6px var(--neon-glow)); }
.pill { margin-left: auto; font: 600 9px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; font-style: normal;
  padding: 3px 7px; border-radius: 99px; color: var(--neon-ink); background: var(--neon); }
.side__foot { margin-top: auto; display: grid; gap: 12px; padding: 16px 0 0; border-top: 1px solid var(--glass-line); }
.side__balance, #logout { margin: 0 8px; }
.side__tg {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; min-width: 0;
  color: var(--neon); background: linear-gradient(135deg, rgba(34, 240, 138, .18), rgba(34, 240, 138, .05));
  border: 1px solid rgba(34, 240, 138, .45); box-shadow: 0 0 22px -6px var(--neon-glow), inset 0 0 0 1px rgba(255, 255, 255, .04);
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.side__tg:hover { transform: translateY(-1px); border-color: var(--neon); box-shadow: 0 0 28px -4px var(--neon-glow), inset 0 0 0 1px rgba(255, 255, 255, .06); }
.side__tg > svg:first-child { width: 20px; height: 20px; fill: currentColor; stroke: none; filter: drop-shadow(0 0 8px var(--neon-glow)); flex: none; }
.side__tg-text { display: grid; gap: 1px; min-width: 0; line-height: 1.2; }
.side__tg-text b { font-size: 13px; color: var(--text-primary); white-space: nowrap; }
.side__tg-text small { font: 500 11px var(--f-mono); color: var(--neon); overflow: hidden; text-overflow: ellipsis; }
.side__tg-arrow { margin-left: auto; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.side__balance { display: grid; gap: 2px; }
.side__balance b { font-size: 20px; color: var(--neon); }
.topbar { display: none; }

.main { padding: 34px clamp(18px, 4vw, 56px) 80px; min-width: 0; outline: none; }
.view { display: none; max-width: 1180px; margin: 0 auto; }
.view.is-active { display: grid; gap: 22px; animation: viewin .55s var(--ease) both; }
.view.is-active > * { animation: rise .6s var(--ease) both; }
.view.is-active > *:nth-child(2) { animation-delay: .05s; }
.view.is-active > *:nth-child(3) { animation-delay: .1s; }
.view.is-active > *:nth-child(4) { animation-delay: .15s; }
.view.is-active > *:nth-child(5) { animation-delay: .2s; }
@keyframes viewin { from { opacity: 0; } }
.view__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 6px; }

.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Overview tiles: as many columns as there are visible tiles (the bonus tile hides once claimed). */
.grid--tiles { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.card { padding: 26px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }

/* ---------- overview ---------- */
.glass--hero { padding: 0; overflow: hidden; min-height: 300px; display: grid; }
.hero__art {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%;
  opacity: .78; mask-image: linear-gradient(90deg, transparent 8%, #000 62%);
}
.glass--hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 10, 8, .92) 25%, rgba(5, 10, 8, .2) 75%); pointer-events: none; }
.hero__body { position: relative; z-index: 1; padding: 38px; display: grid; align-content: center; gap: 4px; }
.hero__balance { margin: 0 0 26px; }
.hero__label { font: 500 17px/1.3 var(--f-body); color: var(--text-secondary); margin-bottom: 10px; }
.bignum { margin: 0; }
.bignum { font: 600 clamp(40px, 6vw, 68px)/1 'Space Grotesk', var(--f-body); font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--neon); text-shadow: 0 0 34px var(--neon-glow); }
.bignum small { font-size: .45em; color: var(--text-secondary); text-shadow: none; margin-left: 2px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.secret {
  display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 16px; margin-top: 10px; border-radius: var(--r-md);
  background: rgba(2, 8, 5, .65); border: 1px solid var(--glass-line);
}
.secret__val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; color: var(--mint); }
.secret__val.is-masked { letter-spacing: .08em; color: var(--text-secondary); }

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 22px; }
.kpis--wide { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); padding: 24px 28px; }
.kpi { display: grid; gap: 4px; }
.kpi__label { font: 500 11px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.kpi__val { font-size: 24px; font-weight: 600; letter-spacing: -.02em; overflow-wrap: anywhere; }
.kpi__sub { font-size: 12px; color: var(--text-secondary); }
.profile-meta { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--glass-line); display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--text-secondary); }
.profile-meta b { color: var(--text-primary); font-family: var(--f-mono); font-weight: 400; }

.tile { padding: 22px; display: grid; gap: 8px; align-content: start; transition: transform .3s var(--ease), border-color .3s; }
a.tile:hover { transform: translateY(-3px); border-color: var(--glass-line-hi); }
.tile__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--neon);
  background: rgba(34, 240, 138, .09); border: 1px solid var(--glass-line); margin-bottom: 6px; }
.tile__title { font: 600 15px var(--f-display); }
.tile__body { font-size: 14px; }
.tile__actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.dotrow { display: inline-flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.dotrow span { display: inline-flex; gap: 6px; align-items: center; }

/* ---------- status marks (icon + label, never color alone) ---------- */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.st i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 3px rgba(255,255,255,.04); }
.st--up i { background: var(--good); box-shadow: 0 0 10px var(--good); }
.st--degraded i { background: var(--warning); border-radius: 2px; transform: rotate(45deg); }
.st--down i { background: var(--critical); border-radius: 2px; }
.st--unknown i { background: var(--text-muted); }

/* ---------- segmented ---------- */
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: rgba(3, 10, 7, .6); border: 1px solid var(--glass-line); }
.seg button { border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; cursor: pointer; color: var(--text-secondary); font-weight: 500; font-size: 13px; transition: .2s; }
.seg button:hover { color: var(--text-primary); }
.seg button[aria-selected="true"] { background: var(--neon); color: var(--neon-ink); box-shadow: 0 0 20px -4px var(--neon-glow); }

/* ---------- usage chart ---------- */
.mix { display: flex; height: 22px; gap: 2px; margin: 8px 0 18px; }
.mix__seg { height: 100%; min-width: 4px; transition: flex-grow .6s var(--ease), opacity .2s; cursor: default; }
.mix__seg:first-child { border-radius: 4px 0 0 4px; }
.mix__seg:last-child { border-radius: 0 4px 4px 0; }
.mix__seg:only-child { border-radius: 4px; }
.mix:hover .mix__seg:not(:hover) { opacity: .45; }
.mix--empty { background: rgba(140, 255, 196, .06); border-radius: 4px; }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.legend li { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 10px; align-items: center; font-size: 14px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; }
.legend b { font-family: var(--f-mono); font-weight: 500; }
.legend em { font-style: normal; color: var(--text-muted); font-size: 12px; min-width: 52px; text-align: right; font-family: var(--f-mono); }
.topmodels { display: grid; gap: 14px; }
.tm { display: grid; gap: 6px; }
.tm__row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.tm__row code { font-family: var(--f-mono); font-size: 13px; color: var(--text-primary); }
.tm__bar { height: 8px; border-radius: 0 4px 4px 0; background: rgba(140, 255, 196, .06); overflow: hidden; }
.tm__bar span { display: block; height: 100%; background: var(--series-1); border-radius: 0 4px 4px 0; transition: width .7s var(--ease); }
.saved-callout { margin-top: 22px; padding: 16px 18px; border-radius: var(--r-md); border: 1px dashed rgba(34, 240, 138, .35);
  background: rgba(34, 240, 138, .05); font-size: 14px; color: var(--text-secondary); }
.saved-callout b { color: var(--neon); font-family: var(--f-mono); font-size: 18px; }
.empty { color: var(--text-muted); font-size: 14px; padding: 8px 0; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); padding: 10px 12px; border-bottom: 1px solid var(--glass-line-hi); }
.table td { padding: 12px; border-bottom: 1px solid var(--glass-line); font-family: var(--f-mono); font-size: 13px; }
.table td:first-child { font-family: var(--f-body); font-size: 14px; color: var(--text-secondary); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }

/* ---------- funds ---------- */
.topup { padding: 0; overflow: hidden; }
.amounts { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; padding: 22px; }
/* Each key fills from the bottom in proportion to its bonus. */
.amount {
  position: relative; overflow: hidden; height: 128px; padding: 16px 14px; border-radius: 16px; cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; text-align: left;
  font: inherit; color: var(--text-primary); background: rgba(5, 10, 8, .5); border: 1px solid var(--glass-line);
  transition: border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.amount::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--fill) * 78%); pointer-events: none;
  background: linear-gradient(0deg, rgba(34, 240, 138, .22), rgba(34, 240, 138, .03));
  border-top: 1px solid rgba(34, 240, 138, .35); transition: height .5s var(--ease), background .25s;
}
.amount:hover { border-color: var(--glass-line-hi); transform: translateY(-2px); }
.amount:focus-visible { outline: 2px solid var(--neon); outline-offset: 2px; }
.amount[aria-checked="true"] { border-color: var(--neon); box-shadow: 0 0 0 1px var(--neon) inset, 0 16px 40px -22px var(--neon-glow); }
.amount[aria-checked="true"]::before { background: linear-gradient(0deg, rgba(34, 240, 138, .42), rgba(34, 240, 138, .06)); border-top-color: var(--neon); }
.amount > span { position: relative; }
.amount__val { font: 600 28px/1 'Space Grotesk', var(--f-body); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.amount__val small { font-size: .55em; color: var(--text-secondary); vertical-align: .55em; margin-right: 1px; }
.amount__bonus { font: 600 12px var(--f-mono); color: var(--neon); }
.amount[aria-checked="true"] .amount__bonus { color: var(--text-primary); }
.amount__tag { position: absolute !important; top: 14px; right: 12px; font: 600 9px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }

.topup__foot { display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap;
  padding: 22px 26px; border-top: 1px solid var(--glass-line); background: rgba(5, 10, 8, .35); }
.topup__get { display: grid; gap: 2px; }
.topup__label { font-size: 13px; color: var(--text-muted); }
.topup__credit { font: 600 40px/1.05 'Space Grotesk', var(--f-body); font-variant-numeric: tabular-nums; letter-spacing: -.03em; color: var(--neon); text-shadow: 0 0 28px var(--neon-glow); }
.topup__plus { font-size: 13px; color: var(--text-secondary); }
.topup__act { display: grid; justify-items: end; gap: 8px; }
.topup__note { font-size: 12px; color: var(--text-muted); }
.topup__note code { cursor: pointer; color: var(--text-secondary); }
.topup__note code:hover { color: var(--neon); }
.topup__act .form-error:empty { display: none; }

@media (max-width: 600px) {
  .amounts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 14px; }
  .amount { height: 104px; padding: 12px 10px; border-radius: 13px; }
  .amount__val { font-size: 22px; }
  .amount__bonus { font-size: 11px; }
  .amount__tag { display: none; }
  .topup__foot { padding: 18px; }
  .topup__credit { font-size: 32px; }
  .topup__act { justify-items: stretch; width: 100%; }
}

/* ---------- pricing ---------- */
.search { position: relative; display: block; min-width: 260px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.search .input { padding-left: 42px; height: 44px; border-radius: 999px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--glass-line-hi); background: rgba(140, 255, 196, .04); color: var(--text-secondary); padding: 7px 14px; border-radius: 999px; font-size: 13px; cursor: pointer; transition: .2s; }
.chip:hover { color: var(--text-primary); }
.chip[aria-pressed="true"] { background: rgba(34, 240, 138, .14); border-color: var(--neon); color: var(--text-primary); }
.pricegrid { display: grid; gap: 22px; }
.pgroup h3 { font: 600 13px var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 12px; display: flex; align-items: center; gap: 12px; }
.pgroup h3::after { content: ''; flex: 1; height: 1px; background: var(--glass-line); }
.prows { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr)); gap: 12px; }
.prow { padding: 16px 14px; border-radius: var(--r-md); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; align-items: center; }
.prow__name { font-weight: 600; display: flex; align-items: center; gap: 6px; min-width: 0; }
.prow__name .tag { margin-left: 0; flex: none; }
.prow__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow__id { grid-column: 1; font: 12px var(--f-mono); color: var(--text-muted); display: flex; gap: 6px; align-items: center; cursor: pointer; min-width: 0; }
.prow__id svg { flex: none; }
.prow__id:hover { color: var(--neon); }
.prow__price { grid-row: 1 / span 2; grid-column: 2; text-align: right; }
.prow__price b { display: block; font: 600 20px var(--f-mono); color: var(--neon); letter-spacing: -.02em; }
.prow__price span { font: 12px var(--f-mono); color: var(--text-muted); }
.tag { font: 600 9px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; border: 1px solid rgba(250, 178, 25, .4); color: #ffd27a; margin-left: 6px; vertical-align: 2px; }

/* ---------- status ---------- */
.status-groups { display: grid; gap: 22px; }
.sgroup { padding: 8px 8px 4px; }
.sgroup__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px 8px; }
.sgroup__head h3 { font: 600 15px var(--f-display); margin: 0; }
.srow { display: grid; grid-template-columns: minmax(170px, 1.4fr) 110px minmax(120px, 1fr) 80px 90px; gap: 16px; align-items: center; padding: 12px 18px; border-radius: 12px; }
.srow:hover { background: rgba(140, 255, 196, .04); }
.srow code { font-family: var(--f-mono); font-size: 13px; }
.srow .mono { font-size: 13px; text-align: right; }
.uptime { position: relative; height: 6px; border-radius: 4px; background: rgba(140, 255, 196, .07); overflow: hidden; }
.uptime span { position: absolute; inset: 0 auto 0 0; border-radius: 0 4px 4px 0; background: var(--series-1); }
.srow__head { color: var(--text-muted); font: 500 10.5px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; padding-top: 4px; padding-bottom: 4px; }
.srow__head:hover { background: none; }

/* ---------- setup ---------- */
.steps { display: flex; gap: 10px; align-items: center; }
.step { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 13px; }
.step + .step::before { content: ''; width: 34px; height: 1px; background: var(--glass-line-hi); margin-right: 2px; }
.step__n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 600 11px var(--f-mono); border: 1px solid var(--glass-line-hi); }
.step.is-done { color: var(--text-primary); }
.step.is-done .step__n { background: var(--neon); color: var(--neon-ink); border-color: var(--neon); }
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tool { padding: 18px; display: grid; gap: 10px; cursor: pointer; text-align: left; border: 1px solid var(--glass-line); transition: .25s var(--ease); }
.tool:hover { border-color: var(--glass-line-hi); transform: translateY(-2px); }
.tool[aria-pressed="true"] { border-color: var(--neon); box-shadow: 0 0 0 1px var(--neon) inset, 0 14px 40px -18px var(--neon-glow); }
.tool__glyph { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); border: 1px solid var(--glass-line); }
.tool__glyph img { width: 22px; height: 22px; display: block; }
.tool__name { font-weight: 600; font-size: 14px; }
.seg--os { justify-self: start; }
.guide { display: grid; gap: 14px; }
.md { color: var(--text-secondary); font-size: 15px; }
.md p { margin: 0 0 12px; }
.md strong { color: var(--text-primary); }
.md h4 { font: 600 18px var(--f-display); color: var(--text-primary); margin: 0 0 14px; }
.md code { font-family: var(--f-mono); font-size: 13px; color: var(--mint); background: rgba(34, 240, 138, .07); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--glass-line); word-break: break-all; }
.md a { color: var(--neon); }
.code {
  position: relative; margin: 6px 0 16px; border-radius: var(--r-md); background: #030806; border: 1px solid var(--glass-line);
  overflow: hidden;
}
.code__bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--glass-line); font: 11px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.code__bar div { display: flex; gap: 4px; }
.code pre { margin: 0; padding: 16px; overflow: auto; max-height: 460px; font: 12.5px/1.6 var(--f-mono); color: #d6ffe9; }
.code pre .k { color: #7cf5b8; }
.code pre .s { color: #ffd59a; }
.code pre .n { color: #9fc4ff; }

/* ---------- subkeys ---------- */
.subform { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 16px; align-items: end; }
.subform .form-error { grid-column: 1 / -1; margin: 0; }
.sublist { display: grid; gap: 12px; }
.subkey { padding: 18px 22px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.4fr) auto auto; gap: 18px; align-items: center; }
.subkey__label { font-weight: 600; }
.subkey__meta { font-size: 12px; color: var(--text-muted); font-family: var(--f-mono); }
.subkey .secret { margin: 0; }
.subkey__bal { text-align: right; }
.subkey__bal b { display: block; font: 600 18px var(--f-mono); color: var(--neon); }
.subkey__bal span { font-size: 12px; color: var(--text-muted); }
.subkey__actions { display: flex; gap: 6px; }
.subkey.is-revoked { opacity: .5; }

/* ---------- referral ---------- */
.ref-hero { padding: 34px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; align-items: center; overflow: hidden; }
.ref-hero__big { font: 800 clamp(56px, 8vw, 96px)/.9 var(--f-display); color: var(--neon); text-shadow: 0 0 40px var(--neon-glow); letter-spacing: -.05em; }
.ref-hero__big small { font-size: .35em; letter-spacing: 0; color: var(--text-primary); text-shadow: none; display: block; margin-top: 10px; font-weight: 600; }
.ref-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: s; }
.ref-steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; color: var(--text-secondary); }
.ref-steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 600 12px var(--f-mono); color: var(--neon); border: 1px solid var(--glass-line-hi); }
.ref-steps b { color: var(--text-primary); }

/* ---------- support ---------- */
.note { margin-top: 22px; padding: 16px 18px; border-radius: var(--r-md); background: rgba(250, 178, 25, .06); border: 1px solid rgba(250, 178, 25, .22); font-size: 14px; color: var(--text-secondary); }
.note b { color: #ffd27a; }
.card > p.muted { margin: 10px 0 20px; }
.faq { border-bottom: 1px solid var(--glass-line); padding: 14px 0; }
.faq:last-child { border-bottom: 0; }
.faq__q { margin: 0; font: 600 15px/1.4 var(--f-body); color: var(--text-primary); }
.faq p { margin: 10px 0 0; color: var(--text-secondary); font-size: 14px; }

/* ---------- toasts / modal / tooltip ---------- */
.toasts { position: fixed; bottom: 24px; right: 24px; display: grid; gap: 10px; z-index: 50; }
.toast {
  padding: 13px 18px; border-radius: 14px; background: rgba(12, 24, 18, .92); border: 1px solid var(--glass-line-hi);
  backdrop-filter: blur(14px); font-size: 14px; display: flex; gap: 10px; align-items: center; max-width: 380px;
  box-shadow: 0 20px 40px -10px #000; animation: toastin .4s var(--ease) both;
}
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 10px var(--neon); flex: none; }
.toast--err::before { background: var(--critical); box-shadow: 0 0 10px var(--critical); }
.toast.is-out { animation: toastout .3s var(--ease) both; }
@keyframes toastin { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes toastout { to { opacity: 0; transform: translateX(30px); } }
.modal { padding: 0; border: 1px solid var(--glass-line-hi); color: var(--text-primary); max-width: 440px; width: calc(100% - 32px); background: rgba(10, 20, 15, .92); }
.modal::backdrop { background: rgba(0, 4, 2, .7); backdrop-filter: blur(6px); }
.modal[open] { animation: rise .35s var(--ease) both; }
.modal__inner { padding: 28px; display: grid; gap: 16px; }
.modal__inner h3 { font: 700 20px var(--f-display); margin: 0; }
.modal__inner p { margin: 0; color: var(--text-secondary); }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.tip { position: fixed; z-index: 60; pointer-events: none; padding: 9px 12px; border-radius: 10px; background: rgba(6, 14, 10, .95); border: 1px solid var(--glass-line-hi); font-size: 12px; box-shadow: 0 10px 30px #000; }
.tip b { font-family: var(--f-mono); color: var(--text-primary); }

.skeleton { background: linear-gradient(90deg, rgba(140,255,196,.04), rgba(140,255,196,.1), rgba(140,255,196,.04)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 10px; min-height: 60px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .grid--3 { grid-template-columns: 1fr 1fr; }
  .grid--tiles { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
  .grid--tiles:not(:has(> [hidden])) > .tile:last-child { grid-column: 1 / -1; }
  .subkey { grid-template-columns: 1fr auto; }
  .subkey .secret { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 880px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 40; left: 0; top: 0; margin: 10px; height: calc(100vh - 20px); width: 260px; transform: translateX(-110%); transition: transform .4s var(--ease); }
  .shell.nav-open .side { transform: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 10px; z-index: 30; margin: 10px; padding: 10px 12px 10px 18px; border-radius: 18px; }
  .topbar__bal { margin-left: auto; color: var(--neon); }
  .main { padding-top: 14px; }
  .grid--2, .grid--3, .grid--tiles { grid-template-columns: 1fr; }
  .grid--tiles > .tile:last-child { grid-column: auto; }
  .subform { grid-template-columns: 1fr; }
  .ref-hero { grid-template-columns: 1fr; }
  .srow { grid-template-columns: 1fr auto; gap: 6px 14px; }
  .srow .uptime, .srow__head { display: none; }
  .srow > :nth-child(4), .srow > :nth-child(5) { display: none; }
  .hero__art { opacity: .4; mask-image: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .mix__seg, .tm__bar span, .uptime span { forced-color-adjust: none; border: 1px solid CanvasText; }
}

/* Grid children must be allowed to shrink below their content width. */
.view.is-active { grid-template-columns: minmax(0, 1fr); }
.view > *, .grid > *, .hero__body, .ref-hero > * { min-width: 0; }
@media (max-width: 880px) {
  .view__head { align-items: stretch; }
  .view__head > * { min-width: 0; }
  .seg { max-width: 100%; overflow-x: auto; }
  .seg button { padding: 8px 12px; }
  .kpis--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 20px; }
  .kpi__val { font-size: 20px; }
  .ref-hero { padding: 24px; }
  .ref-hero__big { font-size: 64px; }
  .search { min-width: 0; width: 100%; }
  .hero__body { padding: 26px; }
  .card { padding: 20px; }
  .code pre { font-size: 11.5px; }
}

@media (max-width: 960px) {
  .login__body { grid-template-columns: minmax(0, 1fr); max-width: 520px; gap: 28px; align-content: start; padding-top: 8px; }
  .login__art img { width: 140vw; right: -50%; top: 22%; opacity: .32; }
  .login__ticks li { flex: 1 1 140px; }
}
@media (max-width: 480px) {
  .login__top { padding-top: 22px; }
  .login__card { padding: 22px; }
  .login__ticks { gap: 8px; margin-top: 24px; }
  .login__ticks li { flex: 1 1 100%; display: flex; justify-content: space-between; align-items: baseline; }
  .prow { grid-template-columns: minmax(0, 1fr); }
  .prow__price { grid-row: auto; grid-column: 1; text-align: left; display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
}
