/* Shared by every page: the tokens, the page chrome (container, skip link, header and nav,
   footer, buttons) and the scrollbar. home.css and page.css build on it; neither redefines
   these. Change the site's colours, widths and chrome here. */
@font-face { font-family: "Caprasimo"; src: url(/fonts/caprasimo.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url(/fonts/figtree.woff2) format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(/fonts/jetbrains-mono.woff2) format("woff2"); font-weight: 100 800; font-display: swap; }
:root {
  /* Always-dark surfaces (terminals, shell blocks, the bands): the same in both themes. */
  --dark-bg: #120b07;
  --dark-bar: #1c120c;
  --dark-line: #2b1d14;
  --dark-pane: #170e09;
  --dark-ink: #f6ecdf;
  --dark-ink-2: #f3e3cf;
  --dark-ink-3: #d9c7b2;
  --dark-soft: #c9b39b;
  --dark-muted: #b9a28a;
  --dark-muted-2: #9c876f;
  --dark-faint: #8a7562;
  --dark-accent: #ff9f5c;
  --dark-hover: #5a3a22;
  /* Format families: one colour each, shared by the format chips, groups and tracks. */
  --fam-archive: #f0611a;
  --fam-tar: #8f5f37;
  --fam-compressed: #13857a;
  --fam-books: #6a3fe6;
  --fam-office: #1f6fe0;
  --fam-apps: #22903f;
  --fam-installers: #d6365a;
  --button: #cc4a0a;
  --button-hover: #b93c0a;
  /* Orange-peel dimples and a soft rim for filled buttons. */
  --peel-skin: radial-gradient(circle at 40% 30%, rgba(255, 255, 255, .13) 0 .7px, transparent 1.4px) 0 0 / 7px 6px,
    radial-gradient(circle at 70% 60%, rgba(70, 20, 0, .14) 0 1px, transparent 1.8px) 2px 5px / 11px 9px,
    radial-gradient(circle at 20% 80%, rgba(70, 20, 0, .10) 0 .8px, transparent 1.5px) 6px 1px / 13px 12px;
  --peel-rim: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -3px 8px rgba(80, 20, 0, .22);
  --on-button: #ffffff;
  --bg: #fff8ef;
  --bg-2: #fdeedb;
  --surface: #ffffff;
  --ink: #2a1a0e;
  --muted: #7a6450;
  --line: #f0dfc9;
  --orange: #f26622;
  --accent: #c2410c;
  --accent-strong: #a63c07;
  --on-accent: #ffffff;
  --leaf: #2a6f34;
  --code-bg: #fdf0e1;
  --window: #ffffff;
  --window-bar: #f6f1ea;
  --row-alt: #faf6f1;
  --select: #c2410c;
  --select-soft: rgba(242, 107, 29, 0.16);
  --shadow: 0 30px 60px -20px rgba(90, 45, 10, 0.28), 0 10px 24px -12px rgba(90, 45, 10, 0.18);
  --band: #2a1a0e;
  --band-ink: #fff3e3;
  --band-muted: #c9b29a;
  --display: "Caprasimo", Georgia, serif;
  --sans: "Figtree", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --system: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --smooth: cubic-bezier(.22, 1, .36, 1);
  --peel-a: #eadcc8;
  --peel-b: #fffaf2;
  --peel-shade: rgba(60, 30, 8, 0.45);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a120c;
    --bg-2: #22180f;
    --surface: #261b13;
    --ink: #f7ead9;
    --muted: #b9a28a;
    --line: #3a2a1d;
    --accent: var(--orange);
    --accent-strong: #ff9f5c;
    --on-accent: #1c140e;
    --leaf: #7bc286;
    --code-bg: #2e2117;
    --window: #2a2019;
    --window-bar: #33271e;
    --row-alt: #2e231b;
    --select: #c2410c;
    --select-soft: rgba(255, 138, 61, 0.2);
    --shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6), 0 10px 24px -12px rgba(0, 0, 0, 0.5);
    --band: #0f0a06;
    --peel-a: #5b4330;
    --peel-b: #8a6b4f;
    --peel-shade: rgba(0, 0, 0, 0.7);
  }
}
@media print {
  :root { color-scheme: light; --bg: #fff; --ink: #000; --muted: #444; --accent: #000; --line: #ccc; --code-bg: #f4f4f4; }
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; accent-color: var(--accent); scroll-behavior: smooth; }
* {box-sizing: border-box;}
p, li, dd, figcaption { text-wrap: pretty; }
::selection {background: var(--select-soft); color: inherit;}
a:focus-visible, button:focus-visible {outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px;}
.skip {position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 12px 18px; border-radius: 12px; font-weight: 700; text-decoration: none;}
.brand img {width: 34px; height: 34px; transition: transform .5s var(--spring);}
.brand:hover img {transform: rotate(-14deg) scale(1.12);}
nav.top {position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 20px 0;}
nav.top ul {display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; align-items: center;}
nav.top ul a {display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 10px; white-space: nowrap; transition: color .2s, background .2s;}
nav.top ul a:hover {color: var(--ink); background: var(--bg-2);}
nav.top ul a[aria-current="page"] {color: var(--accent);}
nav.top ul a.pill {color: var(--on-button); background: var(--peel-skin), var(--button); box-shadow: var(--peel-rim);}
nav.top ul a.pill:hover {background: var(--peel-skin), var(--button-hover); color: var(--on-button); animation: jelly .6s;}
footer a {color: var(--muted); display: inline-flex; align-items: center; min-height: 44px;}
::-webkit-scrollbar {width: 14px; height: 14px;}
::-webkit-scrollbar-track {background: var(--bg-2); border-left: 1px solid var(--line);}
::-webkit-scrollbar-thumb {
  border-radius: 10px; border: 3px solid var(--bg-2);
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .35) 0 1px, transparent 1.6px) 0 0 / 6px 6px,
    radial-gradient(circle at 70% 70%, rgba(150, 50, 0, .25) 0 1px, transparent 1.6px) 0 0 / 7px 7px,
    linear-gradient(90deg, #ff9a3c, #f26b1d 55%, #d4550b);
  box-shadow: inset 0 0 0 1.5px #fff3df;
}
::-webkit-scrollbar-corner {background: var(--bg-2);}
.skip:focus { top: 12px; color: var(--on-accent); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--ink); font: 400 22px/1 var(--display); }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; align-items: center; padding-top: 28px; padding-bottom: 48px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.button {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--peel-skin), var(--button); box-shadow: var(--peel-rim); color: var(--on-button);
  text-decoration: none; font-weight: 700; font-size: 17px;
  padding: 15px 24px; border-radius: 14px;
  min-height: 48px;
}
.button:hover { background: var(--peel-skin), var(--button-hover); animation: jelly .6s; color: var(--on-button); }
@keyframes jelly {
  0% { transform: scale(1, 1); } 30% { transform: scale(1.08, .9); } 45% { transform: scale(.94, 1.06); }
  60% { transform: scale(1.03, .97); } 75% { transform: scale(.99, 1.01); } 100% { transform: scale(1, 1); }
}
/* Just above the breakpoint the full menu is a squeeze: tighten it so Download stays on screen. */
@media (min-width: 861px) and (max-width: 1000px) {
  nav.top ul { gap: 2px; }
  nav.top ul a { padding: 8px 8px; }
}
@media (max-width: 860px) {
  nav.top { flex-wrap: wrap; padding: 12px 0; }
  nav.top ul { flex: 1 1 100%; flex-wrap: nowrap; gap: 0 2px; overflow-x: auto; scrollbar-width: none; }
  nav.top ul::-webkit-scrollbar { display: none; }
  nav.top ul li:has(> a.pill) { position: absolute; top: 12px; right: 0; }
  nav.top ul a { padding: 0 9px; font-size: 14px; }
}
@media (max-width: 600px) { .wrap { padding: 0 16px; } }
@media (prefers-reduced-motion: reduce) { .brand img { transition: none; } }

/* A format family's colour, for the chips, groups and tracks that use var(--g). */
.g-archive { --g: var(--fam-archive); }
.g-tar { --g: var(--fam-tar); }
.g-compressed { --g: var(--fam-compressed); }
.g-books { --g: var(--fam-books); }
.g-office { --g: var(--fam-office); }
.g-apps { --g: var(--fam-apps); }
.g-installers { --g: var(--fam-installers); }
