/* Beautiful Rust — palette taken from the banner: dusk indigo, crab orange, sun gold, sea teal. */

:root {
  --bg: #fbf7f1;
  --bg-elev: #ffffff;
  --bg-sunk: #f4ede3;
  --ink: #1f1a33;
  --ink-2: #4b4462;
  --ink-3: #736c88;
  --line: #e9dfd1;
  --line-strong: #d8cab6;
  --accent: #b4471a;
  --accent-fill: #e8682a;
  --accent-ink: #ffffff;
  --accent-soft: #fde5d4;
  --sun: #f2a93b;
  --sea: #1f7279;
  --sea-soft: #d7ecec;
  --port: #5b3fae;
  --port-soft: #ebe5f8;
  --dusk: #2a2350;
  --dusk-ink: #fbefd9;
  --code-bg: #1d1938;
  --code-head: #262046;
  --code-ink: #ece3d1;
  --code-line: #322b58;
  --must: #c2381f;
  --should: #a8660f;
  --consider: #1f7279;
  --good: #3a7d44;
  --shadow-sm: 0 1px 2px rgb(31 26 51 / 0.06);
  --shadow: 0 1px 2px rgb(31 26 51 / 0.05), 0 12px 32px -16px rgb(31 26 51 / 0.22);
  --radius: 14px;
  --radius-lg: 20px;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-pixel: "Pixelify Sans", var(--font-sans);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121027;
    --bg-elev: #1b1835;
    --bg-sunk: #0e0c20;
    --ink: #f2eadb;
    --ink-2: #c4bbd6;
    --ink-3: #958daf;
    --line: #2a2549;
    --line-strong: #3b3466;
    --accent: #ff9257;
    --accent-fill: #ef7530;
    --accent-ink: #1a0f0a;
    --accent-soft: #3b2130;
    --sun: #f6bd5c;
    --sea: #6cc8cc;
    --sea-soft: #14343a;
    --port: #b9a6f5;
    --port-soft: #2a2350;
    --dusk: #f2eadb;
    --dusk-ink: #16122e;
    --code-bg: #0c0a1c;
    --code-head: #15122b;
    --code-line: #262147;
    --must: #ff7a63;
    --should: #f2b450;
    --consider: #6cc8cc;
    --good: #79c987;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 40px -20px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.022em; margin: 0; font-weight: 680; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); letter-spacing: -0.03em; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

code, pre { font-family: var(--font-mono); font-size: 0.88em; font-variant-ligatures: none; }
:not(pre) > code {
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  border-radius: 5px;
  padding: 0.12em 0.36em;
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.container.narrow { width: min(780px, 100% - 32px); }
.muted { color: var(--ink-3); }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--dusk); color: var(--dusk-ink); padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

.icon { flex: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--dusk); color: var(--dusk-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--dusk) 88%, var(--accent-fill)); }
.btn-ghost { color: var(--ink); border-color: var(--line-strong); background: var(--bg-elev); }
.btn-ghost:hover { border-color: var(--ink-3); }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.72rem; font-weight: 650; letter-spacing: 0.02em;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-muted { background: transparent; color: var(--ink-3); border: 1px dashed var(--line-strong); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-family: var(--font-pixel); font-weight: 600; font-size: 1.2rem; letter-spacing: 0.01em;
}
.brand img { border-radius: 8px; image-rendering: auto; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a {
  color: var(--ink-2); text-decoration: none; font-size: 0.93rem; font-weight: 520;
  padding: 6px 12px; border-radius: 999px;
}
.site-nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.btn-gh { padding: 7px 8px 7px 14px; font-size: 0.9rem; gap: 8px; }
.btn-gh-stars {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg-sunk); border-radius: 999px; padding: 3px 9px 3px 8px;
  font-variant-numeric: tabular-nums; color: var(--ink-2);
}
.btn-gh-stars .icon { color: var(--sun); fill: var(--sun); }

