/* Sign-up, log-in and onboarding pages. Colors come from tokens.css; buttons and brand from landing.css. */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 32px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06); }
.auth-card.wide { max-width: 640px; }
.auth-top { display: flex; justify-content: center; margin-bottom: 22px; }
.auth-card h1 { font-size: 26px; line-height: 1.2; letter-spacing: -0.025em; font-weight: 720; }
.auth-card .sub { margin-top: 8px; font-size: 15px; }

.field { display: grid; gap: 6px; margin-top: 18px; }
.field label, .field .label { font-weight: 650; font-size: 14px; }
.field input, .field select {
  font: inherit; color: var(--ink); background: var(--page);
  border: 1px solid var(--axis); border-radius: 10px; padding: 11px 12px; width: 100%;
}
.field input:focus-visible, .field select:focus-visible, .btn:focus-visible, .linkish:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.hint { font-size: 13px; color: var(--muted); }
.error { margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: var(--bad-bg); color: var(--bad-ink); font-size: 14px; }
.error:empty { display: none; }
.btn.block { width: 100%; margin-top: 22px; }
.btn:disabled, .btn:disabled:hover { opacity: 0.55; cursor: default; } /* a disabled button never looks clickable */
.switch-row { text-align: center; margin-top: 20px; font-size: 14px; color: var(--ink-2); }
.linkish { border: 0; background: none; padding: 0; font: inherit; font-weight: 650; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.back-home { text-align: center; margin-top: 18px; font-size: 14px; }
.back-home a { color: var(--muted); }

/* Onboarding */
.progress { display: flex; gap: 6px; margin-bottom: 8px; }
.progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--bar-track); }
.progress i.on { background: var(--ink); }
.step-label { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.choices { display: grid; gap: 12px; margin-top: 22px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.choice { position: relative; display: block; border: 1px solid var(--border); border-radius: 14px; padding: 18px; cursor: pointer; background: var(--page); }
.choice input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.choice:hover { border-color: var(--axis); }
.choice:has(input:checked) { border: 2px solid var(--ink); padding: 17px; }
.choice:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.choice strong { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.choice span.d { display: block; color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.choice .tick { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--axis); display: grid; place-items: center; font-size: 12px; color: transparent; }
.choice:has(input:checked) .tick { background: var(--ink); border-color: var(--ink); color: var(--page); }
.nav-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; }
.nav-row .btn.block { margin-top: 0; }
.hours { display: flex; align-items: center; gap: 14px; }
.hours input[type="range"] { flex: 1; padding: 0; border: 0; accent-color: var(--ink); background: none; }
.hours input[type="number"] { width: 84px; flex: none; text-align: right; }
.conn-list { margin-top: 18px; }
.conn-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--grid); }
.conn-row:first-child { border-top: 0; }
.conn-name { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.conn-note { font-size: 13px; color: var(--muted); font-weight: 400; }
.ok { color: var(--good-ink); font-weight: 650; font-size: 14px; }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn.small-link { text-decoration: none; }
[data-step][hidden] { display: none !important; }

@media (max-width: 480px) {
  .auth-wrap { padding: 12px; align-items: start; }
  .auth-card { padding: 22px; }
}

/* Password box with a Show / Hide button inside it */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 64px; }
.pw-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); padding: 5px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.pw-toggle:hover { background: var(--surface-2); color: var(--ink); }
.pw-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

/* Forgot / reset password */
.forgot-link { justify-self: end; font-size: 13.5px; color: var(--ink-2); }
.forgot-link:hover { color: var(--ink); }
.done-box { margin-top: 22px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); display: grid; gap: 6px; }
.hint.bad { color: var(--bad-ink); }

