:root {
  --ink: #111418;
  --muted: #5c6370;
  --line: #e3e6ec;
  --bg: #f5f6f9;
  --side: #151a22;
  --side-line: #242b38;
  --accent: #3b6cf6;
  --lime: #d5f36b;
  --coral: #ff8a65;
  --sky: #9fd8ff;
  --lilac: #cfc2ff;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); display: grid; grid-template-columns: 250px 1fr; }

/* Fixed sitewide menu */
aside { background: var(--side); color: #e7eaf2; height: 100vh; overflow-y: auto; padding: 22px 16px; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: -.4px; padding: 4px 8px 18px; color: #fff; text-decoration: none; display: block; }
.brand span { color: var(--lime); }
.search { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--side-line); border-radius: 10px; padding: 9px 12px; color: #8b93a7; font-size: 14px; margin-bottom: 14px; }
kbd { font: 11px ui-monospace, Menlo, monospace; background: #1d2331; border: 1px solid var(--side-line); border-radius: 5px; padding: 1px 6px; color: #8b93a7; }
.nav a { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; border-radius: 8px; color: #c8cedd; text-decoration: none; font-size: 14px; }
.nav a:hover, .nav a.on { background: #1d2331; color: #fff; }
.nav a .n { font: 11px ui-monospace, Menlo, monospace; color: #7d8599; }
.sec { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #7d8599; padding: 18px 10px 6px; }

/* Scrolling content */
main { height: 100vh; overflow-y: auto; scroll-behavior: smooth; }
.wrap { max-width: none; margin: 0 auto; padding: 40px 36px 60px; }
.wrap.narrow { max-width: none; }
.crumb { font-size: 13px; color: var(--muted); }
h1 { font-size: 40px; letter-spacing: -1.2px; margin: 10px 0; font-weight: 800; line-height: 1.12; }
.intro { font-size: 16px; color: var(--muted); max-width: 760px; line-height: 1.6; }
.h2 { font-size: 22px; letter-spacing: -.5px; margin: 34px 0 6px; }
.sub { color: var(--muted); font-size: 14px; margin-bottom: 16px; line-height: 1.55; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 10px; }
.pill { border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 8px 14px; border-radius: 999px; font-size: 13px; cursor: pointer; }
.pill.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 30px; }
.row.three { grid-template-columns: repeat(3, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.card:hover { box-shadow: 0 10px 24px rgba(17,20,24,.08); }
.img { height: 140px; position: relative; }
.img .tag { position: absolute; left: 12px; bottom: 12px; background: #fff; border-radius: 6px; font-size: 11px; font-weight: 700; padding: 3px 8px; }
.card .body { padding: 14px 16px 16px; }
.card b { font-size: 15px; display: block; margin-bottom: 4px; }
.card p { font-size: 13px; color: var(--muted); line-height: 1.5; }
.g1 { background: linear-gradient(135deg, var(--accent), var(--sky)); }
.g2 { background: linear-gradient(135deg, var(--lime), #fff); }
.g3 { background: linear-gradient(135deg, var(--coral), #ffe0d4); }
.g4 { background: linear-gradient(135deg, var(--lilac), #fff); }
.g5 { background: linear-gradient(135deg, #2c3446, #6a7896); }
.g6 { background: linear-gradient(135deg, #bff3e0, #7fd1b0); }
.hidden { display: none !important; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; padding-top: 40px; align-items: center; }
.eyebrow { font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.hero h1 { font-size: clamp(38px, 4.8vw, 60px); line-height: 1.02; letter-spacing: -1.6px; margin: 14px 0 18px; }
.lede { font-size: 17px; color: var(--muted); max-width: 520px; line-height: 1.55; }
.ctas { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.btn-dark { background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 12px 20px; font-size: 14px; cursor: pointer; font-weight: 600; text-decoration: none; }
.btn-light { background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 12px 20px; font-size: 14px; cursor: pointer; font-weight: 600; text-decoration: none; }
.hart { border-radius: 18px; min-height: 160px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; color: var(--ink); }
.hart small { font-size: 12px; opacity: .7; }
.hart b { font-size: 17px; }
.hero-art { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 36px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.stat .num { font-size: 28px; font-weight: 800; letter-spacing: -.5px; }
.stat .lbl { margin-top: 6px; font-size: 13px; color: var(--muted); }

/* Article */
.meta { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--muted); margin: 14px 0 10px; flex-wrap: wrap; }
.meta .tag { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--ink); font-weight: 600; }
.dek { font-size: 19px; color: var(--muted); line-height: 1.55; margin-top: 14px; }
.byline { display: flex; align-items: center; gap: 12px; margin: 22px 0 28px; padding-bottom: 22px; border-bottom: 1px solid var(--line); font-size: 14px; }
.byline .av { width: 40px; height: 40px; border-radius: 50%; background: var(--lilac); display: grid; place-items: center; font-weight: 800; }
.byline small { display: block; color: var(--muted); }
.hero-img { height: 260px; border-radius: 16px; background: linear-gradient(135deg, var(--accent), var(--sky)); margin-bottom: 30px; position: relative; overflow: hidden; }
.hero-img span { position: absolute; left: 16px; bottom: 14px; background: #fff; border-radius: 6px; font-size: 12px; font-weight: 700; padding: 4px 9px; }
article p { font-size: 17px; line-height: 1.75; color: #222831; margin-bottom: 20px; }
article h2 { font-size: 26px; letter-spacing: -.5px; margin: 38px 0 14px; line-height: 1.2; }
article h3 { font-size: 19px; margin: 26px 0 10px; }
article ul { margin: 0 0 22px 22px; }
article li { font-size: 17px; line-height: 1.7; color: #222831; margin-bottom: 8px; }
article blockquote { border-left: 3px solid var(--coral); padding: 6px 0 6px 18px; margin: 28px 0; font-size: 20px; line-height: 1.5; font-style: italic; }
.figure { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 28px 0; }
.figure .img { height: 180px; }
.figure .cap { padding: 10px 14px; font-size: 13px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; margin: 22px 0 30px; font-size: 15px; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); background: #fafbfd; }
tr:last-child td { border-bottom: 0; }
.tip { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--lime); border-radius: 12px; padding: 16px 18px; margin: 26px 0; font-size: 15px; line-height: 1.6; }
.tip b { display: block; margin-bottom: 4px; }
.related { margin-top: 48px; border-top: 1px solid var(--line); padding-top: 28px; }
.rel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.rel .img { height: 100px; }
.end { margin-top: 36px; background: var(--ink); color: #fff; border-radius: 16px; padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.end p { color: #c8cedd; font-size: 14px; }
.end button { background: var(--lime); color: var(--ink); border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 700; font-size: 14px; cursor: pointer; }
footer { padding: 24px 0 0; color: var(--muted); font-size: 13px; }

@media (max-width: 1000px) {
  body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  aside { height: auto; padding: 12px 14px; }
  .nav, .search, .sec { display: none; }
  main { height: auto; overflow: visible; }
  html, body { overflow: auto; height: auto; }
  .row, .row.three, .rel { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { display: none; }
}
@media (max-width: 620px) {
  .row, .row.three, .rel { grid-template-columns: 1fr; }
  h1 { font-size: 30px; }
  .wrap { padding: 28px 20px 40px; }
}

/* Article body (Markdown output) */
.prose p { font-size: 17px; line-height: 1.75; color: #222831; margin-bottom: 20px; }
.prose h2 { font-size: 26px; letter-spacing: -.5px; margin: 38px 0 14px; line-height: 1.2; }
.prose h3 { font-size: 19px; margin: 26px 0 10px; }
.prose ul { margin: 0 0 22px 22px; }
.prose li { font-size: 17px; line-height: 1.7; color: #222831; margin-bottom: 8px; }
.prose blockquote { border-left: 3px solid var(--coral); padding: 6px 0 6px 18px; margin: 28px 0; font-size: 20px; line-height: 1.5; font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; margin: 22px 0 30px; font-size: 15px; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.prose th { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); background: #fafbfd; }
.prose .figure { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 28px 0; }
.prose .figure .img { height: 180px; }
.prose .figure .cap { padding: 10px 14px; font-size: 13px; color: var(--muted); }
.prose .tip { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--lime); border-radius: 12px; padding: 16px 18px; margin: 26px 0; font-size: 15px; line-height: 1.6; }
.prose .tip b { display: block; margin-bottom: 4px; }

/* Tool detail facts */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 22px 0; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: 12px; max-width: 760px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
