/* License OPL-1 — Abrak
   Industry guides, comparison matrices and inline figures.

   Every colour here is a token from abrak_site/_tokens.css. Nothing is a literal
   hex: the token layer already re-points brand, surface and text for dark mode,
   so one `prefers-color-scheme` rule there re-themes this whole file. A hardcoded
   colour would survive that switch and break in the dark theme.

   The figures are CSS, not images and not JavaScript: they stay sharp at any
   zoom, they follow the page's own RTL direction, and they still read when
   printed or when a bot fetches the page without running scripts. */

/* AnjomanMax ships Thin…Black; abrak_site declares only 400 and 700. The
   article and tool heroes use the heavy weight, as the home page does. */
@font-face {
  font-family: "AnjomanMax";
  src: url("/abrak_theme/static/src/fonts/AnjomanMax-Black.woff2") format("woff2");
  font-weight: 900; font-display: swap;
}
@font-face {
  font-family: "AnjomanMax";
  src: url("/abrak_theme/static/src/fonts/AnjomanMax-Light.woff2") format("woff2");
  font-weight: 300; font-display: swap;
}

/* ── article shell ──────────────────────────────────────────────────────── */

.ab-editorial { color: var(--ab-ink); }

.ab-editorial-hero {
  background:
    radial-gradient(760px 380px at 82% -14%, var(--color-brand-soft), transparent 64%),
    radial-gradient(560px 320px at 12% -8%, var(--color-accent-soft), transparent 60%);
  padding-block: var(--space-7) var(--space-6);
}
.ab-editorial-hero h1 { margin: var(--space-2) 0 var(--space-4); max-width: 26ch; line-height: 1.45; }
.ab-editorial-lead { font-size: 1.15rem; line-height: 1.9; color: var(--ab-muted); max-width: 58ch; }
.ab-editorial-meta { font-size: .85rem; color: var(--color-text-subtle); margin-top: var(--space-4); }

.ab-editorial-breadcrumb { font-size: .82rem; color: var(--color-text-subtle); }
.ab-editorial-breadcrumb a { color: inherit; text-decoration: none; }
.ab-editorial-breadcrumb a:hover { text-decoration: underline; }

.ab-competition-kicker {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .02em;
  color: var(--ab-primary); background: var(--color-brand-soft);
  padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill);
}

/* Three or four hard numbers straight under the H1. A buyer who reads nothing
   else should still leave with the figures that decide the shortlist. */
.ab-editorial-stats {
  display: flex; flex-wrap: wrap; gap: var(--space-3);
  margin-top: var(--space-5);
}
.ab-editorial-stat {
  flex: 1 1 13rem; min-width: 12rem;
  background: var(--color-surface); border: 1px solid var(--ab-border);
  border-radius: var(--ab-radius); padding: var(--space-3) var(--space-4);
  box-shadow: var(--ab-shadow-sm);
}
.ab-editorial-stat strong { display: block; font-size: 1.45rem; line-height: 1.35; color: var(--ab-primary); }
.ab-editorial-stat span { display: block; font-size: .82rem; line-height: 1.7; color: var(--ab-muted); margin-top: var(--space-2); }

.ab-editorial-disclosure {
  margin-top: var(--space-5); max-width: 78ch;
  font-size: .82rem; line-height: 1.8; color: var(--ab-muted);
  border-inline-start: 3px solid var(--color-border-strong);
  padding-inline-start: var(--space-4);
}

.ab-editorial-body {
  padding-block: var(--space-6) var(--space-8);
  /* Clears the site's fixed chat bubble and back-to-top button, which otherwise
     sit on top of the last figure on narrow screens. */
  padding-bottom: var(--space-9);
  max-width: 58rem;
}
.ab-editorial-section { margin-block: var(--space-7); scroll-margin-top: 5rem; }
.ab-editorial-section h2 { margin-bottom: var(--space-4); }
.ab-editorial-section p { line-height: 2.05; margin-bottom: var(--space-4); }

.ab-editorial-answer {
  background: var(--color-brand-soft); border-radius: var(--ab-radius);
  padding: var(--space-5); margin-bottom: var(--space-6);
  border-inline-start: 4px solid var(--ab-primary);
}
.ab-editorial-answer strong { display: block; margin-bottom: var(--space-2); color: var(--ab-primary); }
.ab-editorial-answer p { margin: 0; line-height: 1.95; }

.ab-editorial-toc {
  background: var(--ab-bg-alt); border: 1px solid var(--ab-border);
  border-radius: var(--ab-radius); padding: var(--space-5); margin-bottom: var(--space-6);
}
.ab-editorial-toc h2 { font-size: 1rem; margin: 0 0 var(--space-3); }
.ab-editorial-toc ol { margin: 0; padding-inline-start: 1.3rem; columns: 2; column-gap: var(--space-6); list-style-type: persian; }
.ab-editorial-toc li { margin-bottom: var(--space-2); break-inside: avoid; }
.ab-editorial-toc a { color: var(--ab-ink); text-decoration: none; }
.ab-editorial-toc a:hover { color: var(--ab-primary); text-decoration: underline; }

