/* NetLab Co. — main stylesheet v2 */

/* ── Google Fonts — Inter ────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ── Tokens ─────────────────────────────────────────── */
:root {
  --bg:          #ffffff;
  --surface:     #f8fafc;
  --surface-2:   #f1f5f9;
  --border:      #e2e8f0;
  --text:        #0f172a;
  --muted:       #64748b;
  --accent:      #0ea5e9;
  --accent-dk:   #0284c7;
  --accent-bg:   #e0f2fe;
  --accent-text: #0369a1;
  --header-bg:   #0f172a;
  --header-fg:   #f8fafc;
  --header-sub:  #94a3b8;
  --badge-blue:  #0ea5e9;
  --badge-green: #16a34a;
  --badge-purple:#7c3aed;
  --warn-bg:     #fffbeb;
  --warn-border: #f59e0b;
  --warn-text:   #92400e;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:   0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:   0 8px 24px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.04);
  --radius:      10px;
  --max-w:       760px;
}

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ──────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container--wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Header ──────────────────────────────────────────── */
.site-header {
  background: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.site-logo {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--header-fg);
  text-decoration: none;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.site-logo .dot { color: var(--accent); }
.site-nav { display: flex; gap: 0.25rem; list-style: none; }
.site-nav a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--header-sub);
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.site-nav a:hover {
  color: var(--header-fg);
  background: rgba(255,255,255,.07);
}

/* ── Main ────────────────────────────────────────────── */
main { padding-bottom: 5rem; }

/* ── Hero ────────────────────────────────────────────── */
.hero {
  background: var(--header-bg);
  color: var(--header-fg);
  padding: 4rem 0 3.5rem;
  margin-bottom: 3rem;
}
.hero .container { position: relative; }
.hero-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: #fff;
  max-width: 580px;
  margin-bottom: 1.25rem;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero p {
  font-size: 1.05rem;
  color: var(--header-sub);
  max-width: 480px;
  line-height: 1.65;
  margin-bottom: 0;
}

/* ── Section label ───────────────────────────────────── */
.section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Category cards ──────────────────────────────────── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}
.category-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, border-color .15s;
  display: block;
  position: relative;
  overflow: hidden;
}
.category-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s;
}
.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  text-decoration: none;
  color: var(--text);
}
.category-card:hover::before { transform: scaleX(1); }
.category-card.disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: default;
}
.category-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-text);
  background: var(--accent-bg);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.75rem;
}
.category-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
}
.category-card p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* ── Article list ────────────────────────────────────── */
.article-list { list-style: none; }
.article-list li {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  align-items: start;
}
.article-list li:last-child { border-bottom: none; }
.article-list .al-title {
  font-weight: 700;
  font-size: 0.975rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
  line-height: 1.4;
}
.article-list .al-title:hover { color: var(--accent-dk); }
.article-list .al-desc {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.2rem;
  grid-column: 1;
}
.article-list .al-meta {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 0.15rem;
}

/* ── Breadcrumb ──────────────────────────────────────── */
.breadcrumb {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-dk); }
.breadcrumb .sep { color: var(--border); }

/* ── Article header ──────────────────────────────────── */
.article-header {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.article-header .cat-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-text);
  background: var(--accent-bg);
  padding: 3px 10px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 1rem;
}
.article-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}
.article-subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1rem;
  font-weight: 400;
}
.article-meta {
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}
.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ── Disclosure ──────────────────────────────────────── */
.disclosure {
  background: var(--accent-bg);
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--accent-text);
  border-radius: 0 6px 6px 0;
  margin: 0 0 2rem;
  line-height: 1.5;
}
.disclosure p { margin: 0; }

/* ── Pricing note ────────────────────────────────────── */
.pricing-note {
  background: var(--warn-bg);
  border-left: 3px solid var(--warn-border);
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--warn-text);
  border-radius: 0 6px 6px 0;
  margin: 1.5rem 0;
  line-height: 1.5;
}

/* ── Typography ──────────────────────────────────────── */
.article-content h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin: 3rem 0 1rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--text);
}
.article-content h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.article-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 2rem 0 0.6rem;
  letter-spacing: -0.01em;
}
.article-content p  { margin-bottom: 1.1rem; }
.article-content ul,
.article-content ol { margin: 0 0 1.1rem 1.25rem; }
.article-content li { margin-bottom: 0.3rem; }
.article-content strong { font-weight: 600; }
.article-content hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.article-content a { color: var(--accent-dk); text-decoration: underline; text-underline-offset: 2px; }
.article-content a:hover { color: var(--accent); }
.article-content em { font-style: italic; color: var(--muted); }

