/* The Local LLM Index — "blueprint / spec-sheet" aesthetic.
   Cool blueprint paper, navy ink, electric-blue + signal-orange. Bricolage Grotesque + DM Mono. */

:root {
  --bg: #eaeef4;
  --bg2: #e0e6ef;
  --surface: #ffffff;
  --ink: #0e1a2c;
  --muted: #51607a;
  --faint: #8794a8;
  --line: #d4dce8;
  --line2: #c2cdde;
  --blue: #1f5bff;
  --blue-soft: #e4ecff;
  --orange: #ff6a1a;
  --grid: rgba(31,91,255,.06);
}
[data-theme="dark"] {
  --bg: #0a1120; --bg2: #0d1426; --surface: #111b30; --ink: #e7edf7; --muted: #93a1ba;
  --faint: #5e6d87; --line: #1d2942; --line2: #2a3a59; --blue: #5b88ff; --blue-soft: #16223e;
  --orange: #ff7d3a; --grid: rgba(91,136,255,.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink); position: relative; min-height: 100vh;
  font-family: "DM Mono", ui-monospace, Menlo, monospace; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
}
.disp { font-family: "Bricolage Grotesque", system-ui, sans-serif; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 26px; position: relative; z-index: 1; }

/* ── Header ── */
header { border-bottom: 2px solid var(--ink); position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(8px); }
.head-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.brand .tag { background: var(--blue); color: #fff; font-family: "DM Mono", monospace; font-size: 10px; padding: 2px 7px; border-radius: 4px; letter-spacing: .05em; font-weight: 500; }
.head-actions { display: flex; align-items: center; gap: 15px; }
.head-actions a { color: var(--muted); text-decoration: none; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; transition: color .2s; }
.head-actions a:hover { color: var(--blue); }
.theme-btn { background: var(--surface); border: 1.5px solid var(--line2); color: var(--ink); width: 32px; height: 32px; border-radius: 6px; cursor: pointer; font-size: 13px; transition: border-color .2s, color .2s; }
.theme-btn:hover { border-color: var(--blue); color: var(--blue); }

/* ── Hero ── */
.hero { padding: 62px 0 30px; position: relative; }
.hero .kicker { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--blue); display: flex; align-items: center; gap: 10px; }
.hero .kicker::before, .hero .kicker::after { content: ""; height: 7px; width: 7px; border: 1.5px solid var(--blue); display: inline-block; }
.hero .kicker::after { content: none; }
.hero h1 { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: clamp(38px, 6vw, 76px); line-height: .98; letter-spacing: -.03em; margin-top: 18px; max-width: 15ch; }
.hero h1 mark { background: none; color: var(--blue); }
.hero h1 .ul { box-shadow: inset 0 -.14em 0 var(--orange); }
.hero .lede { margin-top: 22px; font-size: clamp(15px, 1.7vw, 18px); color: var(--muted); max-width: 60ch; }
.stats { display: flex; gap: 0; margin-top: 32px; max-width: 560px; border: 1.5px solid var(--ink); border-radius: 8px; overflow: hidden; background: var(--surface); }
.stat { flex: 1; padding: 16px 20px; border-right: 1px solid var(--line); }
.stat:last-child { border: none; }
.stat .num { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 30px; color: var(--ink); line-height: 1; }
.stat .num b { color: var(--blue); }
.stat .lbl { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-top: 7px; }

/* ── Toolbar ── */
.toolbar { position: sticky; top: 59px; z-index: 40; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); padding: 16px 0 12px; border-bottom: 1px solid var(--line); }
.search-row { display: flex; gap: 10px; flex-wrap: wrap; }
.search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 9px; background: var(--surface); border: 1.5px solid var(--line2); border-radius: 8px; padding: 10px 13px; transition: border-color .2s, box-shadow .2s; }
.search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.search svg { width: 15px; height: 15px; color: var(--faint); flex: none; }
.search input { flex: 1; border: none; background: none; color: var(--ink); font-family: "DM Mono", monospace; font-size: 13px; outline: none; }
.sort { display: flex; border: 1.5px solid var(--line2); border-radius: 8px; overflow: hidden; }
.sort button { background: var(--surface); border: none; border-right: 1px solid var(--line); padding: 10px 13px; cursor: pointer; font-family: "DM Mono", monospace; font-size: 11px; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); transition: all .16s; }
.sort button:last-child { border: none; }
.sort button.active { background: var(--ink); color: var(--bg); }
.chips { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.chip { background: var(--surface); border: 1.5px solid var(--line2); border-radius: 6px; padding: 6px 12px; cursor: pointer; font-family: "DM Mono", monospace; font-size: 11px; color: var(--muted); transition: all .16s; white-space: nowrap; }
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip .ct { opacity: .6; margin-left: 5px; }

/* ── Spec-sheet grid ── */
.meta-line { font-size: 11px; color: var(--faint); letter-spacing: .05em; padding: 20px 0 12px; text-transform: uppercase; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; padding-bottom: 56px; }
.card {
  background: var(--surface); border: 1.5px solid var(--line2); border-radius: 10px;
  text-decoration: none; color: inherit; position: relative; overflow: hidden;
  transition: transform .22s cubic-bezier(.2,.7,.2,1), border-color .22s, box-shadow .22s;
  opacity: 0; transform: translateY(12px);
}
.card.in { opacity: 1; transform: translateY(0); }
.card:hover { transform: translateY(-4px); border-color: var(--blue); box-shadow: 0 14px 30px -18px rgba(31,91,255,.4); }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; border-bottom: 1.5px solid var(--line); background: var(--bg2); font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.card-head .cat { color: var(--orange); }
.card-head .rk { color: var(--faint); }
.card-body { padding: 15px 16px; }
.card .name { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 18px; letter-spacing: -.01em; line-height: 1.15; }
.card .owner { font-size: 11px; color: var(--faint); margin-top: 2px; }
.card .desc { font-size: 13px; color: var(--muted); margin-top: 9px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spec { margin-top: 13px; border-top: 1px dashed var(--line2); }
.spec div { display: flex; justify-content: space-between; font-family: "DM Mono", monospace; font-size: 11.5px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.spec div:last-child { border: none; }
.spec .k { color: var(--faint); text-transform: uppercase; letter-spacing: .04em; font-size: 10px; }
.spec .v { color: var(--ink); }
.gauge { margin-top: 13px; display: flex; align-items: center; gap: 10px; }
.gauge .bar { flex: 1; height: 6px; background: var(--bg2); border-radius: 100px; overflow: hidden; border: 1px solid var(--line); }
.gauge .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--orange)); transition: width 1s cubic-bezier(.2,.7,.2,1); }
.gauge .score { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; color: var(--blue); font-size: 15px; width: 30px; text-align: right; }
.empty { grid-column: 1/-1; text-align: center; padding: 64px; color: var(--faint); }

