/**
 * setup.css — the sign-in door and the new-client setup.
 *
 * A thin layer on app.css, the same way account.css is. Every token, colour
 * and curve is app.css's; nothing is redefined. What this adds:
 *
 *   - the narrow form column and its labels / password reveal
 *   - the step line across the top of setup (where am I, how far to go)
 *   - the "building your brand" wait, with the client's own site beside it
 *   - the brand review: logo, colours, words, each editable in place
 *
 * No emoji. Icons are inline SVG, one weight, one size.
 */

/* ------------------------------------------------------------------ *
 * Page
 * ------------------------------------------------------------------ */

body.door, body.setup { padding-bottom: var(--s8); }

.door-wrap  { padding-top: 9vh; max-width: 460px; }
.setup-wrap { padding-top: var(--s6); }

.form { margin-top: var(--s5); }
.form > .lbl + .field,
.form > .lbl + .pw { margin-top: var(--s2); }

.lbl {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}

.hint { font-size: 13px; color: var(--ink-3); margin: var(--s2) 0 0 !important; }

.links {
  display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3);
  font-size: 14.5px; color: var(--ink-3);
}
.links a { color: var(--ink-2); text-underline-offset: 3px; }
.links a:hover { color: var(--ink); }

/* Password reveal — the word sits inside the field, right-hand end. */
.pw { position: relative; }
.pw .field { padding-right: 76px; }
.pw-show {
  position: absolute; right: var(--s3); top: 50%; transform: translateY(-50%);
  border: 0; background: none; cursor: pointer; font: inherit;
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); padding: var(--s2);
}
.pw-show:hover { color: var(--ink); }

input.field { min-height: var(--tap); }

/* ------------------------------------------------------------------ *
 * The step line
 * ------------------------------------------------------------------ */

.steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2);
  margin: 0 0 var(--s6);
  list-style: none; padding: 0;
}
.steps li { display: grid; gap: var(--s2); }
.steps .bar {
  height: 3px; border-radius: var(--r-pill); background: var(--line);
  overflow: hidden;
}
.steps .bar i {
  display: block; height: 100%; width: 0; background: var(--accent);
  transition: width var(--t3) var(--ease);
}
.steps li.done .bar i, .steps li.on .bar i { width: 100%; }
.steps .name { font-size: 12px; color: var(--ink-3); }
.steps li.on .name { color: var(--ink); }
@media (max-width: 420px) { .steps .name { font-size: 11px; } }

/* ------------------------------------------------------------------ *
 * Building — the wait, with their own site beside it
 * ------------------------------------------------------------------ */

.build {
  display: grid; gap: var(--s6); align-items: center;
}
@media (min-width: 900px) {
  .setup-wrap.wide { max-width: 1060px; }
  .build { grid-template-columns: 1fr 1.15fr; }
}

.build .ringrow { display: flex; align-items: center; gap: var(--s4); }
.build .ring { width: 56px; height: 56px; flex: none; }
.build .now { font-size: 17px; color: var(--ink); }

