/* ==========================================================================
   Clear Cut Coverage — long-form pages (about, sources, contact, privacy, terms)
   Depends on css/site.css for tokens, fonts, masthead, footer, .btn, .tool,
   .icon, .dot, .lean and focus rings. Scoped fallbacks below (.page .dot etc.)
   keep these pages legible if site.css is late. Tokens only — see DESIGN.md §3.
   ========================================================================== */

/* ---------- layout ---------- */
.page {
  max-width: 72ch;
  margin: 0 auto;
  padding: 2.5rem var(--gutter, 20px) 4.5rem;
  box-sizing: border-box;
}
.page--wide { max-width: var(--max-w, 1280px); }

/* legal pages: prose + sticky "On this page" on ≥1024px */
.page--legal { max-width: 72ch; }
@media (min-width: 1024px) {
  .page--legal {
    max-width: calc(72ch + 3.5rem + 220px);
    display: grid;
    grid-template-columns: minmax(0, 72ch) 220px;
    grid-template-areas: "head head" "body toc";
    column-gap: 3.5rem;
    align-items: start;
  }
  .page--legal > .page-head { grid-area: head; }
  .page--legal > .prose     { grid-area: body; }
  .page--legal > .toc       { grid-area: toc; position: sticky; top: 84px; }
}

/* ---------- page header ---------- */
.page-head {
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
.page-head__eyebrow,
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 .75rem;
}
.page-head h1 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}
.page-head__standfirst {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 60ch;
  margin: 1rem 0 0;
}
.page-head__standfirst--meta {
  font-size: 1.0625rem;
  font-style: italic;
}

/* ---------- prose ---------- */
.prose {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 68ch;
}
.page--wide .prose { max-width: 68ch; }
.prose > :first-child { margin-top: 0; }
.prose h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
  margin: 2.5rem 0 1rem;
  scroll-margin-top: 80px;
}
.prose h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
  margin: 1.75rem 0 .5rem;
}
.prose h4 {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  margin: 1.5rem 0 .5rem;
}
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.prose li { margin: 0 0 .4rem; }
.prose li::marker { color: var(--ink-3); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--ink-3);
}
.prose a:hover { text-decoration-color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 1rem;
}
.prose th, .prose td {
  text-align: left;
  vertical-align: top;
  padding: .6rem .75rem .6rem 0;
  border-bottom: 1px solid var(--rule);
}
.prose th {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom-color: var(--rule-strong);
}
.prose .lede { font-size: 1.1875rem; color: var(--ink); }

/* ---------- callouts ---------- */
.callout {
  border-left: 3px solid var(--ink);
  padding: .15rem 0 .15rem 1.25rem;
  margin: 1.75rem 0;
}
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }
.callout h3, .callout h4 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 .5rem;
}
.callout--lead p { font-size: 1.25rem; line-height: 1.45; color: var(--ink); }
.prose .callout p:last-child { margin-bottom: 0; }

/* ---------- "On this page" ---------- */
.toc {
  font-family: var(--font-sans);
  margin: 0 0 2.5rem;
}
.toc__title {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 .6rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--rule-strong);
}
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }
.toc a {
  display: block;
  padding: .3rem 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.toc a:hover { color: var(--ink); }
.toc a.is-current { color: var(--ink); }
.toc:empty { display: none; }
@media (max-width: 1023.98px) {
  .toc ol { columns: 2; column-gap: 2rem; }
  .toc li { break-inside: avoid; }
}
@media (max-width: 600px) {
  .toc ol { columns: 1; }
}

/* ---------- numbered steps / four-up grid ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  margin: 1.5rem 0 2rem;
  padding: 0;
  list-style: none;
  max-width: none;
}
.step {
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  margin: 0;
}
.step__num {
  display: block;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
  color: var(--ink-3);
  margin: 0 0 .75rem;
  font-variant-numeric: lining-nums;
}
.step h3, .step h4 {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 .4rem;
}
.step p {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0;
}
.prose .steps { max-width: none; }

/* ---------- section label + count (sources page) ---------- */
.section-label {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 1rem;
}

/* ---------- three-column source listing ---------- */
.source-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  margin: 1.5rem 0 2rem;
  max-width: none;
}
.prose .source-cols { max-width: none; }
.source-col { min-width: 0; }
.source-col__title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0;
  padding: .6rem 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
.source-col__count { color: var(--ink-3); letter-spacing: 0; text-transform: none; font-weight: 400; }
.source-col[data-lean="liberal"] .source-col__title { color: var(--liberal); border-top-color: var(--liberal); }
.source-col[data-lean="neutral"] .source-col__title { color: var(--neutral); border-top-color: var(--neutral); }
.source-col[data-lean="conservative"] .source-col__title { color: var(--conservative); border-top-color: var(--conservative); }
.source-list { list-style: none; margin: 0; padding: 0; }
.source-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: baseline;
  column-gap: .6rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--rule);
  margin: 0;
}
.source-row .dot { position: relative; top: -1px; align-self: center; }
.source-row__name {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.3;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.source-row__lean,
.source-row__score {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--ink-3);
  white-space: nowrap;
}
.source-row__score {
  font-variant-numeric: tabular-nums;
  min-width: 2.6em;
  text-align: right;
}
.source-cols--names .source-row { grid-template-columns: auto minmax(0, 1fr); }

