:root {
  color-scheme: dark;
  --bg: #10110f;
  --surface: #171815;
  --surface-raised: #1e201c;
  --surface-soft: #242720;
  --line: #34382f;
  --line-strong: #4a5142;
  --text: #f4f5ee;
  --muted: #a7ac9e;
  --accent: #c6f36a;
  --accent-strong: #d8ff86;
  --accent-ink: #172008;
  --danger: #ff9e91;
  --success: #b8eb72;
  --shadow: 0 24px 70px rgb(0 0 0 / 28%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgb(198 243 106 / 9%), transparent 28rem),
    radial-gradient(circle at 90% 30%, rgb(113 141 80 / 7%), transparent 26rem),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(198 243 106 / 38%);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  color: var(--accent-ink);
  background: var(--accent);
  font-family: Georgia, serif;
  font-size: 24px;
  font-style: italic;
  font-weight: 700;
  box-shadow: 0 0 0 5px rgb(198 243 106 / 8%);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  letter-spacing: .01em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px rgb(184 235 114 / 10%);
}

main {
  min-height: calc(100vh - 170px);
  padding: 40px 0 80px;
}

.notice {
  position: fixed;
  z-index: 10;
  top: 22px;
  left: 50%;
  width: min(520px, calc(100% - 36px));
  padding: 13px 18px;
  transform: translateX(-50%);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  background: #252820;
  box-shadow: var(--shadow);
  font-size: 14px;
  text-align: center;
}

.notice.error {
  border-color: rgb(255 158 145 / 45%);
  color: #ffd6d0;
  background: #33201d;
}

.notice.success {
  border-color: rgb(198 243 106 / 38%);
  color: #e8ffc0;
  background: #202a17;
}

.auth-layout {
  display: grid;
  max-width: 1050px;
  margin: 36px auto 0;
  grid-template-columns: minmax(0, 1fr) minmax(380px, .82fr);
  gap: clamp(48px, 8vw, 100px);
  align-items: center;
}

.intro-panel h1,
.console-heading h1 {
  margin: 0;
  font-size: clamp(44px, 6.4vw, 76px);
  font-weight: 560;
  letter-spacing: -.055em;
  line-height: .98;
}

.lede {
  max-width: 550px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.feature-list {
  display: grid;
  margin: 44px 0 0;
  padding: 0;
  gap: 16px;
  color: #c8cbbf;
  font-size: 14px;
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feature-list span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgb(255 255 255 / 2.5%), transparent 48%), var(--surface);
  box-shadow: var(--shadow);
}

.auth-card {
  padding: 10px 28px 30px;
}

.tab-list {
  display: grid;
  margin: 0 0 28px;
  padding: 5px;
  border-radius: 12px;
  background: #10110f;
  grid-template-columns: 1fr 1fr;
}

.tab {
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 650;
}

.tab.is-active {
  color: var(--text);
  background: var(--surface-soft);
  box-shadow: 0 1px 8px rgb(0 0 0 / 20%);
}

.panel-heading {
  margin: 0 0 25px;
}

.panel-heading.compact {
  margin-bottom: 23px;
}

.panel-heading h2,
.result-card h2,
.recent-heading h2 {
  margin: 0;
  font-size: 23px;
  font-weight: 630;
  letter-spacing: -.025em;
}

