/* AgentAtlas — a clear, accessible directory for the AI builder's toolkit. */
/* System fonts, local assets, and no external CSS dependencies. */

:root {
  color-scheme: light;
  --ink: #152033;
  --ink-soft: #364357;
  --muted: #657084;
  --brand: #4854eb;
  --brand-dark: #3440c9;
  --brand-soft: #eeefff;
  --brand-line: #d7dafc;
  --paper: #ffffff;
  --canvas: #f7f8fa;
  --line: #e3e7ee;
  --lime: #d5efab;
  --green: #27724d;
  --radius: 14px;
  --shadow: 0 8px 28px rgb(29 43 75 / 5%);
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--font);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 15px; line-height: 1.65; }
body, main, section, article, aside, div { min-width: 0; }
img, svg { max-width: 100%; vertical-align: middle; }
img { height: auto; }
a { color: inherit; text-decoration: none; text-underline-offset: 4px; }
a:hover { color: var(--brand); }
button, input, select, textarea { font: inherit; }
button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, select, summary { cursor: pointer; }
button { color: inherit; }
button:disabled { cursor: not-allowed; opacity: .55; }
input, select, textarea { min-width: 0; }
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
button svg, a svg { flex: 0 0 auto; }
h1, h2, h3, h4, p, ul, ol, dl { margin-top: 0; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; }
h1 { font-size: clamp(36px, 4.5vw, 60px); letter-spacing: -.045em; }
h2 { font-size: 28px; letter-spacing: -.035em; }
h3 { font-size: 18px; letter-spacing: -.022em; }
p:last-child, ul:last-child, ol:last-child, dl:last-child { margin-bottom: 0; }
::selection { background: #dce0ff; color: #1a2262; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; border-radius: 4px; }
[hidden] { display: none !important; }
.container { width: min(1280px, calc(100% - 80px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 10px; left: 16px; z-index: 1000; padding: 10px 18px; transform: translateY(-180%); border-radius: 8px; color: white; background: var(--ink); }
.skip-link:focus { transform: translateY(0); color: white; }
.mobile-only, .mobile-toggle { display: none; }
.muted, .text-muted { color: var(--muted); }
.text-link { color: var(--brand); font-weight: 600; }
.text-link:hover { text-decoration: underline; }

/* Header and primary actions */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 97%); }
.header-inner { min-height: 78px; display: flex; align-items: center; gap: 40px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 36px; height: 36px; flex: 0 0 36px; }
.brand-word { display: block; font-size: 21px; font-weight: 760; line-height: 1.15; letter-spacing: -.65px; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.2; letter-spacing: .09em; text-transform: uppercase; }
.desktop-nav { display: flex; align-items: center; gap: 30px; margin-inline: auto; }
.desktop-nav a { display: inline-flex; align-items: center; min-height: 46px; color: var(--muted); font-size: 13px; font-weight: 600; }
.desktop-nav a:hover, .desktop-nav a[aria-current="page"] { color: var(--brand); }
.desktop-nav a[aria-current="page"] { position: relative; }
.desktop-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -16px; height: 2px; background: var(--brand); }
.header-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 10px 18px; border: 1px solid transparent; border-radius: 9px; font-size: 13px; font-weight: 650; line-height: 1.5; text-align: center; transition: background .16s, border-color .16s, box-shadow .16s, transform .16s; }
.button svg { width: 17px; height: 17px; }
.button-primary { background: var(--brand); color: white; box-shadow: 0 3px 7px rgb(72 84 235 / 12%); }
.button-primary:hover { color: white; background: var(--brand-dark); box-shadow: 0 4px 12px rgb(72 84 235 / 19%); }
.button-secondary { color: var(--ink-soft); background: white; border-color: var(--line); }
.button-secondary:hover { color: var(--brand); border-color: var(--brand-line); background: #fafaff; }
.button-ghost { color: var(--ink-soft); background: transparent; }
.button-ghost:hover { background: var(--brand-soft); color: var(--brand); }
.button-small { min-height: 44px; padding: 8px 14px; font-size: 12px; }
.icon-button, .save-button, .mobile-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 10px; background: transparent; border: 1px solid transparent; border-radius: 9px; color: var(--muted); flex: 0 0 44px; }
.icon-button:hover, .save-button:hover, .mobile-toggle:hover { background: var(--canvas); color: var(--brand); }
.icon-button svg, .save-button svg, .mobile-toggle svg { width: 19px; height: 19px; }
.mobile-toggle { display: none; }
.mobile-nav { padding: 12px 24px 20px; border-top: 1px solid var(--line); background: white; }
.mobile-nav a { display: block; padding: 11px 14px; min-height: 44px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.mobile-nav a:hover, .mobile-nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }

/* Homepage: distinctive editorial typography and a small, useful stack map. */
.hero { padding: 64px 0 52px; background: var(--paper); overflow: clip; }
.hero-grid { display: grid; grid-template-columns: 1.18fr 1fr; gap: 64px; align-items: center; }
.hero-copy { padding: 0 0 5px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 19px; color: var(--brand); font-size: 10px; font-weight: 750; line-height: 1.5; letter-spacing: .15em; text-transform: uppercase; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.hero h1 { margin-bottom: 20px; max-width: 650px; font-size: clamp(42px, 4.9vw, 70px); line-height: 1.06; letter-spacing: -.052em; font-weight: 760; }
.hero h1 em { color: var(--brand); font-style: normal; }
.hero-lede { max-width: 540px; margin-bottom: 27px; color: var(--muted); font-size: 17px; line-height: 1.8; }
.hero-lede strong { font-weight: 600; color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-actions .button { min-height: 49px; padding-inline: 20px; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; margin-top: 22px; color: var(--muted); font-size: 11px; }
.hero-meta > span, .hero-meta > a { display: inline-flex; gap: 7px; align-items: center; }
.hero-meta svg { width: 14px; height: 14px; color: var(--brand); }
.hero-meta strong { color: var(--ink-soft); font-weight: 600; }
.hero-art { position: relative; padding: 22px 26px 18px; border: 1px solid #dedff4; border-radius: 19px; background: #f2f2fd; box-shadow: 0 18px 45px rgb(58 65 130 / 5%); }
.hero-art::before { content: ""; position: absolute; inset: 60px 15px 45px; pointer-events: none; background-image: radial-gradient(#cdd0e9 .8px, transparent .8px); background-size: 14px 14px; opacity: .65; }
.stack-topline { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 21px; color: #6b6e91; font-size: 9px; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }
.stack-topline > span:last-child { padding: 3px 8px; border-radius: 99px; background: #e1e4fa; color: #4c5597; font-size: 8px; letter-spacing: .08em; }
.stack-map { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 17px; padding: 0 10px; }
.stack-map::before { content: ""; position: absolute; left: 50%; top: 25px; bottom: 25px; width: 1px; background: #b7bfed; }
.stack-node { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; min-height: 76px; padding: 15px 17px; border: 1px solid #dce0ed; border-radius: 11px; background: white; box-shadow: 0 5px 10px rgb(53 63 109 / 4%); }
.stack-node strong { display: block; font-size: 13px; line-height: 1.5; font-weight: 700; letter-spacing: -.02em; }
.stack-node small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.stack-node .icon-tile { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); font-size: 17px; font-weight: 700; }
.stack-node .icon-tile svg { width: 20px; height: 20px; }
.node-main { grid-column: 1 / -1; margin: 0 25px; border-color: #bfc5f8; }
.node-main .icon-tile { color: white; background: var(--brand); }
.node-memory { grid-column: 1; }
.node-tool { grid-column: 2; }
.node-memory, .node-tool { display: block; padding: 15px; }
.node-memory .icon-tile, .node-tool .icon-tile { margin-bottom: 9px; width: 32px; height: 32px; font-size: 15px; }
.node-memory .icon-tile { background: #eee9fc; color: #8058c9; }
.node-tool .icon-tile { background: #e9f1fb; color: #3d78bb; }
.node-eval { grid-column: 1 / -1; margin: 0 25px; background: #f5faed; border-color: #d5e6be; }
.node-eval .icon-tile { background: #e1efcc; color: #537f30; }
.stack-caption { position: relative; margin: 18px 0 0; color: #626788; font-size: 10px; text-align: center; }
.stack-caption a { color: var(--brand); text-decoration: underline; }
.trust-strip { background: var(--paper); border-block: 1px solid var(--line); }
.trust-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 22px; min-height: 67px; padding-block: 15px; color: var(--muted); font-size: 11px; }
.trust-inner > span { display: inline-flex; gap: 9px; align-items: center; }
.trust-inner svg { width: 16px; height: 16px; color: #818ba2; }
.trust-inner strong { color: var(--ink-soft); font-size: 12px; font-weight: 650; }

/* Directory, search, and filters */
.section { padding: 56px 0; }
.section + .section { padding-top: 12px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.section-heading h2 { margin-bottom: 6px; font-size: 26px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.section-heading > a { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 0 0 auto; min-height: 44px; color: var(--brand); font-size: 12px; font-weight: 650; }
.section-heading > a:hover { text-decoration: underline; }
.section-heading > a svg { width: 16px; height: 16px; }
.search-form { display: flex; align-items: center; gap: 12px; padding: 7px 8px 7px 18px; background: white; border: 1px solid #dce0eb; border-radius: 11px; box-shadow: 0 3px 9px rgb(22 37 63 / 2%); }
.search-form:focus-within { border-color: #9fa7f9; box-shadow: 0 0 0 3px rgb(72 84 235 / 8%); }
.search-form > svg { width: 20px; height: 20px; flex: 0 0 20px; color: #8892a5; }
.search-form input[type="search"] { width: 100%; flex: 1 1 auto; min-height: 44px; padding: 7px 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; line-height: 1.5; }
.search-form input::placeholder { color: var(--muted); opacity: 1; }
.search-form input:focus-visible { outline: none; }
.search-form button { flex: 0 0 auto; min-height: 44px; }
.search-form kbd { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; padding: 2px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: #fafbfc; font: 11px var(--font); }
.search-main { margin-bottom: 24px; }
.search-main input[type="search"] { min-height: 47px; font-size: 14px; }
.directory-layout { display: grid; grid-template-columns: 205px minmax(0, 1fr); align-items: start; gap: 29px; }
.filter-sidebar { padding: 5px 0; }
.filter-group { margin-bottom: 24px; }
.filter-group h2, .filter-group h3, .filter-group h4, .filter-group-title { margin: 0 0 11px; padding: 0 11px; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.filter-link { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 9px 11px; margin: 2px 0; border: 1px solid transparent; border-radius: 8px; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.filter-link > svg { width: 16px; height: 16px; flex: 0 0 16px; color: #8a92a2; }
.filter-link .filter-count { margin-left: auto; padding-left: 8px; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.filter-link:hover { background: #eef0f6; color: var(--brand); }
.filter-link.active, .filter-link[aria-current="page"] { color: var(--brand); background: #eaeefe; border-color: #e3e7fc; font-weight: 650; }
.filter-link.active svg, .filter-link.active .filter-count, .filter-link[aria-current="page"] .filter-count { color: var(--brand); }
.sidebar-note { margin-top: 27px; padding: 17px 16px; border: 1px solid var(--line); border-radius: 11px; background: #f1f3f7; color: var(--muted); font-size: 11px; line-height: 1.8; }
.sidebar-note strong { display: block; margin-bottom: 6px; color: var(--ink-soft); font-size: 12px; }
.sidebar-note a { color: var(--brand); text-decoration: underline; }
.directory-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; min-height: 47px; margin-bottom: 15px; }
.result-summary { margin: 0; color: var(--muted); font-size: 12px; }
.result-summary strong { color: var(--ink); font-weight: 650; }
.sort-control { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.sort-control select, select.sort-control { min-height: 44px; padding: 8px 28px 8px 12px; border: 1px solid var(--line); border-radius: 8px; background-color: white; color: var(--ink-soft); font-size: 11px; }
.quick-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 20px; }
.filter-chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--muted); font-size: 11px; }
.filter-chip:hover, .filter-chip.active, .filter-chip[aria-pressed="true"] { border-color: var(--brand-line); color: var(--brand); background: var(--brand-soft); }
.filter-chip svg { width: 13px; height: 13px; }
.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.resource-card { display: flex; flex-direction: column; min-width: 0; padding: 21px 20px 10px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 2px 3px rgb(22 35 58 / 1%); transition: border-color .18s, box-shadow .18s, transform .18s; }
.resource-card:hover { border-color: #cbd0e9; box-shadow: var(--shadow); transform: translateY(-2px); }
.resource-card:focus-within { border-color: #a9b1f9; }
.card-top { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 15px; }
.resource-icon { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid #e1e5f0; border-radius: 10px; background: #f4f5f9; color: #485473; font-size: 18px; font-weight: 750; line-height: 1; letter-spacing: -.06em; }
.resource-icon svg { width: 23px; height: 23px; }
.resource-icon[data-color="violet"], .resource-icon[data-color="purple"] { background: #f0ebfb; color: #7857bd; border-color: #e5ddf7; }
.resource-icon[data-color="blue"] { background: #eaf0fd; color: #3e67c6; border-color: #dce5fa; }
.resource-icon[data-color="green"] { background: #eaf4ef; color: #347653; border-color: #d7eade; }
.resource-icon[data-color="orange"] { background: #fff0e6; color: #a56830; border-color: #f4dfca; }
.resource-icon[data-color="pink"] { background: #fbeef6; color: #a74c7e; border-color: #f0dcea; }
.resource-icon[data-color="slate"], .resource-icon[data-color="dark"] { background: #243047; color: white; border-color: #243047; }
.card-name { flex: 1 1 auto; padding-top: 1px; }
.card-name h2, .card-name h3 { margin: 0 0 4px; font-size: 15px; font-weight: 700; line-height: 1.4; letter-spacing: -.025em; overflow-wrap: anywhere; }
.card-name a:hover { color: var(--brand); }
.card-category { display: block; color: var(--muted); font-size: 9px; line-height: 1.55; }
.resource-card .save-button { width: 44px; height: 44px; min-width: 44px; flex-basis: 44px; padding: 9px; margin: -5px -9px 0 -1px; }
.save-button[aria-pressed="true"] { color: var(--brand); background: var(--brand-soft); }
.save-button[aria-pressed="true"] svg { fill: rgb(72 84 235 / 15%); }
.card-description { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; min-height: 4.95em; margin-bottom: 17px; color: var(--muted); font-size: 12px; line-height: 1.65; overflow-wrap: break-word; }
.card-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 17px; }
.tag { display: inline-block; max-width: 100%; padding: 3px 7px; border: 1px solid #eaedf3; border-radius: 5px; background: #f8f9fb; color: var(--muted); font-size: 9px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
a.tag { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 9px; }
a.tag:hover { border-color: var(--brand-line); color: var(--brand); background: var(--brand-soft); }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 7px; border-top: 1px solid #edf0f5; min-height: 47px; }
.source-status { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.source-status svg { width: 12px; height: 12px; }
.compare-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; padding: 7px 5px; border: 0; border-radius: 6px; background: transparent; color: #6c7790; font-size: 10px; font-weight: 550; white-space: nowrap; }
.compare-button svg { width: 13px; height: 13px; }
.compare-button:hover, .compare-button[aria-pressed="true"] { color: var(--brand); }
.compare-button[aria-pressed="true"] { background: #f1f2ff; padding-inline: 8px; }
.empty-state { padding: 54px 24px; border: 1px dashed #ccd3e1; border-radius: var(--radius); background: white; text-align: center; color: var(--muted); }
.empty-state h2, .empty-state h3 { color: var(--ink); margin-bottom: 10px; }
.empty-state p { max-width: 460px; margin-inline: auto; font-size: 14px; }
.empty-state .button { margin-top: 8px; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px; margin-top: 29px; }
.pagination a, .pagination button, .pagination > span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--muted); font-size: 12px; }
.pagination a:hover, .pagination button:hover { color: var(--brand); border-color: var(--brand-line); }
.pagination a[aria-current="page"], .pagination button[aria-current="page"] { background: var(--brand); color: white; border-color: var(--brand); }
.pagination > span { border: 0; background: transparent; }

/* Category cards and editorial guides */
.collection-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.collection-card { display: flex; align-items: flex-start; gap: 14px; padding: 22px 19px; border: 1px solid var(--line); border-radius: 12px; background: white; transition: border-color .16s, box-shadow .16s; }
.collection-card:hover { color: var(--ink); border-color: #c4cced; box-shadow: var(--shadow); }
.collection-icon { display: flex; align-items: center; justify-content: center; width: 39px; height: 39px; flex: 0 0 39px; border-radius: 10px; background: #eff1fe; color: var(--brand); font-size: 17px; }
.collection-icon svg { width: 21px; height: 21px; }
.collection-card h2, .collection-card h3, .collection-card strong { display: block; margin: 1px 0 7px; font-size: 14px; line-height: 1.45; letter-spacing: -.02em; font-weight: 650; }
.collection-card p, .collection-card small { display: block; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.75; }
.collection-card .count { display: block; margin-top: 9px; color: var(--brand); font-size: 10px; font-weight: 650; }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 23px; }
.guide-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; transition: box-shadow .16s, border-color .16s; }
.guide-card:hover { color: var(--ink); border-color: #cbd1e7; box-shadow: var(--shadow); }
.guide-cover { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 162px; padding: 27px; overflow: hidden; background: #e9ebfc; color: #515d98; }
.guide-cover::before { content: ""; position: absolute; width: 130px; height: 130px; right: -27px; top: 35px; border: 23px solid rgb(105 115 181 / 12%); border-radius: 24px; transform: rotate(-20deg); }
.guide-cover::after { content: ""; position: absolute; width: 60px; height: 60px; top: 26px; right: 51px; border: 1px solid rgb(105 115 181 / 20%); border-radius: 12px; transform: rotate(-20deg); }
.guide-cover > * { position: relative; z-index: 1; }
.guide-cover span { font-size: 10px; font-weight: 650; letter-spacing: .11em; text-transform: uppercase; }
.guide-cover strong { display: block; max-width: 220px; margin-top: 7px; font-size: 23px; line-height: 1.25; font-weight: 650; letter-spacing: -.03em; }
.guide-cover svg { width: 50px; height: 50px; margin-bottom: 13px; }
.cover-build { background: #e9ebfc; color: #515d98; }
.cover-mcp { background: #eaf1eb; color: #4c7862; }
.cover-mcp::before { border-color: rgb(67 127 91 / 12%); border-radius: 50%; }
.cover-mcp::after { border-color: rgb(67 127 91 / 20%); border-radius: 50%; }
.cover-eval { background: #f6eee5; color: #987858; }
.cover-eval::before { border-color: rgb(156 115 72 / 12%); transform: rotate(15deg); }
.cover-eval::after { border-color: rgb(156 115 72 / 20%); transform: rotate(15deg); }
.guide-card-body { padding: 21px 23px 24px; }
.guide-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 13px; margin-bottom: 10px; color: var(--muted); font-size: 9px; }
.guide-meta span:first-child { color: var(--brand); font-weight: 600; }
.guide-card h2, .guide-card h3 { margin-bottom: 9px; font-size: 17px; line-height: 1.45; letter-spacing: -.025em; }
.guide-card p { color: var(--muted); font-size: 12px; line-height: 1.75; }
.guide-card .text-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 13px; min-height: 44px; font-size: 11px; }
.guide-cover:has(> img) { min-height: 0; padding: 0; }
.guide-cover:has(> img)::before, .guide-cover:has(> img)::after { content: none; }
.guide-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.guide-hero { margin: 0 0 30px; }
.guide-hero img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; }
.transparency-note { margin: 26px 0; padding: 18px 22px; border: 1px solid var(--line); border-left: 3px solid #8b96ee; border-radius: 0 10px 10px 0; background: #f7f8fc; color: var(--muted); font-size: 13px; line-height: 1.8; }
.transparency-note p { margin: 0; }
.guide-card.guide-card-featured { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.guide-card-featured .guide-card-body { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 30px 34px; }
.guide-card-featured .eyebrow { margin-bottom: 12px; }
.guide-card-featured h3 { font-size: 22px; }
.callout { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 36px 39px; border: 1px solid var(--brand-line); border-radius: 15px; background: var(--brand-soft); }
.callout h2 { margin-bottom: 8px; font-size: 25px; }
.callout p { margin: 0; max-width: 680px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.callout .button { flex: 0 0 auto; }
.callout-dark { background: #172138; border-color: #172138; color: white; }
.callout-dark h2 { color: white; }
.callout-dark p { color: #aeb7cc; }
.callout-dark .eyebrow { color: var(--lime); }
.callout-dark .button-primary { background: var(--lime); color: #273c19; box-shadow: none; }
.callout-dark .button-primary:hover { background: #e3f6c7; }
.callout-dark .button-secondary { background: transparent; border-color: #47526a; color: white; }

/* Interior pages */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 22px 0; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.breadcrumb a { color: #657086; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb svg { width: 12px; height: 12px; }
.page-header { padding: 28px 0 34px; }
.page-header h1 { margin-bottom: 15px; max-width: 850px; font-size: clamp(35px, 4vw, 51px); }
.page-header > p, .page-header .lede { max-width: 780px; margin-bottom: 19px; color: var(--muted); font-size: 16px; line-height: 1.8; }
.page-header .eyebrow { margin-bottom: 16px; }
.page-header .search-form { max-width: 850px; margin-top: 23px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; align-items: start; gap: 38px; padding-bottom: 50px; }
.detail-main, .article-content { min-width: 0; }
.detail-heading { display: flex; align-items: center; gap: 19px; margin: 15px 0 24px; }
.detail-logo { display: flex; align-items: center; justify-content: center; width: 74px; height: 74px; flex: 0 0 74px; border: 1px solid #dfe3f3; border-radius: 17px; background: var(--brand-soft); color: var(--brand); font-size: 30px; font-weight: 750; letter-spacing: -.06em; }
.detail-logo svg { width: 37px; height: 37px; }
.detail-title { flex: 1; min-width: 0; }
.detail-title h1 { margin: 0 0 9px; font-size: clamp(31px, 3.5vw, 47px); line-height: 1.15; overflow-wrap: anywhere; }
.detail-title .card-tags { margin: 0; }
.detail-title .tag { padding: 4px 9px; font-size: 10px; }
.detail-summary { max-width: 800px; margin-bottom: 26px; color: var(--ink-soft); font-size: 18px; line-height: 1.9; }
.detail-main > .hero-actions { margin-bottom: 28px; }
.detail-aside { padding-top: 18px; }
.aside-card { margin-bottom: 18px; padding: 23px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.aside-card h2, .aside-card h3 { margin-bottom: 18px; font-size: 15px; }
.aside-card > p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.aside-card .button { width: 100%; margin-top: 9px; }
.fact-list { margin-bottom: 0; }
.fact-list dt { color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.fact-list dd { margin: 4px 0 19px; color: var(--ink-soft); font-size: 12px; overflow-wrap: anywhere; }
.fact-list dd:last-child { margin-bottom: 0; }
.fact-list a { color: var(--brand); }
.source-list { padding: 0; list-style: none; }
.source-list li { padding: 12px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.source-list li:last-child { border-bottom: 0; }
.source-list a { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; color: var(--brand); font-size: 13px; font-weight: 550; }
.source-list small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.prose { max-width: 78ch; color: var(--ink-soft); font-size: 15px; line-height: 1.95; overflow-wrap: break-word; }
.prose h2 { margin: 38px 0 14px; padding-top: 4px; font-size: 25px; line-height: 1.35; }
.prose h3 { margin: 27px 0 11px; font-size: 18px; line-height: 1.45; }
.prose p { margin-bottom: 20px; }
.prose a { color: var(--brand); text-decoration: underline; text-decoration-color: #bcc3f7; }
.prose a:hover { text-decoration-color: var(--brand); }
.prose strong { color: var(--ink); font-weight: 650; }
.prose ul, .prose ol { padding-left: 23px; margin-bottom: 23px; }
.prose li { padding-left: 3px; margin-bottom: 9px; }
.prose li::marker { color: #8f9bc7; }
.prose blockquote, .prose .note { margin: 25px 0; padding: 19px 22px; border: 1px solid #e1e5fc; border-left: 3px solid #8b96ee; border-radius: 0 10px 10px 0; background: #f0f2fc; color: #56617f; font-size: 14px; }
.prose blockquote p:last-child { margin: 0; }
.prose code { padding: 2px 5px; border-radius: 4px; background: #ebedf5; color: #485575; font-family: "SFMono-Regular", Consolas, monospace; font-size: .87em; overflow-wrap: anywhere; }
.prose pre { max-width: 100%; overflow-x: auto; padding: 19px 22px; border: 1px solid var(--line); border-radius: 10px; background: #f0f2f7; line-height: 1.65; }
.prose pre code { padding: 0; background: transparent; white-space: pre; }
.prose table { display: block; max-width: 100%; width: 100%; overflow-x: auto; margin: 24px 0; border-collapse: collapse; border: 1px solid var(--line); border-radius: 8px; background: white; font-size: 12px; line-height: 1.7; }
.prose th, .prose td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: #f0f2f8; color: var(--ink-soft); font-weight: 650; }
.prose td { min-width: 130px; }
.prose tr:last-child td { border-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.toc { margin: 0; padding: 0; list-style: none; }
.toc a { display: block; min-height: 44px; padding: 10px 0; color: var(--muted); font-size: 12px; border-bottom: 1px solid #edf0f5; }
.toc a:hover { color: var(--brand); }
.toc li:last-child a { border: 0; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.detail-main .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.note { margin: 20px 0; padding: 16px 19px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--muted); font-size: 12px; line-height: 1.8; }
.note strong { color: var(--ink-soft); }
details { border-bottom: 1px solid var(--line); }
summary { min-height: 52px; padding: 14px 0; color: var(--ink-soft); font-weight: 600; }
details[open] > summary { color: var(--brand); }
details > p { padding-bottom: 15px; color: var(--muted); }

/* Comparison and local saved-list feedback */
.compare-wrap { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--line); border-radius: 13px; background: white; }
.compare-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 13px; line-height: 1.8; }
.compare-table th, .compare-table td { padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare-table th { width: 160px; background: #f1f3f8; color: var(--muted); font-size: 11px; font-weight: 600; }
.compare-table td { min-width: 210px; max-width: 330px; overflow-wrap: anywhere; }
.compare-table td:last-child, .compare-table th:last-child { border-right: 0; }
.compare-table tr:last-child td, .compare-table tr:last-child th { border-bottom: 0; }
.compare-table h2, .compare-table h3 { margin: 10px 0 6px; font-size: 18px; }
.compare-table .resource-icon { width: 48px; height: 48px; }
.compare-table a { color: var(--brand); }
.compare-table .tag { margin: 3px 2px 3px 0; }
.compare-table .button { margin-top: 12px; }
.compare-tray { position: fixed; z-index: 70; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 20px; width: min(720px, calc(100% - 32px)); padding: 15px 18px; transform: translateX(-50%); border: 1px solid #d2d7f3; border-radius: 14px; background: #ffffff; box-shadow: 0 7px 45px rgb(23 36 72 / 18%); }
.tray-label { flex: 1 1 auto; color: var(--ink-soft); font-size: 12px; font-weight: 600; }
.tray-label small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 400; }
.tray-count { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; margin-right: 8px; border-radius: 7px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 700; }
.tray-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.tray-actions .button { min-height: 44px; font-size: 11px; padding-inline: 15px; }
.toast { position: fixed; z-index: 100; bottom: max(110px, calc(env(safe-area-inset-bottom) + 100px)); left: 50%; width: max-content; max-width: calc(100% - 32px); transform: translateX(-50%); padding: 13px 21px; border: 1px solid #3b4963; border-radius: 10px; background: #1e2b43; color: white; box-shadow: 0 8px 28px rgb(22 37 63 / 15%); font-size: 12px; line-height: 1.7; text-align: center; }

/* Footer */
.site-footer { margin-top: 40px; padding: 49px 0 24px; border-top: 1px solid var(--line); background: white; }
.footer-grid { display: grid; grid-template-columns: 1.75fr 1fr 1fr 1fr; gap: 45px; padding-bottom: 38px; }
.footer-brand .brand { margin-bottom: 15px; }
.footer-brand .brand-mark { width: 31px; height: 31px; flex-basis: 31px; }
.footer-brand .brand-word { font-size: 19px; }
.footer-brand p { max-width: 300px; color: var(--muted); font-size: 11px; line-height: 1.9; }
.footer-links h2, .footer-links h3, .footer-links strong { display: block; margin: 3px 0 13px; color: var(--ink-soft); font-size: 11px; font-weight: 650; }
.footer-links a { display: block; width: fit-content; min-height: 44px; padding-block: 11px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.footer-links a:hover { color: var(--brand); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 30px; padding-top: 21px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.8; }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--ink-soft); text-decoration: underline; }
.footer-bottom > div { display: flex; flex-wrap: wrap; gap: 18px; }

/* Completed template variants: readable inner pages and safe narrow layouts. */
h1, h2, h3, h4 { word-break: normal; overflow-wrap: break-word; hyphens: manual; }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 0; margin: 0; padding: 0; list-style: none; }
.breadcrumb li { display: flex; align-items: baseline; min-width: 0; max-width: 100%; }
.breadcrumb li + li::before { content: "/"; padding: 0 10px; color: #a0a8b6; }
.breadcrumb a, .breadcrumb [aria-current] { min-width: 0; overflow-wrap: anywhere; }
.breadcrumb [aria-current] { color: var(--ink-soft); }
.simple-page { max-width: 880px; padding-bottom: 28px; }
.simple-page .prose { max-width: 76ch; }
.simple-page .page-header { padding-bottom: 12px; }
.page-header h1, .detail-title h1 { overflow-wrap: anywhere; word-break: normal; text-wrap: pretty; }
.result-summary > span { display: block; margin-top: 3px; font-size: 10px; }
.quick-filters > span { color: var(--muted); font-size: 11px; }
.directory-toolbar > .text-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; font-size: 11px; }
.browse-all-row { display: flex; justify-content: center; align-items: center; padding: 28px 0 3px; }
.browse-all-row .button { min-width: 210px; }
.collection-card { display: grid; grid-template-columns: 39px minmax(0, 1fr); column-gap: 14px; row-gap: 0; }
.collection-card > .collection-icon { grid-column: 1; grid-row: 1; }
.collection-card > h2, .collection-card > h3 { align-self: center; grid-column: 2; grid-row: 1; margin: 0; }
.collection-card > p { grid-column: 1 / -1; margin-top: 15px; }
.collection-card > span:not(.collection-icon) { display: flex; align-items: center; gap: 8px; grid-column: 1 / -1; margin-top: 16px; color: var(--brand); font-size: 10px; font-weight: 600; }
.collection-card > span:not(.collection-icon) svg { width: 14px; height: 14px; margin-left: auto; }
.category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.category-grid .collection-card { grid-template-rows: 41px 1fr auto; padding: 24px; }
.category-grid .collection-card h2 { font-size: 16px; }
.category-grid .collection-card p { font-size: 12px; line-height: 1.8; }
.category-checklist { display: grid; grid-template-columns: 175px minmax(0, 1fr); gap: 22px; margin: 0 0 32px; padding: 25px 27px; border: 1px solid #dce5dc; border-radius: 12px; background: #f0f6ef; }
.category-checklist h2 { margin: 1px 0 0; color: #34533f; font-size: 17px; line-height: 1.5; }
.category-checklist ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 25px; margin: 0; padding: 0; list-style: none; }
.category-checklist li { display: flex; align-items: flex-start; gap: 9px; color: #526a57; font-size: 12px; line-height: 1.8; }
.category-checklist li svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 3px; color: #5c8b62; }
.detail-heading { align-items: flex-start; }
.detail-heading .detail-logo { margin-top: 7px; }
.detail-heading > .save-button { margin-top: 4px; }
.detail-title .eyebrow { margin-bottom: 10px; color: var(--muted); font-size: 9px; }
.detail-title .card-tags { margin-top: 13px; }
.detail-title .tag { min-height: 34px; }
.detail-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 29px; }
.detail-actions .button { min-height: 48px; }
.detail-actions .compare-button { padding: 10px 18px; border: 1px solid var(--line); background: white; font-size: 13px; font-weight: 650; }
.detail-actions .compare-button:hover, .detail-actions .compare-button[aria-pressed="true"] { padding: 10px 18px; border-color: var(--brand-line); background: var(--brand-soft); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 17px; margin-top: 25px; color: var(--muted); font-size: 11px; line-height: 1.9; }
.article-meta > * + * { position: relative; }
.article-meta > * + *::before { content: "·"; position: absolute; left: -10px; }
.article-intro { color: var(--ink-soft); font-size: 17px; line-height: 1.9; }
.guide-layout .page-header h1 { font-size: clamp(34px, 3.5vw, 49px); line-height: 1.15; }
.aside-guide-link { display: block; min-height: 44px; padding: 12px 0; border-bottom: 1px solid #edf0f5; color: var(--muted); font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.aside-guide-link:last-child { border-bottom: 0; }
.aside-guide-link:hover { color: var(--brand); text-decoration: underline; }
.source-list a { display: flex; flex-wrap: wrap; align-items: center; max-width: 100%; min-height: 44px; column-gap: 7px; row-gap: 3px; overflow-wrap: anywhere; }
.source-list a > strong { min-width: 0; color: var(--brand); overflow-wrap: anywhere; }
.source-list a > span { display: block; flex-basis: 100%; min-width: 0; color: var(--muted); font-size: 11px; font-weight: 400; overflow-wrap: anywhere; }
.source-list a svg { width: 14px; height: 14px; flex: 0 0 14px; }
.prose .source-list { padding-left: 0; }
.prose .source-list li { padding-left: 0; }
.table-scroll { width: 100%; max-width: 100%; margin: 25px 0; overflow: auto; overscroll-behavior-x: contain; border: 1px solid var(--line); border-radius: 10px; background: white; }
.prose .table-scroll table { display: table; width: 100%; max-width: none; min-width: 590px; margin: 0; overflow: visible; border: 0; border-radius: 0; }
.table-scroll th, .table-scroll td { overflow-wrap: break-word; }
.table-scroll:focus-visible { outline-offset: 3px; }
.search-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; max-width: 100%; }
.search-filters label { color: var(--muted); font-size: 11px; }
.search-filters label:not(:first-child) { margin-left: 9px; }
.search-filters select { max-width: 230px; min-height: 44px; padding: 8px 29px 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink-soft); font-size: 12px; }
.search-filters select:last-child { max-width: 145px; }
.search-results { padding-bottom: 15px; }
.contribution-form { display: grid; gap: 0; max-width: 720px; margin: 28px 0; padding: 27px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.contribution-form label { display: block; margin: 20px 0 7px; color: var(--ink-soft); font-size: 13px; font-weight: 600; line-height: 1.75; }
.contribution-form label:first-child { margin-top: 0; }
.contribution-form input, .contribution-form select, .contribution-form textarea { display: block; width: 100%; max-width: 100%; min-height: 48px; padding: 10px 13px; border: 1px solid #cfd5e2; border-radius: 8px; color: var(--ink); background: #fcfcfe; font-size: 16px; line-height: 1.7; }
.contribution-form textarea { min-height: 145px; resize: vertical; }
.contribution-form input::placeholder, .contribution-form textarea::placeholder { color: var(--muted); }
.contribution-form input:focus, .contribution-form select:focus, .contribution-form textarea:focus { border-color: var(--brand); background: white; }
.contribution-form .button { justify-self: start; margin-top: 23px; }
#contribution-text { white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; }
.noscript-notice { width: min(1280px, calc(100% - 32px)); margin: 20px auto; padding: 17px 20px; border: 1px solid #e6d9ad; border-radius: 9px; color: #78633a; background: #faf5e7; font-size: 12px; line-height: 1.8; }
.tray-label { display: flex; align-items: center; gap: 12px; }
.tray-label > svg { width: 23px; height: 23px; color: var(--brand); flex: 0 0 23px; }
.tray-label > span { min-width: 0; }
.tray-label .tray-count { min-width: 18px; height: 18px; margin-right: 2px; border-radius: 4px; font-size: 10px; }
.saved-link [data-saved-count] { margin-left: 3px; font-size: 10px; font-variant-numeric: tabular-nums; }
.button[data-save][aria-pressed="true"] { border-color: #b8c0f4; background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1px rgb(72 84 235 / 5%); }
.button[data-save][aria-pressed="true"]:hover { border-color: var(--brand); background: #e4e8ff; color: var(--brand-dark); }
.button[data-save][aria-pressed="true"] svg { fill: rgb(72 84 235 / 12%); }
.empty-state > .search-form { max-width: 650px; margin: 25px auto; }
.empty-state > .text-link { display: inline-flex; align-items: center; min-height: 44px; margin-left: 12px; }

/* Responsive: keep the content and every filter available on small screens. */
@media (min-width: 1450px) {
  .hero { padding-top: 75px; padding-bottom: 64px; }
}
@media (max-width: 1190px) {
  .header-inner { gap: 25px; }
  .desktop-nav { gap: 20px; }
  .hero-grid { gap: 38px; }
  .hero h1 { font-size: 57px; }
  .hero-art { padding-inline: 20px; }
  .stack-map { padding-inline: 0; }
  .directory-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 24px; }
  .directory-layout .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-layout { gap: 28px; grid-template-columns: minmax(0, 1fr) 265px; }
  .footer-grid { gap: 28px; }
}
@media (max-width: 960px) {
  .container { width: calc(100% - 48px); }
  .header-inner { min-height: 72px; gap: 22px; }
  .desktop-nav { gap: 16px; }
  .desktop-nav a { font-size: 12px; }
  .desktop-nav a[aria-current="page"]::after { bottom: -13px; }
  .header-actions > .button { padding-inline: 12px; font-size: 11px; }
  .hero { padding-top: 45px; }
  .hero-grid { gap: 29px; grid-template-columns: 1.1fr 1fr; }
  .hero h1 { font-size: 48px; }
  .hero-lede { font-size: 15px; }
  .hero-art { padding: 18px 17px 15px; }
  .node-main, .node-eval { margin-inline: 8px; }
  .stack-node { padding: 12px; gap: 9px; }
  .stack-node strong { font-size: 11px; }
  .stack-node small { font-size: 9px; }
  .stack-node .icon-tile { width: 32px; height: 32px; flex-basis: 32px; }
  .stack-topline { font-size: 8px; }
  .directory-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .filter-sidebar { padding: 0; }
  .filter-group { display: flex; align-items: stretch; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; margin-bottom: 8px; padding: 3px 1px 10px; }
  .filter-group > h2, .filter-group > h3, .filter-group > h4, .filter-group-title { display: none; }
  .filter-link { flex: 0 0 auto; min-height: 44px; margin: 0; padding: 9px 13px; border-color: var(--line); background: white; white-space: nowrap; }
  .filter-link .filter-count { padding-left: 2px; }
  .sidebar-note { display: none; }
  .directory-layout .resource-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .resource-card { padding-inline: 16px; }
  .card-top { gap: 9px; }
  .card-name h2, .card-name h3 { font-size: 14px; }
  .resource-icon { width: 37px; height: 37px; flex-basis: 37px; font-size: 16px; }
  .guide-grid { gap: 16px; }
  .guide-card-body { padding: 19px; }
  .guide-card h2, .guide-card h3 { font-size: 16px; }
  .guide-cover { padding: 22px; min-height: 145px; }
  .guide-cover strong { font-size: 21px; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 85px; }
  .container { width: calc(100% - 40px); }
  .header-inner { min-height: 68px; gap: 10px; justify-content: space-between; }
  .brand-word { font-size: 20px; }
  .brand-mark { width: 32px; height: 32px; flex-basis: 32px; }
  .desktop-nav { display: none; }
  .header-actions { margin-left: auto; gap: 5px; }
  .header-actions > .button { min-height: 44px; padding-inline: 12px; }
  .mobile-toggle { display: inline-flex; }
  .mobile-only { display: block; }
  .hero { padding: 39px 0 34px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 31px; }
  .hero-copy { max-width: 620px; }
  .hero h1 { max-width: 560px; font-size: clamp(40px, 7.3vw, 55px); }
  .hero-lede { max-width: 560px; margin-bottom: 23px; font-size: 15px; line-height: 1.85; }
  .eyebrow { margin-bottom: 16px; font-size: 9px; }
  .hero-art { max-width: 570px; width: 100%; padding: 20px 25px; }
  .stack-map { grid-template-columns: 1fr 1fr; gap: 15px; }
  .node-main, .node-eval { margin-inline: 30px; }
  .stack-node { min-height: 65px; padding: 12px 16px; }
  .stack-node strong { font-size: 12px; }
  .stack-node small { font-size: 10px; }
  .node-memory, .node-tool { display: flex; }
  .node-memory .icon-tile, .node-tool .icon-tile { margin: 0; }
  .stack-topline { margin-bottom: 18px; font-size: 9px; }
  .stack-caption { margin-top: 16px; }
  .trust-inner { justify-content: flex-start; gap: 12px 24px; font-size: 10px; min-height: 0; padding-block: 16px; }
  .trust-inner strong { font-size: 11px; }
  .section { padding-block: 36px; }
  .section + .section { padding-top: 5px; }
  .section-heading { gap: 15px; margin-bottom: 21px; }
  .section-heading h2 { font-size: 24px; }
  .section-heading p { font-size: 12px; }
  .section-heading > a { font-size: 11px; }
  .resource-grid, .directory-layout .resource-grid, .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .resource-card { padding: 19px 17px 9px; }
  .card-top { margin-bottom: 13px; }
  .card-description { font-size: 12px; }
  .collection-grid { gap: 13px; }
  .collection-card { padding: 19px 16px; gap: 11px; }
  .collection-card h2, .collection-card h3, .collection-card strong { font-size: 13px; }
  .collection-icon { width: 35px; height: 35px; flex-basis: 35px; }
  .guide-grid { grid-template-columns: minmax(0, 1fr); }
  .guide-card { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
  .guide-cover { height: 100%; min-height: 180px; }
  .guide-card-body { padding: 21px; }
  .callout { align-items: flex-start; flex-direction: column; gap: 22px; padding: 29px; }
  .callout h2 { font-size: 24px; }
  .detail-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .detail-aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-top: 0; }
  .aside-card { margin: 0; }
  .detail-summary { font-size: 16px; }
  .page-header { padding-top: 18px; }
  .page-header > p, .page-header .lede { font-size: 15px; }
  .prose { font-size: 15px; }
  .prose h2 { font-size: 23px; }
  .site-footer { padding-top: 35px; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 25px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand p { max-width: 440px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 9px; padding-bottom: 10px; }
  .footer-links a { min-height: 44px; padding-block: 11px; }
}
@media (max-width: 490px) {
  .container { width: calc(100% - 32px); }
  .header-inner { min-height: 64px; }
  .brand { gap: 8px; }
  .brand-word { font-size: 19px; }
  .brand small { font-size: 9px; }
  .brand-mark { width: 31px; height: 31px; flex-basis: 31px; }
  .header-actions > .button { display: none; }
  .hero { padding-top: 34px; }
  .hero h1 { font-size: 43px; margin-bottom: 18px; }
  .hero-lede { font-size: 14px; }
  .hero-actions { gap: 10px; }
  .hero-actions .button { min-height: 47px; padding-inline: 16px; font-size: 12px; }
  .hero-meta { gap: 8px 16px; font-size: 10px; }
  .hero-art { padding: 18px; }
  .stack-topline { font-size: 8px; letter-spacing: .1em; }
  .stack-topline > span:last-child { font-size: 7px; }
  .stack-map { gap: 13px; }
  .stack-node { padding: 12px; }
  .node-main, .node-eval { margin-inline: 17px; }
  .node-memory, .node-tool { display: block; }
  .node-memory .icon-tile, .node-tool .icon-tile { margin-bottom: 7px; }
  .stack-caption { font-size: 9px; }
  .trust-inner { gap: 12px 17px; }
  .trust-inner > span { gap: 6px; }
  .trust-inner svg { width: 14px; height: 14px; }
  .trust-inner strong { font-size: 10px; }
  .section-heading { align-items: flex-start; }
  .section-heading h2 { font-size: 22px; }
  .section-heading p { font-size: 11px; line-height: 1.8; }
  .section-heading > a { max-width: 110px; gap: 5px; min-height: 44px; padding-top: 2px; font-size: 10px; text-align: right; }
  .search-form { padding-left: 12px; gap: 8px; }
  .search-form > svg { width: 18px; height: 18px; flex-basis: 18px; }
  .search-form input[type="search"] { font-size: 16px; }
  .search-form button { padding-inline: 13px; font-size: 11px; }
  .search-form kbd { display: none; }
  .search-main { margin-bottom: 16px; }
  .directory-toolbar { gap: 9px; margin-bottom: 13px; }
  .result-summary { font-size: 11px; }
  .sort-control { gap: 5px; font-size: 10px; }
  .sort-control select, select.sort-control { padding-left: 9px; font-size: 10px; }
  .quick-filters { gap: 6px; margin-bottom: 17px; }
  .filter-chip { padding-inline: 10px; font-size: 10px; }
  .resource-grid, .directory-layout .resource-grid, .related-grid, .detail-main .related-grid { grid-template-columns: minmax(0, 1fr); }
  .resource-card { padding: 21px 21px 10px; }
  .card-top { gap: 13px; margin-bottom: 14px; }
  .resource-icon { width: 44px; height: 44px; flex-basis: 44px; font-size: 18px; }
  .card-name h2, .card-name h3 { font-size: 16px; }
  .card-category { font-size: 10px; }
  .resource-card .save-button { width: 44px; min-width: 44px; flex-basis: 44px; }
  .card-description { min-height: 0; font-size: 13px; line-height: 1.8; margin-bottom: 15px; }
  .card-tags { margin-bottom: 15px; }
  .tag { font-size: 10px; }
  .source-status { font-size: 10px; }
  .compare-button { padding-inline: 7px; font-size: 11px; }
  .collection-grid { grid-template-columns: minmax(0, 1fr); }
  .collection-card { padding: 20px; gap: 15px; }
  .collection-icon { width: 41px; height: 41px; flex-basis: 41px; }
  .collection-card h2, .collection-card h3, .collection-card strong { font-size: 15px; }
  .collection-card p, .collection-card small { font-size: 12px; }
  .guide-card { display: block; }
  .guide-cover { min-height: 154px; }
  .guide-cover strong { font-size: 25px; }
  .guide-card-body { padding: 22px; }
  .guide-card h2, .guide-card h3 { font-size: 18px; }
  .guide-card p { font-size: 13px; }
  .guide-meta { font-size: 10px; }
  .callout { padding: 26px 23px; }
  .callout h2 { font-size: 23px; }
  .callout p { font-size: 12px; }
  .breadcrumb { padding-block: 18px; font-size: 10px; }
  .page-header h1 { font-size: 34px; }
  .page-header > p, .page-header .lede { font-size: 14px; }
  .detail-heading { align-items: flex-start; gap: 13px; }
  .detail-logo { width: 57px; height: 57px; flex-basis: 57px; font-size: 24px; border-radius: 13px; }
  .detail-title h1 { font-size: 31px; }
  .detail-title .tag { font-size: 9px; }
  .detail-summary { font-size: 15px; }
  .detail-aside { grid-template-columns: minmax(0, 1fr); }
  .prose { font-size: 14px; line-height: 1.95; }
  .prose h2 { margin-top: 30px; font-size: 22px; }
  .prose h3 { font-size: 17px; }
  .prose table { font-size: 11px; }
  .prose td, .prose th { padding: 12px; }
  .compare-tray { width: calc(100% - 24px); bottom: max(12px, env(safe-area-inset-bottom)); gap: 9px; padding: 11px 13px; flex-wrap: wrap; }
  .tray-label { font-size: 11px; }
  .tray-label small { font-size: 9px; }
  .tray-count { margin-right: 5px; }
  .tray-actions { gap: 5px; }
  .tray-actions .button { padding-inline: 10px; font-size: 10px; }
  .tray-actions .icon-button { width: 36px; flex-basis: 36px; padding: 8px; }
  .toast { font-size: 11px; padding-inline: 17px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-links h2, .footer-links h3, .footer-links strong { font-size: 12px; }
  .footer-links a { font-size: 12px; }
  .footer-brand p { font-size: 12px; }
}
@media (max-width: 359px) {
  .container { width: calc(100% - 28px); }
  .hero h1 { font-size: 38px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .button { width: 100%; }
  .hero-art { padding: 15px; }
  .stack-node { padding: 11px; }
  .node-main, .node-eval { margin-inline: 8px; }
  .stack-topline > span:last-child { display: none; }
  .directory-toolbar { align-items: flex-start; flex-direction: column; gap: 4px; }
  .sort-control { align-self: flex-end; }
  .search-form { gap: 6px; }
  .search-form button { padding-inline: 10px; }
  .search-form input[type="search"] { width: 90px; }
  .compare-tray { align-items: stretch; flex-direction: column; }
  .tray-actions { justify-content: flex-end; }
  .toast { bottom: 155px; }
}
@media (max-width: 960px) {
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-checklist { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}
@media (max-width: 760px) {
  .hero { padding: 30px 0 25px; }
  .hero-grid { gap: 0; }
  .hero-copy { padding-bottom: 0; }
  .hero-art { display: none; }
  .hero-lede { margin-bottom: 20px; }
  .hero-meta { margin-top: 16px; }
  .header-actions > .submit-link { display: none; }
  .header-actions > .saved-link { display: inline-flex; gap: 6px; min-height: 44px; padding: 8px 10px; font-size: 11px; }
  .saved-link svg { width: 17px; height: 17px; }
  .category-grid .collection-card { padding: 22px; }
  .detail-actions .button { min-height: 46px; }
  .detail-heading .detail-logo { width: 67px; height: 67px; flex-basis: 67px; }
  .article-meta { margin-top: 20px; font-size: 10px; }
}
@media (max-width: 640px) {
  .category-checklist { padding: 22px; }
  .category-checklist ul { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .search-filters { display: grid; grid-template-columns: 52px minmax(0, 1fr); width: 100%; gap: 9px; }
  .search-filters label:not(:first-child) { margin-left: 0; }
  .search-filters select, .search-filters select:last-child { width: 100%; max-width: none; font-size: 13px; }
}
@media (max-width: 490px) {
  .category-grid { grid-template-columns: minmax(0, 1fr); }
  .collection-card { grid-template-columns: 41px minmax(0, 1fr); }
  .category-grid .collection-card { padding: 22px; }
  .category-grid .collection-card h2 { font-size: 16px; }
  .collection-card > p { margin-top: 15px; }
  .collection-card > span:not(.collection-icon) { font-size: 11px; }
  .detail-heading { display: grid; grid-template-columns: 48px minmax(0, 1fr) 38px; gap: 10px; }
  .detail-heading .detail-logo { width: 48px; height: 48px; margin-top: 5px; font-size: 22px; }
  .detail-heading > .save-button { width: 38px; padding: 8px; }
  .detail-title h1 { font-size: 29px; line-height: 1.2; }
  .detail-title .eyebrow { font-size: 8px; letter-spacing: .08em; }
  .detail-title .tag { min-height: 44px; }
  .detail-actions { gap: 9px; }
  .detail-actions .button, .detail-actions .compare-button { padding: 10px 13px; font-size: 12px; }
  .detail-actions .compare-button:hover, .detail-actions .compare-button[aria-pressed="true"] { padding: 10px 13px; }
  .article-intro { font-size: 15px; }
  .guide-layout .page-header h1 { font-size: 34px; }
  .contribution-form { padding: 20px; }
  .contribution-form label { font-size: 12px; }
  .contribution-form .button { width: 100%; }
  .simple-page { padding-bottom: 15px; }
  .tray-label { gap: 8px; }
  .tray-label > svg { width: 19px; height: 19px; flex-basis: 19px; }
  .tray-label strong { font-size: 11px; }
  .empty-state { padding-inline: 17px; }
}
@media (max-width: 359px) {
  .header-inner { gap: 5px; }
  .header-actions { gap: 2px; }
  .header-actions > .saved-link { padding-inline: 6px; font-size: 10px; }
  .detail-title h1 { font-size: 26px; }
  .detail-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .resource-card:hover { transform: none; }
}
@media print {
  .site-header, .hero-art, .filter-sidebar, .search-form, .save-button, .compare-button, .compare-tray, .toast, .mobile-nav, .site-footer { display: none !important; }
  body { background: white; color: black; font-size: 11pt; }
  .container { width: 100%; }
  .hero, .section { padding: 18px 0; }
  .hero-grid, .directory-layout, .detail-layout { display: block; }
  .resource-card, .aside-card { break-inside: avoid; box-shadow: none; }
  a { color: black; }
}

.compare-hint { color: var(--muted); font-size: 12px; margin-bottom: 12px; }
@media (min-width: 761px) { .compare-hint { display: none; } }

@media (max-width: 760px) {
  .guide-card.guide-card-featured { display: block; }
  .guide-card-featured .guide-card-body { padding: 22px; }
  .guide-card-featured h3 { font-size: 19px; }
}
