/*! MobileRanks — Homepage v4.0 (scoped to .mrh4)
 *  Pure CSS, no dependencies on the phone-page CSS. Locally-declared design tokens.
 */

.mrh4 {
  --mrh4-primary:   #0F172A;
  --mrh4-secondary: #1E3A8A;
  --mrh4-accent:    #2563EB;
  --mrh4-accent-600:#1D4ED8;
  --mrh4-accent-050:#EFF6FF;
  --mrh4-bg:        #F8FAFC;
  --mrh4-alt:       #F1F5F9;
  --mrh4-card:      #FFFFFF;
  --mrh4-border:    #E5E7EB;
  --mrh4-text:      #111827;
  --mrh4-text-2:    #4B5563;
  --mrh4-text-3:    #9CA3AF;
  --mrh4-radius:    18px;
  --mrh4-radius-sm: 12px;
  --mrh4-shadow-1:  0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
  --mrh4-shadow-2:  0 8px 24px -10px rgba(15,23,42,.16), 0 2px 6px rgba(15,23,42,.05);
  --mrh4-font:      "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mrh4-font-h:    "Poppins", "Inter", -apple-system, sans-serif;

  background: var(--mrh4-bg);
  color: var(--mrh4-text);
  font-family: var(--mrh4-font);
  -webkit-font-smoothing: antialiased;
}
.mrh4 * { box-sizing: border-box; }
.mrh4 .mrh4-wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(14px, 3vw, 28px); }
.mrh4 img { max-width: 100%; height: auto; display: block; }
.mrh4 h1, .mrh4 h2, .mrh4 h3 { font-family: var(--mrh4-font-h); color: var(--mrh4-primary); letter-spacing: -0.01em; margin: 0; }
.mrh4 a { color: inherit; text-decoration: none; }
.mrh4 a:focus-visible, .mrh4 button:focus-visible, .mrh4 input:focus-visible {
  outline: 2px solid var(--mrh4-accent); outline-offset: 2px; border-radius: 6px;
}

