/* Atlas family overlay — additive layer for canvas.html.
   All new UI lives outside .poster, so the map, print and PNG export are untouched. */

/* ---------- Map affordance ---------- */
.branch h3.atlas-family-link {
  cursor: pointer;
  border-radius: .04in;
}
.branch h3.atlas-family-link::after {
  content: "↗";
  display: inline-block;
  margin-left: .24em;
  font-size: .66em;
  font-weight: 500;
  opacity: 0;
  transform: translateY(-.06em);
  transition: opacity 140ms ease-out, transform 140ms ease-out;
}
.branch h3.atlas-family-link:hover {
  text-decoration: underline;
  text-decoration-thickness: 1.2pt;
  text-underline-offset: 3pt;
}
.branch h3.atlas-family-link:hover::after,
.branch h3.atlas-family-link:focus-visible::after {
  opacity: .9;
  transform: translateY(-.06em) translateX(.04em);
}
.branch h3.atlas-family-link:focus-visible {
  outline: 2pt solid #0873e4;
  outline-offset: 3pt;
}
.branch .tactic-list li.atlas-tactic-link { cursor: pointer; }
.branch .tactic-list li.atlas-tactic-link:hover {
  color: #17191d;
  text-decoration: underline;
  text-decoration-thickness: .8pt;
  text-underline-offset: 2pt;
}
.core .branch .tactic-list li.atlas-tactic-link:hover { color: #fff; }
@media (prefers-reduced-motion: reduce) {
  .branch h3.atlas-family-link::after { transition: none; }
}

/* ---------- Backdrop + dialog ---------- */
.atlas-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(14, 18, 25, .54);
  -webkit-backdrop-filter: blur(10px) saturate(.92);
  backdrop-filter: blur(10px) saturate(.92);
  opacity: 0;
  transition: opacity 190ms ease;
}
.atlas-backdrop[hidden] { display: none; }
.atlas-backdrop.is-open { opacity: 1; }
body.atlas-open { overflow: hidden; }

.atlas-dialog {
  --atlas-accent: #b35442;
  position: relative;
  width: min(1120px, calc(100vw - 40px));
  height: min(900px, calc(100vh - 40px));
  height: min(900px, calc(100dvh - 40px));
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 22px;
  background: #fbfbfd;
  box-shadow: 0 40px 90px rgba(8, 12, 18, .4), 0 2px 8px rgba(8, 12, 18, .2);
  transform: translateY(14px) scale(.985);
  transition: transform 220ms cubic-bezier(.2, .7, .2, 1);
}
.atlas-backdrop.is-open .atlas-dialog { transform: none; }
.atlas-dialog:focus { outline: none; }

