:root {
  color-scheme: light;
  --paper: #fbfbfd;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d9d9df;
  --panel: #ffffff;
  --code: #1d1d1f;
  --code-ink: #f5f5f7;
  --green: #2f6b54;
  --blue: #386b95;
  --rust: #8e4f36;
  --gold: #a57921;
  --shadow: none;
  --serif: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: #fbfbfd;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
}

a {
  color: inherit;
  text-decoration-color: rgba(57, 122, 93, 0.38);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--green);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(251, 251, 253, 0.82);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(1120px, calc(100% - 40px));
  min-height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-family: var(--sans);
  font-weight: 760;
  font-size: 1.05rem;
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.nav-links a,
.pill {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 12px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}

.nav-links a:hover,
.pill:hover {
  border-color: transparent;
  color: var(--ink);
}

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.home-hero {
  max-width: 850px;
  padding: clamp(42px, 7vw, 76px) 0 clamp(30px, 5vw, 48px);
  border-bottom: 1px solid var(--line);
}

.home-page {
  padding-bottom: 84px;
}

.home-page h1 {
  font-size: clamp(3rem, 5.2vw, 4.6rem);
}

.home-page .lede {
  max-width: 640px;
  font-size: clamp(1.18rem, 2vw, 1.55rem);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--rust);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  line-height: 1.04;
  margin: 0;
  font-weight: 760;
}

h1 {
  max-width: 780px;
  font-size: clamp(3.15rem, 5.7vw, 5.1rem);
}

.article-title {
  color: #1d1d1f;
  font-size: clamp(2.65rem, 6.6vw, 4.95rem);
  line-height: 0.98;
}

h2 {
  margin-top: 64px;
  font-size: clamp(2rem, 4vw, 3.1rem);
}

h3 {
  margin-top: 28px;
  font-size: 1.35rem;
}

.article h2 {
  margin-top: 46px;
  color: #1d1d1f;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.lede {
  max-width: 690px;
  margin: 26px 0 0;
  color: #424245;
  font-family: var(--sans);
  font-size: clamp(1.08rem, 1.8vw, 1.32rem);
  line-height: 1.42;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.hero-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-card img,
.figure img {
  display: block;
  width: 100%;
  height: auto;
}

.caption {
  margin: 0;
  padding: 12px 0 0;
  color: #86868b;
  font-size: 0.82rem;
  line-height: 1.4;
}

.available-posts {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(26px, 6vw, 76px);
  padding-top: clamp(26px, 5vw, 42px);
}

.section-heading {
  position: sticky;
  top: 88px;
  align-self: start;
}

.section-heading h2 {
  margin-top: 0;
  font-size: clamp(2.1rem, 5vw, 3.8rem);
}

.post-list {
  display: grid;
  gap: 16px;
}

.post-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(164px, 0.34fr) minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(38, 34, 27, 0.06);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: rgba(57, 122, 93, 0.45);
  box-shadow: var(--shadow);
}

.post-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 254px;
  object-fit: cover;
  border-right: 1px solid var(--line);
}

.post-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(22px, 4vw, 34px);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--rust);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

