/* ==========================================================================
   TechRep Network — Base System
   Shared across every page. Page-only rules (hero-form-anchor, progress
   indicator, referral tiers, etc.) live in each page's own small <style>
   block and lean on the tokens/utilities defined here.
   ========================================================================== */

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--font-body);
  background: var(--surface-1);
  background-image:
    radial-gradient(1200px 600px at 15% -10%, rgba(59, 130, 246, 0.05), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(212, 161, 95, 0.035), transparent 55%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  opacity: 0;
}
body.is-ready { opacity: 1; transition: opacity var(--dur-slow) var(--ease-out); }

/* Whole-page film grain — a fixed overlay above all content (cards, forms,
   modals included) so every surface picks up the same faint texture rather
   than only the hero sections having depth. Barely-there by design: raise
   the opacity and it starts reading as noise instead of texture. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

::selection { background: var(--blue); color: #fff; }

a { color: inherit; }

/* ── Typography ── */
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 600; line-height: 1.15; }
h3 { font-size: 1.2rem; font-weight: 600; font-family: var(--font-body); }
p { color: var(--text-secondary); }
strong { color: var(--text); font-weight: 700; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: var(--space-4);
}
.eyebrow::before { content: ''; width: 20px; height: 1px; background: currentColor; opacity: 0.6; }
.eyebrow.eyebrow-green { color: var(--green); }
.eyebrow.eyebrow-gold { color: var(--gold); }

/* ── Utilities ── */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }
/* .section-alt fades back to plain --surface-1 by 60% of its own height, so
   an alt section followed by a plain section lands on the identical color
   with no visible seam between them. A hairline top border gives every
   section a deliberate boundary regardless of which background follows. */
.section { padding: var(--space-9) 0; border-top: 1px solid var(--border-subtle); }
.section-alt { background: linear-gradient(180deg, var(--surface-2), var(--surface-1) 60%); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-soft);
  color: var(--blue);
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}
.badge-green { background: var(--green-soft); color: var(--green); border-color: rgba(16, 185, 129, 0.28); }
.badge-blue { background: var(--blue-soft); color: var(--blue); border-color: rgba(59, 130, 246, 0.28); }
.badge-gold { background: var(--gold-soft); color: var(--gold); border-color: var(--border-gold); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
  border: none;
  position: relative;
}
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); transform: translateY(-2px); box-shadow: var(--glow-blue); }
.btn-secondary { background: var(--green); color: #05130E; }
.btn-secondary:hover { background: var(--green-hover); color: #fff; transform: translateY(-2px); box-shadow: var(--glow-green); }
.btn-gold { background: var(--gold); color: #241705; }
.btn-gold:hover { background: var(--gold-hover); transform: translateY(-2px); box-shadow: var(--glow-gold); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn-outline:hover { border-color: var(--text-secondary); background: rgba(255, 255, 255, 0.05); transform: translateY(-1px); }

.btn[disabled], .btn.is-loading { cursor: default; opacity: 0.7; transform: none !important; box-shadow: none !important; }
.btn.is-loading { color: transparent !important; }
.btn.is-loading::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: btn-spin 0.7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ── Nav ── */
/* :not(.footer-links) — the footer also uses <nav> tags for its link
   columns (semantically correct), so an unscoped `nav` selector here would
   leak the sticky site-header treatment (background, blur, border) onto
   every footer column too. */
nav:not(.footer-links) {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: rgba(6, 11, 20, 0.7);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 18px 0;
  transition: padding var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
nav.nav-scrolled {
  padding: 12px 0;
  background: rgba(6, 11, 20, 0.92);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }
.logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}
.logo-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold-glow); }
.nav-ctas { display: flex; gap: 10px; align-items: center; }
.nav-ctas .btn { padding: 10px 18px; font-size: 14px; }

/* ── Hero (asymmetric editorial split — not a centered stack) ── */
#hero {
  padding: 148px 0 var(--space-9);
  background:
    radial-gradient(ellipse 60% 50% at 100% -10%, rgba(59, 130, 246, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 40% 35% at 100% 30%, rgba(212, 161, 95, 0.08) 0%, transparent 55%),
    var(--surface-1);
  position: relative;
  overflow: hidden;
}
.hero-split { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: var(--space-9); align-items: center; position: relative; }
.hero-copy h1 { max-width: 640px; margin: 0 0 var(--space-5); text-align: left; text-wrap: balance; }
.hero-copy h1 span.accent { color: var(--blue); font-style: italic; }
.hero-copy h1 span.accent-green { color: var(--green); font-style: italic; }
.hero-copy p.hero-sub { font-size: 1.15rem; max-width: 460px; margin: 0 0 var(--space-6); color: var(--text-secondary); text-align: left; }
.hero-actions { display: flex; align-items: center; gap: var(--space-6); flex-wrap: wrap; }
.hero-link {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--border-strong);
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color var(--dur-fast) var(--ease-out), text-decoration-color var(--dur-fast) var(--ease-out), gap var(--dur-fast) var(--ease-out);
}
.hero-link:hover { color: var(--text); text-decoration-color: var(--text); gap: 10px; }
.hero-rail { border-top: 1px solid var(--border-subtle); }
.hero-rail-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: var(--space-4) 0; border-bottom: 1px solid var(--border-subtle);
}
.hero-rail-row .num { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; color: var(--text); }
.hero-rail-row .label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); text-align: right; }
.hero-margin-label {
  position: absolute; top: 50%; right: -64px; transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); opacity: 0.45;
  display: none; pointer-events: none;
  white-space: nowrap;
}
/* .hero-split sits inside .container (24px side padding), so the label needs
   to clear that padding plus its own ~20px width before it's safely past the
   stat rail's right-aligned text — only show once the viewport gutter
   outside the container is wide enough to fit it without collision. */
