/* UI Atlas v3 — search-first catalog */
.atlas-v3 { min-width: 320px; padding-bottom: 104px; }
.skip-to-content { position: fixed; z-index: 1000; top: 8px; left: 8px; padding: 10px 14px; color: #fff; background: var(--accent-strong); border-radius: var(--radius-sm); transform: translateY(-150%); }
.skip-to-content:focus { transform: translateY(0); }
.atlas-header { position: relative; z-index: 40; display: flex; min-height: 64px; padding: 10px clamp(16px, 4vw, 56px); align-items: center; gap: 18px; color: var(--ink); background: color-mix(in srgb, var(--surface) 92%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); }
.atlas-brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.atlas-brand strong, .atlas-brand small { display: block; line-height: 1.25; }
.atlas-brand strong { font-size: 16px; letter-spacing: -0.02em; }
.atlas-brand small { margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: 0.08em; }
.atlas-mark { display: grid; width: 38px; height: 38px; place-items: center; color: #fff; background: var(--accent); border-radius: 10px; font-size: 12px; font-weight: 900; letter-spacing: -0.03em; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18); }
.atlas-count { margin: 0 0 0 auto; color: var(--muted); font-size: 12px; }
.atlas-count strong { color: var(--ink); }
.icon-control, .action-control, .text-control, .detail-actions button, .code-actions button { min-height: 40px; padding: 8px 12px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 9px; font-weight: 750; }
.icon-control { display: inline-grid; width: 40px; padding: 0; flex: 0 0 auto; place-items: center; }
.action-control:hover, .detail-actions button:hover, .code-actions button:hover { border-color: var(--accent); }
.primary-action { color: #fff; background: var(--accent); border-color: var(--accent); }
.primary-action:hover { color: #fff; background: var(--accent-strong); }
.text-control { min-height: auto; padding: 6px 2px; color: var(--accent); background: transparent; border: 0; }
.atlas-main { width: min(100%, 1600px); margin: 0 auto; }
.explore-shell { position: sticky; z-index: 30; top: 0; padding: 18px clamp(16px, 4vw, 56px) 12px; background: color-mix(in srgb, var(--bg) 94%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(20px); }
.search-row { display: grid; grid-template-columns: minmax(280px, 1fr) auto; align-items: end; gap: 16px; }
.search-block > label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 850; }
.search-block > p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.search-input-wrap { position: relative; display: flex; min-height: 52px; align-items: center; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-sm); }
.search-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-input-wrap svg { width: 20px; height: 20px; margin-left: 15px; fill: none; stroke: var(--muted); stroke-linecap: round; stroke-width: 2; }
.search-input-wrap input { width: 100%; min-width: 0; height: 50px; padding: 0 46px 0 12px; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 15px; }
.search-input-wrap button { position: absolute; right: 8px; display: grid; width: 36px; height: 36px; padding: 0; place-items: center; color: var(--muted); background: var(--surface-muted); border: 0; border-radius: 8px; font-size: 20px; }
.explore-actions { display: flex; padding-bottom: 21px; gap: 8px; }
.explore-actions button[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.filter-row { display: flex; margin-top: 12px; align-items: stretch; flex-direction: column; gap: 8px; }
.category-strip { display: flex; min-width: 0; padding-bottom: 2px; flex: 1; gap: 5px; overflow-x: auto; scrollbar-width: thin; }
.category-strip button, .active-filters button, .compare-chips button { display: inline-flex; min-height: 34px; padding: 6px 10px; align-items: center; gap: 6px; white-space: nowrap; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 750; }
.category-strip button small { color: var(--faint); font-size: 9px; }
.category-strip button[aria-pressed="true"] { color: #fff; background: var(--ink); border-color: var(--ink); }
.category-strip button[aria-pressed="true"] small { color: rgb(255 255 255 / 0.68); }
.filter-controls { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 6px; }
.filter-controls > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.filter-controls select { min-height: 36px; padding: 6px 30px 6px 9px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-size: 11px; font-weight: 700; }
.density-control { display: flex; min-width: 150px; padding: 3px; background: var(--surface-muted); border-radius: 9px; }
.density-control button { min-height: 29px; padding: 4px 8px; flex: 1; color: var(--muted); background: transparent; border: 0; border-radius: 6px; font-size: 10px; font-weight: 750; }
.density-control button[aria-pressed="true"] { color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm); }
.active-filters { display: flex; margin-top: 10px; flex-wrap: wrap; gap: 6px; }
.active-filters button { min-height: 30px; color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.catalog-section { padding: 28px clamp(16px, 4vw, 56px) 80px; }
.results-head { display: flex; margin-bottom: 18px; align-items: end; justify-content: space-between; gap: 16px; }
.eyebrow { margin: 0 0 5px; color: var(--accent); font-size: 9px; font-weight: 900; letter-spacing: 0.14em; }
.results-head h1 { margin: 0; font-size: clamp(22px, 3vw, 34px); line-height: 1.2; letter-spacing: -0.04em; }
.results-head p:not(.eyebrow) { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.atlas-v3 .component-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.atlas-v3 .component-card { position: relative; display: block; min-width: 0; min-height: 0; grid-template-rows: none; overflow: hidden; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); text-align: left; cursor: default; transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease; }
.atlas-v3 .component-card:hover { border-color: var(--line-strong); box-shadow: 0 8px 28px rgb(23 24 28 / 0.09); transform: translateY(-1px); }
.card-main { display: block; width: 100%; padding: 0; color: inherit; text-align: left; background: transparent; border: 0; }
.atlas-v3 .card-preview { position: relative; display: block; min-height: 176px; padding: 14px; overflow: hidden; background: color-mix(in srgb, var(--surface-muted) 72%, var(--surface)); border-bottom: 1px solid var(--line); }
.atlas-v3 .card-preview .preview-stage { min-height: 146px; }
.atlas-v3 .card-placement-map { position: absolute; right: 8px; bottom: 8px; display: flex; padding: 4px; align-items: center; gap: 4px; color: var(--muted); background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line); border-radius: 7px; backdrop-filter: blur(8px); }
.card-placement-map small { font-size: 8px; font-weight: 800; }
.atlas-v3 .card-copy { display: flex; min-height: 176px; padding: 14px 14px 10px; flex-direction: column; }
.atlas-v3 .card-meta, .card-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.atlas-v3 .card-category, .type-chip, .verification-chip, .placement-chip, .detail-badges span, .support-badge { display: inline-flex; min-height: 22px; padding: 3px 7px; align-items: center; color: var(--muted); background: var(--surface-muted); border: 1px solid var(--line); border-radius: 6px; font-size: 8px; font-weight: 850; letter-spacing: 0.02em; }
.verification-chip { color: var(--success); background: var(--success-soft); border-color: transparent; }
.atlas-v3 .card-title { display: block; margin-top: 11px; font-size: 18px; line-height: 1.3; letter-spacing: -0.025em; }
.atlas-v3 .card-title span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: 0; }
.card-description { display: -webkit-box; margin-top: 9px; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card-foot { margin-top: auto; padding-top: 12px; }
.match-reason { margin: 7px 0 0; color: var(--accent); font-size: 9px; font-weight: 750; }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.card-actions button { min-height: 38px; padding: 7px 8px; color: var(--muted); background: transparent; border: 0; font-size: 10px; font-weight: 750; }
.card-actions button + button { border-left: 1px solid var(--line); }
.card-actions button[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.component-grid[data-density="compact"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.component-grid[data-density="compact"] .card-preview { display: none; }
.component-grid[data-density="compact"] .card-copy { min-height: 146px; }
.empty-results { padding: 64px 20px; text-align: center; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 14px; }
.empty-results h2, .empty-results p { margin: 0; }
.empty-results p { margin: 6px 0 18px; color: var(--muted); }
.load-more-wrap { display: grid; margin-top: 24px; place-items: center; gap: 8px; }
.load-more-wrap[hidden] { display: none; }
.load-more-wrap p { margin: 0; color: var(--muted); font-size: 11px; }
.load-more-wrap button { min-width: 220px; }
.p-button.pill { border-radius: 999px; }
.p-segmented,
.p-split { display: inline-flex; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.p-segmented button { min-height: 40px; padding: 0 12px; color: var(--ink); background: transparent; border: 0; border-right: 1px solid var(--line); font: inherit; }
.p-segmented button:last-child { border-right: 0; }
.p-segmented button.active { color: var(--accent-strong); background: var(--accent-soft); font-weight: 700; }
.p-split .p-button { border: 0; border-radius: 0; }
.p-split .p-button + .p-button { min-width: 42px; padding-inline: 10px; border-left: 1px solid color-mix(in srgb, white 35%, transparent); }
.p-switch { position: relative; display: inline-flex; min-height: 44px; align-items: center; gap: 12px; color: var(--ink); font-weight: 650; }
.p-switch > span { min-width: max-content; white-space: nowrap; writing-mode: horizontal-tb; }
.p-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.p-switch i { position: relative; width: 48px; height: 28px; flex: 0 0 48px; order: -1; border-radius: 999px; background: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-strong) 40%, transparent); }
.p-switch i::after { content: ''; position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgb(15 23 42 / 25%); }
.p-input-group { display: flex; width: min(100%, 300px); }
.p-input-group i { display: grid; min-width: 44px; place-items: center; color: var(--muted); background: var(--surface-subtle); border: 1px solid var(--line-strong); border-right: 0; border-radius: 9px 0 0 9px; font-style: normal; font-weight: 700; }
.p-input-group .p-input { border-radius: 0 9px 9px 0; }
.p-drop-zone { display: grid; width: min(100%, 340px); min-height: 132px; padding: 18px; place-items: center; align-content: center; gap: 6px; color: var(--ink); text-align: center; background: var(--surface-subtle); border: 2px dashed var(--line-strong); border-radius: 12px; }
.p-drop-zone span { color: var(--muted); font-size: 12px; }
.p-drop-zone input { max-width: 100%; margin-top: 4px; font-size: 11px; }
.p-stepper { display: inline-grid; grid-template-columns: 42px 54px 42px; align-items: center; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.p-stepper button { min-height: 42px; border: 0; background: transparent; color: var(--ink); font: inherit; }
.p-stepper output { display: grid; min-height: 42px; place-items: center; border-right: 1px solid var(--line); border-left: 1px solid var(--line); font-family: var(--font-mono); }
.p-speed-dial { display: grid; justify-items: center; gap: 7px; }
.p-editor { width: min(100%, 380px); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.p-toolbar { display: flex; gap: 5px; padding: 6px; border-bottom: 1px solid var(--line); }
.p-toolbar button { min-width: 34px; min-height: 32px; color: var(--ink); background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 6px; }
.p-editable { min-height: 92px; padding: 12px; color: var(--ink); }
.p-code { color: #dbeafe; background: #0f172a; font-family: var(--font-mono); }
.p-color { width: 64px; height: 46px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); }
.p-heading { margin: 0; color: var(--ink); font: 700 clamp(24px, 4vw, 36px)/1.15 var(--font-sans); letter-spacing: -0.03em; }
.p-chart { display: flex; width: min(100%, 320px); height: 130px; margin: 0; padding: 12px 14px 0; align-items: end; gap: 12px; border-bottom: 1px solid var(--line-strong); }
.p-chart span { flex: 1; min-width: 18px; background: linear-gradient(180deg, var(--accent), var(--accent-strong)); border-radius: 5px 5px 0 0; }
.p-ring { display: grid; width: 96px; aspect-ratio: 1; place-items: center; border-radius: 50%; background: conic-gradient(var(--accent) 0 68%, var(--line) 68% 100%); }
.p-ring::before { content: ''; grid-area: 1 / 1; width: 72px; aspect-ratio: 1; border-radius: 50%; background: var(--surface); }
.p-ring span { z-index: 1; grid-area: 1 / 1; color: var(--ink); font-family: var(--font-mono); font-weight: 700; }
.reference-preview { display: grid; width: min(100%, 280px); min-height: 132px; padding: 18px; align-content: center; justify-items: start; gap: 5px; color: var(--ink); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 12px; }
.reference-preview .eyebrow { margin: 0; }
.reference-preview strong { color: var(--accent); font-size: 16px; }
.reference-preview span { color: var(--muted); font-family: var(--font-mono); font-size: 10px; }
.reference-preview p:not(.eyebrow) { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.verification-chip[data-fidelity="structural-reference"] { color: var(--warning); background: var(--warning-soft); }
.compare-tray { position: fixed; z-index: 45; right: 20px; bottom: 16px; left: 20px; display: flex; width: min(840px, calc(100% - 40px)); min-height: 68px; margin: auto; padding: 10px 12px; align-items: center; justify-content: space-between; gap: 12px; background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow-md); backdrop-filter: blur(18px); }
.compare-tray > div:first-child { display: flex; min-width: 0; align-items: center; gap: 10px; }
.compare-tray strong { white-space: nowrap; font-size: 11px; }
.compare-chips { display: flex; min-width: 0; gap: 5px; overflow-x: auto; }
.compare-tray-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; }
.atlas-dialog { width: min(1120px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--shadow-md); }
.atlas-dialog::backdrop { background: rgb(11 12 16 / 0.66); backdrop-filter: blur(4px); }
.dialog-heading, .detail-heading { display: flex; padding: 20px 24px; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.dialog-heading h2, .dialog-heading p, .detail-heading h2, .detail-heading p { margin: 0; }
.dialog-heading h2 { font-size: 24px; letter-spacing: -0.035em; }
.dialog-heading p:not(.eyebrow) { margin-top: 4px; color: var(--muted); font-size: 12px; }
.finder-dialog { width: min(900px, calc(100% - 32px)); }
.finder-progress { position: sticky; z-index: 1; top: 0; padding: 10px 24px; color: var(--success); background: var(--success-soft); border-bottom: 1px solid color-mix(in srgb, var(--success) 25%, var(--line)); font-size: 12px; font-weight: 850; }
.finder-progress[data-empty="true"] { color: var(--danger); background: var(--danger-soft); }
.finder-questions { display: grid; padding: 22px 24px; grid-template-columns: 1fr 1fr; gap: 16px; }
.finder-questions fieldset { min-width: 0; margin: 0; padding: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.finder-questions legend { padding: 0 4px; font-size: 13px; font-weight: 850; }
.finder-questions legend span { display: inline-grid; width: 22px; height: 22px; margin-right: 5px; place-items: center; color: #fff; background: var(--accent); border-radius: 999px; font-size: 10px; }
.finder-questions label { display: flex; min-height: 38px; margin-top: 5px; padding: 7px 9px; align-items: center; gap: 8px; background: var(--surface); border: 1px solid transparent; border-radius: 8px; font-size: 11px; }
.finder-questions label:has(input:checked) { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); font-weight: 750; }
.finder-questions input { accent-color: var(--accent); }
.dialog-actions { position: sticky; bottom: 0; display: flex; padding: 14px 24px; justify-content: flex-end; gap: 8px; background: var(--surface); border-top: 1px solid var(--line); }
.detail-dialog { width: min(1280px, calc(100% - 24px)); }
.detail-article { min-width: 0; }
.detail-heading { position: sticky; z-index: 12; top: 0; background: color-mix(in srgb, var(--surface) 95%, transparent); backdrop-filter: blur(18px); }
.detail-heading h2 { font-size: clamp(26px, 4vw, 42px); line-height: 1.15; letter-spacing: -0.045em; }
.detail-name-en { margin-top: 2px !important; color: var(--muted); font-size: 15px; font-weight: 750; }
.detail-heading > div:first-child > p:not(.eyebrow, .detail-name-en) { max-width: 740px; margin-top: 9px; color: var(--muted); font-size: 12px; }
.detail-badges { display: flex; margin-top: 12px; flex-wrap: wrap; gap: 5px; }
.detail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.detail-actions button[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.detail-overview { display: grid; padding: 20px 24px; grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; }
.detail-preview-shell, .placement-detail, .platform-section, .related-section, .code-section { min-width: 0; padding: 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.section-heading { display: flex; margin-bottom: 12px; align-items: flex-start; justify-content: space-between; gap: 12px; }
.section-heading h3, .placement-detail h3 { margin: 0; font-size: 15px; letter-spacing: -0.02em; }
.state-tabs { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.state-tabs button { min-height: 28px; padding: 4px 8px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; font-size: 9px; font-weight: 750; }
.state-tabs button[aria-pressed="true"] { color: #fff; background: var(--accent); border-color: var(--accent); }
.detail-live-preview { min-height: 320px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.detail-live-preview .preview-stage { min-height: 318px; }
.detail-live-preview[data-preview-state="disabled"] { opacity: 0.46; filter: grayscale(0.5); pointer-events: none; }
.detail-live-preview[data-preview-state="focus-visible"], .detail-live-preview[data-preview-state="focus"] { outline: 3px solid var(--accent); outline-offset: 2px; }
.detail-live-preview[data-preview-state="invalid"], .detail-live-preview[data-preview-state="error"] { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.detail-live-preview[data-preview-state="loading"] { opacity: 0.68; cursor: progress; }
.preview-note, .verification-note, .code-trust, .support-note { margin: 9px 0 0; color: var(--muted); font-size: 10px; }
.placement-detail { display: flex; flex-direction: column; }
.placement-detail .placement-map { width: 100%; height: 150px; margin: 6px 0 14px; }
.placement-detail > p:last-child { color: var(--muted); font-size: 11px; }
.decision-grid, .spec-grid { display: grid; padding: 0 24px 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.decision-card, .spec-grid > section { min-width: 0; padding: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.decision-card.positive { border-top: 3px solid var(--success); }
.decision-card.negative { border-top: 3px solid var(--danger); }
.decision-card.difference { border-top: 3px solid var(--accent); }
.decision-card h3, .spec-grid h3 { margin: 0 0 8px; font-size: 13px; }
.decision-card ul, .spec-grid ul, .comparison-table ul { margin: 0; padding-left: 17px; color: var(--muted); font-size: 10px; }
.decision-card li + li, .spec-grid li + li, .comparison-table li + li { margin-top: 5px; }
.spec-grid p { margin: 0; color: var(--muted); font-size: 10px; }
.spec-grid a { color: var(--accent); }
.semantic-data { display: grid; margin: 12px 0 0; grid-template-columns: auto 1fr; gap: 4px 8px; color: var(--muted); font-size: 9px; }
.semantic-data dt { font-weight: 850; }
.semantic-data dd { margin: 0; }
.platform-section, .related-section, .code-section { margin: 0 24px 20px; }
.table-scroll, .compare-content { width: 100%; overflow-x: auto; }
.platform-section table, .comparison-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.platform-section th, .platform-section td, .comparison-table th, .comparison-table td { padding: 9px; text-align: left; vertical-align: top; border: 1px solid var(--line); }
.platform-section thead th, .comparison-table thead th, .comparison-table tbody th { color: var(--muted); background: var(--surface-muted); font-weight: 850; }
.support-badge[data-support="native"] { color: var(--success); background: var(--success-soft); border-color: transparent; }
.support-badge[data-support="adapted"] { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.support-badge[data-support="composed"] { color: var(--warning); background: var(--warning-soft); border-color: transparent; }
.support-badge[data-support="not-applicable"] { color: var(--muted); background: var(--surface-muted); }
.related-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.related-list button { padding: 10px; color: var(--ink); text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.related-list button:hover { border-color: var(--accent); }
.related-list strong, .related-list span { display: block; }
.related-list span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.code-actions { display: flex; gap: 6px; }
.code-actions button { min-height: 34px; font-size: 10px; }
.atlas-v3 .code-tabs { display: flex; width: 100%; margin-top: 12px; gap: 0; overflow-x: auto; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 9px 9px 0 0; }
.atlas-v3 .code-tabs button { min-width: 132px; min-height: 54px; padding: 8px 10px; color: var(--muted); text-align: left; background: transparent; border: 0; border-right: 1px solid var(--line); }
.atlas-v3 .code-tabs button span, .atlas-v3 .code-tabs button small { display: block; }
.atlas-v3 .code-tabs button span { color: inherit; font-size: 10px; font-weight: 850; }
.atlas-v3 .code-tabs button small { margin-top: 2px; color: var(--faint); font-size: 8px; }
.atlas-v3 .code-tabs button[aria-selected="true"] { color: var(--accent); background: var(--surface); box-shadow: inset 0 -2px var(--accent); }
.atlas-v3 .code-panel { min-width: 0; padding: 0; background: var(--code-bg); border: 1px solid #292c35; border-top: 0; border-radius: 0 0 9px 9px; }
.code-meta { display: flex; min-height: 38px; padding: 8px 12px; align-items: center; gap: 8px; color: #9ca3b0; border-bottom: 1px solid #292c35; font-size: 9px; font-weight: 750; }
.code-meta span:nth-child(2) { padding: 2px 6px; border: 1px solid currentColor; border-radius: 4px; }
.support-note { margin: 0; padding: 9px 12px; color: #b5bac6; border-bottom: 1px solid #292c35; }
.atlas-v3 .code-panel pre { max-height: 520px; margin: 0; padding: 16px; overflow: auto; color: var(--code-ink); font-family: var(--font-mono); font-size: 10px; line-height: 1.65; tab-size: 2; }
.compare-dialog { width: min(1200px, calc(100% - 24px)); }
.compare-content { padding: 18px; }
.comparison-table { min-width: 850px; table-layout: fixed; }
.comparison-table thead th:first-child, .comparison-table tbody th { width: 140px; }
.comparison-table thead th { position: sticky; z-index: 1; top: 0; }
.comparison-table thead button:first-child { display: block; width: calc(100% - 24px); padding: 0; color: var(--ink); text-align: left; background: transparent; border: 0; font-weight: 850; }
.comparison-table thead button span { display: block; color: var(--muted); font-size: 9px; }
.comparison-table thead button:last-child { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; padding: 0; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 5px; }
.noscript { margin: 20px; padding: 16px; background: var(--warning-soft); border: 1px solid var(--warning); }

@media (min-width: 900px) {
  .category-strip { flex-wrap: wrap; overflow-x: visible; }
}

@media (max-width: 1120px) {
  .atlas-v3 .component-grid, .component-grid[data-density="compact"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-row { align-items: stretch; flex-direction: column; }
  .filter-controls { justify-content: flex-end; }
  .decision-grid, .spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .atlas-v3 { padding-bottom: 128px; }
  .atlas-header { min-height: 56px; padding: 8px 12px; }
  .atlas-count { display: none; }
  .atlas-header .icon-control { margin-left: auto; }
  .explore-shell { padding: 12px; }
  .search-row { grid-template-columns: 1fr; gap: 7px; }
  .search-block > p { display: none; }
  .explore-actions { padding-bottom: 0; overflow-x: auto; }
  .explore-actions .action-control { min-height: 36px; white-space: nowrap; font-size: 10px; }
  .filter-row { margin-top: 8px; }
  .filter-controls { display: grid; width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); justify-content: stretch; }
  .filter-controls select { width: 100%; min-width: 0; }
  .density-control { width: 100%; min-width: 0; grid-column: 1 / -1; }
  .density-control button { flex: 1; }
  .catalog-section { padding: 20px 12px 64px; }
  .atlas-v3 .component-grid, .component-grid[data-density="compact"] { grid-template-columns: 1fr; }
  .component-grid[data-density="compact"] .card-copy { min-height: 126px; }
  .atlas-v3 .component-card:hover { transform: none; }
  .compare-tray { right: 8px; bottom: 8px; left: 8px; width: calc(100% - 16px); align-items: stretch; flex-direction: column; }
  .compare-tray > div:first-child { align-items: flex-start; flex-direction: column; }
  .compare-chips { width: 100%; }
  .compare-tray-actions { justify-content: flex-end; }
  .atlas-dialog, .finder-dialog, .detail-dialog, .compare-dialog { width: 100%; max-height: 100dvh; margin: auto 0 0; border-radius: 14px 14px 0 0; }
  .dialog-heading, .detail-heading { padding: 14px; }
  .finder-questions { padding: 14px; grid-template-columns: 1fr; }
  .dialog-actions { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  .detail-heading { align-items: stretch; flex-direction: column; }
  .detail-actions { justify-content: flex-start; }
  .detail-actions .icon-control { margin-left: auto; }
  .detail-overview { padding: 14px; grid-template-columns: 1fr; }
  .detail-live-preview { min-height: 240px; }
  .detail-live-preview .preview-stage { min-height: 238px; }
  .decision-grid, .spec-grid { padding: 0 14px 14px; grid-template-columns: 1fr; }
  .platform-section, .related-section, .code-section { margin: 0 14px 14px; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .state-tabs { justify-content: flex-start; }
  .related-list { grid-template-columns: 1fr; }
  .code-actions { width: 100%; }
  .code-actions button { flex: 1; }
}