/* ── Footer ── */
footer { border-top: 2px solid var(--ink); padding: 34px 0 56px; margin-top: 18px; }
.foot-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
footer .blurb { max-width: 46ch; color: var(--muted); font-size: 13px; }
footer .links { display: flex; flex-direction: column; gap: 7px; }
footer .links a { color: var(--muted); text-decoration: none; font-size: 12px; transition: color .2s; }
footer .links a:hover { color: var(--blue); }
.updated { font-size: 11px; color: var(--faint); margin-top: 22px; letter-spacing: .05em; }

/* ── Detail ── */
.detail { padding: 44px 0 40px; }
.crumb { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); margin-bottom: 22px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--blue); }
.detail h1 { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: clamp(30px, 5vw, 52px); line-height: 1.02; letter-spacing: -.02em; }
.detail .sub { color: var(--faint); margin-top: 10px; font-size: 13px; }
.detail .desc-big { font-size: clamp(16px, 2vw, 21px); color: var(--muted); margin-top: 22px; max-width: 62ch; }
.detail-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: 10px; margin: 28px 0; }
.detail-stats .box { background: var(--surface); border: 1.5px solid var(--line2); border-radius: 10px; padding: 15px 17px; }
.detail-stats .num { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 26px; color: var(--blue); }
.detail-stats .lbl { font-size: 10px; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); margin-top: 6px; }
.topics { display: flex; gap: 7px; flex-wrap: wrap; margin: 20px 0; }
.topic { font-size: 11px; color: var(--muted); background: var(--surface); border: 1.5px solid var(--line2); padding: 5px 11px; border-radius: 6px; }
.cta { display: inline-flex; align-items: center; gap: 9px; background: var(--ink); color: var(--bg); text-decoration: none; padding: 13px 24px; border-radius: 8px; font-family: "DM Mono", monospace; font-size: 13px; transition: transform .2s, background .2s; }
.cta:hover { transform: translateY(-2px); background: var(--blue); color: #fff; }
.related { margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--line); }
.related h2 { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 20px; margin-bottom: 16px; }

@media (max-width: 640px) { .wrap { padding: 0 16px; } .grid { grid-template-columns: 1fr; } .stats { flex-wrap: wrap; } }
@media (prefers-reduced-motion: reduce) { .card { opacity: 1; transform: none; transition: none; } .gauge .bar i { transition: none; } }

/* ── connective tissue (kstrip) + GEO about/faq — retrofit ── */
.kstrip { position: relative; z-index: 60; background: var(--ink); color: var(--bg);
  font-family: ui-monospace, "IBM Plex Mono", "Martian Mono", monospace; font-size: 10.5px; letter-spacing: .04em; }
.kstrip .wrap { display: flex; align-items: center; gap: 16px; padding: 7px 28px; flex-wrap: wrap; }
.kstrip a { color: var(--bg); text-decoration: none; opacity: .82; transition: opacity .2s; display: inline-flex; align-items: center; gap: 6px; }
.kstrip a:hover { opacity: 1; }
.kstrip .dot { width: 7px; height: 7px; background: var(--accent); border-radius: 1px; display: inline-block; }
.kstrip .sep { opacity: .3; }
.kstrip .grow { flex: 1; }
.about { border-top: 1px solid var(--line2); padding: 48px 0 8px; }
.about h2 { font-weight: 800; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; margin-bottom: 8px; }
.about .intro { color: var(--muted); max-width: 70ch; font-size: 14px; line-height: 1.7; margin-bottom: 28px; }
.faq { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.faq .q { background: var(--surface); border: 1px solid var(--line2); border-radius: 6px; padding: 20px 22px; }
.faq .q h3 { font-weight: 700; font-size: 15px; margin-bottom: 8px; color: var(--ink); }
.faq .q p { font-size: 12.5px; color: var(--muted); line-height: 1.65; }
@media (max-width: 640px) { .kstrip .wrap { padding: 7px 18px; } }
