:root { --text: #172b36; --factor-color: #145c58; color-scheme: light; font-family: system-ui, sans-serif; color: #172b36; background: #fafbf9; line-height: 1.65; }
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  line-height: 1.55;
}
header, main, footer { max-width: 68rem; margin: auto; padding: 1.5rem; }
header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #cdd7d5; font-weight: 700; }
header a { text-decoration: none; }
footer a { text-decoration: none; }
.language-switch { flex-shrink: 0; }
main { min-height: 65vh; padding-block: 3rem; }
footer { border-top: 1px solid #cdd7d5; font-size: .9rem; text-align: center; }
a { color: var(--factor-color); text-underline-offset: .2em; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.15; letter-spacing: -.035em; }
h2 { margin-top: 2.5rem; line-height: 1.3; }
p, article, .intro { max-width: 75ch; }
footer p { max-width: none; }
.intro { font-size: 1.15rem; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; margin-block: 2rem; }
label { display: grid; gap: .3rem; }
input, select { font: inherit; padding: .6rem; border: 1px solid #879c99; background: white; color: inherit; max-width: 100%; }
.table-scroll { width: 100%; overflow-x: auto; }
.factor-table { width: 100%; border-collapse: collapse; text-align: left; }
.factor-table th, .factor-table td { padding: 1rem; border-bottom: 1px solid #cdd7d5; vertical-align: top; }
.factor-table thead { background: #eef2ee; }
.factor-table tbody th { min-width: 10rem; }
.factor-table a { text-decoration: none; }
.factor-table a:hover { color: #0b3936; }
@media (max-width: 640px) {
  .factor-table { font-size: .9rem; table-layout: auto; }
  .factor-table th, .factor-table td { padding: .75rem .6rem; }
  .factor-table th:first-child { width: auto; min-width: 0; overflow-wrap: anywhere; white-space: normal; }
  .factor-table th:nth-child(2), .factor-table td:nth-child(2) { width: 1%; white-space: nowrap; }
  .factor-table th:nth-child(n+3), .factor-table td:nth-child(n+3) { display: none; }
}
dl { display: grid; grid-template-columns: minmax(7rem, auto) 1fr; gap: .5rem 1.5rem; border-block: 1px solid #cdd7d5; padding-block: 1.5rem; }
dt { font-weight: 650; } dd { margin: 0; }
pre { overflow: auto; padding: 1rem; background: #eef2ee; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid #985700; outline-offset: 4px; }
[hidden] { display: none !important; }

.impact-indicator { color: var(--factor-color); }
.impact-marks { display: inline-flex; align-items: center; gap: .25rem; min-height: 1.65em; vertical-align: top; font-weight: 650; }
.impact-box { display: inline-block; width: .8rem; height: 1rem; border: 1px solid currentColor; border-radius: 2px; background: currentColor; }
.impact-box-empty { background: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.factor-table thead button { display: inline-flex; align-items: center; gap: .3rem; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: inherit; text-align: left; cursor: pointer; }
.sort-arrow { font-size: .8em; white-space: nowrap; }

.brand {
  color: var(--text);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
}

.filters input, .filters select { height: 3rem; }

.all-factors { text-decoration: none; }
.all-factors + h1 { margin-top: .5rem; }
.detail-impact { display: inline-flex; align-items: center; gap: .5rem; }

.error-copy { max-width: 45rem; }
.error-copy .eyebrow { color: var(--factor-color); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.error-copy .lead { font-size: 1.15rem; }
.error-actions { margin-top: 2rem; }
.error-actions .btn { display: inline-block; padding: .8rem 1.25rem; border-radius: .3rem; background: var(--factor-color); color: white; font-weight: 650; text-decoration: none; }
.error-actions .btn:hover { background: #0b3936; }
