@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  color-scheme: light;
  --bg: #f5eadf;
  --bg-deep: #e9d4c4;
  --bg-end: #dcc2b1;
  --surface: rgba(255, 250, 244, 0.78);
  --surface-strong: rgba(255, 250, 244, 0.94);
  --ink: #2b211c;
  --muted: #73584e;
  --border: rgba(94, 60, 46, 0.18);
  --accent: #a75342;
  --accent-strong: #7b342a;
  --accent-soft: #d78369;
  --code-bg: #201612;
  --code-ink: #f8eee8;
  --shadow: rgba(92, 55, 41, 0.14);
  --shadow-strong: rgba(92, 55, 41, 0.22);
  --glow-a: rgba(215, 131, 105, 0.25);
  --glow-b: rgba(126, 75, 55, 0.14);
  --grid-line: rgba(94, 60, 46, 0.045);
  --header-surface: rgba(255, 250, 244, 0.68);
  --hover-surface: rgba(167, 83, 66, 0.1);
  --button-ink: #fff8f2;
  --card-hover: #fffaf4;
  --radius: 28px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12100f;
  --bg-deep: #1a1817;
  --bg-end: #262422;
  --surface: rgba(31, 22, 18, 0.86);
  --surface-strong: rgba(48, 32, 26, 0.92);
  --ink: #f6eee8;
  --muted: #cbb5a9;
  --border: rgba(221, 175, 154, 0.2);
  --accent: #d68770;
  --accent-strong: #d99b8a;
  --accent-soft: #a75b48;
  --code-bg: #12100f;
  --code-ink: #f6eee8;
  --shadow: rgba(0, 0, 0, 0.34);
  --shadow-strong: rgba(0, 0, 0, 0.38);
  --glow-a: rgba(180, 92, 71, 0.2);
  --glow-b: rgba(245, 220, 198, 0.08);
  --grid-line: rgba(196, 187, 180, 0.035);
  --header-surface: rgba(22, 21, 20, 0.86);
  --hover-surface: rgba(150, 89, 74, 0.16);
  --button-ink: #f3efec;
  --card-hover: rgba(36, 33, 31, 0.98);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at 12% 12%, var(--glow-a), transparent 34rem),
    radial-gradient(circle at 88% 4%, var(--glow-b), transparent 30rem),
    linear-gradient(145deg, var(--bg), var(--bg-deep) 56%, var(--bg-end));
  transition: color 180ms ease, background 220ms ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

a {
  color: inherit;
}

.site-header-shell {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  isolation: isolate;
}

.site-header-shell::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0 0 -4.5rem;
  pointer-events: none;
  background: color-mix(in srgb, var(--header-surface) 76%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0,
    #000 calc(100% - 5rem),
    rgba(0, 0, 0, 0.76) calc(100% - 3.5rem),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0,
    #000 calc(100% - 5rem),
    rgba(0, 0, 0, 0.76) calc(100% - 3.5rem),
    transparent 100%
  );
  transition: background 220ms ease;
}

.site-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

.brand,
.site-header nav,
.header-action,
#theme-control {
  border: 1px solid var(--border);
  background: var(--header-surface);
  box-shadow: 0 18px 48px var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 3.4rem;
  padding: 0.34rem 0.92rem 0.34rem 0.45rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand img {
  border-radius: 16px;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem;
  border-radius: 999px;
}

.site-header nav a,
.header-action {
  padding: 0.72rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  transition: 160ms ease;
}

.site-header nav a:hover,
.header-action:hover {
  color: var(--ink);
  background: var(--hover-surface);
}

.header-action {
  background: var(--ink);
  color: var(--button-ink);
  border-color: rgba(43, 33, 28, 0.35);
}

#theme-control {
  --theme-segment-width: 2.2rem;
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(3, var(--theme-segment-width));
  align-items: center;
  gap: 0;
  padding: 0.22rem;
  border-radius: 999px;
  overflow: hidden;
  transition:
    border-color 220ms cubic-bezier(0.22, 1, 0.36, 1),
    background 220ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