.ab-editorial-bullets { line-height: 1.95; padding-inline-start: 1.3rem; margin-bottom: var(--space-5); }
.ab-editorial-bullets li { margin-bottom: var(--space-2); }

.ab-editorial-quote {
  margin: var(--space-5) 0; padding: var(--space-5);
  background: var(--color-surface-2); border: 1px solid var(--ab-border);
  border-inline-start: 4px solid var(--color-ember); border-radius: var(--ab-radius);
}
.ab-editorial-quote p { font-size: 1.05rem; line-height: 1.9; margin: 0 0 var(--space-3); }
.ab-editorial-quote cite { font-style: normal; font-size: .8rem; color: var(--ab-muted); }

.ab-editorial-links { list-style: none; padding: 0; margin: var(--space-4) 0 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ab-editorial-links a {
  display: inline-block; font-size: .85rem; text-decoration: none;
  color: var(--ab-primary); background: var(--color-brand-soft);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill);
}
.ab-editorial-links a:hover { background: var(--ab-primary); color: var(--color-text-on-brand); }

/* ── plain tables ───────────────────────────────────────────────────────── */

.ab-editorial-table { overflow-x: auto; margin: var(--space-5) 0; border-radius: var(--ab-radius); border: 1px solid var(--ab-border); }
.ab-editorial-table table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ab-editorial-table caption { text-align: start; padding: var(--space-3) var(--space-4); font-weight: 700; background: var(--ab-bg-alt); }
.ab-editorial-table th, .ab-editorial-table td { padding: var(--space-3) var(--space-4); text-align: start; border-top: 1px solid var(--ab-border); line-height: 1.8; }
.ab-editorial-table thead th { background: var(--color-surface-sunken); font-weight: 700; }
.ab-editorial-table tbody tr:nth-child(2n) { background: var(--color-surface-2); }

/* ── comparison matrix ──────────────────────────────────────────────────── */

.ab-matrix-wrap {
  margin-block: var(--space-6);
  margin-inline: calc(-1 * clamp(0rem, (100vw - 58rem) / 2 - 1.5rem, 6rem));
}
.ab-matrix-scroll { overflow-x: auto; border: 1px solid var(--ab-border); border-radius: var(--ab-radius); }
.ab-matrix { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 34rem; }
.ab-matrix thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--ab-primary); color: var(--color-text-on-brand);
  padding: var(--space-3) var(--space-4); text-align: start; font-weight: 700;
}
/* The first data column is our own, so it gets the accent rule: the reader's eye
   should land on the Abrak column without the table shouting. */
.ab-matrix thead th:nth-child(2) { box-shadow: inset 0 -3px 0 var(--color-ember); }
.ab-matrix tbody th {
  text-align: start; font-weight: 600; padding: var(--space-3) var(--space-4);
  background: var(--ab-bg-alt); border-top: 1px solid var(--ab-border); vertical-align: top;
}
.ab-matrix-why { display: block; font-size: .76rem; font-weight: 400; color: var(--ab-muted); margin-top: var(--space-1); line-height: 1.65; }
.ab-matrix td {
  padding: var(--space-3) var(--space-4); border-top: 1px solid var(--ab-border);
  vertical-align: top; line-height: 1.7;
}
.ab-matrix tbody tr:nth-child(2n) td { background: var(--color-surface-2); }
.ab-matrix-text { display: inline; }

.ab-matrix-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.15rem; height: 1.15rem; border-radius: 50%;
  margin-inline-end: var(--space-2); vertical-align: -.2rem;
  font-size: .72rem; font-weight: 700; color: var(--color-text-on-brand);
}
/* State is carried by shape + text, never by colour alone — the legend spells
   each one out, so the table still reads for a colour-blind buyer or in print. */
[data-state="yes"] .ab-matrix-mark { background: var(--color-success); }
[data-state="yes"] .ab-matrix-mark::before { content: "✓"; }
[data-state="partial"] .ab-matrix-mark { background: var(--color-warning); }
[data-state="partial"] .ab-matrix-mark::before { content: "~"; }
[data-state="no"] .ab-matrix-mark { background: var(--color-danger); }
[data-state="no"] .ab-matrix-mark::before { content: "✕"; }
[data-state="ask"] .ab-matrix-mark { background: var(--color-text-subtle); }
[data-state="ask"] .ab-matrix-mark::before { content: "؟"; }
[data-state="info"] .ab-matrix-mark { display: none; }

