/* ============================================================
   TeslaPiPhone.net — Main Stylesheet
   Tesla-inspired dark design system
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  --red:        #e31937;
  --red-dark:   #b5132b;
  --red-glow:   rgba(227, 25, 55, 0.18);

  --bg:         #080808;
  --bg-2:       #0f0f0f;
  --bg-3:       #161616;
  --bg-card:    #111111;
  --border:     #222222;
  --border-2:   #2e2e2e;

  --text:       #f0f0f0;
  --text-muted: #888888;
  --text-dim:   #555555;

  --radius-sm:  6px;
  --radius:     12px;
  --radius-lg:  20px;

  --shadow-card: 0 1px 3px rgba(0,0,0,.6), 0 4px 16px rgba(0,0,0,.4);
  --shadow-hover: 0 2px 6px rgba(0,0,0,.7), 0 8px 32px rgba(0,0,0,.5);

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --transition: 0.22s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--red); text-decoration: none; transition: color var(--transition); }
a:hover { color: #ff3a57; }
ul { list-style: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */
.container {
  width: 90%;
  max-width: 1160px;
  margin: 0 auto;
}

.section {
  padding: 96px 0;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: clamp(2.8rem, 7vw, 5.5rem); font-weight: 900; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); font-weight: 700; }

p { color: var(--text-muted); max-width: 70ch; }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}

.section-desc {
  font-size: 1.05rem;
  margin-top: 10px;
  margin-bottom: 48px;
  max-width: 60ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
              box-shadow var(--transition), transform var(--transition);
  border: none;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--red);
  color: #fff;
}
.btn-primary:hover {
  background: var(--red-dark);
  color: #fff;
  box-shadow: 0 0 0 3px var(--red-glow), 0 4px 20px rgba(227,25,55,.35);
}

.btn-ghost {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid var(--border-2);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.10);
  color: var(--text);
  border-color: #444;
}

.btn-outline {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red);
  padding: 10px 22px;
  font-size: 0.88rem;
}
.btn-outline:hover {
  background: var(--red-glow);
  color: #ff3a57;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 20px 0;
  transition: padding var(--transition), background var(--transition),
              box-shadow var(--transition), backdrop-filter var(--transition);
}

.site-header.scrolled {
  padding: 12px 0;
  background: rgba(8, 8, 8, 0.88);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  box-shadow: 0 1px 0 var(--border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  background: var(--red);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  font-weight: 900;
  flex-shrink: 0;
}

.logo-text { letter-spacing: -0.02em; }
.logo-dot  { color: var(--text-muted); }

/* Main nav */
.main-nav ul {
  display: flex;
  gap: 32px;
}

.main-nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
  padding: 4px 0;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.main-nav a:hover { color: var(--text); }
.main-nav a:hover::after { transform: scaleX(1); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

/* Background effects */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
}

.hero-glow-1 {
  width: 700px; height: 500px;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(227,25,55,0.5) 0%, transparent 70%);
}

.hero-glow-2 {
  width: 500px; height: 400px;
  bottom: 0; right: -100px;
  background: radial-gradient(ellipse, rgba(227,25,55,0.2) 0%, transparent 70%);
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(227,25,55,0.12);
  border: 1px solid rgba(227,25,55,0.3);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #ff6b81;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.badge-dot {
  width: 7px; height: 7px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.4); }
}

.hero h1 {
  background: linear-gradient(135deg, #ffffff 0%, #aaaaaa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero-disclaimer {
  font-size: 0.75rem;
  color: var(--text-dim);
  max-width: 50ch;
  margin: 0 auto;
}

/* ============================================================
   INTRO / STATS
   ============================================================ */
.intro-section { background: var(--bg-2); }

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.intro-text h2 { margin-bottom: 20px; }

.intro-text p {
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.75;
}

.intro-text p strong { color: var(--text); }
.intro-text p em { color: #ccc; font-style: italic; }

.intro-text .btn-outline { margin-top: 12px; }

.intro-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
  border-color: var(--border-2);
  box-shadow: var(--shadow-card);
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--red);
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* ============================================================
   FEATURES
   ============================================================ */
.features-section {
  background: var(--bg);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color var(--transition), box-shadow var(--transition),
              transform var(--transition);
}

.feature-card:hover {
  border-color: rgba(227,25,55,0.35);
  box-shadow: var(--shadow-hover), 0 0 0 1px rgba(227,25,55,0.12) inset;
  transform: translateY(-3px);
}

.feature-card--large {
  grid-column: span 2;
}

.feature-card--wide {
  grid-column: span 2;
}

.feature-icon {
  width: 44px; height: 44px;
  color: var(--red);
  flex-shrink: 0;
}

.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature-card h3 {
  color: var(--text);
  font-size: 1.1rem;
}

.feature-card p {
  font-size: 0.92rem;
  line-height: 1.7;
  flex: 1;
  max-width: none;
}

.feature-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  border: 1px solid var(--border-2);
  align-self: flex-start;
}

/* ============================================================
   SPECS TABLE
   ============================================================ */
.specs-section { background: var(--bg-2); }

.specs-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.specs-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.specs-table tbody tr:last-child { border-bottom: none; }
.specs-table tbody tr:hover { background: rgba(255,255,255,0.03); }

.specs-table th,
.specs-table td {
  padding: 18px 24px;
  text-align: left;
  vertical-align: top;
}

.specs-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  width: 200px;
  white-space: nowrap;
}

.specs-table td {
  color: var(--text);
  line-height: 1.55;
}

/* ============================================================
   COMPARISON TABLE
   ============================================================ */
.comparison-section { background: var(--bg); }

.compare-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.compare-table thead tr {
  background: var(--bg-3);
}

.compare-table th,
.compare-table td {
  padding: 16px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.compare-table th:first-child,
.compare-table td:first-child {
  text-align: left;
  color: var(--text-muted);
  font-weight: 500;
}

.compare-table thead th {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.compare-table .col-tesla {
  background: rgba(227,25,55,0.06);
  color: var(--text);
  font-weight: 600;
}

.compare-table thead .col-tesla {
  color: var(--red);
}

.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table tbody tr:hover td { background: rgba(255,255,255,0.02); }
.compare-table tbody tr:hover .col-tesla { background: rgba(227,25,55,0.10); }

.check  { color: #4ade80; }
.cross  { color: var(--text-dim); }
.partial { color: #facc15; }

.table-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  max-width: none;
}

/* ============================================================
   FAQ  — JS-driven button accordion
   ============================================================ */
.faq-section { background: var(--bg-2); }

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 48px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}

/* Open state driven by JS adding .open class */
.faq-item.open {
  border-color: rgba(227,25,55,0.3);
}

.faq-question {
  /* Reset button styles */
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
  user-select: none;
  transition: color var(--transition);
  outline: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--red);
  flex-shrink: 0;
  transition: transform var(--transition);
  line-height: 1;
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-question:hover,
.faq-question:focus-visible { color: var(--red); }

/* Answer hidden by default, shown when .open is present */
.faq-answer {
  display: none;
  padding: 0 28px 22px;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-answer p {
  font-size: 0.92rem;
  line-height: 1.75;
  max-width: none;
}

.faq-answer p strong { color: var(--text); }
.faq-answer p em { color: #bbb; }
.faq-answer a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   DISCLAIMER
   ============================================================ */
.disclaimer-section {
  padding: 48px 0;
  background: var(--bg);
}

.disclaimer-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 32px 36px;
}

.disclaimer-box h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.disclaimer-box p {
  font-size: 0.88rem;
  line-height: 1.7;
  max-width: none;
  color: var(--text-dim);
}

.disclaimer-box p strong { color: var(--text-muted); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 48px 0 0;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 48px;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 12px;
  max-width: 28ch;
}

.footer-brand .logo { margin-bottom: 0; }

.footer-nav ul {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color var(--transition);
}

.footer-nav a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: 0.78rem;
  color: var(--text-dim);
  max-width: none;
}

.back-to-top {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.back-to-top:hover { color: var(--text); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ---- Large tablet (900px) ---- */
@media (max-width: 900px) {

  .section { padding: 72px 0; }

  .intro-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .features-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature-card--large,
  .feature-card--wide {
    grid-column: span 2;
  }

  /* Hero CTA — flex-wrap for smaller tablets */
  .hero-cta {
    flex-wrap: wrap;
    justify-content: center;
  }

}

/* ---- Mobile (640px) ---- */
@media (max-width: 640px) {

  .section { padding: 56px 0; }

  /* Nav */
  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(8,8,8,0.97);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
    z-index: 190;
  }

  .main-nav.open {
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 36px;
  }

  .main-nav a {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
  }

  /* Hero */
  .hero { min-height: 100svh; padding: 100px 0 64px; }
  .hero-glow-1 { width: 340px; height: 300px; opacity: 0.25; }
  .hero-glow-2 { display: none; }
  .hide-sm { display: none; }

  /* Hero badge — prevent overflow */
  .hero-badge {
    font-size: 0.68rem;
    padding: 5px 10px;
    white-space: nowrap;
  }

  /* Hero CTA — stack vertically on small phones */
  .hero-cta {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
    max-width: 320px;
  }

  /* Stats */
  .intro-stats { grid-template-columns: 1fr 1fr; }

  /* Features */
  .features-grid { grid-template-columns: 1fr; }
  .feature-card--large,
  .feature-card--wide { grid-column: span 1; }

  /* Tables */
  .specs-table th { width: 110px; padding: 12px 14px; font-size: 0.78rem; }
  .specs-table td { padding: 12px 14px; font-size: 0.88rem; }
  .compare-table th,
  .compare-table td { padding: 10px 12px; font-size: 0.78rem; }

  /* Latest updates */
  .update-item {
    grid-template-columns: 1fr;
  }
  .update-date {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 12px 20px 8px;
    font-size: 0.72rem;
  }
  .update-content { padding: 14px 20px 18px; }

  /* TOC */
  .toc-box { padding: 20px 20px; }
  .toc-grid { grid-template-columns: 1fr; }

  /* Related pages grid → 2 col */
  .related-pages-grid { grid-template-columns: 1fr 1fr; }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    gap: 28px;
    padding-bottom: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  /* Page hero */
  .page-hero { padding: 110px 0 52px; }
  .page-hero h1 { max-width: none; font-size: clamp(1.7rem, 8vw, 2.6rem); }
  .page-hero-sub { font-size: 0.93rem; }
  .page-hero-meta { flex-direction: column; gap: 6px; }

  /* Quick answer */
  .quick-answer-box { padding: 22px 20px; }

  /* Article sidebar — stack vertically */
  .article-sidebar { flex-direction: column; }
  .article-sidebar .sidebar-card { flex: 1 1 100%; }
  .about-sidebar { flex-direction: column; }
  .about-sidebar .sidebar-card { flex: 1 1 100%; }

  /* Comparison vs-cards → single column */
  .vs-cards { grid-template-columns: 1fr; }

  /* Watch grid → single column */
  .watch-grid { grid-template-columns: 1fr; }

  /* Related pages → single column on small mobile */
  .related-pages-grid { grid-template-columns: 1fr; }

  /* Team card — stack */
  .team-card { flex-direction: column; }

  /* Method items */
  .method-item { grid-template-columns: 1fr; }

}

/* ---- Small phones (480px) ---- */
@media (max-width: 480px) {

  /* Stat cards — single column on very small screens */
  .intro-stats { grid-template-columns: 1fr; }

  /* Feature card padding tighten */
  .feature-card { padding: 24px 20px; gap: 12px; }

  /* Comparison table font further reduced */
  .compare-table th,
  .compare-table td { padding: 8px 10px; font-size: 0.72rem; }

  /* Specs table */
  .specs-table th { width: 90px; font-size: 0.72rem; }
  .specs-table td { font-size: 0.82rem; }

  /* Footer brand text */
  .footer-brand p { max-width: none; }

  /* Hero badge even tighter */
  .hero-badge { font-size: 0.62rem; letter-spacing: 0.04em; }

  /* Price cards */
  .price-card-header { flex-direction: column; align-items: flex-start; gap: 4px; }

  /* Timeline dot alignment */
  .timeline { padding-left: 28px; }
  .timeline-content { padding: 16px 18px; }

  /* Quick answer box */
  .quick-answer-box { padding: 18px 16px; }

  /* Section label */
  .section-label { font-size: 0.68rem; }

}

/* ============================================================
   FOCUS / ACCESSIBILITY
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ============================================================
   SCROLLBAR (Webkit)
   ============================================================ */
::-webkit-scrollbar          { width: 8px; }
::-webkit-scrollbar-track    { background: var(--bg-2); }
::-webkit-scrollbar-thumb    { background: var(--border-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #444; }

/* ============================================================
   SELECTION
   ============================================================ */
::selection {
  background: rgba(227,25,55,0.3);
  color: #fff;
}

/* ============================================================
   NAV ACTIVE STATE
   ============================================================ */
.nav-active {
  color: var(--text) !important;
}
.nav-active::after {
  transform: scaleX(1) !important;
}

/* ============================================================
   PAGE HERO (sub-pages)
   ============================================================ */
.page-hero {
  position: relative;
  padding: 140px 0 72px;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff 0%, #aaaaaa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  max-width: 18ch;
}

.page-hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--text-muted);
  max-width: 60ch;
  line-height: 1.7;
  margin-bottom: 20px;
}

.page-hero-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 8px;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  margin-bottom: 20px;
}

.breadcrumb ol {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  list-style: none;
}

.breadcrumb ol li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.breadcrumb ol li::after {
  content: '/';
  color: var(--text-dim);
}

.breadcrumb ol li:last-child::after {
  display: none;
}

.breadcrumb ol li a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color var(--transition);
}

.breadcrumb ol li a:hover { color: var(--red); }

/* ============================================================
   ARTICLE LAYOUT (2-col: article + sidebar)
   ============================================================ */
.article-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

.article-body h2 {
  margin-top: 48px;
  margin-bottom: 16px;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
  margin-top: 24px;
  margin-bottom: 10px;
}

.article-body p {
  margin-bottom: 16px;
  font-size: 0.97rem;
  line-height: 1.8;
  max-width: none;
}

.article-body p strong { color: var(--text); }

.content-list {
  list-style: none;
  margin: 16px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.content-list li {
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.content-list li strong { color: var(--text); }

.content-list--numbered {
  counter-reset: list-counter;
}

.content-list--numbered li {
  counter-increment: list-counter;
  padding-left: 44px;
  position: relative;
}

.content-list--numbered li::before {
  content: counter(list-counter);
  position: absolute;
  left: 12px;
  top: 12px;
  width: 22px; height: 22px;
  background: var(--red);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 100px;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.sidebar-card h3 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.sidebar-card--cta {
  border-color: rgba(227,25,55,0.25);
  background: rgba(227,25,55,0.05);
}

.sidebar-card--cta p {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: none;
}

.sidebar-card--warning {
  border-color: rgba(250,204,21,0.3);
  background: rgba(250,204,21,0.04);
}

.sidebar-card--warning h3 { color: #facc15; }

.sidebar-card--warning p {
  font-size: 0.83rem;
  color: var(--text-muted);
  max-width: none;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-links li a {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-links li a::before {
  content: '→';
  color: var(--red);
  font-size: 0.75rem;
}

.sidebar-links li a:hover { color: var(--text); }

.quick-facts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-facts li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.85rem;
  color: var(--text);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.quick-facts li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.qf-label {
  color: var(--text-dim);
  font-size: 0.78rem;
  flex-shrink: 0;
  margin-right: 8px;
}

/* ============================================================
   QUICK ANSWER BOX
   ============================================================ */
.quick-answer-section { padding: 0 0 64px; }

.quick-answer-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 36px 40px;
}

.quick-answer-box h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  margin-bottom: 14px;
}

.quick-answer-box p {
  font-size: 1rem;
  line-height: 1.75;
  max-width: 80ch;
  color: var(--text-muted);
}

.quick-answer-box p strong { color: var(--text); }
.quick-answer-box p em { color: #ccc; }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
  position: relative;
  margin: 32px 0 48px;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--red), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 36px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -38px;
  top: 4px;
  width: 12px; height: 12px;
  background: var(--border-2);
  border: 2px solid var(--border-2);
  border-radius: 50%;
  transition: background var(--transition), border-color var(--transition);
}

.timeline-item--now::before {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 0 4px var(--red-glow);
}

.timeline-date {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: border-color var(--transition);
}

.timeline-item--now .timeline-content {
  border-color: rgba(227,25,55,0.3);
}

.timeline-content h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.timeline-content p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: none;
  margin-top: 8px;
  margin-bottom: 0;
}

.timeline-content .feature-tag { margin-bottom: 8px; }

/* ============================================================
   WATCH GRID
   ============================================================ */
.watch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.watch-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  transition: border-color var(--transition), transform var(--transition);
}

.watch-card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
}

.watch-icon {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 12px;
}

.watch-card h3 {
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.watch-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: none;
  margin: 0;
}

/* ============================================================
   VS CARDS
   ============================================================ */
.vs-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}

