/* BambuHub — Main Stylesheet */
/* Font loaded via <link> in HTML head for performance. Fallback: system fonts. */

/* Tinted neutrals: subtle blue undertone instead of pure gray */
:root {
  --bg:        #0a0f17;
  --bg2:       #121821;
  --bg3:       #1a2030;
  --border:    #1e2736;
  --text:      #e8edf5;
  --text2:     #94a0b8;
  --text3:     #7a8aa6;
  --accent:    #3b82f6;
  --accent-dk: #2563eb;
  --accent-dim:rgba(59,130,246,.08);
  --accent-glow:rgba(59,130,246,.2);
  --green:     #34d399;
  --yellow:    #fbbf24;
  --red:       #f87171;
  --purple:    #a78bfa;
  --radius:    8px;
  --radius-lg: 12px;
  --transition: 180ms ease;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-head: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
img { max-width: 100%; height: auto; display: block; }

/* ── CONTAINER ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 768px) { .container { padding: 0 1.5rem; } }

/* ── NAV ────────────────────────────────────────────────── */
.site-nav {
  background: rgba(10,15,23,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.04);
  position: sticky;
  top: 0;
  z-index: 200;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 1rem;
}
.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -.04em;
  text-transform: lowercase;
}
.nav-logo span {
  color: var(--accent);
}
.nav-logo:hover { text-decoration: none; opacity: .85; }

.nav-links {
  display: none;
  list-style: none;
  gap: 0;
  align-items: center;
}
@media (min-width: 920px) { .nav-links { display: flex; } }

.nav-links > li > a,
.nav-links > li > button {
  color: var(--text2);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition), background var(--transition);
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  display: block;
  min-height: 36px;
  line-height: 1;
  display: flex;
  align-items: center;
}
.nav-links > li > a:hover,
.nav-links > li > button:hover { color: var(--text); background: var(--bg3); text-decoration: none; }
.nav-links > li > a:focus-visible,
.nav-links > li > button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.nav-links > li > a.active { color: var(--accent); }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(20,28,40,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius-lg);
  min-width: 210px;
  padding: .5rem;
  padding-top: .65rem;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
/* Invisible bridge so mouse can travel from button to dropdown */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--text2);
  min-height: 36px;
  transition: color var(--transition), background var(--transition);
}
.nav-dropdown-menu a:hover { color: var(--text); background: var(--bg2); text-decoration: none; }
.nav-dropdown-menu a:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.nav-dropdown-menu .sep { height: 1px; background: var(--border); margin: 0.4rem 0.25rem; }

/* Hamburger */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: var(--radius);
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.nav-hamburger:hover { background: var(--bg3); }
.nav-hamburger:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (min-width: 920px) { .nav-hamburger { display: none; } }
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text2);
  border-radius: 2px;
  transition: all .2s;
}

/* Mobile menu */
.nav-mobile {
  display: none;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 0.75rem;
  max-height: calc(100vh - 56px);
  overflow-y: auto;
}
.nav-mobile.open { display: block; }
.nav-mobile a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  color: var(--text2);
  border-radius: var(--radius);
  font-size: 0.9rem;
  min-height: 44px;
  transition: color var(--transition), background var(--transition);
}
.nav-mobile a:hover { color: var(--text); background: var(--bg3); text-decoration: none; }
.nav-mobile a:active { background: var(--accent-dim); }
.mobile-section {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 0.75rem 0.75rem 0.3rem;
  margin-top: 0.25rem;
}

/* ── MAIN ───────────────────────────────────────────────── */
main { flex: 1; }

/* ── FOOTER ─────────────────────────────────────────────── */
.site-footer {
  background: rgba(12,17,25,.8);
  border-top: 1px solid rgba(255,255,255,.04);
  padding: 3rem 0 1.5rem;
  margin-top: 5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 600px)  { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px)  { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.footer-logo { font-size: 1.25rem; font-weight: 800; color: var(--text); letter-spacing: -.03em; }
.footer-logo span { color: var(--accent); }
.footer-brand p { color: var(--text2); font-size: 0.85rem; margin-top: 0.6rem; max-width: 260px; line-height: 1.6; }
.footer-disclaimer {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.9rem;
  margin-top: 0.9rem;
  font-size: 0.78rem;
  color: var(--text3);
  line-height: 1.5;
}
.footer-col h4 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text3);
  margin-bottom: 0.75rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a { color: var(--text2); font-size: 0.875rem; transition: color var(--transition); }
