/* =====================================================================
   ZEZYX — design system

   Built to the brief in design.txt: a void-black stage where a single
   vivid violet carries every action and amber punctuates. Hierarchy comes
   from scale and negative tracking, never from weight — headings sit at
   400 the same as body, and size does the work.

   ── One deliberate departure, and why ────────────────────────────────
   The brief forbids borders, cards and dividers outright: "the void is
   the design". That is written for a marketing site — it also says "no
   card grids, no pricing tables, never information-dense". ZEZYX is both
   things: a landing page *and* an admin panel with tables, logs and a
   terminal. Stripping every separator from a payment ledger would not be
   minimal, it would be unreadable.

   So the rule is applied by surface. Marketing sections float on void
   with nothing around them — .feature and .stat carry no box at all.
   Data surfaces keep the quietest possible hairline, rgba(255,255,255,.05),
   which preserves the floating quality while letting a table parse as rows.

   Class names are unchanged; only the tokens and their expression moved.
   ===================================================================== */

:root {
  /* ---- the palette, from the brief -------------------------------- */
  --void:          #000000;
  --bone:          #ffffff;
  --ash:           #9a9a9a;
  --silver:        #bdbdbd;
  --iris:          #8052ff;
  --saffron:       #ffb829;
  --verdant:       #15846e;

  /* ---- surfaces ---------------------------------------------------
     Level 0 is the void and does almost all the work. The raised steps
     stay within a few points of black so nothing reads as a grey panel. */
  --bg:            var(--void);
  --bg-soft:       #050505;
  --panel:         #0a0a0a;
  --panel-2:       #101010;
  --panel-3:       #171717;

  /* Hairlines, not borders. */
  --line:          rgba(255, 255, 255, .09);
  --line-soft:     rgba(255, 255, 255, .05);

  /* ---- text ------------------------------------------------------- */
  --text:          var(--bone);
  --text-dim:      var(--silver);
  --text-mute:     var(--ash);

  /* ---- accents ----------------------------------------------------
     Violet is the action colour and nothing else. Amber is emphasis and
     labels. Both flat — the brief forbids gradients on UI components.

     Two violets, for one reason: Electric Iris as specified is 4.31:1 as
     text on a raised panel, under the 4.5 floor. So the iris keeps the
     solid fills, where it sits under white and reads exactly as the brief
     intends, and a step lighter carries violet *text* and icons at 5.1:1
     on the worst ground we put it on. Same hue, legible either way. */
  --accent-fill:   var(--iris);
  --accent:        #9470ff;
  --accent-2:      #a487ff;
  --violet:        var(--iris);
  --amber:         var(--saffron);
  --green:         #2ee6a8;
  --red:           #ff5f56;

  /* Allowed in the logo and the particle field only. */
  --gradient:      linear-gradient(135deg, var(--iris), var(--verdant));

  --accent-tint:   rgba(128, 82, 255, .14);
  --accent-line:   rgba(128, 82, 255, .42);
  --amber-tint:    rgba(255, 184, 41, .14);

  /* ---- consoles ---------------------------------------------------
     A terminal was always dark; on a void page it simply is the page. */
  --console:       #050505;
  --console-line:  rgba(255, 255, 255, .09);
  --console-text:  #e6e6e6;
  --console-dim:   #7a7a7a;

  /* ---- shape: one radius token, 24px; pills only at small sizes ---- */
  --radius:        24px;
  --radius-sm:     14px;
  --radius-pill:   9999px;

  /* The brief specifies no elevation. --shadow-sm survives because a few
     inline styles reach for it; on the void it resolves to nothing. */
  --shadow-sm:     none;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --nav-h: 76px;
  --max: 1280px;
}

