:root {
  --bg: #f4f4f4;
  --ink: #111111;
  --muted: #5e5e5e;
  --line: #d8d8d8;
  --panel: #f8f8f8;
  --white: #ffffff;
  --max: 1160px;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

img,
svg {
  max-width: 100%;
}

.page {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

.page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 15% 12%, rgba(0, 0, 0, 0.05), transparent 35%),
    radial-gradient(circle at 82% 28%, rgba(0, 0, 0, 0.045), transparent 36%),
    linear-gradient(180deg, #fafafa 0%, #f1f1f1 52%, #ececec 100%);
}

.page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 90px 90px;
  opacity: 0.3;
  mask-image: linear-gradient(to bottom, black 12%, transparent 92%);
}

.container {
  width: min(var(--max), calc(100% - clamp(24px, 5vw, 72px)));
  margin: 0 auto;
}

header .container {
  width: 100%;
  max-width: none;
  padding-inline: clamp(14px, 2.4vw, 34px);
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(244, 244, 244, 0.72);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 18px;
}

.brand {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.35px;
  display: flex;
  align-items: center;
  gap: 0.42rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-text span {
  opacity: 0.72;
  font-weight: 500;
}

.brand-logo {
  width: 1.35rem;
  height: 1.35rem;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.menu {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
}

.menu a {
  font-family: "Space Grotesk", sans-serif;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
}

.menu a:hover,
.menu a[aria-current="page"] {
  opacity: 0.68;
}

.btn {
  font-family: "Space Grotesk", sans-serif;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 0.92rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease, color 140ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
}

.hero {
  padding: 7.5rem 0 3.2rem;
  text-align: center;
}

.kicker {
  font-family: "Space Grotesk", sans-serif;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 1.2rem;
  font-size: 0.82rem;
  color: #2a2a2a;
  letter-spacing: 0.25px;
}

h1,
h2,
h3 {
  color: var(--ink);
}

h1 {
  font-family: "Instrument Serif", serif;
  font-weight: 700;
  font-size: clamp(2.35rem, 6vw, 4.8rem);
  line-height: 1;
  max-width: 980px;
  margin: 0 auto 1.1rem;
}

.hero p:not(.kicker),
.dek {
  max-width: 820px;
  margin: 0 auto;
  font-size: clamp(1rem, 1.7vw, 1.3rem);
  color: #2d2d2d;
}

.resource-list {
  padding: 1.8rem 0 1.5rem;
}

.resource-card {
  border: 1px solid var(--line);
  background: rgba(248, 248, 248, 0.86);
  border-radius: 12px;
  padding: clamp(1.2rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}

.resource-meta,
.article-meta {
  font-family: "Space Grotesk", sans-serif;
  color: var(--muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  margin-bottom: 0.8rem;
}

.resource-card h2 {
  font-family: "Instrument Serif", serif;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.05;
  max-width: 840px;
  margin-bottom: 0.72rem;
}

.resource-card h2 a {
  color: var(--ink);
  text-decoration: none;
}

.resource-card p {
  max-width: 780px;
  color: #303030;
  margin-bottom: 1rem;
}

.text-link,
.back-link {
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article {
  padding: 3.6rem 0 5rem;
}

.article-head {
  text-align: center;
  padding: 2.4rem 0 2.2rem;
}

.article-head .article-meta {
  justify-content: center;
  margin-top: 1.1rem;
  margin-bottom: 0;
}

.article-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 760px);
  gap: clamp(24px, 5vw, 60px);
  align-items: start;
  justify-content: center;
}

.toc {
  position: sticky;
  top: 96px;
  border: 1px solid var(--line);
  background: rgba(248, 248, 248, 0.84);
  border-radius: 12px;
  padding: 1rem;
  display: grid;
  gap: 0.64rem;
}

.toc strong,
.toc a {
  font-family: "Space Grotesk", sans-serif;
}

.toc strong {
  font-size: 0.86rem;
}

.toc a {
  color: #404040;
  text-decoration: none;
  font-size: 0.86rem;
}

.toc a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-body {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  border-radius: 12px;
  padding: clamp(1.2rem, 4vw, 2.5rem);
  box-shadow: var(--shadow);
}

.article-body section {
  margin-top: 2.1rem;
}

.article-body h2 {
  font-family: "Instrument Serif", serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.06;
  margin-bottom: 0.72rem;
}

.article-body h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.03rem;
  margin: 1.3rem 0 0.35rem;
}

.article-body p,
.article-body li,
.article-body td,
.article-body th {
  color: #2d2d2d;
  font-size: 1rem;
}

.article-body p + p {
  margin-top: 1rem;
}

.article-body ul,
.article-body ol {
  margin: 0.9rem 0 0 1.25rem;
}

.article-body li + li {
  margin-top: 0.44rem;
}

.callout,
.mid-cta {
  border: 1px solid #cfcfcf;
  background: #f7f7f7;
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1rem;
}

.callout p {
  margin-top: 0.3rem;
}

.mid-cta {
  text-align: center;
  padding: 1.4rem;
}

.mid-cta p {
  max-width: 620px;
  margin: 0 auto 1rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: #fbfbfb;
}

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

th {
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: #eeeeee;
}

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

.cta {
  padding: 3rem 0 5.5rem;
  text-align: center;
}

.cta-box {
  border: 1px solid var(--line);
  background: #f8f8f8;
  border-radius: 12px;
  padding: 2rem 1rem;
  box-shadow: var(--shadow);
}

.cta h2 {
  font-family: "Instrument Serif", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.02;
  margin-bottom: 0.6rem;
}

.cta p {
  color: #3a3a3a;
  max-width: 720px;
  margin: 0 auto 1.1rem;
}

footer {
  padding: 1rem 0 2rem;
  text-align: center;
  color: #666666;
  font-size: 0.85rem;
}

footer a {
  color: inherit;
}

@media (max-width: 940px) {
  .menu {
    display: none;
  }

  .hero {
    padding-top: 6.4rem;
  }

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

  .toc {
    position: static;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(var(--max), calc(100% - 24px));
  }

  header .container {
    width: 100%;
    padding-inline: 12px;
  }

  .nav {
    min-height: 64px;
    gap: 10px;
  }

  .brand {
    font-size: 0.86rem;
  }

  .btn {
    padding: 9px 14px;
    font-size: 0.82rem;
  }

  .hero {
    padding: 5.2rem 0 2.2rem;
  }

  .article {
    padding: 2.2rem 0 4rem;
  }

  .article-head {
    padding: 1.8rem 0;
  }

  .article-body {
    padding: 1.05rem 0.92rem;
  }

  table {
    min-width: 620px;
  }
}
