:root {
  color-scheme: dark;
  --bg: #070c17;
  --panel: #0d1728;
  --line: #263a57;
  --text: #edf5ff;
  --quiet: #a1b2cc;
  --blue: #66c8ff;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 12px; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(ellipse at 80% 0, #11223d, transparent 61%), var(--bg);
  line-height: 1.7;
}
.shell { max-width: 1080px; margin: auto; padding: 0 24px; }
header { background: #0a1120; border-bottom: 1px solid var(--line); }
header .shell { display: flex; justify-content: space-between; align-items: center; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 25px; font-weight: 750; }
.brand span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  color: #081831;
  background: linear-gradient(145deg, #a5e8ff, #45a5ff);
  font-size: 19px;
}
main.shell { padding-block: 34px 62px; }
h1 { margin: 4px 0 23px; font-size: clamp(27px, 5vw, 44px); letter-spacing: -.025em; }
h2 { margin: 0 0 13px; font-size: 20px; }
h3 { margin: 4px 0 8px; font-size: 16px; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--blue); }
p { margin: 5px 0 14px; }
section, details { padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
section { margin: 15px 0; }
details { padding: 11px 14px; }
summary { cursor: pointer; font-weight: 700; }
summary:hover { color: var(--blue); }
.stack { display: grid; gap: 12px; }
.stack > section { margin: 0; }
.formgrid { display: grid; align-items: start; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
label { display: grid; gap: 5px; color: var(--quiet); font-size: 13px; }
.wide { grid-column: 1 / -1; }
button, input, textarea, select {
  min-width: 0;
  max-width: 100%;
  padding: 8px 11px;
  color: inherit;
  font: inherit;
  background: #091323;
  border: 1px solid var(--line);
  border-radius: 8px;
}
textarea { width: 100%; resize: vertical; }
button { width: max-content; cursor: pointer; font-size: 13px; font-weight: 700; transition: background-color .16s, border-color .16s; }
button:hover { border-color: var(--blue); background: #142946; }
button.primary { padding-inline: 20px; color: #07162d; background: linear-gradient(135deg, #99e4ff, #51adff); border-color: #acdfff9a; }
button.primary:hover { background: #a4e5ff; }
.danger { color: #ffadbc; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.muted, small { color: var(--quiet); }
.space { margin-top: 14px; }
.login { max-width: 410px; }
.member { margin-top: 8px; background: #0b1425; }
.member summary bdi { margin-inline-start: 8px; font-size: 13px; }
.subscription { margin-top: 15px; padding: 13px 0; border-top: 1px solid var(--line); }
nav, .inline, .actions, .line, .metrics { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
nav { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
nav form { margin-inline-start: auto; }
.inline input[type="number"] { width: 75px; }
.metrics { gap: 30px; padding-block: 15px 0; }
.metrics b { margin-inline-end: 3px; color: var(--blue); font-size: 24px; font-variant-numeric: tabular-nums; }
.line { padding: 7px 0; border-bottom: 1px solid #20314b; }
.line form { margin-inline-start: auto; }
.alert, .success, .issued { padding: 14px; border: 1px solid; border-radius: 9px; }
.alert { color: #ffd3dc; background: #302136; border-color: #684260; }
.success, .issued { color: #d6f0ff; background: #112b46; border-color: #365b81; }
.issued textarea { color: var(--text); }
table { width: 100%; border-collapse: collapse; text-align: start; }
td, th { padding: 8px; text-align: start; border-bottom: 1px solid var(--line); }
@media (max-width: 620px) {
  .shell { padding-inline: 14px; }
  .formgrid { grid-template-columns: 1fr; }
  section { padding: 13px; }
  .metrics { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { button { transition: none; } }
