/**
 * jonmick.ai - Neuro-atlas theme (JON-1424)
 * =========================================
 * A scoped "paper" theme for the atlas pages (homepage + career record).
 * Loaded AFTER styles.css on those pages only.
 *
 * SCOPE RULE: every rule in this file is scoped under `body.atlas`.
 * Nothing here may reach the other 107 pages. Opting a page in is one
 * body class; opting out is removing it.
 *
 * Source of truth: docs/design/2026-09-04-neuro-atlas/README.md plus the two
 * design references (homepage-neuro-atlas.dc.html, career.dc.html).
 * Plan: docs/plans/active/2026-09-04-neuro-atlas-homepage.md
 *
 * ---------------------------------------------------------------------------
 * MARKUP CONTRACT
 * ---------------------------------------------------------------------------
 * Phases 2 and 3 build markup against these classes. Shapes below are the
 * expected nesting; anything marked (opt) may be omitted.
 *
 * PAGE
 *   <body class="atlas">
 *     <div id="site-nav"></div>            shared nav.html, restyled here
 *     <div class="atlas-wrap">
 *       <div class="atlas-masthead">
 *         <span class="atlas-masthead-left">Atlas of a personal AI system</span>
 *         <span class="atlas-masthead-right">v2.77 &middot; updated live</span>
 *       </div>
 *       <div class="atlas-grid">
 *         <aside class="atlas-rail"> ... </aside>
 *         <main> ...plates... </main>
 *       </div>
 *     </div>
 *     <div id="site-footer"></div>         shared footer.html, restyled here
 *
 * RAIL
 *   <aside class="atlas-rail">
 *     <div class="atlas-rail-section">
 *       <div class="atlas-rail-label">Contents</div>
 *       <ol class="atlas-contents">
 *         <li><a href="#plate-1"><span class="atlas-contents-num">I</span>The system</a></li>
 *       </ol>
 *     </div>
 *     <div class="atlas-rail-section">
 *       <div class="atlas-rail-label">Talk to it</div>
 *       <div class="atlas-fine">By text: paste into any AI</div>
 *       <div class="atlas-rail-actions">          buttons stretch full width here
 *         <a class="atlas-btn atlas-btn--primary">Download profile</a>
 *         <button class="atlas-btn atlas-btn--outline">Copy to clipboard</button>
 *       </div>
 *       <a class="atlas-btn atlas-btn--accent" href="tel:...">928&middot;706&middot;9386</a>
 *       <div class="atlas-fine">11 knowledge tools &middot; 10 min max</div>
 *     </div>
 *     <div class="atlas-status">
 *       <div><span class="atlas-status-dot"></span>Systems operational</div>
 *       <div>Whoop synced 38m ago</div>
 *     </div>
 *   </aside>
 *
 * PLATE
 *   <section class="atlas-plate" id="plate-1">
 *     <h2 class="atlas-plate-head">                 real heading, mono label pair
 *       <span class="atlas-plate-num">Plate I</span>
 *       <span class="atlas-plate-title">The system</span>
 *     </h2>
 *     <div class="atlas-hero">                      positioning ctx for the portrait
 *       <img class="atlas-portrait" alt="" aria-hidden="true">
 *       <div class="atlas-h1">...</div>             or a real <h1>
 *       <p class="atlas-lede">...</p>
 *     </div>
 *     <figure class="atlas-fig">
 *       <div class="atlas-fig-label"><span>Fig. 1a</span><span>right-hand note</span></div>
 *       ...content...
 *       <figcaption class="atlas-figcaption">
 *         <span class="atlas-fig-num">Fig. 1.</span> caption text
 *       </figcaption>
 *     </figure>
 *   </section>
 *   Plates are separated by 64px automatically (.atlas-plate + .atlas-plate).
 *
 * FIGURE CONTENT
 *   .atlas-chips   grid of .atlas-chip { .atlas-chip-name, .atlas-chip-meta }
 *   .atlas-connector                      1x18px ink rule between figure stages
 *   .atlas-box (+ --accent | --dashed | --tint | --surface)
 *                  { .atlas-box-label, .atlas-box-display, .atlas-box-lead, .atlas-box-text }
 *   .atlas-tiles   grid of .atlas-tile (+ --public for the two public surfaces)
 *                  { .atlas-tile-name, .atlas-tile-meta }; use <a> for --public
 *   .atlas-fig-row + .atlas-fig-col + .atlas-fig-img   Plate II three-up layout
 *   .atlas-kv      <dl> rows: <dt>label</dt><dd>mono value</dd>
 *   .atlas-numbered  grid of .atlas-numbered-item (+ --active)
 *                  { .atlas-numbered-idx, .atlas-numbered-val, .atlas-numbered-label }
 *   .atlas-bars    3-column grid, THREE children per row:
 *                  <span class="atlas-bar-name">, <svg class="atlas-bar">, <span class="atlas-bar-value">
 *   .atlas-cards   grid of .atlas-card { .atlas-card-eyebrow, .atlas-card-title,
 *                  .atlas-card-text, .atlas-card-link }
 *   .atlas-org-grid  grid of .atlas-org { .atlas-org-logo>img, .atlas-org-name, .atlas-org-meta }
 *   .atlas-metrics   Whoop strip: <svg class="atlas-ring"> with
 *                  <circle class="atlas-ring-track"> + <circle class="atlas-ring-value">,
 *                  then .atlas-metric { .atlas-metric-val, .atlas-metric-label }
 *   .atlas-covers  grid of .atlas-cover { <img>, .atlas-cover-title, .atlas-cover-date }
 *   .atlas-index   two-column list of .atlas-index-row
 *                  { .atlas-index-label, .atlas-index-leader, .atlas-index-value }
 *   .atlas-link (+ --back)   accent link; the arrow glyph is supplied by markup
 *
 * HOMEPAGE (section 12, JON-1426)
 *   Hero + intro
 *     header.atlas-hero.atlas-hero--top   hero above the plates, not inside one
 *     p.atlas-intro                        15.5px plate intro under the .atlas-h2
 *   Fig. 1 "The system - flow"
 *     .atlas-families  5-col grid of .atlas-family
 *                  { .atlas-family-head, .atlas-family-how, .atlas-family-items >
 *                    .atlas-sense { .atlas-sense-name > a.atlas-sense-link,
 *                                   .atlas-sense-meta, .atlas-sense-links > a } }
 *     .atlas-dots > .atlas-dot            5 ink dots aligned to the family columns
 *     svg.atlas-flow > path.atlas-flow-path
 *                  (+ --drift with one of --d6/--d7/--d8/--d9/--d11, or --authored)
 *     .atlas-chevron (+ --tight | --flow | --drop | --accent)   14x8 chevron row
 *     .atlas-box--ink   ink slab; second column is .atlas-box-ink-col
 *     .atlas-split (+ --h26 | --h24 | --top)   1fr 210px private/public split
 *       .atlas-line (+ --stub) { .atlas-line-dot (+ --public), svg.atlas-line-svg,
 *                                .atlas-line-solid }
 *       .atlas-gate (+ --public) { .atlas-gate-bar > .atlas-gate-title,
 *                                  .atlas-gate-pass (+ --public) >
 *                                  .atlas-gate-label }
 *       .atlas-surfaces-label (+ --public), .atlas-surfaces, .atlas-public-stack
 *     .atlas-tile--strong   1.5px public tile used in .atlas-public-stack
 *     .atlas-connector--mobile   plain rule shown below 820px in place of the flow
 *   Fig. 2 "Inside the Memory Palace - floor plan"
 *     .atlas-plan-grid > .atlas-plan (+ --wing | --wide)
 *       .atlas-plan-head { .atlas-plan-title, .atlas-plan-meta }
 *       .atlas-plan-box (+ --surface | --white), .atlas-plan-row
 *       .atlas-plan-pair > .atlas-plan-cell
 *                  { .atlas-plan-cell-title, .atlas-plan-dashed >
 *                    .atlas-plan-dashed-sub, .atlas-plan-chips > .atlas-plan-chip }
 *       .atlas-plan-note > .atlas-plan-note-label
 *       .atlas-chips--wrap > .atlas-chip--sm
 *       .atlas-wing-text, .atlas-rooms > .atlas-room
 *                  { .atlas-room-name, .atlas-room-holds }
 *       .atlas-shelves > .atlas-shelf { .atlas-shelf-name, .atlas-shelf-rows >
 *                  .atlas-shelf-row > span > a.atlas-shelf-link, .atlas-shelf-value },
 *                  .atlas-shelf-summary
 *   Shared
 *     .atlas-cards--theory | --career | --further   card-grid widths per plate
 *     .atlas-box--column + .atlas-links--bottom     equal-height box with a
 *                                                   link row pinned to the floor
 *     .atlas-legend { .atlas-legend-swatch, .atlas-legend-marker }, .atlas-legend-dot
 *     .atlas-bar-link, .atlas-bar-more, .atlas-bar-value--muted
 *     .atlas-metrics-hero, .atlas-metrics-list, .atlas-metrics-source, .atlas-puck
 *     .atlas-cover-fallback   1:1 title tile for an article with no cover image
 *     .atlas-num (+ --sm)     mono tabular figure inside prose
 *     .atlas-links (+ --split | --bottom) { .atlas-links-strong, .atlas-links-mono }
 *     .atlas-fine--gap-b | --gap-t | --between | --right
 *     .atlas-fig--tight, .atlas-figcaption--tight, .atlas-anchor
 *
 * CAREER PAGE
 *   <section class="atlas-record">
 *     <h2 class="atlas-record-num">
 *       <span class="atlas-record-idx">01</span>
 *       <span class="atlas-record-name">How to read this</span>
 *     </h2>
 *     <div class="atlas-record-body">           (+ --wide for the 760px column)
 *       <article class="atlas-proof">
 *         <div class="atlas-proof-head">
 *           <div class="atlas-proof-org">
 *             <span class="atlas-proof-logo"><img></span>
 *             <h3 class="atlas-proof-name">Liquidity Services</h3>
 *           </div>
 *           <span class="atlas-proof-years">2024 - present</span>
 *         </div>
 *         <div class="atlas-proof-role">Senior Product Owner</div>
 *         <p class="atlas-proof-text">...</p>
 *         <ol class="atlas-proof-list">
 *           <li><span class="atlas-proof-marker">a</span><span>...</span></li>
 *         </ol>
 *       </article>
 *       <div class="atlas-record-rows">
 *         <div class="atlas-record-row">
 *           <span class="atlas-record-row-years">2024 - present</span>
 *           <span class="atlas-proof-logo"><img></span>
 *           <span class="atlas-record-row-text"><strong>Org</strong>, detail</span>
 *         </div>
 *       </div>
 *       <div class="atlas-work-cards">
 *         <div class="atlas-work-card"><strong>Title.</strong>Body copy.</div>
 *         <div class="atlas-work-card atlas-work-card--tint">...</div>
 *       </div>
 *     </div>
 *   </section>
 *   Page-scoped additions (section 14, folded from career.html's own <style>
 *   block, JON-1426): <main class="atlas-main--solo">, <div class="atlas-hero
 *   atlas-hero--wide">, .atlas-record-body > p.atlas-p--ink, .atlas-display
 *   (28px throughline), .atlas-num.atlas-num--prose, .atlas-tel,
 *   .atlas-logo-pair, and .atlas-links.atlas-links--record for the closing row.
 *
 * THEORY PAGE (section 15, JON-1437, public/theory.html)
 *   Reuses the plate, figure, box, card and link shapes above. New shapes:
 *   Hero
 *     .atlas-theory-hero > .atlas-theory-hero-col + .atlas-theory-editions
 *       p#definition.atlas-theory-definition   26px display definition
 *       .atlas-theory-editions-label, .atlas-theory-edition (+ --ink | --outline)
 *         { .atlas-theory-edition-row > .atlas-theory-edition-title +
 *           .atlas-theory-edition-meta, then .atlas-theory-edition-text }
 *       .atlas-theory-editions-note
 *   Fig. 1a and Fig. 1b
 *     .atlas-theory-fig-lead | -stack | -flush   the three figure margins
 *     .atlas-theory-explain > div > .atlas-theory-lead   bold lead-in columns
 *     .atlas-theory-rows   110px label column + svg
 *       .atlas-theory-row-label > .atlas-theory-row-sub
 *       svg.atlas-theory-row-svg (+ --h28 | --auto | --h22)
 *     .atlas-legend.atlas-theory-legend (+ --tight)
 *       .atlas-theory-swatch (+ --tick | --set | --ghost | --emitted | --written),
 *       svg.atlas-theory-legend-svg
 *     .atlas-theory-controls > .atlas-theory-control-group (+ --end)
 *       { .atlas-theory-control-label, button.atlas-theory-btn (+ --ghost |
 *         --reset), pressed state is [aria-pressed="true"];
 *         .atlas-theory-glyph holds the 8x10 pause/play svg }
 *     .atlas-theory-sim > svg#wmf-sim   drawn entirely by the inline script
 *   Fig. 2 (layer x kind of evidence)
 *     .atlas-theory-matrix-scroll > .atlas-theory-matrix   7-column grid
 *       .atlas-theory-tier-head, .atlas-theory-says-head,
 *       .atlas-theory-layer { a.atlas-theory-layer-name, .atlas-theory-layer-sub },
 *       .atlas-theory-cell > .atlas-theory-mark (+ --core | --on | --off),
 *       .atlas-theory-says
 *     .atlas-theory-tier-legend > span > .atlas-theory-tier-tag
 *   Plates II to V
 *     .atlas-theory-pillars > .atlas-theory-pillar
 *       { .atlas-theory-pillar-head > .atlas-theory-pillar-num +
 *         .atlas-theory-badge > .atlas-theory-sure, then
 *         .atlas-theory-pillar-name, .atlas-theory-pillar-says }
 *     .atlas-theory-pair > .atlas-theory-pair-col + figure
 *       .atlas-theory-items > .atlas-theory-item
 *         { .atlas-theory-item-head > .atlas-theory-item-name +
 *           .atlas-theory-item-src, then .atlas-theory-item-says }
 *       .atlas-theory-dials > .atlas-theory-dial
 *         { .atlas-theory-dial-name, .atlas-theory-dial-controls,
 *           .atlas-theory-dial-mod, svg.atlas-theory-slider }
 *     .atlas-cards--pair.atlas-theory-arc   Plate IV's two boxes
 *     p.atlas-theory-note (+ --sm)
 *     .atlas-theory-triptych > .atlas-theory-limit (+ --strong)
 *       { .atlas-box-label, .atlas-theory-limit-items > div,
 *         .atlas-theory-corrections > .atlas-theory-correction >
 *           .atlas-theory-correction-kind + .atlas-theory-correction-text,
 *         .atlas-theory-refline }
 *
 * WRITING INDEX (JON-1455, section 16; generated from
 * templates/writing_index.html, not hand-authored)
 *   .atlas-writing-hero > .atlas-writing-hero-col + .atlas-writing-hero-aside
 *     .atlas-writing-stats > .atlas-writing-stat
 *       { .atlas-writing-stat-value, .atlas-writing-stat-label }
 *     a.atlas-btn.atlas-writing-download, .atlas-writing-actions,
 *     p.atlas-fine.atlas-writing-fine
 *   figure.atlas-fig.atlas-writing-fig
 *     .atlas-writing-paths > a.atlas-writing-path-card
 *       { .atlas-writing-path-card-head > -num + -meta, -name, -desc,
 *         .atlas-writing-path-threads > .atlas-writing-path-thread > span +
 *           .atlas-writing-path-thread-n }
 *     .atlas-writing-cadence (owns --atlas-notes-bar)
 *       .atlas-fig-label.atlas-writing-cadence-head >
 *         .atlas-legend.atlas-writing-legend > .atlas-legend-swatch
 *           (+ .atlas-writing-swatch--essays | --notes)
 *       .atlas-writing-chart-scroll > svg.atlas-writing-chart
 *         { .atlas-writing-chart-axis, .atlas-writing-bar--essays | --notes,
 *           .atlas-writing-bar-label }
 *   .atlas-writing-doors > a.atlas-writing-door
 *     { .atlas-writing-door-cover > img | .atlas-writing-door-fallback,
 *       .atlas-writing-door-body > -kicker, -title, -why }
 *   .atlas-writing-threads > .atlas-writing-thread
 *     .atlas-writing-thread-head > .atlas-writing-thread-name + -meta
 *     .atlas-writing-entries > a.atlas-writing-entry
 *       { .atlas-writing-entry-cover > img | .atlas-writing-entry-fallback,
 *         .atlas-writing-entry-body > -title, -excerpt, -flag (paywalled),
 *         .atlas-writing-entry-meta }
 *   .atlas-chips.atlas-writing-chips > .atlas-chip.atlas-chip--inline
 *   .atlas-writing-notes > .atlas-writing-note
 *     { .atlas-writing-note-head, p.atlas-writing-note-text }
 *
 * CONTACT DOSSIER (JON-1473, section 17; public/contacts/contact.html, most of
 * it built at runtime by public/js/contacts/dossier.js)
 *   main.atlas-dossier > nav.atlas-dossier-crumbs > a.atlas-link--back +
 *     .atlas-dossier-crumb-here
 *   header.atlas-dossier-identity
 *     .atlas-dossier-identity-who > .atlas-dossier-badges, .atlas-dossier-name,
 *       .atlas-dossier-org, .atlas-dossier-sub
 *     .atlas-dossier-move > .atlas-dossier-state, .atlas-dossier-ball-row >
 *       pill | .atlas-dossier-ball-na, .atlas-dossier-hint; .atlas-dossier-last
 *   .atlas-dossier-pill  one base, colour modifiers --ok | --todo | --neutral |
 *     --ghost | --ink | --inkline | --warmline | --blueline | --blue, size
 *     modifiers --badge | --loop | --chip | --mini | --head | --ball
 *   .atlas-dossier-grid > .atlas-dossier-main + .atlas-dossier-rail
 *     section.atlas-dossier-section > .atlas-dossier-head
 *       { .atlas-dossier-num, .atlas-dossier-title, .atlas-dossier-meta }
 *       then a body div; .atlas-dossier-skeleton until the fetch lands.
 *       Numbers (01..) and rail letters (a..) are written at render time by
 *       ContactDossier.renumberSections(), never authored in the markup.
 *     Loops: ol.atlas-dossier-loops > li.atlas-dossier-loop
 *       { -loop-n, -loop-body > -loop-head > pill + -loop-title + -loop-age,
 *         -loop-why, -loop-src }, details.atlas-dossier-tasks > summary >
 *       span + .atlas-dossier-tasks-toggle, then .atlas-dossier-task
 *       { -task-t, -task-pri, -task-status }
 *     Calls: .atlas-dossier-calls > article.atlas-dossier-call
 *       { -call-row > -call-date + -call-title + -call-meta, -call-one,
 *         -chips > pills }
 *     Substack: -pub, blockquote.-thesis > -thesis-src, -posts > -post
 *       { -post-date, -post-t, -post-paid }, -stats > span > -stat-n and
 *       -stats-link, -engage > -engage-col
 *       { -engage-h, -engage-row > -engage-n + -engage-t, -quote }
 *     Who: .atlas-dossier-facts > .atlas-dossier-fact > .atlas-dossier-fact-k
 *     Rail: ol.atlas-dossier-rules > li.atlas-dossier-rule (roman numeral from
 *       a CSS counter), .atlas-dossier-prov, .atlas-dossier-add;
 *       .atlas-dossier-chan { -chan-h, -chan-c, -chan-t, -chan-by (+ --them |
 *       --you | --dash) }, -chan-note; .atlas-dossier-tl > .atlas-dossier-ev >
 *       .atlas-dossier-ev-dot + -ev-d + -ev-t, .atlas-dossier-gap,
 *       .atlas-dossier-legend > -legend-item > -legend-dot, -tl-note;
 *       .atlas-dossier-foot > -foot-tile > -foot-n + -foot-l
 *     Dot colours are one shared family: .atlas-dossier-dot--call | --dm |
 *       --mail | --sms | --other, worn by both -ev-dot and -legend-dot.
 *     Shared: .atlas-dossier-empty > .atlas-dossier-empty-note,
 *       .atlas-dossier-fine, .atlas-dossier-tab-count
 *   The page also keeps its legacy .contact-* classes (tabs, personal-notes
 *   editor, relationship dynamics, contact-details card, AI context summary,
 *   Messages and Notes panels); section 17 repaints them under this scope
 *   only. .atlas-dossier-notes-box, .atlas-dossier-dyn and
 *   .atlas-dossier-details are the three hooks the markup adds for that.
 *
 * NOTES
 * - No italics and no em-dashes anywhere in authored copy (README rule). The
 *   one exception is /writing/, which renders article descriptions verbatim;
 *   see .claude/rules/frontend-js.md. public/js/contacts/dossier.js keeps the
 *   two glyphs the dossier design draws (the timeline gap rows and the
 *   engagement quote attribution) and nothing else.
 * - Section 17 must stay LAST in this file, and section 16 second to last:
 *   each page's responsive block wins over its own base rules by source order,
 *   because this file interleaves media blocks with later base sections
 *   (JON-1447 hit that; JON-1460 tracks a real fix).
 * - Numbers render in JetBrains Mono with tabular figures.
 * - The status pulse and the ring transition are disabled under
 *   prefers-reduced-motion.
 */

