/* Legal pages. Same tokens as factor_portal_site/index.html so the terms a
   factor accepts look like the portal they accept them for, not like a
   different company's document. Standalone stylesheet rather than a shared
   one: these pages are served on every portal host and must not inherit a
   portal's layout. */
:root {
  --bg:#f0efe9; --accent:#F97316; --accent-deep:#c2610f; --ink:#1f2937;
  --ink-soft:#4b5563; --card:#ffffff; --line:#e5e2d9; --muted:#6b7280;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono: Consolas, 'SFMono-Regular', Menlo, monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-sans); font-size: 15px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-deep); }

.legal-top {
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: 14px 24px; display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.legal-top .mark { display: flex; align-items: center; text-decoration: none; }
.legal-top .mark img { display: block; height: 36px; width: auto; }
.legal-nav { display: flex; gap: 20px; }
.legal-nav a {
  font-size: 13.5px; font-weight: 700; color: var(--muted);
  text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent;
}
.legal-nav a.active { color: var(--ink); border-bottom-color: var(--accent); }
.legal-nav a:hover:not(.active) { color: var(--ink-soft); }

main.legal {
  max-width: 760px; margin: 0 auto; padding: 34px 24px 72px;
}
.eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 4px;
}
main.legal h1 {
  font-family: var(--font-serif); font-weight: 700; font-size: 30px;
  margin: 0 0 8px; letter-spacing: -0.01em;
}
main.legal h2 {
  font-family: var(--font-serif); font-weight: 700; font-size: 20px;
  margin: 36px 0 10px; padding-top: 18px; border-top: 1px solid var(--line);
}
main.legal h3 {
  font-size: 15px; font-weight: 700; margin: 22px 0 6px; color: var(--ink);
}
.dates { font-size: 13px; color: var(--ink-soft); margin: 0 0 26px; }
main.legal p { margin: 0 0 13px; }
main.legal ul { margin: 0 0 13px; padding-left: 22px; }
main.legal li { margin-bottom: 7px; }

/* The one thing a factor must not miss. */
.callout {
  background: #fff8ec; border: 1px solid var(--accent);
  border-left-width: 4px; border-radius: 4px; padding: 14px 16px;
  margin: 0 0 8px;
}
.callout p { margin: 0; font-size: 14.5px; }

/* Long all-caps blocks are the convention for warranty and liability
   limits; kept readable with letter-spacing and a slightly smaller size
   rather than shouting at full body size. */
.allcaps {
  font-size: 12.5px; letter-spacing: 0.015em; line-height: 1.6;
  color: var(--ink-soft);
}

.datatable {
  width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 13.5px;
  background: var(--card); border: 1px solid var(--line);
}
.datatable th, .datatable td {
  text-align: left; vertical-align: top; padding: 9px 11px;
  border-bottom: 1px solid var(--line);
}
.datatable th {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); font-weight: 400;
  background: #faf9f5;
}
.datatable tr:last-child td { border-bottom: none; }
code { font-family: var(--font-mono); font-size: 12.5px; }
.addr { font-size: 14px; line-height: 1.7; }

.legal-foot {
  border-top: 1px solid var(--line); background: var(--card);
  padding: 18px 24px; text-align: center;
}
.legal-foot p { margin: 0; font-size: 12.5px; color: var(--muted); }
.legal-foot a { margin-left: 4px; }

/* The data tables are the only thing that cannot reflow below ~380px. */
@media (max-width: 560px) {
  main.legal { padding: 24px 16px 56px; }
  main.legal h1 { font-size: 25px; }
  .datatable { display: block; overflow-x: auto; white-space: nowrap; }
  .datatable td, .datatable th { white-space: normal; min-width: 130px; }
}
