/* Can My PC Run This AI Model? — Compaq Pressario
   Dark theme, mobile-first, no external fonts or trackers. */

:root {
  --bg: #0e1116;
  --bg-elev: #161b22;
  --bg-elev-2: #1c232c;
  --bg-input: #12171e;
  --line: #2a3340;
  --line-strong: #3d4a5c;
  --text: #e7ecf3;
  --text-dim: #9aa6b5;
  --text-faint: #6d7a8a;
  --accent: #7dd3c0;
  --accent-2: #f0c14b;
  --accent-ink: #0e1116;
  --ok: #3dd68c;
  --ok-bg: rgba(61, 214, 140, 0.12);
  --warn: #f0c14b;
  --warn-bg: rgba(240, 193, 75, 0.12);
  --slow: #f0a36b;
  --slow-bg: rgba(240, 163, 107, 0.12);
  --bad: #f07178;
  --bad-bg: rgba(240, 113, 120, 0.12);
  --link: #8ec8ff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
  --max: 1120px;
  --sans: "Segoe UI", ui-sans-serif, system-ui, -apple-system, "Noto Sans",
    Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Segoe UI Mono", Menlo,
    Consolas, monospace;
}

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

html { color-scheme: dark; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(125, 211, 192, 0.08), transparent 50%),
    radial-gradient(900px 500px at 110% 0%, rgba(240, 193, 75, 0.06), transparent 45%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--accent); }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.5rem 0.8rem;
  z-index: 20;
}
.skip:focus { left: 0.75rem; top: 0.75rem; }

/* ----- ads: hidden until you enable them ----- */
.ad-slot {
  display: none; /* flip to flex/block when AdSense (or similar) is live */
  align-items: center;
  justify-content: center;
  background: var(--bg-elev);
  border: 1px dashed var(--line-strong);
  color: var(--text-faint);
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  margin: 0 auto 1.25rem;
}
.ad-slot--banner { min-height: 90px; max-width: var(--max); width: calc(100% - 2rem); }
.ad-slot--inline { min-height: 120px; margin: 1.5rem 0 0; }
.ad-slot--footer { min-height: 90px; margin: 1.5rem auto 0; max-width: var(--max); width: 100%; }

.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

header.site {
  padding: 1.35rem 0 0.4rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.mark {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(160deg, var(--accent), #3a8f85 55%, #1b3a36);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 1px rgba(125, 211, 192, 0.25), var(--shadow);
}
.mark svg { width: 24px; height: 24px; }

.brand-text strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand-text span {
  display: block;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.hero {
  padding: 1.4rem 0 1.1rem;
}
.hero h1 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.7rem, 3.6vw, 2.35rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.hero p {
  margin: 0;
  max-width: 42rem;
  color: var(--text-dim);
  font-size: 1.02rem;
}

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding-bottom: 2rem;
}
@media (min-width: 900px) {
  .layout { grid-template-columns: minmax(280px, 0.95fr) minmax(300px, 1.15fr); align-items: start; }
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem 1.25rem;
  box-shadow: var(--shadow);
}

.card h2 {
  margin: 0 0 0.9rem;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 650;
}

label.field {
  display: block;
  margin-bottom: 0.95rem;
}
label.field > span,
.field-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.hint {
  display: block;
  margin-top: 0.3rem;
  color: var(--text-faint);
  font-size: 0.78rem;
}

input[type="text"],
input[type="number"],
select,
.combo-input {
  width: 100%;
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-size: 0.95rem;
}
input:focus,
select:focus,
.combo-input:focus {
  outline: 2px solid rgba(125, 211, 192, 0.65);
  outline-offset: 1px;
  border-color: var(--accent);
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 520px) {
  .row-2 { grid-template-columns: 1fr; }
}

/* searchable combobox */
.combo { position: relative; }
.combo-input { padding-right: 2rem; }
.combo-caret {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}
.combo-list {
  display: none;
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 280px;
  overflow: auto;
  background: var(--bg-elev-2);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 0.3rem;
}
.combo-list.open { display: block; }
.combo-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  padding: 0.45rem 0.55rem;
  border-radius: 7px;
  cursor: pointer;
}
.combo-item:hover,
.combo-item[aria-selected="true"] { background: rgba(125, 211, 192, 0.14); }
.combo-item small {
  display: block;
  color: var(--text-faint);
  font-size: 0.75rem;
}
.combo-item .tag {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-2);
  border-radius: 999px;
  padding: 0 0.4rem;
  vertical-align: middle;
}
.combo-empty { padding: 0.6rem; color: var(--text-faint); font-size: 0.85rem; }

