:root {
  --bg: #0c0810;
  --card: #1a1220;
  --ink: #f7eef6;
  --muted: #d2bdd0;
  --accent: #ff4fa3;
  --accent-deep: #c21d74;
  --soft: #c4a1ff;
  --gold: #e8c47c;
  --plum: #3a1f3d;
  --field: #120a16;
  --line: color-mix(in oklab, var(--accent) 38%, transparent);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
  background:
    radial-gradient(ellipse at 18% 0%, #4a1848 0%, transparent 52%),
    radial-gradient(ellipse at 88% 100%, #2a1030 0%, transparent 48%),
    var(--bg);
}

a { color: var(--gold); }
a:hover { color: var(--ink); }

.page {
  width: min(960px, 100%);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 20px 32px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand:hover { color: var(--ink); }

.mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--plum);
  border: 2px solid color-mix(in oklab, var(--accent) 55%, var(--gold));
  box-shadow: 0 0 18px color-mix(in oklab, var(--accent) 28%, transparent);
  font-family: Palatino, "Palatino Linotype", Georgia, serif;
}

.mock {
  margin: 0 0 16px;
  padding: 8px 14px;
  border-radius: 999px;
  text-align: center;
  background: color-mix(in oklab, var(--gold) 16%, transparent);
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 600;
}

main { flex: 1; }

.stage {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 22px;
  min-height: 68vh;
}

.flow, .board {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 16px;
}

.card {
  width: min(480px, 100%);
  background: color-mix(in oklab, var(--card) 90%, black);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px 28px 28px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 color-mix(in oklab, var(--soft) 18%, transparent);
}

.card.wide { width: min(760px, 100%); }

.eyebrow, .kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, h3 { letter-spacing: -0.03em; }

h1 {
  margin: 0 0 12px;
  font-family: Palatino, "Palatino Linotype", Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 600;
  line-height: 1.12;
}

h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 700;
}

h3 {
  margin: 0 0 6px;
  font-family: Palatino, "Palatino Linotype", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
}

.lede, .note, .aside, .quiet {
  color: var(--muted);
}

.lede { margin: 0 0 22px; font-size: 1.05rem; }

.quiet { margin: 14px 0 0; font-size: 0.92rem; }

.home { display: grid; gap: 36px; align-content: start; }

.hero { max-width: 720px; padding-top: 18px; }

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  max-width: 12ch;
}

.hero .signin { max-width: 420px; }

.how h2 { margin: 0 0 14px; font-family: Palatino, "Palatino Linotype", Georgia, serif; font-size: 1.6rem; }

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.panel {
  background: color-mix(in oklab, var(--card) 90%, black);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 16px 16px;
}

.panel p:last-child { margin: 0; color: var(--muted); }

.top-actions { display: flex; align-items: center; gap: 16px; }

button.signin {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.signin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #fff7fb;
  color: #1a1020;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.signin:hover { background: #fff; color: #1a1020; }

.signin.compact {
  width: auto;
  min-height: 44px;
  padding: 8px 14px;
  font-size: 0.95rem;
}

.signin img { height: 22px; width: auto; display: block; }

.signin:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.choice:focus-within,
.chip:focus-within {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.aside {
  margin: 0;
  width: min(480px, 100%);
  text-align: center;
}

.dev {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid color-mix(in oklab, var(--soft) 25%, transparent);
}

.dev p { margin: 8px 0 0; }

button, input { font: inherit; color: inherit; }

button.linkish {
  background: none;
  border: 0;
  color: var(--gold);
  cursor: pointer;
  padding: 8px 0;
  font-weight: 600;
}

button.go, a.go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #fff7fb;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

button.go:hover, a.go:hover { color: #fff; }

label.field {
  display: block;
  margin: 0 0 8px;
  font-weight: 700;
}

input[type="text"], input[type="email"], input[type="password"], select, textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
}

textarea { min-height: 120px; resize: vertical; margin-bottom: 16px; }

.chips-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--soft) 35%, transparent);
  background: color-mix(in oklab, var(--plum) 50%, black);
  cursor: pointer;
}

