/* Image Inspector — guides. Shares the app's forensic palette. */
:root {
  --bg: #0B0E14;
  --surface: #131824;
  --raised: #1B2232;
  --hairline: #334057;
  --phosphor: #3BF2C4;
  --amber: #FFB554;
  --alert: #FF5C5C;
  --violet: #B399FF;
  --text: #E8EDF5;
  --muted: #8FA1B5;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;
  --measure: 720px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 560px at 82% -10%, rgba(59,242,196,.11), transparent 60%),
    radial-gradient(700px 560px at 2% 92%, rgba(59,242,196,.05), transparent 58%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(59,242,196,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,242,196,.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 70% 8%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 70% 8%, #000 0%, transparent 70%);
}

a { color: var(--phosphor); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--phosphor); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--measure); margin: 0 auto; padding: 0 24px; }

/* ---------- masthead ---------- */
.masthead {
  border-bottom: 1px solid var(--hairline);
  background: rgba(11,14,20,.86);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: .02em;
}
.brand img { width: 26px; height: 26px; border-radius: 7px; display: block; }
.brand b { color: var(--phosphor); font-weight: 500; }
.masthead nav { font-family: var(--mono); font-size: .78rem; }
.masthead nav a { text-decoration: none; color: var(--muted); }
.masthead nav a:hover { color: var(--phosphor); }

/* ---------- breadcrumb ---------- */
.crumbs {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  padding: 26px 0 0;
  letter-spacing: .04em;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--phosphor); }
.crumbs span { color: var(--hairline); margin: 0 8px; }

/* ---------- article ---------- */
article { padding: 0 0 40px; }

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--phosphor);
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 30px 0 0;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--phosphor);
  box-shadow: 0 0 10px var(--phosphor);
}

h1 {
  font-size: clamp(2rem, 5.2vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -.03em;
  font-weight: 700;
  margin: 16px 0 14px;
}

.byline {
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--muted);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 22px;
  margin-bottom: 30px;
}
.byline b { color: var(--text); font-weight: 500; }

/* ---------- tl;dr ---------- */
.tldr {
  background: linear-gradient(180deg, rgba(27,34,50,.8), rgba(19,24,36,.8));
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--phosphor);
  border-radius: 0 14px 14px 0;
  padding: 22px 24px;
  margin: 0 0 32px;
}
.tldr p { color: var(--text); }
.tldr .label {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--phosphor);
  display: block;
  margin-bottom: 8px;
}

section { margin: 0 0 12px; }

h2 {
  font-size: clamp(1.35rem, 3.2vw, 1.7rem);
  letter-spacing: -.02em;
  font-weight: 600;
  line-height: 1.25;
  margin: 44px 0 14px;
  scroll-margin-top: 80px;
}
h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -.01em;
  margin: 26px 0 8px;
}

p { margin: 0 0 16px; }
article p { color: var(--muted); }
article p strong { color: var(--text); font-weight: 600; }

/* the answer capsule: first para of each section */
.capsule {
  color: var(--text) !important;
  font-size: 1.04rem;
  border-left: 1px solid var(--hairline);
  padding-left: 18px;
  margin-bottom: 20px;
}

ul, ol { margin: 0 0 18px; padding-left: 22px; color: var(--muted); }
li { margin-bottom: 9px; }
li strong { color: var(--text); font-weight: 600; }
li::marker { color: var(--phosphor); }

code {
  font-family: var(--mono);
  font-size: .86em;
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--phosphor);
}

blockquote {
  border-left: 2px solid var(--amber);
  background: rgba(255,181,84,.05);
  padding: 14px 18px;
  margin: 0 0 18px;
  border-radius: 0 10px 10px 0;
}
blockquote p { margin: 0; color: var(--text); }

/* ---------- figures ---------- */
figure { margin: 0 0 26px; }
figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  border: 1px solid var(--hairline);
  background: var(--surface);
}
figure.phone img { max-width: 300px; margin: 0 auto; border-radius: 22px; }
figcaption {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  margin-top: 12px;
  text-align: center;
  line-height: 1.5;
}

/* ---------- tables ---------- */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  margin: 0 0 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--hairline) transparent;
}
table { border-collapse: collapse; width: 100%; font-size: .88rem; min-width: 540px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
th {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--phosphor);
  background: var(--raised);
  white-space: nowrap;
}
td { color: var(--muted); }
td strong { color: var(--text); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(27,34,50,.5); }
.table-note { font-family: var(--mono); font-size: .7rem; color: var(--muted); margin-bottom: 26px; }

/* confidence + verdict pills */
.pill {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
  border: 1px solid;
}
.pill.keeps  { color: var(--alert);    border-color: rgba(255,92,92,.45);   background: rgba(255,92,92,.1); }
.pill.strips { color: var(--phosphor); border-color: rgba(59,242,196,.4);   background: rgba(59,242,196,.09); }
.pill.mixed  { color: var(--amber);    border-color: rgba(255,181,84,.4);   background: rgba(255,181,84,.1); }
.pill.unknown{ color: var(--muted);    border-color: var(--hairline);       background: rgba(143,161,181,.08); }
.pill.hi     { color: var(--phosphor); border-color: rgba(59,242,196,.4);   background: rgba(59,242,196,.09); }
.pill.med    { color: var(--amber);    border-color: rgba(255,181,84,.4);   background: rgba(255,181,84,.1); }
.pill.lo     { color: var(--muted);    border-color: var(--hairline);       background: rgba(143,161,181,.08); }

