/* Sustainability Database: the one stylesheet for the whole site.
   Design rules, so every page lines up:
   - One content column, 980px wide, with the same side padding everywhere.
   - One spacing scale: 4, 8, 12, 16, 24, 32, 48, 64, 96 px.
   - One card style, one table style, one button style, one chip style.
   - No decorative icons. Colour is used for meaning only (grades, flags, links). */

/* ---------- Tokens ---------- */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --faint: #6e6e73;
  --line: #d2d2d7;
  --line-soft: #e8e8ed;
  --chip: #e8e8ed;
  --chip-text: #1d1d1f;
  --input: #ffffff;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --link: #0066cc;
  --leaf: #1e7a35;
  --nav-bg: rgba(251, 251, 253, 0.82);
  --yes-bg: #ffe5e3; --yes-text: #b3261e;
  --no-bg: #e3f6e8;  --no-text: #1d7a35;
  --partial-bg: #fff2d6; --partial-text: #9a5200;
  --unknown-bg: #f0f0f3; --unknown-text: #5f5f64;
  --radius: 18px;
  --radius-sm: 12px;
  --pad: 32px;
  --gap: 20px;
  --width: 980px;
  --side: 22px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --faint: #8e8e93;
  --line: #424245;
  --line-soft: #2c2c2e;
  --chip: #2c2c2e;
  --chip-text: #f5f5f7;
  --input: #1c1c1e;
  --accent: #0a84ff;
  --accent-hover: #409cff;
  --link: #2997ff;
  --leaf: #30d158;
  --nav-bg: rgba(22, 22, 23, 0.82);
  --yes-bg: #3a1614; --yes-text: #ff6961;
  --no-bg: #12301b;  --no-text: #30d158;
  --partial-bg: #3a2a0c; --partial-text: #ffb340;
  --unknown-bg: #2c2c2e; --unknown-text: #a1a1a6;
  color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap { max-width: calc(var(--width) + 2 * var(--side)); margin: 0 auto; padding: 0 var(--side); }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
h1 { font-size: 48px; line-height: 1.08; font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: 24px; line-height: 1.17; margin: 0 0 16px; }
h3 { font-size: 19px; line-height: 1.25; margin: 24px 0 8px; }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 12px; padding-left: 1.2em; }
li { margin: 0 0 6px; }
li::marker { color: var(--faint); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
sup { line-height: 0; }
strong { font-weight: 600; }
.fas, .leaf-icon { display: none; } /* decorative icons are not used */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.missing { color: var(--faint); }
.small-note { font-size: 13px; line-height: 1.4; color: var(--muted); letter-spacing: -0.01em; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 50; background: #0064d2; color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip-link:focus { top: 8px; text-decoration: none; }
main:focus { outline: none; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 52px; }
.brand { order: 1; font-size: 17px; font-weight: 600; color: var(--text); letter-spacing: -0.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; opacity: 0.75; }
.site-nav { order: 2; margin-left: auto; display: flex; align-items: center; gap: 24px; font-size: 13px; letter-spacing: -0.01em; }
.site-nav a { color: var(--text); opacity: 0.8; padding: 6px 0; }
.site-nav a:hover { opacity: 1; text-decoration: none; }
.site-nav a[aria-current="page"] { opacity: 1; font-weight: 600; }
.header-actions { order: 3; display: flex; align-items: center; gap: 4px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
  background: none; border: 0; border-radius: 10px; color: var(--text); opacity: 0.8; cursor: pointer;
}
.icon-btn:hover { opacity: 1; background: var(--chip); }
.menu-btn { display: none; }

/* ---------- Page headings ---------- */
.breadcrumbs { margin: 32px 0 12px; font-size: 13px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs .sep { margin: 0 8px; color: var(--faint); }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 48px 0 32px; }
.breadcrumbs + .page-title { margin-top: 0; }
.page-subtitle { margin: 12px 0 0; font-size: 21px; line-height: 1.38; color: var(--muted); letter-spacing: -0.02em; max-width: 720px; }
.section-title { font-size: 32px; letter-spacing: -0.025em; margin: 64px 0 8px; }
.section-lede { color: var(--muted); margin: 0 0 24px; max-width: 720px; }
.title-grade { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); flex-shrink: 0; }
.title-grade:hover { text-decoration: none; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ---------- Hero (home) ---------- */
.hero { text-align: center; padding: 80px 0 48px; }
.hero .eyebrow { color: var(--leaf); font-size: 17px; font-weight: 600; margin: 0 0 8px; }
.hero h1 { font-size: 64px; line-height: 1.05; letter-spacing: -0.035em; }
.hero .lede { font-size: 21px; color: var(--muted); max-width: 640px; margin: 16px auto 0; }

/* ---------- Search ---------- */
.search { position: relative; max-width: 680px; margin: 32px auto 0; }
.search.compact { max-width: none; margin: 16px 0 0; }
.search input {
  width: 100%; height: 48px; padding: 0 16px 0 44px;
  font: inherit; font-size: 17px; color: var(--text);
  background: var(--input); border: 1px solid var(--line); border-radius: var(--radius-sm);
  -webkit-appearance: none; appearance: none;
}
.search.compact input { height: 40px; font-size: 15px; }
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.18); }
.search .search-icon { position: absolute; left: 16px; top: 16px; color: var(--faint); pointer-events: none; }
.search.compact .search-icon { top: 12px; }
.search-results {
  position: absolute; left: 0; right: 0; z-index: 15; list-style: none;
  margin: 8px 0 0; padding: 6px; max-height: 24rem; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}
