:root {
  color-scheme: light;
  --ink: #111115;
  --ink-soft: #2b2f36;
  --muted: #666a73;
  --quiet: #8c919b;
  --line: rgba(17, 17, 21, 0.12);
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: #ffffff;
  --surface: #f6f4f1;
  --surface-alt: #ebe5dd;
  --accent: #4a3d32;
  --accent-dark: #2f271f;
  --accent-soft: rgba(74, 61, 50, 0.16);
  --glass-edge: rgba(255, 255, 255, 0.72);
  --max: 1180px;
  --measure: 780px;
  --reading-measure: 690px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.95), rgba(246, 244, 241, 0) 34rem),
    linear-gradient(135deg, #f6f4f1 0%, #ffffff 46%, #ebe5dd 100%);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: 0;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 18px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(74, 61, 50, 0.08);
  background: rgba(247, 246, 243, 0.62);
  backdrop-filter: blur(26px) saturate(1.45);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.48);
}

.site-nav {
  width: min(var(--max), calc(100% - 32px));
  height: 52px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 13px;
}

.brand {
  font-weight: 700;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #2f3338;
}

.nav-links a,
.site-footer a {
  text-decoration: none;
}

.nav-links a:hover,
.site-footer a:hover {
  color: var(--accent);
}

.home-hero {
  width: min(var(--max), calc(100% - 32px));
  min-height: calc(100vh - 52px);
  margin: 0 auto;
  padding: 74px 0 56px;
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(420px, 1.18fr);
  align-items: center;
  gap: clamp(34px, 5vw, 72px);
}

.hero-copy {
  max-width: 560px;
}

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

.home-hero h1,
.article-hero h1 {
  margin: 0;
  max-width: 940px;
  font-size: clamp(64px, 10vw, 136px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 610px;
  margin: 24px 0 0;
  color: #4d535c;
  font-size: clamp(20px, 2.5vw, 28px);
  line-height: 1.25;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
}

.button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
}

.button {
  padding: 0 22px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 16px 30px rgba(74, 61, 50, 0.2);
}

.button:hover {
  background: var(--accent-dark);
}

.text-link {
  color: var(--accent);
}

.hero-panel {
  position: relative;
  min-height: 590px;
  padding: clamp(18px, 3vw, 30px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(74, 61, 50, 0.04), rgba(255, 255, 255, 0.18) 34%, rgba(74, 61, 50, 0.12)),
    url("/assets/fig-notes-hero-liquid-glass-v1.png") center / cover;
  box-shadow:
    0 36px 88px rgba(74, 61, 50, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(74, 61, 50, 0.12);
  overflow: hidden;
}

.hero-panel::before,
.hero-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero-panel::before {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(74, 61, 50, 0.18)),
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.56), transparent 18rem),
    radial-gradient(circle at 88% 80%, rgba(74, 61, 50, 0.18), transparent 22rem);
  backdrop-filter: saturate(0.96);
}

.hero-panel::after {
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 24px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    inset 0 0 38px rgba(255, 255, 255, 0.18);
}

.panel-card {
  position: relative;
  z-index: 1;
  width: min(100%, 330px);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.36)),
    rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(24px) saturate(1.25);
  box-shadow:
    0 20px 46px rgba(74, 61, 50, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.panel-card:last-child {
  align-self: flex-start;
}

.panel-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.panel-card span {
  color: var(--muted);
  font-size: 14px;
}

.home-section {
  padding: 54px 0 88px;
}

.home-editorial {
  padding: 18px 0 42px;
}

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

.editorial-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(420px, 1.1fr);
  align-items: start;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(28px, 5vw, 54px) 0;
  border-top: 1px solid rgba(17, 17, 21, 0.08);
  border-bottom: 1px solid rgba(17, 17, 21, 0.08);
}

.editorial-intro {
  max-width: 520px;
}

.editorial-intro h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

.topic-list {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(17, 17, 21, 0.1);
}

.topic-list a {
  min-width: 0;
  padding: 24px 0;
  display: grid;
  grid-template-columns: 44px minmax(150px, 0.75fr) minmax(190px, 1.25fr);
  align-items: baseline;
  gap: 18px;
  border-bottom: 1px solid rgba(17, 17, 21, 0.1);
  text-decoration: none;
}

.topic-list a:hover strong {
  color: var(--accent);
}

.topic-list span {
  color: var(--quiet);
  font-size: 13px;
  font-weight: 700;
}

.topic-list strong {
  color: var(--ink);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.06;
  transition: color 180ms ease;
}

.topic-list em {
  color: var(--muted);
  font-size: 15px;
  font-style: normal;
  line-height: 1.5;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1;
}

.section-heading .eyebrow {
  margin-bottom: 10px;
}

.section-heading p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-card {
  min-height: 390px;
  min-width: 0;
}