.footer-col a:hover { color: var(--text); text-decoration: none; }
.footer-col a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: space-between;
}
.footer-bottom p { color: var(--text3); font-size: 0.78rem; }

/* ── TYPOGRAPHY ─────────────────────────────────────────── */
h1, h2, h3, h4, h5 { font-family: var(--font-head); line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.75rem); letter-spacing: -.015em; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
h5 { font-size: 0.875rem; }
p { line-height: 1.7; }

.lead      { font-size: 1.1rem; color: var(--text2); line-height: 1.75; }
.text-muted{ color: var(--text2); }
.text-dim  { color: var(--text3); }
.text-accent { color: var(--accent); }
.text-green  { color: var(--green); }
.text-yellow { color: var(--yellow); }
.text-red    { color: var(--red); }

/* ── HERO ───────────────────────────────────────────────── */
.hero {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(59,130,246,.3);
  border-radius: 100px;
  padding: .25rem .9rem;
  font-size: .78rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  letter-spacing: .02em;
}
.hero h1 { margin-bottom: .9rem; }
.hero .lead { margin-bottom: 1.75rem; max-width: 620px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .65rem 1.35rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
  font-family: inherit;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dk); box-shadow: 0 0 16px rgba(59,130,246,.4), 0 2px 8px rgba(59,130,246,.2); }
.btn-secondary { background: var(--bg3); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--border); border-color: var(--text3); }
.btn-sm { padding: .4rem .9rem; font-size: .8rem; min-height: 36px; }

/* ── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .18rem .55rem;
  border-radius: 100px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-new  { background: rgba(63,185,80,.12);   color: #3fb950; border: 1px solid rgba(63,185,80,.3); }
.badge-hot  { background: rgba(248,81,73,.12);   color: #f85149; border: 1px solid rgba(248,81,73,.3); }
.badge-disc { background: rgba(110,118,129,.12); color: #8b949e; border: 1px solid rgba(110,118,129,.3); }
.badge-best { background: rgba(163,113,247,.12); color: #a371f7; border: 1px solid rgba(163,113,247,.3); }
.badge-sale { background: rgba(210,153,34,.12);  color: #d29922; border: 1px solid rgba(210,153,34,.3); }

/* ── CARDS ──────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 500px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cards-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px){ .cards-grid.col-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: rgba(18,24,33,.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.04);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}
.card:hover {
  border-color: rgba(59,130,246,.3);
  box-shadow: 0 0 20px var(--accent-glow), 0 4px 24px rgba(0,0,0,.15);
}
.card.discontinued { opacity: .65; }
.card.discontinued:hover { border-color: var(--border); box-shadow: none; }

a.card-link { text-decoration: none; color: inherit; display: block; }
a.card-link:hover { text-decoration: none; }

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .75rem;
}
.card-title   { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: .15rem; }
.card-subtitle{ font-size: .8rem; color: var(--text3); }
.card-price   { font-size: 1.2rem; font-weight: 800; color: var(--accent); white-space: nowrap; }

.card-specs {
  list-style: none;
  margin: .5rem 0 .75rem;
  flex: 1;
}
.card-specs li {
  display: flex;
  justify-content: space-between;
  font-size: .82rem;
  color: var(--text2);
  padding: .3rem 0;
  border-bottom: 1px solid var(--border);
}
.card-specs li:last-child { border-bottom: none; }
.card-specs li strong { color: var(--text); font-weight: 500; }

.card-footer {
  margin-top: auto;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: .5rem;
  align-items: center;
  justify-content: space-between;
}

/* ── SECTION ────────────────────────────────────────────── */
.section { padding: 3rem 0; }
.section + .section { border-top: 1px solid rgba(255,255,255,.03); }
.section-header { margin-bottom: 1.75rem; }
.section-header h2 { margin-bottom: .4rem; }
.section-header p  { color: var(--text2); max-width: 560px; }

/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-header {
  padding: 1.5rem 0 1.25rem;
  border-bottom: 1px solid var(--border);
}
.page-header h1 { margin-bottom: .5rem; }
.page-header p  { color: var(--text2); max-width: 620px; }

