/* Supply-chain atlas. Built from the site's own pieces: .crumbs, .hero, .cat-desc, .dateline, .why,
   .badge, .co-chips, .cat-grid/.cat-card, .btn, and the directory controls (.dir-bar, .dir-search,
   .dir-select, .dir-seg, .dir-btn, .dir-count, .cc-chip). Only atlas-specific layout lives here,
   and every color is a shared Stone Light/Dark token from style.css. */

/* ---- Page frame ---- */
.atlas-top { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px 16px; margin-top:18px; }
.atlas-top .crumbs { margin:0; }
.atlas-updated { margin:0; }
.atlas-hero { padding:28px 0 4px; }
.atlas-hero .kind { margin:0 0 6px; }
.atlas-hero .cat-desc { max-width:46rem; }
.atlas[data-view=hub] .atlas-hero h1 { font-size:40px; }
.atlas-hero:has(.atlas-tile) { display:flex; align-items:center; gap:20px; }
.atlas-tile { flex:none; display:grid; place-items:center; width:76px; height:76px; border:1px solid var(--line); border-radius:var(--radius-container); background:var(--card); color:var(--accent); }
.atlas-tile svg { width:46px; height:46px; }
.atlas-hero-copy { min-width:0; }
.atlas .dateline { margin:14px 0 22px; }
.atlas .prose, .atlas .brief { max-width:46rem; }
.atlas .prose { margin:0 0 18px; }
.atlas .lede { max-width:46rem; }
.atlas h1 a { color:inherit; }
.atlas h1 a:hover { text-decoration:underline; text-decoration-color:var(--accent); text-underline-offset:4px; }
.atlas h2 .count { font-size:15px; font-weight:700; color:var(--muted); margin-left:4px; }
.atlas #component-index { scroll-margin-top:80px; }
.atlas [hidden] { display:none !important; }
.atlas .meta { font-size:12.5px; color:var(--muted); }
.atlas .fine { margin:4px 0 10px; }
.atlas .vh { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.atlas :is(button,input,select) { font:inherit; }
.atlas :is(button,a,input,select,summary) { touch-action:manipulation; }
.atlas :is(button,a,input,select,summary,[tabindex]):focus-visible { outline:2px solid var(--link); outline-offset:2px; }
.atlas-note { max-width:46rem; }
.atlas-skip { position:fixed; inset-block-start:8px; inset-inline-start:8px; padding:10px 16px; background:var(--card); color:var(--ink); border:2px solid var(--link); border-radius:var(--radius-el); z-index:20; transform:translateY(-160%); }
.atlas-skip:focus { transform:translateY(0); }

/* ---- Callout and disclosure ---- */
.atlas .brief { margin:0 0 8px; }
.atlas .brief .why { margin-top:0; }
.atlas details { margin-top:10px; border:1px solid var(--line); border-radius:var(--radius-el); background:var(--card); }
.atlas summary { cursor:pointer; list-style:none; padding:11px 14px; font-size:15px; font-weight:700; }
.atlas summary::-webkit-details-marker { display:none; }
.atlas summary::before { content:"\25B6"; display:inline-block; width:1.4em; font-size:11px; color:var(--muted); transition:transform .15s; }
.atlas details[open] > summary::before { transform:rotate(90deg); }
.atlas details > :not(summary) { margin-inline:14px; }
.atlas details > :last-child { margin-bottom:14px; }
.atlas .source-list { font-size:14px; line-height:1.5; padding-inline-start:22px; }
.atlas .source-list li { margin:6px 0; overflow-wrap:anywhere; }
@media (prefers-reduced-motion:reduce) { .atlas summary::before { transition:none; } }

/* ---- Supplier filters ---- */
.atlas .dir-bar { margin-top:14px; }
.atlas .dir-select { flex:0 1 200px; }
.atlas .dir-select select { width:100%; max-width:none; }
.atlas .atlas-reset { font-size:14px; color:var(--link); background:none; border:0; padding:6px 4px; cursor:pointer; text-decoration:underline; text-underline-offset:3px; }
.atlas .count-row { display:flex; flex-wrap:wrap; justify-content:space-between; gap:0 16px; }
.atlas .count-row .dir-count { margin-block:6px 4px; }

/* ---- Supplier table: the site's .dir-table look, with a stacked card layout when narrow ---- */
.atlas .tablewrap { container-type:inline-size; overflow:auto; max-width:100%; }
.atlas .atlas-table { width:100%; border-collapse:collapse; table-layout:fixed; font-size:15px; line-height:1.4; }
.atlas .atlas-table :is(th,td) { text-align:start; vertical-align:top; padding:12px 10px; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.atlas .atlas-table thead th { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.07em; color:var(--muted); padding-block:8px; white-space:nowrap; }
.atlas .atlas-table tbody th { font-weight:400; }
.atlas .atlas-table tbody tr:hover { background:var(--soft); }
.atlas .atlas-table .c-cmp { width:44px; padding-inline:6px 0; }
.atlas .atlas-table .c-sup { width:19%; }
.atlas .atlas-table .c-cc { width:14%; }
.atlas .atlas-table thead th:nth-child(4) { width:25%; }
.atlas .sup-name { display:block; font-weight:650; color:var(--ink); }
.atlas .sup-name:hover { text-decoration:underline; text-decoration-color:var(--accent); text-underline-offset:3px; }
.atlas .atlas-table .dir-sub { white-space:normal; margin-top:2px; }
.atlas .c-cc .cc-chip { white-space:normal; }
.atlas .cc-chip .cc-name { display:inline; }
.atlas .cmp { display:inline-flex; align-items:center; gap:8px; min-height:24px; cursor:pointer; }
.atlas .cmp-t { display:none; font-size:13px; font-weight:600; color:var(--ink-2); }
.atlas input[type=checkbox] { width:18px; height:18px; margin:0; accent-color:var(--accent); cursor:pointer; }
.atlas .rel-chips { display:flex; flex-wrap:wrap; gap:6px; list-style:none; margin:0 0 8px; padding:0; }
.atlas .rel { display:inline-flex; flex-wrap:wrap; align-items:baseline; gap:0 6px; max-width:100%; padding:1px 9px; border:1px solid var(--line); border-radius:14px; background:var(--card); font-size:13.5px; line-height:1.5; }
.atlas .rel a { color:var(--ink); font-weight:600; }
.atlas .rel a:hover { color:var(--link); }
.atlas .rel span { color:var(--muted); font-size:12px; white-space:nowrap; }
.atlas .ev-note { margin:0; font-size:13.5px; line-height:1.45; color:var(--muted); }
.atlas td.empty { padding:28px 10px; text-align:center; color:var(--ink-2); }

@container (max-width:759px) {
  .atlas .atlas-table, .atlas .atlas-table tbody { display:block; }
  .atlas .atlas-table thead { display:none; }
  .atlas .atlas-table:not(.compare-table) tr { display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:12px; row-gap:6px; padding:14px 2px; border-bottom:1px solid var(--line); }
  .atlas .atlas-table :is(th,td) { display:block; width:auto !important; padding:0; border:0; }
  .atlas .atlas-table tbody tr:hover { background:none; }
  .atlas .atlas-table td[data-label]::before { content:attr(data-label); display:block; margin-bottom:1px; font-size:11.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); }
  .atlas .atlas-table .c-sup { grid-column:1; grid-row:1; font-size:16px; }
  .atlas .atlas-table .c-cmp { grid-column:2; grid-row:1; }
  .atlas .atlas-table .c-cc { grid-column:1 / -1; }
  .atlas .atlas-table td:not(.c-cmp):not(.c-cc) { grid-column:1 / -1; }
  .atlas .cmp-t { display:inline; }
  .atlas .atlas-table td.empty { display:block; grid-column:1 / -1; }
  .atlas tr:has(td.empty) { display:block; }
}

/* ---- Comparison dialog ---- */
.atlas dialog { color:var(--ink); border:1px solid var(--line-strong); border-radius:var(--radius-container); width:min(1000px,94vw); max-height:88vh; max-height:88dvh; padding:22px 24px; background:var(--card); box-shadow:0 12px 40px var(--shadow); }
.atlas dialog:modal { overscroll-behavior:contain; }
.atlas dialog::backdrop { background:rgb(0 0 0 / .55); overflow:hidden; overscroll-behavior:contain; }
.atlas .dialog-top { display:flex; justify-content:space-between; gap:20px; align-items:center; }
.atlas .dialog-top form { margin:0; }
.atlas dialog h2 { margin:0; padding:0; border:0; font-size:22px; line-height:1.25; }
.atlas dialog .btn { min-height:40px; padding:6px 16px; font-size:15px; }
.atlas .compare-table { margin-top:6px; }
.atlas .compare-table thead th { font-size:14px; letter-spacing:0; text-transform:none; color:var(--ink); font-weight:700; }
.atlas .compare-table tbody th { width:150px; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.07em; color:var(--muted); }
.atlas .compare-table thead th:first-child { width:150px; }
.atlas .compare-table td { font-size:14px; }
.atlas .compare-table details { margin-top:6px; background:none; border:0; border-radius:0; }
.atlas .compare-table summary { padding:0; font-size:13px; font-weight:600; color:var(--link); min-height:0; }
.atlas .compare-table summary::before { width:1.2em; }
.atlas .compare-table details > :not(summary) { margin-inline:0; }
.atlas .compare-table details > :last-child { margin-bottom:0; }
.atlas .compare-table details p { margin:6px 0 0; }
@container (max-width:759px) {
  .atlas .compare-table tr { display:block; padding:12px 0; border-bottom:1px solid var(--line); }
  .atlas .compare-table tbody th { margin-bottom:6px; }
  .atlas .compare-table td + td { margin-top:8px; }
  .atlas .compare-table td::before { content:attr(data-label); display:block; font-weight:700; color:var(--ink); font-size:13.5px; }
}

/* ---- Comparison bar ---- */
.atlas .comparebar { position:sticky; bottom:12px; display:flex; flex-wrap:wrap; align-items:center; gap:10px 14px; padding:10px 14px; margin:16px 0; background:var(--card); border:1px solid var(--line-strong); border-radius:var(--radius-container); box-shadow:0 6px 24px var(--shadow); z-index:2; font-size:15px; font-weight:600; }
.atlas .comparebar #comparecount { margin-inline-end:auto; }
.atlas .comparebar .btn { min-height:40px; padding:6px 16px; font-size:15px; white-space:nowrap; }
.atlas .btn:disabled { opacity:.5; cursor:default; }
.atlas:has(#comparebar:not([hidden])) .tablewrap { padding-bottom:5rem; }
.atlas:has(#comparebar:not([hidden])) [data-compare] { scroll-margin-bottom:6.5rem; }

/* ---- Hub: schematic and system list ---- */
.atlas .workspace { display:grid; grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr); align-items:start; border:1px solid var(--line); border-radius:var(--radius-container); background:var(--card); overflow:hidden; margin:22px 0 14px; }
.atlas .diagram { position:relative; padding:14px 20px 18px; background-color:var(--bg); background-image:linear-gradient(90deg,var(--line) 1px,transparent 1px),linear-gradient(var(--line) 1px,transparent 1px); background-size:26px 26px; border-inline-end:1px solid var(--line); }
.atlas .diagram svg { width:100%; height:520px; display:block; }
.atlas .view-bar { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:2px 0 10px; }
.atlas .view-bar .kind { margin:0; }
.atlas .view-bar b { color:var(--ink); }
.atlas .dir-seg { background:var(--card); order:0; width:auto; }
.atlas .dir-seg .dir-btn { flex:none; padding:0 14px; font-size:14px; }
.atlas .svg-hot { cursor:pointer; }
.atlas .svg-hot circle { stroke:var(--line-strong); stroke-width:1.5; fill:var(--card); }
.atlas .svg-hot text { fill:var(--ink); font:700 12px var(--font-body); text-anchor:middle; dominant-baseline:middle; }
.atlas .svg-hot.active circle, .atlas .svg-hot:hover circle { fill:var(--card); stroke:var(--accent); stroke-width:2; }
.atlas .svg-hot:focus, .atlas .svg-hot:focus-visible { outline:none; }
.atlas .svg-hot:focus-visible circle { stroke:var(--link); stroke-width:6; }
.atlas .battery-hot { cursor:pointer; }
.atlas .battery-hot:focus, .atlas .battery-hot:focus-visible { outline:none; }
.atlas .battery-hot .battery-hit { fill:transparent; stroke:none; }
.atlas .battery-hot:hover .battery-hit { fill:var(--accent); fill-opacity:.12; stroke:var(--accent); stroke-width:2; }
.atlas .battery-hot.active .battery-hit { stroke:var(--accent); stroke-width:2; }
.atlas .battery-hot:focus-visible .battery-hit { fill:transparent; fill-opacity:1; stroke:var(--link); stroke-width:6; }
.atlas .atlas-panel { padding:22px 24px; min-width:0; }
.atlas .region-tabs { display:flex; gap:6px; flex-wrap:wrap; margin:0 0 20px; }
.atlas .region-tabs .dir-btn { height:34px; border:1px solid var(--line); border-radius:var(--radius-el); background:var(--card); }
.atlas .region-tabs .dir-btn:hover { background:var(--soft); }
.atlas .region-tabs .dir-btn[aria-pressed=true], .atlas .dir-seg .dir-btn[aria-pressed=true] { background:var(--soft); color:var(--ink); border:1px solid var(--ink-2); font-weight:600; }
.atlas .dir-seg .dir-btn[aria-pressed=true] { border-radius:calc(var(--radius-el) - 1px); outline-offset:-2px; }
.atlas #selection .kind { margin:0 0 4px; }
.atlas #selection h2 { margin:0 0 6px; padding:0; border:0; font-size:24px; }
.atlas #selection p:not(.kind) { margin:0 0 14px; color:var(--ink-2); font-size:16px; line-height:1.5; }
.atlas .category-row { display:grid; grid-template-columns:44px minmax(0,1fr) 20px; gap:14px; align-items:center; padding:12px 8px; margin-inline:-8px; border-top:1px solid var(--line); border-radius:var(--radius-el); color:var(--ink); }
.atlas .category-row:hover { background:var(--soft); text-decoration:none; }
.atlas .category-row strong { display:block; font-size:15.5px; }
.atlas .category-row small { display:block; color:var(--muted); font-size:13.5px; line-height:1.4; }
.atlas .category-row .go { color:var(--muted); justify-self:end; }
.atlas .category-row:hover .go { color:var(--accent); }
.atlas .glyph { color:var(--accent); width:40px; height:40px; }
.atlas .cat-grid { margin-top:14px; }
.atlas .cat-card { padding-right:60px; }
.atlas .cat-card h2 { margin:0 0 6px; padding:0; border:0; font-size:18px; line-height:1.3; letter-spacing:-.01em; }
.atlas .cat-card-count { margin-top:auto; }
.atlas .cat-ico { position:absolute; inset-block-start:12px; inset-inline-end:14px; color:var(--accent); line-height:0; }
.atlas .cat-ico svg { width:36px; height:36px; }
.atlas .robot-figure .rear-detail { display:none; }
.atlas .robot-figure[data-view=back] .rear-detail { display:inline; }
.atlas .robot-figure[data-view=back] .front-detail { display:none; }
.atlas .motion-joints { display:none; pointer-events:none; }
.atlas .robot-figure[data-system=motion] .motion-joints { display:inline; }
.atlas .sensing-halo { display:none; pointer-events:none; }
.atlas .robot-figure[data-system=sensing] .sensing-halo { display:inline; }
.atlas .robot-figure[data-system=sensing] .sensor-visor { stroke:var(--accent); stroke-width:2.5; }

/* ---- Supplier dossier ---- */
.atlas .products { font-size:19px; line-height:1.5; margin:0 0 12px; }
.atlas .co-chips { margin:0 0 6px; }
.atlas .rel-list { list-style:none; margin:10px 0 0; padding:0; }
.atlas .relationship { margin:0 0 10px; padding:12px 16px 4px; border:1px solid var(--line); border-radius:var(--radius-el); background:var(--card); }
.atlas .relationship h3 { margin:0 0 4px; padding:0; border:0; font-size:17px; line-height:1.35; }
.atlas .relationship p { margin:0 0 8px; }
.atlas .relationship .rel-role { font-weight:700; }
.atlas .relationship .fine { font-size:13.5px; }
.atlas .relationship .badge { margin-inline-start:4px; }
.atlas .customer-note { margin-top:14px; }
.atlas section > h2 + .fine { margin-top:10px; }

/* ---- Small screens ---- */
@media (max-width:950px) {
  .atlas .workspace { grid-template-columns:minmax(0,1fr); }
  .atlas .diagram { border-inline-end:0; border-bottom:1px solid var(--line); }
  .atlas .diagram svg { height:400px; }
}
@media (max-width:600px) {
  .atlas[data-view=hub] .atlas-hero h1 { font-size:30px; }
  .atlas-hero { padding-top:18px; }
  .atlas-hero:has(.atlas-tile) { gap:14px; align-items:flex-start; }
  .atlas-tile { width:56px; height:56px; }
  .atlas-tile svg { width:34px; height:34px; }
  .atlas .cat-desc { font-size:16px; }
  .atlas .diagram { padding:10px 8px 14px; min-height:415px; }
  .atlas .diagram svg { height:380px; }
  .atlas .atlas-panel { padding:18px 16px; }
  .atlas .comparebar #comparecount { flex-basis:100%; }
  .atlas .comparebar .btn { flex:1 1 auto; padding-inline:10px; }
  .atlas dialog { padding:16px; }
  .atlas .dir-select { flex:1 1 140px; }
  .atlas .relationship { padding-inline:14px; }
}
@media (pointer:coarse) {
  .atlas :is(button,summary) { min-height:44px; }
  .atlas input[type=checkbox] { width:22px; height:22px; }
  .atlas .cmp { min-height:44px; }
}
@media (forced-colors:active) {
  .atlas .svg-hot circle { fill:ButtonFace; stroke:ButtonText; }
  .atlas .svg-hot text { fill:ButtonText; }
  .atlas .svg-hot.active circle, .atlas .svg-hot:hover circle { fill:ButtonFace; stroke:Highlight; }
  .atlas .svg-hot:focus-visible circle { stroke:Highlight; }
  .atlas .battery-hot:hover .battery-hit, .atlas .battery-hot.active .battery-hit { fill:transparent; stroke:Highlight; stroke-width:2; }
  .atlas .battery-hot:focus-visible .battery-hit { fill:transparent; stroke:Highlight; stroke-width:6; }
  .atlas .dir-btn[aria-pressed=true] { outline:2px solid Highlight; }
}
