/* ==========================================================================
   Access Atlas — case study (work/access-atlas.html) and interactive concept
   prototype (work/access-atlas-prototype.html).

   Loaded only by those two pages, after assets/style.css. Every rule is
   scoped to .aa-page (both pages), .aa-ui (the prototype interface) or
   .aa-case (case-study visuals). Visual language: editorial wayfinding —
   structured route lines, crisp labels and status markers that never rely
   on colour alone. All stations, journeys and disruptions are fictional.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens — warm light / charcoal dark, one signal accent, three states
   -------------------------------------------------------------------------- */

.aa-page {
  --accent: #0f5c6b;               /* section labels on these pages */
  --aa-ink: #1b1d1f;
  --aa-muted: #575c5f;
  --aa-panel: #fffdf8;
  --aa-panel-2: #f1ede4;
  --aa-line: #dcd6ca;
  --aa-control-line: #8b8478;      /* borders that identify a control (3:1) */
  --aa-signal: #0f5c6b;            /* text-safe wayfinding accent */
  --aa-signal-mark: #13788b;       /* lines, marks and graphics */
  --aa-signal-soft: #e2eff1;
  --aa-route: #1b1d1f;             /* route lines */
  --aa-known: #1d6a44;
  --aa-known-soft: #e3f1e8;
  --aa-unknown: #8a5100;
  --aa-unknown-soft: #f6ead3;
  --aa-no: #b42318;
  --aa-no-soft: #fbe7e4;
  --aa-btn: #1b1d1f;
  --aa-btn-ink: #fbf8f1;
  /* The "board" panels are charcoal in both themes */
  --aa-board: #161718;
  --aa-board-2: #1f2122;
  --aa-board-ink: #f3f1ea;
  --aa-board-muted: #b4b8b6;
  --aa-board-line: #34383a;
  --aa-board-signal: #7fd0de;
  --aa-board-known: #8fd5a8;
  --aa-board-unknown: #f0b45c;
  --aa-board-no: #ff9d92;
}

:root[data-theme=dark] .aa-page {
  --accent: #7fd0de;
  --aa-ink: #f2efe7;
  --aa-muted: #b8b4ab;
  --aa-panel: #1d1c19;
  --aa-panel-2: #25231f;
  --aa-line: #3a3631;
  --aa-control-line: #7d766b;
  --aa-signal: #7fd0de;
  --aa-signal-mark: #4fb7c9;
  --aa-signal-soft: #10262b;
  --aa-route: #f2efe7;
  --aa-known: #8fd5a8;
  --aa-known-soft: #15291d;
  --aa-unknown: #f0b45c;
  --aa-unknown-soft: #2e2416;
  --aa-no: #ff9d92;
  --aa-no-soft: #351a18;
  --aa-btn: #f2efe7;
  --aa-btn-ink: #141311;
  --aa-board: #101112;
  --aa-board-2: #191b1c;
}

/* --------------------------------------------------------------------------
   2. Shared wayfinding parts: status markers, route strip, timeline,
      interchange schematic (used by both pages)
   -------------------------------------------------------------------------- */

/* Status markers: filled circle + tick, dashed circle + ?, diamond + cross */
.aa-page .aa-glyph {
  flex: none;
  width: 24px;
  height: 24px;
  overflow: visible;
}

.aa-page .aa-glyph--known circle {
  fill: var(--aa-known);
}

.aa-page .aa-glyph--known path {
  fill: none;
  stroke: var(--aa-panel);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aa-page .aa-glyph--unknown circle {
  fill: var(--aa-panel);
  stroke: var(--aa-unknown);
  stroke-width: 1.8;
}

.aa-page .aa-glyph--unknown path {
  fill: none;
  stroke: var(--aa-unknown);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.aa-page .aa-glyph--unknown .aa-glyph__dot {
  fill: var(--aa-unknown);
  stroke: none;
}

.aa-page .aa-glyph--no path:first-child {
  fill: var(--aa-no);
}

.aa-page .aa-glyph--no path + path {
  fill: none;
  stroke: var(--aa-panel);
  stroke-width: 2;
  stroke-linecap: round;
}

/* Status line: marker + words */
.aa-page .aa-status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: .9375rem;
  line-height: 1.5;
}

.aa-page .aa-status .aa-glyph {
  margin-top: 1px;
}

.aa-page .aa-status--known {
  background: var(--aa-known-soft);
}

.aa-page .aa-status--unknown {
  background: var(--aa-unknown-soft);
}

.aa-page .aa-status--no {
  background: var(--aa-no-soft);
}

.aa-page .aa-status strong {
  font-weight: 700;
}

.aa-page .aa-status--known strong {
  color: var(--aa-known);
}

.aa-page .aa-status--unknown strong {
  color: var(--aa-unknown);
}

.aa-page .aa-status--no strong {
  color: var(--aa-no);
}

/* --- Route strip (comparison cards) ---------------------------------------- */

.aa-page .aa-strip-wrap {
  container-type: inline-size;
}

.aa-page .aa-strip {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aa-page .aa-strip__stop {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  padding-right: 14px;
}

/* The route line runs from each node to the next one */
.aa-page .aa-strip__stop:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 30px;
  right: 6px;
  height: 4px;
  border-radius: 2px;
  background: var(--aa-route);
}

.aa-page .aa-strip__node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--aa-panel);
  box-shadow: 0 0 0 4px var(--aa-panel);
}

.aa-page .aa-strip__text {
  display: grid;
  gap: 2px;
}

.aa-page .aa-strip__kind {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--aa-muted);
}

.aa-page .aa-strip__name {
  font-size: 1rem;
  line-height: 1.3;
}

.aa-page .aa-strip__status {
  font-size: .8125rem;
  font-weight: 650;
  line-height: 1.35;
}

.aa-page .is-known > .aa-strip__text .aa-strip__status {
  color: var(--aa-known);
}

.aa-page .is-unknown > .aa-strip__text .aa-strip__status {
  color: var(--aa-unknown);
}

.aa-page .is-no > .aa-strip__text .aa-strip__status {
  color: var(--aa-no);
}

.aa-page .aa-strip__leg {
  margin-top: 4px;
  font-size: .8125rem;
  line-height: 1.35;
  color: var(--aa-muted);
}

/* Narrow cards: the strip turns vertical */
@container (max-width: 460px) {
  .aa-page .aa-strip {
    grid-auto-flow: row;
    gap: 14px;
  }

  .aa-page .aa-strip__stop {
    grid-template-columns: 24px 1fr;
    gap: 12px;
    padding: 0;
  }

  .aa-page .aa-strip__stop:not(:last-child)::after {
    top: 30px;
    bottom: -12px;
    left: 10px;
    right: auto;
    width: 4px;
    height: auto;
  }
}

