/* OutageShield - Custom Styles (Tailwind + overrides)
   Modern, trustworthy, premium energy/tech aesthetic
   Colors: Navy #0A2540, Teal #00C4B4, Light backgrounds
*/

:root {
  --navy: #0A2540;
  --teal: #00C4B4;
  --teal-dark: #00A99A;
  --slate-50: #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-900: #0F172A;
}

/* Fallbacks if Tailwind CDN is blocked */
.text-navy { color: var(--navy); }
.bg-navy { background-color: var(--navy); }
.text-teal { color: var(--teal); }
.bg-teal { background-color: var(--teal); }
.hover\:text-teal:hover { color: var(--teal); }

/* Base enhancements */
body {
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1E2937;
  line-height: 1.65;
}

h1, h2, h3, h4 {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-weight: 650;
  line-height: 1.15;
  color: var(--navy);
  letter-spacing: -0.02em;
}

/* Navbar */
.navbar {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
}

.nav-link {
  color: #334155;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--teal);
}

.nav-link.active {
  color: var(--navy);
  font-weight: 600;
}

/* Buttons - Refined premium feel */
.btn-primary {
  background-color: var(--teal);
  color: white;
  font-weight: 600;
  padding: 0.7rem 1.65rem;
  border-radius: 9999px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  box-shadow: 0 10px 15px -3px rgb(0 196 180 / 0.25), 0 4px 6px -4px rgb(0 196 180 / 0.2);
  letter-spacing: -0.01em;
}

