/* /iran/: the topic page ("Weight" design) on top of /style.css. Each estimate is a large numeral on a plate; the
   numeral's weight, its ink and the plate's fill all follow the probability, and a dashed line marks the normal
   level. Colours come only from the site tokens in style.css (light and dark). Only /iran/ loads this file. */
@property --p { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --n { syntax: '<integer>'; inherits: false; initial-value: 0; }

.w-page { --w-ease: cubic-bezier(.16, .84, .24, 1); }

/* ---------- head ---------- */
.w-head { padding-block: 24px 0; }
@media (min-width: 768px) { .w-head { padding-block: 40px 0; } }
.w-head h1 { margin-bottom: 8px; }
.w-tag { color: var(--text-2); max-width: 36rem; margin-bottom: 6px; }
.w-page .notice { margin-block: 10px 8px; }

.w-health { margin: 0; }
.w-health.on { margin-block: 8px; padding: 8px 0; border-block: 1px solid var(--line); color: var(--warn); font-weight: 600; font-size: 0.875rem; }

/* ---------- the bar: horizon toggle and the update time, right above the numbers ---------- */
.w-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-block: 12px 16px; }
.w-updated { margin: 0; color: var(--muted); font-size: 0.875rem; min-height: 1.5em; font-variant-numeric: tabular-nums; }
.w-seg { display: inline-flex; align-items: center; border: 1px solid var(--text); border-radius: var(--radius); }
.w-seg-l { padding-inline: 12px; font-size: 0.8125rem; color: var(--muted); }
.w-seg button { min-height: 44px; min-width: 44px; padding-inline: 16px; font: 600 0.9375rem var(--sans); color: var(--text); background: none; border: 0; border-inline-start: 1px solid var(--text); cursor: pointer; }
.w-seg button:hover { background: var(--surface-2); }
.w-seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.w-seg button:focus-visible { outline-offset: 2px; }
.w-page #status:empty { min-height: 0; margin: 0; }

/* ---------- plates ---------- */
.w-plates { display: grid; gap: 24px; }
.w-plates:empty { min-height: 110vh; } /* space kept while the data loads: nothing below shifts */
@media (min-width: 880px) { .w-plates, .w-cols { grid-template-columns: 1fr 1fr; column-gap: 56px; } }
.w-plate {
  position: relative; overflow: hidden; container-type: inline-size; min-width: 0;
  border-top: 2px solid var(--rule); transition: --p 1.6s var(--w-ease);
}
.w-pre .w-plate { --p: 0 !important; }
.w-level { position: absolute; inset: 0; background: var(--accent-soft); transform: scaleY(var(--p)); transform-origin: bottom; } /* transform, not height: no layout shift */
.w-base { position: absolute; inset-inline: 0; bottom: calc(var(--b, 0) * 100%); border-top: 1px dashed var(--series-2); }
.w-base span { position: absolute; inset-inline-end: 12px; bottom: 4px; font-size: 0.75rem; color: var(--muted); }
.w-pbody { position: relative; display: flex; flex-direction: column; min-height: 28rem; padding: 14px 0 40px; }
@media (min-width: 880px) { .w-pbody { min-height: 32rem; padding-inline: 0 12px; } }
.w-pbody h2 { margin: 0; font: 600 1.25rem/1.3 var(--sans); letter-spacing: 0; }
.w-q { margin: 4px 0 0; color: var(--muted); font-size: 0.875rem; max-width: 30rem; }
.w-within { margin: 14px 0 0; color: var(--text-2); font-size: 0.9375rem; }
.w-fig {
  margin: 4px 0 0; display: flex; direction: ltr; align-items: flex-start; padding-inline: 0.06em;
  font-family: var(--serif); font-size: clamp(7rem, 40cqi, 14rem); line-height: 0.84; letter-spacing: -0.02em;
  font-weight: calc(300 + var(--p) * 600); font-variant-numeric: lining-nums tabular-nums;
  color: var(--text);
  color: color-mix(in oklab, var(--text) calc(55% + var(--p) * 45%), var(--bg));
}
[dir="rtl"] .w-fig { justify-content: flex-end; }
.w-digits { display: inline-block; inline-size: calc(var(--nd, 2) * 0.62em); text-align: right; white-space: nowrap; --n: calc(var(--p) * 100); counter-reset: n var(--n); }
.w-count .w-digits .w-dn { display: none; }
.w-count .w-digits::before { content: counter(n); }
.w-pc { font-size: 0.36em; font-weight: 400; margin-top: 0.14em; margin-inline-start: 0.04em; }
.w-words { margin: 12px 0 0; font-size: 1.1875rem; }
.w-words strong { font-weight: 600; }
.w-delta { margin: 4px 0 0; color: var(--text-2); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.w-rise { color: var(--accent); font-weight: 600; }
.w-other { margin: 12px 0 0; font: 400 1.5rem/1.2 var(--serif); }
.w-sig { margin: auto 0 0; padding-top: 12px; }
.w-sig a { display: inline-block; padding-block: 10px; font-weight: 600; font-size: 0.9375rem; }

/* ---------- sections ---------- */
.w-sec { margin-top: 56px; }
.w-sec > h2 { margin: 0; padding-top: 12px; border-top: 2px solid var(--rule); font: 400 clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem)/1.15 var(--serif); max-width: 40rem; }
.w-hint { color: var(--muted); font-size: 0.9375rem; margin: 8px 0 0; max-width: 40rem; }
.w-cols { display: grid; gap: 32px; margin-top: 20px; }
.w-col { min-width: 0; container-type: inline-size; }
.w-col > h3 { margin: 0 0 8px; }

