.content-main:has(.ref-shell) { padding: 0 0 64px; }
.ref-shell { max-width: 1512px; padding: 28px clamp(18px, 3vw, 48px) 0; margin: auto; font-size: 15px; line-height: 1.6; }
.ref-articles { max-width: 1512px; margin: 28px auto 36px; padding: 0 clamp(18px, 3vw, 48px); }
.ref-articles h2 { margin: 0 0 16px; font-size: 22px; letter-spacing: -.025em; }
.ref-articles ul { max-width: 80ch; margin: 0; padding-inline-start: 1.4rem; }
.ref-articles li + li { margin-block-start: .65rem; }
.ref-articles a { font-size: 16px; font-weight: 650; }
.ref-articles p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.ref-simple { max-width: none; padding: 0; margin: 36px 0 0; }
.ref-simple .ref-workspace { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; }
.ref-picker-label { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--heading); }
.ref-simple-summary { margin-top: 24px; }
.ref-simple .ref-description { font-size: 18px; color: var(--muted); }
.ref-simple-status { margin: 12px 0; font-size: 13px; color: var(--muted); }
.ref-customize { margin-top: 24px; padding-block: 16px; border-block: 1px solid var(--line); }
.ref-customize > summary { color: var(--heading); font-weight: 600; }
.ref-customize [data-reset-example] { margin-top: 12px; }
.ref-customize [data-reset-example]:disabled { opacity: .5; cursor: default; }
.ref-full-link { display: inline-block; margin-top: 20px; font-size: 14px; }
.ref-simple .ref-code:first-child { margin-top: 0; }
.ref-simple .ref-code pre { max-height: 600px; }
.ref-simple:not(.is-enhanced) .ref-customize { display: none; }
@media (max-width: 820px) {
  .ref-simple .ref-workspace { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
.ref-shell button, .ref-shell select, .ref-shell input { font: inherit; }
.ref-shell button, .ref-shell select, .ref-shell input[type="search"] { color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.ref-shell button { padding: 6px 12px; font-size: 13px; font-weight: 550; }
.ref-shell button:hover { background: var(--hover-background); }
.ref-shell input[type="search"] { padding: 9px 11px; width: 100%; min-width: 0; }
.ref-shell input::placeholder { color: var(--muted); opacity: .85; }
.ref-shell :is(a, button, input, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ref-shell summary { cursor: pointer; }
.ref-shell summary::marker { color: var(--muted); font-size: .8em; }
.ref-shell code, .ref-shell pre, .ref-type { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; }
.ref-shell code { font-size: .91em; }
.ref-page-heading { padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.ref-breadcrumb { display: inline-flex; align-items: center; gap: 14px; font-size: 13px; font-weight: 600; text-decoration: none; }
.ref-breadcrumb span { color: var(--muted); }
.ref-page-heading h1 { margin: 8px 0; font-size: clamp(30px, 4vw, 38px); letter-spacing: -.045em; line-height: 1.12; }
.ref-page-heading > p { color: var(--muted); margin: 0 0 8px; font-size: 14px; }
.ref-version { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 12px; }
.ref-version a { color: inherit; text-decoration-color: var(--line); }
.ref-introduction { padding-bottom: 22px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.ref-intro-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 24px; }
.ref-intro-heading h2 { margin: 0; font-size: clamp(22px, 2.3vw, 28px); line-height: 1.3; letter-spacing: -.025em; }
.ref-intro-heading > a { font-size: 12px; white-space: nowrap; }
.ref-intro-lead { max-width: 1000px; margin: 12px 0 18px; }
.ref-principles { display: grid; gap: 2px; max-width: 1000px; font-size: 14px; line-height: 1.6; }
.ref-principle > summary { display: block; position: relative; padding: 4px 8px 4px 18px; list-style: none; border-radius: 3px; text-wrap: pretty; }
.ref-principle > summary::-webkit-details-marker { display: none; }
.ref-principle > summary::before { content: ''; position: absolute; left: 3px; top: 12px; width: 5px; height: 5px; border: solid var(--muted); border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); transition: transform .15s; }
.ref-principle[open] > summary::before { transform: rotate(135deg); }
.ref-principle > summary:hover { background: var(--hover-background); }
.ref-principle > summary strong { color: var(--heading); font-weight: 650; }
.ref-principle > .ref-prose { padding: 2px 8px 12px 18px; font-size: 14px; line-height: 1.65; }
#component-factories { scroll-margin-top: 90px; }
.ref-workspace { display: grid; grid-template-columns: 392px minmax(0, 1fr); gap: 32px; align-items: start; }
.ref-sidebar { min-width: 0; }
.ref-matrix-title { font-size: 12px; font-weight: 650; color: var(--muted); margin: 0 0 12px; letter-spacing: 0; }
.ref-component-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.ref-component-grid :is(button, a) { display: flex; align-items: center; padding: 6px 8px; min-height: 32px; border-radius: 4px; color: var(--muted); text-decoration: none; text-align: left; font-size: 12px; line-height: 1.4; font-weight: 500; border: 1px solid var(--line); overflow-wrap: normal; }
.ref-component-grid :is(button, a):hover { background: var(--light); color: var(--ink); }
.ref-component-grid :is([aria-pressed="true"], [aria-current]) { color: var(--accent); background: var(--selected-background); border-color: var(--selected-border); font-weight: 650; }
.ref-reader { min-width: 0; }
.ref-component-title { margin: 0 0 10px; font-size: clamp(20px, 2.3vw, 28px); line-height: 1.35; letter-spacing: -.04em; overflow-wrap: anywhere; text-wrap: initial; }
.ref-title-muted { color: var(--muted); font-weight: 450; }
.ref-badge { display: inline-block; vertical-align: middle; font-size: 10px; line-height: 1.5; font-weight: 600; color: var(--accent); background: var(--selected-background); border: 1px solid var(--badge-border); border-radius: 4px; padding: 2px 6px; white-space: nowrap; }
.ref-badge.planned { color: var(--warning-ink); background: var(--warning-background); border-color: var(--warning-border); }
.ref-badge.subtle { color: var(--muted); background: var(--light); border-color: var(--line); }
.ref-description { margin-bottom: 10px; }
.ref-source-summary { color: var(--muted); }
.ref-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 12px; border-bottom: 1px solid var(--line); margin-top: 16px; }
.ref-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 0 22px; }
.ref-tabs a { display: inline-block; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; padding: 11px 0; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ref-tabs a:hover { color: var(--accent); }
.ref-tabs a[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.ref-panels { min-width: 0; }
.ref-panel { padding-top: 20px; min-width: 0; }
.ref-panel > :first-child { margin-top: 0; }
.ref-options { margin-top: 16px; }
.ref-options fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.ref-filter-groups { display: grid; gap: 6px; }
.ref-options .ref-option-group { padding: 4px 9px 7px; border: 1px solid var(--line); border-radius: 5px; background: transparent; }
.ref-option-group > legend { padding: 0 5px; margin: 0; max-width: 100%; color: var(--heading); font-size: 12px; font-weight: 600; line-height: 20px; }
.ref-source-controls .ref-group-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.ref-source-controls .ref-choice strong { font-weight: 650; }
.ref-source-single { display: flex; justify-content: flex-start; padding: 1px 0; }
.ref-checkboxes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; }
.ref-choice { display: flex; align-items: start; gap: 6px; width: 100%; margin: 0; padding: 4px 0; min-height: 24px; box-sizing: border-box; cursor: pointer; font-size: 12px; font-weight: 500; line-height: 1.4; }
.ref-choice input { margin: 1px 0 0; accent-color: var(--accent); width: 14px; height: 14px; flex: 0 0 14px; }
.ref-choice-text { min-width: 0; overflow-wrap: anywhere; }
.ref-choice-description { color: var(--muted); font-size: 11px; font-weight: 400; }
.ref-choice-description::before { content: ' - '; }
.ref-choice-description a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.ref-source-segments { display: flex; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; background: var(--surface); }
.ref-source-segments button { flex: 1; min-width: 0; padding: 5px 7px; border: 0; border-radius: 0; font-size: 12px; }
.ref-source-segments button + button { border-left: 1px solid var(--line); }
.ref-source-segments button[aria-pressed="true"] { color: var(--accent); background: var(--segment-background); box-shadow: inset 0 -2px var(--accent); }
.ref-source-segments button:focus-visible { outline-offset: -3px; }
.ref-choice.is-disabled { opacity: .65; cursor: default; }
.ref-control-note { font-size: 11px; line-height: 1.5; color: var(--muted); margin: 0; }
.ref-filter-groups + .ref-control-note { margin-top: 8px; }
.ref-contract { margin-top: 12px; font-size: 13px; }
.ref-contract-row { scroll-margin-top: 75px; }
.ref-contract-heading { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: baseline; gap: 12px; position: relative; padding: 4px 0 4px 14px; list-style: none; border-radius: 3px; }
.ref-contract-heading > strong { font-size: 12px; font-weight: 600; }
.ref-contract .ref-prose { font-size: 13px; line-height: 1.6; }
.ref-contract-value { color: var(--muted); }
summary.ref-contract-heading::-webkit-details-marker { display: none; }
summary.ref-contract-heading::before { content: ''; position: absolute; left: 1px; top: 11px; width: 4px; height: 4px; border: solid var(--muted); border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); transition: transform .15s; }
details[open] > summary.ref-contract-heading::before { transform: rotate(135deg); }
summary.ref-contract-heading:hover { background: var(--hover-background); }
.ref-contract-body { margin: 6px 0 8px 78px; }
.ref-contract-body p { margin-bottom: 6px; }
.ref-contract-body h4 { margin: 10px 0 5px; font-size: 12px; }
.ref-contract-type { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.ref-contract-type .ref-type { display: inline; margin: 0; }
.ref-contract-links { margin-top: 6px; font-size: 12px; }
.ref-result-reference { scroll-margin-top: 75px; }
.ref-result-reference > h3 { margin: 0 0 10px; font-size: 15px; }
.ref-result-shape h4 { font-size: 13px; margin: 16px 0 4px; }
.ref-prose { overflow-wrap: anywhere; font-size: 14px; line-height: 1.75; }
.ref-prose p { margin: 0 0 1em; }
.ref-prose p:last-child { margin-bottom: 0; }
.ref-prose ul, .ref-prose ol { padding-left: 1.4em; }
.ref-prose code:not(pre code), .ref-principle > summary code { background: var(--inline-background); color: var(--inline-code); border-radius: 3px; padding: 1px 4px; }
.ref-prose pre { padding: 14px; font-size: 11px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--code-background); color: var(--code-ink); border-radius: 5px; }
.ref-prose h4, .ref-prose h5, .ref-prose h6 { font-size: 13px; margin: 20px 0 10px; }
.ref-muted { color: var(--muted); font-size: 13px; }
.ref-notice { margin: 15px 0; padding: 12px 15px; border-left: 3px solid var(--notice-border); border-radius: 0 5px 5px 0; background: var(--notice-background); font-size: 13px; }
.ref-section { margin-top: 30px; }
.ref-section > h3 { font-size: 16px; margin: 0 0 12px; letter-spacing: -.015em; }
.ref-section > h4, .ref-config-group > h4 { font-size: 12px; color: var(--muted); font-weight: 600; margin: 20px 0 10px; }
.ref-source-reference { list-style: none; padding: 0; margin: 0 0 18px; font-size: 13px; }
.ref-source-reference > li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.ref-source-mode { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 10px; }
.ref-source-mode strong { font-weight: 600; }
.ref-source-mode :is(code, .ref-muted) { font-size: 11px; }
.ref-source-reference .ref-prose { font-size: 13px; }
.ref-source-reference p { margin: 3px 0 0; }
.ref-inputs > h3 { font-size: 13px; margin: 0 0 10px; }
.ref-concept, .ref-method { border-bottom: 1px solid var(--line); }
.ref-concept > summary, .ref-method > summary { padding: 12px 0; font-size: 13px; }
.ref-concept > .ref-prose, .ref-method > .ref-prose { padding: 2px 0 20px; }
.ref-type { display: block; color: var(--muted); font-size: 11px; font-weight: 400; margin-top: 5px; line-height: 1.6; overflow-wrap: anywhere; }
.ref-link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ref-link-grid a { padding: 10px; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; text-decoration: none; overflow-wrap: anywhere; }
.ref-link-grid a span { float: right; }
.ref-attribution { font-size: 11px; color: var(--muted); margin-top: 25px; }
.ref-code { margin: 20px 0; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--code-background); }
.ref-code figcaption { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: var(--muted); }
.ref-code figcaption > div { display: flex; gap: 6px; }
.ref-shell .ref-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 5px; color: var(--muted); border-color: transparent; background: transparent; }
.ref-shell .ref-icon-button:hover { color: var(--ink); border-color: var(--line); background: var(--hover-background); }
.ref-icon-button svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.ref-code .ref-icon-button.is-copied { color: var(--accent); }
.ref-code pre { margin: 0; padding: 20px 18px; overflow: auto; border-radius: 0; background: transparent; color: var(--code-ink); font-size: 12px; line-height: 1.85; white-space: pre; }
.ref-code pre code { font-size: inherit; }
.ref-property, .ref-member { border-bottom: 1px solid var(--line); padding: 14px 0; scroll-margin-top: 75px; }
.ref-property-preview { display: block; position: relative; padding-left: 18px; list-style: none; border-radius: 3px; }
.ref-property-preview::-webkit-details-marker { display: none; }
summary.ref-property-preview::before { content: ''; position: absolute; left: 3px; top: 8px; width: 5px; height: 5px; border: solid var(--muted); border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); transition: transform .15s; }
details[open] > summary.ref-property-preview::before { transform: rotate(135deg); }
summary.ref-property-preview:hover { background: var(--hover-background); }
.ref-property-body { padding-left: 18px; margin-top: 10px; }
.ref-property-body > .ref-prose { font-size: 12px; }
.ref-exact-type pre { max-height: 320px; overflow: auto; }
.ref-property-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.ref-property-title { display: flex; align-items: baseline; gap: 4px 8px; flex-wrap: wrap; min-width: 0; }
.ref-property-title > code { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.ref-property-title > .ref-type { display: inline; margin: 0; font-size: 12px; min-width: 0; }
.ref-optional { color: var(--muted); font-weight: 400; }
.ref-origin { color: var(--muted); font-size: 10px; line-height: 22px; white-space: nowrap; }
.ref-property-description { margin-top: 6px; font-size: 13px; line-height: 1.65; }
.ref-property-description > :first-child { margin-top: 0; }
.ref-property-description > :last-child { margin-bottom: 0; }
.ref-property-description p + p { margin-top: 6px; }
.ref-property-default { margin-top: 5px; font-size: 12px; line-height: 1.6; }
.ref-property-default > span { color: var(--muted); }
.ref-property-default code { font-size: 11px; }
.ref-property-meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 8px 0; font-size: 12px; }
.ref-property-meta dt { color: var(--muted); }
.ref-property-meta dd { margin: 0; min-width: 0; }
.ref-property-meta dd > :first-child { margin-top: 0; }
.ref-property-meta dd > :last-child { margin-bottom: 0; }
.ref-nested { margin: 6px 0 0; padding-left: 12px; border-left: 1px solid var(--line); }
.ref-nested .ref-member { padding: 10px 0; }
.ref-nested .ref-member:last-of-type { border-bottom: 0; }
.ref-nested h5 { margin: 14px 0 2px; font-size: 12px; }
.ref-property.is-highlighted { border-left: 2px solid var(--accent); padding-left: 12px; }
.ref-property:target, .ref-method:target { outline: 2px solid var(--accent); outline-offset: 2px; }
.ref-config-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 32px; }
.ref-config-heading h3 { font-size: 13px; margin: 0; }
.ref-property-search { display: flex; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; }
.ref-property-search [data-property-search-box] { width: min(260px, 42vw); }
.ref-property-search input[type="search"] { padding: 5px 8px; font-size: 12px; }
.ref-property-search button { flex-shrink: 0; }
.ref-search-status { margin: 4px 0; font-size: 11px; min-height: 0; }
.ref-property-links { display: flex; flex-wrap: wrap; gap: 5px 10px; padding-top: 8px; font-size: 12px; }
.ref-property-links a { text-decoration: none; }
.ref-property-links a:hover { text-decoration: underline; }
.ref-reader-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 32px; border-top: 1px solid var(--line); padding-top: 18px; font-size: 11px; color: var(--muted); }
.ref-reader-footer > div { display: flex; gap: 18px; }
.ref-build-info { font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 36px; padding-top: 14px; overflow-wrap: anywhere; }
.ref-build-info dl { display: grid; grid-template-columns: max-content 1fr; gap: 5px 20px; }
.ref-build-info dd { margin: 0; }
.ref-live { position: fixed; bottom: 16px; right: 18px; z-index: 30; max-width: min(420px, calc(100vw - 36px)); padding: 9px 14px; background: var(--surface); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 4px 16px var(--shadow-color); font-size: 11px; pointer-events: none; }
.ref-live:empty { display: none; }
.ref-forms { max-width: 1000px; }
.ref-forms li { margin-bottom: 8px; overflow-wrap: anywhere; }
.ref-shell:not(.is-enhanced) [data-controls], .ref-shell:not(.ref-simple):not(.is-enhanced) .ref-component-grid[role="group"], .ref-shell:not(.is-enhanced) .ref-property-search, .ref-shell:not(.is-enhanced) .ref-code button { display: none; }
.ref-shell:not(.is-enhanced) .ref-panel { border-top: 1px solid var(--line); margin-top: 30px; }
@media (max-width: 1200px) {
  .ref-workspace { grid-template-columns: 310px minmax(0, 1fr); gap: 24px; }
  .ref-component-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ref-tabs { gap: 18px; }
  .ref-tabs a { font-size: 13px; }
}
@media (max-width: 800px) {
  .ref-shell { padding-top: 24px; }
  .ref-workspace { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .ref-component-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ref-page-heading { padding-bottom: 20px; margin-bottom: 20px; }
  .ref-tabs { gap: 20px; }
  .ref-code pre { font-size: 11px; padding: 16px 12px; }
  .ref-property-title { gap: 5px; }
  .ref-property-header { gap: 8px; }
  .ref-live { bottom: 8px; right: 8px; max-width: calc(100vw - 16px); font-size: 10px; }
}
@media (max-width: 600px) {
  .ref-component-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .ref-tabs { gap: 16px; }
  .ref-tabs a { font-size: 13px; }
}
@media print {
  .ref-shell .ref-panel[hidden] { display: block !important; }
  .ref-sidebar, .ref-options, .ref-toolbar, .ref-live { display: none !important; }
  .ref-workspace { display: block; }
  .ref-shell { padding: 0; }
}
/* The chapter sidebar begins after the matrix sidebar has ended. */
.ref-document-actions { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-block: 20px; font-size: 15px; }
.ref-chapter-index { max-width: 900px; margin-block: 20px; border-top: 1px solid var(--line); padding-top: 14px; }
.ref-chapter-index summary { cursor: pointer; font-weight: 650; }
.ref-chapter-index ol { columns: 2; column-gap: 36px; padding-left: 22px; }
.ref-chapter-index li { break-inside: avoid; margin-block: 8px; }
.ref-guide { margin-block: 48px; }
.ref-guide-fallback { max-width: 960px; margin: 48px auto; padding: 24px; border: 1px solid var(--line); }
.ref-guide [id] { scroll-margin-top: calc(var(--header-min-height) + 24px); }
@media (max-width: 760px) { .ref-chapter-index ol { columns: 1; } }
