html {
  color-scheme: dark;
}

:root,
html[data-theme="dark"] {
  --bg: #0b1020;
  --bg-2: #111827;
  --surface: rgba(15, 23, 42, 0.88);
  --surface-elevated: rgba(30, 41, 59, 0.96);
  --surface-soft: rgba(30, 41, 59, 0.72);
  --surface-muted: rgba(15, 23, 42, 0.6);
  --text: #f8fafc;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.22);
  --border-strong: rgba(148, 163, 184, 0.34);
  --accent: #8b5cf6;
  --accent-strong: #7c3aed;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --accent-rgb: 139, 92, 246;
  --surface-rgb: 15, 23, 42;
  --surface-elevated-rgb: 30, 41, 59;
  --shadow: 0 16px 44px rgba(2, 6, 23, 0.34);
  --hero-glow-1: rgba(99, 102, 241, 0.18);
  --hero-glow-2: rgba(139, 92, 246, 0.12);
  --button-text: #f8fafc;
  --toggle-track: rgba(148, 163, 184, 0.16);
  --toggle-thumb: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f8fafc;
  --bg-2: #e2e8f0;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-elevated: rgba(255, 255, 255, 0.98);
  --surface-soft: rgba(241, 245, 249, 0.96);
  --surface-muted: rgba(226, 232, 240, 0.86);
  --text: #0f172a;
  --text-soft: #334155;
  /* Darkened from #64748b so muted small-caps labels clear WCAG AA (4.5:1)
     against the light muted surfaces. */
  --text-muted: #556070;
  --border: rgba(71, 85, 105, 0.16);
  --border-strong: rgba(71, 85, 105, 0.26);
  --accent: #7c3aed;
  --accent-strong: #6d28d9;
  --accent-soft: rgba(124, 58, 237, 0.1);
  --accent-rgb: 124, 58, 237;
  --surface-rgb: 255, 255, 255;
  --surface-elevated-rgb: 241, 245, 249;
  --shadow: 0 16px 44px rgba(15, 23, 42, 0.12);
  --hero-glow-1: rgba(129, 140, 248, 0.14);
  --hero-glow-2: rgba(192, 132, 252, 0.1);
  --button-text: #ffffff;
  --toggle-track: rgba(124, 58, 237, 0.1);
  --toggle-thumb: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%);
}

body {
  /* FLAT base colour (--bg) + two subtle top glows only — deliberately NO
     top-to-bottom linear gradient. A vertical --bg→--bg-2 gradient made pages
     look inconsistent: on text pages the body is visible and showed the darker
     --bg-2 tint toward the bottom, while the card-dense compounds page hides the
     body under near-white cards and stayed lighter. A flat --bg means every page
     reads as the same tone regardless of content density or height. The glows are
     anchored at the top and fade out, giving character without a wash.
     Sizing is VIEWPORT-relative (vmax), not the default farthest-corner: with
     farthest-corner the glow radius grew with page HEIGHT, so a tall page (e.g.
     receptors) showed a full violet wash while a short page (e.g. compare) faded
     to near-white. vmax makes the top glow the same size on every page. */
  background-color: var(--bg);
  background-image:
    radial-gradient(circle 105vmax at top left, var(--hero-glow-1), transparent 55%),
    radial-gradient(circle 90vmax at top right, var(--hero-glow-2), transparent 48%);
  background-repeat: no-repeat, no-repeat;
  background-position: top left, top right;
  background-attachment: scroll, scroll;
  color: var(--text);
  transition: background-color 180ms ease, color 180ms ease;
}

/* ===== Site header =========================================================
   Every page loads this stylesheet (404.html loads ONLY this one), and it is
   always the last sheet in the cascade — so the header is styled here, in one
   place, rather than being split across style.css. Change it once here.

   Sizing rationale: the header used to be 123px tall (17% of a 720px viewport)
   and WRAPPED onto two ragged rows at 1280px, because brand(342) + search(355)
   + theme toggle(134) + nav(569) needed ~1464px of a 1217px shell. Everything
   below is tuned so the row fits on a laptop and the bar reads as one calm
   band: smaller logo, tighter nav, compact search, icon-only theme toggle. */
header[role="banner"]:not(.site-header),
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--surface-elevated) 88%, transparent);
  border-bottom: 1px solid var(--border);
}

.header-container,
.header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 0;
}