/* history: latest point in the accent; a slow pulse only when the data is fresh (two beats, under 5 s; none with reduced motion) */
.w-page .chart .baseline-mark { stroke: var(--series-2); }
.w-col .chart-plot svg circle.dot.s1:not([visibility]) { fill: var(--accent); }
.w-fresh .chart-plot svg circle.dot.s1:not([visibility]) { stroke: var(--accent); stroke-opacity: 0.3; stroke-width: 6; animation: w-pulse 2.4s ease-in-out 2; }
@keyframes w-pulse {
  0% { stroke-width: 2; stroke-opacity: 0.5; }
  60% { stroke-width: 16; stroke-opacity: 0; }
  100% { stroke-width: 6; stroke-opacity: 0.3; }
}

/* danger window: five shares, each figure as heavy as its share, the peak underlined */
.w-wrow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.w-wrow li { display: flex; flex-direction: column; gap: 4px; padding: 12px 6px; border-inline-start: 1px solid var(--line); min-width: 0; }
.w-wrow li:first-child { border-inline-start: 0; padding-inline-start: 0; }
.w-ws { font-family: var(--serif); font-size: clamp(1.25rem, 8cqi, 3rem); line-height: 1; font-weight: calc(300 + var(--s, 0) * 600); font-variant-numeric: lining-nums; white-space: nowrap; }
.w-wd { font-size: 0.75rem; color: var(--muted); line-height: 1.35; }
.w-wp { font-size: 0.75rem; font-weight: 600; color: var(--accent); }
.w-pk .w-ws { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.12em; }
.w-peakline { margin: 8px 0 0; font-size: 0.875rem; color: var(--text-2); }

/* what changed and why */
.w-why p { max-width: 36rem; }
.w-why details { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 8px; }
.w-why details summary { cursor: pointer; color: var(--text-2); padding-block: 8px; }
.w-why details p { font-size: 0.9375rem; color: var(--text-2); }
.w-why > p:last-child > a { display: inline-block; padding-block: 10px; font-weight: 600; }

/* share, then the cards: Iran in numbers, alerts, family circle, the boom group */
.w-share { margin-top: 40px; }
.w-promos { margin-top: 24px; }
.w-promos .card { margin-block: 0; }
.w-page #indicators { margin-top: 32px; }

/* the global reduced-motion rule in style.css already stops these; repeated here so this file stands alone */
@media (prefers-reduced-motion: reduce) {
  .w-plate { transition: none; }
  .w-fresh .chart-plot svg circle.dot.s1:not([visibility]) { animation: none; }
}