.ab-matrix-legend {
  list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-4);
  padding: var(--space-4) 0 0; margin: 0; font-size: .8rem; color: var(--ab-muted);
}
.ab-matrix-legend li { display: flex; align-items: center; gap: var(--space-2); }
.ab-matrix-legend li::before {
  content: ""; width: .8rem; height: .8rem; border-radius: 50%; flex-shrink: 0;
}
.ab-matrix-legend li[data-state="yes"]::before { background: var(--color-success); }
.ab-matrix-legend li[data-state="partial"]::before { background: var(--color-warning); }
.ab-matrix-legend li[data-state="no"]::before { background: var(--color-danger); }
.ab-matrix-legend li[data-state="ask"]::before { background: var(--color-text-subtle); }

/* ── figures ────────────────────────────────────────────────────────────── */

.ab-fig {
  margin: var(--space-6) 0; padding: var(--space-5);
  background: var(--color-surface); border: 1px solid var(--ab-border);
  border-radius: var(--ab-radius); box-shadow: var(--ab-shadow-sm);
}
.ab-fig figcaption { font-weight: 700; font-size: .95rem; margin-bottom: var(--space-4); color: var(--ab-muted); }
.ab-fig-note { font-size: .78rem; color: var(--ab-muted); margin: var(--space-4) 0 0; line-height: 1.75; }

/* bars */
.ab-fig-bars { display: grid; gap: var(--space-3); }
.ab-figbar { display: grid; grid-template-columns: minmax(6rem, 11rem) 1fr auto; align-items: center; gap: var(--space-3); }
.ab-figbar-label { font-size: .85rem; color: var(--ab-muted); }
.ab-figbar-track { height: 1.45rem; min-width: 5rem; background: var(--color-surface-sunken); border-radius: var(--radius-pill); overflow: hidden; }
.ab-figbar-fill {
  display: block; height: 100%; border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--color-brand-strong), var(--color-accent));
  min-width: .35rem;
}
.ab-figbar.is-accent .ab-figbar-fill { background: linear-gradient(90deg, var(--color-ember), var(--color-brand-strong)); }
.ab-figbar-value { font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* layered architecture */
.ab-fig-layers { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.ab-fig-layers li {
  padding: var(--space-4); border-radius: var(--radius-2);
  border: 1px solid var(--ab-border); background: var(--color-surface-2);
  border-inline-start-width: 5px;
}
.ab-fig-layers strong { display: block; margin-bottom: var(--space-1); }
.ab-fig-layers span { font-size: .85rem; color: var(--ab-muted); line-height: 1.75; }
.ab-fig-layers li[data-tone="core"] { border-inline-start-color: var(--color-text-subtle); }
.ab-fig-layers li[data-tone="local"] { border-inline-start-color: var(--color-accent); }
.ab-fig-layers li[data-tone="abrak"] { border-inline-start-color: var(--ab-primary); }
.ab-fig-layers li[data-tone="external"] { border-inline-start-color: var(--color-ember); }

/* timeline */
.ab-fig-timeline { list-style: none; padding: 0; margin: 0; }
.ab-fig-timeline li {
  position: relative; padding-inline-start: var(--space-6); padding-bottom: var(--space-5);
  border-inline-start: 2px solid var(--ab-border); margin-inline-start: .45rem;
}
.ab-fig-timeline li:last-child { border-inline-start-color: transparent; padding-bottom: 0; }
.ab-fig-timeline li::before {
  content: ""; position: absolute; inset-inline-start: -.47rem; top: .15rem;
  width: .85rem; height: .85rem; border-radius: 50%;
  background: var(--ab-primary); box-shadow: 0 0 0 3px var(--color-brand-soft);
}
.ab-fig-when { display: block; font-size: .74rem; font-weight: 700; color: var(--ab-primary); }
.ab-fig-timeline strong { display: block; margin: var(--space-1) 0; }
.ab-fig-detail { font-size: .85rem; color: var(--ab-muted); line-height: 1.75; }

/* ── directory cards, FAQ, related, CTA ─────────────────────────────────── */

.ab-competition-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }

.ab-editorial-directory { margin-bottom: var(--space-6); }
.ab-editorial-route {
  display: block; text-decoration: none; color: inherit;
  background: var(--color-surface); border: 1px solid var(--ab-border);
  border-radius: var(--ab-radius); padding: var(--space-5);
  box-shadow: var(--ab-shadow-sm); transition: transform .15s, box-shadow .15s;
}
.ab-editorial-route:hover { transform: translateY(-2px); box-shadow: var(--ab-shadow-md); border-color: var(--ab-primary); }
.ab-editorial-route strong { display: block; margin-bottom: var(--space-2); }
.ab-editorial-route span { display: block; font-size: .85rem; color: var(--ab-muted); line-height: 1.8; }
.ab-competition-text-link { color: var(--ab-primary); font-weight: 600; margin-top: var(--space-3); }

.ab-editorial-faq { margin-block: var(--space-7); }
.ab-editorial-faq details {
  border: 1px solid var(--ab-border); border-radius: var(--radius-2);
  padding: var(--space-4); margin-bottom: var(--space-3); background: var(--color-surface);
}
.ab-editorial-faq summary { font-weight: 600; cursor: pointer; }
.ab-editorial-faq details[open] summary { margin-bottom: var(--space-3); color: var(--ab-primary); }
.ab-editorial-faq p { margin: 0; line-height: 1.95; color: var(--ab-muted); }

.ab-editorial-related ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ab-editorial-related a {
  display: inline-block; text-decoration: none; font-size: .88rem;
  color: var(--ab-ink); background: var(--ab-bg-alt);
  border: 1px solid var(--ab-border); border-radius: var(--radius-pill);
  padding: var(--space-2) var(--space-4);
}
.ab-editorial-related a:hover { border-color: var(--ab-primary); color: var(--ab-primary); }

.ab-editorial-cta {
  margin-top: var(--space-7); padding: var(--space-6);
  border-radius: var(--ab-radius); text-align: center;
  background: linear-gradient(135deg, var(--color-brand-soft), var(--color-accent-soft));
  border: 1px solid var(--ab-border);
}
.ab-editorial-cta p { max-width: 58ch; margin-inline: auto; line-height: 1.9; color: var(--ab-muted); }
.ab-competition-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; margin-top: var(--space-5); }

