* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
}

body.beta-flow {
  background: #ececea;
  color: var(--fg);
  font-family: var(--font-sans);
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 25% 20%, rgba(245, 246, 248, 0.55), transparent 70%),
    radial-gradient(55% 45% at 78% 72%, rgba(210, 212, 216, 0.35), transparent 72%),
    radial-gradient(90% 70% at 50% 50%, rgba(230, 232, 235, 0.18), transparent 75%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: radial-gradient(rgba(28, 28, 28, 0.05) 0.5px, transparent 0.6px);
  background-size: 3px 3px;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  background: rgba(236, 236, 234, 0.82);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--charcoal-100);
  font-size: 17px;
  font-weight: var(--w-bold);
  letter-spacing: -1.2px;
  text-decoration: none;
}

.wordmark:hover { opacity: 0.7; }

.wordmark .dot {
  width: 6px;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--charcoal-100);
  box-shadow: 0 0 0 4px rgba(28, 28, 28, 0.06);
  animation: dot-life 10s var(--ease-in-out) infinite;
}

@keyframes dot-life {
  0%, 40% {
    background: #1c1c1c;
    box-shadow: 0 0 0 4px rgba(28, 28, 28, 0.06);
  }
  50% {
    background: #5FC8CD;
    box-shadow: 0 0 0 5px rgba(95, 200, 205, 0.22);
  }
  70% {
    background: #5FC8CD;
    box-shadow: 0 0 0 8px rgba(95, 200, 205, 0.08);
  }
  90% {
    background: #5FC8CD;
    box-shadow: 0 0 0 5px rgba(95, 200, 205, 0.22);
  }
  100% {
    background: #1c1c1c;
    box-shadow: 0 0 0 4px rgba(28, 28, 28, 0.06);
  }
}

.topbar .nav {
  display: flex;
  gap: 26px;
  align-items: center;
}

.topbar .nav a {
  color: var(--charcoal-82);
  font-size: 13px;
  text-decoration: none;
}

.topbar .nav a:hover { color: var(--charcoal-100); }

.topbar .nav .sep {
  color: var(--charcoal-40);
  opacity: 0.5;
  margin: 0 14px;
  user-select: none;
}

.meta-cta {
  color: var(--charcoal-40);
  font-size: 12px;
  text-decoration: none;
  transition: color 0.18s ease;
}

.meta-cta:hover { color: #5FC8CD; }
.meta-cta:active { color: #32a81e; }

.beta-main {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 150px 0 104px;
}

.beta-main.narrow {
  width: min(960px, calc(100vw - 40px));
  padding-bottom: 92px;
}

.access-main {
  padding-top: 132px;
}

.beta-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.78fr);
  gap: clamp(40px, 7vw, 92px);
  align-items: start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--fg-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #5FC8CD;
}

.beta-title {
  max-width: 760px;
  margin: 0;
  color: var(--fg);
  font-size: clamp(40px, 5.2vw, 76px);
  font-weight: var(--w-semibold);
  line-height: 1.02;
  letter-spacing: -1.6px;
  text-wrap: balance;
}

.beta-main.narrow .beta-title {
  font-size: clamp(38px, 5.2vw, 60px);
  line-height: 1.04;
  letter-spacing: -1.5px;
}

.accent { color: #5FC8CD; }

.lede {
  max-width: 620px;
  margin: 28px 0 0;
  color: var(--fg-body);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.5;
  text-wrap: pretty;
}

.beta-main.narrow .lede {
  margin-top: 18px;
  max-width: 680px;
}

.truths {
  display: grid;
  margin-top: 46px;
  max-width: 650px;
  border-top: 1px solid var(--border);
}

.truth {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  color: var(--fg-body);
  font-size: 15px;
}

.truth strong {
  color: var(--fg);
  font-weight: var(--w-semibold);
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--r-container);
  background: rgba(247, 244, 237, 0.88);
  box-shadow: 0 24px 80px rgba(28, 28, 28, 0.08);
}

.download-form-panel {
  position: sticky;
  top: 112px;
  padding: 28px;
}

.access-panel {
  padding: clamp(26px, 5vw, 44px);
}

.access-panel.is-recovery {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 36px);
}

.access-panel.is-recovery .beta-title {
  max-width: 640px;
  font-size: clamp(34px, 4.7vw, 54px);
  line-height: 1.06;
  letter-spacing: -1.2px;
}

.access-panel.is-recovery .lede {
  margin-top: 18px;
  max-width: 620px;
}

.panel h2 {
  margin: 0 0 8px;
  color: var(--fg);
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: -0.7px;
}

.panel p {
  margin: 0 0 22px;
  color: var(--fg-body);
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--fg);
  font-size: 13px;
  font-weight: var(--w-semibold);
}

input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--border);
  border-radius: var(--r-button);
  background: var(--off-white);
  color: var(--fg);
  padding: 0 15px;
  font: inherit;
  font-size: 16px;
}

input:focus {
  outline: none;
  border-color: var(--border-interactive);
  box-shadow: var(--focus-shadow);
}

.hp { display: none; }

button,
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--r-button);
  background: var(--charcoal);
  color: var(--fg-inverse);
  box-shadow: var(--shadow-inset-dark);
  padding: 0 20px;
  font: inherit;
  font-weight: var(--w-semibold);
  text-decoration: none;
  cursor: pointer;
}

.download-form-panel button {
  width: 100%;
  height: 52px;
  margin-top: 14px;
}

button:hover,
.button:hover {
  color: #5FC8CD;
  opacity: 0.92;
}