@media (min-width: 1440px) { .hero-margin-label { display: block; } }

/* ── Dual panel (shared-surface split with one hairline divider — used for the
     two-sided "rep vs. company" content and reused for the referral tier
     diptych; deliberately the site's one recurring "compare two things"
     device, not a generic card pattern) ── */
.dual-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}
.dual-panel::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--blue) 0 50%, var(--gold) 50% 100%);
}
.dual-panel-half {
  padding: var(--space-8) var(--space-7);
  display: flex; flex-direction: column;
  position: relative;
  isolation: isolate;
}
.dual-panel-half:last-child { border-left: 1px solid var(--border); }
.dual-panel-half::before {
  content: attr(data-index);
  position: absolute; top: var(--space-5); right: var(--space-6);
  font-family: var(--font-display); font-size: 5.5rem; font-weight: 600;
  color: var(--text); opacity: 0.05; line-height: 1; z-index: -1;
  pointer-events: none;
}
.dual-panel-half h2 { font-size: 1.5rem; margin: 0 0 var(--space-3); max-width: calc(100% - 70px); }
.dual-panel-half > p { margin-bottom: var(--space-5); }
.dual-panel-half ul { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: var(--space-6); flex: 1; }
.dual-panel-half ul li { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: var(--text-secondary); }
.dual-panel-half ul li::before {
  content: '';
  flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%;
  background: var(--blue-soft); border: 1px solid rgba(59, 130, 246, 0.4);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.2l2.8 2.8 6.2-6.4' stroke='%233B82F6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.dual-panel-half.is-company ul li::before {
  background-color: var(--gold-soft); border-color: var(--border-gold);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.2l2.8 2.8 6.2-6.4' stroke='%23D4A15F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.dual-panel-half .btn { align-self: flex-start; margin-top: auto; }

/* ── Roles directory (roster/table list — replaces a 3-card grid with one
     bordered container of hairline-divided rows, like a staffing roster) ── */
.roles-directory {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: var(--space-7);
  background: var(--surface-2);
}
.role-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--dur-base) var(--ease-out);
}
.role-row:last-child { border-bottom: none; }
.role-row:hover { background: rgba(255, 255, 255, 0.02); }
.role-row.is-reversed { grid-template-columns: auto 1fr 64px; }
.role-row.is-reversed .role-icon-col { order: 3; }
.role-row.is-reversed .role-tags-col { order: 1; justify-self: start; }
.role-icon-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.role-icon {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.role-icon-blue { background: var(--blue-soft); color: var(--blue); }
.role-icon-green { background: var(--green-soft); color: var(--green); }
.role-icon-purple { background: rgba(168, 85, 247, 0.12); color: #A855F7; }
.role-index { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); letter-spacing: 0.06em; }
.role-copy h3 { margin-bottom: 6px; }
.role-copy p { font-size: 14px; line-height: 1.65; margin: 0; max-width: 56ch; }
.role-tags-col { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 220px; }
.role-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
}

