/* Upstate Partners — premium white. Black is the accent; teal is reserved for links & focus. */
@font-face { font-family: "Instrument Sans"; src: url("/img/InstrumentSans.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }

:root {
  --ink: #1D1D1F;
  --text2: #6E6E73;
  --text3: #A1A1A6;
  --line: rgba(0,0,0,.08);
  --line2: rgba(0,0,0,.12);
  --bg: #FFFFFF;
  --wash: #F5F5F7;
  --field: #F2F2F7;
  --teal: #016470;
  --teal-soft: rgba(1,100,112,.09);
  --green: #248A3D;
  --green-soft: rgba(36,138,61,.10);
  --amber: #B25E09;
  --amber-soft: rgba(178,94,9,.10);
  --red: #D70015;
  --red-soft: rgba(215,0,21,.08);
  --radius: 18px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 28px rgba(0,0,0,.05);
  --display: "Instrument Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; margin: 0; color: var(--ink); }
h1 { font-size: 34px; line-height: 1.12; font-weight: 600; }
h2 { font-size: 21px; line-height: 1.25; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--text2); }
.faint { color: var(--text3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Buttons ───────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 20px; border-radius: 14px;
  font: 600 15px/1 var(--body); border: 0; cursor: pointer; text-decoration: none !important; transition: transform .12s ease, opacity .15s ease, background .15s ease; white-space: nowrap; }
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-primary[disabled], .btn-primary.is-disabled { background: rgba(0,0,0,.25); cursor: not-allowed; }
.btn-secondary { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); }
.btn-secondary:hover { background: var(--wash); }
.btn-quiet { background: var(--field); color: var(--ink); }
.btn-quiet:hover { background: #E8E8ED; }
.btn-sm { height: 36px; padding: 0 14px; border-radius: 11px; font-size: 14px; }
.btn-block { width: 100%; }
.btn .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite; display: none; }
.btn.is-loading .spin { display: block; }
.btn.is-loading .label { opacity: 0; width: 0; overflow: hidden; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { background: none; border: 0; padding: 0; color: var(--teal); font: 600 14px var(--body); cursor: pointer; }

/* ── Fields ────────────────────────────── */
.field { display: grid; gap: 7px; }
.field label { font-size: 13px; font-weight: 500; color: var(--text2); }
.field .hint { font-size: 12px; color: var(--text3); }
.input, .textarea, select.input { width: 100%; height: 50px; border: 0; border-radius: 12px; background: var(--field); padding: 0 16px; font: 16px var(--body); color: var(--ink);
  outline: none; box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .15s ease, background .15s ease; -webkit-appearance: none; appearance: none; }
.textarea { height: auto; min-height: 110px; padding: 13px 16px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: #8E8E93; }
.input:focus, .textarea:focus { background: #fff; box-shadow: inset 0 0 0 1.5px var(--teal), 0 0 0 4px var(--teal-soft); }
.input.has-error { box-shadow: inset 0 0 0 1.5px var(--red); background: #fff; }
.field-error { font-size: 13px; color: var(--red); font-weight: 500; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

/* ── Auth shell (white, centered) ─────────── */
/* Logo and footer are pinned to a 40px frame; the card is centred in the full column height. */
.auth { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; background: linear-gradient(#fff 55%, var(--wash)); }
.auth-top { position: absolute; top: 40px; left: 40px; z-index: 1; line-height: 0; }
.auth-top a { display: inline-block; }
.auth-top img { display: block; height: 28px; width: auto; }
.auth-main { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 112px 24px 96px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { margin-bottom: 8px; }
.auth-card .lede { color: var(--text2); font-size: 16px; margin-bottom: 30px; }
.auth-card form { display: grid; gap: 18px; }
.auth-foot { position: absolute; left: 40px; right: 40px; bottom: 32px; display: flex; justify-content: space-between; color: var(--text3); font-size: 12px; }
@media (max-width: 600px) { .auth-top { top: 28px; left: 24px; } .auth-top img { height: 24px; } .auth-main { padding: 96px 20px 88px; } .auth-foot { left: 24px; right: 24px; bottom: 24px; } }
.auth-foot a { color: var(--text2); }
.steps { display: flex; gap: 6px; margin-bottom: 26px; }
.steps span { height: 4px; flex: 1; border-radius: 4px; background: var(--line); }
.steps span.on { background: var(--ink); }
.code-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.code-boxes input { height: 58px; text-align: center; font: 600 24px var(--body); padding: 0; font-variant-numeric: tabular-nums; }
.qr { width: 184px; height: 184px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px var(--line2); padding: 12px; margin: 4px 0 8px; }
.secret { font: 600 14px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; background: var(--field); padding: 8px 12px; border-radius: 10px; display: inline-block; }
.rules { display: grid; gap: 7px; font-size: 14px; color: var(--text2); }
.rules li { list-style: none; display: flex; gap: 9px; align-items: center; transition: color .2s; }
.rules ul { padding: 0; margin: 0; display: grid; gap: 7px; }
.rules .dot { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.18); display: grid; place-items: center; transition: all .2s; }
.rules li.ok { color: var(--ink); }
.rules li.ok .dot { background: var(--green); box-shadow: none; }
.rules li.ok .dot::after { content: ""; width: 8px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px,-1px); }

.alert { border-radius: 14px; padding: 13px 15px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.alert-error { background: var(--red-soft); color: #9B000F; }
.alert-ok { background: var(--green-soft); color: #1C6B2F; }
.alert-info { background: var(--wash); color: var(--ink); }

/* ── App shell ─────────────────────────── */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 26px 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 22px; background: #fff; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; }
.side .brand img { height: 22px; }
.side .brand b { font: 700 11px/1 var(--body); letter-spacing: .14em; color: var(--teal); }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 11px; color: var(--text2); font-weight: 500; text-decoration: none !important; }
.nav a svg { width: 19px; height: 19px; flex: none; }
.nav a:hover { background: var(--wash); color: var(--ink); }
.nav a.on { background: var(--ink); color: #fff; }
.nav .sep { height: 1px; background: var(--line); margin: 10px 8px; }
.side .who { margin-top: auto; padding: 12px; border-radius: 14px; background: var(--wash); font-size: 13px; }
.side .who b { display: block; font-size: 14px; }
.main { min-width: 0; padding: 36px 44px 80px; max-width: 1180px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head p { margin-top: 6px; color: var(--text2); }
.mobile-bar { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 76px 18px 100px; }
  .mobile-bar { display: flex; position: fixed; inset: 0 0 auto 0; height: 58px; align-items: center; justify-content: space-between; padding: 0 18px; background: rgba(255,255,255,.88); backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--line); z-index: 20; }
  .mobile-bar img { height: 20px; }
  .tabbar { position: fixed; inset: auto 0 0 0; height: 74px; padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(18px); border-top: 1px solid var(--line); z-index: 20; }
  .tabbar a { display: grid; place-items: center; align-content: center; gap: 3px; font-size: 11px; color: var(--text3); font-weight: 500; text-decoration: none !important; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.on { color: var(--ink); }
  h1 { font-size: 28px; }
}
@media (min-width: 901px) { .tabbar { display: none; } }

/* ── Cards & stats ─────────────────────── */
.card { background: #fff; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); padding: 22px; }
.card.pad-lg { padding: 28px; }
.card h2 + p, .card h3 + p { margin-top: 6px; }
.stack { display: grid; gap: 16px; }
.row { display: flex; gap: 12px; align-items: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.grid { display: grid; gap: 16px; }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-main { grid-template-columns: 1.55fr 1fr; align-items: start; }
@media (max-width: 1100px) { .cols-4 { grid-template-columns: repeat(2, 1fr); } .cols-main { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .cols-3, .cols-2 { grid-template-columns: 1fr; } }
.stat { padding: 20px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); background: #fff; }
.stat .k { font-size: 13px; color: var(--text2); font-weight: 500; }
.stat .v { font: 600 28px/1.1 var(--display); letter-spacing: -0.02em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 12px; color: var(--text3); margin-top: 6px; }
.hero { border-radius: 24px; background: var(--ink); color: #fff; padding: 30px 30px 28px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto -80px -140px auto; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(closest-side, rgba(1,100,112,.55), transparent); pointer-events: none; }
.hero .k { color: rgba(255,255,255,.6); font-size: 13px; font-weight: 500; }
.hero .big { font: 600 48px/1 var(--display); letter-spacing: -0.03em; margin: 10px 0 8px; font-variant-numeric: tabular-nums; }
.hero .sub { color: rgba(255,255,255,.72); font-size: 14px; }
.hero .split { display: flex; gap: 34px; margin-top: 24px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero .split b { display: block; font: 600 19px var(--display); font-variant-numeric: tabular-nums; }
.hero .split span { color: rgba(255,255,255,.6); font-size: 12px; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill-grey { background: var(--wash); color: var(--text2); }
.pill-green { background: var(--green-soft); color: var(--green); }
.pill-amber { background: var(--amber-soft); color: var(--amber); }
.pill-red { background: var(--red-soft); color: var(--red); }
.pill-ink { background: var(--ink); color: #fff; }
.pill-teal { background: var(--teal-soft); color: var(--teal); }

.list { display: grid; }
.list .item { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.list .item:first-child { border-top: 0; }
.avatar { width: 38px; height: 38px; border-radius: 12px; background: var(--wash); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--ink); flex: none; }
.icon-tile { width: 38px; height: 38px; border-radius: 12px; background: var(--wash); display: grid; place-items: center; flex: none; }
.icon-tile svg { width: 18px; height: 18px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; color: var(--text2); font-weight: 600; padding: 0 12px 10px; white-space: nowrap; }
table.t td { padding: 14px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
table.t td.r, table.t th.r { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; margin: 0 -12px; }

/* Timeline */
.timeline { position: relative; display: grid; gap: 0; }
.tl-item { display: grid; grid-template-columns: 24px 1fr; gap: 14px; padding-bottom: 22px; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 11px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--line2); display: grid; place-items: center; }
.tl-item.done .tl-dot { background: var(--ink); box-shadow: none; }
.tl-item.done .tl-dot::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px,-1px); }
.tl-item.now .tl-dot { background: var(--teal); box-shadow: 0 0 0 5px var(--teal-soft); }
.tl-item.future { opacity: .45; }

/* Progress stepper (stages) */
.stage-bar { display: flex; gap: 4px; }
.stage-bar span { height: 5px; flex: 1; border-radius: 5px; background: var(--line); }
.stage-bar span.on { background: var(--ink); }
.stage-bar span.now { background: var(--teal); }

/* Onboarding checklist */
.checklist { display: grid; gap: 10px; }
.check-row { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); background: #fff; }
.check-row .ring { width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line2); display: grid; place-items: center; flex: none; }
.check-row.done .ring { background: var(--green); box-shadow: none; }
.check-row.done .ring::after { content: ""; width: 10px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px,-1px); }
.check-row.next { box-shadow: inset 0 0 0 1.5px var(--ink); }

/* Copy blocks */
.copy-block { position: relative; background: var(--wash); border-radius: 14px; padding: 16px 18px; font-size: 14px; white-space: pre-wrap; line-height: 1.6; }
.copy-block .copy-btn { position: absolute; top: 10px; right: 10px; }
.linkbox { display: flex; gap: 8px; align-items: center; background: var(--wash); border-radius: 14px; padding: 6px 6px 6px 14px; }
.linkbox code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 14px ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Offer / campaign */
.offer { border-radius: 24px; padding: 28px; background: linear-gradient(135deg, #0E0E10 0%, #16292c 100%); color: #fff; position: relative; overflow: hidden; }
.offer .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: #7FD1D9; }
.offer h2 { color: #fff; font-size: 26px; margin: 10px 0 8px; }
.offer p { color: rgba(255,255,255,.75); }
.offer .btn-primary { background: #fff; color: var(--ink); }
.offer .btn-secondary { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }

/* Range sliders (calculator) */
.range { display: grid; gap: 10px; }
.range .top { display: flex; justify-content: space-between; align-items: baseline; }
.range .top b { font: 600 20px var(--display); font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: var(--field); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25), 0 0 0 1px rgba(0,0,0,.06); cursor: grab; }
input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.25); }

/* Empty / welcome */
.welcome { border-radius: 24px; padding: 34px; background: linear-gradient(180deg, #fff, var(--wash)); box-shadow: inset 0 0 0 1px var(--line); }
.welcome h1 { font-size: 32px; }

/* Toast + celebration */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 500; opacity: 0; transition: all .25s ease; pointer-events: none; z-index: 50; }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.celebrate { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.7); backdrop-filter: blur(8px); z-index: 60; animation: fadein .3s ease; }
.celebrate .card { max-width: 420px; text-align: center; padding: 36px 30px; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); animation: pop .5s cubic-bezier(.2,1.4,.4,1); }
.celebrate .medal { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 18px; background: var(--ink); display: grid; place-items: center; color: #fff; }
.celebrate canvas { position: fixed; inset: 0; pointer-events: none; }
@keyframes fadein { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.9); opacity: 0; } }

/* Public landing page */
.lp { min-height: 100vh; }
.lp-nav { display: flex; justify-content: space-between; align-items: center; padding: 22px 32px; max-width: 1120px; margin: 0 auto; }
.lp-nav img { height: 24px; }
.lp-hero { max-width: 1120px; margin: 0 auto; padding: 40px 32px 56px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }
.lp-hero h1 { font-size: 48px; line-height: 1.05; letter-spacing: -0.035em; }
.lp-hero .lede { font-size: 18px; color: var(--text2); margin-top: 16px; max-width: 520px; }
.lp-points { display: grid; gap: 14px; margin-top: 28px; }
.lp-points div { display: flex; gap: 12px; align-items: flex-start; }
.lp-points svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--teal); }
.lp-form { padding: 28px; border-radius: 24px; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); background: #fff; }
.lp-form form { display: grid; gap: 14px; }
.lp-intro { display: inline-flex; gap: 8px; align-items: center; background: var(--wash); border-radius: 999px; padding: 6px 14px 6px 6px; font-size: 13px; color: var(--text2); margin-bottom: 20px; }
.lp-intro .avatar { width: 26px; height: 26px; border-radius: 50%; font-size: 11px; background: var(--ink); color: #fff; }
@media (max-width: 900px) { .lp-hero { grid-template-columns: 1fr; padding-top: 16px; } .lp-hero h1 { font-size: 36px; } }

.reveal { animation: rise .5s cubic-bezier(.2,.9,.3,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.gate { border-radius: 18px; padding: 18px 20px; background: var(--amber-soft); color: #7A3F06; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Desktop auth: white form + black brand panel */
.auth-split { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.auth-brand { display: none; }
@media (min-width: 1080px) {
  .auth-split { grid-template-columns: 1fr minmax(420px, 44%); }
  .auth-brand { display: block; position: relative; overflow: hidden; background: #0E0E10; color: #fff; padding: 56px; }
  .auth-brand::before { content: ""; position: absolute; width: 720px; height: 720px; right: -240px; bottom: -280px; border-radius: 50%; background: radial-gradient(closest-side, rgba(1,100,112,.55), rgba(1,100,112,0)); }
  .auth-brand::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, transparent, #000 40%, transparent); }
  .auth-brand-in { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: center; max-width: 520px; }
  .auth-brand .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .16em; color: #7FD1D9; margin-bottom: 18px; }
  .auth-brand h2 { color: #fff; font-size: 40px; line-height: 1.1; letter-spacing: -0.03em; }
  .auth-brand h2 span { color: rgba(255,255,255,.55); }
  .auth-points { display: grid; gap: 22px; margin: 44px 0; }
  .auth-points div { display: grid; grid-template-columns: 128px 1fr; align-items: start; gap: 20px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); }
  .auth-points b { font: 600 38px/1 var(--display); letter-spacing: -0.03em; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .auth-points b small { font: 600 18px/1 var(--display); letter-spacing: 0; color: #7FD1D9; margin-left: 4px; }
  .auth-points span { display: grid; gap: 4px; padding-top: 2px; color: rgba(255,255,255,.55); font-size: 14px; line-height: 1.45; }
  .auth-points strong { color: #fff; font-size: 16px; font-weight: 600; line-height: 1.3; }
  .auth-quote { color: rgba(255,255,255,.5); font-size: 14px; }
}

/* Grid/flex children must be allowed to shrink so long links truncate instead of widening the page. */
.grid > *, .stack > *, .cols-main > * { min-width: 0; }
.cols-main { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .cols-main { grid-template-columns: minmax(0, 1fr); } }
.main { overflow-x: clip; }
@media (max-width: 640px) {
  .hero { padding: 24px 22px; }
  .hero .big { font-size: 40px; }
  .hero .split { gap: 20px 28px; }
  .page-head .btn { width: 100%; }
  .card.pad-lg { padding: 20px; }
  .list .item .pill { font-size: 11px; }
  table.t { font-size: 13px; }
}
.btn svg { width: 18px; height: 18px; flex: none; }
.list > * { min-width: 0; }
.list .item > div:last-child:not(.grow) { flex: none; }
@media (max-width: 640px) {
  .list .item { align-items: flex-start; }
  .list .item .faint.tiny { display: none; }
}
.stage-banner{position:sticky;top:0;z-index:100;background:#B25E09;color:#fff;text-align:center;font:600 12.5px/1 -apple-system,BlinkMacSystemFont,"SF Pro Text",system-ui,sans-serif;padding:7px 12px;letter-spacing:.01em}

/* ── Layout v2: premium spacing (8pt scale), centred page container, no overflow ── */
:root { --page-max: 1160px; --side-col: 360px; --gap: 24px; --radius: 16px;
  --card-shadow: 0 0 0 1px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.03), 0 6px 24px rgba(0,0,0,.04); }
h1 { font-size: 32px; font-weight: 600; letter-spacing: -0.025em; }
@media (min-width: 901px) { .app { grid-template-columns: 264px minmax(0, 1fr); } }
.main { max-width: none; padding: 48px 48px 96px; }
.main-in { max-width: var(--page-max); margin: 0 auto; container-type: inline-size; }
.page-head { margin-bottom: 32px; gap: 16px 24px; }
.page-head p, .card p, .card .muted { max-width: 70ch; }
.grid, .stack { gap: var(--gap); }
.card, .stat { border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 24px; }
.card.pad-lg { padding: 32px; }
.card h2 { font-size: 18px; letter-spacing: -0.015em; }
.list .item { padding: 16px 0; gap: 16px; }
.hero, .offer, .welcome { border-radius: 20px; }
/* Two columns: content + a comfortable fixed side column; one column when the page is narrow. */
.cols-main { grid-template-columns: minmax(0, 1fr) var(--side-col); gap: var(--gap); }
.sticky { position: sticky; top: 32px; }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@container (max-width: 900px) { .cols-main { grid-template-columns: minmax(0, 1fr); } .sticky { position: static; } }
@container (max-width: 1000px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 560px) { .cols-3, .cols-2, .grid-2 { grid-template-columns: minmax(0, 1fr); } }
/* Sidebar */
.side { padding: 28px 20px 20px; gap: 24px; }
.side .brand { padding: 0 12px; }
.side .brand img { height: 24px; }
.side .program { padding: 0 12px; margin-top: -10px; }
.nav a { height: 42px; padding: 0 12px; }
.side .who { margin: auto -20px -20px; padding: 16px 20px 20px; border-top: 1px solid var(--line); background: none; border-radius: 0;
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.side .who .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; }
.side .who b { font-size: 14px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .who .muted { display: block; font-size: 12.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .who form { margin: 0; }
.signout { width: 34px; height: 34px; border-radius: 10px; border: 0; background: none; color: var(--text2); display: grid; place-items: center; cursor: pointer; }
.signout:hover { background: var(--wash); color: var(--ink); }
.signout svg { width: 18px; height: 18px; }
@media (max-width: 1180px) and (min-width: 901px) { .main { padding: 40px 32px 88px; } }
@media (max-width: 900px) { .main { padding: 84px 20px 112px; } h1 { font-size: 28px; } }
@media (max-width: 640px) { .card, .stat { padding: 20px; } .card.pad-lg { padding: 22px; } }
@media (max-width: 640px) { .list .item .ellipsis { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } }
/* Sidebar: 24px inner padding; logo, chip, nav icons and account avatar share one left line (36px). */
.side { padding: 28px 24px 20px; }
.side .brand, .side .program { padding: 0 12px; }
.nav a { padding: 0 12px; }
.side .who { margin: auto -24px -20px; padding: 16px 24px 20px 36px; }
/* Stripe hand-off: calm centred card with a quiet indicator */
.stripe-wait { min-height: calc(100vh - 160px); display: grid; place-items: center; }
.stripe-wait-card { width: min(460px, 100%); text-align: center; display: grid; gap: 10px; justify-items: center; padding: 40px 32px; }
.stripe-wait-card h2 { font-size: 22px; margin-top: 8px; }
.stripe-wait-card .alert { text-align: left; width: 100%; }
.stripe-wait-secure { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); width: 100%; }
.stripe-wait-secure svg { width: 14px; height: 14px; flex: none; }
.stripe-wait-mark { width: 52px; height: 52px; border-radius: 50%; position: relative; display: grid; place-items: center; }
.stripe-wait-mark::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2.5px solid var(--field); border-top-color: var(--ink); animation: spin .9s linear infinite; }
.stripe-wait-mark span { width: 18px; height: 18px; border-radius: 6px; background: var(--ink); animation: breathe 1.8s ease-in-out infinite; }
.stripe-wait.is-error .stripe-wait-mark::before { animation: none; border-color: var(--red-soft); border-top-color: var(--red); }
.stripe-wait.is-error .stripe-wait-mark span { animation: none; background: var(--red); }
@keyframes breathe { 50% { transform: scale(.72); opacity: .55; } }
a.btn.is-loading { pointer-events: none; opacity: .75; position: relative; }
a.btn.is-loading::after { content: ""; width: 15px; height: 15px; margin-left: 8px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: currentColor; animation: spin .7s linear infinite; }
a.btn-secondary.is-loading::after { border-color: rgba(0,0,0,.15); border-top-color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .stripe-wait-mark::before, .stripe-wait-mark span, a.btn.is-loading::after { animation: none !important; } }
.stripe-wait [hidden] { display: none !important; }
.stripe-wait.is-error [data-wait-line] { display: none; }
/* Live updates + payout celebration */
.live-confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 90; }
.live-toast { position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 16px); opacity: 0; z-index: 95; display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; padding: 13px 18px; border-radius: 14px; font: 500 14.5px var(--body); box-shadow: 0 12px 40px rgba(0,0,0,.18);
  transition: opacity .3s ease, transform .35s cubic-bezier(.2,.9,.3,1); pointer-events: none; }
.live-toast.on { opacity: 1; transform: translate(-50%, 0); }
.live-toast-dot { width: 8px; height: 8px; border-radius: 50%; background: #34C759; box-shadow: 0 0 0 4px rgba(52,199,89,.22); flex: none; }
@media (max-width: 900px) { .live-toast { bottom: 92px; } }
.live-glow { box-shadow: var(--card-shadow), 0 0 0 2px rgba(29,29,31,.85) !important; transition: box-shadow .4s ease; }
.hero.live-glow { box-shadow: 0 0 0 2px rgba(201,168,106,.9) !important; }
.live-flash { animation: liveflash 1.2s ease; }
@keyframes liveflash { 0% { background-color: rgba(1,100,112,.06); } 100% { background-color: transparent; } }
@media (prefers-reduced-motion: reduce) { .live-toast { transition: none; } .live-flash { animation: none; } }

/* ── Guided "Introduce a practice" ─────────────────────────────────────── */
.ix-wrap { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr) var(--side-col); align-items: start; }
.ix-side { display: grid; gap: var(--gap); position: sticky; top: 24px; }
.ix-guide-m { display: none; }
.ix { max-width: 720px; }
.ix-steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 28px; }
.ix-steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text3); padding-top: 12px; border-top: 3px solid var(--line); transition: color .2s, border-color .2s; }
.ix-steps li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--wash); color: var(--text2); }
.ix-steps li.on { color: var(--ink); border-color: var(--ink); }
.ix-steps li.on span { background: var(--ink); color: #fff; }
.ix-steps li.done { color: var(--text2); border-color: var(--ink); }
.ix-steps li.done span { background: var(--wash); color: var(--ink); }
.ix [data-step] h2:focus { outline: none; }
.ix-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--line); }
.ix-fit { background: var(--wash); border-radius: 14px; padding: 16px 18px; display: grid; gap: 10px; }
.ix-dup { border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.ix-dup.yours { background: var(--teal-soft); color: var(--ink); }
.ix-dup.taken { background: var(--amber-soft); color: var(--ink); }
.ix-dup[hidden] { display: none !important; }
.ix-choices { display: grid; gap: 10px; }
.ix-choice { display: block; cursor: pointer; }
.ix-choice input { position: absolute; opacity: 0; pointer-events: none; }
.ix-choice-in { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line2); transition: box-shadow .15s, background .15s; }
.ix-choice-in > span:last-child { display: grid; gap: 2px; }
.ix-choice:hover .ix-choice-in { background: var(--wash); }
.ix-choice input:focus-visible + .ix-choice-in { box-shadow: inset 0 0 0 2px var(--teal); }
.ix-choice.on .ix-choice-in, .ix-choice input:checked + .ix-choice-in { box-shadow: inset 0 0 0 2px var(--ink); background: #fff; }
.ix-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--wash); display: grid; place-items: center; flex: none; }
.ix-ic svg { width: 20px; height: 20px; }
.ix-choice input:checked + .ix-choice-in .ix-ic { background: var(--ink); color: #fff; }
.ix-pane { display: grid; gap: 14px; padding: 4px 0; }
.ix-pane[hidden], .ix [data-step][hidden], .ix-err[hidden] { display: none !important; }
.ix-preview { background: var(--wash); border-radius: 14px; padding: 14px 16px; display: grid; gap: 10px; }
.ix-preview .copy-block { background: #fff; white-space: pre-wrap; }
.ix-err { color: var(--red); font-size: 14px; }
.ix-next { background: var(--wash); border-radius: 14px; padding: 16px 18px; }
.ix-time { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: t; }
.ix-time li { display: grid; grid-template-columns: 22px 1fr; column-gap: 10px; font-size: 14px; counter-increment: t; }
.ix-time li::before { content: counter(t); grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px var(--line2); display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.ix-time span { color: var(--text2); }
.ix-guide { display: grid; gap: 12px; }
.ix-dd { display: grid; gap: 14px; }
.ix-dd ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; color: var(--text2); display: grid; gap: 4px; }
.ix-dd-h { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text2); }
.ix-dd-h.ok { color: var(--green); } .ix-dd-h.no { color: var(--red); }
.ix-good { border-top: 1px solid var(--line); padding-top: 12px; }
.linklike { background: none; border: 0; padding: 0; color: var(--teal); font: inherit; cursor: pointer; }
@media (max-width: 1100px) {
  .ix-wrap { grid-template-columns: minmax(0, 1fr); }
  .ix-side { display: none; }
  .ix-guide-m { display: block; margin-bottom: 16px; }
  .ix-guide-m summary { cursor: pointer; font-weight: 600; padding: 14px 18px; border-radius: 14px; background: var(--wash); list-style: none; display: flex; justify-content: space-between; }
  .ix-guide-m summary::after { content: "+"; color: var(--text2); }
  .ix-guide-m[open] summary::after { content: "–"; }
  .ix-guide-m .card { margin-top: 10px; }
  .ix { max-width: none; }
}
@media (max-width: 600px) {
  .ix.card.pad-lg { padding: 22px 18px; }
  .ix-nav { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); background: #fff; margin: 8px -18px -22px; padding: 14px 18px; }
  .ix-nav .btn-primary { flex: 1; }
}

/* ── Introduce a practice v3: recommendation assistant ─────────────────────── */
.rx { max-width: 880px; }
.rx-narrow { max-width: 640px; }
.rx-hero { margin: 8px 0 28px; }
.rx-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text2); margin-bottom: 10px; }
.rx-hero h1 { font-size: 40px; line-height: 1.08; letter-spacing: -.03em; }
.rx-hero p { font-size: 17px; color: var(--text2); margin: 12px 0 0; max-width: 560px; }
.rx-paths { display: grid; gap: 14px; }
.rx-path { display: grid; grid-template-columns: 48px 1fr auto; gap: 18px; align-items: center; padding: 22px 24px; border-radius: 20px; background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.03), 0 8px 28px rgba(0,0,0,.04); color: var(--ink); text-decoration: none !important; transition: box-shadow .2s, transform .2s; }
a.rx-path:hover { box-shadow: 0 0 0 1px rgba(0,0,0,.12), 0 12px 36px rgba(0,0,0,.08); transform: translateY(-1px); }
.rx-path-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--wash); display: grid; place-items: center; }
.rx-path-ic svg { width: 22px; height: 22px; }
.rx-path:first-child .rx-path-ic { background: var(--ink); color: #fff; }
.rx-path-tx { display: grid; gap: 3px; min-width: 0; }
.rx-path-tx b { font-family: var(--display); font-size: 19px; letter-spacing: -.01em; }
.rx-path-tx span { color: var(--text2); font-size: 14.5px; }
.rx-path-cta { display: grid; justify-items: end; gap: 2px; font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.rx-path-cta::after { content: "→"; display: none; }
.rx-path-cta small { font-weight: 400; color: var(--text3); font-size: 12.5px; }
.rx-path-link { grid-template-columns: 48px 1fr; }
.rx-linkrow { grid-column: 2; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rx-linkrow code { font-size: 13px; background: var(--wash); padding: 8px 12px; border-radius: 10px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.rx-foot { color: var(--text3); font-size: 13px; margin: 22px 0 0; }
.rx-back { display: inline-block; font-size: 14px; color: var(--text2); margin-bottom: 14px; }
.rx-h { font-size: 30px; letter-spacing: -.025em; }
.rx-sub { color: var(--text2); font-size: 16px; margin: 6px 0 22px; }
.rx-sits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rx-sit { display: grid; gap: 6px; padding: 18px 20px; border-radius: 18px; background: #fff; color: var(--ink); text-decoration: none !important;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08); transition: box-shadow .15s, background .15s; }
.rx-sit:hover { box-shadow: 0 0 0 2px var(--ink); }
.rx-sit b { font-size: 16px; }
.rx-sit q { font-size: 15px; color: var(--ink); font-style: italic; quotes: "“" "”"; opacity: .78; }
.rx-sit span { font-size: 13.5px; color: var(--teal); font-weight: 500; }
.rx-change { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--text2); cursor: pointer; margin-bottom: 14px; }
.rx-change span { color: var(--ink); font-weight: 600; }
.rx-card { background: #fff; border-radius: 18px; padding: 18px 20px; box-shadow: 0 0 0 1px rgba(0,0,0,.07), 0 6px 24px rgba(0,0,0,.04); }
.rx-label { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text2); margin-bottom: 8px; }
.rx-can b { font-size: 18px; font-family: var(--display); letter-spacing: -.01em; }
.rx-can p { margin: 4px 0 0; color: var(--text2); }
.rx-weave { margin: 14px 0 0; display: flex; gap: 10px; flex-wrap: wrap; }
.rx-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: var(--wash); font-size: 14px; cursor: pointer; user-select: none; }
.rx-toggle input { accent-color: var(--ink); width: 16px; height: 16px; margin: 0; }
.rx-toggle:has(input:checked) { background: var(--ink); color: #fff; }
.rx-offer { margin-top: 12px; background: linear-gradient(180deg, #FFFBF3, #fff); box-shadow: 0 0 0 1px rgba(201,168,106,.45), 0 6px 24px rgba(0,0,0,.04); }
.rx-offer b { font-size: 17px; }
.rx-offer p { margin: 4px 0 0; color: var(--text2); font-size: 14.5px; }
.rx-tell { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.rx-tell p { color: var(--ink); font-size: 15px; margin: 0; }
.rx-seg { display: inline-flex; background: var(--wash); border-radius: 12px; padding: 4px; gap: 2px; margin-bottom: 12px; }
.rx-seg button { border: 0; background: none; font: inherit; font-weight: 600; font-size: 14.5px; padding: 9px 18px; border-radius: 9px; color: var(--text2); cursor: pointer; }
.rx-seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.rx-words { display: grid; gap: 10px; }
.rx-msg { width: 100%; border: 0; resize: vertical; font: 16px/1.55 var(--body); color: var(--ink); background: var(--wash); border-radius: 14px; padding: 14px 16px; }
.rx-msg:focus { outline: 2px solid var(--teal); outline-offset: 0; }
.rx-fee { font-size: 13.5px; color: var(--text2); margin: 0; }
.rx-hint { font-size: 12.5px; color: var(--text3); margin: 0; }
.rx-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.rx-actions [hidden] { display: none !important; }
.rx-yes { margin-top: 18px; display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 18px 20px; border-radius: 18px; background: var(--wash); }
.rx-yes div { display: grid; gap: 2px; }
.rx-yes span { color: var(--text2); font-size: 14px; }
.rx-form { gap: 16px; }
.rx-checks { display: grid; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--wash); }
.rx-more summary { cursor: pointer; font-size: 14px; color: var(--text2); font-weight: 500; }
.rx-more textarea { margin-top: 10px; }
.rx-offer-pill { font-size: 13.5px; padding: 10px 14px; border-radius: 12px; background: #FFFBF3; box-shadow: 0 0 0 1px rgba(201,168,106,.45); }
.rx-dup[hidden] { display: none !important; }
.rx-done { background: #fff; border-radius: 20px; padding: 24px; margin-bottom: 22px; box-shadow: 0 0 0 1px rgba(0,0,0,.07), 0 8px 28px rgba(0,0,0,.05); display: grid; gap: 18px; }
.rx-done-head { display: flex; gap: 14px; align-items: flex-start; }
.rx-done-head h2 { font-size: 20px; }
.rx-done-head p { margin: 4px 0 0; color: var(--text2); }
.rx-done-ic { width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; flex: none; }
.rx-done-ic svg { width: 20px; height: 20px; }
.rx-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; counter-reset: f; }
.rx-flow li { counter-increment: f; display: grid; gap: 4px; font-size: 13px; padding-top: 12px; border-top: 3px solid var(--line); color: var(--text2); }
.rx-flow li b { color: var(--ink); font-size: 13.5px; }
.rx-flow li.on { border-color: var(--ink); }
@media (max-width: 760px) {
  .rx-hero h1 { font-size: 30px; }
  .rx-hero p { font-size: 16px; }
  .rx-path { grid-template-columns: 44px 1fr; gap: 14px; padding: 18px; }
  .rx-path-ic { width: 44px; height: 44px; }
  .rx-path-cta { grid-column: 1 / -1; justify-items: start; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; }
  .rx-path-cta small { color: rgba(255,255,255,.7); }
  .rx-path:not(:first-child) .rx-path-cta { background: var(--wash); color: var(--ink); }
  .rx-path:not(:first-child) .rx-path-cta small { color: var(--text2); }
  .rx-linkrow { grid-column: 1 / -1; }
  .rx-linkrow code { flex: 1 1 100%; }
  .rx-linkrow .btn { flex: 1; }
  .rx-h { font-size: 26px; }
  .rx-sits { grid-template-columns: 1fr; gap: 10px; }
  .rx-sit { padding: 16px 18px; }
  .rx-seg { display: flex; }
  .rx-seg button { flex: 1; padding: 10px 8px; }
  .rx-actions .btn { flex: 1; justify-content: center; }
  .rx-yes { flex-direction: column; align-items: stretch; }
  .rx-yes .btn { justify-content: center; }
  .rx-flow { grid-template-columns: 1fr; gap: 8px; }
  .rx-flow li { grid-template-columns: 1fr; border-top: 0; border-left: 3px solid var(--line); padding: 2px 0 2px 12px; }
  .rx-flow li.on { border-color: var(--ink); }
}

/* ── Introduce a practice v4: form + live email ─────────────────────────────── */
.iv { max-width: 1180px; }
.iv-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.iv-head h1 { font-size: 34px; letter-spacing: -.025em; }
.iv-head p { color: var(--text2); font-size: 16px; margin: 6px 0 0; }
.iv-link { display: inline-flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 999px; background: var(--wash); font-size: 13px; max-width: 100%; }
.iv-link span { color: var(--text2); font-weight: 600; white-space: nowrap; }
.iv-link code { color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; font-size: 12.5px; }
.iv-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 28px; align-items: start; }
.iv-form { padding: 28px; display: grid; gap: 18px; }
.iv-form .field { margin: 0; }
.iv-seg { display: inline-flex; background: var(--wash); border-radius: 12px; padding: 4px; gap: 2px; }
.iv-seg label { cursor: pointer; }
.iv-seg input { position: absolute; opacity: 0; pointer-events: none; }
.iv-seg span { display: block; padding: 8px 22px; border-radius: 9px; font-weight: 600; font-size: 14.5px; color: var(--text2); }
.iv-seg input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.iv-seg input:focus-visible + span { outline: 2px solid var(--teal); }
.iv-offer { margin-top: 10px; font-size: 13.5px; padding: 10px 14px; border-radius: 12px; background: #FFFBF3; box-shadow: 0 0 0 1px rgba(201,168,106,.45); }
.iv-offer[hidden] { display: none; }
.iv-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.iv-chips label { cursor: pointer; }
.iv-chips input { position: absolute; opacity: 0; pointer-events: none; }
.iv-chips span { display: block; padding: 8px 14px; border-radius: 999px; font-size: 14px; box-shadow: inset 0 0 0 1px var(--line2); color: var(--ink); transition: background .15s; }
.iv-chips label:hover span { background: var(--wash); }
.iv-chips input:checked + span { background: var(--ink); color: #fff; box-shadow: none; }
.iv-chips input:focus-visible + span { outline: 2px solid var(--teal); }
.iv-more summary { cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text2); }
.iv-more textarea { margin-top: 10px; }
.iv-checks { display: grid; gap: 12px; padding: 16px 18px; border-radius: 14px; background: var(--wash); }
.iv-submit { display: grid; gap: 10px; justify-items: center; }
.iv-submit .btn { width: 100%; }
.iv-dup[hidden] { display: none !important; }
.iv-mail { position: sticky; top: 24px; }
.iv-mail-toggle > summary { display: none; }
.iv-letter { background: #fff; border-radius: 18px; box-shadow: 0 0 0 1px rgba(0,0,0,.07), 0 10px 34px rgba(0,0,0,.06); overflow: hidden; }
.iv-meta { display: grid; padding: 4px 22px; border-bottom: 1px solid var(--line); }
.iv-meta > div { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; padding: 10px 0; font-size: 14px; }
.iv-meta > div + div { border-top: 1px solid var(--line); }
.iv-meta span { color: var(--text3); }
.iv-meta b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iv-subject { border: 0; background: none; font: 600 14.5px var(--body); color: var(--ink); padding: 0; width: 100%; }
.iv-subject:focus { outline: none; }
.iv-body { display: block; width: 100%; border: 0; resize: none; padding: 20px 22px 24px; font: 15.5px/1.65 var(--body); color: var(--ink); background: #fff; min-height: 360px; overflow: hidden; }
.iv-body:focus { outline: none; box-shadow: inset 0 0 0 2px var(--teal-soft); }
.iv-mail-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.iv-done-mail { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--wash); }
.iv-done-mail div { display: grid; gap: 2px; }
.iv-done-mail span { color: var(--text2); font-size: 14px; }
@media (max-width: 900px) {
  .iv-grid { grid-template-columns: 1fr; gap: 18px; }
  .iv-mail { position: static; order: 2; }
  .iv-form { padding: 20px 18px; }
  .iv-head h1 { font-size: 28px; }
  .iv-link code { max-width: 150px; }
  .iv-mail-toggle > summary { display: flex; justify-content: space-between; cursor: pointer; font-weight: 600; padding: 14px 18px; border-radius: 14px; background: var(--wash); list-style: none; }
  .iv-mail-toggle > summary::after { content: "+"; color: var(--text2); }
  .iv-mail-toggle[open] > summary { margin-bottom: 12px; }
  .iv-mail-toggle[open] > summary::after { content: "–"; }
  .iv-mail-actions .btn { flex: 1; justify-content: center; }
  .iv-submit { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); background: #fff; margin: 0 -18px -20px; padding: 12px 18px 14px; border-top: 1px solid var(--line); z-index: 3; }
  .iv-done-mail { flex-direction: column; align-items: stretch; }
}
@media (max-width: 900px) { .iv-submit p { display: none; } .iv-submit { padding: 10px 18px; } }

/* ── Introduce v5: two modes + offer card ───────────────────────────────── */
.iv-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.iv-modes label { cursor: pointer; }
.iv-modes input { position: absolute; opacity: 0; pointer-events: none; }
.iv-modes span { display: grid; gap: 2px; padding: 14px 18px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line2); background: #fff; transition: box-shadow .15s, background .15s; height: 100%; }
.iv-modes b { font-size: 15.5px; }
.iv-modes small { color: var(--text2); font-size: 13px; }
.iv-modes input:checked + span { box-shadow: inset 0 0 0 2px var(--ink); }
.iv-modes input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.iv[data-mode="recommend"] .iv-agreed-only, .iv[data-mode="recommend"] .iv-cc { display: none; }
.iv[data-mode="agreed"] .iv-recommend-only { display: none; }
.iv-agreed-block { display: grid; gap: 16px; }
.iv-rec-note { font-size: 13.5px; color: var(--text2); margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--wash); }
.iv-offercard { border-radius: 16px; padding: 18px 20px; background: linear-gradient(180deg, #FFFBF3, #fff); box-shadow: 0 0 0 1px rgba(201,168,106,.45); display: grid; gap: 10px; }
.iv-oc-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8A6A2E; }
.iv-oc-row { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.iv-oc-row > div:first-child { display: grid; gap: 4px; }
.iv-oc-row b { font-family: var(--display); font-size: 18px; letter-spacing: -.01em; }
.iv-oc-row span { color: var(--text2); font-size: 14px; }
.iv-oc-val { text-align: right; display: grid; flex: none; }
.iv-oc-val b { font-size: 26px; }
.iv-oc-val span { font-size: 12px; color: var(--text3); }
.iv-oc-auto { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--green); }
.iv-oc-auto svg { width: 16px; height: 16px; }
.iv-offercard p { margin: 0; font-size: 12.5px; color: var(--text3); }
.iv-personal { min-height: 64px; }
.iv-phi { margin-top: 6px; font-size: 13px; color: var(--amber); }
.iv-phi[hidden] { display: none; }
@media (max-width: 900px) {
  .iv-modes { grid-template-columns: 1fr; }
  .iv-oc-val b { font-size: 22px; }
}

/* ── Introduce v6: static form left; switch + filter + email right ─────────── */
.iv6-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); grid-template-areas: "form controls" "form mail"; gap: 20px 28px; align-items: start; }
.iv6-controls { grid-area: controls; display: grid; gap: 14px; }
.iv6-form { grid-area: form; padding: 28px; display: grid; gap: 16px; position: sticky; top: 24px; }
.iv6-form .field { margin: 0; }
.iv6-mail { grid-area: mail; position: static; }
/* Switch with a sliding thumb */
.iv6-switch { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 16px; background: var(--wash); }
.iv6-switch label { position: relative; z-index: 1; cursor: pointer; }
.iv6-switch input, .iv6-filter input { position: absolute; opacity: 0; pointer-events: none; }
.iv6-switch label > span { display: grid; gap: 2px; padding: 11px 14px; border-radius: 12px; height: 100%; }
.iv6-switch b { font-size: 14.5px; color: var(--text2); transition: color .25s; }
.iv6-switch small { font-size: 12.5px; color: var(--text3); line-height: 1.35; }
.iv6-switch input:checked + span b { color: var(--ink); }
.iv6-switch input:checked + span small { color: var(--text2); }
.iv6-switch input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 1px; }
.iv6-thumb { position: absolute; left: 0; top: 0; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.08); opacity: 0; z-index: 0; }
.iv6-filter-label { font-size: 13.5px; font-weight: 600; margin-top: 4px; }
.iv6-filter-label span { font-weight: 400; color: var(--text3); }
/* Filter chips with a morphing pill */
.iv6-filter { position: relative; display: flex; flex-wrap: wrap; gap: 6px; }
.iv6-filter label { position: relative; z-index: 1; cursor: pointer; }
.iv6-filter label > span { display: block; padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); transition: color .25s, box-shadow .25s; user-select: none; }
.iv6-filter label:hover > span { box-shadow: inset 0 0 0 1px rgba(0,0,0,.28); }
.iv6-filter input:checked + span { color: #fff; box-shadow: inset 0 0 0 1px transparent; }
.iv6-filter input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.iv6-pill { position: absolute; left: 0; top: 0; border-radius: 999px; background: var(--ink); opacity: 0; z-index: 0; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.iv6-ready .iv6-thumb, .iv6-ready .iv6-pill { transition: transform .38s cubic-bezier(.2,.8,.2,1), width .38s cubic-bezier(.2,.8,.2,1), height .38s cubic-bezier(.2,.8,.2,1), opacity .2s; }
.iv6-offer { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text2); padding: 12px 14px; border-radius: 14px; background: #FFFBF3; box-shadow: 0 0 0 1px rgba(201,168,106,.4); }
.iv6-offer svg { width: 16px; height: 16px; color: var(--green); flex: none; margin-top: 2px; }
.iv6-offer b { color: var(--ink); font-weight: 600; }
/* Email crossfade */
.iv-letter .iv-body, .iv-letter .iv-subject { transition: opacity .14s ease, transform .14s ease; }
.iv-letter.iv6-fade .iv-body, .iv-letter.iv6-fade .iv-subject { opacity: 0; transform: translateY(3px); }
.iv6 .iv-mail-note { margin: 10px 2px 0; }
/* Action area: both modes share one footprint; content crossfades */
.iv6-actions { display: grid; padding-top: 18px; border-top: 1px solid var(--line); margin-top: 4px; }
.iv6-act { grid-area: 1 / 1; display: grid; gap: 12px; align-content: start; transition: opacity .25s ease, transform .25s ease, visibility .25s; }
.iv6[data-mode="recommend"] .iv6-act[data-for="agreed"], .iv6[data-mode="agreed"] .iv6-act[data-for="recommend"] { opacity: 0; visibility: hidden; transform: translateY(4px); pointer-events: none; }
.iv6-btns { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.iv6-btns .btn { justify-content: center; }
.iv6-foot { font-size: 12.5px; color: var(--text3); margin: 0; text-align: center; }
.iv6-foot.iv6-need { color: var(--amber); }
.iv6 [data-send]:disabled { opacity: .45; cursor: not-allowed; }
.iv6[data-mode="recommend"] .iv-cc { display: none; }
@media (prefers-reduced-motion: reduce) {
  .iv6-ready .iv6-thumb, .iv6-ready .iv6-pill, .iv6-act, .iv-letter .iv-body, .iv-letter .iv-subject { transition: none !important; }
}
@media (max-width: 900px) {
  .iv6-grid { grid-template-columns: 1fr; grid-template-areas: "controls" "form" "mail"; gap: 16px; }
  .iv6-form { position: static; padding: 20px 18px; }
  .iv6-switch label > span { padding: 10px 12px; }
  .iv6-switch small { display: none; }
  .iv6-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 2px 18px; scroll-padding: 18px; }
  .iv6-filter::-webkit-scrollbar { display: none; }
  .iv6-filter label { flex: none; }
  .iv6-pill { margin-left: 0; }
  .iv6-actions { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); margin: 0 -18px -20px; padding: 12px 18px 14px; z-index: 3; }
  .iv6-act .iv-checks { padding: 10px 12px; gap: 8px; }
  .iv6-foot { font-size: 12px; }
}
.iv6-grid > * { min-width: 0; }
@media (max-width: 900px) { .iv6 { overflow-x: clip; } .iv6-switch { grid-template-columns: 1fr 1fr; } .iv6-switch b { font-size: 13.5px; } }
.iv6-form { grid-template-columns: minmax(0, 1fr); }
.iv6-form > *, .iv6-actions > *, .iv6-act > * { min-width: 0; }
@media (max-width: 900px) { .iv6-btns { grid-template-columns: 1fr 1fr; } .iv6-btns .btn { padding-left: 10px; padding-right: 10px; } }
/* v6.1: one Send area in both modes; email actions as icons on the email */
.iv6 .iv6-act { opacity: 1 !important; visibility: visible !important; transform: none !important; pointer-events: auto !important; }
.iv-letter { position: relative; }
.iv6-tools { position: absolute; top: 10px; right: 12px; display: flex; gap: 6px; z-index: 2; }
.iv6-tool { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; border: 0; background: var(--wash); color: var(--ink); cursor: pointer; transition: background .15s, transform .15s; }
.iv6-tool:hover { background: var(--ink); color: #fff; text-decoration: none; }
.iv6-tool:active { transform: scale(.95); }
.iv6-tool svg { width: 18px; height: 18px; }
.iv6-tool:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.iv6 .iv-meta > div:first-child { padding-right: 92px; }
@media (max-width: 900px) { .iv6-tool { width: 40px; height: 40px; } }
.iv6-tool.is-off { opacity: .4; cursor: not-allowed; }
.rx-interest { display: grid; gap: 14px; padding: 20px 22px; margin-bottom: 22px; }
.rx-interest > div:first-child { display: grid; gap: 2px; }
.rx-interest > div:first-child span { color: var(--text2); font-size: 14px; }
.calc-fixed { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.calc-fixed b { font-size: 18px; }
.calc-fixed small { font-weight: 400; color: var(--text3); font-size: 13px; }
.calc-fixed { justify-content: flex-start; }