.checks { list-style: none; padding: 0; margin: var(--s5) 0 0; display: grid; gap: var(--s3); }
.checks li {
  display: flex; align-items: center; gap: var(--s3);
  font-size: 15px; color: var(--ink-3);
  transition: color var(--t2) var(--ease);
}
.checks li .tick {
  width: 20px; height: 20px; flex: none; border-radius: 50%;
  border: 1px solid var(--line); display: grid; place-items: center;
  transition: background var(--t2) var(--ease), border-color var(--t2) var(--ease);
}
.checks li .tick svg { width: 12px; height: 12px; opacity: 0; transition: opacity var(--t2) var(--ease); }
.checks li.done { color: var(--ink); }
.checks li.done .tick { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.checks li.done .tick svg { opacity: 1; }
.checks li.now { color: var(--ink); }
.checks li.now .tick { border-color: var(--ink-3); animation: breathe 2.4s var(--ease) infinite; }

.site {
  border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  background: var(--bg-raised); box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.site .bar {
  display: flex; align-items: center; gap: var(--s2);
  padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px; color: var(--ink-3);
}
.site .bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex: none; }
.site .bar span { margin-left: var(--s2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site .view { position: relative; aspect-ratio: 16 / 11; background: var(--bg-sunken); }
.site iframe {
  position: absolute; inset: 0; width: 200%; height: 200%;
  transform: scale(.5); transform-origin: 0 0; border: 0; pointer-events: none;
}
.site .fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  padding: var(--s5); text-align: center; color: var(--ink-3); font-size: 14px;
}

/* ------------------------------------------------------------------ *
 * The brand review
 * ------------------------------------------------------------------ */

.brandhead { display: flex; align-items: center; gap: var(--s4); }
.brandhead .logo {
  width: 64px; height: 64px; flex: none; border-radius: var(--r);
  background: var(--bg-raised) center / contain no-repeat;
  border: 1px solid var(--line-soft);
}
.brandhead .who { min-width: 0; }
.brandhead .who h1 { font-size: clamp(26px, 6vw, 36px); }

.swatches { display: flex; flex-wrap: wrap; gap: var(--s3); }
.swatch { display: grid; gap: var(--s1); justify-items: start; }
.swatch i {
  width: 56px; height: 56px; border-radius: var(--r);
  border: 1px solid var(--line-soft); box-shadow: var(--shadow);
}
.swatch span { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.facts { display: grid; gap: var(--s4); }

/* One fact: label, value, and a quiet "Change" that turns it into a field. */
.fact {
  background: var(--bg-raised);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: var(--s4) var(--s5);
}
.fact .head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.fact .k { font-size: 13px; color: var(--ink-3); }
.fact .edit {
  border: 0; background: none; cursor: pointer; font: inherit;
  font-size: 13.5px; color: var(--ink-2); padding: var(--s1) 0;
  text-decoration: underline; text-underline-offset: 3px;
}
.fact .edit:hover { color: var(--ink); }
.fact .v { margin-top: var(--s2); font-size: 16px; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; }
.fact .v.empty { color: var(--ink-3); font-style: normal; }
.fact .tags { margin-top: var(--s2); display: flex; flex-wrap: wrap; gap: var(--s2); }
.fact .tag {
  font-size: 13.5px; padding: var(--s1) var(--s3);
  border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink-2);
}
.fact .editor { margin-top: var(--s3); display: grid; gap: var(--s3); }
.fact .editor .btn-row { margin-top: 0; }
.fact.saving { opacity: .6; }

.products { margin-top: var(--s2); display: grid; gap: var(--s2); }
.products .p { display: flex; justify-content: space-between; gap: var(--s3); font-size: 15px; }
.products .p span:last-child { color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ *
 * Networks
 * ------------------------------------------------------------------ */

.netrow {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s4) 0; border-top: 1px solid var(--line-soft);
}
.netrow:first-child { border-top: 0; }
.netrow .ic {
  width: 40px; height: 40px; flex: none; border-radius: var(--r-sm);
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--net, var(--ink)) 12%, transparent);
  color: var(--net, var(--ink));
}
.netrow .txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.netrow .txt b { font-weight: 500; }
.netrow .txt span { font-size: 13.5px; color: var(--ink-3); }
.netrow.off { opacity: .55; }
.netrow select.field { padding: var(--s2) var(--s3); min-height: 40px; font-size: 14px; max-width: 220px; }

/* The "we use it" switch. A real checkbox underneath, so it is accessible. */
.use { display: inline-flex; align-items: center; gap: var(--s2); cursor: pointer; font-size: 13.5px; color: var(--ink-2); }
.use input { position: absolute; opacity: 0; pointer-events: none; }
.use .sw {
  width: 40px; height: 24px; border-radius: var(--r-pill); background: var(--line);
  position: relative; transition: background var(--t1) var(--ease); flex: none;
}
.use .sw::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--bg-raised); box-shadow: var(--shadow);
  transition: transform var(--t1) var(--ease);
}
.use input:checked + .sw { background: var(--accent); }
.use input:checked + .sw::after { transform: translateX(16px); }
.use input:focus-visible + .sw { outline: 2px solid var(--accent); outline-offset: 3px; }

.panelbox {
  background: var(--bg-raised); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: var(--s2) var(--s5);
}

/* The last screen. */
.done-mark {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
}
.done-mark svg { width: 34px; height: 34px; }

/* A link dressed as a button reads as a button — no underline. */
a.btn { text-decoration: none; }

/* The sample post on the last screen — a plain feed card, not a phone. */
.sample {
  width: 100%; max-width: 420px; margin: var(--s2) auto 0; text-align: left;
  background: var(--bg-raised); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lift); overflow: hidden;
}
.sample-head {
  display: flex; align-items: center; gap: var(--s2);
  padding: var(--s3) var(--s4); font-size: 14px;
}
.sample-head b { font-weight: 500; }
.sample-head span:last-child { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.sample-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); flex: none; }
.sample img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--bg-sunken); }
.sample figcaption { padding: var(--s3) var(--s4) var(--s4); }
.sample figcaption p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink); }
.sample .sample-tags { margin-top: var(--s2); font-size: 14px; color: var(--ink-3); }

/* The client's own door (/c/<brand>): their logo above the welcome. */
.door-logo {
  width: 96px; height: 96px; border-radius: var(--r-lg);
  background: #FFFFFF center / 78% no-repeat;
  box-shadow: 0 0 0 1px var(--line-soft), var(--shadow);
}

.door-note { line-height: 1.6; }
.door-note .door-acts { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.door-note .btn { width: auto; min-height: 40px; padding: var(--s2) var(--s4); font-size: 14px; }