.panel-heading p:not(.eyebrow) {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

form {
  display: grid;
  gap: 17px;
}

label {
  display: grid;
  gap: 8px;
  color: #d8dbd0;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .015em;
}

input,
select {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: #11120f;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input::placeholder {
  color: #686d61;
}

input:focus,
select:focus {
  border-color: #77865e;
  outline: 0;
  box-shadow: 0 0 0 3px rgb(198 243 106 / 9%);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field-help,
.optional {
  color: #7f8577;
  font-size: 11px;
  font-weight: 450;
}

.optional {
  margin-left: 4px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.panel-heading code {
  padding: 2px 5px;
  border-radius: 4px;
  color: #dce7c7;
  background: #292d24;
  font-size: 12px;
}

.button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 720;
  transition: transform .15s ease, background .15s ease, opacity .15s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: .58;
}

.button.primary {
  color: var(--accent-ink);
  background: var(--accent);
}

.button.primary:hover:not(:disabled) {
  background: var(--accent-strong);
}

.button.ghost {
  border-color: var(--line);
  color: var(--muted);
  background: transparent;
}

.full-width {
  width: 100%;
}

.console {
  max-width: 1100px;
  margin: 24px auto 0;
}

.console-heading {
  display: flex;
  margin-bottom: 42px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.console-heading h1 {
  font-size: clamp(40px, 5vw, 66px);
}

.console-heading p:not(.eyebrow) {
  margin: 17px 0 0;
  color: var(--muted);
}

.setup-card {
  position: relative;
  max-width: 700px;
  margin: 70px auto 0;
  padding: 36px;
  overflow: hidden;
}

.token-card {
  display: grid;
  margin: -12px 0 30px;
  padding: 24px;
  border-color: rgb(198 243 106 / 30%);
  background: linear-gradient(135deg, rgb(198 243 106 / 8%), transparent 60%), var(--surface);
  grid-template-columns: minmax(210px, .8fr) minmax(300px, 1.2fr) auto;
  gap: 22px;
  align-items: center;
}

.token-card h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -.02em;
}

.token-card p:not(.eyebrow) {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.token-key-box {
  min-width: 0;
}

.setup-card::after {
  position: absolute;
  right: -80px;
  bottom: -100px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgb(198 243 106 / 6%);
  content: "";
  pointer-events: none;
}

.step-badge {
  display: inline-flex;
  margin-bottom: 24px;
  padding: 6px 9px;
  border: 1px solid rgb(198 243 106 / 23%);
  border-radius: 999px;
  color: var(--accent);
  background: rgb(198 243 106 / 6%);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, .95fr);
  gap: 24px;
  align-items: start;
}

.workspace > aside {
  display: grid;
  gap: 24px;
}

.create-card,
.recent-card,
.result-card {
  padding: 30px;
}

.result-card {
  border-color: rgb(198 243 106 / 30%);
  background: linear-gradient(145deg, rgb(198 243 106 / 7%), transparent 55%), var(--surface);
}

.success-icon {
  display: grid;
  width: 38px;
  height: 38px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 50%;
  color: var(--accent-ink);
  background: var(--accent);
  font-weight: 900;
}

.result-name {
  min-height: 20px;
  margin: 7px 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.key-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 13px 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #0d0e0c;
}

.key-box code {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
  color: #ecf6d8;
  font-size: 12px;
  line-height: 1.5;
}

.copy-button,
.icon-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 700;
}

.copy-button {
  padding: 8px 10px;
}

.result-details {
  display: grid;
  margin: 22px 0 0;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.result-details div {
  padding: 12px;
  border-radius: 9px;
  background: rgb(255 255 255 / 2%);
}

.result-details dt {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.result-details dd {
  margin: 5px 0 0;
  font-size: 13px;
}

.recent-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.icon-button {
  width: 34px;
  height: 34px;
  font-size: 17px;
}

.empty-state {
  margin-top: 24px;
  padding: 26px 16px;
  border: 1px dashed var(--line);
  border-radius: 11px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.license-list {
  display: grid;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.license-item {
  display: grid;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
}

.license-item:first-child {
  border-top: 0;
}

.license-item strong,
.license-item code,
.license-item small {
  display: block;
}

.license-item strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.license-item code {
  margin-top: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.license-item small {
  margin-top: 5px;
  color: #747a6d;
  font-size: 10px;
}

footer {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #252820;
  color: #696e63;
  font-size: 11px;
  letter-spacing: .04em;
}

footer a {
  color: #8d9385;
  text-decoration: none;
}

@media (max-width: 850px) {
  .auth-layout,
  .workspace {
    grid-template-columns: 1fr;
  }

  .auth-layout {
    max-width: 620px;
    gap: 55px;
  }

  .intro-panel {
    text-align: center;
  }

  .lede {
    margin-inline: auto;
  }

  .feature-list {
    display: none;
  }

  .workspace > aside {
    grid-row: 1;
  }

  .token-card {
    grid-template-columns: 1fr;
  }

  .token-card .button.ghost {
    width: 100%;
  }

  .create-card {
    grid-row: 2;
  }
}

@media (max-width: 560px) {
  .site-header,
  main,
  footer {
    width: min(100% - 24px, 1180px);
  }

  main {
    padding-top: 20px;
  }

  .connection-status {
    display: none;
  }

  .auth-layout {
    margin-top: 18px;
    grid-template-columns: minmax(0, 1fr);
  }

  .intro-panel h1 {
    font-size: 43px;
  }

  .lede {
    font-size: 16px;
  }

  .auth-card,
  .create-card,
  .recent-card,
  .result-card,
  .setup-card {
    padding: 22px;
    border-radius: 17px;
  }


  .token-card {
    margin-top: 0;
    padding: 22px;
    border-radius: 17px;
  }

  .auth-card {
    padding-top: 9px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .console-heading {
    align-items: flex-start;
  }

  .console-heading h1 {
    font-size: 42px;
  }

  .button.ghost {
    min-width: 80px;
    padding-inline: 12px;
  }

  .setup-card {
    margin-top: 35px;
  }

  footer {
    min-height: 65px;
  }
}

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