/* The design site's own frame, built from the same tokens as the app. Component previews keep components.css. */
* {
  box-sizing: border-box;
}
html {
  color-scheme: light;
}
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 16px/1.5 var(--font-sans);
}
a {
  color: var(--forest);
}
code {
  font-size: 0.9em;
  overflow-wrap: anywhere;
}
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-6);
  padding: var(--space-3) max(16px, calc((100vw - 1040px) / 2));
  border-bottom: var(--stroke-frame) solid var(--ink);
}
.site-title {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  flex: 1;
}
.site-header nav a {
  color: var(--ink);
  text-decoration: none;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.site-header nav a[aria-current='page'] {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 6px;
}
.site-main {
  max-width: 1040px;
  margin: 0 auto;
  padding: var(--space-6) 16px 64px;
}
/* Page content only: previews keep their own headings and tables. */
:is(.site-main, .component) > h1 {
  font-size: 28px;
  line-height: 36px;
  margin: 0 0 var(--space-4);
}
:is(.site-main, .component) > h2 {
  font-size: 20px;
  margin: 40px 0 var(--space-2);
  padding-top: var(--space-4);
  border-top: var(--stroke-hairline) solid var(--divider);
}
:is(.site-main, .component) > h3 {
  font-size: 17px;
  margin: var(--space-6) 0 var(--space-2);
}
/* Wide tables scroll inside their own box so the page never scrolls sideways. */
.table,
:is(.site-main, .component) > table {
  display: block;
  overflow-x: auto;
}
:is(.site-main, .component, .table) > table {
  border-collapse: collapse;
  margin: var(--space-2) 0 var(--space-4);
  font-size: 14px;
}
:is(.site-main, .component, .table) > table :is(th, td) {
  border: var(--stroke-hairline) solid var(--outline);
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
}
:is(.site-main, .component, .table) > table th {
  background: var(--sage);
}
.swatch {
  display: inline-block;
  width: 20px;
  height: 20px;
  vertical-align: middle;
  border: var(--stroke-hairline) solid var(--outline);
  border-radius: var(--radius-sm);
}
.component-list {
  columns: 3 12rem;
  padding-left: 1.2em;
}
.preview {
  overflow-x: auto;
  padding: var(--space-4);
  border: var(--stroke-hairline) solid var(--outline);
  border-radius: var(--radius-md);
}
:is(.site-main, .component, .table) > table td:first-child code {
  white-space: nowrap;
  overflow-wrap: normal;
}
/* App rules pages share a second row of links. */
.sub-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  margin-bottom: var(--space-6);
  font-size: 14px;
}
.sub-nav a {
  color: var(--muted);
}
.sub-nav a[aria-current='page'] {
  color: var(--ink);
  font-weight: 700;
}