.btn-primary:hover {
  background-color: var(--teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 20px 25px -5px rgb(0 196 180 / 0.3);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.btn-secondary {
  background-color: white;
  color: var(--navy);
  font-weight: 600;
  padding: 0.7rem 1.65rem;
  border-radius: 9999px;
  border: 2px solid #E2E8F0;
  transition: all 0.2s;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.btn-secondary:hover {
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-1px);
}

.btn-secondary:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.btn-affiliate {
  background-color: var(--navy);
  color: white;
  font-weight: 600;
  padding: 0.65rem 1.35rem;
  border-radius: 9999px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 6px -1px rgb(10 37 64 / 0.2);
}

.btn-affiliate:hover {
  background-color: #071A2E;
  transform: translateY(-1px);
}

.btn-affiliate:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.affiliate-note {
  font-size: 0.75rem;
  color: #64748B;
  margin-top: 0.25rem;
}

/* Cards & Sections - More refined */
.card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgb(15 23 42 / 0.06), 0 4px 6px -4px rgb(15 23 42 / 0.06);
  border: 1px solid #F1F5F9;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 25px -5px rgb(15 23 42 / 0.1), 0 8px 10px -6px rgb(15 23 42 / 0.08);
  border-color: #E0E7FF;
}

.section {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

.section-header {
  margin-bottom: 2rem;
}

/* Product / Review Cards */
.product-card {
  overflow: hidden;
}

.product-card img {
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  object-fit: cover;
}

.product-card:hover img {
  transform: scale(1.035);
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
}

/* Comparison Tables - Refined */
.comparison-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 0.925rem;
}

.comparison-table th {
  background-color: var(--navy);
  color: white;
  font-weight: 600;
  text-align: left;
  padding: 0.9rem 1.1rem;
  border-bottom: 3px solid var(--teal);
  white-space: nowrap;
}

.comparison-table td {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid #E2E8F0;
  vertical-align: top;
}

.comparison-table tr:nth-child(even) td {
  background-color: #F8FAFC;
}

.comparison-table .spec-label {
  font-weight: 600;
  color: #475569;
  width: 26%;
}

.comparison-table .highlight {
  background-color: #E0F7F5 !important;
}

/* Better mobile table experience */
.table-wrapper {
  position: relative;
}

@media (max-width: 768px) {
  .comparison-table {
    font-size: 0.85rem;
  }
  .comparison-table th, .comparison-table td {
    padding: 0.65rem 0.75rem;
  }
}

/* FAQ */
.faq-question {
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question:hover {
  color: var(--teal);
}

.faq-answer {
  color: #475569;
  padding-top: 0.5rem;
  padding-bottom: 1rem;
}

/* Calculator */
.calculator-card {
  background: linear-gradient(145deg, #ffffff, #F8FAFC);
}

.load-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Trust & Stats */
.stat-number {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  color: var(--navy);
}

.trust-bar {
  background: #F1F5F9;
}

/* Footer */
footer {
  background: var(--navy);
  color: #CBD5E1;
}

footer a {
  color: #94A3B8;
  transition: color 0.15s;
}

footer a:hover {
  color: var(--teal);
}

/* Mobile menu */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-menu.open {
  max-height: 420px;
}

/* Utility */
.prose {
  max-width: 72ch;
}

.prose h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.875rem;
  font-size: 1.5rem;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

/* Responsive table wrapper */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Print styles (for guides) */
@media print {
  .navbar, .btn-primary, .btn-affiliate, footer, .no-print { display: none !important; }
  .section { padding: 1rem 0; }
}

/* Tech Blog Enhancements - Clean, detailed, high-quality feel */
.prose {
  max-width: 72ch;
  font-size: 1.05rem;
  line-height: 1.75;
}

.prose p {
  margin-bottom: 1.25em;
}

.prose h2 {
  font-size: 1.75rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #E2E8F0;
}

.prose h3 {
  font-size: 1.35rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: #1E2937;
}

.prose ul, .prose ol {
  margin-bottom: 1.25em;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose strong {
  color: var(--navy);
  font-weight: 600;
}

/* Callout boxes for key facts, tips, warnings - like Verge/Wired */
.callout {
  border-left: 4px solid var(--teal);
  background: #F0FDFA;
  padding: 1.25rem 1.5rem;
  border-radius: 0 0.75rem 0.75rem 0;
  margin: 1.5rem 0;
}

.callout.warning {
  border-left-color: #F59E0B;
  background: #FFFBEB;
}

.callout.tip {
  border-left-color: #10B981;
  background: #ECFDF5;
}

.callout-title {
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Enhanced stats and metrics */
.stat-card {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 0.75rem;
  padding: 1.25rem;
  text-align: center;
}

.stat-card .value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.stat-card .label {
  font-size: 0.875rem;
  color: #64748B;
  margin-top: 0.25rem;
}

/* Visual data bars for calculator/results */
.runtime-bar-container {
  height: 12px;
  background: #E2E8F0;
  border-radius: 9999px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.runtime-bar {
  height: 100%;
  background: linear-gradient(to right, var(--teal), #14B8A6);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 9999px;
}

/* Improved comparison table */
.comparison-table th {
  position: sticky;
  top: 0;
  z-index: 10;
}

.comparison-table td:first-child {
  font-weight: 600;
  background: #F8FAFC;
}

/* TOC for long guides - tech blog standard */
.toc {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}

.toc-title {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--navy);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.toc ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.toc li {
  margin-bottom: 0.35rem;
}

.toc a {
  color: #475569;
  text-decoration: none;
  font-size: 0.925rem;
  transition: color 0.1s;
}

.toc a:hover {
  color: var(--teal);
}

.toc .toc-h3 {
  padding-left: 1rem;
  font-size: 0.85rem;
}

/* Methodology box */
.methodology {
  font-size: 0.925rem;
  background: #F1F5F9;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px dashed #CBD5E1;
}

/* Better affiliate / CTA emphasis without being salesy */
.cta-box {
  background: linear-gradient(145deg, #F0FDFA, #FFFFFF);
  border: 1px solid #99F6E4;
  border-radius: 1rem;
  padding: 1.5rem;
  margin: 2rem 0;
}

/* Subtle image captions */
figure {
  margin: 1.5rem 0;
}

figcaption {
  font-size: 0.8rem;
  color: #64748B;
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Related articles / cards grid */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

/* Site-wide honesty bar */
.disclosure-bar {
  background: #0A2540;
  color: #CBD5E1;
  font-size: 0.75rem;
  line-height: 1.45;
  padding: 0.45rem 1rem;
  text-align: center;
}
.disclosure-bar a { color: #5EEAD4; text-decoration: underline; }

/* Spec cards instead of fake product photos */
.product-visual {
  height: 11rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.15rem 1.25rem;
  color: #fff;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(255,255,255,0.16), transparent 55%),
    linear-gradient(160deg, #0A2540 0%, #134E4A 100%);
}
.product-visual.brand-ecoflow { background: linear-gradient(160deg, #0F172A 0%, #1D4ED8 100%); }
.product-visual.brand-anker { background: linear-gradient(160deg, #111827 0%, #0369A1 100%); }
.product-visual.brand-bluetti { background: linear-gradient(160deg, #1E1B4B 0%, #6D28D9 100%); }
.product-visual.brand-tesla { background: linear-gradient(160deg, #111827 0%, #334155 100%); }
.product-visual-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
  font-weight: 600;
}
.product-visual-name { font-size: 1.2rem; font-weight: 700; margin-top: 0.2rem; }
.product-visual-spec { font-size: 0.8rem; opacity: 0.85; margin-top: 0.15rem; }

.source-note {
  font-size: 0.78rem;
  color: #64748B;
  border-top: 1px dashed #E2E8F0;
  padding-top: 0.75rem;
  margin-top: 1.5rem;
}
.source-note a { color: #0F766E; }

.pay-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #ECFDF5;
  color: #047857;
  border: 1px solid #A7F3D0;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
}
.pay-badge.warn {
  background: #FFFBEB;
  color: #92400E;
  border-color: #FDE68A;
}

.email-box {
  background: #F0FDFA;
  border: 1px solid #99F6E4;
  border-radius: 1rem;
  padding: 1.25rem 1.4rem;
}

.footnote-list {
  font-size: 0.8rem;
  color: #64748B;
  padding-left: 1.1rem;
}
.footnote-list li { margin-bottom: 0.35rem; }

.updated-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0F766E;
}

.htaccess-ok { display: none; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--teal);
  color: #042f2e;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  z-index: 80;
  font-weight: 700;
  font-size: 0.85rem;
}
.skip-link:focus { top: 0.6rem; }

.brand-mark { height: 40px; width: auto; display: block; }
footer .brand-mark { height: 36px; }

.nav-link {
  position: relative;
}
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
}

.disclosure-bar {
  background: #071A2E;
  border-bottom: 1px solid rgba(0,196,180,0.18);
}

.crumb {
  font-size: 0.8rem;
  color: #64748B;
  margin-bottom: 0.75rem;
}
.crumb a { color: #0F766E; }
.crumb span { color: #334155; }

.sticky-cta {
  display: none;
}
@media (max-width: 768px) {
  .sticky-cta {
    display: flex;
    gap: 0.5rem;
    position: sticky;
    bottom: 0;
    z-index: 40;
    padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom));
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(12px);
    border-top: 1px solid #E2E8F0;
  }
  .sticky-cta a { flex: 1; justify-content: center; text-align: center; }
  body { padding-bottom: 0; }
}

.quiz-option {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid #E2E8F0;
  background: #fff;
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  margin-bottom: 0.55rem;
  font-weight: 600;
  color: var(--navy);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.quiz-option:hover, .quiz-option[aria-pressed="true"] {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgb(0 196 180 / 0.18);
}

.filter-chip {
  border: 1px solid #E2E8F0;
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}
.filter-chip[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.kit-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}
.kit-item {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 1rem;
  padding: 1rem 1.1rem;
}
.kit-item .why { font-size: 0.8rem; color: #64748B; margin-top: 0.35rem; }

.howto-steps {
  counter-reset: howto;
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 1.75rem;
}
.howto-steps > li {
  position: relative;
  counter-increment: howto;
  padding: 0.85rem 1rem 0.85rem 3.4rem;
  margin-bottom: 0.65rem;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 1rem;
}
.howto-steps > li::before {
  content: counter(howto);
  position: absolute;
  left: 0.85rem;
  top: 0.85rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.howto-steps > li strong { display: block; color: var(--navy); margin-bottom: 0.2rem; }
.ladder-note { font-size: 0.8rem; color: #64748B; margin-top: 0.35rem; }

.packshot {
  margin: 0;
  background: #F1F5F9;
  overflow: hidden;
}
.packshot img {
  width: 100%;
  height: 12.5rem;
  object-fit: contain;
  object-position: center;
  background:
    linear-gradient(180deg, #F8FAFC 0%, #EEF2F7 100%);
  display: block;
}
.packshot figcaption,
.diagram-wrap figcaption {
  font-size: 0.68rem;
  color: #94A3B8;
  padding: 0.4rem 0.85rem 0.55rem;
  text-align: left;
  font-style: normal;
}
.diagram-wrap {
  margin: 1rem 0 1.25rem;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 1rem;
  overflow: hidden;
}
.diagram-wrap img {
  width: 100%;
  height: auto;
  display: block;
}
.kit-item .packshot img { height: 8.5rem; }

.carousel {
  position: relative;
  background: #F1F5F9;
  outline: none;
}
.carousel-viewport { position: relative; }
.carousel-slide {
  display: none;
  margin: 0;
}
.carousel-slide.is-active { display: block; }
.carousel-slide img {
  width: 100%;
  height: 16rem;
  object-fit: contain;
  background: linear-gradient(180deg, #F8FAFC, #EEF2F7);
  display: block;
}
.product-card .carousel-slide img { height: 12.5rem; }
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-70%);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 0;
  background: rgba(10,37,64,0.82);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.carousel-btn.prev { left: 0.5rem; }
.carousel-btn.next { right: 0.5rem; }
.carousel-btn:hover { background: var(--navy); }
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0 0.15rem;
}
.carousel-dots button {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  border: 0;
  background: #CBD5E1;
  padding: 0;
  cursor: pointer;
}
.carousel-dots button[aria-selected="true"] { background: var(--navy); width: 1rem; }
.carousel-credit, .carousel-status {
  font-size: 0.68rem;
  color: #94A3B8;
  padding: 0 0.75rem 0.5rem;
}
.carousel-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.showcase {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 1.15rem;
  overflow: hidden;
  margin: 1.25rem 0 1.75rem;
}
@media (max-width: 800px) {
  .showcase { grid-template-columns: 1fr; }
}
.showcase-specs { padding: 1.35rem 1.45rem 1.5rem; }
.showcase-specs h2, .showcase-specs h3 { margin: 0.15rem 0 0.5rem; }
.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 1rem;
  margin: 0.85rem 0 1rem;
  font-size: 0.86rem;
}
.spec-grid dt { color: #64748B; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
.spec-grid dd { margin: 0; font-weight: 650; color: var(--navy); }

.table-hint {
  font-size: 0.75rem;
  color: #94A3B8;
  margin: 0.35rem 0 0.75rem;
}

@media print {
  .disclosure-bar, .sticky-cta, .skip-link { display: none !important; }
}