/* ── How it works ── */
.how-tabs {
  display: flex;
  gap: 4px;
  margin: 0 auto var(--space-7);
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  width: fit-content;
}
.how-tab {
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  border-radius: var(--radius-full);
  transition: color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out);
}
.how-tab.active { color: var(--surface-1); background: var(--text); }
.how-tab:hover:not(.active) { color: var(--text); }
.how-panel { display: none; }
.how-panel.active { display: block; }

/* ── Flow (arrow-connected process sequence — replaces isolated numbered
     circles in a grid with a threaded line + arrow connectors between steps;
     the one deliberately-repeated mechanism across pages per explicit brief).
     .flow-node and .flow-connector both use an explicit 40px height with
     flex centering so the arrow's vertical center lands exactly on the
     line/node center (top:20px below) instead of the two drifting apart. ── */
.flow { display: flex; align-items: flex-start; position: relative; }
/* .flow-step gets its own explicit stacking context (position + z-index) so
   .flow-node's z-index is guaranteed to compare directly against the line
   in .flow-track's context, rather than relying on .flow-step being an
   unpositioned box that CSS treats as z-index:auto either way. */
.flow-step { flex: 1; display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; position: relative; z-index: 3; }
.flow-node {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface-1);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 14px; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.how-panel.panel-company .flow-node { border-color: var(--border-gold); color: var(--gold); }
.flow-step h3 { font-size: 1.05rem; }
.flow-step p { font-size: 14px; max-width: 40ch; }
.flow-connector {
  flex: 0 0 44px;
  height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 17px;
  position: relative; z-index: 3;
}
.flow-connector i { background: var(--surface-1); padding: 0 6px; }
.flow-track { position: relative; }
.flow-track::before {
  content: '';
  position: absolute; top: 20px; left: 20px; right: 20px; height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--gold));
  transform-origin: left; transform: scaleX(0);
  transition: transform 900ms var(--ease-out);
  z-index: 1;
}
.flow-track.is-visible::before { transform: scaleX(1); }
.flow.flow-gold .flow-node { border-color: var(--border-gold); color: var(--gold); }
.flow.flow-zigzag .flow-step:nth-child(4n+3) { transform: translateY(20px); }
@media (max-width: 900px) {
  .flow { flex-direction: column; gap: var(--space-5); }
  .flow-connector { flex: 0 0 auto; height: auto; justify-content: flex-start; padding: 4px 0 4px 19px; align-self: flex-start; }
  /* rotate the icon itself, not .flow-connector — that element is also a
     .reveal-group child whose entrance transform (translateY) would
     otherwise collide with and silently overwrite a transform set here.
     No line on mobile, so drop the masking background too. */
  .flow-connector i { background: none; padding: 0; display: inline-block; transform: rotate(90deg); }
  .flow-track::before { display: none; }
  .flow.flow-zigzag .flow-step:nth-child(4n+3) { transform: none; }
}

/* ── Feature list (asymmetric featured item + hairline-divided list —
     replaces a uniform N-card grid; one item earns visual weight, the rest
     read as a compact list, not N identical boxes) ── */
.feature-list {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--space-7);
  margin-top: var(--space-7);
  align-items: start;
}
.feature-list-lead {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
}
.feature-list-lead .provide-icon { font-size: 30px; margin-bottom: var(--space-5); color: var(--gold); }
.feature-list-lead h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; font-style: italic; margin-bottom: var(--space-3); }
.feature-list-lead p { font-size: 15px; line-height: 1.7; }
.feature-list-rows { display: flex; flex-direction: column; }
.feature-row {
  display: grid; grid-template-columns: 32px 1fr; gap: var(--space-4);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.feature-row:first-child { padding-top: 0; }
.feature-row:last-child { border-bottom: none; }
.feature-row .provide-icon { font-size: 16px; color: var(--text-muted); }
.feature-row .row-index { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); display: block; margin-bottom: 4px; }
.feature-row h3 { font-size: 0.95rem; margin-bottom: 4px; }
.feature-row p { font-size: 13.5px; margin: 0; }

/* ── Forms ── */
.forms-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-7); align-items: start; }
.form-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  box-shadow: var(--shadow-sm);
}
.form-card h2 { font-size: 1.5rem; margin-bottom: 8px; }
.form-card > p { font-size: 14px; margin-bottom: var(--space-6); }
.form-divider { border: none; border-top: 1px solid var(--border); margin: var(--space-5) 0; }

