:root {
  --page: #ffffff;
  --surface: #ffffff;
  --soft: #f7f7f6;
  --ink: #202124;
  --muted: #737373;
  --line: #e7e7e4;
  --blue: #2563eb;
  --blue-dark: #1746b8;
  --blue-soft: #eef4ff;
  --cream: #fbfaf7;
  --fail: #f4efe8;
  --max: 1240px;
  --article: 760px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: var(--blue-dark);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

.site-header {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 clamp(22px, 6vw, 86px);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

main {
  width: 100%;
  margin: 0;
  padding: 1px clamp(22px, 6vw, 86px) 76px;
  background: var(--surface);
}

.site-footer {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(22px, 6vw, 86px) 36px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer p {
  margin: 4px 0 0;
}

.site-header nav,
.site-footer nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
  font-size: 0.9rem;
  font-weight: 700;
}

.site-header nav a,
.site-footer nav a {
  color: var(--ink);
}

.site-header nav a:first-child {
  color: var(--blue);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  line-height: 1.05;
}

.brand img {
  width: 210px;
  height: auto;
}

.home-hero {
  min-height: 270px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 42px 0 30px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  margin: 0 0 20px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
}

.home-hero h1,
.page-hero h1,
.article-hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.07em;
}

.home-hero p:not(.hero-chip),
.page-hero p,
.deck {
  max-width: 720px;
  margin: 22px auto 0;
  color: #333;
  font-size: 1.02rem;
  line-height: 1.65;
}

.hero-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  width: min(520px, 100%);
  margin: 26px auto 0;
}

.hero-search input {
  min-width: 0;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 16px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  font-size: 0.92rem;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.06);
}

.hero-search button {
  height: 46px;
  border: 0;
  border-radius: 12px;
  padding: 0 20px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.filter-bar {
  position: static;
  z-index: 10;
  max-width: var(--max);
  margin: 0 auto 34px;
  padding: 0;
  background: transparent;
}

.filter-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 4px 0 10px;
  scrollbar-width: none;
}

.filter-inner::-webkit-scrollbar {
  display: none;
}

.filter-label {
  display: none;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-inner button {
  flex: 0 0 auto;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 8px 13px;
  background: #fafafa;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 750;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.filter-inner button:hover,
.filter-inner button:focus-visible {
  border-color: #bad0ff;
  background: var(--blue-soft);
}

.filter-inner button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.home-content {
  width: min(var(--max), 100%);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 36px;
  align-items: start;
  scroll-margin-top: 92px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2,
.side-feed h2,
.method-preview h2,
.plain-section h2,
.review-article h2,
.related-section h2 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 3vw, 1.95rem);
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.filter-status,
.empty-filter {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

[hidden] {
  display: none !important;
}

.article-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.article-card {
  display: grid;
  min-height: 360px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  border-radius: 16px;
  color: white;
  background: var(--ink);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
}

.article-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.76));
}

.article-card:hover {
  transform: translateY(-2px);
}

.article-card img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  grid-area: 1 / 1;
}

.article-card-copy {
  grid-area: 1 / 1;
  align-self: end;
  position: relative;
  z-index: 2;
  padding: 18px;
}

.article-card span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
}

.article-card h2 {
  margin: 0 0 8px;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.article-card p,
.article-card small {
  color: rgba(255, 255, 255, 0.9);
}

.article-card p {
  margin: 0 0 8px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.article-card small {
  display: block;
  font-size: 0.75rem;
}

.side-feed {
  position: sticky;
  top: 86px;
}

.side-feed h2 {
  border-bottom: 1px solid var(--line);
}

.mini-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  color: var(--ink);
}

.mini-card img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 14px;
  background: var(--soft);
}

.mini-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.mini-card strong {
  display: block;
  margin-top: 4px;
  font-size: 0.95rem;
  line-height: 1.35;
}

.side-note {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.88rem;
}

.side-note strong {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
}

.side-note p {
  margin: 0;
}

.page-hero,
.article-hero,
.review-article,
.plain-section,
.related-section {
  width: min(var(--article), 100%);
  margin-inline: auto;
}

.page-hero,
.article-hero {
  padding: 58px 0 28px;
  text-align: center;
}

.eyebrow,
.crumb,
.meta-row,
.source-note {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-hero img {
  width: 100%;
  margin-top: 28px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.meta-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 20px 0 10px;
  color: var(--muted);
}

.review-article {
  font-size: 1.05rem;
}

.review-article p {
  margin-top: 0;
}

.review-article section,
.review-article > p,
.plain-section,
.related-section {
  margin-block: 34px;
}

.fail-box,
.disclosure-box,
.intro-note,
.method-preview,
.plain-section {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--fail);
}

.plain-section h2:not(:first-child) {
  margin-top: 28px;
}

.plain-section a {
  font-weight: 800;
}

.fail-box {
  border-left: 4px solid #d97706;
}

.disclosure-box {
  color: #444;
  font-size: 0.94rem;
}

.ad-slot {
  display: none;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 0.92rem;
  line-height: 1.45;
}

th,
td {
  padding: 13px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--soft);
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.score-grid div,
.related-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}

.related-list {
  display: grid;
  gap: 12px;
}

.related-list a {
  display: grid;
  color: var(--ink);
}

.related-list span {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 18px;
  }

  .site-header nav,
  .site-footer nav {
    gap: 18px;
  }

  .home-content {
    grid-template-columns: 1fr;
  }

  .side-feed {
    position: static;
  }

  .article-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .site-footer {
    display: block;
  }

  .site-footer nav {
    margin-top: 18px;
  }

  main {
    padding-bottom: 48px;
  }

  .home-hero {
    min-height: 0;
    padding: 42px 0 30px;
  }

  .home-hero h1,
  .page-hero h1,
  .article-hero h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .hero-search {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    margin-bottom: 34px;
  }

  .filter-inner {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 3px;
    scrollbar-width: none;
  }

  .filter-inner::-webkit-scrollbar {
    display: none;
  }

  .filter-label {
    display: none;
  }

  .section-heading {
    display: block;
  }

  .article-card,
  .article-card img {
    min-height: 330px;
  }

  .mini-card {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .mini-card img {
    width: 74px;
    height: 74px;
  }

  .score-grid {
    grid-template-columns: 1fr;
  }
}
