:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f8;
  --surface: #ffffff;
  --surface-alt: #f6f7f8;
  --border: #e2e5e8;
  --text: #1a1a1a;
  --text-muted: #5c6166;
  --accent: #1f8fcd;
  --accent-dark: #146a9c;
  --accent-2: #6bc04b;
  --accent-soft: #e7f4fb;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 800; letter-spacing: -0.01em; color: var(--text); }
p { margin: 0 0 1em; color: var(--text-muted); }

.container, .header-inner, .footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; color: var(--text); }
.logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.main-nav { flex: 1; }
.main-nav ul { display: flex; gap: 26px; }
.main-nav a { color: var(--text); font-weight: 600; font-size: 15px; transition: color .2s; }
.main-nav a:hover, .main-nav a.active { color: var(--accent); }
.header-cta {
  border: 2px solid var(--accent);
  color: var(--accent) !important;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.header-cta:hover { background: var(--accent); color: #fff !important; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); display: block; }

/* Hero (iFixit-style: big photographic band, centered bold headline) */
.hero {
  position: relative;
  background: linear-gradient(180deg, rgba(10,20,30,0.35), rgba(10,20,30,0.55)),
    linear-gradient(120deg, #2c3e50, #1f8fcd);
  color: #fff;
  padding: 90px 0;
  text-align: center;
}
.hero-inner { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.hero .eyebrow {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  background: rgba(255,255,255,0.16); color: #fff; font-size: 13px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; margin-bottom: 20px;
}
.hero h1 { font-size: 44px; color: #fff; margin-bottom: 18px; }
.hero p.lead { color: rgba(255,255,255,0.9); font-size: 18px; max-width: 560px; margin: 0 auto; }
.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 6px; font-weight: 700; font-size: 15px;
  cursor: pointer; border: 2px solid transparent; transition: transform .15s, background .15s, color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-ghost { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.7); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--text) !important; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* Stats band (three value-prop cards, like iFixit's homepage strip) */
.stats-band { padding: 48px 0 8px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stat-card {
  background: var(--surface-alt); border-radius: var(--radius); padding: 28px;
  border: 1px solid var(--border); text-align: left;
}
.stat-card .num { font-size: 15px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .02em; margin-bottom: 10px; }
.stat-card h3 { font-size: 19px; margin-bottom: 8px; }
.stat-card p { font-size: 14px; margin-bottom: 14px; }
.stat-card a { font-weight: 700; color: var(--accent); font-size: 14px; }

/* Sections */
section.section { padding: 56px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; gap: 16px; flex-wrap: wrap; }
.section-head h2 { font-size: 26px; }
.section-head p { margin: 0; }
.section-head .view-all { font-weight: 700; color: var(--accent); white-space: nowrap; }

/* Category icon grid (iFixit-style device grid) */
.icon-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px;
}
.icon-tile {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 24px 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); text-align: center; transition: border-color .15s, transform .15s;
}
.icon-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.icon-tile .icon-circle {
  width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; color: var(--accent);
}
.icon-tile span.label { font-weight: 700; font-size: 14px; color: var(--text); }

/* Legacy chip strip (kept for smaller contexts) */
.category-strip { display: flex; gap: 12px; flex-wrap: wrap; padding: 28px 0; }
.chip {
  padding: 9px 16px; border-radius: 6px; background: var(--surface);
  border: 1px solid var(--border); font-weight: 700; font-size: 14px; color: var(--text);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* Card grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.card-thumb {
  height: 160px; position: relative; display: flex; align-items: flex-end; padding: 14px;
  overflow: hidden; background: var(--surface-alt);
}
.card-thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
}
.card-thumb::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,0.45) 100%);
}
.card-thumb .card-tag { position: relative; z-index: 2; }
.card-thumb--android,
.card-thumb--windows,
.card-thumb--linux,
.card-thumb--bypass,
.card-thumb--articles { background: var(--surface-alt); }
.card-tag {
  background: rgba(255,255,255,0.95); color: var(--text); font-size: 11px; font-weight: 800;
  padding: 5px 11px; border-radius: 4px; text-transform: uppercase; letter-spacing: .03em;
}
.card-body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 17px; margin-bottom: 8px; }
.card-body p { font-size: 14px; margin-bottom: 14px; flex: 1; }
.card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 12px; }
.read-more { color: var(--accent); font-weight: 700; }

