/* SB Akquise. One layout that adapts by itself: phone under 900px, desk above.
   Nothing has a fixed width, so every iPhone size fits without special cases. */

@font-face { font-family: "Montserrat"; src: url("/fonts/montserrat-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --ink: #14181D; --ink-2: #4B525C; --ink-3: #5E656F;
  --paper: #FFFFFF; --mist: #F3F5F6; --line: #E2E5E9; --line-2: #D5DAE0;
  --mint: #72DCA4; --mint-tint: #E6F8EE;
  --amber: #FFC86B; --amber-tint: #FFF1D6;
  --red: #8A2A22; --red-tint: #FBE7E5;
  --rail-ink: #C9CDD2; --rail-on: #262C33;
  --ground: var(--paper); --card: var(--mist);
  --sans: "Montserrat", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --pad: max(20px, env(safe-area-inset-left, 0px));
  --pad-r: max(20px, env(safe-area-inset-right, 0px));
  --tabs: 58px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 500 16px/1.45 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.boot { display: grid; place-items: center; min-height: 100%; }
.boot-text { font-weight: 800; letter-spacing: .02em; color: var(--ink-3); padding: 24px; text-align: center; }

/* ---------- shell ---------- */
.shell { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--paper); }
.stage { position: relative; flex: 1; min-height: 0; }
.pane { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; background: var(--ground); padding: 0 var(--pad-r) 32px var(--pad); padding-top: max(16px, env(safe-area-inset-top, 0px)); }
.pane > .wrap { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.pane.detail { z-index: 2; visibility: hidden; }
body.detail-open .pane.detail { visibility: visible; }
body.detail-open .pane.list { visibility: hidden; }

.rail { flex: none; order: 2; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); height: calc(var(--tabs) + env(safe-area-inset-bottom, 0px)); padding: 0 max(4px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(4px, env(safe-area-inset-left, 0px)); border-top: 1px solid var(--line); background: var(--paper); }
.rail-brand, .rail-foot { display: none; }
.rail a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; text-decoration: none; color: var(--ink-3); font-weight: 600; font-size: 11px; line-height: 1; }
.rail a[aria-current="page"] { color: var(--ink); }
.rail a[aria-current="page"] .ico { background: var(--mint); }
.rail .ico { display: grid; place-items: center; width: 52px; height: 28px; border-radius: 14px; }
.ico svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- type ---------- */
.lbl { font: 500 12px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.big { font-size: clamp(30px, 8.4vw, 38px); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; text-wrap: balance; }
.title { font-size: clamp(26px, 7.4vw, 32px); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; overflow-wrap: anywhere; }
.sub { color: var(--ink-2); font-size: 15px; }
.sub a { text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.head { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }

/* ---------- cards and rows ---------- */
.card { background: var(--card); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card h2 { font: 500 12px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.rows { display: flex; flex-direction: column; gap: 10px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 14px 16px; border-radius: 16px; background: var(--card); text-decoration: none; min-height: 64px; }
.row b { font-weight: 700; font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
.row .co { grid-column: 1; color: var(--ink-2); font-size: 14px; overflow-wrap: anywhere; }
.row .why { grid-column: 1 / -1; color: var(--ink-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .chip { grid-row: 1; grid-column: 2; }
.row[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
.row:active { background: var(--line); }
.in-card .row { background: var(--ground); padding: 12px 14px; min-height: 56px; border-radius: 12px; }

.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; font-weight: 600; font-size: 12px; line-height: 1; white-space: nowrap; background: var(--line); color: var(--ink); }
.chip.amber { background: var(--amber-tint); }
.chip.mint { background: var(--mint-tint); }
.chip.red { background: var(--red-tint); color: var(--red); }
.row .chip.grey, .card .chip.grey { background: var(--line); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.steps span { display: flex; flex-direction: column; gap: 6px; font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.steps span::before { content: ""; height: 6px; border-radius: 3px; background: var(--line-2); }
.steps .done::before { background: var(--ink); }
.steps .now::before { background: var(--mint); }
.steps .now { color: var(--ink); }

.kv { margin: 0; display: grid; grid-template-columns: minmax(84px, auto) minmax(0, 1fr); gap: 8px 16px; font-size: 15px; }
.kv dt { color: var(--ink-3); font: 500 12px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding-top: 1px; }
.kv dd { margin: 0; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.kv dd a { text-underline-offset: 3px; text-decoration-color: var(--line-2); }

.events { display: flex; flex-direction: column; gap: 12px; }
.ev { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 12px; font-size: 14px; line-height: 1.4; }
.ev::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); margin-top: 5px; }
.ev.soft::before { background: var(--line-2); }
.ev b { font-weight: 700; }
.ev .note { display: block; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.ev .when { display: block; color: var(--ink-3); font: 500 11px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; color: var(--ink-2); }

/* ---------- buttons and fields ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 18px; border: 0; border-radius: 14px; font-weight: 700; font-size: 16px; line-height: 1.2; text-decoration: none; text-align: center; background: var(--line); color: var(--ink); }
.btn.mint { background: var(--mint); }
.btn.ink { background: var(--ink); color: #fff; }
.btn.plain { background: transparent; min-height: 44px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn .num { font-weight: 600; font-variant-numeric: tabular-nums; }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.pair .btn { justify-content: space-between; }
.btn .num { white-space: nowrap; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-left: -6px; padding: 0 8px 0 2px; border: 0; background: none; font-weight: 600; font-size: 15px; color: var(--ink-2); text-decoration: none; }
.back .ico svg { width: 20px; height: 20px; }
.link-btn { border: 0; background: none; padding: 0; font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); min-height: 32px; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font: 500 12px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.input, .field input, .field textarea { width: 100%; min-height: 52px; padding: 12px 14px; border: 2px solid transparent; border-radius: 14px; background: var(--mist); font-size: 16px; font-weight: 500; -webkit-appearance: none; appearance: none; }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.field input:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--ink); background: var(--paper); }
.search { position: sticky; top: 0; z-index: 1; background: var(--ground); padding: 4px 0 8px; margin: -4px 0 -8px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.error { background: var(--red-tint); color: var(--red); border-radius: 12px; padding: 12px 14px; font-weight: 600; font-size: 15px; }
.hint { color: var(--ink-2); font-size: 14px; }
.empty { padding: 28px 8px; text-align: center; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; }
.empty b { color: var(--ink); font-size: 18px; font-weight: 800; }
.banner { background: var(--amber-tint); border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 600; }
.skel { height: 64px; border-radius: 16px; background: var(--card); opacity: .7; }

/* ---------- after the call ---------- */
.sheet { position: fixed; inset: 0; z-index: 10; background: var(--paper); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: max(12px, env(safe-area-inset-top, 0px)) var(--pad-r) max(24px, env(safe-area-inset-bottom, 0px)) var(--pad); }
.sheet-in { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 18px; border: 0; border-radius: 16px; background: var(--mist); text-align: left; }
.opt b { font-weight: 700; font-size: 17px; }
.opt i { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; font-style: normal; color: var(--ink-3); }
.opt.best { background: var(--mint); }
.opt.best i { color: var(--ink); }
.opt.good { background: var(--mint-tint); }
.opt.stop i { color: var(--red); }
.opt.never { background: var(--red-tint); }
.opt.never b, .opt.never i { color: var(--red); }
.will { counter-reset: n; display: flex; flex-direction: column; gap: 10px; padding: 0; margin: 0; list-style: none; }
.will li { counter-increment: n; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; font-size: 15px; line-height: 1.4; }
.will li::before { content: counter(n); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; font-size: 13px; }
.days { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.day { min-height: 52px; border: 2px solid transparent; border-radius: 14px; background: var(--mist); font-weight: 700; font-size: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px; }
.day small { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.day[aria-pressed="true"] { background: var(--ink); color: #fff; }
.day[aria-pressed="true"] small { color: var(--rail-ink); }
.saved { background: var(--mint-tint); border-radius: 20px; padding: 22px 20px; display: flex; flex-direction: column; gap: 8px; }
.saved .tick { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--mint); }
.saved .tick svg { display: block; width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabs) + env(safe-area-inset-bottom, 0px) + 16px); transform: translateX(-50%); z-index: 20; max-width: min(92vw, 440px); background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 18px; font-weight: 600; font-size: 15px; text-align: center; }

/* ---------- sign in ---------- */
.door { min-height: 100%; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top, 0px)) var(--pad-r) max(24px, env(safe-area-inset-bottom, 0px)) var(--pad); background: var(--paper); }
.door-in { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 22px; }
.brand { display: flex; flex-direction: column; gap: 4px; }
.brand b { font-weight: 800; font-size: 13px; letter-spacing: .14em; }
.brand span { color: var(--ink-3); font-size: 14px; }
.qr { align-self: center; padding: 12px; background: #fff; border-radius: 16px; border: 1px solid var(--line); }
.qr canvas { display: block; width: 176px; height: 176px; image-rendering: pixelated; }
.key { font: 500 15px/1.5 var(--mono); letter-spacing: .06em; background: var(--mist); border-radius: 12px; padding: 12px 14px; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.numbered { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.numbered > li { counter-increment: s; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
.numbered > li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; font-size: 14px; }
.numbered > li > div { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

/* ---------- desk ---------- */
@media (min-width: 900px) {
  .shell { flex-direction: row; }
  .rail { order: 0; width: 232px; height: auto; display: flex; flex-direction: column; gap: 2px; padding: 28px 16px; border: 0; background: var(--ink); color: #fff; }
  .rail-brand { display: flex; flex-direction: column; gap: 4px; padding: 0 14px 26px; }
  .rail-brand b { font-weight: 800; font-size: 13px; letter-spacing: .14em; }
  .rail-brand span { color: #A9B0B8; font-size: 13px; }
  .rail a { flex-direction: row; justify-content: flex-start; gap: 12px; height: 44px; padding: 0 14px; border-radius: 10px; font-size: 15px; color: var(--rail-ink); }
  .rail a[aria-current="page"] { background: var(--rail-on); color: #fff; }
  .rail a[aria-current="page"] .ico { background: none; color: var(--mint); }
  .rail .ico { width: 22px; height: 22px; border-radius: 0; }
  .rail-foot { display: block; margin-top: auto; padding: 14px; border-radius: 12px; background: #1E242A; font-size: 13px; line-height: 1.5; color: var(--rail-ink); overflow-wrap: anywhere; }
  .rail-foot b { display: block; color: #fff; font-weight: 700; }
  .stage { display: flex; }
  .pane { position: static; padding: 28px 28px 40px; }
  .pane.list { flex: 0 0 clamp(340px, 34vw, 440px); border-right: 1px solid var(--line); }
  .pane.detail { flex: 1; min-width: 0; visibility: visible; --ground: var(--mist); --card: var(--paper); padding: 28px clamp(28px, 4vw, 56px) 48px; }
  body.detail-open .pane.list { visibility: visible; }
  body.single .pane.list { display: none; }
  .pane.detail .back { display: none; }
  .big { font-size: 36px; }
  .title { font-size: 36px; }
  .sheet { background: rgba(20, 24, 29, .5); display: grid; place-items: start center; padding: 6vh 24px 24px; }
  .sheet-in { width: 100%; background: var(--paper); border-radius: 24px; padding: 28px; }
  .toast { bottom: 28px; }
  .door { background: var(--mist); }
  .door-in { background: var(--paper); border-radius: 24px; padding: 36px; max-width: 440px; }
}

@media (prefers-reduced-motion: no-preference) {
  .sheet-in { animation: rise .18s ease-out; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}