/* ==========================================================================
   1. Tokens
   Names that exist in styles.css are REDEFINED here so shared components
   (nav, footer, dropdowns) pick up the paper palette for free. Atlas-only
   values carry an --atlas- prefix.
   The --space-* scale is deliberately NOT remapped: the atlas sizes are
   absolute px per component, so there is no counterpart to map onto.
   ========================================================================== */

body.atlas {
  color-scheme: light;

  /* Backgrounds */
  --bg: #eceef1;
  --bg-elevated: #f7f8f9;
  --bg-gradient: #eceef1;
  --bg-card: #ffffff;
  --bg-hover: #ffffff;
  --bg-alt: #f7f8f9;
  --bg-subtle: #f7f8f9;
  --bg-primary: #eceef1;
  --bg-secondary: #f7f8f9;

  /* Surfaces */
  --surface: #ffffff;
  --surface-hover: #f7f8f9;
  --surface-raised: #ffffff;
  --surface-subtle: #f7f8f9;

  /* Text */
  --text: #16191c;
  --text-secondary: #4b5259;
  /* The design's muted grey is #7c848c. Lighthouse (2026-09-05, JON-1427) measured it at
     3.26:1 on the page ground and 3.56:1 on the plate surface for 9.5 to 12px labels,
     below the 4.5:1 AA floor. #636b73 is the lightest neighbour that clears it everywhere
     the token is used: 4.65 on #eceef1, 5.09 on #f7f8f9, 5.41 on #fff, 4.63 on #e8eef5. */
  --text-muted: #636b73;
  --text-primary: #16191c;

  /* Accent */
  --accent: #4a6a92;
  --accent-rgb: 74, 106, 146;
  --accent-hover: #16191c;
  --accent-muted: #e8eef5;
  --accent-subtle: #e8eef5;
  --accent-dim: rgba(74, 106, 146, 0.5);

  /* Borders */
  --border: #cfd4d9;
  --border-hover: #4a6a92;
  --border-subtle: #e1e5e9;

  /* Code + status */
  --code-bg: #f7f8f9;
  --success: #2f9e5b;
  --warning: #a8760b;
  --danger: #b3352d;

  /* Radii: the atlas is flat. 2px on buttons and chips, 0 on plates. */
  --radius-xs: 2px;
  --radius-sm: 2px;
  --radius-md: 2px;
  --radius-lg: 2px;

  /* Type */
  --font-sans: 'Source Sans 3', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Monaco, monospace;
  --font-body: var(--font-sans);
  --atlas-font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;

  /* Atlas-only palette */
  --atlas-page: #eceef1;
  --atlas-plate-surface: #f7f8f9;
  --atlas-tile-surface: #ffffff;
  --atlas-ink: #16191c;
  --atlas-nav-link: #5c646c;
  --atlas-rule: #cfd4d9;
  --atlas-tile-border: #d5dade;
  --atlas-hairline: #e1e5e9;
  --atlas-accent-tint: #e8eef5;
  --atlas-status: #2f9e5b;
  --atlas-ring: var(--whoop-recovery-high, #16EC06);
  --atlas-ring-track: #dfe3e7;
  --atlas-footer-rule: var(--atlas-ink);

  /* Atlas-only metrics */
  --atlas-max-width: 1080px;
  --atlas-gutter: 40px;
  --atlas-plate-gap: 64px;
  --atlas-rail-gap: 48px;
  --atlas-gap-tile: 8px;
  --atlas-gap-chip: 6px;
  /* The updated Claude Design (2026-09-05) settles this: the writing covers are
     repeat(auto-fill, minmax(200px, 1fr)) with a 20px/16px gap, which lands
     three across the 832px main column and four once it widens past 880px.
     Supersedes the README's 150px and the 240px read off the earlier screenshot. */
  --atlas-cover-min: 200px; /* three across the 832px column, per the updated design */
  --atlas-radius: 2px;
  --atlas-nav-height: 64px;
}

/* ==========================================================================
   2. Base
   ========================================================================== */

body.atlas {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  padding: 0 var(--atlas-gutter) var(--atlas-plate-gap);
  -webkit-font-smoothing: antialiased;
}

/* styles.css paints a fixed blue/purple/teal gradient mesh behind every page
   (body::before, "Background Gradient Mesh"). It is invisible on the dark
   theme and reads as coloured washes on paper. The atlas ground is flat. */
body.atlas::before {
  display: none;
}

/* :where() keeps these at the specificity of `body.atlas` alone, so every
   component rule below (which carries its own class) wins over them. */
body.atlas :where(a) {
  color: var(--accent);
  text-decoration: none;
}

body.atlas :where(a:hover) {
  color: var(--text);
  text-decoration: none;
}

body.atlas :where(strong, b) {
  font-weight: 600;
}

/* The design uses no italics anywhere. */
body.atlas :where(em, i, cite, dfn) {
  font-style: normal;
}

body.atlas :where(h1, h2, h3, h4) {
  font-weight: 400;
}

/* ==========================================================================
   3. Shared chrome: nav (public/components/nav.html)
   Markup is fixed; only colors, type and geometry change here.
   ========================================================================== */

body.atlas .site-nav,
body.atlas .site-nav--centered {
  max-width: var(--atlas-max-width);
  margin: 0 auto;
  height: var(--atlas-nav-height);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 28px;
  border-bottom: 1px solid var(--atlas-ink);
  font-family: var(--font-sans);
  font-size: 14px;
}

/* Brand: shown on desktop too, pushed hard left. */
body.atlas .nav-mobile-brand {
  display: block;
  margin-right: auto;
  font-family: var(--atlas-font-display);
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--atlas-ink);
}

body.atlas .nav-mobile-brand:hover {
  color: var(--accent);
}

/* The bullet separators are noise in the atlas rhythm. */
body.atlas .nav-sep {
  display: none;
}

body.atlas .nav-link,
body.atlas .nav-dropdown-trigger {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--atlas-nav-link);
  padding: 0 0 3px;
}

body.atlas .nav-link:hover,
body.atlas .nav-dropdown-trigger:hover {
  color: var(--atlas-ink);
}

body.atlas .nav-link--active {
  color: var(--atlas-ink);
}

/* Reuse the existing sliding underline, recolored to ink. */
body.atlas .nav-link::after {
  background: var(--atlas-ink);
}

/* styles.css hides the dropdown trigger's ::after on desktop, which also
   hides the caret. Restore it as a caret (the underline is not wanted here). */
body.atlas .nav-dropdown-trigger.nav-link::after,
body.atlas .nav-dropdown-trigger.nav-link:hover::after {
  display: inline-block;
  position: static;
  width: 0;
  height: 0;
  background: none;
  border: 3px solid transparent;
  border-top-color: currentColor;
  border-radius: 0;
  margin: 3px 0 0 6px;
  transition: none;
}

body.atlas .nav-dropdown-menu {
  background: var(--atlas-tile-surface);
  border: 1px solid var(--atlas-rule);
  border-radius: var(--atlas-radius);
  box-shadow: none;
  padding: 4px 0;
}

body.atlas .nav-dropdown-item {
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-secondary);
  border-radius: 0;
}

body.atlas .nav-dropdown-item:hover {
  background: var(--atlas-accent-tint);
  color: var(--atlas-ink);
}

body.atlas .nav-dropdown-item--active {
  color: var(--accent);
}

body.atlas .nav-dropdown-item--danger:hover {
  background: var(--atlas-accent-tint);
  color: var(--danger);
}

body.atlas .nav-dropdown-divider {
  background: var(--atlas-rule);
}

body.atlas .nav-dropdown-icon {
  opacity: 0.55;
}

/* Auth cluster sits with the links, not pushed to its own edge: the brand
   already claims the left with margin-right:auto. */
body.atlas .nav-auth {
  margin-left: 0;
  gap: 18px;
}

body.atlas .nav-btn--login {
  background: transparent;
  border: 1px solid var(--atlas-ink);
  color: var(--atlas-ink);
  padding: 7px 14px;
  border-radius: var(--atlas-radius);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.atlas .nav-btn--login:hover {
  background: var(--atlas-ink);
  border-color: var(--atlas-ink);
  color: var(--atlas-page);
}

body.atlas .nav-user-trigger {
  border: 1px solid var(--atlas-rule);
  border-radius: var(--atlas-radius);
  background: transparent;
}

body.atlas .nav-user-trigger:hover {
  border-color: var(--accent);
  background: var(--atlas-tile-surface);
}

body.atlas .nav-user-name {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

body.atlas .nav-user-caret {
  border-top-color: var(--text-muted);
}

body.atlas .nav-hamburger {
  border: 1px solid var(--atlas-ink);
  border-radius: var(--atlas-radius);
}

body.atlas .nav-hamburger-bar {
  background: var(--atlas-ink);
}

body.atlas .nav-backdrop {
  background: rgba(22, 25, 28, 0.35);
}

/* ==========================================================================
   4. Shared chrome: footer (public/components/footer.html)
   Source order is links, copyright, version; the design wants copyright
   left and links right, so the row is reordered with flex `order`.
   ========================================================================== */

body.atlas .footer,
body.atlas .footer.footer--bordered {
  max-width: var(--atlas-max-width);
  margin: 72px auto 0;
  padding-top: 14px;
  border-top: 1px solid var(--atlas-footer-rule);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 20px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.7;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .footer .copyright {
  order: 1;
  font-size: inherit;
  color: inherit;
}

body.atlas .footer .site-version-line {
  order: 2;
  margin: 0;
  font-family: inherit;
  font-size: 10px;
  /* Full token colour at full opacity: styles.css fades this line to 0.6 and the first
     atlas pass overrode that with 0.75, which blends the muted grey back to #858c93
     (2.92:1) at 10px. Lighthouse on the JON-1427 preview flagged it as the last AA
     residue; the explicit 1 is what beats the styles.css fade. */
  color: var(--text-muted);
  opacity: 1;
}

body.atlas .footer .footer-links {
  order: 3;
  margin: 0 0 0 auto;
  gap: 20px;
  justify-content: flex-end;
}

body.atlas .footer .footer-links a {
  font-size: inherit;
  letter-spacing: inherit;
  color: var(--text-muted);
}

body.atlas .footer .footer-links a:hover {
  color: var(--atlas-ink);
}

/* ==========================================================================
   5. Page layout
   ========================================================================== */

body.atlas .atlas-wrap {
  max-width: var(--atlas-max-width);
  margin: 0 auto;
}

body.atlas .atlas-masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  padding-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .atlas-masthead-left,
body.atlas .atlas-masthead-right {
  display: block;
}

body.atlas .atlas-grid {
  display: grid;
  grid-template-columns: minmax(176px, 200px) minmax(0, 1fr);
  gap: var(--atlas-rail-gap);
  align-items: start;
  margin-top: 36px;
}

body.atlas .atlas-grid > main,
body.atlas .atlas-grid > .atlas-main {
  min-width: 0;
}

/* ==========================================================================
   6. Rail
   ========================================================================== */

body.atlas .atlas-rail {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-right: 24px;
  border-right: 1px solid var(--atlas-rule);
  min-width: 0;
}

body.atlas .atlas-rail-section {
  min-width: 0;
}

body.atlas .atlas-rail-label {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

body.atlas .atlas-contents {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 14px;
  line-height: 1.3;
}

body.atlas .atlas-contents a {
  display: flex;
  gap: 10px;
  color: var(--atlas-ink);
}

body.atlas .atlas-contents a:hover {
  color: var(--accent);
}

body.atlas .atlas-contents-num {
  flex: none;
  width: 22px;
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  color: var(--text-muted);
}

body.atlas .atlas-rail-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

body.atlas .atlas-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--atlas-radius);
  background: transparent;
  color: var(--atlas-ink);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

body.atlas .atlas-btn svg {
  flex: none;
}

body.atlas .atlas-btn--primary {
  background: var(--atlas-ink);
  border-color: var(--atlas-ink);
  color: var(--atlas-page);
}

body.atlas .atlas-btn--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

body.atlas .atlas-btn--outline {
  background: transparent;
  border-color: var(--atlas-ink);
  color: var(--atlas-ink);
}

body.atlas .atlas-btn--outline:hover {
  background: var(--atlas-tile-surface);
  color: var(--atlas-ink);
}

body.atlas .atlas-btn--accent {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

body.atlas .atlas-btn--accent:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

/* Fine print and status -------------------------------------------------- */

body.atlas .atlas-fine {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
}

body.atlas .atlas-status {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

body.atlas .atlas-status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--atlas-status);
  margin-right: 7px;
  vertical-align: 1px;
  animation: atlas-pulse 2s infinite;
}

@keyframes atlas-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ==========================================================================
   7. Plates
   ========================================================================== */

body.atlas .atlas-plate {
  scroll-margin-top: 24px;
  border-top: 1px solid var(--atlas-ink);
  padding-top: 10px;
  min-width: 0;
}

body.atlas .atlas-plate + .atlas-plate {
  margin-top: var(--atlas-plate-gap);
}

body.atlas .atlas-plate-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
}

body.atlas .atlas-plate-num,
body.atlas .atlas-plate-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.atlas .atlas-plate-num {
  color: var(--accent);
}

body.atlas .atlas-plate-title {
  color: var(--text-muted);
}

/* Headings --------------------------------------------------------------- */

body.atlas .atlas-h1 {
  font-family: var(--atlas-font-display);
  font-weight: 400;
  /* 48px from 534px up; scales down to 34px at phone widths (design). */
  font-size: clamp(34px, 9vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--atlas-ink);
  text-wrap: pretty;
}

body.atlas .atlas-h2 {
  font-family: var(--atlas-font-display);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--atlas-ink);
  margin-top: 18px;
  text-wrap: pretty;
}

body.atlas .atlas-lede {
  font-size: 17px;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 600px;
  margin-top: 16px;
  text-wrap: pretty;
}

body.atlas .atlas-lede--lg {
  font-size: 18px;
  max-width: 640px;
}

/* Hero and portrait ------------------------------------------------------ */

body.atlas .atlas-hero {
  position: relative;
  margin-top: 22px;
  min-height: 280px;
}

body.atlas .atlas-hero > *:not(.atlas-portrait) {
  position: relative;
  max-width: 640px;
}

body.atlas .atlas-portrait {
  position: absolute;
  right: -24px;
  top: -56px;
  width: 380px;
  height: 380px;
  object-fit: cover;
  object-position: center top;
  opacity: 0.16;
  filter: grayscale(1) contrast(1.05);
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 55% 45%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 60% 60% at 55% 45%, #000 30%, transparent 100%);
}

body.atlas .atlas-portrait--career {
  width: 360px;
  height: 360px;
  top: -72px;
  opacity: 0.14;
}

/* Figures ---------------------------------------------------------------- */

body.atlas .atlas-fig {
  background: var(--atlas-plate-surface);
  border: 1px solid var(--atlas-rule);
  border-radius: 0;
  padding: 24px 24px 20px;
  margin-top: 28px;
}

body.atlas .atlas-fig-label {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .atlas-fig-label--ruled {
  border-bottom: 1px solid var(--atlas-rule);
  padding-bottom: 6px;
}

body.atlas .atlas-figcaption {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-top: 16px;
}

body.atlas .atlas-fig-num {
  font-family: var(--atlas-font-display);
  font-size: 15px;
  color: var(--atlas-ink);
}

/* Links inside running text (captions, box text, the career proof paragraphs) get an
   underline. The design tells them apart by colour alone, which Lighthouse measured at
   1.34 to 1.46:1 against the surrounding text (JON-1427, 2026-09-05; the axe rule is
   link-in-text-block, floor 3:1 or a non-colour cue). Standalone .atlas-links rows and
   the rail buttons keep the design's plain style. */
body.atlas .atlas-figcaption a,
body.atlas .atlas-box-text a,
body.atlas .atlas-proof-text a,
body.atlas .atlas-p--ink a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

/* Plate II three-up: fixed image column plus two text columns. */
body.atlas .atlas-fig-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  margin-top: 22px;
}

body.atlas .atlas-fig-col {
  flex: 1 1 230px;
  min-width: 0;
}

body.atlas .atlas-fig-img {
  flex: none;
  width: 200px;
  height: 240px;
  object-fit: contain;
  border: 1px solid var(--atlas-rule);
  background: var(--atlas-plate-surface);
}

/* ==========================================================================
   8. Figure content
   ========================================================================== */

/* Chips ------------------------------------------------------------------ */

body.atlas .atlas-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: var(--atlas-gap-chip);
  margin-top: 10px;
}