form label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 7px; letter-spacing: 0.01em; }
form .field { margin-bottom: var(--space-4); }
form input, form select, form textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14.5px;
  padding: 12px 14px;
  outline: none;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
  font-family: var(--font-body);
}
form input::placeholder, form textarea::placeholder { color: var(--text-muted); }
form input:hover, form select:hover, form textarea:hover { border-color: var(--border-strong); }
form input:focus, form select:focus, form textarea:focus {
  border-color: var(--blue);
  background: rgba(59, 130, 246, 0.05);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
form select option { background: var(--surface-4); color: var(--text); }
form textarea { resize: vertical; min-height: 92px; }

.checkbox-group { display: flex; flex-direction: column; gap: 10px; }
.checkbox-item { display: flex; align-items: center; gap: 11px; cursor: pointer; padding: 2px 0; }
.checkbox-item input[type="checkbox"] {
  width: 18px; height: 18px; flex-shrink: 0;
  accent-color: var(--blue);
  cursor: pointer;
}
.checkbox-item span { font-size: 14px; color: var(--text-secondary); transition: color var(--dur-fast); }
.checkbox-item:hover span { color: var(--text); }
.form-note { font-size: 12px; color: var(--text-muted); margin-top: var(--space-3); text-align: center; }

/* ── Rep application: two-panel section + wide multi-column field grid
     (replaces the 520px single centered column) ── */
.rep-form-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--space-8);
  align-items: start;
  margin-top: var(--space-7);
}
.rep-form-context h2 { font-size: 1.6rem; margin-bottom: var(--space-4); }
.rep-form-context > p { margin-bottom: var(--space-6); }
.rep-form-next { border-top: 1px solid var(--border-subtle); }
.rep-form-next-row { display: flex; gap: var(--space-4); padding: var(--space-4) 0; border-bottom: 1px solid var(--border-subtle); }
.rep-form-next-row:last-child { border-bottom: none; }
.rep-form-next-row .idx { font-family: var(--font-mono); font-size: 12px; color: var(--blue); flex-shrink: 0; padding-top: 2px; }
.rep-form-next-row p { font-size: 13.5px; margin: 0; }
.field-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--space-4) var(--space-4); }
.field-grid .field { margin-bottom: 0; }
.field-grid .span-4 { grid-column: span 4; }
.field-grid .span-6 { grid-column: span 6; }
.field-grid .span-12 { grid-column: span 12; }
@media (max-width: 900px) {
  .rep-form-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .field-grid .span-4, .field-grid .span-6 { grid-column: span 12; }
}

/* ── Inline typographic stats (no boxes — numerals folded into copy) ── */
.stat-inline { font-family: var(--font-display); font-weight: 600; font-style: italic; }
.stat-inline.is-blue { color: var(--blue); }
.stat-inline.is-gold { color: var(--gold); }

/* ── Stat diptych (two oversized numerals split by one hairline — used once,
     for the referral hero) ── */
.stat-diptych { display: flex; gap: var(--space-7); }
.stat-diptych-item { flex: 1; padding-left: var(--space-6); border-left: 1px solid var(--border); text-align: left; }
.stat-diptych-item:first-child { padding-left: 0; border-left: none; }
.stat-diptych-num { display: block; font-family: var(--font-display); font-size: clamp(2.6rem, 7vw, 4.2rem); font-weight: 600; line-height: 1; color: var(--blue); }
.stat-diptych-item.is-gold .stat-diptych-num { color: var(--gold); }
.stat-diptych-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-top: var(--space-3); display: block; }

.form-success { display: none; text-align: center; padding: var(--space-7) 0; }
.form-success .success-icon { font-size: 44px; margin-bottom: var(--space-4); color: var(--green); }
.form-success h3 { font-size: 1.3rem; margin-bottom: 8px; font-family: var(--font-display); }
.form-success p { font-size: 14px; }
.field-group { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }

