/* Setup + start pages.
 *
 * Layers on top of netgain.css and uses only its tokens — no new colours, no
 * new fonts. The marketing site has no form styles (it has no forms), so the
 * components below are new, but every value they use comes from :root there.
 * Change a brand token in netgain.css and this follows.
 */

.setup-main { padding: 44px 0 80px; }

/* ---------- page head ---------- */
.setup-head { margin-bottom: 30px; display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap; }
.setup-head > div:first-child { flex: 1; min-width: 260px; }
.setup-head h1 { font-size: clamp(30px, 4vw, 44px); margin: 14px 0 10px; }
.setup-head .lede { color: var(--ink-soft); font-size: 17px; line-height: 1.55; max-width: 60ch; }
.setup-head .lede b { color: var(--ink); font-weight: 600; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 15px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft);
}

/* ---------- layout ---------- */
.setup-grid { display: grid; grid-template-columns: 252px 1fr; gap: 30px; align-items: start; }

.rail {
  position: sticky; top: 96px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow);
}
.rail button {
  display: flex; align-items: center; gap: 9px; width: 100%;
  border: 0; background: transparent; cursor: pointer; text-align: left;
  font-family: var(--font-sans); font-size: 14.5px; font-weight: 500;
  color: var(--ink-soft); padding: 11px 13px; border-radius: 9px;
  transition: background .15s ease, color .15s ease;
}
.rail button:hover { background: var(--surface-2); color: var(--ink); }
.rail button.on { background: var(--mint); color: var(--navy); font-weight: 600; }
.rail button .tick { color: var(--accent-bright); font-weight: 700; }
.rail button .opt {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-faint);
}

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px 30px; box-shadow: var(--shadow);
}
.panel-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; margin-bottom: 20px;
}
.panel-head h2 { font-size: 21px; }
.panel-head .step {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint);
  letter-spacing: .08em; white-space: nowrap;
}
.panel .blurb { color: var(--ink-soft); font-size: 15px; line-height: 1.6; margin: 0 0 22px; max-width: 72ch; }

/* ---------- fields ---------- */
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.fgrid .span2, .fgrid .full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.field > label .req { color: var(--accent); margin-left: 3px; }
.field .help { font-size: 12.5px; color: var(--ink-faint); line-height: 1.5; }

.field input, .field select, .field textarea {
  font-family: var(--font-sans); font-size: 15px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 12px 13px; width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; background: var(--surface);
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-bright) 18%, transparent);
}
.field textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.field select {
  appearance: none; padding-right: 38px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'><path d='M1 1l5 5 5-5' stroke='%23808090' stroke-width='1.6' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center;
}

/* radio pills + checkboxes */
.choice { display: flex; gap: 10px; flex-wrap: wrap; }
.choice label {
  flex: 1; min-width: 132px; display: flex; align-items: center; gap: 10px;
  cursor: pointer; font-size: 14.5px;
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px 14px;
  background: var(--paper); transition: .15s ease;
}
.choice label:hover { border-color: var(--accent-bright); }
.choice label:has(input:checked) {
  border-color: var(--accent); background: var(--surface);
  font-weight: 600; color: var(--navy); box-shadow: var(--shadow);
}
.choice input { width: auto; padding: 0; accent-color: var(--accent); }

.checkrow {
  display: flex; gap: 11px; align-items: flex-start; cursor: pointer;
  padding: 13px 15px; border-radius: 10px; font-size: 14.5px;
  border: 1px solid var(--line-strong); background: var(--paper); transition: .15s ease;
}
.checkrow:hover { border-color: var(--accent-bright); }
.checkrow.on { border-color: var(--accent); background: var(--surface); box-shadow: var(--shadow); }
.checkrow input { width: auto; margin-top: 3px; accent-color: var(--accent); }