/* ---------------------------------------------------------------- theme
   Three states. Nothing stored follows the system; an explicit choice
   wins in both directions so the toggle can always get back.

   Dark is the design. Light is a faithful inversion — same violet, same
   amber, same scale-over-weight hierarchy, on paper instead of void.
   -------------------------------------------------------------------- */

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:          #ffffff;
    --bg-soft:     #fafafa;
    --panel:       #ffffff;
    --panel-2:     #f4f4f5;
    --panel-3:     #ebebed;

    --line:        rgba(0, 0, 0, .11);
    --line-soft:   rgba(0, 0, 0, .07);

    --text:        #0a0a0a;
    --text-dim:    #52525b;
    --text-mute:   #6b6b76;

    --accent-tint: rgba(128, 82, 255, .10);
    --accent-line: rgba(128, 82, 255, .38);
    --amber-tint:  rgba(255, 184, 41, .20);

    /* Same split as the dark theme, mirrored: the iris fills, a darker step
       carries text. Amber and mint fail contrast outright on white, so they
       darken too — the hues hold, the luminance moves. */
    --accent-fill: #8052ff;
    --accent:      #7440f5;
    --accent-2:    #6a35e8;
    --amber:       #9a6300;
    --green:       #0f7a5f;
    --red:         #d13b2f;
    --shadow-sm:   0 10px 24px -14px rgba(0, 0, 0, .14);

    --console:     #0a0a0a;
    --console-line: rgba(255, 255, 255, .09);
  }
}

:root[data-theme="light"] {
  --bg:          #ffffff;
  --bg-soft:     #fafafa;
  --panel:       #ffffff;
  --panel-2:     #f4f4f5;
  --panel-3:     #ebebed;

  --line:        rgba(0, 0, 0, .11);
  --line-soft:   rgba(0, 0, 0, .07);

  --text:        #0a0a0a;
  --text-dim:    #52525b;
  --text-mute:   #6b6b76;

  --accent-tint: rgba(128, 82, 255, .10);
  --accent-line: rgba(128, 82, 255, .38);
  --amber-tint:  rgba(255, 184, 41, .20);

  /* Same split as the dark theme, mirrored — see the note above. */
  --accent-fill: #8052ff;
  --accent:      #7440f5;
  --accent-2:    #6a35e8;
  --amber:       #9a6300;
  --green:       #0f7a5f;
  --red:         #d13b2f;
  --shadow-sm:   0 10px 24px -14px rgba(0, 0, 0, .14);

  --console:     #0a0a0a;
  --console-line: rgba(255, 255, 255, .09);
}

/* What a token alone cannot express. */
:root[data-theme="light"] .nav,
:root[data-theme="light"] .app-bar { background: rgba(255, 255, 255, .84); }
:root[data-theme="light"] .modal-backdrop { background: rgba(0, 0, 0, .34); }
:root[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0,0,0,.18); }
:root[data-theme="light"] .switch span { background: rgba(0,0,0,.16); }
:root[data-theme="light"] .spinner { border-color: rgba(0,0,0,.12); border-top-color: var(--accent); }
:root[data-theme="light"] ::selection { background: rgba(128,82,255,.22); }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .nav,
  :root:not([data-theme="dark"]) .app-bar { background: rgba(255, 255, 255, .84); }
  :root:not([data-theme="dark"]) .modal-backdrop { background: rgba(0, 0, 0, .34); }
  :root:not([data-theme="dark"]) ::-webkit-scrollbar-thumb { background: rgba(0,0,0,.18); }
  :root:not([data-theme="dark"]) .switch span { background: rgba(0,0,0,.16); }
  :root:not([data-theme="dark"]) .spinner { border-color: rgba(0,0,0,.12); border-top-color: var(--accent); }
  :root:not([data-theme="dark"]) ::selection { background: rgba(128,82,255,.22); }
}

/* ---------------------------------------------------------------- base */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01" on, "cv11" on;
  overflow-x: hidden;
  transition: background-color .2s ease, color .2s ease;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: rgba(128, 82, 255, .35); color: var(--text); }

/* Keyboard focus. Nothing in this app had a focus ring before — a border
   tinting on :focus is not enough to follow with a keyboard, and on a void
   page it is nearly invisible. :focus-visible means a mouse click never
   draws one, so the ring costs the pointer user nothing. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* Outline follows each element's own border-radius, so a pill stays a pill —
   nothing here may set border-radius, or focusing would reshape the control. */