@media (max-width: 760px) {
  .site-nav { display: none; }
  .btn-gh { margin-left: auto; }
}
@media (max-width: 400px) {
  .btn-gh-label { display: none; }
  .btn-gh { padding-left: 10px; }
}

/* ---------- Hero ---------- */

.hero { padding: 28px 0 32px; }
.hero-art {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
  background: #2b2350;
  aspect-ratio: 1672 / 940;
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; }

.hero-copy { max-width: 820px; margin: 52px auto 0; text-align: center; }
.hero-copy h1 { margin-top: 22px; }
.lead { font-size: clamp(1.08rem, 1.8vw, 1.28rem); color: var(--ink-2); margin: 20px auto 0; max-width: 660px; }
.lead a { color: inherit; }

.release-pill {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  padding: 5px 14px 5px 5px; border-radius: 999px;
  background: var(--bg-elev); border: 1px solid var(--line);
  color: var(--ink-2); text-decoration: none; font-size: 0.9rem; box-shadow: var(--shadow-sm);
}
.release-pill:hover { border-color: var(--line-strong); color: var(--ink); }
.release-pill-tag {
  font-family: var(--font-mono); font-weight: 500; font-size: 0.8rem;
  background: var(--accent-fill); color: #fff; border-radius: 999px; padding: 2px 10px;
}
.release-pill-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.hero-actions { margin-top: 34px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.hero-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.cmd {
  display: flex; align-items: center; gap: 12px;
  max-width: 100%;
  background: var(--code-bg); color: var(--code-ink);
  border-radius: 12px; padding: 8px 8px 8px 18px;
  box-shadow: var(--shadow);
  font-family: var(--font-mono); font-size: 0.95rem;
}
.cmd code { white-space: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; text-align: left; background: none; padding: 0; font-size: 1em; color: inherit; }
.cmd code::-webkit-scrollbar { display: none; }
.cmd-prompt { color: var(--sun); user-select: none; }

.copy-btn {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font: 600 0.8rem var(--font-sans);
  color: var(--code-ink);
  background: color-mix(in srgb, var(--code-ink) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--code-ink) 14%, transparent);
  border-radius: 8px; padding: 7px 11px; cursor: pointer;
  transition: background-color 0.15s ease;
}
.copy-btn:hover { background: color-mix(in srgb, var(--code-ink) 18%, transparent); }
.copy-btn.is-copied { color: #9fe0a8; }

.works-with { margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.works-with-label { font-family: var(--font-pixel); font-size: 0.9rem; color: var(--ink-3); }
.works-with ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.works-with li {
  font-size: 0.88rem; font-weight: 560; color: var(--ink-2);
  border: 1px solid var(--line); background: var(--bg-elev);
  padding: 5px 12px; border-radius: 999px;
}
.works-with li.works-with-more { border-style: dashed; background: transparent; color: var(--ink-3); font-weight: 500; }

/* ---------- Sections ---------- */

.section { padding: 96px 0; }
.section-tight { padding-top: 24px; }
.section-sunk { background: var(--bg-sunk); }
@media (max-width: 700px) { .section { padding: 68px 0; } }

.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head-left { text-align: left; margin: 0 0 20px; }
.eyebrow {
  font-family: var(--font-pixel); font-weight: 600; font-size: 1rem;
  color: var(--accent); margin: 0 0 12px; letter-spacing: 0.01em;
}
.section-lead { color: var(--ink-2); font-size: 1.08rem; margin: 16px 0 0; }
.section-foot { margin: 28px 0 0; text-align: center; }
.fine-print { color: var(--ink-3); font-size: 0.88rem; text-align: center; max-width: 720px; margin: 22px auto 0; }

/* ---------- What's inside ---------- */

.pieces { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.piece {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm);
}
.piece h3 { margin: 20px 0 10px; font-size: 1.05rem; }
.piece h3 code { background: none; padding: 0; font-size: 1em; }
.piece p { color: var(--ink-2); margin: 0; font-size: 0.97rem; }
.piece-icon {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
}
.piece-write .piece-icon { background: var(--accent-soft); color: var(--accent); }
.piece-review .piece-icon { background: var(--sea-soft); color: var(--sea); }
.piece-lints .piece-icon { background: color-mix(in srgb, var(--sun) 22%, transparent); color: var(--should); }
.piece-port .piece-icon { background: var(--port-soft); color: var(--port); }

/* ---------- Before / after ---------- */

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .compare { grid-template-columns: minmax(0, 1fr); } }

.code-panel {
  margin: 0; min-width: 0;
  background: var(--code-bg); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--code-line);
}
.code-panel figcaption {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; background: var(--code-head); border-bottom: 1px solid var(--code-line);
  color: #b9b0d0; font-size: 0.85rem; font-weight: 600;
}
.code-panel-after { border-color: color-mix(in srgb, var(--accent-fill) 55%, var(--code-line)); }
.code-panel-after .code-panel-label { color: #ffb88a; }
.code-panel .badge { margin-left: auto; background: rgb(232 104 42 / 0.18); color: #ffb88a; }
.code-panel .highlight { border-radius: 0; border: 0; box-shadow: none; margin: 0; }

.dot-row { display: inline-flex; gap: 6px; }
.dot-row i { width: 10px; height: 10px; border-radius: 50%; background: #3d3566; }

.evals { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 28px; }
.eval { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.eval-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.eval-head code { background: none; padding: 0; font-weight: 500; }
.eval-score { color: var(--ink-3); font-size: 0.9rem; }
.eval-score strong { color: var(--ink); font-size: 1.25rem; }
.bar-row { display: grid; grid-template-columns: 64px 1fr 44px; align-items: center; gap: 12px; font-size: 0.86rem; }
.bar-row + .bar-row { margin-top: 8px; }
.bar-label { color: var(--ink-2); }
.bar-value { color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 10px; border-radius: 999px; background: var(--bg-sunk); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; }
.bar-with { background: linear-gradient(90deg, var(--sun), var(--accent-fill)); }
.bar-without { background: var(--line-strong); }

/* ---------- Install tabs ---------- */

.tabs { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.tabs:not(.is-ready) { grid-template-columns: minmax(0, 1fr); }
.tab-list { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 88px; }
.tab {
  text-align: left; font: 560 0.95rem/1.35 var(--font-sans); color: var(--ink-2);
  background: none; border: 1px solid transparent; border-radius: 10px;
  padding: 11px 14px; cursor: pointer;
}
.tab:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.tab[aria-selected="true"] { color: var(--ink); background: var(--bg-elev); border-color: var(--line); box-shadow: var(--shadow-sm); }
.tab[aria-selected="true"]::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 10px; vertical-align: 2px;
  background: var(--accent-fill);
}

.tab-panels { display: grid; gap: 20px; min-width: 0; }
.tab-panel {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 32px; box-shadow: var(--shadow-sm); min-width: 0;
}
.tab-panel-title { font-size: 1.25rem; margin-bottom: 14px; }
.tabs.is-ready .tab-panel-title { display: none; }

@media (max-width: 860px) {
  .tabs { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .tab-list {
    position: static; flex-direction: row; overflow-x: auto; gap: 6px;
    padding-bottom: 4px; scrollbar-width: thin;
  }
  .tab { white-space: nowrap; flex: none; }
  .tab-panel { padding: 22px 18px; }
}

/* ---------- Prose (rendered markdown) ---------- */

.prose { color: var(--ink-2); }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.3em 0; }
.prose li::marker { color: var(--ink-3); }
.prose strong { color: var(--ink); font-weight: 650; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--ink); margin: 1.8em 0 0.6em; }
.prose h2 { font-size: 1.5rem; }
.prose h3 { font-size: 1.15rem; }
.prose h4 { font-size: 1rem; }
.prose table {
  display: block; overflow-x: auto; border-collapse: collapse; margin: 0 0 1.2em;
  font-size: 0.9rem; max-width: 100%;
}
.prose th, .prose td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.prose th { color: var(--ink); font-weight: 650; background: var(--bg-sunk); }
.prose img { border-radius: 10px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose blockquote { margin: 0 0 1em; padding-left: 16px; border-left: 3px solid var(--line-strong); color: var(--ink-3); }

/* ---------- Code blocks (always dark, like the banner's night sky) ---------- */

.highlight {
  position: relative;
  background: var(--code-bg); color: var(--code-ink);
  border-radius: 12px; margin: 0 0 1.2em;
  border: 1px solid var(--code-line);
}
.highlight pre {
  margin: 0; padding: 18px 20px; overflow-x: auto;
  font-size: 0.84rem; line-height: 1.65; tab-size: 4;
  scrollbar-width: thin;
  scrollbar-color: #3d3566 transparent;
}
.highlight pre code { background: none; padding: 0; font-size: 1em; color: inherit; }
.highlight .copy-btn {
  position: absolute; top: 10px; right: 10px;
  opacity: 0; transition: opacity 0.15s ease, background-color 0.15s ease;
  padding: 5px 9px; font-size: 0.75rem;
  background: var(--code-head);
}
.highlight:hover .copy-btn, .highlight .copy-btn:focus-visible, .highlight .copy-btn.is-copied { opacity: 1; }
@media (hover: none) {
  .highlight .copy-btn { opacity: 1; }
  .highlight pre { padding-right: 84px; }
}

.highlight .k, .highlight .kd, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kv,
.highlight .bp, .highlight .nl { color: #ff9e64; }
.highlight .kt, .highlight .nc, .highlight .nn, .highlight .nt, .highlight .nb { color: #f6c177; }
.highlight .nf, .highlight .nv, .highlight .vi, .highlight .na { color: #8fd3d6; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb, .highlight .sc, .highlight .sh,
.highlight .se, .highlight .si, .highlight .sx { color: #b6dc8e; }
.highlight .sd { color: #b7acdf; }
.highlight .c, .highlight .c1, .highlight .cm, .highlight .ch, .highlight .cs { color: #8b84a8; font-style: italic; }
.highlight .cp, .highlight .nd, .highlight .fm, .highlight .cpf { color: #c9adff; }
.highlight .m, .highlight .mi, .highlight .mf, .highlight .mh, .highlight .mo, .highlight .il, .highlight .kc { color: #f7a6c4; }
.highlight .o, .highlight .ow, .highlight .p { color: #cdc4e0; }
.highlight .gp { color: var(--sun); user-select: none; }
.highlight .err { color: inherit; background: none; border: 0; }

/* ---------- Coverage chapters ---------- */

.chapters {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px;
}
.chapter {
  display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 4px; height: 100%;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; text-decoration: none; color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.chapter:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.chapter-n {
  grid-row: span 2; font-family: var(--font-mono); font-weight: 500; font-size: 0.95rem;
  color: var(--accent); line-height: 1.55;
}
.chapter-title { font-weight: 620; color: var(--ink); line-height: 1.35; }
.chapter-detail { font-size: 0.88rem; color: var(--ink-3); line-height: 1.5; }

/* ---------- Review ---------- */

.review-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
@media (max-width: 900px) { .review-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; } }
.review-grid .prose { margin-bottom: 28px; }

.report {
  margin: 0; background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.report-head {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px;
  background: var(--bg-sunk); border-bottom: 1px solid var(--line);
  font-size: 0.88rem; font-weight: 620; color: var(--ink);
}
.report-head .dot-row i { background: var(--line-strong); }
.report-head code { background: none; padding: 0; }
.report-count { margin-left: auto; color: var(--ink-3); font-weight: 500; white-space: nowrap; }
.report-body { padding: 8px 18px 14px; }
.tier { padding: 14px 0; }
.tier + .tier { border-top: 1px dashed var(--line); }
.tier-name { display: flex; align-items: center; gap: 9px; margin: 0 0 6px; font-weight: 650; font-size: 0.93rem; color: var(--ink); }
.tier-dot { width: 9px; height: 9px; background: currentColor; }
.tier-must-fix .tier-dot { color: var(--must); }
.tier-should-fix .tier-dot { color: var(--should); }
.tier-consider .tier-dot { color: var(--consider); }
.tier-good .tier-dot { color: var(--good); }
.tier-good .tier-name { margin: 0; }
.tier-count {
  font-size: 0.75rem; font-weight: 600; color: var(--ink-3);
  background: var(--bg-sunk); border-radius: 999px; padding: 1px 8px;
}
.tier ul { list-style: none; margin: 0; padding: 0 0 0 18px; }
.tier li a {
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px;
  padding: 5px 0; color: var(--ink-2); text-decoration: none; font-size: 0.9rem; line-height: 1.45;
}
.tier li a:hover .finding-title { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.finding-where { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-3); }
.finding-more a { color: var(--ink-3); font-size: 0.85rem; }

/* ---------- Port ---------- */

.port-link { margin: 20px 0 0; }
.mapping table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.mapping th {
  text-align: left; padding: 14px 18px 8px;
  font-size: 0.72rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3);
}
.mapping td { padding: 12px 18px; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.45; color: var(--ink-2); }
.mapping td:first-child { color: var(--ink); font-weight: 560; width: 42%; }
.mapping td.mapping-arrow { width: 1%; padding-inline: 0; color: var(--port); }
.mapping td.mapping-arrow .icon { margin-top: 2px; }
@media (max-width: 500px) { .mapping td, .mapping th { padding-inline: 12px; } }

/* ---------- Lints ---------- */

.lints-intro { max-width: 760px; margin: -16px auto 40px; }
.lint-groups { columns: 3 300px; column-gap: 18px; }
.lint-group {
  break-inside: avoid; margin: 0 0 18px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px;
}
.lint-group h3 { font-size: 0.98rem; line-height: 1.4; margin-bottom: 12px; letter-spacing: -0.01em; }
.lint-group ul { list-style: none; margin: 0; padding: 0; }
.lint-group li { padding: 9px 0; border-top: 1px solid var(--line); }
.lint-group li:first-child { border-top: 0; padding-top: 0; }
.lint-group li p { margin: 4px 0 0; font-size: 0.85rem; color: var(--ink-3); line-height: 1.5; }
.lint-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.lint-name code { font-size: 0.8rem; background: none; padding: 0; color: var(--ink); overflow-wrap: anywhere; }
.lint-name a { text-decoration: none; }
.lint-name a:hover code { text-decoration: underline; text-underline-offset: 3px; }
.level {
  font-size: 0.68rem; font-weight: 650; letter-spacing: 0.03em; text-transform: uppercase;
  border-radius: 5px; padding: 1px 6px;
}
.level-warn { background: color-mix(in srgb, var(--sun) 24%, transparent); color: var(--should); }
.level-deny, .level-forbid { background: color-mix(in srgb, var(--must) 16%, transparent); color: var(--must); }
.level-allow { background: var(--bg-sunk); color: var(--ink-3); }
.level-lib { background: var(--sea-soft); color: var(--sea); }

/* ---------- Sources ---------- */

.sources { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.source {
  display: flex; flex-direction: column; gap: 4px; height: 100%;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; text-decoration: none; color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.source:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.source-icon { color: var(--accent); margin-bottom: 8px; }
.source-name { font-weight: 650; color: var(--ink); line-height: 1.3; }
.source-author { font-size: 0.88rem; color: var(--ink-2); }
.source-note { font-size: 0.84rem; color: var(--ink-3); }
.source-license {
  margin-top: auto; padding-top: 12px; align-self: flex-start;
  font-size: 0.74rem; font-weight: 600; color: var(--ink-3);
}

/* ---------- What's new ---------- */

.news-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .news-grid { grid-template-columns: minmax(0, 1fr); } }
.news-card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; }
.news-card h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.news-card h3 .icon { color: var(--accent); }
.news-card .section-foot { text-align: left; margin-top: 18px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 22px 26px; }
.timeline li::before {
  content: ""; position: absolute; left: 4px; top: 22px; bottom: 0; width: 2px; background: var(--line);
}
.timeline li:last-child::before { display: none; }
.timeline li::after {
  content: ""; position: absolute; left: 0; top: 7px; width: 10px; height: 10px;
  background: var(--line-strong);
}
.timeline li.is-latest::after { background: var(--accent-fill); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline li.is-unreleased::after { background: var(--bg-elev); box-shadow: inset 0 0 0 2px var(--line-strong); }
.timeline-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.timeline-head time { color: var(--ink-3); font-size: 0.85rem; }
.version { font-family: var(--font-mono); font-weight: 500; font-size: 1rem; color: var(--ink); text-decoration: none; }
.version:hover { color: var(--accent); }
.timeline-title { margin: 4px 0 0; font-weight: 620; color: var(--ink); }
.timeline-summary { margin: 4px 0 0; font-size: 0.92rem; color: var(--ink-2); }

.commits { list-style: none; margin: 0; padding: 0; }
.commits li + li { border-top: 1px solid var(--line); }
.commits a { display: flex; flex-direction: column; gap: 2px; padding: 11px 0; text-decoration: none; }
.commits li:first-child a { padding-top: 0; }
.commit-msg { color: var(--ink); font-size: 0.93rem; font-weight: 520; line-height: 1.45; }
.commits a:hover .commit-msg { text-decoration: underline; text-underline-offset: 3px; }
.commit-meta { color: var(--ink-3); font-size: 0.8rem; }
.commit-meta code { background: none; padding: 0; color: var(--accent); }

/* ---------- Closing CTA ---------- */

.cta { text-align: center; }
.cta-inner { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.cta h2 { max-width: 640px; }
.cta-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; }
.cta-stats a { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); text-decoration: none; font-size: 0.95rem; }
.cta-stats a:hover { color: var(--ink); }
.cta-stats strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.cta-stats .icon { color: var(--accent); }

/* ---------- Sub-pages ---------- */

.page-head { padding: 72px 0 24px; }
.page-head h1 { font-size: clamp(2rem, 4.6vw, 3rem); }
.page-head h1 code { font-size: 0.8em; }
.page-404 { padding: 120px 0; text-align: center; }
.page-404 .btn { margin-top: 20px; }

.releases { list-style: none; margin: 0; padding: 0; }
.release { padding: 36px 0; border-top: 1px solid var(--line); }
.release:first-child { border-top: 0; padding-top: 8px; }
.release-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 6px; }
.release-head h2 { font-family: var(--font-mono); font-weight: 500; font-size: 1.6rem; letter-spacing: -0.02em; }
.release-head h2 a { color: var(--ink); text-decoration: none; }
.release-head time { color: var(--ink-3); font-size: 0.92rem; }
.release-link { margin-left: auto; font-size: 0.9rem; }
.release-title { font-size: 1.15rem; font-weight: 620; color: var(--ink); margin: 0 0 16px; }
.release .prose h3 {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin: 1.6em 0 0.6em;
}

.doc h1 { font-size: 1.9rem; }
.doc h2 { font-size: 1.55rem; padding-top: 0.6em; border-top: 1px solid var(--line); }
.doc h3 { font-size: 1.12rem; line-height: 1.4; }
.doc h2, .doc h3 { scroll-margin-top: 84px; }
.doc :target { animation: flash 1.6s ease; }
@keyframes flash { from { background: var(--accent-soft); } to { background: transparent; } }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 44px 0 52px; background: var(--bg); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { border-radius: 10px; }
.footer-brand p { margin: 0; font-size: 0.9rem; }
.footer-title { font-family: var(--font-pixel); font-weight: 600; font-size: 1.1rem !important; color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-size: 0.92rem; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.sync-note {
  grid-column: 1 / -1; margin: 0; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.84rem; color: var(--ink-3);
}
.sync-note a { color: var(--ink-2); }
.sync-note code { font-size: 0.95em; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }
