/* Approval-rate data pages (/planning-approval-rates/*), /reports and the 2026 approval-rates report, on the
   Site Plan design. Real numbers are the hero: a decision sheet of 100 dots (green = approved), count-ups, bars that
   draw themselves, and a dot plot of every council. Tokens only, so everything re-lights on night bands.

   Motion contract (views/approval/_gate.ejs + public/site/js/approval.js): the HTML always carries the end state.
   In motion mode only, the gate marks number and chart blocks .ar-w (waiting) before first paint; approval.js plays
   each one as it scrolls in and clears .ar-w. Crawlers, reduced motion and no-JS never wait. */

/* ---------- Hero: drawing-paper band ---------- */
.ar-hero {
  position: relative; overflow: hidden; background: var(--paper-2);
  padding: calc(var(--nav-clear, 88px) + clamp(16px, 2.6vw, 36px)) 0 clamp(56px, 7vw, 104px);
  border-bottom: 1px solid var(--rule);
}
.ar-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--scrim) 1px, transparent 1px), linear-gradient(90deg, var(--scrim) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(120% 90% at 75% 30%, #000 30%, transparent 78%); mask-image: radial-gradient(120% 90% at 75% 30%, #000 30%, transparent 78%);
}
.ar-hero > .wrap { position: relative; }
.ar-hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(32px, 5vw, 88px); align-items: center; }
.ar-hero-grid--solo { grid-template-columns: minmax(0, 1fr); max-width: 900px; }
.ar-hero-copy { display: grid; gap: 22px; align-content: start; min-width: 0; }
.ar-hero .h1 { font-size: clamp(40px, 5.2vw, 76px); line-height: .98; }
.ar-hero .lead strong { color: var(--ink); font-weight: 500; }
.ar-hero-byline { font: 12.5px/1.5 var(--font-mono); color: var(--ink-3); letter-spacing: 0; }

.ar-crumbs { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font: 12px/1.4 var(--font-mono); color: var(--ink-3); letter-spacing: 0; min-width: 0; }
.ar-crumbs a:hover { color: var(--ink); }
.ar-crumbs [aria-current] { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }

/* The hand-off to the council's search page (above the first statistic, tests/approval-cannibalisation.test.js) */
.ar-handoff {
  display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: center; max-width: 620px;
  padding: 14px 16px; border-radius: var(--r-lg); background: var(--sheet); box-shadow: var(--sh-2); color: var(--ink-2); font-size: 15.5px; line-height: 1.5;
}
.ar-handoff .ico-box { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber-ink); }
.ar-handoff a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ar-handoff a:hover { text-decoration-color: var(--ink); }