/* The lockup was 342x58 and dominated the bar; 38px keeps it clearly legible
   while letting the whole header sit at ~60px. */
.site-header .logo,
header[role="banner"] .logo {
  height: 38px;
}

/* Compact header search. It was a 290px input at 47px tall with a filled purple
   "Go" button — the loudest thing in the bar, competing with the accent
   underline that marks the current page. Now: shorter, slimmer, and the button
   is quiet by default and only fills with accent on hover/focus. It may shrink
   (min-width) so the row never wraps on smaller laptops. */
.header-search {
  flex: 0 1 auto;
  min-width: 0;
}

.header-search #headerSearchInput {
  /* Wide enough that the full "Search compounds, targets…" placeholder is visible
     (measured ~204px of text + 24px padding). It may still shrink on very tight
     laptop widths (flex 0 1 auto below), and goes full-width in the ≤1180px
     column layout. */
  width: 244px;
  min-width: 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

/* Resting state is an accent-TINTED chip with normal text, not accent-coloured
   text: --accent on --accent-soft only reaches ~4.3:1 in dark mode, just under
   the 4.5:1 AA threshold. The tint carries the brand colour, --text carries the
   contrast, and hover/focus promotes it to the full accent gradient. */
.header-search #headerSearchButton {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid transparent;
}

.header-search #headerSearchButton:hover,
.header-search #headerSearchButton:focus-visible {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
}

/* Icon-only theme toggle in the header: the text label cost ~78px of a row that
   had none to spare. The label stays in the DOM for screen readers. */
.site-header .theme-toggle__label,
header[role="banner"] .theme-toggle__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

header[role="banner"] nav ul:not(.site-nav),
.site-nav {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 0;
  white-space: nowrap;
  font-size: 0.95rem;
}

header[role="banner"] nav a:not(.brand),
.site-nav a {
  position: relative;
  text-decoration: none;
  color: var(--text-soft);
  font-weight: 500;
  padding: 6px 0;
  transition: color 180ms ease;
}

header[role="banner"] nav a:not(.brand):hover,
header[role="banner"] nav a:not(.brand):focus-visible,
header[role="banner"] nav a[aria-current="page"],
.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

header[role="banner"] nav a:not(.brand):hover::after,
header[role="banner"] nav a:not(.brand):focus-visible::after,
header[role="banner"] nav a[aria-current="page"]::after,
.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}

header[role="banner"] .search-wrapper input,
.search-wrapper input,
.controls select,
.view-toggle button,
.compound-page .util-row button,
.text-link,
.target-card,
.quick-card,
.hero-panel,
.project-note,
.feature-card,
.panel-card,
.compound-card,
.compound-page .infobox,
.compound-page details,
.enantiomers,
.hero-search-panel,
.toast {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.search-wrapper input,
.controls select,
.view-toggle button,
.compound-page .util-row button {
  color: var(--text);
}

.search-wrapper input::placeholder {
  color: var(--text-muted);
}

.search-wrapper input:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
}

/* The search suggestions dropdown had a hardcoded dark background in style.css,
   which left dark text on a dark surface unreadable in light mode. */
.suggestions {
  background: var(--surface-elevated);
  border-color: var(--border-strong);
}

.suggestions div {
  color: var(--text);
}

.suggestions div + div {
  border-top-color: var(--border);
}

.suggestions div:hover,
.suggestions div.active {
  background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface-elevated));
  color: var(--text);
}

.search-wrapper button,
.hero-search button {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: var(--button-text);
}

.text-link:hover,
.text-link:focus-visible,
.quick-card:hover,
.quick-card:focus-visible,
.target-card:hover,
.target-card:focus-visible,
.compound-page .util-row button:hover,
.view-toggle button.active {
  background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface));
  border-color: rgba(var(--accent-rgb), 0.24);
}

/* The active toggle keeps a hardcoded light mint text from style.css, which is
   unreadable on the light accent-tinted background. Override for light mode only
   so dark mode keeps its mint text. */
html[data-theme="light"] .view-toggle button.active {
  color: var(--accent-strong);
}

.hero-tag,
.compound-chip,
.icon-shell,
.hero-badge,
.featured-badge {
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  color: var(--text);
}

.compound-thumb-wrap {
  background:
    radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.16), transparent 30%),
    linear-gradient(180deg, rgba(var(--surface-elevated-rgb), 0.94), rgba(var(--surface-rgb), 0.94));
}