.input:focus-visible, .select:focus-visible, .textarea:focus-visible,
.code-editor:focus-visible, .wallet-option:focus-visible { outline-offset: 1px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.26); }

/* ---------------------------------------------------------------- layout */

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; }
.wrap-tight { max-width: 900px; }
.center { text-align: center; }
.hide { display: none !important; }

.stack-4 > * + * { margin-top: 6px; }
.stack-8 > * + * { margin-top: 12px; }
.stack-12 > * + * { margin-top: 12px; }
.stack-16 > * + * { margin-top: 18px; }
.stack-24 > * + * { margin-top: 30px; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

@media (max-width: 1000px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ typography
   Everything at weight 400. The brief is explicit that hierarchy comes
   from scale and tracking; setting a heading bold would flatten exactly
   the distinction the system is built on.

   Display sizes are fluid: 113px is right at 1440px and absurd on a
   phone, and the brief's tracking is proportional to size, so -.04em
   scales correctly where a fixed -4.52px would not. */

h1, h2, h3, h4 { margin: 0; font-weight: 400; }

h1 { font-size: clamp(42px, 7.4vw, 113px); line-height: 1.02; letter-spacing: -.04em; }
h2 { font-size: clamp(30px, 4.4vw, 78px);  line-height: 1.06; letter-spacing: -.04em; }
h3 { font-size: clamp(23px, 2.3vw, 42px);  line-height: 1.15; letter-spacing: -.04em; }
h4 { font-size: 18px; line-height: 1.25; letter-spacing: -.02em; font-weight: 500; }
p  { margin: 0; }

/* The signature: 18px at weight 200, for lead copy. Dense UI stays at
   15/400, which the brief's own scale also defines as `base`. */
.lead {
  font-size: clamp(16px, 1.35vw, 18px);
  font-weight: 200;
  line-height: 1.55;
  letter-spacing: 0;
  color: var(--text-dim);
}

.muted { color: var(--text-dim); }
.dim { color: var(--text-mute); }
.small { font-size: 13.5px; }
.tiny { font-size: 12px; line-height: 1.5; }
.mono { font-family: var(--mono); letter-spacing: -.01em; }
.upper { text-transform: uppercase; letter-spacing: .025em; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Amber is the emphasis colour, per the brief — not violet, which is
   reserved for things you can click. */
.gradient-text { color: var(--amber); }

.section-label {
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 18px;
}

/* ---------------------------------------------------------------- navbar */

.nav {
  position: sticky; top: 0; z-index: 60;
  height: var(--nav-h);
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner { height: 100%; display: flex; align-items: center; gap: 36px; }
.nav-links { display: flex; align-items: center; gap: 30px; margin-left: 12px; }
.nav-links a {
  font-size: 13px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-mute); transition: color .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.logo { display: flex; align-items: center; gap: 12px; font-weight: 500; letter-spacing: -.035em; font-size: 20px; }
.logo-mark {
  width: 28px; height: 28px; flex: none;
  background: var(--gradient);
  /* The angular fragment the brief describes, not a rounded square. */
  clip-path: polygon(50% 0%, 100% 88%, 0% 88%);
}

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; color: var(--text); }
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 24px; gap: 18px;
  }
  .nav-toggle { display: block; }
}

/* --------------------------------------------------------------- buttons
   One filled violet pill is the primary action, and the brief asks that
   only one appear per view. Everything else is a ghost. */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: var(--radius-pill);
  border: 1px solid transparent; background: transparent; color: var(--text);
  font-size: 14px; font-weight: 500; letter-spacing: -.01em;
  cursor: pointer; white-space: nowrap;
  transition: background .16s, color .16s, border-color .16s, opacity .16s, transform .12s;
}
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; }

/* The brief's pill: filled iris, white, 14px weight 600 uppercase. It applies
   the uppercase to .btn-lg only. That is the size the marketing CTAs use, and
   the brief is describing a hero button — the same treatment on the sixty
   "Save" and "+ New deployment" buttons in the app would be shouting in a
   settings form, not a brand gesture. Colour, weight and shape are the brand
   here; the caps are reserved for where they mean something. */
