/* Passgen website stylesheet.
 *
 * No external fonts or assets: everything is served from this site.
 * Colors are defined as tokens, once for light and once for dark.
 */

:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --sunken: #f1efe9;
  --ink: #15181e;
  --muted: #5a6170;
  --line: #e3e0d8;
  --accent: #0b7a5c;
  --accent-ink: #ffffff;
  --accent-soft: #e2f3ed;
  --warn: #a15c07;
  --warn-soft: #fbf1dc;

  /* pattern tokens */
  --t-set: #0b7a5c;
  --t-quant: #b25409;
  --t-group: #6a3fd0;
  --t-special: #bd2463;

  /* the terminal is dark in both themes */
  --term-bg: #0d1117;
  --term-bar: #161c26;
  --term-line: #263041;
  --term-ink: #dfe5ee;
  --term-dim: #8291a7;
  --term-set: #4ee0b8;
  --term-quant: #f6b95c;
  --term-group: #b79bff;
  --term-special: #ff85b0;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, "DejaVu Sans Mono", monospace;

  --radius: 10px;
  --wrap: 1120px;
  --shadow: 0 1px 2px rgb(20 24 30 / 5%), 0 8px 24px rgb(20 24 30 / 6%);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1116;
    --surface: #151a22;
    --sunken: #1a2029;
    --ink: #e7eaf0;
    --muted: #98a2b3;
    --line: #262e3a;
    --accent: #3fd9b0;
    --accent-ink: #06281f;
    --accent-soft: #12342c;
    --warn: #f1b458;
    --warn-soft: #33270f;
    --t-set: #4ee0b8;
    --t-quant: #f6b95c;
    --t-group: #b79bff;
    --t-special: #ff85b0;
    --term-bg: #090c11;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 30%);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0e1116;
  --surface: #151a22;
  --sunken: #1a2029;
  --ink: #e7eaf0;
  --muted: #98a2b3;
  --line: #262e3a;
  --accent: #3fd9b0;
  --accent-ink: #06281f;
  --accent-soft: #12342c;
  --warn: #f1b458;
  --warn-soft: #33270f;
  --t-set: #4ee0b8;
  --t-quant: #f6b95c;
  --t-group: #b79bff;
  --t-special: #ff85b0;
  --term-bg: #090c11;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 30%);
  color-scheme: dark;
}

/* ---------- base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

code,
pre,
kbd {
  font-family: var(--mono);
  font-size: 0.9em;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  z-index: 20;
}

.skip-link:focus {
  left: 0.5rem;
}

.lede {
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1.55;
}

.t-set { color: var(--t-set); }
.t-quant { color: var(--t-quant); }
.t-group { color: var(--t-group); }
.t-special { color: var(--t-special); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 3.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  width: 1.75rem;
  height: 1.75rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  padding: 0.4rem 0.7rem;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current] {
  color: var(--ink);
  background: var(--sunken);
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-left: 0.25rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.theme-toggle[hidden] {
  display: none;
}

.theme-toggle:hover {
  color: var(--ink);
  background: var(--sunken);
}

.theme-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-moon { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: none; }
  :root:not([data-theme="light"]) .icon-moon { display: block; }
}

:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }

/* ---------- buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.btn:hover {
  border-color: var(--muted);
  transform: translateY(-1px);
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  border-color: var(--accent);
  filter: brightness(1.08);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.cta-center {
  justify-content: center;
}

.arrow-link {
  font-weight: 600;
  text-decoration: none;
}

.arrow-link::after {
  content: " →";
  display: inline-block;
  margin-left: 0.2em;
  transition: transform 0.12s ease;
}

.arrow-link:hover::after {
  transform: translateX(3px);
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5rem);
  background:
    radial-gradient(60rem 28rem at 85% -10%, var(--accent-soft), transparent 70%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 3.5rem);
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 3.9vw, 2.75rem);
  text-wrap: wrap;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.hero .accent {
  color: var(--accent);
}

.hero .lede {
  margin: 0;
  max-width: 34rem;
}

.terminal {
  border: 1px solid var(--term-line);
  border-radius: 12px;
  background: var(--term-bg);
  color: var(--term-ink);
  box-shadow: 0 20px 50px rgb(8 12 18 / 28%);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 0.9rem;
  background: var(--term-bar);
  border-bottom: 1px solid var(--term-line);
}

.terminal-bar i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--term-line);
}

.terminal-bar span {
  margin-left: 0.5rem;
  color: var(--term-dim);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.terminal-body {
  margin: 0;
  padding: 1.25rem 1.25rem 1.5rem;
  min-height: 9.5rem;
  font-size: 0.95rem;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.terminal .t-prompt { color: var(--term-dim); user-select: none; }
.terminal .t-dim { color: var(--term-dim); }
.terminal .t-out { color: #ffffff; font-weight: 600; }
.terminal .t-set { color: var(--term-set); }
.terminal .t-quant { color: var(--term-quant); }
.terminal .t-group { color: var(--term-group); }
.terminal .t-special { color: var(--term-special); }

.t-cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: var(--term-ink);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ---------- home sections ---------- */