body.atlas .atlas-chip {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  padding: 6px 9px;
  background: var(--atlas-tile-surface);
  border: 1px solid var(--atlas-tile-border);
  border-radius: var(--atlas-radius);
  color: var(--atlas-ink);
}

body.atlas .atlas-chip-name {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--atlas-ink);
}

body.atlas .atlas-chip-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.3;
  color: var(--text-muted);
}

/* Connector -------------------------------------------------------------- */

body.atlas .atlas-connector {
  width: 1px;
  height: 18px;
  background: var(--atlas-ink);
  margin: 10px auto;
}

/* Boxes ------------------------------------------------------------------ */

body.atlas .atlas-box {
  background: var(--atlas-tile-surface);
  border: 1px solid var(--atlas-tile-border);
  border-radius: var(--atlas-radius);
  padding: 12px 14px;
  min-width: 0;
}

body.atlas .atlas-box--accent {
  border: 1.5px solid var(--accent);
}

body.atlas .atlas-box--dashed {
  border: 1px dashed var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  padding: 10px 14px;
}

body.atlas .atlas-box--tint {
  background: var(--atlas-accent-tint);
}

body.atlas .atlas-box--surface {
  background: var(--atlas-plate-surface);
}

body.atlas .atlas-box-label {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

body.atlas .atlas-box--accent .atlas-box-label {
  color: var(--accent);
}

body.atlas .atlas-box-display {
  font-family: var(--atlas-font-display);
  font-size: 22px;
  line-height: 1.2;
  color: var(--atlas-ink);
  margin-top: 8px;
}

body.atlas .atlas-box-lead {
  font-size: 15px;
  line-height: 1.45;
  color: var(--atlas-ink);
  margin-top: 6px;
}

body.atlas .atlas-box-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* Tiles ------------------------------------------------------------------ */

body.atlas .atlas-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: var(--atlas-gap-chip);
  margin-top: 10px;
}

body.atlas .atlas-tile {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  padding: 8px 10px;
  background: var(--atlas-tile-surface);
  border: 1px solid var(--atlas-tile-border);
  border-radius: var(--atlas-radius);
  color: var(--atlas-ink);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

body.atlas .atlas-tile--public {
  background: var(--atlas-accent-tint);
  border-color: var(--accent);
}

body.atlas a.atlas-tile:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

body.atlas .atlas-tile-name {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
}

body.atlas .atlas-tile-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.3;
  color: var(--text-muted);
}

body.atlas .atlas-tile--public .atlas-tile-meta {
  color: inherit;
  opacity: 0.75;
}

/* Definition rows -------------------------------------------------------- */

body.atlas .atlas-kv {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  font-size: 14px;
  line-height: 1.35;
  margin-top: 14px;
}

body.atlas .atlas-kv dt {
  color: var(--text-secondary);
}

body.atlas .atlas-kv dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--atlas-ink);
}

/* Numbered boxes --------------------------------------------------------- */

body.atlas .atlas-numbered {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: var(--atlas-gap-tile);
  margin-top: 22px;
}

body.atlas .atlas-numbered-item {
  background: var(--atlas-tile-surface);
  border: 1px solid var(--atlas-tile-border);
  padding: 10px 12px;
  min-width: 0;
}

body.atlas .atlas-numbered-item--active {
  background: var(--atlas-accent-tint);
  border: 1.5px solid var(--accent);
}

body.atlas .atlas-numbered-idx {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

body.atlas .atlas-numbered-item--active .atlas-numbered-idx,
body.atlas .atlas-numbered-item--active .atlas-numbered-val {
  color: var(--accent);
}

body.atlas .atlas-numbered-val {
  display: block;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  color: var(--atlas-ink);
  margin-top: 2px;
}

body.atlas .atlas-numbered-label {
  display: block;
  font-size: 12px;
  line-height: 1.3;
  color: var(--text-muted);
}

body.atlas .atlas-numbered-item--active .atlas-numbered-label {
  color: var(--text-secondary);
}

/* Percentile bars -------------------------------------------------------- */

body.atlas .atlas-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 14px;
  margin-top: 18px;
}

/* One score per row: name, band, value (design: 150px 1fr 64px). The toggle
   is a row too, so it lines up with the scores above it. */
body.atlas .atlas-bar-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 64px;
  column-gap: 16px;
  align-items: center;
}

/* JON-1448: fourteen scores sit behind the toggle until it opens. */
body.atlas .atlas-bars--collapsed .atlas-bar-row--more {
  display: none;
}

body.atlas .atlas-bar-name {
  color: var(--atlas-ink);
  min-width: 0;
  line-height: 1.25;
}

body.atlas .atlas-bar,
body.atlas .atlas-bar > svg {
  display: block;
  width: 100%;
  height: 8px;
  overflow: visible;
}

body.atlas .atlas-bar-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--atlas-ink);
}

/* Link cards ------------------------------------------------------------- */

body.atlas .atlas-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--atlas-gap-tile);
  margin-top: 18px;
}

/* Fixed two-up pairs (Memory palace + Enrichment, Clinical flags + QA,
   Throughline + Looking for). Collapses to one column below 820px. */
body.atlas .atlas-cards--pair {
  grid-template-columns: 1fr 1fr;
}

body.atlas .atlas-card {
  display: block;
  border: 1px solid var(--atlas-rule);
  background: var(--atlas-plate-surface);
  padding: 18px 18px 16px;
  color: var(--atlas-ink);
  min-width: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

body.atlas .atlas-card:hover {
  border-color: var(--accent);
  background: var(--atlas-tile-surface);
  color: var(--atlas-ink);
}

body.atlas .atlas-card-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .atlas-card-title {
  display: block;
  font-family: var(--atlas-font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.1;
  color: var(--atlas-ink);
  margin-top: 8px;
}

body.atlas .atlas-card-text {
  display: block;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-top: 8px;
}

body.atlas .atlas-card-link {
  display: block;
  font-size: 13px;
  color: var(--accent);
  margin-top: 12px;
}

/* Organisation tiles ----------------------------------------------------- */

body.atlas .atlas-org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--atlas-gap-tile);
  margin-top: 12px;
}

body.atlas .atlas-org {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 10px 10px 9px;
  background: var(--atlas-tile-surface);
  border: 1px solid var(--atlas-tile-border);
  color: var(--atlas-ink);
  transition: border-color 0.15s ease;
}

body.atlas a.atlas-org:hover {
  border-color: var(--accent);
  color: var(--atlas-ink);
}

body.atlas .atlas-org-logo {
  display: block;
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid var(--atlas-hairline);
  background: var(--atlas-tile-surface);
  overflow: hidden;
}

body.atlas .atlas-org-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

body.atlas .atlas-org-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--atlas-ink);
}

body.atlas .atlas-org-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* Biometrics strip ------------------------------------------------------- */

body.atlas .atlas-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
  margin-top: 18px;
  padding: 20px 24px;
  border: 1px solid var(--atlas-rule);
  background: var(--atlas-plate-surface);
}

body.atlas .atlas-ring {
  display: block;
  flex: none;
  width: 72px;
  height: 72px;
}

body.atlas .atlas-ring-track {
  fill: none;
  stroke: var(--atlas-ring-track);
  stroke-width: 6;
}

body.atlas .atlas-ring-value {
  fill: none;
  stroke: var(--atlas-ring);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease;
}

body.atlas .atlas-metric {
  min-width: 56px;
}

body.atlas .atlas-metric-val {
  display: block;
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: var(--atlas-ink);
}

body.atlas .atlas-metric-val--lg {
  font-size: 28px;
  line-height: 1;
}

body.atlas .atlas-metric-label {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

body.atlas .atlas-metric-label--mono {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  margin-top: 4px;
}

/* Writing covers --------------------------------------------------------- */

body.atlas .atlas-covers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--atlas-cover-min), 1fr));
  gap: 20px 16px;
  margin-top: 18px;
}

body.atlas .atlas-cover {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  color: var(--atlas-ink);
}

body.atlas .atlas-cover:hover {
  color: var(--accent);
}

body.atlas .atlas-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--atlas-rule);
  background: var(--atlas-plate-surface);
}

body.atlas .atlas-cover-title {
  font-family: var(--atlas-font-display);
  font-size: 17px;
  line-height: 1.2;
  text-wrap: pretty;
}

body.atlas .atlas-cover-date {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Holdings index --------------------------------------------------------- */

body.atlas .atlas-index {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 40px;
  margin-top: 18px;
}

body.atlas .atlas-index-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--atlas-tile-border);
  font-size: 14px;
}

body.atlas .atlas-index-label {
  color: var(--atlas-ink);
}

body.atlas .atlas-index-leader {
  flex: 1;
  border-bottom: 1px dotted var(--atlas-rule);
  transform: translateY(-4px);
}

body.atlas .atlas-index-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--atlas-ink);
  white-space: nowrap;
}

/* Inline links ----------------------------------------------------------- */

body.atlas .atlas-link {
  color: var(--accent);
}

body.atlas .atlas-link:hover {
  color: var(--atlas-ink);
}

body.atlas .atlas-link--back {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .atlas-link--back:hover {
  color: var(--accent);
}

/* ==========================================================================
   9. Career record page
   ========================================================================== */

body.atlas .atlas-record {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
  gap: 24px 40px;
  border-top: 1px solid var(--atlas-ink);
  padding-top: 14px;
}

body.atlas .atlas-record + .atlas-record {
  margin-top: 56px;
}

body.atlas .atlas-record-num {
  display: block;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

body.atlas .atlas-record-idx {
  display: block;
}

body.atlas .atlas-record-name {
  display: block;
  color: var(--text-muted);
}

body.atlas .atlas-record-body {
  max-width: 680px;
  min-width: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--atlas-ink);
}

body.atlas .atlas-record-body--wide {
  max-width: 760px;
}

body.atlas .atlas-record-body > * + * {
  margin-top: 14px;
}

/* Selected proof --------------------------------------------------------- */

body.atlas .atlas-proof + .atlas-proof {
  margin-top: 32px;
}

body.atlas .atlas-proof-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  border-bottom: 1px solid var(--atlas-rule);
  padding-bottom: 8px;
}

body.atlas .atlas-proof-org {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

body.atlas .atlas-proof-logo {
  display: block;
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid var(--atlas-hairline);
  background: var(--atlas-tile-surface);
  overflow: hidden;
}

body.atlas .atlas-proof-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
}

body.atlas .atlas-proof-name {
  font-family: var(--atlas-font-display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.1;
  color: var(--atlas-ink);
  margin: 0;
}

body.atlas .atlas-proof-years {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

body.atlas .atlas-proof-role {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 10px;
}

body.atlas .atlas-proof-text {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-top: 8px;
}

body.atlas .atlas-proof-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--atlas-ink);
  margin-top: 12px;
  padding-left: 0;
}

body.atlas .atlas-proof-list li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
}

body.atlas .atlas-proof-marker {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-muted);
  padding-top: 4px;
}

/* The full record -------------------------------------------------------- */

body.atlas .atlas-record-rows {
  display: flex;
  flex-direction: column;
}

body.atlas .atlas-record-row {
  display: grid;
  grid-template-columns: 110px 32px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--atlas-tile-border);
}

body.atlas .atlas-record-rows > * + * {
  margin-top: 0;
}

body.atlas .atlas-record-row-years {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
}

body.atlas .atlas-record-row-text {
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--text-secondary);
  min-width: 0;
}

body.atlas .atlas-record-row-text strong {
  font-weight: 600;
  color: var(--atlas-ink);
}

/* How I work ------------------------------------------------------------- */

body.atlas .atlas-work-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--atlas-gap-tile);
}

body.atlas .atlas-work-card {
  border: 1px solid var(--atlas-tile-border);
  background: var(--atlas-plate-surface);
  border-radius: var(--atlas-radius);
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  min-width: 0;
  margin-top: 0;
}

body.atlas .atlas-work-card strong {
  display: block;
  font-weight: 600;
  color: var(--atlas-ink);
  margin-bottom: 4px;
}

body.atlas .atlas-work-card--tint {
  border: 1.5px solid var(--accent);
  background: var(--atlas-accent-tint);
}

/* ==========================================================================
   10. Responsive: below 820px the rail dissolves into one ordered column.

   The 2026-09-06 design (Homepage - Mobile Preview.dc.html) reflows the
   homepage at 820px: the rail and main lose their boxes (display: contents)
   so their children become items of one flex column, ordered hero, Talk to
   it, Contents, the plates, status. The same breakpoint serves every atlas
   page so the type ramp and the card grids move together.
   auto-fill / auto-fit grids collapse on their own and are left alone.
   ========================================================================== */

