:root {
  color-scheme: light;
  --gh-font-heading: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --gh-font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--gh-font-body);
  --ink: #000;
  --muted: rgba(0, 0, 0, .65);
  --primary: #388e9c;
  --primary-dark: #2a6f79;
  --line: rgba(56, 142, 156, .18);
  --line-strong: rgba(56, 142, 156, .3);
  --surface: #fff;
  --soft: #eef7f8;
  --soft-alt: #d7ecef;
  --footer: #e9f3f5;
  --nav-soft: #f5f5f7;
  --yellow: #fdfd53;
  --frame: 92rem;
  --guide: 96rem;
}

* { box-sizing: border-box; }
html { overflow-x: hidden; scroll-behavior: smooth; }
body {
  background: var(--surface);
  color: var(--ink);
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  margin: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body::before {
  border-inline: 1px solid rgba(29, 29, 31, .08);
  content: "";
  inset: 0 max(.5rem, calc((100vw - var(--guide)) / 2));
  pointer-events: none;
  position: fixed;
  z-index: 90;
}
img { display: block; max-width: 100%; }
a { color: var(--primary-dark); }
button, input, textarea, select { font: inherit; }

.site-frame,
.site-frame-padded { margin-inline: auto; max-width: var(--frame); width: 100%; }
.site-frame-padded { padding-inline: 1rem; }

.site-header {
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid #e7e7ea;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  align-items: center;
  display: grid;
  gap: .9rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 5rem;
  padding: .75rem 1rem;
}
.brand,
.footer-brand { color: var(--ink); display: inline-flex; flex: none; text-decoration: none; }
.brand img { height: 3.4rem; object-fit: contain; object-position: left center; width: auto; }
.brand strong { font-size: 1rem; max-width: 9rem; }

.main-nav {
  background: var(--nav-soft);
  border-radius: 1.2rem;
  display: flex;
  gap: .15rem;
  justify-self: center;
  min-width: 0;
  padding: .25rem;
}
.main-nav a,
.audience-link {
  align-items: center;
  border: 1px solid transparent;
  border-radius: .95rem;
  color: #6e6e73;
  display: inline-flex;
  font-size: .78rem;
  font-weight: 600;
  justify-content: center;
  min-height: 2.45rem;
  padding: .55rem .72rem;
  text-decoration: none;
  white-space: nowrap;
}
.main-nav a:hover,
.audience-link:hover { color: #1d1d1f; }
.main-nav a.is-active,
.audience-link.is-active {
  background: #fff;
  border-color: #3b82f6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  color: #1d4ed8;
}
.header-actions { align-items: center; display: flex; gap: .35rem; justify-content: flex-end; }
.audience-link { background: var(--nav-soft); }
.header-cta { margin-left: .25rem; }
.account-button {
  align-items: center;
  border: 1px solid #e7e7ea;
  border-radius: 1rem;
  color: #1d1d1f;
  display: inline-flex;
  font-size: .75rem;
  font-weight: 700;
  justify-content: center;
  min-height: 2.75rem;
  padding: .6rem .85rem;
  text-decoration: none;
}
.account-button:hover { background: var(--nav-soft); }

.site-main { flex: 1; }
.ambient-section {
  background:
    radial-gradient(circle at top left, rgba(253, 253, 83, .18), transparent 36%),
    radial-gradient(circle at top right, rgba(56, 142, 156, .13), transparent 34%),
    linear-gradient(180deg, #f8fbfc 0%, #f3f5f7 48%, #eef1f4 100%);
  border-bottom: 1px solid var(--line);
}
.hero-section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.compact-hero { padding-block: clamp(3rem, 6vw, 5rem); }
.pill-label {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  display: inline-flex;
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .06em;
  margin: 0 0 1rem;
  padding: .42rem .72rem;
  text-transform: uppercase;
}
h1, h2, h3, h4 { font-family: var(--gh-font-heading); letter-spacing: -.035em; }
.hero-section h1,
.article-hero h1,
.not-found-section h1 {
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 1.02;
  margin: 0;
  max-width: 62rem;
}
.hero-copy {
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  line-height: 1.6;
  margin: 1.5rem 0 0;
  max-width: 48rem;
}

.article-listing { padding-block: clamp(3rem, 6vw, 5rem); }
.topic-filter { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.topic-pill {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--primary-dark);
  display: inline-flex;
  font-size: .84rem;
  font-weight: 650;
  line-height: 1;
  padding: .66rem .9rem;
  text-decoration: none;
}
.topic-pill:hover { background: var(--soft); }
.topic-pill.is-active { background: #eff6ff; border-color: #3b82f6; color: #1d4ed8; }
.post-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post-card { height: 100%; min-width: 0; }
.post-card-link {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}
.post-card-link:hover {
  border-color: var(--line-strong);
  box-shadow: 0 1rem 2.5rem rgba(42, 111, 121, .08);
  transform: translateY(-.18rem);
}
.post-card-link:focus-visible { outline: 2px solid #3b82f6; outline-offset: 3px; }
.post-card-image { aspect-ratio: 16 / 9; background: var(--soft); margin: 0; overflow: hidden; }
.post-card-image img { height: 100%; object-fit: cover; transition: transform 220ms ease; width: 100%; }
.post-card-link:hover .post-card-image img { transform: scale(1.02); }
.post-card-image-placeholder { background: linear-gradient(135deg, var(--soft), var(--soft-alt)); }
.post-card-body { display: flex; flex: 1; flex-direction: column; padding: 1.5rem; }
.post-card h2 { color: var(--primary-dark); font-size: clamp(1.3rem, 2vw, 1.65rem); line-height: 1.18; margin: 0; }
.post-card-body > p { color: var(--muted); font-size: .95rem; line-height: 1.65; margin: .85rem 0 0; }
.post-card-meta { align-items: center; color: rgba(0, 0, 0, .55); display: flex; flex-wrap: wrap; font-size: .78rem; gap: .45rem .85rem; margin-top: auto; padding-top: 1.35rem; }
.post-card-action { color: var(--primary-dark); font-size: .9rem; font-weight: 700; margin-top: 1rem; }

.pagination { align-items: center; display: flex; gap: 1rem; justify-content: center; margin-top: 2.5rem; }
.pagination a { background: #fff; border: 1px solid var(--line-strong); border-radius: .8rem; color: var(--primary-dark); font-weight: 700; padding: .75rem 1rem; text-decoration: none; }
.pagination .page-number { color: var(--muted); font-size: .85rem; }
.empty-state { background: var(--soft); border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1.5rem, 4vw, 3rem); }
.empty-state h2 { font-size: clamp(1.75rem, 4vw, 2.7rem); margin: 0; }
.empty-state p { color: var(--muted); line-height: 1.65; max-width: 42rem; }

.article-hero { padding-block: clamp(2.75rem, 6vw, 5rem); }
.article-heading-wrap { max-width: 72rem; }
.article-hero h1 { max-width: 66rem; }
.breadcrumbs { color: rgba(0, 0, 0, .58); display: flex; flex-wrap: wrap; font-size: .86rem; gap: .45rem; margin-bottom: 1.7rem; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs span[aria-current="page"] { max-width: 30rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article-meta { color: rgba(0, 0, 0, .58); display: flex; flex-wrap: wrap; font-size: .88rem; gap: .55rem 1.15rem; margin-top: 1.7rem; }
.article-meta > span:first-child { color: rgba(0, 0, 0, .75); font-weight: 700; }
.article-body-wrap { padding-block: clamp(2.75rem, 6vw, 5rem); }
.article-column { margin-inline: auto; max-width: 64rem; }
.article-image { background: var(--soft); border-radius: 1rem; margin: 0 0 2.75rem; overflow: hidden; }
.article-image img { aspect-ratio: 16 / 9; height: auto; object-fit: cover; width: 100%; }
.article-image figcaption { color: var(--muted); font-size: .84rem; padding: .75rem 1rem; }

.article-content { color: #263438; font-size: clamp(1.05rem, 1.5vw, 1.15rem); line-height: 1.78; }
.article-content > * { margin-left: auto; margin-right: auto; }
.article-content h2,
.article-content h3,
.article-content h4 { color: var(--ink); line-height: 1.2; margin-bottom: .8rem; margin-top: 2.75rem; }
.article-content h2 { font-size: clamp(1.85rem, 4vw, 2.65rem); }
.article-content h3 { font-size: clamp(1.4rem, 3vw, 1.85rem); }
.article-content h4 { font-size: 1.25rem; }
.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote { margin-bottom: 1.45rem; margin-top: 0; }
.article-content a { color: #1d4ed8; text-decoration: none; }
.article-content a:hover { color: #1e40af; text-decoration: underline; }
.article-content blockquote { border-left: .25rem solid var(--primary); color: var(--muted); margin-left: 0; padding-left: 1.25rem; }
.article-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.75rem 0; }
.article-content figure { margin: 2.2rem 0; }
.article-content figcaption { color: var(--muted); font-size: .85rem; margin-top: .6rem; text-align: center; }
.article-content img { border-radius: 1rem; height: auto; }
.article-content .kg-width-wide { margin-left: 50%; max-width: min(82rem, calc(100vw - 3rem)); transform: translateX(-50%); width: 82rem; }
.article-content .kg-width-full { margin-left: 50%; max-width: 100vw; transform: translateX(-50%); width: 100vw; }
.article-content .kg-gallery-container { display: flex; flex-direction: column; gap: .75rem; }
.article-content .kg-gallery-row { display: flex; gap: .75rem; }
.article-content .kg-gallery-image { flex: 1; }
.article-content .kg-gallery-image img { height: 100%; object-fit: cover; width: 100%; }
.article-content .kg-bookmark-card a { border: 1px solid var(--line); border-radius: 1rem; color: inherit; display: flex; overflow: hidden; text-decoration: none; }
.article-content .kg-bookmark-content { flex: 1; padding: 1.25rem; }
.article-content .kg-bookmark-title { color: var(--ink); font-weight: 800; }
.article-content .kg-bookmark-description { color: var(--muted); font-size: .9rem; margin-top: .4rem; }
.article-content .kg-bookmark-metadata { align-items: center; display: flex; font-size: .78rem; gap: .5rem; margin-top: 1rem; }
.article-content .kg-bookmark-icon { height: 1rem; width: 1rem; }
.article-content .kg-bookmark-thumbnail { flex: 0 0 34%; }
.article-content .kg-bookmark-thumbnail img { border-radius: 0; height: 100%; object-fit: cover; width: 100%; }
.article-content .kg-button-card a { background: var(--yellow); border-radius: .9rem; color: var(--ink); display: inline-flex; font-weight: 800; padding: .95rem 1.25rem; }
.article-content .kg-callout-card { background: var(--soft); border-radius: 1rem; padding: 1.25rem; }
.article-content table { border-collapse: collapse; display: block; max-width: 100%; overflow-x: auto; }
.article-content th,
.article-content td { border-bottom: 1px solid var(--line); padding: .75rem .9rem; text-align: left; }
.article-topics { border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 1.5rem; }
.article-topics > p { color: var(--muted); font-size: .85rem; font-weight: 700; margin: 0 0 .8rem; }
.article-topics > div { display: flex; flex-wrap: wrap; gap: .6rem; }
.back-link { display: inline-flex; font-weight: 650; margin-top: 2.5rem; min-height: 2.75rem; text-decoration: none; }

.article-cta { background: var(--soft); border-block: 1px solid var(--line); padding-block: clamp(3rem, 6vw, 5rem); }
.partner-cta { background: #f3f5f7; }
.cta-grid { display: grid; gap: 2rem 4rem; grid-template-columns: minmax(0, 1fr) minmax(18rem, .8fr); }
.section-kicker { color: var(--primary); font-size: .76rem; font-weight: 750; letter-spacing: .16em; margin: 0 0 .8rem; text-transform: uppercase; }
.cta-grid h2,
.newsletter-grid h2 { font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.05; margin: 0; max-width: 44rem; }
.cta-grid > div:last-child > p { color: var(--muted); font-size: 1.05rem; line-height: 1.65; margin: 0 0 .8rem; }
.cta-grid small { color: var(--muted); display: block; margin-top: .7rem; }

.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 1rem;
  display: inline-flex;
  font-weight: 750;
  justify-content: center;
  min-height: 2.8rem;
  padding: .75rem 1.1rem;
  text-decoration: none;
}
.button-primary { background: var(--yellow); color: #101820; }
.button-primary:hover { background: #f6f526; }
.button-secondary { background: #fff; border-color: var(--line-strong); color: var(--primary-dark); }
.button-secondary:hover { background: var(--soft); }

.newsletter-band { background: var(--footer); }
.newsletter-grid { align-items: center; display: grid; gap: 2rem 4rem; grid-template-columns: minmax(0, 1fr) auto; padding-block: clamp(2.5rem, 5vw, 4rem); }
.newsletter-grid h2 { font-size: clamp(1.8rem, 3vw, 2.7rem); }
.newsletter-grid > div:first-child > p:last-child { color: var(--muted); line-height: 1.6; margin: .8rem 0 0; }
.newsletter-actions { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: flex-end; }
.site-footer { background: var(--footer); border-top: 1px solid var(--line); }
.footer-primary { align-items: flex-start; display: flex; gap: 2rem; justify-content: space-between; padding-block: 2rem; }
.footer-brand img { height: 5rem; object-fit: contain; object-position: left center; width: auto; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.footer-nav a,
.footer-meta a { border-radius: .75rem; color: rgba(0, 0, 0, .72); font-size: .86rem; padding: .65rem .75rem; text-decoration: none; }
.footer-nav a:hover,
.footer-meta a:hover { background: rgba(255, 255, 255, .72); color: var(--primary-dark); }
.footer-meta { align-items: center; color: var(--muted); display: flex; font-size: .78rem; justify-content: space-between; padding-bottom: 1.5rem; }
.footer-meta p { margin: 0; }
.footer-meta nav { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.not-found-wrap { display: flex; }
.not-found-section { flex: 1; padding-block: clamp(5rem, 12vw, 10rem); width: 100%; }
.not-found-section .button { margin-top: 1.5rem; }

@media (min-width: 40rem) {
  .site-frame-padded { padding-inline: 1.5rem; }
}

@media (min-width: 64rem) {
  .site-frame-padded { padding-inline: 3rem; }
  .header-inner { padding-inline: 2rem; }
}

@media (max-width: 86rem) {
  .main-nav a:nth-child(2),
  .main-nav a:nth-child(3) { display: none; }
  .header-actions .audience-link { display: none; }
}

@media (max-width: 68rem) {
  .header-inner { grid-template-columns: auto 1fr; }
  .main-nav { display: none; }
  .header-actions { justify-self: end; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-grid { grid-template-columns: 1fr; }
}

@media (max-width: 44rem) {
  body::before { inset-inline: .5rem; }
  .header-inner { min-height: 4.5rem; }
  .brand img { height: 2.75rem; }
  .header-cta { display: none; }
  .account-button { font-size: .72rem; padding-inline: .7rem; }
  .hero-section h1,
  .article-hero h1,
  .not-found-section h1 { font-size: clamp(2.35rem, 12vw, 3.75rem); }
  .post-grid { grid-template-columns: 1fr; }
  .breadcrumbs span[aria-current="page"] { display: none; }
  .article-content .kg-bookmark-card a { flex-direction: column; }
  .article-content .kg-bookmark-thumbnail { flex-basis: auto; }
  .newsletter-grid { grid-template-columns: 1fr; }
  .newsletter-actions { justify-content: flex-start; }
  .footer-primary,
  .footer-meta { align-items: flex-start; flex-direction: column; }
  .footer-nav,
  .footer-meta nav { justify-content: flex-start; }
  .footer-brand img { height: 4rem; }
}