/* ---------- stat tiles ----------
   Separate studies, separate populations, separate years — deliberately NOT
   plotted on a shared axis, which would imply a comparability they don't have. */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 0 0 12px;
}
.stat {
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 18px 18px 16px;
  background: var(--surface);
}
.stat .num {
  font-family: var(--mono);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--phosphor);
  line-height: 1.1;
  letter-spacing: -.02em;
  display: block;
}
.stat .of {
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  display: block;
  margin: 7px 0 6px;
}
.stat .src { font-size: .8rem; color: var(--muted); line-height: 1.45; }
.stat .src b { color: var(--text); font-weight: 600; }

/* ---------- callout ---------- */
.callout {
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 0 0 22px;
  background: var(--surface);
}
.callout .label {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--amber);
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 8px;
}
.callout .label::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}
.callout p:last-child { margin-bottom: 0; }
.callout.correction .label { color: var(--alert); }
.callout.correction .label::before { background: var(--alert); box-shadow: 0 0 8px var(--alert); }

/* ---------- takeaways ---------- */
.takeaways {
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--surface);
  padding: 24px 26px;
  margin: 40px 0 0;
}
.takeaways h2 { margin-top: 0; font-size: 1.2rem; }
.takeaways ul { margin-bottom: 0; }

/* ---------- faq ---------- */
.faq h3 {
  font-size: 1.02rem;
  color: var(--text);
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
}
.faq h3:first-of-type { border-top: 0; padding-top: 0; }

/* ---------- related ---------- */
.related ul { list-style: none; padding: 0; }
.related li {
  border-bottom: 1px solid var(--hairline);
  padding: 12px 0;
  margin: 0;
}
.related li:last-child { border-bottom: 0; }
.related a { text-decoration: none; font-weight: 500; }
.related a:hover { text-decoration: underline; }
.related .desc {
  display: block;
  color: var(--muted);
  font-size: .86rem;
  margin-top: 2px;
}
.related .ext {
  font-family: var(--mono);
  font-size: .62rem;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 7px;
  letter-spacing: .08em;
  vertical-align: 1px;
}

/* ---------- author + disclosure ---------- */
.author {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 20px 22px;
  background: var(--surface);
  margin: 40px 0 0;
}
.author img { width: 46px; height: 46px; border-radius: 11px; flex-shrink: 0; }
.author h2 { margin: 0 0 2px; font-size: 1rem; }
.author .role { font-family: var(--mono); font-size: .7rem; color: var(--phosphor); margin-bottom: 8px; letter-spacing: .06em; }
.author p { font-size: .88rem; margin: 0; }

.disclosure {
  font-size: .78rem;
  color: var(--muted);
  border: 1px dashed var(--hairline);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 18px 0 0;
}
.disclosure p { font-size: .78rem; margin: 0; }

/* ---------- cta ---------- */
.cta {
  text-align: center;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 40px 26px;
  margin: 46px 0 0;
  background:
    radial-gradient(500px 260px at 50% 0%, rgba(59,242,196,.12), transparent 70%),
    var(--surface);
}
.cta h2 { margin: 10px 0 10px; }
.cta .eyebrow { justify-content: center; margin: 0; }
.cta p { color: var(--muted); max-width: 44ch; margin: 0 auto 22px; }
.badge { display: inline-block; transition: transform .2s ease, filter .2s ease; }
.badge img { height: 50px; width: auto; display: block; margin: 0 auto; }
.badge:hover { transform: translateY(-2px); filter: brightness(1.08); }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--hairline);
  margin-top: 60px;
  padding: 30px 0 44px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .74rem;
}
footer .wrap { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
footer a { text-decoration: none; }

/* ---------- index / hub ---------- */
.hub-hero { padding: 40px 0 8px; }
.hub-hero h1 { max-width: 16ch; }
.hub-hero .lede { color: var(--muted); font-size: 1.08rem; max-width: 52ch; }
.cards { display: grid; gap: 16px; margin: 36px 0 0; }
.card {
  display: block;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 22px 24px;
  background: linear-gradient(180deg, rgba(27,34,50,.7), rgba(19,24,36,.7));
  text-decoration: none;
  transition: border-color .28s ease, transform .28s ease;
}
.card:hover { border-color: rgba(59,242,196,.45); transform: translateY(-3px); }
.card .tag {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--phosphor);
  margin-bottom: 10px;
}
.card h2 { font-size: 1.14rem; margin: 0 0 6px; color: var(--text); }
.card p { color: var(--muted); font-size: .92rem; margin: 0; }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reveal { animation: rise .65s cubic-bezier(.2,.7,.3,1) backwards; }
.d1 { animation-delay: .04s } .d2 { animation-delay: .12s } .d3 { animation-delay: .2s } .d4 { animation-delay: .28s }

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

@media (max-width: 700px) {
  h1 { letter-spacing: -.02em; }
  .masthead nav { display: none; }
  body::after { background-size: 44px 44px; }
  .author { flex-direction: column; gap: 12px; }
}