@media (max-width: 820px) {
  body.atlas {
    padding: 0 20px 48px;
  }

  body.atlas .atlas-masthead {
    gap: 2px 12px;
  }

  /* One column; the rail and main dissolve so their children can be ordered
     against each other (design: frame, rail, main). */
  body.atlas .atlas-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 40px;
    margin-top: 28px;
  }

  body.atlas .atlas-rail,
  body.atlas .atlas-grid > main,
  body.atlas .atlas-grid > .atlas-main {
    display: contents;
  }

  /* The hero has no order and leads; then Talk to it, Contents, the plates,
     and the status line closes the column. */
  body.atlas .atlas-rail-section--talk {
    order: 1;
    border-top: 1px solid var(--atlas-ink);
    padding-top: 12px;
  }

  body.atlas .atlas-rail-section--contents {
    order: 2;
  }

  body.atlas .atlas-grid > main > .atlas-plate {
    order: 3;
  }

  body.atlas .atlas-status {
    order: 4;
  }

  /* The three text buttons go two-up, the last one full width (design: textbtns). */
  body.atlas .atlas-rail-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  body.atlas .atlas-rail-actions > :last-child {
    grid-column: 1 / -1;
  }

  body.atlas .atlas-contents {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 18px;
  }

  body.atlas .atlas-contents-num {
    width: auto;
  }

  body.atlas .atlas-h2 {
    font-size: 27px;
  }

  body.atlas .atlas-lede,
  body.atlas .atlas-lede--lg {
    font-size: 16px;
  }

  /* Clip the portrait to the header so it cannot widen the page. */
  body.atlas .atlas-hero {
    overflow: hidden;
    min-height: 200px;
  }

  body.atlas .atlas-portrait,
  body.atlas .atlas-portrait--career {
    width: 220px;
    height: 220px;
    right: -8px;
    top: -16px;
    opacity: 0.12;
  }

  body.atlas .atlas-bar-row {
    grid-template-columns: 100px minmax(0, 1fr) 52px;
    column-gap: 10px;
  }

  body.atlas .atlas-covers {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  body.atlas .atlas-index {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }

  body.atlas .atlas-cards--pair {
    grid-template-columns: minmax(0, 1fr);
  }

  body.atlas .atlas-record {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  body.atlas .atlas-record-num {
    display: flex;
    gap: 10px;
  }

  body.atlas .atlas-record-row {
    grid-template-columns: 92px 32px minmax(0, 1fr);
    gap: 10px;
  }

  body.atlas .atlas-fig {
    padding: 18px 16px 16px;
  }

  body.atlas .atlas-fig-img {
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 200 / 240;
  }

  body.atlas .footer,
  body.atlas .footer.footer--bordered {
    margin-top: 48px;
  }
}

/* The shared mobile menu keeps working; only its colors and sizes change. */
@media (max-width: 640px) {
  body.atlas .site-nav,
  body.atlas .site-nav--centered {
    justify-content: space-between;
    gap: 12px;
  }

  body.atlas .nav-menu {
    background: var(--atlas-plate-surface);
    border: 1px solid var(--atlas-rule);
    border-radius: var(--atlas-radius);
    box-shadow: 0 8px 24px rgba(22, 25, 28, 0.10);
  }

  body.atlas .nav-menu .nav-link,
  body.atlas .nav-menu .nav-dropdown-trigger {
    font-size: 12px;
    padding: 0.75rem var(--space-lg);
  }

  body.atlas .nav-menu .nav-dropdown-trigger::after {
    border: 5px solid transparent;
    border-top-color: currentColor;
    margin: 3px 0 0 0;
  }

  body.atlas .nav-menu .nav-dropdown-menu {
    background: var(--atlas-tile-surface);
    border: none;
  }

  body.atlas .nav-menu .nav-auth {
    border-top: 1px solid var(--atlas-rule);
    gap: 0;
  }

  body.atlas .nav-btn--login {
    margin: 8px var(--space-lg);
  }
}

/* ==========================================================================
   11. Motion and focus
   ========================================================================== */

body.atlas a:focus-visible,
body.atlas button:focus-visible,
body.atlas .atlas-chip:focus-visible,
body.atlas .atlas-tile:focus-visible,
body.atlas .atlas-card:focus-visible,
body.atlas .atlas-org:focus-visible,
body.atlas .atlas-cover:focus-visible,
body.atlas .atlas-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--atlas-radius);
}

@media (prefers-reduced-motion: reduce) {
  body.atlas *,
  body.atlas *::before,
  body.atlas *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  body.atlas .atlas-status-dot {
    animation: none !important;
    opacity: 1;
  }

  /* Covered by the blanket rule above; spelled out because the Fig. 1 flow is
     the one animation a reader would notice if the blanket rule ever moved. */
  body.atlas .atlas-flow-path--drift {
    animation: none !important;
  }
}

/* ==========================================================================
   12. Homepage components (JON-1426)
   Everything the atlas homepage needs beyond sections 7-8: the hero above the
   plates, Fig. 1 (the system flow) and Fig. 2 (the Memory Palace floor plan),
   plus the small shared shapes the other plates reuse.

   Three literal colours below have no token because they exist only in these
   figures: #b9c0c7 (the gate hatch), #eef0f2 (the shelf-row hairline, one step
   lighter than --atlas-hairline) and #c7d3e0 (the Life Model room border, a
   tinted counterpart to --atlas-tile-border). The ink slab's own palette
   (#9fb2c8 label, #c6ccd3 body, #3a4046 rule) is likewise slab-local.
   ========================================================================== */

/* Hero and plate intro ---------------------------------------------------- */

body.atlas .atlas-hero--top {
  margin: 0 0 8px;
  min-height: 260px;
}

/* The design lays main out as a 64px flex column, so the hero sits one gap
   above Plate I. Plate spacing here is adjacency-based and the hero is not a
   plate, so the first plate needs that gap spelled out. */
body.atlas .atlas-hero--top + .atlas-plate {
  margin-top: var(--atlas-plate-gap);
}

body.atlas .atlas-intro {
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 10px 0 0;
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Fig. 1: senses -> flow -> memory palace -> gate -> surfaces
   -------------------------------------------------------------------------- */

body.atlas .atlas-families {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 18px;
}

body.atlas .atlas-family {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

body.atlas .atlas-family-head {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--atlas-rule);
  white-space: nowrap;
}

body.atlas .atlas-family-how {
  font-size: 11px;
  line-height: 1.3;
  color: var(--text-muted);
  padding: 6px 0 2px;
}

body.atlas .atlas-family-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 0 4px;
  flex: 1;
}

body.atlas .atlas-sense {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

body.atlas .atlas-sense-name {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--atlas-ink);
}

body.atlas .atlas-sense-meta {
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--text-muted);
}

/* Linked senses and shelf rows (JON-1428): the name is the link, quiet until
   hover; facet links (videos, searches, saved ...) sit on a third mono line. */
body.atlas .atlas-sense-link,
body.atlas .atlas-shelf-link {
  color: inherit;
  text-decoration: underline dotted;
  text-decoration-color: var(--atlas-rule);
  text-underline-offset: 3px;
}

body.atlas .atlas-sense-link:hover,
body.atlas .atlas-shelf-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

body.atlas .atlas-sense-links {
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--text-muted);
}

body.atlas .atlas-sense-links a {
  color: var(--accent);
}

body.atlas .atlas-sense-links a:hover {
  color: var(--atlas-ink);
}

body.atlas .atlas-dots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  justify-items: center;
  margin-top: 6px;
}

body.atlas .atlas-dot {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--atlas-ink);
}

body.atlas .atlas-flow {
  display: block;
  width: 100%;
  height: 56px;
  overflow: visible;
}

body.atlas .atlas-flow-path {
  fill: none;
  stroke: var(--atlas-ink);
  stroke-width: 1.2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

body.atlas .atlas-flow-path--drift {
  animation: atlas-dashdrift 8s linear infinite;
}

/* Staggered so the five feeds never drift in lockstep. */
body.atlas .atlas-flow-path--d6 { animation-duration: 6s; }
body.atlas .atlas-flow-path--d7 { animation-duration: 7s; }
body.atlas .atlas-flow-path--d8 { animation-duration: 8s; }
body.atlas .atlas-flow-path--d9 { animation-duration: 9s; }
body.atlas .atlas-flow-path--d11 { animation-duration: 11s; }

/* The Mind family is authored by hand, not synced: dashed and still. */
body.atlas .atlas-flow-path--authored {
  animation: none;
}

@keyframes atlas-dashdrift {
  to { stroke-dashoffset: -40; }
}

body.atlas .atlas-chevron {
  display: flex;
  justify-content: center;
  color: var(--atlas-ink);
}

body.atlas .atlas-chevron svg {
  display: block;
}

body.atlas .atlas-chevron--tight {
  margin-top: -3px;
}

body.atlas .atlas-chevron--accent {
  color: var(--accent);
}

body.atlas .atlas-chevron--drop {
  position: absolute;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
}

/* Shown only below 820px, where the flow diagram is hidden. */
body.atlas .atlas-connector--mobile {
  display: none;
}

/* The ink slab ------------------------------------------------------------ */

body.atlas .atlas-box--ink {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px 24px;
  border: none;
  border-radius: 0;
  background: var(--atlas-ink);
  color: var(--atlas-page);
  padding: 16px 20px;
  margin-top: 4px;
}

body.atlas .atlas-box--ink .atlas-box-label {
  color: #9fb2c8;
}

body.atlas .atlas-box--ink .atlas-box-display {
  font-size: 26px;
  color: var(--atlas-page);
  margin-top: 6px;
}

body.atlas .atlas-box--ink .atlas-box-text {
  color: #c6ccd3;
  margin-top: 8px;
}

/* The slab's figures stay at body size and body colour: .atlas-num's ink would
   disappear into the slab. */
body.atlas .atlas-box--ink .atlas-num {
  font-size: inherit;
  color: inherit;
}

body.atlas .atlas-box--ink a {
  color: #9fb2c8;
}

body.atlas .atlas-box--ink a:hover {
  color: #ffffff;
}

body.atlas .atlas-box-ink-col {
  border-left: 1px solid #3a4046;
  padding-left: 20px;
}

body.atlas .atlas-box-ink-col .atlas-box-text {
  line-height: 1.6;
}

/* Private / public split -------------------------------------------------- */

body.atlas .atlas-split {
  display: grid;
  grid-template-columns: 1fr 210px;
  gap: 24px;
}

body.atlas .atlas-split--h26 { height: 26px; }
body.atlas .atlas-split--h24 { height: 24px; }

body.atlas .atlas-split--top {
  align-items: start;
  margin-top: 4px;
}

body.atlas .atlas-line {
  position: relative;
}

body.atlas .atlas-line-dot {
  position: absolute;
  left: 50%;
  top: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--atlas-ink);
  transform: translateX(-50%);
}

body.atlas .atlas-line-dot--public {
  background: var(--accent);
}

body.atlas .atlas-line-svg {
  position: absolute;
  left: 50%;
  top: 0;
  display: block;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
  overflow: visible;
}

body.atlas .atlas-line-solid {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1.2px;
  height: 100%;
  background: var(--accent);
  transform: translateX(-50%);
}

/* A stub runs 16px and hands off to a chevron at 14px. */
body.atlas .atlas-line--stub .atlas-line-svg,
body.atlas .atlas-line--stub .atlas-line-solid {
  height: 16px;
}

/* The gate ---------------------------------------------------------------- */

body.atlas .atlas-gate {
  display: grid;
  grid-template-columns: 1fr 130px 1fr;
  align-items: stretch;
  height: 34px;
}

body.atlas .atlas-gate--public {
  grid-template-columns: 1fr 104px 1fr;
}

body.atlas .atlas-gate-bar {
  display: flex;
  align-items: center;
  background: repeating-linear-gradient(135deg, #b9c0c7 0 3px, transparent 3px 8px);
  border-top: 1px solid var(--atlas-ink);
  border-bottom: 1px solid var(--atlas-ink);
}

body.atlas .atlas-gate-title {
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--atlas-ink);
  background: var(--atlas-plate-surface);
  padding: 2px 8px 2px 0;
  white-space: nowrap;
}

body.atlas .atlas-gate-pass {
  position: relative;
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--atlas-ink);
}

body.atlas .atlas-gate-pass--public {
  color: var(--accent);
}

body.atlas .atlas-gate-label {
  position: absolute;
  left: calc(50% + 9px);
  top: 50%;
  transform: translateY(-50%);
}

/* Surfaces ---------------------------------------------------------------- */

body.atlas .atlas-surfaces-label {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .atlas-surfaces-label--public {
  color: var(--accent);
}

body.atlas .atlas-surfaces {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px;
  margin-top: 8px;
}

body.atlas .atlas-public-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

body.atlas .atlas-tile--strong {
  border-width: 1.5px;
  padding: 7px 10px;
}

body.atlas .atlas-tile--strong .atlas-tile-meta {
  font-size: 9.5px;
}

body.atlas .atlas-legend-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--atlas-status);
  margin-right: 6px;
}

/* --------------------------------------------------------------------------
   Fig. 2: the Memory Palace floor plan
   -------------------------------------------------------------------------- */

body.atlas .atlas-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  align-items: stretch;
  margin-top: 18px;
}

body.atlas .atlas-plan {
  border: 1.5px solid var(--atlas-ink);
  background: var(--atlas-tile-surface);
  padding: 14px 16px;
  min-width: 0;
}

body.atlas .atlas-plan--wing {
  display: flex;
  flex-direction: column;
  border-color: var(--accent);
  background: var(--atlas-accent-tint);
}

body.atlas .atlas-plan--wide {
  margin-top: 16px;
}

body.atlas .atlas-plan-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 12px;
}

body.atlas .atlas-plan-title {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

body.atlas .atlas-plan-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  color: var(--text-muted);
}

body.atlas .atlas-plan--wing .atlas-plan-head .atlas-plan-meta {
  color: var(--accent);
}

body.atlas .atlas-plan-box {
  border: 1px solid var(--atlas-ink);
  padding: 10px 12px;
  margin-top: 12px;
}

body.atlas .atlas-plan-box--surface {
  background: var(--atlas-plate-surface);
  margin-top: 8px;
}

body.atlas .atlas-plan-box--white {
  background: var(--atlas-tile-surface);
}

body.atlas .atlas-plan-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  line-height: 1.35;
}

body.atlas .atlas-plan-row strong {
  font-weight: 600;
}

body.atlas .atlas-plan-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

body.atlas .atlas-plan-cell {
  border: 1px solid var(--atlas-ink);
  background: var(--atlas-tile-surface);
  padding: 8px 10px;
  min-width: 0;
}

body.atlas .atlas-plan-cell-title {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  line-height: 1.35;
}

body.atlas .atlas-plan-cell-title strong {
  font-weight: 600;
}

body.atlas .atlas-plan-dashed {
  display: flex;
  flex-direction: column;
  border: 1px dashed var(--atlas-ink);
  padding: 5px 8px;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 6px;
}

body.atlas .atlas-plan-dashed-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--text-muted);
}

body.atlas .atlas-plan-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

body.atlas .atlas-plan-chip {
  border: 1px dashed var(--atlas-ink);
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.3;
}

body.atlas .atlas-plan-note {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-secondary);
  margin-top: 10px;
}

body.atlas .atlas-plan-note-label {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* .atlas-chips is a grid by default; the note-type chips are ragged. */
body.atlas .atlas-chips--wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

body.atlas .atlas-chip--sm {
  border: 1px solid var(--atlas-tile-border);
  background: var(--atlas-plate-surface);
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
  color: var(--text-secondary);
}

body.atlas .atlas-wing-text {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-secondary);
  margin-top: 8px;
}

body.atlas .atlas-rooms {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

body.atlas .atlas-room {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 8px;
  align-items: baseline;
  background: var(--atlas-tile-surface);
  border: 1px solid #c7d3e0;
  padding: 6px 10px;
}

body.atlas .atlas-room-name {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: var(--accent);
}

body.atlas .atlas-room-holds {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--atlas-ink);
}

/* Shelves ----------------------------------------------------------------- */

body.atlas .atlas-shelves {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px 24px;
  margin-top: 12px;
}

body.atlas .atlas-shelf {
  border-top: 1px solid var(--atlas-ink);
  padding-top: 8px;
  min-width: 0;
}

body.atlas .atlas-shelf-name {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .atlas-shelf-rows {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 6px;
}

body.atlas .atlas-shelf-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  line-height: 1.3;
  color: var(--atlas-ink);
  border-bottom: 1px solid #eef0f2;
  padding: 2px 0;
}

body.atlas .atlas-shelf-value {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  white-space: nowrap;
}

body.atlas .atlas-shelf-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--atlas-ink);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-secondary);
}

body.atlas .atlas-shelf-summary .atlas-num {
  font-size: inherit;
  font-weight: 400;
  color: var(--atlas-ink);
}