.compound-page .status-pill--ok,
.compound-page .meta-pill--ok,
.compound-page .source-badge--database,
.compound-page .source-badge--drug_label,
.compound-page .support-chip {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.22);
  color: var(--text);
}

/* Light mode needs darker text on the translucent green/amber/rose legal
   badges; their default light tints are only legible on the dark theme. */
html[data-theme="light"] .legal-status.legal {
  color: #047857;
}

html[data-theme="light"] .legal-status.restricted {
  color: #9a5b06;
}

html[data-theme="light"] .legal-status.illegal {
  color: #9f1239;
}

/* Compounds page — "By legal status" view: one block per country, subdivided
   into legality tiers. The country heading is the primary divider; each tier
   carries a coloured left border echoing the legal-status badge palette. */
.legal-country {
  margin-bottom: 64px;
}
.legal-country > h2 {
  font-size: 1.8rem;
  margin-bottom: 24px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.legal-tier {
  margin: 0 0 34px;
  padding-left: 14px;
  border-left: 4px solid var(--border);
}
.legal-tier-head {
  font-size: 1.15rem;
  margin-bottom: 16px;
  color: var(--muted, var(--text));
}
.legal-tier--illegal {
  border-left-color: rgba(244, 63, 94, 0.55);
}
.legal-tier--restricted {
  border-left-color: rgba(245, 158, 11, 0.55);
}
.legal-tier--legal {
  border-left-color: rgba(16, 185, 129, 0.55);
}
.legal-tier--unknown {
  border-left-color: var(--border);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--toggle-track);
  color: var(--text);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.24);
  transform: translateY(-1px);
}

.theme-toggle__label {
  font-size: 0.9rem;
  font-weight: 600;
}

.theme-toggle__track {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.18);
  flex-shrink: 0;
}

.theme-toggle__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--toggle-thumb);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
  transition: transform 180ms ease;
}

html[data-theme="light"] .theme-toggle__thumb {
  transform: translateX(20px);
}

#themeToggle[aria-pressed="true"] .theme-toggle__label::before {
  content: "Light";
}

#themeToggle[aria-pressed="false"] .theme-toggle__label::before {
  content: "Dark";
}

#themeToggle .theme-toggle__label {
  min-width: 3.6rem;
}

.publish-mode-note,
.empty-public-preview {
  background: var(--surface);
  color: var(--text-soft);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 16px;
}

/* Layout only — appearance/sizing lives in the "Site header" section above.
   NOTE: flex-wrap is deliberately nowrap; wrapping produced a two-row header. */
header[role="banner"] .header-tools {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: nowrap;
}

@media (max-width: 1180px) {
  .header-container,
  .header-shell,
  header[role="banner"] .header-tools {
    flex-direction: column;
    align-items: stretch;
  }

  header[role="banner"] nav ul:not(.site-nav),
  .site-nav {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 18px;
  }

  #headerSearchInput {
    width: min(100%, 480px);
  }
}

@media (max-width: 640px) {
  .header-container,
  .header-shell {
    padding: 14px 0;
  }

  .theme-toggle {
    justify-content: center;
  }
}

/* ===== Mobile navigation (hamburger) ===== */

