/* ===========================================================================
   FitForRiders — localizador (finder) na direção "Cowboy".
   Autoridade: ../design-system.md  ·  Tokens: ../assets/tokens.css (via <link>)

   Regras que este ficheiro cumpre, sem exceção:
     · zero cor cromática na UI — a cor só existe dentro da fotografia
     · zero sombras de UI (a única sombra permitida é a de CONTACTO da foto)
     · todas as bordas são 1px --hairline
     · raios: 8px, 12px, 9999px — mais nenhum
     · tipos: 12,13,14,16,18,20,24,36,42,52 — títulos em sentence case, peso 400
     · MOBILE-FIRST: escrito a pensar em 375px; o desktop é uma media query
   =========================================================================== */

/* ---------------------------------------------------------------- Base --- */
:root {
  --gutter: 20px;                  /* 60px é a margem do desktop; no telemóvel é 20 */
  --band: 44px;                    /* padding vertical das bandas (mobile) */
}

body { background: var(--canvas); overflow-x: hidden; }

/* .container vem dos tokens (max-width + gutter) */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--charcoal);
  outline-offset: 2px;
  border-radius: 2px;
}

.hidden { display: none !important; }

/* ==========================================================================
   1 · Barra de anúncio + navegação  (mesma língua da landing)
   ========================================================================== */
.announce {
  position: relative;
  background: var(--charcoal);
  color: var(--porcelain);
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 44px 10px 20px;
  text-align: center;
}
.announce p { font-size: 13px; line-height: 1.3; letter-spacing: 0.01em; }
.announce p span { color: rgba(248, 248, 245, 0.55); }
/* a 375px a frase inteira passa a duas linhas: fica só a parte que é notícia */
@media (max-width: 559px) { .announce p span { display: none; } }
.announce-x {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  padding: 8px;
  color: var(--porcelain);
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
.announce-x:hover { opacity: 1; }

.nav {
  position: relative;
  background: var(--porcelain);
  border-bottom: 1px solid var(--hairline);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--gutter);
  color: var(--charcoal);
}
.wordmark { font-size: 16px; font-weight: 600; letter-spacing: 0.02em; line-height: 1; }
.nav-links { display: none; }             /* 375px: só wordmark + CTA */
.nav-cta { font-size: 14px; padding: 11px 20px; }

/* ==========================================================================
   2 · Cabeçalho da página — compacto. Isto é uma ferramenta, não um cartaz.
   ========================================================================== */
/* padding-block, NUNCA o atalho `padding`: .container (tokens) põe o gutter
   em padding-left/right e o atalho apagava-o — os títulos iam colar-se à
   borda do ecrã. */
.page-head { padding-block: 26px 22px; }
.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--smoke);
  margin-bottom: 14px;
}
.page-head h1 {
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 400;
}
.lede {
  font-size: 16px;
  line-height: 1.5;
  color: var(--smoke);
  margin-top: 14px;
  max-width: 46ch;
}

/* Toggle segmentado (Discover · Compare) — pill container hairline,
   opção ativa em cartão branco. */
.segmented {
  display: inline-flex;
  margin-top: 18px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--ink-05);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.segmented button {
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 11px 22px;
  color: var(--smoke);
  transition: color 0.3s ease, background 0.3s ease;
}
.segmented button[aria-selected="true"] {
  background: var(--porcelain);
  color: var(--charcoal);
}
.segmented button:hover { color: var(--charcoal); }

/* ==========================================================================
   3 · O INSTRUMENTO — banda de porcelana: leitura + escala.
       (Separação por mudança de fundo + hairline, nunca por sombra.)
   ========================================================================== */
.panel {
  background: var(--porcelain);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.panel-inner { padding-top: 30px; padding-bottom: 30px; }

.controls { display: grid; gap: 22px; }
.control label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--smoke);
  margin-bottom: 8px;
}

/* A leitura: um número grande, tabular, assente numa linha hairline —
   como o mostrador de um instrumento, não como um formulário. */