#theme-control::before {
  content: "";
  position: absolute;
  top: 0.22rem;
  bottom: 0.22rem;
  left: 0.22rem;
  width: var(--theme-segment-width);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 10px 18px var(--shadow);
  transform: translateX(calc(var(--theme-offset, 0) * var(--theme-segment-width)));
  transition:
    transform 180ms ease,
    background 220ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

#theme-control[data-theme="system"] { --theme-offset: 0; }
#theme-control[data-theme="light"]  { --theme-offset: 1; }
#theme-control[data-theme="dark"]   { --theme-offset: 2; }

.theme-option {
  position: relative;
  z-index: 1;
  width: var(--theme-segment-width);
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition:
    color 220ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 140ms ease;
}

.theme-option.is-active,
.theme-option.is-active:hover {
  color: var(--button-ink);
}

.theme-option:not(.is-active):hover {
  color: var(--ink);
}

.theme-option svg {
  width: 1rem;
  height: 1rem;
  display: block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

main {
  position: relative;
  z-index: 1;
}

.section-shell {
  width: min(1040px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  width: min(1180px, calc(100% - 2rem));
  min-height: calc(100vh - 7rem);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(500px, 1.1fr);
  align-items: center;
  gap: 2rem;
  padding: 3rem 0 2.5rem;
}

.eyebrow {
  margin: 0 0 0.95rem;
  color: var(--accent-strong);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(3.4rem, 6.2vw, 5.8rem);
  line-height: 0.9;
  letter-spacing: -0.065em;
}

.hero-lede {
  max-width: 68ch;
  margin: 1.8rem 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  line-height: 1.72;
}

.hero-actions,
.start-actions,
.link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.hero-actions {
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.62rem;
  min-height: 3.25rem;
  padding: 0 1.35rem 0 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 18px 40px var(--shadow);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.18);
  color: currentColor;
  flex: 0 0 auto;
}

.button-icon svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.button-secondary .button-icon {
  background: rgba(167, 83, 66, 0.12);
  color: var(--accent-strong);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 54px var(--shadow-strong);
}

.button-primary {
  color: var(--button-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-color: rgba(123, 52, 42, 0.45);
}

.button-secondary {
  background: var(--surface-strong);
}

.link-row {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.link-row a {
  text-decoration-color: rgba(115, 88, 78, 0.36);
  text-underline-offset: 0.2em;
}

.hero-example-slot {
  display: grid;
  align-items: start;
  align-self: center;
  width: 100%;
  min-width: 0;
}

.hero-card {
  position: relative;
  grid-area: 1 / 1;
  align-self: start;
  margin-top: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 235, 222, 0.18);
  background: var(--code-bg);
  color: var(--code-ink);
  box-shadow: 0 34px 100px rgba(43, 28, 22, 0.34);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

#hero-example {
  z-index: 1;
}

.hero-card-size-probe {
  grid-area: 1 / 1;
  visibility: hidden;
  pointer-events: none;
}

.hero-card.is-changing {
  border-color: rgba(215, 131, 105, 0.3);
  box-shadow: 0 34px 100px rgba(215, 131, 105, 0.22);
}

.hero-card .rss-code,
.hero-card .window-bar strong {
  transition: opacity 0.25s ease;
}

.hero-card.is-changing .rss-code,
.hero-card.is-changing .window-bar strong {
  opacity: 0;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -30% -20% auto auto;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: rgba(215, 131, 105, 0.2);
  filter: blur(20px);
}

.window-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(255, 235, 222, 0.12);
  color: rgba(248, 238, 232, 0.64);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
}

.window-bar span {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--accent-soft);
}

.window-bar span:nth-child(2) {
  background: #e5b267;
}

.window-bar span:nth-child(3) {
  background: #9fb27a;
}

.window-bar strong {
  margin-left: 0.45rem;
  font-weight: 500;
}

.example-code-stack {
  display: grid;
  min-width: 0;
}

.example-code-panel {
  grid-area: 1 / 1;
  visibility: hidden;
}

pre {
  position: relative;
  margin: 0;
  padding: 1.45rem 1.7rem;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font: 500 0.92rem/1.68 "IBM Plex Mono", monospace;
}

.rss-code code {
  display: block;
}

.tok-kw {
  color: #ffb38f;
}

.tok-fn {
  color: #ffd37a;
}

.tok-type {
  color: #9fd3ff;
}

