/* DLSS5 NR compatibility matrix. Colours are tokens; dark follows the system, or data-theme on <html>. */
:root {
  --bg: #ffffff;
  --bg-soft: #f4f6f7;
  --fg: #1a1f24;
  --fg-soft: #5f6a74;
  --line: #e2e6ea;
  --accent: #0d6b57;
  --ok: #17692e;
  --ok-bg: #dff3e4;
  --part: #7a5000;
  --part-bg: #fbefc9;
  --no: #b3202a;
  --no-bg: #fbe3e2;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1114;
    --bg-soft: #161b20;
    --fg: #e4e9ee;
    --fg-soft: #93a0ab;
    --line: #252d35;
    --accent: #4cc3a5;
    --ok: #5fd07f;
    --ok-bg: #14301d;
    --part: #e6b955;
    --part-bg: #33290f;
    --no: #f47d77;
    --no-bg: #3b1a1a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1114;
  --bg-soft: #161b20;
  --fg: #e4e9ee;
  --fg-soft: #93a0ab;
  --line: #252d35;
  --accent: #4cc3a5;
  --ok: #5fd07f;
  --ok-bg: #14301d;
  --part: #e6b955;
  --part-bg: #33290f;
  --no: #f47d77;
  --no-bg: #3b1a1a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

main { max-width: 1440px; margin: 0 auto; padding: 28px 16px 32px; }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 6px; }
.lead { color: var(--fg-soft); margin: 0 0 16px; }

.bar-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 12px; }
.find { flex: 1 1 260px; max-width: 420px; }
.find input { width: 100%; font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 12px; }
.key { display: flex; gap: 6px; margin: 0; font-size: 13px; }
.key .t { padding: 2px 8px; border-radius: 6px; }

.scroll { overflow: auto; max-height: calc(100vh - 150px); border: 1px solid var(--line); border-radius: 10px; }
.matrix { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
.matrix th, .matrix td { padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.matrix thead th[title] { cursor: help; }
.matrix thead th { position: sticky; top: 0; z-index: 2; background: var(--bg-soft); text-align: center; }
.matrix thead th:first-child { left: 0; z-index: 3; text-align: left; }
.matrix thead button { font: inherit; font-weight: 600; color: var(--fg); background: none; border: 0; padding: 0;
  cursor: pointer; white-space: nowrap; }
.matrix thead th[aria-sort="ascending"] button::after { content: " \2191"; }
.matrix thead th[aria-sort="descending"] button::after { content: " \2193"; }
.matrix tbody th { position: sticky; left: 0; z-index: 1; background: var(--bg); text-align: left; font-weight: 600;
  max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.matrix td { text-align: center; }
.matrix tbody tr:hover th, .matrix tbody tr:hover td.plain, .matrix tbody tr:hover td.na { background: var(--bg-soft); }

.t.ok { color: var(--ok); background: var(--ok-bg); }
.t.part { color: var(--part); background: var(--part-bg); }
.t.no { color: var(--no); background: var(--no-bg); }
.t.na { color: var(--fg-soft); }
.t.plain { color: var(--fg); }
.key .t.na { border: 1px solid var(--line); }

.none { color: var(--fg-soft); margin: 12px 0 0; }
.legend { margin: 32px 0 0; }
.legend h2 { font-size: 18px; line-height: 1.3; margin: 0 0 8px; }
.scale { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 16px; color: var(--fg-soft);
  font-size: 14px; }
.scale .t { padding: 2px 8px; border-radius: 6px; font-size: 13px; }
.scale .t.na { border: 1px solid var(--line); }
.guide { border-collapse: separate; border-spacing: 0; width: 100%; max-width: 960px; font-size: 14px;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.guide th, .guide td { padding: 9px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.guide tbody tr:last-child th, .guide tbody tr:last-child td { border-bottom: 0; }
.guide thead th { background: var(--bg-soft); font-size: 12px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--fg-soft); }
.guide tbody th { font-weight: 600; white-space: nowrap; width: 1%; }
.guide tbody td:first-of-type { color: var(--fg-soft); }
.guide tbody td:last-child { white-space: nowrap; width: 1%; }
.guide .t { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 13px; }
.guide .t.na, .guide .t.plain { border: 1px solid var(--line); }

footer { max-width: 1440px; margin: 0 auto; padding: 0 16px 28px; color: var(--fg-soft); font-size: 13px; }

@media (max-width: 600px) {
  h1 { font-size: 22px; }
  .guide th, .guide td { padding: 8px 10px; }
  .guide tbody td:last-child { white-space: normal; }
  .matrix tbody th { max-width: 150px; }
}