/* --- Detailed timeline ------------------------------------------------------ */

.aa-page .aa-timeline {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aa-page .aa-timeline__stop {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 16px;
}

.aa-page .aa-timeline__node {
  display: grid;
  place-items: start center;
  padding-top: 2px;
}

.aa-page .aa-timeline__node .aa-glyph {
  width: 28px;
  height: 28px;
}

.aa-page .aa-timeline__body {
  display: grid;
  gap: 6px;
  padding-bottom: 6px;
}

.aa-page .aa-timeline__kind {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--aa-muted);
}

.aa-page .aa-timeline__name {
  font-size: 1.25rem;
  letter-spacing: -.02em;
}

.aa-page .aa-timeline__where {
  font-size: .9375rem;
  color: var(--aa-muted);
}

.aa-page .aa-timeline__leg {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 16px;
  align-items: center;
  min-height: 54px;
}

.aa-page .aa-timeline__line {
  justify-self: center;
  width: 4px;
  height: 100%;
  min-height: 54px;
  border-radius: 2px;
  background: var(--aa-route);
}

.aa-page .aa-timeline__leg p {
  font-size: .875rem;
  color: var(--aa-muted);
}

/* --- Interchange schematic ---------------------------------------------- */

.aa-page .aa-ix {
  display: block;
  width: 100%;
  max-width: 340px;
  height: auto;
}

.aa-page .aa-ix text {
  fill: var(--aa-ink);
  font: 650 19px/1 system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

.aa-page .aa-ix__plat {
  fill: var(--aa-panel-2);
  stroke: var(--aa-control-line);
  stroke-width: 1.5;
}

.aa-page .aa-ix__track {
  fill: none;
  stroke: var(--aa-control-line);
  stroke-width: 2;
  stroke-dasharray: 2 6;
}

.aa-page .aa-ix__route {
  fill: none;
  stroke: var(--aa-signal-mark);
  stroke-width: 4;
  stroke-linecap: round;
}

.aa-page .aa-ix__route--unknown {
  stroke: var(--aa-unknown);
  stroke-dasharray: 6 6;
}

.aa-page .aa-ix__head {
  fill: var(--aa-signal-mark);
}

.aa-page .aa-ix__lift {
  fill: var(--aa-panel);
  stroke: var(--aa-known);
  stroke-width: 2.5;
}

.aa-page .aa-ix--out .aa-ix__lift {
  stroke: var(--aa-no);
}

.aa-page .aa-ix__liftmark {
  fill: var(--aa-known);
}

.aa-page .aa-ix--out .aa-ix__liftmark {
  fill: var(--aa-no);
}

.aa-page .aa-ix__cross,
.aa-page .aa-ix__stairs {
  fill: none;
  stroke: var(--aa-no);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aa-page .aa-ix .aa-ix__q {
  fill: var(--aa-unknown);
  font-size: 22px;
  font-weight: 800;
}

/* --------------------------------------------------------------------------
   3. Prototype interface components (.aa-ui)
   -------------------------------------------------------------------------- */

.aa-ui {
  color: var(--aa-ink);
}

/* The hidden attribute always wins over component display rules */
.aa-ui [hidden],
.aa-ui[hidden] {
  display: none !important;
}

.aa-ui .aa-label {
  display: block;
  margin-bottom: 10px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--aa-muted);
}

.aa-ui .aa-lead {
  max-width: 62ch;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: var(--aa-muted);
}

.aa-ui .aa-fine {
  font-size: .8125rem;
  line-height: 1.55;
  color: var(--aa-muted);
}

.aa-ui .aa-fine a,
.aa-ui .aa-link {
  color: var(--aa-ink);
  text-underline-offset: 3px;
}

.aa-ui .aa-card {
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--aa-line);
  border-radius: 16px;
  background: var(--aa-panel);
}

.aa-ui .aa-card--quiet {
  background: var(--aa-panel-2);
}

.aa-ui .aa-card h3 {
  margin-bottom: 10px;
}

.aa-ui .aa-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 3px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.4;
}

.aa-ui .aa-tag--signal {
  color: var(--aa-signal);
  background: var(--aa-signal-soft);
}

.aa-ui .aa-tag--quiet {
  color: var(--aa-muted);
  border-style: dashed;
}

.aa-ui .aa-tag--no {
  color: var(--aa-no);
  background: var(--aa-no-soft);
}

/* --- Buttons ---------------------------------------------------------------- */

.aa-ui .aa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1.5px solid var(--aa-btn);
  border-radius: 999px;
  background: var(--aa-btn);
  color: var(--aa-btn-ink);
  font-size: .9375rem;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.aa-ui .aa-btn:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.aa-ui .aa-btn--ghost {
  background: transparent;
  color: var(--aa-ink);
  border-color: var(--aa-control-line);
}

.aa-ui .aa-btn--ghost:not(:disabled):hover {
  border-color: var(--aa-ink);
}

.aa-ui .aa-btn--signal {
  background: var(--aa-signal);
  border-color: var(--aa-signal);
  color: var(--aa-panel);
}

.aa-ui .aa-btn--sm {
  min-height: 40px;
  padding: 8px 16px;
  font-size: .875rem;
}

.aa-ui .aa-btn__icon {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aa-ui .aa-textbtn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--aa-ink);
  font-size: .9375rem;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.aa-ui .aa-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

/* --- Form fields ------------------------------------------------------------- */

.aa-ui .aa-field {
  display: grid;
  gap: 8px;
}

.aa-ui .aa-field label,
.aa-ui .aa-legend {
  font-size: 1rem;
  font-weight: 650;
}

.aa-ui .aa-select {
  width: 100%;
  min-height: 52px;
  padding: 12px 44px 12px 16px;
  border: 1.5px solid var(--aa-control-line);
  border-radius: 12px;
  background-color: var(--aa-panel);
  background-image: linear-gradient(45deg, transparent 50%, var(--aa-ink) 50%), linear-gradient(135deg, var(--aa-ink) 50%, transparent 50%);
  background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  color: var(--aa-ink);
  font: inherit;
  font-size: 1.0625rem;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.aa-ui .aa-select[aria-invalid="true"] {
  border-color: var(--aa-no);
  border-width: 2px;
}

.aa-ui .aa-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .9375rem;
  font-weight: 650;
  color: var(--aa-no);
}

.aa-ui .aa-error::before {
  content: "!";
  display: grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--aa-no);
  color: var(--aa-panel);
  font-size: .75rem;
  font-weight: 800;
}