/* ── Success confirmation (full page) ── */
.success-wrap { text-align: center; padding: 8px 0; }
.success-wrap .success-icon { margin-bottom: var(--space-4); color: var(--green); font-size: 40px; }
.success-wrap h2 { font-size: 1.7rem; margin-bottom: 12px; }
.success-wrap > p { font-size: 14px; margin-bottom: var(--space-6); }
.success-steps { display: flex; flex-direction: column; gap: var(--space-4); text-align: left; margin-bottom: var(--space-6); }
.success-step { display: flex; align-items: flex-start; gap: 14px; }
.success-step-num {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--blue-soft); border: 1px solid rgba(59, 130, 246, 0.3); color: var(--blue);
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
}
.success-step p { font-size: 14px; margin: 0; padding-top: 6px; }

/* ── FAQ (two-column document layout — sticky intro rail + one continuous
     ruled list, replacing a centered stack of individually-bordered
     accordion boxes) ── */
.faq-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-8);
  align-items: start;
  margin-top: var(--space-6);
}
.faq-intro { position: sticky; top: 110px; }
.faq-intro h2 { margin-bottom: var(--space-3); }
.faq-intro p { font-size: 14.5px; }
.faq-list { margin: 0; }
.faq-item {
  border: none;
  border-top: 1px solid var(--border);
  margin-bottom: 0;
  overflow: hidden;
  background: transparent;
  transition: border-color var(--dur-base) var(--ease-out);
}
.faq-list .faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%; text-align: left;
  padding: var(--space-5) 0;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: color var(--dur-fast) var(--ease-out);
}
.faq-question:hover { color: var(--blue); }
.faq-chevron { position: relative; flex-shrink: 0; width: 18px; height: 18px; color: var(--blue); font-family: var(--font-mono); }
.faq-chevron::before, .faq-chevron::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 10px; height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform var(--dur-base) var(--ease-out);
}
.faq-chevron::before { transform: translate(-50%, -50%) rotate(0deg); }
.faq-chevron::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item.open .faq-chevron::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-slow) var(--ease-in-out), padding var(--dur-base);
  padding: 0;
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.75;
}
.faq-item.open .faq-answer { max-height: 320px; padding: 0 0 var(--space-5); }
@media (max-width: 900px) {
  .faq-layout { grid-template-columns: 1fr; }
  .faq-intro { position: static; }
}

/* ── Footer ── */
footer { background: var(--surface-0); border-top: 1px solid var(--border-subtle); padding: var(--space-7) 0 var(--space-5); }
footer * { background: transparent; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-7); flex-wrap: wrap; margin-bottom: var(--space-6); }
.footer-brand { max-width: 300px; }
.footer-brand .logo { margin-bottom: var(--space-3); }
.footer-brand p { font-size: 13px; line-height: 1.65; }
.footer-links h4 { font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: var(--space-4); }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-links a { font-size: 14px; color: var(--text-secondary); text-decoration: none; transition: color var(--dur-fast); }
.footer-links a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid var(--border-subtle); padding-top: var(--space-5); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: 12.5px; color: var(--text-muted); }

/* ── Section headers ── */
.section-header { text-align: center; margin-bottom: var(--space-4); }
.section-header h2 { margin-bottom: var(--space-3); }
.section-header p { max-width: 560px; margin: 0 auto; font-size: 1.05rem; }

/* ── Trust bar ── */
.trust-bar { background: var(--surface-2); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); padding: var(--space-4) 0; }
.trust-items { display: flex; align-items: center; justify-content: center; gap: var(--space-7); flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.trust-item .ti-icon { font-size: 15px; color: var(--gold); }

/* ── Legal pages ── */
.legal-hero {
  background: radial-gradient(ellipse 70% 60% at 50% -10%, rgba(59, 130, 246, 0.12), transparent 65%), var(--surface-1);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-8) 0 var(--space-6);
  text-align: center;
}
.legal-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 10px; }
.legal-hero p { color: var(--text-muted); font-size: 1rem; }
.legal-content { max-width: 760px; margin: 0 auto; padding: var(--space-8) 24px var(--space-9); }
.legal-content h2 { font-size: 1.3rem; margin: var(--space-6) 0 12px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { color: var(--text-muted); line-height: 1.85; margin-bottom: var(--space-4); font-size: 0.96rem; }
.legal-content ul { margin: 0 0 var(--space-4) 24px; color: var(--text-muted); line-height: 1.85; font-size: 0.96rem; }
.legal-content a { color: var(--blue); }
.legal-content a:hover { text-decoration: underline; }

/* ── Careers pages ── */
.resources-hero {
  padding: var(--space-8) 0 var(--space-6);
  text-align: center;
  background: radial-gradient(ellipse 70% 60% at 50% -10%, rgba(59, 130, 246, 0.12), transparent 65%), var(--surface-1);
  border-bottom: 1px solid var(--border-subtle);
}
.resources-hero h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0 0 12px; }
.resources-hero p { font-size: 17px; color: var(--text-muted); max-width: 560px; margin: 0 auto; }
.resources-list { padding: var(--space-8) 0; }

