:root {
  color-scheme: light;
  --ink: #17211b;
  --muted: #526159;
  --paper: #fbfaf6;
  --surface: #ffffff;
  --accent: #075f4a;
  --accent-dark: #034638;
  --line: #cbd5ce;
  --focus: #c44308;
  --code: #101b17;
  --measure: 72rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 100%;
  line-height: 1.6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: var(--accent-dark); text-underline-offset: .2em; text-decoration-thickness: .1em; }
a:hover { text-decoration-thickness: .16em; }
:focus-visible { outline: .2rem solid var(--focus); outline-offset: .2rem; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed; top: .5rem; left: .5rem; z-index: 10; padding: .65rem 1rem;
  color: #fff; background: var(--ink); transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.site-header, main, .site-footer { width: min(100% - 2rem, var(--measure)); margin-inline: auto; }
.site-header { display: flex; align-items: baseline; justify-content: space-between; gap: 2rem; padding-block: 1.25rem; border-bottom: 1px solid var(--line); }
.site-header p { margin: 0; color: var(--muted); text-align: right; }
.brand { color: var(--ink); font-size: 1.65rem; font-weight: 850; letter-spacing: -.04em; text-decoration: none; }
.brand span, .eyebrow { color: var(--accent); }

.hero { max-width: 58rem; padding-block: clamp(3rem, 9vw, 7rem); }
.eyebrow { margin: 0 0 .65rem; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2 { line-height: 1.12; letter-spacing: -.035em; }
h1 { max-width: 14ch; margin: 0; font-size: clamp(2.6rem, 8vw, 6rem); }
h2 { margin-block: 0 1rem; font-size: clamp(1.6rem, 4vw, 2.35rem); }
.lede { max-width: 44rem; margin-block: 1.5rem 2rem; color: var(--muted); font-size: clamp(1.1rem, 2.4vw, 1.35rem); }

.search { max-width: 44rem; }
.search label { display: block; margin-bottom: .4rem; font-weight: 750; }
.search__controls { display: flex; gap: .65rem; }
input, button, .button-link { min-height: 2.75rem; border: 2px solid var(--ink); border-radius: .25rem; font: inherit; }
input { min-width: 0; flex: 1; padding: .55rem .75rem; color: var(--ink); background: var(--surface); }
button, .button-link { padding: .55rem 1rem; color: #fff; background: var(--accent); font-weight: 750; cursor: pointer; }
button:hover, .button-link:hover { background: var(--accent-dark); }
.button-link { display: inline-flex; align-items: center; text-decoration: none; }
.hint, .status { color: var(--muted); }
.hint { margin: .35rem 0 0; font-size: .9rem; }
.text-button { min-height: auto; padding: .3rem; border: 0; color: var(--accent-dark); background: transparent; text-decoration: underline; }

.content-section { padding-block: 2.5rem 4rem; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.section-heading p { color: var(--muted); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1rem; padding: 0; list-style: none; }
.post-card { display: flex; flex-direction: column; padding: 1.2rem; border: 1px solid var(--line); border-radius: .35rem; background: var(--surface); }
.post-card > a { display: flex; flex: 1; flex-direction: column; color: var(--ink); text-decoration: none; }
.post-card > a:hover .post-card__title { text-decoration: underline; text-decoration-thickness: .12em; }
.post-card__title { font-size: 1.2rem; font-weight: 800; line-height: 1.25; }
.post-card__description { margin-top: .55rem; color: var(--muted); }
.post-meta { margin-block: .85rem 0; color: var(--muted); font-size: .9rem; }
.empty-state { padding: 2rem; border: 1px dashed var(--line); background: var(--surface); }

.article-shell { max-width: 54rem; }
.breadcrumb { display: flex; gap: .5rem; padding-block: 1.5rem; color: var(--muted); }
.article-header { padding-block: clamp(2rem, 8vw, 5rem); border-bottom: 1px solid var(--line); }
.article-header h1 { max-width: 16ch; font-size: clamp(2.4rem, 7vw, 4.8rem); }
.article-content { max-width: 46rem; padding-block: 2rem; }
.article-content section { padding-block: 1.25rem; }
.article-content p, .takeaways li { font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif; font-size: 1.08rem; }
.code-example { margin: 1.5rem 0; }
.code-example figcaption { margin-bottom: .5rem; font-weight: 700; }
pre { max-width: 100%; overflow-x: auto; margin: 0; padding: 1rem; border-radius: .3rem; color: #f4faf6; background: var(--code); line-height: 1.5; tab-size: 2; }
.takeaways { margin-block: 1rem 4rem; padding: clamp(1.25rem, 4vw, 2rem); border-left: .35rem solid var(--accent); background: #eef5f1; }
.related { padding-block: 3rem 5rem; border-top: 1px solid var(--line); }
.message-page { min-height: 60vh; padding-block: 8rem; }

.site-footer { padding-block: 2rem 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.site-footer p { max-width: 52rem; }

@media (max-width: 38rem) {
  .site-header { align-items: flex-start; flex-direction: column; gap: .25rem; }
  .site-header p { text-align: left; }
  .search__controls { align-items: stretch; flex-direction: column; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media (forced-colors: active) {
  .post-card, .takeaways { border: 1px solid CanvasText; }
}