/* Setup: quick sizing questions (tap one answer per question) */
.q { border: 0; padding: 0; margin: 22px 0 0; min-width: 0; }
.q legend { padding: 0; font-weight: 650; font-size: 14.5px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pill { position: relative; display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 8px 15px; font-size: 14px; color: var(--ink-2); background: var(--page); cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.pill input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pill:hover { border-color: var(--axis); color: var(--ink); }
.pill:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--page); font-weight: 650; }
.pill:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Setup: the recommended plan */
.eyebrow-sm { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.rec-card { margin-top: 20px; border: 2px solid var(--ink); border-radius: 16px; padding: 20px; background: var(--page); }
.rec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.rec-head h2 { font-size: 22px; letter-spacing: -0.02em; }
.rec-price { font-size: 15px; color: var(--ink-2); }
.rec-price strong { font-size: 22px; color: var(--ink); letter-spacing: -0.02em; }
.rec-why { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14.5px; }
.rec-why li { position: relative; padding-left: 22px; }
.rec-why li::before { content: '✓'; position: absolute; left: 0; font-weight: 700; color: var(--good-ink); }
.rec-feat-h { margin-top: 16px; font-size: 13px; font-weight: 650; color: var(--muted); }
.rec-feat { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.rec-feat li { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.rec-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.rec-tabs li { font-size: 13px; font-weight: 650; padding: 4px 10px; border-radius: 999px; }
.rec-tabs li.on { background: var(--good-bg); color: var(--good-ink); }
.rec-tabs li.off { color: var(--muted); border: 1px dashed var(--border); text-decoration: line-through; opacity: .7; }
.rec-note { margin-top: 14px; font-size: 13px; color: var(--muted); }
.rec-alt { margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.rec-alt:empty { display: none; }

/* The visitor note sits above each step heading: give it room */
#guest-note { margin: 0 0 18px; }

/* Setup guide goals: which plan each one comes with */
.choice .tick { flex: none; }
.choice .plan-chip { flex: none; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: var(--page); white-space: nowrap; }
.choice .plan-chip.free { background: transparent; color: var(--ink-2); border: 1px solid var(--border); }

/* ---------- Split screen for sign-up, log-in and setup: the form on the left, a live preview on the right ---------- */
.start { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.start-main { display: flex; flex-direction: column; min-width: 0; padding: 26px clamp(20px, 5vw, 64px); }
.start-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.start-exit { font-size: 14px; color: var(--muted); }
.start-exit:hover { color: var(--ink); }
.start-form { width: 100%; max-width: 460px; margin: auto; padding: 40px 0; }
.start-form:has([data-step]) { max-width: 600px; }
.start-form h1 { font-size: 30px; line-height: 1.15; letter-spacing: -0.03em; font-weight: 720; }
.start-form .sub { margin-top: 8px; font-size: 15px; color: var(--ink-2); }
.start-form .eyebrow-sm { margin-bottom: 10px; }
.start-foot { text-align: center; font-size: 14px; }
.start-foot a { color: var(--muted); }
.start-foot a:hover { color: var(--ink); }
.start-stage {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: grid; place-items: center;
  padding: 40px clamp(24px, 4vw, 56px); border-left: 1px solid var(--border);
  background:
    radial-gradient(110% 70% at 100% 0%, color-mix(in srgb, var(--ig) 12%, transparent), transparent 62%),
    radial-gradient(90% 60% at 0% 100%, color-mix(in srgb, var(--tt) 11%, transparent), transparent 62%),
    var(--surface-2);
}
@media (max-width: 900px) {
  .start { grid-template-columns: minmax(0, 1fr); }
  .start-stage { position: static; height: auto; overflow: visible; border-left: 0; border-top: 1px solid var(--border); padding: 28px 16px 36px; }
  .start-main { padding: 18px 16px; }
  .start-form { padding: 28px 0; margin: 0 auto; }
  .start-form h1 { font-size: 26px; }
}

/* Password length bar (sign-up) */
.pw-meter { height: 4px; border-radius: 2px; background: var(--bar-track); overflow: hidden; }
.pw-meter[hidden] { display: none; }
.pw-meter i { display: block; height: 100%; width: 0; border-radius: 2px; background: var(--ink-2); transition: width .2s ease, background .2s ease; }
.pw-meter.ok i { background: var(--good-ink); }
.btn.is-done, .btn.is-done:disabled { opacity: 1; background: var(--good-ink); border-color: var(--good-ink); color: #fff; }

/* The live preview */
.pv { width: 100%; max-width: 460px; display: grid; gap: 18px; }
.pv-title h2 { font-size: 22px; line-height: 1.2; letter-spacing: -0.02em; }
.pv-title p { margin-top: 4px; font-size: 14.5px; color: var(--ink-2); }
.pv-journey { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.pv-journey li { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding-top: 10px; border-top: 3px solid var(--bar-track); font-size: 12.5px; color: var(--muted); transition: border-color .3s, color .3s; }
.pv-journey li.done, .pv-journey li.now { border-top-color: var(--ink); color: var(--ink); }
.pv-journey li.now { font-weight: 650; }
.pv-j-dot { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; border: 1.5px solid currentColor; }
.pv-journey li.done .pv-j-dot { background: var(--good-ink); border-color: var(--good-ink); color: #fff; }
.pv-journey li.now .pv-j-dot { background: var(--ink); border-color: var(--ink); color: var(--page); }
.pv-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px 20px 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.10); display: grid; gap: 14px; }
.pv-live { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.pv-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--good-ink); }
.pv-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pv-avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--page); font-weight: 700; font-size: 18px; }
.pv-who { min-width: 0; display: grid; }
.pv-who strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-who span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-plan { margin-left: auto; flex: none; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--ink); color: var(--page); }
.pv-sec { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: -4px; }
.pv-tiles { display: flex; justify-content: center; gap: 10px; }
.pv-tiles > * { flex: 1 1 0; min-width: 0; max-width: 150px; }
.pv-tile { display: grid; justify-items: center; gap: 2px; padding: 10px 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--page); text-align: center; }
.pv-tile.ghost { min-height: 112px; place-items: center; border-style: dashed; background: transparent; color: var(--muted); font-size: 12.5px; }
.pv-tile-h { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; }
.pv-tile-l { font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.pv-tile-l.good { color: var(--good-ink); }
.pv-tile-l.bad { color: var(--bad-ink); }
.pv-gauge { width: 100%; max-width: 110px; height: auto; }
.pv-gauge .g-zone, .pv-gauge .g-value { fill: none; stroke-width: 9; }
.pv-gauge .g-bad { stroke: var(--bad-bg); }
.pv-gauge .g-neutral { stroke: var(--neutral-bg); }
.pv-gauge .g-good { stroke: var(--good-bg); }
.pv-gauge .g-value { stroke-linecap: round; stroke: var(--ink-2); }
.pv-gauge.g-good .g-value { stroke: var(--good-ink); }
.pv-gauge.g-bad .g-value { stroke: var(--bad-ink); }
.pv-gauge text { font-size: 22px; font-weight: 750; letter-spacing: -0.03em; fill: var(--ink); }
.pv-row-h { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.pv-row-h strong { color: var(--ink); }
.pv-bar { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; }
.pv-bar i { display: block; min-width: 4px; }
.pv-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12px; color: var(--ink-2); }
.pv-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pv-legend .dot { width: 8px; height: 8px; }
.pv-move { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.pv-move span { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.pv-note { font-size: 12.5px; color: var(--muted); text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {
  .pv-live i { animation: pv-pulse 2s ease-out infinite; }
  .pv-tile.is-new { animation: pv-pop .5s cubic-bezier(.3, 1.3, .5, 1) both; }
  .pv-tile.is-new .g-value { animation: gauge-sweep .9s cubic-bezier(.3, .7, .2, 1) .1s both; }
  [data-step].step-in[data-dir="fwd"] { animation: step-fwd .38s cubic-bezier(.2, .7, .2, 1) both; }
  [data-step].step-in[data-dir="back"] { animation: step-back .38s cubic-bezier(.2, .7, .2, 1) both; }

  /* Moving between sign-up, setup and the dashboard: the left side slides, the preview stays put */
  .start-form { view-transition-name: start-form; }
  .start-stage { view-transition-name: start-stage; }
  ::view-transition-old(start-form) { animation: step-out .22s ease-in both; }
  ::view-transition-new(start-form) { animation: step-fwd .38s cubic-bezier(.2, .7, .2, 1) both; }
}
@keyframes pv-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good-ink) 50%, transparent); } 100% { box-shadow: 0 0 0 8px transparent; } }
@keyframes pv-pop { from { opacity: 0; transform: translateY(8px) scale(.94); } }
@keyframes gauge-sweep { from { stroke-dasharray: 0 100; } }
@keyframes step-fwd { from { opacity: 0; transform: translateX(28px); } }
@keyframes step-back { from { opacity: 0; transform: translateX(-28px); } }
@keyframes step-out { to { opacity: 0; transform: translateX(-28px); } }

/* Setup: Compare plans, under the recommended plan */
.compare-toggle { margin-top: 12px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px; background: transparent; color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 650; cursor: pointer; transition: background .15s, border-color .15s; }
.compare-toggle:hover { background: var(--surface-2); border-color: var(--axis); }
.compare-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.compare-toggle .chev { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s ease; }
.compare-toggle[aria-expanded="true"] .chev { transform: translateY(2px) rotate(-135deg); }
.plan-compare { margin-top: 12px; }
.plan-compare[hidden] { display: none; }
.cmp-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--page); }
.cmp { width: 100%; min-width: 470px; border-collapse: collapse; font-size: 13.5px; }
.cmp th, .cmp td { padding: 9px 8px; text-align: center; border-bottom: 1px solid var(--border); }
.cmp tbody th { text-align: left; font-weight: 600; color: var(--ink-2); white-space: nowrap; padding-left: 14px; }
.cmp thead th { vertical-align: bottom; padding-top: 14px; }
.cmp tfoot td { border-bottom: 0; padding-bottom: 14px; }
.cmp .is-pick { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.cmp-tag { display: inline-block; margin-bottom: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--ink); color: var(--page); }
.cmp-name { display: block; font-size: 14px; font-weight: 700; color: var(--ink); }
.cmp-price { display: block; margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.cmp-price small { font-size: 11px; font-weight: 500; }
.cmp-yes { color: var(--good-ink); font-weight: 700; }
.cmp-no { color: var(--muted); }
.cmp .btn.small { padding: 7px 12px; font-size: 13px; }
.cmp-note { margin-top: 10px; font-size: 13px; color: var(--muted); }
.cmp-note a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) { .plan-compare:not([hidden]) { animation: step-fwd-up .3s cubic-bezier(.2, .7, .2, 1) both; } }
@keyframes step-fwd-up { from { opacity: 0; transform: translateY(-6px); } }
/* The row names stay put while the plans scroll sideways on a phone */
.cmp tbody th, .cmp thead td:first-child, .cmp tfoot td:first-child { position: sticky; left: 0; z-index: 1; background: var(--page); }
@media (max-width: 560px) { .cmp tbody th { padding-left: 10px; box-shadow: 1px 0 0 var(--border); } .cmp { min-width: 440px; } }