.post-card a {
  min-width: 0;
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: 0 18px 52px rgba(17, 17, 21, 0.08);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.post-card a:hover {
  transform: translateY(-4px);
  background: var(--panel-strong);
  box-shadow: 0 28px 70px rgba(17, 17, 21, 0.13);
}

.post-card-featured {
  grid-column: span 2;
  min-height: 520px;
}

.post-card-featured a {
  padding: clamp(28px, 4vw, 40px);
  background:
    radial-gradient(circle at 92% 12%, rgba(74, 61, 50, 0.14), rgba(74, 61, 50, 0) 21rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 246, 249, 0.82));
}

.post-card-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 21, 0.08);
  border-radius: 20px;
  background: #eef1f5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.post-card-featured .post-card-media {
  aspect-ratio: 16 / 7.7;
  border-radius: 24px;
}

.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform 240ms ease, filter 240ms ease;
}

.post-card a:hover .post-card-media img {
  transform: scale(1.025);
  filter: saturate(1.04);
}

.post-card-body {
  max-width: 620px;
  min-width: 0;
}

.post-card-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.post-topic,
.post-card time {
  color: var(--quiet);
  font-size: 13px;
  font-weight: 650;
  text-transform: uppercase;
}

.post-topic {
  color: var(--accent);
}

.post-topic::after {
  content: "/";
  margin-left: 10px;
  color: rgba(17, 17, 21, 0.24);
}

