.atlas-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; padding-top: 64px; padding-bottom: 56px; }
.atlas h1 { font-family: var(--font-display); font-size: clamp(80px, 10vw, 136px); font-weight: 800; line-height: .95; text-transform: uppercase; margin: 20px 0 24px; }
.atlas h1 span { color: var(--accent-dark); }
.atlas-intro { font-size: clamp(20px, 2.5vw, 26px); line-height: 1.5; }
.atlas-mission { border: 2px solid var(--ink); padding: 28px; background: var(--yellow); box-shadow: 7px 7px 0 var(--ink); }
.atlas-mission p { font-size: clamp(22px, 2.5vw, 28px); line-height: 1.35; margin: 18px 0; font-weight: 500; }
.atlas-mission-note { font-size: 13px; }
.atlas-explorer { padding-bottom: 64px; }
.atlas-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.atlas-switch { display: inline-flex; border: 2px solid var(--ink); }
.atlas-switch button { font: inherit; font-size: 12px; padding: 14px 24px; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.atlas-switch button span { font-size: 16px; font-weight: 700; margin-left: 8px; }
.atlas-switch button + button { border-left: 2px solid var(--ink); }
.atlas-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.atlas-source { color: var(--ink); font-size: 14px; text-underline-offset: 4px; }
.atlas-view-heading { display: flex; justify-content: space-between; align-items: end; gap: 32px; padding: 32px 0 24px; }
.atlas h2 { font-family: var(--font-display); font-size: 38px; text-transform: uppercase; line-height: 1.1; margin-bottom: 10px; }
#view-description { max-width: 640px; font-size: 15px; line-height: 1.6; }
.atlas-controls { display: flex; gap: 12px; flex-shrink: 0; }
.atlas-controls label { display: grid; gap: 8px; font-size: 12px; }
.atlas-controls input, .atlas-controls select { font: inherit; font-size: 15px; border: 1px solid var(--ink); background: var(--white); border-radius: 0; padding: 12px; color: var(--ink); min-width: 0; width: 100%; }
.atlas-controls input { max-width: 240px; }
.atlas :focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 4px; }
#atlas-status { font-size: 13px; margin-bottom: 14px; }
#atlas-error { background: var(--soft); border: 1px solid var(--line); padding: 32px; }
#atlas-error h3 { font-size: 23px; margin-bottom: 12px; }
#atlas-error p { font-size: 16px; line-height: 1.6; }
.atlas-table-wrap { overflow-x: auto; border: 1px solid var(--line); }
.atlas table { border-collapse: collapse; width: 100%; font-size: 14px; text-align: left; }
.atlas thead th { background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 500; white-space: nowrap; }
.atlas th, .atlas td { padding: 18px; vertical-align: top; min-width: 140px; max-width: 360px; overflow-wrap: anywhere; line-height: 1.55; }
.atlas tbody th, .atlas td { border-bottom: 1px solid var(--line); }
.atlas tbody th { min-width: 220px; font-size: 16px; font-weight: 500; }
.atlas tbody tr:nth-child(even) { background: var(--soft); }
.atlas tbody tr:last-child > * { border-bottom: 0; }
.atlas-level { display: block; font-size: 11px; font-weight: 400; margin-top: 10px; text-transform: uppercase; letter-spacing: .04em; }
.atlas-cell-text { white-space: pre-wrap; }
.atlas details { margin-top: 12px; font-size: 13px; font-weight: 400; }
.atlas summary { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.atlas dl { margin-top: 14px; }
.atlas dt { font-size: 11px; text-transform: uppercase; margin-top: 12px; font-weight: 700; }
.atlas dd { margin-top: 4px; white-space: pre-wrap; }
.atlas-badge { display: inline-block; font-size: 12px; border: 1px solid var(--line); padding: 4px 8px; }
.atlas-badge.active { background: #e1ebd9; border-color: #789467; }
.atlas-notes { display: flex; justify-content: space-between; gap: 24px; padding-top: 20px; }
.atlas-notes p { font-size: 12px; color: #575149; line-height: 1.7; max-width: 480px; }
.atlas-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.atlas [hidden] { display: none !important; }
@media (max-width: 1000px) { .atlas-view-heading { align-items: start; flex-direction: column; gap: 20px; } .atlas-hero { gap: 32px; } }
@media (max-width: 650px) {
  .atlas-hero { grid-template-columns: 1fr; padding-top: 36px; padding-bottom: 36px; gap: 28px; }
  .atlas-mission { margin-right: 7px; padding: 22px; }
  .atlas-toolbar, .atlas-notes { align-items: stretch; flex-direction: column; }
  .atlas-switch button { flex: 1; padding-inline: 12px; }
  .atlas-controls { width: 100%; flex-wrap: wrap; }
  .atlas-controls label { flex: 1 1 150px; }
  .atlas-controls input { max-width: none; }
}

.atlas a { color: inherit; text-underline-offset: 3px; }
.atlas-links { list-style: none; padding: 0; }
.atlas-links li + li { margin-top: 8px; }
.atlas-unresolved { font-size: 12px; margin-top: 10px; color: var(--accent-dark); }
.atlas-record { border: 2px solid var(--ink); padding: 28px; background: var(--soft); margin-bottom: 28px; scroll-margin-top: 120px; }
.atlas-record h2 { margin-top: 24px; overflow-wrap: anywhere; }
.atlas-record h3 { margin-top: 24px; margin-bottom: 8px; font-size: 17px; }
.atlas-record-purpose { font-size: 20px; line-height: 1.6; margin-top: 24px; }
.atlas-record-meta { font-size: 13px; }
.atlas-record dl { display: grid; grid-template-columns: minmax(100px, 180px) minmax(0, 1fr); gap: 12px 24px; margin-top: 28px; }
.atlas-record dt, .atlas-record dd { margin: 0; overflow-wrap: anywhere; }
.atlas-history { padding-left: 20px; font-size: 15px; line-height: 1.6; }
.atlas-history li { margin-bottom: 12px; }
.atlas-history small { display: block; }
@media (max-width: 650px) { .atlas-record { padding: 18px; } .atlas-record dl { grid-template-columns: 1fr; gap: 8px; } .atlas-record dd { margin-bottom: 12px; } }

.atlas-coverage { font-size: 12px; line-height: 1.6; margin-top: 10px; }
.atlas-format { display: flex; gap: 0; margin-bottom: 24px; }
.atlas-format button { border: 1px solid var(--ink); padding: 10px 22px; font: inherit; font-size: 14px; cursor: pointer; background: transparent; color: var(--ink); }
.atlas-format button + button { border-left: 0; }
.atlas-format button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.atlas-circles-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.atlas-circles-layout.has-selection { grid-template-columns: minmax(0, 1fr) 320px; }
#atlas-circle-chart { min-width: 0; padding: 20px; background: #f1eadd; border: 1px solid var(--line); }
.atlas-circle-svg {
  display: block; width: 100%; max-height: 820px; margin: 8px auto; overflow: visible;
  transition: opacity .26s ease, transform .26s ease; transform-origin: 50% 50%;
}
/* Drill-in/out: the incoming level scales+fades from slightly smaller (going
   deeper) or slightly larger (going back up) instead of just appearing, so
   the hierarchy reads as zooming. Toggled in atlas-circles.js only when the
   focused circle actually changes, so search/selection updates stay instant. */
.atlas-circle-svg.atlas-circle-enter-in { opacity: 0; transform: scale(.88); }
.atlas-circle-svg.atlas-circle-enter-out { opacity: 0; transform: scale(1.14); }
@media (prefers-reduced-motion: reduce) { .atlas-circle-svg { transition: none; } }
.atlas-circle-svg a { cursor: pointer; }
.atlas-circle-svg.atlas-circle-zoomable { cursor: zoom-out; }
.atlas-circle-svg text { fill: var(--ink); font-family: var(--font-body); }
.atlas-circle-svg a:hover > circle, .atlas-circle-svg a:focus-visible > circle { stroke: var(--accent-dark); stroke-width: 4; }
/* Roles are dashed to read as individual leaves rather than containers;
   interaction solidifies the dash to reinforce the hover/focus state. */
.atlas-circle-svg a.atlas-node-role:hover > circle,
.atlas-circle-svg a.atlas-node-role:focus-visible > circle { stroke-dasharray: none; }
.atlas-circle-svg a:focus { outline: none; }
.atlas-circle-svg a:focus-visible {
  outline: 3px solid var(--ink); outline-offset: 3px;
}
.atlas-circle-svg .atlas-circle-match > circle, .atlas-circle-svg .atlas-circle-selected > circle { stroke: var(--accent-dark); stroke-width: 4; }
/* Hover/focus tooltip fallback for nodes too small to label inline (depth > 1). */
.atlas-circle-svg .atlas-circle-tip {
  opacity: 0; fill: var(--ink); font-weight: 600; font-family: var(--font-body);
  paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round;
  transition: opacity .12s ease;
}
.atlas-circle-svg a:hover ~ .atlas-circle-tip, .atlas-circle-svg a:focus-visible ~ .atlas-circle-tip { opacity: 1; }
.atlas-circle-breadcrumbs {
  font-family: var(--font-body); font-size: 13px; font-weight: 700; line-height: 2;
  letter-spacing: .01em; text-transform: uppercase; overflow-wrap: anywhere;
}
.atlas-circle-breadcrumbs a { text-decoration: underline; text-underline-offset: 3px; }
.atlas-circle-breadcrumbs a:hover { color: var(--accent-dark); }
.atlas-circle-crumb-sep { margin: 0 8px; color: var(--line); font-weight: 400; }
.atlas-circle-crumb-current { color: var(--ink); font-weight: 900; }
.atlas-root-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 4px; }
.atlas-root-picker-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #575149; }
.atlas-root-picker a {
  font-size: 13px; font-weight: 700; padding: 4px 12px; border: 1px solid var(--ink); border-radius: 999px;
  text-decoration: none; background: var(--paper);
}
.atlas-root-picker a:hover { background: var(--yellow); }
.atlas-root-picker a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.atlas-circle-hint { font-size: 13px; line-height: 1.6; margin: 12px 0 20px; }
.atlas-circle-children, .atlas-unplaced { padding: 16px 0; border-top: 1px solid var(--line); }
.atlas-circle-children ul, .atlas-unplaced ul, .atlas-circle-search ul { padding-left: 20px; }
.atlas-circle-children li, .atlas-unplaced li, .atlas-circle-search li { margin-top: 10px; font-size: 14px; }
.atlas-unplaced summary { display: flex; align-items: center; text-decoration: none; }
.atlas-unplaced summary > span:first-child { text-decoration: underline; text-underline-offset: 3px; }
.atlas-unplaced-count { font-weight: 800; background: var(--yellow); border-color: var(--ink); }
.atlas-unplaced-group { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: #575149; margin-top: 16px; }
.atlas-unplaced-group:first-of-type { margin-top: 14px; }
.atlas-unplaced p { font-size: 13px; line-height: 1.6; margin-top: 12px; }
.atlas-circle-search { margin-top: 16px; padding: 16px; background: var(--paper); }
#atlas-circle-detail { min-width: 0; }
#atlas-circle-detail .atlas-record { padding: 20px; max-height: 850px; overflow-y: auto; }
#atlas-circle-detail .atlas-record h2 { font-size: 30px; }
#atlas-circle-detail .atlas-record dl { grid-template-columns: 1fr; gap: 8px; }
#atlas-circle-detail .atlas-record dd { margin-bottom: 12px; }
@media (max-width: 850px) {
  .atlas-circles-layout.has-selection { grid-template-columns: minmax(0, 1fr); }
  #atlas-circle-detail .atlas-record { max-height: none; }
  #atlas-circle-chart { padding: 12px; }
  .atlas-circle-children summary, .atlas-unplaced summary { min-height: 44px; align-items: center; }
  /* Larger touch targets for the text-link fallbacks around the chart. */
  .atlas-circle-breadcrumbs a, .atlas-circle-children a, .atlas-unplaced a, .atlas-circle-search a {
    display: inline-block; padding: 8px 2px;
  }
  .atlas-circle-svg a:hover > circle, .atlas-circle-svg a:focus-visible > circle,
  .atlas-circle-svg .atlas-circle-match > circle, .atlas-circle-svg .atlas-circle-selected > circle { stroke-width: 5; }
}
.atlas-circle-svg text.atlas-circle-label { fill: #fffaf2; }

/* Work tree: vertical position is parent-link depth, not a GTD horizon. */
.atlas-tree-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.atlas-tree-layout.has-selection { grid-template-columns: minmax(0, 1fr) 320px; }
#atlas-tree-chart { min-width: 0; padding: 20px; background: #f1eadd; border: 1px solid var(--line); }
.atlas-tree-scroll { overflow-x: auto; margin: 8px 0; }
.atlas-tree-svg { display: block; max-width: none; }
.atlas-tree-svg a { cursor: pointer; }
.atlas-tree-svg text { font-family: var(--font-body); }
.atlas-tree-svg a:hover > rect, .atlas-tree-svg a:focus-visible > rect { stroke: var(--accent-dark); stroke-width: 3.5; }
.atlas-tree-svg a:focus { outline: none; }
.atlas-tree-svg a:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.atlas-tree-svg .atlas-tree-match > rect, .atlas-tree-svg .atlas-tree-selected > rect { stroke: var(--accent-dark); stroke-width: 3.5; }
.atlas-tree-edge { fill: none; stroke: #8a8272; stroke-width: 1.5; }
.atlas-tree-band { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; fill: #8a8272; }
.atlas-tree-breadcrumbs {
  font-family: var(--font-body); font-size: 13px; font-weight: 700; line-height: 2;
  letter-spacing: .01em; text-transform: uppercase; overflow-wrap: anywhere;
}
.atlas-tree-breadcrumbs a { text-decoration: underline; text-underline-offset: 3px; }
.atlas-tree-breadcrumbs a:hover { color: var(--accent-dark); }
.atlas-tree-crumb-sep { margin: 0 8px; color: var(--line); font-weight: 400; }
.atlas-tree-crumb-current { color: var(--ink); font-weight: 900; }
.atlas-tree-hint { font-size: 13px; line-height: 1.6; margin: 12px 0 20px; }
.atlas-tree-search { margin-top: 16px; padding: 16px; background: var(--paper); }
.atlas-tree-search ul { padding-left: 20px; }
.atlas-tree-search li { margin-top: 10px; font-size: 14px; }
#atlas-tree-detail { min-width: 0; }
#atlas-tree-detail .atlas-record { padding: 20px; max-height: 850px; overflow-y: auto; }
#atlas-tree-detail .atlas-record h2 { font-size: 30px; }
#atlas-tree-detail .atlas-record dl { grid-template-columns: 1fr; gap: 8px; }
#atlas-tree-detail .atlas-record dd { margin-bottom: 12px; }
@media (max-width: 850px) {
  .atlas-tree-layout.has-selection { grid-template-columns: minmax(0, 1fr); }
  #atlas-tree-detail .atlas-record { max-height: none; }
  #atlas-tree-chart { padding: 12px; }
  .atlas-tree-breadcrumbs a, .atlas-tree-search a { display: inline-block; padding: 8px 2px; }
  .atlas-tree-svg a:hover > rect, .atlas-tree-svg a:focus-visible > rect,
  .atlas-tree-svg .atlas-tree-match > rect, .atlas-tree-svg .atlas-tree-selected > rect { stroke-width: 4.5; }
}

/* Canvas navigation stays separate from record details and search results. */
.atlas-tree-zoom { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0; }
.atlas-tree-zoom button { font: inherit; font-size: 13px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--ink); color: var(--ink); background: var(--paper); cursor: pointer; }
.atlas-tree-zoom button:hover { background: var(--yellow); }
.atlas-tree-zoom output { min-width: 48px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.atlas-tree-scroll { overscroll-behavior-x: contain; scrollbar-width: auto; scrollbar-color: #8a8272 #f1eadd; }
.atlas-tree-svg rect { transition: stroke .15s ease, stroke-width .15s ease; }
@media (prefers-reduced-motion: reduce) { .atlas-tree-svg rect { transition: none; } }

.atlas-guide { border-bottom: 1px solid var(--line); padding: 18px 0; }
.atlas-guide summary { font-weight: 700; min-height: 32px; }
.atlas-guide > p { max-width: 850px; line-height: 1.7; margin: 16px 0; font-size: 15px; }
.atlas-guide h3 { font-family: var(--font-display); font-size: 26px; margin-top: 24px; }
.atlas-horizons { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.atlas-horizons li { padding: 18px; border: 1px solid var(--line); background: var(--soft); }
.atlas-horizons span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 12px; }
.atlas-horizons strong { display: block; font-size: 16px; line-height: 1.4; }
.atlas-horizons p { margin-top: 10px; line-height: 1.6; }
@media (max-width: 850px) { .atlas-horizons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) { .atlas-horizons { grid-template-columns: 1fr; } .atlas-switch button span { font-size: 14px; } }

/* Planning horizons: a fixed reading rail beside a scrollable work map. */
.atlas-horizon-canvas { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 14px; }
.atlas-horizon-rail { overflow: hidden; }
.atlas-horizon-label { border-left: 5px solid var(--horizon-color); background: var(--horizon-fill); padding: 18px 12px; overflow: hidden; box-sizing: border-box; }
.atlas-horizon-label strong { display: block; color: var(--horizon-color); font: 700 24px/1.1 var(--font-display); }
.atlas-horizon-label span { display: block; font-size: 12px; line-height: 1.5; margin-top: 8px; }
.atlas-horizon-label small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .04em; margin-top: 14px; }
.atlas-horizon-canvas .atlas-tree-scroll { margin: 0; min-width: 0; }
.atlas-branch-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 20px 0 4px; font-size: 13px; font-weight: 700; }
.atlas-branch-picker select { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--ink); padding: 12px; max-width: 100%; min-height: 44px; }
#atlas-tree-chart { background: #fffaf2; border-radius: 12px; }
@media (max-width: 850px) {
  .atlas-horizon-canvas { grid-template-columns: 115px minmax(0, 1fr); gap: 8px; }
  .atlas-horizon-label { padding: 14px 8px; }
  .atlas-horizon-label strong { font-size: 19px; }
  .atlas-horizon-label span { font-size: 11px; }
  .atlas-horizon-label small { font-size: 9px; }
}

.atlas-horizon-canvas.is-overview { grid-template-columns: minmax(0, 1fr); }
.atlas-horizon-canvas.is-overview .atlas-horizon-rail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding-top: 0 !important; }
.atlas-horizon-canvas.is-overview .atlas-horizon-label { height: auto !important; }
.atlas-horizon-canvas.is-overview .atlas-horizon-label span { display: none; }
@media (max-width: 650px) {
  .atlas-horizon-canvas { grid-template-columns: minmax(0, 1fr); }
  .atlas-horizon-canvas .atlas-horizon-rail, .atlas-horizon-canvas.is-overview .atlas-horizon-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-top: 0 !important; }
  .atlas-horizon-canvas .atlas-horizon-label { height: auto !important; }
  .atlas-horizon-label span { display: none; }
  .atlas-horizon-label small { margin-top: 8px; }
}

.atlas-horizons { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.atlas-horizons li:nth-child(1) { background: #dce8ff; border-color: #3155a4; }
.atlas-horizons li:nth-child(2) { background: #eee2fa; border-color: #78439b; }
.atlas-horizons li:nth-child(3) { background: #fff0d2; border-color: #9a520c; }
.atlas-horizons li:nth-child(4) { background: #ddf2e9; border-color: #176758; }
@media (max-width: 1000px) { .atlas-horizons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) { .atlas-horizons { grid-template-columns: 1fr; } }

.atlas-people-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.atlas-person { padding: 24px; background: var(--soft); border: 1px solid var(--line); border-top: 5px solid var(--accent-dark); }
.atlas-person h3 { font: 700 38px/1.1 var(--font-display); margin-bottom: 12px; }
.atlas-person.is-selected { outline: 3px solid var(--accent-dark); outline-offset: 3px; }
.atlas-person-context, .atlas-person-count { font-size: 13px; line-height: 1.5; margin-top: 12px; }
.atlas-person .atlas-links { margin-top: 20px; }
.atlas-person .atlas-links li { border-top: 1px solid var(--line); padding: 12px 0; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.atlas-person-role-type { display: block; font-size: 11px; color: #575149; }
.atlas-people-note { font-size: 13px; line-height: 1.7; margin-top: 24px; max-width: 850px; }
@media (max-width: 1000px) { .atlas-people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) { .atlas-people-grid { grid-template-columns: 1fr; } .atlas-switch button { padding: 12px 8px; } .atlas-switch button span { margin-left: 4px; } }