/* ── Table ───────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  margin: 1.75rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead th {
  background: var(--header-bg);
  color: var(--header-fg);
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: .02em;
  white-space: nowrap;
}
thead th:first-child { border-radius: calc(var(--radius) - 1px) 0 0 0; }
thead th:last-child  { border-radius: 0 calc(var(--radius) - 1px) 0 0; }
tbody td { padding: 0.65rem 1rem; border-top: 1px solid var(--border); vertical-align: top; }
tbody tr:nth-child(even) td { background: var(--surface); }
tbody tr:hover td { background: var(--accent-bg); transition: background .1s; }
tfoot td {
  padding: 0.5rem 1rem;
  font-size: 0.73rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-style: italic;
}

/* ── Product section ─────────────────────────────────── */
.product-section-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.product-section-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #38bdf8);
}

/* ── Product image ───────────────────────────────────── */
.product-img {
  display: block;
  max-width: 220px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.75rem;
  margin: 0 0 1.25rem;
  float: right;
  margin-left: 1.5rem;
}
@media (max-width: 520px) {
  .product-img { float: none; margin-left: 0; max-width: 180px; }
}

/* ── Product meta grid ───────────────────────────────── */
.product-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  font-size: 0.85rem;
  clear: both;
}
.product-meta-item strong {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 2px;
}

/* ── Badges ──────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
  margin-left: 0.5rem;
  vertical-align: middle;
  position: relative;
  top: -2px;
}
.badge.value  { background: #dcfce7; color: #15803d; }
.badge.pick   { background: var(--accent-bg); color: var(--accent-text); }
.badge.power  { background: #ede9fe; color: #6d28d9; }
.badge.expert { background: #fef3c7; color: #92400e; }

/* ── Sources ─────────────────────────────────────────── */
.sources {
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
}
.sources h2 {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin: 0 0 0.75rem;
  padding: 0;
  border: none;
  color: var(--muted);
}
.sources ul { margin-left: 1rem; }
.sources li { margin-bottom: 0.3rem; }
.sources em { font-style: normal; }
.sources a { color: var(--muted); }

/* ── Footer ──────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 0;
}
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.footer-brand { font-weight: 700; color: var(--text); font-size: 0.85rem; }
.footer-brand .dot { color: var(--accent); }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent-dk); }

/* ── Dark mode ───────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #0d1117;
    --surface:     #161b22;
    --surface-2:   #1c2128;
    --border:      #30363d;
    --text:        #e6edf3;
    --muted:       #8b949e;
    --accent:      #38bdf8;
    --accent-dk:   #7dd3fc;
    --accent-bg:   #0c2233;
    --accent-text: #7dd3fc;
    --header-bg:   #010409;
    --header-fg:   #e6edf3;
    --header-sub:  #8b949e;
    --warn-bg:     #1c1200;
    --warn-border: #d97706;
    --warn-text:   #fbbf24;
    --shadow-sm:   0 1px 3px rgba(0,0,0,.3);
    --shadow-md:   0 4px 12px rgba(0,0,0,.4);
    --shadow-lg:   0 8px 24px rgba(0,0,0,.5);
  }

  .badge.value  { background: #052e16; color: #4ade80; }
  .badge.pick   { background: var(--accent-bg); color: var(--accent-text); }
  .badge.power  { background: #2e1065; color: #c4b5fd; }

  tbody tr:nth-child(even) td { background: #161b22; }
  tbody tr:hover td { background: #0c2233; }
  tfoot td { background: #161b22; }

  .product-img { background: #161b22; border-color: #30363d; }
  .category-card { background: #161b22; }
  .site-footer { background: #010409; }
  .sources { background: #161b22; }
  .product-section-wrap { background: #161b22; }
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 600px) {
  .hero { padding: 2.5rem 0 2rem; }
  .article-header { padding: 1.5rem 0 1.5rem; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .product-meta { grid-template-columns: 1fr 1fr; }
  .site-footer .container { flex-direction: column; align-items: flex-start; }
  .article-list li { grid-template-columns: 1fr; }
  .article-list .al-meta { display: none; }
}