/* --------------------------------------------------------------------------
   Shared shapes used by Plates II and IV to VIII
   -------------------------------------------------------------------------- */

body.atlas .atlas-cards--theory {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
  margin-top: 20px;
}

body.atlas .atlas-cards--theory .atlas-box {
  padding: 18px 20px;
}

body.atlas .atlas-cards--career {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 16px;
}

body.atlas .atlas-cards--career .atlas-box {
  padding: 14px 16px;
}

body.atlas .atlas-cards--further {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

body.atlas .atlas-box--column {
  display: flex;
  flex-direction: column;
}

body.atlas .atlas-links--bottom {
  margin-top: auto;
  padding-top: 14px;
}

body.atlas .atlas-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
}

body.atlas .atlas-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body.atlas .atlas-legend-swatch {
  display: inline-block;
  width: 14px;
  height: 8px;
  background: var(--accent);
}

body.atlas .atlas-legend-marker {
  display: inline-block;
  width: 0;
  height: 12px;
  border-left: 2px dashed var(--atlas-ink);
}

body.atlas .atlas-bar-link {
  font-size: 13px;
  line-height: 1.25;
  color: var(--text-muted);
}

body.atlas .atlas-bar-link:hover {
  color: var(--accent);
}

body.atlas .atlas-bar-more {
  display: block;
  height: 8px;
  border: 1px dashed var(--atlas-rule);
  border-radius: 1px;
}

body.atlas .atlas-bar-value--muted {
  color: var(--text-muted);
}

/* The "+14 more" row is a button (design: the prs toggle): a bare row-shaped
   control whose label and glyph take the accent on hover. */
body.atlas .atlas-bar-toggle {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--text-muted);
  text-align: left;
  cursor: pointer;
}

body.atlas .atlas-bar-toggle:hover .atlas-bar-link,
body.atlas .atlas-bar-toggle:hover .atlas-bar-value--muted {
  color: var(--accent);
}

/* Biometrics strip -------------------------------------------------------- */

body.atlas .atlas-metrics-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: none;
}

body.atlas .atlas-metrics-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  flex: 1 1 300px;
}

body.atlas .atlas-metrics-source {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

body.atlas .atlas-metrics-source .atlas-metric-label--mono {
  margin-top: 0;
}

body.atlas .atlas-puck {
  display: block;
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--atlas-rule);
}

/* Writing covers ---------------------------------------------------------- */

body.atlas .atlas-cover-fallback {
  display: flex;
  align-items: flex-end;
  aspect-ratio: 1 / 1;
  background: var(--atlas-plate-surface);
  border: 1px solid var(--atlas-rule);
  padding: 14px;
  font-family: var(--atlas-font-display);
  font-size: 17px;
  line-height: 1.2;
  color: var(--atlas-ink);
}

/* Inline figures and link rows -------------------------------------------- */

body.atlas .atlas-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--atlas-ink);
}

body.atlas .atlas-num--sm {
  font-size: 12px;
}

body.atlas .atlas-links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
  margin-top: 14px;
  font-size: 13px;
}

body.atlas .atlas-links--split {
  justify-content: space-between;
  color: var(--text-muted);
}

body.atlas .atlas-links-strong {
  font-weight: 600;
}

body.atlas .atlas-links-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

body.atlas .atlas-fine--right {
  margin-left: auto;
}

body.atlas .atlas-fine--gap-b {
  margin-bottom: 8px;
}

body.atlas .atlas-fine--gap-t {
  margin-top: 6px;
}

body.atlas .atlas-fine--between {
  margin: 14px 0 8px;
}

body.atlas .atlas-fig--tight {
  margin-top: 20px;
  padding: 22px 24px 18px;
}

body.atlas .atlas-figcaption--tight {
  margin-top: 10px;
}

/* Scroll anchor for a target that is not a .atlas-plate (Fig. 2). */
body.atlas .atlas-anchor {
  scroll-margin-top: 24px;
}

/* ==========================================================================
   13. Homepage responsive (below 820px)
   The flow diagram is the one shape that cannot compress: it is a five-column
   convergence drawn to a fixed viewBox. Below 820px it gives way to a plain
   connector, and the private and public columns stack instead of running
   side by side.
   ========================================================================== */

@media (max-width: 820px) {
  /* Homepage hero (design: hero, hero-img). The header bleeds into the right
     page padding so the portrait can hang off the page edge; the header's
     own overflow clips it there, so the page never scrolls sideways. Scoped
     to the homepage column, which also out-ranks the section 12 base rule. */
  body.atlas .atlas-grid > main > .atlas-hero--top {
    min-height: 0;
    margin: 0 -20px 0 0;
    padding-right: 20px;
  }

  body.atlas .atlas-grid > main > .atlas-hero--top .atlas-portrait {
    width: 250px;
    height: 250px;
    right: -56px;
    top: -6px;
    opacity: 0.16;
  }

  /* The column gap now spaces the plates; the desktop adjacency margins
     would double it. */
  body.atlas .atlas-grid > main > .atlas-plate + .atlas-plate,
  body.atlas .atlas-grid > main > .atlas-hero--top + .atlas-plate {
    margin-top: 0;
  }

  body.atlas .atlas-families {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 16px;
  }

  body.atlas .atlas-dots,
  body.atlas .atlas-flow,
  body.atlas .atlas-chevron--flow {
    display: none;
  }

  body.atlas .atlas-connector--mobile {
    display: block;
  }

  /* The gate keeps both channels side by side (design: chan, gate-l, gate-r):
     equal columns, the title dropped, and the pass labels shrunk so private
     and public still fit their cells. */
  body.atlas .atlas-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
  }

  body.atlas .atlas-split > * {
    min-width: 0;
  }

  body.atlas .atlas-gate-title {
    display: none;
  }

  body.atlas .atlas-gate {
    grid-template-columns: minmax(0, 1fr) 98px minmax(0, 1fr);
  }

  body.atlas .atlas-gate--public {
    grid-template-columns: minmax(0, 1fr) 86px minmax(0, 1fr);
  }

  body.atlas .atlas-gate-label {
    font-size: 8.5px;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }

  body.atlas .atlas-box--ink {
    grid-template-columns: minmax(0, 1fr);
  }

  body.atlas .atlas-box-ink-col {
    border-left: none;
    border-top: 1px solid #3a4046;
    padding-left: 0;
    padding-top: 16px;
  }

  body.atlas .atlas-plan-pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   14. Career page additions (folded from career.html, JON-1426)
   ========================================================================== */

/* styles.css: `p { margin-bottom: var(--space-lg) }` and
   `ul, ol { margin-bottom: var(--space-lg) }` + `li { margin-bottom: var(--space-sm) }`.
   The record body spaces its children with `> * + *`, and the proof/footnote
   lists space themselves with a flex gap, so the base margins double up. */
body.atlas .atlas-record-body p { margin-bottom: 0; }
body.atlas .atlas-record-body ol { margin-bottom: 0; }
body.atlas .atlas-record-body li { margin-bottom: 0; }

/* styles.css paints every <p> with --text-secondary; the design's lead
   paragraphs in sections 01 and 06 are ink. */
body.atlas .atlas-record-body > p.atlas-p--ink { color: var(--atlas-ink); }

/* Design: <main style="margin:40px auto 0"> under the masthead. */
body.atlas .atlas-main--solo { margin-top: 40px; }

/* Design: the career H1 runs to 760px; .atlas-hero caps its children at 640px. */
body.atlas .atlas-hero--wide > .atlas-h1 { max-width: 760px; }

/* Design: section 02's throughline, Instrument Serif 28px. Between
   .atlas-card-title (24px) and .atlas-h2 (32px), and neither carries it. */
body.atlas .atlas-display {
  font-family: var(--atlas-font-display);
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--atlas-ink);
}

/* The record's inline figures are 14px inside 16px prose; the homepage's
   .atlas-num in section 12 is 13px. */
body.atlas .atlas-num--prose { font-size: 14px; }

/* Design: the voice line renders mono inside prose. */
body.atlas .atlas-tel {
  font-family: var(--font-mono);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

/* Design: two logo squares 4px apart for the Yonder + Bazaarvoice entry. */
body.atlas .atlas-logo-pair { display: flex; gap: 4px; }

/* section 12's .atlas-links sits 14px above its row; the record's closing
   row sits 20px below the footnotes. */
body.atlas .atlas-links--record { margin-top: 20px; }

/* ==========================================================================
   15. Theory page (JON-1437)
   Translated from docs/design/2026-09-04-neuro-atlas/working-memory-fragility.dc.html.
   Everything the design paints with an inline style and that no existing atlas
   class already covers. Fig. 1b's simulation writes SVG attributes only, so no
   class in this section is assigned at runtime.
   ========================================================================== */

/* Hero: definition on the left, the two editions on the right ------------- */

body.atlas .atlas-theory-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  gap: 40px;
  align-items: end;
  margin-top: 22px;
}

body.atlas .atlas-theory-hero-col {
  min-width: 0;
}

/* styles.css: `p { margin-bottom: var(--space-lg) }`. The hero aligns its two
   columns on their bottom edge, so a trailing margin inside the left column
   lifts the copy off that baseline. Reset the bottom margin only. */
body.atlas .atlas-theory-hero p {
  margin-bottom: 0;
}

body.atlas .atlas-theory-definition {
  font-family: var(--atlas-font-display);
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--atlas-ink);
  max-width: 680px;
  margin-top: 18px;
  scroll-margin-top: 24px;
  text-wrap: pretty;
}

body.atlas .atlas-theory-editions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

body.atlas .atlas-theory-editions-label {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2px;
}

body.atlas .atlas-theory-edition {
  display: block;
  padding: 12px 14px;
  border-radius: var(--atlas-radius);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

body.atlas .atlas-theory-edition--ink {
  background: var(--atlas-ink);
  color: var(--atlas-page);
}

body.atlas .atlas-theory-edition--ink:hover {
  background: var(--accent);
  color: var(--atlas-tile-surface);
}

body.atlas .atlas-theory-edition--outline {
  border: 1px solid var(--atlas-ink);
  color: var(--atlas-ink);
}

body.atlas .atlas-theory-edition--outline:hover {
  background: var(--atlas-tile-surface);
  color: var(--atlas-ink);
}

body.atlas .atlas-theory-edition-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

body.atlas .atlas-theory-edition-title {
  font-size: 14px;
  font-weight: 600;
}

body.atlas .atlas-theory-edition-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
}

body.atlas .atlas-theory-edition--ink .atlas-theory-edition-meta,
body.atlas .atlas-theory-edition--ink .atlas-theory-edition-text {
  opacity: 0.8;
}

body.atlas .atlas-theory-edition--outline .atlas-theory-edition-meta {
  color: var(--text-muted);
}

body.atlas .atlas-theory-edition-text {
  display: block;
  font-size: 12.5px;
  line-height: 1.5;
  margin-top: 2px;
}

body.atlas .atlas-theory-edition--outline .atlas-theory-edition-text {
  color: var(--text-secondary);
}

body.atlas .atlas-theory-editions-note {
  font-size: 11px;
  text-align: center;
  margin-top: 4px;
}

/* Figure spacing: .atlas-fig--tight already carries the design's padding, so
   only the three margins differ from it. */

body.atlas .atlas-theory-fig-lead {
  margin-top: 40px;
}

body.atlas .atlas-theory-fig-stack {
  margin-top: 16px;
}

body.atlas .atlas-theory-fig-flush {
  margin-top: 0;
  padding: 20px 22px 16px;
  min-width: 0;
}

/* Plate I opens after a figure rather than after another plate, so the
   64px plate gap has to be spelled out once. */
body.atlas .atlas-theory-fig-stack + .atlas-plate {
  margin-top: var(--atlas-plate-gap);
}

/* Fig. 1a and Fig. 1b: explainer columns, rows, legend ------------------- */

body.atlas .atlas-theory-explain {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 24px;
  margin-top: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}

body.atlas .atlas-theory-lead {
  color: var(--atlas-ink);
  font-weight: 600;
}

body.atlas .atlas-theory-rows {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px 18px;
  align-items: center;
  margin-top: 18px;
}

body.atlas .atlas-theory-row-label {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-align: right;
}

body.atlas .atlas-theory-row-sub {
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: none;
}

body.atlas .atlas-theory-row-svg {
  display: block;
  width: 100%;
}

body.atlas .atlas-theory-row-svg--h28 {
  height: 28px;
}

body.atlas .atlas-theory-row-svg--auto {
  height: auto;
  overflow: visible;
}

body.atlas .atlas-theory-row-svg--h22 {
  height: 22px;
  overflow: visible;
}

body.atlas .atlas-theory-legend {
  gap: 22px;
  margin-top: 14px;
}

body.atlas .atlas-theory-legend--tight {
  margin-top: 12px;
}

body.atlas .atlas-theory-swatch {
  display: inline-block;
}

body.atlas .atlas-theory-swatch--tick {
  width: 3px;
  height: 12px;
  background: var(--atlas-ink);
}

body.atlas .atlas-theory-swatch--set {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

/* #7c848c is the design's ghost stroke, which the figure's SVG keeps verbatim.
   The swatch has to match the shape it explains, so this one border colour is
   the design hex rather than --text-muted. */
body.atlas .atlas-theory-swatch--ghost {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px dashed #7c848c;
}

body.atlas .atlas-theory-swatch--emitted {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--atlas-ink);
}

body.atlas .atlas-theory-swatch--written {
  width: 10px;
  height: 10px;
  background: var(--atlas-tile-surface);
  border: 1px solid var(--atlas-ink);
}

body.atlas .atlas-theory-legend-svg {
  display: block;
}

/* Fig. 1b: controls and the simulation canvas ---------------------------- */

body.atlas .atlas-theory-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--atlas-tile-border);
}

body.atlas .atlas-theory-control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.atlas .atlas-theory-control-group--end {
  margin-left: auto;
}

body.atlas .atlas-theory-control-label {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .atlas-theory-btn {
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.4;
  padding: 5px 12px;
  border: 1px solid var(--atlas-ink);
  border-radius: var(--atlas-radius);
  background: transparent;
  color: var(--atlas-ink);
  cursor: pointer;
}

body.atlas .atlas-theory-btn[aria-pressed="true"] {
  background: var(--atlas-ink);
  color: var(--atlas-page);
}

body.atlas .atlas-theory-btn--ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 84px;
}

body.atlas .atlas-theory-btn--ghost:hover {
  background: var(--atlas-tile-surface);
}

body.atlas .atlas-theory-btn--reset {
  border-color: var(--atlas-rule);
  color: var(--text-secondary);
}

body.atlas .atlas-theory-glyph {
  display: inline-flex;
  width: 8px;
  height: 10px;
  align-items: center;
  justify-content: center;
}

/* The 720-unit canvas would shrink its 9.5px labels to about 4px at 390 wide, so below
   820px it keeps a 640px floor and scrolls sideways, the same treatment as the matrix. */
body.atlas .atlas-theory-sim {
  margin-top: 14px;
  overflow-x: auto;
}

body.atlas .atlas-theory-sim svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Fig. 2: layer x kind of evidence --------------------------------------- */

body.atlas .atlas-theory-matrix-scroll {
  overflow-x: auto;
  margin-top: 16px;
}

body.atlas .atlas-theory-matrix {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) repeat(5, minmax(64px, 1fr)) minmax(0, 2fr);
  font-size: 13px;
}

body.atlas .atlas-theory-tier-head {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--atlas-ink);
  padding: 6px 2px;
  border-bottom: 1px solid var(--atlas-ink);
}

body.atlas .atlas-theory-says-head {
  padding: 6px 0 6px 16px;
  border-bottom: 1px solid var(--atlas-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .atlas-theory-layer {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--atlas-tile-border);
}

body.atlas .atlas-theory-layer-name {
  color: var(--atlas-ink);
  font-weight: 600;
}

body.atlas .atlas-theory-layer-name:hover {
  color: var(--accent);
}

body.atlas .atlas-theory-layer-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  color: var(--text-muted);
  margin-top: 2px;
}

body.atlas .atlas-theory-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--atlas-tile-border);
}

body.atlas .atlas-theory-mark {
  display: inline-block;
  width: 14px;
  height: 14px;
}

body.atlas .atlas-theory-mark--core {
  background: var(--accent);
  border: 1px solid var(--accent);
}

body.atlas .atlas-theory-mark--on {
  background: var(--atlas-ink);
  border: 1px solid var(--atlas-ink);
}

body.atlas .atlas-theory-mark--off {
  background: transparent;
  border: 1px solid var(--atlas-rule);
}

body.atlas .atlas-theory-says {
  padding: 10px 0 10px 16px;
  border-bottom: 1px solid var(--atlas-tile-border);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
}

body.atlas .atlas-theory-tier-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
}

body.atlas .atlas-theory-tier-tag {
  font-family: var(--font-mono);
  color: var(--atlas-ink);
}

/* Plate II: the eleven Layer 1 sections ---------------------------------- */

body.atlas .atlas-theory-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--atlas-gap-tile);
  margin-top: 20px;
}

body.atlas .atlas-theory-pillar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--atlas-rule);
  background: var(--atlas-plate-surface);
  padding: 14px 16px;
  min-width: 0;
}

body.atlas .atlas-theory-pillar-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

body.atlas .atlas-theory-pillar-num {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

body.atlas .atlas-theory-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--atlas-ink);
  border: 1px solid var(--atlas-rule);
  background: var(--atlas-tile-surface);
  padding: 2px 7px;
}

body.atlas .atlas-theory-sure {
  letter-spacing: 1px;
  color: var(--accent);
}

body.atlas .atlas-theory-pillar-name {
  font-family: var(--atlas-font-display);
  font-size: 20px;
  line-height: 1.15;
  color: var(--atlas-ink);
}

body.atlas .atlas-theory-pillar-says {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
}

/* Plate III: Layer 2 items beside Fig. 3 --------------------------------- */

body.atlas .atlas-theory-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  align-items: start;
  margin-top: 18px;
}

body.atlas .atlas-theory-pair-col {
  min-width: 0;
}

/* This plate's display heading sits inside the left column, at the design's
   28px, and opens the column rather than following a plate head. */
body.atlas .atlas-theory-pair .atlas-h2 {
  font-size: 28px;
  margin-top: 0;
}

body.atlas .atlas-theory-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

body.atlas .atlas-theory-item {
  border-top: 1px solid var(--atlas-rule);
  padding-top: 8px;
}

body.atlas .atlas-theory-item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

body.atlas .atlas-theory-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--atlas-ink);
}

body.atlas .atlas-theory-item-src {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  color: var(--text-muted);
  white-space: nowrap;
}

body.atlas .atlas-theory-item-says {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
  margin-top: 3px;
}

body.atlas .atlas-theory-dials {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
}

body.atlas .atlas-theory-dial {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--atlas-tile-border);
}

body.atlas .atlas-theory-dial-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--atlas-ink);
}

body.atlas .atlas-theory-dial-controls {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-secondary);
}

body.atlas .atlas-theory-dial-mod {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  color: var(--text-muted);
  margin-top: 2px;
}

body.atlas .atlas-theory-slider {
  display: block;
  width: 84px;
  height: 24px;
}

/* Plate IV: the received arc beside the inversion ------------------------ */

body.atlas .atlas-theory-arc {
  margin-top: 18px;
}

body.atlas .atlas-theory-arc .atlas-box {
  padding: 18px 20px;
}

/* .atlas-box-label is nowrap for the homepage's two-word labels. This page's
   labels are full phrases and have to wrap on a narrow screen. */
body.atlas .atlas-theory-arc .atlas-box-label,
body.atlas .atlas-theory-limit .atlas-box-label {
  white-space: normal;
}

body.atlas .atlas-theory-note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 760px;
  margin-top: 12px;
  margin-bottom: 0;
}

body.atlas .atlas-theory-note--sm {
  font-size: 12.5px;
  max-width: none;
}

/* Same treatment the section 7 rule gives links inside running text. */
body.atlas .atlas-theory-note a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

/* Plate V: boundaries, limitations, corrections -------------------------- */

body.atlas .atlas-theory-triptych {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--atlas-gap-tile);
  align-items: start;
  margin-top: 20px;
}

body.atlas .atlas-theory-limit {
  border: 1px solid var(--atlas-rule);
  background: var(--atlas-plate-surface);
  padding: 14px 16px;
  min-width: 0;
}

body.atlas .atlas-theory-limit--strong {
  border: 1.5px solid var(--atlas-ink);
  background: var(--atlas-tile-surface);
}

body.atlas .atlas-theory-limit-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
}

body.atlas .atlas-theory-corrections {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

body.atlas .atlas-theory-correction {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  font-size: 12.5px;
  line-height: 1.4;
  border-bottom: 1px solid var(--atlas-hairline);
  padding-bottom: 6px;
}

body.atlas .atlas-theory-correction-kind {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

body.atlas .atlas-theory-correction-text {
  color: var(--text-secondary);
}

body.atlas .atlas-theory-refline {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 10px;
}

/* ==========================================================================
   Theory page responsive (below 820px)
   auto-fit / auto-fill grids collapse on their own and are left alone, the
   same convention section 10 states. Only the fixed-column grids need a rule,
   and Fig. 2's matrix scrolls instead of reflowing: it is one comparison read
   across seven columns and loses its meaning stacked.
   ========================================================================== */

/* Text for assistive tech only: the Fig. 2 marks say present or absent by colour, so each
   layer row carries a hidden sentence naming its kinds of evidence. */
body.atlas .atlas-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 820px) {
  body.atlas .atlas-theory-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }

  body.atlas .atlas-theory-rows {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px 0;
  }

  body.atlas .atlas-theory-row-label {
    text-align: left;
  }

  body.atlas .atlas-theory-matrix {
    min-width: 680px;
  }

  body.atlas .atlas-theory-sim svg {
    min-width: 640px;
  }
}

/* ==========================================================================
   16. Writing index (JON-1455)
   Translated from docs/design/2026-09-04-neuro-atlas/writing.dc.html, which
   styles everything inline. Only what no existing atlas class already covers
   lives here: the page reuses .atlas-plate, .atlas-h1/.atlas-h2, .atlas-fig,
   .atlas-fig-label, .atlas-figcaption, .atlas-legend, .atlas-btn, .atlas-chip
   and .atlas-links unchanged.

   Every selector is prefixed .atlas-writing-* (or is a modifier of a shared
   block), so nothing here reaches the homepage, career or theory pages. The
   section sits last in the file on purpose: atlas.css interleaves responsive
   blocks with later base sections, so a media rule for a class defined further
   down loses at equal specificity. Last means the page's own responsive block
   always wins over its own base rules.

   Deliberate departures from the design, recorded in the package MANIFEST:
   plate rhythm and headline size come from the atlas tokens (64px gap,
   .atlas-h2 at 32px) rather than the design's 56px/30px, so this page keeps
   step with the other three; and the cadence chart scales uniformly inside a
   scrolling well instead of stretching to fit, because the design's
   preserveAspectRatio="none" squeezes its month labels to half width on a
   phone.
   ========================================================================== */

/* Hero --------------------------------------------------------------------- */

body.atlas .atlas-writing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr);
  gap: 40px;
  align-items: end;
  margin-top: 4px;
}

body.atlas .atlas-writing-hero-col {
  min-width: 0;
}

/* styles.css sets a bottom margin on every p; the two hero columns align on
   their bottom edge, so a trailing margin would lift the copy off it. */
body.atlas .atlas-writing-hero p {
  margin-bottom: 0;
}

body.atlas .atlas-writing-hero-aside {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

body.atlas .atlas-writing-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--atlas-gap-chip);
  margin-bottom: 8px;
}

body.atlas .atlas-writing-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 10px 12px;
  background: var(--atlas-plate-surface);
  border: 1px solid var(--atlas-rule);
}

body.atlas .atlas-writing-stat-value {
  font-family: var(--font-mono);
  font-size: 20px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--atlas-ink);
}

body.atlas .atlas-writing-stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* The one full-width action; the design gives it 38px against the 36px pair
   below so it reads as the primary. */
body.atlas .atlas-writing-download {
  height: 38px;
}

body.atlas .atlas-writing-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--atlas-gap-chip);
}

body.atlas .atlas-writing-fine {
  margin: 0;
  font-size: 11px;
  text-align: center;
}

/* Fig. 1: the corpus at a glance ------------------------------------------- */

body.atlas .atlas-writing-fig {
  margin-top: 40px;
}

body.atlas .atlas-writing-paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

body.atlas .atlas-writing-path-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid var(--atlas-ink);
  color: var(--atlas-ink);
  text-decoration: none;
}

body.atlas .atlas-writing-path-card:hover {
  color: var(--accent);
}

body.atlas .atlas-writing-path-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

body.atlas .atlas-writing-path-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
}

body.atlas .atlas-writing-path-card-num {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

body.atlas .atlas-writing-path-card-meta {
  color: var(--text-muted);
  white-space: nowrap;
}

body.atlas .atlas-writing-path-card-name {
  font-family: var(--atlas-font-display);
  font-size: 22px;
  line-height: 1.15;
  margin-top: 6px;
  text-wrap: pretty;
}

body.atlas .atlas-writing-path-card-desc {
  font-size: 13px;
  line-height: 1.45;
  margin-top: 6px;
  color: var(--text-secondary);
  text-wrap: pretty;
}

body.atlas .atlas-writing-path-threads {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 10px;
}

body.atlas .atlas-writing-path-thread {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 0;
  border-bottom: 1px solid var(--atlas-hairline);
  font-size: 12.5px;
  line-height: 1.4;
}

body.atlas .atlas-writing-path-thread-n {
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

/* Cadence chart ------------------------------------------------------------ */

body.atlas .atlas-writing-cadence {
  /* Read by both the bars and their legend swatch, so the two cannot drift. */
  --atlas-notes-bar: #b7c6d8;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--atlas-rule);
}

body.atlas .atlas-writing-cadence-head {
  align-items: baseline;
}

body.atlas .atlas-writing-legend {
  margin-top: 0;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.atlas .atlas-writing-legend .atlas-legend-swatch {
  width: 10px;
  height: 10px;
}

body.atlas .atlas-writing-swatch--essays {
  background: var(--atlas-ink);
}

body.atlas .atlas-writing-swatch--notes {
  background: var(--atlas-notes-bar);
}

body.atlas .atlas-writing-chart-scroll {
  margin-top: 8px;
  overflow-x: auto;
}

body.atlas .atlas-writing-chart {
  display: block;
  width: 100%;
  height: auto;
}

body.atlas .atlas-writing-chart-axis {
  stroke: var(--atlas-ink);
  stroke-width: 1;
}

body.atlas .atlas-writing-bar--essays {
  fill: var(--atlas-ink);
}

body.atlas .atlas-writing-bar--notes {
  fill: var(--atlas-notes-bar);
}

body.atlas .atlas-writing-bar-label {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--text-muted);
}

/* Start here --------------------------------------------------------------- */

body.atlas .atlas-writing-doors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--atlas-gap-tile);
  margin-top: 16px;
}

body.atlas .atlas-writing-door {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  background: var(--atlas-plate-surface);
  border: 1px solid var(--atlas-rule);
  color: var(--atlas-ink);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

body.atlas .atlas-writing-door:hover {
  background: var(--atlas-tile-surface);
  border-color: var(--accent);
}

body.atlas .atlas-writing-door:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body.atlas .atlas-writing-door-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  overflow: hidden;
  background: var(--atlas-page);
  border: 1px solid var(--atlas-rule);
}

body.atlas .atlas-writing-door-cover img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
}

body.atlas .atlas-writing-door-fallback,
body.atlas .atlas-writing-entry-fallback {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

body.atlas .atlas-writing-door-body {
  min-width: 0;
}

body.atlas .atlas-writing-door-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .atlas-writing-door-title {
  display: block;
  font-family: var(--atlas-font-display);
  font-size: 20px;
  line-height: 1.15;
  margin-top: 4px;
  text-wrap: pretty;
}

body.atlas .atlas-writing-door-why {
  display: block;
  font-size: 12.5px;
  line-height: 1.45;
  margin-top: 6px;
  color: var(--text-secondary);
  text-wrap: pretty;
}

/* Threads and their essay rows --------------------------------------------- */

body.atlas .atlas-writing-threads {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 22px;
}

/* A flex-column child holding a grid: without this the widest essay title
   sets the column width and the row overflows the plate. */
body.atlas .atlas-writing-thread {
  min-width: 0;
}

body.atlas .atlas-writing-thread-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--atlas-rule);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
}

body.atlas .atlas-writing-thread-name {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

body.atlas .atlas-writing-thread-meta {
  color: var(--text-muted);
}

body.atlas .atlas-writing-entries {
  display: flex;
  flex-direction: column;
}

body.atlas .atlas-writing-entry {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--atlas-hairline);
  color: var(--atlas-ink);
  text-decoration: none;
}

body.atlas .atlas-writing-entry:hover {
  color: var(--accent);
}

body.atlas .atlas-writing-entry:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body.atlas .atlas-writing-entry-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  overflow: hidden;
  background: var(--atlas-plate-surface);
  border: 1px solid var(--atlas-rule);
}

body.atlas .atlas-writing-entry-cover img {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: cover;
}

body.atlas .atlas-writing-entry-body {
  min-width: 0;
}

body.atlas .atlas-writing-entry-title {
  display: block;
  font-family: var(--atlas-font-display);
  font-size: 20px;
  line-height: 1.15;
  text-wrap: pretty;
}

body.atlas .atlas-writing-entry-excerpt {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  margin-top: 4px;
  color: var(--text-secondary);
  text-wrap: pretty;
}

/* The old index carried a "Preview" category badge on the two paywalled
   essays; that information would otherwise have been lost in the redesign. */
body.atlas .atlas-writing-entry-flag {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 7px;
  border: 1px solid var(--atlas-tile-border);
  border-radius: var(--atlas-radius);
  background: var(--atlas-accent-tint);
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

body.atlas .atlas-writing-entry-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-muted);
}

/* Path V: notes ------------------------------------------------------------ */

body.atlas .atlas-writing-chips {
  margin-top: 16px;
}

/* The shared .atlas-chip stacks its name over its meta; a note thread reads as
   one line, name then count. */
body.atlas .atlas-chip--inline {
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
  padding: 5px 10px;
  background: var(--atlas-plate-surface);
  border-color: var(--atlas-rule);
}

body.atlas .atlas-chip--inline .atlas-chip-name {
  font-size: 13px;
}

/* auto-FILL, where the path cards and doors above use auto-fit. Deliberate,
   and the design's own choice: these are text cards, and a uniform width reads
   better than two half-page cards when a short run of notes qualifies. The two
   behave identically whenever the notes fill their first row. */
body.atlas .atlas-writing-notes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--atlas-gap-tile);
  margin-top: 16px;
}

body.atlas .atlas-writing-note {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 14px 16px;
  background: var(--atlas-plate-surface);
  border: 1px solid var(--atlas-rule);
}

body.atlas .atlas-writing-note-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .atlas-writing-note-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--atlas-ink);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   Writing index responsive (below 820px)
   The shared atlas breakpoint (JON-1447). One column, and the essay row drops
   its third column so the date and read time sit under the title instead of
   squeezing it.
   ========================================================================== */

@media (max-width: 820px) {
  body.atlas .atlas-writing-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }

  body.atlas .atlas-writing-fig {
    margin-top: 32px;
  }

  /* Uniform scaling keeps the month labels readable, so the chart holds a
     floor and scrolls sideways instead: the treatment the theory page's
     matrix already uses. */
  body.atlas .atlas-writing-chart {
    min-width: 640px;
  }

  body.atlas .atlas-writing-cadence-head {
    flex-direction: column;
    gap: 6px;
  }

  body.atlas .atlas-writing-entry {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
  }

  body.atlas .atlas-writing-entry-cover {
    width: 48px;
    height: 48px;
  }

  body.atlas .atlas-writing-entry-cover img {
    width: 48px;
    height: 48px;
  }

  body.atlas .atlas-writing-entry-meta {
    grid-column: 2;
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
    line-height: 1.4;
    margin-top: 6px;
  }

  body.atlas .atlas-writing-entry-title {
    font-size: 18px;
  }
}

/* ==========================================================================
   17. Contact dossier (JON-1473)
   Translated from docs/design/2026-09-04-neuro-atlas/contact-dossier.dc.html,
   which styles everything inline, plus the three state renders in
   screenshots/contact-dossier-{chris,valerie,charlotte}.jpg.

   Two class families live here:
   (a) .atlas-dossier-* for the shapes the dossier owns outright, and
   (b) page-scoped restyles of the legacy .contact-* classes that
       public/contacts/contact.html still declares in its own <style> block
       (tabs, personal-notes editor, relationship dynamics, contact-details
       card, AI context summary). Those keep their dark-theme rules for every
       other consumer; only this scope repaints them on paper.

   The dossier is a runtime-rendered page, so public/js/contacts/dossier.js
   assigns most of these classes from lookup tables of full literals. Adding a
   modifier means adding it in BOTH places or the class-coverage test in
   tests/test_atlas_css.py will not see it.

   Deliberate departures from the design, recorded in the package MANIFEST:
   the section head is three flat children (num, title, meta) rather than the
   design's nested span pair, so the design's 16px head gap becomes a
   margin-left on the meta and the title carries margin-right: auto; the
   timeline event dot and the legend dot share ONE colour family
   (.atlas-dossier-dot--*) instead of two parallel sets; and the muted grey is
   the AA-corrected --text-muted, not the design's #7c848c (JON-1427).

   Section 17 sits last in the file for the reason section 16 did: this file
   interleaves responsive blocks with later base sections, so a page's own
   820px block has to come after its base rules to win at equal specificity.
   ========================================================================== */

