/* ============================================================
   LAWS Tracker — Lethal Autonomous Weapon Systems
   Brand: ARI. Deep navy + cool paper, crimson signal (#D6234D / #151C42).
   Display serif (Fraunces) · Archivo UI · IBM Plex Mono for data.

   The tracker itself runs dark: it is an instrument, not an essay.
   Photographs are duotoned to navy so that 155 images drawn from ~80
   different sources read as one system rather than a scrapbook.
   ============================================================ */

:root {
  --paper:      #eef1f5;
  --paper-2:    #e4e9ef;
  --ink:        #151c42;
  --ink-2:      #44505c;
  --ink-3:      #6b7682;
  --rule:       #d4dae2;
  --signal:     #d6234d;
  --signal-2:   #b01a3e;
  --slate:      #6f8b96;

  --dark:       #0b1030;
  --dark-2:     #131a44;
  --dark-3:     #1c2557;
  --dark-rule:  rgba(255,255,255,0.13);
  --dark-text:  #eef2f6;
  --dark-mute:  #9aa6c4;

  /* autonomy classes: intensity tracks how far the human recedes */
  --a1: #d6234d;   /* unsupervised */
  --a2: #e2683f;   /* supervised, abort-capable */
  --a3: #e0a63c;   /* bounded envelope */
  --b1: #6f8b96;   /* engagement completion only */

  /* Categorical series colors — validated (light surface): lightness band, chroma
     floor, CVD separation and normal-vision floor all pass. Amber sits under 3:1
     against paper, which is why every bar carries a visible numeric label. */
  --cat-1: #3f6fd0;  --cat-2: #d6234d;  --cat-3: #0e9e86;
  --cat-4: #dc9a1e;  --cat-5: #9159c9;

  /* Sequential ramps for ranked magnitude (one hue, light -> dark). */
  --seq-1: #b9c6e8;  --seq-2: #8ea4dc;  --seq-3: #6382cf;  --seq-4: #3f6fd0;  --seq-5: #2a4fa0;
  --tseq-1: #b3ded6; --tseq-2: #7fc9bc; --tseq-3: #4bb3a1; --tseq-4: #0e9e86; --tseq-5: #0a7565;

  --ui: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 78rem;
  --measure: 40rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
section[id] { scroll-margin-top: 70px; }

body {
  font-family: var(--ui);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
a { color: inherit; }
::selection { background: var(--signal); color: #fff; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: 1rem; top: 0.5rem; z-index: 300;
  background: var(--ink); color: #fff; padding: 0.6rem 0.9rem; border-radius: 3px;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 2rem; }
.measure { max-width: var(--measure); }

.ico { width: 1em; height: 1em; display: inline-block; vertical-align: -0.13em; flex: none; }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,16,48,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--dark-rule);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 58px; gap: 1.5rem;
}
.org {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--dark-text); text-decoration: none;
  line-height: 1.25; max-width: 15rem;
}
.org em { color: var(--signal); font-style: normal; }
.topnav { display: flex; gap: 1.6rem; }
.topnav a {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.11em;
  text-transform: uppercase; color: var(--dark-mute); text-decoration: none;
  padding: 0.3rem 0; border-bottom: 2px solid transparent;
}
.topnav a:hover { color: #fff; border-bottom-color: var(--signal); }

/* ---------- hero ---------- */
.hero { position: relative; background: var(--dark); color: var(--dark-text); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(214,35,77,0.07) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(214,35,77,0.07) 0 1px, transparent 1px 34px),
    radial-gradient(90% 130% at 86% 0%, rgba(214,35,77,0.28), transparent 58%);
}
.hero-inner { position: relative; padding: 5.5rem 2rem 3.5rem; }
.eyebrow {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--signal); margin-bottom: 1.4rem;
}
.hero h1 {
  font-family: var(--display); font-weight: 700; font-size: clamp(2.6rem, 6.5vw, 5rem);
  line-height: 1.02; letter-spacing: -0.02em; margin-bottom: 1.6rem;
}
.standfirst {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.55;
  max-width: 46rem; color: #cdd6e8;
}
.standfirst strong { color: #fff; font-weight: 700; }

.statbar {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  margin-top: 3.2rem; background: var(--dark-rule);
  border: 1px solid var(--dark-rule);
}
.stat { background: var(--dark); padding: 1.4rem 1.2rem; }
.stat-n {
  display: block; font-family: var(--display); font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1; color: #fff;
  font-variant-numeric: tabular-nums;
}
.stat-l {
  display: block; margin-top: 0.6rem; font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--dark-mute); line-height: 1.35;
}

/* ---------- bands ---------- */
.band { padding: 5rem 0; }
.band-alt { background: var(--paper-2); }
.kicker {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--signal-2); margin-bottom: 1rem;
}
.h-display {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.8rem, 3.4vw, 2.9rem); line-height: 1.12;
  letter-spacing: -0.015em; margin-bottom: 1.4rem;
}
.h-sub {
  font-family: var(--ui); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2);
  margin: 2rem 0 0.9rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--rule);
}
.h-sub:first-child { margin-top: 0; }
.lede { font-size: 1.12rem; color: var(--ink-2); margin-bottom: 2.4rem; }
.lede em { font-style: italic; color: var(--ink); }
.sub-note { font-size: 0.85rem; color: var(--ink-3); margin-bottom: 1rem; }
.note {
  margin-top: 2rem; padding: 1.1rem 1.3rem; background: #fff;
  border-left: 3px solid var(--signal); font-size: 0.92rem; color: var(--ink-2);
}
.note .ico { color: var(--signal); margin-right: 0.4rem; }