/* ---------- The decision sheet: 100 dots, one per 1% of decisions ---------- */
.ar-sheet {
  position: relative; background: var(--sheet); border-radius: var(--r-xl); box-shadow: var(--sh-3);
  padding: clamp(20px, 2.4vw, 30px); display: grid; gap: 18px; min-width: 0; max-width: 520px; justify-self: end; width: 100%;
  background-image: linear-gradient(var(--scrim) 1px, transparent 1px), linear-gradient(90deg, var(--scrim) 1px, transparent 1px); background-size: 20px 20px;
}
.ar-sheet-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding-bottom: 14px; border-bottom: 1px solid var(--rule); font: 11px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.ar-sheet-head b { color: var(--ink); font-weight: 500; }
.ar-sheet-big { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.ar-sheet-big .ar-num { font-family: var(--font-display); font-weight: 600; font-size: clamp(56px, 6.4vw, 92px); line-height: .9; letter-spacing: -0.05em; color: var(--green-ink); font-variant-numeric: tabular-nums; }
.ar-sheet-big p { color: var(--ink-2); font-size: 15px; line-height: 1.4; max-width: 22ch; }
.ar-waffle { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: clamp(6px, .7vw, 9px); width: min(100%, 300px); }
.ar-waffle i {
  display: block; aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-4); background: transparent;
  transition: transform 420ms var(--ease-spring), opacity 260ms var(--ease-out); transition-delay: calc(var(--k, 0) * 7ms);
}
.ar-waffle i.y { background: var(--green); box-shadow: none; }
.ar-waffle i.h { background: var(--green-wash); box-shadow: inset 0 0 0 1.5px var(--green); } /* the part-dot of a decimal rate */
.ar-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font: 12px/1.4 var(--font-mono); color: var(--ink-3); letter-spacing: 0; }
.ar-legend span { display: inline-flex; align-items: center; gap: 7px; }
.ar-legend i { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-4); }
.ar-legend i.y { background: var(--green); box-shadow: none; }
.ar-legend i.m { width: 14px; height: 0; border-radius: 0; border-top: 2px dashed var(--ink-2); box-shadow: none; }
.ar-stamp {
  position: absolute; right: clamp(16px, 2.4vw, 30px); bottom: clamp(52px, 5vw, 64px); transform: rotate(-8deg);
  padding: 6px 12px 5px; border: 2px solid var(--green); border-radius: 6px; outline: 1px solid var(--green); outline-offset: 3px;
  font: 500 13px/1.1 var(--font-mono); letter-spacing: .14em; color: var(--green-ink); text-align: center; background: color-mix(in srgb, var(--sheet) 86%, transparent);
  transition: transform 420ms var(--ease-spring) 820ms, opacity 200ms var(--ease-out) 820ms;
}
.ar-stamp small { display: block; font-size: 9px; letter-spacing: .12em; margin-top: 3px; }
.ar-w .ar-waffle i { transform: scale(0); opacity: 0; }
.ar-w .ar-stamp { transform: rotate(-14deg) scale(1.5); opacity: 0; }
.ar-sheet .drawing { margin: -6px 0 -4px; }

