:root {
  color-scheme: light;
  --paper: #f8f5ed;
  --canvas: #fffdf7;
  --text: #232725;
  --muted: #505b54;
  --border: #d5d9cb;
  --accent: #225b45;
  --accent-light: #e6eee3;
  --night: #142821;
  --mint: #c2e5a9;
  --display: "Source Serif 4", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-family: "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { color: var(--text); background: var(--paper); margin: 0; line-height: 1.65; }
a { color: var(--accent); text-underline-offset: .2em; }
a:focus-visible, button:focus-visible, input:focus-visible, pre:focus-visible {
  outline: 2px solid #21835a;
  outline-offset: 4px;
}
.wrap { width: min(100% - 3rem, 72rem); margin-inline: auto; }
.visually-hidden, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  padding: 0; clip-path: inset(50%); white-space: nowrap;
}
.skip:focus {
  position: fixed; top: 1rem; left: 1rem; z-index: 3;
  background: var(--canvas); padding: .7rem 1rem;
}
.site-header { border-bottom: 1px solid var(--border); }
.header-row, .site-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header-row { min-height: 4.75rem; }
.brand { display: inline-flex; gap: .65rem; align-items: center; text-decoration: none; color: var(--text); font-weight: 760; white-space: nowrap; }
.brand img { display: block; }
.header-row nav { display: flex; flex-wrap: wrap; justify-content: end; gap: clamp(.7rem, 3vw, 2rem); }
.header-row nav a { color: var(--muted); font-size: .9rem; font-weight: 550; text-decoration: none; }
.header-row nav a:hover, .header-row nav a[aria-current] { color: var(--accent); text-decoration: underline; }
.hero { padding-block: clamp(3rem, 8vw, 7rem) clamp(3rem, 8vw, 5.4rem); display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.byline, .eyebrow { text-transform: uppercase; letter-spacing: .13em; font-size: .73rem; color: var(--accent); font-family: var(--mono); font-weight: 700; }
.byline { margin: 0 0 1rem; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; font-weight: 500; letter-spacing: -.035em; margin: 0; }
.hero h1 { font-size: clamp(3.15rem, 6.1vw, 5.05rem); line-height: 1.01; letter-spacing: -.056em; }
.hero h1 em { color: var(--accent); font-weight: inherit; }
.hero-copy > p:not(.byline) { color: var(--muted); max-width: 34rem; font-size: clamp(1rem, 2vw, 1.18rem); margin: 1.5rem 0; }
.button { display: inline-flex; align-items: center; gap: .6rem; background: var(--accent); color: white; font-weight: 650; padding: .69rem 1rem; border-radius: .32rem; text-decoration: none; font-size: .93rem; }
.button:hover { background: var(--night); }
.featured {
  border-radius: .55rem; padding: clamp(1.35rem, 3.2vw, 2.2rem); color: #f4f8ed; text-decoration: none;
  background: radial-gradient(circle, #6da58356 1px, transparent 1px) right top / 17px 17px, var(--night);
  box-shadow: 0 14px 28px -19px #1a3f2f9e; position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 1.1rem;
}
.featured:hover, .featured:focus-visible { background-color: #1b372b; }
.featured-label { font: 600 .72rem/1.4 var(--mono); letter-spacing: .075em; text-transform: uppercase; display: flex; align-items: center; gap: .6rem; }
.featured-label > span { width: .56rem; height: .56rem; border-radius: 50%; background: var(--mint); }
.featured-code { display: grid; gap: .25rem; padding: .9rem .95rem; width: fit-content; color: #e4eee5; background: #113126; border: 1px solid #568270; border-radius: .25rem; font: .81rem/1.65 var(--mono); }
.featured-code b { color: var(--mint); font-weight: 600; }
.featured-code i { color: #a3bbae; font-style: normal; }
.featured h2 { font-size: clamp(1.75rem, 3.3vw, 3.1rem); max-width: 19ch; }
.featured-action { color: var(--mint); font-size: .9rem; font-weight: 650; }
.archive { padding-top: 1.4rem; border-top: 2px solid var(--text); scroll-margin-top: 1rem; }
.archive-header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.archive-header h2, .page-header h1 { font-size: clamp(2.45rem, 5vw, 5rem); }
.archive-header h2 { font-size: clamp(2.15rem, 4vw, 3.5rem); }
.archive-header p { color: var(--muted); font-size: .82rem; margin: .35rem 0 0; font-family: var(--mono); }
.search { position: relative; display: flex; align-items: center; width: min(100%, 16.75rem); }
.search-icon { position: absolute; margin-left: .88rem; width: .76rem; height: .76rem; border: 1.5px solid var(--muted); border-radius: 50%; pointer-events: none; }
.search-icon::after { content: ''; position: absolute; width: .37rem; height: 1.5px; transform: rotate(45deg); transform-origin: left center; background: var(--muted); left: .54rem; top: .51rem; }
.search input { width: 100%; border: 1px solid var(--border); border-radius: .32rem; padding: .65rem .8rem .65rem 2.22rem; background: var(--canvas); color: var(--text); font: inherit; font-size: .9rem; }
.topic-list { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.36rem 0 1.45rem; }
.topic-list a { border: 1px solid var(--border); padding: .32rem .75rem; border-radius: 99px; font-size: .81rem; text-decoration: none; color: var(--muted); font-weight: 600; }
.topic-list a:hover { background: var(--accent-light); color: var(--accent); }
.topic-list a[aria-current] { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.post-card { display: flex; flex-direction: column; min-height: 14rem; padding: 1.25rem; background: var(--canvas); border: 1px solid var(--border); border-radius: .45rem; scroll-margin-top: 1rem; }
.post-card:target { border-color: var(--accent); }
.card-meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; justify-content: space-between; font: .73rem/1.35 var(--mono); color: var(--muted); margin-bottom: .8rem; }
.card-meta a { color: var(--accent); text-decoration: none; font-weight: 700; }
.card-meta a:hover { text-decoration: underline; }
.post-card h3 { font-size: clamp(1.32rem, 2.25vw, 1.76rem); }
.post-card h3 a { color: var(--text); text-decoration: none; }
.post-card h3 a:hover { color: var(--accent); text-decoration: underline; }
.post-card p { color: var(--muted); font-size: .91rem; margin: .75rem 0 1.05rem; }
.read-link { width: fit-content; margin-top: auto; font-size: .83rem; font-weight: 650; text-decoration: none; }
.read-link:hover { text-decoration: underline; }
.no-results { padding: 1rem; background: var(--canvas); border: 1px solid var(--border); border-radius: .3rem; }
.site-footer { margin-top: 4rem; padding: 1.3rem 0 2.7rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }
.site-footer a { white-space: nowrap; }
.dot { padding-inline: .15rem; }
.back-link { display: inline-block; margin-top: 2.05rem; text-decoration: none; font-size: .88rem; }
.back-link:hover { text-decoration: underline; }
.page-header, .article-header { padding-block: clamp(2rem, 6vw, 4.6rem) 2.25rem; }
.page-header p, .article-header .eyebrow { margin-bottom: .8rem; }
.article-header { max-width: 58rem; }
.article-header h1 { font-size: clamp(2.45rem, 6.1vw, 5.25rem); }
.article-header > p { max-width: 45rem; margin: 1.15rem 0; font-size: clamp(1.03rem, 2.2vw, 1.29rem); color: var(--muted); }
.article-meta { display: flex; gap: .38rem; flex-wrap: wrap; color: var(--muted); font: .81rem/1.65 var(--mono); }
.article-layout { display: grid; grid-template-columns: minmax(0, 46rem) minmax(0, 1fr); gap: clamp(1.2rem, 6vw, 5rem); border-top: 1px solid var(--border); }
.article-body { min-width: 0; padding-top: .75rem; font-size: 1.065rem; }
.article-body p, .article-body li { max-width: 68ch; }
.article-body p { margin: 1rem 0; }
.article-body ul { padding-left: 1.35rem; }
.article-body li { margin-bottom: .6rem; }
.article-body h2 { scroll-margin-top: 1rem; font-size: clamp(1.7rem, 4vw, 2.25rem); margin: 2.25rem 0 1rem; }
.article-body h2:target { color: var(--accent); }
.toc nav { position: sticky; top: 1.4rem; margin-top: 1.8rem; border-left: 1px solid var(--border); padding-left: .95rem; display: grid; gap: .6rem; }
.toc p { margin: 0 0 .1rem; font: 700 .72rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.toc a { text-decoration: none; font-size: .85rem; }
.toc a:hover { text-decoration: underline; }
.snippet { color: #e8f2e9; background: var(--night); border-radius: .42rem; margin: 1.25rem 0 1.55rem; overflow: hidden; }
.snippet-bar { display: flex; justify-content: space-between; align-items: center; padding: .55rem 1.1rem; border-bottom: 1px solid #436653; color: var(--mint); font: .81rem/1.5 var(--mono); min-height: 2.3rem; }
.snippet button { padding: .16rem .42rem; background: transparent; color: inherit; border: 1px solid #60806a; border-radius: .25rem; cursor: pointer; font: inherit; }
.snippet button:hover { background: #2c4b3d; }
.snippet pre { padding: .95rem 1.1rem 1.15rem; overflow: auto; margin: 0; font: .87rem/1.65 var(--mono); }
.snippet pre:focus-visible { outline-offset: -3px; }
.references { margin-block: 2rem; }
.references a { overflow-wrap: anywhere; }
.more { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.more h2 { font-size: 1.9rem; }
.more > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: .85rem; }
.more a { display: grid; grid-template-columns: 1fr auto; gap: .35rem; align-items: center; padding: 1rem; background: var(--canvas); border: 1px solid var(--border); border-radius: .4rem; text-decoration: none; }
.more a:hover { text-decoration: underline; }
.more a span:first-child { grid-column: 1 / -1; color: var(--muted); font: .73rem/1.3 var(--mono); }
.about { max-width: 48rem; padding-bottom: 2rem; }
.about .page-header { padding-bottom: 1rem; }
.about .lead { color: var(--muted); font-size: 1.27rem; }
@media (max-width: 56rem) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 40rem) {
  .wrap { width: calc(100% - 2rem); }
  .header-row nav { gap: .6rem; }
  .header-row nav a { font-size: .83rem; }
  .header-row { min-height: 3.8rem; }
  .hero, .post-grid, .more > div { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: clamp(2.8rem, 9.5vw, 4rem); }
  .post-card { min-height: auto; }
  .search { width: 100%; }
  .site-footer { flex-wrap: wrap; gap: .6rem; }
}