.home section h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
  font-weight: 750;
  letter-spacing: -0.025em;
}

.section-lede {
  max-width: 40rem;
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.anatomy,
.features,
.showcase,
.start {
  padding: clamp(3rem, 7vw, 5rem) 0;
}

.features,
.start {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.anatomy-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.anatomy-pattern {
  padding: clamp(1.5rem, 4vw, 2.5rem) 1.5rem;
  border-bottom: 1px solid var(--line);
  text-align: center;
  overflow-x: auto;
}

.anatomy-pattern code {
  font-size: clamp(0.7rem, 3.3vw, 2rem);
  font-weight: 600;
  white-space: nowrap;
}

.anatomy-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.25rem 2rem;
  margin: 0;
  padding: 1.5rem;
  list-style: none;
}

.anatomy-legend li {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.anatomy-legend code {
  font-size: 1rem;
  font-weight: 700;
}

.anatomy-legend span {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.anatomy-result {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 3rem;
  padding: 1.25rem 1.5rem;
  background: var(--sunken);
  border-top: 1px solid var(--line);
}

.anatomy-result .label {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.anatomy-result code {
  font-size: 1.02rem;
}

.anatomy-output {
  font-weight: 700;
}

.anatomy-more {
  margin: 1.5rem 0 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.feature {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.feature-glyph {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: var(--sunken);
  font-size: 0.85rem;
  font-weight: 700;
}

.feature h3 {
  margin: 1rem 0 0.4rem;
  font-size: 1.1rem;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.55;
}

.feature p code {
  color: var(--ink);
}

.showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.showcase-copy p {
  color: var(--muted);
}

.showcase-samples {
  display: grid;
  gap: 0.85rem;
}

.sample {
  margin: 0;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.sample figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.sample figcaption code {
  font-size: 0.8rem;
  font-weight: 500;
}

.sample-out {
  margin: 0.5rem 0 0.75rem;
  font-family: var(--mono);
  font-size: 1.02rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.meter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.meter i {
  position: relative;
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--sunken);
  overflow: hidden;
}

.meter i::after {
  content: "";
  position: absolute;
  inset: 0;
  /* the scale tops out at 160 bits */
  width: calc(var(--bits) / 160 * 100%);
  border-radius: 3px;
  background: var(--accent);
}

.meter span {
  min-width: 4.2rem;
  text-align: right;
}

.start {
  text-align: center;
}

.start .section-lede {
  margin-inline: auto;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
  gap: 0.85rem;
  max-width: 48rem;
  margin-inline: auto;
  text-align: left;
}

.preset {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.preset-cmd {
  color: var(--muted);
  font-size: 0.82rem;
}

.preset-cmd::before {
  content: "$ ";
  opacity: 0.6;
}

.preset-out {
  font-size: 0.95rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* ---------- footer ---------- */

.site-footer {
  margin-top: auto;
  padding: 3rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.93rem;
}

.home .site-footer {
  border-top: 0;
}

.site-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
}

.footer-about p {
  max-width: 24rem;
  margin: 0.75rem 0 0;
}

.site-footer nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.site-footer h2 {
  margin: 0 0 0.3rem;
  color: var(--ink);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-footer nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--ink);
}

/* ---------- pages and docs ---------- */

.page {
  max-width: 50rem;
  padding-block: clamp(2rem, 5vw, 3.5rem) 4rem;
}

.docs {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr) 12rem;
  gap: 3rem;
  padding-block: clamp(1.5rem, 4vw, 3rem) 4rem;
}

.docs-sidebar,
.docs-toc {
  position: sticky;
  top: 5.25rem;
  align-self: start;
  max-height: calc(100vh - 6.5rem);
  overflow-y: auto;
  font-size: 0.93rem;
}

.docs-menu summary {
  display: none;
}

.docs-sidebar nav,
.docs-toc nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.docs-sidebar a {
  padding: 0.4rem 0.75rem;
  border-radius: 7px;
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}

.docs-sidebar a:hover {
  color: var(--ink);
  background: var(--sunken);
}

.docs-sidebar a[aria-current] {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.docs-toc h2 {
  margin: 0 0 0.5rem;
  color: var(--ink);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.docs-toc a {
  padding: 0.2rem 0 0.2rem 0.85rem;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
}

.docs-toc a:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.prose {
  min-width: 0;
}

.prose > h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.prose > .lede {
  margin: 0 0 2rem;
}

.prose h2 {
  margin: 2.75rem 0 0.75rem;
  padding-top: 0.25rem;
  font-size: 1.5rem;
}

.prose h3 {
  margin: 2rem 0 0.5rem;
  font-size: 1.15rem;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1.1rem;
}

.prose li + li {
  margin-top: 0.3rem;
}

.prose :not(pre) > code {
  padding: 0.12em 0.38em;
  border-radius: 5px;
  background: var(--sunken);
  overflow-wrap: anywhere;
}

.prose pre {
  margin: 0 0 1.4rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--term-line);
  border-radius: var(--radius);
  background: var(--term-bg);
  color: var(--term-ink);
  font-size: 0.88rem;
  line-height: 1.6;
  overflow-x: auto;
  color-scheme: dark;
}

.prose pre code {
  font-size: inherit;
}

.prose kbd {
  padding: 0.1em 0.45em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface);
}

.prose blockquote {
  margin: 0 0 1.4rem;
  padding: 0.1rem 1.1rem;
  border-left: 3px solid var(--line);
  color: var(--muted);
}

.prose table {
  width: 100%;
  margin: 0 0 1.5rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.prose th,
.prose td {
  padding: 0.6rem 0.9rem 0.6rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.prose th {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.prose td code {
  white-space: nowrap;
}

.prose td.wrap-code code,
.prose td:last-child code {
  white-space: normal;
}

.diagram {
  margin: 0 0 1.5rem;
  padding: 1.5rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  overflow-x: auto;
}

.diagram svg {
  display: block;
  height: auto;
  margin-inline: auto;
  font-family: var(--mono);
  font-size: 13px !important;
}

.note {
  margin: 0 0 1.5rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.note-warning {
  border-left-color: var(--warn);
  background: var(--warn-soft);
}

.note-title {
  margin: 0 0 0.35rem !important;
  font-weight: 700;
}

.note > :last-child {
  margin-bottom: 0;
}

.doc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.85rem;
  margin-top: 2rem;
}

.doc-card {
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.12s ease, transform 0.12s ease;
}

.doc-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.doc-card h2 {
  margin: 0 0 0.3rem;
  padding: 0;
  font-size: 1.08rem;
}

.doc-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.5;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.pager a {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  text-decoration: none;
}

.pager a span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pager-next {
  margin-left: auto;
  text-align: right;
}

.calculator {
  display: grid;
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.calculator[hidden] {
  display: none;
}

.calc-row {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr) 7.5rem;
  align-items: center;
  gap: 1rem;
}

.calc-row label {
  font-weight: 600;
  font-size: 0.95rem;
}

.calc-row output {
  font-family: var(--mono);
  font-size: 0.9rem;
  text-align: right;
}

.calc-row input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.calc-row select {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
}

.calc-result {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.calc-result strong {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.25rem;
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .docs {
    grid-template-columns: 13rem minmax(0, 1fr);
  }

  .docs-toc {
    display: none;
  }
}

@media (max-width: 860px) {
  .hero h1 {
    font-size: clamp(2rem, 8vw, 2.75rem);
  }

  .hero-inner,
  .showcase-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .docs {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .docs-sidebar {
    position: static;
    max-height: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
  }

  .docs-menu summary {
    display: block;
    padding: 0.7rem 1rem;
    font-weight: 600;
    cursor: pointer;
  }

  .docs-menu nav {
    padding: 0 0.5rem 0.5rem;
  }

  .site-footer-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .footer-about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 1rem;
  }

  .brand span {
    display: none;
  }

  .site-header-inner {
    padding-inline: 1rem;
  }

  .site-nav {
    gap: 0;
  }

  .site-nav a {
    padding-inline: 0.4rem;
  }

  .theme-toggle {
    margin-left: 0;
  }

  .calc-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .calc-row label {
    grid-column: 1 / -1;
    margin-bottom: -0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