/* ── BREADCRUMB ─────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  color: var(--text3);
  padding: 0;
  margin-bottom: .2rem;
  flex-wrap: wrap;
}
.breadcrumb a     { color: var(--text3); }
.breadcrumb a:hover { color: var(--accent); text-decoration: none; }
.breadcrumb .sep  { color: var(--border); }
.breadcrumb .cur  { color: var(--text2); }

/* ── TABLES ─────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,.04);
  border-radius: var(--radius-lg);
  background: rgba(18,24,33,.4);
}
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-track { background: var(--bg2); }
.table-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: var(--text3); }
.spec-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.spec-table th {
  background: var(--bg3);
  color: var(--text2);
  font-weight: 700;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .75rem 1rem;
  text-align: left;
}
.spec-table td { padding: .7rem 1rem; border-bottom: 1px solid var(--border); }
.spec-table tr:last-child td { border-bottom: none; }
.spec-table td:first-child { color: var(--text2); font-size: .82rem; white-space: nowrap; }
.spec-table td:not(:first-child) { color: var(--text); }
.spec-table tr:hover td { background: rgba(255,255,255,.02); }

.compare-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.compare-table th {
  background: var(--bg3);
  color: var(--text);
  font-weight: 700;
  padding: .8rem 1rem;
  text-align: center;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  font-size: .8rem;
}
.compare-table th:first-child { text-align: left; min-width: 130px; }
.compare-table td {
  padding: .65rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
  white-space: nowrap;
}
.compare-table td:first-child {
  text-align: left;
  color: var(--text3);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--bg3);
}
.compare-table tr:hover td { background: rgba(255,255,255,.02); }
.compare-table tr:hover td:first-child { background: var(--bg3); }
.compare-table .hl td { background: rgba(59,130,246,.05); }
.compare-table .hl td:first-child { background: var(--bg3); }

/* ── INFO BOXES ─────────────────────────────────────────── */
.info-box {
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  border-left: 2px solid;
  font-size: .875rem;
  line-height: 1.65;
}
.info-box p { margin: 0; }
.info-box strong { display: block; margin-bottom: .3rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.info-box.tip    { background: rgba(59,130,246,.06);  border-color: var(--accent); color: var(--text2); }
.info-box.tip strong { color: var(--accent); }
.info-box.warn   { background: rgba(251,191,36,.06);  border-color: var(--yellow); color: var(--text2); }
.info-box.warn strong { color: var(--yellow); }
.info-box.danger { background: rgba(248,113,113,.06); border-color: var(--red);    color: var(--text2); }
.info-box.danger strong { color: var(--red); }
.info-box.success{ background: rgba(52,211,153,.06);  border-color: var(--green);  color: var(--text2); }
.info-box.success strong { color: var(--green); }

/* ── PROS / CONS ─────────────────────────────────────────── */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.25rem 0;
}
@media (min-width: 600px) { .pros-cons { grid-template-columns: 1fr 1fr; } }
.pros, .cons {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.pros { border-top: 3px solid var(--green); }
.cons { border-top: 3px solid var(--red); }
.pros h4 { color: var(--green); margin-bottom: .75rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.cons h4 { color: var(--red);   margin-bottom: .75rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.pros ul, .cons ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.pros li, .cons li { font-size: .875rem; color: var(--text2); padding-left: 1.25rem; position: relative; }
.pros li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.cons li::before { content: "✗"; position: absolute; left: 0; color: var(--red);   font-weight: 700; }

/* ── SPEC HIGHLIGHTS ────────────────────────────────────── */
.spec-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  margin: 1rem 0;
}
.spec-hi { display: flex; flex-direction: column; gap: .15rem; }
.spec-hi .lbl { font-size: .7rem; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.spec-hi .val { font-size: 1.15rem; font-weight: 800; color: var(--text); }

/* ── STAT GRID ──────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}
@media (min-width: 600px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  text-align: center;
}
.stat-num { font-size: 1.65rem; font-weight: 800; color: var(--accent); display: block; }
.stat-lbl { font-size: .72rem; color: var(--text3); text-transform: uppercase; letter-spacing: .05em; display: block; margin-top: .2rem; }

/* ── GRIDS ──────────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) { .grid-2 { grid-template-columns: 3fr 2fr; } }
.grid-2.even { grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid-2.even { grid-template-columns: 1fr 1fr; } }
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px)  { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ── CHECKLIST ──────────────────────────────────────────── */
.checklist { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.checklist li { display: flex; gap: .65rem; font-size: .875rem; color: var(--text2); line-height: 1.5; }
.checklist li::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ── TAGS ───────────────────────────────────────────────── */
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; }
.tag {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: .2rem .65rem;
  border-radius: 100px;
  font-size: .78rem;
}

/* ── NOTICE BANNERS ─────────────────────────────────────── */
.notice {
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: .875rem;
  line-height: 1.65;
}
.notice-warn   { background: rgba(251,191,36,.04); border: 1px solid rgba(251,191,36,.12); }
.notice-warn   strong { color: var(--yellow); }
.notice-info   { background: rgba(59,130,246,.08);  border: 1px solid rgba(59,130,246,.25); }
.notice-info   strong { color: var(--accent); }
.notice-danger { background: rgba(248,81,73,.08);   border: 1px solid rgba(248,81,73,.25); }
.notice-danger strong { color: var(--red); }
.notice-success{ background: rgba(63,185,80,.08);   border: 1px solid rgba(63,185,80,.25); }
.notice-success strong { color: var(--green); }

/* ── PRINTER HERO ────────────────────────────────────────── */
.printer-header {
  padding: 2rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}
.printer-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) { .printer-layout { grid-template-columns: 1fr 300px; } }

.printer-price-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.printer-price {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -.03em;
  line-height: 1;
  margin-bottom: .3rem;
}
.printer-price-note { font-size: .8rem; color: var(--text3); }

/* ── ANCHOR NAV ─────────────────────────────────────────── */
.anchor-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.anchor-nav a {
  font-size: .8rem;
  color: var(--text2);
  padding: .3rem .7rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.anchor-nav a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

/* ── CONTENT BODY ────────────────────────────────────────── */
.content h2 { margin: 2.5rem 0 .75rem; padding-top: .25rem; }
.content h3 { margin: 1.75rem 0 .5rem; color: var(--text2); }
.content p  { margin-bottom: 1rem; color: var(--text2); }
.content p:last-child { margin-bottom: 0; }
.content ul, .content ol { padding-left: 1.5rem; margin-bottom: 1rem; color: var(--text2); }
.content li { margin-bottom: .35rem; line-height: 1.7; font-size: .9rem; }
.content strong { color: var(--text); }
.content code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .1rem .4rem;
  font-size: .85em;
  color: var(--accent);
}
.content pre {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: .85rem;
  line-height: 1.6;
  margin: 1rem 0;
}
.content pre code { background: none; border: none; padding: 0; }

/* ── GUIDE CARDS ─────────────────────────────────────────── */
.guide-card {
  background: rgba(18,24,33,.5);
  border: 1px solid rgba(255,255,255,.04);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
}
.guide-card:hover {
  border-color: rgba(59,130,246,.3);
  box-shadow: 0 0 24px var(--accent-glow), 0 4px 16px rgba(0,0,0,.1);
  transform: translateY(-2px);
  text-decoration: none;
}
.guide-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.guide-card .icon { font-size: 1.5rem; }
.guide-card h3   { font-size: 1rem; color: var(--text); margin: 0; font-weight: 600; }
.guide-card p    { font-size: .85rem; color: var(--text2); margin: 0; line-height: 1.6; }
.guide-card .meta{ font-size: .75rem; color: var(--text3); margin-top: auto; font-weight: 500; }

/* ── UTILITIES ──────────────────────────────────────────── */
.mt-0  { margin-top: 0; }
.mt-1  { margin-top: .5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.mt-4  { margin-top: 2rem; }
.mt-5  { margin-top: 2.5rem; }
.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: .5rem; }
.mb-2  { margin-bottom: 1rem; }
.mb-3  { margin-bottom: 1.5rem; }
.mb-4  { margin-bottom: 2rem; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.flex  { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ── RESPONSIVE HELPERS ─────────────────────────────────── */
@media (max-width: 599px) { .hide-mobile { display: none !important; } }
@media (min-width: 600px) { .hide-desktop{ display: none !important; } }

/* ── SVG ICONS ──────────────────────────────────────────── */
.icon-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-svg svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.icon-svg.muted svg { stroke: var(--text3); }
.icon-svg.lg svg { width: 24px; height: 24px; }
.icon-svg.xl svg { width: 32px; height: 32px; }

/* ── GUIDE CARDS with icons ─────────────────────────────── */
.guide-card .icon-svg { margin-bottom: .25rem; }
.guide-card .icon-svg svg { width: 28px; height: 28px; stroke: var(--accent); }

/* ── TABLE RESPONSIVE IMPROVEMENTS ──────────────────────── */
@media (max-width: 599px) {
  .compare-table { font-size: .72rem; }
  .compare-table th,
  .compare-table td { padding: .5rem .5rem; }
  .spec-table th,
  .spec-table td { padding: .55rem .65rem; }
}

/* ── IMPROVED CARD SPACING ON MOBILE ────────────────────── */
@media (max-width: 599px) {
  .card { padding: 1rem; }
  .section { padding: 2rem 0; }
  .page-header { padding: 1.5rem 0 1.25rem; }
  .hero { padding: 2.5rem 0 2rem; }
  h1 { font-size: 1.5rem; }
}

/* ── INFO-BOX ICON VARIANT ──────────────────────────────── */
.info-box-icon {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
}
.info-box-icon .icon-svg svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: .1rem; }
.info-box.tip .icon-svg svg { stroke: var(--accent); }
.info-box.warn .icon-svg svg { stroke: var(--yellow); }
.info-box.danger .icon-svg svg { stroke: var(--red); }
.info-box.success .icon-svg svg { stroke: var(--green); }

/* ── SMOOTH SCROLL ANCHOR OFFSET ─────────────────────────── */
[id] { scroll-margin-top: 72px; }

/* ── COMPARE PAGE HIGHLIGHT ON MOBILE ────────────────────── */
@media (max-width: 767px) {
  .table-wrap { margin: 0 -.5rem; border-radius: 0; border-left: none; border-right: none; }
}

/* ── FOOTER RESPONSIVE FIX ──────────────────────────────── */
@media (max-width: 599px) {
  .footer-grid { gap: 1.5rem; }
  .site-footer { padding: 2rem 0 1.25rem; margin-top: 3rem; }
}

/* ── BREADCRUMB IMPROVEMENTS ─────────────────────────────── */
.breadcrumb { padding: 0; margin-bottom: .2rem; }

/* ── STAT GRID MOBILE ────────────────────────────────────── */
@media (max-width: 449px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .stat-card { padding: .75rem; }
  .stat-num { font-size: 1.3rem; }
}

/* ── BETTER CONTENT READABILITY ──────────────────────────── */
.content p { font-size: .925rem; }
.content li { font-size: .9rem; }

/* ── CARDS GRID 4-COL IMPROVEMENTS ──────────────────────── */
@media (min-width: 500px) and (max-width: 899px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── BOLD DESIGN: accent glow on hero only ───────────────── */
.hero h1 {
  background: linear-gradient(135deg, #fff 20%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── PERFORMANCE: font-display, contain, will-change ────── */
/* Reduce CLS: reserve space for nav */
.site-nav { contain: layout; }
main { contain: content; }

/* Reduce LCP: optimize above-the-fold rendering */
.hero, .page-header { contain: layout style; }

/* Reduce repaints on hover animations */
.card, .guide-card { will-change: auto; }
.card:hover, .guide-card:hover { will-change: transform; }

/* Smooth scrolling only if user hasn't opted out */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── PRODUCT CARDS (Affiliate) ────────────────────────────── */
.product-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(0,0,0,.25), 0 0 0 1px var(--accent-dim);
  transform: translateY(-3px);
}
.product-card.featured { border-color: var(--accent); }
.product-card.featured::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--purple));
}

.product-img {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--bg3) 0%, var(--bg) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
}
.product-img .img-placeholder {
  color: var(--text3);
  font-size: .8rem;
  text-align: center;
  padding: 1rem;
}

.product-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-body .product-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .25rem;
}
.product-body .product-tagline {
  font-size: .82rem;
  color: var(--text3);
  margin-bottom: .75rem;
}
.product-body .product-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: .75rem;
  letter-spacing: -.02em;
}