.btn-primary {
  background: var(--accent-fill); color: #fff;
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent); }
.btn-primary.btn-lg { text-transform: uppercase; letter-spacing: .05em; font-size: 13px; }

.btn-violet { background: var(--accent-fill); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-mute); border-color: var(--line); }
.btn-ghost:hover { color: var(--text); border-color: var(--accent-line); }
.btn-danger { background: transparent; border-color: rgba(255,95,86,.34); color: var(--red); }
.btn-danger:hover { background: rgba(255,95,86,.1); }
.btn-success { background: transparent; border-color: rgba(46,230,168,.34); color: var(--green); }
.btn-sm { padding: 8px 16px; font-size: 12.5px; }
.btn-lg { padding: 16px 30px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: 38px; height: 38px; border-radius: 50%; border-color: var(--line); }

/* ----------------------------------------------------------------- cards
   Radius 24, no shadow. On the void a card is the faintest lift off
   black plus a hairline — enough to group, not enough to become a panel. */

.card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 30px;
}
.card-hover { transition: border-color .2s, background .2s; }
.card-hover:hover { border-color: var(--accent-line); background: var(--panel-2); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.card-pad-lg { padding: 38px; }
.card-flush { padding: 0; overflow: hidden; }

.panel { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }

/* --------------------------------------------------------------- badges */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--radius-pill);
  font-size: 10.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  border: 1px solid var(--line); background: transparent; color: var(--text-mute);
}
.badge-accent { color: var(--accent); border-color: var(--accent-line); background: var(--accent-tint); }
.badge-violet { color: var(--accent); border-color: var(--accent-line); background: var(--accent-tint); }
.badge-green { color: var(--green); border-color: rgba(46,230,168,.4); background: rgba(46,230,168,.1); }
.badge-amber { color: var(--amber); border-color: rgba(255,184,41,.4); background: var(--amber-tint); }
.badge-red { color: var(--red); border-color: rgba(255,95,86,.4); background: rgba(255,95,86,.1); }
.badge-official { color: #fff; background: var(--accent-fill); border-color: transparent; }

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-mute); flex: none; }
.dot-green { background: var(--green); }
.dot-amber { background: var(--amber); }
.dot-red { background: var(--red); }
.dot-pulse { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* ----------------------------------------------------------------- forms */

.field { display: flex; flex-direction: column; gap: 8px; }
.label { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-mute); }
.hint { font-size: 12px; color: var(--text-mute); font-weight: 200; }

.input, .select, .textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color .16s, background .16s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  background: var(--panel-2);
}
.input::placeholder, .textarea::placeholder { color: var(--text-mute); font-weight: 200; }
.textarea { resize: vertical; min-height: 110px; font-family: var(--mono); font-size: 13px; line-height: 1.65; }
.input-mono { font-family: var(--mono); font-size: 13px; }
.select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-mute) 50%),
    linear-gradient(135deg, var(--text-mute) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

.checkbox { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--text-dim); }
.checkbox input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

.switch { position: relative; width: 44px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; cursor: pointer; background: rgba(255,255,255,.16);
  border-radius: 999px; transition: background .2s;
}
.switch span::before {
  content: ''; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .2s;
}
.switch input:checked + span { background: var(--accent-fill); }
.switch input:checked + span::before { transform: translateX(20px); }

/* ---------------------------------------------------------------- tables
   The one place the no-dividers rule is relaxed, and only to a hairline. */

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; padding: 14px 18px;
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-mute); font-weight: 600;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 0; z-index: 1;
}
.table td { padding: 15px 18px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr { transition: background .14s; }
.table tbody tr:hover { background: var(--panel-2); }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line-soft); background: var(--panel); }

/* ----------------------------------------------------------------- misc */

.divider { height: 1px; background: var(--line-soft); border: none; margin: 30px 0; }
.kbd {
  font-family: var(--mono); font-size: 11.5px; padding: 3px 8px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; color: var(--text-dim);
}
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--accent-fill);
  display: grid; place-items: center; font-weight: 500; font-size: 14px; color: #fff;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
