/* Hyperping Partners portal.
 * Two skins over one set of tokens:
 * - the partner app (dashboard, payouts, settings, admin) follows Radar's
 *   design system: dark by default, lemon accent, Helvetica Neue, serif page
 *   titles, pill buttons, radius-12 cards, dense tables;
 * - the public pages (.site: program, sign-in, join, terms) follow the
 *   hyperping.com landing: rails, Manrope headings over Inter, 4px buttons,
 *   radius-8 panels, with Radar's lemon as the accent.
 * Components use tokens only; html[data-theme] switches light and dark. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(./fonts/inter-variable.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 500; font-display: swap; src: url(./fonts/manrope-latin-ext-500.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 500; font-display: swap; src: url(./fonts/manrope-latin-500.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; }

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  color-scheme: dark;
  --bg: #050505; --surface: #0d0d0d; --surface-2: #161616;
  --border: #252525; --border-2: #363636; --border-hover: #525252;
  --line: #1c1d1f; --panel: rgba(255, 255, 255, 0.035);
  --text: #f2f2f2; --text-2: #aaa; --muted: #838383;
  --accent: #ccff00; --pos: #ccff00; --neg: #ff7967; --blue: #8daaff; --warn: #e0b15c;
  --action-bg: #ccff00; --action-hover: #dcff52; --action-text: #172000; --action-border: #ccff00;
  --invert-bg: #fafaf9; --invert-hover: #e4e4e2; --invert-text: #08090a;
  --accent-soft: rgba(204, 255, 0, 0.07); --accent-border: rgba(204, 255, 0, 0.16); --selected: #22271a;
  --pos-soft: rgba(204, 255, 0, 0.08); --neg-soft: rgba(255, 121, 103, 0.1);
  --blue-soft: rgba(141, 170, 255, 0.12); --warn-soft: rgba(224, 177, 92, 0.13);
  --danger-border: #4a2626; --danger-hover: #2a1818;
  --header-bg: rgba(5, 5, 5, 0.92); --overlay: rgba(0, 0, 0, 0.6);
  --toast-bg: #151515; --shadow: 0 20px 70px rgba(0, 0, 0, 0.45);
  --chart-bar: #333; --chart-bar-hot: #6e6e6e; --chart-grid: #232323;
  --font-app: "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-head: "Manrope", var(--font-body);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Skin knobs, overridden by .site */
  --font: var(--font-app);
  --r-btn: 999px; --r-card: 12px; --r-input: 8px; --r-tag: 6px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f8f4; --surface: #fff; --surface-2: #eef0e8;
  --border: #dde1d4; --border-2: #c9cfbe; --border-hover: #909c80;
  --line: #e6e8e0; --panel: rgba(8, 9, 10, 0.02);
  --text: #20251a; --text-2: #565e4d; --muted: #69715f;
  --accent: #526b00; --pos: #526b00; --neg: #c23f30; --blue: #3e65c2; --warn: #95620c;
  --action-border: #b5e000;
  --invert-bg: #08090a; --invert-hover: #2a2b2e; --invert-text: #fafaf9;
  --accent-soft: #e9efda; --accent-border: #cbd7ad; --selected: #e6edda;
  --pos-soft: #eaf0dc; --neg-soft: #fbeae6; --blue-soft: #e8eefb; --warn-soft: #f8efdc;
  --danger-border: #e5b9b1; --danger-hover: #fbeae6;
  --header-bg: rgba(247, 248, 244, 0.92); --overlay: rgba(24, 32, 12, 0.3);
  --toast-bg: #fff; --shadow: 0 20px 70px rgba(34, 47, 14, 0.14);
  --chart-bar: #d3d9c7; --chart-bar-hot: #8e9980; --chart-grid: #ced5c3;
}