/* Page header (category / static pages) */
.page-hero {
  background: var(--surface-alt); color: var(--text); padding: 44px 0;
  border-bottom: 1px solid var(--border);
}
.page-hero .container { max-width: var(--max); }
.page-hero h1 { color: var(--text); font-size: 30px; margin-bottom: 8px; }
.page-hero p { color: var(--text-muted); max-width: 640px; margin: 0; }
.breadcrumb { color: var(--text-muted); font-size: 13px; margin-bottom: 12px; }
.breadcrumb a { color: var(--accent); }

/* Article */
.article-wrap { max-width: 780px; margin: 0 auto; padding: 48px 24px; }
.article-wrap .badge { display: inline-block; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 4px; text-transform: uppercase; margin-bottom: 14px; }
.article-wrap h1 { font-size: 32px; margin-bottom: 14px; }
.article-meta { display: flex; gap: 16px; color: var(--text-muted); font-size: 14px; margin-bottom: 28px; border-bottom: 1px solid var(--border); padding-bottom: 24px; }
.article-body h2 { font-size: 22px; margin-top: 34px; }
.article-body h3 { font-size: 18px; margin-top: 24px; }
.article-body ul, .article-body ol { color: var(--text-muted); padding-left: 22px; margin-bottom: 1em; }
.article-body li { margin-bottom: 6px; }
.callout {
  background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 6px;
  padding: 16px 20px; margin: 24px 0; color: var(--text);
}
.callout strong { color: var(--accent-dark); }

/* Static content pages (legal etc) */
.prose { max-width: 780px; margin: 0 auto; padding: 48px 24px; }
.prose h2 { font-size: 20px; margin-top: 30px; }
.prose p, .prose li { color: var(--text-muted); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: var(--max); margin: 0 auto; padding: 48px 24px; }
.contact-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.contact-card h3 { font-size: 18px; margin-bottom: 6px; }
.contact-card .btn { margin-top: 14px; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.form-field input, .form-field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; font-size: 14px;
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--accent); }

/* Newsletter */
.newsletter {
  background: var(--surface-alt); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius);
  padding: 44px; text-align: center; max-width: var(--max); margin: 0 auto 56px;
}
.newsletter h2 { color: var(--text); }
.newsletter p { color: var(--text-muted); }
.newsletter-form { display: flex; gap: 10px; max-width: 420px; margin: 20px auto 0; }
.newsletter-form input { flex: 1; padding: 13px 16px; border-radius: 6px; border: 1px solid var(--border); font-family: inherit; }
.newsletter-form button { padding: 13px 22px; border-radius: 6px; border: none; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }
.newsletter-form button:hover { background: var(--accent-dark); }

/* Footer */
.site-footer { background: #1a1a1a; color: #b7bcc1; padding: 48px 0 0; margin-top: 40px; }
.site-footer .logo { color: #fff; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 36px; }
.footer-brand p { color: #9aa0a6; font-size: 14px; margin: 14px 0; }
.social-row { display: flex; gap: 14px; }
.social-row a { font-size: 13px; font-weight: 700; color: #d2d6da; border: 1px solid rgba(255,255,255,0.2); padding: 7px 12px; border-radius: 6px; }
.footer-col h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.footer-col li { margin-bottom: 10px; font-size: 14px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 18px 24px; text-align: center; font-size: 13px; }

/* Responsive */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: 1fr; }
  .icon-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .main-nav { position: fixed; top: 68px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); transform: translateY(-150%); transition: transform .25s; }
  .main-nav.open { transform: translateY(0); }
  .main-nav ul { flex-direction: column; padding: 16px 24px; gap: 4px; }
  .main-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: flex; }
  .header-cta { display: none; }
  .grid { grid-template-columns: 1fr; }
  .grid.grid-2 { grid-template-columns: 1fr; }
  .icon-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 30px; }
  .footer-inner { grid-template-columns: 1fr; }
}