.aa-ui .aa-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.aa-ui .aa-fieldset legend {
  padding: 0;
  margin-bottom: 12px;
}

/* Checkbox and radio rows: native inputs, generously sized */
.aa-ui .aa-check {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 4px 14px;
  align-items: start;
  padding: 16px 18px;
  border: 1.5px solid var(--aa-control-line);
  border-radius: 14px;
  background: var(--aa-panel);
  cursor: pointer;
}

.aa-ui .aa-check + .aa-check {
  margin-top: 10px;
}

.aa-ui .aa-check input {
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--aa-signal);
  cursor: pointer;
}

.aa-ui .aa-check__title {
  font-weight: 650;
  line-height: 1.35;
}

.aa-ui .aa-check__desc {
  grid-column: 2;
  font-size: .875rem;
  line-height: 1.5;
  color: var(--aa-muted);
}

.aa-ui .aa-check:has(input:checked) {
  border-color: var(--aa-signal-mark);
  border-width: 2px;
  background: var(--aa-signal-soft);
}

.aa-ui .aa-check:hover {
  border-color: var(--aa-ink);
}

.aa-ui .aa-check--hard {
  border-left-width: 6px;
}

.aa-ui .aa-radios {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.aa-ui .aa-radios .aa-check + .aa-check {
  margin-top: 0;
}

/* --- Switch (disruption simulation) ------------------------------------------ */

.aa-ui .aa-switch {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 8px 20px 8px 8px;
  border: 2px solid var(--aa-no);
  border-radius: 999px;
  background: var(--aa-panel);
  color: var(--aa-ink);
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.aa-ui .aa-switch__track {
  position: relative;
  flex: none;
  width: 60px;
  height: 34px;
  border: 2px solid var(--aa-no);
  border-radius: 999px;
  background: var(--aa-panel-2);
}

.aa-ui .aa-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--aa-no);
  transition: transform .2s;
}

.aa-ui .aa-switch[aria-checked="true"] .aa-switch__track {
  background: var(--aa-no);
}

.aa-ui .aa-switch[aria-checked="true"] .aa-switch__thumb {
  background: var(--aa-panel);
  transform: translateX(26px);
}

.aa-ui .aa-switch__state {
  font-weight: 700;
  color: var(--aa-no);
}

/* --- Notices -------------------------------------------------------------------- */

.aa-ui .aa-notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  padding: 16px 18px;
  border: 1px solid var(--aa-line);
  border-left: 5px solid var(--aa-signal-mark);
  border-radius: 12px;
  background: var(--aa-signal-soft);
  font-size: .9375rem;
  line-height: 1.55;
}

.aa-ui .aa-notice > svg {
  grid-row: 1 / span 2;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--aa-signal);
  stroke-width: 2;
  stroke-linecap: round;
}

.aa-ui .aa-notice strong {
  color: var(--aa-signal);
}

.aa-ui .aa-notice--warn {
  border-left-color: var(--aa-no);
  background: var(--aa-no-soft);
}

.aa-ui .aa-notice--warn > svg {
  stroke: var(--aa-no);
}

.aa-ui .aa-notice--warn strong {
  color: var(--aa-no);
}

.aa-ui .aa-notice--unknown {
  border-left-color: var(--aa-unknown);
  background: var(--aa-unknown-soft);
}

.aa-ui .aa-notice--unknown > svg {
  stroke: var(--aa-unknown);
}

.aa-ui .aa-notice--unknown strong {
  color: var(--aa-unknown);
}

.aa-ui .aa-notice p + p {
  margin-top: 6px;
}

.aa-ui .aa-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .875rem;
}

.aa-ui .aa-key li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* --- Journey cards ------------------------------------------------------------- */

.aa-ui .aa-results {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aa-ui .aa-jcard {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 2.6vw, 28px);
  border: 1px solid var(--aa-line);
  border-radius: 18px;
  background: var(--aa-panel);
}

.aa-ui .aa-jcard--excluded {
  border-style: dashed;
  background: transparent;
}

.aa-ui .aa-jcard__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
}

.aa-ui .aa-jcard__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.aa-ui .aa-jcard__title h3 {
  margin: 0;
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
}

.aa-ui .aa-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0;
}

.aa-ui .aa-facts div {
  display: grid;
}

.aa-ui .aa-facts dt {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--aa-muted);
}

.aa-ui .aa-facts dd {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 650;
}

.aa-ui .aa-jcard__notes {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .9375rem;
  line-height: 1.5;
}

.aa-ui .aa-jcard__notes li {
  padding-left: 18px;
  position: relative;
}

.aa-ui .aa-jcard__notes li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--aa-signal-mark);
}

.aa-ui .aa-reasons {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0 0 0 1.2em;
  font-size: .9375rem;
  line-height: 1.5;
}

.aa-ui .aa-excluded summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 650;
  cursor: pointer;
}

.aa-ui .aa-excluded summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.aa-ui .aa-excluded[open] summary {
  margin-bottom: 12px;
}

/* --- Checklist ------------------------------------------------------------------ */

.aa-ui .aa-checklist {
  display: grid;
  gap: 22px;
  padding: clamp(20px, 3vw, 34px);
  border: 2px solid var(--aa-ink);
  border-radius: 18px;
  background: var(--aa-panel);
}

.aa-ui .aa-checklist__banner {
  padding: 10px 14px;
  border: 2px dashed var(--aa-no);
  border-radius: 10px;
  font-weight: 750;
  letter-spacing: .02em;
  color: var(--aa-no);
}

.aa-ui .aa-checklist h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.aa-ui .aa-checklist dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 18px;
  margin: 0;
  font-size: .9375rem;
}

.aa-ui .aa-checklist dt {
  font-weight: 700;
}

.aa-ui .aa-checklist dd {
  margin: 0;
}

.aa-ui .aa-checklist ol,
.aa-ui .aa-checklist ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.3em;
  font-size: .9375rem;
  line-height: 1.5;
}

.aa-ui .aa-copybox {
  width: 100%;
  min-height: 180px;
  padding: 12px;
  border: 1.5px solid var(--aa-control-line);
  border-radius: 10px;
  background: var(--aa-panel);
  color: var(--aa-ink);
  font: .875rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* --------------------------------------------------------------------------
   4. Prototype layout (work/access-atlas-prototype.html)
   -------------------------------------------------------------------------- */

.aa-proto-page .page-hero {
  padding-bottom: 28px;
}

.aa-proto-page .page-hero h1 {
  font-size: clamp(2.8rem, 6.4vw, 6.2rem);
}

.aa-disclose {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1000px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.aa-disclose li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--aa-line);
  border-radius: 999px;
  background: var(--aa-panel);
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.35;
}