.vs-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
}

.vs-card--win {
  border-left: 3px solid var(--red);
}

.vs-card--iphone {
  border-left: 3px solid #555;
}

.vs-card h3 {
  font-size: 0.98rem;
  margin-bottom: 10px;
}

.vs-card p {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: none;
  margin: 0;
}

/* ============================================================
   PRICE CARDS
   ============================================================ */
.price-card-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 24px 0;
}

.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: border-color var(--transition);
}

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

.price-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}

.price-card-feature {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.price-card-cost {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--red);
  white-space: nowrap;
}

.price-card p {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: none;
  margin: 0;
}

/* ============================================================
   ABOUT PAGE LAYOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

.about-block {
  margin-bottom: 48px;
}

.about-block:last-child { margin-bottom: 0; }

.about-block h2 {
  margin-bottom: 18px;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
}

.about-block p {
  font-size: 0.97rem;
  line-height: 1.8;
  margin-bottom: 14px;
  max-width: none;
}

.about-block p strong { color: var(--text); }

.team-card {
  display: flex;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  align-items: flex-start;
}

.team-avatar {
  width: 56px; height: 56px;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.team-info h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.team-role {
  font-size: 0.78rem;
  color: var(--red);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px !important;
}

.method-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.method-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.method-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.method-likely {
  background: rgba(74,222,128,0.12);
  color: #4ade80;
  border: 1px solid rgba(74,222,128,0.25);
}

.method-speculative {
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  border: 1px solid var(--border-2);
}

.method-longterm {
  background: rgba(250,204,21,0.1);
  color: #facc15;
  border: 1px solid rgba(250,204,21,0.25);
}

.method-item p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 !important;
  max-width: none;
}

.sources-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.sources-list li {
  font-size: 0.92rem;
  color: var(--text-muted);
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  line-height: 1.5;
}

.sources-list li strong { color: var(--text); }

.about-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 100px;
}

/* ============================================================
   LATEST UPDATES (Homepage)
   ============================================================ */
