/* Powerhouse design tokens.
   Derived from the brand guidelines. Do not introduce colours or typefaces
   outside this file — the guide is explicit that recolouring off-brand and
   changing the typeface are prohibited. */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@600;700;800;900&family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* ---- brand core ---- */
  --uv:            #7A3BFF;   /* Ultraviolet — the signature */
  --uv-deep:       #4C1D95;   /* Deep Violet */
  --charge:        #B8FF2E;   /* Charge — the spark. Used sparingly. */
  --obsidian:      #050507;   /* carries the brand */
  --carbon:        #16161F;
  --platinum:      #F5F5F7;

  /* ---- derived surfaces, from the guide's own usage ---- */
  --surface:       #0E0C15;   /* panels on obsidian */
  --surface-2:     #140F22;   /* raised */
  --line:          #1E1830;   /* hairline */
  --line-soft:     #17131F;
  --line-strong:   #2A2440;

  /* ---- text ramp ---- */
  --ink:           #F5F5F7;
  --ink-2:         #B7B3C4;
  --muted:         #9A96A8;
  --faint:         #6E6A80;

  /* ---- charged tints, for state only ---- */
  --uv-tint:       rgba(122, 59, 255, .14);
  --uv-glow:       rgba(122, 59, 255, .30);
  --charge-tint:   rgba(184, 255, 46, .12);
  --charge-text:   #EFFFC9;
  --violet-text:   #C9B6FF;

  /* ---- semantic, kept inside the palette ---- */
  --ok:            #B8FF2E;
  --warn:          #FFB454;
  --risk:          #FF6B7A;

  /* ---- scarcity ladder: print-run tiers the hobby already reads as colour.
         Held to the brand's own hues rather than a rainbow. ---- */
  --tier-common:   #6E6A80;
  --tier-99:       #7A3BFF;
  --tier-49:       #9A6BFF;
  --tier-25:       #C9B6FF;
  --tier-10:       #EFFFC9;
  --tier-1:        #B8FF2E;

  /* ---- type ---- */
  --display: 'Archivo', system-ui, sans-serif;      /* use 800/900 for Archivo Black weight */
  --body:    'Space Grotesk', system-ui, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, monospace;

  /* ---- scale ---- */
  --r-sm: 6px; --r: 10px; --r-lg: 14px; --r-xl: 16px; --r-pill: 26px;
  --gap: clamp(14px, 2.4vw, 24px);
  --pad: clamp(16px, 4vw, 44px);

  --ease: cubic-bezier(.2,.8,.2,1);
}

/* ============ energy field ============
   The guide replaces busy hexagons with a restrained fine-line grid, plus a
   single charged seam for focus. Energy implied, never loud. */
.field {
  position: relative;
  background-color: var(--obsidian);
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 56px 56px;
}
.field::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 70% at 50% -10%, var(--uv-tint), transparent 60%);
}

/* The charged seam — one per view, marking the thing that matters. */
.seam { position: relative; }
.seam::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, transparent, var(--charge), transparent);
}
.seam-top::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--uv), var(--charge) 60%, transparent);
}

/* ============ base ============ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--obsidian); color: var(--ink);
  font: 400 15px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--violet-text); text-decoration: none; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--charge); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--uv-glow); color: var(--ink); }

/* ============ type ============ */
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.03em; margin: 0; line-height: 1.02; }
h1 { font-size: clamp(30px, 5vw, 54px); }
h2 { font-size: clamp(21px, 2.6vw, 30px); letter-spacing: -.025em; }
h3 { font-size: 17px; letter-spacing: -.02em; font-weight: 700; }

