/* One family (Schibsted Grotesk), a cool stone ground, survey-blue for action, staked-green for done.
   The memorable thing is the estate's name, set huge as it is typed — everything else stays quiet. */
:root {
  --ground: #eef1f4;
  --paper: #ffffff;
  --ink: #17212b;
  --soft: #5b6672;
  --rule: #d5dbe1;
  --act: #2457c5;
  --act-ink: #ffffff;
  --staked: #2e7d4f;
  --wait: #a35f00;
  --fault: #b3261e;
  --focus: #2457c5;
}
@media (prefers-color-scheme: dark) {
  :root { --ground: #10161c; --paper: #182029; --ink: #e6ebf0; --soft: #9aa6b2; --rule: #2a3440; --act: #7fa4ff; --act-ink: #0b1430; --staked: #63c48c; --wait: #f0a64a; --fault: #ff8a80; --focus: #7fa4ff; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 17px/1.55 "Schibsted Grotesk", system-ui, sans-serif; }
a { color: var(--act); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px clamp(16px, 4vw, 40px); border-bottom: 1px solid var(--rule); }
.brand { color: var(--ink); text-decoration: none; font-weight: 700; }
.brand span { color: var(--soft); font-weight: 400; margin-left: 6px; }
#nav { display: flex; gap: 16px; align-items: center; font-size: 15px; color: var(--soft); }
#nav a { text-decoration: none; }

main { max-width: 720px; margin: 0 auto; padding: clamp(32px, 7vw, 72px) 16px 96px; outline: none; }
h1 { font-size: clamp(40px, 8vw, 72px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 900; margin: 0 0 20px; }
h2 { font-size: 22px; margin: 48px 0 12px; }
p { max-width: 62ch; }
.lead { font-size: 20px; color: var(--soft); margin: 0 0 32px; }

.button { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border: 0; border-radius: 10px; background: var(--act); color: var(--act-ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button.quiet { background: transparent; color: var(--act); border: 1.5px solid var(--act); }
.button.danger { background: transparent; color: var(--fault); border: 1.5px solid var(--fault); }
.link { background: none; border: 0; font: inherit; color: var(--act); cursor: pointer; padding: 0; }

/* What you get — three plain sentences, not cards */
.gets { list-style: none; padding: 0; margin: 40px 0; display: grid; gap: 18px; }
.gets li { padding-left: 18px; border-left: 3px solid var(--rule); }
.gets b { display: block; }
.gets span { color: var(--soft); }

/* The name, as you type it */
.namefield { display: block; margin: 8px 0 0; }
.namefield label { display: block; color: var(--soft); margin-bottom: 6px; }
.namefield input { width: 100%; font: inherit; font-weight: 900; font-size: clamp(26px, 7vw, 64px); letter-spacing: -0.03em; line-height: 1.1; color: var(--ink); background: transparent; border: 0; border-bottom: 3px solid var(--ink); padding: 4px 0 8px; border-radius: 0; }
.namefield input::placeholder { color: var(--rule); }
.namefield input:focus-visible { outline: none; border-bottom-color: var(--act); }
.verdict { min-height: 1.6em; margin: 10px 0 0; font-weight: 500; }
.verdict.ok { color: var(--staked); }
.verdict.no { color: var(--fault); }

/* The short name: chosen once, so it reads like a name and not a form field */
.shortfield { margin: 28px 0 0; }
.shortfield label { display: block; font-weight: 700; }
.hint { margin: 2px 0 10px; color: var(--soft); font-size: 15px; }
.shortrow { display: flex; align-items: baseline; gap: 2px; border-bottom: 2px solid var(--rule); max-width: 520px; }
.shortrow:focus-within { border-bottom-color: var(--act); }
.shortrow input { flex: 0 1 auto; field-sizing: content; min-width: 2ch; max-width: 100%; font: inherit; font-size: 26px; font-weight: 700; color: var(--ink); background: transparent; border: 0; padding: 4px 0 6px; }
.shortrow input:focus-visible { outline: none; }
.shortrow input::placeholder { color: var(--rule); }
.suffix { font-size: 26px; font-weight: 700; color: var(--soft); }

/* The deed: what this name becomes */
.deed { margin: 28px 0; background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 20px 22px; }
.deed dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.deed dt { color: var(--soft); }
.deed dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.deed .warn { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--rule); color: var(--soft); font-size: 15px; }

/* The build: a real sequence, so it is numbered */
.steps { list-style: none; padding: 0; margin: 24px 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 34px 1fr; gap: 0 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.steps li::before { content: counter(step); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; border: 1.5px solid var(--rule); color: var(--soft); }
.steps li.done::before { content: "✓"; background: var(--staked); border-color: var(--staked); color: var(--paper); }
.steps li.running::before { border-color: var(--act); color: var(--act); animation: pulse 1.4s ease-in-out infinite; }
.steps li.waiting::before { content: "…"; border-color: var(--wait); color: var(--wait); }
.steps li.failed::before { content: "!"; border-color: var(--fault); background: var(--fault); color: var(--paper); }
.steps .t { font-weight: 500; }
.steps li.pending .t { color: var(--soft); }
.steps .d { grid-column: 2; color: var(--soft); font-size: 15px; overflow-wrap: anywhere; }
.steps li.failed .d { color: var(--fault); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--act) 20%, transparent); } }
@media (prefers-reduced-motion: reduce) { .steps li.running::before { animation: none; } }

.status { font-weight: 700; }
.status.ready { color: var(--staked); }
.status.failed, .status.declined { color: var(--fault); }
.status.awaiting-approval { color: var(--wait); }

.panel { margin: 32px 0; background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 22px; }
.panel h2 { margin-top: 0; }
.notes { margin: 12px 0 0; padding-left: 20px; color: var(--soft); }
.error { color: var(--fault); background: var(--paper); border: 1.5px solid var(--fault); border-radius: 10px; padding: 12px 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }

/* Operator list */
.queue { list-style: none; padding: 0; margin: 0; }
.queue li { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; padding: 16px 0; border-bottom: 1px solid var(--rule); align-items: center; }
.queue .who { color: var(--soft); font-size: 15px; grid-column: 1; }
.queue .acts { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 8px; }
@media (max-width: 560px) { .queue li { grid-template-columns: 1fr; } .queue .acts { grid-row: auto; grid-column: 1; } .deed dl { grid-template-columns: 1fr; } .deed dt { margin-top: 6px; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 560px) { .brand span { display: none; } #nav { gap: 12px; } #nav span { display: none; } }

/* the two ways to run it (home, guide) */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 16px 0 8px; }
.choice { background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 18px 20px; }
.choice h3 { margin: 0 0 8px; font-size: 19px; }
.choice p { margin: 0 0 10px; }
.tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: var(--staked); color: var(--paper); font-size: 13px; font-weight: 700; vertical-align: middle; }

/* the hosting question on the create form */
fieldset.hosting { border: 0; padding: 0; margin: 28px 0 0; }
fieldset.hosting legend { font-weight: 700; padding: 0; margin-bottom: 6px; }
fieldset.hosting label { display: block; padding: 12px 14px; margin: 8px 0; border: 1.5px solid var(--rule); border-radius: 10px; cursor: pointer; }
fieldset.hosting label:has(input:checked) { border-color: var(--act); }
fieldset.hosting .hint { display: block; margin: 4px 0 0 26px; }
#ownfields { margin: 16px 0 0; display: grid; gap: 4px; }
#ownfields[hidden] { display: none; }
#ownfields label { font-weight: 700; margin-top: 12px; }
#ownfields input { font: inherit; font-size: 18px; padding: 8px 10px; border: 1.5px solid var(--rule); border-radius: 8px; background: transparent; color: var(--ink); max-width: 420px; }

/* the guide */
.guide h1 { font-size: clamp(36px, 7vw, 60px); }
.guide h2 { margin-top: 56px; scroll-margin-top: 16px; }
.guide h3 { margin: 32px 0 8px; font-size: 19px; scroll-margin-top: 16px; }
.guide section { scroll-margin-top: 16px; }
.toc { background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 14px 22px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 4px 0; }
.howto { padding-left: 22px; }
.howto li { margin: 10px 0; padding-left: 4px; }
code { font: 15px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--paper); border: 1px solid var(--rule); border-radius: 5px; padding: 1px 5px; overflow-wrap: anywhere; }
table.keys { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 16px; }
table.keys th, table.keys td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--rule); }
table.keys th { color: var(--soft); font-weight: 500; }
.faq dt { font-weight: 700; margin-top: 18px; }
.faq dd { margin: 4px 0 0; color: var(--soft); }
.setup li { margin: 12px 0; }