button:active,
.button:active { color: #32a81e; }

button:disabled {
  cursor: default;
  opacity: 0.68;
}

.secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border-interactive);
  box-shadow: none;
}

.msg,
.form-msg,
.status {
  border-radius: var(--r-card-sm);
  padding: 12px 13px;
  font-size: 14px;
  line-height: 1.45;
}

.msg {
  display: none;
  margin-top: 14px;
}

.msg.ok,
.form-msg,
.status {
  background: rgba(95, 200, 205, 0.1);
  color: var(--fg);
}

.msg.ok,
.msg.err { display: block; }

.msg.err,
.form-msg.error,
.status.error {
  background: rgba(157, 39, 39, 0.08);
  color: #8c2626;
}

.status {
  margin-top: 24px;
  border: 1px solid var(--border);
}

.access-panel.is-recovery .status {
  margin-top: 24px;
}

.fine,
.mini,
.note {
  color: var(--fg-muted);
  font-size: 13px;
  line-height: 1.55;
}

.fine {
  margin-top: 16px;
}

.fine a { color: var(--fg-muted); }

.mini {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.proof {
  margin-top: 86px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.proof-item {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  color: var(--fg-body);
  font-size: 15px;
  line-height: 1.55;
}

.proof-item strong {
  display: block;
  margin-bottom: 5px;
  color: var(--fg);
  font-weight: var(--w-semibold);
}

.download-card,
.refresh-form,
.steps {
  margin-top: 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: rgba(252, 251, 248, 0.62);
  padding: 22px;
}

.access-panel.is-recovery .refresh-form {
  margin-top: 22px;
  padding: 22px;
}

.access-panel.is-recovery .refresh-form p {
  margin-bottom: 18px;
}

.access-panel.is-recovery .refresh-form button {
  margin-top: 14px;
}

.access-panel.is-recovery .form-msg {
  margin-top: 14px;
}

.download-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.download-title {
  color: var(--fg);
  font-weight: var(--w-semibold);
}

.download-meta {
  margin-top: 4px;
  color: var(--fg-muted);
  font-size: 13px;
}

.divider {
  height: 1px;
  margin: 20px 0;
  background: var(--border);
}

.key-label {
  margin-bottom: 8px;
  color: var(--fg-muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.key-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
}

code.key {
  flex: 1;
  min-width: 250px;
  display: flex;
  align-items: center;
  overflow-wrap: anywhere;
  border: 1px solid var(--border);
  border-radius: var(--r-button);
  background: rgba(28, 28, 28, 0.04);
  color: var(--fg);
  padding: 13px 14px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.note {
  margin: 18px 0 0;
}

.steps h2 {
  margin: 0 0 18px;
  font-size: 18px;
  letter-spacing: -0.3px;
}

.step-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 13px;
  color: var(--fg-body);
  line-height: 1.5;
}

.num {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  font-size: 13px;
  font-weight: var(--w-semibold);
}

.spinner {
  width: 34px;
  height: 34px;
  margin: 28px 0 0;
  border-radius: 999px;
  border: 2px solid var(--border);
  border-top-color: var(--charcoal);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden { display: none !important; }

.back-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--fg-muted);
  font-size: 14px;
  text-decoration: none;
}

.back-link:hover { color: var(--fg); }

.footer {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 48px;
  border-top: 1px solid var(--border);
  padding: 80px 32px 48px;
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
}

.footer .colophon {
  color: var(--charcoal-40);
  font-size: 13px;
  line-height: 1.55;
  max-width: 36ch;
}

.footer .wm {
  display: block;
  margin-bottom: 12px;
  color: var(--charcoal-100);
  font-size: 16px;
  font-weight: var(--w-bold);
  letter-spacing: -0.8px;
}

.footer h5 {
  margin: 4px 0 14px;
  color: var(--charcoal-40);
  font-size: 11px;
  font-weight: var(--w-semibold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer ul {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 10px 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer a {
  color: var(--charcoal-82);
  text-decoration: none;
  font-size: 14px;
}

.footer a:hover { color: var(--charcoal-100); }

.footer-meta {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--border);
  padding: 20px 0 48px;
  color: var(--charcoal-40);
  font-size: 12px;
}

.beta-main.narrow + .footer-meta {
  width: min(960px, calc(100vw - 40px));
}

.footer-meta a { color: var(--charcoal-40); }

.site-notes {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.future-state {
  color: var(--charcoal-83);
  font-weight: var(--w-semibold);
}

@media (max-width: 900px) {
  .topbar { padding: 16px 20px; }
  .topbar .nav,
  .meta-cta { display: none; }
  .beta-main {
    width: min(100% - 36px, 680px);
    padding-top: 112px;
  }
  .beta-hero {
    grid-template-columns: 1fr;
    gap: 42px;
  }
  .beta-title {
    font-size: clamp(38px, 10.5vw, 58px);
    letter-spacing: -1.4px;
  }
  .download-form-panel { position: static; }
  .truth { grid-template-columns: 1fr; gap: 5px; }
  .proof { grid-template-columns: 1fr; margin-top: 56px; }
  .download-head { align-items: stretch; }
  .download-head .button,
  .download-head button,
  .key-row button { width: 100%; }
  code.key { min-width: 0; }
  .footer {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 56px 20px 36px;
    width: 100%;
  }
  .footer ul { grid-template-columns: 1fr; }
  .footer-meta {
    width: calc(100% - 40px);
    flex-direction: column;
    align-items: flex-start;
  }
  .site-notes { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .wordmark .dot,
  .spinner { animation: none; }
}
