/* Long-form content, the fairness test, FAQ and sources. */

.article { padding-top: 72px; }
.article > section { max-width: 880px; margin: 0 auto 96px; }

.article h2 {
  position: relative;
  margin: 0 0 28px;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.953rem, 4.2vw, 2.441rem); line-height: 1.12; letter-spacing: -0.015em;
}
/* Squiggle underline under every section heading */
.article h2::after {
  content: ""; display: block; width: 132px; height: 14px; margin-top: 12px;
  background: no-repeat left center / 132px 14px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 14'%3E%3Cpath d='M3 7c8-8 14 8 22 0s14-8 22 0 14 8 22 0 14-8 22 0 14 8 22 0 10-6 16-2' fill='none' stroke='%238B5CF6' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
}
.article h3 {
  margin: 36px 0 12px;
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-md); line-height: 1.3;
}
.article p, .article li { max-width: 68ch; }
.article p { margin: 0 0 18px; }
.article ol, .article ul { margin: 0 0 18px; padding-left: 1.4em; }
.article li { margin-bottom: 10px; }

/* Section number, a primitive shape that rotates colour down the page */
.section-num {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px; margin-bottom: 16px;
  border: var(--bw) solid var(--foreground); border-radius: var(--r-full);
  box-shadow: var(--pop-active);
  font-family: var(--font-display); font-weight: 800; font-size: 1.1rem;
  background: var(--accent); color: var(--accent-fg);
}
.section-num.c-pink { background: var(--secondary); color: var(--foreground); }
.section-num.c-amber { background: var(--tertiary); color: var(--foreground); border-radius: 12px 12px 12px 0; }
.section-num.c-mint { background: var(--quaternary); color: var(--foreground); border-radius: 12px; transform: rotate(-6deg); }

.byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  margin: 0;
  font-size: 0.9rem; font-weight: 600;
}
.byline .avatar {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border: var(--bw) solid var(--foreground); border-radius: var(--r-full);
  background: var(--tertiary); font-family: var(--font-display); font-weight: 800;
}
.byline .sep { width: 6px; height: 6px; border-radius: var(--r-full); background: var(--secondary); }
.byline span.muted { color: var(--muted-fg); font-weight: 500; }

/* ---------- Icon lists ---------- */

.icon-list { list-style: none; padding: 0 !important; display: grid; gap: 14px; }
.icon-list li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; margin: 0; }
.icon-list .icon-dot { margin-top: 2px; }

.steps { list-style: none; padding: 0 !important; counter-reset: step; display: grid; gap: 14px; }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; margin: 0;
}
.steps li::before {
  content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px;
  border: var(--bw) solid var(--foreground); border-radius: var(--r-full);
  font-family: var(--font-display); font-weight: 800;
}
.steps li:nth-child(4n+1)::before { background: var(--tertiary); }
.steps li:nth-child(4n+2)::before { background: var(--secondary); }
.steps li:nth-child(4n+3)::before { background: var(--quaternary); }
.steps li:nth-child(4n+4)::before { background: var(--accent); color: var(--accent-fg); }

/* ---------- Key figures, grid of 3 connected by a dashed line ---------- */

.figure-row {
  position: relative;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
  margin: 44px 0 36px;
}
.figure-row::before {
  content: ""; position: absolute; left: 8%; right: 8%; top: 50%;
  border-top: 3px dashed var(--foreground); z-index: 0;
}
.figure { z-index: 1; padding: 34px 20px 20px; }
.figure .n { display: block; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-2xl); line-height: 1; letter-spacing: -0.02em; }
.figure .l { display: block; margin-top: 8px; font-size: 0.95rem; line-height: 1.45; font-weight: 500; }
.figure:nth-child(1) { border-top: 10px solid var(--accent); }
.figure:nth-child(2) { border-top: 10px solid var(--secondary); }
.figure:nth-child(3) { border-top: 10px solid var(--tertiary); }

@media (max-width: 700px) {
  .figure-row { grid-template-columns: 1fr; gap: 34px; }
  .figure-row::before { left: 50%; right: auto; top: 6%; bottom: 6%; border-top: 0; border-left: 3px dashed var(--foreground); }
}

/* ---------- Fairness test ---------- */

.ledger { margin: 48px 0 28px; }
.ledger-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  padding: 30px 22px 18px; border-bottom: var(--bw) solid var(--foreground);
}
.ledger-head h3 { margin: 0; font-size: var(--fs-md); }
.ledger-mode { margin: 4px 0 0; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-fg); }
.ledger-body { padding: 22px; }
.ledger-empty { margin: 0; color: var(--muted-fg); }

.bars { display: grid; gap: 12px; margin: 0 0 26px; padding: 0 !important; list-style: none; }
.bars li {
  display: grid; grid-template-columns: 4.6em minmax(0, 1fr) auto; align-items: center; gap: 12px;
  margin: 0; max-width: none; font-size: 0.92rem;
}
.bars .name { font-weight: 700; }
.bars .track { position: relative; height: 22px; background: var(--muted); border-radius: 0 var(--r-full) var(--r-full) 0; }
.bars .fill {
  position: absolute; inset: 0 auto 0 0;
  border: var(--bw) solid var(--foreground); border-radius: 0 var(--r-full) var(--r-full) 0;
  transition: width 700ms var(--bounce);
}
.bars .fill-yes { background: var(--yes); }
.bars .fill-no { background: var(--no); }
.bars .fill-maybe { background: var(--maybe); }
.bars .val { text-align: right; min-width: 8.5em; font-variant-numeric: tabular-nums; font-weight: 700; }
.bars .val span { color: var(--muted-fg); font-weight: 500; }

