:root {
  color-scheme: light;
  --brand-blue: #007aff;
  --brand-cloud: #f7f7fa;
  --brand-focus: #005bc2;
  --brand-background: var(--brand-cloud);
  --brand-surface: #fff;
  --brand-text: #1c1c1e;
  --brand-muted: #56565f;
  --brand-rule: #dedee5;
  --brand-code: #f1f4fa;
  --brand-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --brand-serif: "Instrument Serif", Georgia, serif;
  --brand-mono: ui-monospace, Menlo, Consolas, monospace;
  --brand-radius: 18px;
}

@supports (color: light-dark(white, black)) {
  :root {
    color-scheme: light dark;
    --brand-focus: light-dark(#005bc2, #68adff);
    --brand-background: light-dark(var(--brand-cloud), #080808);
    --brand-surface: light-dark(#fff, #151515);
    --brand-text: light-dark(#1c1c1e, #f5f5f5);
    --brand-muted: light-dark(#56565f, #ababaf);
    --brand-rule: light-dark(#dedee5, #363638);
    --brand-code: light-dark(#f1f4fa, #1b1e25);
  }

  :root[data-theme="light"] { color-scheme: light; }
  :root[data-theme="dark"] { color-scheme: dark; }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--brand-background);
  color: var(--brand-text);
  font-family: var(--brand-sans);
  line-height: 1.5;
}

a { color: inherit; }

body :focus-visible {
  outline: 2px solid var(--brand-focus);
  outline-offset: 4px;
}

.brand-wrap {
  width: min(100% - 48px, 1100px);
  margin-inline: auto;
}

.brand-header { border-bottom: 1px solid var(--brand-rule); }

.brand-header-inner, .brand-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand-header nav { display: flex; flex-wrap: wrap; gap: clamp(12px, 3vw, 32px); }

.brand-header nav a, .brand-footer > a:last-child {
  color: var(--brand-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.brand-header nav a:hover, .brand-footer > a:last-child:hover {
  color: var(--brand-text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.brand-home, .fork-wordmark {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--brand-mono);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.brand-home { font-size: 24px; text-decoration: none; }

.brand-home::after, .fork-wordmark::after {
  content: "";
  width: .238em;
  height: .238em;
  margin-left: .143em;
  transform: translateY(.028em);
  border-radius: 50%;
  background: var(--brand-blue);
}

.brand-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 296px);
  align-items: end;
  gap: 24px;
  padding-block: clamp(48px, 8vw, 100px) clamp(32px, 5vw, 62px);
}

.brand-intro h1 {
  margin: 0;
  font: 700 clamp(54px, 7vw, 108px)/.94 var(--brand-sans);
  letter-spacing: -.065em;
  word-spacing: .05em;
}

.brand-intro em {
  font: italic 400 1.13em/.78 var(--brand-serif);
  letter-spacing: -.035em;
}

.brand-intro p {
  margin: 0;
  color: var(--brand-muted);
  font-size: clamp(17px, 1.7vw, 20px);
}

.brand-section {
  border-top: 1px solid var(--brand-rule);
  padding-block: 30px clamp(40px, 6vw, 72px);
  scroll-margin-top: 20px;
}

.brand-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 32px;
  margin-bottom: 20px;
}

.brand-section-heading h2 {
  margin: 0;
  font-size: clamp(27px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -.05em;
}

.brand-section-heading p {
  max-width: 49ch;
  margin: 0;
  color: var(--brand-muted);
  font-size: 15px;
}

.brand-logo-grid, .brand-style-grid, .brand-snippet-grid {
  display: grid;
  gap: 14px;
}

.brand-logo-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr); }
.brand-style-grid { grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); }
.brand-snippet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.brand-card {
  min-width: 0;
  background: var(--brand-surface);
  border: 1px solid var(--brand-rule);
  border-radius: var(--brand-radius);
}

.brand-logo-preview, .brand-snippet-preview {
  display: grid;
  place-items: center;
  border-radius: calc(var(--brand-radius) - 1px) calc(var(--brand-radius) - 1px) 0 0;
}

.brand-logo-preview {
  min-height: clamp(126px, 17vw, 206px);
  background-color: var(--specimen-paper);
  background-image:
    linear-gradient(var(--specimen-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--specimen-grid) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: center;
}

.brand-logo-light { --specimen-paper: #fff; --specimen-grid: #eef0f5; }
.brand-logo-dark { --specimen-paper: #111; --specimen-grid: #202025; }
.brand-logo-icon { --specimen-paper: #e8ebf5; --specimen-grid: #dce0ed; }

.brand-logo-preview img {
  display: block;
  width: min(55%, 166px);
  height: auto;
}

.brand-logo-icon img {
  width: min(44%, 104px);
  filter: drop-shadow(0 10px 14px rgb(29 37 68 / 20%));
}

.brand-card-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--brand-rule);
}

.brand-card-caption h3 { margin: 0; font-size: 16px; line-height: 1.25; }
.brand-card-caption p { margin: 4px 0 0; color: var(--brand-muted); font-size: 13px; }

.brand-icon-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.brand-card-caption a, .brand-card-caption button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 5px 12px;
  border: 1px solid var(--brand-rule);
  border-radius: 9px;
  background: transparent;
  color: var(--brand-text);
  font: 650 13px/1 var(--brand-sans);
  text-decoration: none;
  cursor: pointer;
}

.brand-card-caption button[hidden] { display: none; }

.brand-card-caption a:hover, .brand-card-caption button:hover {
  border-color: var(--brand-focus);
  color: var(--brand-focus);
}

.brand-type {
  display: grid;
  align-content: space-between;
  gap: 28px;
  margin: 0;
  padding: clamp(20px, 4.5vw, 52px);
  border: 1px solid var(--brand-rule);
  border-radius: var(--brand-radius);
  background: #111;
  color: #fff;
}

.brand-type blockquote {
  margin: 0;
  font: 700 clamp(39px, 5.25vw, 72px)/.98 var(--brand-sans);
  letter-spacing: -.06em;
  word-spacing: .055em;
}

.brand-type em {
  color: #409cff;
  font: italic 400 1.14em/.95 var(--brand-serif);
  letter-spacing: -.035em;
}

.brand-type figcaption { color: #bfbfc5; font-size: 13px; }

.brand-palette {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--brand-rule);
  border-radius: var(--brand-radius);
  background: var(--brand-rule);
}

.brand-swatch {
  display: flex;
  flex-direction: column;
  justify-content: end;
  min-height: 106px;
  padding: 14px 16px;
  color: #1c1c1e;
  background: var(--swatch-fill);
}

.brand-swatch-blue { --swatch-fill: var(--brand-blue); color: #000; }
.brand-swatch-black { --swatch-fill: #000; color: #fff; }
.brand-swatch-cloud { --swatch-fill: var(--brand-cloud); }
.brand-swatch-white { --swatch-fill: #fff; }
.brand-swatch dt { font-weight: 700; }
.brand-swatch dd { margin: 2px 0 0; font: 13px var(--brand-mono); }

.brand-snippet-grid { align-items: start; }

.brand-snippet-preview {
  min-height: 104px;
  background: var(--brand-code);
}

.brand-snippet-preview .fork-wordmark { font-size: 34px; }
.brand-badge-preview a:hover { text-decoration: underline !important; }

.brand-snippet pre {
  margin: 0;
  padding: 16px;
  border-top: 1px solid var(--brand-rule);
  border-radius: 0 0 calc(var(--brand-radius) - 1px) calc(var(--brand-radius) - 1px);
  background: var(--brand-code);
  color: var(--brand-text);
  font: 13px/1.55 var(--brand-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.brand-snippet pre code { font: inherit; }

.brand-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.brand-footer { border-top: 1px solid var(--brand-rule); }

@media (max-width: 760px) {
  .brand-intro { grid-template-columns: 1fr; }
  .brand-intro p { max-width: 42ch; }
  .brand-logo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .brand-icon-card {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(100px, 30%) minmax(0, 1fr);
  }

  .brand-icon-card .brand-logo-preview {
    min-height: 100px;
    border-radius: calc(var(--brand-radius) - 1px) 0 0 calc(var(--brand-radius) - 1px);
  }

  .brand-icon-card img { width: min(66%, 76px); }
  .brand-icon-card .brand-card-caption { border-top: 0; border-left: 1px solid var(--brand-rule); }
}

@media (max-width: 600px) {
  .brand-wrap { width: calc(100% - 36px); }
  .brand-intro { gap: 16px; }
  .brand-section-heading { flex-direction: column; }
  .brand-style-grid, .brand-snippet-grid { grid-template-columns: 1fr; }
}

@media (max-width: 359px) {
  .brand-logo-grid { grid-template-columns: 1fr; }
}