/* The toggle is hidden on desktop and revealed at <=768px. The three bars
   morph into an X when the menu is open. */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  padding: 0;
  background: color-mix(in srgb, var(--surface-elevated) 70%, transparent);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.5);
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 999px;
  transition: transform 200ms ease, opacity 200ms ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  /* Top bar becomes a single row again: brand on the left, hamburger on the
     right. This overrides the >=769px stacking set higher up. */
  .header-container,
  .header-shell {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }

  .nav-toggle {
    display: flex;
  }

  /* Let the brand shrink (basis 0) so the hamburger stays on the same row
     instead of being wrapped onto a line of its own. */
  .brand {
    flex: 1 1 0;
    min-width: 0;
  }

  /* Collapse the search + nav into the toggle. Scoped to .js-nav so that
     without JavaScript the tools simply stay visible (no trap). */
  .js-nav header[role="banner"] .header-tools {
    flex-basis: 100%;
    width: 100%;
    display: none;
    margin-top: 8px;
  }
  .js-nav header[role="banner"] .header-tools.is-open {
    display: flex;
  }

  /* Stack the links as full-width tap rows with a comfortable 44px target. */
  header[role="banner"] nav ul:not(.site-nav),
  .site-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: 100%;
  }

  header[role="banner"] nav a:not(.brand),
  .site-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 12px;
  }

  /* The sliding underline reads oddly in a vertical list, so swap it for a
     filled highlight on hover / focus / current page. */
  header[role="banner"] nav a:not(.brand):hover::after,
  header[role="banner"] nav a:not(.brand):focus-visible::after,
  header[role="banner"] nav a[aria-current="page"]::after,
  .site-nav a:hover::after,
  .site-nav a:focus-visible::after,
  .site-nav a[aria-current="page"]::after {
    display: none;
  }

  header[role="banner"] nav a:not(.brand):hover,
  header[role="banner"] nav a:not(.brand):focus-visible,
  header[role="banner"] nav a[aria-current="page"],
  .site-nav a:hover,
  .site-nav a:focus-visible,
  .site-nav a[aria-current="page"] {
    background: color-mix(in srgb, var(--accent) 14%, transparent);
  }
}

/* On touch devices, give the smaller in-page navigational links the full 44px
   target too (WCAG 2.5.5). Mouse/desktop layouts keep their tighter spacing. */
@media (pointer: coarse) {
  #toc a,
  .compound-page table a,
  .compound-page .list-reset a,
  #targets-container li a,
  .view-all-link {
    min-height: 44px;
  }
}


/* ==========================================================================
   Homepage redesign (2026-09) — hero stat strip, anatomy-of-a-profile block,
   compare teaser, browse-by-target tiles. Scoped to .library-home sections.
   ========================================================================== */
