/* VibeStartup: the tokens and base components every page shares (docs/DESIGN.md). Instrument Sans for text, the
   serif italic only in the wordmark; one accent; square shapes, hairlines separate; what floats over the page
   (a menu, a dialog, a toast, a tooltip) is rounded and carries a shadow; a chip, a badge and a tag are pills. */
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; src: url("/fonts/InstrumentSans-italic-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; src: url("/fonts/InstrumentSans-italic-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; src: url("/fonts/InstrumentSans-normal-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; src: url("/fonts/InstrumentSans-normal-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/InstrumentSerif-italic-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans Fallback"; src: local("Arial"), local("Helvetica"), local("Liberation Sans"); size-adjust: 97%; ascent-override: 96%; descent-override: 25%; }

:root {
  --bg: #ffffff;
  --canvas: #f7f6f3;
  --surface: #ffffff;
  --surface-2: #f2f1ed;
  --ink: #17161a;
  --ink-2: #5f5c66;
  --ink-3: #8e8a93;
  --line: #e9e6e0;
  --line-2: #d9d5cd;
  --accent: #f0532f;
  --accent-ink: #ffffff;
  --accent-soft: #fff0eb;
  --accent-deep: #c93f1f;
  --cofounder: #5b57d9;
  --cofounder-soft: #eeedfd;
  --ok: #1f8a4c;
  --ok-soft: #e4f4ea;
  --warn: #b7791f;
  --warn-soft: #fbf1dc;
  --bad: #c8321f;
  --bad-soft: #fde6e2;
  --focus: #5b57d9;
  --sans: "Instrument Sans", "Instrument Sans Fallback", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r-float: 14px;
  --r-tip: 8px;
  --r-pill: 999px;
  --shadow-float: 0 1px 2px rgba(23, 22, 26, .06), 0 12px 32px rgba(23, 22, 26, .10);
  --shadow-modal: 0 24px 80px rgba(23, 22, 26, .28), 0 2px 8px rgba(23, 22, 26, .10);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f12;
    --canvas: #16161a;
    --surface: #1d1d22;
    --surface-2: #24242a;
    --ink: #f2f1ee;
    --ink-2: #a3a09b;
    --ink-3: #6f6c74;
    --line: #2a2a31;
    --line-2: #37363e;
    --accent: #ff6a47;
    --accent-ink: #17161a;
    --accent-soft: #3a1f17;
    --accent-deep: #ff8466;
    --cofounder: #8b87ff;
    --cofounder-soft: #26254a;
    --ok: #5dc389;
    --ok-soft: #173424;
    --warn: #e2b05a;
    --warn-soft: #3a2d14;
    --bad: #ff7a68;
    --bad-soft: #3d1b16;
    --focus: #8b87ff;
    --shadow-float: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .5);
    --shadow-modal: 0 24px 80px rgba(0, 0, 0, .7), 0 2px 8px rgba(0, 0, 0, .5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; text-wrap: balance; }
h1 { font-size: 32px; } h2 { font-size: 24px; } h3 { font-size: 18px; } h4 { font-size: 15px; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-deep); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg, video { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; box-shadow: var(--shadow-float); z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--ink-2); } .hint { color: var(--ink-3); font-size: 13px; }
.small { font-size: 13px; } .tabular { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 13px; }
.wrap { width: min(100% - 32px, 1120px); margin-inline: auto; }
/* align-content: a card stretched to its row's height keeps its lines at the top, on the same lines as its neighbours */
.stack { display: grid; gap: 12px; align-content: start; } .stack-lg { display: grid; gap: 24px; align-content: start; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.right { margin-left: auto; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid transparent; background: var(--surface-2); color: var(--ink); font-weight: 500; font-size: 14px; line-height: 1; white-space: nowrap; transition: background .16s var(--ease), transform .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease); }
.btn:hover { background: var(--line); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-deep); color: var(--accent-ink); }
.btn.quiet { background: var(--surface); border-color: var(--line-2); }
.btn.quiet:hover { background: var(--surface-2); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); color: var(--bad); }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn.lg { min-height: 48px; padding: 0 24px; font-size: 16px; }
.btn.full { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn.icon { width: 36px; min-height: 36px; padding: 0; background: transparent; }
.btn.icon:hover { background: var(--surface-2); }
.btn.icon svg { width: 18px; height: 18px; }
.btn .spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* fields */
.field { display: grid; gap: 6px; font-size: 14px; }
.field > span, .field > label { font-weight: 500; color: var(--ink); }
.field small { color: var(--ink-3); font-weight: 400; }
/* A password field and its show/hide button: the button sits inside the field's right edge. */
.pw { position: relative; display: block; }
.pw input { padding-right: 44px; }
.pw-toggle { position: absolute; top: 0; right: 0; bottom: 0; width: 40px; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink-3); cursor: pointer; }
.pw-toggle:hover { color: var(--ink); }
.pw-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: -4px; }
.pw-toggle .i-hide, .pw-toggle[aria-pressed="true"] .i-show { display: none; }
.pw-toggle[aria-pressed="true"] .i-hide { display: block; }
.input, .field input, .field select, .field textarea { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); transition: border-color .16s var(--ease), box-shadow .16s var(--ease); }
.field textarea { min-height: 88px; resize: vertical; line-height: 1.45; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
.input::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { margin-top: 3px; accent-color: var(--accent); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .16s var(--ease); flex: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .16s var(--ease); }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { outline: 2px solid var(--focus); outline-offset: 2px; }
.error { color: var(--bad); font-size: 13px; min-height: 1em; }

/* cards, chips, badges, tables */
.card { background: var(--surface); border: 1px solid var(--line); padding: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); padding: 20px; }
/* a chip (a choice or a suggestion), a badge (a state or a count) and a tag are pills; what acts or holds stays square */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--surface); font-size: 13px; color: var(--ink-2); cursor: pointer; transition: border-color .16s var(--ease), color .16s var(--ease); }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-pressed="true"], .chip.on { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-soft); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--r-pill); font-size: 12px; font-weight: 500; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.accent { background: var(--accent-soft); color: var(--accent-deep); }
.badge.cofounder { background: var(--cofounder-soft); color: var(--cofounder); }
/* on its way: the pill of a control that opens soon (lib/ui.js soon()), and the control that waits with it */
.badge.soon { background: var(--accent-soft); color: var(--accent-deep); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.btn.is-soon, .btn.is-soon[disabled] { opacity: 1; background: var(--surface-2); border-color: var(--line); color: var(--ink-2); cursor: default; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); border: 1px solid var(--line); }
.table th { text-align: left; font-weight: 500; color: var(--ink-2); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
/* A list is one surface; its rows run wall to wall, so a hovered or chosen row is a band from edge to edge. */
.list { display: grid; background: var(--surface); border: 1px solid var(--line); }
.list > * { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.list > *:last-child { border-bottom: 0; }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); font-weight: 600; font-size: 13px; flex: none; }
.avatar.cofounder { background: var(--cofounder-soft); color: var(--cofounder); box-shadow: 0 0 0 2px var(--cofounder); }
.avatar.lg { width: 44px; height: 44px; font-size: 16px; }
/* nothing here yet: what this place is for, and the one next step */
.empty { padding: 40px 20px; text-align: center; color: var(--ink-2); display: grid; gap: 10px; justify-items: center; background: var(--surface); border: 1px solid var(--line); }
.empty p { max-width: 52ch; }
.empty .btn { margin-top: 6px; }
.empty h3 { color: var(--ink); }
.kpi { display: grid; gap: 4px; align-content: start; padding: 16px; border: 1px solid var(--line); background: var(--surface); }
.kpi b { font-size: 24px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 13px; color: var(--ink-2); }
.kpi small { font-size: 12px; color: var(--ink-3); }
.note { padding: 12px 14px; background: var(--surface-2); font-size: 14px; color: var(--ink-2); box-shadow: inset 2px 0 0 var(--line-2); }
.note.accent { background: var(--accent-soft); color: var(--accent-deep); box-shadow: inset 2px 0 0 var(--accent); }
.note.warn { background: var(--warn-soft); color: var(--warn); box-shadow: inset 2px 0 0 var(--warn); }
.note.ok { background: var(--ok-soft); color: var(--ok); box-shadow: inset 2px 0 0 var(--ok); }
.illustrative { font-size: 12px; color: var(--ink-3); }
/* a view that waits: grey bars where its words will be (no blank pane, no jump when they arrive); a part of a page
   that waits: a spinner and a line */