.textfield {
  display: flex;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1px solid var(--charcoal);
  padding-bottom: 6px;
}
.textfield input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: 0;
  outline: none;
  background: none;
  font: inherit;
  font-size: 42px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  color: var(--charcoal);
  padding: 0;
}
.textfield input:focus-visible { outline: none; }
.textfield:focus-within { border-bottom-color: var(--charcoal); }
.unit {
  flex: 0 0 auto;
  align-self: center;
  border-radius: var(--r-pill);
  background: var(--ink-05);
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--charcoal);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 9px 15px;
  transition: background 0.3s ease;
}
.unit:hover { background: rgba(29, 29, 29, 0.09); }

/* Selects: pills fantasma com chevron desenhado (data-URI — zero pedidos) */
.selectwrap { position: relative; }
.selectwrap::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 9px;
  height: 6px;
  margin-top: -3px;
  pointer-events: none;
  background: var(--charcoal);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.selectwrap select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: var(--charcoal);
  background: var(--porcelain);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  padding: 14px 40px 14px 18px;
  cursor: pointer;
  transition: border-color 0.3s ease;
}
.selectwrap select:hover { border-color: var(--bone); }

/* ------------------------------------------------------------------------
   A RÉGUA — o elemento de assinatura. Uma escala de máquina: face de mist,
   traços hairline, numerais silenciosos, cursor charcoal, leitura em pill.
   (app.js constrói .runit / .rtick / .rlab / .rbar / .rmark / .rflag)
   ------------------------------------------------------------------------ */
.ruler {
  --ruler-h: 92px;
  position: relative;
  height: var(--ruler-h);
  margin-top: 28px;
  background: var(--mist);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;                 /* arrastar não faz scroll no telemóvel */
  overflow: hidden;
}
/* o eixo do instrumento: uma linha hairline a meia altura */
.ruler::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: var(--hairline);
}
.ruler .rtick { position: absolute; width: 1px; background: var(--bone); }
.ruler .rtick.cm { top: 0; height: 11px; }
.ruler .rtick.in { bottom: 0; height: 11px; }
.ruler .rtick.half { height: 6px; background: var(--hairline); }
.ruler .rlab {
  position: absolute;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--smoke);
}
.ruler .rlab.cm { top: 16px; }
.ruler .rlab.in { bottom: 16px; }
/* "cm" / "in" em minúsculas, como as marcas de uma fita de alfaiate — e mais
   estreitas, que a 375px o primeiro numeral fica logo ao lado. */
.ruler .runit {
  position: absolute;
  left: 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--ash);
}
.ruler .runit.cm { top: 16px; }
.ruler .runit.in { bottom: 16px; }

/* Histograma de cobertura: quantos capacetes servem cada cm.
   Cinzento, assente no eixo — dado, não decoração. */
.ruler .rbar {
  position: absolute;
  bottom: 50%;
  width: 7px;
  transform: translateX(-50%);
  background: rgba(29, 29, 29, 0.17);
  border-radius: 2px 2px 0 0;
}

/* O cursor + a leitura que viaja nele */
.ruler .rmark {
  position: absolute;
  top: 0; bottom: 0;
  width: 1.5px;
  z-index: 2;
  background: var(--charcoal);
  transform: translateX(-50%);
}
.ruler .rflag {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  white-space: nowrap;
  border-radius: var(--r-pill);
  background: var(--charcoal);
  color: var(--porcelain);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  padding: 9px 14px;
  cursor: ew-resize;
  transition: transform 0.07s ease;
}
.ruler .rflag.tick { transform: translate(-50%, -50%) scale(1.06); }
.ruler:focus-visible { outline-offset: -3px; }

.ruler-foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}
.ruler-hint { font-size: 13px; line-height: 1.45; color: var(--smoke); }
.link-plain {
  align-self: flex-start;
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--bone);
  transition: text-decoration-color 0.3s ease;
  padding: 0;
}
.link-plain:hover { text-decoration-color: var(--charcoal); }

