/* SPUT license portal — access-desk direction.
   Graphite surfaces, hairlines, one signal-red lamp. No gradients, glows or
   decorative motion; the license tag is the one object in the hero. */

:root {
  --bg: #0a0b0d;
  --surface: #0f1115;
  --surface-2: #13161b;
  --raise: #181c22;
  --line: #232830;
  --line-2: #2d333c;
  --text: #e9ebef;
  --text-2: #a3a9b4;
  --text-3: #7d838f;
  --paper: #e9ebef;
  --paper-text: #0a0b0d;
  --red: #e5484d;
  --red-status: #d96367;
  --green: #63b083;
  --amber: #c79a4e;

  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Bahnschrift", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Mono", Consolas, ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color-scheme: dark;
}
body.portal { min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.w-100 { width: 100%; }
.mt-8 { margin-top: 8px; }
.mb-10 { margin-bottom: 10px; }
.mb-14 { margin-bottom: 14px; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-logo { display: block; border-radius: 8px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .14em;
}
.brand-sub {
  margin-top: 4px;
  color: var(--text-3);
  font-size: 10px;
  letter-spacing: .18em;
}
.topbar-note { color: var(--text-3); font-size: 11.5px; }

/* ---------------------------------------------------------------- desk */
.desk {
  flex: 1;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 44px 0 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  gap: 56px;
  align-items: center;
}

.intro { padding-top: 6px; min-width: 0; }
.intro h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(40px, 4.4vw, 56px);
  line-height: 1.04;
  letter-spacing: -.02em;
  font-weight: 600;
}
.lede {
  max-width: 46ch;
  margin: 18px 0 0;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.6;
}
.hero-user { color: var(--text); }

/* the one object in the hero: a license tag */
.keytag {
  position: relative;
  max-width: 440px;
  margin-top: 36px;
  padding: 18px 20px 16px 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #15181e, #11141a);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .38);
  transform: rotate(-1.2deg);
}
.keytag::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 20px;
  width: 9px;
  height: 9px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--bg);
}
.keytag-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.keytag-brand { color: var(--text-3); font-size: 10px; letter-spacing: .22em; }
.keytag-tier {
  padding: 2px 7px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--text-2);
  font-size: 10px;
  letter-spacing: .04em;
  white-space: nowrap;
}
.keytag-code {
  margin: 20px 0 16px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: .10em;
  white-space: nowrap;
}
.keytag-bottom { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 11.5px; }
.lamp {
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}
.lamp.is-muted { background: var(--text-3); }
.lamp.is-ok { background: var(--green); }
.lamp.is-warn { background: var(--amber); }

.spec {
  max-width: 460px;
  margin: 36px 0 0;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 10px 16px;
}
.spec div { display: contents; }
.spec dt { margin: 0; color: var(--text-3); font-size: 11.5px; line-height: 1.5; }
.spec dd { margin: 0; color: var(--text-2); font-size: 12.5px; line-height: 1.5; }

