.atlas-ui { grid-template-rows:54px 44px 58px auto minmax(0,1fr) auto; }
.atlas-modes { grid-column:1/-1;grid-row:2;display:flex;gap:6px;align-items:center; }
.atlas-modes button { min-height:40px;padding:9px 18px;border:1px solid #293449;border-radius:999px;background:#0a1120;color:#a9b6cd;cursor:pointer;font-size:12px;font-weight:700; }
.atlas-modes button[aria-pressed="true"] { color:#e9f8ff;background:#173248;border-color:#65bde0; }
.atlas-modes span { margin-left:7px;color:#7cd8ee;font-size:10px; }
.category-tabs { grid-row:3; }
.molecule-rail,.detail-panel { grid-row:4/7; }
.molecule-heading { grid-row:4; }
.model-stage { grid-row:5; }
.canvas-hint { grid-row:6; }
#matter-atlas[hidden] { display:none; }
.matter-mode .atlas-ui > :is(.category-tabs,.molecule-rail,.molecule-heading,.model-stage,.detail-panel,.canvas-hint) { display:none; }
#matter-atlas { grid-column:1/-1;grid-row:3/-1;min-height:0;display:grid;grid-template-columns:220px minmax(280px,1fr) minmax(280px,340px);grid-template-rows:auto minmax(0,1fr);gap:14px 20px;--matter-color:#83caff; }
.matter-rail { grid-row:1/-1;min-height:0;overflow:auto;padding:14px 10px;background:rgba(8,14,27,.8);border:1px solid #202b3e;border-radius:18px; }
.matter-rail-label { margin:4px 9px 12px;color:#94a7c1;font-size:10px;letter-spacing:.13em;text-transform:uppercase; }
.matter-family { margin:17px 9px 6px;font-size:9px;letter-spacing:.1em;text-transform:uppercase;color:#92a3bd; }
.matter-family:first-of-type { margin-top:0; }
.matter-card { width:100%;display:flex;align-items:center;gap:10px;text-align:left;min-height:49px;border:1px solid transparent;border-radius:11px;padding:8px;background:transparent;color:#b6c4d9;cursor:pointer; }
.matter-card:hover { background:#111e31;color:#fff; }
.matter-card[aria-pressed="true"] { background:color-mix(in srgb,var(--state-color) 12%,#080e1b);border-color:color-mix(in srgb,var(--state-color) 45%,transparent);color:#fff; }
.matter-card-index { color:var(--state-color);font-size:10px;font-variant-numeric:tabular-nums;min-width:21px; }
.matter-card strong { font-size:11px;line-height:1.35;font-weight:600; }
.matter-header { grid-column:2;grid-row:1;text-align:center;padding:15px 10px 0; }
.matter-header .eyebrow { color:var(--matter-color); }
.matter-header h1 { margin:12px 0 9px;letter-spacing:-.04em;font-size:clamp(25px,2.7vw,40px);line-height:1.1;text-wrap:balance; }
.matter-header p { color:#a9b9d0;font-size:12px;line-height:1.6;margin:0 auto;max-width:560px;text-wrap:balance; }
.matter-stage { position:relative;grid-column:2;grid-row:2;min-height:260px;overflow:hidden;border:1px solid #1e2b40;border-radius:22px;background:radial-gradient(ellipse at 50% 40%,color-mix(in srgb,var(--matter-color) 9%,#050a14),#040812 75%); }
.matter-viewport { position:absolute;inset:0 0 95px;touch-action:pan-y;outline-offset:-4px!important; }
.matter-viewport canvas { display:block;width:100%;height:100%; }
.matter-stage-label { position:absolute;top:15px;left:16px;font-size:9px;letter-spacing:.13em;text-transform:uppercase;color:#839bb9;pointer-events:none; }
.matter-legend { position:absolute;top:39px;left:16px;right:16px;display:flex;gap:12px;flex-wrap:wrap;pointer-events:none; }
.matter-legend span { display:flex;gap:5px;align-items:center;color:#aebed2;font-size:10px; }
.matter-legend i { width:6px;height:6px;background:var(--dot);border-radius:50%; }
.matter-controls { position:absolute;bottom:0;left:0;right:0;padding:12px;background:linear-gradient(transparent,#080e1e 30%); }
.matter-buttons { display:flex;justify-content:center;flex-wrap:wrap;gap:5px; }
.matter-buttons button,.matter-pasta button { min-height:36px;padding:7px 10px;border:1px solid #2c3d56;border-radius:9px;background:#101b2d;color:#d6e4f5;cursor:pointer;font-size:10px; }
.matter-buttons button:hover,.matter-pasta button[aria-pressed="true"] { border-color:var(--matter-color);color:#fff; }
.matter-speed { display:flex;justify-content:center;align-items:center;gap:10px;margin-top:10px;font-size:10px;color:#a9b9d0; }
.matter-speed input { width:95px;accent-color:var(--matter-color); }
.matter-speed output { width:34px;font-variant-numeric:tabular-nums; }
.matter-details { grid-column:3;grid-row:1/-1;min-height:0;overflow:auto;border:1px solid #202b3e;border-radius:18px;background:rgba(8,14,27,.88);padding:21px; }
.matter-count { display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;color:#879bb7;font-size:10px;letter-spacing:.12em; }
.matter-count strong { color:var(--matter-color);font-size:22px;font-weight:400;letter-spacing:-.05em; }
.matter-details h2 { margin:0 0 10px;font-size:17px;letter-spacing:-.02em; }
.matter-details p { margin:0 0 17px;font-size:12px;line-height:1.7;color:#becbe0; }
.matter-facts { margin:17px 0; }
.matter-facts div { padding:11px 0;border-top:1px solid #202b3e; }
.matter-facts dt { color:#889dbb;font-size:9px;text-transform:uppercase;letter-spacing:.09em;margin-bottom:5px; }
.matter-facts dd { color:#d4e1f3;font-size:12px;line-height:1.6;margin:0; }
.matter-model-note { border-left:2px solid var(--matter-color);padding:12px;background:#101a2b;border-radius:0 10px 10px 0; }
.matter-model-note h3 { margin:0 0 7px;color:var(--matter-color);font-size:11px; }
.matter-model-note p { font-size:11px;margin:0; }
.matter-details .matter-caveat { font-size:10px;color:#96a9c4;margin:14px 0; }
.matter-source { color:#9bcbff;font-size:11px;text-underline-offset:3px; }
.matter-pasta { display:flex;gap:5px;flex-wrap:wrap;margin-top:12px; }
.matter-pasta[hidden] { display:none; }
.matter-error { margin:80px 24px;color:#cbd8ea;font-size:13px;line-height:1.8; }
.matter-footer { text-align:center;font-size:9px;line-height:1.5;color:#8da3bf;margin-top:8px; }
@media(min-width:1101px) and (max-height:740px) { #matter-atlas { grid-template-columns:205px minmax(260px,1fr) 285px;gap:10px 14px; }.matter-header{padding-top:2px}.matter-header h1{font-size:27px;margin-top:7px}.matter-header p{font-size:11px}.matter-details{padding:16px} }
@media(max-width:1100px) { .atlas-modes{margin-top:14px}.atlas-modes button{min-height:44px;padding:8px 13px}#matter-atlas{margin-top:14px;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto auto;gap:12px}.matter-rail{grid-column:1;grid-row:1;display:flex;gap:5px;padding:8px;overflow-x:auto}.matter-rail-label,.matter-family{display:none}.matter-card{width:160px;flex:0 0 160px;min-height:52px}.matter-header{grid-column:1;grid-row:2;padding:12px 8px 4px}.matter-header h1{font-size:32px}.matter-stage{grid-column:1;grid-row:3;height:58svh;min-height:390px;max-height:620px}.matter-details{grid-column:1;grid-row:4;overflow:visible}.matter-buttons button{min-height:40px}.matter-viewport{bottom:115px}.matter-header p{font-size:13px}.matter-details p,.matter-facts dd{font-size:13px} }
@media(prefers-reduced-motion:reduce) { .matter-card,.atlas-modes button{transition:none} }

.matter-reading { margin:22px 0; }
.matter-reading section + section { margin-top:20px; }
.matter-reading h3 { margin:0 0 8px;color:#e1ecfb;font-size:12px;line-height:1.5; }
.matter-reading p { margin:0;line-height:1.8; }
