/* md3.io additions. Shared tokens, shell, UI, and documentation styles come from vlist.io. */
button, input, select { font-family: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; }
[hidden] { display: none !important; }
html[data-theme-mode="dark"] { color-scheme: dark; }
html[data-theme-mode="light"] { color-scheme: light; }
.header__logo { font-size: 23px; letter-spacing: -1px; white-space: nowrap; }
/* The mark at the wordmark's cap height, its foot on the baseline. */
.header__mark { display: inline-block; width: 20px; height: 20px; margin-right: 7px; vertical-align: -1px; }
/* On a phone the mark costs the header its width: the logo gives up side padding, and the
   section's name gives way (an ellipsis) before the buttons are pushed off the screen. */
@media (max-width: 720px) {
  .header__logo { padding: 3px 4px; }
  .header__section { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
.brand-dot { color: var(--accent-text); }
.header__section { font-size: var(--fs-base); }
.sidebar__label { font-size: var(--fs-xs); color: var(--text); }
.sidebar__link { font-size: var(--fs-md); }
/* The credits sit at the foot of the sidebar, below the navigation however short it is. */
.sidebar { display: flex; flex-direction: column; }
.sidebar__foot { margin-top: auto; padding: 24px 20px 4px; font-size: var(--fs-xs); color: var(--text-dim); }
.sidebar__foot a { color: inherit; }
.mobile-navigation { display: none; }
.page-wrap { padding: 8px 40px 64px; width: 100%; }
.page-heading { margin-bottom: 30px; }
.page-heading h1 { font-size: 40px; letter-spacing: -1px; line-height: 1.2; margin: 10px 0 12px; }
.page-heading p { color: var(--text-muted); font-size: var(--fs-lg); }
.page-heading__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-heading__top .text-link { white-space: nowrap; }
.eyebrow, .feature-index { color: var(--text-dim); font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: 1.2px; }
.text-link, .catalog-note a, .doc-toolbar a { color: var(--accent-text); text-decoration: none; font-size: var(--fs-ui); }
.text-link:hover, .catalog-note a:hover, .doc-toolbar a:hover { text-decoration: underline; }
.playground { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: stretch; }
.preview-panel { border: 1px solid var(--border); background: var(--bg-card); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.panel-heading { min-height: 49px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); }
.panel-heading .ui-title { margin: 0; }
.preview-dot { height: 6px; width: 6px; border-radius: 50%; background: var(--green); }
.preview-heading { padding-top: 0; padding-bottom: 0; }
.preview-copy { flex-shrink: 0; gap: 6px; }
.preview-tabs { display: flex; gap: 22px; align-self: stretch; }
.preview-tab { position: relative; border: 0; background: transparent; padding: 0; color: var(--text-dim); font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: .6px; text-transform: uppercase; cursor: pointer; }
.preview-tab:hover { color: var(--text); }
.preview-tab[aria-selected="true"] { color: var(--text); }
.preview-tab[aria-selected="true"]::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--accent-text); }
.playground-space { position: relative; flex: 1; min-height: 450px; }
.playground-view { position: absolute; inset: 0; }
#preview { display: block; border: 0; width: 100%; height: 100%; background: #f7f2fa; color-scheme: light; }
html[data-preview-mode="dark"] #preview { background: #1d1b20; color-scheme: dark; }
.code-panel { overflow: auto; background: var(--bg-code); padding: 24px; }
.code-panel pre { margin: 0; font-size: var(--fs-sm); line-height: 1.8; tab-size: 2; }
.code-panel:focus-visible { outline-offset: -4px; }
.preview-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; flex-shrink: 0; gap: 8px 16px; padding: 12px 16px; border-top: 1px solid var(--border); color: var(--text-dim); font-size: var(--fs-xs); }
.configuration { width: auto; min-width: 0; min-height: 0; overflow: hidden; gap: 0; }
.panel-heading { flex-shrink: 0; }
.configuration-body { overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.configuration .ui-section { padding: 14px 16px; }
.configuration-controls > .ui-title { margin-bottom: 10px; }
.configuration .ui-row + .ui-row { margin-top: 8px; }
.control-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 190px); gap: 8px; }
.control-label { color: var(--text-muted); font-size: var(--fs-sm); font-weight: var(--fw-bold); line-height: 1.3; }
.control-input { width: 100%; min-width: 0; }
.control-row .ui-select { width: 100%; min-width: 0; }
.choice-group { justify-self: end; max-width: 100%; gap: 2px; }
.choice { position: relative; cursor: pointer; min-width: 0; flex: 1; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice > span { display: flex; align-items: center; justify-content: center; min-height: 26px; padding: 4px 8px; line-height: 1.4; }
.choice input:checked + span { color: white; background: var(--accent); }
.choice input:focus-visible + span { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.choice-group--sizes, .choice-group--icons { width: 100%; }
.choice-group--icons span { padding: 4px; }
.choice svg { width: 16px; height: 16px; }
.configuration .ui-switch { position: relative; }
.ui-switch__track { display: block; }
.ui-switch:has(input:disabled) { opacity: .45; cursor: default; }
.reset-button { background: none; border: 0; color: var(--text-dim); cursor: pointer; font-size: var(--fs-xs); }
.reset-button:hover { color: var(--text); }
.preview-appearance { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.preview-appearance .ui-select { width: 120px; min-width: 0; }
.preview-footer #playground-status { overflow-wrap: anywhere; }
@media (max-width: 400px) {
  .preview-appearance { width: 100%; }
  .preview-appearance .ui-select { flex: 1; }
}
.catalog-group + .catalog-group { margin-top: 32px; }
.catalog-label { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); margin-bottom: 16px; }
.component-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.component-card { display: block; padding: 0; overflow: hidden; }
.component-card__body { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-top: 1px solid var(--border); }
.component-card__body h3 { font-size: var(--fs-lg); margin-bottom: 4px; }
.component-card__body p, .catalog-note { font-size: var(--fs-ui); color: var(--text-muted); }
.catalog-note { margin-top: 28px; }
.architecture-link { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; font-size: var(--fs-base); }
.docs-group { margin-top: 30px; }
.docs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.doc-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; font-size: var(--fs-base); }
.doc-card > span + span { color: var(--text-dim); }
.document-layout { display: flex; min-width: 0; }
.document-layout .md { min-width: 0; flex: 1; width: 100%; }
.doc-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.doc-toc { width: 190px; flex-shrink: 0; position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow: auto; margin: 44px 20px 0 0; align-self: flex-start; }
.doc-toc a { display: block; color: var(--text-dim); text-decoration: none; font-size: var(--fs-xs); padding: 3px 0; }
.doc-toc a:hover { color: var(--accent-text); }
.md table { display: block; max-width: 100%; overflow-x: auto; }
.home .sidebar--home { display: none; }
.landing { width: 100%; max-width: 1120px; margin: auto; padding: 0 40px; }
.landing .hero { padding: 72px 0 48px; }
.landing .hero__name { font-size: clamp(44px, 6vw, 72px); line-height: 1.08; margin: 24px 0; }
.hero__accent { color: var(--accent-text); }
.landing .hero__tagline { max-width: 540px; font-size: var(--fs-xl); }
.install { display: inline-flex; align-items: center; gap: 32px; padding: 9px 10px 9px 18px; background: var(--bg-code); border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 28px 0 0; font-size: var(--fs-ui); }
.install code span { color: var(--text-dim); }
.hero__notes { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; color: var(--text-dim); font-size: var(--fs-xs); margin-top: 25px; }
.landing-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 38px; border-top: 1px solid var(--border); padding: 32px 0 40px; }
.landing-features h2 { font-size: var(--fs-lg); margin: 12px 0 8px; }
.landing-features p { font-size: var(--fs-base); color: var(--text-muted); }
.landing-footer { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--border); padding: 20px 0; color: var(--text-dim); font-size: var(--fs-xs); }
.landing-footer a { color: inherit; text-decoration: none; }
@media (max-width: 1150px) { .doc-toc { display: none; } .page-wrap { padding: 32px 28px 48px; } .playground { grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; } }
@media (min-width: 1001px) {
  .component-page { height: calc(100dvh - var(--header-height)); display: flex; flex-direction: column; padding-top: 8px; padding-bottom: 24px; }
  .component-page .page-heading { flex-shrink: 0; margin-bottom: 22px; }
  .component-page .playground { flex: 1; min-height: 0; }
  .component-page .playground-space { min-height: 0; }
  .component-page .preview-panel { min-height: 0; }
}
@media (max-width: 1000px) and (min-width: 721px) { .playground { grid-template-columns: 1fr; } .playground-space { height: 350px; min-height: 350px; flex: none; } }
@media (max-width: 1000px) {
  .component-page:is([data-component="datepicker"], [data-component="timepicker"]) .playground-space { height: 560px; min-height: 560px; }
}
@media (max-width: 720px) {
  .mobile-navigation { display: block; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
  .home .sidebar--home { display: block; }
  .header__nav { display: none; }
  .header__theme { margin-left: auto; }
  .page-wrap { padding: 28px 18px 40px; }
  .page-heading h1 { font-size: 34px; }
  .page-heading p { font-size: var(--fs-base); }
  .page-heading__top .text-link { font-size: var(--fs-xs); }
  .playground { grid-template-columns: 1fr; }
  .playground-space { height: 310px; min-height: 310px; flex: none; }
  .code-panel { padding: 18px; }
  .preview-tabs { gap: 16px; }
  .configuration { width: 100%; }
  .docs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .component-grid { grid-template-columns: 1fr; }
  .document-layout .md { padding: 28px 18px 48px; }
  .landing { padding: 0 22px; }
  .landing .hero { padding: 50px 0 36px; }
  .landing .hero__tagline { font-size: var(--fs-lg); }
  .hero__notes { gap: 8px 16px; }
  .landing-features { grid-template-columns: 1fr; gap: 24px; padding: 28px 0; }
  .landing-features h2 { margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; } }

.control-range { display: flex; align-items: center; gap: 12px; min-width: 0; }
.control-range output { min-width: 24px; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; text-align: right; }
.control-range .ui-slider { min-width: 0; }
.control-row:has(:disabled) { opacity: .5; }

@media (max-width: 1000px) {
  .component-page:is([data-component="card"], [data-component="dialog"], [data-component="bottom-sheet"], [data-component="side-sheet"]) .playground-space { height: 480px; min-height: 480px; }
}

/* Framework tabs at the top of a component or example page. */
.framework-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.framework-tab { border: 1px solid transparent; background: transparent; color: var(--text-dim); border-radius: 6px; padding: 5px 10px;
  font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: .6px; text-transform: uppercase; cursor: pointer; }
.framework-tab:hover:not(:disabled) { color: var(--text); }
.framework-tab[aria-selected="true"] { background: var(--accent); color: var(--text); }
.framework-tab:disabled { opacity: .45; cursor: not-allowed; }
.framework-tab:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.framework-note { margin: 12px 18px 0; color: var(--text-dim); font-size: var(--fs-sm); }
