/* Tradr web tokens — mirror Sources/DesignSystem/Theme.swift.
   Light paper / dark ground. prefers-color-scheme only; no JS toggle.
   Brass = agent judgement. Teal = market fact. Clay = rails. Ink = model. */

:root {
  --ground: #F7F5F0;
  --card: #ffffff;
  --card-quiet: #F1EFEC;
  --inset: #ECEAE6;
  --pill: #161616;
  --pill-ink: #ffffff;

  --brass: #A9741F;
  --brass-text: #8E611A;
  --teal: #0E6E63;
  --clay: #C1502E;
  --up: #1B7F4F;
  --down: #C1502E;
  --warn: #906014;
  --social: #4A5560;
  /* Ink.socialWash = social.mixed(with: card, 0.86) — recompute if either moves. */
  --social-wash: #E6E7E9;

  --ink: #161311;
  --muted: #535353;
  --faint: #676A71;
  --hairline: #E7E4E0;

  --sans: -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style BT", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --gutter: 24px; /* deliberately wider than Spacing.gutter (16) — a page measure, not a phone one */
  --measure: 660px;
  --radius: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #131211;
    --card: #1B1917;
    --card-quiet: #181614;
    --inset: #26231F;
    --pill: #ffffff;
    --pill-ink: #161616;

    --brass: #D9A441;
    --brass-text: #D9A441;
      --teal: #3FB8A6;
      --clay: #E0704A;
    --up: #35C07A;
    --down: #E0704A;
    --warn: #E8A33D;
    --social: #93A0AC;
    --social-wash: #2C2C2C;

    --ink: #F2EFE9;
    --muted: #A5A09A;
    --faint: #898992;
    --hairline: #2B2825;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--card);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 100px;
  font-family: var(--sans);
  font-size: 14px;
  z-index: 10;
}
.skip:focus { left: 16px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px var(--gutter);
  max-width: 1180px;
  margin: 0 auto;
}

.wordmark {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark.small { font-size: 13px; letter-spacing: 0.18em; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  row-gap: 8px;
  font-family: var(--sans);
  font-size: 15px;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.nav a:hover { border-bottom-color: currentColor; }

main { display: block; }

.prose {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 32px var(--gutter) 96px;
}

.page-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.018em;
  margin: 0 0 20px;
}

.lede, .section-lede {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 28px;
  text-wrap: pretty;
}

.prose h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  margin: 40px 0 10px;
}

.prose h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.08rem;
  margin: 30px 0 8px;
}

.prose p, .prose li {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  text-wrap: pretty;
}

.prose p { margin: 0 0 14px; }

.prose ul, .prose ol {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0 0 14px;
  padding-left: 20px;
}

.prose li { margin-bottom: 7px; }

.prose a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-text);
  margin: 0 0 10px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 0 14px;
}

.card h2, .card h3 {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink);
}

.card p {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clay);
  border: 1px solid var(--hairline);
  border-radius: 100px;
  padding: 4px 10px;
  margin: 0 8px 8px 0;
}

.tag.blocked { color: var(--clay); }
.tag.house { color: var(--brass-text); }

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list li {
  padding: 16px 0;
  border-top: 1px solid var(--hairline);
}

.list a {
  font-family: var(--sans);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.list a:hover { color: var(--teal); }

.fine {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--faint);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px var(--gutter) 48px;
  border-top: 1px solid var(--hairline);
}
.foot-note {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
}
.foot a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.updated {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  font-family: var(--sans);
  color: var(--faint);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 620px) {
  .topbar { padding: 20px var(--gutter); }
  /* This used to hide every nav link but the last. On the marketing page the
     hidden links were anchors further down the same page; here they are the
     only way between /house, /learn/, /glossary/ and /writing, and this
     estate's readers arrive on a phone from a share link. Let it wrap. */
  .nav { gap: 18px; row-gap: 6px; font-size: 14px; }
  .foot { justify-content: flex-start; }
}
