/* Fonts, page basics, header and footer. Values come from tokens.css. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-latin-opsz-italic.woff2") format("woff2");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { color: var(--ink); font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
p, li { text-wrap: pretty; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 2px; }
code, kbd, pre { font-family: var(--mono); font-size: 0.9em; }
pre { max-width: 100%; overflow-x: auto; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; padding: 8px 12px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); }
.skip:focus { left: 8px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Header */
.top { border-bottom: 1px solid var(--line); background: var(--paper); }
.top .wrap { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }
.brand svg { display: block; height: 26px; width: auto; }
.top nav { display: flex; gap: 22px; font-size: 15px; }
.top nav a, .top .gh { color: var(--ink-2); text-decoration: none; }
.top nav a:hover, .top .gh:hover { color: var(--ink); text-decoration: underline; }
.top nav a[aria-current="page"], .top .gh[aria-current="page"] { color: var(--ink); font-weight: 600; }
.top .right { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 15px; }
.theme { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); color: var(--ink-2); cursor: pointer; }
.theme:hover { color: var(--ink); border-color: var(--ink); }
.theme svg { width: 16px; height: 16px; }
.theme .sun { display: none; }
:root[data-theme="dark"] .theme .sun { display: block; }
:root[data-theme="dark"] .theme .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .sun { display: block; }
  :root:not([data-theme="light"]) .theme .moon { display: none; }
}
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); font-size: 15px; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { border-color: var(--ink); }
.menu ul { position: absolute; right: 0; top: 44px; z-index: 5; min-width: 220px; margin: 0; padding: 8px; list-style: none; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.menu li a { display: block; padding: 8px 10px; color: var(--ink); text-decoration: none; border-radius: var(--r); }
.menu li a:hover { background: var(--paper-2); }
@media (max-width: 860px) {
  .top nav, .top .gh { display: none; }
  .menu { display: block; }
  .top .wrap { gap: 12px; }
}
/* Small phones: Install stays in the header (the menu doesn't repeat it), with tighter spacing so
   the logo, theme switch, Install and Menu fit on one row down to 320px. */
@media (max-width: 420px) {
  .top .wrap { gap: 8px; }
  .top .right { gap: 8px; }
  .top .btn-install { height: 36px; padding: 0 12px; font-size: 14px; }
  .menu summary { padding: 0 10px; }
}

/* Footer */
.foot { margin-top: var(--section); border-top: 1px solid var(--line); padding-block: 56px 28px; font-size: 15px; }
.foot .cols { display: grid; grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)); gap: 32px; }
.foot h2 { margin: 0 0 12px; font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: 0; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot ul a { color: var(--ink-2); text-decoration: none; }
.foot ul a:hover { color: var(--ink); text-decoration: underline; }
.foot .about p { margin: 12px 0 0; color: var(--muted); font-size: var(--fs-small); max-width: 26em; }
.foot .legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.foot .legal a { color: var(--muted); }
@media (max-width: 980px) {
  .foot .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot .about { grid-column: 1 / -1; }
}