/* Guia "como medir" — abre com .open (app.js) */
.guide { display: none; }
.guide.open {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 18px;
  margin-top: 22px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}
.measure-fig { width: 128px; }
.measure-fig svg { display: block; width: 100%; height: auto; }
.measure-fig .fig-head { stroke: var(--ash); }
.measure-fig .fig-tape { stroke: var(--charcoal); }
.measure-fig .fig-dim { stroke: var(--hairline); }
.measure-fig .fig-lab {
  fill: var(--smoke);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.guide-copy { font-size: 14px; line-height: 1.55; color: var(--smoke); }
.guide-copy > strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 10px;
}
.guide-copy ol { padding-left: 20px; display: grid; gap: 7px; }
.guide-copy strong { font-weight: 500; color: var(--charcoal); }

/* ==========================================================================
   4 · Resultados
   ========================================================================== */
.results-section { padding-block: 30px var(--band); }
.results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 20px;
  padding-bottom: 16px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--hairline);
}
.results-head h2 { font-size: 24px; font-weight: 400; letter-spacing: -0.015em; line-height: 1.1; }
.results-head .count {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--smoke);
  font-variant-numeric: tabular-nums;
}

#results noscript p { font-size: 14px; line-height: 1.55; color: var(--smoke); }

/* ---- grelha de cartões (app.js: .grid > .card) ---- */
.grid { display: grid; grid-template-columns: 1fr; gap: var(--gap); }

.card {
  display: flex;
  flex-direction: column;
  background: var(--porcelain);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 18px;
  overflow: hidden;
}

/* Foto de produto: porcelana + sombra de CONTACTO cinzenta (§6). A foto entra
   em multiply, por isso a elipse desenhada por baixo atravessa o fundo branco
   e ancora o capacete ao chão — nada de PNG a flutuar. */
.card-photo {
  position: relative;
  margin: -18px -18px 16px;
  aspect-ratio: 4 / 3;
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 58%, var(--mist) 100%);
  border-bottom: 1px solid var(--hairline);
  cursor: zoom-in;
  overflow: hidden;
}
.card-photo::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 15%;
  transform: translateX(-50%);
  width: 54%;
  height: 7%;
  background: radial-gradient(closest-side, rgba(29, 29, 29, 0.18), rgba(29, 29, 29, 0.08) 55%, rgba(29, 29, 29, 0) 100%);
}
.card-photo img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px 14px 16px;
  mix-blend-mode: multiply;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.card-photo:hover img { transform: scale(1.03); }

/* A RESPOSTA: que tamanho, e serve ou aperta. Badges só em grayscale —
   sólido charcoal (serve) vs. contorno hairline (aperta). */
.fit-line {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
}
.fit-line .fit-size {
  flex: 0 0 auto;
  min-width: 42px;
  font-size: 36px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--charcoal);
}
.fit-line .fit-size.long { font-size: 18px; line-height: 1.15; max-width: 96px; letter-spacing: -0.01em; }
.fit-line .fit-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; }
.fit-line .fit-copy strong {
  border-radius: var(--r-pill);
  background: var(--charcoal);
  color: var(--porcelain);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 8px 13px;
}
.fit-line.tight .fit-copy strong {
  background: var(--ink-05);
  color: var(--charcoal);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.fit-line .fit-copy small { font-size: 12px; color: var(--smoke); font-variant-numeric: tabular-nums; }

.card-top { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.card h3 { font-size: 18px; font-weight: 400; line-height: 1.2; letter-spacing: -0.01em; }
.card .brand-name {
  order: -1;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--smoke);
}

/* Segurança: micro-etiqueta calma (estrelas em tinta, fonte em maiúsculas) */
.safety-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 13px;
  line-height: 1.3;
  color: var(--charcoal);
  margin-bottom: 14px;
}
.safety-line .stars { font-size: 12px; letter-spacing: 1.5px; color: var(--charcoal); }
.safety-line b { font-weight: 500; font-variant-numeric: tabular-nums; }
.safety-line .vt-src {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--smoke);
}
/* frase inteira em maiúsculas seria um grito ilegível — micro-label só
   quando é mesmo uma etiqueta curta. */