.resource-card-badge { display: inline-block; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); background: var(--blue-soft); border-radius: var(--radius-full); padding: 4px 12px; width: fit-content; }

/* Job roster (reuses the .roles-directory container language — a list of
   open roles reads naturally as a roster, not a grid of feature cards) */
.job-roster { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2); }
.job-row { display: grid; grid-template-columns: 1fr auto; gap: var(--space-5); align-items: center; padding: var(--space-6); border-bottom: 1px solid var(--border-subtle); transition: background-color var(--dur-base) var(--ease-out); }
.job-row:last-child { border-bottom: none; }
.job-row:hover { background: rgba(255, 255, 255, 0.02); }
.job-row .resource-card-badge { margin-bottom: var(--space-3); }
.job-row h3 { font-size: 19px; margin: 0 0 6px; font-family: var(--font-display); font-weight: 600; }
.job-row p { font-size: 14.5px; margin: 0 0 var(--space-3); line-height: 1.6; max-width: 56ch; }
.job-row-meta { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-muted); }
.job-row-meta span { display: flex; align-items: center; gap: 4px; }
.job-row-actions { display: flex; align-items: center; gap: var(--space-4); flex-shrink: 0; }
.resource-card-link { font-size: 14px; font-weight: 600; color: var(--gold); text-decoration: none; white-space: nowrap; }
.resource-card-link:hover { text-decoration: underline; }
@media (max-width: 700px) {
  .job-row { grid-template-columns: 1fr; }
  .job-row-actions { justify-content: space-between; }
}
.resource-detail { padding: var(--space-8) 0 var(--space-9); }
.resource-detail-inner { display: grid; grid-template-columns: 1fr; gap: var(--space-8); align-items: start; }
.resource-detail-copy h1 { font-size: clamp(1.9rem, 3.6vw, 2.4rem); margin: var(--space-4) 0 var(--space-5); line-height: 1.2; }
.resource-detail-copy .tagline { font-size: 18px; color: var(--text-muted); margin: 0 0 var(--space-5); line-height: 1.6; }
.resource-detail-copy .long-desc { font-size: 16px; color: var(--text-muted); line-height: 1.75; margin-bottom: var(--space-6); }
.what-inside { background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-6); margin-bottom: var(--space-5); }
.what-inside h4 { font-family: var(--font-mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); margin: 0 0 var(--space-4); }
.what-inside ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.what-inside ul li { font-size: 15px; color: var(--text); padding-left: 24px; position: relative; }
.what-inside ul li::before {
  content: '';
  position: absolute; left: 0; top: 4px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--green-soft);
  border: 1px solid rgba(16, 185, 129, 0.4);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.2l2.8 2.8 6.2-6.4' stroke='%2310B981' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
.resource-meta-row { display: flex; gap: var(--space-5); font-size: 14px; color: var(--text-muted); flex-wrap: wrap; }
.form-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: var(--space-4); }
.form-field label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.form-field input, .form-field textarea { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14.5px; font-family: var(--font-body); color: var(--text); background: rgba(255, 255, 255, 0.035); transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }

/* ── Apply modal (careers.php) ── */
.apply-modal { display: none; position: fixed; inset: 0; background: rgba(4, 8, 14, 0.72); backdrop-filter: blur(4px); z-index: var(--z-modal); overflow-y: auto; opacity: 0; transition: opacity var(--dur-base) var(--ease-out); }
.apply-modal.is-open { display: block; opacity: 1; }
.apply-modal-panel { max-width: 560px; margin: 60px auto 40px; padding: 0 16px; }
.apply-modal-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}
.apply-modal.is-open .apply-modal-card { transform: translateY(0) scale(1); opacity: 1; }
.apply-modal-close {
  position: absolute; top: 16px; right: 18px;
  background: none; border: none; font-size: 24px; cursor: pointer;
  color: var(--text-muted); line-height: 1; width: 32px; height: 32px; border-radius: 50%;
  transition: background-color var(--dur-fast), color var(--dur-fast);
}
.apply-modal-close:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.apply-modal-title { margin: 0 0 4px; font-size: 1.3rem; }
.apply-modal-sub { margin: 0 0 var(--space-6); color: var(--text-muted); font-size: 14px; }