.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }

.chip:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 18%, #120a16);
}

fieldset.levels {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
}

fieldset.levels legend { font-weight: 700; padding: 0; margin-bottom: 8px; }

.optional { color: var(--muted); font-weight: 600; font-size: 0.85rem; }

.soon p { color: var(--muted); margin: 0; }

input::placeholder { color: color-mix(in oklab, var(--muted) 70%, transparent); }

.error {
  margin: 0 0 12px;
  color: #ffb3c7;
  font-weight: 700;
}

.steps {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.steps li {
  flex: 1;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  padding-bottom: 8px;
  border-bottom: 2px solid color-mix(in oklab, var(--soft) 25%, transparent);
}

.steps a { color: var(--muted); text-decoration: none; }
.steps .now { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }

.choices {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}

.topic-grid { grid-template-columns: 1fr 1fr; }

.choice {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 14px 14px 14px 16px;
  border-radius: 16px;
  border: 1px solid color-mix(in oklab, var(--soft) 28%, transparent);
  background: color-mix(in oklab, var(--plum) 45%, black);
  cursor: pointer;
  min-height: 44px;
}

.choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.choice:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 16%, #120a16);
}

.choice strong { font-weight: 700; }
.choice span { color: var(--muted); font-size: 0.92rem; }

.back {
  display: inline-block;
  margin-top: 12px;
  color: var(--gold);
}

.stack {
  display: grid;
  gap: 16px;
  width: min(760px, 100%);
}

.issue-name {
  margin: 0 0 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid color-mix(in oklab, var(--gold) 40%, transparent);
  font-family: Palatino, "Palatino Linotype", Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.blurb + .blurb {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid color-mix(in oklab, var(--soft) 18%, transparent);
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.facts .card h2 { margin-bottom: 10px; }

.chips, .plain {
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li, .identity div {
  padding: 6px 0;
  border-bottom: 1px solid color-mix(in oklab, var(--soft) 16%, transparent);
}

.identity dt {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.identity dd { margin: 0 0 10px; }

.agentid-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: -4px 0 12px;
  padding: 4px 12px 4px 6px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--gold) 55%, transparent);
  background: color-mix(in oklab, var(--gold) 14%, transparent);
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.agentid-badge img {
  width: 18px;
  height: 18px;
  padding: 2px;
  border-radius: 50%;
  background: var(--gold);
  display: block;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
  word-break: break-all;
}

.edit { margin: 12px 0 0; font-size: 0.92rem; }

.cta h2 {
  font-family: Palatino, "Palatino Linotype", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
}

.foot {
  margin-top: 28px;
  text-align: center;
  font-size: 0.92rem;
}

.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--gold); }

.connect {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid color-mix(in oklab, var(--soft) 18%, transparent);
}

.connect h2 {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  font-size: 1.15rem;
}

.check {
  color: #1f6b3a;
  background: #e8f8ef;
  border: 1px solid #9ad4b0;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  white-space: nowrap;
}

.ok-card {
  background: color-mix(in oklab, #e8f8ef 55%, var(--card));
  border-radius: 12px;
  padding: 12px 14px 4px;
}

#domain-prompt {
  min-height: 280px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.banner {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #2a1538;
  color: #fffaf7;
}

@media (max-width: 720px) {
  .page { padding: 18px 16px 24px; }
  .card { padding: 24px 18px 20px; }
  .topic-grid, .facts, .how-grid { grid-template-columns: 1fr; }
  .hero h1, h1 { font-size: 2.1rem; }
  .signin.compact span, .top .signin.compact { font-size: 0.85rem; }
  .top { align-items: flex-start; }
  .connect h2 { flex-direction: column; align-items: flex-start; }
}
