@font-face {
  font-family: Inter;
  src: url("assets/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/ibm-plex-mono-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --primary: #3d5b7f;
  --secondary: #f2f3f5;
  --ink: #181d25;
  --muted: #5e636e;
  --page: #fff;
  --rule: #e0e2e6;
  --tab-border: hsl(240 3% 74%);
  --control-radius: 4px;
  --mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font: 400 14px/1.5 Inter, Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, figure { margin: 0; }
button { color: inherit; font: inherit; cursor: pointer; }
a { color: var(--primary); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.wrap { width: min(1080px, calc(100% - 88px)); margin-inline: auto; }
header { background: var(--secondary); border-bottom: 1px solid var(--rule); }
.masthead, figcaption { display: flex; align-items: center; }
.masthead { min-height: 64px; }
.intro { padding: 54px 0 40px; }
h1 { font-size: clamp(38px, 5vw, 58px); line-height: 1.08; font-weight: 600; letter-spacing: -.055em; }
.intro p { margin-top: 14px; max-width: 60ch; color: var(--muted); font-size: 16px; }
section {
  display: grid;
  grid-template-columns: minmax(176px, 1fr) minmax(0, 2.65fr);
  gap: 40px;
  border-top: 1px solid var(--rule);
  padding: 30px 0;
  scroll-margin-top: 16px;
}
h2 { font-size: 22px; letter-spacing: -.035em; line-height: 1.25; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
.section-intro p { margin-top: 8px; color: var(--muted); max-width: 29ch; }
.brand-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.brand-preview { display: grid; place-items: center; height: 100px; border-radius: 4px; }
.icon-preview { background: var(--secondary); }
.wordmark-preview { background: var(--ink); }
.wordmark-preview img { filter: invert(1); }
figcaption { justify-content: space-between; gap: 8px; margin-top: 9px; }
figcaption a { font-weight: 500; font-size: 13px; white-space: nowrap; }
small, .annotation { color: var(--muted); font-size: 12px; }
.type-table { border-collapse: collapse; width: 100%; text-align: left; }
.type-table th, .type-table td { padding: 8px 12px 8px 0; }
.type-table thead th { padding-top: 0; font-size: 12px; font-weight: 500; color: var(--muted); }
.type-table tbody tr { border-top: 1px solid var(--rule); }
.type-table tbody th { font-weight: 400; }
.type-table th:last-child, .type-table td:last-child { text-align: right; padding-right: 0; }
.type-table td:last-child { font: 12px var(--mono); white-space: nowrap; }
.type-table small { display: block; margin-bottom: 2px; font-family: inherit; }
.sample-title { font-size: 20px; line-height: 1.25; letter-spacing: -.02em; font-weight: 600; }
.sample-label { font-weight: 500; }
.sample-id, small, code { font-family: var(--mono); }
.palette { display: grid; }
.swatch {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center; gap: 1px 12px;
  padding: 8px 4px; border: 0; background: white; color: var(--ink); text-align: left;
}
.swatch + .swatch { border-top: 1px solid var(--rule); }
.swatch::before {
  content: ""; grid-area: 1 / 1 / 3 / 2; width: 24px; height: 24px;
  border-radius: 4px; background: var(--chip); box-shadow: inset 0 0 0 1px rgb(24 29 37 / 12%);
}
.swatch span { grid-area: 1 / 2; font-weight: 600; }
.swatch small { grid-area: 2 / 2; color: var(--muted); font: 400 14px/1.4 Inter, Arial, sans-serif; }
.swatch code { grid-area: 1 / 3 / 3 / 4; font-size: 13px; }
[data-color="primary"] { --chip: var(--primary); }
[data-color="secondary"] { --chip: var(--secondary); }
[data-color="sidebar"] { --chip: #fafafa; }
[data-color="ink"] { --chip: var(--ink); }
[data-color="muted"] { --chip: var(--muted); }
[data-color="page"] { --chip: var(--page); }
[data-color="rule"] { --chip: var(--rule); }
.swatch:hover code { text-decoration: underline; text-underline-offset: 3px; }
.radii { margin-bottom: 20px; }
.radii figcaption { justify-content: start; gap: 10px; margin: 0 0 8px; font-weight: 600; }
.radii small { font-weight: 400; }
.radius-pair { display: flex; flex-wrap: wrap; gap: 12px 36px; }
.radius-pair > div { display: flex; align-items: center; gap: 10px; }
.radius-pair i { display: block; width: 48px; height: 36px; }
.button-shape { background: var(--primary); border-radius: var(--control-radius); }
.tab-shape { border: 1px solid var(--tab-border); border-bottom: 0; border-radius: var(--control-radius) var(--control-radius) 0 0; }
.radius-pair span { color: var(--muted); font-size: 12px; }
.radius-pair strong { display: block; color: var(--ink); font-size: 18px; font-weight: 600; }
[role="tablist"] { display: flex; gap: 2px; box-shadow: inset 0 -1px var(--tab-border); }
[role="tab"] { padding: 8px; border: 1px solid transparent; border-radius: var(--control-radius) var(--control-radius) 0 0; color: rgb(24 29 37 / 60%); background: transparent; font-weight: 500; line-height: 20px; }
[role="tab"]:hover { color: var(--ink); }
[role="tab"][aria-selected="true"] { color: var(--ink); background: white; border-color: var(--tab-border); border-bottom-color: white; }
[role="tab"]:focus-visible { outline: 0; text-decoration: underline dotted; text-underline-offset: .22em; }
[role="tabpanel"] { padding-top: 16px; }
[role="tabpanel"] > p { max-width: 68ch; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 10px; }
.action { height: 36px; padding-inline: 12px; border: 0; border-radius: var(--control-radius); font-weight: 500; line-height: 20px; }
.action.primary { color: white; background: var(--primary); box-shadow: 0 1px 2px rgb(36 46 66 / 5%); }
.action.primary:hover { background: rgb(61 91 127 / 90%); }
.action.secondary { background: var(--secondary); color: var(--ink); }
.action.secondary:hover { background: var(--rule); }
.action:focus-visible { outline: 3px solid rgb(61 91 127 / 50%); outline-offset: 0; }
.action:disabled { opacity: .5; pointer-events: none; }
.annotation { margin-top: 5px; }
#tabs-panel .annotation:first-of-type, #tabs-panel p + .annotation { margin-top: 10px; }
#feedback:not(:empty) { position: fixed; z-index: 1; inset: auto 16px 16px auto; max-width: calc(100% - 32px); padding: 9px 14px; background: var(--ink); color: white; border-radius: 4px; }
@media (max-width: 800px) {
  .wrap { width: calc(100% - 40px); }
  section { grid-template-columns: 1fr; gap: 18px; padding: 24px 0; }
  .section-intro p { max-width: 60ch; margin-top: 5px; }
  .intro { padding: 36px 0 28px; }
}
@media (max-width: 520px) {
  .masthead { min-height: 52px; }
  figcaption a { min-height: 44px; display: inline-flex; align-items: center; gap: 4px; }
  .type-table th, .type-table td { padding-inline-end: 8px; }
  .brand-grid { gap: 10px; }
  figcaption { align-items: flex-start; flex-direction: column; gap: 0; }
  .brand-preview { height: 80px; }
  .wordmark-preview img { max-width: calc(100% - 16px); height: auto; max-height: 24px; }
}