.product-specs {
  list-style: none;
  margin-bottom: 1rem;
  flex: 1;
}
.product-specs li {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  padding: .35rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
}
.product-specs li:last-child { border-bottom: none; }
.product-specs li strong { color: var(--text); font-weight: 500; }

.product-cta {
  display: flex;
  gap: .5rem;
}
.product-cta .btn { flex: 1; text-align: center; font-size: .85rem; }

/* ── AFFILIATE DISCLOSURE ───────────────────────────────── */
.affiliate-note {
  font-size: .75rem;
  color: var(--text3);
  padding: .5rem 0;
  border-top: 1px solid var(--border);
  margin-top: .75rem;
}

/* ── QUICK FILTER PILLS ──────────────────────────────────── */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.5rem;
}
.filter-pill {
  padding: .5rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg2);
  color: var(--text2);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  min-height: 40px;
  display: flex;
  align-items: center;
  font-family: inherit;
}
.filter-pill:hover { border-color: var(--accent); color: var(--text); }
.filter-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.filter-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── QUICK ANSWER BOX ────────────────────────────────────── */
.quick-answer {
  background: linear-gradient(135deg, rgba(59,130,246,.06) 0%, rgba(59,130,246,.01) 100%);
  border: 1px solid rgba(59,130,246,.12);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 0 32px rgba(59,130,246,.04);
}
.quick-answer h3 {
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: .5rem;
  font-weight: 700;
}
.quick-answer p {
  font-size: .925rem;
  color: var(--text2);
  line-height: 1.6;
}
.quick-answer .qa-pick {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--accent);
  color: #fff;
  padding: .4rem 1rem;
  border-radius: 100px;
  font-weight: 700;
  font-size: .9rem;
  margin-top: .75rem;
}