/* ---------- Stat tiles (count-ups) ---------- */
.ar-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.ar-stats > div { padding: clamp(18px, 2.4vw, 30px) clamp(14px, 2vw, 26px); border-left: 1px solid var(--rule); min-width: 0; }
.ar-stats > div:first-child { border-left: 0; padding-left: 0; }
.ar-stat-n { font-family: var(--font-display); font-weight: 600; font-size: clamp(34px, 3.6vw, 54px); line-height: 1; letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ar-stat-n.is-green { color: var(--green-ink); }
.ar-stat-l { margin-top: 10px; font-size: 15px; color: var(--ink-2); line-height: 1.35; }
.ar-stat-s { margin-top: 4px; font: 12px/1.4 var(--font-mono); color: var(--ink-3); letter-spacing: 0; }
.ar-source { margin-top: 14px; font: 12.5px/1.6 var(--font-mono); color: var(--ink-3); letter-spacing: 0; max-width: 90ch; }
.ar-source strong { color: var(--ink-2); font-weight: 500; }
[data-count] { font-variant-numeric: tabular-nums; }

/* ---------- Sections ---------- */
.ar-section { padding: clamp(48px, 6vw, 88px) 0; }
.ar-section:not(.ar-section--band) + .ar-section:not(.ar-section--band) { padding-top: 0; }
.ar-section--band { background: var(--paper-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.ar-head { display: grid; gap: 14px; max-width: 760px; margin-bottom: clamp(24px, 3vw, 40px); }
.ar-head .h3 { font-size: clamp(26px, 2.6vw, 38px); }
.ar-head p { color: var(--ink-2); max-width: 62ch; text-wrap: pretty; }
.ar-head--row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 32px; max-width: none; }
.ar-head--row > div { display: grid; gap: 12px; max-width: 760px; }
.ar-prose { color: var(--ink-2); font-size: 17px; line-height: 1.75; max-width: 70ch; display: grid; gap: 1em; }
.ar-prose strong { color: var(--ink); font-weight: 600; }
.ar-prose a, .ar-small a, .ar-links a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.ar-prose a:hover, .ar-small a:hover, .ar-links a:hover { text-decoration-color: var(--ink); }
.ar-small { font-size: 14.5px; line-height: 1.6; color: var(--ink-3); max-width: 80ch; }
.ar-links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 15px; color: var(--ink-2); }
.ar-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.ar-split > * { min-width: 0; }

/* ---------- Bars that draw themselves ---------- */
.ar-bars { display: grid; gap: 4px; }
.ar-bar { display: grid; grid-template-columns: minmax(0, 13em) minmax(0, 1fr) 4.6em; gap: 14px; align-items: center; padding: 7px 0; font-size: 15px; }
.ar-bar-l { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-bar-l a { color: var(--ink); }
.ar-bar-l a:hover { text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.ar-bar.is-me .ar-bar-l { color: var(--ink); font-weight: 600; }
.ar-track { position: relative; height: 12px; border-radius: 3px; background: var(--paper-3); }
.ar-fill {
  position: absolute; inset: 0 auto 0 0; width: var(--v, 0%); border-radius: 3px; background: var(--amber);
  transform-origin: left center; transition: transform 820ms var(--ease-draw); transition-delay: calc(min(var(--i, 0), 14) * 45ms);
}
.ar-fill.is-green { background: var(--green); }
.ar-bar:not(.is-me) .ar-fill.is-green.is-soft { background: color-mix(in srgb, var(--green) 45%, var(--paper-3)); }
.ar-mark { position: absolute; top: -5px; bottom: -5px; left: var(--m); width: 0; border-left: 2px dashed var(--ink-2); }
.ar-bar-v { text-align: right; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ar-bar-v.is-green { color: var(--green-ink); }
.ar-bars--tall .ar-track { height: 18px; }
.ar-w .ar-fill { transform: scaleX(0); }
.ar-axis { display: grid; grid-template-columns: minmax(0, 13em) minmax(0, 1fr) 4.6em; gap: 14px; margin-top: 6px; font: 11px/1 var(--font-mono); color: var(--ink-3); letter-spacing: 0; }
.ar-axis span:nth-child(2) { display: flex; justify-content: space-between; }

/* The verdict line under a comparison */
.ar-verdict { margin-top: 22px; padding: 16px 18px; border-radius: var(--r-md); background: var(--sheet); box-shadow: var(--sh-1); color: var(--ink); font-size: 17px; line-height: 1.5; }
.ar-verdict strong { font-weight: 600; background: linear-gradient(transparent 60%, var(--amber-soft) 60%); }
.ar-card { background: var(--sheet); border-radius: var(--r-lg); box-shadow: var(--sh-2); padding: clamp(20px, 2.4vw, 30px); min-width: 0; }
.ar-card > h3 { font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 14px; }

/* ---------- League tables: accessible, scroll inside themselves on phones ---------- */
.ar-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-lg); background: var(--sheet); box-shadow: var(--sh-1); overscroll-behavior-x: contain; }
.ar-table-wrap:focus-visible { box-shadow: var(--sh-1), var(--focus); }
.ar-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.ar-table caption { text-align: left; padding: 14px 18px 0; font: 12px/1.4 var(--font-mono); color: var(--ink-3); letter-spacing: 0; caption-side: top; }
.ar-table th, .ar-table td { padding: 12px 18px; text-align: left; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; white-space: nowrap; }
.ar-table thead th { position: sticky; top: 0; background: var(--paper-2); color: var(--ink-3); font: 500 11.5px/1.2 var(--font-mono); letter-spacing: .05em; text-transform: uppercase; border-bottom: 1px solid var(--rule); }
.ar-table tbody tr:last-child td { border-bottom: 0; }
.ar-table tbody tr { transition: background-color var(--dur-instant); }
.ar-table tbody tr:hover { background: var(--amber-wash); }
.ar-table .r { text-align: right; }
.ar-table .n { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ar-table td.n:first-child { font: 13px/1 var(--font-mono); letter-spacing: 0; width: 3.5em; }
.ar-table .c { font-weight: 600; color: var(--ink); white-space: normal; min-width: 11em; }
.ar-table .c a { color: var(--ink); text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: text-decoration-color var(--dur-quick); }
.ar-table .c a:hover, .ar-table tr:hover .c a { text-decoration-color: var(--amber); }
.ar-table .c small { display: block; margin-top: 2px; font: 400 12px/1.4 var(--font-mono); color: var(--ink-3); letter-spacing: 0; }
.ar-table .g { color: var(--green-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.ar-rate { display: inline-grid; grid-template-columns: 3.4em 96px; gap: 10px; align-items: center; justify-content: end; }
.ar-rate .ar-track { height: 8px; }
.ar-table th button { font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; display: inline-flex; align-items: center; gap: 6px; }
.ar-table th button::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: .35; }
.ar-table th[aria-sort="ascending"] button::after { transform: rotate(-135deg) translateY(-1px); opacity: 1; }
.ar-table th[aria-sort="descending"] button::after { opacity: 1; }
.ar-table th button:hover { color: var(--ink); }
.ar-scroll-note { display: none; margin-top: 10px; font: 12px/1.4 var(--font-mono); color: var(--ink-3); letter-spacing: 0; }

/* Scale tabs on /type/:scale */
.ar-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--sheet); box-shadow: var(--sh-1); margin-bottom: 18px; }
.ar-tabs a { padding: 8px 16px; border-radius: 10px; font-size: 15px; font-weight: 500; color: var(--ink-2); transition: background-color var(--dur-instant), color var(--dur-instant); }
.ar-tabs a:hover { color: var(--ink); background: var(--paper-2); }
.ar-tabs a[aria-current] { background: var(--ink); color: var(--paper); }

/* ---------- Lookup ---------- */
.ar-lookup { display: grid; gap: 8px; max-width: 560px; }
.ar-lookup label { font-weight: 600; color: var(--ink); font-size: 15px; }
.ar-lookup-row { position: relative; }
.ar-lookup-row .ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.ar-lookup .input { height: 54px; padding-left: 44px; font-size: 16px; border-radius: 14px; box-shadow: var(--sh-2); border-color: transparent; }
.ar-lookup p { font: 12px/1.5 var(--font-mono); color: var(--ink-3); letter-spacing: 0; }

/* ---------- Region cards ---------- */
.ar-regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ar-region { display: grid; gap: 10px; padding: 18px 18px 16px; border-radius: var(--r-lg); background: var(--sheet); box-shadow: var(--sh-1); transition: box-shadow var(--dur-quick) var(--ease-out), transform var(--dur-quick) var(--ease-out); }
.ar-region:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.ar-region b { font-weight: 600; color: var(--ink); font-size: 16px; display: flex; justify-content: space-between; gap: 8px; }
.ar-region b .ico { color: var(--ink-3); transition: transform var(--dur-quick) var(--ease-out), color var(--dur-quick); flex: none; margin-top: 3px; }
.ar-region:hover b .ico { transform: translateX(3px); color: var(--ink); }
.ar-region .ar-region-n { font-family: var(--font-display); font-weight: 600; font-size: 34px; line-height: 1; letter-spacing: -0.04em; color: var(--green-ink); }
.ar-region .ar-track { height: 6px; }
.ar-region small { font: 12px/1.4 var(--font-mono); color: var(--ink-3); letter-spacing: 0; }

/* ---------- Neighbour comparison chips ---------- */
.ar-near { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.ar-near a { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--r-md); background: var(--sheet); box-shadow: var(--sh-1); transition: box-shadow var(--dur-quick); }
.ar-near a:hover { box-shadow: var(--sh-2); }
.ar-near b { font-weight: 600; color: var(--ink); }
.ar-near span { color: var(--ink-3); font-size: 14px; }
.ar-near span strong { color: var(--green-ink); font-weight: 600; font-size: 18px; letter-spacing: -0.02em; margin-right: 4px; }

/* ---------- Live layer: activity in amber (new filings), areas and the register ---------- */
.ar-areas { display: flex; flex-wrap: wrap; gap: 8px; }
.ar-areas span { display: inline-flex; align-items: baseline; gap: 8px; padding: 7px 12px; border-radius: 10px; background: var(--sheet); box-shadow: var(--sh-1); font: 500 14px/1.2 var(--font-mono); color: var(--ink); letter-spacing: 0; }
.ar-areas span small { color: var(--amber-ink); font-size: 12px; }
.ar-register { display: grid; border-top: 1px solid var(--rule); }
.ar-register li { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 6px 20px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.ar-register time { font: 12.5px/1.6 var(--font-mono); color: var(--ink-3); letter-spacing: 0; padding-top: 2px; }
.ar-register b { display: block; font-weight: 500; color: var(--ink); line-height: 1.45; }
.ar-register p { margin-top: 4px; font-size: 14px; color: var(--ink-3); line-height: 1.5; }
.ar-register p a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 3px; }

/* ---------- Embed ---------- */
.ar-embed { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.ar-embed-code { display: grid; gap: 10px; min-width: 0; }
.ar-embed-code p { color: var(--ink-2); }
.ar-embed-code textarea {
  width: 100%; min-height: 108px; resize: vertical; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--rule-2);
  background: var(--paper-2); color: var(--ink-2); font: 13px/1.6 var(--font-mono); letter-spacing: 0;
}
.ar-embed-code textarea:focus { outline: none; border-color: var(--amber); box-shadow: var(--focus); }

/* ---------- FAQ (open by default, as before: every answer is in the page) ---------- */
.ar-faq details { border-top: 1px solid var(--rule); }
.ar-faq details:last-child { border-bottom: 1px solid var(--rule); }
.ar-faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; font-size: 18px; font-weight: 600; color: var(--ink); position: relative; letter-spacing: -0.01em; }
.ar-faq summary::-webkit-details-marker { display: none; }
.ar-faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -6px;
  background: linear-gradient(var(--ink-2), var(--ink-2)) center / 12px 1.5px no-repeat, linear-gradient(var(--ink-2), var(--ink-2)) center / 1.5px 12px no-repeat;
  transition: transform var(--dur-quick) var(--ease-out); }