.aa-disclose li::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--aa-signal-mark);
  transform: rotate(45deg);
}

.aa-noscript {
  margin-bottom: 60px;
  padding: 24px;
  border: 1px solid var(--aa-line);
  background: var(--aa-panel);
}

.aa-app {
  margin-bottom: 90px;
  scroll-margin-top: 80px;
  border: 1px solid var(--aa-line);
  border-radius: 24px;
  background: var(--bg);
  box-shadow: 0 40px 90px -60px rgba(20, 19, 17, .45);
}

.aa-app__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 14px clamp(18px, 3vw, 32px);
  border-bottom: 1px solid var(--aa-line);
}

.aa-app__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.aa-app__mark {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--aa-signal-mark);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.aa-app__flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1.5px dashed var(--aa-no);
  border-radius: 999px;
  font-size: .8125rem;
  font-weight: 700;
  color: var(--aa-no);
}

/* Progress: an ordered list of steps (information only) */
.aa-progress ol {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  margin: 0;
  padding: 0 clamp(10px, 2vw, 22px);
  list-style: none;
  border-bottom: 1px solid var(--aa-line);
}

.aa-progress li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 10px 6px;
  border-bottom: 3px solid transparent;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--aa-muted);
}

.aa-progress__num {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--aa-control-line);
  border-radius: 50%;
  font-size: .75rem;
  font-weight: 700;
}

.aa-progress li.is-done .aa-progress__num {
  border-color: var(--aa-signal-mark);
  color: var(--aa-signal);
}

.aa-progress li[aria-current="step"] {
  border-bottom-color: var(--aa-signal-mark);
  color: var(--aa-ink);
}

.aa-progress li[aria-current="step"] .aa-progress__num {
  border-color: var(--aa-ink);
  background: var(--aa-ink);
  color: var(--bg);
}

/* Screens */

.aa-screen {
  padding: clamp(24px, 4vw, 48px) clamp(18px, 3vw, 40px);
}

.aa-screen__head {
  display: grid;
  gap: 12px;
  margin-bottom: clamp(22px, 3vw, 34px);
}

.aa-screen__eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--aa-signal);
}

.aa-screen h2 {
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  letter-spacing: -.05em;
  scroll-margin-top: 90px;
}

.aa-screen h2:focus {
  outline: none;
}

.aa-screen h2:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 6px;
}

.aa-screen h3 {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  letter-spacing: -.02em;
}

.aa-stack {
  display: grid;
  gap: 18px;
}

.aa-split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 36px);
  align-items: start;
}

.aa-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* Journey setup: From / swap / To */
.aa-od {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: end;
}

.aa-swap {
  min-width: 52px;
  margin-bottom: 4px;
}

.aa-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 14px 18px;
  border: 1px solid var(--aa-line);
  border-radius: 14px;
  background: var(--aa-panel-2);
  font-size: .9375rem;
}

.aa-summary strong {
  font-weight: 700;
}

.aa-summary__route {
  font-size: 1.0625rem;
  font-weight: 700;
}

.aa-summary .aa-textbtn {
  min-height: 36px;
  margin-left: auto;
}

.aa-summary .aa-textbtn + .aa-textbtn {
  margin-left: 0;
}

/* The comparison "fastest vs suitable" note */
.aa-fastnote {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--aa-panel-2);
  font-size: .9375rem;
  line-height: 1.5;
}

.aa-fastnote svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--aa-ink);
  stroke-width: 2;
  stroke-linecap: round;
}

/* No-match state */
.aa-nomatch {
  display: grid;
  gap: 16px;
  padding: clamp(22px, 3vw, 34px);
  border: 2px solid var(--aa-unknown);
  border-radius: 18px;
  background: var(--aa-unknown-soft);
}

.aa-nomatch h3 {
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
}

.aa-nomatch p {
  max-width: 62ch;
  line-height: 1.6;
}

/* Detail */
.aa-ixgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--aa-line);
  border-radius: 14px;
  background: var(--aa-panel);
}

.aa-ixgrid + .aa-ixgrid {
  margin-top: 12px;
}

.aa-verify {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aa-verify li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  font-size: .9375rem;
  line-height: 1.5;
}

.aa-verify li::before {
  content: "?";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1.8px dashed var(--aa-unknown);
  border-radius: 50%;
  font-size: .8125rem;
  font-weight: 800;
  color: var(--aa-unknown);
}

/* Assistance */
.aa-handoff {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--aa-line);
  border-radius: 16px;
  overflow: hidden;
}

.aa-handoff li {
  position: relative;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 18px 20px;
  background: var(--aa-panel);
  font-size: .9375rem;
  line-height: 1.5;
}

.aa-handoff li + li {
  border-left: 1px solid var(--aa-line);
}

.aa-handoff li:first-child {
  background: var(--aa-signal-soft);
}

.aa-handoff__who {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--aa-muted);
}

.aa-handoff li:first-child .aa-handoff__who {
  color: var(--aa-signal);
}

.aa-handoff strong {
  font-size: 1.05rem;
}

.aa-official {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aa-official a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 650;
  color: var(--aa-ink);
  text-underline-offset: 4px;
}

.aa-official svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Disruption */
.aa-disrupt-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  padding: clamp(18px, 2.6vw, 26px);
  border: 1px solid var(--aa-line);
  border-radius: 18px;
  background: var(--aa-panel-2);
}

.aa-disrupt-top p {
  flex: 1 1 280px;
  font-size: .9375rem;
  line-height: 1.55;
}

.aa-effects {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aa-effects li {
  display: grid;
  grid-template-columns: minmax(0, 140px) 1fr;
  gap: 6px 16px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid var(--aa-line);
  border-radius: 12px;
  background: var(--aa-panel);
  font-size: .9375rem;
  line-height: 1.5;
}

.aa-effects li.is-affected {
  border: 2px solid var(--aa-no);
}

/* Footer */
.aa-app__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px clamp(18px, 3vw, 40px) 24px;
  border-top: 1px solid var(--aa-line);
}

.aa-app__foot .aa-fine {
  flex: 1 1 260px;
  text-align: center;
}

/* --- Prototype: tablets (900px and below) ---------------------------------- */

@media (max-width: 900px) {
  .aa-split,
  .aa-two {
    grid-template-columns: 1fr;
  }

  .aa-handoff {
    grid-template-columns: 1fr;
  }

  .aa-handoff li + li {
    border-left: 0;
    border-top: 1px solid var(--aa-line);
  }

  /* Progress: numbers only, with the current step named */
  .aa-progress ol {
    grid-template-columns: repeat(8, auto);
    justify-content: space-between;
  }

  .aa-progress__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .aa-progress li[aria-current="step"] .aa-progress__label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }
}

