:root {
  --ink: #14181f;
  --muted: #5b6673;
  --line: #e3e7ec;
  --accent: #0f6b5c;
  --accent-soft: #eaf5f2;
  --bg: #ffffff;
  --bg-soft: #f7f9fa;
  --max: 44rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.7 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: #0a4b40; }

.skip {
  position: absolute; left: -9999px;
}
.skip:focus {
  left: 1rem; top: 1rem; background: #fff; padding: .5rem .75rem; border: 1px solid var(--line);
  z-index: 10; border-radius: 6px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.15rem; }

/* header */
.site-head {
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.92);
  position: sticky; top: 0; z-index: 5;
  backdrop-filter: saturate(1.2) blur(6px);
}
.head-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 700; letter-spacing: -.01em; color: var(--ink); text-decoration: none;
}
.brand-mark {
  display: grid; place-items: center;
  width: 1.85rem; height: 1.85rem; border-radius: 6px;
  background: var(--accent); color: #fff; font-size: .8rem; font-weight: 800; letter-spacing: .02em;
}
.site-nav { display: flex; gap: 1.15rem; font-size: .95rem; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { font-weight: 600; }

/* content */
main { padding: 2.4rem 0 3.5rem; }

h1 { font-size: clamp(1.7rem, 1.2rem + 1.9vw, 2.35rem); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .6rem; }
h2 { font-size: 1.35rem; line-height: 1.3; letter-spacing: -.01em; margin: 2.3rem 0 .6rem; }
h3 { font-size: 1.09rem; margin: 1.7rem 0 .45rem; }
p, ul, ol { margin: 0 0 1.05rem; }
li { margin-bottom: .35rem; }

.meta { color: var(--muted); font-size: .875rem; margin: 0 0 1.6rem; }
.lede { font-size: 1.14rem; color: #2b3440; }

/* breadcrumbs */
.crumbs {
  display: flex; flex-wrap: wrap; gap: .38rem; align-items: baseline;
  font-size: .84rem; margin-bottom: 1.1rem;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs span { color: #aab2bc; }
.crumbs .crumb-here { color: var(--ink); }

blockquote {
  margin: 1.5rem 0; padding: .1rem 0 .1rem 1.1rem;
  border-left: 3px solid var(--accent); color: #2b3440;
}

/* figures: the illustrations are local SVGs, so they scale with the column and
   never depend on an external host. */
figure { margin: 1.9rem 0; }
figure img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft);
}
figcaption { color: var(--muted); font-size: .86rem; line-height: 1.55; margin-top: .6rem; }

.toc {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px;
  padding: 1rem 1.2rem; margin: 1.6rem 0;
}
.toc .toc-title { margin: 0 0 .5rem; font-weight: 700; font-size: .98rem; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc li { margin-bottom: .3rem; font-size: .96rem; }

table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: .96rem; }
th, td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-soft); font-weight: 600; }
.table-wrap { overflow-x: auto; }

.callout {
  background: var(--accent-soft); border: 1px solid #cfe7e1;
  border-radius: 10px; padding: 1rem 1.1rem; margin: 1.5rem 0;
}
.callout h4, .callout .callout-title { margin: 0 0 .35rem; font-size: .98rem; font-weight: 700; }
.callout p:last-child { margin-bottom: 0; }
.callout.warn { background: #fdf5ec; border-color: #f2ddc2; }

/* lists of posts */
.post-list { list-style: none; padding: 0; margin: 1.6rem 0 0; }
.post-list li { padding: 1rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.post-list a { font-size: 1.06rem; font-weight: 600; text-decoration: none; display: block; }
.post-list a:hover { text-decoration: underline; }
.post-desc { display: block; color: var(--muted); font-size: .93rem; margin-top: .25rem; }

.related { margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.related h2 { font-size: 1.05rem; margin: 0 0 .6rem; }
.related ul { list-style: none; padding: 0; margin: 0; }
.related li { margin: 0 0 .45rem; }

/* footer */
.site-foot { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 2rem 0; }
.site-foot .disclaimer { color: var(--muted); font-size: .84rem; line-height: 1.6; }
.site-foot .copy { color: var(--muted); font-size: .84rem; margin: .8rem 0 0; }

@media (max-width: 34rem) {
  .site-nav { gap: .8rem; font-size: .9rem; }
  .head-inner { min-height: 3.4rem; }
}
