/*
  Onboarding — shares the marketing site's identity.
  Grey means handled. Orange means you: it marks the step that is yours, the
  selected plan, and the button that moves you forward. Nothing else.
*/

:root {
  --ground: #d9dcd4;
  --sheet: #eef0ea;
  --ink: #171a16;
  --body: #2b2f2a;
  --muted: #5f655c;
  --rule: #b4b9ad;
  --rule-soft: #c6cabf;
  --attention: #e8531f;
  --attention-ink: #fff7f3;
  --danger: #a8261c;
  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --col: min(880px, 100% - 2 * clamp(20px, 5vw, 56px));
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--ground);
  color: var(--body);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--attention); outline-offset: 3px; }
[hidden] { display: none !important; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--sheet); padding: 0.05em 0.35em; border-radius: 3px; }

/* ---------- header ---------- */

.top {
  width: var(--col);
  margin: 0 auto;
  padding: 26px 0 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.wordmark {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}

.signin-toggle {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 4px;
}
.signin-toggle:hover { color: var(--ink); }

.signin {
  width: var(--col);
  margin: 18px auto 0;
  padding: 18px 20px;
  background: var(--sheet);
  border-radius: 6px;
}
.signin label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.signin .row { display: flex; flex-wrap: wrap; gap: 10px; }
.signin input { flex: 1 1 240px; }

/* ---------- flow ---------- */

.flow {
  width: var(--col);
  margin: 0 auto;
  padding: clamp(36px, 6vw, 64px) 0 72px;
}

.progress {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 0.93rem;
  font-variant-numeric: tabular-nums;
  margin-bottom: 28px;
}
.bar { flex: 1; max-width: 260px; height: 3px; background: var(--rule-soft); border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); transition: width 300ms ease; }

h1 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(1.9rem, 4.2vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-wrap: balance;
}
h1:focus { outline: none; }

h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.lead {
  margin: 0 0 32px;
  max-width: 58ch;
  font-size: 1.15rem;
  color: var(--muted);
}

p { margin: 0; }

/* ---------- fields ---------- */

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}
.field > span { font-weight: 600; color: var(--ink); }
.field small { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 13px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 5px;
  transition: border-color 120ms ease;
}
input:focus, textarea:focus { outline: none; border-color: var(--ink); }
textarea { resize: vertical; line-height: 1.55; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 28px; }
.chip {
  font: inherit;
  font-size: 0.9rem;
  padding: 7px 12px;
  background: transparent;
  color: var(--body);
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }

.error {
  color: var(--danger);
  font-weight: 500;
  margin: -8px 0 18px;
}
.hint { color: var(--muted); font-size: 0.95rem; margin-top: 10px; }
.fine { color: var(--muted); font-size: 0.88rem; margin-top: 28px; max-width: 60ch; }
.fine a { text-decoration-color: var(--rule); text-underline-offset: 3px; }

/* ---------- actions ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  margin-top: 8px;
}

.button {
  display: inline-block;
  padding: 14px 22px;
  font: inherit;
  font-weight: 700;
  color: var(--attention-ink);
  background: var(--attention);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 120ms ease;
}
.button:hover { background: #d4471a; }
.button:disabled { opacity: 0.6; cursor: wait; }

.link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 4px;
}
.link:hover { text-decoration-color: var(--ink); }

/* ---------- compose + preview ---------- */

.compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: start;
  margin-bottom: 20px;
}

.preview {
  background: var(--sheet);
  border: 1px solid var(--rule-soft);
  border-radius: 6px;
  padding: 18px 20px 16px;
  font-size: 0.97rem;
  position: sticky;
  top: 20px;
}
.preview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.85rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule-soft);
}
.example-tag { color: var(--attention); font-weight: 500; }
.preview-meta { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--rule-soft); font-size: 0.9rem; }
.preview-meta b { display: inline-block; width: 4.2em; color: var(--muted); font-weight: 500; }
.preview-body { padding: 16px 0 8px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.preview-foot { color: var(--muted); font-size: 0.8rem; text-decoration: underline; padding-top: 8px; }

/* ---------- what will happen ---------- */

.plan-of-action {
  list-style: none;
  margin: 0 0 12px;
  padding: 0 0 0 40px;
  counter-reset: act;
  position: relative;
}
.plan-of-action li {
  counter-increment: act;
  position: relative;
  padding: 0 0 26px;
}
.plan-of-action li::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--rule);
}
.plan-of-action li:last-child::before { height: 14px; bottom: auto; }
.plan-of-action li::after {
  content: counter(act);
  position: absolute;
  left: -39px;
  top: 0;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: var(--ground);
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
}
.plan-of-action li.yours::after { background: var(--attention); border-color: var(--attention); color: var(--attention-ink); }
.plan-of-action li.yours h2 { color: var(--attention); }
.plan-of-action p { color: var(--muted); max-width: 60ch; }

/* ---------- plans ---------- */

.plans { display: grid; border-top: 1px solid var(--rule); margin-bottom: 8px; }

