/* concepts.rycolston.com — page-local layout glue.
   Components style themselves (components.css); this positions them and
   styles the rendered-markdown reading surface. Tokens only; no new colors,
   no black shadows, pills only on controls (ADR 0001–0006). */

/* ---------- hero ---------- */
.concept-hero { padding-bottom: var(--s-space-lg); }
.concept-hero__title { margin: var(--s-space-sm) 0 var(--s-space-xs); }
.concept-hero__sub {
  font-size: 1.25rem;
  line-height: var(--p-lh-body);
  color: var(--s-text-secondary);
  max-width: 44ch;
  margin: 0 0 var(--s-space-xs);
}
.concept-hero__status {
  font-size: 0.875rem;
  color: var(--s-text-secondary);
  margin: 0 0 var(--s-space-md);
}

/* ---------- confidence tags ---------- */
.tag {
  font-weight: var(--p-weight-semibold, 600);
  letter-spacing: 0.02em;
  vertical-align: 0.15em;
  margin: 0 0.15em;
  cursor: help;
}
/* brand fill = the two tiers that are safe to say */
.tag--v, .tag--p {
  background: var(--s-brand, #3f4a28);
  color: var(--s-text-on-brand, #f9f6f3);
  border-color: transparent;
}
.tag--s {
  background: transparent;
  color: var(--s-text-primary);
  border: 1px solid var(--s-text-secondary);
}
.tag--q {
  background: transparent;
  color: var(--s-text-secondary);
  border: 1px dashed var(--s-text-secondary);
}
.legend {
  display: flex; flex-wrap: wrap; gap: var(--s-space-xs) var(--s-space-md);
  font-size: 0.875rem;
  color: var(--s-text-secondary);
}
.legend__item { display: inline-flex; align-items: center; gap: 0.4em; }

/* ---------- reader layout: rail + main ---------- */
.reader { display: block; }
.reader__rail { padding: 0 var(--s-space-md); }
.toc { margin: 0 auto var(--s-space-sm); max-width: 760px; }
.toc__title {
  font-family: var(--p-font-display, "Fraunces", serif);
  font-size: var(--p-text-17);
  cursor: pointer;
  padding: var(--s-space-xs) 0;
  list-style: none;
}
.toc__title::-webkit-details-marker { display: none; }
.toc__title::before { content: "☰ "; color: var(--s-text-brand); }
.toc__list {
  margin: 0; padding-left: 1.4em;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--s-text-secondary);
}
.toc__list li::marker { color: var(--s-text-brand); }
.toc__list a { color: inherit; text-decoration: none; }
.toc__list a:hover { color: var(--s-text-primary); text-decoration: underline; }
.toc__jump {
  display: inline-block; margin-top: var(--s-space-xs);
  font-size: 0.875rem;
  color: var(--s-text-brand);
}

@media (min-width: 1100px) {
  .reader {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: start;
  }
  .reader__rail {
    position: sticky; top: 84px;
    padding: var(--s-space-md) 0 var(--s-space-md) var(--s-space-md);
    max-height: calc(100vh - 100px); overflow: auto;
  }
  .reader__main { min-width: 0; }
  .toc { margin: 0; }
}

/* ---------- rendered markdown ---------- */
.prose { font-size: var(--p-text-17); line-height: var(--p-lh-body); color: var(--s-text-secondary); }
.prose h1 {
  font-family: var(--p-font-display, "Fraunces", serif);
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  line-height: 1.15;
  color: var(--s-text-primary);
  margin: 4rem 0 var(--s-space-sm);
  padding-top: var(--s-space-md);
  border-top: 1px solid rgba(63, 74, 40, 0.15);
  scroll-margin-top: 90px;
}
.prose h1:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.prose h2 {
  font-family: var(--p-font-display, "Fraunces", serif);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem);
  line-height: 1.25;
  color: var(--s-text-primary);
  margin: var(--s-space-lg) 0 var(--s-space-xs);
  scroll-margin-top: 90px;
}
.prose h3 {
  font-weight: var(--p-weight-semibold, 600);
  font-size: var(--p-text-17);
  color: var(--s-text-primary);
  margin: var(--s-space-md) 0 var(--s-space-xs);
}
.prose p { margin: 0 0 var(--s-space-sm); }
.prose strong { color: var(--s-text-primary); font-weight: var(--p-weight-semibold, 600); }
.prose em { color: var(--s-text-primary); font-style: italic; }
.prose a { color: var(--s-text-brand); text-decoration: underline; text-underline-offset: 0.15em; overflow-wrap: anywhere; }
.prose ul, .prose ol { padding-left: var(--s-space-lg); margin: 0 0 var(--s-space-md); }
.prose li { margin-bottom: var(--s-space-xs); }
.prose li::marker { color: var(--s-text-brand); }
.prose hr { border: 0; border-top: 1px solid rgba(63, 74, 40, 0.15); margin: var(--s-space-lg) 0; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: rgba(63, 74, 40, 0.07);
  padding: 0.1em 0.35em;
  border-radius: 6px;
  color: var(--s-text-primary);
  overflow-wrap: anywhere;
}

/* callouts: the on-air hedges live in blockquotes */
.prose blockquote {
  margin: var(--s-space-md) 0;
  padding: var(--s-space-sm) var(--s-space-md);
  border-left: 3px solid var(--s-brand, #3f4a28);
  background: rgba(63, 74, 40, 0.06);
  border-radius: 0 12px 12px 0;
  color: var(--s-text-primary);
  font-family: var(--p-font-display, "Fraunces", serif);
  font-size: 1.05em;
  line-height: 1.5;
}
.prose blockquote p:last-child { margin-bottom: 0; }

/* tables scroll inside their own box; the page never scrolls sideways */
.table-wrap { overflow-x: auto; margin: 0 0 var(--s-space-md); -webkit-overflow-scrolling: touch; }
.prose table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 0.9375rem; }
.prose th, .prose td {
  text-align: left; vertical-align: top;
  padding: 0.55em 0.75em;
  border-bottom: 1px solid rgba(63, 74, 40, 0.15);
}
.prose th { color: var(--s-text-primary); font-weight: var(--p-weight-semibold, 600); background: rgba(63, 74, 40, 0.06); }
.prose--evidence h2 { font-size: clamp(1.15rem, 0.95rem + 0.8vw, 1.4rem); }
.prose--evidence h3 { margin-top: var(--s-space-md); }

/* ---------- index page ---------- */
.concept-grid { display: grid; gap: var(--s-space-md); }
.concept-grid .card p { color: var(--s-text-secondary); }
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--s-space-sm); justify-content: space-between; align-items: center; }