/* ---------- tier cards ---------- */
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.tier {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--rule); border-top: 4px solid var(--tc);
  padding: 1.3rem 1.2rem 1.4rem;
  color: inherit; text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
/* Cards link to the tracker filtered by class: they lift on hover/focus and the
   footer line turns the class color, so they read as controls. */
.tier:hover, .tier:focus-visible {
  border-color: var(--tc); box-shadow: 0 6px 18px rgba(21, 28, 66, 0.10); transform: translateY(-2px);
}
.tier:focus-visible { outline: 2px solid var(--tc); outline-offset: 2px; }
.tier-go {
  margin-top: auto; padding-top: 1rem;
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.8rem; font-weight: 600; color: var(--ink-2);
}
.tier-go .ico { width: 0.9rem; height: 0.9rem; transition: transform 0.15s ease; }
.tier:hover .tier-go, .tier:focus-visible .tier-go { color: var(--ink); }
.tier:hover .tier-go .ico, .tier:focus-visible .tier-go .ico { transform: translateX(3px); color: var(--tc); }
@media (prefers-reduced-motion: reduce) { .tier, .tier-go .ico { transition: none; } .tier:hover { transform: none; } }
.tier-head { display: flex; justify-content: space-between; align-items: flex-start; }
.tier-code {
  font-family: var(--mono); font-size: 1.5rem; font-weight: 500; color: var(--tc); line-height: 1;
}
.tier-n {
  font-family: var(--display); font-size: 1.9rem; font-weight: 700;
  line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums;
}
.tier-name {
  margin: 0.7rem 0 0.5rem; font-size: 0.92rem; font-weight: 700; line-height: 1.3;
}
.tier-desc { font-size: 0.84rem; color: var(--ink-2); line-height: 1.5; }

/* ---------- explorer (dark instrument) ---------- */
.explorer { background: var(--dark); color: var(--dark-text); padding: 5rem 0; }
.explorer .kicker { color: var(--signal); }
.explorer .h-display { color: #fff; margin-bottom: 2rem; }

.controls { margin-bottom: 2rem; }
.search { position: relative; margin-bottom: 1.2rem; max-width: 34rem; }
.search .ico {
  position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%);
  color: var(--dark-mute); width: 1.05rem; height: 1.05rem;
}
.search input {
  width: 100%; font-family: var(--ui); font-size: 0.95rem; color: #fff;
  background: var(--dark-2); border: 1px solid var(--dark-rule); border-radius: 3px;
  padding: 0.75rem 0.9rem 0.75rem 2.6rem;
}
.search input::placeholder { color: var(--dark-mute); }
.search input:focus { border-color: var(--signal); outline: none; }

/* One group per row: a bold title in its own column, chips wrapping beside it, so
   the titles read as headings rather than blending into the chips. */