/* Buttons */
.mrh4-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 20px; border-radius: 999px;
  font-weight: 600; font-size: 14px; line-height: 1;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
  background: var(--mrh4-card); color: var(--mrh4-primary); border-color: var(--mrh4-border);
  text-decoration: none;
}
.mrh4-btn:hover { transform: translateY(-1px); box-shadow: var(--mrh4-shadow-1); }
.mrh4-btn:active { transform: translateY(0); }
.mrh4-btn-primary { background: var(--mrh4-accent); color: #fff; border-color: var(--mrh4-accent); }
.mrh4-btn-primary:hover { background: var(--mrh4-accent-600); }
.mrh4-btn-ghost { background: transparent; color: var(--mrh4-primary); border-color: var(--mrh4-border); }
.mrh4-btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.mrh4-btn-ghost-light:hover { background: rgba(255,255,255,.1); }
.mrh4-btn-lg { padding: 14px 26px; font-size: 15px; }
.mrh4-btn-mini { padding: 8px 12px; font-size: 12px; }
.mrh4-btn-block { width: 100%; }

.mrh4-eyebrow, .mrh4-eyebrow-light {
  display: inline-block; text-transform: uppercase; letter-spacing: .1em;
  font-size: 11px; font-weight: 700;
  color: var(--mrh4-accent); margin-bottom: 6px;
}
.mrh4-eyebrow-light { color: #A7C4FF; }

/* ============== HERO ============== */
.mrh4-hero {
  background: linear-gradient(135deg, #0B1226 0%, #0F172A 45%, #1E3A8A 100%);
  color: #fff;
  padding: clamp(28px, 6vw, 56px) 0;
}
.mrh4-hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: stretch;
}
@media (max-width: 900px) { .mrh4-hero-grid { grid-template-columns: 1fr; } }
.mrh4-hero-story {
  display: grid; grid-template-rows: auto 1fr; border-radius: var(--mrh4-radius);
  overflow: hidden; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08);
}
.mrh4-hero-media img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.mrh4-hero-copy { padding: 22px clamp(18px, 3vw, 28px) 26px; display: grid; gap: 12px; }
.mrh4-hero-title { font-size: clamp(24px, 3.2vw, 40px); line-height: 1.15; color: #fff; font-weight: 800; }
.mrh4-hero-title a { color: #fff; }
.mrh4-hero-title a:hover { color: #A7C4FF; }
.mrh4-hero-lede { color: rgba(255,255,255,.78); font-size: 15px; margin: 0; }
.mrh4-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.mrh4-hero-search {
  display: flex; gap: 8px; margin-top: 8px; padding: 6px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
}
.mrh4-hero-search input {
  flex: 1; min-width: 0; padding: 10px 14px; border: 0; background: transparent; color: #fff;
  font: inherit; outline: none;
}
.mrh4-hero-search input::placeholder { color: rgba(255,255,255,.55); }
.mrh4-hero-search button {
  padding: 10px 18px; border: 0; border-radius: 999px; background: var(--mrh4-accent);
  color: #fff; font-weight: 600; cursor: pointer; transition: background-color .18s ease;
}
.mrh4-hero-search button:hover { background: var(--mrh4-accent-600); }

.mrh4-hero-phone {
  display: grid; grid-template-rows: 1fr auto; border-radius: var(--mrh4-radius);
  overflow: hidden; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
}
.mrh4-hero-phone-media { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; max-height: 380px; margin: 0 auto; width: 100%; }
.mrh4-hero-phone-media img { max-height: 88%; max-width: 88%; width: auto; height: auto; object-fit: contain; object-position: center; }
.mrh4-hero-phone-body { padding: 18px 22px 22px; display: grid; gap: 10px; }
.mrh4-hero-phone-name { color: #fff; font-weight: 700; font-size: 18px; }
.mrh4-hero-phone-meta { display: flex; gap: 12px; align-items: center; color: rgba(255,255,255,.78); font-size: 13px; }
.mrh4-hero-phone-score { color: #FBBF24; font-weight: 700; }
.mrh4-hero-phone-price { color: #A7C4FF; font-weight: 700; }

/* ============== SECTIONS ============== */
.mrh4-section { padding: clamp(36px, 5vw, 64px) 0; }
.mrh4-section-alt { background: var(--mrh4-alt); }
.mrh4-shead {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.mrh4-shead h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; }
.mrh4-shead-link { color: var(--mrh4-accent); font-weight: 600; font-size: 14px; }
.mrh4-shead-link:hover { color: var(--mrh4-accent-600); text-decoration: underline; }

/* Grid helpers */
.mrh4-grid { display: grid; gap: 18px; }
.mrh4-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mrh4-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mrh4-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .mrh4-grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px)  { .mrh4-grid-4, .mrh4-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px)  { .mrh4-grid-4, .mrh4-grid-3, .mrh4-grid-2 { grid-template-columns: 1fr; } }

/* Phone card */
.mrh4-pcard {
  background: var(--mrh4-card); border: 1px solid var(--mrh4-border); border-radius: var(--mrh4-radius);
  overflow: hidden; display: grid; grid-template-rows: auto 1fr;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.mrh4-pcard:hover { transform: translateY(-3px); box-shadow: var(--mrh4-shadow-2); border-color: #D6DEE8; }
.mrh4-pcard-media { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; background: #fff; }
.mrh4-pcard-media img { max-width: 88%; max-height: 88%; width: auto; height: auto; object-fit: contain; object-position: center; }
.mrh4-pcard-noimg { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #EEF2F7, #E5E7EB); }
.mrh4-pcard-chip {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: rgba(15,23,42,.85); color: #fff; font-size: 11px; font-weight: 600;
  padding: 4px 8px; border-radius: 999px;
}
.mrh4-pcard-body { padding: 14px 14px 16px; display: grid; gap: 6px; }
.mrh4-pcard-brand { font-size: 12px; color: var(--mrh4-text-3); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.mrh4-pcard-name { font-size: 16px; font-weight: 700; line-height: 1.3; }
.mrh4-pcard-name a:hover { color: var(--mrh4-accent); }
.mrh4-pcard-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 2px; font-size: 13px; color: var(--mrh4-text-2); }
.mrh4-pcard-score { color: #B45309; font-weight: 700; }
.mrh4-pcard-price { color: var(--mrh4-primary); font-weight: 700; }
.mrh4-pcard-cta { display: flex; gap: 8px; margin-top: 8px; }

/* Review card */
.mrh4-rcard {
  background: var(--mrh4-card); border: 1px solid var(--mrh4-border); border-radius: var(--mrh4-radius);
  overflow: hidden; display: grid; grid-template-columns: 44% 1fr;
  transition: transform .22s ease, box-shadow .22s ease;
}
.mrh4-rcard:hover { transform: translateY(-2px); box-shadow: var(--mrh4-shadow-2); }
.mrh4-rcard-media { background: #F3F4F6; }
.mrh4-rcard-media img { width: 100%; height: 100%; object-fit: cover; }
.mrh4-rcard-body { padding: 18px 20px; display: grid; gap: 8px; align-content: center; }
.mrh4-rcard-title { font-size: 20px; line-height: 1.25; }
.mrh4-rcard-title a:hover { color: var(--mrh4-accent); }
.mrh4-rcard-lede { color: var(--mrh4-text-2); font-size: 14px; margin: 0; }
.mrh4-rcard-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.mrh4-rcard-more { color: var(--mrh4-accent); font-weight: 600; font-size: 14px; }
@media (max-width: 640px) { .mrh4-rcard { grid-template-columns: 1fr; } .mrh4-rcard-media { aspect-ratio: 16/9; } }

/* News card */
.mrh4-ncard {
  background: var(--mrh4-card); border: 1px solid var(--mrh4-border); border-radius: var(--mrh4-radius);
  overflow: hidden; display: grid; grid-template-rows: auto 1fr;
  transition: transform .22s ease, box-shadow .22s ease;
}
.mrh4-ncard:hover { transform: translateY(-3px); box-shadow: var(--mrh4-shadow-2); }
.mrh4-ncard-media { aspect-ratio: 16/9; background: #F3F4F6; overflow: hidden; }
.mrh4-ncard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.mrh4-ncard:hover .mrh4-ncard-media img { transform: scale(1.04); }
.mrh4-ncard-noimg { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #EEF2F7, #E5E7EB); }
.mrh4-ncard-body { padding: 16px 18px 18px; display: grid; gap: 6px; }
.mrh4-ncard-title { font-size: 17px; line-height: 1.3; font-weight: 700; }
.mrh4-ncard-title a:hover { color: var(--mrh4-accent); }
.mrh4-ncard-meta { color: var(--mrh4-text-3); font-size: 12px; }

/* Finder banner */
.mrh4-finder {
  background: linear-gradient(135deg, var(--mrh4-secondary) 0%, var(--mrh4-primary) 100%);
  color: #fff; padding: clamp(40px, 6vw, 72px) 0;
  border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06);
}
.mrh4-finder-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; }
@media (max-width: 900px) { .mrh4-finder-inner { grid-template-columns: 1fr; } }
.mrh4-finder-copy h2 { color: #fff; font-size: clamp(24px, 3vw, 34px); font-weight: 800; margin: 4px 0 10px; }
.mrh4-finder-copy p { color: rgba(255,255,255,.78); margin: 0 0 18px; max-width: 60ch; }
.mrh4-finder-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mrh4-finder-chips span {
  padding: 8px 14px; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16); border-radius: 999px; font-size: 13px; color: #DBE7FF;
}

/* Compare card */
.mrh4-cmp-card {
  display: grid; gap: 12px; padding: 18px 20px;
  background: var(--mrh4-card); border: 1px solid var(--mrh4-border); border-radius: var(--mrh4-radius);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.mrh4-cmp-card:hover { transform: translateY(-2px); box-shadow: var(--mrh4-shadow-2); border-color: #D6DEE8; }
.mrh4-cmp-vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; text-align: center; }
.mrh4-cmp-name { font-weight: 700; font-size: 15px; color: var(--mrh4-primary); }
.mrh4-cmp-x {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  border-radius: 50%; background: var(--mrh4-accent-050); color: var(--mrh4-accent); font-weight: 700; font-size: 12px;
}
.mrh4-cmp-cta { color: var(--mrh4-accent); font-weight: 600; font-size: 14px; text-align: center; }

/* Best cards */
.mrh4-best-card {
  position: relative; display: grid; gap: 8px; padding: 22px;
  background: var(--mrh4-card); border: 1px solid var(--mrh4-border); border-radius: var(--mrh4-radius);
  overflow: hidden; min-height: 160px;
  transition: transform .22s ease, box-shadow .22s ease;
}
.mrh4-best-card:hover { transform: translateY(-3px); box-shadow: var(--mrh4-shadow-2); }
.mrh4-best-swatch {
  position: absolute; inset: 0 auto auto 0; width: 100%; height: 6px;
  background: var(--mrh4-best-accent, var(--mrh4-accent));
}
.mrh4-best-title { font-size: 22px; font-weight: 800; color: var(--mrh4-primary); font-family: var(--mrh4-font-h); }
.mrh4-best-cta { color: var(--mrh4-accent); font-weight: 600; font-size: 14px; margin-top: 6px; }

/* Brands */
.mrh4-brands {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px;
}
@media (max-width: 900px) { .mrh4-brands { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .mrh4-brands { grid-template-columns: repeat(2, 1fr); } }
.mrh4-brand {
  background: var(--mrh4-card); border: 1px solid var(--mrh4-border); border-radius: var(--mrh4-radius-sm);
  padding: 18px 12px; text-align: center; display: grid; gap: 6px; justify-items: center;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.mrh4-brand:hover { transform: translateY(-2px); box-shadow: var(--mrh4-shadow-1); border-color: #D6DEE8; }
.mrh4-brand-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--mrh4-alt); overflow: hidden;
}
.mrh4-brand-logo img { max-width: 60%; max-height: 60%; object-fit: contain; }
.mrh4-brand-letter { font-family: var(--mrh4-font-h); font-weight: 800; font-size: 22px; color: var(--mrh4-primary); }
.mrh4-brand strong { font-weight: 700; font-size: 14px; }
.mrh4-brand-count { font-size: 12px; color: var(--mrh4-text-3); }

/* Guides */
.mrh4-guide-card {
  display: grid; gap: 8px; align-content: space-between;
  padding: 20px; min-height: 160px;
  background: var(--mrh4-card); border: 1px solid var(--mrh4-border); border-radius: var(--mrh4-radius);
  transition: transform .22s ease, box-shadow .22s ease;
}
.mrh4-guide-card:hover { transform: translateY(-2px); box-shadow: var(--mrh4-shadow-2); }
.mrh4-guide-card strong { font-family: var(--mrh4-font-h); font-size: 18px; font-weight: 700; color: var(--mrh4-primary); line-height: 1.3; }
.mrh4-guide-cta { color: var(--mrh4-accent); font-weight: 600; font-size: 14px; }

/* Newsletter */
.mrh4-newsletter { background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 100%); color: #fff; }
.mrh4-nl-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; }
@media (max-width: 900px) { .mrh4-nl-inner { grid-template-columns: 1fr; } }
.mrh4-nl-copy h2 { color: #fff; font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; margin: 4px 0 8px; }
.mrh4-nl-copy p { color: rgba(255,255,255,.78); margin: 0; }
.mrh4-nl-form { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; }
.mrh4-nl-form input { flex: 1; min-width: 220px; padding: 12px 16px; border: 0; background: transparent; color: #fff; font: inherit; outline: none; }
.mrh4-nl-form input::placeholder { color: rgba(255,255,255,.55); }
.mrh4-nl-thanks { width: 100%; margin: 8px 6px 4px; color: #A7F3D0; font-size: 13px; }

/* About */
.mrh4-about { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: start; }
@media (max-width: 900px) { .mrh4-about { grid-template-columns: 1fr; } }
.mrh4-about h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; margin: 4px 0 10px; }
.mrh4-about p { color: var(--mrh4-text-2); max-width: 55ch; margin: 0; }
.mrh4-about-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.mrh4-about-cell {
  background: var(--mrh4-card); border: 1px solid var(--mrh4-border); border-radius: var(--mrh4-radius-sm);
  padding: 16px; display: grid; gap: 4px;
  transition: transform .22s ease, box-shadow .22s ease;
}
.mrh4-about-cell:hover { transform: translateY(-2px); box-shadow: var(--mrh4-shadow-1); }
.mrh4-about-cell strong { font-family: var(--mrh4-font-h); font-weight: 700; color: var(--mrh4-primary); }
.mrh4-about-cell span { color: var(--mrh4-text-2); font-size: 13px; }

.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); height: 1px; overflow: hidden; padding: 0;
  position: absolute; width: 1px; word-wrap: normal !important;
}

@media (prefers-reduced-motion: reduce) {
  .mrh4 * { transition: none !important; animation: none !important; }
}
