:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #ffffff;
  --ink: #111114;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.1);
  --blue: #0066cc;
  --green: #1f7a5c;
  --gold: #9c7a21;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 clamp(18px, 4vw, 42px);
  border-bottom: 1px solid var(--line);
  background: rgba(245, 245, 247, 0.82);
  backdrop-filter: saturate(180%) blur(22px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: 14px;
  font-weight: 680;
  color: #2b2b31;
  white-space: nowrap;
}

.brand::before {
  content: "";
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  background: url("logo.jpg") center / contain no-repeat;
}

.site-nav nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav nav a,
.contact-trigger {
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--muted);
  font-size: 13px;
}

.site-nav nav a.active,
.site-nav nav a:hover,
.contact-trigger:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
}

.contact-trigger {
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: clamp(620px, 86vh, 860px);
  display: flex;
  align-items: end;
  padding: 96px clamp(20px, 5vw, 72px) 72px;
  overflow: hidden;
  background: #111 var(--hero-image) center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 160px;
  background: linear-gradient(to bottom, rgba(245, 245, 247, 0), var(--bg));
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.2) 58%, rgba(0, 0, 0, 0.05));
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow,
.hero-copy p {
  color: rgba(255, 255, 255, 0.78);
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.06;
}

.hero h1 {
  max-width: 780px;
  font-size: clamp(42px, 5.8vw, 74px);
  font-weight: 760;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 700px;
  margin: 22px 0 0;
  font-size: clamp(18px, 2.2vw, 25px);
  line-height: 1.35;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.home-search {
  display: flex;
  width: min(100%, 520px);
  min-height: 48px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
}

.home-search input,
.home-search button {
  border: 0;
  font: inherit;
}

.home-search input {
  min-width: 0;
  flex: 1;
  padding: 0 18px;
  background: transparent;
  color: #fff;
}

.home-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.home-search button {
  flex: 0 0 auto;
  padding: 0 20px;
  background: #fff;
  color: #111;
  font-weight: 700;
  cursor: pointer;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  padding: 0 18px;
  color: #fff;
  font-weight: 650;
}

.button.primary {
  border-color: #fff;
  background: #fff;
  color: #111;
}

.section,
.list-page {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.section {
  padding: 80px 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(280px, 1fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 28px;
}

.section-head h2,
.list-hero h1 {
  font-size: clamp(34px, 5vw, 72px);
  font-weight: 740;
}

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

.category-tile {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--surface-solid);
  transition: transform 180ms ease, border-color 180ms ease;
}

.category-tile:hover,
.article-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 102, 204, 0.38);
}

.category-tile span {
  display: inline-flex;
  color: var(--blue);
  font-size: 13px;
  font-weight: 720;
}

.category-tile h3 {
  margin-top: 46px;
  font-size: 25px;
}

.category-tile p {
  margin: 12px 0 0;
  color: var(--muted);
}

.series-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.series-links a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
  color: #2b2b31;
  font-size: 14px;
}

.series-links span {
  color: var(--blue);
  font-weight: 760;
}

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

.article-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  transition: transform 180ms ease, border-color 180ms ease;
}

.thumb {
  aspect-ratio: 16 / 10;
  background: #e6e6ea;
  overflow: hidden;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.card-copy h3 {
  font-size: 22px;
  line-height: 1.18;
}

.card-copy p:not(.eyebrow) {
  margin: 12px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  color: #46464b;
  font-size: 12px;
}

.list-hero {
  padding: 84px 0 36px;
}

.list-hero p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
  font-size: 21px;
}

.filter-bar {
  position: sticky;
  top: 57px;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(260px, 0.86fr) minmax(0, 1.14fr);
  gap: 12px;
  padding: 14px 0;
  background: rgba(245, 245, 247, 0.88);
  backdrop-filter: blur(20px);
}

.search-control {
  position: relative;
  min-width: 0;
}

.filter-bar input,
.series-control select {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: #fff;
  font: inherit;
}

.filter-bar input {
  padding-right: 72px;
}