.skeleton { display: grid; gap: 12px; align-content: start; }
.skeleton i { display: block; height: 14px; background: var(--surface-2); animation: pulse 1.4s ease-in-out infinite; }
.skeleton i.title { height: 22px; width: min(40%, 280px); margin-bottom: 8px; }
.skeleton i.short { width: 60%; }
.skeleton i.block { height: 96px; border: 1px solid var(--line); background: var(--surface); }
@keyframes pulse { 50% { opacity: .45; } }
.loading { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 24px 0; color: var(--ink-2); font-size: 14px; }
.loading .spin { width: 16px; height: 16px; border: 2px solid var(--line-2); border-right-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }

/* what floats: menus, dialogs, toasts, tooltips (the only rounded corners, the only shadows) */
.menu { position: absolute; z-index: 70; min-width: 200px; max-width: calc(100vw - 24px); padding: 6px 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-float); box-shadow: var(--shadow-float); display: grid; }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 8px 14px; border: 0; background: transparent; text-align: left; font-size: 14px; }
.menu button:hover, .menu a:hover { background: var(--surface-2); color: var(--ink); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
dialog.modal { border: 0; padding: 0; background: var(--surface); color: var(--ink); border-radius: var(--r-float); box-shadow: var(--shadow-modal); width: min(100% - 32px, 520px); max-height: calc(100vh - 48px); overflow: auto; }
dialog.modal::backdrop { background: rgba(23, 22, 26, .35); backdrop-filter: blur(2px); }
dialog.modal .modal-body { padding: 24px; display: grid; gap: 16px; }
dialog.modal .modal-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.scrim { position: fixed; inset: 0; z-index: 45; background: rgba(23, 22, 26, .35); }
.scrim[hidden] { display: none; }
.toasts { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(100% - 32px, 420px); pointer-events: none; }
.toast { padding: 10px 14px; border-radius: var(--r-tip); background: var(--ink); color: var(--bg); font-size: 14px; box-shadow: var(--shadow-float); pointer-events: auto; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }
/* first-run guides (lib/guides.js): a callout beside a real control. The layer takes no presses, so the page under it
   works as usual; the callout floats, so it is rounded and carries the float shadow; the ring around the control is square. */
.guide-layer { position: fixed; inset: 0; z-index: 65; pointer-events: none; }
.guide-ring { position: fixed; border: 2px solid var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); pointer-events: none; }
.guide { position: fixed; width: min(320px, calc(100vw - 32px)); padding: 16px 16px 12px; pointer-events: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-float); box-shadow: var(--shadow-float); font-size: 14px; line-height: 1.45; text-align: left; }
.guide-title { font-size: 16px; margin-bottom: 4px; }
.guide-text { color: var(--ink-2); }
.guide-foot { display: flex; align-items: center; gap: 6px; margin-top: 14px; }
.guide-dots { display: inline-flex; gap: 5px; }
.guide-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.guide-dots i.on { background: var(--accent); }
/* a phone, or a step with no control: a sheet at the foot of the screen, clear of the bottom bar; at the top when the control is low */
.guide.guide-sheet { left: 16px; right: 16px; width: auto; }
.guide.guide-sheet[data-side="bottom"] { bottom: calc(72px + env(safe-area-inset-bottom)); }
.guide.guide-sheet[data-side="top"] { top: 64px; }
@media (prefers-reduced-motion: no-preference) {
  .guide { animation: guide-in .16s var(--ease); }
  @keyframes guide-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}