/* --- Prototype: phones (630px and below) ----------------------------------- */

@media (max-width: 630px) {
  .aa-app {
    border-radius: 18px;
  }

  .aa-screen {
    padding: 22px 14px 26px;
  }

  .aa-progress ol {
    padding: 0 4px;
  }

  .aa-progress li {
    gap: 6px;
    padding: 8px 2px;
  }

  .aa-od {
    grid-template-columns: 1fr;
  }

  .aa-swap {
    justify-self: start;
    margin: 0;
  }

  .aa-ui .aa-radios {
    grid-template-columns: 1fr;
  }

  .aa-effects li {
    grid-template-columns: 1fr;
  }

  .aa-ui .aa-checklist dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .aa-ui .aa-checklist dd {
    margin-bottom: 8px;
  }

  .aa-summary .aa-textbtn {
    margin-left: 0;
  }

  .aa-app__foot .aa-fine {
    order: 3;
    flex-basis: 100%;
  }

  .aa-app__foot .aa-nav-dest {
    display: none;
  }

  .aa-app__foot #aa-next,
  .aa-app__foot #aa-restart {
    flex: 1 1 auto;
  }
}

@media (max-width: 359px) {
  .aa-progress li[aria-current="step"] .aa-progress__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

/* --- Print: only the checklist ------------------------------------------------- */

@media print {
  body * {
    visibility: hidden;
  }

  .aa-proto-page .aa-checklist,
  .aa-proto-page .aa-checklist * {
    visibility: visible;
  }

  .aa-proto-page .aa-checklist {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    border-color: #000;
    background: #fff;
    color: #000;
  }

  .aa-proto-page .aa-checklist .aa-status,
  .aa-proto-page .aa-checklist__banner {
    background: #fff;
    color: #000;
    border-color: #000;
  }

  .aa-proto-page .aa-checklist a::after {
    content: " (" attr(href) ")";
    font-size: .8em;
  }
}

/* --- Reduced motion ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  .aa-ui .aa-switch__thumb {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   5. Case study visuals (work/access-atlas.html, body.aa-case)
   -------------------------------------------------------------------------- */

.aa-case .aa-fig {
  margin: 44px 0 0;
}

.aa-case .aa-fig__label {
  margin-bottom: 14px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--aa-muted);
}

.aa-case .aa-fig figcaption,
.aa-case .aa-matrix caption {
  max-width: 820px;
  margin-top: 16px;
  font-size: .8125rem;
  line-height: 1.6;
  color: var(--aa-muted);
  text-align: left;
}

/* --- Call to action ---------------------------------------------------------- */

.aa-case .aa-cta {
  display: grid;
  gap: 10px;
  margin-top: 30px;
}

.aa-case .aa-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  min-height: 52px;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--aa-btn);
  color: var(--aa-btn-ink);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
  transition: transform .18s;
}

.aa-case .aa-cta__btn:hover {
  transform: translateY(-2px);
}

.aa-case .aa-cta__btn--light {
  background: var(--aa-board-ink);
  color: var(--aa-board);
}

.aa-case .aa-cta__icon,
.aa-case .aa-ext {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aa-case .aa-ext {
  width: 14px;
  height: 14px;
  margin-left: 6px;
  vertical-align: -2px;
}

.aa-case .aa-cta__note {
  font-size: .8125rem;
  color: var(--aa-muted);
}

/* --- Hero: the departure "board" (charcoal in both themes) ------------------ */

.aa-case .aa-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  margin-top: 34px;
}

.aa-case .aa-hero__grid .intro {
  margin-top: 0;
}

.aa-case .aa-board {
  --aa-panel: #1f2122;
  --aa-panel-2: #26292a;
  --aa-ink: #f3f1ea;
  --aa-muted: #b4b8b6;
  --aa-line: #34383a;
  --aa-route: #f3f1ea;
  --aa-known: #8fd5a8;
  --aa-unknown: #f0b45c;
  --aa-no: #ff9d92;
  margin: 0;
  padding: clamp(18px, 2.4vw, 26px);
  border-radius: 24px;
  background: var(--aa-board);
  color: var(--aa-board-ink);
  box-shadow: 0 40px 80px -50px rgba(20, 19, 17, .7);
}

.aa-case .aa-board__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--aa-board-line);
  font-weight: 650;
}

.aa-case .aa-board__tag {
  padding: 3px 10px;
  border: 1.5px dashed var(--aa-board-no);
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--aa-board-no);
}

.aa-case .aa-board__row {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--aa-board-line);
  border-radius: 16px;
  background: var(--aa-panel);
}

.aa-case .aa-board__row--fit {
  border-color: var(--aa-board-known);
}

.aa-case .aa-board__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}

.aa-case .aa-board__kicker {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--aa-board-signal);
}

.aa-case .aa-board figcaption {
  margin-top: 14px;
  font-size: .8125rem;
  line-height: 1.55;
  color: var(--aa-board-muted);
}

/* --- 01 Fastest vs suitable --------------------------------------------------- */

.aa-case .aa-vs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.aa-case .aa-vs figcaption {
  grid-column: 1 / -1;
}

.aa-case .aa-vs__col {
  padding: clamp(18px, 2.6vw, 28px);
  border: 1px solid var(--aa-line);
  border-radius: 18px;
  background: var(--aa-panel);
}

.aa-case .aa-vs__col--fit {
  border: 2px solid var(--aa-signal-mark);
}

.aa-case .aa-rank {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rank;
}

.aa-case .aa-rank li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  align-items: baseline;
  counter-increment: rank;
}

.aa-case .aa-rank__id {
  font-size: 1.15rem;
  font-weight: 700;
}

.aa-case .aa-rank__id::before {
  content: counter(rank) ". ";
  color: var(--aa-muted);
}

.aa-case .aa-rank__time {
  color: var(--aa-muted);
}

.aa-case .aa-rank .aa-status {
  grid-column: 1 / -1;
}

.aa-case .aa-vs__out {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1.5px dashed var(--aa-control-line);
  border-radius: 12px;
  font-size: .9375rem;
  line-height: 1.5;
}

/* --- 02 Context to product ----------------------------------------------------- */

.aa-case .aa-ctx ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aa-case .aa-ctx li {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr);
  border: 1px solid var(--aa-line);
  border-radius: 16px;
  overflow: hidden;
}

.aa-case .aa-ctx__cell {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 18px 22px;
  background: var(--aa-panel);
  font-size: .9375rem;
  line-height: 1.55;
}

.aa-case .aa-ctx__cell + .aa-ctx__cell {
  border-left: 1px solid var(--aa-line);
}