/* signed-in hero */
.hero-account h1 { margin: 0; }
.hero-meta {
  display: flex;
  margin: 22px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hero-meta-item { flex: 1; padding: 14px 0; min-width: 0; }
.hero-meta-item + .hero-meta-item { padding-left: 24px; border-left: 1px solid var(--line); }
.stat-label { display: block; margin-bottom: 5px; color: var(--text-3); font-size: 11px; }
.hero-meta strong { display: block; font-size: 12.5px; font-weight: 400; color: var(--text); word-break: break-all; }

.changelog-card {
  margin-top: 28px;
  padding: 16px 16px 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.changelog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.changelog-title { color: var(--text-3); font-size: 11.5px; }
.changelog-badge {
  padding: 2px 7px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 10px;
}
.changelog-list { margin-top: 6px; max-height: 300px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.changelog-list::-webkit-scrollbar { width: 6px; }
.changelog-list::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }
.changelog-item { padding: 12px 0; border-top: 1px solid var(--line); }
.changelog-item:first-child { border-top: 0; }
.changelog-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.changelog-version { font-family: var(--mono); font-size: 12px; color: var(--text); }
.changelog-tag {
  padding: 1px 5px;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 9.5px;
}
.changelog-date { margin-left: auto; color: var(--text-3); font-family: var(--mono); font-size: 10.5px; }
.changelog-notes { margin: 0; color: var(--text-2); font-size: 12.5px; line-height: 1.55; }
ul.changelog-notes { padding-left: 16px; }
ul.changelog-notes li { margin: 2px 0; }
ul.changelog-notes li::marker { color: var(--text-3); }
.changelog-empty { padding: 16px 0; color: var(--text-3); font-size: 12px; }

/* ---------------------------------------------------------------- panel */
.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  min-width: 0;
}
.panel-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.panel-title { font-family: var(--display); font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.panel-sub { margin-top: 4px; color: var(--text-3); font-size: 12px; line-height: 1.45; }

.steps { display: flex; align-items: center; gap: 6px; padding-top: 2px; flex: 0 0 auto; }
.step-dot {
  padding: 2px 0;
  color: var(--text-3);
  font-size: 10.5px;
  white-space: nowrap;
  box-shadow: inset 0 -1px 0 transparent;
  transition: color .15s ease;
}
.step-dot.active { color: var(--text-2); }
.step-dot.current { color: var(--text); box-shadow: inset 0 -1px 0 var(--red); }
.step-line { width: 12px; height: 1px; background: var(--line); }

.tabs-inline {
  display: flex;
  gap: 22px;
  margin: 22px 0 20px;
  border-bottom: 1px solid var(--line);
}
.tabs-inline button {
  height: 34px;
  padding: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  color: var(--text-3);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.tabs-inline button:hover { color: var(--text-2); }
.tabs-inline button.active { color: var(--text); border-bottom-color: var(--red); }

.step-head { margin-bottom: 18px; }
.step-head h2 { margin: 0 0 4px; font-family: var(--display); font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.step-head p { margin: 0; color: var(--text-3); font-size: 12px; }

.field { display: block; }
.field label { display: block; margin-bottom: 6px; color: var(--text-2); font-size: 12px; }
input, select, textarea {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #0b0d11;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder { color: var(--text-3); }
input:hover { border-color: var(--line-2); }
input:focus, select:focus, textarea:focus {
  border-color: rgba(229, 72, 77, .55);
  box-shadow: 0 0 0 3px rgba(229, 72, 77, .12);
}
.mono-input { font-family: var(--mono); letter-spacing: .10em; text-transform: uppercase; }

button { font: inherit; }
.primary, .ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.primary { border: 1px solid var(--paper); background: var(--paper); color: var(--paper-text); }
.primary:hover { background: #f5f6f8; border-color: #f5f6f8; }
.primary:active { background: #dcdee3; border-color: #dcdee3; }
.primary:disabled { opacity: .5; cursor: default; }
.ghost { border: 1px solid var(--line); background: transparent; color: var(--text-2); }
.ghost:hover { border-color: var(--line-2); background: var(--surface-2); color: var(--text); }
.download-btn { margin-top: 4px; }
.hint { margin: 12px 0 0; color: var(--text-3); font-size: 11.5px; text-align: center; line-height: 1.5; }
.tier-hint { margin-top: 14px; }
.tier-hint .mono { color: var(--text-2); }

.notice {
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--red);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.5;
}
.notice.ok { border-left-color: var(--green); color: var(--text); }
.notice.bad { border-left-color: var(--red-status); color: var(--text); }

/* ---------------------------------------------------------------- access state */
.done-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.success-mark {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(99, 176, 131, .45);
  border-radius: 8px;
  color: var(--green);
}
.done-head h2 { margin: 0 0 2px; font-family: var(--display); font-size: 17px; font-weight: 600; }
.done-head p { margin: 0; color: var(--text-3); font-size: 12px; }

.license-box { margin-bottom: 16px; }
.uid-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.uid-label { display: block; color: var(--text-3); font-size: 11px; }
.uid-value { display: block; margin-top: 3px; color: var(--text); font-size: 12.5px; }
.copy-btn {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  font-size: 11.5px;
  cursor: pointer;
}
.copy-btn:hover { color: var(--text); border-color: var(--text-3); }

.product-list { display: grid; gap: 8px; }
.product-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.product-main { min-width: 0; }
.product-name { font-size: 12.5px; font-weight: 600; }
.product-meta { margin-top: 2px; color: var(--text-3); font-size: 11.5px; }
.pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  text-transform: capitalize;
  white-space: nowrap;
}
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--green); }
.pill.muted { color: var(--text-3); }
.pill.bad { color: var(--red-status); }
.pill.warn { color: var(--amber); }

.tier-row { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 2px 2px; }
.tier {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .03em;
}

.empty-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-2);
}
.empty-card strong { display: block; color: var(--text); font-size: 12.5px; }
.empty-card span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--text-3); }
.empty-icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.loader-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.loader-icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text-2);
}
.loader-main { flex: 1; min-width: 0; }
.loader-title { font-size: 12.5px; font-weight: 600; }
.loader-meta { margin-top: 2px; color: var(--text-3); font-size: 11.5px; }

