/*
  gear.casa design system v2, "data-dense pro" (Style L).
  Locked in 2026-05-30 after iterating across 12 prototypes (see
  planning/prototypes/). Inspired by PCPartPicker / RTINGS / GitHub:
  utilitarian light, blue links, compact rows, table-forward.

  This file is the SEED of the new system: tokens + fonts + base
  components. It will grow as we re-skin the rest of the site.
  Existing pages (home, vertical-category, product-detail, compare,
  search) still use the old styles.css until we port them; only new
  pages link this stylesheet for now.
*/

@import url("https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400;14..32,500;14..32,600;14..32,700&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  /* Surfaces and structure */
  --bg: #f1f3f5;
  --bg-elev: #ffffff;
  --surface: #f7f8fa;
  --surface-2: #eceef1;
  --border: #dde1e6;
  --border-strong: #c6ccd3;

  /* Text */
  --text: #1a1f26;
  --text-2: #525a64;
  --text-3: #858d97;

  /* Accent (blue) + semantic */
  --accent: #1f6feb;
  --accent-hi: #1a5fd0;
  --accent-dim: rgba(31, 111, 235, 0.08);
  --accent-line: rgba(31, 111, 235, 0.3);
  --good: #1a7f37;
  --good-dim: rgba(26, 127, 55, 0.1);
  --down: #cf222e;
  --down-dim: rgba(207, 34, 46, 0.1);

  /* Effects */
  --shadow: 0 6px 22px -12px rgba(20, 30, 50, 0.2);

  /* Geometry */
  --radius: 6px;
  --radius-lg: 10px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  /* Type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

[data-theme="dark"] {
  --bg: #0d1117;
  --bg-elev: #161b22;
  --surface: #12161d;
  --surface-2: #1c2230;
  --border: #2a313c;
  --border-strong: #3a424f;
  --text: #e6edf3;
  --text-2: #9aa4b2;
  --text-3: #6b7280;
  --accent: #4493f8;
  --accent-hi: #6aa9ff;
  --accent-dim: rgba(68, 147, 248, 0.13);
  --good: #3fb950;
  --down: #f85149;
  --shadow: 0 8px 26px -14px rgba(0, 0, 0, 0.7);
}

/* ---------- reset + base ---------- */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--accent-dim);
}

/* Lucide icons use currentColor strokes; tame default rendering */
svg.lucide {
  width: 1em;
  height: 1em;
  stroke-width: 1.9;
  flex-shrink: 0;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.muted {
  color: var(--text-3);
}

/* Generic mono inline */
code,
.mono {
  font-family: var(--mono);
}

/* Link styling within body copy */
.link {
  color: var(--accent);
  font-weight: 500;
}

.link:hover {
  text-decoration: underline;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  /* Reads as a bar the page hangs from rather than a strip that happens to be
     at the top. Barely visible until the table scrolls under it, which is when
     a header has to look deliberate. */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}

.nav-inner {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.015em;
  color: var(--text);
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
}


/* Page name in the title bar. Sized like a label, not a headline: it is there to
   say which page you are on, not to sell it. */
.nav-title { margin: 0 0 0 4px; padding-left: 15px; font-size: 15px; font-weight: 500;
  color: var(--text-2); border-left: 1px solid var(--border); white-space: nowrap;
  letter-spacing: -0.005em; }

.nav-links {
  display: flex;
  gap: 18px;
  margin-left: 4px;
}

.nav-links a {
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.15s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 5px;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 15px;
  transition: all 0.15s var(--ease);
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 5px;
  padding: 8px 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s var(--ease);
  white-space: nowrap;
}

.btn .lucide {
  font-size: 15px;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hi);
}

.btn-ghost {
  background: var(--bg-elev);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface);
}

/* ---------- chips ---------- */

.chip {
  display: inline-block;
  font-size: 11.5px;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 8px;
}

.chip b {
  color: var(--text);
  font-weight: 600;
}

/* ---------- pills ---------- */

.pill {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
}

.pill-best {
  color: var(--good);
  background: var(--good-dim);
}

.pill-low {
  color: var(--accent);
  background: var(--accent-dim);
}

/* ---------- cards ---------- */

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color 0.12s var(--ease);
}

.card:hover {
  border-color: var(--accent);
}

/* ---------- tables ---------- */

.tbl-wrap {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-elev);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  background: var(--surface);
  text-align: left;
  padding: 10px 14px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-3);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

thead th.num,
tbody td.num {
  text-align: right;
  font-family: var(--mono);
}

tbody tr {
  border-bottom: 1px solid var(--border);
}

tbody tr:last-child {
  border-bottom: 0;
}

tbody tr:hover {
  background: var(--surface);
}

tbody td {
  padding: 11px 14px;
  color: var(--text-2);
}

td.strong {
  color: var(--text);
  font-weight: 600;
}

td.best {
  color: var(--good);
  font-weight: 700;
}

/* ---------- sections ---------- */

section.block {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

section.block.first {
  border-top: 0;
  padding-top: 8px;
}

.sec-head {
  margin-bottom: 20px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.sec-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sec-more {
  margin-left: auto;
  font-size: 13px;
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 30px;
}

.foot-inner {
  display: flex;
  justify-content: space-between;
  gap: 36px;
  flex-wrap: wrap;
}

.foot-brand {
  max-width: 280px;
}

.foot-brand p {
  color: var(--text-3);
  font-size: 12.5px;
  margin-top: 10px;
  line-height: 1.5;
}

.foot-cols {
  display: flex;
  gap: 48px;
}

.foot-col h4 {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-3);
  margin-bottom: 11px;
  font-weight: 700;
}

.foot-col a {
  display: block;
  color: var(--text-2);
  font-size: 13px;
  margin-bottom: 8px;
  transition: color 0.15s var(--ease);
}

.foot-col a:hover {
  color: var(--accent);
}

.foot-base {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  color: var(--text-3);
  font-size: 12.5px;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .tbl-wrap {
    overflow-x: auto;
  }
}

/* ---------- mobile nav + spacing ----------
   Keep the nav links visible on small screens (a hamburger would need JS in
   every inline nav); just make them compact so brand + 3 short links fit.
   Tighten page padding so content gets the full narrow width. */
@media (max-width: 640px) {
  .wrap { padding: 0 14px; }
  .nav-inner { height: 56px; gap: 12px; }
  .nav-links { gap: 12px; margin-left: 0; }
  .nav-links a { font-size: 13px; }
  .brand, .brand span { font-size: 17px; }
  .brand img { width: 29px; height: 29px; border-radius: 7px; }
  .nav-title { margin-left: 0; padding-left: 11px; font-size: 13.5px; }
}
@media (max-width: 380px) {
  .nav-links { gap: 9px; }
  .nav-links a { font-size: 12px; }
}

/* ---------- theme-toggle icon swap ---------- */

.icon-btn .icon-sun {
  display: none;
}

[data-theme="dark"] .icon-btn .icon-sun {
  display: block;
}

[data-theme="dark"] .icon-btn .icon-moon {
  display: none;
}