.filters { display: grid; gap: 0.75rem; }
.fgroup { display: grid; grid-template-columns: 7.5rem 1fr; align-items: start; gap: 0.5rem 1rem; }
.fgroup > .flabel {
  font-family: var(--ui); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: #fff; padding-top: 0.42rem;
  border-left: 2px solid var(--signal); padding-left: 0.6rem; line-height: 1.2;
}
.fchips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
@media (max-width: 40rem) {
  .fgroup { grid-template-columns: 1fr; gap: 0.45rem; }
  .fgroup > .flabel { padding-top: 0; }
}
.chip {
  font-family: var(--ui); font-size: 0.76rem; font-weight: 600;
  color: var(--dark-mute); background: transparent;
  border: 1px solid var(--dark-rule); border-radius: 100px;
  padding: 0.3rem 0.75rem; cursor: pointer; display: inline-flex; align-items: center; gap: 0.35rem;
}
.chip:hover { color: #fff; border-color: var(--dark-mute); }
.chip[aria-pressed="true"] { background: var(--signal); border-color: var(--signal); color: #fff; }
/* "View all" is the resting state, so its pressed look stays quiet. */
.chip-all[aria-pressed="true"] { background: transparent; border-color: rgba(255,255,255,0.7); color: #fff; }
.chip .ico { width: 0.95rem; height: 0.95rem; }

.resultline {
  display: flex; align-items: center; gap: 1rem; margin-top: 1.4rem;
  padding-top: 1rem; border-top: 1px solid var(--dark-rule);
  font-family: var(--mono); font-size: 0.75rem; color: var(--dark-mute);
}
.reset {
  font-family: var(--ui); font-size: 0.72rem; font-weight: 600; color: var(--signal);
  background: none; border: none; cursor: pointer; text-decoration: underline;
}

/* ---------- system grid ---------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 1.1rem;
}
.card {
  position: relative; text-align: left; cursor: pointer;
  background: var(--dark-2); border: 1px solid var(--dark-rule); border-radius: 4px;
  overflow: hidden; padding: 0; color: inherit; font: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
  /* A <button> centres its content vertically, so in a row of mixed-height cards the
     shorter ones pushed their photo down. Pin content to the top. */
  display: flex; flex-direction: column; justify-content: flex-start;
}
.card:hover { border-color: var(--signal); transform: translateY(-2px); }
.card:hover .card-img .ph { transform: scale(1.04); }

.card-img {
  display: block; position: relative; aspect-ratio: 16 / 10;
  overflow: hidden; background: var(--dark-3);
}
.card-img .ph {
  position: relative; display: block; width: 100%; height: 100%;
  object-fit: contain; object-position: center;
  filter: url(#duo); opacity: 0.94;
  transition: transform 0.5s cubic-bezier(0.22,0.61,0.36,1);
}
/* Every photo sits whole and centered; a blurred, duotoned copy of the same image
   fills the rest of the frame so nothing is cropped and no bars show. */
.ph-bg {
  position: absolute; inset: -25%; width: 150%; height: 150%;
  object-fit: cover; pointer-events: none;
  /* Heavy blur and darkening turn the copy into a color wash. At 16px it kept
     readable shapes, and tall photos such as SGR-A1 read as double vision. */
  filter: url(#duo) blur(42px) brightness(0.7); opacity: 0.5;
}
/* Gradient wash: ties every photo back to the palette and keeps the title legible.
   The class tint is kept light and confined to the top-left corner — pushed further
   it swamps the subject, and on these photos the subject is the point. */
.card-img::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,16,48,0) 42%, rgba(11,16,48,0.9) 100%),
    linear-gradient(125deg, var(--tint) 0%, rgba(11,16,48,0) 48%);
}
.card-img.is-empty {
  display: flex; align-items: center; justify-content: center;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 22px);
}
.card-img.is-empty .ico { width: 2.2rem; height: 2.2rem; color: var(--dark-mute); opacity: 0.5; }
.card-img.is-empty::after { background: linear-gradient(115deg, var(--tint) 0%, rgba(11,16,48,0) 70%); }