/* ── Straightline Partners embed ── */
#partners-container, #partner-avatars {
  --sl-partner-card-bg: var(--surface-2);
  --sl-partner-card-border: var(--border);
  --sl-partner-card-border-hover: var(--gold);
  --sl-partner-card-shadow-hover: var(--glow-gold);
  --sl-partner-name-color: var(--text);
  --sl-partner-desc-color: var(--text-muted);
  --sl-partner-link-color: var(--gold);
  --sl-partner-avatar-bg: var(--surface-4);
  --sl-partner-avatar-border: var(--border);
  --sl-partner-avatar-shadow: var(--shadow-sm);
}

/* The partners embed (usestraightline.com/static/js/embed/partners.js)
   renders its own markup — .sl-partners-grid/.sl-partner-card etc. — which
   only partially reads the CSS custom properties above. Override the
   classes directly so a directory of many logos (a genuinely grid-shaped
   piece of content) still carries the site's typography, radius, and
   motion language instead of the embed's generic default card look. */
#partners-container .sl-partners-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
#partners-container .sl-partner-card {
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  padding: var(--space-6) !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
#partners-container .sl-partner-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold) !important;
  box-shadow: var(--glow-gold);
}
#partners-container .sl-partner-logo-box {
  background: var(--surface-4) !important;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md) !important;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
#partners-container .sl-partner-logo-box img { max-height: 100%; max-width: 100%; object-fit: contain; }
#partners-container .sl-partner-name {
  font-family: var(--font-display) !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  margin: var(--space-2) 0 0 !important;
}
#partners-container .sl-partner-desc {
  font-size: 14px !important;
  line-height: 1.65 !important;
  color: var(--text-muted) !important;
  margin: 0 !important;
  flex: 1;
}
#partners-container .sl-partner-link {
  font-family: var(--font-mono) !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em;
  color: var(--gold) !important;
  text-decoration: none !important;
  margin-top: var(--space-2);
  transition: gap var(--dur-fast) var(--ease-out);
}
#partners-container .sl-partner-link:hover { text-decoration: underline !important; }
@media (max-width: 900px) { #partners-container .sl-partners-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { #partners-container .sl-partners-grid { grid-template-columns: 1fr; } }

/* ── Motion / reveal utilities ── */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-group > * { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); transition-delay: calc(var(--i, 0) * 60ms); }
.reveal-group.is-visible > * { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-group > * { opacity: 1; transform: none; transition: none; }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; gap: var(--space-6); }
  .hero-rail { display: none; }
  .dual-panel { grid-template-columns: 1fr; }
  .dual-panel-half:last-child { border-left: none; border-top: 1px solid var(--border); }
  .role-row { grid-template-columns: 48px 1fr; }
  .role-tags-col { grid-column: 1 / -1; justify-content: flex-start; max-width: none; padding-left: 0; margin-top: 4px; }
  .role-row.is-reversed { grid-template-columns: 48px 1fr; }
  .role-row.is-reversed .role-icon-col { order: 0; }
  .role-row.is-reversed .role-tags-col { order: 0; justify-self: start; }
  .feature-list { grid-template-columns: 1fr; }
  .forms-wrap { grid-template-columns: 1fr; }
  .resources-list-grid { grid-template-columns: 1fr; }
  .stat-diptych { flex-direction: column; gap: var(--space-5); }
  .stat-diptych-item { border-left: none; padding-left: 0; border-top: 1px solid var(--border); padding-top: var(--space-5); }
  .stat-diptych-item:first-child { border-top: none; padding-top: 0; }
}
@media (max-width: 600px) {
  .nav-ctas .btn:first-child { display: none; }
  .dual-panel-half { padding: var(--space-6) var(--space-5); }
  .form-card { padding: var(--space-6) var(--space-5); }
  .field-group { grid-template-columns: 1fr; }
  .how-tabs { width: 100%; }
  .how-tab { padding: 9px 14px; font-size: 13px; flex: 1; }
  .section { padding: var(--space-7) 0; }
  .resources-hero h1 { font-size: 30px; }
}