/* ── Base ───────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body { font-family: var(--font); font-size: 13.5px; line-height: 1.45; -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: clip; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.2; }
p { margin: 0; }
code, .mono { font-family: var(--font-mono); font-size: 0.92em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
input, select, textarea { accent-color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.boot { padding: 96px 16px; text-align: center; color: var(--muted); }
#root { min-height: 100vh; display: flex; flex-direction: column; }
#root > main { flex: 1; }

/* ── App shell (Radar header) ───────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.top-inner { display: flex; align-items: center; gap: 20px; height: 60px; max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand svg { display: block; flex: none; }
.brand-name { font-size: 21px; font-weight: 500; letter-spacing: -.9px; }
.top .nav { display: flex; align-self: stretch; gap: 4px; margin-left: auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.top .nav::-webkit-scrollbar { display: none; }
.top .nav a { display: flex; align-items: center; padding: 0 10px; color: var(--text-2); border-bottom: 2px solid transparent; border-top: 2px solid transparent; font-size: 14px; font-weight: 500; white-space: nowrap; }
.top .nav a:hover { color: var(--text); text-decoration: none; }
.top .nav a.active { color: var(--accent); border-bottom-color: var(--accent); }
.top .nav a:focus-visible { outline-offset: -4px; }
.top-actions { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.top .nav + .top-actions { margin-left: 6px; padding-left: 16px; border-left: 1px solid var(--border); height: 24px; }

/* account menu */
.account { position: relative; }
.account-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 11px 0 3px;
  border: 1px solid var(--border-2); border-radius: 999px; background: transparent; color: var(--text); cursor: pointer;
  font-size: 13px; font-weight: 500; transition: background .15s, border-color .15s;
}
.account-btn:hover, .account.open .account-btn { background: var(--surface-2); border-color: var(--border-hover); }
.account-btn svg { color: var(--muted); transition: transform .15s; }
.account.open .account-btn svg { transform: rotate(180deg); }
.avatar { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); border: 1px solid var(--accent-border); color: var(--accent); font-size: 12px; font-weight: 600; }
.account-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; min-width: 244px; padding: 5px;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 12px; box-shadow: var(--shadow);
  animation: menu-in .12s ease-out;
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }
.menu-head { display: grid; gap: 1px; padding: 8px 10px 9px; }
.menu-head strong { font-weight: 600; font-size: 13px; }
.menu-head span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-sep { height: 1px; background: var(--border); margin: 4px -5px; }
.menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 10px; border: 0; border-radius: 8px;
  background: none; color: var(--text); font-size: 13px; text-align: left; cursor: pointer;
}
.menu-item svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); text-decoration: none; outline: none; }
.menu-item:hover svg, .menu-item:focus-visible svg { color: var(--text); }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; padding: 0; border: 1px solid var(--border-2); border-radius: 50%;
  background: transparent; color: var(--text-2); cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.theme-toggle:hover { background: var(--surface-2); border-color: var(--border-hover); color: var(--text); }
.theme-toggle:focus-visible { outline-offset: 4px; }
.theme-toggle svg { display: block; width: 18px; height: 18px; }

.page { width: 100%; max-width: 1240px; margin: 0 auto; padding: 18px 28px 80px; }
.page-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 18px; flex-wrap: wrap; }
.page-head > div:first-child { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; min-width: 0; }
.page-head h1 { font-family: var(--font-serif); font-size: 28px; font-weight: 400; letter-spacing: -.01em; }
.page-head p { color: var(--text-2); font-size: 13px; }
.page-head > :last-child:not(:first-child) { margin-left: auto; }

.app-footer { display: flex; gap: 18px; flex-wrap: wrap; max-width: 1240px; width: 100%; margin: 0 auto; padding: 20px 28px 32px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--border); }
.app-footer a { color: var(--text-2); }

