/* HDFC · Accessibility as part of done (case-study-modern-experience-accessibility).
   Markup: site/content/a11y-hero.mjs (hero) and
   site/content/pages/case-study-modern-experience-accessibility.mjs (story).
   Motion: assets/js/accessibility.js.

   1. Hero (.a11h): a bill form in 3D, a speech bubble that follows focus, and the audit
      card. Scene states are set on the root by the script: data-scene, data-focus,
      data-say, data-error, data-press. With no data-scene (no JavaScript, or reduced
      motion) a still frame shows. Only transform and opacity animate.
   2. Story figures (.a11-*): who it is for, WCAG in plain words, common issues, goals,
      annotations, the working form, results.
   3. Reduced motion, forced colours, print.

   Product colours on white, with their contrast ratios:
   text #111827 17.7:1 · labels #374151 10.3:1 · hints #4b5563 7.6:1 · errors #b42318 6.6:1 ·
   button text on #1c3fca 8.0:1 · field borders #8a94a6 3.1:1. */

/* Only this page loads the file, so the product colours live on :root. */
:root {
  --a11-blue: #1c3fca;
  --a11-ink: #111827;
  --a11-label: #374151;
  --a11-hint: #4b5563;
  --a11-border: #8a94a6;
  --a11-err: #b42318;
  --a11-err-bg: #fef3f2;
  --a11-ok: #15803d;
  --a11-violet: #6d5ef6;
  --a11-teal: #0e7490;
  --a11-amber: #b45309;
  --a11-out: cubic-bezier(.16, 1, .3, 1);
  --a11-move: cubic-bezier(.65, 0, .35, 1);
  --a11-pop: cubic-bezier(.34, 1.56, .64, 1);
}

/* ==========================================================================
   1. Hero
   ========================================================================== */

/* No stage box: the scene floats on the page, like the other HDFC heroes. */
.sf-design-preview .sf-preview-stage--live:has(> .a11h) {
  display: block; height: auto; min-height: 0; padding: 0; overflow: visible;
  border: 0; border-radius: 0; background: none; box-shadow: none;
}
.sf-design-preview .sf-preview-stage--live:has(> .a11h)::before,
.sf-design-preview .sf-preview-stage--live:has(> .a11h)::after { content: none; }

.a11h {
  container: a11h / inline-size;
  position: relative;
  width: 100%;
  -webkit-user-select: none;
  user-select: none;
}
.a11h__scene {
  --sw: 600;
  --u: calc(100cqw / var(--sw));
  position: relative;
  height: calc(var(--u) * 572);
  perspective: calc(var(--u) * 1700);
  perspective-origin: 42% 40%;
  font-family: var(--sf-font);
}

/* Ambient: one soft glow behind the form. */
.a11h__glow {
  position: absolute;
  left: calc(var(--u) * 10);
  top: calc(var(--u) * 20);
  width: calc(var(--u) * 560);
  height: calc(var(--u) * 480);
  border-radius: 50%;
  background:
    radial-gradient(closest-side at 38% 42%, rgba(109, 94, 246, .42), transparent),
    radial-gradient(closest-side at 70% 70%, rgba(28, 63, 202, .3), transparent);
  filter: blur(calc(var(--u) * 30));
  opacity: .8;
  pointer-events: none;
}
html:not(.dark) .a11h__glow { opacity: .45; }

.a11h__float { position: absolute; inset: 0; transform-style: preserve-3d; transition: opacity .8s ease, transform 1.2s var(--a11-out); }
.a11h.is-armed:not(.is-in) .a11h__float { opacity: 0; transform: translate3d(0, calc(var(--u) * 24), 0); }
@media (prefers-reduced-motion: no-preference) {
  .a11h.is-in .a11h__float { animation: a11h-float 9s ease-in-out infinite; }
  .a11h.is-in .a11h__glow { animation: a11h-glow 14s ease-in-out infinite; }
}
@keyframes a11h-float { 50% { transform: translate3d(0, calc(var(--u) * -8), 0); } }
@keyframes a11h-glow { 50% { transform: translate3d(calc(var(--u) * 18), calc(var(--u) * -10), 0) scale(1.06); } }

.a11h__tilt {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform-origin: calc(var(--u) * 236) calc(var(--u) * 258);
  transform: rotateX(9deg) rotateY(-15deg);
}
.a11h__shadow {
  position: absolute;
  left: calc(var(--u) * 40);
  top: calc(var(--u) * 30);
  width: calc(var(--u) * 392);
  height: calc(var(--u) * 456);
  border-radius: calc(var(--u) * 22);
  background: radial-gradient(closest-side, rgba(15, 12, 50, .45), transparent);
  filter: blur(calc(var(--u) * 20));
  transform: translateZ(calc(var(--u) * -40)) translateY(calc(var(--u) * 24)) scale(1.04);
}