/* ── COLLAPSIBLE / ACCORDION ─────────────────────────────── */
.collapse-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: .85rem 1.25rem;
  background: rgba(18,24,33,.4);
  border: 1px solid rgba(255,255,255,.04);
  border-radius: var(--radius);
  color: var(--text);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  min-height: 44px;
}
.collapse-toggle:hover { border-color: rgba(59,130,246,.25); box-shadow: 0 0 12px rgba(59,130,246,.08); }
.collapse-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.collapse-toggle::after {
  content: '';
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text3);
  border-bottom: 2px solid var(--text3);
  transform: rotate(45deg);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.collapse-toggle.open::after { transform: rotate(-135deg); }
.collapse-content {
  display: none;
  padding: 1rem 1.25rem;
  background: rgba(18,24,33,.3);
  border: 1px solid rgba(255,255,255,.03);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}
.collapse-content.open { display: block; }

/* ── NEWS CARD ───────────────────────────────────────────── */
.news-card {
  background: rgba(18,24,33,.5);
  border: 1px solid rgba(255,255,255,.04);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  transition: all var(--transition);
}
.news-card:hover { border-color: rgba(59,130,246,.25); box-shadow: 0 0 16px var(--accent-glow); text-decoration: none; }
.news-card .news-date { font-size: .75rem; color: var(--text3); font-weight: 500; }
.news-card .news-title { font-size: 1rem; font-weight: 600; color: var(--text); }
.news-card .news-excerpt { font-size: .85rem; color: var(--text2); line-height: 1.55; }

