:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --subtle: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --code: #111114;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 15px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

svg {
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(250, 250, 252, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: var(--text);
  color: #fff;
}

.brand-mark svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.topnav a {
  color: #424245;
  font-size: 13px;
  text-decoration: none;
  transition: color 160ms ease;
}

.topnav a:hover {
  color: var(--blue);
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.contribute-link {
  padding: 6px 13px;
  border-radius: 16px;
  background: var(--text);
  color: #fff !important;
}

.contribute-link:hover {
  background: var(--blue);
}

.github-link svg {
  width: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

main {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 650px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 92px 20px 76px;
  overflow: hidden;
  text-align: center;
}

.hero-glow {
  position: absolute;
  z-index: -1;
  top: -280px;
  left: 50%;
  width: 760px;
  height: 620px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 60%, rgba(0, 113, 227, 0.2), transparent 50%),
    radial-gradient(circle at 68% 58%, rgba(175, 82, 222, 0.17), transparent 48%);
  filter: blur(18px);
  transform: translateX(-50%);
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--blue);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

h1 {
  max-width: 980px;
  margin: 15px 0 0;
  font-size: clamp(50px, 7.2vw, 88px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

h1 code {
  color: var(--blue);
  font: inherit;
}

.lead {
  max-width: 660px;
  margin: 25px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  letter-spacing: -0.025em;
}

.search {
  position: relative;
  display: flex;
  width: min(720px, 100%);
  min-height: 68px;
  align-items: center;
  margin-top: 44px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.09);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  backdrop-filter: blur(20px);
}

.search:focus-within {
  border-color: rgba(0, 113, 227, 0.45);
  box-shadow: 0 18px 55px rgba(0, 113, 227, 0.14), 0 0 0 4px rgba(0, 113, 227, 0.08);
  transform: translateY(-1px);
}

.search > svg {
  width: 23px;
  margin-left: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--subtle);
  stroke-linecap: round;
  stroke-width: 1.8;
}

.search input {
  width: 100%;
  min-width: 0;
  padding: 0 18px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 18px;
}

.search input::placeholder {
  color: #98989d;
}

.search kbd {
  margin-right: 17px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f5f5f7;
  color: var(--subtle);
  font-family: inherit;
  font-size: 12px;
  white-space: nowrap;
}

.hero-meta {
  display: flex;
  align-items: center;
  margin-top: 20px;
}

.segments {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(118, 118, 128, 0.12);
}

.header-language {
  flex: 0 0 auto;
  margin-left: 2px;
}

.header-language .segment {
  min-width: 38px;
  min-height: 27px;
  padding: 0 8px;
  font-size: 11px;
}

.segment {
  min-width: 48px;
  min-height: 29px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.segment.is-active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.command-count {
  color: var(--subtle);
  font-size: 13px;
}

.command-count strong {
  color: var(--text);
}

.results {
  margin: -42px auto 70px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.results[hidden] {
  display: none;
}

.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 10px 14px;
}

.results-head h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.results-head span {
  color: var(--subtle);
  font-size: 12px;
}

.result-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.result {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 16px 46px 16px 16px;
  border-radius: 14px;
  background: #f5f5f7;
  transition: background 160ms ease, transform 160ms ease;
}

.result:hover {
  background: #eeeeF0;
  transform: translateY(-1px);
}

.result-main {
  display: grid;
  min-width: 0;
  gap: 5px;
  text-decoration: none;
}

.result span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.result strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result code {
  overflow: hidden;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-command {
  position: absolute;
  top: 50%;
  right: 12px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--subtle);
  cursor: pointer;
  transform: translateY(-50%);
}

.copy-command:hover {
  color: var(--blue);
}

.copy-command.is-copied {
  background: #e9f7ec;
  color: #248a3d;
}

.copy-command svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.quick-start,
.catalog {
  padding: 88px 0 18px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 5px 0 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.section-note,
.section-description {
  margin: 0 0 4px;
  color: var(--subtle);
  font-size: 14px;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1.18fr 1fr 1fr;
  gap: 14px;
}

.quick-card {
  display: grid;
  min-height: 168px;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 16px;
  padding: 24px;
  border: 1px solid rgba(0, 0, 0, 0.055);
  border-radius: var(--radius-lg);
  background: var(--surface-solid);
  text-decoration: none;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.quick-card:hover {
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

.quick-card > svg {
  width: 18px;
  fill: none;
  stroke: var(--subtle);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.quick-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  align-self: start;
  border-radius: 13px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
}

.icon-blue {
  background: #e8f2ff;
  color: #0071e3;
}

.icon-purple {
  background: #f3eafb;
  color: #8944ab;
}

.icon-orange {
  background: #fff0df;
  color: #c75c00;
}

.quick-card strong,
.quick-card small {
  display: block;
}

.quick-card strong {
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.quick-card small {
  margin-top: 6px;
  color: var(--subtle);
  font-size: 12px;
}

.catalog {
  padding-bottom: 100px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  display: grid;
  min-height: 310px;
  gap: 24px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.055);
  border-radius: var(--radius-xl);
  background: var(--surface-solid);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.card:hover {
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

.card-number {
  position: absolute;
  top: 20px;
  right: 24px;
  color: #e3e3e8;
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.06em;
}

.card-header {
  position: relative;
  z-index: 1;
  max-width: 82%;
}

.card-kicker {
  color: var(--blue);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card h2 {
  margin: 10px 0 8px;
  font-size: 27px;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-content: start;
}

.chip {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 9px;
  border-radius: 8px;
  background: #f5f5f7;
  color: #515154;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}

.chip:hover {
  background: #e8f2ff;
  color: var(--blue);
}

.card-footer {
  display: flex;
  align-self: end;
  gap: 12px;
}

.button-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 150ms ease;
}

.button-link:hover {
  background: var(--blue-hover);
}

.button-link.secondary {
  background: transparent;
  color: var(--blue);
}

.empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 70px 30px;
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--muted);
  text-align: center;
}

footer {
  display: flex;
  width: min(1180px, calc(100% - 48px));
  min-height: 110px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 12px;
}

footer p {
  margin: 0;
}

footer strong {
  color: var(--text);
}

footer a {
  text-decoration: none;
}

footer a:hover {
  color: var(--blue);
}

@media (max-width: 900px) {
  .quick-grid {
    grid-template-columns: 1fr 1fr;
  }

  .quick-card-wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 0 20px;
  }

  .topnav {
    gap: 10px;
  }

  .topnav a:first-child {
    display: none;
  }

  main,
  footer {
    width: min(100% - 28px, 1180px);
  }

  .hero {
    min-height: 590px;
    padding-right: 0;
    padding-left: 0;
  }

  h1 {
    font-size: clamp(45px, 14vw, 68px);
  }

  .search {
    min-height: 60px;
    border-radius: 17px;
  }

  .search input {
    font-size: 16px;
  }

  .search kbd {
    display: none;
  }

  .result-list,
  .cards {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }

  .quick-grid {
    grid-template-columns: 1fr;
  }

  .quick-card-wide {
    grid-column: auto;
  }

  .quick-card {
    min-height: 145px;
  }

  .card {
    min-height: 285px;
    padding: 25px;
    border-radius: 24px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .topnav > a:not(.contribute-link) {
    display: none;
  }

  .topbar {
    gap: 10px;
    padding: 0 14px;
  }

  .brand strong {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