/* Arrow between columns */
.aa-case .aa-ctx__cell + .aa-ctx__cell::before {
  content: "→";
  position: absolute;
  top: 16px;
  left: -11px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--aa-panel);
  font-weight: 700;
  color: var(--aa-signal);
}

.aa-case .aa-ctx__cell--src {
  background: var(--aa-panel-2);
}

.aa-case .aa-ctx__cell--feat {
  background: var(--aa-signal-soft);
}

.aa-case .aa-ctx__k {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--aa-muted);
}

.aa-case .aa-ctx__cell--feat .aa-ctx__k {
  color: var(--aa-signal);
}

.aa-case .aa-ctx a {
  font-size: .875rem;
  font-weight: 650;
  color: var(--aa-ink);
  text-underline-offset: 3px;
  /* 24px+ click/tap area; the negative margin cancels the padding */
  padding-block: 2px;
  margin-block: -2px;
}

/* --- 03 Ask / never ask ------------------------------------------------------------ */

.aa-case .aa-ask {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 14px;
}

.aa-case .aa-ask figcaption {
  grid-column: 1 / -1;
}

.aa-case .aa-ask__col {
  padding: clamp(18px, 2.6vw, 28px);
  border: 1px solid var(--aa-line);
  border-radius: 18px;
  background: var(--aa-panel);
}

.aa-case .aa-ask__col--never {
  border-style: dashed;
  background: transparent;
}

.aa-case .aa-ask ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aa-case .aa-ask li {
  display: grid;
  gap: 2px;
  padding-left: 28px;
  position: relative;
  line-height: 1.45;
}

.aa-case .aa-ask li::before {
  content: "✓";
  position: absolute;
  left: 0;
  font-weight: 800;
  color: var(--aa-known);
}

.aa-case .aa-ask__col--never li::before {
  content: "✕";
  color: var(--aa-no);
}

.aa-case .aa-ask li span {
  font-size: .875rem;
  color: var(--aa-muted);
}

/* --- 04 States, matrix, interchanges -------------------------------------------------- */

.aa-case .aa-states__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aa-case .aa-states__list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--aa-line);
  border-radius: 16px;
  background: var(--aa-panel);
}

.aa-case .aa-states__list .aa-glyph {
  width: 28px;
  height: 28px;
}

.aa-case .aa-states__list div {
  display: grid;
  gap: 6px;
}

.aa-case .aa-states__list strong {
  font-size: 1.05rem;
}

.aa-case .aa-states__list .is-known strong {
  color: var(--aa-known);
}

.aa-case .aa-states__list .is-unknown strong {
  color: var(--aa-unknown);
}

.aa-case .aa-states__list .is-no strong {
  color: var(--aa-no);
}

.aa-case .aa-states__list span {
  font-size: .9375rem;
  line-height: 1.5;
  color: var(--aa-muted);
}

.aa-case .aa-matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--aa-line);
  border-radius: 16px;
  background: var(--aa-panel);
  font-size: .9375rem;
}

/* Rounded header corners without clipping the caption below the table */
.aa-case .aa-matrix thead th:first-child {
  border-top-left-radius: 15px;
}

.aa-case .aa-matrix thead th:last-child {
  border-top-right-radius: 15px;
}

.aa-case .aa-matrix caption {
  caption-side: bottom;
}

.aa-case .aa-matrix th,
.aa-case .aa-matrix td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--aa-line);
  text-align: left;
  vertical-align: top;
}

.aa-case .aa-matrix thead th {
  background: var(--aa-panel-2);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--aa-muted);
}

.aa-case .aa-matrix tbody tr:last-child th,
.aa-case .aa-matrix tbody tr:last-child td {
  border-bottom: 0;
}

.aa-case .aa-matrix tbody th {
  font-size: 1.05rem;
}

.aa-case .aa-matrix small {
  display: block;
  margin-top: 4px;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--aa-muted);
}

.aa-case .aa-matrix td {
  position: relative;
  padding-left: 46px;
}

.aa-case .aa-matrix td .aa-glyph {
  position: absolute;
  left: 14px;
  top: 14px;
}

.aa-case .aa-matrix td > span {
  font-weight: 650;
}

.aa-case .aa-matrix td.is-known > span {
  color: var(--aa-known);
}

.aa-case .aa-matrix td.is-unknown > span {
  color: var(--aa-unknown);
}

.aa-case .aa-matrix td.is-no > span {
  color: var(--aa-no);
}

.aa-case .aa-matrix td.is-none {
  padding-left: 16px;
  color: var(--aa-muted);
}

.aa-case .aa-matrix td.is-none > span {
  font-weight: 500;
}

.aa-case .aa-ixcases ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aa-case .aa-ixcases li {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--aa-line);
  border-radius: 16px;
  background: var(--aa-panel);
}

.aa-case .aa-ixcase__title {
  font-weight: 700;
}

.aa-case .aa-ixcases .aa-status {
  font-size: .875rem;
}

/* --- 05 Trade-offs and IA ----------------------------------------------------------------- */

.aa-case .aa-trade ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aa-case .aa-trade li {
  display: grid;
  grid-template-columns: 100px minmax(0, 1.4fr) 90px minmax(0, 1.2fr);
  gap: 10px 18px;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid var(--aa-line);
  border-radius: 14px;
  background: var(--aa-panel);
}

.aa-case .aa-trade__id {
  font-weight: 700;
}

.aa-case .aa-trade__bar {
  position: relative;
  display: block;
  height: 26px;
  border-radius: 6px;
  background: var(--aa-panel-2);
}

.aa-case .aa-trade__fill {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: var(--aa-route);
  opacity: .85;
}

.aa-case .aa-trade__val {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  font-size: .8125rem;
  font-weight: 700;
  color: var(--aa-panel);
}

.aa-case .aa-trade__changes {
  color: var(--aa-muted);
}

.aa-case .aa-trade__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .875rem;
  font-weight: 650;
}

.aa-case .aa-trade li.is-known .aa-trade__status {
  color: var(--aa-known);
}

.aa-case .aa-trade li.is-unknown .aa-trade__status {
  color: var(--aa-unknown);
}

.aa-case .aa-trade li.is-no .aa-trade__status {
  color: var(--aa-no);
}

.aa-case .aa-w-5 {
  width: 5%;
}

.aa-case .aa-w-10 {
  width: 10%;
}

.aa-case .aa-w-15 {
  width: 15%;
}

.aa-case .aa-w-20 {
  width: 20%;
}

.aa-case .aa-w-25 {
  width: 25%;
}

.aa-case .aa-w-30 {
  width: 30%;
}

