/* FitR partner pages — /partners and /partners/privacy.

   Same design system as the main site and the legal pages (round 3):
   near-black canvas, Plus Jakarta Sans 400/600/800, hairline rules,
   printed running heads, ledger rows, emerald links. Tokens mirror
   src/styles.css, the way public/legal/legal.css does — these are
   standalone static pages, so they cannot import the app's CSS. The one
   deliberate omission (--fg-45) is explained where it would have sat.

   The bans from src/styles.css apply here too: no capsule badges, no
   letterspaced-uppercase eyebrows, no icon chips, no dot indicators.
   The running head (hairline + label + index) is the only "eyebrow"
   this design has, and the ledger row is the only list ornament. */

:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --card: #121212;
  --fg: #f2f2f2;
  --fg-body: rgba(242, 242, 242, 0.84);
  --fg-64: rgba(242, 242, 242, 0.64);
  --fg-58: rgba(242, 242, 242, 0.58);  /* smallest AA-passing text — ≈6.3:1 on --bg */
  /* --fg-45 from src/styles.css is deliberately NOT mirrored here. It is
     marked there "decorative / aria-hidden only" because it resolves to
     ≈4.1:1 over this canvas, under the 4.5:1 AA floor, and it is used only
     inside the home page's decorative app mockups. Every word on these two
     pages is functional — labels, hints, placeholders, the unanswered state
     of a required select — so the dimmest text here stops at --fg-58. */
  --line: rgba(242, 242, 242, 0.09);
  --line-soft: rgba(242, 242, 242, 0.055);
  --line-strong: rgba(242, 242, 242, 0.14);
  --emerald: #10b77f;
  --emerald-hi: #3ee6ae;
  --emerald-ink: #04150e;
  --gold: #f6c12b;                     /* app 'warning' token — the one alert colour */
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --r-pill: 999px;
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--emerald-hi); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--emerald); color: var(--emerald-ink); }

/* ---------- Top bar — same anatomy as the legal pages' ---------- */

header.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--line-soft);
  padding: 14px clamp(20px, 4vw, 48px);
  margin: 0 calc(-1 * clamp(20px, 4vw, 48px));
}
header.top .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.03em;
}
header.top .brand img { height: 24px; width: auto; display: block; }
header.top a.back {
  margin-left: auto;
  color: var(--fg-64);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
header.top a.back:hover { color: var(--fg); text-decoration: none; }

.wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px) 96px;
}
/* The privacy notice reads like the legal pages: a narrower measure. */
.wrap.narrow { max-width: 780px; }

/* ---------- Running head + type ---------- */

.kicker {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin: 48px 0 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--fg-58);
}
.kicker .idx { color: var(--emerald); }

h1 {
  font-size: clamp(36px, 6.4vw, 58px);
  font-weight: 800;
  letter-spacing: -0.033em;
  line-height: 1.0;
  margin: 0 0 18px;
  max-width: 16ch;
}
h1 .accent { color: var(--emerald-hi); }

.lead {
  font-size: clamp(17px, 2vw, 19px);
  line-height: 1.55;
  color: var(--fg-64);
  max-width: 46ch;
  margin: 0 0 8px;
  text-wrap: pretty;
}
.updated { color: var(--fg-58); font-size: 14px; font-weight: 600; margin: 0 0 36px; }

p, li { color: var(--fg-body); }
p { margin: 0 0 14px; }
ul { margin: 0 0 16px; padding-left: 22px; }
li { margin: 0 0 8px; }
strong { color: var(--fg); font-weight: 700; }

/* ---------- The case — hairline rows, the site's 'loop' grain ---------- */

.case { margin: 44px 0 8px; border-top: 1px solid var(--line); }
.case-row {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: 4px 40px;
  border-bottom: 1px solid var(--line-soft);
  padding: 20px 0;
}
.case-row h2 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.012em;
  line-height: 1.3;
  margin: 0;
  color: var(--fg);
}
.case-row p {
  margin: 0;
  color: var(--fg-64);
  font-size: 15.5px;
  line-height: 1.6;
}
@media (max-width: 640px) {
  .case-row { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- The form ---------- */

.form-intro { margin: 0 0 6px; }
.form-note {
  color: var(--fg-58);
  font-size: 14.5px;
  font-weight: 600;
  margin: 0 0 30px;
  max-width: 52ch;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 40px;
}
.field { display: flex; flex-direction: column; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* Label a step brighter than the rest of the form furniture, so that
   "(optional)" can still sit a step BELOW it and read as the aside it is
   without either of them dropping under AA (7.4:1 and 6.3:1). */
.field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-64);
  margin-bottom: 6px;
}
/* "(optional)" is the ONLY thing separating a required field from an
   optional one, so it is read, not decoration: --fg-58, not dimmer. */
.field label .opt { color: var(--fg-58); font-weight: 600; }

/* The input IS the design: an oversized baseline rule, no boxes. */
.field input,
.field select,
.field textarea {
  font-family: var(--font);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--fg);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 9px 2px;
  width: 100%;
  transition: border-color 0.25s var(--ease-out);
}
.field textarea {
  min-height: 116px;
  resize: vertical;
  line-height: 1.6;
}
/* The message placeholder carries guidance the label does not ("what you
   would offer, how many locations you run"), so placeholders are content
   here too and hold the AA floor. */