#resultCount {
  position: absolute;
  right: 14px;
  top: 50%;
  color: var(--muted);
  font-size: 13px;
  transform: translateY(-50%);
}

.filter-buttons {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding-bottom: 2px;
}

.filter-buttons button {
  flex: 0 0 auto;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0 14px;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.filter-buttons button.active {
  background: var(--ink);
  color: #fff;
}

.filter-buttons span {
  opacity: 0.68;
}

.series-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.series-control label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.series-control select {
  appearance: none;
  color: var(--ink);
  cursor: pointer;
}

.tag-filters {
  grid-column: 1 / -1;
}

.archive-grid {
  padding: 18px 0 80px;
}

.article-page article {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.article-hero {
  max-width: 920px;
  padding: 84px 0 42px;
}

.article-hero h1 {
  font-size: clamp(40px, 6vw, 86px);
  font-weight: 760;
}

.dek {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.45;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.lead-image {
  margin: 0 0 56px;
  overflow: hidden;
  border-radius: 8px;
  background: #e6e6ea;
}

.lead-image img {
  width: 100%;
  max-height: 640px;
  object-fit: cover;
}

.article-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 760px);
  gap: clamp(28px, 6vw, 92px);
  align-items: start;
  padding-bottom: 96px;
}

.article-layout aside {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 10px;
}

.article-layout aside a {
  color: var(--blue);
  font-size: 14px;
}

.article-content {
  font-size: 19px;
  line-height: 1.82;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  margin: 68px 0 20px;
  line-height: 1.12;
  font-weight: 760;
}

.article-content h2 {
  font-size: clamp(32px, 3.1vw, 44px);
}

.article-content h3 {
  font-size: clamp(25px, 2.2vw, 32px);
}

.article-content h4 {
  font-size: 22px;
}

.article-content .section-number {
  margin: 64px 0 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 760;
  line-height: 1;
}

.article-content .inferred-heading {
  padding-top: 8px;
}

.article-content p {
  margin: 0 0 22px;
}

.article-content blockquote {
  margin: 32px 0;
  border-left: 3px solid var(--ink);
  padding-left: 20px;
  color: #3a3a3f;
  font-size: 22px;
}

.article-figure {
  margin: 44px 0 8px;
}

.article-figure img {
  width: 100%;
  border-radius: 8px;
}

.caption {
  margin-top: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.footnote {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.footnote span {
  color: var(--ink);
  margin-right: 8px;
}

.contact-panel {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: stretch end;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}

.contact-panel.open {
  pointer-events: auto;
  opacity: 1;
}

.contact-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.24);
}

.contact-form {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  min-height: 100%;
  padding: 84px clamp(22px, 5vw, 42px) 32px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(24px);
  transform: translateX(28px);
  transition: transform 220ms ease;
}

.contact-panel.open .contact-form {
  transform: translateX(0);
}

.contact-form h2 {
  font-size: clamp(34px, 4vw, 54px);
}

.contact-form > p:not(.eyebrow):not(.contact-status) {
  margin: 12px 0 28px;
  color: var(--muted);
  font-size: 17px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: #3a3a3f;
  font-size: 13px;
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
}

.contact-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 20px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.contact-close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.contact-status {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--green);
  font-size: 14px;
}

.article-card[hidden] {
  display: none;
}

@media (max-width: 980px) {
  .category-grid,
  .article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head,
  .filter-bar,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-layout aside {
    position: static;
    display: flex;
  }
}

@media (max-width: 640px) {
  .site-nav {
    padding: 0 14px;
    gap: 10px;
  }

  .brand {
    flex: 0 0 auto;
    width: 42px;
    gap: 0;
    overflow: hidden;
    color: transparent;
  }

  .site-nav nav {
    min-width: 0;
    overflow-x: auto;
  }

  .hero {
    min-height: 720px;
    padding: 110px 20px 64px;
  }

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

  .section,
  .list-page,
  .article-page article {
    width: min(100% - 28px, var(--max));
  }

  .article-content {
    font-size: 17px;
  }
}