.tok-str {
  color: #b8e08d;
}

.tok-num {
  color: #d9b8ff;
}

.tok-comment {
  color: rgba(248, 238, 232, 0.48);
}

.tok-kw,
.tok-fn,
.tok-type,
.tok-str,
.tok-num {
  font-weight: 600;
}

.example-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
  z-index: 1;
  padding: 0.8rem 1.1rem 1.1rem;
  border-top: 1px solid rgba(255, 235, 222, 0.1);
}

.example-dots-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex: 1;
}

.example-action-spacer,
.example-jump-link {
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
}

.example-jump-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  border: 0;
  border-radius: 50%;
  color: rgba(248, 238, 232, 0.68);
  background: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

.example-jump-link svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.example-jump-link:hover {
  color: var(--code-ink);
  transform: translateY(-1px);
}

.example-jump-link:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

.example-dot {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.58rem;
  height: 0.58rem;
  border: 1px solid rgba(248, 238, 232, 0.3);
  border-radius: 50%;
  background: transparent;
  color: rgba(248, 238, 232, 0.4);
  cursor: pointer;
  transition: background 240ms ease, border-color 240ms ease;
  padding: 0;
}

.example-dot:hover {
  border-color: rgba(248, 238, 232, 0.65);
  background: rgba(248, 238, 232, 0.2);
}

.example-dot.is-active {
  background: var(--accent-soft, #d78369);
  border-color: var(--accent-soft, #d78369);
}

.hero-card p {
  margin: 0;
  padding: 1.2rem 1.45rem 1.45rem;
  color: rgba(248, 238, 232, 0.68);
  border-top: 1px solid rgba(255, 235, 222, 0.1);
  line-height: 1.65;
}

.split-section,
.section-shell:not(.hero) {
  padding: 5rem 0;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 3rem;
  align-items: start;
}

h2 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.9rem);
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.split-section > div > p:not(.eyebrow),
.start-section p {
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.76;
}

.card-grid,
.use-grid,
.example-links {
  display: grid;
  gap: 1rem;
}

.card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-card,
.use-grid article,
.example-links a,
.repo-list a,
.start-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 20px 70px var(--shadow);
}

.feature-card,
.use-grid article,
.example-links a {
  padding: 1.35rem;
}

h3 {
  margin: 0 0 0.65rem;
  font-size: 1.22rem;
  letter-spacing: -0.025em;
}

.feature-card p,
.use-grid p,
.example-links span,
.repo-list span {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.25rem;
}

.use-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  margin-bottom: 1.2rem;
  border-radius: 999px;
  background: rgba(167, 83, 66, 0.12);
  color: var(--accent-strong);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
}

.repo-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.repo-list a,
.example-links a {
  display: grid;
  gap: 0.35rem;
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease;
}

.repo-list a {
  padding: 1rem 1.1rem;
}

.repo-list a:hover,
.example-links a:hover {
  transform: translateY(-2px);
  background: var(--surface-strong);
}

.repo-list strong,
.example-links strong {
  font-size: 1.02rem;
}

.example-links {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.start-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  margin-bottom: 4rem;
  background:
    radial-gradient(circle at top right, rgba(215, 131, 105, 0.22), transparent 25rem),
    var(--surface);
}

.start-actions {
  justify-content: flex-end;
}

.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1040px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  color: var(--muted);
}