/* ── narrow screens ─────────────────────────────────────────────────────── */

@media (max-width: 47.9375rem) {
  .ab-editorial-toc ol { columns: 1; }
  .ab-editorial-hero h1 { max-width: none; }
  /* A three-column bar row cannot fit a 360px phone, and two columns are not
     enough either: the value string is nowrap, so it takes the row and leaves
     the bar a hairline. Stack all three instead. */
  .ab-figbar { grid-template-columns: 1fr; gap: var(--space-2); }
  .ab-figbar-label, .ab-figbar-value { grid-column: 1; justify-self: start; }
  .ab-figbar-value { white-space: normal; }
  .ab-fig, .ab-editorial-cta { padding: var(--space-4); }
  .ab-editorial-stat { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ab-editorial-route { transition: none; }
  .ab-editorial-route:hover { transform: none; }
}

/* ── hero motif, trial ribbon, CTA ──────────────────────────────────────── */

/* The hero is a two-column grid: the words, and an aside that holds the
   page's motif above its hard numbers. The motif used to be pinned
   absolutely to the far edge, which left a wide empty band between it and
   the text. Below 62rem the aside follows the text and the motif is dropped:
   a decorative mark competing with the H1 for a phone's width helps nobody. */
.ab-editorial-hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 1rem + 3vw, 3.5rem); align-items: center;
}
.ab-editorial-hero-copy { min-width: 0; }
.ab-editorial-hero-aside {
  position: relative; display: grid; gap: var(--space-4); padding: var(--space-5);
  border-radius: 24px;
  background:
    repeating-linear-gradient(to bottom, transparent 0 31px, color-mix(in srgb, var(--ab-primary) 7%, transparent) 31px 32px),
    var(--color-surface);
  box-shadow: 0 1px 0 var(--ab-border), 0 34px 70px -48px rgba(15, 33, 94, .55);
}
.ab-motif { display: flex; justify-content: center; pointer-events: none; padding-block: var(--space-4) var(--space-2); }
.ab-motif svg { width: min(100%, 15rem); height: auto; overflow: visible; }
/* In the aside the numbers read as a ledger: one per line, divided. */
.ab-editorial-hero-aside .ab-editorial-stats { display: grid; gap: 0; margin: 0; }
.ab-editorial-hero-aside .ab-editorial-stat {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: var(--space-3);
  padding: var(--space-3) 0; background: none; border: 0; border-top: 1.5px dashed var(--ab-border);
  border-radius: 0; box-shadow: none; min-width: 0;
}
.ab-editorial-hero-aside .ab-editorial-stat strong { font-size: 1.3rem; font-weight: 900; }
.ab-editorial-hero-aside .ab-editorial-stat span { margin: 0; }
.ab-editorial-hero-aside .ab-leak-privacy { margin: 0; max-width: none; }
.ab-editorial-hero h1 { max-width: none; }
@media (max-width: 61.9375rem) {
  .ab-editorial-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .ab-editorial-hero-aside .ab-motif { display: none; }
  .ab-editorial-hero-aside { padding: var(--space-4); }
}

