/* CreateWithAI Hub — a precise, editorial tool-catalogue look.
   Off-white surfaces, near-black ink, hairline grids with shared borders, wide display type, mono labels, one Anthropic-orange accent.
   Light by default; dark theme via [data-theme="dark"]. Square corners everywhere except item tiles. */
:root {
  --bg: #f2f1ee;
  --raised: #f8f7f5;
  --sunk: #e9e8e4;
  --ink: #101014;
  --ink-2: rgba(16, 16, 20, 0.82);
  --soft: rgba(16, 16, 20, 0.62);
  --faint: rgba(16, 16, 20, 0.44);
  --line: rgba(16, 16, 20, 0.14);
  --line-2: rgba(16, 16, 20, 0.36);
  --accent: #ad5130;
  --on-accent: #fff;
  --accent-wash: rgba(173, 81, 48, 0.09);
  --green: #017a54;
  --amber: #8a5800;
  --red: #b83a24;
  --violet: #6a3fd6;
  --warn: #b70228;
  --code-bg: #15151a;
  --code-head: #1e1e24;
  --code-ink: #ecebe7;
  --pop: 0 18px 40px -12px rgba(16, 16, 20, 0.28), 0 2px 6px rgba(16, 16, 20, 0.08);
  --display: 'Archivo', 'Arial Black', system-ui, sans-serif;
  --sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
  --ease: cubic-bezier(0.33, 1, 0.68, 1);
  --top-h: 56px;
  --side-w: 248px;
  --pad: 32px;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #101014;
  --raised: #17171c;
  --sunk: #1c1c22;
  --ink: #f2f1ee;
  --ink-2: rgba(242, 241, 238, 0.86);
  --soft: rgba(242, 241, 238, 0.64);
  --faint: rgba(242, 241, 238, 0.42);
  --line: rgba(242, 241, 238, 0.13);
  --line-2: rgba(242, 241, 238, 0.34);
  --accent: #d97757;
  --on-accent: #101014;
  --accent-wash: rgba(217, 119, 87, 0.12);
  --green: #3fc39a;
  --amber: #e2b04f;
  --red: #f0826b;
  --violet: #a98bff;
  --warn: #ff7a8a;
  --code-bg: #0b0b0e;
  --code-head: #15151a;
  --pop: 0 18px 40px -12px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
h1, h2, h3 { font-family: var(--display); font-weight: 640; font-stretch: 108%; letter-spacing: -0.025em; line-height: 1.05; margin: 0 0 0.5em; }
h1 { font-size: clamp(32px, 4vw, 52px); letter-spacing: -0.035em; }
h2 { font-size: 24px; }
h3 { font-size: 17px; letter-spacing: -0.015em; }
p { margin: 0 0 0.85em; }
code, pre, kbd { font-family: var(--mono); font-size: 13px; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--pad); }
.narrow { max-width: 760px; }
.muted { color: var(--soft); }
.small { font-size: 13px; }
.warn-text { color: var(--warn); }
.danger-text { color: var(--warn) !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; z-index: 100; font: 700 11px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.skip:focus { left: 8px; }
.inline { display: inline; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pre-wrap { white-space: pre-wrap; word-break: break-word; }
.accent { color: var(--accent); }
.icon { flex: none; display: block; }
.card-kicker, .rail, .side-h, .footer-h, .result-count, .eyebrow, .spec-title, .palette-group, .fb-label, .pager-meta, .col-count, legend {
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 20px; border: 1px solid var(--line-2);
  background: transparent; color: var(--ink); font: 700 11px/1 var(--mono); letter-spacing: 0.13em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  border-radius: 0; white-space: nowrap; transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s var(--ease);
}
.btn:hover { color: var(--ink); background: var(--sunk); border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn-ink { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-ink:hover { background: var(--ink); color: var(--bg); opacity: 0.86; }
.btn-terra { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-terra:hover { background: var(--accent); color: var(--on-accent); opacity: 0.9; }
.btn-ghost { border-color: var(--line-2); }
.btn-danger { background: var(--warn); border-color: var(--warn); color: #fff; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 10.5px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
.link-btn:hover { color: var(--accent); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; background: transparent; color: var(--soft); cursor: pointer; }
.icon-btn:hover { color: var(--ink); background: var(--sunk); }
.kbd-btn { font: 500 11px var(--mono); letter-spacing: 0.08em; color: var(--soft); background: var(--sunk); border: 1px solid var(--line); padding: 3px 7px; cursor: pointer; }

/* ---------- shell: sidebar + main column ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.nav-collapsed { --side-w: 64px; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--bg); z-index: 50; }
.side-top { display: flex; align-items: center; justify-content: space-between; height: var(--top-h); padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand:hover { color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; flex: none; background: var(--ink); color: var(--bg); font: 800 15px/1 var(--display); font-stretch: 125%; }
.brand-word { font: 750 11.5px/1 var(--display); font-stretch: 115%; letter-spacing: 0.01em; text-transform: uppercase; white-space: nowrap; }
.brand-word b { color: var(--accent); font-weight: 750; margin-left: 4px; }
.side-nav { flex: 1; overflow-y: auto; padding: 10px 0 14px; scrollbar-width: thin; }
.side-h { margin: 18px 16px 6px; font-size: 10px; color: var(--faint); }
.nav-link { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; padding: 7px 16px; color: var(--soft); text-decoration: none; font: 500 13.5px/1.3 var(--sans); background: none; border: 0; cursor: pointer; text-align: left; }
.nav-link:hover { color: var(--ink); background: var(--sunk); }
.nav-link[aria-current='page'] { color: var(--ink); background: var(--sunk); }
.nav-link[aria-current='page']::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; background: var(--accent); }
.nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-search { margin: 0 12px 4px; width: calc(100% - 24px); padding: 8px 10px; border: 1px solid var(--line-2); }
.nav-search kbd { margin-left: auto; font-size: 10px; color: var(--faint); }
.side-bottom { flex: none; border-top: 1px solid var(--line); padding: 6px 0; }
.side-expand { display: none; }
.nav-collapsed .sidebar .nav-label, .nav-collapsed .side-h, .nav-collapsed .sidebar .brand-word, .nav-collapsed .side-collapse { display: none; }
.nav-collapsed .side-top { justify-content: center; padding: 0; }
.nav-collapsed .nav-link { justify-content: center; padding: 10px 0; }
.nav-collapsed .nav-search { margin: 0 10px 6px; width: calc(100% - 20px); justify-content: center; }
.nav-collapsed .side-expand { display: flex; }
.main-col { min-width: 0; display: flex; flex-direction: column; }
main { flex: 1; }

.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; height: var(--top-h); padding: 0 0 0 var(--pad); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); }
.nav-open, .brand-mobile { display: none; }
/* quick links where the search bar used to be (search is in the sidebar and on Ctrl+K) */
.top-nav { display: flex; align-items: stretch; height: 100%; margin-left: calc(-1 * var(--pad)); }
.top-nav .top-link { border-right: 1px solid var(--line); }
.top-nav .top-link .icon { opacity: 0.7; }
.side-quick { display: none; }
.top-actions { display: flex; align-items: stretch; height: 100%; margin-left: auto; }
.top-actions > * { border-left: 1px solid var(--line); }
.top-actions .icon-btn { width: var(--top-h); height: 100%; }
.top-actions form { display: flex; }
.top-link { display: inline-flex; align-items: center; gap: 8px; padding: 0 18px; height: 100%; font: 500 11px var(--mono); letter-spacing: 0.13em; text-transform: uppercase; color: var(--soft); text-decoration: none; background: none; border: 0; cursor: pointer; }
.top-link:hover, .top-link[aria-current='page'] { color: var(--ink); background: var(--sunk); }
.top-cta { display: inline-flex; align-items: center; padding: 0 22px; height: 100%; background: var(--ink); color: var(--bg); font: 700 11px var(--mono); letter-spacing: 0.13em; text-transform: uppercase; text-decoration: none; }
.top-cta:hover { color: var(--bg); opacity: 0.88; }
.nav-scrim { display: none; }
.side-close { display: none; }

.flash { margin: 16px var(--pad); padding: 12px 16px; border: 1px solid; font-size: 14px; }
.flash ul { margin: 0; padding-left: 18px; }
.flash-ok { border-color: color-mix(in srgb, var(--green) 50%, transparent); background: color-mix(in srgb, var(--green) 8%, var(--bg)); }
.flash-error { border-color: color-mix(in srgb, var(--warn) 50%, transparent); background: color-mix(in srgb, var(--warn) 7%, var(--bg)); }

/* ---------- rails: "01 / SECTION" bars ---------- */
.rail { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 42px; padding: 0 var(--pad); border-bottom: 1px solid var(--line); background: var(--bg); }
.rail a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; }
.rail a:hover { color: var(--accent); }
.rail-meta { color: var(--faint); text-align: right; }

/* ---------- intro / hero ---------- */
.intro { border-bottom: 1px solid var(--line); }
.intro-inner { padding: 40px var(--pad) 36px; }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; align-items: center; padding-top: 64px; padding-bottom: 60px; }
.intro-grid.intro-solo { grid-template-columns: minmax(0, 1fr); }
.intro-solo .intro-main { margin: 0 auto; text-align: center; }
.intro-solo .intro-text { max-width: none; }
.intro-solo h1 { text-wrap: balance; }
.intro-solo .intro-text, .intro-solo .lede, .intro-solo .search-box { margin-left: auto; margin-right: auto; }
.intro-solo .search-box { text-align: left; }
.intro-text { max-width: 880px; }
.intro h1 { margin-bottom: 14px; }
.intro-home h1 { font-size: clamp(42px, 6vw, 84px); font-stretch: 112%; font-weight: 660; line-height: 0.96; letter-spacing: -0.045em; margin-bottom: 22px; }
.lede { color: var(--soft); font-size: 17px; line-height: 1.65; max-width: 62ch; margin-bottom: 22px; }
.search-box { display: flex; align-items: stretch; max-width: 720px; height: 54px; border: 1px solid var(--line-2); background: var(--raised); transition: border-color 0.15s, box-shadow 0.15s; }
.search-box:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-wash); }
.search-icon { color: var(--faint); margin: auto 4px auto 16px; }
.search-box input[type='search'], .search-box input { flex: 1; min-width: 0; border: 0; background: transparent; font: 16px var(--sans); color: var(--ink); padding: 0 10px; outline: none; }
.search-box input::placeholder { color: var(--faint); transition: opacity 0.25s; }
.search-box input.ph-out::placeholder { opacity: 0; }
.search-box .btn { height: auto; border: 0; padding: 0 24px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 20%, transparent); }

/* ---------- breadcrumbs ---------- */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 16px; font: 500 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.crumbs li + li::before { content: '/'; margin-right: 8px; }
.crumbs a { color: var(--soft); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.wrap > .crumbs:first-child { padding-top: 28px; }

/* ---------- category tabs ---------- */
.cat-bar { position: sticky; top: var(--top-h); z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.cat-scroll { display: flex; align-items: center; gap: 2px; height: 48px; padding: 0 var(--pad); overflow-x: auto; scrollbar-width: none; }
.cat-scroll::-webkit-scrollbar { display: none; }
/* without JS there are no arrows, so keep a thin scrollbar as the hint */
html:not(.js) .cat-scroll { scrollbar-width: thin; }
html:not(.js) .cat-scroll::-webkit-scrollbar { display: block; height: 4px; }
/* arrows + fading edges, shown only on the side that has more categories (toggled by app.js) */
.cat-arrow { position: absolute; top: 0; bottom: 0; z-index: 2; display: flex; align-items: center; width: 76px; padding: 0 10px; border: 0; cursor: pointer; color: var(--ink); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.cat-prev { left: 0; justify-content: flex-start; background: linear-gradient(90deg, var(--bg) 40%, transparent); }
.cat-next { right: 0; justify-content: flex-end; background: linear-gradient(270deg, var(--bg) 40%, transparent); }
.cat-arrow span { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line-2); background: var(--raised); box-shadow: 0 2px 8px -3px rgba(0, 0, 0, 0.25); transition: border-color 0.15s, color 0.15s; }
.cat-arrow:hover span { border-color: var(--accent); color: var(--accent); }
.cat-bar.can-prev .cat-prev, .cat-bar.can-next .cat-next { opacity: 1; pointer-events: auto; }
.cat-scroll.dragging { cursor: grabbing; user-select: none; }
.cat-scroll.dragging .cat { pointer-events: none; }
.cat { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; font: 500 11px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft); text-decoration: none; white-space: nowrap; transition: color 0.15s, background 0.15s; }
.cat:hover { color: var(--ink); background: var(--sunk); }
.cat .count { color: var(--faint); letter-spacing: 0.04em; }
.cat[aria-current='page'] { background: var(--ink); color: var(--bg); }
.cat[aria-current='page'] .count { color: color-mix(in srgb, var(--bg) 65%, transparent); }

/* ---------- subcategory / section chips ---------- */
.subcats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; }
.intro .subcats { margin: 18px 0 0; }
.subcat { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid var(--line); font: 500 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--soft); text-decoration: none; transition: all 0.15s; }
.subcat:hover { color: var(--ink); border-color: var(--line-2); }
.subcat .count { color: var(--faint); }
.subcat[aria-current='page'] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.subcat[aria-current='page'] .count { color: color-mix(in srgb, var(--bg) 65%, transparent); }

