/* JuriLink platform. Light, near-monochrome, one copper accent. */
:root {
  --bg: #ffffff; --surface: #ffffff; --s2: #f4f4f5; --line: #e4e4e7; --line-strong: #8a8a93;
  --ink: #0a0a0b; --on-ink: #ffffff; --ink-hover: #2a2a2e; --muted: #5f5f68; --fog: #d4d4d8;
  --copper: #e2572b; --copper-ink: #a8390f; --copper-soft: #fdece4; --stop: #c81e1e; --stop-soft: #fde8e8;
  --r-sm: 8px; --r-md: 16px; --r-lg: 24px;
  --sans: "Geist", "Helvetica Neue", Arial, sans-serif; --mono: "Geist Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); }
a:hover { color: var(--ink-hover); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; font-weight: 600; }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 19px; line-height: 1.3; letter-spacing: -0.015em; }
h3 { font-size: 16px; letter-spacing: -0.01em; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.small { font-size: 13px; }
.label { font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.two-tone span { color: var(--line-strong); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Environment banner (staging) */
.env-banner { background: var(--copper-soft); color: var(--copper-ink); text-align: center; font-size: 13px; font-weight: 500; padding: 6px 12px; }

/* Shell */
.shell { display: flex; min-height: 100vh; }
.side { width: 236px; flex: none; background: var(--s2); padding: 22px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -0.03em; color: var(--ink); }
.brand svg { flex: none; }
.role-pill { align-self: flex-start; margin-left: 8px; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--ink); color: var(--on-ink); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 12px; text-decoration: none; color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--ink); background: rgba(255,255,255,0.6); }
.nav a.on { background: var(--bg); color: var(--ink); }
.nav .count { font-size: 12px; min-width: 22px; text-align: center; padding: 1px 7px; border-radius: 999px; background: var(--copper-soft); color: var(--copper-ink); }
.side-foot { margin-top: auto; padding: 0 8px; font-size: 13px; color: var(--muted); }
.side-foot form { margin-top: 8px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }
.main { flex: 1; min-width: 0; padding: 32px clamp(16px, 3vw, 44px) 64px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.page-head .sub { margin-top: 6px; color: var(--muted); }
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .side { width: auto; height: auto; position: static; padding: 14px; gap: 10px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .side-foot { margin-top: 0; }
}

/* Public pages */
.public { min-height: 100vh; display: flex; flex-direction: column; }
.public-top { display: flex; justify-content: space-between; align-items: center; padding: 18px clamp(16px, 4vw, 40px); border-bottom: 1px solid var(--line); }
.public-main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 40px 16px 72px; }
.public-main.narrow { max-width: 440px; }
.public-foot { padding: 24px clamp(16px, 4vw, 40px); border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

/* Cards and grids */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.card.soft { background: var(--s2); border-color: transparent; }
.card.dark { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.card.dark .muted, .card.dark .label { color: #a1a1aa; }
.card h2 { margin-bottom: 12px; }
.grid { display: grid; gap: 14px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 18px; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.cols-main { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
@media (max-width: 1000px) { .cols-main { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.kpi .fig { font-family: var(--mono); font-size: 32px; line-height: 1.1; letter-spacing: -0.03em; margin-top: 10px; }
.kpi .note { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.card.dark .kpi-dot, .kpi-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--copper); margin-right: 7px; vertical-align: 1px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--ink); color: var(--on-ink); font: 600 14.5px var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--ink-hover); color: var(--on-ink); }
.btn.secondary { background: var(--s2); color: var(--ink); }
.btn.secondary:hover { background: var(--line); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn.danger { background: var(--stop-soft); color: var(--stop); }
.btn.small { height: 34px; padding: 0 14px; font-size: 13.5px; }
.btn.big { height: 54px; padding: 0 28px; font-size: 16px; }
.btn.block { width: 100%; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500; background: var(--s2); color: var(--ink); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--line-strong); }
.badge.ink { background: var(--ink); color: var(--on-ink); }
.badge.ink::before { background: var(--on-ink); }
.badge.copper { background: var(--copper-soft); color: var(--copper-ink); }
.badge.copper::before { background: var(--copper); }
.badge.stop { background: var(--stop-soft); color: var(--stop); }
.badge.stop::before { background: var(--stop); }
.badge.muted::before { background: var(--line-strong); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12.5px; font-weight: 500; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
tr:first-child td { border-top: 0; }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
tbody tr:hover { background: #fafafa; }
td a.rowlink { font-weight: 600; text-decoration: none; }
td a.rowlink:hover { text-decoration: underline; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* Filters */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--s2); text-decoration: none; font-size: 13.5px; font-weight: 500; color: var(--ink); }
.chip.on { background: var(--ink); color: var(--on-ink); }
.chip .n { font-family: var(--mono); font-size: 12px; opacity: 0.7; }

/* Forms */
form.stack { gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url], input[type=number], input[type=month], select, textarea {
  width: 100%; font: 15px var(--sans); color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 14px; padding: 11px 14px; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
textarea.code { font-family: var(--mono); font-size: 13.5px; min-height: 220px; }
.err { color: var(--stop); font-size: 13px; }
.field.has-err input, .field.has-err textarea, .field.has-err select { border-color: var(--stop); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline-form .field { flex: 1 1 160px; }

/* Flash */
.flash { padding: 12px 16px; border-radius: 14px; margin-bottom: 18px; font-size: 14px; }
.flash.ok { background: var(--s2); }
.flash.ok::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--ink); margin-right: 8px; }
.flash.error { background: var(--stop-soft); color: var(--stop); }

/* Journey */
.journey { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.journey i { height: 6px; border-radius: 6px; background: var(--line); }
.journey i.done { background: var(--ink); }
.journey i.now { background: var(--copper); }
.journey.stopped i.done { background: var(--fog); }
.journey-labels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; font-size: 11.5px; color: var(--muted); margin-top: 6px; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { padding: 12px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 18px 1fr; gap: 10px; }
.timeline li:first-child { border-top: 0; }
.timeline .dot { width: 9px; height: 9px; border-radius: 2px; background: var(--fog); margin-top: 6px; }
.timeline .dot.status { background: var(--ink); }
.timeline .dot.copper { background: var(--copper); }
.timeline .meta { font-size: 12.5px; color: var(--muted); }
.timeline .note { white-space: pre-wrap; margin-top: 4px; }

/* Key-value list */
dl.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { dl.kv { grid-template-columns: 1fr; } dl.kv dd { margin-bottom: 6px; } }

/* Decision tree */
.tree-head { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.tree-progress { flex: 1; }
.tree-bar { display: block; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.tree-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ink), var(--copper)); border-radius: 4px; transition: width .45s cubic-bezier(.2,.8,.2,1); }
.tree-count { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tree-next { margin-top: 14px; }
.js .q.multi .tree-next { display: inline-flex; }
.tree-next { display: none; }
.q.multi .opt label { padding-left: 46px; }
.q.multi .opt label::before { content: ''; position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line-strong); background: var(--s1, #fff); transition: background .15s, border-color .15s; }
.q.multi .opt input:checked + label::before { background: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 3px var(--s1, #fff); }
@media (max-width: 560px) { .q legend { font-size: 22px; } .opts { grid-template-columns: 1fr; } .opt label { padding: 14px; } }

/* Match result */
.match-card { border-radius: 22px; padding: 22px; background: var(--ink); color: #fff; position: relative; overflow: hidden; margin-bottom: 22px; }
.match-card::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(201,113,63,.55), transparent 65%); pointer-events: none; }
.match-card .label { color: rgba(255,255,255,.6); }
.match-card h2 { color: #fff; font-size: 28px; letter-spacing: -0.03em; margin: 6px 0 4px; }
.match-meter { display: flex; gap: 6px; margin: 14px 0 16px; }
.match-meter i { flex: 1; height: 6px; border-radius: 6px; background: rgba(255,255,255,.15); }
.match-meter i.on { background: linear-gradient(90deg, #fff, var(--copper)); }
.match-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.match-card li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.match-card li::before { content: ''; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; margin-top: 8px; background: var(--copper); }
.match-card li.caution::before { background: rgba(255,255,255,.45); }
.match-card .muted { color: rgba(255,255,255,.65); }
.doc-list { margin: 8px 0 0; padding-left: 18px; }
.doc-list li { margin-bottom: 4px; }
@media (prefers-reduced-motion: reduce) { .tree-bar i { transition: none; } }
.q { border: 0; padding: 0; margin: 0 0 30px; }
.q legend { font-size: 26px; font-weight: 600; letter-spacing: -0.035em; line-height: 1.15; padding: 0; margin-bottom: 8px; }
.q .hint { color: var(--muted); margin-bottom: 16px; }
.opts { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; pointer-events: none; }
.opt label { display: block; padding: 15px 16px; border: 1px solid var(--line); border-radius: 16px; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.opt label b { display: block; font-weight: 600; }
.opt label small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.opt label:hover { border-color: var(--line-strong); }
.opt input:checked + label { border-color: var(--ink); background: var(--s2); box-shadow: inset 0 0 0 1px var(--ink); }
.opt input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 2px; }
.js .q { display: none; animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
.js .q.on { display: block; }
.js .tree-nav { display: flex; }
.tree-nav { display: none; justify-content: space-between; gap: 10px; margin-top: 8px; }
.js .tree-submit { display: none; }
.js .tree-submit.on { display: inline-flex; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Disclosure */
.disclosure { background: var(--s2); border-radius: var(--r-md); padding: 18px 20px; font-size: 14px; color: var(--muted); }
.disclosure .label { display: flex; align-items: center; gap: 8px; color: var(--ink); margin-bottom: 10px; }
.disclosure .label::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--copper); }
.disclosure p:last-child { margin-bottom: 0; }

/* Email preview and signature */
.email-frame { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--s2); }
.sig-preview { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; }
.code-inline { font-family: var(--mono); font-size: 13px; background: var(--s2); padding: 2px 7px; border-radius: 6px; }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row input { font-family: var(--mono); font-size: 13px; }
.step-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 9px; background: var(--ink); color: var(--on-ink); font-size: 13px; font-weight: 600; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.hero-thanks { text-align: left; }
.hero-thanks .ref { font-family: var(--mono); font-size: 28px; letter-spacing: -0.02em; }

/* Signature previews are emails: keep table styles out of them. */
.sig-preview table { width: auto; font-size: inherit; }
.sig-preview td { border: 0; padding: 1px 0; }
.sig-preview tbody tr:hover { background: none; }
.q legend:focus { outline: none; }
#app [role=img] svg { width: 100%; height: 100%; display: block; }

/* Signed agreements */
.agreement-doc { max-width: 820px; font-size: 15px; line-height: 1.6; }
.agreement-doc h1 { font-size: 26px; margin: 0 0 4px; }
.agreement-doc h2 { font-size: 16px; margin: 22px 0 6px; }
.agreement-doc h3 { font-size: 14px; margin: 18px 0 6px; }
.agreement-doc p { margin: 0 0 8px; }
.agreement-doc hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.agreement-doc code { font-size: 12px; word-break: break-all; }
@media print {
  .side, .no-print, .flash, .banner-staging { display: none !important; }
  .shell { display: block; }
  .card { border: 0 !important; box-shadow: none !important; padding: 0 !important; }
  body { background: #fff !important; }
}

/* ---------- Sign-in pages (platform and SDR share this layout) ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 44%) 1fr; }
.auth-panel { position: relative; overflow: hidden; background: var(--ink); color: var(--on-ink); padding: 36px clamp(28px, 4vw, 56px); display: flex; flex-direction: column; justify-content: space-between; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 19px; letter-spacing: -0.03em; }
.auth-panel .auth-brand svg rect:first-child { fill: #ffffff; }
.auth-brand .sdr-pill { margin-left: 2px; font-size: 11px; font-weight: 600; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; background: var(--copper); color: #fff; }
.auth-pitch { position: relative; z-index: 1; max-width: 440px; }
.auth-kicker { font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: #a1a1aa; margin: 0 0 14px; }
.auth-pitch h2 { font-size: clamp(28px, 2.6vw, 38px); line-height: 1.12; letter-spacing: -0.035em; font-weight: 600; margin: 0 0 26px; color: #fff; }
.auth-pitch ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; color: #d4d4d8; font-size: 15px; }
.auth-pitch li { display: flex; align-items: center; gap: 12px; }
.auth-pitch li::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--copper); flex: none; }
.auth-shapes { position: absolute; right: -110px; top: -110px; width: 360px; height: 360px; pointer-events: none; }
.auth-shapes i { position: absolute; border-radius: 48px; display: block; }
.auth-shapes i:nth-child(1) { width: 220px; height: 220px; left: 0; top: 0; background: #1c1c20; }
.auth-shapes i:nth-child(2) { width: 220px; height: 220px; left: 90px; top: 90px; background: #2a2a2e; }
.auth-shapes i:nth-child(3) { width: 130px; height: 130px; left: 90px; top: 90px; background: var(--copper); border-radius: 48px 0 48px 0; opacity: .92; }
.auth-main { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.auth-top { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 22px clamp(16px, 4vw, 40px); min-height: 32px; }
.auth-top .auth-brand.mobile { display: none; margin-right: auto; }
.auth-back { font-size: 14px; color: var(--muted); text-decoration: none; }
.auth-back:hover { color: var(--ink); }
.auth-box { width: 100%; max-width: 400px; margin: auto; padding: 24px 16px 40px; }
.auth-box h1 { font-size: 30px; line-height: 1.15; letter-spacing: -0.035em; margin: 0 0 8px; }
.auth-box .lede { color: var(--muted); margin: 0 0 26px; }
.auth-box .lede strong { color: var(--ink); font-weight: 600; }
.auth-box .flash { margin-bottom: 18px; }
.auth-box .field input { height: 46px; }
.auth-box .btn.block { height: 48px; font-size: 15px; }
.auth-foot { padding: 20px clamp(16px, 4vw, 40px); font-size: 12.5px; color: var(--muted); text-align: center; }
.auth-row { display: flex; justify-content: space-between; align-items: baseline; }
.auth-row .label { margin: 0; }
.auth-row a, .auth-row label.tab-link { font-size: 13px; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.auth-note { font-size: 13.5px; color: var(--muted); margin: 16px 0 0; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; margin: 20px 0; }
.auth-or::before, .auth-or::after { content: ''; height: 1px; background: var(--line); flex: 1; }
.auth-links { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; }
.auth-links a { color: var(--muted); }
.auth-links a:hover { color: var(--ink); }
.code-input { font-family: var(--mono); font-size: 24px !important; letter-spacing: .32em; text-align: center; }
.auth-badge { display: inline-flex; width: 44px; height: 44px; border-radius: 14px; background: var(--copper-soft); align-items: center; justify-content: center; margin-bottom: 18px; }
.auth-badge svg { width: 22px; height: 22px; stroke: var(--copper-ink); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Tabs without JavaScript: a radio per pane. */
.auth-tabs > input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--s2); border-radius: 999px; margin-bottom: 22px; }
.seg label { text-align: center; padding: 9px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.auth-pane { display: none; }
#t-pw:checked ~ .seg label[for=t-pw], #t-link:checked ~ .seg label[for=t-link] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(10,10,11,.08); }
#t-pw:checked ~ .pane-pw, #t-link:checked ~ .pane-link, #t-reset:checked ~ .pane-reset { display: flex; }
#t-reset:checked ~ .seg { display: none; }
.auth-tabs > input[type=radio]:focus-visible ~ .seg { outline: 2px solid var(--ink); outline-offset: 2px; }

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-panel { display: none; }
  .auth-top .auth-brand.mobile { display: flex; }
  .auth-box { margin-top: 4vh; }
}
.auth-foot a { color: var(--muted); }
.legal-list { display: grid; grid-template-columns: max-content 1fr; gap: 10px 22px; margin: 0; font-size: 15px; }
.legal-list dt { color: var(--muted); }
.legal-list dd { margin: 0; }
.extra-row { display: grid; grid-template-columns: minmax(140px, 1fr) 2fr; gap: 8px; }
@media (max-width: 600px) { .extra-row { grid-template-columns: 1fr; } }
.rec-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 6px 0 16px; }
.rec-tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.rec-tabs a.on { color: var(--ink); border-bottom-color: var(--ink); }
.rec-tabs .count { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: var(--s2); margin-left: 4px; }

/* Mailboxes and calendars (/admin/mailbox): a mail client inside the console. */
.mbx { display: grid; grid-template-columns: 250px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); min-height: 640px; }
.mbx-rail { border-right: 1px solid var(--line); background: var(--s2); padding: 14px 10px; overflow-y: auto; max-height: 80vh; }
.mbx-group { font-size: 12.5px; color: var(--muted); margin: 10px 10px 6px; }
.mbx-group:first-child { margin-top: 0; }
.mbx-acc { display: block; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.mbx-acc:hover { background: rgba(0,0,0,.04); }
.mbx-acc.on { background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.mbx-acc .nm { display: flex; align-items: center; gap: 6px; font-weight: 500; font-size: 14px; }
.mbx-acc .ad { font-family: var(--mono); font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbx-lock { font-size: 11px; color: var(--copper-ink); background: var(--copper-soft); border-radius: 6px; padding: 1px 6px; font-weight: 500; }
.mbx-main { min-width: 0; display: flex; flex-direction: column; }
.mbx-head { padding: 18px 22px 0; }
.mbx-head h2 { margin: 0; font-size: 20px; }
.mbx-tabs { display: flex; gap: 2px; padding: 12px 22px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; align-items: flex-end; }
.mbx-tabs a { padding: 9px 12px; text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.mbx-tabs a.on { color: var(--ink); border-bottom-color: var(--ink); }
.mbx-tabs form { margin-left: auto; padding-bottom: 6px; display: flex; gap: 6px; }
.mbx-tabs input[type=search] { width: 220px; padding: 7px 12px; font-size: 13.5px; }
.mbx-list { list-style: none; margin: 0; padding: 0; }
.mbx-list li { border-bottom: 1px solid var(--line); }
.mbx-list a { display: grid; grid-template-columns: 190px minmax(0, 1fr) 84px; gap: 14px; padding: 11px 22px; text-decoration: none; color: var(--ink); align-items: baseline; }
.mbx-list a:hover { background: var(--s2); }
.mbx-list .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.mbx-list .line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.mbx-list .snip { color: var(--muted); }
.mbx-list .when { text-align: right; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mbx-list .unread .who, .mbx-list .unread .subj { font-weight: 600; }
.mbx-list .nolink { display: grid; grid-template-columns: 190px minmax(0, 1fr) 84px; gap: 14px; padding: 11px 22px; align-items: baseline; }
.mbx-empty { padding: 40px 22px; color: var(--muted); }
.mbx-foot { padding: 12px 22px; display: flex; justify-content: flex-end; gap: 8px; }
.mbx-note { margin: 14px 22px 0; }
.mbx-day { padding: 14px 22px 4px; font-size: 13px; color: var(--muted); font-weight: 500; }
.mbx-day.today { color: var(--copper-ink); }
.mbx-ev { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 14px; padding: 8px 22px; border-bottom: 1px solid var(--line); }
.mbx-ev .t { font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding-top: 2px; }
.mbx-msg { border-top: 1px solid var(--line); padding: 18px 22px; }
.mbx-msg:first-child { border-top: 0; }
.mbx-msg .body { white-space: pre-wrap; line-height: 1.6; margin-top: 12px; overflow-wrap: anywhere; }
.mbx-msg details { margin-top: 10px; }
.mbx-msg details pre { white-space: pre-wrap; font-family: var(--sans); color: var(--muted); font-size: 13.5px; margin: 8px 0 0; overflow-wrap: anywhere; }
.mbx-att { display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; text-decoration: none; color: var(--ink); margin: 10px 8px 0 0; }
@media (max-width: 860px) {
  .mbx { grid-template-columns: 1fr; min-height: 0; }
  .mbx-rail { align-items: flex-start; max-height: none; border-right: 0; border-bottom: 1px solid var(--line); display: flex; gap: 6px; overflow-x: auto; padding: 10px; }
  .mbx-group { display: none; }
  .mbx-acc { flex: 0 0 auto; }
  .mbx-list a, .mbx-list .nolink { grid-template-columns: minmax(0, 1fr) 70px; }
  .mbx-list .line { grid-column: 1 / -1; grid-row: 2; }
  .mbx-tabs form { margin-left: 0; width: 100%; }
  .mbx-tabs input[type=search] { width: 100%; }
}

/* Introducer portal: leads from JuriLink */
.from-us { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; text-decoration: none; color: inherit; }
.from-us .small { margin-top: 4px; max-width: 620px; }
.from-us.fresh { box-shadow: inset 4px 0 0 var(--copper); }
.card.is-new { box-shadow: inset 4px 0 0 var(--copper); }

/* ── In person: the QR screen (owners) and the one-screen sign-up (introducers) ───────────────── */
.meet { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; background: var(--ink); color: var(--on-ink); }
.meet a { color: var(--on-ink); }
.meet-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; }
.meet-back { font-size: 30px; line-height: 1; text-decoration: none; opacity: .7; width: 24px; }
.meet-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: -0.02em; font-size: 17px; }
.meet-main { display: grid; place-content: center; justify-items: center; gap: 18px; padding: 8px 24px 24px; text-align: center; }
.meet-kicker { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.meet-qr { background: #fff; border-radius: 28px; padding: 22px; width: min(78vw, 360px); box-shadow: 0 0 0 6px rgba(226,87,43,.9); }
.meet-qr svg { display: block; width: 100%; height: auto; }
.meet-with { margin: 0; color: #c9c9cf; font-size: 16px; }
.meet-with strong { color: #fff; }
.meet-foot { padding: 14px 20px 22px; border-top: 1px solid #26262b; }
.meet-set { display: flex; gap: 8px; flex-wrap: wrap; }
.meet-set select, .meet-set input { background: #18181b; color: #fff; border: 1px solid #333; border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 14px; }
.meet-set input { flex: 1; min-width: 140px; }
.meet-set .btn { background: #fff; color: var(--ink); }
.meet-today { margin: 10px 0 0; font-size: 13px; color: #a1a1aa; }

.hello { max-width: 460px; margin: 0 auto; }
.hello-met { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--s2); font-size: 14px; margin-bottom: 18px; }
.hello-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--copper); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.hello-h { font-size: 30px; line-height: 1.12; margin: 0 0 10px; }
.hello-h span { color: var(--line-strong); }
.hello-sub { margin-bottom: 18px; }
.hello-form { display: grid; gap: 12px; }
.hello-form .field input, .hello-form .field textarea { font-size: 16px; } /* 16px stops iPhone zooming in */
.hello-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hello-chips { border: 0; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hello-chips legend { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 8px; padding: 0; }
.pick-chip { position: relative; display: inline-block; }
.pick-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pick-chip span { display: inline-block; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; background: #fff; transition: background .12s, color .12s, border-color .12s; }
.pick-chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.pick-chip input:focus-visible + span { outline: 2px solid var(--copper); outline-offset: 2px; }
.hello-check { font-size: 13px; color: var(--muted); align-items: flex-start; }
.hello-go { width: 100%; justify-content: center; margin-top: 4px; }
.hello-fine { margin-top: 10px; text-align: center; }
.hello-next { margin: 22px 0; padding-left: 20px; line-height: 1.6; }
.hello-next li { margin-bottom: 8px; }

.pass { margin: 22px 0 4px; border-radius: 22px; padding: 20px 22px 18px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #3a1a10 0%, #0a0a0b 55%); box-shadow: 0 18px 40px -18px rgba(10,10,11,.6); }
.pass-top { display: flex; justify-content: space-between; align-items: center; }
.pass-brand svg rect:first-child, .meet-brand svg rect:first-child { fill: #fff; }
.pass-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: -0.02em; }
.pass-tag { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--copper); color: #fff; font-weight: 500; }
.pass-name { margin-top: 34px; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.pass-firm { color: #c9c9cf; font-size: 14px; }
.pass-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.pass-row span { display: block; font-size: 11px; color: #a1a1aa; margin-bottom: 2px; }
.pass-row strong { font-size: 14px; font-weight: 500; }
.pass-foot { margin-top: 18px; font-size: 12px; color: #a1a1aa; letter-spacing: .02em; }
@media (max-width: 380px) { .hello-pair { grid-template-columns: 1fr; } .hello-h { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { .pick-chip span { transition: none; } }
.hello-mail { margin: 18px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--copper-soft); color: var(--copper-ink); font-size: 14px; }

/* ── /ebw and /hk: a founder's own QR screen ─────────────────────────────────────────────────── */
.fq { position: relative; min-height: 100svh; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; background: #050506; color: #fff;
  padding: max(16px, env(safe-area-inset-top)) 22px max(18px, env(safe-area-inset-bottom)); }
.fq-glow { position: absolute; inset: -30% -40% auto; height: 80%; background: radial-gradient(50% 50% at 50% 50%, rgba(226,87,43,.38), rgba(226,87,43,0) 70%); filter: blur(10px); pointer-events: none; }
.fq-top, .fq-main, .fq-foot { position: relative; }
.fq-top { display: flex; align-items: center; justify-content: space-between; }
.fq-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.fq-brand svg rect:first-child { fill: #fff; }
.fq-pill { font-size: 12px; font-weight: 500; padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); color: #d4d4d8; }
.fq-main { display: grid; align-content: center; justify-items: center; gap: 26px; text-align: center; padding: 18px 0; }
.fq-h { font-size: clamp(34px, 10vw, 52px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 700; margin: 0; }
.fq-h span { display: block; margin-top: 10px; font-size: clamp(15px, 4.2vw, 18px); line-height: 1.35; letter-spacing: -0.01em; font-weight: 500; color: #a1a1aa; }
.fq-ring { position: relative; padding: 5px; border-radius: 34px; background: conic-gradient(from var(--fq-a, 0deg), #e2572b, #ff9a6b, #3a1a10, #e2572b); animation: fq-spin 6s linear infinite; box-shadow: 0 30px 80px -20px rgba(226,87,43,.55); }
.fq-qr { background: #fff; border-radius: 30px; padding: 22px; width: min(76vw, 360px); }
.fq-qr svg { display: block; width: 100%; height: auto; }
@property --fq-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes fq-spin { to { --fq-a: 360deg; } }
.fq-who { display: flex; align-items: center; gap: 12px; text-align: left; padding: 8px 16px 8px 8px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.fq-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #e2572b; font-weight: 600; font-size: 15px; letter-spacing: .02em; }
.fq-who div strong { display: block; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.fq-who div span { display: block; font-size: 13px; color: #a1a1aa; }
.fq-foot { text-align: center; font-size: 12px; color: #71717a; }
@media (prefers-reduced-motion: reduce) { .fq-ring { animation: none; } }