.ab-motif-layer rect { fill: var(--ab-primary); opacity: .1; }
.ab-motif-layer:nth-child(1) rect { opacity: .10; }
.ab-motif-layer:nth-child(2) rect { fill: var(--color-accent); opacity: .16; }
.ab-motif-layer:nth-child(3) rect { fill: var(--ab-primary); opacity: .26; }
.ab-motif-layer:nth-child(4) rect { fill: var(--color-ember); opacity: .34; }
.ab-motif-layer { animation: ab-motif-settle 5.5s ease-in-out infinite; animation-delay: calc(var(--i) * .28s); }
@keyframes ab-motif-settle {
  0%, 100% { transform: translateY(0); }
  45%      { transform: translateY(-6px); }
}

.ab-motif-beam rect, .ab-motif-beam circle { fill: var(--ab-primary); opacity: .2; }
.ab-motif-beam circle:last-of-type { fill: var(--color-ember); opacity: .3; }
.ab-motif-pivot path { fill: var(--color-accent); opacity: .3; }
.ab-motif-beam { transform-origin: 110px 70px; animation: ab-motif-tip 7s ease-in-out infinite; }
@keyframes ab-motif-tip {
  0%, 100% { transform: rotate(-3.5deg); }
  50%      { transform: rotate(3.5deg); }
}

/* The trial offer sits directly under the lead, where a buyer deciding whether
   to keep reading can act on it without scrolling to the end. */
.ab-editorial-trial { margin-top: var(--space-5); }
.ab-editorial-trial a {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);
  text-decoration: none; font-size: .88rem; line-height: 1.7;
  color: var(--ab-ink); background: var(--color-surface);
  border: 1px solid var(--ab-border); border-inline-start: 4px solid var(--color-ember);
  border-radius: var(--ab-radius); padding: var(--space-3) var(--space-4);
  box-shadow: var(--ab-shadow-sm);
}
.ab-editorial-trial a:hover { border-color: var(--ab-primary); border-inline-start-color: var(--color-ember); }
.ab-editorial-trial strong { color: var(--ab-primary); }

.ab-cta-badge {
  display: inline-block; margin: 0 0 var(--space-3);
  font-size: .76rem; font-weight: 700; letter-spacing: .02em;
  color: var(--color-text-on-brand); background: var(--ab-primary);
  padding: var(--space-1) var(--space-4); border-radius: var(--radius-pill);
}
.ab-cta-alt { margin-top: var(--space-4); font-size: .84rem; color: var(--ab-muted); }
.ab-cta-alt a { color: var(--ab-primary); }

@media (prefers-reduced-motion: reduce) {
  .ab-motif-layer, .ab-motif-beam { animation: none; }
}

/* ── short answer ───────────────────────────────────────────────────────── */

/* The one passage written to be quoted on its own. It leads the body, above
   the advice box, and it is styled as an answer rather than a callout: a
   question as its heading, then plain prose, nothing to click. */
.ab-editorial-short {
  margin-bottom: var(--space-5); padding: var(--space-5);
  background: var(--color-surface); border: 1px solid var(--ab-border);
  border-radius: var(--ab-radius); box-shadow: var(--ab-shadow-sm);
}
.ab-editorial-short-kicker {
  margin: 0 0 var(--space-2); font-size: .76rem; font-weight: 700;
  color: var(--color-ember); letter-spacing: .02em;
}
.ab-editorial-short h2 { font-size: 1.15rem; line-height: 1.7; margin: 0 0 var(--space-3); }
.ab-editorial-short p:last-child { margin: 0; line-height: 2; }

/* ── guide motif: addons docking onto a core ────────────────────────────── */

.ab-motif-links path { stroke: var(--ab-primary); stroke-width: 2; stroke-dasharray: 4 5; opacity: .3; fill: none; }
.ab-motif-core { fill: var(--ab-primary); opacity: .28; }
.ab-motif-node rect { fill: var(--color-accent); opacity: .22; }
.ab-motif-node:nth-of-type(2n) rect { fill: var(--color-ember); opacity: .3; }
.ab-motif-node {
  animation: ab-motif-dock 6s ease-in-out infinite; animation-delay: calc(var(--i) * .6s);
  transform-box: fill-box; transform-origin: center;
}
@keyframes ab-motif-dock {
  0%, 100% { transform: scale(1); }
  40%      { transform: scale(1.12); }
}
@media (prefers-reduced-motion: reduce) { .ab-motif-node { animation: none; } }

/* ── product page → guides ──────────────────────────────────────────────── */

.ab-xlinks .ab-competition-grid { margin-top: var(--space-4); }
.ab-xlinks-more { justify-content: center; margin-top: var(--space-5); }

/* ── profit leak calculator ─────────────────────────────────────────────── */

.ab-leak-privacy {
  display: flex; gap: var(--space-3); align-items: flex-start;
  margin-top: var(--space-5); max-width: 42rem;
  font-size: .8rem; line-height: 1.8; color: var(--ab-muted);
  background: var(--color-surface); border: 1px solid var(--ab-border);
  border-inline-start: 4px solid var(--color-success);
  border-radius: var(--ab-radius); padding: var(--space-3) var(--space-4);
}
.ab-leak-privacy svg { flex: 0 0 1.25rem; width: 1.25rem; height: 1.25rem; fill: var(--color-success); margin-top: .2rem; }
.ab-leak-privacy strong { color: var(--ab-ink); }