/* ── Building blocks ────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); min-width: 0; }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 10px 20px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.card-head .hint { color: var(--muted); font-size: 12px; margin-top: 2px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--border); color: var(--text-2); font-size: 12.5px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-lg { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.muted { color: var(--text-2); }
.faint { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.divider { height: 1px; background: var(--border); margin: 4px 0; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 34px; padding: 7px 15px; border-radius: var(--r-btn);
  border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text);
  font-size: 13px; font-weight: 500; line-height: 18px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-hover); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--action-bg); border-color: var(--action-border); color: var(--action-text); font-weight: 600; }
.btn-primary:hover { background: var(--action-hover); border-color: var(--action-hover); }
.btn-danger { color: var(--neg); border-color: var(--danger-border); background: transparent; }
.btn-danger:hover { background: var(--danger-hover); border-color: var(--neg); }
.btn-ghost { background: none; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); border-color: transparent; }
.btn-sm { min-height: 28px; padding: 4px 11px; font-size: 12px; }
.btn-lg { min-height: 42px; padding: 10px 20px; font-size: 14px; }
.btn-icon { width: 34px; padding: 0; }
.btn .spin { width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.link-button:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 2px; }
.link-button:disabled { color: var(--muted); cursor: default; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12px; color: var(--text-2); font-weight: 500; }
.field .help { color: var(--muted); font-size: 12px; }
.field .help.ok { color: var(--pos); }
.field .error { color: var(--neg); font-size: 12px; }
.input, .select, .textarea {
  width: 100%; min-height: 36px; padding: 7px 11px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border-2); border-radius: var(--r-input); outline: none; font-size: 13px;
  transition: border-color .15s;
}
.textarea { min-height: 88px; resize: vertical; line-height: 1.45; }
.select { appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a8f84' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-hover); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); }
.input.invalid { border-color: var(--neg); }
.input-group { display: flex; align-items: stretch; min-width: 0; }
.input-group .prefix {
  display: flex; align-items: center; padding: 0 10px; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--border-2); border-right: 0;
  border-radius: var(--r-input) 0 0 var(--r-input); font-size: 12.5px; white-space: nowrap;
}
.input-group .input { border-radius: 0 var(--r-input) var(--r-input) 0; min-width: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { margin-top: 2px; width: 15px; height: 15px; flex: none; }
.radio-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.radio-card {
  position: relative; display: flex; flex-direction: column; gap: 2px; padding: 11px 13px; cursor: pointer;
  border: 1px solid var(--border-2); border-radius: var(--r-card); background: var(--surface);
  transition: border-color .15s, background .15s;
}
.radio-card:hover { border-color: var(--border-hover); }
.radio-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.radio-card:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card strong { font-weight: 600; }
.radio-card span { color: var(--muted); font-size: 12px; }

/* tags (Radar) */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: var(--r-tag); font-size: 11px; font-weight: 500; line-height: 16px; white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.chip.green { color: var(--pos); background: var(--pos-soft); }
.chip.blue { color: var(--blue); background: var(--blue-soft); }
.chip.orange { color: var(--warn); background: var(--warn-soft); }
.chip.red { color: var(--neg); background: var(--neg-soft); }
.chip.plain { color: var(--muted); background: transparent; border: 1px solid var(--border-2); padding: 1px 6px; }

/* banners: a plain row, the tone carried by a small dot */
.banner {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--r-card); background: var(--surface);
}
.banner-body { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.banner-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); align-self: center; }
.banner strong { font-weight: 600; font-size: 13px; }
.banner p { color: var(--text-2); font-size: 13px; }
.banner.info .banner-dot { background: var(--accent); }
.banner.warn .banner-dot { background: var(--warn); }
.banner.danger .banner-dot { background: var(--neg); } .banner.danger strong { color: var(--neg); }
.banner.success .banner-dot { background: var(--pos); }

/* tables (dense) */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 500; padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface); }
.table td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 12.5px; }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
.table .right, .table th.right { text-align: right; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--text-2); font-weight: 500; margin-bottom: 4px; }
.card > .empty { margin: 14px; border: 1px dashed var(--border-2); border-radius: var(--r-card); }
.card-pad > .empty { border: 1px dashed var(--border-2); border-radius: var(--r-card); }