.atlas-sheet {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fbfbfd;
}
.atlas-sheet-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.atlas-close {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 5;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #6b7482;
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: color 140ms ease, top 200ms ease;
}
.atlas-close:hover { color: #171a1f; }
.atlas-close:active { color: #000; }
.atlas-close:focus-visible {
  outline: 2px solid rgba(8, 115, 228, .55);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Left rail ---------- */
.atlas-rail {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: 34px 22px 22px;
  border-right: 1px solid #e2e6ed;
  background: linear-gradient(180deg, #f5f6f9 0%, #f0f2f6 100%);
  overflow: auto;
}
.atlas-rail-kicker {
  margin: 0 0 18px;
  color: #7a8390;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.atlas-rail-discipline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #2c323b;
  font-size: 13px;
  font-weight: 650;
}
.atlas-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--atlas-accent);
}
.atlas-rail-count {
  margin: 6px 0 22px;
  color: #7d8693;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.atlas-rail-nav { display: grid; gap: 2px; }
.atlas-rail-nav button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: baseline;
  gap: 6px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5a6270;
  font: 550 12.5px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background-color 130ms ease, color 130ms ease;
}
.atlas-rail-nav button span {
  color: #98a1ae;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  font-variant-numeric: tabular-nums;
}
.atlas-rail-nav button:hover { background: #e8ecf2; color: #2c323b; }
.atlas-rail-nav button[aria-current="true"] {
  background: #fff;
  color: #1d232b;
  box-shadow: inset 0 0 0 1px rgba(31, 37, 46, .06);
}
.atlas-rail-nav button[aria-current="true"] span { color: var(--atlas-accent); }
.atlas-rail-nav button:focus-visible,
.atlas-rail-close:focus-visible {
  outline: 2px solid rgba(8, 115, 228, .65);
  outline-offset: 1px;
}
.atlas-rail-meta {
  display: grid;
  gap: 9px;
  margin: 26px 0 0;
  padding-top: 18px;
  border-top: 1px dashed #d7dde6;
  font-size: 12px;
}
.atlas-rail-meta div { display: flex; justify-content: space-between; gap: 10px; }
.atlas-rail-meta dt { color: #7d8693; }
.atlas-rail-meta dd { margin: 0; color: #333a44; font-weight: 650; }
.atlas-rail-note {
  margin: 0 0 12px;
  color: #858e9b;
  font-size: 10.5px;
  line-height: 1.5;
}
.atlas-rail-close {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d6dce5;
  border-radius: 9px;
  background: #fff;
  color: #343c46;
  font: 650 12px -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  cursor: pointer;
}
.atlas-rail-close:hover { border-color: #b9c4d1; background: #f9fbfd; }

/* ---------- Header ---------- */
.atlas-head {
  flex: none;
  padding: 22px 56px 18px;
  border-bottom: 1px solid #e6eaf0;
  background: #fbfbfd;
  transition: padding 200ms ease;
}
.atlas-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
  max-height: 120px;
  overflow: hidden;
  transition: max-height 200ms ease, opacity 150ms ease, margin 200ms ease;
}
.atlas-kicker {
  margin: 0;
  color: #6b7482;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.atlas-head h2 {
  margin: 7px 0 0;
  color: #171a1f;
  font-size: clamp(30px, 3.3vw, 44px);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -.045em;
  text-wrap: balance;
  transition: font-size 200ms ease, margin 200ms ease;
}
.atlas-dek {
  max-width: 70ch;
  max-height: 90px;
  margin: 7px 0 0;
  color: #555e6b;
  font-size: 14.5px;
  line-height: 1.45;
  text-wrap: pretty;
  overflow: hidden;
  transition: max-height 200ms ease, opacity 150ms ease, margin 200ms ease;
}
.atlas-head-actions { margin-top:12px; }
.atlas-save-family {
  min-height:44px; padding:0 15px; border:1px solid #d9dfe8; border-radius:999px;
  background:#fff; color:#313943; font:650 12px -apple-system,BlinkMacSystemFont,"SF Pro Text","Helvetica Neue",Arial,sans-serif;
  cursor:pointer; transition:transform 160ms ease-out;
}
.atlas-save-family:hover { border-color:#a9bfdb; background:#f5f9ff; }
.atlas-save-family:active { transform:scale(.96); }
.atlas-save-family:focus-visible { outline:3px solid rgba(8,115,228,.55); outline-offset:2px; }
.atlas-save-family[aria-pressed="true"] { border-color:#b9d5c5; background:#eef7f1; color:#2b6848; }

/* Slim sticky-title state once the sheet is scrolled */
.atlas-sheet.is-scrolled .atlas-head { padding: 15px 56px; }
.atlas-sheet.is-scrolled .atlas-head-top {
  max-height: 0;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}
.atlas-sheet.is-scrolled .atlas-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.03em;
}
.atlas-sheet.is-scrolled .atlas-dek {
  max-height: 0;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}
.atlas-sheet.is-scrolled .atlas-close { top: 7px; }
.atlas-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.atlas-chip {
  padding: 5px 10px;
  border: 1px solid #dfe4eb;
  border-radius: 999px;
  background: #fff;
  color: #4d5663;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.atlas-chip-accent { border-color: transparent; background: var(--atlas-accent); color: #fff; }
.atlas-chip-status { border-color: #eadfbe; background: #fbf5e3; color: #8a6a1c; }

/* ---------- Scrolling body ---------- */
.atlas-scroll {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 56px 44px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}
.atlas-scroll::-webkit-scrollbar { width: 12px; }
.atlas-scroll::-webkit-scrollbar-thumb {
  border: 3px solid #fbfbfd;
  border-radius: 10px;
  background: #c3cad4;
}
.atlas-scroll::-webkit-scrollbar-track { background: #fbfbfd; }

.atlas-section { padding: 30px 0 34px; border-bottom: 1px solid #e8ebf0; }
.atlas-section:last-of-type { border-bottom: 0; }
.atlas-sec-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 16px;
}
.atlas-sec-num {
  flex: none;
  color: var(--atlas-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  font-variant-numeric: tabular-nums;
}
.atlas-sec-head h3 {
  margin: 0;
  color: #1c2026;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.022em;
}
.atlas-section p {
  margin: 0 0 12px;
  color: #4c5562;
  font-size: 14px;
  line-height: 1.68;
  text-wrap: pretty;
}
.atlas-section p:last-child { margin-bottom: 0; }

.atlas-callout {
  margin-top: 18px;
  padding: 13px 16px;
  border-left: 2px solid var(--atlas-accent);
  border-radius: 0 9px 9px 0;
  background: #f5f7fa;
  color: #3f4855;
  font-size: 13px;
  line-height: 1.55;
}
.atlas-callout strong { color: #20252d; font-weight: 650; }

.atlas-when {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.atlas-when li {
  position: relative;
  padding-left: 16px;
  color: #4c5562;
  font-size: 13.5px;
  line-height: 1.5;
}
.atlas-when li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--atlas-accent);
  opacity: .72;
}

/* ---------- Tactic cards ---------- */
.atlas-tactics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.atlas-tactic {
  min-width: 0;
  border: 1px solid #e1e6ed;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.atlas-tactic:hover { border-color: #cfd7e2; box-shadow: 0 4px 14px rgba(20, 30, 45, .05); }
.atlas-tactic[data-open="true"] { grid-column: 1 / -1; border-color: var(--atlas-accent); }
.atlas-tactic-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 16px 16px 15px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.atlas-tactic-toggle:focus-visible { outline: 2px solid rgba(8, 115, 228, .6); outline-offset: -3px; }
.atlas-tactic-copy { display: block; min-width: 0; }
.atlas-tactic-name {
  display: block;
  color: #232830;
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -.012em;
}
.atlas-tactic-line {
  display: block;
  margin-top: 4px;
  color: #78818e;
  font-size: 12px;
  line-height: 1.45;
  text-wrap: pretty;
}
.atlas-chevron {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid #dfe4ea;
  border-radius: 50%;
  color: #6b7480;
  font-size: 14px;
  line-height: 1;
  transition: transform 160ms ease, border-color 160ms ease, color 160ms ease;
}
.atlas-tactic[data-open="true"] .atlas-chevron {
  transform: rotate(45deg);
  border-color: var(--atlas-accent);
  color: var(--atlas-accent);
}
.atlas-tactic-detail {
  padding: 2px 16px 18px;
  border-top: 1px dashed #e6eaf0;
  margin: 0 16px;
  padding-inline: 0;
}
.atlas-tactic-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  margin: 16px 0 0;
}
.atlas-tactic-facts dt {
  margin-bottom: 3px;
  color: #98a1ae;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.atlas-tactic-facts dd {
  margin: 0;
  color: #4c5562;
  font-size: 12.5px;
  line-height: 1.55;
}
.atlas-tactic-facts ul { margin: 0; padding-left: 15px; }
.atlas-tactic-facts li { margin-bottom: 3px; }
.atlas-tactic-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #eef1f5;
}
.atlas-mini-label {
  color: #98a1ae;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.atlas-mini-empty { color: #7d8693; font-size: 11.5px; }
.atlas-mini-related { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.atlas-mini-related .atlas-mini-label { margin-right: 2px; }
.atlas-mini-chip {
  padding: 3px 8px;
  border: 1px solid #e1e6ed;
  border-radius: 999px;
  background: #f8fafc;
  color: #55606e;
  font-size: 10.5px;
  font-weight: 550;
}
button.atlas-mini-chip {
  font-family: inherit;
  cursor: pointer;
  transition: border-color 130ms ease, color 130ms ease, background-color 130ms ease;
}
button.atlas-mini-chip:hover {
  border-color: var(--atlas-accent);
  background: #fff;
  color: #1d232b;
}
button.atlas-mini-chip:focus-visible {
  outline: 2px solid rgba(8, 115, 228, .6);
  outline-offset: 1px;
}
.atlas-mini-chip-link { display: inline-flex; align-items: center; gap: 4px; }
.atlas-mini-chip-link span { color: var(--atlas-accent); font-size: 9.5px; }

/* ---------- Rich tactic detail ---------- */
.atlas-tactic-rich {
  display: grid;
  gap: 22px;
  margin-top: 18px;
  padding: 18px 0 2px;
  border-top: 1px solid #eef1f5;
}
.atlas-tactic-media {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.atlas-tactic-video {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: #0f1114;
}
.atlas-tactic-video iframe { display: block; width: 100%; height: 100%; border: 0; }
.atlas-tactic-media-meta .atlas-mini-label { display: block; margin-bottom: 5px; }
.atlas-tactic-video-title {
  margin: 0;
  color: #232830;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.3;
}
.atlas-tactic-video-by { margin: 3px 0 0; color: #7d8693; font-size: 11px; }
.atlas-tactic-video-note { margin: 7px 0 0; color: #6a7381; font-size: 11.5px; line-height: 1.5; }

.atlas-rich-block { display: grid; gap: 10px; }
.atlas-rich-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.atlas-rich-count {
  color: #98a1ae;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.atlas-proof { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.atlas-proof-card {
  min-width: 0;
  padding: 16px 17px 15px;
  border: 1px solid #e6eaf0;
  border-radius: 12px;
  background: #fafbfd;
}
.atlas-proof-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.atlas-proof-brand { color: #232830; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.atlas-proof-period { color: #98a1ae; font-size: 10px; font-variant-numeric: tabular-nums; }
.atlas-proof-card h4 { margin: 5px 0 6px; color: #232830; font-size: 13px; font-weight: 650; line-height: 1.3; }
.atlas-proof-card p { margin: 0; color: #4c5562; font-size: 11.5px; line-height: 1.55; }
.atlas-proof-lesson { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e3e8ef; }
.atlas-proof-lesson strong { color: #232830; font-weight: 700; }
.atlas-proof-links { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 9px; }
.atlas-proof-links a,
.atlas-example-source a {
  color: #8a5a3c;
  font-size: 10.5px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(138, 90, 60, .25);
}
.atlas-proof-links a:hover,
.atlas-example-source a:hover { color: #5b3623; border-color: currentColor; }
.atlas-rich-mistakes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 18px;
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
}
.atlas-rich-mistakes li { position: relative; padding-left: 13px; color: #4c5562; font-size: 11.5px; line-height: 1.5; }
.atlas-rich-mistakes li::before { content: "–"; position: absolute; left: 0; color: #b08a5a; }
.atlas-rich-gap {
  margin: 0;
  padding: 9px 11px;
  border-radius: 8px;
  background: #fbf5e3;
  color: #7c6322;
  font-size: 10.5px;
  line-height: 1.5;
}

/* ---------- Example slots ---------- */
.atlas-examples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.atlas-example {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid #e1e6ed;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.atlas-example-preview {
  position: relative;
  padding: 18px 16px;
  background: #eef1f6;
}
.atlas-illustrative {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .92);
  color: #78818e;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.atlas-mail {
  padding: 10px 12px 12px;
  border: 1px solid #e3e7ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(20, 30, 45, .07);
}
.atlas-mail-top { display: flex; gap: 3px; margin-bottom: 9px; }
.atlas-mail-top i { width: 4px; height: 4px; border-radius: 50%; background: #d9dee6; }
.atlas-mail-subject {
  margin-bottom: 8px;
  color: #242a33;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.3;
}
.atlas-mail-line { height: 5px; border-radius: 3px; background: #e8ecf2; margin: 5px 0; }
.atlas-mail-line.short { width: 62%; }
.atlas-mail-cta {
  display: inline-block;
  margin-top: 9px;
  padding: 4px 8px;
  border-radius: 3px;
  background: var(--card-accent, var(--atlas-accent));
  color: #fff;
  font-size: 8.5px;
  font-weight: 650;
}
.atlas-example-meta { padding: 13px 14px 15px; }
.atlas-example-kind {
  margin: 0 0 5px;
  color: var(--card-accent, var(--atlas-accent));
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.atlas-example h4 {
  margin: 0;
  color: #232830;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}
.atlas-example-meta p:last-child {
  margin: 6px 0 0;
  color: #7d8693;
  font-size: 11.5px;
  line-height: 1.5;
}
.atlas-example-verified .atlas-example-meta { height: 100%; }
.atlas-example-meta p.atlas-example-source {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e3e8ef;
}
.atlas-example-empty {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border-style: dashed;
  border-color: #d5dbe4;
  background: #fafbfd;
  text-align: left;
}
.atlas-empty-copy { min-width: 0; }
.atlas-example-empty h4 {
  margin: 0;
  color: #333a44;
  font-size: 13px;
  font-weight: 650;
}
.atlas-example-empty p {
  max-width: none;
  margin: 3px 0 0;
  color: #7d8693;
  font-size: 11.5px;
  line-height: 1.5;
}
.atlas-example-empty .atlas-soon-pill { margin-left: auto; flex: none; }
.atlas-plus {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px dashed #c6cfdb;
  border-radius: 50%;
  color: #7d8693;
  font-size: 17px;
  line-height: 1;
}
.atlas-soon-pill {
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef1f6;
  color: #6b7482;
  font-size: 10px;
  font-weight: 600;
}

/* ---------- Practical ---------- */
.atlas-practical {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.atlas-practical > div {
  padding: 16px;
  border: 1px solid #e6eaf0;
  border-radius: 12px;
  background: #f8fafc;
}
.atlas-practical h4 {
  margin: 0 0 10px;
  color: #2b313a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}
.atlas-practical ul { margin: 0; padding: 0; list-style: none; }
.atlas-practical li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 7px;
  color: #565f6c;
  font-size: 12.5px;
  line-height: 1.5;
}
.atlas-practical li:last-child { margin-bottom: 0; }
.atlas-practical li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: .58em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #9aa4b1;
}

.atlas-related { display: flex; flex-wrap: wrap; gap: 8px; }
.atlas-related-chip {
  padding: 7px 12px;
  border: 1px solid #e1e6ed;
  border-radius: 999px;
  background: #fff;
  color: #4d5663;
  font-size: 12px;
  font-weight: 550;
}
button.atlas-related-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 130ms ease, color 130ms ease, transform 130ms ease;
}
button.atlas-related-chip:hover { border-color: var(--atlas-accent); color: #1d232b; }
button.atlas-related-chip:active { transform: translateY(1px); }
button.atlas-related-chip:focus-visible {
  outline: 2px solid rgba(8, 115, 228, .6);
  outline-offset: 1px;
}
.atlas-related-arrow { color: var(--atlas-accent); font-size: 11px; }
.atlas-related-chip.is-static { color: #7d8693; background: #f8fafc; }

/* ---------- Footer / editorial ---------- */
.atlas-editorial {
  margin-top: 24px;
  padding: 13px 16px;
  border: 1px dashed #d9dfe8;
  border-radius: 10px;
  background: #fafbfd;
  color: #6a7381;
  font-size: 11.5px;
  line-height: 1.55;
}
.atlas-editorial strong { color: #3f4855; font-weight: 650; }

.atlas-fieldnotes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 14px;
  padding: 20px 22px;
  border-radius: 14px;
  background: #1d1d1f;
  color: #f5f5f7;
}
.atlas-fieldnotes-kicker {
  margin: 0 0 5px;
  color: #8abfff;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.atlas-fieldnotes h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}
.atlas-fieldnotes p:last-child {
  margin: 5px 0 0;
  color: #b7bdc8;
  font-size: 11.5px;
  line-height: 1.5;
}
.atlas-fieldnotes .atlas-soon-pill {
  flex: none;
  background: rgba(255, 255, 255, .1);
  color: #d3d8e1;
}

/* ---------- Pending / research state ---------- */
.atlas-pending {
  margin-top: 18px;
  padding: 20px;
  border: 1px dashed #d5dbe4;
  border-radius: 12px;
  background: #fafbfd;
}
.atlas-pending-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #8a6a1c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.atlas-pending-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d9a72c;
  box-shadow: 0 0 0 4px rgba(217, 167, 44, .16);
}
.atlas-tactic-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.atlas-tactic-chips li {
  padding: 6px 10px;
  border: 1px solid #e1e6ed;
  border-radius: 999px;
  background: #fff;
  color: #55606e;
  font-size: 11.5px;
  font-weight: 550;
}
.atlas-outline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: atlas-outline;
}
.atlas-outline li {
  counter-increment: atlas-outline;
  position: relative;
  padding-left: 30px;
  color: #6a7381;
  font-size: 12.5px;
  line-height: 1.5;
}
.atlas-outline li::before {
  content: "0" counter(atlas-outline);
  position: absolute;
  left: 0;
  color: #a3abb7;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .08em;
  top: .3em;
}

/* ---------- Hover tooltip ---------- */
.atlas-tooltip {
  position: fixed;
  z-index: 90;
  width: 232px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #17191d;
  color: #f5f5f7;
  box-shadow: 0 14px 36px rgba(8, 12, 18, .35);
  pointer-events: none;
  animation: atlas-tip-in 140ms ease-out;
}
.atlas-tooltip[hidden] { display: none; }
@keyframes atlas-tip-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}
.atlas-tooltip::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: var(--atlas-accent, #65aaff);
}
.atlas-tooltip-kicker {
  margin: 0 0 4px;
  padding-left: 8px;
  color: #98a1ae;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.atlas-tooltip-title {
  margin: 0;
  padding-left: 8px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -.01em;
}
.atlas-tooltip-meta {
  margin: 5px 0 0;
  padding-left: 8px;
  color: #b7bdc8;
  font-size: 10.5px;
}
.atlas-tooltip-hint {
  margin: 9px 0 0;
  padding-left: 8px;
  color: #8abfff;
  font-size: 10px;
  font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .atlas-dialog { grid-template-columns: 1fr; }
  .atlas-rail { display: none; }
  .atlas-head { padding: 32px 40px 22px; }
  .atlas-sheet.is-scrolled .atlas-head { padding: 14px 40px; }
  .atlas-scroll { padding: 8px 40px 38px; }
  .atlas-examples { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .atlas-backdrop { padding: 0; }
  .atlas-dialog {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .atlas-head { padding: 20px 22px 16px; }
  .atlas-head h2 { font-size: clamp(28px, 8vw, 36px); }
  .atlas-dek { font-size: 13.5px; }
  .atlas-scroll { padding: 4px 22px 32px; }
  .atlas-close { top: 14px; right: 14px; }
  .atlas-sheet.is-scrolled .atlas-head { padding: 11px 22px; }
  .atlas-sheet.is-scrolled .atlas-head h2 { font-size: 18px; }
  .atlas-sheet.is-scrolled .atlas-close { top: 5px; }
  .atlas-tactics,
  .atlas-when,
  .atlas-examples,
  .atlas-practical,
  .atlas-outline,
  .atlas-tactic-facts,
  .atlas-tactic-media,
  .atlas-proof,
  .atlas-rich-mistakes { grid-template-columns: 1fr; }
  .atlas-section { padding: 26px 0 28px; }
  .atlas-fieldnotes { flex-direction: column; align-items: flex-start; gap: 12px; }
  .atlas-example-empty { flex-wrap: wrap; }
  .atlas-example-empty .atlas-soon-pill { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .atlas-backdrop,
  .atlas-dialog,
  .atlas-tooltip,
  .atlas-tactic,
  .atlas-chevron,
  .atlas-head,
  .atlas-head-top,
  .atlas-head h2,
  .atlas-dek,
  .atlas-close,
  .atlas-rail-nav button { transition: none; animation: none; }
  .atlas-scroll { scroll-behavior: auto; }
}

@media print {
  .atlas-backdrop,
  .atlas-tooltip { display: none !important; }
  .branch h3.atlas-family-link::after { display: none; }
}

/* Editorial Atlas — carry the publication frame into level three. */
.atlas-dialog {
  border-color: rgba(73, 82, 72, .14);
  border-radius: 14px;
  background: #faf8f2;
  box-shadow: 0 32px 84px rgba(35, 39, 33, .3), 0 2px 8px rgba(35, 39, 33, .12);
}
.atlas-sheet,
.atlas-head,
.atlas-scroll,
.atlas-scroll::-webkit-scrollbar-track {
  background: #faf8f2;
}
.atlas-rail {
  border-right-color: #d8d6cc;
  background: #f1efe8;
}
.atlas-rail-kicker,
.atlas-kicker { color: #718074; }
.atlas-rail-discipline,
.atlas-head h2,
.atlas-sec-head h3 { color: #252722; }
.atlas-rail-nav button[aria-current="true"] {
  background: rgba(255, 255, 255, .72);
  box-shadow: inset 0 0 0 1px rgba(31, 37, 32, .05);
}
.atlas-head { border-bottom-color: #d8d6cc; }
.atlas-head h2 { font-family: var(--display, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif); }
.atlas-dek,
.atlas-section p { color: #596057; }
.atlas-chip { border-color: #dfddd4; background: rgba(255, 255, 255, .72); color: #50574e; }
.atlas-chip-accent { border-color: transparent; background: var(--atlas-accent); color: #fff; }
.atlas-save-family { border-color: #d8d6cc; color: #3e463d; }
.atlas-save-family:hover { border-color: color-mix(in srgb, var(--atlas-accent) 45%, #d8d6cc); background: #f5f3ec; }
.atlas-section { border-bottom-color: #dedcd3; }
.atlas-callout { background: #f1efe8; color: #444a42; }
.atlas-rail-close { border-color: #d4d2c9; border-radius: 7px; background: rgba(255, 255, 255, .6); color: #485047; }
.atlas-scroll::-webkit-scrollbar-thumb { border-color: #faf8f2; background: #b4b7ad; }
.atlas-close:focus-visible,
.atlas-save-family:focus-visible,
.atlas-rail-nav button:focus-visible,
.atlas-rail-close:focus-visible { outline-color: color-mix(in srgb, var(--atlas-accent) 70%, #49627b); }
.atlas-dialog,
.atlas-dialog * { border-width: .75px; }
.atlas-dialog .atlas-rail .atlas-rail-close {
  min-height: 44px;
  border-width: .75px;
  border-radius: 999px;
  border-color: rgba(59, 66, 58, .14);
  background: var(--glass-plate, linear-gradient(180deg, rgba(255,255,255,.96), rgba(249,249,246,.78)));
  color: #343a32;
  box-shadow: var(--glass-button-shadow, inset 0 1px 0 rgba(255,255,255,.98), inset 0 -1px 0 rgba(42,48,40,.045), 0 1px 2px rgba(34,39,32,.07), 0 4px 10px rgba(34,39,32,.055));
  transition: transform 180ms cubic-bezier(.2, 0, 0, 1), background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.atlas-dialog .atlas-rail .atlas-rail-close:hover {
  border-color: rgba(73, 98, 123, .3);
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(250,250,247,.9));
  box-shadow: var(--glass-button-shadow-hover, 0 6px 14px rgba(34,39,32,.09));
  transform: translateY(-1px);
}
.atlas-dialog .atlas-rail .atlas-rail-close:active {
  transform: scale(.96);
  box-shadow: var(--glass-button-shadow-pressed, inset 0 1px 2px rgba(35,41,33,.1));
}
.atlas-rail { border-right-width: .75px; }
.atlas-head { border-bottom-width: .75px; }
.atlas-section { border-bottom-width: .75px; }
@media (prefers-reduced-motion: reduce) {
  .atlas-dialog .atlas-rail .atlas-rail-close { transition: none; }
}