/* Tokens ------------------------------------------------------------------ */

body.atlas {
  /* The dossier's two signal colours plus the "no direction" grey, straight
     from the design's renderVals() palette (WARM/WARMBG/GREEN and byFg). */
  --atlas-dossier-warm: #9a5b2b;
  --atlas-dossier-warm-bg: #f5ece3;
  --atlas-dossier-green: #5f7f5a;
  --atlas-dossier-dash: #b4bac0;
  /* contact.html's legacy block references --contact-accent 27 times for an
     amber that has no place on paper. Redefining it once here retires the
     amber everywhere at no edit cost. */
  --contact-accent: var(--accent);
}

/* Page layout ------------------------------------------------------------- */

body.atlas .atlas-dossier {
  margin-top: 32px;
}

body.atlas .atlas-dossier-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .atlas-dossier-crumbs a {
  color: var(--text-muted);
}

body.atlas .atlas-dossier-crumbs a:hover {
  color: var(--accent);
}

body.atlas .atlas-dossier-crumb-here {
  color: var(--atlas-ink);
}

/* Identity band ----------------------------------------------------------- */

body.atlas .atlas-dossier-identity {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px 40px;
  margin-top: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--atlas-ink);
}

body.atlas .atlas-dossier-identity-who {
  flex: 1 1 380px;
  min-width: 0;
}

body.atlas .atlas-dossier-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--atlas-gap-chip);
}

body.atlas .atlas-dossier-name {
  margin: 14px 0 0;
  font-family: var(--atlas-font-display);
  font-weight: 400;
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--atlas-ink);
  text-wrap: balance;
}

body.atlas .atlas-dossier-org {
  margin: 8px 0 0;
  font-size: 17px;
  color: var(--text-secondary);
}

body.atlas .atlas-dossier-sub {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--text-muted);
  text-wrap: pretty;
}

body.atlas .atlas-dossier-sub a {
  color: var(--atlas-ink);
}

body.atlas .atlas-dossier-sub a:hover {
  color: var(--accent);
}

/* Hidden until the dossier fetch fills it; dossier.js flips it to flex. */
body.atlas .atlas-dossier-move {
  display: none;
  flex: 0 1 360px;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-top: 6px;
}

body.atlas .atlas-dossier-state {
  font-family: var(--atlas-font-display);
  font-style: italic;
  font-size: 24px;
  line-height: 1.2;
  color: var(--atlas-ink);
  text-wrap: pretty;
}

body.atlas .atlas-dossier-ball-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

body.atlas .atlas-dossier-ball-na {
  font-size: 14px;
  font-style: italic;
  color: var(--text-muted);
}

body.atlas .atlas-dossier-hint {
  font-size: 13px;
  color: var(--text-secondary);
}

body.atlas .atlas-dossier-last {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* Pills: one base, nine colour encodings, six sizes ------------------------ */

body.atlas .atlas-dossier-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--atlas-gap-chip);
  border: 1px solid var(--atlas-tile-border);
  border-radius: var(--atlas-radius);
  font-family: var(--font-mono);
  white-space: nowrap;
}

body.atlas a.atlas-dossier-pill {
  text-decoration: none;
}

body.atlas a.atlas-dossier-pill:hover {
  border-color: var(--atlas-ink);
}

body.atlas .atlas-dossier-pill--ok {
  border-color: var(--accent);
  background: var(--atlas-accent-tint);
  color: var(--atlas-ink);
}

body.atlas .atlas-dossier-pill--todo {
  border-color: var(--atlas-dossier-warm);
  background: var(--atlas-dossier-warm-bg);
  color: var(--atlas-dossier-warm);
}

body.atlas .atlas-dossier-pill--neutral {
  border-color: var(--atlas-tile-border);
  background: var(--atlas-tile-surface);
  color: var(--text-secondary);
}

body.atlas .atlas-dossier-pill--ghost {
  border-style: dashed;
  border-color: var(--text-muted);
  background: transparent;
  color: var(--accent);
}

body.atlas .atlas-dossier-pill--ink {
  border-color: var(--atlas-ink);
  background: var(--atlas-ink);
  color: var(--atlas-page);
}

body.atlas .atlas-dossier-pill--inkline {
  border-color: var(--atlas-ink);
  background: transparent;
  color: var(--atlas-ink);
}

body.atlas .atlas-dossier-pill--warmline {
  border-color: var(--atlas-dossier-warm);
  background: transparent;
  color: var(--atlas-dossier-warm);
}

body.atlas .atlas-dossier-pill--blueline {
  border-color: var(--accent);
  background: transparent;
  color: var(--accent);
}

body.atlas .atlas-dossier-pill--blue {
  border-color: var(--accent);
  background: var(--atlas-accent-tint);
  color: var(--accent);
}

