/* GlideIndex: a parts catalogue for the underside of a gaming mouse.
   Type: one family (Archivo, variable width). Width carries hierarchy: wide and bold for headings,
   normal for reading, slightly narrow for dense table cells. Tabular figures instead of a monospace face.
   Colour: matte PTFE grey ground, graphite ink, one catalogue green; marker yellow only behind the pick.
   Layout: left-aligned, tables for comparisons, a firm rule above each section heading, near-square corners.
   No illustration: the home page shows a real example result instead. */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(/assets/fonts/archivo-latin.woff2) format("woff2"); }

:root {
  --ground: #f1f2ee;
  --paper: #ffffff;
  --ink: #23282c;
  --quiet: #5f676b;
  --rule: #d3d7d2;
  --green: #1c6e50;
  --marker: #f6e48a;
  --good: #2c7a4b; --fair: #9a6200; --bad: #b3261e;
  /* the same three on the yellow marker behind the pick (4.5:1 there too) */
  --good-m: #22623c; --fair-m: #7a4d00; --bad-m: #a3221b; --quiet-m: var(--quiet); --green-m: var(--green);
  --type: "Archivo", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1a1d1c; --paper: #222625; --ink: #e7e9e4; --quiet: #9ba39f; --rule: #3a403e;
    --green: #63c29a; --marker: #4d4519; --good: #6fc995; --fair: #e2b052; --bad: #f08b80;
    --good-m: #6fc995; --fair-m: #e2b052; --bad-m: #f6a59c; --quiet-m: #c2c8c1; --green-m: #74cca6;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 16px/1.55 var(--type); font-stretch: 100%; font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
a { color: var(--green); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.gutter { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.inner { max-width: 1120px; margin: 0 auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- type scale (1.25) ---------- */
h1, h2, h3, .logo, .pick .title { font-family: var(--type); letter-spacing: -.005em; text-wrap: balance; margin: 0; }
h1 { overflow-wrap: break-word; hyphens: auto; }   /* one long German word ("Datenschutzerklärung") is wider than a phone at this size */
h1 { font-size: clamp(30px, 4.4vw, 44px); line-height: 1.08; font-weight: 750; font-stretch: 118%; }
h2 { font-size: 22px; line-height: 1.25; font-weight: 700; font-stretch: 112%; padding-top: 10px; border-top: 2px solid var(--ink); }
h3 { font-size: 16px; line-height: 1.3; font-weight: 700; font-stretch: 108%; }
p { margin: 0; }
.prose { max-width: 68ch; display: grid; gap: 12px; }
.prose ul, .prose ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.muted { color: var(--quiet); }
.small { font-size: 14px; }
.label { font-size: 14px; font-weight: 600; color: var(--ink); }
.crumbs { font-size: 14px; color: var(--quiet); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--quiet); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--rule); padding-top: env(safe-area-inset-top, 0px); }
.top .inner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; padding-block: 10px; }
.logo { font-size: 21px; font-weight: 800; font-stretch: 125%; color: var(--ink); text-decoration: none; }
.logo svg { display: none; }
.nav { display: flex; gap: 2px 16px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a:hover { border-bottom-color: var(--rule); }
.nav a[aria-current="page"] { border-bottom-color: var(--green); font-weight: 600; }
.top .combo { margin-left: auto; width: min(300px, 100%); }

/* ---------- search ---------- */
.combo { position: relative; }
.search { width: 100%; font-size: 15px; padding: 8px 12px 8px 34px; border: 1px solid var(--rule); border-radius: 2px; background: var(--ground); color: var(--ink); }
.search:focus { border-color: var(--ink); outline: none; background: var(--paper); }
.combo > svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.combo.big .search { font-size: 19px; padding: 15px 16px 15px 42px; border: 2px solid var(--ink); background: var(--paper); }
.combo.big > svg { left: 15px; }
.dropdown { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: var(--paper); border: 1px solid var(--ink); max-height: 360px; overflow-y: auto; }
.opt { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; cursor: pointer; font-size: 15px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
.opt:last-child { border-bottom: 0; }
.opt .c { font-size: 13px; color: var(--quiet); white-space: nowrap; font-stretch: 90%; }
.opt[aria-selected="true"] { background: var(--ground); box-shadow: inset 3px 0 0 var(--green); }
.dd-empty { padding: 10px 12px; font-size: 14px; color: var(--quiet); }

/* ---------- page ---------- */
main { padding-block: 28px 72px; }
.stack { display: grid; gap: 26px; }
.stack > * { min-width: 0; }

/* home */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px 48px; align-items: center; padding-block: 8px 12px; }
.hero > div { display: grid; gap: 16px; min-width: 0; }
.hero h1 { font-size: clamp(34px, 5.4vw, 58px); font-stretch: 122%; line-height: 1.02; }
.hero .lead { font-size: 18px; color: var(--quiet); max-width: 46ch; }
.hero .facts { font-size: 15px; color: var(--quiet); }
.hero .facts b { color: var(--ink); font-weight: 650; }

/* ---------- toggles, tags ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: baseline; gap: 6px; font-size: 14px; padding: 4px 9px; border: 1px solid var(--rule); border-radius: 2px; background: var(--paper); color: var(--ink); text-decoration: none; cursor: pointer; white-space: nowrap; }
.chip span { font-size: 12px; color: var(--quiet); }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip[aria-pressed="true"] span { color: var(--paper); }
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--ink); border-radius: 2px; }
.seg button { border: 0; border-left: 1px solid var(--rule); background: var(--paper); cursor: pointer; text-align: center; font-size: 14px; padding: 7px 13px; white-space: nowrap; }
.seg button:first-child { border-left: 0; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); font-weight: 600; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--green); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- control panel ---------- */
.panel { background: var(--paper); border: 1px solid var(--rule); border-radius: 2px; }
.controls { display: flex; flex-wrap: wrap; gap: 16px 32px; padding: 16px 18px; align-items: end; }
.controls > div { display: grid; gap: 7px; min-width: 0; }
.padpick { flex: 1 1 260px; }
.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 28px; }
.cols a { color: var(--ink); text-decoration: none; display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.cols a span { font-size: 13px; color: var(--quiet); white-space: nowrap; }
.cols a:hover { color: var(--green); }

/* ---------- the pick (the one highlighted thing on a mouse page) ---------- */
.pick { background: var(--marker); padding: 18px 20px 20px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px 32px; }
.pick-h { border-top: 0; padding-top: 0; font-size: 15px; font-weight: 600; font-stretch: 100%; }
.pick .title { font-size: 28px; line-height: 1.12; font-weight: 750; font-stretch: 118%; }
.pick ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 15px; }
.pick .bigprice { font-size: 26px; font-weight: 700; font-stretch: 110%; }
.pick .shops { background: transparent; padding: 8px 0 0; border-top: 1px solid rgba(0,0,0,.18); }

/* ---------- comparison tables ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: end; justify-content: space-between; }
.toolbar h2 { flex: 1 0 100%; }
.toolbar select, select { padding: 6px 8px; border: 1px solid var(--rule); border-radius: 2px; background: var(--paper); }
.list { border-top: 2px solid var(--ink); background: var(--paper); }
.row { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.3fr) minmax(0, .8fr) minmax(110px, auto); gap: 6px 22px; align-items: center; padding: 11px 12px; border-bottom: 1px solid var(--rule); }
.row.head { padding-block: 7px; font-size: 13px; font-weight: 600; font-stretch: 88%; color: var(--quiet); background: var(--ground); }
.row.head > :last-child { text-align: right; }
.row .nm { display: grid; gap: 1px; min-width: 0; }
.row .br { font-size: 13px; color: var(--quiet); }
.row .ln { font-weight: 650; font-stretch: 104%; overflow-wrap: anywhere; color: var(--ink); text-decoration: none; }
.row a.ln:hover { color: var(--green); text-decoration: underline; }
.badges { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--quiet); }
.badge.conf { color: var(--good); }
.why { font-size: 13px; color: var(--quiet); margin-top: 3px; }
.price { text-align: right; display: grid; gap: 1px; justify-items: end; }
.price b { font-size: 16px; font-weight: 650; }
.price span { font-size: 13px; color: var(--quiet); }
.row details { grid-column: 1 / -1; }
.row summary { cursor: pointer; font-size: 14px; color: var(--green); width: max-content; }
.shops { display: grid; gap: 4px; margin-top: 8px; padding: 8px 12px; background: var(--ground); }
.shop { display: flex; justify-content: space-between; gap: 14px; font-size: 14px; }
.shop a { text-decoration: none; overflow-wrap: anywhere; }
.shop a:hover { text-decoration: underline; }
.shop .p { white-space: nowrap; }

/* verdicts: a small square in the verdict colour, then the word */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 9px; height: 9px; background: currentColor; flex: none; }
.great { color: var(--good); } .ok { color: var(--fair); } .avoid { color: var(--bad); }
.pick { --quiet: var(--quiet-m); --green: var(--green-m); }
.pick .great { color: var(--good-m); } .pick .ok { color: var(--fair-m); } .pick .avoid { color: var(--bad-m); }
.strip { display: grid; grid-template-columns: repeat(2, max-content); justify-content: start; gap: 3px 18px; font-size: 13px; }
.strip span { display: inline-flex; align-items: center; gap: 5px; color: var(--quiet); white-space: nowrap; }
.strip span::before { content: ""; width: 8px; height: 8px; flex: none; }
.strip span.great::before { background: var(--good); } .strip span.ok::before { background: var(--fair); } .strip span.avoid::before { background: var(--bad); }
.strip span.sel { color: var(--ink); font-weight: 650; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
td .strip span { color: var(--ink); }

/* home: a real example instead of an illustration */
.example { margin: 0; background: var(--paper); border-top: 2px solid var(--ink); }
.example figcaption { padding: 10px 12px; font-size: 15px; border-bottom: 1px solid var(--rule); }
.example table { font-size: 14px; }
.example td a { color: var(--ink); font-weight: 600; text-decoration: none; }
.example td a:hover { color: var(--green); text-decoration: underline; }
.num { text-align: right; white-space: nowrap; }

/* feel: the word first, then a skate-shaped marker on a speed-to-control track */
.feelword { font-size: 14px; font-weight: 600; }
.scale { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: 12px; font-stretch: 90%; color: var(--quiet); max-width: 220px; margin-top: 3px; }
.scale .track { position: relative; height: 2px; background: var(--rule); }
.scale .dot { position: absolute; top: 50%; width: 16px; height: 8px; border-radius: 4px; background: var(--green); transform: translate(-50%, -50%); }
.segs { display: inline-grid; grid-template-columns: repeat(5, 12px); gap: 2px; vertical-align: middle; margin-right: 6px; }
.segs i { height: 9px; background: var(--rule); }
.segs i.on { background: var(--ink); }
.notice { background: var(--paper); border-top: 2px solid var(--fair); padding: 12px 14px; font-size: 15px; }

/* ---------- reference tables, lists ---------- */
.box { overflow-x: auto; background: var(--paper); border-top: 2px solid var(--ink); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
.matrix { min-width: 760px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
th { font-size: 14px; font-weight: 600; font-stretch: 92%; color: var(--quiet); background: var(--ground); }
td.mat { font-weight: 650; min-width: 120px; }
td.mat span { display: block; font-weight: 400; color: var(--quiet); font-size: 13px; }
td .pill { margin-bottom: 3px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 28px; }
.tile { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.tile b { order: 2; font-weight: 650; }
.tile span { color: var(--quiet); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px 28px; align-items: start; }
.card { display: grid; gap: 6px; align-content: start; color: inherit; text-decoration: none; }
.card h3 { padding-bottom: 6px; border-bottom: 1px solid var(--ink); }
a.card:hover h3 { color: var(--green); }
.card ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; }
.fitm { color: var(--ink); text-decoration: none; font-size: 15px; padding: 2px 0; }
.fitm:hover { color: var(--green); text-decoration: underline; }
.st-ok { color: var(--good); font-weight: 600; }
.st-no { color: var(--bad); font-weight: 600; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--rule); background: var(--paper); padding-block: 22px calc(34px + env(safe-area-inset-bottom, 0px)); }
.foot .inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 28px; font-size: 14px; color: var(--quiet); }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a { color: var(--quiet); }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
    .pick { grid-template-columns: 1fr; }
  .top .combo { margin-left: 0; width: 100%; order: 3; }
}
@media (max-width: 640px) {
  .nav { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .controls > div { width: 100%; }
  .seg { display: grid; grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .seg.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg.four button:nth-child(3) { border-left: 0; }
  .seg.four button:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .row { grid-template-columns: minmax(0, 1fr) auto; }
  .row .vd { grid-column: 1 / -1; grid-row: 2; }
  .row .fl, .row.head { display: none; }
}
@media (prefers-reduced-motion: no-preference) { .scale .dot { transition: left .2s ease; } }