/* Portraits get the 24px rounded-rectangle crop the brief specifies. */
.avatar-lg { width: 72px; height: 72px; font-size: 26px; border-radius: var(--radius); }
.avatar-sm { width: 26px; height: 26px; font-size: 11px; }

.icon-box {
  width: 46px; height: 46px; border-radius: var(--radius-sm); flex: none;
  display: grid; place-items: center; font-weight: 600; font-size: 13px;
  letter-spacing: -.02em;
  background: var(--accent-tint); border: 1px solid var(--accent-line); color: var(--accent);
}
.icon-box-lg { width: 62px; height: 62px; font-size: 18px; border-radius: var(--radius); }

.progress { height: 4px; border-radius: 999px; background: var(--panel-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent-fill); border-radius: 999px; transition: width .4s; }

.empty {
  text-align: center; padding: 60px 30px; color: var(--text-mute);
  border: 1px dashed var(--line); border-radius: var(--radius); background: transparent;
}
.empty h4 { color: var(--text-dim); margin-bottom: 8px; }

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.14); border-top-color: var(--accent);
  animation: spin .7s linear infinite; display: inline-block;
}
.spinner-lg { width: 30px; height: 30px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--panel) 25%, var(--panel-2) 50%, var(--panel) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* A read-only block of code. Dark ground, so it carries its own
   foreground — inheriting the light theme's near-black text would be
   invisible here. */
.code-block {
  background: var(--console); color: var(--console-text);
  border: 1px solid var(--console-line); border-radius: var(--radius-sm);
  padding: 18px 20px; overflow: auto;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word;
}

/* --------------------------------------------------------------- toasts */

.toasts {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  display: flex; flex-direction: column; gap: 12px; max-width: 380px;
}
.toast {
  background: var(--panel-2); border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-sm); padding: 16px 20px;
  font-size: 13.5px;
  animation: slideIn .24s cubic-bezier(.2,.8,.2,1);
}
.toast.error { border-left-color: var(--red); }
.toast.success { border-left-color: var(--green); }
.toast.warn { border-left-color: var(--amber); }
.toast b { display: block; margin-bottom: 3px; font-size: 13px; font-weight: 600; }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } }

/* --------------------------------------------------------------- modals */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0, 0, 0, .78); backdrop-filter: blur(8px);
  display: grid; place-items: center; padding: 24px;
  animation: fadeIn .18s;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius);
  animation: popIn .24s cubic-bezier(.2,.8,.2,1);
}
.modal-lg { max-width: 880px; }
.modal-xl { max-width: 1120px; }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.modal-head { padding: 24px 30px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 18px; position: sticky; top: 0; background: var(--panel); z-index: 2; }
.modal-head h3 { font-size: 24px; letter-spacing: -.02em; }
.modal-body { padding: 30px; }
.modal-foot { padding: 18px 30px; border-top: 1px solid var(--line-soft); display: flex; gap: 12px; justify-content: flex-end; position: sticky; bottom: 0; background: var(--panel); }
.modal-close { background: none; border: none; color: var(--text-mute); font-size: 22px; cursor: pointer; line-height: 1; padding: 4px 10px; border-radius: 999px; }
.modal-close:hover { color: var(--text); background: var(--panel-2); }

/* ------------------------------------------------------------ backdrops
   The brief's signature is a particle constellation. These build the
   ambient field it describes — sparse chromatic points drifting on the
   void, never competing with the type in front of them. */

.glow-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.glow-bg::before, .glow-bg::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(130px);
}
.glow-bg::before {
  width: 640px; height: 640px; top: -320px; left: 50%; transform: translateX(-62%);
  background: rgba(128, 82, 255, .24);
}
.glow-bg::after {
  width: 460px; height: 460px; top: -170px; right: 4%;
  background: rgba(21, 132, 110, .16);
}

/* Ambient particles: outlined chromatic points at low density. Built from
   radial gradients so the field costs nothing to render. */