.gauge-title { margin: 0 0 8px; font-weight: 700; }
.gauge-note { margin: 12px 0 0; font-size: 0.95rem; line-height: 1.6; color: var(--muted-fg); }
.gauge svg { display: block; width: 100%; height: auto; overflow: visible; }
.g-axis, .g-tick { stroke: var(--muted-fg); stroke-width: 1.5; }
.g-tick-label { fill: var(--muted-fg); font-family: var(--font-body); font-size: 11px; font-weight: 600; text-anchor: middle; }
.g-band { fill: var(--tertiary); opacity: 0.25; }
.g-band-edge { stroke: var(--foreground); stroke-width: 1.5; stroke-dasharray: 4 4; }
.g-band-label { fill: var(--foreground); font-family: var(--font-body); font-size: 11px; font-weight: 700; text-anchor: middle; letter-spacing: 0.04em; }
.g-dot { stroke: var(--foreground); stroke-width: 2; }
.g-dot-yes { fill: var(--yes); }
.g-dot-no { fill: var(--no); }
.g-dot-maybe { fill: var(--maybe); }
.g-dot-label { fill: var(--foreground); font-family: var(--font-body); font-size: 11px; font-weight: 700; text-anchor: end; }

.verdict-line {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 18px 0 0; padding: 6px 16px 6px 6px;
  border: var(--bw) solid var(--foreground); border-radius: var(--r-full);
  font-weight: 700; font-size: 0.95rem;
}
.verdict-line .icon-dot { width: 30px; height: 30px; }
.verdict-line .icon-dot .icon { width: 16px; height: 16px; }

/* ---------- Inline code ---------- */

code { font-family: var(--font-mono); font-size: 0.88em; }
p code { padding: 2px 7px; background: var(--muted); border: 1.5px solid var(--border); border-radius: 6px; }

/* ---------- FAQ ---------- */

.faq-list { display: grid; gap: 14px; }
.faq details { background: var(--card); border: var(--bw) solid var(--foreground); border-radius: var(--r-md); transition: box-shadow var(--t-bounce), transform var(--t-bounce); }
.faq details[open] { box-shadow: var(--pop); transform: translate(-2px, -2px); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 18px; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon-dot { width: 34px; height: 34px; background: var(--tertiary); transition: transform var(--t-bounce), background var(--t-bounce); }
.faq summary .icon-dot .icon { width: 16px; height: 16px; }
.faq details[open] summary .icon-dot { transform: rotate(45deg); background: var(--secondary); }
.faq details p { margin: 0; padding: 0 18px 18px; }

/* ---------- Sources ---------- */

.sources ol { font-size: 0.98rem; }
.sources li { color: var(--muted-fg); }
.sources a { color: var(--foreground); font-weight: 600; }

/* ---------- Byline + table of contents ---------- */

.article > section.intro { margin-bottom: 72px; }
.intro .byline { margin-bottom: 28px; }

.toc { padding: 0; }
.toc summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; cursor: pointer; list-style: none;
}
.toc summary::-webkit-details-marker { display: none; }
.toc-title { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-md); }
.toc-toggle {
  padding: 4px 14px; border: var(--bw) solid var(--foreground); border-radius: var(--r-full);
  background: var(--tertiary); font-size: 0.85rem; font-weight: 700;
  transition: background var(--t-bounce);
}
.toc summary:hover .toc-toggle { background: var(--secondary); }
.toc details[open] .t-show, .toc details:not([open]) .t-hide { display: none; }
.toc ol {
  margin: 0; padding: 4px 22px 22px 22px; list-style: none; counter-reset: toc;
  columns: 2 280px; column-gap: 32px;
  border-top: var(--bw) dashed var(--border);
}
.toc li { counter-increment: toc; margin: 0; padding: 6px 0; break-inside: avoid; max-width: none; }
.toc a {
  display: inline-flex; align-items: baseline; gap: 10px;
  font-weight: 600; text-decoration: none; line-height: 1.4;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  flex: none; font-family: var(--font-display); font-weight: 800; font-size: 0.85rem; color: var(--accent);
}
.toc a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- How to use steps ---------- */

.howto { list-style: none; padding: 0 !important; margin: 32px 0 0; counter-reset: howto; display: grid; gap: 28px; }
.howto > li { counter-increment: howto; margin: 0; max-width: none; position: relative; padding-left: 64px; }
.howto > li::before {
  content: counter(howto);
  position: absolute; left: 0; top: -4px;
  display: grid; place-items: center; width: 46px; height: 46px;
  background: var(--accent); color: var(--accent-fg);
  border: var(--bw) solid var(--foreground); border-radius: var(--r-full); box-shadow: var(--pop-active);
  font-family: var(--font-display); font-weight: 800; font-size: 1.2rem;
}
.howto > li:nth-child(4n+2)::before { background: var(--secondary); color: var(--foreground); }
.howto > li:nth-child(4n+3)::before { background: var(--tertiary); color: var(--foreground); }
.howto > li:nth-child(4n+4)::before { background: var(--quaternary); color: var(--foreground); }
.howto h3 { margin: 0 0 8px; }

@media (max-width: 600px) {
  .howto > li { padding-left: 0; }
  .howto > li::before { width: 40px; height: 40px; font-size: 1.05rem; top: -2px; }
  .howto h3 { display: flex; align-items: center; min-height: 40px; padding-left: 54px; }
}

/* ---------- Screenshots ---------- */

.shot { margin: 20px 0 28px; }
.shot img {
  display: block; max-width: 100%; height: auto;
  background: var(--background);
  border: var(--bw) solid var(--foreground); border-radius: var(--r-md);
  box-shadow: var(--sticker);
}
.shot figcaption { margin-top: 10px; font-size: 0.88rem; color: var(--muted-fg); }