.post-card h3 {
  margin-top: 34px;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.post-card p {
  max-width: 590px;
  margin: 16px 0 24px;
  color: var(--muted);
}

.read-link {
  margin-top: auto;
  border-bottom: 2px solid rgba(57, 122, 93, 0.35);
  color: #285b45;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.4;
}

.topic-strip {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: clamp(22px, 5vw, 56px);
  margin-top: 42px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.topic-strip h2 {
  max-width: 520px;
  margin-top: 0;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.topic-strip p {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.topic-tags {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
}

.topic-tags span {
  border: 1px solid rgba(216, 208, 192, 0.92);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 253, 247, 0.56);
  color: #5f5a52;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.35;
}

.article-shell {
  width: min(900px, calc(100% - 44px));
  margin: 0 auto;
  display: block;
  padding: clamp(42px, 6vw, 70px) 0 92px;
}

.article {
  min-width: 0;
  max-width: 700px;
  margin: 0 auto;
}

.article-header {
  padding-bottom: 22px;
  border-bottom: 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 32px 0 4px;
  border-top: 1px solid var(--line);
}

.highlights-heading {
  border-bottom: 1px solid var(--line);
  padding: 14px 0 12px;
}

.highlights-heading .eyebrow {
  margin: 0;
  color: #6e6e73;
  letter-spacing: 0.08em;
}

.summary-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 15px 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.summary-card:hover,
.summary-card:focus-visible {
  background: #f2f2f7;
}

.summary-card:focus-visible {
  outline: 3px solid rgba(57, 122, 93, 0.24);
  outline-offset: 3px;
}

.summary-card b {
  display: block;
  margin-bottom: 0;
  color: #1d1d1f;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 760;
}

.summary-card p {
  margin: 0;
  color: #424245;
  font-size: 0.95rem;
  line-height: 1.48;
}

.article p,
.article li {
  color: #424245;
}

.article p {
  margin: 16px 0 0;
}

.article section[id] {
  scroll-margin-top: 88px;
}

.article ul {
  padding-left: 22px;
}

.callout {
  margin: 30px 0;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 18px 20px;
  background: transparent;
}

.callout p {
  margin: 0;
}

.availability {
  display: inline-flex;
  align-items: center;
  margin: 16px 10px 18px 0;
  vertical-align: middle;
}

.availability-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  border: 1px solid rgba(57, 122, 93, 0.24);
  border-left: 3px solid var(--green);
  padding: 2px 8px 2px 7px;
  background: rgba(255, 253, 247, 0.7);
  color: #285b45;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: uppercase;
}

.availability-badge.os-gated {
  border-color: rgba(157, 87, 57, 0.22);
  border-left-color: var(--rust);
  color: #7b432d;
}

.availability-badge.compiler {
  border-color: rgba(67, 107, 146, 0.22);
  border-left-color: var(--blue);
  color: #315372;
}

.availability-badge.package {
  border-color: rgba(184, 137, 43, 0.24);
  border-left-color: var(--gold);
  color: #795b1d;
}

.compat {
  display: inline-block;
  margin: 16px 0 18px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  vertical-align: middle;
}

.compat summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 2px 0;
  color: #746d62;
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.35;
  text-decoration: underline;
  text-decoration-color: rgba(116, 109, 98, 0.28);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.compat summary::-webkit-details-marker {
  display: none;
}

.compat summary::before {
  content: "";
  flex: 0 0 auto;
  width: 0.42rem;
  height: 0.42rem;
  border-right: 1.8px solid rgba(116, 109, 98, 0.7);
  border-bottom: 1.8px solid rgba(116, 109, 98, 0.7);
  transform: rotate(-45deg);
  transition: transform 160ms ease;
}

.compat summary:hover {
  color: var(--green);
  text-decoration-color: rgba(57, 122, 93, 0.42);
}

.compat[open] {
  display: block;
  margin: 8px 0 24px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.compat[open] summary {
  display: flex;
  padding: 12px 14px;
  color: var(--green);
  text-decoration: none;
}

.compat[open] summary::before {
  transform: rotate(45deg) translateY(-2px);
}

.compat-body {
  padding: 0 14px 14px;
  color: #36332f;
  font-size: 0.95rem;
}

.compat-body p:first-child {
  margin-top: 0;
}

.compat-body pre {
  margin-bottom: 0;
}

pre {
  max-width: 100%;
  position: relative;
  overflow: auto;
  margin: 24px 0;
  border: 0;
  border-radius: 8px;
  padding: 18px;
  background: var(--code);
  color: var(--code-ink);
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.55;
  box-shadow: none;
}

pre[data-lang]::before {
  display: none;
}

pre code {
  display: block;
  min-width: max-content;
  color: inherit;
  font-size: 1em;
}

.tok-keyword,
.tok-attribute {
  color: #f3b45d;
}

.tok-type {
  color: #8cc8ff;
}

.tok-string {
  color: #9bd287;
}

.tok-number {
  color: #d0a3ff;
}

.tok-comment {
  color: #8d9489;
  font-style: italic;
}

.tok-keypath,
.tok-member {
  color: #79cdb8;
}

code {
  font-family: var(--mono);
  font-size: 0.94em;
}

:not(pre) > code {
  border: 1px solid #d9d9df;
  border-radius: 5px;
  padding: 0.08em 0.3em;
  background: #f2f2f7;
  overflow-wrap: anywhere;
}

.figure {
  margin: 28px 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
}

.checklist {
  display: grid;
  gap: 0;
  margin-top: 18px;
}

.check {
  min-width: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 15px 0;
  background: transparent;
}

.check b {
  display: block;
}

.sources,
.next-nav {
  margin-top: 58px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.sources h2 {
  margin-top: 0;
  font-size: 1.55rem;
}

.sources ul {
  padding-left: 18px;
}

.next-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.next-nav a {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 14px;
  background: transparent;
  font-weight: 700;
  text-decoration: none;
}

footer {
  border-top: 1px solid var(--line);
  padding: 26px 0 34px;
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 860px) {
  .available-posts,
  .topic-strip,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: auto;
    padding-top: 46px;
  }

  .section-heading {
    position: static;
  }

  .article-shell {
    padding-top: 44px;
  }

  .summary-card {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

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

  .wrap,
  .nav,
  .article-shell {
    width: min(100% - 24px, 1120px);
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  h1,
  .article-title {
    font-size: clamp(2.35rem, 13.5vw, 3.45rem);
  }

  .home-page h1 {
    font-size: clamp(2.7rem, 12vw, 3.1rem);
  }

  .home-hero {
    gap: 18px;
    padding: 28px 0 20px;
  }

  .home-hero .lede {
    margin-top: 18px;
    font-size: 1.06rem;
  }

  .home-hero .meta-row {
    margin-top: 18px;
  }

  pre {
    margin: 20px -2px;
    padding: 14px 12px;
    font-size: 0.76rem;
    line-height: 1.5;
  }

  :not(pre) > code {
    font-size: 0.88em;
  }

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

  .post-card img {
    height: 124px;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .post-card h3 {
    margin-top: 22px;
  }

  .next-nav {
    flex-direction: column;
  }
}