.grid-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 22%, rgba(128,82,255,.75), transparent),
    radial-gradient(1.4px 1.4px at 78% 14%, rgba(255,184,41,.65), transparent),
    radial-gradient(1.5px 1.5px at 34% 66%, rgba(21,132,110,.6), transparent),
    radial-gradient(1.3px 1.3px at 88% 60%, rgba(128,82,255,.55), transparent),
    radial-gradient(1.5px 1.5px at 56% 38%, rgba(255,138,184,.5), transparent),
    radial-gradient(1.4px 1.4px at 22% 86%, rgba(255,184,41,.45), transparent),
    radial-gradient(1.6px 1.6px at 68% 82%, rgba(128,82,255,.5), transparent),
    radial-gradient(1.3px 1.3px at 46% 8%,  rgba(21,132,110,.55), transparent),
    radial-gradient(1.4px 1.4px at 92% 34%, rgba(255,184,41,.4), transparent),
    radial-gradient(1.5px 1.5px at 6% 54%,  rgba(128,82,255,.45), transparent);
  mask-image: radial-gradient(ellipse 92% 74% at 50% 0%, #000 18%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 92% 74% at 50% 0%, #000 18%, transparent 80%);
}

/* --------------------------------------------------------------- footer */

.footer { border-top: 1px solid var(--line-soft); padding: 96px 0 36px; margin-top: 120px; background: transparent; }
.footer-grid { display: grid; grid-template-columns: 1.8fr repeat(3, 1fr); gap: 60px; }
.footer h5 { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-mute); margin: 0 0 18px; font-weight: 600; }
.footer a { display: block; color: var(--text-dim); font-size: 14px; font-weight: 200; padding: 6px 0; transition: color .15s; }
.footer a:hover { color: var(--amber); }
.footer-bottom { margin-top: 60px; padding-top: 30px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--text-mute); }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; } }

/* -------------------------------------------------------------- app shell */

.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  border-right: 1px solid var(--line-soft); background: transparent;
  padding: 24px 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.side-group { margin-top: 30px; }
.side-group h6 {
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-mute); margin: 0 0 12px 14px; font-weight: 600;
}
.side-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 400;
  color: var(--text-mute); cursor: pointer; transition: background .15s, color .15s;
}
.side-link:hover { background: var(--panel-2); color: var(--text); }
.side-link.active { background: var(--accent-tint); color: var(--accent); font-weight: 500; }
.side-link .side-icon { width: 18px; text-align: center; font-size: 13px; }
.side-count { margin-left: auto; font-size: 11px; color: var(--text-mute); font-family: var(--mono); }

.app-main { min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.app-bar {
  height: 72px; border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 18px; padding: 0 30px;
  background: rgba(0,0,0,.72); backdrop-filter: blur(18px);
  position: sticky; top: 0; z-index: 40;
}
.app-body { padding: 36px 30px 96px; flex: 1; }
.page-head { margin-bottom: 36px; }
.page-head h2 { font-size: clamp(28px, 3vw, 42px); letter-spacing: -.04em; margin-bottom: 10px; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 268px; z-index: 100;
    transform: translateX(-100%); transition: transform .24s cubic-bezier(.2,.8,.2,1);
    background: var(--bg); border-right: 1px solid var(--line);
  }
  .sidebar.open { transform: translateX(0); }
}