.switch { display: inline-flex; align-items: center; gap: 11px; cursor: pointer; user-select: none; }
.switch .tr {
  width: 46px; height: 26px; border-radius: 999px; background: var(--line-strong);
  position: relative; transition: .18s ease; flex: none;
}
.switch .tr i {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--surface); transition: .18s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.switch.on .tr { background: var(--accent); }
.switch.on .tr i { left: 23px; }

/* repeatable rows */
.rowcard {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 12px; background: var(--paper); position: relative;
}
.rowcard .rowhead {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px;
}
.rowcard .rowhead .n {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-faint); font-weight: 500;
}
.rowcard .del {
  border: 0; background: transparent; color: var(--ink-faint); cursor: pointer;
  font-size: 19px; line-height: 1; padding: 2px 7px; border-radius: 7px;
}
.rowcard .del:hover { background: var(--surface-2); color: var(--accent); }

/* ---------- notices ---------- */
.note {
  display: flex; gap: 12px; border-radius: var(--radius);
  padding: 14px 16px; font-size: 14.5px; line-height: 1.55;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
}
.note .ic { flex: none; font-weight: 700; color: var(--accent-bright); }
.note b { color: var(--ink); font-weight: 600; }
.note.warn { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.note.warn .ic { color: var(--accent); }
.note.good { border-color: color-mix(in srgb, var(--accent-bright) 40%, var(--line)); background: color-mix(in srgb, var(--accent-bright) 8%, var(--surface)); }

/* ---------- panel footer ---------- */
.panel-foot {
  display: flex; align-items: center; gap: 12px;
  margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line);
}
.panel-foot .spacer { flex: 1; }
.panel-foot .save { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); }

/* ---------- review table ---------- */
.review { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.review table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.review th, .review td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.review th { width: 240px; color: var(--ink-faint); font-weight: 500; background: var(--paper); }
.review tr:last-child th, .review tr:last-child td { border-bottom: 0; }
.review .unset { color: var(--ink-faint); }

/* ---------- done ---------- */
.done { text-align: center; padding: 46px 24px; max-width: 640px; margin: 0 auto; }
.done .tick {
  width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 20px;
  display: grid; place-items: center; font-size: 28px;
  background: var(--mint); color: var(--accent-bright);
  border: 1px solid color-mix(in srgb, var(--accent-bright) 35%, var(--line));
}
.done h1 { font-size: 30px; margin-bottom: 12px; }
.done p { color: var(--ink-soft); font-size: 16.5px; line-height: 1.6; }
.steps { margin-top: 28px; text-align: left; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.steps > div { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--ink-soft); }
.steps > div:last-child { border-bottom: 0; }
.steps b { color: var(--navy); font-weight: 600; }
.steps .m { flex: none; width: 17px; color: var(--accent-bright); font-weight: 700; }
.steps .m.pending { color: var(--ink-faint); }

/* ---------- start page ---------- */
.start-wrap { max-width: 560px; margin: 0 auto; text-align: center; padding: 70px 0 90px; }
.start-wrap h1 { font-size: clamp(30px, 4.4vw, 44px); margin: 16px 0 14px; }
.start-wrap p { color: var(--ink-soft); font-size: 17px; line-height: 1.6; }
.start-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 32px; }
.start-pick button {
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 24px 20px; cursor: pointer; text-align: left;
  font-family: var(--font-sans); transition: .18s ease; box-shadow: var(--shadow);
}
.start-pick button:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.start-pick .t { font-family: var(--font-display); font-size: 19px; font-weight: 600; color: var(--navy); }
.start-pick .d { font-size: 14px; color: var(--ink-soft); margin-top: 6px; line-height: 1.5; }
.start-status { margin-top: 30px; font-family: var(--font-mono); font-size: 13px; color: var(--ink-faint); }

@media (max-width: 900px) {
  .setup-grid { grid-template-columns: 1fr; }
  .rail { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .rail button { white-space: nowrap; width: auto; }
  .fgrid { grid-template-columns: 1fr; }
  .fgrid .span2 { grid-column: span 1; }
  .start-pick { grid-template-columns: 1fr; }
  .panel { padding: 22px 18px; }
}
