:root {
  --midnight: #080D16;
  --surface: #111C2C;
  --raised: #0D1522;
  --line: #1E2D44;
  --ice: #8DDCFF;
  --ice-deep: #5FBFE8;
  --silver: #DCEAF5;
  --text: #FFFFFF;
  --slate: #94A3B8;
  --slate-dim: #64748B;
  --error: #FF8A8A;
  color-scheme: dark;
}
* { box-sizing: border-box; }
/* Author display rules (flex/grid) would otherwise beat the UA's [hidden] and show every state at once. */
[hidden] { display: none !important; }
/* Long unbroken tokens (hashes, URLs) must wrap instead of widening the page on phones. */
p, li, code, a, h1, h2, summary { overflow-wrap: anywhere; }
.card, .grid > *, .hash-row > * { min-width: 0; }
/* Long unbroken tokens (hashes, URLs) must wrap instead of widening the page on phones. */
p, li, code, a, h1, h2, summary { overflow-wrap: anywhere; }
.card, .grid > *, .hash-row > * { min-width: 0; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--midnight);
  color: var(--text);
  font: 16px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-inline: max(20px, env(safe-area-inset-left));
  padding-block: 0 48px;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
.glow {
  position: fixed; inset: -20% -10% auto -10%; height: 70vh; pointer-events: none; z-index: 0;
  background: radial-gradient(60% 60% at 30% 20%, rgba(141, 220, 255, .16), transparent 70%);
}
header, main, footer { position: relative; z-index: 1; max-width: 980px; margin-inline: auto; }
.top { display: flex; align-items: center; justify-content: space-between; padding-block: 22px; gap: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.mark { width: 40px; height: 40px; }
.wordmark { font-weight: 600; letter-spacing: .34em; font-size: 18px; }
nav { display: flex; gap: 22px; }
nav a { color: var(--slate); text-decoration: none; font-size: 15px; padding: 6px 2px; }
nav a:hover, nav a:focus-visible { color: var(--ice); }

.hero { padding-block: 28px 8px; }
.eyebrow { color: var(--ice); text-transform: uppercase; letter-spacing: .18em; font-size: 12px; font-weight: 600; margin: 0 0 10px; }
h1 { font-size: clamp(32px, 6vw, 54px); line-height: 1.06; margin: 0 0 16px; font-weight: 650; letter-spacing: -.02em; }
h2 { font-size: 19px; margin: 0 0 8px; font-weight: 600; }
h3 { font-size: 16px; margin: 22px 0 6px; font-weight: 600; }
.lede { color: var(--slate); font-size: 18px; max-width: 640px; margin: 0 0 28px; }
.muted { color: var(--slate); }
.small { font-size: 13.5px; }

.card {
  background: linear-gradient(180deg, rgba(24, 39, 64, .62), rgba(17, 28, 44, .78));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
  margin-block: 16px;
  box-shadow: inset 0 1px 0 rgba(220, 234, 245, .06);
}
.status { display: flex; flex-direction: column; gap: 6px; }
#state-loading { flex-direction: row; align-items: center; gap: 12px; color: var(--slate); }
.status.error { border-color: rgba(255, 138, 138, .45); }
.status.error h2 { color: var(--error); }
.status p { margin: 0 0 6px; color: var(--slate); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--ice); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 8px; }
.cta-meta { color: var(--slate); }
.cta-meta strong { color: var(--text); }
.btn {
  appearance: none; border: 1px solid transparent; border-radius: 14px; font: inherit; font-weight: 600; cursor: pointer;
  padding: 15px 28px; text-decoration: none; display: inline-block; transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn.primary { background: linear-gradient(180deg, var(--ice), var(--ice-deep)); color: #06121C; font-size: 18px; box-shadow: 0 8px 30px rgba(141, 220, 255, .22); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 36px rgba(141, 220, 255, .32); }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn.secondary:hover { border-color: var(--ice); }
.btn.small { padding: 8px 16px; font-size: 14px; }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }

.grid { display: grid; grid-template-columns: 1fr 220px; gap: 16px; }
.grid .card { margin-block: 8px; }
.typeable { margin: 10px 0 8px; }
.typeable code { font-size: clamp(22px, 5vw, 30px); color: var(--ice); letter-spacing: .02em; word-break: break-all; }
code, pre { font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; }
.qr-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.qr { width: 168px; height: 168px; background: #fff; border-radius: 12px; padding: 8px; }
.qr svg { width: 100%; height: 100%; display: block; }
.hash-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hash { background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; word-break: break-all; flex: 1 1 320px; color: var(--silver); }
details { margin-top: 12px; }
summary { cursor: pointer; color: var(--ice); }
pre { background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; margin: 6px 0 12px; font-size: 13.5px; }
.notes { white-space: pre-wrap; word-break: break-word; background: transparent; border: 0; padding: 0; margin: 0; font-family: inherit; font-size: 15px; color: var(--silver); }

.steps ol { padding-left: 22px; margin: 8px 0; }
.steps li { margin-block: 10px; }
.steps em { color: var(--silver); font-style: normal; }

.releases { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.releases li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--raised); }
.releases .rv { font-weight: 600; }
.releases .rm { color: var(--slate); font-size: 13.5px; grid-column: 1; }
.releases .ra { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.releases .rsha { grid-column: 1 / -1; font-size: 12px; color: var(--slate-dim); word-break: break-all; }
a { color: var(--ice); }
footer { color: var(--slate-dim); font-size: 13px; padding-block: 28px 0; border-top: 1px solid var(--line); margin-top: 32px; }

@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  .qr-card { flex-direction: row; gap: 16px; text-align: left; justify-content: flex-start; }
  .qr { width: 132px; height: 132px; flex: none; }
  .btn.primary { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spinner { animation-duration: 3s; }
  .btn { transition: none; }
}
