/* ---------- Tokens ---------- */
:root {
  --bg: #0A0E22;
  --bg-2: #121838;
  --ink: #FFFFFF;
  --muted: #C3CAE0;
  --line: #2A3366;
  --gold: #FFC83D;
  --gold-2: #FF7A3D;
  --teal: #2FF0C8;
  --rose: #FF4F8B;
  --violet: #8B6CFF;
  --danger: #FF6B6B;
  --grad: linear-gradient(100deg, #FFC83D 0%, #FF7A3D 45%, #FF4F8B 100%);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --nav-h: 68px;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F5F6FC; --bg-2: #FFFFFF; --ink: #0A0E22; --muted: #3F4768; --line: #D5DAEE;
    --gold: #D98E00; --gold-2: #F0541E; --teal: #00A884; --rose: #E0245E; --violet: #6A4BFF; --danger: #D32F2F;
    --grad: linear-gradient(100deg, #E89B00 0%, #F0541E 45%, #E0245E 100%);
  }
}
:root[data-theme="light"] {
  --bg: #F5F6FC; --bg-2: #FFFFFF; --ink: #0A0E22; --muted: #3F4768; --line: #D5DAEE;
  --gold: #D98E00; --gold-2: #F0541E; --teal: #00A884; --rose: #E0245E; --violet: #6A4BFF; --danger: #D32F2F;
  --grad: linear-gradient(100deg, #E89B00 0%, #F0541E 45%, #E0245E 100%);
}
html { scroll-padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); }
*, *::before, *::after { box-sizing: inherit; }
body {
  margin: 0; color: var(--ink);
  background:
    radial-gradient(1100px 600px at 85% -10%, color-mix(in srgb, var(--violet) 22%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 40%, color-mix(in srgb, var(--teal) 10%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  font-family: var(--sans); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, canvas, svg { max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 28px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { font-family: var(--mono); font-size: 15px; text-decoration: none; letter-spacing: 0; white-space: nowrap; }
.brand b { color: var(--gold); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-family: var(--mono); font-size: 14px; text-decoration: none; color: var(--muted); white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::before { content: "/"; color: var(--gold); }
.nav-tools { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; cursor: pointer; display: grid; place-items: center;
}
.icon-btn:hover { border-color: var(--gold); }
.menu-btn { display: none; }
.wa-btn {
  display: inline-flex !important; align-items: center; gap: 7px;
  padding: 7px 14px 7px 11px; border-radius: 999px;
  background: #25D366; color: #06210F !important; font-weight: 600;
  box-shadow: 0 6px 20px -6px rgba(37, 211, 102, .7);
  transition: transform .2s, box-shadow .2s;
}
.wa-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px -6px rgba(37, 211, 102, .9); }
.wa-icon { display: none; background: #25D366; border-color: #25D366; color: #06210F; }
.wa-icon:hover { border-color: #25D366; filter: brightness(1.08); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; text-decoration: none; cursor: pointer;
  font-family: var(--mono); font-size: 14px; border: 1px solid var(--gold);
  white-space: nowrap;
}
.btn-solid { background: var(--grad); color: #0A0E22; font-weight: 700; border-color: transparent; box-shadow: 0 8px 28px -8px color-mix(in srgb, var(--gold-2) 70%, transparent); }
.btn-solid:hover { filter: brightness(1.1) saturate(1.1); box-shadow: 0 10px 34px -6px color-mix(in srgb, var(--rose) 70%, transparent); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--teal); }
.btn-ghost:hover { background: color-mix(in srgb, var(--teal) 16%, transparent); }

/* ---------- Pages ---------- */
.page { display: none; min-height: 100vh; padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); }
.page.active { display: block; animation: pageIn .5s ease both; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Hero ---------- */
.hero { position: relative; height: calc(100vh - var(--nav-h)); min-height: 600px; overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-copy {
  position: absolute; left: 0; right: 0; bottom: 56px; pointer-events: none;
}
.hero-copy .wrap { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.hero-lede { max-width: 34ch; font-family: var(--serif); font-size: clamp(1.3rem, 2.3vw, 1.75rem); line-height: 1.3; margin: 0; }
.hero-lede em { font-style: italic; color: var(--gold); }  /* per-letter gradient is painted by JS */
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; pointer-events: auto; }
.hero-hint {
  position: absolute; top: 20px; right: 28px; font-family: var(--mono); font-size: 12px; color: var(--muted);
  pointer-events: none;
}

/* ---------- Sections ---------- */
.section { padding: 110px 0; border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; margin-bottom: 56px; align-items: end; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0; }
h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h3 { font-size: 1.45rem; }
.kicker { font-family: var(--mono); font-size: 13px; color: var(--teal); margin: 0 0 14px; }
.section-head p { color: var(--muted); margin: 0; max-width: 52ch; }

.services { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.service {
  padding: 36px 32px 40px 0; border-right: 1px solid var(--line); text-decoration: none; display: block;
  transition: background .3s;
}
.service:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--violet) 14%, transparent), transparent); }
.service + .service { padding-left: 32px; }
.service:last-child { border-right: 0; }
.service .num { font-family: var(--mono); font-size: 13px; color: var(--teal); }
.service h3 { margin: 18px 0 12px; }
.service p { color: var(--muted); margin: 0 0 22px; font-size: 15.5px; }
.service .go { font-family: var(--mono); font-size: 13px; color: var(--gold); }

.builds { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.builds li { border-bottom: 1px solid var(--line); }
.build {
  display: grid; grid-template-columns: 1.1fr 1.6fr auto; gap: 28px; align-items: baseline;
  padding: 26px 0; text-decoration: none;
}
.build .t { font-family: var(--mono); font-size: 1.05rem; }
.build .d { color: var(--muted); font-size: 15.5px; }
.build .s { font-family: var(--mono); font-size: 12px; color: var(--teal); white-space: nowrap; }
.build:hover .t { color: var(--gold); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid transparent; border-image: var(--grad) 1; padding-top: 20px; }
.steps li::before { content: counter(step); font-family: var(--serif); font-size: 2.6rem; line-height: 1; display: block; margin-bottom: 12px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.steps h3 { font-size: 1.2rem; margin-bottom: 8px; }
.steps p { color: var(--muted); margin: 0; font-size: 15.5px; }

.about { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }
.about p { margin: 0 0 18px; }
.about .muted { color: var(--muted); }
.facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.facts li { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.facts span:first-child { color: var(--muted); }
.facts span:last-child { text-align: right; }

.cta-band { padding: 120px 0; border-top: 1px solid var(--line); text-align: center; }
.cta-band h2 { max-width: 20ch; margin: 0 auto 28px; }
.cta-band .row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Big footer name (shade effect) */
footer { border-top: 1px solid var(--line); padding: 56px 0 40px; overflow: hidden; }
.footer-name {
  font-family: var(--mono); font-weight: 600; font-size: clamp(2.2rem, 10.5vw, 9rem); line-height: 1;
  margin: 0 0 36px; white-space: nowrap; cursor: crosshair; user-select: none; -webkit-user-select: none;
  touch-action: pan-y; color: var(--ink);
}
.footer-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.footer-row a { text-decoration: none; margin-left: 18px; }
.footer-row a:first-child { margin-left: 0; }
.footer-row a:hover { color: var(--gold); }

/* ---------- Inner page header ---------- */
.page-head { padding: 90px 0 60px; }
.page-head h1 { font-size: clamp(2.6rem, 6.5vw, 5.2rem); max-width: 16ch; }
.page-head p { color: var(--muted); max-width: 58ch; margin: 22px 0 0; font-size: 1.1rem; }

/* Services detail */
.svc-block { display: grid; grid-template-columns: 1fr 1.5fr; gap: 56px; padding: 64px 0; border-top: 1px solid var(--line); }
.svc-block h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.svc-block .intro { color: var(--muted); margin: 16px 0 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.two-col h4 { font-family: var(--mono); font-size: 13px; font-weight: 400; color: var(--gold); margin: 0 0 12px; }
.two-col ul { margin: 0; padding-left: 18px; color: var(--ink); }
.two-col li { margin-bottom: 8px; font-size: 15.5px; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.tools span { font-family: var(--mono); font-size: 12.5px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; color: var(--muted); }

/* Work page */
.case { display: grid; grid-template-columns: 90px 1fr 1.3fr; gap: 32px; padding: 44px 0; border-top: 1px solid var(--line); }
.case .idx { font-family: var(--serif); font-size: 2rem; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.case h3 { margin-bottom: 10px; }
.case .stack { font-family: var(--mono); font-size: 12.5px; color: var(--teal); }
.case p { margin: 0 0 12px; color: var(--muted); font-size: 15.5px; }
.case p b { color: var(--ink); font-weight: 500; }

/* ---------- Analytics lab ---------- */
.lab-input { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; margin-bottom: 28px; }
.panel { border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); padding: 22px; }
.panel h3 { font-size: 1.1rem; margin-bottom: 12px; font-family: var(--sans); font-weight: 700; }
.panel .sub { color: var(--muted); font-size: 14px; margin: -6px 0 14px; }
textarea.csv {
  width: 100%; min-height: 170px; resize: vertical; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); padding: 14px; font-family: var(--mono); font-size: 13px; line-height: 1.5; white-space: pre; overflow-x: auto;
}
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.drop { display: block;
  border: 1.5px dashed color-mix(in srgb, var(--muted) 55%, transparent); border-radius: 12px; padding: 26px 16px; text-align: center; cursor: pointer;
  color: var(--muted); font-size: 14.5px; transition: border-color .2s, background .2s;
}
.drop.over, .drop:hover { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 7%, transparent); }
.drop strong { color: var(--ink); display: block; margin-bottom: 4px; }
.samples { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.samples button {
  text-align: left; background: transparent; border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px;
  cursor: pointer; font-size: 14.5px;
}
.samples button:hover, .samples button[aria-pressed="true"] { border-color: var(--gold); }
.samples small { display: block; color: var(--muted); font-size: 12.5px; }
.lab-msg { font-family: var(--mono); font-size: 13px; margin: 0 0 20px; min-height: 1.4em; color: var(--teal); }
.lab-msg.err { color: var(--danger); }

.controls { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; margin-bottom: 24px; }
.controls label { display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.controls select {
  min-width: 180px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer;
}
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 24px; }
.kpi { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: var(--bg-2); }
.kpi .l { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.kpi .v { font-family: var(--serif); font-size: 1.9rem; line-height: 1.15; margin-top: 6px; overflow-wrap: anywhere; }
.kpi .v small { font-size: .9rem; color: var(--muted); font-family: var(--sans); }

.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; margin-bottom: 20px; }
.grid-2b { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.lab-input > *, .grid-2 > *, .grid-2b > *, .panel { min-width: 0; }
.chart-box { position: relative; height: 320px; }
.chart-box.sm { height: 260px; }
.insights { list-style: none; padding: 0; margin: 0; }
.insights li { padding: 12px 0 12px 22px; border-bottom: 1px solid var(--line); position: relative; font-size: 15px; }
.insights li:last-child { border-bottom: 0; }
.insights li::before { content: ""; position: absolute; left: 0; top: 21px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.insights b { color: var(--gold); font-weight: 600; }
.scroll-x { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; font-size: 13px; font-family: var(--mono); }
table.data th, table.data td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.data th { color: var(--gold); font-weight: 600; position: sticky; top: 0; background: var(--bg-2); }
table.data td.num { text-align: right; }
.heat td { text-align: center !important; }
.type-tag { font-size: 10.5px; color: var(--muted); display: block; font-weight: 400; }
.empty-note { color: var(--muted); font-size: 14px; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.3fr; gap: 64px; padding-bottom: 100px; }
.form { display: grid; gap: 18px; }
.form .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: flex; flex-direction: column; gap: 7px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.form input, .form select, .form textarea {
  padding: 13px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); font-family: var(--sans); font-size: 15.5px;
}
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--gold); outline: none; }
.form-note { font-family: var(--mono); font-size: 13px; color: var(--teal); min-height: 1.4em; margin: 0; }
.contact-list { list-style: none; padding: 0; margin: 28px 0 0; border-top: 1px solid var(--line); }
.contact-list li { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; font-size: 15.5px; }
.contact-list span:first-child { color: var(--muted); font-family: var(--mono); font-size: 13px; }

/* ---------- Hover-effect helpers ---------- */
.ch { display: inline-block; white-space: pre; }
/* Smooth wave: the real letter stays in place (transparent) and the glyph is drawn on top,
   so widths never change and the text never jiggles. */
.wd { white-space: nowrap; }
.cx { position: relative; }
.cx.hid, .cx[data-g], .ch[data-g] { color: transparent; visibility: hidden; }  /* visibility also hides gradient-clipped text */
.cx[data-g]::after, .ch[data-g]::after { visibility: visible; }
.ch[data-g] { position: relative; }
.cx[data-g]::after, .ch[data-g]::after {
  content: attr(data-g); position: absolute; left: 0; right: 0; top: 0;
  text-align: center; color: var(--gold); font-family: var(--mono); font-weight: 400; font-style: normal;
}
.ch.g { color: var(--gold); }
.tw-caret { display: inline-block; margin-left: 1px; opacity: 0; }
.typing .tw-caret { opacity: 1; animation: blink .8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .section-head, .about, .svc-block, .contact, .lab-input, .grid-2, .grid-2b { grid-template-columns: 1fr; gap: 28px; }
  .services { grid-template-columns: 1fr; }
  .service, .service + .service { padding: 28px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr 1fr; }
  .build { grid-template-columns: 1fr; gap: 6px; }
  .case { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 760px) {
  .menu-btn { display: grid; }
  .wa-icon { display: grid; }
  .wa-item { display: none; }
  .nav-links {
    position: fixed; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 28px 20px;
    background: var(--bg); border-bottom: 1px solid var(--line); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 14px 0; font-size: 16px; }
  .wrap { padding: 0 20px; }
  .section { padding: 76px 0; }
  .steps { grid-template-columns: 1fr; }
  .two-col, .form .pair { grid-template-columns: 1fr; }
  .hero-copy { bottom: 32px; }
  .hero-hint { display: none; }
  .page-head { padding: 56px 0 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .page.active { animation: none; }
  .typing .tw-caret { animation: none; }
}

/* ---------- Data project showcase ---------- */
.showcase { margin: 0 0 56px; }
.show-head { max-width: 60ch; margin-bottom: 26px; }
.show-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 12px; }
.show-head p { color: var(--muted); margin: 0; }
.show-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.show-card {
  position: relative; border: 1px solid var(--line); border-radius: 16px; padding: 24px; min-width: 0;
  background: linear-gradient(160deg, color-mix(in srgb, var(--violet) 16%, var(--bg-2)), var(--bg-2) 55%);
  display: flex; flex-direction: column; gap: 10px; transition: transform .25s, border-color .25s, box-shadow .25s;
}
.show-card:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 18px 40px -22px color-mix(in srgb, var(--gold-2) 80%, transparent); }
.show-card .tag { font-family: var(--mono); font-size: 12px; color: var(--teal); }
.show-card h3 { font-size: 1.45rem; }
.show-card p { color: var(--muted); font-size: 15px; margin: 0; flex: 1; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 4px 0 8px; }
.chips li { font-family: var(--mono); font-size: 11.5px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); }
.show-card .btn { align-self: flex-start; }

/* ---------- Lead strip (inside results) ---------- */
.lead-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin: 0 0 20px; padding: 16px 20px; border-radius: 14px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--gold) 16%, transparent), color-mix(in srgb, var(--rose) 16%, transparent));
  border: 1px solid color-mix(in srgb, var(--gold-2) 45%, transparent);
}
.lead-strip p { margin: 0; }
.lead-strip b { color: var(--gold); }

/* ---------- Lead form ---------- */
.lead { display: grid; grid-template-columns: 1fr 1.35fr; gap: 48px; padding: 56px 0 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 20px); }
.lead-pitch h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 16px; }
.lead-pitch > p { color: var(--muted); }
.lead-list { list-style: none; padding: 0; margin: 22px 0; }
.lead-list li { padding: 10px 0 10px 30px; position: relative; border-bottom: 1px solid var(--line); }
.lead-list li::before { content: "✓"; position: absolute; left: 0; top: 9px; color: var(--teal); font-weight: 700; }
.lead-privacy { font-size: 13.5px; }
.lead-card { border: 1px solid var(--line); border-radius: 18px; padding: 26px; background: var(--bg-2); min-width: 0; }
.form .pair.three { grid-template-columns: 1fr 1fr 1fr; }
.chip-field { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-field legend { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-bottom: 8px; padding: 0; }
.chip-field label { display: inline-flex; flex-direction: row; cursor: pointer; }
.chip-field input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-field span {
  font-family: var(--sans); font-size: 14px; color: var(--ink); padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); transition: background .15s, border-color .15s;
}
.chip-field input:checked + span { background: color-mix(in srgb, var(--teal) 20%, transparent); border-color: var(--teal); }
.chip-field input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lead-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lead-alt { font-size: 14px; color: var(--muted); }
.lead-alt a { color: #25D366; font-weight: 700; }
.form .invalid { border-color: var(--danger) !important; }
.lead-done { text-align: center; padding: 30px 10px; }
.lead-done h3 { font-size: 1.8rem; margin-bottom: 10px; }
.lead-done p { color: var(--muted); margin: 0 0 18px; }
.lead-done .ref { font-family: var(--mono); color: var(--gold); }
button[disabled] { opacity: .6; cursor: progress; }

@media (max-width: 960px) {
  .show-grid { grid-template-columns: 1fr; }
  .lead { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 760px) {
  .form .pair.three { grid-template-columns: 1fr; }
  .lead-card { padding: 18px; }
}