.site-footer span {
  color: var(--ink);
  font-weight: 700;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer a {
  text-decoration-color: rgba(115, 88, 78, 0.34);
  text-underline-offset: 0.2em;
}

.doc-page {
  width: min(1040px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 3rem;
}

.doc-shell {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: 0 24px 80px var(--shadow);
  padding: clamp(1.25rem, 4vw, 3rem);
}

.doc-shell h1 {
  max-width: none;
  margin: 0 0 1rem;
  font-size: clamp(2.6rem, 6vw, 5.6rem);
  line-height: 0.94;
}

.doc-shell h2,
.doc-shell h3,
.doc-shell h4,
.doc-shell h5,
.doc-shell h6 {
  margin: 2.2rem 0 0.8rem;
  letter-spacing: -0.03em;
}

.doc-shell h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

.doc-shell h3 {
  font-size: 1.45rem;
}

.doc-shell.blog-post h1 {
  font-size: clamp(1.56rem, 3.6vw, 3.36rem);
  line-height: 1.02;
}

.doc-shell.blog-post h2 {
  font-size: clamp(1.08rem, 2.4vw, 1.8rem);
  line-height: 1.08;
}

.doc-shell.blog-post h3 {
  font-size: 0.87rem;
}

.doc-shell.blog-post h4 {
  font-size: 0.78rem;
}

.doc-shell.blog-post h5 {
  font-size: 0.72rem;
}

.doc-shell.blog-post h6 {
  font-size: 0.66rem;
}

.doc-shell.blog-post h2,
.doc-shell.blog-post h3,
.doc-shell.blog-post h4,
.doc-shell.blog-post h5,
.doc-shell.blog-post h6 {
  margin-top: 1.5rem;
}

.doc-shell p,
.doc-shell li {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.78;
}

.doc-shell a {
  color: var(--accent-strong);
  text-underline-offset: 0.18em;
}

.doc-shell code {
  border: 1px solid rgba(94, 60, 46, 0.14);
  border-radius: 0.4rem;
  background: rgba(167, 83, 66, 0.1);
  padding: 0.1rem 0.28rem;
  color: var(--accent-strong);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92em;
}

.doc-shell pre {
  margin: 1.2rem 0;
  padding: 1.25rem;
  border-radius: 20px;
  background: var(--code-bg);
  color: var(--code-ink);
  box-shadow: inset 0 0 0 1px rgba(255, 235, 222, 0.12);
}

.doc-shell pre code {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
}

.doc-breadcrumb {
  margin-bottom: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.doc-card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.doc-card-list a {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease;
}

.doc-card-list a:hover {
  transform: translateY(-2px);
  background: var(--card-hover);
}

.doc-card-list span {
  color: var(--muted);
}

.doc-table-wrap {
  overflow-x: auto;
  margin: 1.2rem 0;
}

.doc-shell table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.doc-shell th,
.doc-shell td {
  border: 1px solid var(--border);
  padding: 0.72rem;
  text-align: left;
  vertical-align: top;
}

.doc-shell th {
  background: rgba(167, 83, 66, 0.1);
}

@media (max-width: 900px) {
  .site-header-shell {
    position: static;
  }

  .site-header {
    flex-wrap: nowrap;
  }

  .site-header nav {
    min-width: 0;
    justify-content: flex-end;
    overflow-x: auto;
  }

  .hero,
  .split-section,
  .start-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    padding-top: 2.5rem;
  }

  .hero-card {
    margin-top: 0;
  }

  .use-grid,
  .example-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .start-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .section-shell {
    width: min(100% - 1rem, 1040px);
  }

  .site-header {
    width: calc(100% - 1rem);
    gap: 0.35rem;
    padding-inline: 0.5rem;
  }

  .brand {
    min-height: 0;
    padding: 0.28rem;
  }

  .brand img {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .brand span {
    display: none;
  }

  .site-header nav {
    gap: 0.1rem;
    padding: 0.3rem;
  }

  .site-header nav a {
    padding: 0.58rem;
    font-size: 0.8rem;
  }

  h1 {
    font-size: clamp(3.4rem, 19vw, 4.9rem);
  }

  .hero-card pre {
    padding: 1.2rem 1rem;
    font-size: 0.8rem;
    line-height: 1.6;
  }

  .card-grid,
  .use-grid,
  .repo-list,
  .example-links {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .doc-card-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .site-header {
    gap: 0.2rem;
    padding-inline: 0.25rem;
  }

  .brand {
    padding: 0.22rem;
  }

  .brand img {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .site-header nav {
    flex: 1 1 auto;
    justify-content: space-between;
    gap: 0;
    padding: 0.22rem;
    overflow: visible;
  }

  .site-header nav a {
    padding: 0.48rem 0.25rem;
    font-size: 0.72rem;
  }

  #theme-control {
    --theme-segment-width: 1.65rem;
    padding: 0.18rem;
  }

  #theme-control::before {
    top: 0.18rem;
    bottom: 0.18rem;
    left: 0.18rem;
  }

  .theme-option {
    height: 1.8rem;
  }
}