.search-results:empty { display: none; }
.search-results li { margin: 0; }
.search-results a, .search-results .no-results { display: block; padding: 10px 12px; border-radius: 10px; color: var(--text); text-align: left; }
.search-results .no-results { color: var(--muted); }
.search-results a:hover, .search-results a:focus { background: var(--chip); text-decoration: none; outline: none; }
.search-results .result-meta { display: block; font-size: 13px; color: var(--muted); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border-radius: var(--radius); padding: var(--pad); margin: 0 0 var(--gap); }
.card > :first-child { margin-top: 0; }
.card h3:first-child { margin-top: 0; }
.notice { background: var(--partial-bg); color: var(--partial-text); border-radius: var(--radius-sm); padding: 14px 20px; margin: 0 0 var(--gap); font-size: 15px; }
.page-actions { font-size: 14px; color: var(--muted); margin: 8px 0 48px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.two-col h3 { margin-top: 0; }
.lead-text { font-size: 21px; line-height: 1.38; letter-spacing: -0.02em; }

/* On-page contents */
.toc { display: flex; gap: 8px; margin: 0 0 var(--gap); overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.toc::-webkit-scrollbar { display: none; }
.toc a { flex: none; padding: 8px 16px; border-radius: 980px; background: var(--surface); color: var(--text); font-size: 14px; }
.toc a:hover { background: var(--chip); text-decoration: none; }

/* Key facts */
.facts { display: grid; grid-template-columns: 200px 1fr; margin: 0; }
.facts dt, .facts dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.facts dt { color: var(--muted); font-size: 15px; padding-right: 16px; }
.facts dt:last-of-type, .facts dd:last-of-type { border-bottom: 0; }

/* ---------- Buttons, chips, badges ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px;
  padding: 8px 20px; border: 0; border-radius: 980px; background: var(--accent); color: #fff;
  font: inherit; font-size: 15px; cursor: pointer;
}
.pill:hover { background: var(--accent-hover); text-decoration: none; }
[data-theme="dark"] .pill { background: #0064d2; }
.chip-btn {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 16px;
  border: 1px solid transparent; border-radius: 980px; background: var(--chip); color: var(--chip-text);
  font: inherit; font-size: 14px; cursor: pointer;
}
.chip-btn:hover { border-color: var(--line); }
.chip-btn.ghost { background: transparent; border-color: var(--line); }
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 980px;
  font-size: 12px; font-weight: 600; letter-spacing: 0; white-space: nowrap; background: var(--unknown-bg); color: var(--unknown-text);
}
a.badge:hover { text-decoration: none; opacity: 0.85; }
.badge.yes { background: var(--yes-bg); color: var(--yes-text); }
.badge.no { background: var(--no-bg); color: var(--no-text); }
.badge.partial { background: var(--partial-bg); color: var(--partial-text); }
.badge.unknown { background: var(--unknown-bg); color: var(--unknown-text); }
.assessment { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 980px; background: var(--unknown-bg); color: var(--unknown-text); font-size: 11px; font-weight: 600; letter-spacing: 0; vertical-align: 1px; }
.link-warn { display: block; font-size: 13px; color: var(--yes-text); }

/* ---------- Grades ---------- */
.grade {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 15px; font-weight: 700; letter-spacing: 0; line-height: 1;
}
.grade.small { width: 26px; height: 26px; font-size: 13px; }
.grade.large { width: 64px; height: 64px; font-size: 30px; }
/* Each colour is paired with a letter colour that passes WCAG AA */
.grade.grade-a { background: #1a7f3c; color: #fff; }
.grade.grade-b { background: #6cb33f; color: #1d1d1f; }
.grade.grade-c { background: #e8a317; color: #1d1d1f; }
.grade.grade-d { background: #e8681c; color: #1d1d1f; }
.grade.grade-e { background: #c0362c; color: #fff; }
.rating-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin: 0 0 16px; }
.score-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; flex: 1; min-width: 280px; margin: 0; }
.score { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px 8px; border-radius: var(--radius-sm); background: var(--bg); text-align: center; }
.score span:not(.grade) { font-size: 12px; color: var(--muted); line-height: 1.25; }
.score strong { font-size: 28px; line-height: 1.1; }
.score.overall strong { color: var(--accent); }
.grade-list { list-style: none; padding: 0; margin: 0; }
.grade-list li { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 0; }

/* ---------- Citations and references ---------- */
a.cite { font-size: 11px; margin-left: 1px; }
.references { list-style: none; padding: 0; margin: 0; font-size: 14px; color: var(--muted); }
.references li { padding: 8px 0; border-bottom: 1px solid var(--line-soft); margin: 0; overflow-wrap: anywhere; }
.references li:last-child { border-bottom: 0; }
.references li:target { background: var(--partial-bg); border-radius: 8px; padding-left: 8px; }
.ref-num { color: var(--faint); margin-right: 4px; }

/* ---------- SDGs ---------- */
.sdg-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 24px; }
.sdg-list li { display: flex; align-items: center; gap: 12px; margin: 0; }
.sdg-num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; font-weight: 700; font-size: 15px; flex-shrink: 0; }
.sdg-name { font-weight: 500; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; vertical-align: middle; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line-soft); }
th:last-child, td:last-child { padding-right: 0; }
th { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); border-bottom-color: var(--line); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
th button, th[data-sort] button {
  all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
  font: inherit; text-transform: inherit; letter-spacing: inherit; color: inherit;
}
th button:hover { color: var(--text); }
th button::after { content: "\2195"; font-size: 11px; color: var(--faint); }
th[aria-sort="ascending"] button::after { content: "\2191"; color: var(--text); }
th[aria-sort="descending"] button::after { content: "\2193"; color: var(--text); }
td .badge { margin: 2px 4px 2px 0; }

/* ---------- Forms ---------- */
.controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.control {
  height: 44px; max-width: 100%; padding: 0 14px;
  font: inherit; font-size: 15px; color: var(--text);
  background: var(--input); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
select.control { padding-right: 36px; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236e6e73' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.18); }
.control.grow { flex: 1 1 240px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.field .control { width: 100%; }

/* ---------- Tiles ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.tile {
  display: flex; flex-direction: column; min-height: 100%;
  background: var(--surface); border-radius: var(--radius); padding: 28px; color: var(--text);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
a.tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); }
.tile-icon { margin: 0 0 16px; min-height: 26px; }
.tile-icon:empty { display: none; }
.tile h3 { margin: 0; font-size: 21px; line-height: 1.2; }
.tile .tile-meta { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.tile p { margin: 12px 0 0; font-size: 15px; color: var(--muted); flex-grow: 1; }
.tile .tile-link { margin-top: 16px; font-size: 15px; color: var(--link); }
.grid.stats .tile { align-items: center; justify-content: center; text-align: center; padding: 24px 16px; }
.tile .stat-number { margin: 0; font-size: 40px; line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; color: var(--text); flex-grow: 0; }
.grid.stats .tile-meta { margin-top: 4px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 64px; padding: 24px 0 40px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); }
.site-footer p { margin: 0 0 8px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* ---------- Compare ---------- */
.compare-table th[scope="row"] { width: 180px; text-transform: none; letter-spacing: -0.01em; font-size: 14px; font-weight: 500; color: var(--muted); vertical-align: top; white-space: normal; }
.compare-table th[scope="col"] { text-transform: none; letter-spacing: -0.02em; font-size: 17px; font-weight: 600; color: var(--text); white-space: normal; vertical-align: bottom; }
.compare-table th[scope="col"] .small-note { display: block; font-weight: 400; }
.compare-table td { vertical-align: top; min-width: 200px; }
.compare-table .grade.large { width: 48px; height: 48px; font-size: 22px; }
.compare-controls .control { flex: 1 1 220px; }

/* ---------- Screener ---------- */
.preset-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.jump-link { margin-left: auto; font-size: 14px; }
.screener-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.screener-grid fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.screener-grid legend { padding: 0; margin: 0 0 12px; font-size: 17px; font-weight: 600; }
.check-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 16px; }
.check-grid .check { font-size: 15px; }
.screener-grid > fieldset > .check { margin-top: 4px; }
.results-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 8px; }
.results-head h2 { margin: 0; }
#sc-results-h { scroll-margin-top: 72px; }
.screener-table td.pillar, .screener-table th.pillar { text-align: center; padding-right: 8px; }

/* ---------- Tablet ---------- */
@media (max-width: 1023px) {
  :root { --pad: 28px; }
  .site-header .wrap { flex-wrap: wrap; gap: 8px 16px; }
  .menu-btn { display: inline-grid; }
  .header-actions { margin-left: auto; }
  .site-nav { order: 4; display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; margin: 0 0 8px; font-size: 17px; }
  .site-header.nav-open .site-nav { display: flex; }
  .site-nav a { padding: 12px 0; border-top: 1px solid var(--line-soft); opacity: 1; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .screener-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screener-grid fieldset:nth-child(2) { grid-row: span 2; }
  h1 { font-size: 40px; }
  .hero h1 { font-size: 52px; }
}

/* Touch screens: 16px inputs stop iPhone zooming in, and tap targets stay large */
@media (max-width: 1023px), (pointer: coarse) {
  input, select, textarea, .control, .search input, .search.compact input { font-size: 16px; }
  .check input { width: 22px; height: 22px; }
  .check { min-height: 36px; }
  .toc a { padding: 10px 16px; }
}

/* ---------- Phone ---------- */
@media (max-width: 734px) {
  :root { --pad: 20px; --gap: 12px; --side: 16px; --radius: 16px; }
  body { font-size: 16px; }
  h1 { font-size: 32px; }
  h2 { font-size: 21px; }
  .hero { padding: 48px 0 32px; }
  .hero h1 { font-size: 40px; }
  .hero .lede, .page-subtitle, .lead-text { font-size: 18px; }
  .page-title { flex-direction: column; align-items: flex-start; gap: 16px; margin: 32px 0 24px; }
  .title-grade { flex-direction: row; gap: 12px; }
  .title-grade .grade.large { width: 48px; height: 48px; font-size: 22px; }
  .section-title { font-size: 26px; margin-top: 48px; }
  .grid, .grid.stats { grid-template-columns: 1fr; }
  .grid.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .grid.stats .tile { padding: 16px 8px; }
  .tile { padding: 22px; }
  .tile .stat-number { font-size: 24px; }
  .grid.stats .tile-meta { font-size: 11px; }
  .two-col { grid-template-columns: 1fr; gap: 8px; }
  .two-col > div + div h3 { margin-top: 16px; }
  .facts { grid-template-columns: 1fr; }
  .facts dt { padding: 12px 0 0; border-bottom: 0; font-size: 13px; }
  .facts dd { padding: 2px 0 12px; }
  .rating-row { gap: 16px; }
  .score-row { grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; width: 100%; }
  .controls .control, .controls select, .compare-controls .control { flex: 1 1 100%; width: 100%; }
  .screener-grid { grid-template-columns: 1fr; gap: 20px; }
  .screener-grid fieldset:nth-child(2) { grid-row: auto; }
  .jump-link { margin-left: 0; width: 100%; }
  .page-actions { line-height: 2.2; }
  .site-footer a { display: inline-block; padding: 4px 0; }

  /* Directory and sector tables: drop the Profile column (the rating already shows it) */
  .dir-table th:nth-child(5), .dir-table td:nth-child(5) { display: none; }

  /* Compare: row labels stay put while the companies scroll sideways */
  .compare-table th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--surface); width: 104px; min-width: 104px; font-size: 13px; }
  .compare-table td, .compare-table th[scope="col"] { min-width: 168px; }
}

@media (max-width: 900px) {
  /* Screener results become cards */
  .screener-table thead { display: none; }
  .screener-table, .screener-table tbody { display: block; }
  .screener-table tr { display: grid; grid-template-columns: repeat(5, minmax(0, 76px)); justify-content: start; align-items: center; gap: 6px 4px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
  .screener-table td { display: block; padding: 0; border: 0; }
  .screener-table td:nth-child(1) { grid-column: 1 / -1; font-weight: 600; font-size: 17px; }
  .screener-table td:nth-child(2), .screener-table td:nth-child(3) { grid-column: 1 / -1; font-size: 14px; color: var(--muted); }
  .screener-table td.nowrap br { display: none; }
  .screener-table td:nth-child(n+4):nth-child(-n+8) { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
  .screener-table td[data-label]::after { content: attr(data-label); }
  .screener-table td:nth-child(9), .screener-table td[colspan] { grid-column: 1 / -1; }

}

/* ---------- Print ---------- */
@media print {
  :root, [data-theme="dark"] { --bg: #fff; --surface: #fff; --text: #000; --muted: #444; --faint: #555; --line: #ccc; --line-soft: #ddd; --link: #000; }
  .site-header, .search, .page-actions, .toc, .skip-link { display: none !important; }
  .card { break-inside: avoid; padding: 12px 0; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.tile p.tile-meta { flex-grow: 0; }
.tile p:not(.tile-meta):not(.stat-number) { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.row-code { display: none; }
@media (max-width: 734px) {
  .dir-table th:nth-child(2), .dir-table td:nth-child(2) { display: none; }
  .row-code { display: block; font-size: 13px; color: var(--muted); }
  .dir-table td:first-child { min-width: 140px; }
}
@media (max-width: 734px) {
  .dir-table td:nth-child(4) .missing { display: none; }
  .dir-table th:nth-child(4), .dir-table td:nth-child(4) { width: 64px; padding-right: 0; }
  .dir-table td:first-child { min-width: 0; }
  .dir-table th, .dir-table td { padding-right: 12px; }
}
@media (max-width: 734px) { .dir-table { font-size: 14px; } .dir-table td { overflow-wrap: anywhere; } }
.screener-table { font-size: 14px; }
.screener-table th { letter-spacing: 0.02em; }
.screener-table td.nowrap { white-space: normal; }
.screener-table th, .screener-table td { padding-right: 10px; }
@media (max-width: 734px) {
  table { font-size: 14px; }
  th { white-space: normal; }
  td { overflow-wrap: anywhere; }
  th, td { padding-right: 10px; }
}
.screener-table th, .screener-table td { padding-right: 8px; }
.screener-table td:last-child .badge { white-space: normal; }
@media (min-width: 1024px) { .jump-link { display: none; } }
/* Emissions table */
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.em-table th:first-child, .em-table td:first-child { width: 52px; color: var(--muted); }
@media (max-width: 1023px) { .em-table th:nth-child(3), .em-table td:nth-child(3) { display: none; } }
@media (max-width: 734px) {
  .em-table { font-size: 14px; }
  .em-table th:nth-child(6), .em-table td:nth-child(6) { display: none; }
  .em-table th:first-child, .em-table td:first-child { width: 36px; }
  .em-table td:nth-child(2) { overflow-wrap: anywhere; }
  .em-table th, .em-table td { padding-right: 10px; }
}
.grid.stats + .card { margin-top: var(--gap); }
.em-table td:last-child { white-space: nowrap; }
.check-table td:last-child { width: 110px; text-align: right; } .check-table td { vertical-align: top; } .check-table .row-code { font-size: 13px; color: var(--muted); margin-top: 2px; }