body.atlas .atlas-dossier-pill--badge {
  padding: 4px 9px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.atlas .atlas-dossier-pill--loop {
  padding: 3px 8px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.atlas .atlas-dossier-pill--chip {
  padding: 4px 9px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: none;
}

body.atlas .atlas-dossier-pill--mini {
  padding: 2px 7px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: none;
}

/* Sits inside a section head, so it inherits that row's 11px uppercase. */
body.atlas .atlas-dossier-pill--head {
  padding: 3px 8px;
  letter-spacing: 0.1em;
}

body.atlas .atlas-dossier-pill--ball {
  padding: 7px 12px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Grid and section shell -------------------------------------------------- */

body.atlas .atlas-dossier-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  margin-top: 40px;
  align-items: flex-start;
}

body.atlas .atlas-dossier-main {
  flex: 3 1 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

body.atlas .atlas-dossier-rail {
  flex: 1 1 260px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

body.atlas .atlas-dossier-section {
  border-top: 1px solid var(--atlas-ink);
  padding-top: 12px;
}

body.atlas .atlas-dossier-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  row-gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.atlas .atlas-dossier-num {
  color: var(--accent);
}

/* margin-right: auto pushes the meta to the far edge without a flex gap that
   would also open up the 14px between the number and the title. */
body.atlas .atlas-dossier-title {
  margin-left: 14px;
  margin-right: auto;
  color: var(--text-muted);
}

body.atlas .atlas-dossier-meta {
  margin-left: 16px;
  color: var(--text-muted);
}

body.atlas .atlas-dossier-meta a {
  letter-spacing: 0.1em;
  color: var(--accent);
}

body.atlas .atlas-dossier-meta a:hover {
  color: var(--atlas-ink);
}

body.atlas .atlas-dossier-skeleton {
  height: 52px;
  margin-top: 18px;
  background: linear-gradient(
    90deg,
    var(--atlas-plate-surface) 25%,
    var(--atlas-tile-surface) 50%,
    var(--atlas-plate-surface) 75%
  );
  background-size: 200% 100%;
  animation: atlas-dossier-shimmer 1.8s ease-in-out infinite;
}

/* atlas-pulse is opacity-only and would read as a blink on paper; the sweep
   is the shape the dark theme already used. The reduced-motion block at the
   top of this file blankets it. */
@keyframes atlas-dossier-shimmer {
  0%, 100% { background-position: 200% 0; }
  50% { background-position: -200% 0; }
}

body.atlas .atlas-dossier-empty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 8px 12px;
  border: 1px solid var(--atlas-tile-border);
  background: var(--atlas-plate-surface);
  font-size: 14px;
  color: var(--text-secondary);
}

body.atlas .atlas-dossier-empty-note {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .atlas-dossier-fine {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* 01 Open loops ----------------------------------------------------------- */

body.atlas .atlas-dossier-loops {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

body.atlas .atlas-dossier-loop {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0 12px;
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--atlas-tile-border);
}

body.atlas .atlas-dossier-loop-n {
  padding-top: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

body.atlas .atlas-dossier-loop-body {
  min-width: 0;
}

body.atlas .atlas-dossier-loop-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
}

body.atlas .atlas-dossier-loop-title {
  flex: 1 1 200px;
  min-width: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--atlas-ink);
}

body.atlas .atlas-dossier-loop-age {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

body.atlas .atlas-dossier-loop-why {
  margin: 6px 0 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  text-wrap: pretty;
}

body.atlas .atlas-dossier-loop-src {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

body.atlas .atlas-dossier-loop-src a {
  color: inherit;
}

body.atlas .atlas-dossier-loop-src a:hover {
  color: var(--accent);
}

body.atlas .atlas-dossier-tasks {
  margin-top: 14px;
  border: 1px solid var(--atlas-tile-border);
  background: var(--atlas-plate-surface);
}

body.atlas .atlas-dossier-tasks > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

body.atlas .atlas-dossier-tasks > summary::-webkit-details-marker {
  display: none;
}

body.atlas .atlas-dossier-tasks-toggle {
  color: var(--text-muted);
}

body.atlas .atlas-dossier-tasks > div {
  padding: 6px 14px 10px;
  border-top: 1px solid var(--atlas-tile-border);
}

/* The legacy container class renderOpenItems() still sets carries its own
   rounded, bordered box; inside the tasks band the band is the box. */
body.atlas .contact-open-items {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}

body.atlas .atlas-dossier-task {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--atlas-hairline);
  font-size: 14px;
}

body.atlas .atlas-dossier-task-t {
  flex: 1 1 200px;
  min-width: 0;
  color: var(--atlas-ink);
}

body.atlas .atlas-dossier-task-pri {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

body.atlas .atlas-dossier-task-status {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* 02 Calls and syntheses -------------------------------------------------- */

body.atlas .atlas-dossier-calls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

body.atlas .atlas-dossier-call {
  padding: 14px 16px;
  border: 1px solid var(--atlas-tile-border);
  background: var(--atlas-plate-surface);
}

body.atlas .atlas-dossier-call-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
}

body.atlas .atlas-dossier-call-date {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

body.atlas .atlas-dossier-call-title {
  flex: 1 1 200px;
  min-width: 0;
  font-family: var(--atlas-font-display);
  font-size: 22px;
  line-height: 1.15;
  color: var(--atlas-ink);
}

body.atlas .atlas-dossier-call-title a {
  color: var(--atlas-ink);
}

body.atlas .atlas-dossier-call-title a:hover {
  color: var(--accent);
}

body.atlas .atlas-dossier-call-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

body.atlas .atlas-dossier-call-one {
  margin: 8px 0 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  text-wrap: pretty;
}

body.atlas .atlas-dossier-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--atlas-gap-chip);
  margin-top: 12px;
}

/* 03 Substack ------------------------------------------------------------- */

body.atlas .atlas-dossier-pub {
  margin: 16px 0 0;
  font-size: 15px;
  color: var(--text-secondary);
}

body.atlas .atlas-dossier-pub b {
  font-weight: 600;
  color: var(--atlas-ink);
}

body.atlas .atlas-dossier-pub a {
  font-family: var(--font-mono);
  font-size: 13px;
}

body.atlas .atlas-dossier-thesis {
  margin: 16px 0 0;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--accent);
  font-family: var(--atlas-font-display);
  font-style: italic;
  font-size: 22px;
  line-height: 1.3;
  color: var(--atlas-ink);
  text-wrap: pretty;
}

body.atlas .atlas-dossier-thesis-src {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .atlas-dossier-posts {
  display: flex;
  flex-direction: column;
  margin-top: 18px;
}

body.atlas .atlas-dossier-post {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--atlas-tile-border);
  font-size: 15px;
}

body.atlas .atlas-dossier-post-date {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

body.atlas .atlas-dossier-post-t {
  flex: 1;
  min-width: 0;
  color: var(--atlas-ink);
}

body.atlas .atlas-dossier-post-t:hover {
  color: var(--accent);
}

body.atlas .atlas-dossier-post-paid {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .atlas-dossier-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

body.atlas .atlas-dossier-stat-n {
  margin-right: var(--atlas-gap-chip);
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--atlas-ink);
  font-variant-numeric: tabular-nums;
}

body.atlas .atlas-dossier-stats-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

body.atlas .atlas-dossier-engage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--atlas-tile-border);
}

body.atlas .atlas-dossier-engage-col {
  min-width: 0;
}

body.atlas .atlas-dossier-engage-h {
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

body.atlas .atlas-dossier-engage-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  padding: 4px 0;
  align-items: baseline;
  font-size: 14px;
  color: var(--text-secondary);
}

body.atlas .atlas-dossier-engage-n {
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: right;
  color: var(--atlas-ink);
  font-variant-numeric: tabular-nums;
}

body.atlas .atlas-dossier-engage-t {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}

body.atlas .atlas-dossier-quote {
  margin: 10px 0 0 50px;
  font-family: var(--atlas-font-display);
  font-style: italic;
  font-size: 17px;
  line-height: 1.35;
  color: var(--text-secondary);
  text-wrap: pretty;
}

/* 04 Who they are --------------------------------------------------------- */

body.atlas .atlas-dossier-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--atlas-gap-tile);
  margin-top: 18px;
}

/* A contact with no author synthesis has no facts; the grid keeps its margin
   otherwise and opens a hole above the personal-notes box. */
body.atlas .atlas-dossier-facts:empty {
  display: none;
}

body.atlas .atlas-dossier-fact {
  padding: 12px 14px;
  border: 1px solid var(--atlas-tile-border);
  background: var(--atlas-plate-surface);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

body.atlas .atlas-dossier-fact-k {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Rail a: working protocol ------------------------------------------------ */

body.atlas .atlas-dossier-rules {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  counter-reset: atlas-dossier-rule;
}

body.atlas .atlas-dossier-rule {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--atlas-tile-border);
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--atlas-ink);
  counter-increment: atlas-dossier-rule;
}

body.atlas .atlas-dossier-rule::before {
  content: counter(atlas-dossier-rule, lower-roman);
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
}

body.atlas .atlas-dossier-prov {
  margin: 8px 0 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

body.atlas .atlas-dossier-add {
  display: block;
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed var(--text-muted);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

body.atlas .atlas-dossier-add:hover {
  border-color: var(--accent);
}

/* Rail b: channels -------------------------------------------------------- */

body.atlas .atlas-dossier-chan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0 16px;
  margin-top: 12px;
  align-items: baseline;
  font-size: 14px;
}

body.atlas .atlas-dossier-chan-h {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--atlas-tile-border);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .atlas-dossier-chan-c {
  padding: 7px 0;
  border-bottom: 1px solid var(--atlas-hairline);
  color: var(--atlas-ink);
}

body.atlas .atlas-dossier-chan-t {
  padding: 7px 0;
  border-bottom: 1px solid var(--atlas-hairline);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

body.atlas .atlas-dossier-chan-by {
  padding: 7px 0;
  border-bottom: 1px solid var(--atlas-hairline);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.atlas .atlas-dossier-chan-by--them {
  color: var(--accent);
}

body.atlas .atlas-dossier-chan-by--you {
  color: var(--atlas-dossier-green);
}

body.atlas .atlas-dossier-chan-by--dash {
  color: var(--atlas-dossier-dash);
}

body.atlas .atlas-dossier-chan-note {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Rail c: timeline -------------------------------------------------------- */

body.atlas .atlas-dossier-tl {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 14px;
  padding-left: 18px;
  border-left: 1px solid var(--atlas-rule);
}

body.atlas .atlas-dossier-ev {
  position: relative;
  padding: 5px 0;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--text-secondary);
}

body.atlas .atlas-dossier-ev-dot {
  position: absolute;
  left: -22px;
  top: 11px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

body.atlas .atlas-dossier-ev-d {
  margin-right: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* Live previews run to 150 characters where the design's mock rows are one
   line. The date and text share this box so the clamp counts both; the dot
   is a sibling outside it, so overflow: hidden cannot clip it. The full text
   is the box's title. */
body.atlas .atlas-dossier-ev-body {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.atlas .atlas-dossier-ev-t {
  color: var(--atlas-ink);
}

body.atlas .atlas-dossier-gap {
  padding: 6px 0;
  font-family: var(--atlas-font-display);
  font-style: italic;
  font-size: 14px;
  color: var(--text-muted);
}

body.atlas .atlas-dossier-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .atlas-dossier-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

body.atlas .atlas-dossier-legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

/* One colour family, worn by both the timeline dot and the legend dot. */
body.atlas .atlas-dossier-dot--call {
  background: var(--atlas-ink);
}

body.atlas .atlas-dossier-dot--dm {
  background: var(--accent);
}

body.atlas .atlas-dossier-dot--mail {
  background: var(--atlas-dossier-green);
}

body.atlas .atlas-dossier-dot--sms {
  background: var(--atlas-dossier-warm);
}

body.atlas .atlas-dossier-dot--other {
  background: var(--text-muted);
}

body.atlas .atlas-dossier-tl-note {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Rail d: footprint ------------------------------------------------------- */

body.atlas .atlas-dossier-foot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--atlas-gap-chip);
  margin-top: 12px;
}

body.atlas .atlas-dossier-foot-tile {
  padding: 10px 8px;
  border: 1px solid var(--atlas-tile-border);
  background: var(--atlas-plate-surface);
  text-align: center;
}

body.atlas .atlas-dossier-foot-n {
  display: block;
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1.1;
  color: var(--atlas-ink);
  font-variant-numeric: tabular-nums;
}

body.atlas .atlas-dossier-foot-l {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Tabs (legacy .contact-tab* markup, repainted) ---------------------------- */

body.atlas .contact-tabs {
  display: flex;
  gap: 28px;
  margin: 0;
  border-bottom: 1px solid var(--atlas-rule);
  overflow-x: auto;
  overflow-y: hidden;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.atlas .contact-tab {
  padding: 12px 0 10px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
}

body.atlas .contact-tab:hover {
  color: var(--atlas-ink);
}

body.atlas .contact-tab.active {
  color: var(--atlas-ink);
  border-bottom-color: var(--atlas-ink);
}

body.atlas .contact-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body.atlas .atlas-dossier-tab-count {
  margin-left: var(--atlas-gap-chip);
  color: var(--accent);
}

/* Page states ------------------------------------------------------------- */

body.atlas .area-loading {
  padding: 64px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .area-loading::after {
  border-color: var(--atlas-tile-border);
  border-top-color: var(--atlas-ink);
}

body.atlas .area-error {
  padding: 32px;
  border: 1px solid var(--atlas-dossier-warm);
  border-radius: 0;
  background: var(--atlas-dossier-warm-bg);
  color: var(--atlas-dossier-warm);
}

body.atlas .login-required {
  padding: 96px 0;
  text-align: center;
}

body.atlas .login-required h2 {
  margin-top: 0;
  font-family: var(--atlas-font-display);
  font-weight: 400;
  font-size: 32px;
  letter-spacing: -0.01em;
  color: var(--atlas-ink);
}

body.atlas .login-required p {
  color: var(--text-muted);
}

body.atlas .login-btn-large {
  gap: 8px;
  padding: 10px 18px;
  background: var(--atlas-ink);
  border: 1px solid var(--atlas-ink);
  border-radius: var(--atlas-radius);
  color: var(--atlas-page);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.atlas .login-btn-large:hover {
  opacity: 1;
  background: transparent;
  color: var(--atlas-ink);
}

body.atlas .contact-unknown-banner {
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 20px;
  border: 1px dashed var(--atlas-dossier-warm);
  border-radius: 0;
  background: var(--atlas-dossier-warm-bg);
}

body.atlas .contact-unknown-banner-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--atlas-dossier-warm);
}

body.atlas .contact-unknown-banner-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

body.atlas .contact-unknown-banner-action {
  padding: 4px 10px;
  border: 1px solid var(--atlas-dossier-warm);
  border-radius: var(--atlas-radius);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--atlas-dossier-warm);
}

body.atlas .contact-unknown-banner-action:hover {
  background: var(--atlas-dossier-warm);
  color: var(--atlas-page);
}

/* Personal notes box (legacy editor, repainted) ---------------------------- */

body.atlas .atlas-dossier-notes-box {
  margin: 20px 0 0;
}

body.atlas .atlas-dossier-notes-box .contact-personal-notes {
  padding: 16px 18px;
  border: 1px solid var(--atlas-tile-border);
  border-radius: 0;
  background: var(--atlas-tile-surface);
}

body.atlas .contact-personal-notes-header {
  align-items: baseline;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

body.atlas .contact-personal-notes-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .contact-personal-notes-edit-btn,
body.atlas .contact-personal-notes-save-btn,
body.atlas .contact-personal-notes-cancel-btn {
  padding: 4px 10px;
  border: 1px solid var(--atlas-ink);
  border-radius: var(--atlas-radius);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--atlas-ink);
}

body.atlas .contact-personal-notes-edit-btn:hover,
body.atlas .contact-personal-notes-save-btn:hover:not(:disabled),
body.atlas .contact-personal-notes-cancel-btn:hover:not(:disabled) {
  background: var(--atlas-ink);
  border-color: var(--atlas-ink);
  color: var(--atlas-page);
  opacity: 1;
}

body.atlas .contact-personal-notes-text {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--atlas-ink);
}

body.atlas .contact-personal-notes-empty {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
}

body.atlas .contact-personal-notes-textarea {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--atlas-tile-border);
  border-radius: var(--atlas-radius);
  background: var(--atlas-page);
  font-size: 15px;
  color: var(--atlas-ink);
}

body.atlas .contact-personal-notes-textarea:focus {
  border-color: var(--accent);
  box-shadow: none;
}

/* Relationship dynamics (legacy callout, flattened to a label/value table) - */

body.atlas .atlas-dossier-dyn {
  margin: 20px 0 0;
  padding: 0;
  border: none;
  border-left: none;
  border-radius: 0;
  background: transparent;
}

body.atlas .contact-relationship-dynamics-title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .contact-relationship-dynamics-body {
  margin-top: 6px;
  font-size: 14.5px;
  color: var(--text-secondary);
}

body.atlas .contact-relationship-dynamics-body .rd-field {
  display: grid;
  grid-template-columns: minmax(110px, 150px) minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--atlas-tile-border);
}

/* A field can carry several value nodes (text, list, nested pairs); pinning
   them to column 2 stacks them beside the label instead of under it. */
body.atlas .contact-relationship-dynamics-body .rd-field > :not(.rd-label) {
  grid-column: 2;
}

body.atlas .contact-relationship-dynamics-body .rd-label {
  margin: 0;
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

body.atlas .contact-relationship-dynamics-body .rd-sublabel {
  margin: 6px 0 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .contact-relationship-dynamics-body .rd-text {
  margin: 0 0 4px;
  color: var(--text-secondary);
}

body.atlas .contact-relationship-dynamics-body .rd-list {
  margin: 2px 0 4px;
  color: var(--text-secondary);
}

body.atlas .contact-relationship-dynamics-body .rd-list li {
  margin-bottom: 2px;
}

/* Contact details (legacy info card inside a disclosure) ------------------- */

body.atlas .atlas-dossier-details {
  margin-top: 16px;
}

body.atlas .atlas-dossier-details > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .atlas-dossier-details > summary::-webkit-details-marker {
  display: none;
}

body.atlas .atlas-dossier-details > summary:hover {
  color: var(--accent);
}

body.atlas .contact-info-card {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px 24px;
  margin: 12px 0 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
}

/* The card's own "Contact Details" label would repeat the disclosure summary
   that opens it, and its only other child is the hidden Add Note button. */
body.atlas .contact-info-header {
  display: none;
}

body.atlas .contact-info-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* The "Add Note" button is a disabled "Coming soon" placeholder and the
   design has no slot for it. Recorded in the package MANIFEST. */
body.atlas .contact-add-note-btn {
  display: none;
}

body.atlas .contact-info-section {
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--atlas-tile-border);
}

body.atlas .contact-info-label {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .contact-info-value {
  font-size: 14px;
  color: var(--atlas-ink);
}

body.atlas .contact-info-list {
  margin: 0;
  padding: 0;
  color: var(--atlas-ink);
}

body.atlas .contact-info-list li {
  margin-bottom: 0;
  padding: 2px 0;
}

body.atlas .contact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--atlas-gap-chip);
}

body.atlas .contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: 1px solid var(--atlas-tile-border);
  border-radius: var(--atlas-radius);
  background: var(--atlas-tile-surface);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

body.atlas .contact-chip:hover {
  border-color: var(--atlas-ink);
  color: var(--atlas-ink);
}

body.atlas .facebook-badge {
  padding: 2px 7px;
  border: 1px solid var(--atlas-tile-border);
  border-radius: var(--atlas-radius);
  background: var(--atlas-tile-surface);
  font-size: 13px;
  color: var(--text-secondary);
}

body.atlas .facebook-since,
body.atlas .facebook-stat-label {
  color: var(--text-muted);
}

body.atlas .facebook-list-chip {
  border: 1px solid var(--atlas-tile-border);
  border-radius: var(--atlas-radius);
  background: var(--atlas-tile-surface);
  color: var(--text-secondary);
}

body.atlas .facebook-engagement {
  border-top: 1px solid var(--atlas-tile-border);
}

body.atlas .facebook-stat-value {
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--atlas-ink);
}

/* AI context summary (legacy module, repainted as section 05) -------------- */

body.atlas .contact-ai-context-section {
  margin-bottom: 0;
}

body.atlas .contact-ai-context {
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

body.atlas .contact-ai-context-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.atlas .contact-ai-context-title {
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--text-muted);
}

body.atlas .contact-ai-context-num {
  margin-right: 14px;
  color: var(--accent);
}

body.atlas .contact-ai-context-regen-btn {
  padding: 4px 10px;
  border: 1px solid var(--atlas-ink);
  border-radius: var(--atlas-radius);
  background: transparent;
  font: inherit;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--atlas-ink);
}

body.atlas .contact-ai-context-regen-btn:hover:not(:disabled) {
  background: var(--atlas-ink);
  border-color: var(--atlas-ink);
  color: var(--atlas-page);
}

/* The warm "stale" chip beside it already carries the signal; the button
   keeps its plain outline rather than growing an amber ring. */
body.atlas .contact-ai-context-regen-btn--stale {
  box-shadow: none;
}

body.atlas .contact-ai-context-sources {
  justify-content: flex-start;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 0;
}

body.atlas .contact-ai-context-badges {
  gap: 8px;
}

body.atlas .contact-ai-context-badge {
  padding: 2px 7px;
  border: 1px solid var(--atlas-tile-border);
  border-radius: var(--atlas-radius);
  background: var(--atlas-tile-surface);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

body.atlas .contact-ai-context-badge--manual {
  border-color: var(--atlas-ink);
  background: var(--atlas-ink);
  color: var(--atlas-page);
}

body.atlas .contact-ai-context-badge--placeholder {
  border-style: dashed;
  border-color: var(--text-muted);
  background: transparent;
  color: var(--accent);
  font-style: normal;
  opacity: 1;
}

body.atlas .contact-ai-context-badge-delta {
  font-weight: 400;
  font-size: 10px;
  color: var(--accent);
}

body.atlas .contact-ai-context-updated {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

body.atlas .contact-ai-context-stale-nudge {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--atlas-dossier-warm);
}

body.atlas .contact-ai-context-stale-nudge-link {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  font-weight: 400;
  color: var(--atlas-dossier-warm);
  text-decoration: underline;
}

body.atlas .contact-ai-context-stale-nudge-link:hover {
  color: var(--atlas-ink);
}

body.atlas .contact-ai-context-stale-nudge-link:focus-visible {
  color: var(--atlas-ink);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body.atlas .contact-ai-context-content {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1.5px solid var(--accent);
  background: var(--atlas-accent-tint);
  font-size: 15px;
  line-height: 1.55;
  color: var(--atlas-ink);
  text-wrap: pretty;
}

body.atlas .contact-ai-context-content h4.contact-ai-context-h2,
body.atlas .contact-ai-context-content h5.contact-ai-context-h3 {
  margin: 14px 0 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .contact-ai-context-content h4.contact-ai-context-h2:first-child {
  margin-top: 0;
}

body.atlas .contact-ai-context-content p,
body.atlas .contact-ai-context-content li {
  color: var(--atlas-ink);
}

body.atlas .contact-ai-context-content strong {
  color: var(--atlas-ink);
}

body.atlas .contact-ai-context-empty {
  margin: 0;
  font-size: 14px;
  font-style: italic;
  color: var(--text-muted);
}

body.atlas .contact-ai-context-loading {
  background: var(--atlas-plate-surface);
}

body.atlas .contact-ai-context-spinner {
  border-color: var(--atlas-tile-border);
  border-top-color: var(--atlas-ink);
}

body.atlas .contact-ai-context-loading-title {
  color: var(--atlas-ink);
}

body.atlas .contact-ai-context-loading-sub {
  color: var(--text-muted);
}

body.atlas .contact-ai-context-warning {
  border: 1px solid var(--atlas-dossier-warm);
  border-radius: var(--atlas-radius);
  background: var(--atlas-dossier-warm-bg);
  color: var(--atlas-dossier-warm);
}

/* Messages, Notes and Projects panels ------------------------------------- */

body.atlas .message-bubble--inbound {
  background: var(--atlas-plate-surface);
  border: 1px solid var(--atlas-tile-border);
  box-shadow: none;
}

body.atlas .message-bubble--inbound:hover {
  box-shadow: none;
}

body.atlas .message-bubble--outbound {
  background: var(--atlas-accent-tint);
  border: 1px solid var(--accent);
  color: var(--atlas-ink);
  box-shadow: none;
}

body.atlas .message-bubble--outbound:hover {
  box-shadow: none;
}

body.atlas .message-bubble--outbound .message-timestamp,
body.atlas .message-bubble--outbound:hover .message-timestamp {
  color: var(--text-muted);
}

body.atlas .message-image-desc {
  background: var(--atlas-tile-surface);
  border: 1px solid var(--atlas-tile-border);
  color: var(--text-muted);
}

body.atlas .message-bubble--outbound .message-image-desc {
  background: var(--atlas-tile-surface);
  border-color: var(--atlas-tile-border);
  color: var(--text-muted);
}

body.atlas .message-group-indicator,
body.atlas .message-bubble--outbound .message-group-indicator {
  background: var(--atlas-tile-surface);
  border-left: 2px solid var(--atlas-tile-border);
  color: var(--text-muted);
}

body.atlas .message-group-indicator:hover,
body.atlas .message-bubble--outbound .message-group-indicator:hover {
  background: var(--atlas-plate-surface);
}

body.atlas .message-group-indicator__overflow,
body.atlas .message-bubble--outbound .message-group-indicator__overflow {
  color: var(--text-muted);
}

body.atlas .messages-date-separator span {
  background: var(--bg);
  border: 1px solid var(--atlas-tile-border);
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--text-muted);
}

body.atlas .messages-load-more-btn {
  border: 1px dashed var(--atlas-tile-border);
  border-radius: var(--atlas-radius);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .messages-load-more-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: transparent;
  color: var(--accent);
}

body.atlas .message-skeleton-bubble {
  background: linear-gradient(
    90deg,
    var(--atlas-plate-surface) 25%,
    var(--atlas-tile-surface) 50%,
    var(--atlas-plate-surface) 75%
  );
  background-size: 200% 100%;
}

body.atlas .contact-section-title {
  font-family: var(--atlas-font-display);
  font-weight: 400;
  font-size: 24px;
  color: var(--atlas-ink);
}

body.atlas .contact-section-desc {
  color: var(--text-muted);
}

body.atlas .contact-add-btn {
  padding: 4px 10px;
  border: 1px solid var(--atlas-ink);
  border-radius: var(--atlas-radius);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--atlas-ink);
}

body.atlas .contact-add-btn:hover {
  opacity: 1;
  background: var(--atlas-ink);
  color: var(--atlas-page);
}

body.atlas .contact-empty-state,
body.atlas .contact-placeholder {
  padding: 24px;
  border: 1px dashed var(--atlas-tile-border);
  border-radius: 0;
  background: var(--atlas-plate-surface);
  color: var(--text-muted);
}

body.atlas .contact-notes-loading {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.atlas .transcript-appearance-card {
  border: 1px solid var(--atlas-tile-border);
  border-radius: 0;
  background: var(--atlas-plate-surface);
}

body.atlas .transcript-appearance-card:hover {
  border-color: var(--accent);
  background: var(--atlas-tile-surface);
}

body.atlas .transcript-appearance-title {
  color: var(--atlas-ink);
}

body.atlas .transcript-appearance-meta {
  color: var(--text-muted);
}

body.atlas .transcript-speaker-label {
  border: 1px solid var(--accent);
  border-radius: var(--atlas-radius);
  background: var(--atlas-accent-tint);
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--accent);
}

/* ==========================================================================
   Contact dossier responsive (below 820px)
   The shared atlas breakpoint. The design's flex-wrap already stacks the rail
   under the main column, so this only rescales the identity band's display
   type and tightens the vertical rhythm.
   ========================================================================== */

@media (max-width: 820px) {
  body.atlas .atlas-dossier-name {
    font-size: clamp(34px, 9vw, 48px);
  }

  body.atlas .atlas-dossier-identity {
    gap: 16px 24px;
  }

  body.atlas .atlas-dossier-move {
    flex-basis: auto;
    padding-top: 0;
  }

  body.atlas .atlas-dossier-state {
    font-size: 21px;
  }

  body.atlas .atlas-dossier-grid {
    gap: 32px;
    margin-top: 28px;
  }

  body.atlas .atlas-dossier-main {
    gap: 36px;
  }

  body.atlas .atlas-dossier-rail {
    gap: 28px;
  }

  body.atlas .contact-tabs {
    gap: 20px;
  }
}
