@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #090a0e;
  --bg-raise: rgba(18, 20, 28, 0.78);
  --text: #f4f0e6;
  --muted: #b7b1a4;
  --line: rgba(244, 240, 230, 0.14);
  --danger: #ffb0a2;
  --ok: #c8f3d4;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: "Outfit", "Liberation Sans", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  font-size: 1.05rem;
}
body::before {
  content: "";
  position: fixed;
  inset: -15%;
  z-index: -1;
  background:
    radial-gradient(closest-side at 15% 10%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%),
    radial-gradient(closest-side at 90% 80%, rgba(88, 112, 150, 0.22), transparent 68%);
  animation: drift 32s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -2%, 0); }
}
main {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto 5rem;
  animation: rise 0.45s ease both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
h1, h2, h3 {
  font-family: "Fraunces", "Liberation Serif", serif;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 0.6rem;
}
h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); }
h2 { font-size: 1.55rem; }
p { margin: 0 0 0.8rem; }
a { color: var(--accent); }
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.5rem 0.8rem;
}
.skip:focus { top: 0.5rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.stub-banner {
  margin: 0;
  text-align: center;
  background: color-mix(in srgb, var(--accent) 16%, #14120e);
  color: var(--text);
  font-size: 0.92rem;
  padding: 0.4rem 1rem;
}
.site-header {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 0;
}
.wordmark {
  font-family: "Fraunces", serif;
  color: var(--text);
  text-decoration: none;
  font-size: 1.35rem;
}
.nav { display: flex; flex-wrap: wrap; gap: 0.85rem 1rem; align-items: center; }
.nav a { color: var(--text); text-decoration: none; }
.nav-join {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
}
.inline-form { margin: 0; }
.text-button, button, .button {
  font: inherit;
  cursor: pointer;
}
.text-button {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 0;
}
.button, .done-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  padding: 0.75rem 1.2rem;
  font-weight: 500;
}
.button-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.button-large, .done-button {
  min-height: 3.4rem;
  padding: 0.9rem 1.6rem;
  font-size: 1.15rem;
}
.done-button { width: min(100%, 420px); margin-top: 1rem; }
button:disabled, .button:disabled { opacity: 0.55; cursor: not-allowed; }
.hero { padding: 1.5rem 0 1rem; max-width: 40rem; }
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.lede { font-size: 1.25rem; max-width: 38rem; }
.quiet { color: var(--muted); }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }
.sheet, .card, .viz-frame {
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.sheet { padding: 1.4rem 1.3rem 1.6rem; margin: 1rem 0; }
.narrow { max-width: 34rem; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}
.card { padding: 1rem 1.05rem 1.15rem; }
.card-link { color: inherit; text-decoration: none; display: block; }
.card-link:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.stack { display: grid; gap: 0.45rem; }
label { font-size: 0.95rem; }
input, select, textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.75rem;
}
textarea { resize: vertical; }
.check { display: flex; gap: 0.7rem; align-items: center; font-size: 1.08rem; }
.check input { width: 1.2rem; height: 1.2rem; }
.form-error { color: var(--danger); }
.flash {
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.flash-ok { color: var(--ok); }
.flash-error, .flash-guide { color: var(--text); }
.disclaimer-text {
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  line-height: 1.45;
  padding: 1.4rem 1.3rem;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 65%, var(--line));
  background: rgba(255, 255, 255, 0.03);
  margin: 0.6rem 0 0.8rem;
}
.sign-form input[type="text"], .sign-form input:not([type="checkbox"]):not([type="hidden"]) {
  font-size: 1.15rem;
  min-height: 3rem;
}
.price {
  font-family: "Fraunces", serif;
  font-size: 4.5rem;
  line-height: 0.95;
  margin: 0.2rem 0;
}
.dash-head {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 1rem;
  align-items: end;
  margin-top: 0.5rem;
}
.readout-num {
  font-family: "Fraunces", serif;
  font-size: 3.4rem;
  line-height: 0.9;
  margin: 0;
}
.demo-flag, .callout {
  border-left: 3px solid var(--accent);
  padding-left: 0.75rem;
  color: var(--muted);
}
.viz-frame { padding: 0.6rem 0.6rem 0.9rem; margin: 0.8rem 0 1rem; }
.viz { position: relative; min-height: 460px; }
.card-stage { position: relative; height: 120px; margin: -0.2rem -0.2rem 0.6rem; border-radius: 16px; overflow: hidden; background: radial-gradient(circle at 50% 80%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); }
.card-canvas { width: 100%; height: 120px; display: block; }
.done-burst { position: fixed; inset: 0; z-index: 40; pointer-events: none; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 18%, transparent), transparent 62%); }
.done-burst canvas { width: 100%; height: 100%; display: block; }
.letter-preview { white-space: pre-wrap; font-family: Georgia, serif; background: #f6f1e6; color: #1b140c; padding: 1rem; border-radius: 12px; }
.viz-canvas { width: 100%; height: 440px; display: block; }
.viz-fallback {
  min-height: 440px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.2rem;
}
.viz.is-3d .viz-fallback { display: none; }
.viz:not(.is-3d) .viz-canvas { display: none; }
.gauge-2d {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p, 0) * 1%), rgba(255, 255, 255, 0.08) 0);
  flex: none;
}
.gauge-2d span {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #12141c;
  font-family: "Fraunces", serif;
  font-size: 1.45rem;
}
.path-2d {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
}
.path-2d li {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
}
.path-2d li.is-done {
  background: var(--accent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 70%, transparent);
}
.viz-frame figcaption, .legend {
  color: var(--muted);
  font-size: 0.95rem;
}
.legend { display: flex; gap: 1rem; list-style: none; margin: 0.4rem 0 0; padding: 0 0.4rem; flex-wrap: wrap; }
.pips { display: flex; gap: 0.35rem; }
.pip {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}
.pip.is-on {
  background: var(--accent);
  animation: pulse 2.8s ease-in-out infinite;
}
@keyframes pulse {
  50% { transform: scale(0.85); opacity: 0.7; }
}
.pending {
  border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--line));
  border-radius: 16px;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.18);
}
.pending-kicker {
  font-family: "Fraunces", serif;
  font-size: 1.35rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.what span, .why span, .label {
  display: block;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.what, .why { font-size: 1.25rem; }
.next-step { color: var(--muted); }
.assist, .prefills { display: grid; gap: 0.8rem; margin-top: 0.8rem; }
.prefill {
  font-family: "Outfit", sans-serif;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
}
.media-slot {
  min-height: 88px;
  border-radius: 14px;
  border: 1px dashed var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  margin-top: 0.4rem;
}
.bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 1rem;
}
.bar-fill {
  display: block;
  height: 100%;
  width: calc(var(--p, 0) * 1%);
  background: var(--accent);
}
.steps, .plain { padding-left: 1.1rem; }
.steps { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; list-style: none; padding: 0; color: var(--muted); }
.steps .is-current { color: var(--text); }
.review { display: grid; gap: 0.6rem; }
.review div { display: grid; grid-template-columns: 9rem 1fr; gap: 0.5rem; }
.review dt { color: var(--muted); }
.state-form { display: flex; gap: 0.6rem; align-items: end; flex-wrap: wrap; margin: 0.5rem 0; }
.state-form select { width: auto; min-width: 14rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.cell-none { color: var(--muted); }
.cell-pending { color: var(--accent); }
.cell-filled { color: var(--ok); }
.guide-toggle {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.85rem 1.1rem;
  box-shadow: var(--shadow);
}
.guide-panel {
  position: fixed;
  right: 1rem;
  bottom: 4.6rem;
  z-index: 30;
  width: min(380px, calc(100vw - 2rem));
  max-height: min(520px, calc(100vh - 7rem));
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.9rem;
  border-radius: 20px;
  background: rgba(12, 14, 20, 0.94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.guide-panel[hidden] { display: none; }
.guide-log { overflow: auto; display: grid; gap: 0.45rem; min-height: 8rem; }
.guide-bubble, .guide-hint {
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}
.guide-bubble.user { justify-self: end; background: color-mix(in srgb, var(--accent) 18%, transparent); }
.guide-form, #guide-form { display: grid; grid-template-columns: 1fr auto; gap: 0.45rem; align-items: end; }
#guide-form button { height: 100%; border-radius: 12px; border: 0; background: var(--accent); color: var(--accent-ink); padding: 0 0.9rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 800px) {
  .dash-head { grid-template-columns: 1fr; }
  .viz, .viz-canvas, .viz-fallback { min-height: 300px; height: auto; }
  .viz-canvas { height: 300px; }
  .viz-fallback { flex-direction: column; align-items: flex-start; }
  .review div { grid-template-columns: 1fr; }
  h1 { font-size: 2.3rem; }
  .price { font-size: 3.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
