:root {
  color-scheme: light dark;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f8fafc;
  color: #0f172a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 30rem),
    #f8fafc;
  color: #334155;
  line-height: 1.65;
}

a {
  color: #2563eb;
  text-underline-offset: 3px;
}

a:hover {
  color: #1d4ed8;
}

.shell {
  width: min(100% - 2rem, 980px);
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hero,
.card {
  border: 1px solid #e2e8f0;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}

.hero {
  padding: clamp(1.5rem, 4vw, 3rem);
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.98) 55%, rgba(236, 253, 245, 0.9));
}

.back {
  display: inline-flex;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  font-weight: 750;
  text-decoration: none;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: #0f172a;
  line-height: 1.2;
}

h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(2rem, 5vw, 3.6rem);
  letter-spacing: -0.04em;
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

h3 {
  margin: 1.4rem 0 0.5rem;
  font-size: 1.05rem;
}

p {
  margin: 0.75rem 0;
}

.lead {
  max-width: 760px;
  margin-top: 1rem;
  color: #475569;
  font-size: 1.05rem;
}

.updated {
  margin-top: 1.25rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.card {
  margin-top: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.note,
.sources {
  border-radius: 1rem;
  background: #f1f5f9;
  padding: 0.9rem 1rem;
  color: #475569;
  font-size: 0.9rem;
}

.table-region {
  position: relative;
  margin-top: 1rem;
}

.table-hint {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.table-wrap {
  position: relative;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
}

.table-wrap:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.55);
  outline-offset: 3px;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 0.9rem;
}

th,
td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

code {
  border-radius: 0.35rem;
  background: #e2e8f0;
  padding: 0.1rem 0.35rem;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82em;
  word-break: break-word;
}

ul {
  margin: 0.75rem 0 0;
  padding-left: 1.3rem;
}

li + li {
  margin-top: 0.5rem;
}

.legal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem 1rem 0;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
}

@media (max-width: 600px) {
  .shell {
    width: min(100% - 1rem, 980px);
    padding-top: 0.5rem;
  }

  .hero,
  .card {
    border-radius: 1.15rem;
  }

  .table-hint {
    position: static;
    display: flex;
    width: auto;
    height: auto;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0 0 0.55rem;
    overflow: visible;
    clip: auto;
    white-space: normal;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 650;
    line-height: 1.35;
  }

  .table-hint::after {
    content: "→";
    flex: 0 0 auto;
    color: #2563eb;
    font-size: 1rem;
  }

  .table-region::after {
    content: "";
    position: absolute;
    z-index: 3;
    top: 2.1rem;
    right: 0;
    bottom: 0;
    width: 2.5rem;
    border-radius: 0 1rem 1rem 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(248, 250, 252, 0.96));
    pointer-events: none;
  }

  .table-wrap {
    scroll-snap-type: x proximity;
  }

  th:first-child,
  td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 11rem;
    background: #ffffff;
    box-shadow: 8px 0 12px -12px rgba(15, 23, 42, 0.65);
  }

  th:first-child {
    z-index: 2;
    background: #f8fafc;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    background: #020617;
    color: #e2e8f0;
  }

  body {
    background:
      radial-gradient(circle at top right, rgba(37, 99, 235, 0.15), transparent 30rem),
      #020617;
    color: #cbd5e1;
  }

  a {
    color: #93c5fd;
  }

  a:hover {
    color: #bfdbfe;
  }

  .hero,
  .card {
    border-color: #334155;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.35);
  }

  .hero {
    background:
      linear-gradient(135deg, rgba(30, 58, 138, 0.25), rgba(15, 23, 42, 0.98) 55%, rgba(6, 78, 59, 0.18));
  }

  h1,
  h2,
  h3 {
    color: #f8fafc;
  }

  .lead,
  .note,
  .sources {
    color: #cbd5e1;
  }

  .note,
  .sources {
    background: #1e293b;
  }

  .table-wrap {
    border-color: #334155;
  }

  table {
    background: #0f172a;
  }

  th,
  td {
    border-color: #334155;
  }

  th {
    background: #1e293b;
    color: #f8fafc;
  }

  code {
    background: #334155;
    color: #f8fafc;
  }

  @media (max-width: 600px) {
    .table-hint {
      color: #bfdbfe;
    }

    .table-region::after {
      background: linear-gradient(to right, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.96));
    }

    td:first-child {
      background: #0f172a;
      box-shadow: 1px 0 0 #334155, 8px 0 14px rgba(0, 0, 0, 0.18);
    }

    th:first-child {
      background: #1e293b;
    }
  }
}