/* 1. Stat strip — communicates scale + rigor immediately */
    .stat-strip {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1px;
      margin-top: 1.75rem;
      background: var(--border);
      border: 1px solid var(--border);
      border-radius: 16px;
      overflow: hidden;
    }
    .stat {
      background: var(--surface);
      padding: 1.15rem 1.25rem;
      display: flex;
      flex-direction: column;
      gap: 0.2rem;
    }
    .stat-num {
      font-size: 1.9rem;
      font-weight: 700;
      line-height: 1;
      color: var(--text);
      letter-spacing: -0.02em;
    }
    .stat-num .unit { font-size: 1.05rem; color: var(--text-muted); font-weight: 600; }
    .stat-label { font-size: 0.82rem; color: var(--text-muted); }
    @media (max-width: 720px) {
      .stat-strip { grid-template-columns: repeat(2, 1fr); }
    }

    /* 2. "Anatomy of a profile" — show the product instead of describing it */
    .anatomy { margin-top: 3rem; }
    .anatomy-head { max-width: 46rem; margin-bottom: 1.5rem; }
    .anatomy-head .eyebrow {
      display: inline-block; font-size: 0.78rem; letter-spacing: 0.08em;
      text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 0.5rem;
    }
    .anatomy-grid {
      display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
      gap: 1.5rem; align-items: start;
    }
    @media (max-width: 860px) { .anatomy-grid { grid-template-columns: 1fr; } }

    .mini-profile {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 18px; padding: 1.4rem; box-shadow: var(--shadow);
    }
    .mini-profile-top { display: flex; gap: 1.1rem; align-items: center; }
    .mini-struct {
      width: 118px; height: 118px; flex: 0 0 auto; border-radius: 14px;
      background: #fff; display: grid; place-items: center; padding: 8px;
    }
    .mini-struct img { max-width: 100%; max-height: 100%; }
    .mini-meta h3 { margin: 0 0 0.2rem; font-size: 1.35rem; }
    .mini-formula { color: var(--text-muted); font-size: 0.92rem; }
    .mini-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
    .mini-badge {
      font-size: 0.72rem; padding: 0.2rem 0.55rem; border-radius: 999px;
      background: var(--accent-soft); color: var(--text-soft); border: 1px solid var(--border);
    }

    .fp { margin-top: 1.25rem; border-top: 1px solid var(--border); padding-top: 1rem; }
    .fp-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 0.7rem; }
    .fp-row { display: grid; grid-template-columns: 92px 1fr max-content; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
    .fp-target { font-size: 0.85rem; color: var(--text-soft); }
    .fp-track { height: 9px; background: var(--surface-muted); border-radius: 999px; overflow: hidden; }
    .fp-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); }
    .fp-val { font-size: 0.8rem; color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
    .fp-foot { font-size: 0.74rem; color: var(--text-muted); margin-top: 0.5rem; }
    .fp-foot a { color: var(--accent); }

    .mini-facts {
      margin-top: 1.1rem; border-top: 1px solid var(--border); padding-top: 0.9rem;
      display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem 1rem;
    }
    .mini-fact { display: flex; flex-direction: column; gap: 0.12rem; }
    .mini-fact span { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
    .mini-fact b { font-size: 0.85rem; color: var(--text-soft); font-weight: 600; }

    /* annotation grid on the right */
    .anatomy-callouts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; align-content: start; }
    @media (max-width: 560px) { .anatomy-callouts { grid-template-columns: 1fr; } }
    .callout-item {
      display: flex; gap: 0.85rem; background: var(--surface-soft);
      border: 1px solid var(--border); border-radius: 14px; padding: 0.95rem 1.05rem;
    }
    .callout-num {
      flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px;
      background: var(--accent-soft); color: var(--accent); font-weight: 700;
      display: grid; place-items: center; font-size: 0.85rem;
    }
    .callout-item strong { display: block; font-size: 0.96rem; margin-bottom: 0.15rem; }
    .callout-item p { margin: 0; font-size: 0.86rem; color: var(--text-muted); }

    /* 3. Compare teaser */
    .compare-teaser {
      margin-top: 1.5rem; display: flex; align-items: center; justify-content: space-between;
      gap: 1rem; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border);
      border-radius: 16px; padding: 1.1rem 1.35rem;
    }
    .compare-teaser p { margin: 0; color: var(--text-soft); }
    .compare-teaser strong { color: var(--text); }

    /* 4. Browse-by-target tiles — icon-free, informative */
    .target-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1.25rem; }
    @media (max-width: 720px) { .target-tiles { grid-template-columns: 1fr; } }
    .target-tile {
      position: relative; display: grid;
      grid-template-columns: 1fr auto; align-items: center; column-gap: 1rem; row-gap: 0.6rem;
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 16px; padding: 1.1rem 1.35rem 1.1rem 1.55rem;
      text-decoration: none; color: inherit; overflow: hidden;
      transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
    }
    .target-tile:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
    .target-tile::before {
      content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
      background: var(--sys, var(--accent));
    }
    .tt-main { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
    .tt-head { display: flex; align-items: baseline; gap: 0.55rem; flex-wrap: wrap; }
    .tt-abbr { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
    .tt-abbr sub { font-size: 0.62em; }
    .tt-full { font-size: 0.9rem; color: var(--text-soft); }
    .tt-system {
      font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase;
      color: var(--sys, var(--accent)); font-weight: 600;
    }
    .tt-stat { text-align: right; display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
    .tt-count { font-size: 1.55rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
    .tt-count-label { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.15rem; }
    .tt-examples { grid-column: 1 / -1; font-size: 0.8rem; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 0.6rem; }
    .tt-examples b { color: var(--text-soft); font-weight: 600; }

/* ----------------------------------------------------------------------------
   Launch note: a temporary, dismissible, site-wide announcement strip stamped
   under the header by build:chrome (partials/site-header.html). It stays hidden
   until its inline script un-hides it, and only when the visitor has not
   dismissed it (localStorage) and its data-expires date has not passed.
   ------------------------------------------------------------------------- */
.launch-note {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.launch-note[hidden] { display: none; }
.launch-note__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(2px);
}
.launch-note__dialog {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  padding: 34px 34px 28px;
}
.launch-note__close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
}
.launch-note__close:hover, .launch-note__close:focus-visible { background: var(--surface-muted); color: var(--text); }
.launch-note__body { font-size: 0.95rem; line-height: 1.6; }
.launch-note__body p { margin: 0 0 14px; }
.launch-note__body p:last-child { margin-bottom: 0; }
.launch-note__greeting { font-weight: 600; }
.launch-note__link { color: var(--accent); font-weight: 600; text-decoration: none; }
.launch-note__link:hover, .launch-note__link:focus-visible { text-decoration: underline; }
@media (max-width: 600px) {
  .launch-note { padding: 16px; }
  .launch-note__dialog { padding: 26px 20px 22px; }
  .launch-note__body { font-size: 0.9rem; }
}