.ar-faq details[open] summary::after { transform: rotate(45deg); }
.ar-faq details p { padding: 0 40px 22px 0; color: var(--ink-2); max-width: 70ch; line-height: 1.7; }

/* ---------- Method, note, sources ---------- */
.ar-method { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.ar-note { display: grid; gap: 10px; padding: 20px 22px; border-radius: var(--r-lg); background: var(--amber-wash); box-shadow: inset 0 0 0 1px var(--amber-soft); color: var(--ink-2); line-height: 1.6; }
.ar-note b { color: var(--ink); font-weight: 600; display: flex; gap: 8px; align-items: center; }
.ar-note b .ico { color: var(--amber-deep); }
.ar-sources { display: grid; gap: 12px; }
.ar-sources li { padding-left: 20px; position: relative; color: var(--ink-2); line-height: 1.6; }
.ar-sources li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.ar-sources a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* ---------- Close: amber field ---------- */
.ar-close { padding: clamp(64px, 8vw, 120px) 0; position: relative; overflow: hidden; }
.ar-close-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; }
.ar-close .h2 { font-size: clamp(34px, 4vw, 60px); max-width: 16ch; }
.ar-close p { color: var(--ink-2); font-size: 18px; margin-top: 14px; max-width: 48ch; }
.ar-close .btn { white-space: normal; height: auto; min-height: 56px; padding-top: 12px; padding-bottom: 12px; text-align: left; line-height: 1.25; }
.ar-close .btn .ico { flex: none; }
.ar-close .ar-small { color: var(--ink-2); margin-top: 18px; }
.ar-close .ar-small a { text-decoration-color: var(--ink); }