/* ---------- bias scale ---------- */
.scale {
  position: relative;
  margin: 2rem 0 2.5rem;
  font-family: var(--font-sans);
  max-width: none;
  /* tick labels sit at the ends; keep them inside the container */
  padding: 0 .5rem;
}
.prose .scale { max-width: none; }
.scale__ticks {
  position: relative;
  height: 2.6rem;
}
.scale__tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  text-align: center;
  font-size: 0.75rem;
  color: var(--ink-3);
  white-space: nowrap;
  line-height: 1.25;
}
.scale__tick b {
  display: block;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.scale__tick:first-child { transform: none; text-align: left; }
.scale__tick:last-child { transform: translateX(-100%); text-align: right; }
.scale__track {
  position: relative;
  height: 14px;
}
.scale__rule {
  position: absolute;
  left: 0; right: 0; top: 6px;
  height: 1px;
  background: var(--rule-strong);
}
.scale__seg {
  position: absolute;
  top: 5px;
  height: 3px;
  border-radius: var(--radius);
}
.scale__seg--liberal { background: var(--liberal); }
.scale__seg--neutral { background: var(--neutral); }
.scale__seg--conservative { background: var(--conservative); }
.scale__grid {
  position: absolute;
  top: 0;
  width: 1px;
  height: 14px;
  background: var(--rule);
}
.scale .scale__mark {
  position: absolute;
  top: 2px;
  transform: translateX(-50%);
  margin: 0;
  width: 9px;
  height: 9px;
}
.scale__names {
  position: relative;
  margin-top: 8px;
  min-height: 2rem;
}
.scale__name {
  position: absolute;
  top: 0;
  font-size: 0.75rem;
  line-height: 1.2;
  color: var(--ink-2);
  white-space: nowrap;
  padding-top: 6px;
}
.scale__name::before {
  /* short tick above the label at the exact score position */
  content: "";
  position: absolute;
  left: var(--tick-x, 0);
  top: 0;
  width: 1px;
  height: 4px;
  background: var(--ink-3);
}
.scale__name.is-measuring { visibility: hidden; }
.scale__legend {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.75rem;
  color: var(--ink-3);
}
.scale__legend li { display: inline-flex; align-items: center; gap: .45rem; }

/* ---------- contact ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 3.5rem;
  align-items: start;
  max-width: none;
}
.contact__form h2,
.contact__aside h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 1.25rem;
}
.form { display: grid; gap: 1.1rem; }
.form-field { display: grid; gap: .4rem; }
.form-field label {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  box-sizing: border-box;
  height: 40px;
  padding: 0 .75rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  appearance: none;
  -webkit-appearance: none;
}
.form-field textarea {
  height: auto;
  min-height: 160px;
  padding: .6rem .75rem;
  line-height: 1.5;
  resize: vertical;
}
.form-field select {
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d7a73' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right .6rem center;
  background-size: 16px 16px;
  cursor: pointer;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--ink-3); }
.form-field input:hover,
.form-field select:hover,
.form-field textarea:hover { border-color: var(--ink-3); }
.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--rule-strong);
}
.form__actions { display: flex; align-items: center; gap: 1rem; }
.form-success,
.form-error {
  display: none;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink);
  padding: .1rem 0 .1rem 1rem;
  border-left: 3px solid var(--positive);
  margin: 0 0 1.25rem;
}
.form-error { border-left-color: var(--negative); }

.contact-methods { list-style: none; margin: 0; padding: 0; }
.contact-methods li {
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}
.contact-methods li:last-child { border-bottom: 1px solid var(--rule); }
.contact-methods h3 {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 .25rem;
}
.contact-methods p {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0;
}
.contact-methods a {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--ink-3);
}
.contact-methods a:hover { text-decoration-color: var(--ink); }
.contact__aside .prose { margin-top: 2rem; }
.contact__aside .prose h3 {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 .5rem;
}
.contact__aside .prose ul { padding-left: 1.2rem; font-size: 1rem; }

/* ---------- misc ---------- */
.page-cta {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule-strong);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}
.page-cta p {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--ink-2);
  margin: 0;
}
.page .btn .icon { margin-left: .35rem; }
.about-sources-lead { margin-top: 1rem; }

/* ---------- scoped fallbacks (site.css owns the canonical versions) ---------- */
.page .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-3);
  flex: none;
  vertical-align: middle;
}
.page .dot--liberal { background: var(--liberal); }
.page .dot--neutral { background: var(--neutral); }
.page .dot--conservative { background: var(--conservative); }
.page .lean {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-3);
}
.page .lean::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-3);
}
.page .lean--liberal::before { background: var(--liberal); }
.page .lean--neutral::before { background: var(--neutral); }
.page .lean--conservative::before { background: var(--conservative); }
.page .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  height: 36px;
  padding: 0 1rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}
.page .btn:hover { background: var(--surface-2); }
.page .btn--primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.page .btn--primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.page .btn:disabled { opacity: .6; cursor: default; }
.page .icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.page :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2rem; }
  .source-cols { gap: 1.5rem; }
  .contact { gap: 2.5rem; }
}
@media (max-width: 768px) {
  .page { padding-top: 1.75rem; padding-bottom: 3.5rem; }
  .page-head h1 { font-size: 2rem; }
  .page-head__standfirst { font-size: 1.125rem; }
  .prose h2 { font-size: 1.4rem; margin-top: 2rem; }
  .source-cols { grid-template-columns: 1fr; gap: 1.5rem; }
  .source-row { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .contact { grid-template-columns: 1fr; gap: 2.5rem; }
  .scale__tick { font-size: 0.6875rem; }
  .scale__tick span { display: none; }
  .scale__tick:first-child span,
  .scale__tick:last-child span,
  .scale__tick--center span { display: block; }
  .page-cta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 1.75rem; }
}
