/* Shared, opt-in primitives. Existing page layouts keep their own styles. */
[hidden] { display: none !important; }
.skip-link:focus { position: fixed; z-index: 100; }
body:has(.xs-stub) { margin: 0; background: var(--color-canvas); }
.xs-stub { box-sizing: border-box; max-width: 1280px; min-height: 50vh; margin: auto; padding: clamp(48px, 8vw, 112px) 24px; font-family: var(--font-body); color: var(--color-ink); }
.xs-stub h1 { max-width: 20ch; font-size: var(--text-heading); font-weight: 550; line-height: 1.04; letter-spacing: -.035em; }
.xs-stub p { font-size: var(--text-body); line-height: 1.6; color: var(--color-muted); }
.xs-section-heading { max-width: 24ch; font-family: var(--font-body); font-size: var(--text-heading); font-weight: 550; line-height: 1.04; letter-spacing: -.035em; }
.component-card { padding: 24px; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-panel); }
.component-card h3 { font-size: var(--text-title); font-weight: 550; line-height: 1.2; margin: 0 0 16px; }
.status-badge { display: inline-flex; align-items: center; width: fit-content; padding: 4px 10px; border-radius: 999px; font-family: var(--font-body); font-size: 13px; font-weight: 600; line-height: 1.5; }
.status-badge[data-status="beta"] { color: var(--color-accent); background: var(--color-accent-soft); }
.status-badge[data-status="coming_soon"] { color: var(--color-caution); background: var(--color-caution-soft); }
.button { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 20px; min-height: 56px; padding: 14px 24px; border: 1px solid transparent; border-radius: var(--radius-button); background: var(--color-accent); color: #fff; font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--color-accent-hover); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; }
.button-small { min-height: 46px; padding: 12px 20px; font-size: 14px; }
[data-tabs], [data-filters], [data-stepper] { margin-block: 24px; }
[role="tablist"], .filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 16px; }
[role="tab"], [data-filter], [data-stepper-prev], [data-stepper-next], [data-copy] { box-sizing: border-box; min-width: 44px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--color-line); border-radius: 999px; font: 600 14px/1.4 var(--font-body); color: var(--color-ink); background: var(--color-surface); cursor: pointer; }
[role="tab"][aria-selected="true"], [data-filter][aria-pressed="true"] { color: var(--color-accent); border-color: var(--color-accent); background: var(--color-accent-soft); }
[role="tabpanel"] { padding-block: 12px; }
[data-capability] { margin-block: 12px; }
[data-filter-count], [data-stepper-status], [data-copy-status] { min-height: 24px; color: var(--color-muted); font-size: 14px; }
[data-stepper] > ol { padding-left: 24px; }
[data-stepper] [data-step] { padding: 12px; margin-block: 12px; }
[data-stepper] [aria-current="step"] { background: var(--color-accent-soft); }
[data-stepper] [disabled] { opacity: .5; cursor: not-allowed; }
.code-block { position: relative; padding: 24px; border-radius: var(--radius-panel); background: var(--color-night); color: #fff; }
.code-block pre { max-width: 100%; overflow-x: auto; white-space: pre; font: 14px/1.7 monospace; margin: 16px 0; }
.code-block [data-copy-status] { color: var(--color-night-muted); }
.code-block pre:focus-visible { outline: 3px solid #c8c0ff; outline-offset: 5px; }
.comparison-table { width: 100%; border-collapse: collapse; text-align: left; }
.comparison-table th, .comparison-table td { padding: 16px; border-bottom: 1px solid var(--color-line); vertical-align: top; }
.comparison-table th { font-weight: 600; }
.table-scroll { overflow-x: auto; }
[data-faq] > details { border-bottom: 1px solid var(--color-line); }
[data-faq] > details > summary { min-height: 44px; padding: 18px 0; font-weight: 600; cursor: pointer; }
[data-faq] > details > p { max-width: 65ch; padding-bottom: 16px; line-height: 1.6; }
.button:focus-visible, [role="tab"]:focus-visible, [data-filter]:focus-visible, [data-stepper-prev]:focus-visible, [data-stepper-next]:focus-visible, [data-copy]:focus-visible, [data-faq] summary:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 5px; }
.component-examples { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.component-examples > * { min-width: 0; }
.component-examples .component-wide { grid-column: 1 / -1; }
@media (max-width: 720px) { .component-examples { grid-template-columns: 1fr; } .component-card { padding: 20px; } }
@media (prefers-reduced-motion: reduce) { [data-tabs] *, [data-stepper] *, .button { transition: none; animation: none; scroll-behavior: auto; } }
@media (forced-colors: active) { .status-badge, .button, .component-card { border: 1px solid CanvasText; } }

/* Native FAQ disclosures share the same right-aligned icon. */
[data-faq] summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; list-style: none; }
[data-faq] summary::-webkit-details-marker { display: none; }
[data-faq] summary::after { content: '+'; flex-shrink: 0; color: var(--color-accent); font-size: 24px; }
[data-faq] details[open] summary::after { content: '\2212'; }
[data-faq] summary svg { display: none; }

/* The reader's pain opens the hero lead as plain copy, set in body ink; never a label above the headline. */
.pain-lead { color: var(--color-ink); font-weight: 600; }