.plan {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "mark name price"
    "mark detail detail"
    "mark note note";
  column-gap: 16px;
  row-gap: 2px;
  padding: 18px 8px 18px 0;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
}
.plan input {
  grid-area: mark;
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 5px 0 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  cursor: inherit;
}
.plan input:checked { border-color: var(--attention); background: radial-gradient(var(--attention) 45%, transparent 50%); }
.plan input:focus-visible { outline: 2px solid var(--attention); outline-offset: 3px; }
.plan-name { grid-area: name; font-weight: 700; color: var(--ink); font-size: 1.1rem; }
.plan-price { grid-area: price; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.plan-detail { grid-area: detail; color: var(--muted); font-size: 0.95rem; }
.plan-link { grid-area: note; justify-self: start; margin-top: 6px; color: var(--ink); font-weight: 600; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.plan-note { grid-area: note; margin-top: 6px; color: var(--muted); font-size: 0.88rem; }
.plan.unavailable { cursor: default; }
.plan.unavailable .plan-name, .plan.unavailable .plan-price { color: var(--muted); }
.plan.unavailable input { border-color: var(--rule); }

/* ---------- legal pages ---------- */

.prose { max-width: min(68ch, var(--col)); }
.prose h1 { margin-bottom: 8px; }
.prose h2 { margin: 36px 0 8px; font-size: 1.2rem; }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose a { text-decoration-color: var(--rule); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--ink); }
a.signin-toggle { text-decoration: underline; }

/* ---------- review screen ---------- */

.top-nav { display: flex; align-items: baseline; gap: 22px; color: var(--muted); }
.top-nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.top-nav a:hover { color: var(--ink); }
.top-nav .who { font-size: 0.9rem; }

.review { max-width: min(880px, var(--col)); }
.crumb { color: var(--muted); font-size: 0.93rem; margin-bottom: 14px; }
.crumb a { color: var(--muted); text-decoration-color: var(--rule); text-underline-offset: 3px; }

.review-summary {
  padding: 16px 0 18px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 8px;
}
.review-summary p:first-child { color: var(--ink); font-weight: 500; }

.people { list-style: none; margin: 0; padding: 0; }
.person { padding: 18px 0 14px; border-bottom: 1px solid var(--rule); }
.person-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.person-who { display: grid; gap: 1px; min-width: 0; }
.person-who b { color: var(--ink); font-size: 1.05rem; }
.person-who span { color: var(--muted); font-size: 0.93rem; overflow-wrap: anywhere; }
.person-email { font-size: 0.88rem; }
.person-actions { display: flex; align-items: baseline; gap: 16px; white-space: nowrap; }
.person-state { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.person.skipped .person-who b, .person.skipped .person-who span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--rule); }
.person.skipped .person-state { color: var(--muted); }
.person.skipped .message { opacity: 0.5; }

.message { margin-top: 10px; }
.message summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 500;
  padding: 10px 14px;
  background: var(--sheet);
  border: 1px solid var(--rule-soft);
  border-radius: 5px;
  list-style: none;
}
.message summary::-webkit-details-marker { display: none; }
.message summary::before { content: "Subject: "; color: var(--muted); font-weight: 400; }
.message[open] summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.message-body {
  padding: 16px 14px;
  background: var(--sheet);
  border: 1px solid var(--rule-soft);
  border-top: 0;
  border-radius: 0 0 5px 5px;
  color: var(--ink);
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.message-foot { margin: 14px 0 0; color: var(--muted); font-size: 0.8rem; text-decoration: underline; }

.approve-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  margin-top: 22px;
  padding: 16px 18px;
  background: var(--ink);
  color: #d8dcd2;
  border-radius: 6px;
  box-shadow: 0 -12px 30px -20px rgba(23, 26, 22, 0.6);
}
.approve-bar b { color: #fff; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.approve-bar #approve-skipped { color: #9aa094; margin-left: 6px; }
.approve-bar .button:disabled { opacity: 0.5; cursor: not-allowed; }

.empty { padding: 28px 0; }
.empty h2 { margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 56ch; margin-bottom: 20px; }

@media (max-width: 640px) {
  .person-head { flex-direction: column; }
  .approve-bar { border-radius: 0; margin-left: calc(-1 * clamp(20px, 5vw, 56px)); margin-right: calc(-1 * clamp(20px, 5vw, 56px)); }
}

/* ---------- done ---------- */

.done .lead b { color: var(--ink); }

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

.foot {
  width: var(--col);
  margin: 0 auto;
  padding: 24px 0 44px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  color: var(--muted);
  font-size: 0.93rem;
}
.foot > span { color: var(--ink); font-weight: 700; }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; margin-left: auto; }
.foot a { color: var(--muted); text-decoration-color: var(--rule); text-underline-offset: 3px; }
.foot a:hover { color: var(--ink); }

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  body { font-size: 1rem; }
  .compose { grid-template-columns: 1fr; }
  .preview { position: static; }
  .plan { grid-template-columns: auto 1fr; grid-template-areas: "mark name" "mark price" "mark detail" "mark note"; }
  .foot nav { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bar i, .button, input, textarea { transition: none; }
}
