
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #0a0a0a; --bg-elevated: #111111; --border: #1f1f1f; --border-hover: #2a2a2a;
  --text: #f5f5f5; --text-dim: #888; --text-faint: #555;
  --accent: #00ff88; --accent-dim: #00cc6a; --warn: #ffcc33; --bad: #ff5555;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; overflow-x: hidden;
}
body::before {
  content: ''; position: fixed; inset: 0;
  background-image: linear-gradient(rgba(0,255,136,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,136,.03) 1px, transparent 1px);
  background-size: 40px 40px; pointer-events: none; z-index: 0;
}
body::after {
  content: ''; position: fixed; top: 10%; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px; background: radial-gradient(circle, rgba(0,255,136,.08) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
.container { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 2rem 1.5rem 5rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dim); }

header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 3rem; }
.logo { font-size: 1rem; font-weight: 600; color: var(--accent); letter-spacing: -.02em; }
.nav { display: flex; gap: 1.25rem; font-size: .85rem; }
.nav a { color: var(--text-dim); }
.nav a:hover { color: var(--accent); }

.hero { padding: 1rem 0 2.5rem; }
.badge {
  display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .85rem;
  background: rgba(0,255,136,.08); border: 1px solid rgba(0,255,136,.2); border-radius: 100px;
  font-size: .75rem; color: var(--accent); margin-bottom: 1.75rem;
}
.badge-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
h1 { font-size: clamp(2rem, 5.5vw, 3.25rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; margin-bottom: 1.25rem; }
h1 .accent { color: var(--accent); }
.sub { font-size: 1.05rem; color: var(--text-dim); max-width: 580px; margin-bottom: 2rem; }
h2 { font-size: 1.3rem; font-weight: 600; letter-spacing: -.02em; margin: 2.5rem 0 1rem; }
h3 { font-size: 1rem; font-weight: 600; margin: 1.5rem 0 .5rem; }
p { color: var(--text-dim); margin-bottom: 1rem; }

.install {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px;
  padding: 1.1rem 1.4rem; margin-bottom: 1rem; display: flex; align-items: center;
  justify-content: space-between; gap: 1rem; transition: border-color .15s;
}
.install:hover { border-color: var(--border-hover); }
.install-code { font-size: .95rem; overflow-x: auto; white-space: nowrap; }
.install-code .prompt { color: var(--text-faint); margin-right: .5rem; }
.install-code .cmd { color: var(--accent); }
.copy-btn {
  background: transparent; border: 1px solid var(--border); color: var(--text-dim);
  padding: .4rem .75rem; border-radius: 6px; font-family: inherit; font-size: .75rem;
  cursor: pointer; transition: all .15s; flex-shrink: 0;
}
.copy-btn:hover, .copy-btn.copied { background: var(--accent); color: #000; border-color: var(--accent); }

/* Checker */
.checker { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; margin: 1rem 0 2rem; }
.checker.ask h3 { margin: 0 0 .9rem; }
#ask-result { margin-top: 1rem; }
#ask-result > .muted { display: block; margin-bottom: .75rem; }
.checker-row { display: flex; gap: .75rem; flex-wrap: wrap; }
.field { flex: 1; min-width: 200px; }
.field label { display: block; font-size: .72rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .4rem; }
select, input[type=text] {
  width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text);
  font-family: inherit; font-size: .9rem; padding: .65rem .8rem; border-radius: 8px; outline: none;
}
select:focus, input[type=text]:focus { border-color: var(--accent); }
.btn {
  background: var(--accent); color: #000; border: none; font-family: inherit; font-weight: 600;
  font-size: .9rem; padding: .7rem 1.4rem; border-radius: 8px; cursor: pointer; transition: opacity .15s;
}
.btn:hover { opacity: .85; }
.btn-row { margin-top: 1rem; display: flex; gap: .75rem; align-items: center; }

/* Verdict card */
.verdict { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem 1.4rem; margin-top: 1rem; }
.verdict-head { font-size: 1.05rem; font-weight: 600; margin-bottom: .5rem; }
.verdict-reason { color: var(--text-dim); font-size: .92rem; margin-bottom: 1rem; }
.context-headroom { font-size: .85rem; margin-bottom: 1rem; }
.tier-comfortable { color: var(--accent); }
.tier-tight { color: var(--accent-dim); }
.tier-partial, .tier-cpu-only { color: var(--warn); }
.tier-wont-fit { color: var(--bad); }
table { width: 100%; border-collapse: collapse; font-size: .85rem; margin: .5rem 0 1rem; }
th { text-align: left; color: var(--text-faint); font-weight: 400; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; padding: .4rem .5rem; border-bottom: 1px solid var(--border); }
td { padding: .45rem .5rem; border-bottom: 1px solid var(--border); color: var(--text-dim); }
td.model-cell, td.rig-cell { color: var(--text); }
.mark-ok { color: var(--accent); } .mark-warn { color: var(--warn); } .mark-bad { color: var(--bad); }
.caveat { color: var(--text-faint); font-size: .8rem; margin-top: .5rem; }

.cards { display: grid; gap: .75rem; }
.card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.2rem; transition: border-color .15s; }
.card:hover { border-color: var(--border-hover); }
.card-title { font-weight: 600; }
.card-meta { font-size: .85rem; color: var(--text-dim); margin-top: .25rem; }
.card-blurb { font-size: .82rem; color: var(--text-faint); margin-top: .35rem; }
.tag { display: inline-block; font-size: .7rem; color: var(--text-dim); border: 1px solid var(--border); border-radius: 5px; padding: .1rem .45rem; margin: 0 .25rem .25rem 0; }
.muted { color: var(--text-faint); font-size: .85rem; }
.code-inline { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 5px; padding: .1rem .4rem; color: var(--accent); font-size: .85rem; }

footer { border-top: 1px solid var(--border); margin-top: 4rem; padding-top: 1.5rem; color: var(--text-faint); font-size: .8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
footer a { color: var(--text-dim); }
.grid-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .4rem .75rem; font-size: .85rem; }
.grid-links a { color: var(--text-dim); }
.grid-links a:hover { color: var(--accent); }

/* Compatibility matrix (S3): the whole catalog × every rig on one screen.
   Breaks out of the narrow prose container; first column + header stick so
   model names and rigs stay visible while scrolling the grid. */
.matrix-wrap {
  width: min(96vw, 1360px); margin: 1rem 0 1rem 50%; transform: translateX(-50%);
  overflow: auto; max-height: 80vh; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-elevated);
}
.matrix { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; margin: 0; font-size: .8rem; }
.matrix th, .matrix td { padding: .38rem .55rem; border-bottom: 1px solid var(--border); text-align: center; white-space: nowrap; }
.matrix thead th { position: sticky; top: 0; background: var(--bg-elevated); z-index: 3; font-size: .68rem; line-height: 1.25; }
.matrix th:first-child, .matrix td:first-child { position: sticky; left: 0; background: var(--bg-elevated); text-align: left; z-index: 2; }
.matrix thead th:first-child { z-index: 4; }
.matrix td a { display: block; }
.mark-tight { color: var(--accent-dim); }
.matrix-legend { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: .8rem; color: var(--text-faint); margin-bottom: .5rem; }

.card-share { margin: 1.25rem 0; }
.card-preview { display: block; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; margin-bottom: .6rem; }
.badge-share { margin: 0 0 1.25rem; }
.badge-preview { display: block; margin-bottom: .5rem; }
a.copy-btn { text-decoration: none; display: inline-flex; align-items: center; }