.safety-line.none { font-size: 12px; color: var(--ash); }
.safety-line.example::after {
  content: "· example";
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ash);
}

/* Specs como chips "+ " (vocabulário da landing) */
.spec-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.spec-row span {
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-pill);
  background: var(--ink-05);
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  padding: 9px 13px;
  white-space: nowrap;
}
.spec-row span::before { content: "+"; color: var(--smoke); margin-right: 6px; }

/* margin-bottom:auto absorve o espaço livre: assim o pé do cartão fica
   sempre colado ao fundo e os preços alinham de cartão para cartão. */
.highlights { list-style: none; display: grid; gap: 7px; margin-bottom: auto; }
.highlights li {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--smoke);
}
.highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 1px;
  background: var(--bone);
}

/* order: o selo da fonte dos tamanhos (.src-link) vem depois do pé no HTML
   gerado pelo app.js. Reordenado por CSS para o pé ser sempre o último
   elemento — sem isto, cartões com e sem selo desalinham o preço. */
.card-foot {
  order: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}
.price {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  min-width: 0;
}
/* A proveniência do preço é honestidade, não nota de rodapé: mostra-se, mas
   travada a 2 linhas (havia nomes de loja a serem cortados a meio da palavra). */
.price small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 5px;
  max-width: 100%;
  min-height: 33px;              /* 2 linhas reservadas: os pés dos cartões da
                                    mesma fila ficam à mesma altura */
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--smoke);
}
.price.no-price { font-weight: 400; color: var(--smoke); }
.btn-filled {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  background: var(--charcoal);
  color: var(--porcelain);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 13px 22px;
  white-space: nowrap;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-filled:hover { transform: scale(1.03); }

.src-link {
  order: 1;
  align-self: flex-start;
  margin-top: 14px;              /* folga mínima quando o cartão é o mais alto */
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--smoke);
  transition: color 0.3s ease;
}
.src-link:hover { color: var(--charcoal); text-decoration: underline; text-underline-offset: 3px; }
.src-link.unverified { color: var(--ash); }

/* ---- estado vazio ---- */
.empty {
  background: var(--porcelain);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 40px 22px;
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  color: var(--smoke);
  max-width: 62ch;
  margin: 0 auto;
}
.empty p + p { margin-top: 10px; }
.empty strong { font-size: 16px; font-weight: 400; color: var(--charcoal); }

/* ==========================================================================
   5 · Modo comparar — tabela hairline, sem zebra.
   ========================================================================== */
.table-scroll {
  overflow-x: auto;
  background: var(--porcelain);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
}
table.compare {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 14px;
}
/* Uma linha por capacete: numa tabela de comparação, linhas que não quebram
   valem mais do que caber no ecrã — o scroll lateral já vive no .table-scroll. */
table.compare th,
table.compare td {
  text-align: left;
  padding: 12px 15px;
  border-bottom: 1px solid var(--hairline);
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
  white-space: nowrap;
}
table.compare td.cmp-none { white-space: normal; }
table.compare thead th {
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--smoke);
  background: var(--porcelain);
}
table.compare thead th.active { color: var(--charcoal); }
table.compare tbody tr:last-child td { border-bottom: 0; }
table.compare tbody tr:hover { background: var(--mist); }
table.compare .yoursize { font-weight: 500; color: var(--charcoal); }
table.compare .stars { color: var(--charcoal); letter-spacing: 1px; }
table.compare .muted { color: var(--ash); }
table.compare a {
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--bone);
}
table.compare a:hover { text-decoration-color: var(--charcoal); }

.th-sort { cursor: pointer; user-select: none; transition: color 0.3s ease; }
.th-sort:hover { color: var(--charcoal); }
.th-sort .arrow { font-size: 9px; }

