/* TradeVow legal pages — shared styles
   Craft voice: calm, premium, restrained. Dark palette, General Sans,
   blue used only for links and one hairline accent. */

@import url("https://api.fontshare.com/v2/css?f[]=general-sans@400,500,600&display=swap");

:root {
  --bg:            #0E0F13;   /* app splash background */
  --surface:       #16181F;   /* raised content panel */
  --surface-edge:  #232631;   /* hairline borders */
  --ink:           #E7E9EE;   /* primary text */
  --ink-soft:      #AAB0BE;   /* secondary text */
  --ink-faint:     #6E7482;   /* captions, meta */
  --blue:          #4D8DFF;   /* interactive / links */
  --blue-quiet:    #6FA2FF;
  --radius:        14px;
  --measure:       46rem;     /* readable line length */
  --font: "General Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
          Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.72;
  letter-spacing: 0.002em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Header ---- */
.site-header {
  border-bottom: 1px solid var(--surface-edge);
  background: rgba(14, 15, 19, 0.82);
  backdrop-filter: saturate(140%) blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .bar {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: 1.02rem;
}
.wordmark .mark {
  display: inline-block;
  width: 22px;
  height: 22px;
  flex: none;
}
.wordmark .mark svg { display: block; width: 100%; height: 100%; }
.doc-switch { display: inline-flex; gap: 4px; font-size: 0.82rem; }
.doc-switch a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
}
.doc-switch a:hover { color: var(--ink); }
.doc-switch a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--surface-edge);
  background: var(--surface);
}

/* ---- Layout ---- */
main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 56px 24px 96px;
}

/* Document title block (the first h1 + effective/updated lines) */
.doc h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 20px;
}
.doc h1 + p { color: var(--ink-soft); margin-top: 0; }

.doc h2 {
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 52px 0 14px;
  padding-top: 26px;
  border-top: 1px solid var(--surface-edge);
}
.doc h3 {
  font-size: 1.03rem;
  font-weight: 600;
  color: var(--ink);
  margin: 30px 0 10px;
}

.doc p { margin: 0 0 16px; color: var(--ink); }
.doc a {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid rgba(77, 141, 255, 0.32);
  transition: color 120ms ease, border-color 120ms ease;
}
.doc a:hover { color: var(--blue-quiet); border-bottom-color: var(--blue-quiet); }

.doc strong { font-weight: 600; color: #F2F4F8; }

.doc ul { margin: 0 0 18px; padding-left: 0; list-style: none; }
.doc li {
  position: relative;
  padding-left: 22px;
  margin: 0 0 9px;
  color: var(--ink);
}
.doc li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  opacity: 0.7;
}

/* Inline code (e.g. the tradevow.app URL) */
.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: var(--surface);
  border: 1px solid var(--surface-edge);
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--ink);
}

/* Blockquote — used for the in-app Settings paths */
.doc blockquote {
  margin: 0 0 18px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--surface-edge);
  border-left: 2px solid var(--blue);
  border-radius: 10px;
  color: var(--ink);
}
.doc blockquote p { margin: 0; }

/* Horizontal rules in the source become section air; hide the literal line
   since h2 already carries a top border. */
.doc hr {
  border: 0;
  height: 0;
  margin: 0;
}

/* ---- Tables ---- */
.table-wrap {
  overflow-x: auto;
  margin: 0 0 20px;
  border: 1px solid var(--surface-edge);
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  min-width: 520px;
}
.doc thead th {
  text-align: left;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 13px 16px;
  border-bottom: 1px solid var(--surface-edge);
  white-space: nowrap;
}
.doc tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--surface-edge);
  vertical-align: top;
  color: var(--ink);
  line-height: 1.55;
}
.doc tbody tr:last-child td { border-bottom: 0; }
.doc table a { word-break: break-word; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--surface-edge);
  color: var(--ink-faint);
}
.site-footer .bar {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 28px 24px 44px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer .meta { color: var(--ink-faint); }

/* Closing italic disclaimer note */
.doc em:last-of-type { color: var(--ink-faint); }
.doc p em { color: var(--ink-faint); font-style: italic; }

/* ---- Accessibility / motion ---- */
a:focus-visible, .doc a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 3px;
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---- Small screens ---- */
@media (max-width: 560px) {
  body { font-size: 16px; }
  main { padding: 40px 18px 72px; }
  .site-header .bar { padding: 14px 18px; }
  .doc h2 { margin-top: 40px; }
}

/* ---- Print ---- */
@media print {
  :root { --bg: #fff; --ink: #111; --ink-soft: #333; --ink-faint: #555;
          --surface: #fff; --surface-edge: #ccc; --blue: #1a4fd6; }
  .site-header, .site-footer .doc-switch { position: static; }
  .site-header, .doc-switch { display: none; }
  body { background: #fff; color: #111; }
  .doc a { border-bottom: none; }
  main { max-width: 100%; }
}