/* ---------- filter bar with dropdowns ---------- */
.filterbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding: 12px var(--pad); border-bottom: 1px solid var(--line); background: var(--bg); }
.fb-left, .fb-right { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.fb-label { display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; color: var(--faint); }
.dd { position: relative; }
.dd > summary { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px 0 12px; border: 1px solid var(--line); cursor: pointer; list-style: none; font: 500 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); user-select: none; transition: border-color 0.15s, background 0.15s; }
.dd > summary::-webkit-details-marker { display: none; }
.dd > summary:hover { border-color: var(--line-2); background: var(--raised); }
.dd[open] > summary { border-color: var(--ink); background: var(--raised); }
.dd[open] > summary .icon { transform: rotate(180deg); }
.dd > summary .icon { transition: transform 0.2s var(--ease); color: var(--faint); }
.dd.is-active > summary { border-color: var(--ink); color: var(--ink); }
.fgroup-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; background: var(--accent); color: var(--on-accent); font: 700 10px var(--mono); letter-spacing: 0; }
.dd-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 45; min-width: 270px; max-width: min(460px, calc(100vw - 32px)); background: var(--raised); border: 1px solid var(--ink); box-shadow: var(--pop); animation: dd-in 0.16s var(--ease); }
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px); } }
.dd-panel .opts { max-height: 340px; overflow-y: auto; padding: 8px; scrollbar-width: thin; }
.dd-panel .opts-2 { display: grid; grid-template-columns: 1fr 1fr; min-width: 440px; column-gap: 4px; }
.opts-sections { min-width: 300px; }
.dd-sec { margin: 10px 8px 4px; font: 500 10px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.dd-sec:first-child { margin-top: 2px; }
.dd-panel.align-right { left: auto; right: 0; }
.dd-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 14px; border-top: 1px solid var(--line); }
.fb-right .result-count { margin: 0 8px 0 0; color: var(--soft); }
.result-count .muted { color: var(--faint); }
.sort select { height: 34px; padding: 0 30px 0 12px; border: 1px solid var(--line); background: var(--raised) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23888' stroke-width='1.6'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E") no-repeat right 10px center; appearance: none; -webkit-appearance: none; font: 500 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); border-radius: 0; cursor: pointer; }
.opts { display: flex; flex-direction: column; gap: 1px; }
.opt { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 6px 8px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.opt:hover { background: var(--sunk); color: var(--ink); }
.opt input { margin: 0; width: 15px; height: 15px; accent-color: var(--accent); }
.opt-label { grid-column: 2; grid-row: 1; }
.opt-count { grid-column: 3; grid-row: 1; font: 500 11px var(--mono); color: var(--faint); font-variant-numeric: tabular-nums; }
.opt.is-empty { color: var(--faint); cursor: default; }
.opt.is-empty:hover { background: none; }
.fgroup .opt input[type='checkbox'] { grid-column: 1; grid-row: 1; appearance: none; -webkit-appearance: none; width: 16px; height: 16px; border: 1px solid var(--line-2); background: var(--bg); cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.fgroup .opt input[type='checkbox']:checked { background: var(--accent); border-color: var(--accent); }
.fgroup .opt input[type='checkbox']:disabled { opacity: 0.4; }
.tick { grid-column: 1; grid-row: 1; width: 16px; height: 16px; pointer-events: none; }
.tick path { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.25s var(--ease); }
input:checked + .tick path { stroke-dashoffset: 0; }
.opts-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.opts-tight .opt { padding: 3px 6px; font-size: 13px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; background: var(--accent-wash); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); color: var(--accent); font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; }
.chip span { font-size: 14px; line-height: 1; }
.chip:hover { background: var(--accent); color: var(--on-accent); }
.chip-clear { background: transparent; border-color: var(--line-2); color: var(--soft); }
.chip-clear:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- results + the card grid (shared hairline borders) ---------- */
.results { padding: 24px var(--pad) 56px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(286px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-row { grid-template-columns: repeat(4, minmax(0, 1fr)); border-left: 0; }
.card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 22px 22px 18px; background: var(--bg); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background 0.2s; }
.card-head { display: flex; gap: 14px; align-items: center; }
.card-title { flex: 1; min-width: 0; }
.card-kicker { margin: 1px 0 5px; font-size: 10px; letter-spacing: 0.14em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card h3 { margin: 0; font-size: 19px; font-stretch: 105%; line-height: 1.12; }
.card-link, .card-link:hover { text-decoration: none; color: inherit; }
.card-link::after { content: ''; position: absolute; inset: 0; }
.card-link:focus-visible { outline: none; }
.card:has(.card-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.card-save { position: relative; z-index: 2; margin: -4px -6px 0 0; }
.card-desc { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-note { margin: 0; padding: 8px 12px; border-left: 2px solid var(--accent); background: var(--accent-wash); font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
/* deals are good news: green */
.card-note-deal { border-left-color: var(--green); background: color-mix(in srgb, var(--green) 10%, var(--bg)); color: var(--green); font-weight: 600; }
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; position: relative; z-index: 2; }
.card-tags:empty { display: none; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.card-uses { margin: 0; font-size: 12.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ext-link { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 4px; flex: none; font: 700 10.5px var(--mono); letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.ext-link:hover { color: var(--accent); }
.js .card.pre { opacity: 0; transform: translateY(10px); }
.js .card.in { opacity: 1; transform: none; transition: opacity 0.45s var(--ease), transform 0.5s var(--ease), background 0.2s; transition-delay: calc(var(--i, 0) * 30ms); }

/* item tiles */
.tile { flex: none; display: inline-grid; place-items: center; border-radius: 22%; background: var(--tc, var(--accent)); color: #fff; font-family: var(--display); font-weight: 760; font-stretch: 112%; letter-spacing: -0.02em; line-height: 1; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(16, 16, 20, 0.12); }
.tile-img { object-fit: contain; background: #fff; padding: 6px; }

/* status tags */
.badges { display: inline-flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border: 1px solid; font: 500 10px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; text-decoration: none; }
.price-free, .badge-free { color: var(--green); border-color: color-mix(in srgb, var(--green) 55%, transparent); }
.price-freemium, .badge-freemium { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 55%, transparent); }
.price-paid, .price-unknown, .badge-paid { color: var(--soft); border-color: var(--line-2); }
.badge-oss { color: var(--soft); border-color: var(--line); }
.badge-official, .badge-featured { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.badge-featured { background: var(--accent-wash); }
.badge-new { color: var(--violet); border-color: color-mix(in srgb, var(--violet) 55%, transparent); }
.badge-sponsored { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 55%, transparent); background: color-mix(in srgb, var(--amber) 8%, transparent); }
.badge-deal { color: var(--green); border-color: color-mix(in srgb, var(--green) 55%, transparent); }
.badge-warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 55%, transparent); margin-left: 6px; }
.tag { display: inline-flex; align-items: center; padding: 3px 8px; border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
a.tag:hover { border-color: var(--accent); color: var(--accent); }
.tag-cat { background: var(--ink); border-color: var(--ink); color: var(--bg); font: 500 10.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
a.tag-cat:hover { color: var(--bg); opacity: 0.85; }
.tag-plain { border-style: dashed; }

.save-btn { display: inline-flex; align-items: center; gap: 7px; padding: 6px; background: none; border: 0; color: var(--faint); font: 700 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: color 0.15s; }
.save-btn:hover, .save-btn.is-saved { color: var(--accent); }
.save-btn.compact span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.save-btn.is-saved svg { animation: pop 0.3s var(--ease); }
@keyframes pop { 0% { transform: scale(0.75); } 70% { transform: scale(1.15); } }
.detail-actions .save-btn, .collection-intro .save-btn, .article-head .save-btn { height: 42px; padding: 0 16px; border: 1px solid var(--line-2); color: var(--ink); }
.detail-actions .save-btn:hover, .collection-intro .save-btn:hover, .article-head .save-btn:hover { background: var(--sunk); border-color: var(--ink); }
.detail-actions .save-btn.is-saved { color: var(--accent); border-color: var(--accent); }

.empty { padding: 32px; border: 1px dashed var(--line-2); max-width: 640px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 32px 0 0; flex-wrap: wrap; }
.pager-meta { color: var(--faint); }
.agent-promo { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; margin-top: 40px; padding: 18px 20px; border: 1px solid var(--line-2); background: var(--raised); }
/* category pages: the agent box sits to the right of the heading and search, so the hero stays short */
.intro-inner:has(#dir-promo .agent-promo) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 340px); gap: 20px clamp(24px, 4vw, 48px); align-items: center; }
#dir-promo .agent-promo { grid-template-columns: auto 1fr; gap: 14px; margin: 0; padding: 18px; }
#dir-promo .agent-promo .row-gap { grid-column: 1 / -1; }
#dir-promo .agent-icon { width: 38px; height: 38px; }
@media (max-width: 860px) {
  .intro-inner:has(#dir-promo .agent-promo) { grid-template-columns: minmax(0, 1fr); }
  #dir-promo .agent-promo { max-width: 720px; }
}
.agent-promo p { margin: 0; font-size: 14px; }
.agent-icon { display: grid; place-items: center; width: 44px; height: 44px; background: var(--ink); color: var(--bg); }
.row-gap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }

/* ---------- index lists, tiles, home sections ---------- */
.cat-about { border-top: 1px solid var(--line); }
.cat-about-body { padding: 28px var(--pad) 56px; }
.prose { max-width: 72ch; color: var(--ink-2); }
.prose p { margin-bottom: 1em; }
.cat-index { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); border-left: 1px solid var(--line); }
.cat-index li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cat-index a { display: flex; flex-direction: column; gap: 5px; height: 100%; padding: 20px 22px; text-decoration: none; transition: background 0.15s; }
.cat-index a strong { font: 640 17px var(--display); font-stretch: 105%; letter-spacing: -0.015em; }
.cat-index a:hover { background: var(--raised); color: var(--ink); }
.cat-index a:hover strong { color: var(--accent); }
.cat-index .muted { font-size: 13.5px; }
.home-rows { border-top: 1px solid var(--line); }
.row-section { border-bottom: 1px solid var(--line); }
.row-section > .grid, .row-section > .tile-grid, .row-section > .cat-index { border-top: 0; }
.row-section > .cat-index { border-left: 0; }
.tile-grid { display: grid; }
.tile-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile-grid > a { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; transition: background 0.15s; }
.tile-grid > a:hover { color: var(--ink); }
.col-tile { display: flex; flex-direction: column; gap: 6px; padding: 22px; }
.col-tile strong { font: 640 18px var(--display); font-stretch: 105%; letter-spacing: -0.015em; margin-top: 6px; }
.col-tile .muted { font-size: 13.5px; }
.col-count { color: var(--faint); }
.tile-stack, .mono-stack { display: flex; }
.tile-stack .tile, .mono-stack .tile { margin-right: -7px; box-shadow: 0 0 0 2px var(--bg); font-size: 11px !important; }
.lib-tile { display: flex; align-items: center; gap: 12px; padding: 18px 22px; font-weight: 500; }
.lib-tile > span:not(.tile) { flex: 1; display: flex; flex-direction: column; }
.lib-tile small { font: 500 10px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.lib-tile .icon { color: var(--faint); transition: transform 0.2s var(--ease); }
.lib-tile:hover .icon { transform: translateX(3px); }

/* ---------- detail page ---------- */
.detail { padding: 24px var(--pad) 72px; }
.detail-head { display: flex; gap: 22px; align-items: flex-start; padding: 6px 0 30px; border-bottom: 1px solid var(--line); margin-bottom: 0; }
.detail-head .tile { border-radius: 22%; }
.detail-title { flex: 1; min-width: 0; }
.detail-title h1 { margin-bottom: 10px; font-size: clamp(36px, 4.6vw, 64px); font-stretch: 110%; line-height: 0.98; letter-spacing: -0.04em; }
.detail-tagline { font-size: 18px; line-height: 1.55; color: var(--soft); max-width: 64ch; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.stamp { display: inline-flex; flex-direction: column; flex: none; margin: 6px 0 0; padding: 8px 12px; border: 1px solid color-mix(in srgb, var(--green) 55%, transparent); color: var(--green); font: 500 10px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.stamp b { font-weight: 700; font-size: 11px; color: var(--ink); }
.stamp br { display: none; }
.stamp-old { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 55%, transparent); }
.detail-actions { display: flex; flex-direction: column; gap: 8px; min-width: 220px; }
.detail-actions .btn { width: 100%; }
.detail-actions .row-gap { flex-wrap: nowrap; gap: 8px; }
.detail-actions .row-gap > * { flex: 1; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 0; align-items: start; }
.detail-main { padding-right: 40px; border-right: 1px solid var(--line); min-width: 0; }
.detail-main > section { padding: 30px 0 32px; border-bottom: 1px solid var(--line); }
.detail-main > section:last-child { border-bottom: 0; }
.detail-main > section > h2 { display: flex; align-items: baseline; gap: 12px; font-size: 26px; margin-bottom: 16px; }
.detail-main section > p, .detail-main ul { max-width: 70ch; }
.detail-main p, .detail-main li { color: var(--ink-2); }
.detail-main h3 { font: 600 14px var(--sans); letter-spacing: 0; margin: 16px 0 8px; }
.ticks { list-style: none; padding: 0; }
.ticks li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.ticks li::before { content: ''; position: absolute; left: 2px; top: 7px; width: 10px; height: 6px; border-left: 1.6px solid var(--accent); border-bottom: 1.6px solid var(--accent); transform: rotate(-45deg); }
.code-block { overflow: hidden; border: 1px solid var(--ink); margin-bottom: 12px; background: var(--code-bg); }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--code-head); color: rgba(236, 235, 231, 0.7); font: 500 11px var(--mono); letter-spacing: 0.06em; }
.copy-btn { font: 700 10px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--code-ink); background: transparent; border: 1px solid rgba(236, 235, 231, 0.3); padding: 5px 10px; cursor: pointer; }
.copy-btn:hover { border-color: var(--code-ink); }
.code-block pre { margin: 0; padding: 14px 16px; overflow-x: auto; color: var(--code-ink); line-height: 1.65; white-space: pre; }
.code-block pre.pre-wrap { white-space: pre-wrap; word-break: break-word; }
.detail-side { display: flex; flex-direction: column; gap: 0; position: sticky; top: calc(var(--top-h) + 0px); padding-left: 0; }
.detail-side > * { margin: 0; border-bottom: 1px solid var(--line); }
.detail-side > p.small { padding: 16px 0 0 24px; border-bottom: 0; }
.facts { padding: 20px 0 20px 24px; background: transparent; }
.facts dl { display: grid; grid-template-columns: 110px 1fr; gap: 0 14px; margin: 0; font-size: 13.5px; }
.facts dt { padding: 9px 0; border-top: 1px solid var(--line); font: 500 10.5px/1.8 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.facts dd { margin: 0; padding: 9px 0; border-top: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; color: var(--ink-2); }
.spec { padding-top: 22px; }
.spec-title { margin: 0 0 12px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 5px; }
.fact-links { display: flex; flex-direction: column; margin: 0 0 16px; border-top: 1px solid var(--line-2); }
.fact-links a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); font: 700 11px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; flex-wrap: wrap; }
.fact-links a:hover { color: var(--accent); }
.small-h { font: 500 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft); margin-bottom: 12px; }
.sources ul { list-style: none; padding: 0; margin: 0; font-size: 13px; counter-reset: src; }
.sources li { position: relative; padding-left: 28px; margin-bottom: 8px; color: var(--soft); }
.sources li::before { counter-increment: src; content: '[' counter(src) ']'; position: absolute; left: 0; font: 500 11px/1.8 var(--mono); color: var(--accent); }
.collect-form { display: flex; flex-direction: column; gap: 8px; }

.menu { position: relative; display: inline-flex; }
.menu > summary { list-style: none; cursor: pointer; width: 100%; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 300px; background: var(--raised); border: 1px solid var(--ink); box-shadow: var(--pop); display: flex; flex-direction: column; padding: 4px; animation: dd-in 0.16s var(--ease); }
.menu-list > a, .menu-list > button { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 0; background: none; text-align: left; font: 600 13.5px var(--sans); color: var(--ink); text-decoration: none; cursor: pointer; }
.menu-list > a:hover, .menu-list > button:hover { background: var(--sunk); color: var(--ink); }
.menu-list span { font-size: 12.5px; font-weight: 400; color: var(--soft); }

.conn { display: grid; grid-template-columns: 150px 1fr; gap: 0 16px; margin: 0 0 18px; font-size: 14px; }
.conn dt { padding: 9px 0; border-top: 1px solid var(--line); font: 500 10.5px/1.9 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.conn dd { margin: 0; padding: 9px 0; border-top: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.conn code { background: var(--sunk); padding: 2px 6px; }
.copy-inline { margin-left: 6px; padding: 3px 8px; border: 1px solid var(--line-2); background: transparent; color: var(--soft); font: 700 10px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; }
.copy-inline:hover { color: var(--ink); border-color: var(--ink); }
.client-tabs { border: 1px solid var(--line-2); background: var(--raised); padding: 0 16px 8px; }
.tab-list { display: none; }
.js .tab-list { display: flex; gap: 0; margin: 0 -16px 16px; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.tab { flex: none; height: 42px; padding: 0 16px; border: 0; border-right: 1px solid var(--line); background: none; font: 500 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--soft); cursor: pointer; }
.tab:hover { color: var(--ink); background: var(--sunk); }
.tab[aria-selected='true'] { background: var(--ink); color: var(--bg); }
.js .tab-panel:not([hidden]) { animation: dd-in 0.22s var(--ease); }
.js .tab-panel .panel-title { display: none; }
.panel-title { font: 600 14px var(--sans); margin: 14px 0 8px; }
.snippet { margin-bottom: 10px; }
.snippet-variant { font: 500 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin: 6px 0; }
.changelog { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 14px; }
.changelog li { padding-left: 16px; border-left: 2px solid var(--accent); }
.changelog p { margin: 3px 0 0; }
.deal { border-left: 3px solid var(--green) !important; }
.deal-code code { font-size: 15px; background: var(--sunk); padding: 3px 8px; letter-spacing: 0.06em; }
.embed { padding: 18px 0 18px 24px; }
.embed summary { cursor: pointer; }
.embed textarea { width: 100%; margin: 8px 0; font-size: 12px; }
.badge-preview { margin: 10px 0 0; }
.badge-preview img { max-width: 100%; height: auto; }
.num { width: 84px; }
ul.plain { list-style: none; padding: 0; margin: 0; }

/* ---------- forms, auth, account ---------- */
select, input[type='text'], input[type='email'], input[type='password'], input[type='url'], input[type='search'], input[type='number'], input[type='date'], textarea {
  font: 14px var(--sans); color: var(--ink); background: var(--raised); border: 1px solid var(--line-2); border-radius: 0; padding: 9px 11px; max-width: 100%;
}
select:focus, input:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--accent-wash); }
.search-box input:focus, .palette-form input:focus { box-shadow: none; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack label, .field { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 14px; }
.stack label.check, label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.auth-wrap { padding: 56px var(--pad) 80px; display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 440px; border: 1px solid var(--line-2); background: var(--raised); padding: 32px; }
.auth-card h1 { font-size: 32px; }
.auth-card .btn { width: 100%; }
.page-head { padding: 32px 0 18px; }
.card-form { border: 1px solid var(--line-2); background: var(--raised); padding: 26px; margin-bottom: 56px; }
fieldset { border: 1px solid var(--line); padding: 14px 16px; margin: 0; }
legend { padding: 0 6px; }
.account { padding-bottom: 64px; }
.account-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.account-grid aside { display: flex; flex-direction: column; gap: 16px; }
.account-grid aside .facts, .account-grid aside details { padding: 18px; border: 1px solid var(--line-2); background: var(--raised); }
.plain-list { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.danger summary { cursor: pointer; font-weight: 600; color: var(--warn); }
.inline-form { flex-direction: row; flex-wrap: wrap; align-items: end; margin-bottom: 18px; }
.collection-item { display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.collection-item .card { border: 0; }
.collection-item form { padding: 0 22px 14px; }
.danger-row { margin-top: 30px; }
.social { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.social .btn { width: 100%; }
.or { display: flex; align-items: center; gap: 10px; color: var(--faint); font: 500 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; margin: 6px 0 0; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.token-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.new-token code { word-break: break-all; font-size: 13px; }
.saved-lists { margin-top: 24px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; }
.footer-grid > * { padding: 36px var(--pad) 40px; border-right: 1px solid var(--line); }
.footer-grid > *:last-child { border-right: 0; }
.footer-brand p { margin-top: 16px; max-width: 40ch; color: var(--soft); font-size: 14px; }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col a { text-decoration: none; color: var(--ink-2); font-size: 14px; }
.footer-col a:hover { color: var(--accent); }
.footer-h { margin: 0 0 6px; color: var(--accent); }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0; padding: 14px var(--pad); border-top: 1px solid var(--line); font: 500 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }

/* ---------- search palette ---------- */
.palette { width: min(680px, calc(100vw - 32px)); max-height: min(72vh, 600px); padding: 0; border: 1px solid var(--ink); border-radius: 0; background: var(--raised); color: var(--ink); box-shadow: var(--pop); margin-top: 10vh; overflow: hidden; }
.palette[open] { display: flex; flex-direction: column; animation: dd-in 0.18s var(--ease); }
.palette::backdrop { background: rgba(16, 16, 20, 0.45); backdrop-filter: blur(2px); }
.palette-form { display: flex; align-items: center; gap: 12px; padding: 0 14px; height: 58px; border-bottom: 1px solid var(--line-2); color: var(--faint); }
.palette-form input[type='search'] { flex: 1; height: 100%; border: 0; background: transparent; font: 17px var(--sans); padding: 0; }
.palette-results { overflow-y: auto; padding: 6px; }
.palette-hint { padding: 14px 12px; margin: 0; color: var(--faint); font-size: 13.5px; }
.palette-group { margin: 12px 12px 4px; color: var(--faint); font-size: 10px; }
.palette-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; text-decoration: none; border-left: 2px solid transparent; }
.palette-item > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.palette-item strong { font: 640 15px var(--display); font-stretch: 104%; letter-spacing: -0.01em; }
.palette-item .muted.small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-item > .muted.small { flex: none; max-width: 40%; font: 500 10px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.palette-item[aria-selected='true'], .palette-item:hover { background: var(--sunk); color: var(--ink); border-left-color: var(--accent); }
.palette-all { color: var(--accent); font-weight: 600; }

/* ---------- collections, articles, misc ---------- */
.collection-card { gap: 10px; }
.collection-intro { margin: 0 0 22px; padding: 20px 22px; border: 1px solid var(--line-2); border-left: 3px solid var(--accent); background: var(--raised); }
.collection-intro .prose { margin-bottom: 12px; }
.day-group { margin-bottom: 36px; }
.day-head { font: 500 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft); padding-bottom: 10px; margin: 0; }
.article { padding-top: 28px; padding-bottom: 72px; }
.article-head { max-width: 820px; margin-bottom: 30px; }
.article-head h1 { font-size: clamp(36px, 5vw, 64px); font-stretch: 110%; line-height: 0.98; letter-spacing: -0.04em; }
.eyebrow { color: var(--accent); margin-bottom: 10px; }
.byline { margin-bottom: 14px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 48px; align-items: start; }
.article-side { position: sticky; top: calc(var(--top-h) + 24px); }
.toc { padding: 16px; border: 1px solid var(--line); }
.toc ol { margin: 0; padding-left: 18px; font-size: 13.5px; display: flex; flex-direction: column; gap: 6px; }
.article-body { max-width: 70ch; font-size: 17px; line-height: 1.75; }
.article-body h2 { margin-top: 1.8em; font-size: 28px; }
.article-body h3 { margin-top: 1.4em; font-size: 20px; }
.article-body ul, .article-body ol { padding-left: 22px; margin: 0 0 1em; }
.article-body blockquote { margin: 0 0 1em; padding: 4px 18px; border-left: 3px solid var(--accent); color: var(--soft); }
.article-body :not(pre) > code { background: var(--sunk); padding: 1px 5px; font-size: 0.86em; }
.article-body img { border: 1px solid var(--line); }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.article-cards { margin: 1.2em 0 1.6em; font-size: 15px; line-height: 1.55; }
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; }
.video-embed { position: relative; aspect-ratio: 16 / 9; margin: 0 0 1.4em; border: 1px solid var(--ink); background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 8px 0 0; }
.narrow-wide { max-width: 920px; padding-bottom: 64px; }
.narrow-wide h2 { margin-top: 38px; }
.connect-url { padding: 20px 22px; border: 1px solid var(--line-2); background: var(--raised); }
.connect-url code { font-size: 15px; background: var(--sunk); padding: 3px 8px; }

/* ---------- admin ---------- */
.admin { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 32px; padding-top: 28px; padding-bottom: 64px; }
.admin-nav { display: flex; flex-direction: column; position: sticky; top: calc(var(--top-h) + 20px); align-self: start; border: 1px solid var(--line); }
.admin-nav a { padding: 8px 12px; text-decoration: none; font-size: 13.5px; color: var(--soft); border-bottom: 1px solid var(--line); }
.admin-nav a:last-child { border-bottom: 0; }
.admin-nav a:hover { background: var(--sunk); color: var(--ink); }
.admin-nav a[aria-current='page'] { background: var(--ink); color: var(--bg); }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.admin-head h1 { font-size: 30px; margin: 0; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.admin .facts { padding: 16px 18px; border: 1px solid var(--line); background: var(--raised); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-bottom: 20px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; }
.stat b { font: 660 28px var(--display); font-stretch: 108%; }
.stat span { font: 500 10px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
a.stat:hover { background: var(--raised); color: var(--ink); }
.table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); font-size: 14px; background: var(--bg); }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font: 500 10.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); background: var(--raised); }
.pill { display: inline-block; padding: 1px 7px; margin-left: 6px; border: 1px solid var(--line-2); font: 500 10px/1.6 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.pill-published, .pill-active, .pill-resolved, .pill-done { color: var(--green); border-color: color-mix(in srgb, var(--green) 50%, transparent); margin-left: 0; }
.pill-draft { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 50%, transparent); margin-left: 0; }
.pill-archived, .pill-rejected, .pill-ignored, .pill-dismissed, .pill-hidden, .pill-expired { color: var(--faint); margin-left: 0; }
.pill-pending, .pill-new, .pill-open, .pill-warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, transparent); margin-left: 0; }
.admin-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.admin-form fieldset { margin-bottom: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--raised); }
.form-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.form-side { position: sticky; top: calc(var(--top-h) + 20px); max-height: calc(100vh - var(--top-h) - 36px); overflow-y: auto; }
.field-label { font-size: 13.5px; }
.field input, .field textarea, .field select { width: 100%; }
.mono-input { font-family: var(--mono) !important; font-size: 13px !important; }
.narrow-form { max-width: 720px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.row-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.row-form input:not([type='checkbox']) { width: auto; flex: 1 1 140px; }
.row-form .num { flex: 0 0 72px; }
.value-list { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.filter-admin .facts { margin-bottom: 12px; }
.tabs { display: flex; gap: 0; margin-bottom: 16px; flex-wrap: wrap; border: 1px solid var(--line); width: fit-content; }
.tabs a { padding: 7px 14px; text-decoration: none; font: 500 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; border-right: 1px solid var(--line); }
.tabs a:last-child { border-right: 0; }
.tabs a[aria-current='page'] { background: var(--ink); color: var(--bg); }
.submission { margin-bottom: 12px; }
.sub-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.sub-head h2 { margin: 0; }
.inline-details { display: inline-block; position: relative; }
.inline-details summary { list-style: none; }
.inline-details[open] form { position: absolute; right: 0; top: 110%; z-index: 5; background: var(--raised); border: 1px solid var(--ink); padding: 14px; width: 270px; box-shadow: var(--pop); }
.clip { display: block; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fv-group { margin-bottom: 8px; }
.fv-group p { margin: 0 0 2px; }
.price-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.platform-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.platform-form input[name='description'], .platform-form textarea { width: 100%; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .grid-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-row > .card:nth-child(n + 4) { display: none; }
}
@media (max-width: 1120px) {
  .intro-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .tile-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  :root { --pad: 22px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-102%); transition: transform 0.25s var(--ease); box-shadow: var(--pop); }
  .nav-collapsed .sidebar { width: 280px; }
  .nav-collapsed .sidebar .nav-label, .nav-collapsed .side-h, .nav-collapsed .sidebar .brand-word { display: revert; }
  .nav-collapsed .nav-link { justify-content: flex-start; padding: 7px 16px; }
  .side-collapse, .side-expand, .nav-collapsed .side-expand { display: none !important; }
  .nav-open-state .sidebar { transform: none; }
  .nav-open-state .nav-scrim { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(16, 16, 20, 0.4); cursor: pointer; }
  .nav-open { display: inline-grid; margin-left: -10px; }
  /* drawer: close button left of the logo */
  .side-close { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-left: -10px; flex: none; }
  .side-top, .nav-collapsed .side-top { justify-content: flex-start; gap: 4px; padding: 0 8px 0 16px; }
  .brand-mobile { display: inline-flex; }
  .brand-mobile .brand-word { font-size: 11.5px; }
  .topbar { gap: 10px; }
  .top-nav { margin-left: 0; }
  .top-nav .top-link:first-child { border-left: 1px solid var(--line); }
  .top-actions { margin-left: auto; }   /* theme, Login / account links sit on the right */
  .intro-grid { grid-template-columns: minmax(0, 1fr); padding-top: 40px; padding-bottom: 40px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-main { padding-right: 0; border-right: 0; }
  .detail-side { position: static; border-top: 1px solid var(--line); }
  .facts, .embed, .detail-side > p.small { padding-left: 0; }
  .detail-head { flex-wrap: wrap; }
  .detail-title { flex-basis: calc(100% - 100px); }
  .detail-head > .stamp { order: 3; }
  .detail-actions { order: 4; width: 100%; flex-direction: row; flex-wrap: wrap; }
  .detail-actions > * { flex: 1 1 180px; }
  .grid-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-row > .card:nth-child(n + 3) { display: flex; }
  .grid-row > .card:nth-child(n + 5) { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > * { border-bottom: 1px solid var(--line); }
  .footer-grid > *:nth-child(2n) { border-right: 0; }
  .article-layout, .account-grid, .form-cols { grid-template-columns: minmax(0, 1fr); }
  .article-side, .form-side { position: static; max-height: none; }
  .admin { grid-template-columns: minmax(0, 1fr); }
  .admin-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .admin-nav a { border-bottom: 0; border-right: 1px solid var(--line); }
  .two-col, .tile-grid-3 { grid-template-columns: 1fr; }
  .table { display: block; overflow-x: auto; }
  .agent-promo { grid-template-columns: auto 1fr; }
  .agent-promo .row-gap { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  :root { --pad: 16px; }
  .top-actions .top-cta { padding: 0 14px; }
  .top-link { padding: 0 12px; }
  .intro-home h1 { font-size: clamp(38px, 11vw, 52px); }
  .grid, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .grid-row { grid-template-columns: minmax(0, 1fr); }
  .grid-row > .card:nth-child(n + 4) { display: none; }
  .tile-grid-4 { grid-template-columns: 1fr; }
  .filterbar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .fb-left { flex-wrap: wrap; gap: 6px; min-width: 0; }
  .fb-left .dd > summary { white-space: nowrap; }
  .fb-left::-webkit-scrollbar { display: none; }
  .fb-right { justify-content: space-between; }
  .dd { position: static; }
  .dd-panel { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; max-width: none; max-height: 70vh; display: flex; flex-direction: column; }
  .dd-panel .opts { max-height: none; flex: 1; }
  .dd-panel .opts-2 { min-width: 0; grid-template-columns: 1fr; }
  .facts dl, .conn { grid-template-columns: 1fr; }
  .facts dt, .conn dt { padding-bottom: 0; }
  .facts dd, .conn dd { border-top: 0; padding-top: 2px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > * { border-right: 0; }
  .menu-list { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; max-height: 70vh; overflow-y: auto; }
  .search-box .btn { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .card.pre { opacity: 1; transform: none; }
}
@media print {
  .js .card.pre { opacity: 1; transform: none; }
  .sidebar, .topbar { display: none; }
  .shell { display: block; }
}

/* ---------- small fixes ---------- */
.fb-right { margin-left: auto; }
.top-link { white-space: nowrap; }
@media (max-width: 640px) {
  .rail-meta { display: none; }
  .top-actions .icon-btn { width: 44px; }
  .top-link { padding: 0 10px; }
  .brand-mobile .brand-word { font-size: 10px; }
  .topbar { gap: 4px; }
}
@media (max-width: 380px) {
  .brand-mobile .brand-word { display: none; }
}
/* on phones the quick links move from the top bar into the navigation drawer */
.top-nav, .brand-mobile { flex-shrink: 0; }
@media (max-width: 1000px) {
  .topbar[data-signed-in] .brand-mobile .brand-word { display: none; }   /* signed in: Admin / Saved / Sign out need the room */
}
@media (max-width: 800px) {
  .topbar[data-signed-in] .top-nav { display: none; }
  .side-quick[data-signed-in] { display: block; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
}
@media (max-width: 760px) {
  .top-nav { display: none; }
  .side-quick { display: block; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
}
/* signed in on a phone: Admin / Saved / Sign out need the room, so the logo shows its mark only and Saved its icon */
@media (max-width: 640px) {
  .topbar[data-signed-in] .brand-mobile .brand-word, .topbar[data-signed-in] .top-link > span { display: none; }
}

/* ---------- page ruler (replaces the native scrollbar on desktop; built by app.js) ---------- */
.has-ruler { scrollbar-width: none; }
.has-ruler::-webkit-scrollbar { display: none; }
.has-ruler .main-col > main, .has-ruler .site-footer { padding-right: 34px; }
.ruler { position: fixed; right: 0; top: var(--top-h); bottom: 0; width: 60px; z-index: 35; overflow: hidden; cursor: crosshair; touch-action: none; user-select: none; }
.ruler[hidden], .ruler.idle { display: none; }
.ruler-bg { position: absolute; inset: 0; backdrop-filter: blur(9px); background: color-mix(in srgb, var(--bg) 55%, transparent);
  -webkit-mask-image: linear-gradient(to left, #000 40%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0.12) 80%, transparent);
  mask-image: linear-gradient(to left, #000 40%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0.12) 80%, transparent); }
.ruler-tape { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.rt { position: absolute; left: 0; right: 0; height: 0; }
.rt b { position: absolute; right: 0; top: 0; width: 10px; height: 1px; background: var(--ink); opacity: 0.32; }
.rt.major b { width: 20px; opacity: 0.75; }
.rt span { position: absolute; right: 25px; top: 0; transform: translateY(-50%); font: 500 9px var(--mono); letter-spacing: 0.08em; color: var(--ink); opacity: 0.5; }
.ruler-mark, .ruler-hover { position: absolute; left: 0; right: 0; top: 0; height: 0; pointer-events: none; will-change: transform; }
.ruler-mark i { position: absolute; right: 0; top: -1px; width: 60px; height: 2px; background: var(--accent); }
.ruler-mark span { position: absolute; right: 6px; top: 5px; font: 500 9.5px var(--mono); letter-spacing: 0.08em; color: var(--accent); background: color-mix(in srgb, var(--bg) 80%, transparent); padding: 0 2px; }
.ruler-hover { opacity: 0; transition: opacity 0.15s; }
.ruler-hover.on { opacity: 1; }
.ruler-hover i { position: absolute; right: 0; top: -1px; width: 60px; height: 1px; background: var(--ink); }
.ruler-hover span { position: absolute; right: 6px; bottom: 4px; font: 500 9.5px var(--mono); letter-spacing: 0.08em; color: var(--ink); }
@media print { .ruler { display: none; } }

/* ---------- tags: filled (box = former text colour, text = page background) ---------- */
.badge, .tag, .stamp { --tag: var(--soft); background: var(--tag) !important; border-color: var(--tag) !important; color: var(--bg) !important; }
.price-free, .badge-free { --tag: var(--green); }
.price-freemium, .badge-freemium, .badge-sponsored { --tag: var(--amber); }
.price-paid, .price-unknown, .badge-paid, .badge-oss { --tag: var(--soft); }
.badge-official, .badge-featured { --tag: var(--accent); }
.badge-new { --tag: var(--violet); }
.badge-deal { --tag: var(--green); }
.badge-warn { --tag: var(--warn); }
.tag { --tag: var(--ink-2); }
.tag-more { --tag: var(--faint); }
.tag-cat { --tag: var(--ink); }
a.tag:hover, a.badge:hover { --tag: var(--accent); color: var(--bg) !important; }
.stamp { --tag: var(--green); }
.stamp b { color: var(--bg); }
.stamp-old { --tag: var(--amber); }

/* ---------- shine: gloss on solid surfaces, light sweeps on buttons, a cursor spotlight on cards ---------- */
:root { --shine: rgba(255, 255, 255, 0.5); --gloss: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 60%); --glow: color-mix(in srgb, var(--accent) 13%, transparent); }
:root[data-theme='dark'] { --shine: rgba(255, 255, 255, 0.16); --gloss: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 60%); --glow: color-mix(in srgb, var(--accent) 24%, transparent); }

/* glossy tags, icon tiles, brand mark */
.badge, .tag, .stamp { background-image: var(--gloss) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28); }
.tile:not(.tile-img) { background-image: linear-gradient(155deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.06) 45%, rgba(0, 0, 0, 0.1)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -1px 0 rgba(0, 0, 0, 0.14), 0 2px 6px -1px color-mix(in srgb, var(--tc, var(--accent)) 45%, transparent); }
.tile-stack .tile, .mono-stack .tile { box-shadow: 0 0 0 2px var(--bg), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.brand-mark { background-image: var(--gloss); box-shadow: inset 0 1px 0 var(--shine); }

/* light sweep across solid buttons on hover */
.btn-ink, .btn-terra, .top-cta, .brand-mark, .cat[aria-current] { position: relative; overflow: hidden; isolation: isolate; }
.btn-ink, .btn-terra, .top-cta, .cat[aria-current] { background-image: var(--gloss); box-shadow: inset 0 1px 0 var(--shine); }
.btn-ink::after, .btn-terra::after, .top-cta::after, .brand-mark::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 60%; pointer-events: none; z-index: 1;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.42) 50%, transparent 80%);
  transform: translateX(-160%) skewX(-12deg);
}
:root[data-theme='dark'] .btn-ink::after, :root[data-theme='dark'] .top-cta::after, :root[data-theme='dark'] .brand-mark::after { background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.85) 50%, transparent 80%); }
.btn-ink:hover::after, .btn-terra:hover::after, .top-cta:hover::after, .brand:hover .brand-mark::after { transform: translateX(260%) skewX(-12deg); transition: transform 0.75s var(--ease); }
.btn-ink:hover, .top-cta:hover { opacity: 1; }

/* hover: cards and tiles keep their fill and get an orange outline */
.tile-grid > a { position: relative; overflow: hidden; }
.card, .tile-grid > a { transition: box-shadow 0.2s; }
.card:hover, .tile-grid > a:hover { box-shadow: inset 0 0 0 1px var(--accent); }
/* open Featured spot */
.card.feature-slot { padding: 14px; min-height: 178px; text-decoration: none; color: var(--soft); }
.card.feature-slot:hover { box-shadow: none; color: var(--accent); }
.feature-slot-inner { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px dashed var(--line-2); border-radius: 4px; font-weight: 600; font-size: 15px; text-align: center; padding: 16px; transition: border-color 0.2s, background 0.2s; }
.card.feature-slot:hover .feature-slot-inner, .card.feature-slot:focus-visible .feature-slot-inner { border-color: var(--accent); background: var(--accent-wash); }
.feature-slot-plus { font-size: 22px; line-height: 1; font-weight: 400; }
.feature-steps { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 8px; }
.reply-note { margin: 0; }
.card:hover .tile:not(.tile-img) { transform: translateY(-1px); }
.card .tile { transition: transform 0.25s var(--ease); }

/* the ruler's marker and the search field get a soft glow */
.ruler-mark i { box-shadow: 0 0 10px 1px color-mix(in srgb, var(--accent) 60%, transparent); }
.search-box:focus-within { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent), 0 10px 30px -14px color-mix(in srgb, var(--accent) 50%, transparent); }

@media (prefers-reduced-motion: reduce) {
  .btn-ink::after, .btn-terra::after, .top-cta::after, .brand-mark::after { display: none; }
  .card:hover .tile { transform: none; }
}

/* ---------- logo image in the brand mark ---------- */
.brand-mark { background-color: #151515; border-radius: 6px; }
.brand-mark img { display: block; width: 100%; height: 100%; border-radius: inherit; }

/* ---------- home sections: number, big heading, "View more" under it ---------- */
.home-sec { border-top: 1px solid var(--line); }
.sec-head { padding: 40px var(--pad) 22px; }
.sec-foot { display: flex; justify-content: flex-end; margin: 0 var(--pad); padding: 14px 0 34px; }
.sec-head h2 { margin: 0; font: 760 clamp(28px, 3.4vw, 44px)/1 var(--display); font-stretch: 112%; letter-spacing: -0.03em; }
.sec-more { display: inline-flex; align-items: center; gap: 4px; font: 600 11px var(--mono); letter-spacing: 0.13em; text-transform: uppercase; color: var(--accent); text-decoration: none; }
.sec-more .icon { transition: transform 0.2s var(--ease); }
.sec-more:hover { color: var(--accent); }
.sec-more:hover .icon { transform: translateX(3px); }
.home-sec > .grid, .home-sec > .tile-grid, .home-sec > .cat-index { margin: 0 var(--pad); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.sec-empty { margin: 0 var(--pad); padding: 26px 24px; border: 1px dashed var(--line-2); color: var(--soft); font-size: 15px; }
.home-rows { padding-bottom: 48px; }
.cat-tiles { border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-bottom: 56px; }

/* ---------- home hero: animated glitch background (drawn by app.js) ---------- */
.intro-home { position: relative; overflow: hidden; isolation: isolate; }
.intro-home > .intro-inner { position: relative; z-index: 1; }
.glitch-bg, .glitch-scan { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
/* quieter in the middle so the headline and search stay easy to read */
.glitch-bg {
  -webkit-mask-image: radial-gradient(ellipse 52% 58% at 50% 50%, rgba(0, 0, 0, 0.14), #000 80%);
  mask-image: radial-gradient(ellipse 52% 58% at 50% 50%, rgba(0, 0, 0, 0.14), #000 80%);
}
.glitch-scan {
  background: repeating-linear-gradient(180deg, transparent 0 2px, color-mix(in srgb, var(--ink) 5%, transparent) 2px 3px);
  opacity: 0.6;
}


/* ---------- home: AI Tools as video-style thumbnails (4:3 image, details over it) ---------- */
.home-sec > .thumb-grid { margin: 0 var(--pad); }
.thumb-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.thumb-card { position: relative; aspect-ratio: 4 / 3; overflow: hidden; isolation: isolate; background: #141418; color: #fff; outline: 1px solid var(--line); outline-offset: -1px; transition: outline-color 0.2s; }
.thumb-card:hover { outline-color: var(--accent); }
.thumb-media { position: absolute; inset: 0; z-index: -2; display: grid; place-items: center; }
.thumb-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.thumb-card:hover .thumb-media img { transform: scale(1.04); }
/* placeholder: the resource's colour, a fine grid and its icon */
.thumb-blank .thumb-media {
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 22px 22px,
    radial-gradient(120% 90% at 30% 15%, color-mix(in srgb, var(--tc) 90%, #fff 10%), color-mix(in srgb, var(--tc) 55%, #000) 70%);
  place-items: start start; padding: 14px 16px;
}
.thumb-blank .thumb-media .tile { box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
/* the details sit on a dark fade at the bottom of the image */
.thumb-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.55) 62%, rgba(0, 0, 0, 0.88)); }
.thumb-body { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 15px; }
.thumb-body h3 { margin: 0; font-size: 19px; font-stretch: 105%; line-height: 1.1; color: #fff; }
.thumb-body .card-link, .thumb-body .card-link:hover { color: #fff; }
.thumb-desc { margin: 0; font-size: 13px; line-height: 1.4; color: rgba(255, 255, 255, 0.82); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thumb-body .card-tags { margin-top: 2px; }
.thumb-card .card-save { position: absolute; top: 10px; right: 10px; z-index: 2; }
.thumb-card .save-btn.compact { color: #fff; background: rgba(0, 0, 0, 0.35); border-color: rgba(255, 255, 255, 0.25); backdrop-filter: blur(4px); }
@media (max-width: 1280px) { .thumb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .thumb-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- admin analytics: tracked links ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0; margin: 18px 0 28px; border-top: 1px solid var(--line-2); border-left: 1px solid var(--line-2); }
.stat-grid .stat { border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.table-scroll { overflow-x: auto; margin-bottom: 28px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .nowrap { white-space: nowrap; }
.track-table .badge { margin-left: 6px; }
.track-table th, .track-table td { padding: 10px 8px; font-size: 13.5px; vertical-align: middle; }
.track-table th { font-size: 10px; }
.track-table td:first-child { min-width: 150px; }
.track-table code { font-size: 12px; }
.track-table .link-cell { min-width: 205px; max-width: 260px; }
.track-table .link-cell code { overflow-wrap: anywhere; }
.track-table td:first-child { min-width: 0; }

/* ---------- home hero: the agent box under the search bar, same width ---------- */
.home-promo { max-width: 720px; margin: 16px auto 0; text-align: left; }
.home-promo .agent-promo { margin: 0; padding: 14px 16px; gap: 14px; background: color-mix(in srgb, var(--raised) 88%, transparent); backdrop-filter: blur(6px); }
.home-promo .agent-icon { width: 38px; height: 38px; }

/* ---------- home hero: "Trusted by 1.5k+ humans" between the description and the search bar ---------- */
.trust { display: inline-flex; align-items: center; gap: 4px; margin: -4px 0 20px; padding: 6px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: color-mix(in srgb, var(--raised) 88%, transparent); backdrop-filter: blur(6px); font-size: 14px; color: var(--soft); }
.trust b { color: var(--ink); font-weight: 600; }

/* ---------- home hero: "Feelin' lucky" next to Search, and its popup ---------- */
.search-box .btn-lucky { display: inline-flex; align-items: center; gap: 8px; height: auto; border: 0; border-left: 1px solid var(--line-2); padding: 0 18px; background: var(--raised); color: var(--ink); white-space: nowrap; }
.search-box .btn-lucky:hover { background: var(--sunk); color: var(--accent); }
.search-box .btn-lucky .icon { transition: transform 0.35s var(--ease); }
.search-box .btn-lucky:hover .icon { transform: rotate(90deg); }
@media (max-width: 640px) {
  .search-box .btn-lucky { padding: 0 14px; }
  .search-box .btn-lucky span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .search-box .btn { padding: 0 16px; }
}

.lucky { width: min(560px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--ink); border-radius: 0; background: var(--raised); color: var(--ink); box-shadow: var(--pop); overflow: hidden; }
.lucky[open] { animation: dd-in 0.18s var(--ease); }
.lucky::backdrop { background: rgba(16, 16, 20, 0.5); backdrop-filter: blur(3px); }
.lucky-close { position: absolute; top: 10px; right: 10px; }
.lucky-body { padding: 28px 28px 8px; }
.lucky-body.lucky-in { animation: lucky-in 0.32s var(--ease); }
@keyframes lucky-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.lucky-head { display: flex; align-items: center; gap: 16px; padding-right: 36px; margin-bottom: 16px; }
.lucky-head h2 { margin: 0; font-size: clamp(24px, 4vw, 32px); font-stretch: 108%; line-height: 1.05; letter-spacing: -0.03em; }
.lucky-head .card-kicker { margin-bottom: 6px; }
.lucky-tagline { margin: 0 0 10px; font-size: 17px; line-height: 1.5; }
.lucky-about { margin: 0 0 14px; font-size: 14.5px; line-height: 1.6; }
.lucky-about:empty, .lucky-ww:empty { display: none; }
.lucky-body .card-tags { margin-bottom: 12px; }
.lucky-ww { margin: 0 0 6px; }
.lucky-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px 28px 24px; }
.lucky-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.lucky-actions [data-l='link'] { align-self: stretch; height: 48px; }
.lucky[aria-busy='true'] .lucky-actions .btn-lucky-alt .icon { animation: lucky-spin 0.6s linear infinite; }
@keyframes lucky-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lucky-body.lucky-in, .lucky[open] { animation: none; } .lucky[aria-busy='true'] .btn-lucky-alt .icon { animation: none; } }

/* ---------- home hero: a rounded, raised search bar, so it reads differently from the square agent box under it ---------- */
.intro-home .search-box { height: 64px; padding: 6px; gap: 6px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--bg);
  box-shadow: 0 18px 40px -22px rgba(16, 16, 20, 0.45), 0 2px 0 rgba(16, 16, 20, 0.04); }
.intro-home .search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent), 0 18px 40px -22px color-mix(in srgb, var(--accent) 60%, transparent); }
.intro-home .search-icon { margin-left: 14px; color: var(--soft); }
.intro-home .search-box input { font-size: 17px; }
.intro-home .search-box .btn { border-radius: 999px; padding: 0 26px; }
.intro-home .search-box .btn-ink { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.intro-home .search-box .btn-ink:hover { background: var(--accent); color: var(--on-accent); opacity: 0.9; }
.intro-home .search-box .btn-lucky { border: 1px solid var(--line-2); background: transparent; padding: 0 18px; }
.intro-home .search-box .btn-lucky:hover { border-color: var(--accent); background: var(--accent-wash); }
:root[data-theme='dark'] .intro-home .search-box { box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.8); }
@media (max-width: 640px) {
  .intro-home .search-box { height: 58px; padding: 5px; gap: 4px; }
  .intro-home .search-icon { margin-left: 10px; }
  .intro-home .search-box .btn { padding: 0 16px; }
  .intro-home .search-box .btn-lucky { padding: 0 13px; }
}
/* grid children may shrink below their content (keeps the hero inside narrow screens) */
.intro-grid > * { min-width: 0; }
.search-box input { width: 0; }

/* ---------- sign-in: Google button, and the local-only email form ---------- */
.social { margin: 18px 0 6px; }
.btn-google { width: 100%; height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.dev-login { margin-top: 14px; }
.auth-card .flash { display: block; width: auto; margin-left: 0; margin-right: 0; }

/* ---------- Sign in with Google: Google's light style on the light theme, dark style on the dark theme ---------- */
.gsi-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 44px; padding: 0 12px; border-radius: 4px;
  background: #fff; border: 1px solid #747775; color: #1f1f1f; font: 500 14px/1 'Roboto', Arial, sans-serif; letter-spacing: 0.25px; text-transform: none; cursor: pointer; transition: background 0.2s, box-shadow 0.2s; }
.gsi-btn:hover { background: #f8f9fa; box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15); }
.gsi-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gsi-icon { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #fff; }
:root[data-theme='dark'] .gsi-btn { background: #131314; border-color: #8e918f; color: #e3e3e3; }
:root[data-theme='dark'] .gsi-btn:hover { background: #1f1f20; }
:root[data-theme='dark'] .gsi-icon { width: 28px; height: 28px; margin-left: -6px; }
.social { display: grid; gap: 10px; }
/* Sign in with GitHub: GitHub's dark button on the light theme, its light button on the dark theme */
.gh-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 44px; padding: 0 12px; border-radius: 4px;
  background: #24292f; border: 1px solid #24292f; color: #fff; font: 500 14px/1 'Roboto', Arial, sans-serif; letter-spacing: 0.25px; cursor: pointer; transition: background 0.2s; }
.gh-btn:hover { background: #32383f; }
.gh-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
:root[data-theme='dark'] .gh-btn { background: #f6f8fa; border-color: #d0d7de; color: #1f2328; }
:root[data-theme='dark'] .gh-btn:hover { background: #eaeef2; }

/* ---------- legal pages, contact, affiliate note ---------- */
.legal h2 { margin-top: 1.8em; font-size: 22px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.contact-list { list-style: none; padding: 0 !important; border-top: 1px solid var(--line); }
.contact-list li { display: flex; flex-direction: column; gap: 2px; padding: 14px 0; margin: 0; border-bottom: 1px solid var(--line); }

/* real logos: keep them icon-sized on the 4:3 card instead of filling it */
.thumb-media img.tile-img { width: 64px; height: 64px; object-fit: contain; padding: 8px; border-radius: 22%; transform: none; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.45); }
.thumb-card:hover .thumb-media img.tile-img { transform: none; }
.tile-stack .tile-img, .mono-stack .tile-img { padding: 3px; }
/* homepage screenshot fills the card; the logo sits on top, top-left */
.thumb-card:not(.thumb-blank) .thumb-media { place-items: start start; }
.thumb-media img.thumb-shot { position: absolute; inset: 0; object-position: top center; }
.thumb-card:not(.thumb-blank) .thumb-media img.tile-img { position: relative; margin: 14px 16px; width: 52px; height: 52px; }
/* logos fill the whole tile: their own background goes edge to edge, no white frame */
.tile.tile-img, .thumb-media img.tile-img, .tile-stack .tile-img, .mono-stack .tile-img { padding: 0; background: transparent; object-fit: cover; overflow: hidden; }

/* contact page: email first, then the four forms in a 2×2 grid */
.contact-page .page-head { margin-bottom: 24px; }
.contact-ico { flex: none; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.contact-primary { display: flex; align-items: center; gap: 18px; padding: 24px; border: 1.5px solid var(--accent); border-radius: 16px; background: color-mix(in srgb, var(--accent) 5%, var(--bg)); margin-bottom: 18px; }
.contact-primary .contact-ico { width: 52px; height: 52px; }
.contact-primary-body { flex: 1; min-width: 0; }
.contact-primary-body .eyebrow { margin: 0 0 4px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-family: var(--mono, monospace); }
.contact-email { display: inline-block; font-family: var(--display); font-size: clamp(20px, 3.2vw, 28px); font-weight: 700; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.contact-email:hover { color: var(--accent); }
.contact-primary-body p.muted { margin: 6px 0 0; font-size: 14px; }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.contact-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--ink); text-decoration: none; transition: border-color 0.2s; }
.contact-card:hover { border-color: var(--accent); color: var(--ink); }
.contact-card h2 { margin: 6px 0 0; font-size: 18px; line-height: 1.25; }
.contact-card p { margin: 0; font-size: 14px; line-height: 1.5; flex: 1; }
.contact-cta { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--accent); }
@media (max-width: 640px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-primary { flex-direction: column; align-items: flex-start; padding: 20px; }
  .contact-primary .btn { width: 100%; text-align: center; }
}
/* compact contact cards: icon left, text right, arrow */
.contact-grid { gap: 12px; }
.contact-card { flex-direction: row; align-items: flex-start; gap: 14px; padding: 16px 18px; border-radius: 14px; }
.contact-card .contact-ico { width: 36px; height: 36px; border-radius: 10px; }
.contact-card .contact-ico svg { width: 18px; height: 18px; }
.contact-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.contact-card h2 { margin: 0; font-size: 16px; }
.contact-card p { font-size: 13.5px; line-height: 1.45; }
.contact-arrow { flex: none; align-self: center; color: var(--accent); font-weight: 600; transition: transform 0.2s; }
.contact-card:hover .contact-arrow { transform: translateX(3px); }
.contact-card { align-items: center; }
.contact-page { padding-bottom: 72px; }
.contact-card { min-height: 74px; }

/* home: Articles row, 16:9 cards with the title over the image */
.home-sec > .article-grid { margin: 0 var(--pad); }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.article-card { position: relative; aspect-ratio: 16 / 9; overflow: hidden; isolation: isolate; background: #141418; color: #fff; outline: 1px solid var(--line); outline-offset: -1px; transition: outline-color 0.2s; }
.article-card:hover { outline-color: var(--accent); }
.article-media { position: absolute; inset: 0; z-index: -2; }
.article-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.article-card:hover .article-media img { transform: scale(1.04); }
.article-blank .article-media { background: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px) 0 0 / 22px 22px, linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px) 0 0 / 22px 22px, radial-gradient(120% 90% at 30% 15%, color-mix(in srgb, var(--accent) 85%, #fff 10%), color-mix(in srgb, var(--accent) 45%, #000) 75%); }
.article-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,0) 25%, rgba(0,0,0,.55) 60%, rgba(0,0,0,.88)); }
.article-card-body { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 5px; padding: 14px 16px 15px; }
.article-kind { align-self: flex-start; font: 600 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: 4px 6px; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.25); }
.article-card-body h3 { margin: 0; font-size: 18px; line-height: 1.15; color: #fff; }
.article-card-body .card-link, .article-card-body .card-link:hover { color: #fff; }
.article-desc { margin: 0; font-size: 13px; line-height: 1.4; color: rgba(255,255,255,.82); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 1100px) { .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .article-grid { grid-template-columns: minmax(0, 1fr); } }

/* admin: thumbnail picker */
.thumb-preview { aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--panel, rgba(0,0,0,.04)); border: 1px dashed var(--line); margin-bottom: 10px; overflow: hidden; }
.thumb-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* phones: the MCP URL box keeps its inner padding (the .facts phone rule removes it) */
@media (max-width: 860px) { .connect-url, .facts.connect-url { padding-left: 16px; padding-right: 16px; } }

/* ---------- user dashboard ---------- */
.dash { padding-top: 34px; }
.dash-head { display: flex; align-items: center; gap: 20px; padding: 26px; border: 1px solid var(--line); background: var(--raised); }
.dash-avatar .tile { border-radius: 50%; }
.dash-id { flex: 1; min-width: 0; }
.dash-kicker { margin: 0 0 4px; font: 600 11px var(--mono); letter-spacing: 0.13em; text-transform: uppercase; color: var(--accent); }
.dash-head h1 { margin: 0; font-size: clamp(30px, 4vw, 44px); line-height: 1.05; }
.dash-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 0; font-size: 13.5px; color: var(--soft); }
.dash-meta span { overflow-wrap: anywhere; }
.dash-meta span + span::before { content: '·'; margin-right: 16px; color: var(--faint); }
.dash-signout { flex: none; align-self: flex-start; }
.dash-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-left: 1px solid var(--line); margin-top: -1px; }
.dash-stats a { display: flex; flex-direction: column; gap: 4px; padding: 18px 22px; border: 1px solid var(--line); border-left: 0; text-decoration: none; color: var(--soft); font-size: 13px; transition: background 0.2s; }
.dash-stats a:hover { background: var(--accent-wash); }
.dash-stats b { font: 700 30px/1 var(--display); color: var(--ink); }
.dash-sec { margin-top: 46px; }
.dash-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dash-sec-head h2 { margin: 0; font-size: 24px; scroll-margin-top: calc(var(--top-h) + 16px); }
.dash-featured { display: flex; flex-wrap: wrap; justify-content: center; padding-left: 1px; }
/* each card carries its own frame (the row is centred, so the grid's outer lines would not line up) */
.dash-featured > .card { flex: 0 1 25%; min-width: 0; border: 1px solid var(--line); margin: 0 0 -1px -1px; }
.dash-sub { margin: 22px 0 10px; font: 600 11px var(--mono); letter-spacing: 0.13em; text-transform: uppercase; color: var(--faint); }
.dash-empty { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border: 1.5px dashed var(--line-2); }
.dash-empty p { margin: 0; }
.dash-empty p + p { margin-top: 3px; }
.dash-empty-ico { display: grid; place-items: center; flex: none; width: 44px; height: 44px; background: var(--accent-wash); color: var(--accent); }
.dash-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.dash-col { display: flex; flex-direction: column; gap: 6px; min-height: 132px; padding: 18px; border: 1px solid var(--line); background: var(--raised); text-decoration: none; color: inherit; transition: box-shadow 0.2s; }
a.dash-col:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.dash-col-ico { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: auto; background: var(--accent-wash); color: var(--accent); }
.dash-col-name { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.dash-col-new { border-style: dashed; border-width: 1.5px; border-color: var(--line-2); background: transparent; justify-content: space-between; }
.dash-col-new label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 14px; }
.dash-col-new .btn { align-self: flex-start; }
.dash-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.dash-list li { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.dash-req-kind { flex: none; min-width: 128px; font: 500 10.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.dash-req-title { flex: 1; min-width: 160px; font-weight: 500; overflow-wrap: anywhere; }
.dash-list-desc { flex: 1 1 100%; padding-left: 142px; }
.dash-status { flex: none; padding: 2px 9px; font: 600 10.5px/1.6 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid currentColor; }
.dash-status-wait { color: var(--amber); }
.dash-status-ok { color: var(--green); }
.dash-status-no { color: var(--soft); }
.dash-req-date { flex: none; min-width: 92px; text-align: right; }
.dash-settings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.dash-box { padding: 20px; border: 1px solid var(--line); background: var(--raised); }
.dash-box h3 { margin-top: 0; }
.dash-box .stack { margin-top: 12px; }
.dash-danger { border-color: color-mix(in srgb, var(--red) 35%, var(--line)); }
.dash-danger summary { cursor: pointer; list-style: none; }
.dash-danger summary::-webkit-details-marker { display: none; }
@media (max-width: 1000px) {
  .dash-settings { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .dash { padding-top: 18px; }
  .dash-head { flex-wrap: wrap; padding: 20px; gap: 14px; }
  .dash-head .tile { width: 56px !important; height: 56px !important; }
  .dash-signout { order: 3; width: 100%; }
  .dash-signout .btn { width: 100%; }
  .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-stats a { padding: 14px 16px; }
  .dash-stats b { font-size: 24px; }
  .dash-meta span + span::before { display: none; }
  .dash-meta { flex-direction: column; }
  .dash-req-kind { min-width: 0; flex-basis: 100%; }
  .dash-req-date { min-width: 0; text-align: left; }
  .dash-list-desc { padding-left: 0; }
  .dash-featured > .card { flex-basis: 100%; }
}
@media (min-width: 641px) and (max-width: 1000px) {
  .dash-featured > .card { flex-basis: 50%; }
}


/* home: "View more" as a clear button, and the info tooltip beside a section title (shown after a 0.5s hover) */
.sec-head { display: flex; align-items: center; gap: 10px; }
.sec-more-btn { height: 48px; padding: 0 26px; gap: 10px; border: 1px solid var(--accent); color: var(--on-accent); background: var(--accent); font-size: 12px; box-shadow: 0 6px 18px -8px var(--accent); }
.sec-more-btn:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.sec-more-btn .icon { transition: transform 0.2s var(--ease); }
.sec-more-btn:hover .icon { transform: translateX(3px); }
@media (max-width: 640px) { .sec-foot .sec-more-btn { width: 100%; } }
.info-tip { position: relative; display: inline-flex; }
.info-tip-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--faint); cursor: help; }
.info-tip-btn:hover, .info-tip-btn:focus-visible { color: var(--ink); }
.info-tip-text {
  position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: 30; width: max-content; max-width: min(260px, 70vw); padding: 9px 12px;
  background: var(--ink); color: var(--bg); font: 500 13px/1.45 var(--sans); letter-spacing: 0; text-transform: none; box-shadow: var(--pop);
  opacity: 0; visibility: hidden; transform: translate(-50%, 4px);
  transition: opacity 0.15s, transform 0.15s var(--ease), visibility 0s linear 0.15s;
}
.info-tip-text::after { content: ''; position: absolute; top: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--ink); }
.info-tip:hover .info-tip-text { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0.5s, 0.5s, 0.5s; transition-duration: 0.15s, 0.15s, 0s; }
.info-tip-btn:focus-visible + .info-tip-text, .info-tip.is-open .info-tip-text { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: none; } /* none, not delay 0: it also cancels a hover fade already waiting */
@media (prefers-reduced-motion: reduce) { .info-tip-text { transform: translate(-50%, 0); } }
.info-tip.is-dismissed .info-tip-text { opacity: 0; visibility: hidden; transition: none; }

/* /articles: a plain blog list, newest first (image, date and reading time, title, excerpt, author) */
.post-list { display: grid; gap: 0; margin: 0 0 56px; border-top: 1px solid var(--line-2); }
.post { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; padding: 28px 0; border-bottom: 1px solid var(--line); }
.post-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--sunk); border: 1px solid var(--line); }
.post-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s var(--ease); }
.post:hover .post-media img { transform: scale(1.03); }
.post-media-blank { display: grid; place-items: center; background: radial-gradient(120% 90% at 30% 15%, color-mix(in srgb, var(--accent) 80%, #fff 10%), color-mix(in srgb, var(--accent) 45%, #000) 80%); }
.post-media-blank img { width: 56px; height: 56px; object-fit: contain; opacity: 0.95; }
.post:hover .post-media-blank img { transform: none; }
.post-meta { margin: 0 0 8px; font: 600 11px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--soft); }
.post h2 { margin: 0 0 8px; font: 700 clamp(21px, 2.2vw, 26px)/1.2 var(--display); font-stretch: 105%; letter-spacing: -0.02em; }
.post h2 a { color: var(--ink); text-decoration: none; }
.post h2 a:hover { color: var(--accent); }
.post-excerpt { margin: 0 0 14px; max-width: 70ch; color: var(--ink-2); }
.post-author { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--soft); }
.post-author a { color: inherit; }
.post-avatar { width: 22px; height: 22px; border-radius: 50%; display: block; }
.byline .post-author { font-size: inherit; vertical-align: middle; }
@media (max-width: 720px) {
  .post { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 22px 0; }
}

/* cookie consent banner (live site only): bottom corner, two equal choices */
.consent { position: fixed; z-index: 90; left: 16px; right: 16px; bottom: 16px; max-width: 520px; margin-left: auto; padding: 16px 18px; background: var(--raised); color: var(--ink); border: 1px solid var(--line-2); box-shadow: var(--pop); display: grid; gap: 12px; }
.consent[hidden] { display: none; }
.consent p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.consent p a { color: var(--ink); }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.consent-actions .btn { height: 40px; }

/* admin: searchable "Resources used" picker */
.picker { display: grid; gap: 8px; }
.picker-field { position: relative; }
.picker-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.picker-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 9px; background: var(--accent-wash); border: 1px solid var(--line-2); font-size: 13px; }
.picker-chip button { border: 0; background: none; color: var(--soft); font-size: 16px; line-height: 1; width: 22px; height: 22px; cursor: pointer; }
.picker-chip button:hover { color: var(--red); }
.picker-input { width: 100%; }
.picker-list { position: absolute; z-index: 40; top: 100%; left: 0; right: 0; max-height: 280px; overflow-y: auto; margin: 4px 0 0; padding: 4px 0; list-style: none; background: var(--raised); border: 1px solid var(--line-2); box-shadow: var(--pop); }
.picker-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; cursor: pointer; font-size: 14px; }
.picker-list li small { color: var(--faint); white-space: nowrap; }
.picker-list li[aria-selected="true"], .picker-list li:hover { background: var(--sunk); }
.picker-list .picker-empty { color: var(--soft); cursor: default; }
.picker-count { margin: 0; }

/* MCP corner card (article and resource pages): slides up from the bottom right; a slim bar on phones */
.mcp-toast { position: fixed; z-index: 85; right: 20px; bottom: 20px; width: min(380px, calc(100vw - 32px)); padding: 16px 16px 16px 18px; background: var(--raised); color: var(--ink); border: 1px solid var(--line-2); box-shadow: var(--pop); display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; transform: translateY(calc(100% + 32px)); opacity: 0; transition: transform 0.38s var(--ease), opacity 0.25s; }
.mcp-toast[hidden] { display: none; }
.mcp-toast.is-in { transform: none; opacity: 1; }
.mcp-toast .agent-icon { width: 38px; height: 38px; }
.mcp-toast-text { padding-right: 26px; }
.mcp-toast-h { margin: 0 0 4px; font-weight: 600; font-size: 15px; line-height: 1.35; }
.mcp-toast-sub { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--soft); }
.mcp-toast-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.mcp-toast-x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; }
.agent-promo-end { margin: 48px 0 40px; }
.agent-promo-end p { line-height: 1.5; }
.agent-promo-end .muted { font-size: 13.5px; }
@media (max-width: 640px) {
  .mcp-toast { left: 0; right: 0; bottom: 0; width: auto; border-width: 1px 0 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); grid-template-columns: 1fr auto; align-items: center; gap: 8px 10px; }
  .mcp-toast .agent-icon, .mcp-toast-sub { display: none; }
  .mcp-toast-text { grid-column: 1 / -1; padding-right: 30px; }
  .mcp-toast-h { margin: 0; font-size: 14px; }
  .mcp-toast-actions { grid-column: 1 / -1; }
  .mcp-toast-actions .btn { flex: 1; }
  .mcp-toast-x { top: 4px; right: 4px; }
}
@media (prefers-reduced-motion: reduce) { .mcp-toast { transition: opacity 0.2s; transform: none; } }
@media print { .mcp-toast { display: none !important; } }