/* ---------------------------------------------------------------- tabs */

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line-soft); margin-bottom: 30px; overflow-x: auto; }
.tab {
  padding: 12px 18px; font-size: 12px; font-weight: 600; color: var(--text-mute);
  cursor: pointer; border-bottom: 1px solid transparent; white-space: nowrap;
  background: none; border-top: none; border-left: none; border-right: none;
  text-transform: uppercase; letter-spacing: .07em;
  transition: color .15s, border-color .15s;
}
.tab:hover { color: var(--text-dim); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  padding: 8px 16px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 500;
  border: 1px solid var(--line); background: transparent; color: var(--text-mute);
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.chip:hover { border-color: var(--accent-line); color: var(--text); }
.chip.active { background: var(--accent-fill); border-color: transparent; color: #fff; }

/* ------------------------------------------------------------- terminal */

.terminal-shell {
  background: var(--console); border: 1px solid var(--console-line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.terminal-bar {
  display: flex; align-items: center; gap: 12px; padding: 14px 20px;
  border-bottom: 1px solid var(--console-line); background: transparent;
  font-size: 12px; color: var(--console-dim);
}
.term-dots { display: flex; gap: 7px; }
.term-dots i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.term-dots i:nth-child(1) { background: #ff5f56; }
.term-dots i:nth-child(2) { background: var(--saffron); }
.term-dots i:nth-child(3) { background: #2ee6a8; }
.terminal-view { flex: 1; min-height: 420px; padding: 14px 18px; }

.log-view {
  background: var(--console); color: var(--console-text);
  border: 1px solid var(--console-line); border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 12.2px; line-height: 1.7;
  padding: 18px; height: 460px; overflow-y: auto; white-space: pre-wrap; word-break: break-word;
}
.log-line { display: flex; gap: 12px; }
.log-line .ts { color: var(--console-dim); flex: none; }
.log-line.stderr { color: #ff8a80; }
.log-line.system { color: var(--accent-2); }

.code-editor {
  width: 100%; min-height: 460px; background: var(--console); color: var(--console-text);
  border: 1px solid var(--console-line); border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 13px; line-height: 1.7;
  padding: 18px; resize: vertical; outline: none; tab-size: 2;
}
.code-editor:focus { border-color: var(--accent); }

.file-list { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); overflow: hidden; }
.file-item {
  padding: 11px 16px; font-family: var(--mono); font-size: 12.5px; cursor: pointer;
  border-bottom: 1px solid var(--line-soft); color: var(--text-mute);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.file-item:last-child { border-bottom: none; }
.file-item:hover { background: var(--panel-2); color: var(--text); }
.file-item.active { background: var(--accent-tint); color: var(--accent); }

/* ----------------------------------------------------------- statistics
   A stat is a number, and the brief says a number should be big. These
   float without a box — the value is the element. */

.stat { background: transparent; border: none; border-radius: 0; padding: 0; }

/* Unscoped on purpose: the same label/value pair also appears inside listing
   and profile cards, where the surrounding .panel supplies the frame. */
.stat-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-mute); font-weight: 600; }
.stat-value { font-size: clamp(32px, 3.4vw, 48px); font-weight: 400; letter-spacing: -.04em; margin-top: 12px; line-height: 1; }
.stat-sub { font-size: 12px; color: var(--text-mute); margin-top: 10px; font-weight: 200; }

/* A metric tile inside a card is a small thing, not a display number. */
.panel > .stat-label { font-size: 10px; }
.panel > .stat-value { font-size: 18px; margin-top: 4px; }

/* -------------------------------------------------------- wallet picker */

.wallet-option {
  display: flex; align-items: center; gap: 16px; width: 100%;
  padding: 18px 20px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: transparent;
  cursor: pointer; text-align: left; transition: all .16s;
}
.wallet-option:hover { border-color: var(--accent-line); background: var(--panel-2); }
.wallet-option:disabled { opacity: .4; cursor: not-allowed; }
/* The tile is a neutral monogram — the wallet's name beside it identifies it,
   so no outside brand colour needs to land on the page. */
.wallet-logo {
  width: 38px; height: 38px; border-radius: var(--radius-sm); flex: none; display: grid; place-items: center;
  font-weight: 600; font-size: 12px; letter-spacing: .04em;
  color: var(--text); border: 1px solid var(--line);
}
.wallet-name { font-weight: 500; font-size: 15px; }
.wallet-state { font-size: 12px; color: var(--text-mute); font-weight: 200; }
.wallet-installed { color: var(--green); }

/* ---------------------------------------------------------------- steps */

.step { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.step:last-child { border-bottom: none; }
.step-num {
  width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--accent-tint); color: var(--accent); border: 1px solid var(--accent-line);
  font-size: 12px; font-weight: 600;
}
.step-title { font-weight: 500; font-size: 15px; margin-bottom: 4px; }

/* --------------------------------------------------------------- hero
   Oversized left-aligned headline, generous body, one violet pill. */

.hero { position: relative; padding: 96px 0; overflow: hidden; }

/* The two-column asymmetric split the brief specifies: headline, body and one
   pill on the left, the constellation at scale on the right. The ticker spans
   both because it belongs to neither. */
.hero-inner {
  position: relative; z-index: 1; text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  column-gap: 48px; row-gap: 60px;
}
.hero-copy { min-width: 0; }

/* 78px is what the brief's own hero spec asks for; 113px is the top of the
   type scale, for a headline that owns a full-bleed row. In a half-width
   column it would only wrap to five lines. */
.hero h1 { margin-bottom: 30px; font-size: clamp(38px, 5.4vw, 78px); }
.hero .lead { max-width: 480px; margin: 0 0 36px; }
.hero-actions { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; justify-content: flex-start; }

.hero-visual { position: relative; min-width: 0; aspect-ratio: 1 / 0.88; min-height: 360px; }
.hero-visual canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* The ticker belongs to neither column, so it spans both. Its own top margin
   would stack on the grid's row gap; the gap alone is the separation. */
.hero-inner > .ticker { grid-column: 1 / -1; margin-top: 0; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; row-gap: 36px; }
  /* Stacked, the artwork follows the pitch — leading with 220px of abstract
     decoration would push the sentence that explains the product below the
     fold on a phone. */
  .hero-visual { aspect-ratio: 1 / 0.58; min-height: 200px; }
}

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px; border-radius: var(--radius-pill); margin-bottom: 30px;
  border: 1px solid var(--line); background: transparent;
  font-size: 11px; color: var(--text-mute); text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
}
.pill b { color: var(--amber); font-weight: 600; }

.ticker {
  display: flex; gap: 60px; flex-wrap: wrap;
  margin-top: 96px; padding-top: 60px; border-top: 1px solid var(--line-soft);
  justify-content: flex-start;
}
.ticker-item { text-align: left; }
.ticker-value { font-size: clamp(30px, 3.2vw, 42px); font-weight: 400; letter-spacing: -.04em; line-height: 1; }
.ticker-label { font-size: 10.5px; color: var(--text-mute); text-transform: uppercase; letter-spacing: .12em; margin-top: 10px; }

.section { padding: 120px 0; position: relative; }
/* The brief's composition is left-aligned, not centred. */
.section-head { max-width: 720px; margin: 0 0 60px; text-align: left; }
.section-head .lead { margin-top: 24px; }

/* --------------------------------------------------------- feature card
   No box at all — the brief is unambiguous that features float. Which means
   the gutter is the only thing keeping two of them apart, so it grows. */

.grid:has(> .feature) { gap: 60px 48px; }
.grid:has(> .stat) { gap: 36px 48px; }


.feature { background: transparent; border: none; border-radius: 0; padding: 0; position: relative; }
.feature h4 { margin: 24px 0 12px; font-size: 24px; font-weight: 400; letter-spacing: -.02em; }
.feature p { font-size: 16px; font-weight: 200; color: var(--text-dim); line-height: 1.55; }

.listing-card { display: flex; flex-direction: column; height: 100%; }
.listing-card .listing-top { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.listing-card h4 { font-size: 17px; margin-bottom: 4px; }
.listing-card .listing-meta {
  margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 18px; font-size: 12px; color: var(--text-mute);
}

.deploy-card { display: flex; align-items: center; gap: 18px; }
.deploy-card .deploy-info { min-width: 0; flex: 1; }

/* The theme switch. */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  border: 1px solid var(--line); background: transparent; color: var(--text-mute);
  cursor: pointer; font-size: 14px; line-height: 1;
  transition: color .15s, border-color .15s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent-line); }

@media (max-width: 640px) {
  .hero { padding: 72px 0 60px; }
  .section { padding: 72px 0; }
  .modal-body { padding: 24px; }
  .app-body { padding: 24px 18px 60px; }
  .ticker { gap: 30px; margin-top: 60px; padding-top: 36px; }
  .card, .card-pad-lg { padding: 24px; }
  .footer { margin-top: 72px; padding-top: 60px; }
}