/* KPI: a row of .kpi cards reads as one Radar strip */
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; min-width: 0; }
.kpi .label { font-size: 11.5px; color: var(--text-2); }
.kpi .value { font-size: 22px; font-weight: 500; letter-spacing: -.025em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi .sub { color: var(--muted); font-size: 11.5px; }
.grid-4:has(> .kpi), .grid-3:has(> .kpi) { gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.grid-4 > .kpi, .grid-3 > .kpi { border: 0; border-radius: 0; border-right: 1px solid var(--border); background: transparent; }
.grid-4 > .kpi:last-child, .grid-3 > .kpi:last-child { border-right: 0; }

/* segmented: Radar pill toggles */
.segmented { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--border-2); border-radius: 999px; background: var(--surface); }
.segmented button { border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 500; transition: color .15s, background .15s; }
.segmented button:hover { color: var(--text); }
.segmented button.active { color: var(--text); background: var(--accent-soft); border-color: var(--accent-border); }

.copy-field { display: flex; gap: 8px; align-items: stretch; min-width: 0; }
.copy-field .value {
  flex: 1; min-width: 0; display: flex; align-items: center; min-height: 36px; padding: 0 12px;
  background: var(--bg); border: 1px solid var(--border-2); border-radius: var(--r-input);
  font-family: var(--font-mono); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.copy-field .value { cursor: text; transition: border-color .2s, background .2s; }
.copy-field .btn { min-width: 92px; }
.copy-field .btn svg { width: 14px; height: 14px; flex: none; }
.copy-field.copied .value { border-color: var(--accent); }
.copy-field.copied .btn:not(.btn-primary) { color: var(--accent); border-color: var(--accent-border); background: var(--accent-soft); }

/* the referral link, front and centre */
.copy-field.primary .value { min-height: 44px; font-size: 14px; color: var(--text); border-color: var(--accent-border); background: var(--accent-soft); }
.copy-field.primary .btn-primary { min-height: 44px; padding: 0 20px; font-size: 13.5px; min-width: 120px; }

/* chart */
.chart { width: 100%; height: 180px; display: block; }
.chart .bar { fill: var(--chart-bar); transition: fill .12s; }
.chart .bar.hot { fill: var(--chart-bar-hot); }
.chart .dot-signup { fill: var(--blue); }
.chart .dot-customer { fill: var(--accent); }
.chart .axis { stroke: var(--chart-grid); }
.chart .guide line { stroke: var(--chart-grid); stroke-dasharray: 2 4; }
.chart .guide-label { fill: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.chart .hit { fill: transparent; }
.chart .hit.on { fill: var(--surface-2); }
.chart text { fill: var(--muted); font-size: 10px; font-family: var(--font); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--text-2); font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }
.legend .l-bar { background: var(--chart-bar-hot); }
.legend .l-signup { background: var(--blue); border-radius: 50%; }
.legend .l-customer { background: var(--accent); border-radius: 50%; }

.money-rows { display: flex; flex-direction: column; }
.money-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.money-row:last-child { border-bottom: 0; }
.money-row .k { color: var(--text-2); }
.money-row .v { font-weight: 500; font-variant-numeric: tabular-nums; }
.money-big { font-size: 30px; font-weight: 500; letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1.15; color: var(--accent); }
.money-big.neg { color: var(--neg); }

.dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; font-size: 12.5px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* settings: intro on the left, form on the right */
.settings { display: flex; flex-direction: column; gap: 0; max-width: 1040px; }
.settings > .stack { margin-bottom: 18px; }
.settings-row { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 40px; padding: 26px 0; border-top: 1px solid var(--border); }
.settings-row:first-of-type { border-top: 0; padding-top: 8px; }
.settings-intro h2 { font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.settings-intro p { color: var(--muted); font-size: 12.5px; margin-top: 4px; line-height: 1.5; }
@media (max-width: 900px) { .settings-row { grid-template-columns: 1fr; gap: 12px; } }

/* toasts, modal, in-page tabs */
.toast-host { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; background: var(--toast-bg); color: var(--text); border: 1px solid var(--border-2); padding: 9px 16px; border-radius: 999px; font-size: 13px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); animation: toast-in .2s ease-out; }
.toast.error { border-color: var(--neg); color: var(--neg); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

.modal-overlay { position: fixed; inset: 0; background: var(--overlay); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 64px 16px; overflow-y: auto; }
.modal { width: 100%; max-width: 540px; background: var(--surface); border: 1px solid var(--border-2); border-radius: 16px; box-shadow: var(--shadow); }
.modal-wide { max-width: 980px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 22px 12px; }
.modal-head h2 { font-size: 19px; letter-spacing: -.02em; }
.modal-body { padding: 4px 22px 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 22px 20px; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 10px 9px; color: var(--text-2); font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Public site skin (hyperping.com) ───────────────────────────────────── */
.site {
  --font: var(--font-body);
  --r-btn: 4px; --r-card: 8px; --r-input: 4px; --r-tag: 2px;
  --bg: #08090a; --surface: #0e0f11; --surface-2: #17181b;
  --border: #1e1f21; --border-2: #2c2d31; --line: #1e1f21;
  --text: #fafaf9; --text-2: rgba(250, 250, 249, 0.62); --muted: rgba(250, 250, 249, 0.46);
  font-family: var(--font); font-size: 14px; background: var(--bg); color: var(--text);
}
:root[data-theme="light"] .site {
  --bg: #ffffff; --surface: #fefdfb; --surface-2: #f6f5f2;
  --border: #ecebe8; --border-2: #dcdad5; --line: #ecebe8;
  --text: #08090a; --text-2: rgba(8, 9, 10, 0.72); --muted: rgba(8, 9, 10, 0.52);
}
.site h1, .site h2, .site h3 { font-family: var(--font-head); font-weight: 500; }
.site .btn { font-family: var(--font-body); font-weight: 500; }
.site .btn-lg { min-height: 42px; padding: 12px 16px; font-size: 14px; line-height: 16px; }
.site .btn svg { width: 16px; height: 16px; flex: none; }
.site .btn-primary svg { opacity: .55; transition: opacity .15s, transform .15s; }
.site .btn-primary:hover svg { opacity: 1; transform: translateX(2px); }
.site .btn-invert { background: var(--invert-bg); border-color: var(--invert-bg); color: var(--invert-text); }
.site .btn-invert:hover { background: var(--invert-hover); border-color: var(--invert-hover); }
.site .btn:not(.btn-primary):not(.btn-invert):not(.btn-ghost) { background: var(--bg); border-color: var(--border-2); }
.site .btn:not(.btn-primary):not(.btn-invert):not(.btn-ghost):hover { background: var(--surface-2); }

/* rails: every section sits between the same two vertical lines */
.rail { position: relative; width: calc(100% - 80px); max-width: 1080px; margin: 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.band { border-top: 1px solid var(--line); }

.site-top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.site-top-inner { display: flex; align-items: center; gap: 28px; height: 64px; width: calc(100% - 48px); max-width: 1160px; margin: 0 auto; }
.site-brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.site-brand:hover { text-decoration: none; }
.site-brand svg { display: block; height: 21px; width: auto; }
.site-brand .sep { width: 1px; height: 18px; background: var(--border-2); }
.site-brand .tag { font-family: var(--font-head); font-size: 15px; font-weight: 500; color: var(--text-2); letter-spacing: -.01em; }
.site-nav { display: flex; gap: 2px; }
.site-nav a, .site-nav button { background: none; border: 0; cursor: pointer; padding: 6px 10px; color: var(--text-2); font-size: 14px; font-weight: 500; border-radius: 4px; }
.site-nav a:hover, .site-nav button:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.site-top .spacer { flex: 1; }
.site-top .actions { display: flex; align-items: center; gap: 8px; }
.site-top .signin { color: var(--text-2); font-size: 14px; font-weight: 500; padding: 6px 8px; }
.site-top .signin:hover { color: var(--text); text-decoration: none; }
.site-top .theme-toggle { width: 36px; height: 36px; border-radius: 4px; border-color: var(--border-2); }
.site-top .theme-toggle svg { width: 16px; height: 16px; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 430px); gap: 40px; align-items: center; padding: 88px 48px 96px 56px; overflow: hidden; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border: 1px solid var(--border-2); border-radius: 2px; color: var(--text-2); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .02em; white-space: nowrap; }
.eyebrow .value { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 2px; background: var(--accent-soft); color: var(--accent); font-variant-numeric: tabular-nums; }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-border); }
.hero h1 { margin: 24px 0 22px; font-size: 58px; line-height: 1.06; letter-spacing: -.045em; text-wrap: balance; }
.hero h1 .accent, .accent-text { color: var(--accent); }
.hero .lead { max-width: 440px; color: var(--text-2); font-size: 15px; line-height: 24px; text-wrap: pretty; }
.hero .lead strong { color: var(--text); font-weight: 500; }
.hero .cta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 30px; }
.hero .note { margin-top: 13px; font-size: 12px; color: var(--muted); }

/* the pixel globe from hyperping.com, lemon pings on sage land */
.hero { position: relative; isolation: isolate; }
.hero-globe { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; contain: strict; --globe-land: #cdd6bb; --globe-ping: #ccff00; }
:root[data-theme="light"] .hero-globe { --globe-land: #6f7a63; --globe-ping: #6b8c00; }
.hero-copy { position: relative; }

/* hero scene: an illustrative partner dashboard */
.scene { position: relative; }
.scene-card { position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--border-2); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
.scene-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.scene-head b { color: var(--text); font-weight: 500; font-family: var(--font-head); font-size: 13px; }
.scene-head .dots { display: flex; gap: 5px; margin-right: 4px; }
.scene-head .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--border-2); }
.scene-body { padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.scene-link { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border: 1px solid var(--accent-border); background: var(--accent-soft); border-radius: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--text); }
.scene-link span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scene-link em { font-style: normal; font-family: var(--font-body); font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 3px; background: var(--action-bg); color: var(--action-text); }
.scene-kpis { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.scene-kpis div { padding: 9px 11px; border-right: 1px solid var(--border); }
.scene-kpis div:last-child { border-right: 0; }
.scene-kpis small { display: block; font-size: 10.5px; color: var(--muted); }
.scene-kpis strong { font-size: 17px; font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.scene-kpis .up { color: var(--accent); }
.scene-bars { display: flex; align-items: flex-end; gap: 4px; height: 64px; padding: 0 2px; border-bottom: 1px solid var(--border); }
.scene-bars i { flex: 1; border-radius: 2px 2px 0 0; background: var(--chart-bar); }
.scene-bars i.hit { background: var(--accent); }
.scene-rows { display: grid; }
.scene-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.scene-row:last-child { border-bottom: 0; }
.scene-row .nm { flex: 1; min-width: 0; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scene-row .amt { font-variant-numeric: tabular-nums; font-weight: 500; color: var(--accent); }
.scene-toast { position: absolute; z-index: 2; left: -28px; bottom: -22px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border-2); border-radius: 8px; box-shadow: var(--shadow); font-size: 12px; animation: float 6s ease-in-out infinite; }
.scene-toast .ic { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.scene-toast b { display: block; font-weight: 500; }
.scene-toast span { color: var(--muted); }
@keyframes float { 50% { transform: translateY(-6px); } }

/* facts strip */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fact { padding: 22px 24px 24px; border-right: 1px solid var(--line); }
.fact:last-child { border-right: 0; }
.fact .big { font-family: var(--font-head); font-size: 30px; font-weight: 500; letter-spacing: -.04em; line-height: 1.1; }
.fact .big .accent-text { font-size: inherit; }
.fact .what { margin-top: 6px; color: var(--text-2); font-size: 13px; line-height: 19px; }

/* sections */
.section { position: relative; padding: 72px 56px 80px; }
.section-ping { position: absolute; top: 80px; left: -0.5px; width: 20px; height: 20px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--bg); color: var(--accent); pointer-events: none; }
.section-ping::before, .section-ping::after { content: ""; position: absolute; border-radius: 50%; }
.section-ping::before { inset: 3px; border: 1px solid currentColor; opacity: .5; }
.section-ping::after { inset: 8px; background: currentColor; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.kicker { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.section h2 { font-size: 36px; line-height: 1.12; letter-spacing: -.04em; max-width: 620px; text-wrap: balance; }
.section h2 .dim { color: var(--muted); }
.section .sub { color: var(--text-2); font-size: 15px; line-height: 24px; max-width: 520px; margin-top: 14px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.step { padding: 26px 26px 28px; display: flex; flex-direction: column; gap: 10px; min-height: 210px; }
.step .n { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.step h3 { margin-top: auto; font-size: 18px; line-height: 26px; letter-spacing: -.025em; }
.step p { color: var(--text-2); font-size: 13px; line-height: 21px; min-height: 63px; }
.step code { font-size: 12px; padding: 1px 5px; border-radius: 3px; background: var(--surface-2); color: var(--text); }

/* calculator */
.calc { display: grid; grid-template-columns: 1.2fr 1fr; overflow: hidden; }
.calc .controls { padding: 28px; display: flex; flex-direction: column; gap: 22px; }
.calc .result { padding: 28px; border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 8px; background: var(--accent-soft); }
.calc .result .money-big { font-family: var(--font-head); font-size: 56px; letter-spacing: -.05em; line-height: 1; }
.calc .label { font-size: 13px; color: var(--text-2); }
.calc strong.num { font-family: var(--font-head); font-size: 20px; font-weight: 500; letter-spacing: -.03em; }
.calc input[type="range"] { width: 100%; margin: 10px 0 0; }
.calc .radio-card { background: var(--bg); }

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; }
.faq details { border-top: 1px solid var(--line); padding: 18px 2px; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font-family: var(--font-head); font-size: 16px; font-weight: 500; letter-spacing: -.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-family: var(--font-body); font-weight: 400; font-size: 18px; line-height: 1; transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-2); margin-top: 10px; font-size: 14px; line-height: 22px; max-width: 60ch; }

/* closing CTA */
.closing { padding: 80px 56px; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.closing h2 { font-size: 40px; letter-spacing: -.045em; line-height: 1.08; }
.closing p { color: var(--text-2); font-size: 15px; margin-top: 12px; }

/* site footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .rail { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; padding: 26px 56px 40px; color: var(--muted); font-size: 13px; }
.site-footer a { color: var(--text-2); }
.site-footer .grow { flex: 1; }

/* sign-in, join, terms inside the site skin */
.site-page { padding: 64px 24px 96px; }
.auth-card { max-width: 440px; margin: 0 auto; padding: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); }
.auth-card.wide { max-width: 580px; }
.auth-card h1 { font-size: 28px; letter-spacing: -.035em; margin-bottom: 8px; }
.auth-card > p { color: var(--text-2); margin-bottom: 22px; line-height: 21px; }
.auth-card .kicker { margin-bottom: 18px; }
.done-icon { width: 44px; height: 44px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border); }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.gsi { position: relative; height: 40px; }
.gsi-face {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid var(--border-2); border-radius: var(--r-btn); background: var(--bg); color: var(--text);
  font-size: 14px; font-weight: 500; transition: background .15s, border-color .15s;
}
.gsi-face .spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.gsi:hover .gsi-face { background: var(--surface-2); border-color: var(--border-hover); }
.gsi:focus-within .gsi-face { outline: 2px solid var(--accent); outline-offset: 3px; }
.gsi.loading .gsi-face { color: var(--muted); }
/* Google's button, invisible, stretched over ours to take the click. */
.gsi-hit { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: .0001; overflow: hidden; color-scheme: normal; }
.gsi-hit > div, .gsi-hit iframe { width: 100% !important; }
.gsi.busy .gsi-hit { pointer-events: none; }
.code-input { font-family: var(--font-mono); font-size: 26px; min-height: 56px; letter-spacing: .45em; text-indent: .45em; text-align: center; font-variant-numeric: tabular-nums; }
.code-input::placeholder { color: var(--border-2); }
.site .field > label, .site .label { color: var(--text); font-size: 13px; }
.site .input, .site .select, .site .textarea { min-height: 40px; padding: 9px 12px; font-size: 14px; background: var(--bg); }
.site .input-group .prefix { font-size: 13px; }
.site .banner.danger { border-color: var(--neg); background: var(--neg-soft); }

.terms { max-width: 720px; margin: 0 auto; }
.terms h1 { font-size: 40px; letter-spacing: -.045em; margin-bottom: 10px; }
.terms h2 { font-size: 19px; letter-spacing: -.02em; margin: 34px 0 10px; }
.terms p, .terms li { color: var(--text-2); font-size: 14.5px; line-height: 1.7; }
.terms ul { padding-left: 20px; margin: 8px 0; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding: 64px 32px 72px; gap: 56px; }
  .scene { max-width: 520px; }
  .section, .closing { padding-left: 32px; padding-right: 32px; }
  .site-footer .rail { padding-left: 32px; padding-right: 32px; }
  .faq-wrap { grid-template-columns: 1fr; gap: 24px; }
  .site-nav { display: none; }
}
@media (max-width: 900px) {
  .grid-4, .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 > .kpi:nth-child(2) { border-right: 0; }
  .grid-4 > .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .fact:nth-child(2) { border-right: 0; }
  .fact:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .grid-3, .steps { grid-template-columns: 1fr; }
  .grid-3 > .kpi { border-right: 0; border-bottom: 1px solid var(--border); }
  .grid-3 > .kpi:last-child { border-bottom: 0; }
  .step { min-height: 0; }
  .calc { grid-template-columns: 1fr; }
  .calc .result { border-left: 0; border-top: 1px solid var(--line); }
  .top-inner { flex-wrap: wrap; height: auto; gap: 0 12px; padding: 0 16px; }
  .top-inner > .brand { height: 56px; }
  .top .nav { order: 3; width: calc(100% + 32px); margin: 0 -16px; padding: 0 7px; border-top: 1px solid var(--border); }
  .top .nav a { padding: 11px 9px; }
  .top .nav + .top-actions { margin-left: auto; padding-left: 0; border-left: 0; }
}
@media (max-width: 640px) {
  .rail { width: calc(100% - 32px); }
  .site-top-inner { width: calc(100% - 32px); gap: 12px; }
  .site-brand .sep, .site-brand .tag { display: none; }
  .site-top .signin { display: none; }
  .hero { padding: 44px 20px 60px; }
  .hero h1 { font-size: 42px; }
  .scene-toast { left: -8px; }
  .section, .closing { padding: 52px 20px 56px; }
  .section-ping { top: 60px; }
  .section h2, .closing h2 { font-size: 30px; }
  .fact { padding: 18px 16px; }
  .fact .big { font-size: 24px; }
  .calc .controls, .calc .result { padding: 22px 18px; }
  .calc .result .money-big { font-size: 44px; }
  .site-footer .rail { padding: 22px 20px 32px; }
  .site-page { padding: 32px 16px 64px; }
  .auth-card { padding: 24px 20px; }
  .terms h1 { font-size: 32px; }
  .page { padding: 16px 16px 64px; }
  .page-head > :last-child:not(:first-child) { margin-left: 0; }
  .app-footer { padding: 18px 16px 28px; }
  .grid-2 { grid-template-columns: 1fr; }
  .radio-cards { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dd { margin-bottom: 8px; }
  .kpi .value { font-size: 19px; }
  .copy-field { flex-direction: column; }
  .copy-field .value { min-height: 40px; padding: 10px 12px; white-space: normal; overflow-wrap: anywhere; }
  .brand-name { font-size: 19px; }
}
@media (max-width: 420px) {
  .site-brand svg { height: 18px; }
  .site-top .actions .btn-invert { padding-left: 11px; padding-right: 11px; font-size: 13px; }
  .site-top .actions .btn-invert svg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.site { min-height: 100vh; display: flex; flex-direction: column; }
.site > main { flex: 1; }
