/* ============================================================
   LENDSCOPE — APP / COMPONENT STYLES
   Ported from Claude Design "LendScope" bundle (app.css).
   Prototype-only bits (proto-nav, tweaks-panel) stripped.
   Pair with tokens.css.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv02", "cv11";
}

body {
  font-size: 14px;
  line-height: 1.5;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.tnum { font-variant-numeric: tabular-nums; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- TYPOGRAPHY ---------- */
.eyebrow {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
}
.eyebrow.muted { color: var(--text-3); }

h1, h2, h3, h4 { color: var(--text-1); margin: 0; font-weight: 700; line-height: 1.15; }
.h-hero    { font-size: 48px; letter-spacing: -1px; line-height: 1.05; }
.h-page    { font-size: 32px; letter-spacing: -.4px; }
.h-section { font-size: 24px; letter-spacing: -.2px; }
.h-card    { font-size: 20px; letter-spacing: -.1px; }
.h-sub     { font-size: 18px; font-weight: 600; }

p { margin: 0; color: var(--text-2); }
.lede { font-size: 18px; line-height: 1.6; color: var(--text-2); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--btn-h);
  padding: 0 18px;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.1px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-1);
  cursor: pointer;
  transition: background var(--tx-med), border-color var(--tx-med), color var(--tx-med), transform var(--tx-med);
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary   { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-secondary { background: var(--surface); color: var(--text-1); border-color: var(--border-medium); }
.btn-secondary:hover { background: var(--muted); }
.btn-ghost     { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--muted); color: var(--text-1); }
.btn-dark      { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
.btn-dark:hover { opacity: .9; }
.btn-lg        { height: 48px; padding: 0 28px; font-size: 14px; border-radius: var(--r-md); }
.btn-sm        { height: 28px; padding: 0 10px; font-size: 11px; border-radius: var(--r-md); }
.btn-block     { width: 100%; }

/* ---------- INPUTS ---------- */
.field-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
  letter-spacing: -.1px;
}
.input, .select {
  width: 100%;
  height: var(--input-h);
  padding: 0 12px;
  border: 1px solid var(--border-medium);
  border-radius: var(--r-md);
  background: var(--surface);
  font-family: inherit;
  font-size: 13px;
  color: var(--text-1);
  outline: none;
  transition: border-color var(--tx-med), box-shadow var(--tx-med);
}
.input:focus, .select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 15%, transparent);
}
.input::placeholder { color: var(--text-3); }
.input.has-prefix { padding-left: 26px; }
.input-wrap { position: relative; }
.input-prefix {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--text-3);
  pointer-events: none;
}

/* Pill toggle */
.pill-toggle {
  display: flex;
  padding: 2px;
  background: var(--muted);
  border-radius: var(--r-md);
  gap: 0;
}
.pill-toggle button {
  flex: 1;
  height: 28px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--tx-med);
}
.pill-toggle button.active {
  background: var(--surface);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

/* ---------- BADGES ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -.1px;
  border: 1px solid transparent;
}
.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.badge.pass    { background: var(--pass-bg);  color: var(--pass-text); }
.badge.refer   { background: var(--refer-bg); color: var(--refer-text); }
.badge.fail    { background: var(--fail-bg);  color: var(--fail-text); }
.badge.neutral { background: var(--muted);    color: var(--text-2); }
.badge.no-dot::before { display: none; }

.tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.tag.var { background: var(--accent-light); color: var(--accent); }
.tag.io  { background: #FEF3C7; color: #B45309; }
.tag.fix { background: #EDE9FE; color: #7C3AED; }

/* ---------- CARDS ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-xl);
  padding: 28px;
}
.card-tight { padding: 16px; }

/* ---------- SECTIONS ---------- */
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
.section { padding: var(--sec-pad-y) 0; }

/* ---------- LOGO ---------- */
.lendscope-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
}
.lendscope-logo .mark { flex: none; }
.lendscope-logo .wordmark {
  font-family: var(--font-sans);
  font-size: 18px;
  letter-spacing: -.4px;
  white-space: nowrap;
}
.lendscope-logo .wordmark .light { font-weight: 400; }
.lendscope-logo .wordmark .bold  { font-weight: 700; }

.lendscope-logo.on-dark           { color: #fff; }
.lendscope-logo.on-dark .ls-arc   { stroke: #fff; }
.lendscope-logo.on-dark .ls-dot   { fill: var(--accent); }

/* ---------- UTILS ---------- */
.row  { display: flex; align-items: center; gap: 12px; }
.col  { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; }
.dot-sep::before { content: "·"; margin: 0 8px; color: var(--text-3); }

.divider {
  height: 1px;
  background: var(--border-light);
  width: 100%;
}

/* ---------- TABLE ---------- */
.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}
.tbl thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg);
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}
.tbl tbody tr {
  height: var(--row-h);
  border-bottom: 1px solid var(--border-light);
  transition: background var(--tx-fast);
}
.tbl tbody tr:hover { background: var(--muted); cursor: pointer; }
.tbl tbody td { padding: 8px 12px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }

/* ---------- AUTH CARD (login / signup) ---------- */
.auth-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 40px;
}
.auth-card {
  width: 460px;
  max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-xl);
  padding: 48px 40px;
}

/* Keyboard focus ring (marketing + auth pages). :focus-visible = keyboard
   only, so mouse/touch users see no change. Nav links, CTAs and buttons
   had no focus indicator at all. */
a:focus-visible, button:focus-visible, [role="button"]:focus-visible,
[tabindex]:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