/* Night band (reports) */
.ar-night { border-radius: var(--r-xl); padding: clamp(24px, 3.4vw, 44px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 40px; align-items: center; overflow: hidden; position: relative; }
.ar-night h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(26px, 2.6vw, 38px); line-height: 1.06; letter-spacing: -0.03em; color: var(--ink); }
.ar-night p { color: var(--ink-2); margin-top: 10px; max-width: 60ch; }

/* ---------- Dot plot: every council on one axis ---------- */
.ar-plot-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
.ar-plot { width: 100%; min-width: 600px; height: auto; display: block; overflow: visible; }
.ar-plot .d { fill: var(--green); transition: transform 520ms var(--ease-spring), opacity 260ms var(--ease-out); transition-delay: calc(var(--c, 0) * 14ms + var(--r, 0) * 18ms); transform-box: fill-box; transform-origin: 50% 100%; }
.ar-plot .d.lo { fill: color-mix(in srgb, var(--green) 40%, var(--paper-3)); }
.ar-plot .axis { stroke: var(--ink-4); stroke-width: 1; }
.ar-plot .tick { stroke: var(--ink-4); stroke-width: 1; }
.ar-plot text { font-family: var(--font-mono); font-size: 11px; fill: var(--ink-3); }
.ar-plot text.lbl { fill: var(--ink); font-family: var(--font-sans); font-size: 12.5px; font-weight: 600; }
.ar-plot .avg { stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 4 4; transition: opacity 300ms var(--ease-out) 900ms; }
.ar-plot .lead { stroke: var(--ink-3); stroke-width: 1; }
.ar-plot .call { transition: opacity 300ms var(--ease-out) 1100ms; }
.ar-w .ar-plot .d { transform: translateY(-14px) scale(.2); opacity: 0; }
.ar-w .ar-plot .avg, .ar-w .ar-plot .call { opacity: 0; }