.card-tier {
  position: absolute; left: 0.7rem; top: 0.7rem; z-index: 2;
  font-family: var(--mono); font-size: 0.68rem; font-weight: 500;
  background: var(--tc); color: #fff; padding: 0.15rem 0.45rem; border-radius: 2px;
}
.card-dom {
  position: absolute; right: 0.7rem; top: 0.7rem; z-index: 2;
  color: #fff; opacity: 0.85;
}
.card-dom .ico { width: 1.15rem; height: 1.15rem; }
.card-head { position: absolute; left: 0.85rem; right: 0.85rem; bottom: 0.7rem; z-index: 2; }
.card-name {
  display: block;
  font-size: 0.95rem; font-weight: 700; color: #fff; line-height: 1.25;
  text-shadow: 0 1px 8px rgba(11,16,48,0.85);
}
.card-id {
  display: block; margin-top: 0.2rem; line-height: 1.35;
  font-family: var(--mono); font-size: 0.7rem; color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 6px rgba(11,16,48,0.85);
}
.card-body { display: block; padding: 0.85rem 0.9rem 0.95rem; }
.card-meta {
  display: flex; flex-wrap: wrap; gap: 0.3rem 0.5rem;
  font-size: 0.79rem; color: #b3bdd8;
}
.card-meta .sep { opacity: 0.4; }
.card-flags { display: flex; gap: 0.4rem; margin-top: 0.6rem; flex-wrap: wrap; }
.flag {
  display: inline-flex; align-items: center; gap: 0.28rem;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.03em;
  padding: 0.16rem 0.45rem; border-radius: 2px;
  border: 1px solid var(--dark-rule); color: #aab4d0;
}
.flag.on { color: #ffd7de; border-color: rgba(214,35,77,0.6); background: rgba(214,35,77,0.15); }
.flag .ico { width: 0.8rem; height: 0.8rem; }

.empty { color: var(--dark-mute); font-family: var(--mono); font-size: 0.85rem; padding: 3rem 0; }

/* ---------- bars ---------- */
.bars { display: flex; flex-direction: column; gap: 0.45rem; }
.bar { display: grid; grid-template-columns: 9.5rem 1fr 2.2rem; align-items: center; gap: 0.7rem; }
.bar-l { font-size: 0.82rem; color: var(--ink-2); text-align: right; }
.bar-track {
  display: block; height: 15px; overflow: hidden;
  background: var(--paper); border: 1px solid var(--rule);
}
/* display:block matters — as an inline span the fill collapses to zero height */
.bar-fill {
  display: block; height: 100%; min-width: 2px;
  background: var(--bc, var(--ink));
  border-radius: 0 2px 2px 0;
}
.bar-n {
  font-family: var(--mono); font-size: 0.76rem; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
/* entrance: fills scale out from the left, counts fade in behind them */
.bars--anim .bar-fill { transform: scaleX(0); transform-origin: left center; }
.bars--anim .bar-n { opacity: 0; }
.bars--anim.is-in .bar-fill {
  transform: scaleX(1);
  transition: transform 0.9s cubic-bezier(.2,.7,.2,1) calc(var(--i, 0) * 55ms);
}
.bars--anim.is-in .bar-n {
  opacity: 1;
  transition: opacity 0.4s ease calc(0.45s + var(--i, 0) * 55ms);
}
.bar:hover .bar-fill { filter: brightness(1.12); }
.bar:hover .bar-l { color: var(--ink); }
/* Linked bars open the tracker pre-filtered: a fourth column carries an arrow, and
   the whole row lifts on hover/focus so it reads as a control, not a static chart. */
.bar--link {
  grid-template-columns: 9.5rem 1fr 2.2rem 1rem;
  margin: 0 -0.5rem; padding: 0.3rem 0.5rem;
  color: inherit; text-decoration: none; border-radius: 4px; cursor: pointer;
  transition: background-color 0.15s ease;
}
.bar--link .bar-l { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.bar-go { width: 0.9rem; height: 0.9rem; color: var(--ink-2); opacity: 0.55; transition: transform 0.15s ease, opacity 0.15s ease; }
.bar--link:hover, .bar--link:focus-visible { background: var(--paper-2); }
.bar--link:hover .bar-l, .bar--link:focus-visible .bar-l { color: var(--ink); text-decoration-color: currentColor; }
.bar--link:hover .bar-go, .bar--link:focus-visible .bar-go { opacity: 1; color: var(--signal); transform: translateX(3px); }
.bar--link:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem 3rem; }
.two-col-b { margin-top: 2.5rem; }

.limits { list-style: none; }
.limits li {
  padding: 0.7rem 0 0.7rem 1.1rem; border-bottom: 1px solid var(--rule);
  font-size: 0.92rem; color: var(--ink-2); position: relative;
}
.limits li::before {
  content: ""; position: absolute; left: 0; top: 1.15rem;
  width: 5px; height: 5px; background: var(--signal);
}
.limits strong { color: var(--ink); }

.excluded { margin-top: 3rem; }
.excl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.8rem; }
.excl {
  background: #fff; border: 1px solid var(--rule); padding: 0.8rem 0.9rem; font-size: 0.84rem;
}
.excl b { display: block; font-size: 0.88rem; }
.excl .cat {
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--slate); margin: 0.2rem 0 0.4rem;
}
.excl p { color: var(--ink-2); line-height: 1.45; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--dark); color: var(--dark-mute); padding: 1.8rem 0; font-size: 0.82rem;
  border-top: 1px solid var(--dark-rule);
}
.foot-inner { display: flex; align-items: center; gap: 0.9rem; }
.foot-mark { display: block; flex: none; line-height: 0; opacity: 0.9; transition: opacity 0.2s ease; }
.foot-mark:hover { opacity: 1; }
.foot-mark img { width: 46px; height: auto; display: block; }
.foot-line { line-height: 1.5; }
.foot-line strong { color: var(--dark-text); font-weight: 600; }
.foot-line .sep { margin: 0 0.55rem; opacity: 0.5; }
@media (max-width: 40rem) {
  .foot-inner { align-items: flex-start; }
  .foot-line .sep { display: none; }
  .foot-line strong, .foot-line .org-name { display: block; }
}

