:root {
  color-scheme: dark;

  --bg: #0a0711;
  --surface: #ffffff0a;
  --line: #ffffff14;
  --line-soft: #ffffff0d;

  --text: #f5f2fc;
  --text-2: #ada5c4;
  --text-3: #7b7391;

  --accent: #8b6df0;
  --accent-lit: #b79dff;
  --accent-dim: #8b6df024;
  --danger: #ffab9f;

  --radius: 22px;
  --ease: cubic-bezier(.2, .7, .3, 1);

  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }

/* .loading and the action buttons set `display`, which outranks the UA sheet's
   [hidden] rule and would leave them stuck on screen. Restore the attribute. */
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

:focus-visible { outline: 2px solid var(--accent-lit); outline-offset: 3px; border-radius: 6px; }

/* Ambient light behind everything; fixed so it does not scroll away. */
.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(58% 40% at 82% -8%, #7b57e04d, transparent 70%),
    radial-gradient(50% 36% at 4% 2%, #4b2fa030, transparent 72%),
    radial-gradient(86% 46% at 50% 106%, #3a247038, transparent 70%);
}

.shell {
  position: relative;
  width: min(100%, 560px);
  min-height: 100dvh;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: calc(18px + env(safe-area-inset-top)) 20px 0;
}

main { display: flex; flex-direction: column; gap: 12px; }
#release { display: flex; flex-direction: column; gap: 12px; }

/* ---------- top bar ---------- */

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 2px 10px; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand img { border-radius: 11px; box-shadow: 0 6px 18px #0009; }
.brand h1 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.015em; color: var(--text-2); }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px 6px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.pill[data-state="busy"]::before { background: var(--accent-lit); animation: pulse 1.4s var(--ease) infinite; }
.pill[data-state="ready"]::before { background: #5ee0a0; box-shadow: 0 0 0 3px #5ee0a026; }
.pill[data-state="error"]::before { background: #ff7a66; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.7); } }

/* ---------- cards ---------- */

.card {
  background: linear-gradient(#ffffff0d, #ffffff05);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 0 #ffffff0f inset, 0 20px 46px -24px #000000d9;
}

.label { margin: 0 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--text-3); }

.hero { padding: 22px; }
.display { margin: 0; font-size: clamp(46px, 15vw, 58px); font-weight: 700; letter-spacing: -.045em; line-height: .92; }
.subline { margin: 10px 0 0; font-size: 14px; color: var(--text-2); }

.facts { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 0; padding: 0; list-style: none; }
.facts li {
  display: flex; align-items: baseline; gap: 7px;
  padding: 7px 11px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line-soft);
}
.facts span { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.facts b { font-size: 13px; font-weight: 600; color: var(--text); }

/* ---------- release notes ---------- */

.notes-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.notes-head h2 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
.count { font-size: 12px; color: var(--text-3); white-space: nowrap; }

.changes { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.changes li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: 14px; line-height: 1.45; }

.tag {
  margin-top: 2px; padding: 2px 7px; border-radius: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.tag--feat { color: #cbb6ff; background: var(--accent-dim); border: 1px solid #8b6df038; }
.tag--fix { color: #9fb6d6; background: #7fa8d81c; border: 1px solid #7fa8d82e; }

.prose { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); color: var(--text-2); font-size: 13.5px; line-height: 1.6; }
.prose h3 { margin: 0 0 8px; font-size: 13px; font-weight: 650; color: var(--text); }
.prose p { margin: 0 0 11px; }
.prose > :last-child { margin-bottom: 0; }

/* ---------- verification ---------- */

.verify { padding: 0; }
.verify summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 17px 20px; cursor: pointer; list-style: none;
  font-size: 14px; font-weight: 600; color: var(--text-2);
}
.verify summary::-webkit-details-marker { display: none; }
.verify summary::after {
  content: ""; width: 7px; height: 7px; margin-right: 3px;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3);
  transform: translateY(-3px) rotate(45deg); transition: transform .2s var(--ease);
}
.verify[open] summary::after { transform: translateY(1px) rotate(225deg); }
.verify dl { margin: 0; padding: 0 20px 19px; display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; }
.verify dt { font-size: 12px; color: var(--text-3); }
.verify dd {
  margin: 0; overflow-wrap: anywhere; color: var(--text-2);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; font-size: 11.5px; line-height: 1.5;
}

/* ---------- loading placeholder ---------- */

.bone { background: linear-gradient(90deg, #ffffff0a, #ffffff1a, #ffffff0a) 0 0 / 200% 100%; border-radius: 8px; animation: sweep 1.4s linear infinite; }
.bone--label { width: 96px; height: 11px; margin-bottom: 18px; }
.bone--display { width: 62%; height: 46px; border-radius: 12px; }
.bone--subline { width: 45%; height: 13px; margin-top: 14px; }
.bone-row { display: flex; gap: 7px; margin-top: 20px; }
.bone--chip { width: 88px; height: 31px; border-radius: 10px; }
@keyframes sweep { to { background-position: -200% 0; } }

/* ---------- error ---------- */

.error-card { border-color: #ff6a5433; background: linear-gradient(#ff6a5412, #ff6a5405); }
.error-card p { margin: 0 0 15px; color: var(--danger); font-size: 14.5px; line-height: 1.5; }

/* ---------- footer ---------- */

.howto { margin: 6px 2px 0; font-size: 13px; line-height: 1.6; color: var(--text-3); }
.howto h2 { margin: 0 0 9px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.howto p { margin: 0 0 10px; }
.howto strong { color: var(--text-2); font-weight: 600; }

/* ---------- action bar ---------- */

/* margin-top:auto drops it to the bottom on short pages; sticky pins it to the
   viewport edge once the content is tall enough to scroll. */
.actionbar {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding: 18px 0 calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 58%, #0a071100);
}

.btn {
  display: block; width: 100%;
  border: 0; border-radius: 15px; padding: 16px;
  font-family: inherit; font-size: 16px; font-weight: 600;
  text-align: center; text-decoration: none; cursor: pointer;
  transition: transform .12s var(--ease), opacity .15s, background-color .15s;
}
.btn:active { transform: scale(.985); }

.btn--primary { color: #fff; background: linear-gradient(#9375f5, #7551e4); box-shadow: 0 12px 28px -12px #7551e4d9, 0 1px 0 #ffffff30 inset; }
.btn--primary:disabled { opacity: .38; box-shadow: none; cursor: default; transform: none; }

.btn--quiet { padding: 13px; font-size: 14.5px; color: var(--accent-lit); background: var(--surface); border: 1px solid var(--line); }

.btn--text { margin-top: 15px; padding: 11px; font-size: 13.5px; color: var(--accent-lit); background: none; }

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