.field input::placeholder,
.field textarea::placeholder { color: var(--fg-58); font-weight: 500; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-bottom-color: rgba(242, 242, 242, 0.26); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--emerald);
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 4px;
  border-radius: 3px;
}

/* Native select, restyled: a plain chevron drawn in the rule's own colour.
   (A chevron on a control that opens is affordance, not an icon chip.) */
.field select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23f2f2f2' stroke-opacity='0.58' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
}
/* The dropdown itself is drawn by the OS — force our canvas on its options
   so the list is not a white sheet on a near-black page. */
.field select option { background: #121212; color: var(--fg); }
/* Unanswered "Choose one" — the visible state of a REQUIRED field until it
   is answered, so it is dimmed to distinguish it, not to hide it. */
.field select:invalid { color: var(--fg-58); }

.field-hint {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-58);
  margin-top: 7px;
}

/* Honeypot. Off-screen rather than display:none — a bot that filters on
   `display:none` still sees this one, and no human ever reaches it
   (aria-hidden + tabindex="-1" in the markup). */
.hp {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.turnstile-slot { margin: 34px 0 0; min-height: 68px; }
.turnstile-note {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-58);
  border-left: 2px solid var(--gold);
  padding-left: 12px;
  margin: 0;
}

.actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  border-radius: var(--r-pill);
  padding: 14px 30px;
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--emerald);
  color: var(--emerald-ink);
  transition: background-color 0.3s var(--ease-out),
              box-shadow 0.45s var(--ease-out),
              transform 0.3s var(--spring),
              opacity 0.25s var(--ease-out);
}
.btn:hover { background: var(--emerald-hi); box-shadow: 0 0 42px rgba(16, 183, 127, 0.34); }
.btn:active { transform: scale(0.97); }
.btn[disabled] {
  opacity: 0.55;
  cursor: default;
  box-shadow: none;
  background: var(--emerald);
  transform: none;
}

.actions .privacy-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-64);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(242, 242, 242, 0.3);
}
.actions .privacy-link:hover { color: var(--fg); }

/* ---------- Status region (aria-live) ---------- */

.status { margin-top: 26px; }
.status:empty { margin-top: 0; }
.status-msg {
  border-left: 2px solid var(--line-strong);
  padding: 2px 0 2px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--fg-64);
  max-width: 56ch;
}
.status-msg.pending { border-left-color: var(--emerald); }
.status-msg.error { border-left-color: var(--gold); color: var(--fg-body); }
.status-msg a { font-weight: 700; }

/* ---------- Sent — the confirmation, as a ledger event ---------- */

.sent {
  border-top: 1px solid var(--line);
  margin-top: 44px;
  padding-top: 22px;
}
.sent h2 {
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 12px;
}
.sent p { color: var(--fg-64); max-width: 50ch; }
/* The resend/dedupe sentence — true, useful, and a step quieter than the
   confirmation it sits under. */
.sent .sent-note { font-size: 14px; color: var(--fg-58); margin-top: 14px; }
/* Names the ledger for what it is: a record of what this browser sent, not a
   readback of what is on file. */
.sent .ledger-caption {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-58);
  margin: 26px 0 0;
}
.sent .ledger { margin-top: 10px; border-top: 1px solid var(--line); }
.sent .ledger-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line-soft);
  padding: 13px 0;
  font-size: 15px;
}
.sent .ledger-row .l { color: var(--fg-58); font-weight: 600; }
.sent .ledger-row .v { font-weight: 800; text-align: right; word-break: break-word; }
@media (max-width: 520px) {
  .sent .ledger-row { flex-direction: column; gap: 2px; }
  .sent .ledger-row .v { text-align: left; }
}

/* ---------- Long-form document bits (the applicant privacy notice) ---------- */

.doc h2 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin: 44px 0 12px;
  scroll-margin-top: 84px;
}
.doc h3 { font-size: 16px; font-weight: 700; margin: 24px 0 8px; }

.toc { margin: 0 0 44px; }
.toc-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg-58);
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin: 0 0 6px;
}
.toc ol { list-style: none; counter-reset: toc; margin: 0; padding: 0; }
.toc li { counter-increment: toc; margin: 0; }
.toc li a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--fg-64);
  font-weight: 600;
  font-size: 15px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}
.toc li a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--emerald);
  font-size: 13px;
  font-weight: 700;
  min-width: 22px;
}
.toc li a:hover { color: var(--fg); text-decoration: none; }

.callout {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  margin: 20px 0;
}

footer.foot {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--fg-58);
  font-size: 14px;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn:active,
  .field input, .field select, .field textarea { transition: none; transform: none; }
}