.add-key-card {
  margin: 12px 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.add-key-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.add-key-title { font-size: 12.5px; font-weight: 600; }
.add-key-sub { margin-top: 2px; color: var(--text-3); font-size: 11.5px; line-height: 1.45; }
.add-key-badge {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-3);
  font-size: 9.5px;
}
.add-key-row { display: flex; gap: 8px; margin-top: 10px; }
.add-key-row input { flex: 1; min-width: 0; height: 38px; }
.add-key-btn {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.add-key-btn:hover { border-color: var(--text-3); }
.add-key-btn:disabled { opacity: .5; cursor: default; }

.panel-footer {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 11px;
}

/* ---------------------------------------------------------------- page foot */
.foot {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 16px 0 28px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-3);
  font-size: 11px;
}
.foot .mono { font-size: 10.5px; }

/* ---------------------------------------------------------------- feedback */
.login-err {
  margin-top: 14px;
  max-width: none;
  position: static;
  border-left-color: var(--red-status);
  color: var(--red-status);
}
#toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
}
.toast {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--red);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  max-width: 340px;
}
.toast.err { border-left-color: var(--red-status); }
.toast.ok { border-left-color: var(--green); }

/* ---------------------------------------------------------------- focus */
a:focus-visible, button:focus-visible, input:focus-visible, .topbar a:focus-visible {
  outline: 2px solid rgba(229, 72, 77, .65);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .desk {
    grid-template-columns: minmax(0, 1fr);
    width: min(620px, calc(100% - 32px));
    gap: 32px;
    padding: 32px 0 44px;
  }
  .intro h1 { font-size: clamp(36px, 7vw, 46px); }
  .panel { max-width: 620px; }
  .topbar, .foot { width: min(620px, calc(100% - 32px)); }
}

@media (max-width: 620px) {
  .topbar { width: calc(100% - 32px); padding-top: 18px; }
  .topbar-note { display: none; }
  .desk { width: calc(100% - 32px); padding: 26px 0 36px; gap: 24px; }
  .intro h1 { font-size: 34px; }
  .lede { font-size: 14px; }
  .keytag { margin-top: 26px; padding: 16px 16px 14px 34px; }
  .keytag::before { left: 12px; top: 18px; }
  .keytag-code { font-size: 12.5px; letter-spacing: .06em; }
  .keytag-tier { font-size: 9.5px; }
  .spec { grid-template-columns: 76px minmax(0, 1fr); margin-top: 28px; }
  .hero-meta { flex-direction: column; }
  .hero-meta-item + .hero-meta-item { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .panel { padding: 20px; border-radius: 12px; }
  .panel-top { flex-direction: column; gap: 10px; }
  .steps { padding-top: 0; }
  .add-key-row { flex-direction: column; }
  .add-key-btn { width: 100%; }
  .uid-card { align-items: flex-start; flex-direction: column; }
  .foot { flex-direction: column; gap: 6px; width: calc(100% - 32px); }
  #toast { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; }
}

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

.product-actions{display:flex;align-items:center;gap:10px}

.changelog-tabs{display:flex;gap:8px;flex-wrap:wrap}
.changelog-tab{background:#15161a;border:1px solid rgba(255,255,255,.08);color:#9a9ba4;border-radius:999px;padding:5px 12px;font-size:12px;cursor:pointer}
.changelog-tab.is-on{color:#fff;border-color:#e5484d;background:rgba(229,72,77,.12)}