/* ---------- drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 200; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(6,9,26,0.72); backdrop-filter: blur(3px); }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(46rem, 100%);
  background: var(--paper); overflow-y: auto;
  box-shadow: -20px 0 60px rgba(6,9,26,0.4);
  animation: slidein 0.22s cubic-bezier(0.22,0.61,0.36,1);
}
@keyframes slidein { from { transform: translateX(100%); } to { transform: none; } }
.drawer-close {
  position: absolute; right: 1rem; top: 1rem; z-index: 3;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: rgba(11,16,48,0.55); color: #fff; border: none; cursor: pointer;
  display: grid; place-items: center;
}
.drawer-close:hover { background: var(--signal); }

.d-hero { position: relative; aspect-ratio: 21 / 9; overflow: hidden; background: var(--dark-2); }
.d-hero .ph {
  position: relative; display: block; width: 100%; height: 100%;
  object-fit: contain; object-position: center; filter: url(#duo); opacity: 0.9;
}
.d-hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,16,48,0.15) 40%, rgba(11,16,48,0.92) 100%),
    linear-gradient(115deg, var(--tint) 0%, rgba(11,16,48,0) 60%);
}
.d-hero.is-empty {
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 26px);
}
.d-head { position: absolute; left: 1.6rem; right: 1.6rem; bottom: 1.1rem; z-index: 2; color: #fff; }
.d-head h2 {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  line-height: 1.1; letter-spacing: -0.01em;
}
.d-id { font-family: var(--mono); font-size: 0.74rem; color: rgba(255,255,255,0.8); margin-top: 0.3rem; }
.d-badges { position: absolute; left: 1.6rem; top: 1.2rem; z-index: 2; display: flex; gap: 0.4rem; }
.d-badge {
  font-family: var(--mono); font-size: 0.7rem; color: #fff;
  background: var(--tc); padding: 0.2rem 0.5rem; border-radius: 2px;
}
.d-badge.alt { background: rgba(11,16,48,0.7); }

.d-body { padding: 1.6rem; }
.d-tier {
  padding: 0.9rem 1rem; background: #fff; border-left: 3px solid var(--tc);
  font-size: 0.9rem; color: var(--ink-2); margin-bottom: 1.6rem;
}
.d-tier b { color: var(--ink); }

.dl { display: grid; grid-template-columns: 10rem 1fr; gap: 0.55rem 1rem; font-size: 0.9rem; }
.dl dt {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-3); padding-top: 0.15rem;
}
.dl dd { color: var(--ink-2); }

.pills { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pill {
  font-size: 0.74rem; font-weight: 600; background: var(--paper-2);
  border: 1px solid var(--rule); border-radius: 100px; padding: 0.15rem 0.6rem; color: var(--ink-2);
}

/* autonomy function matrix */
.fmatrix { display: flex; flex-direction: column; gap: 2px; }
.frow { display: grid; grid-template-columns: 13rem 1fr; align-items: center; gap: 0.7rem; }
.frow-l { font-size: 0.78rem; color: var(--ink-2); text-align: right; }
.frow-v {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.04em;
  padding: 0.22rem 0.5rem; color: #fff; border-radius: 2px;
}
.lv-auto  { background: var(--a1); }
.lv-on    { background: var(--a2); }
.lv-in    { background: var(--slate); }
.lv-none  { background: var(--paper-2); color: var(--ink-3); }
.lv-unk   { background: repeating-linear-gradient(45deg,#c8cdd6 0 4px,#d8dce3 4px 8px); color: var(--ink-2); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.6rem; }
.gitem { position: relative; }
.gframe {
  position: relative; display: block; width: 100%; aspect-ratio: 4/3; overflow: hidden; padding: 0;
  border: 1px solid var(--rule); background: var(--dark-2); cursor: zoom-in;
}
.gframe:hover { border-color: var(--signal); }
.gframe .ph-bg { filter: blur(30px) brightness(0.75); opacity: 0.5; }   /* gallery photos stay in color */
.gframe .ph { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.gcred {
  display: block; margin-top: 0.3rem; font-family: var(--mono);
  font-size: 0.62rem; color: var(--ink-3); word-break: break-word;
}
.gcred a { color: var(--slate); }


/* ---------- responsive ---------- */
@media (max-width: 62rem) {
  .tiers { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 8rem 1fr; }
  .frow { grid-template-columns: 9rem 1fr; }
}
@media (max-width: 40rem) {
  .container { padding: 0 1.2rem; }
  .hero-inner { padding: 3.5rem 1.2rem 2.5rem; }
  /* keep navigation on phones, just tighter */
  .topbar-inner { gap: 0.8rem; }
  .org { font-size: 0.62rem; max-width: 9.5rem; }
  .topnav { gap: 0.9rem; }
  .topnav a { font-size: 0.62rem; letter-spacing: 0.08em; }
  .statbar { grid-template-columns: 1fr; }
  .tiers { grid-template-columns: 1fr; }
  .band, .explorer { padding: 3.5rem 0; }
  .grid { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
  .bar { grid-template-columns: 7rem 1fr 2rem; }
  .bar--link { grid-template-columns: 7rem 1fr 2rem 1rem; }
  .dl { grid-template-columns: 1fr; gap: 0.15rem 0; }
  .dl dd { margin-bottom: 0.6rem; }
  .frow { grid-template-columns: 1fr; gap: 0.15rem; }
  .frow-l { text-align: left; }
  .frow-v { justify-self: start; }
  .drawer-panel { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------- B1 hover note ---------- */
.tip { position: relative; display: inline-block; margin-left: 0.4rem; }
.tip-btn {
  background: none; border: none; padding: 0; cursor: help; line-height: 1;
  color: var(--ink-3); vertical-align: 0.05em;
}
.tip-btn .ico { width: 1rem; height: 1rem; }
.tip-btn:hover, .tip:focus-within .tip-btn { color: var(--tc); }
.tip-pop {
  position: absolute; left: 50%; bottom: calc(100% + 0.6rem);
  transform: translateX(-50%) translateY(4px);
  width: min(22rem, 68vw); z-index: 60;
  background: var(--ink); color: #e8ecf6;
  font-family: var(--ui); font-size: 0.82rem; font-weight: 400;
  line-height: 1.5; letter-spacing: 0; text-transform: none;
  padding: 0.8rem 0.95rem; border-radius: 4px;
  box-shadow: 0 12px 32px rgba(11,16,48,0.32);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.tip-pop::after {
  content: ""; position: absolute; left: 50%; top: 100%;
  margin-left: -6px; border: 6px solid transparent; border-top-color: var(--ink);
}
.tip:hover .tip-pop, .tip:focus-within .tip-pop {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}

/* ---------- landscape call-to-action ---------- */
.landscape-cta .lede { margin-bottom: 1.8rem; }
.cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: #fff; background: var(--ink); text-decoration: none;
  padding: 0.75rem 1.2rem; border-radius: 3px;
  transition: background 0.15s ease, gap 0.15s ease;
}
.cta:hover { background: var(--signal); gap: 0.8rem; }
.cta .ico { width: 1.05rem; height: 1.05rem; }

/* ---------- landscape page ---------- */
.page-head { background: var(--dark); color: var(--dark-text); padding: 3.5rem 0 3rem; }
.page-head .kicker { color: var(--signal); }
.page-head h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.08; letter-spacing: -0.02em;
  margin-bottom: 1.1rem;
}
.page-head .standfirst { color: #cdd6e8; max-width: 44rem; }
.back-link {
  display: inline-flex; align-items: center; gap: 0.45rem; margin-bottom: 1.6rem;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--dark-mute); text-decoration: none;
}
.back-link:hover { color: #fff; }
.back-link .ico { width: 0.95rem; height: 0.95rem; transform: rotate(180deg); }

.chart-note {
  font-size: 0.82rem; color: var(--ink-3); margin-top: 0.9rem; padding-top: 0.7rem;
  border-top: 1px solid var(--rule);
}

/* manufacturers by country */
.makers { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 0.9rem; }
.maker {
  background: #fff; border: 1px solid var(--rule); border-left: 3px solid var(--mc, var(--ink));
  padding: 0.95rem 1.05rem;
}
.maker-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.7rem;
  cursor: pointer; list-style: none;
}
.maker-head::-webkit-details-marker { display: none; }
.maker-head::after {
  content: "+"; font-family: var(--mono); color: var(--ink-3); margin-left: 0.2rem;
}
.maker[open] .maker-head { margin-bottom: 0.7rem; }
.maker[open] .maker-head::after { content: "−"; }
.maker-head:hover .maker-country { color: var(--signal-2); }
.makers { align-items: start; }
.maker-country { font-size: 0.98rem; font-weight: 700; }
.maker-n {
  font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.maker-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.maker-list li {
  font-size: 0.76rem; color: var(--ink-2);
  background: var(--paper); border: 1px solid var(--rule); border-radius: 100px;
  padding: 0.12rem 0.55rem;
}
.maker-list li .c {
  font-family: var(--mono); font-size: 0.68rem; color: var(--ink-3); margin-left: 0.25rem;
}

/* ---------- conflict evidence callout ---------- */
.evidence {
  margin: 0 0 1.6rem; padding: 1rem 1.15rem;
  background: #fff; border: 1px solid var(--rule); border-left: 3px solid var(--signal);
}
.evidence-h {
  display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.5rem;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.11em;
  text-transform: uppercase; color: var(--signal-2);
}
.evidence-h .ico { width: 1rem; height: 1rem; }
.evidence-b { font-size: 0.93rem; color: var(--ink); line-height: 1.55; }
.evidence-dl { margin-top: 0.8rem; padding-top: 0.7rem; border-top: 1px solid var(--rule); }

/* ---------- evidence of use (Aug 2026 dataset) ---------- */
/* Only corroborated combat carries the signal color. Uncorroborated reports keep
   the combat glyph in a muted register; deployed and tested read as record notes. */
.flag.reported { color: #d9c3c9; border-color: rgba(214,35,77,0.3); border-style: dashed; }
.evidence.is-reported { border-left-style: dashed; border-left-color: rgba(214,35,77,0.55); }
.evidence.is-reported .evidence-h { color: var(--ink-2); }
.evidence.is-deployed,
.evidence.is-tested,
.evidence.is-other { border-left-color: var(--slate); }
.evidence.is-deployed .evidence-h,
.evidence.is-tested .evidence-h,
.evidence.is-other .evidence-h { color: var(--ink-3); }
.evidence-src a { color: var(--slate); }
.evidence-src .sep { color: var(--ink-3); }
.d-desc { font-size: 1rem; line-height: 1.6; color: var(--ink); margin-bottom: 1.4rem; }

/* Text for screen readers only. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- globe hero ---------- */
.hero--alt .hero-inner {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  column-gap: 3rem; align-items: center;
}
/* Spacer rows above and below the copy absorb the visual's height, so the copy
   stays together and vertically centered against it. */
.hero--alt .hero-inner { grid-template-rows: 1fr auto auto auto 1fr auto; }
.hero--alt .eyebrow { grid-column: 1; grid-row: 2; }
.hero--alt h1 { grid-column: 1; grid-row: 3; font-size: clamp(2.2rem, 3.7vw, 3.4rem); }
.hero--alt .standfirst { grid-column: 1; grid-row: 4; }
.hero--alt .hero-viz { grid-column: 2; grid-row: 1 / 6; }
.hero--alt .statbar { grid-column: 1 / -1; grid-row: 6; }

.globe { display: block; width: 100%; max-width: 34rem; aspect-ratio: 1; margin: -1.5rem auto -1rem; }

.review-switch {
  position: fixed; left: 1rem; bottom: 1rem; z-index: 60; display: grid; gap: 0.25rem;
  padding: 0.35rem; border-radius: 12px;
  background: rgba(11,16,48,0.94); border: 1px solid var(--dark-rule);
  font-family: var(--mono); font-size: 0.68rem; box-shadow: 0 6px 24px rgba(0,0,0,0.35);
}
.rs-row { display: flex; align-items: center; gap: 0.15rem; }
.rs-row span {
  width: 4.6rem; color: var(--dark-mute); padding: 0 0.5rem;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.rs-row a { color: #fff; text-decoration: none; padding: 0.3rem 0.65rem; border-radius: 100px; }
.rs-row a[aria-current] { background: var(--signal); }

@media (max-width: 62rem) {
  .hero--alt .hero-inner { grid-template-columns: 1fr; grid-template-rows: none; }
  .hero--alt .hero-inner > * { grid-row: auto; }
  .hero--alt .hero-viz { grid-column: 1; margin-top: 2rem; order: 1; }
  .hero--alt .statbar { order: 2; }
  .globe { max-width: 22rem; margin: 0 auto; }
}


/* ---------- section 02, compact homepage options (review: ?systems=map | grid) ---------- */
.explorer--compact .s2-lede { color: var(--dark-mute); margin-bottom: 2.2rem; }
.cta-dark { margin-top: 2.6rem; background: var(--signal); }
.cta-dark:hover { background: var(--signal-2); }

/* small system tile shared by both options */
.minis { display: grid; gap: 0.5rem; margin: 1.1rem 0 1rem; }
.mini {
  display: grid; grid-template-columns: 4.2rem 1fr; gap: 0.75rem; align-items: center;
  height: 4.2rem;   /* fixed, so a two-line name never pushes the stack down */
  padding: 0.4rem; text-align: left; color: inherit; font: inherit; cursor: pointer;
  background: var(--dark-2); border: 1px solid var(--dark-rule); border-radius: 4px;
  position: relative; overflow: hidden;
  transition: border-color 0.2s ease, transform 0.25s cubic-bezier(.2,.7,.2,1), box-shadow 0.25s ease, background 0.2s ease;
}
/* a thin class-coloured edge that grows in on hover */
.mini::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--tc); transform: scaleY(0); transform-origin: top;
  transition: transform 0.25s ease;
}
.mini:hover, .mini:focus-visible {
  border-color: var(--tc); background: var(--dark-3);
  transform: translateX(4px); box-shadow: 0 8px 22px rgba(0,0,0,0.35);
}
.mini:hover::before, .mini:focus-visible::before { transform: scaleY(1); }
.mini-img img { transition: transform 0.4s ease; }
.mini:hover .mini-img img { transform: scale(1.08); }
.mini-img {
  display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 2px;
  background: var(--dark-3) linear-gradient(135deg, var(--tc), transparent 70%);
}
.mini-img { position: relative; }
.mini-img .ph {
  position: relative; display: block; width: 100%; height: 100%;
  object-fit: contain; object-position: center; filter: url(#duo);
}
.mini-t { display: grid; gap: 0.15rem; min-width: 0; }
.mini-name {
  font-weight: 600; font-size: 0.86rem; color: #fff; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mini-meta { font-size: 0.74rem; color: var(--dark-mute); }
.mini-meta b { font-family: var(--mono); font-weight: 500; color: var(--tc); margin-right: 0.2rem; }
.rg-all {
  display: inline-flex; align-items: center; gap: 0.4rem; color: #fff; text-decoration: none;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  border-bottom: 1px solid var(--signal); padding-bottom: 0.15rem;
}
.rg-all:hover { color: var(--signal); }
.rg-all .ico { width: 0.95rem; height: 0.95rem; }

/* A — map and region timeline */
.rg { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 2.4rem; align-items: start; }
.rg-map canvas { display: block; width: 100%; }
.rg-kicker {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--signal);
}
.rg-name {
  font-family: var(--display); font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.1; margin: 0.2rem 0 0.6rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rg-stat { font-size: 0.95rem; color: var(--dark-text); }
.rg-stat b { font-family: var(--display); font-size: 1.5rem; margin-right: 0.2rem; }
.rg-stat .sep { margin: 0 0.6rem; color: var(--dark-mute); }
/* Always two lines tall, whether a region lists two countries or twenty-five,
   so the system tiles start at the same height for every region. */
.rg-countries {
  font-size: 0.84rem; color: var(--dark-mute); margin-top: 0.35rem; line-height: 1.5;
  height: 3em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Region change: the heading block fades up, then the tiles follow one by one. */
.rg-panel.is-in > * { animation: rg-rise 0.5s cubic-bezier(.2,.7,.2,1) backwards; }
.rg-panel.is-in > .rg-name { animation-delay: 0.04s; }
.rg-panel.is-in > .rg-stat { animation-delay: 0.08s; }
.rg-panel.is-in > .rg-countries { animation-delay: 0.12s; }
.rg-panel.is-in > .minis { animation: none; }
.rg-panel.is-in .mini { animation: rg-slide 0.55s cubic-bezier(.2,.7,.2,1) backwards; animation-delay: calc(0.18s + var(--i, 0) * 0.09s); }
.rg-panel.is-in > .rg-all { animation-delay: 0.45s; }
@keyframes rg-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes rg-slide { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }

.tl {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 0.6rem;
  margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--dark-rule);
}
.tl-stops { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.35rem; margin: 0; padding: 0; }
.tl-stop {
  width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 0.1rem 0.4rem; text-align: left;
  padding: 0.45rem 0.5rem 0.55rem; background: none; border: 0; color: var(--dark-mute); font: inherit; cursor: pointer;
  border-radius: 3px;
}
.tl-stop:hover { color: #fff; background: rgba(255,255,255,0.04); }
.tl-stop[aria-current="true"] { color: #fff; }
.tl-name { font-size: 0.78rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-n { font-family: var(--mono); font-size: 0.7rem; }
.tl-bar { grid-column: 1 / -1; height: 2px; background: var(--dark-rule); margin-top: 0.35rem; position: relative; }
.tl-bar span { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--signal); }
.tl-btn, .tl-play {
  width: 2.2rem; height: 2.2rem; display: grid; place-items: center; cursor: pointer;
  background: none; border: 1px solid var(--dark-rule); border-radius: 50%; color: #fff;
}
.tl-btn:hover, .tl-play:hover { border-color: var(--signal); }
.tl-btn .ico { width: 1rem; height: 1rem; }
.tl-btn[data-step="-1"] .ico { transform: rotate(180deg); }
.i-pause { width: 0.6rem; height: 0.7rem; border-left: 3px solid #fff; border-right: 3px solid #fff; }
.i-play { width: 0; height: 0; border-left: 0.6rem solid #fff; border-top: 0.38rem solid transparent; border-bottom: 0.38rem solid transparent; margin-left: 0.15rem; }

/* B — grid preview: the last row fades out under the expand button */
.pv { position: relative; }
.pv-grid { max-height: 58rem; overflow: hidden; }
.pv-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 15rem;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 1.4rem;
  background: linear-gradient(180deg, rgba(11,16,48,0) 0%, rgba(11,16,48,0.85) 45%, var(--dark) 78%);
}
.pv-fade .cta-dark { margin-top: 0; }

@media (max-width: 62rem) {
  .rg { grid-template-columns: 1fr; gap: 1.4rem; }
  .tl-stops { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 40rem) {
  .tl { grid-template-columns: auto 1fr auto; }
  .tl-stops { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(2, 1fr); }
  .tl-play { grid-column: 3; grid-row: 1; justify-self: end; }
  .tl-btn[data-step="1"] { grid-column: 2; grid-row: 1; justify-self: end; }
  .review-switch { left: 0.5rem; right: 0.5rem; bottom: 0.5rem; }
}


/* ---------- system panel, V3 order ---------- */
.d-body .h-first { margin-top: 0; }
.fmatrix { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 1.4rem; }
.fmatrix .frow { grid-template-columns: minmax(0, 1fr) auto; }
.fmatrix .frow-l { text-align: left; }
.more { margin-top: 0.9rem; }
.more summary {
  cursor: pointer; display: inline-block; font-family: var(--mono); font-size: 0.7rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate);
  border-bottom: 1px solid currentColor; padding-bottom: 0.1rem; margin-bottom: 0.8rem;
}
.more summary:hover { color: var(--signal-2); }
@media (max-width: 40rem) { .fmatrix { grid-template-columns: 1fr; } }

/* systems.html: the page head already supplies the top spacing */
.page-head + .explorer { padding-top: 0.5rem; }


/* ---------- sources, one run of links ---------- */
.srcrun { font-size: 0.84rem; line-height: 1.75; }
.srcrun a { color: var(--slate); }
.srcrun a:hover { color: var(--signal-2); }
.srcrun .sep { color: var(--ink-3); }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; }   /* above the drawer (200) */
.lb[hidden] { display: none; }
.lb-scrim { position: absolute; inset: 0; background: rgba(6,9,26,0.92); cursor: zoom-out; }
.lb-fig { position: relative; margin: 0; max-width: min(92vw, 90rem); display: grid; gap: 0.7rem; justify-items: center; }
.lb-img { display: block; max-width: 100%; max-height: 80vh; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lb-cap {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; justify-content: center; align-items: baseline;
  color: var(--dark-text); font-size: 0.85rem;
}
.lb-cap .lb-n { font-family: var(--mono); font-size: 0.72rem; color: var(--dark-mute); }
.lb-cap a { font-family: var(--mono); font-size: 0.72rem; color: var(--dark-mute); }
.lb-cap a:hover { color: #fff; }
.lb-btn {
  position: absolute; width: 2.8rem; height: 2.8rem; border-radius: 50%; display: grid; place-items: center;
  background: rgba(19,26,68,0.85); border: 1px solid var(--dark-rule); color: #fff; cursor: pointer;
}
.lb-btn:hover { background: var(--signal); border-color: var(--signal); }
.lb-btn .ico { width: 1.15rem; height: 1.15rem; }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-prev .ico { transform: rotate(180deg); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lb.is-single .lb-prev, .lb.is-single .lb-next { display: none; }
@media (max-width: 40rem) {
  .lb-prev, .lb-next { top: auto; bottom: 1rem; transform: none; }
}


/* "Used by …" on cards: one line, the +N count never trimmed. */
.card-id { display: flex; min-width: 0; white-space: nowrap; }
.card-id .uses { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.card-id .uses-n { flex-shrink: 0; margin-left: 0.3em; }
/* Phones: one card per row. At two columns the photo is ~105px tall and a two-line
   name plus "Used by" runs into the class badge. */
@media (max-width: 30rem) {
  .grid { grid-template-columns: 1fr; }
}
