/* Remediation Insider - front-end styles.
   Prefix: ri-  |  Editorial serif headlines, grotesque UI, ink-on-paper.
   No gradients, no glassmorphism, no rounded cards: this is a document, not an app. */

:root {
  --ri-ink: #14161a;
  --ri-body: #33383f;
  --ri-muted: #5d646d;
  --ri-rule: #d9dce1;
  --ri-paper: #fff;
  --ri-ground: #f6f5f2;
  --ri-signal: #0b5d3b;
  --ri-signal-soft: #eaf2ed;
  --ri-flag: #8a2b16;
  --ri-measure: 44rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Skip link: visible on focus, never a layout shift. */
.ri-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: .75rem 1rem;
  background: var(--ri-ink);
  color: #fff;
}
.ri-skip:focus { left: 0; }

:where(a):focus-visible,
:where(button):focus-visible,
:where(input, select, textarea):focus-visible {
  outline: 2px solid var(--ri-signal);
  outline-offset: 2px;
}

/* ---------- Masthead ---------- */
.ri-masthead {
  border-bottom: 1px solid var(--ri-rule);
  background: var(--ri-paper);
}
.ri-masthead__title {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -.02em;
  color: var(--ri-ink);
  text-decoration: none;
}
.ri-masthead__rule {
  font-size: .6875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ri-muted);
}
.ri-nav a {
  font-size: .875rem;
  color: var(--ri-body);
  text-decoration: none;
  padding: .35rem 0;
  border-bottom: 2px solid transparent;
}
.ri-nav a:hover,
.ri-nav a[aria-current="page"] {
  color: var(--ri-ink);
  border-bottom-color: var(--ri-signal);
}

/* ---------- Article furniture ---------- */
.ri-kicker {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ri-signal);
}
.ri-dek {
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--ri-muted);
}
.ri-byline {
  font-size: .8125rem;
  color: var(--ri-muted);
  border-top: 1px solid var(--ri-rule);
  border-bottom: 1px solid var(--ri-rule);
  padding: .6rem 0;
}
.ri-byline time { font-variant-numeric: tabular-nums; }

/* Answer box: the single most important module on the site. */
.is-style-ri-answer {
  border-left: 3px solid var(--ri-signal);
  background: var(--ri-signal-soft);
  padding: 1.25rem 1.5rem;
}
.is-style-ri-answer > :first-child { margin-top: 0; }
.is-style-ri-answer > :last-child { margin-bottom: 0; }
.is-style-ri-answer p { font-size: 1.0625rem; color: var(--ri-ink); }

.is-style-ri-takeaways {
  border: 1px solid var(--ri-rule);
  padding: 1.25rem 1.5rem;
  background: var(--ri-paper);
}
.is-style-ri-takeaways ul { margin: 0; padding-left: 1.1rem; }
.is-style-ri-takeaways li { margin-bottom: .45rem; }

.is-style-ri-method {
  border: 1px dashed var(--ri-rule);
  background: var(--ri-ground);
  padding: 1rem 1.25rem;
  font-size: .9375rem;
  color: var(--ri-muted);
}

.is-style-ri-sponsored {
  border: 1px solid var(--ri-rule);
  padding: 1rem 1.25rem;
}
.is-style-ri-sponsored::before {
  content: "Sponsored";
  display: inline-block;
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ri-flag);
  border: 1px solid var(--ri-flag);
  padding: .1rem .4rem;
  margin-bottom: .6rem;
}

/* ---------- Tables: the format that wins this SERP ---------- */
.ri-tablewrap,
.wp-block-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.wp-block-table table {
  border-collapse: collapse;
  width: 100%;
  font-size: .9375rem;
}
.wp-block-table th,
.wp-block-table td {
  border: 0;
  border-bottom: 1px solid var(--ri-rule);
  padding: .6rem .75rem;
  text-align: left;
  vertical-align: top;
}
.wp-block-table thead th {
  border-bottom: 2px solid var(--ri-ink);
  font-size: .75rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ri-ink);
  white-space: nowrap;
}
.wp-block-table tbody tr:nth-child(even) { background: var(--ri-ground); }
.wp-block-table td:where(.num),
.wp-block-table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.wp-block-table figcaption {
  font-size: .8125rem;
  color: var(--ri-muted);
  margin-top: .5rem;
}

/* ---------- Source list ---------- */
.ri-sources {
  border-top: 2px solid var(--ri-ink);
  padding-top: 1rem;
  font-size: .875rem;
}
.ri-sources ol { padding-left: 1.2rem; }
.ri-sources li { margin-bottom: .5rem; color: var(--ri-muted); }

/* ---------- Table of contents ---------- */
.ri-toc {
  border: 1px solid var(--ri-rule);
  padding: 1rem 1.25rem;
  font-size: .9375rem;
}
.ri-toc ol { margin: 0; padding-left: 1.1rem; }
.ri-toc li { margin-bottom: .3rem; }

/* ---------- Cards (hub listings) ---------- */
.ri-card { border-bottom: 1px solid var(--ri-rule); padding-bottom: 1.25rem; }
.ri-card__meta {
  font-size: .75rem;
  color: var(--ri-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ri-card__title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.1875rem;
  line-height: 1.3;
  margin: .3rem 0;
}
.ri-card__title a { color: var(--ri-ink); text-decoration: none; }
.ri-card__title a:hover { text-decoration: underline; }
.ri-card__excerpt { font-size: .9375rem; color: var(--ri-muted); margin: 0; }

/* ---------- Footer ---------- */
.ri-footer {
  border-top: 1px solid var(--ri-rule);
  background: var(--ri-ground);
  font-size: .875rem;
}
.ri-footer a { color: var(--ri-body); }
.ri-footer h2 {
  font-size: .6875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ri-muted);
  font-family: "Inter Tight", system-ui, sans-serif;
}

/* Images never shift layout. */
img { max-width: 100%; height: auto; }
figure { margin-inline: 0; }
figcaption { font-size: .8125rem; color: var(--ri-muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .ri-masthead, .ri-footer, .ri-toc { display: none; }
  body { color: #000; }
}