.aa-case .aa-w-35 {
  width: 35%;
}

.aa-case .aa-w-40 {
  width: 40%;
}

.aa-case .aa-w-45 {
  width: 45%;
}

.aa-case .aa-w-50 {
  width: 50%;
}

.aa-case .aa-w-55 {
  width: 55%;
}

.aa-case .aa-w-60 {
  width: 60%;
}

.aa-case .aa-w-65 {
  width: 65%;
}

.aa-case .aa-w-70 {
  width: 70%;
}

.aa-case .aa-w-75 {
  width: 75%;
}

.aa-case .aa-w-80 {
  width: 80%;
}

.aa-case .aa-w-85 {
  width: 85%;
}

.aa-case .aa-w-90 {
  width: 90%;
}

.aa-case .aa-w-95 {
  width: 95%;
}

.aa-case .aa-w-100 {
  width: 100%;
}

.aa-case .aa-ia__groups {
  display: grid;
  grid-template-columns: 3fr 2fr 3fr;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aa-case .aa-ia__group {
  padding: 16px;
  border: 1px solid var(--aa-line);
  border-top: 4px solid var(--aa-signal-mark);
  border-radius: 16px;
  background: var(--aa-panel-2);
}

.aa-case .aa-ia__phase {
  margin-bottom: 12px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--aa-signal);
}

.aa-case .aa-ia__group ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aa-case .aa-ia__group li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 2px 10px;
  padding: 12px;
  border-radius: 12px;
  background: var(--aa-panel);
  font-size: .875rem;
  line-height: 1.45;
}

.aa-case .aa-ia__group li strong {
  font-size: .9375rem;
}

.aa-case .aa-ia__group li span:last-child {
  grid-column: 2;
  color: var(--aa-muted);
}

.aa-case .aa-ia__n {
  display: grid;
  place-items: center;
  grid-row: 1 / span 2;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--aa-ink);
  border-radius: 50%;
  font-size: .75rem;
  font-weight: 700;
}

/* --- 06 Journey map ------------------------------------------------------------------------ */

.aa-case .aa-jm ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aa-case .aa-jm li {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--aa-line);
  border-top: 3px solid var(--aa-route);
  border-radius: 14px;
  background: var(--aa-panel);
}

.aa-case .aa-jm__n {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--aa-signal);
}

.aa-case .aa-jm dl {
  display: grid;
  gap: 10px;
  margin: 6px 0 0;
}

.aa-case .aa-jm dt {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--aa-muted);
}

.aa-case .aa-jm dd {
  margin: 2px 0 0;
  font-size: .875rem;
  line-height: 1.45;
}

/* --- 07 Assistance handoff -------------------------------------------------------------------- */

.aa-case .aa-hand__flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aa-case .aa-hand__step {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--aa-line);
  border-radius: 16px;
  background: var(--aa-panel);
  font-size: .9375rem;
  line-height: 1.5;
}

.aa-case .aa-hand__step--atlas {
  border: 2px solid var(--aa-signal-mark);
  background: var(--aa-signal-soft);
}

.aa-case .aa-hand__who {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--aa-muted);
}

.aa-case .aa-hand__step strong {
  font-size: 1.1rem;
}

.aa-case .aa-hand__boundary {
  display: grid;
  place-items: center;
  border-left: 3px dashed var(--aa-no);
  margin-left: 33px;
}

.aa-case .aa-hand__boundary span {
  width: 120px;
  margin-left: -60px;
  padding: 6px 8px;
  border: 1.5px solid var(--aa-no);
  border-radius: 10px;
  background: var(--bg);
  font-size: .75rem;
  font-weight: 700;
  text-align: center;
  color: var(--aa-no);
}

/* --- 08 Disruption recovery --------------------------------------------------------------------- */

.aa-case .aa-rec__flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aa-case .aa-rec__panel {
  display: grid;
  align-content: start;
  gap: 10px;
  height: 100%;
  padding: 18px;
  border: 1px solid var(--aa-line);
  border-radius: 16px;
  background: var(--aa-panel);
}

.aa-case .aa-rec__panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aa-case .aa-rec__panel li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  font-size: .9375rem;
  line-height: 1.45;
}

.aa-case .aa-rec__note {
  font-size: .875rem;
  line-height: 1.5;
  color: var(--aa-muted);
}

.aa-case .aa-rec__panel--action {
  border: 2px solid var(--aa-signal-mark);
  background: var(--aa-signal-soft);
}

.aa-case .aa-rec__cta {
  width: fit-content;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--aa-btn);
  color: var(--aa-btn-ink);
  font-size: .875rem;
  font-weight: 650;
}

.aa-case .aa-rec__nomatch {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  margin-top: 12px;
  padding: 16px 18px;
  border: 2px solid var(--aa-unknown);
  border-radius: 14px;
  background: var(--aa-unknown-soft);
  font-size: .9375rem;
  line-height: 1.55;
}

/* --- 09 Launch, working vs fictional, galleries --------------------------------------------------- */

.aa-case .aa-launch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px 32px;
  margin-top: 40px;
  padding: clamp(24px, 4vw, 44px);
  border-radius: 24px;
  background: var(--aa-board);
  color: var(--aa-board-ink);
}

.aa-case .aa-launch > div {
  flex: 1 1 420px;
}

.aa-case .aa-launch__kicker {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--aa-board-signal);
}

.aa-case .aa-launch__title {
  margin: 10px 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.aa-case .aa-launch__text {
  max-width: 56ch;
  color: var(--aa-board-muted);
}

.aa-case .aa-real {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1px;
  margin-top: 14px;
  border: 1px solid var(--aa-line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--aa-line);
}

.aa-case .aa-real__col {
  padding: clamp(18px, 3vw, 30px);
  background: var(--aa-panel);
}

.aa-case .aa-real ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aa-case .aa-real li {
  position: relative;
  padding-left: 26px;
  font-size: .9375rem;
  line-height: 1.5;
}

.aa-case .aa-real li::before {
  content: "✓";
  position: absolute;
  left: 0;
  font-weight: 800;
  color: var(--aa-known);
}

.aa-case .aa-real__col--sim li::before {
  content: "◇";
  color: var(--aa-unknown);
}

.aa-case .aa-gallery__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
}

.aa-case .aa-gallery__title {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
}

.aa-case .aa-badge {
  padding: 4px 11px;
  border: 1px dashed var(--aa-control-line);
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--aa-muted);
}

.aa-case .aa-gallery__intro {
  max-width: 62ch;
  margin: 8px 0 20px;
  color: var(--aa-muted);
}

.aa-case .aa-wfs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.aa-case .aa-wf {
  margin: 0;
}