.updates-section { background: var(--bg-2); }

.updates-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.update-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.update-item:last-child { border-bottom: none; }

.update-item:hover { background: rgba(255,255,255,0.02); }

.update-date {
  padding: 20px 24px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--red);
  letter-spacing: 0.04em;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  padding-top: 22px;
  white-space: nowrap;
}

.update-content {
  padding: 20px 28px;
}

.update-content h3 {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.update-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: none;
  margin: 0;
}

/* ============================================================
   TABLE OF CONTENTS (Homepage)
   ============================================================ */
.toc-section { padding: 48px 0; background: var(--bg); }

.toc-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 36px;
  background: var(--bg-card);
}

.toc-box h2 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.toc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.87rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.toc-link:hover {
  color: var(--text);
  border-color: var(--border-2);
  background: var(--bg-3);
}

.toc-num {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--red);
  min-width: 18px;
}

/* ============================================================
   RELATED PAGES STRIP (Homepage)
   ============================================================ */
.related-pages-section {
  background: var(--bg-2);
  padding: 64px 0;
}

.related-pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.related-page-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.related-page-card:hover {
  border-color: rgba(227,25,55,0.35);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.related-page-icon {
  font-size: 1.5rem;
}

.related-page-card h3 {
  font-size: 0.95rem;
  color: var(--text);
}

.related-page-card p {
  font-size: 0.82rem;
  color: var(--text-dim);
  max-width: none;
  margin: 0;
  line-height: 1.5;
}

.related-page-arrow {
  font-size: 0.82rem;
  color: var(--red);
  margin-top: auto;
}

/* ============================================================
   INFO TABLE WRAPPER (sub-pages)
   ============================================================ */
.info-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 24px 0;
}


/* ============================================================
   RESPONSIVE — SUB-PAGE ARTICLE GRID
   ============================================================ */
/* Collapse article + sidebar to single column at tablet */
@media (max-width: 1024px) {
  .article-grid { grid-template-columns: 1fr; }
  .article-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .article-sidebar .sidebar-card { flex: 1 1 250px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .about-sidebar .sidebar-card { flex: 1 1 250px; }
}