.ab-leak { padding-block: var(--space-6); }
/* Form and result share a grid of their own, so the sticky result card is
   bounded by it and stops before the formula block instead of sliding over it. */
.ab-leak-main {
  display: grid; gap: var(--space-6); align-items: start;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  margin-bottom: var(--space-6);
}

.ab-leak-group {
  border: 1px solid var(--ab-border); border-radius: var(--ab-radius);
  background: var(--color-surface); padding: var(--space-5); margin: 0 0 var(--space-5);
  min-width: 0;
}
.ab-leak-group legend {
  display: flex; align-items: center; gap: var(--space-2);
  font-weight: 700; padding-inline: var(--space-2); margin-inline-start: calc(-1 * var(--space-2));
}
.ab-leak-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.6rem; height: 1.6rem; border-radius: 50%; font-size: .8rem;
  background: var(--ab-primary); color: var(--color-text-on-brand);
}

.ab-leak-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ab-leak-chip { position: relative; cursor: pointer; }
.ab-leak-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ab-leak-chip span {
  display: inline-block; font-size: .85rem; padding: var(--space-2) var(--space-4);
  border: 1px solid var(--ab-border); border-radius: var(--radius-pill);
  background: var(--ab-bg-alt); transition: background .15s, border-color .15s;
}
.ab-leak-chip input:checked + span { background: var(--ab-primary); border-color: var(--ab-primary); color: var(--color-text-on-brand); }
.ab-leak-chip input:focus-visible + span { outline: 2px solid var(--ab-primary); outline-offset: 2px; }

.ab-leak-field {
  display: grid; grid-template-columns: 1fr auto; gap: var(--space-1) var(--space-3);
  align-items: baseline; padding-block: var(--space-3);
  border-top: 1px solid var(--ab-border);
}
.ab-leak-group legend + .ab-leak-field { border-top: 0; padding-top: 0; }
.ab-leak-field label { font-size: .9rem; font-weight: 600; line-height: 1.7; }
.ab-leak-field output,
.ab-leak-pair output { font-weight: 700; color: var(--ab-primary); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: .9rem; }
/* Sliders run left to right even on this RTL page. Chrome fills an RTL range
   from the max side, so the coloured part grew as the value shrank; numbers
   read LTR in Persian too, so an LTR track is the one that matches them. */
.ab-leak-field input[type="range"] { grid-column: 1 / -1; width: 100%; accent-color: var(--ab-primary); margin: var(--space-2) 0 0; direction: ltr; }
.ab-leak-field small { grid-column: 1 / -1; font-size: .76rem; color: var(--ab-muted); line-height: 1.7; }
.ab-leak-pair { grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.ab-leak-pair > div { display: grid; grid-template-columns: 1fr auto; gap: var(--space-1) var(--space-3); align-items: baseline; }

.ab-leak-question { padding-block: var(--space-3); border-top: 1px solid var(--ab-border); }
.ab-leak-group legend + .ab-leak-question { border-top: 0; padding-top: 0; }
.ab-leak-question p { font-weight: 600; font-size: .9rem; margin: 0 0 var(--space-2); }
.ab-leak-option {
  display: flex; gap: var(--space-2); align-items: flex-start; cursor: pointer;
  font-size: .86rem; line-height: 1.7; padding: var(--space-1) 0;
}
.ab-leak-option input { accent-color: var(--ab-primary); margin-top: .35rem; flex-shrink: 0; }

/* The result panel follows the reader down the form on a wide screen, so each
   slider move is seen against the number it changes. */
.ab-leak-result {
  position: sticky; top: 5.5rem;
  background: var(--color-surface); border: 1px solid var(--ab-border);
  border-top: 4px solid var(--ab-primary);
  border-radius: var(--ab-radius); box-shadow: var(--ab-shadow-md, var(--ab-shadow-sm));
  padding: var(--space-5);
}
.ab-leak-label { display: block; font-size: .78rem; color: var(--ab-muted); font-weight: 600; }
.ab-leak-score { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-3); }
.ab-leak-score strong { font-size: 2.2rem; line-height: 1.2; color: var(--ab-primary); font-variant-numeric: tabular-nums; }
.ab-leak-score small { font-size: .8rem; color: var(--ab-muted); font-weight: 400; }
.ab-leak-band {
  font-size: .8rem; font-weight: 700; padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill); background: var(--color-brand-soft); color: var(--ab-primary);
}
.ab-leak-meter {
  height: .6rem; margin: var(--space-3) 0; border-radius: var(--radius-pill);
  background: var(--color-surface-sunken); overflow: hidden;
}
.ab-leak-meter span {
  display: block; height: 100%; border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--color-ember), var(--ab-primary));
  transition: width .25s ease;
}
.ab-leak-verdict { font-size: .85rem; line-height: 1.85; color: var(--ab-muted); margin: 0 0 var(--space-4); }