/* Eyebrows, tags, figures — always uppercase and tracked, per the guide. */
.eyebrow, .label {
  font: 500 10px/1.3 var(--mono);
  letter-spacing: .28em; text-transform: uppercase; color: var(--uv);
}
.label { color: var(--muted); letter-spacing: .18em; }
.fig { font: 500 var(--fig-size, 22px)/1 var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.lede { color: var(--ink-2); font-size: clamp(15px, 1.6vw, 17px); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ============ layout ============ */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--pad); }
.wrap-narrow { max-width: 860px; margin: 0 auto; padding: 0 var(--pad); }
.stack > * + * { margin-top: var(--gap); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* ============ masthead ============ */
.masthead {
  position: sticky; top: 0; z-index: 40;
  background: rgba(5,5,7,.86); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.masthead .wrap { display: flex; align-items: center; gap: 20px; height: 62px; }
.wordmark {
  font-family: var(--display); font-weight: 900; font-size: 16px;
  letter-spacing: -.02em; text-transform: uppercase; white-space: nowrap;
  display: flex; align-items: center; gap: 9px;
}
.wordmark .bolt { width: 13px; height: 18px; flex: none; }
.wordmark .sub { font: 500 10px var(--mono); letter-spacing: .22em; color: var(--muted); text-transform: uppercase; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a {
  font: 500 12px var(--body); color: var(--muted); padding: 7px 12px;
  border-radius: var(--r-sm); letter-spacing: .01em;
}
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a[aria-current] { color: var(--ink); background: var(--surface-2); }

/* ============ panels ============ */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
}
.panel-pad { padding: 18px 20px; }
.panel-head {
  display: flex; align-items: baseline; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line-soft);
}
.panel-head h3 { margin-right: auto; }

/* ============ metric grid ============ */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(146px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.metric { background: var(--surface); padding: 14px 16px; }
.metric .k { font: 500 9px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.metric .v { font: 500 26px/1.05 var(--mono); letter-spacing: -.035em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.metric .v.sm { font-size: 19px; color: var(--ink-2); }
.metric .d { font-size: 11px; color: var(--faint); margin-top: 5px; }
.metric.lead { background: var(--surface-2); }
.metric.lead .v { color: var(--charge); }

/* ============ controls ============ */
.btn {
  font: 500 13px var(--body); color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 9px 15px; cursor: pointer; transition: border-color .15s, background .15s;
}
.btn:hover { border-color: var(--uv); background: var(--surface); }
.btn[aria-pressed="true"] { background: var(--uv); border-color: var(--uv); color: #fff; }
.btn-primary { background: var(--uv); border-color: var(--uv); color: #fff; font-weight: 600; }
.btn-primary:hover { background: #8B4FFF; border-color: #8B4FFF; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; }
.seg .btn { border: 0; border-radius: 0; border-right: 1px solid var(--line-strong); background: transparent; }
.seg .btn:last-child { border-right: 0; }

input[type=text], input[type=password], input[type=search], input[type=number], select, textarea {
  font: 400 13px var(--body); color: var(--ink); background: var(--carbon);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 10px 12px; width: 100%;
}
input::placeholder { color: var(--faint); }
select { cursor: pointer; }

/* ============ tables ============ */
table { width: 100%; border-collapse: collapse; font: 400 13px var(--mono); font-variant-numeric: tabular-nums; }
thead th {
  font: 500 9px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody td { padding: 9px 14px; border-bottom: 1px solid var(--line-soft); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
th.r, td.r { text-align: right; }
td.name { font-family: var(--body); }

/* ============ chips & status ============ */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font: 500 10px var(--mono); letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 8px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); color: var(--muted);
}
.chip.uv { border-color: var(--uv); color: var(--violet-text); background: var(--uv-tint); }
.chip.charge { border-color: var(--charge); color: var(--charge-text); background: var(--charge-tint); }
.chip.warn { border-color: var(--warn); color: var(--warn); }
.chip.risk { border-color: var(--risk); color: var(--risk); }

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.live { background: var(--charge); box-shadow: 0 0 0 3px var(--charge-tint); }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .45 } }
.dot.live { animation: pulse 2.4s ease-in-out infinite; }

/* ============ empty / loading ============
   Designed states, not placeholders — every one says what will fill it. */
.empty {
  padding: 34px 24px; text-align: center; color: var(--muted);
  border: 1px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--surface);
}
.empty .t { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--ink-2); letter-spacing: -.01em; }
.empty .d { font-size: 13px; margin-top: 7px; max-width: 46ch; margin-inline: auto; line-height: 1.6; }
.empty .act { margin-top: 16px; }

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

/* ============ scroll & motion ============ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--obsidian); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--uv-deep); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ============ shared shell ============
   Used identically by the collector board and the breaker desk, so both read as
   one product. */
.acct { margin-left: 14px; }
.acct-wrap { display: flex; align-items: center; gap: 10px; position: relative; }
.acct-btn {
  display: flex; align-items: center; gap: 8px; background: none; border: 0;
  color: var(--ink-2); cursor: pointer; padding: 5px 6px; border-radius: var(--r-sm);
  font: 500 12px var(--body);
}
.acct-btn:hover { background: var(--surface); color: var(--ink); }
.avatar {
  width: 25px; height: 25px; border-radius: 50%; flex: none;
  background: var(--uv-deep); color: var(--platinum);
  display: grid; place-items: center; font: 700 11px var(--display);
}
.acct-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 9px); min-width: 224px; z-index: 60;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: var(--r); overflow: hidden; box-shadow: 0 18px 44px rgba(0,0,0,.55);
}
.acct-head { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.acct-email { font: 500 12px var(--body); }
.acct-org { font: 400 10px var(--mono); color: var(--muted); margin-top: 3px; letter-spacing: .06em; }
.acct-menu a, .acct-menu button {
  display: block; width: 100%; text-align: left; padding: 10px 14px;
  font: 400 13px var(--body); color: var(--ink-2); background: none; border: 0; cursor: pointer;
}
.acct-menu a:hover, .acct-menu button:hover { background: var(--surface); color: var(--ink); }
.acct-menu button { border-top: 1px solid var(--line); color: var(--muted); }

.hero-actions { margin-top: 22px; }
.hero h1 em { font-style: normal; color: var(--uv); }

.upgrade {
  border: 1px solid var(--uv); background: var(--uv-tint);
  border-radius: var(--r-lg); padding: 18px 20px; margin: 14px 0;
}
.upgrade .t { font: 600 14px var(--body); }
.upgrade .d { font-size: 13px; color: var(--ink-2); margin-top: 5px; }
.upgrade .act { margin-top: 13px; }

.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 90;
  display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--ink);
  padding: 11px 18px; border-radius: var(--r-pill); font: 500 13px var(--body);
  box-shadow: 0 14px 34px rgba(0,0,0,.5); animation: toastIn .2s var(--ease);
}
.toast.ok { border-color: var(--charge); }
.toast.bad { border-color: var(--risk); }
.toast.out { opacity: 0; transition: opacity .3s; }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0 } }

/* seats table */
.seat-role { font: 400 12px var(--mono); color: var(--muted); }
.seat-you { font: 500 9px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--charge); }