/* ── SEARCH BAR ──────────────────────────────────────────── */
.search-bar {
  position: relative;
  max-width: 480px;
}
.search-bar input {
  width: 100%;
  padding: .7rem 1rem .7rem 2.75rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: .9rem;
  font-family: inherit;
  min-height: 44px;
  transition: border-color var(--transition);
}
.search-bar input:focus { outline: none; border-color: var(--accent); }
.search-bar input::placeholder { color: var(--text3); }
.search-bar .search-icon {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: var(--text3);
  fill: none;
  stroke-width: 2;
  pointer-events: none;
}

/* ── PRINT STYLES ────────────────────────────────────────── */
@media print {
  .site-nav, .nav-mobile, .site-footer { display: none; }
  body { background: #fff; color: #000; }
  .card, .info-box, .notice { border-color: #ccc; background: #f9f9f9; }
}

}

/* ── ACTIVE STATES (touch feedback) ───────────────────────── */
.btn:active { transform: scale(.97); }
.btn-primary:active { background: #1d4ed8; }
.card:active, .guide-card:active, .news-card:active { transform: scale(.99); }
.collapse-toggle:active { background: rgba(255,255,255,.03); }
.nav-links > li > a:active, .nav-links > li > button:active { background: rgba(255,255,255,.05); }

/* ── PAGE LOAD ANIMATION ─────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
main { animation: fadeUp .4s ease-out; }

@media (prefers-reduced-motion: reduce) {
  main { animation: none; }
}

/* ── DISABLED STATE ──────────────────────────────────────── */
.btn:disabled, .btn[disabled] {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── NAV SEARCH ──────────────────────────────────────────── */
.nav-search { display: none; }
@media (min-width: 920px) { .nav-search { display: block; } }
.nav-search input:focus { outline: none; }