.ab-leak-total { padding-top: var(--space-4); border-top: 1px solid var(--ab-border); }
.ab-leak-total strong { display: block; font-size: 1.6rem; line-height: 1.4; color: var(--color-danger); font-variant-numeric: tabular-nums; }

.ab-leak-buckets { list-style: none; padding: 0; margin: var(--space-3) 0 var(--space-4); display: grid; gap: var(--space-3); }
.ab-leak-buckets li { display: grid; grid-template-columns: 1fr auto; gap: var(--space-1) var(--space-3); font-size: .84rem; }
.ab-leak-buckets strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ab-leak-track { grid-column: 1 / -1; height: .45rem; background: var(--color-surface-sunken); border-radius: var(--radius-pill); overflow: hidden; }
.ab-leak-track span { display: block; height: 100%; width: 0; background: var(--color-danger); opacity: .75; border-radius: var(--radius-pill); transition: width .25s ease; }

.ab-leak-compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin: 0; }
.ab-leak-compare > div { background: var(--ab-bg-alt); border-radius: var(--radius-2); padding: var(--space-3); }
.ab-leak-compare dt { font-size: .76rem; color: var(--ab-muted); line-height: 1.6; }
.ab-leak-compare dd { margin: var(--space-1) 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.ab-leak-compare dd.ab-leak-sub { font-weight: 400; font-size: .74rem; color: var(--ab-muted); }

.ab-leak-net {
  margin-top: var(--space-3); padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-2); border-inline-start: 4px solid var(--color-success);
  background: var(--ab-bg-alt);
}
.ab-leak-net[data-sign="neg"] { border-inline-start-color: var(--color-warning); }
.ab-leak-net span, .ab-leak-net small { display: block; font-size: .78rem; color: var(--ab-muted); line-height: 1.7; }
.ab-leak-net strong { display: block; font-size: 1.25rem; font-variant-numeric: tabular-nums; color: var(--color-success); }
.ab-leak-net[data-sign="neg"] strong { color: var(--color-warning); }

.ab-leak-hook { font-size: .86rem; line-height: 1.9; margin: var(--space-4) 0 var(--space-2); }
.ab-leak-hook:empty { display: none; }
.ab-leak-trade { font-size: .86rem; font-weight: 600; color: var(--ab-primary); text-decoration: none; }
.ab-leak-trade:hover { text-decoration: underline; }
.ab-leak-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.ab-leak-actions .ab-btn { flex: 1 1 10rem; justify-content: center; text-align: center; }

.ab-leak-noscript {
  padding: var(--space-4); border-radius: var(--ab-radius);
  background: var(--color-brand-soft); line-height: 1.9;
}

.ab-leak-formulas {
  background: var(--ab-bg-alt); border: 1px solid var(--ab-border);
  border-radius: var(--ab-radius); padding: var(--space-5);
}
.ab-leak-formulas h2 { font-size: 1.05rem; margin: 0 0 var(--space-4); }
.ab-leak-formulas dl { margin: 0; display: grid; gap: var(--space-3); }
.ab-leak-formulas dl > div { display: grid; grid-template-columns: 11rem 1fr; gap: var(--space-3); align-items: baseline; }
.ab-leak-formulas dt { font-weight: 600; font-size: .86rem; }
.ab-leak-formulas dd { margin: 0; font-size: .86rem; line-height: 1.9; font-variant-numeric: tabular-nums; }

.ab-leak-body { padding-top: 0; }