.th-filter-btn {
  margin-left: 8px;
  width: 22px;
  height: 22px;
  border-radius: var(--r-pill);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--ash);
  font-size: 8px;
  line-height: 1;
  vertical-align: middle;
  transition: color 0.3s ease, background 0.3s ease;
}
.th-filter-btn:hover { color: var(--charcoal); background: var(--ink-05); }
.th-filter-btn.filtering { background: var(--charcoal); color: var(--porcelain); box-shadow: none; }

.cmp-none { text-align: center; color: var(--smoke); padding: 34px 16px; }
.mode-hint { margin-top: 14px; font-size: 12px; line-height: 1.5; color: var(--ash); }
.linklike {
  font: inherit;
  font-weight: 500;
  color: var(--charcoal);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--bone);
}
.linklike:hover { text-decoration-color: var(--charcoal); }

/* Menu de filtro de coluna (app.js constrói .xfilter no body) */
.xfilter {
  position: absolute;
  z-index: 60;
  width: 244px;
  background: var(--porcelain);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  padding: 12px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--charcoal);
}
.xfilter .sorts { display: flex; gap: 8px; margin-bottom: 10px; }
.xfilter .sorts button {
  flex: 1;
  padding: 9px 4px;
  border-radius: var(--r-pill);
  background: var(--ink-05);
  color: var(--charcoal);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}
.xfilter .sorts button:hover { background: var(--charcoal); color: var(--porcelain); }
.xfilter input[type="search"] {
  width: 100%;
  font: inherit;
  font-size: 13px;
  padding: 10px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  background: var(--porcelain);
  color: var(--charcoal);
  outline: none;
}
.xfilter input[type="search"]:focus { border-color: var(--charcoal); }
.xfilter .vals { max-height: 208px; overflow: auto; margin: 10px 0; }
.xfilter label.val {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.xfilter label.val:hover { background: var(--ink-05); }
.xfilter label.val.all {
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  margin-bottom: 6px;
  padding-bottom: 10px;
}
.xfilter input[type="checkbox"] { accent-color: var(--charcoal); width: 15px; height: 15px; }
.xfilter .foot { display: flex; gap: 8px; }
.xfilter .foot button {
  flex: 1;
  padding: 10px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
}
.xfilter .foot .clear { background: transparent; box-shadow: inset 0 0 0 1px var(--hairline); color: var(--smoke); }
.xfilter .foot .clear:hover { color: var(--charcoal); }
.xfilter .foot .done { background: var(--charcoal); color: var(--porcelain); }

/* ==========================================================================
   6 · Lightbox (galeria de fotos) — app.js injeta-o no body
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(29, 29, 29, 0.93);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 16px;
}
.lightbox figure {
  grid-column: 2;
  justify-self: center;
  width: 100%;
  max-width: min(880px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.lightbox img {
  width: 100%;
  max-height: min(70vh, 620px);
  object-fit: contain;
  background: var(--porcelain);
  border-radius: var(--r-lg);
  padding: 22px;
}
.lightbox figcaption {
  color: var(--porcelain);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-align: center;
}
.lightbox figcaption .lb-count { color: var(--white-60); font-variant-numeric: tabular-nums; }
.lb-prev, .lb-next, .lb-close {
  border-radius: var(--r-pill);
  background: var(--white-12);
  color: var(--porcelain);
  width: 44px;
  height: 44px;
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background 0.3s ease;
}
.lb-prev:hover, .lb-next:hover, .lb-close:hover { background: rgba(255, 255, 255, 0.22); }
.lb-close { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; font-size: 15px; }

/* ==========================================================================
   7 · "How it works" — banda quente antes do rodapé
   ========================================================================== */
.about {
  background: var(--paper);
  border-top: 1px solid var(--hairline);
  padding: var(--band) 0;
}
.about h2 { font-size: 24px; font-weight: 400; letter-spacing: -0.015em; line-height: 1.1; margin-bottom: 20px; }
.about-cols { display: grid; gap: 16px; }
.about p { font-size: 16px; line-height: 1.5; color: var(--smoke); }
.about strong, .about span { color: var(--charcoal); font-weight: 400; }

/* ==========================================================================
   8 · Mega rodapé (mesma peça da landing)
   ========================================================================== */
.footer { background: var(--charcoal); color: var(--porcelain); padding-top: 56px; overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 34px; align-items: start; }
.f-title {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white-60);
}
.f-col ul { list-style: none; margin-top: 20px; display: grid; gap: 14px; }
.f-col a { font-size: 14px; color: var(--porcelain); transition: opacity 0.3s ease; }
.f-col a:hover { opacity: 0.65; }
.f-col .soon { font-size: 14px; color: var(--ash); }
.f-fine p { margin-top: 20px; font-size: 13px; line-height: 1.55; color: var(--white-60); max-width: 42ch; }
.f-fine p + p { margin-top: 12px; }

