:root {
  --ink: #1c2430;
  --muted: #5b6573;
  --bg: #f6f3ec;
  --paper: #fffdf8;
  --line: #d9d2c4;
  --accent: #1f5c57;
  --accent-ink: #e9f4f2;
  --yes: #215c38;
  --yes-bg: #e5f3ea;
  --partial: #8a5a12;
  --partial-bg: #f8edd6;
  --no: #8a3030;
  --no-bg: #f7e4e4;
  --listed: #5b6573;
  --listed-bg: #eceae4;
  --sample: #6b4e00;
  --sample-bg: #f6e7b8;
  --stale: #7a3e16;
  --stale-bg: #f3ddd0;
  --focus: #0b57d0;
  --max: 68rem;
  --max-wide: 88rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}

a {
  color: var(--accent);
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--ink);
  color: #fff;
  padding: 0.4rem 0.7rem;
  z-index: 10;
}

.skip-link:focus {
  top: 0.75rem;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.wrap-wide {
  width: min(100% - 2rem, var(--max-wide));
}

.banner-sample {
  background: var(--sample-bg);
  color: var(--sample);
  text-align: center;
  padding: 0.55rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid #e0c56a;
}

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.9rem 0;
}

.site-mark {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
}

.site-main {
  padding: 1.75rem 0 3rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 1.25rem 0 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.disclaimer {
  max-width: 50rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  margin: 0 0 0.75rem;
}

.lede {
  font-size: 1.15rem;
  max-width: 42rem;
}

.muted {
  color: var(--muted);
}

.stack > * + * {
  margin-top: 1rem;
}

.card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 0.85rem;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}

.stat-card,
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 1rem 1.1rem;
}

.stat-card strong {
  display: block;
  font-size: 1.8rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.stat-card .stat-long {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.25rem 0 2rem;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border-radius: 0.4rem;
  font-weight: 600;
}

.button:hover {
  filter: brightness(1.08);
}

.button-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.badge-sample,
.badge-stale,
.badge-soon,
.support {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  vertical-align: middle;
}

.badge-sample {
  background: var(--sample-bg);
  color: var(--sample);
}

.badge-stale {
  background: var(--stale-bg);
  color: var(--stale);
  text-transform: uppercase;
}

.badge-soon {
  background: var(--listed-bg);
  color: var(--muted);
}

.link-disabled {
  color: var(--muted);
  cursor: not-allowed;
  text-decoration: none;
}

.include-block {
  margin: 1.5rem 0;
}

.include-block h2 {
  margin-top: 0;
}

.support-yes {
  background: var(--yes-bg);
  color: var(--yes);
}

.support-partial {
  background: var(--partial-bg);
  color: var(--partial);
}

.support-no {
  background: var(--no-bg);
  color: var(--no);
}

.support-not-listed {
  background: var(--listed-bg);
  color: var(--listed);
}

.placeholder-callout {
  border: 2px dashed #c9a227;
  background: #fff8dd;
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
}

.filters {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0 1.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 1rem;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  align-items: end;
}

.filters label,
.filters fieldset {
  display: grid;
  gap: 0.3rem;
  font-size: 0.9rem;
  border: 0;
  padding: 0;
  margin: 0;
}

.filters legend {
  font-weight: 600;
  padding: 0;
  margin-bottom: 0.3rem;
}

.filters input[type="search"],
.filters select {
  font: inherit;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: #fff;
  min-width: 12rem;
}

.check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
}

.check-list label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: var(--paper);
}

table.matrix {
  width: 100%;
  border-collapse: collapse;
  min-width: 40rem;
  font-size: 0.92rem;
}

table.matrix th,
table.matrix td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 0.65rem 0.7rem;
  vertical-align: top;
  text-align: left;
}

table.matrix th:last-child,
table.matrix td:last-child {
  border-right: 0;
}

table.matrix thead th {
  background: #efe9dc;
  position: sticky;
  top: 0;
  z-index: 1;
}

table.matrix tbody th {
  background: var(--paper);
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 10rem;
}

.platform-meta {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: capitalize;
}

.cell-stack {
  display: grid;
  gap: 0.3rem;
}

.cell-stack details {
  font-size: 0.8rem;
  color: var(--muted);
}

.cell-stack details summary {
  cursor: pointer;
}

.cell-stack details p {
  margin: 0.25rem 0 0;
}

.import-methods {
  margin: 0;
  padding-left: 1.1rem;
}

.changelog-list,
.plain-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.changelog-list > li,
.plain-list > li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
}

.meta-line {
  color: var(--muted);
  font-size: 0.9rem;
}

.change-type {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

dl.facts {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.35rem 0.75rem;
}

dl.facts dt {
  color: var(--muted);
  font-weight: 600;
}

button.button {
  font: inherit;
  cursor: pointer;
  border: 0;
}

.filter-type-group {
  margin-top: 0.45rem;
}

.filter-subhead {
  margin: 0 0 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  align-items: center;
  margin: 0 0 1rem;
}

.results-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0.85rem 1rem;
  margin: 0 0 1rem;
}

.cite-btn {
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  border-radius: 0.3rem;
  cursor: pointer;
}

.copy-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.copy-status:empty {
  display: none;
}

@media (max-width: 640px) {
  dl.facts {
    grid-template-columns: 1fr;
  }

  table.matrix tbody th {
    position: static;
  }
}