.slider-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
}
.slider-val {
  flex: none;
  min-width: 4.2rem;
  text-align: right;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--accent);
}

.detect {
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.8rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.detect strong { color: var(--text); }
.detect button {
  margin-top: 0.45rem;
  background: transparent;
  color: var(--link);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}
.detect button:hover { border-color: var(--accent); color: var(--accent); }

/* results */
.verdict {
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}
.verdict h3 {
  margin: 0 0 0.2rem;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.verdict p { margin: 0; color: var(--text-dim); font-size: 0.92rem; }
.verdict.fits { background: var(--ok-bg); border-color: rgba(61, 214, 140, 0.35); }
.verdict.fits h3 { color: var(--ok); }
.verdict.offload { background: var(--warn-bg); border-color: rgba(240, 193, 75, 0.35); }
.verdict.offload h3 { color: var(--warn); }
.verdict.cpu { background: var(--slow-bg); border-color: rgba(240, 163, 107, 0.4); }
.verdict.cpu h3 { color: var(--slow); }
.verdict.wont { background: var(--bad-bg); border-color: rgba(240, 113, 120, 0.4); }
.verdict.wont h3 { color: var(--bad); }

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 1rem;
}
@media (max-width: 420px) { .metrics { grid-template-columns: 1fr; } }

.metric {
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.8rem;
}
.metric .k { color: var(--text-faint); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.metric .v { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; margin-top: 0.1rem; }
.metric .s { color: var(--text-dim); font-size: 0.8rem; }

.bars { margin: 0.3rem 0 1rem; }
.bar-row { margin-bottom: 0.45rem; }
.bar-row .cap {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.2rem;
}
.track {
  height: 10px;
  background: var(--bg-input);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  border: 1px solid var(--line);
}
.seg-w { background: #5b9fd6; }
.seg-k { background: #7dd3c0; }
.seg-o { background: #c9a45c; }
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.4rem;
}
.legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  margin-right: 0.3rem;
}

.best, .cmd, .note, .model-meta {
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.7rem;
  font-size: 0.9rem;
}
.model-meta { color: var(--text-dim); }
.model-meta a { font-weight: 600; }

pre.cmd-box {
  margin: 0.4rem 0 0;
  padding: 0.65rem 0.7rem;
  background: #0a0d11;
  border-radius: 8px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.45;
  color: #d5e4d0;
  position: relative;
}
.cmd-block { margin-top: 0.55rem; }
.cmd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 0.2rem;
}
.copy {
  background: var(--bg-elev-2);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font: inherit;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  cursor: pointer;
}
.copy:hover { border-color: var(--accent); }

.disclaimer {
  color: var(--text-faint);
  font-size: 0.8rem;
  margin: 0.2rem 0 0;
}

details.how {
  margin-top: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  padding: 0.2rem 0.9rem 0.2rem;
}
details.how summary {
  cursor: pointer;
  font-weight: 650;
  padding: 0.7rem 0;
}
details.how .body { padding: 0 0 0.9rem; color: var(--text-dim); font-size: 0.9rem; }
details.how code, .how pre {
  font-family: var(--mono);
  font-size: 0.8rem;
}
details.how pre {
  background: #0a0d11;
  padding: 0.7rem;
  border-radius: 8px;
  overflow: auto;
  color: #cfe0d8;
}

footer.site {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.2rem;
  color: var(--text-dim);
  font-size: 0.88rem;
}
footer.site .links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin-bottom: 0.7rem;
}
footer.site .legal { color: var(--text-faint); font-size: 0.8rem; max-width: 50rem; }

/* privacy page */
.prose { padding: 1.2rem 0 3rem; max-width: 44rem; }
.prose h1 { letter-spacing: -0.03em; }
.prose h2 { margin-top: 1.6rem; font-size: 1.1rem; }
.prose p, .prose li { color: var(--text-dim); }

/* guide / help call-to-action slots */
.cta-row { display: grid; grid-template-columns: 1fr; gap: 0.65rem; margin: 1rem 0 0.8rem; }
@media (min-width: 560px) { .cta-row { grid-template-columns: 1fr 1fr; } }
.cta {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  font-size: 0.85rem;
}
.cta strong { display: block; color: var(--accent); font-size: 0.95rem; margin-bottom: 0.15rem; }
.cta span { color: var(--text-dim); }
.cta:hover { border-color: var(--accent); }
.cta-help strong { color: var(--accent-2); }