/* ---------- Report cards (/reports) ---------- */
.ar-feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); border-radius: var(--r-xl); overflow: hidden; background: var(--sheet); box-shadow: var(--sh-2); }
.ar-feature-copy { padding: clamp(24px, 3.4vw, 44px); display: grid; gap: 16px; align-content: start; }
.ar-feature-copy h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(28px, 3vw, 44px); line-height: 1.02; letter-spacing: -0.035em; color: var(--ink); }
.ar-feature-copy p { color: var(--ink-2); }
.ar-feature-copy .btn { justify-self: start; }
.ar-feature-art { background: var(--amber-field); padding: clamp(20px, 3vw, 36px); display: grid; align-content: center; gap: 16px; color: #111214; }
.ar-feature-art .ar-sheet { justify-self: stretch; max-width: none; box-shadow: 0 30px 60px -30px rgba(17, 18, 20, .45); }
.ar-mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.ar-mini-stats > div { padding: 16px 18px 4px 0; }
.ar-mini-stats > div + div { padding-left: 18px; border-left: 1px solid var(--rule); }
.ar-mini-stats dt { font: 11px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.ar-mini-stats dd { margin: 6px 0 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.ar-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ar-tile { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 6px 18px; padding: clamp(20px, 2.4vw, 28px); border-radius: var(--r-lg); background: var(--sheet); box-shadow: var(--sh-1); transition: box-shadow var(--dur-quick) var(--ease-out), transform var(--dur-quick) var(--ease-out); }
.ar-tile:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.ar-tile .ico-box { grid-row: span 2; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber-ink); }
.ar-tile h3 { font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: -0.02em; line-height: 1.2; color: var(--ink); display: flex; justify-content: space-between; gap: 10px; }
.ar-tile h3 .ico { flex: none; margin-top: 4px; color: var(--ink-3); transition: transform var(--dur-quick) var(--ease-out), color var(--dur-quick); }
.ar-tile:hover h3 .ico { transform: translateX(3px); color: var(--ink); }
.ar-tile p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.ar-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.ar-pills span { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 10px; font-size: 13.5px; font-weight: 500; background: var(--paper-2); color: var(--ink-2); }

/* Ranking panels (report) */
.ar-ranks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ar-ranks ol { display: grid; gap: 0; counter-reset: rk; }
.ar-ranks li { counter-increment: rk; display: grid; grid-template-columns: 1.8em minmax(0, 1fr); gap: 2px 8px; padding: 11px 0; border-top: 1px solid var(--rule-soft); }
.ar-ranks li::before { content: counter(rk, decimal-leading-zero); grid-row: span 2; font: 12px/1.7 var(--font-mono); color: var(--amber-ink); letter-spacing: 0; }
.ar-ranks li strong { font-weight: 600; color: var(--ink); }
.ar-ranks li span { font-size: 14px; color: var(--ink-3); }

/* Report table toolbar */
.ar-toolbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.ar-toolbar .ar-lookup-row { width: min(320px, 100%); }
.ar-toolbar .input { height: 46px; padding-left: 42px; border-radius: 12px; }
.ar-toolbar output { font: 12.5px/1.4 var(--font-mono); color: var(--ink-3); letter-spacing: 0; white-space: nowrap; }
.ar-report-table { min-width: 940px; }

/* ---------- Instant: anything skipped past lands in its end state ---------- */
.ar-instant .ar-waffle i, .ar-instant .ar-stamp, .ar-instant .ar-fill, .ar-instant .ar-plot .d, .ar-instant .ar-plot .avg, .ar-instant .ar-plot .call,
.pw-static .ar-waffle i, .pw-static .ar-stamp, .pw-static .ar-fill, .pw-static .ar-plot * { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .ar-waffle i, .ar-stamp, .ar-fill, .ar-plot .d, .ar-plot .avg, .ar-plot .call { transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .ar-hero-grid, .ar-split, .ar-method, .ar-feature { grid-template-columns: minmax(0, 1fr); }
  .ar-sheet { justify-self: start; }
  .ar-ranks { grid-template-columns: minmax(0, 1fr); }
  .ar-night { grid-template-columns: minmax(0, 1fr); }
  .ar-night .btn { justify-self: start; }
}
@media (max-width: 760px) {
  .ar-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ar-stats > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .ar-stats > div:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .ar-bar, .ar-axis { grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr) 3.9em; gap: 10px; font-size: 14px; }
  .ar-embed { grid-template-columns: minmax(0, 1fr); }
  .ar-close-inner { grid-template-columns: minmax(0, 1fr); }
  .ar-cards { grid-template-columns: minmax(0, 1fr); }
  .ar-mini-stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ar-mini-stats > div:nth-child(3) { grid-column: 1 / -1; padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .ar-register li { grid-template-columns: minmax(0, 1fr); }
  .ar-scroll-note { display: block; }
  .ar-table .hide-sm { display: none; }
  .ar-rate { grid-template-columns: 3.4em 48px; gap: 8px; }
  .ar-card .ar-table th, .ar-card .ar-table td { padding-left: 10px; padding-right: 10px; }
  .ar-table th, .ar-table td { padding: 11px 14px; }
  .ar-close .btn { width: 100%; }
}
@media (max-width: 420px) {
  .ar-sheet-big .ar-num { font-size: 64px; }
  .ar-stat-n { font-size: 32px; }
  .ar-crumbs [aria-current] { max-width: 24ch; }
}

/* count-ups keep their box while they run (the gate pins the width) */
[data-count] { display: inline-block; }
.ar-note-h { display: flex; gap: 8px; align-items: center; font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -0.015em; color: var(--ink); }
.ar-note-h .ico { color: var(--amber-deep); }
.ar-note .link { font-weight: 500; }
.ar-elev { aspect-ratio: 640 / 430; }
.ar-elev .drawing { width: 100%; }
.ar-faq--static > div { border-top: 1px solid var(--rule); padding: 18px 0; }
.ar-faq--static > div:last-child { border-bottom: 1px solid var(--rule); }
.ar-faq--static h3 { font-size: 18px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; margin-bottom: 8px; }
.ar-faq--static p { color: var(--ink-2); line-height: 1.7; }
.ar-ranks .ar-card > h3 { margin-bottom: 6px; }
.ar-night .ar-tile-ico { display: block; }
.ar-table td.c a { font-weight: 600; }
.ar-table td .g strong, .ar-table strong.g { font-weight: 600; }
:is(.page-approval, .page-reports, .page-report) :is(strong, b, th) { font-weight: 600; }