@media (max-width: 61.9375rem) {
  .ab-leak-main { grid-template-columns: 1fr; }
  .ab-leak-result { position: static; }
}
@media (max-width: 47.9375rem) {
  .ab-leak-group, .ab-leak-result, .ab-leak-formulas { padding: var(--space-4); }
  .ab-leak-pair, .ab-leak-compare { grid-template-columns: 1fr; }
  .ab-leak-formulas dl > div { grid-template-columns: 1fr; gap: var(--space-1); }
  .ab-leak-score strong { font-size: 1.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ab-leak-meter span, .ab-leak-track span, .ab-leak-chip span { transition: none; }
}

/* Printing is the calculator's "download a report": the browser builds the
   PDF, so nothing about the reader's numbers ever reaches a server. The print
   keeps the heading, the result and the worked formulas, and drops the form,
   the site chrome and anything clickable. */
@media print {
  .ab-header, .ab-footer, .ab-leak-form, .ab-leak-body,
  .ab-leak-actions, .ab-leak-trade, .ab-editorial-breadcrumb, .ab-leak-noscript,
  [class*="livechat"] { display: none !important; }
  .ab-leak, .ab-leak-main { display: block; padding: 0; }
  .ab-leak-result { position: static; box-shadow: none; break-inside: avoid; margin-bottom: 1rem; }
  .ab-leak-formulas { break-inside: avoid; }
  .ab-editorial-hero { background: none; padding-block: 0 1rem; }
  .ab-leak-privacy { max-width: none; }
}


/* ── comparison UI fixes, 1 Mehr 1405 ───────────────────────────────────── */

/* The hero ran the full container while the body is a 58rem column, so the
   stat cards and the disclosure hung wider than every heading below them.
   One column edge for the whole article; the calculator keeps the wide tool
   width because its hero sits over a two-column tool, not a text column. */
/* Hero and body share one 58rem column so the text edge lines up (the body
   stays at a readable line length); the calculator's hero spans the wide tool
   below it instead. */
.ab-editorial-hero .ab-container { max-width: 58rem; }
.ab-leak-hero .ab-container { max-width: var(--container, 1140px); }

/* `.ab-editorial-cta p` set the muted text colour and outranked the badge,
   which left grey text on the brand-blue pill. */
.ab-editorial-cta .ab-cta-badge { color: var(--color-text-on-brand); }

/* "soon": a dashed ring rather than a filled mark. It is not a yes, and a
   reader who only scans the marks must not count it as one. */
[data-state="soon"] .ab-matrix-mark {
  background: transparent; border: 2px dashed var(--color-accent);
  width: 1.05rem; height: 1.05rem;
}
.ab-matrix-legend li[data-state="soon"]::before {
  background: transparent; border: 2px dashed var(--color-accent);
  width: .7rem; height: .7rem;
}

/* two routes side by side */
.ab-fig-lanes { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--space-4); }
.ab-fig-lane {
  border: 1px solid var(--ab-border); border-radius: var(--radius-2);
  background: var(--color-surface-2); padding: var(--space-4) var(--space-4) var(--space-3);
  border-top: 4px solid var(--ab-primary);
}
.ab-fig-lane[data-tone="external"] { border-top-color: var(--color-ember); }
.ab-fig-lane-title { font-size: .95rem; margin: 0 0 var(--space-4); }
.ab-fig-lane[data-tone="external"] .ab-fig-timeline li::before { background: var(--color-ember); box-shadow: 0 0 0 3px var(--color-accent-soft); }
.ab-fig-lane[data-tone="external"] .ab-fig-when { color: var(--color-ember); }

/* calculator hero: a gauge whose needle keeps swinging back into the red */
.ab-motif-arc, .ab-motif-arc-leak { fill: none; stroke-width: 14; stroke-linecap: round; }
.ab-motif-arc { stroke: var(--ab-primary); opacity: .16; }
.ab-motif-arc-leak { stroke: var(--color-danger); opacity: .45; }
.ab-motif-needle path { stroke: var(--ab-primary); stroke-width: 5; stroke-linecap: round; opacity: .55; }
.ab-motif-needle circle { fill: var(--ab-primary); opacity: .55; }
.ab-motif-needle { transform-origin: 110px 124px; animation: ab-motif-swing 6s ease-in-out infinite; }
.ab-motif-drops circle { fill: var(--color-danger); opacity: .35; animation: ab-motif-drip 3s ease-in infinite; }
.ab-motif-drops circle:nth-child(2) { animation-delay: .8s; }
.ab-motif-drops circle:nth-child(3) { animation-delay: 1.6s; }
@keyframes ab-motif-swing {
  0%, 100% { transform: rotate(-58deg); }
  50%      { transform: rotate(38deg); }
}
@keyframes ab-motif-drip {
  0%   { transform: translateY(-6px); opacity: 0; }
  30%  { opacity: .4; }
  100% { transform: translateY(8px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ab-motif-needle, .ab-motif-drops circle { animation: none; }
}


/* ── hero typography and the trial row, in the home page's language ─────── */

.ab-editorial-hero h1 {
  font-weight: 900; font-size: clamp(1.7rem, 1.1rem + 2vw, 2.55rem);
  line-height: 1.5; letter-spacing: 0; margin: var(--space-3) 0 var(--space-4);
}
.ab-editorial-lead { font-weight: 300; }
/* The trial row runs the full width of the text column, like the start
   ticket on the home page, instead of floating at the width of its words. */
.ab-editorial-trial a {
  display: flex; width: 100%; box-sizing: border-box; justify-content: space-between; gap: var(--space-3);
  border-radius: 16px; padding: var(--space-3) var(--space-4);
}
.ab-editorial-trial a > span:last-child { margin-inline-start: auto; font-weight: 700; color: var(--ab-primary); }