kbd { font: 500 11px var(--sans); color: var(--ink-3); border: 1px solid var(--line-2); padding: 1px 5px; white-space: nowrap; }
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); padding: 4px 8px; border-radius: var(--r-tip); background: var(--ink); color: var(--bg); font-size: 12px; white-space: nowrap; z-index: 30; pointer-events: none; }

/* the shared header of the public pages */
.site-head { position: sticky; top: 0; z-index: 30; height: 64px; display: flex; align-items: center; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; }
.site-head.scrolled { border-bottom-color: var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; }
.site-head .brand img { height: 28px; width: auto; }
.site-head nav { display: flex; align-items: stretch; align-self: stretch; }
.site-head nav a { display: flex; align-items: center; padding: 0 14px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.site-head nav a:hover { background: var(--surface-2); color: var(--ink); }
.site-head .actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.site-foot { border-top: 1px solid var(--line); padding: 40px 0; color: var(--ink-2); font-size: 14px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; }
.site-foot a:hover { color: var(--ink); }

@media (max-width: 760px) {
  .site-head nav { display: none; }
  .wrap { width: calc(100% - 32px); }
  dialog.modal { width: calc(100% - 24px); }
  /* a finger needs 44 px */
  .btn, .btn.sm, .chip { min-height: 44px; }
  .btn.icon { width: 44px; min-height: 44px; }
  .input, .field input, .field select, .field textarea { min-height: 44px; font-size: 16px; }
  .menu button, .menu a { min-height: 44px; }
  .switch { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