.footer-wordmark {
  margin-top: 52px;
  font-size: 14.4vw;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.76;
  color: var(--porcelain);
  white-space: nowrap;
  text-align: center;
}
.footer-bottom {
  margin-top: 26px;
  border-top: 1px solid var(--white-12);
  padding: 22px 0 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  font-size: 14px;
}
.locale { display: inline-flex; align-items: center; gap: 8px; color: var(--porcelain); }
.legal { display: flex; flex-wrap: wrap; gap: 20px; }
.legal a { color: var(--white-60); transition: color 0.3s ease; }
.legal a:hover { color: var(--porcelain); }
.copyright { color: var(--white-60); }

/* ==========================================================================
   9 · Desktop  (mobile-first: tudo acima é 375px)
   ========================================================================== */
@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .controls { grid-template-columns: 1fr 1fr; }
  .control-meas { grid-column: 1 / -1; }
  .guide.open { grid-template-columns: 148px 1fr; align-items: center; justify-items: start; gap: 28px; }
  .ruler-foot { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 26px; }
  .ruler-hint { max-width: 58ch; }
  .link-plain { flex: 0 0 auto; }
}

@media (min-width: 760px) {
  :root { --gutter: 34px; --band: 64px; }
  .nav { height: 72px; }
  .nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
  }
  .nav-links a { transition: opacity 0.3s ease; }
  .nav-links a:hover { opacity: 0.6; }
  .nav-links .current { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--bone); }
  .nav-links .soon { color: var(--ash); }

  .page-head { padding-block: 52px 34px; }
  .page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
  .page-head h1 { font-size: 42px; }
  .lede { font-size: 20px; margin-top: 16px; }
  .segmented { margin-top: 0; flex: 0 0 auto; }

  .panel-inner { padding-top: 44px; padding-bottom: 44px; }
  .controls { grid-template-columns: minmax(240px, 1fr) 1fr 1fr; gap: 30px; align-items: end; }
  .control-meas { grid-column: auto; }
  .textfield input { font-size: 52px; }
  .ruler { --ruler-h: 104px; margin-top: 38px; }
  .ruler .rlab.cm, .ruler .runit.cm { top: 20px; }
  .ruler .rlab.in, .ruler .runit.in { bottom: 20px; }
  .ruler .rtick.cm, .ruler .rtick.in { height: 13px; }
  .ruler .rtick.half { height: 7px; }

  .results-section { padding-block: 44px var(--band); }
  table.compare th, table.compare td { padding: 14px 16px; }
  .grid { grid-template-columns: repeat(2, 1fr); }

  .about-cols { grid-template-columns: 1fr 1fr; gap: 34px; }
  .footer { padding-top: 88px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px 30px; }
  .footer-wordmark { margin-top: 92px; }
}

@media (min-width: 1040px) {
  :root { --gutter: 60px; --band: 88px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr 420px; gap: 20px; }
  .footer-bottom { flex-wrap: nowrap; }
  .legal { margin-left: auto; }
  .copyright { margin-left: 26px; }
}

@media (min-width: 1360px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

/* Números ímpares da régua colidem em ecrãs estreitos (app.js marca-os .thin) */
@media (max-width: 620px) {
  .ruler .rlab.thin { display: none; }
}

/* ==========================================================================
   10 · Movimento reduzido
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