.aa-case .aa-wf__svg {
  display: block;
  width: 100%;
  height: auto;
}

.aa-case .aa-wf figcaption {
  display: grid;
  gap: 2px;
  margin-top: 10px;
  font-size: .875rem;
}

.aa-case .aa-wf figcaption ul {
  margin: 6px 0 0;
  padding-left: 1.1em;
  font-size: .8125rem;
  line-height: 1.45;
  color: var(--aa-muted);
}

.aa-case .aa-wf__id {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--aa-signal);
}

.aa-case .wf-frame {
  fill: var(--aa-panel);
  stroke: var(--aa-control-line);
  stroke-width: 1.2;
}

.aa-case .wf-rule {
  stroke: var(--aa-line);
  stroke-width: 1;
}

.aa-case .wf-line {
  stroke: var(--aa-control-line);
  stroke-width: 3;
  stroke-linecap: round;
}

.aa-case .wf-line--bold {
  stroke: var(--aa-ink);
  stroke-width: 5;
}

.aa-case .wf-flag {
  fill: none;
  stroke: var(--aa-no);
  stroke-width: 1.2;
  stroke-dasharray: 3 2;
}

.aa-case .wf-dot {
  fill: none;
  stroke: var(--aa-control-line);
  stroke-width: 1.2;
}

.aa-case .wf-dot--on {
  fill: var(--aa-ink);
  stroke: var(--aa-ink);
}

.aa-case .wf-box {
  fill: none;
  stroke: var(--aa-control-line);
  stroke-width: 1.2;
}

.aa-case .wf-box--err {
  stroke: var(--aa-no);
}

.aa-case .wf-box--hard {
  fill: var(--aa-signal-soft);
  stroke: var(--aa-signal-mark);
  stroke-width: 2;
}

.aa-case .wf-err {
  stroke: var(--aa-no);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.aa-case .wf-fill {
  fill: var(--aa-panel-2);
  stroke: var(--aa-line);
}

.aa-case .wf-btn {
  fill: var(--aa-ink);
}

.aa-case .wf-route {
  stroke: var(--aa-route);
  stroke-width: 3;
  stroke-linecap: round;
}

.aa-case .wf-node {
  fill: var(--aa-panel);
  stroke: var(--aa-ink);
  stroke-width: 1.5;
}

.aa-case .wf-ix {
  fill: var(--aa-panel-2);
  stroke: var(--aa-control-line);
}

.aa-case .wf-switch {
  fill: var(--aa-no);
}

.aa-case .aa-hifis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 20px;
}

.aa-case .aa-hifi {
  margin: 0;
}

.aa-case .aa-hifi__frame {
  overflow: hidden;
  border: 1px solid var(--aa-line);
  border-radius: 16px;
  background: var(--aa-panel);
  box-shadow: 0 30px 60px -44px rgba(20, 19, 17, .55);
}

.aa-case .aa-shot {
  display: block;
  width: 100%;
  height: auto;
}

/* Screens follow the site theme */
.aa-case .aa-shot--dark {
  display: none;
}

:root[data-theme=dark] .aa-case .aa-shot--light {
  display: none;
}

:root[data-theme=dark] .aa-case .aa-shot--dark {
  display: block;
}

.aa-case .aa-hifi figcaption {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 12px;
  font-size: .9375rem;
}

/* --- 10 Evaluation pills ------------------------------------------------------------------------- */

.aa-case .aa-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-top: 16px;
  padding: 4px 11px;
  border: 1px dashed var(--aa-control-line);
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--aa-muted);
}

.aa-case .aa-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.aa-case .aa-pill--gate::before {
  border-radius: 1px;
  transform: rotate(45deg);
}

/* --- Case study: tablets (900px and below) ---------------------------------------------------------- */

@media (max-width: 900px) {
  .aa-case .aa-hero__grid,
  .aa-case .aa-vs,
  .aa-case .aa-ask,
  .aa-case .aa-rec__flow {
    grid-template-columns: 1fr;
  }

  .aa-case .aa-ctx li {
    grid-template-columns: 1fr;
  }

  .aa-case .aa-ctx__cell + .aa-ctx__cell {
    border-left: 0;
    border-top: 1px solid var(--aa-line);
  }

  .aa-case .aa-ctx__cell + .aa-ctx__cell::before {
    content: "↓";
    top: -11px;
    left: 22px;
  }

  .aa-case .aa-states__list,
  .aa-case .aa-ixcases ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .aa-case .aa-ia__groups {
    grid-template-columns: 1fr;
  }

  .aa-case .aa-hand__flow {
    grid-template-columns: 1fr;
  }

  .aa-case .aa-hand__boundary {
    min-height: 44px;
    margin: 0;
    border-left: 0;
    border-top: 3px dashed var(--aa-no);
  }

  .aa-case .aa-hand__boundary span {
    width: auto;
    margin: -14px 0 0;
  }

  .aa-case .aa-wfs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 14px;
  }

  .aa-case .aa-trade li {
    grid-template-columns: 90px minmax(0, 1fr) 80px;
  }

  .aa-case .aa-trade__status {
    grid-column: 1 / -1;
  }
}

/* --- Case study: phones (630px and below) ----------------------------------------------------------- */

@media (max-width: 630px) {
  .aa-case .aa-cta__btn {
    width: 100%;
    justify-content: center;
  }

  .aa-case .aa-board__row {
    padding: 12px;
  }

  .aa-case .aa-states__list,
  .aa-case .aa-ixcases ul,
  .aa-case .aa-real,
  .aa-case .aa-hifis {
    grid-template-columns: 1fr;
  }

  .aa-case .aa-wfs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .aa-case .aa-trade li {
    grid-template-columns: 1fr auto;
  }

  .aa-case .aa-trade__bar {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .aa-case .aa-trade__status {
    grid-row: 3;
  }

  /* The confidence matrix becomes one card per journey */
  .aa-case .aa-matrix,
  .aa-case .aa-matrix tbody,
  .aa-case .aa-matrix tr,
  .aa-case .aa-matrix th,
  .aa-case .aa-matrix td {
    display: block;
  }

  .aa-case .aa-matrix {
    border: 0;
    background: none;
  }

  .aa-case .aa-matrix caption {
    display: block;
  }

  .aa-case .aa-matrix thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .aa-case .aa-matrix tr {
    margin-bottom: 10px;
    border: 1px solid var(--aa-line);
    border-radius: 14px;
    background: var(--aa-panel);
  }

  .aa-case .aa-matrix td.is-none {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aa-case .aa-cta__btn {
    transition: none;
  }

  .aa-case .aa-cta__btn:hover {
    transform: none;
  }
}