.post-card h3 {
  margin: 10px 0 0;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.post-card-featured h3 {
  max-width: 760px;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1;
}

.post-card p {
  max-width: 560px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.post-card-featured p {
  color: #4d535c;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.45;
}

.post-card .arrow {
  width: fit-content;
  min-height: 38px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 999px;
  color: #1d1d1f;
  background: rgba(17, 17, 21, 0.07);
  font-size: 14px;
  font-weight: 700;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.post-card a:hover .arrow {
  color: #fff;
  background: #1d1d1f;
  transform: translateX(2px);
}

.article-shell {
  width: min(100%, 1100px);
  margin: 0 auto;
  padding: 78px 16px 104px;
}

.article-hero {
  margin: 0 auto 38px;
  max-width: 940px;
  text-align: center;
}

.article-hero h1 {
  font-size: clamp(42px, 7vw, 82px);
}

.article-hero time {
  display: inline-block;
  margin-top: 22px;
  color: var(--muted);
  font-size: 15px;
}

.article-content {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(30px, 5vw, 64px);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78));
  box-shadow: 0 28px 76px rgba(17, 17, 21, 0.08);
}

.article-content .post-full-header,
.article-content .post-full-image,
.article-content .post-full-byline,
.article-content .post-full-tags,
.article-content .author-card,
.article-content .author-avatar,
.article-content .post-full-title {
  display: none;
}

.article-content .post-full,
.article-content .post-full-content,
.article-content .post-content,
.article-content section,
.article-content div {
  max-width: 100%;
}

.article-content > * {
  max-width: var(--reading-measure);
  margin-left: auto;
  margin-right: auto;
}

.article-content h1,
.article-content h2,
.article-content h3 {
  color: var(--ink);
  margin-top: 1.75em;
  margin-bottom: 0.55em;
  line-height: 1.1;
  letter-spacing: 0;
}

.article-content h1:first-child,
.article-content h2:first-child,
.article-content h3:first-child {
  margin-top: 0;
}

.article-content h1 {
  font-size: clamp(34px, 4vw, 48px);
}

.article-content h2 {
  font-size: clamp(27px, 3vw, 40px);
}

.article-content h3 {
  font-size: clamp(22px, 2vw, 27px);
}

.article-content p,
.article-content li {
  color: var(--ink-soft);
  font-size: clamp(18px, 1.5vw, 20px);
  line-height: 1.74;
}

.article-content p {
  margin-top: 0;
  margin-bottom: 1.08em;
}

.article-content h2 + p,
.article-content h3 + p {
  margin-top: 0;
}

.article-content > p:first-of-type {
  color: #242830;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.55;
}

.article-content ul,
.article-content ol {
  margin-top: 1em;
  margin-bottom: 1.45em;
  padding-left: 1.3em;
}

.article-content li {
  padding-left: 0.2em;
  margin-bottom: 0.6em;
}

.article-content li::marker {
  color: var(--accent);
}

.article-content strong {
  color: #16181d;
  font-weight: 750;
}

.article-content em {
  color: #3c414a;
}

.article-content code {
  padding: 0.14em 0.36em;
  border: 1px solid rgba(17, 17, 21, 0.09);
  border-radius: 7px;
  background: rgba(17, 17, 21, 0.055);
  color: #1f2933;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86em;
}

.article-content pre {
  max-width: min(100%, 860px);
  margin-top: 2em;
  margin-bottom: 2em;
  padding: 20px;
  overflow-x: auto;
  border: 1px solid rgba(17, 17, 21, 0.1);
  border-radius: 18px;
  background: #111115;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.article-content pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: #f4f6f8;
  font-size: 14px;
  line-height: 1.65;
}

.article-content blockquote {
  margin-top: 2.2em;
  margin-bottom: 2.2em;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(17, 17, 21, 0.08);
  border-radius: 22px;
  background: rgba(245, 245, 247, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.article-content blockquote p {
  color: #1d1d1f;
  font-size: clamp(22px, 2.5vw, 30px);
  line-height: 1.34;
}

.article-content blockquote p:last-child {
  margin-bottom: 0;
}

.article-content a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.article-content a:hover {
  color: var(--accent-dark);
}

.article-content .support-actions {
  margin-top: 1.8em;
  margin-bottom: 1.8em;
}

.article-content .support-actions .button {
  color: #fff;
  text-decoration: none;
}

.article-content .support-actions .button:hover {
  color: #fff;
}

.article-content hr {
  height: 1px;
  margin-top: 44px;
  margin-bottom: 44px;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(17, 17, 21, 0.14), transparent);
}

.article-content figure,
.article-content .kg-card {
  max-width: min(100%, 900px);
  margin-top: clamp(30px, 5vw, 52px);
  margin-bottom: clamp(30px, 5vw, 52px);
}

.article-content figure img,
.article-content .kg-card img,
.article-content > img {
  width: 100%;
  border: 1px solid rgba(17, 17, 21, 0.08);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 52px rgba(17, 17, 21, 0.1);
}

.article-content .kg-width-wide,
.article-content .kg-width-full {
  max-width: min(100%, 960px);
}

.article-content figcaption {
  max-width: var(--reading-measure);
  margin: 12px auto 0;
  color: var(--quiet);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.article-content iframe,
.article-content video {
  width: 100%;
  max-width: min(100%, 900px);
  margin: 2em auto;
  display: block;
  border: 0;
  border-radius: 22px;
  box-shadow: 0 20px 52px rgba(17, 17, 21, 0.1);
}

.article-signoff,
.article-nav {
  max-width: var(--measure);
  margin: 22px auto 0;
}

.article-signoff {
  padding: 24px clamp(22px, 4vw, 34px);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 18px 48px rgba(17, 17, 21, 0.07);
}

.article-signoff .eyebrow {
  margin-bottom: 8px;
}

.article-signoff p:last-child {
  max-width: 590px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

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

.article-nav a {
  min-height: 128px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 48px rgba(17, 17, 21, 0.07);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.article-nav a:hover {
  transform: translateY(-3px);
  background: #fff;
  box-shadow: 0 26px 64px rgba(17, 17, 21, 0.12);
}

.article-nav span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.article-nav strong {
  color: var(--ink);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.12;
}

.site-footer {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 44px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 900px) {
  .home-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 56px;
  }

  .hero-panel {
    min-height: 430px;
  }

  .section-heading {
    display: block;
  }

  .section-heading p {
    margin-top: 12px;
  }

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

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

  .post-card-featured {
    grid-column: span 2;
  }
}

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

  .site-nav {
    width: min(100% - 24px, var(--max));
    gap: 12px;
  }

  .nav-links {
    gap: 12px;
  }

  .home-hero h1,
  .article-hero h1 {
    font-size: 44px;
  }

  .hero-copy p {
    font-size: 20px;
  }

  .hero-panel {
    min-height: 360px;
    border-radius: 24px;
  }

  .home-editorial {
    padding-top: 0;
  }

  .editorial-grid {
    padding: 28px 0;
  }

  .editorial-intro h2 {
    font-size: 36px;
  }

  .topic-list a {
    grid-template-columns: 34px 1fr;
    gap: 8px 14px;
    padding: 20px 0;
  }

  .topic-list em {
    grid-column: 2;
  }

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

  .post-card,
  .post-card-featured {
    min-height: 0;
    grid-column: auto;
  }

  .post-card a,
  .post-card-featured a {
    padding: 22px;
  }

  .post-card-featured h3 {
    font-size: 32px;
  }

  .post-card-media,
  .post-card-featured .post-card-media {
    aspect-ratio: 16 / 9.5;
    border-radius: 18px;
  }

  .article-shell {
    padding: 44px 12px 78px;
  }

  .article-hero {
    margin-bottom: 24px;
  }

  .article-hero time {
    margin-top: 16px;
  }

  .article-content {
    padding: 26px 18px;
    border-radius: 22px;
  }

  .article-content h1,
  .article-content h2,
  .article-content h3 {
    margin-top: 1.45em;
  }

  .article-content h2 {
    font-size: 28px;
  }

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

  .article-content p,
  .article-content li {
    font-size: 17px;
    line-height: 1.68;
  }

  .article-content > p:first-of-type {
    font-size: 19px;
    line-height: 1.5;
  }

  .article-content figure,
  .article-content .kg-card {
    margin-left: 0;
    margin-right: 0;
  }

  .article-content figure img,
  .article-content .kg-card img,
  .article-content > img {
    border-radius: 18px;
  }

  .article-content blockquote {
    padding: 20px;
    border-radius: 18px;
  }

  .article-content blockquote p {
    font-size: 21px;
  }

  .site-footer {
    display: block;
  }

  .site-footer a {
    display: inline-block;
    margin-top: 10px;
  }
}