/* ---- The form (a product screen, light in both themes) ------------------- */
.a11h-card {
  position: absolute;
  left: calc(var(--u) * 40);
  top: calc(var(--u) * 30);
  width: calc(var(--u) * 392);
  height: calc(var(--u) * 456);
  border-radius: calc(var(--u) * 20);
  background: #fff;
  box-shadow: 0 0 0 calc(var(--u) * 1) rgba(17, 24, 39, .06), 0 calc(var(--u) * 28) calc(var(--u) * 56) rgba(17, 24, 39, .22);
  color: var(--a11-ink);
  transform-style: preserve-3d;
}
.a11h-head { position: absolute; left: calc(var(--u) * 24); top: calc(var(--u) * 22); display: grid; grid-template-columns: auto 1fr; column-gap: calc(var(--u) * 12); align-items: center; }
.a11h-head__icon { grid-row: span 2; display: grid; place-items: center; width: calc(var(--u) * 40); height: calc(var(--u) * 40); border-radius: calc(var(--u) * 11); background: #eef1fd; color: var(--a11-blue); }
.a11h-head__icon svg { width: calc(var(--u) * 22); height: calc(var(--u) * 22); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.a11h-head__title { font-size: calc(var(--u) * 21); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
.a11h-head__sub { color: var(--a11-hint); font-size: calc(var(--u) * 12.5); font-weight: 500; line-height: 1.3; }
.a11h-rule-line { position: absolute; left: calc(var(--u) * 24); right: calc(var(--u) * 24); top: calc(var(--u) * 78); height: calc(var(--u) * 1); background: #e5e7eb; }

.a11h-label, .a11h-box, .a11h-btn, .a11h-error {
  position: absolute;
  left: calc(var(--l) * var(--u));
  top: calc(var(--t) * var(--u));
}
.a11h-box, .a11h-btn { width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u)); }
.a11h-label { display: flex; align-items: baseline; gap: calc(var(--u) * 8); color: var(--a11-label); font-size: calc(var(--u) * 13.5); font-weight: 600; line-height: calc(var(--u) * 18); white-space: nowrap; }
.a11h-label i { color: var(--a11-hint); font-size: calc(var(--u) * 11.5); font-style: normal; font-weight: 500; }
.a11h-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 calc(var(--u) * 14);
  border: calc(var(--u) * 1.5) solid var(--a11-border);
  border-radius: calc(var(--u) * 9);
  background: #fff;
}
.a11h-box::after {
  content: "";
  position: absolute;
  inset: calc(var(--u) * -1.5);
  border: calc(var(--u) * 2.5) solid var(--a11-err);
  border-radius: inherit;
  opacity: 0;
  transition: opacity .3s ease;
}
.a11h-value { font-size: calc(var(--u) * 15); font-weight: 500; white-space: nowrap; }
.a11h-chev { width: calc(var(--u) * 16); height: calc(var(--u) * 16); fill: none; stroke: var(--a11-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.a11h-caret { width: calc(var(--u) * 2); height: calc(var(--u) * 20); background: var(--a11-ink); opacity: 0; }
.a11h-btn {
  display: grid;
  place-items: center;
  border-radius: calc(var(--u) * 10);
  background: var(--a11-blue);
  color: #fff;
  font-size: calc(var(--u) * 15);
  font-weight: 700;
  transition: transform .16s ease;
}
.a11h-error {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 7);
  color: var(--a11-err);
  font-size: calc(var(--u) * 13);
  font-weight: 600;
  line-height: calc(var(--u) * 20);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(calc(var(--u) * -6));
  transition: opacity .35s ease, transform .45s var(--a11-out);
}
.a11h-alert { width: calc(var(--u) * 17); height: calc(var(--u) * 17); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ---- Focus ring: one for the fields (it glides down the form), one for the button */
.a11h-ring {
  position: absolute;
  border: calc(var(--u) * 3) solid var(--a11-blue);
  border-radius: calc(var(--u) * 13);
  box-shadow: 0 0 0 calc(var(--u) * 6) rgba(28, 63, 202, .14);
  opacity: 0;
  pointer-events: none;
}
.a11h-ring--field {
  left: calc(var(--u) * 19);
  top: calc(var(--u) * 113);
  width: calc(var(--u) * 354);
  height: calc(var(--u) * 56);
  transform: translateY(0);
  transition: transform .55s var(--a11-move), opacity .3s ease;
}
.a11h-ring--btn {
  left: calc(var(--u) * 19);
  top: calc(var(--u) * 379);
  width: calc(var(--u) * 170);
  height: calc(var(--u) * 58);
  border-radius: calc(var(--u) * 14);
  transform: scale(1.08);
  transition: transform .4s var(--a11-out), opacity .25s ease;
}

/* ---- What a screen reader says: one bubble that follows focus ------------- */
.a11h-say {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 9);
  padding: calc(var(--u) * 8) calc(var(--u) * 16) calc(var(--u) * 8) calc(var(--u) * 8);
  border-radius: calc(var(--u) * 14);
  background: #0b1220;
  box-shadow: 0 calc(var(--u) * 16) calc(var(--u) * 30) rgba(11, 18, 32, .35);
  color: #fff;
  white-space: nowrap;
  opacity: 0;
  transform: translate(calc(var(--u) * 210), calc(var(--u) * 72)) translateZ(calc(var(--u) * 40));
  transition: transform .55s var(--a11-move), opacity .3s ease;
}
.a11h-say::before {
  /* Tail, pointing at the control. */
  content: "";
  position: absolute;
  left: calc(var(--u) * 26);
  bottom: calc(var(--u) * -6);
  width: calc(var(--u) * 14);
  height: calc(var(--u) * 14);
  border-radius: calc(var(--u) * 2);
  background: inherit;
  transform: rotate(45deg);
}
.a11h-say__key { position: relative; display: grid; flex: none; min-width: calc(var(--u) * 50); padding: calc(var(--u) * 4) calc(var(--u) * 8); border-radius: calc(var(--u) * 7); background: #fff; box-shadow: inset 0 calc(var(--u) * -2) 0 #c7cdd9; color: var(--a11-ink); font-size: calc(var(--u) * 11.5); font-weight: 800; text-align: center; transition: transform .12s ease-out; }
.a11h-say__key.is-press { transform: translateY(calc(var(--u) * 2)) scale(.94); }
.a11h-say__tab, .a11h-say__enter { grid-area: 1 / 1; transition: opacity .2s ease; }
.a11h-say__enter { opacity: 0; }
.a11h-speak, .a11h-say .a11h-alert { flex: none; width: calc(var(--u) * 18); height: calc(var(--u) * 18); fill: none; stroke: #a5b4fc; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: opacity .2s ease; }
.a11h-say .a11h-alert { position: absolute; left: calc(var(--u) * 67); opacity: 0; stroke: #fca5a5; }
.a11h-say__lines { display: grid; }
.a11h-say__line { grid-area: 1 / 1; font-size: calc(var(--u) * 14.5); font-weight: 600; line-height: 1.3; opacity: 0; transform: translateY(calc(var(--u) * 6)); transition: opacity .25s ease, transform .35s var(--a11-out); }
.a11h-say__line.is-on { opacity: 1; transform: none; }

/* ---- The proof: the audit card -------------------------------------------- */
.a11h-result {
  position: absolute;
  left: calc(var(--u) * 332);
  top: calc(var(--u) * 404);
  width: calc(var(--u) * 256);
  display: grid;
  gap: calc(var(--u) * 6);
  padding: calc(var(--u) * 16) calc(var(--u) * 18) calc(var(--u) * 18);
  border-radius: calc(var(--u) * 20);
  background: linear-gradient(140deg, #2a1f6e, #3a2bb0 55%, #1c3fca);
  box-shadow: inset 0 0 0 calc(var(--u) * 1) rgba(255, 255, 255, .14), 0 calc(var(--u) * 22) calc(var(--u) * 44) rgba(28, 22, 90, .45);
  color: #fff;
  transform: translateZ(calc(var(--u) * 90));
  transition: transform .8s var(--a11-pop);
}
.a11h-result__top { display: flex; align-items: center; justify-content: space-between; gap: calc(var(--u) * 8); }
.a11h-aa { display: inline-flex; align-items: center; gap: calc(var(--u) * 4); padding: calc(var(--u) * 3) calc(var(--u) * 9) calc(var(--u) * 3) calc(var(--u) * 5); border-radius: calc(var(--u) * 99); background: rgba(255, 255, 255, .16); font-size: calc(var(--u) * 11.5); font-weight: 800; letter-spacing: .04em; }
.a11h-aa svg { width: calc(var(--u) * 15); height: calc(var(--u) * 15); fill: none; stroke: #86efac; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.a11h-result__who { color: rgba(255, 255, 255, .72); font-size: calc(var(--u) * 11.5); font-weight: 600; }
.a11h-result__nums { display: flex; align-items: center; gap: calc(var(--u) * 10); margin-top: calc(var(--u) * 4); }
.a11h-result__before, .a11h-result__after { font-weight: 850; line-height: 1; letter-spacing: -.03em; }
.a11h-result__before { position: relative; font-size: calc(var(--u) * 44); transform-origin: 0 60%; transition: opacity .5s ease, transform .6s var(--a11-out); }
.a11h-result__before::after {
  /* The strike-through, drawn when the after number arrives. */
  content: "";
  position: absolute;
  left: calc(var(--u) * -3);
  right: calc(var(--u) * -3);
  top: 52%;
  height: calc(var(--u) * 3);
  border-radius: calc(var(--u) * 2);
  background: #fca5a5;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .45s var(--a11-out) .15s;
}
.a11h-arrow { flex: none; width: calc(var(--u) * 22); height: calc(var(--u) * 22); fill: none; stroke: rgba(255, 255, 255, .75); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: translateX(calc(var(--u) * -18)); transition: opacity .35s ease, transform .5s var(--a11-out); }
.a11h-result__after { color: #86efac; font-size: calc(var(--u) * 48); opacity: 0; transform: translateX(calc(var(--u) * -18)); transition: opacity .35s ease .1s, transform .5s var(--a11-out) .1s; }
.a11h-lt { transition: opacity .25s ease; }
.a11h.is-counting .a11h-lt { opacity: 0; }
.a11h-result__label { display: grid; color: rgba(255, 255, 255, .82); font-size: calc(var(--u) * 12.5); font-weight: 500; line-height: 1.35; }
.a11h-result__label > span { grid-area: 1 / 1; transition: opacity .35s ease; }
.a11h-result__label .is-after { opacity: 0; }

/* After: the old number shrinks and is struck through; the new one arrives. Still frame too. */
.a11h[data-scene="result"] .a11h-result, .a11h:not([data-scene]) .a11h-result { transform: translateZ(calc(var(--u) * 110)) scale(1.03); }
.a11h[data-scene="result"] .a11h-result__before, .a11h:not([data-scene]) .a11h-result__before { opacity: .6; transform: scale(.62); }
.a11h[data-scene="result"] .a11h-result__before::after, .a11h:not([data-scene]) .a11h-result__before::after { transform: scaleX(1); }
.a11h[data-scene="result"] :is(.a11h-arrow, .a11h-result__after), .a11h:not([data-scene]) :is(.a11h-arrow, .a11h-result__after) { opacity: 1; transform: translateX(calc(var(--u) * -34)); }
.a11h[data-scene="result"] .a11h-result__label .is-before, .a11h:not([data-scene]) .a11h-result__label .is-before { opacity: 0; }
.a11h[data-scene="result"] .a11h-result__label .is-after, .a11h:not([data-scene]) .a11h-result__label .is-after { opacity: 1; }

/* ---- Scene states --------------------------------------------------------- */
/* Focus. Still frame: back on Amount after the error. */
.a11h[data-focus="1"] .a11h-ring--field { opacity: 1; }
.a11h[data-focus="2"] .a11h-ring--field { opacity: 1; transform: translateY(calc(var(--u) * 86)); }
.a11h[data-focus="3"] .a11h-ring--field,
.a11h:not([data-focus]) .a11h-ring--field { opacity: 1; transform: translateY(calc(var(--u) * 172)); }
.a11h[data-focus="4"] .a11h-ring--field { transform: translateY(calc(var(--u) * 250)); }
.a11h[data-focus="4"] .a11h-ring--btn { opacity: 1; transform: none; }
.a11h[data-focus="3"]:not([data-error]) .a11h-card > .a11h-box--3 .a11h-caret { opacity: 1; animation: a11h-caret 1s steps(1) infinite; }
@keyframes a11h-caret { 50% { visibility: hidden; } }

/* The bubble follows focus. */
.a11h[data-say] .a11h-say, .a11h:not([data-scene]) .a11h-say { opacity: 1; }
.a11h[data-say][data-focus="2"] .a11h-say { transform: translate(calc(var(--u) * 210), calc(var(--u) * 158)) translateZ(calc(var(--u) * 40)); }
.a11h[data-say][data-focus="3"] .a11h-say { transform: translate(calc(var(--u) * 210), calc(var(--u) * 244)) translateZ(calc(var(--u) * 40)); }
.a11h[data-say][data-focus="3"][data-error] .a11h-say,
.a11h:not([data-scene]) .a11h-say { transform: translate(calc(var(--u) * 160), calc(var(--u) * 244)) translateZ(calc(var(--u) * 40)); }
.a11h[data-say][data-focus="4"] .a11h-say { transform: translate(calc(var(--u) * 40), calc(var(--u) * 334)) translateZ(calc(var(--u) * 40)); }
.a11h[data-say="enter"] .a11h-say__tab, .a11h:not([data-scene]) .a11h-say__tab { opacity: 0; }
.a11h[data-say="enter"] .a11h-say__enter, .a11h:not([data-scene]) .a11h-say__enter { opacity: 1; }
.a11h[data-error] .a11h-speak, .a11h:not([data-scene]) .a11h-speak { opacity: 0; }
.a11h[data-error] .a11h-say .a11h-alert, .a11h:not([data-scene]) .a11h-say .a11h-alert { opacity: 1; }

/* Errors. Still frame: shown. */
.a11h[data-error] .a11h-error, .a11h:not([data-scene]) .a11h-error { opacity: 1; transform: none; }
.a11h[data-error] .a11h-box--3::after, .a11h:not([data-scene]) .a11h-box--3::after { opacity: 1; }
.a11h[data-press] .a11h-btn { transform: scale(.95); }

/* Paused (button, off screen or hidden tab): loops hold their frame. */
.a11h.is-paused *, .a11h.is-paused .a11h__float { animation-play-state: paused !important; }

/* ==========================================================================
   2. Story figures
   ========================================================================== */

.a11-src { display: inline-flex; align-items: center; gap: 6px; color: var(--sf-muted); font-size: .8125rem; font-weight: 500; line-height: 1.4; }
a.a11-src { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }
a.a11-src:hover { color: var(--sf-ink); }
.a11-src i { font-size: .75rem; }
.a11-art { display: block; width: 104px; }
.a11-art svg { display: block; width: 100%; height: auto; overflow: visible; }

/* Reveal once on entry (html.sf-js: only when the script can undo it). */
@media (prefers-reduced-motion: no-preference) {
  html.sf-js [data-a11-live]:not(.is-seen) :is(.a11-stat, .a11-pour__card, .a11-level, .a11-issue, .a11-goals > li, .a11-team__card, tbody tr) { opacity: 0; transform: translateY(14px); }
  [data-a11-live] :is(.a11-stat, .a11-pour__card, .a11-level, .a11-issue, .a11-goals > li, .a11-team__card, tbody tr) {
    transition: opacity .5s ease calc(var(--i, var(--r, var(--n, 0))) * 70ms), transform .7s var(--a11-out) calc(var(--i, var(--r, var(--n, 0))) * 70ms);
  }
}

/* ---- Why it matters: two numbers and the spectrum -------------------------- */
.a11-why { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.a11-stat { display: grid; align-content: start; gap: 8px; margin: 0; padding: 22px 24px; }
.a11-stat__num { margin: 4px 0 0; color: var(--sf-ink); font-size: var(--sf-fs-num); font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.a11-stat__num b { color: var(--sf-accent-ink); }
.a11-stat figcaption { color: var(--sf-text-2); font-size: .9375rem; line-height: 1.5; }
.a11-stat figcaption strong { color: var(--sf-ink); }
.a11-stat__art .a11-art { width: 96px; margin: -6px 0 -4px -8px; }
.a11-people { display: flex; gap: 6px; height: 40px; align-items: end; }
.a11-people i { position: relative; width: 22px; height: 36px; color: color-mix(in srgb, var(--sf-ink) 20%, transparent); }
.a11-people i::before, .a11-people i::after { content: ""; position: absolute; left: 50%; background: currentColor; transform: translateX(-50%); }
.a11-people i::before { top: 0; width: 12px; height: 12px; border-radius: 50%; }
.a11-people i::after { bottom: 0; width: 22px; height: 20px; border-radius: 11px 11px 4px 4px; }
.a11-people i.is-on { color: var(--sf-accent); }
@media (prefers-reduced-motion: no-preference) {
  .a11-why.is-live .a11-people i.is-on { animation: a11-nod 2.4s var(--a11-move) 1s infinite; }
}
@keyframes a11-nod { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-5px); } 90% { transform: translateY(0); } }

.a11-spectrum { margin: 20px 0 0; padding: 22px 24px 18px; }
.a11-spectrum figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 14px; color: var(--sf-text-2); font-size: .9375rem; line-height: 1.5; }
.a11-spectrum figcaption strong { color: var(--sf-ink); }
.a11-spectrum table { width: 100%; border-collapse: separate; border-spacing: 0 6px; table-layout: fixed; }
.a11-spectrum th, .a11-spectrum td { padding: 12px 14px; text-align: left; vertical-align: middle; font-size: .9375rem; line-height: 1.4; }
.a11-spectrum thead th { padding-top: 0; padding-bottom: 2px; color: var(--sf-muted); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.a11-spectrum thead th:first-child { width: 22%; }
.a11-spectrum tbody th { color: var(--sf-ink); font-weight: 650; }
.a11-spectrum tbody th i { margin-right: 10px; color: var(--sf-accent-ink); font-size: 1.1rem; vertical-align: -2px; }
.a11-spectrum tbody td { background: color-mix(in srgb, var(--sf-accent) calc(14% - var(--i) * 4%), transparent); color: var(--sf-text); }
.a11-spectrum tbody td:first-of-type { border-radius: 12px 0 0 12px; }
.a11-spectrum tbody td:last-child { border-radius: 0 12px 12px 0; }

/* ---- WCAG in plain words: four principles, three levels -------------------- */
.a11-pour { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.a11-pour__card { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 14px 18px 18px; }
.a11-pour__art { display: block; margin: 0 -6px 2px; border-radius: 14px; background: color-mix(in srgb, var(--sf-accent) 8%, transparent); }
.a11-pour__art svg { display: block; width: 100%; height: auto; }
.a11-pour__name { display: flex; align-items: center; gap: 8px; color: var(--sf-accent-ink); font-size: .8125rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.a11-pour__letter { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--sf-accent); color: #fff; font-size: .875rem; letter-spacing: 0; }
.a11-pour__card h3 { margin: 2px 0 0; color: var(--sf-ink); font-size: 1.0625rem; line-height: 1.3; }
.a11-pour__card p { margin: 0; color: var(--sf-text-2); font-size: .9375rem; line-height: 1.5; }
.a11-pour__helps { display: flex; gap: 8px; color: var(--sf-muted) !important; font-size: .8125rem !important; }
.a11-pour__helps i { flex: none; color: var(--sf-accent-ink); }
.a11-pour__sc { display: flex; flex-wrap: wrap; gap: 6px; margin: auto 0 0; padding: 10px 0 0; border-top: 1px dashed var(--sf-line); list-style: none; }
.a11-pour__sc li { display: inline-flex; gap: 6px; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--sf-ink) 6%, transparent); color: var(--sf-text-2); font-size: .75rem; line-height: 1.5; }
.a11-pour__sc b { color: var(--sf-ink); font-family: var(--sf-font-mono); font-weight: 600; }

/* The four drawings. Light page, ink and accent lines; they loop only while in view. */
.a11-pour svg { --line: color-mix(in srgb, var(--sf-ink) 22%, transparent); }
.a11-pour .pa-page { fill: var(--sf-solid); stroke: var(--line); stroke-width: 1.2; }
.a11-pour text { font: 800 26px/1 var(--sf-font); }
.a11-pour .pa-faint { fill: color-mix(in srgb, var(--sf-ink) 22%, var(--sf-solid)); }
.a11-pour .pa-strong { fill: var(--sf-ink); opacity: 0; }
.a11-pour .pa-meter { fill: color-mix(in srgb, var(--sf-ink) 10%, transparent); }
.a11-pour .pa-meter-fill { fill: #16a34a; transform-box: fill-box; transform-origin: 0 50%; transform: scaleX(.35); }
.a11-pour .pa-ctl { fill: color-mix(in srgb, var(--sf-ink) 8%, var(--sf-solid)); stroke: var(--line); }
.a11-pour .pa-ring { fill: none; stroke: var(--sf-accent); stroke-width: 2.5; }
.a11-pour .pa-line { fill: color-mix(in srgb, var(--sf-ink) 30%, transparent); }
.a11-pour .pa-field { fill: var(--sf-solid); stroke: var(--line); stroke-width: 1.4; }
.a11-pour .pa-err circle { fill: none; stroke: #dc2626; stroke-width: 1.4; }
.a11-pour .pa-err path { stroke: #dc2626; stroke-width: 1.4; stroke-linecap: round; }
.a11-pour .pa-err rect { fill: #dc2626; opacity: .8; }
.a11-pour .pa-err { opacity: 0; }
.a11-pour .pa-btn { fill: var(--sf-accent); }
.a11-pour .pa-tag rect { fill: #0e7490; }
.a11-pour .pa-tag .pa-tag-text { fill: #fff; opacity: .9; }
.a11-pour .pa-tag { opacity: 0; transform-box: fill-box; transform-origin: 0 100%; }
.a11-pour .pa-wave rect { fill: #0e7490; transform-box: fill-box; transform-origin: 50% 50%; }
.a11-pour .pa-wave { opacity: 0; }
/* Still frame: each drawing shows its passing state. */
.a11-pour .pa-strong, .a11-pour .pa-err, .a11-pour .pa-tag, .a11-pour .pa-wave { opacity: 1; }
.a11-pour .pa-meter-fill { transform: scaleX(1); }
.a11-pour .pa-ring { transform: translateX(29px); }
@media (prefers-reduced-motion: no-preference) {
  .a11-pour.is-live .pa-strong { animation: pa-fade 4s ease-in-out infinite; }
  .a11-pour.is-live .pa-meter-fill { animation: pa-meter 4s ease-in-out infinite; }
  .a11-pour.is-live .pa-ring { animation: pa-tab 3.6s var(--a11-move) infinite; }
  .a11-pour.is-live .pa-err { animation: pa-fade 3.6s ease-in-out infinite; }
  .a11-pour.is-live .pa-tag { animation: pa-pop 3.6s var(--a11-pop) infinite; }
  .a11-pour.is-live .pa-wave { animation: pa-fade 3.6s ease-in-out infinite; }
  .a11-pour.is-live .pa-wave rect { animation: pa-wave .5s ease-in-out infinite alternate; }
  .a11-pour.is-live .pa-wave rect:nth-child(2) { animation-delay: -.2s; }
  .a11-pour.is-live .pa-wave rect:nth-child(3) { animation-delay: -.35s; }
}
@keyframes pa-fade { 0%, 25% { opacity: 0; } 40%, 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes pa-meter { 0%, 25% { transform: scaleX(.35); } 40%, 85% { transform: scaleX(1); } 100% { transform: scaleX(.35); } }
@keyframes pa-tab { 0%, 22% { transform: translateX(0); } 33%, 55% { transform: translateX(29px); } 66%, 88% { transform: translateX(58px); } 100% { transform: translateX(0); } }
@keyframes pa-pop { 0%, 25% { opacity: 0; transform: scale(.6); } 40%, 85% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.6); } }
@keyframes pa-wave { from { transform: scaleY(.4); } to { transform: scaleY(1); } }

.a11-levels { margin-top: 20px; padding: 22px 24px 24px; }
.a11-levels__title { margin: 0 0 16px; color: var(--sf-text-2); font-size: .9375rem; }
.a11-levels__title strong { color: var(--sf-ink); }
.a11-levels ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.a11-level { position: relative; display: grid; align-content: start; gap: 4px; padding: 16px 18px 18px; border-radius: var(--sf-r-md); background: color-mix(in srgb, var(--sf-ink) 4%, transparent); color: var(--sf-text-2); font-size: .875rem; line-height: 1.45; }
.a11-level__bar {
  /* Three segments; the filled ones show how much of WCAG the level covers. */
  --off: color-mix(in srgb, var(--sf-ink) 14%, transparent);
  width: 72px;
  height: 6px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, var(--fill) calc(var(--steps) * 33.333%), var(--off) 0);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 22px, transparent 22px 25px);
  mask: repeating-linear-gradient(90deg, #000 0 22px, transparent 22px 25px);
}
.a11-level--a .a11-level__bar { --steps: 1; --fill: color-mix(in srgb, var(--sf-accent) 55%, transparent); }
.a11-level--aa .a11-level__bar { --steps: 2; --fill: var(--sf-accent); }
.a11-level--aaa .a11-level__bar { --steps: 3; --fill: color-mix(in srgb, var(--sf-accent) 55%, transparent); }
.a11-level__name { color: var(--sf-ink); font-size: 1.75rem; font-weight: 900; line-height: 1; letter-spacing: -.02em; }
.a11-level strong { color: var(--sf-ink); font-size: 1rem; }
.a11-level.is-ours { background: linear-gradient(160deg, color-mix(in srgb, var(--sf-accent) 16%, transparent), color-mix(in srgb, var(--sf-accent) 6%, transparent)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--sf-accent) 55%, transparent); }
.a11-level.is-ours .a11-level__name { color: var(--sf-accent-ink); }
.a11-level__badge { display: inline-flex; align-items: center; gap: 6px; justify-self: start; margin-top: 8px; padding: 3px 10px; border-radius: 999px; background: var(--sf-accent); color: #fff; font-size: .75rem; font-weight: 700; }

/* ---- The problem: what an issue looks like, and the law -------------------- */
.a11-issues__title { display: flex; gap: 10px; margin: 0 0 14px; color: var(--sf-text-2); font-size: .9375rem; line-height: 1.5; }
.a11-issues__title strong { color: var(--sf-ink); }
.a11-issues__title > i { color: var(--sf-accent-ink); }
.a11-issues ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.a11-issue { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 18px; }
.a11-issue h3 { margin: 0; color: var(--sf-ink); font-size: 1rem; line-height: 1.3; }
.a11-issue p { margin: 0; color: var(--sf-text-2); font-size: .875rem; line-height: 1.45; }
.a11-issue__sc { margin-top: auto; color: var(--sf-muted); font-family: var(--sf-font-mono); font-size: .75rem; }
.a11-issue__pair { display: grid; gap: 8px; }
.a11-mini { margin: 0; padding: 10px 12px 12px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px rgba(17, 24, 39, .08); color: var(--a11-ink); }
.a11-mini figcaption { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: .6875rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.a11-mini.is-before figcaption { color: var(--a11-err); }
.a11-mini.is-after figcaption { color: var(--a11-ok); }
.a11-mini__ui { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 56px; font-family: var(--sf-font); }
.a11-mini__label { width: 100%; color: var(--a11-label); font-size: .75rem; font-weight: 600; }
.a11-mini__box { display: flex; align-items: center; width: 100%; height: 30px; padding: 0 10px; border: 1.5px solid var(--a11-border); border-radius: 7px; color: var(--a11-ink); font-size: .8125rem; }
.a11-mini__box.is-hint { border-color: #d0d5dd; color: #9ca3af; }
.a11-mini__box.is-red { border-color: #dc2626; border-width: 2px; }
.a11-mini__note { color: var(--a11-hint); font-size: .6875rem; font-style: italic; }
.a11-mini__text { font-size: .9375rem; font-weight: 600; }
.a11-mini__text.is-faint { color: #b4b9c4; }
.a11-mini__ratio { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: #dcfce7; color: #14532d; font-family: var(--sf-font-mono); font-size: .6875rem; font-weight: 700; }
.a11-mini__ratio.is-bad { background: #fee2e2; color: #7f1d1d; }
.a11-mini__err { display: inline-flex; align-items: center; gap: 5px; color: var(--a11-err); font-size: .75rem; font-weight: 600; }
.a11-mini__btn { padding: 6px 12px; border-radius: 7px; background: var(--a11-blue); color: #fff; font-size: .8125rem; font-weight: 700; }
.a11-mini__btn:first-child { background: #eef0f5; color: var(--a11-ink); }
.a11-mini__btn.is-focus { outline: 3px solid var(--a11-blue); outline-offset: 3px; }

.a11-law { margin-top: 20px; padding: 20px 24px 22px; }
.a11-law__title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--sf-ink); }
.a11-law__title i { color: var(--sf-accent-ink); }
.a11-law ol { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.a11-law li { position: relative; display: grid; align-content: start; gap: 4px; padding-top: 30px; color: var(--sf-text-2); font-size: .9375rem; line-height: 1.5; }
.a11-law li::before { content: ""; position: absolute; top: 9px; left: 0; right: -18px; height: 2px; background: color-mix(in srgb, var(--sf-accent) 30%, transparent); }
.a11-law li:last-child::before { right: 0; }
.a11-law li::after { content: ""; position: absolute; top: 4px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--sf-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sf-accent) 18%, transparent); }
.a11-law__year { color: var(--sf-accent-ink); font-size: .8125rem; font-weight: 800; letter-spacing: .04em; }
.a11-law strong { color: var(--sf-ink); }
.a11-law .a11-src { margin-top: 4px; }

/* ---- Goals ------------------------------------------------------------------- */
.a11-goals { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.a11-goals > li { display: grid; align-content: start; gap: 10px; padding: 18px; }
.a11-goals__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, var(--sf-accent) 14%, transparent); color: var(--sf-accent-ink); font-size: 1.2rem; }
.a11-goals strong { color: var(--sf-ink); font-size: 1rem; line-height: 1.3; }
.a11-goals__test { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--sf-line); color: var(--sf-text-2); font-size: .875rem; line-height: 1.45; }
.a11-goals__test > i { flex: none; color: var(--sf-muted); }
.a11-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.a11-pills li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: color-mix(in srgb, var(--sf-ink) 7%, transparent); color: var(--sf-text); font-size: .875rem; font-weight: 550; }
.a11-pills i { color: var(--sf-accent-ink); }

/* ---- The handoff: annotated form and the notes table ------------------------- */
.a11-spec { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 20px; align-items: center; margin: 0; padding: 20px; }
.a11-spec__art { padding: 18px; border-radius: var(--sf-r-md); background: repeating-linear-gradient(0deg, transparent 0 15px, color-mix(in srgb, var(--sf-accent) 7%, transparent) 15px 16px), repeating-linear-gradient(90deg, transparent 0 15px, color-mix(in srgb, var(--sf-accent) 7%, transparent) 15px 16px), color-mix(in srgb, var(--sf-accent) 5%, transparent); }
.a11-spec__card { position: relative; display: grid; gap: 14px; padding: 18px 18px 20px 30px; border-radius: 14px; background: #fff; box-shadow: 0 10px 26px rgba(17, 24, 39, .12); color: var(--a11-ink); }
.a11-spec__title { font-size: 1rem; font-weight: 700; }
.a11-spec__field { position: relative; display: grid; gap: 5px; }
.a11-spec__field small { color: var(--a11-label); font-size: .75rem; font-weight: 600; }
.a11-spec__field > span { height: 30px; border: 1.5px solid var(--a11-border); border-radius: 7px; }
.a11-spec__btn { position: relative; justify-self: start; padding: 8px 20px; border-radius: 8px; background: var(--a11-blue); color: #fff; font-size: .875rem; font-weight: 700; }
.a11-spec__field i, .a11-spec__btn i, .a11-spec__n {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--a11-violet);
  color: #fff;
  font-size: .75rem;
  font-style: normal;
  font-weight: 800;
  box-shadow: 0 3px 8px rgba(109, 94, 246, .4);
}
.a11-spec__field i { position: absolute; left: -24px; bottom: 4px; }
.a11-spec__btn i { position: absolute; left: -24px; top: 50%; margin-top: -11px; }
.a11-spec__table { min-width: 0; overflow-x: auto; border-radius: 8px; }
.a11-spec__table:focus-visible { outline: 3px solid var(--sf-accent); outline-offset: 4px; }
.a11-spec table { width: 100%; border-collapse: collapse; font-size: .875rem; line-height: 1.45; }
.a11-spec caption { padding: 0 0 8px; color: var(--sf-muted); font-size: .8125rem; font-weight: 600; text-align: left; }
.a11-spec th, .a11-spec td { padding: 10px 10px; border-top: 1px solid var(--sf-line); text-align: left; vertical-align: top; }
.a11-spec thead th { border-top: 0; color: var(--sf-muted); font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.a11-spec tbody th { color: var(--sf-ink); font-weight: 650; white-space: nowrap; }
.a11-spec td { color: var(--sf-text-2); }
.a11-spec__says { color: #0e7490 !important; font-weight: 550; }
html.dark .a11-spec__says { color: #67e8f9 !important; }

.a11-layers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; margin: 16px 0 0; padding: 0; list-style: none; }
.a11-layers li { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto auto; column-gap: 12px; align-content: start; padding: 14px 16px; border-radius: var(--sf-r-md); background: color-mix(in srgb, var(--sf-accent) 7%, transparent); color: var(--sf-text-2); font-size: .875rem; line-height: 1.45; }
.a11-layers__icon { grid-row: span 3; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--sf-solid); color: var(--sf-accent-ink); font-size: 1.1rem; box-shadow: 0 0 0 1px var(--sf-line); }
.a11-layers strong { color: var(--sf-ink); font-size: .9375rem; }
.a11-layers__sc { margin-top: 4px; color: var(--sf-muted); font-family: var(--sf-font-mono); font-size: .6875rem; font-weight: 600; }

/* ---- Try it: the working form ------------------------------------------------ */
.a11d { padding: 18px; }
.a11d__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.a11d__how { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--sf-text-2); font-size: .875rem; }
.a11d__how > i { color: var(--sf-accent-ink); font-size: 1.1rem; }
.a11d kbd { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 6px; background: var(--sf-solid); box-shadow: inset 0 -2px 0 var(--sf-line-strong), 0 0 0 1px var(--sf-line-strong); color: var(--sf-ink); font: 600 .75rem/1.6 var(--sf-font); text-align: center; }
.a11d__views { display: flex; flex-wrap: wrap; gap: 6px; }
.a11d-view { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 14px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--sf-ink) 7%, transparent); color: var(--sf-ink); font: 600 .8125rem/1.2 var(--sf-font); cursor: pointer; transition: background-color .2s ease; }
.a11d-view:hover { background: color-mix(in srgb, var(--sf-ink) 12%, transparent); }
.a11d-view[aria-pressed="true"] { background: var(--sf-accent); color: #fff; }
.a11d-view:focus-visible { outline: 3px solid var(--sf-accent); outline-offset: 2px; }
.a11d__body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; align-items: start; }

.a11d__stage { min-width: 0; padding: 22px; border-radius: var(--sf-r-md); background: color-mix(in srgb, var(--sf-accent) 6%, transparent); }
.a11d-form { --fs: 1; display: grid; gap: 16px; max-width: 460px; margin: 0 auto; padding: 22px 24px 24px; border-radius: 16px; background: #fff; box-shadow: 0 14px 34px rgba(17, 24, 39, .14); color: var(--a11-ink); font-family: var(--sf-font); font-size: calc(1rem * var(--fs)); }
.a11d-form__title { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--a11-ink); font-size: 1.25em; font-weight: 700; }
.a11d-form__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #eef1fd; color: var(--a11-blue); font-size: 1.1rem; }
.a11d-field { position: relative; display: grid; gap: 6px; }
.a11d-field label { color: var(--a11-label); font-size: .875em; font-weight: 600; }
.a11d-req { margin-left: 4px; color: var(--a11-hint); font-size: .8571em; font-weight: 500; }
.a11d-hint { margin: -2px 0 0; color: var(--a11-hint); font-size: .8125em; }
.a11d-field input, .a11d-field select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1.5px solid var(--a11-border);
  border-radius: 9px;
  background: #fff;
  color: var(--a11-ink);
  font: 500 1em/1.2 var(--sf-font);
}
.a11d-field select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23111827' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 16px; padding-right: 40px; }
.a11d-field input:focus-visible, .a11d-field select:focus-visible, .a11d-btn:focus-visible, .a11d-summary a:focus-visible {
  outline: 3px solid var(--a11-blue);
  outline-offset: 3px;
}
.a11d-summary:focus { outline: 3px solid var(--a11-blue); outline-offset: 3px; }
.a11d-field.is-invalid input, .a11d-field.is-invalid select { border-color: var(--a11-err); border-width: 2.5px; }
.a11d-error { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--a11-err); font-size: .875em; font-weight: 600; }
.a11d-error[hidden] { display: none; }
.a11d-summary { padding: 14px 16px; border-left: 5px solid var(--a11-err); border-radius: 8px; background: var(--a11-err-bg); }
.a11d-summary h4 { margin: 0 0 6px; color: var(--a11-ink); font-size: 1em; }
.a11d-summary ul { display: grid; gap: 4px; margin: 0; padding-left: 18px; }
.a11d-summary a { color: var(--a11-err); font-size: .9375em; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.a11d-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.a11d-btn { min-height: 46px; padding: 0 22px; border: 0; border-radius: 10px; background: var(--a11-blue); color: #fff; font: 700 1em/1 var(--sf-font); cursor: pointer; }
.a11d-btn:hover { background: #1733a6; }
.a11d-btn--ghost { background: #eef0f5; color: var(--a11-ink); }
.a11d-btn--ghost:hover { background: #e2e6ee; }
.a11d-done { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 12px 14px; border-radius: 8px; background: #ecfdf3; color: #14532d; font-size: .9375em; font-weight: 600; }
.a11d-done i { color: var(--a11-ok); }
.a11d-done[hidden] { display: none; }

/* Views: numbered focus order, text at 200%, no colour. */
.a11d__stage.is-order [data-order] { position: relative; }
.a11d__stage.is-order [data-order]::before {
  content: attr(data-order);
  position: absolute;
  z-index: 1;
  top: -10px;
  left: -12px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--a11-violet);
  color: #fff;
  font: 800 12px/1 var(--sf-font);
  box-shadow: 0 3px 8px rgba(109, 94, 246, .4);
}
.a11d__stage.is-order .a11d-field[data-order]::before { top: 0; left: -36px; }
.a11d__stage.is-zoom .a11d-form { --fs: 2; max-width: none; }
.a11d__stage.is-mono .a11d-form { filter: grayscale(1); }

.a11d-reader { position: sticky; top: calc(var(--sf-header-h) + 16px); display: grid; gap: 10px; min-width: 0; padding: 16px; border-radius: var(--sf-r-md); background: #0b1220; color: #e5e7eb; }
.a11d-reader__title { display: flex; align-items: center; gap: 8px; margin: 0; color: #a5b4fc; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.a11d-log { display: grid; gap: 8px; min-height: 220px; max-height: 320px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.a11d-log__line { padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .06); font-size: .9375rem; line-height: 1.45; }
.a11d-log__line:last-child { background: rgba(165, 180, 252, .16); box-shadow: inset 3px 0 0 #a5b4fc; color: #fff; }
.a11d-log__line.is-hint { color: #9ca3af; font-style: italic; }
.a11d-log__line.is-alert { box-shadow: inset 3px 0 0 #fca5a5; }
.a11d-log__line.is-status { box-shadow: inset 3px 0 0 #86efac; }
.a11d-reader__note { margin: 0; color: #9ca3af; font-size: .8125rem; line-height: 1.45; }
@media (prefers-reduced-motion: no-preference) {
  .a11d-log__line:last-child { animation: a11-in .35s var(--a11-out); }
}
@keyframes a11-in { from { opacity: 0; transform: translateY(6px); } }

/* ---- Who did what ------------------------------------------------------------ */
.a11-team { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.a11-team__card { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 20px 20px; }
/* My card: the same glass, tinted, with an accent edge under the top highlight. */
.a11-team__card.is-me {
  background: linear-gradient(160deg, color-mix(in srgb, var(--sf-accent) 14%, transparent), transparent 62%), linear-gradient(145deg, var(--sf-surface-inset), transparent 65%), var(--sf-surface);
  box-shadow: var(--sf-surface-shadow), inset 0 1px 0 var(--sf-glass-edge), inset 0 0 0 1px color-mix(in srgb, var(--sf-accent) 40%, transparent);
}
.a11-team__card .a11-art { margin: -2px 0 2px -10px; }
.a11-team__card:hover .action-detail { animation: action-reveal .62s cubic-bezier(.2, .8, .25, 1) both; }
.a11-team__eyebrow { color: var(--sf-accent-ink); font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.a11-team__card h3 { margin: 0; color: var(--sf-ink); font-size: 1.0625rem; line-height: 1.3; }
.a11-team__card p { margin: 0; color: var(--sf-text-2); font-size: .9375rem; line-height: 1.5; }

/* ---- Results: 400 dots, 20 left ---------------------------------------------- */
.a11-dots { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; align-items: center; margin: 0; padding: 22px 24px; }
.a11-dots__grid { display: grid; grid-template-columns: repeat(25, 1fr); gap: 4px; }
.a11-dots__grid i { aspect-ratio: 1; border-radius: 50%; background: color-mix(in srgb, var(--a11-err) 55%, transparent); transition: opacity .5s ease calc(var(--d) * 1.6s), transform .6s var(--a11-out) calc(var(--d) * 1.6s); }
.a11-dots__grid i.is-left { background: var(--sf-accent); }
html.dark .a11-dots__grid i { background: color-mix(in srgb, #f87171 60%, transparent); }
html.dark .a11-dots__grid i.is-left { background: var(--sf-accent); }
/* After the redesign: the fixed issues fade back, the remaining 20 stay. Still frame is the after state. */
.a11-dots__grid i:not(.is-left) { opacity: .12; transform: scale(.6); }
@media (prefers-reduced-motion: no-preference) {
  html.sf-js .a11-dots:not(.is-seen) .a11-dots__grid i:not(.is-left) { opacity: 1; transform: none; transition: none; }
}
.a11-dots figcaption { display: grid; gap: 14px; }
.a11-dots__row { display: grid; gap: 2px; color: var(--sf-text-2); font-size: .9375rem; line-height: 1.4; }
.a11-dots__row b { color: var(--a11-err); font-size: var(--sf-fs-num); font-weight: 800; line-height: 1; letter-spacing: -.02em; }
html.dark .a11-dots__row b { color: #fca5a5; }
.a11-dots__row.is-after b { color: var(--sf-accent-ink); }
.a11-dots__note { color: var(--sf-muted); font-size: .8125rem; line-height: 1.45; }

/* ---- Where it carries over ----------------------------------------------------- */
.a11-carry { margin-top: 16px; padding: 22px 26px 24px; }
.a11-carry h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; color: var(--sf-ink); font-size: var(--sf-fs-h3); }
.a11-carry h3 i { color: var(--sf-accent-ink); }
.a11-carry ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.a11-carry li { display: grid; align-content: start; gap: 4px; padding: 8px 16px 16px; border-radius: var(--sf-r-md); background: color-mix(in srgb, var(--sf-accent) 9%, transparent); color: var(--sf-text-2); font-size: .9375rem; line-height: 1.45; }
.a11-carry li strong { color: var(--sf-ink); }
.a11-carry .a11-art { width: 96px; margin-left: -8px; }

/* ---- Glass ---------------------------------------------------------------------
   Cards use the site's .sf-glass surface (liquid.css): a top-edge highlight, soft shadow
   and backdrop blur. Tiles inside a glass card keep their tint and take the same top
   highlight, so the light reads consistently. The shared results figures from
   hdfc-story.css are drawn flat there; on this page they get the glass surface too. */
.a11-level, .a11-layers li, .a11-carry li, .a11-spectrum tbody td { box-shadow: inset 0 1px 0 var(--sf-glass-edge); }
.a11-level.is-ours { box-shadow: inset 0 1px 0 var(--sf-glass-edge), inset 0 0 0 2px color-mix(in srgb, var(--sf-accent) 55%, transparent); }
.a11-layers__icon { box-shadow: 0 0 0 1px var(--sf-line), inset 0 1px 0 var(--sf-glass-edge); }
.sf-cs .as-evidence__col {
  border: 0;
  background: linear-gradient(145deg, var(--sf-surface-inset), transparent 65%), var(--sf-surface);
  box-shadow: var(--sf-surface-shadow), inset 0 1px 0 var(--sf-glass-edge);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
  backdrop-filter: blur(24px) saturate(135%);
}
.sf-cs .as-shipped {
  border: 0;
  box-shadow: var(--sf-surface-shadow), inset 0 1px 0 var(--sf-glass-edge);
}

/* ---- Responsive ---------------------------------------------------------------- */
@media (max-width: 1080px) {
  .a11-pour, .a11-issues ul, .a11-team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .a11-goals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .a11-spec { grid-template-columns: 1fr; }
  .a11-spec__art { max-width: 420px; }
}
@media (max-width: 860px) {
  .a11d__body { grid-template-columns: 1fr; }
  .a11d-reader { position: static; }
  .a11d-log { min-height: 0; max-height: 240px; }
  .a11-layers, .a11-carry ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .a11-dots { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .a11-why, .a11-pour, .a11-issues ul, .a11-team, .a11-goals, .a11-levels ol, .a11-law ol, .a11-layers, .a11-carry ul { grid-template-columns: 1fr; }
  .a11-law li::before { display: none; }
  .a11-spectrum { padding: 18px 14px 12px; }
  .a11-spectrum thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .a11-spectrum table, .a11-spectrum tbody, .a11-spectrum tr, .a11-spectrum th, .a11-spectrum td { display: block; width: auto; }
  .a11-spectrum tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 10px 0; }
  .a11-spectrum tbody th { grid-column: 1 / -1; padding: 0 0 4px; }
  .a11-spectrum tbody td { padding: 8px; border-radius: 10px !important; font-size: .8125rem; }
  .a11-spec { padding: 14px; }
  .a11-spec thead { display: none; }
  .a11-spec caption { display: block; }
  .a11-spec table, .a11-spec tbody, .a11-spec tr, .a11-spec th, .a11-spec td { display: block; }
  .a11-spec tr { position: relative; padding: 12px 0 12px 34px; border-top: 1px solid var(--sf-line); }
  .a11-spec th, .a11-spec td { padding: 2px 0; border: 0; }
  .a11-spec tr td:first-child { position: absolute; left: 0; top: 12px; }
  .a11d { padding: 12px; }
  .a11d__stage { padding: 12px; }
  .a11d-form { padding: 18px 16px 20px; }
  .a11-dots__grid { gap: 3px; }
}

/* ==========================================================================
   3. Reduced motion, forced colours, print
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .a11h *, .a11h *::before, .a11h *::after,
  .a11-pour *, .a11-dots *, .a11-why * { transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .a11h-box, .a11h-btn, .a11h-say, .a11h-result, .a11-mini__box, .a11d-field input, .a11d-field select, .a11d-btn { border: 1px solid CanvasText; }
  .a11h-ring, .a11-mini__btn.is-focus { outline: 3px solid Highlight; }
  .a11d-field input:focus-visible, .a11d-field select:focus-visible, .a11d-btn:focus-visible { outline: 3px solid Highlight; }
  .a11-level.is-ours, .a11d-view[aria-pressed="true"] { outline: 2px solid Highlight; }
}
@media print {
  .a11h__float { animation: none !important; }
  .a11d__views, .a11d-reader { display: none; }
}
