/* FactorieOutlet — Wirecutter-style editorial CSS */

:root {
  --fo-black:       #111827;
  --fo-green:       #16a34a;
  --fo-green-dark:  #15803d;
  --fo-green-light: #f0fdf4;
  --fo-gray-50:     #f9fafb;
  --fo-gray-100:    #f3f4f6;
  --fo-gray-200:    #e5e7eb;
  --fo-gray-500:    #6b7280;
  --fo-white:       #fff;
  --fo-max:         1200px;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--fo-black);
  background: var(--fo-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul { list-style: none; }

/* ============================================================
   LAYOUT
   ============================================================ */
.fo-container {
  max-width: var(--fo-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================================
   HEADER
   ============================================================ */
.fo-header {
  background: var(--fo-white);
  border-bottom: 1px solid var(--fo-gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.fo-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1.5rem;
}

.fo-logo {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--fo-black);
  text-decoration: none;
  letter-spacing: -.02em;
  flex-shrink: 0;
}

.fo-logo:hover { color: var(--fo-black); }

.fo-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.fo-nav a {
  color: #374151;
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .15s;
  white-space: nowrap;
}

.fo-nav a:hover { color: var(--fo-green); }

.fo-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--fo-black);
  padding: .25rem;
  line-height: 1;
}

/* ============================================================
   HERO
   ============================================================ */
.fo-hero {
  background: var(--fo-white);
  border-bottom: 2px solid var(--fo-black);
  padding: 3rem 0;
}

.fo-hero-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fo-green);
  margin-bottom: .75rem;
  display: block;
}

.fo-hero h1 {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.15;
  max-width: 680px;
  letter-spacing: -.03em;
  font-family: Georgia, "Times New Roman", serif;
}

.fo-hero p {
  color: var(--fo-gray-500);
  font-size: 1.1rem;
  max-width: 560px;
  margin: .75rem 0 1.5rem;
  line-height: 1.6;
}

/* ============================================================
   CATEGORY PILLS
   ============================================================ */
.fo-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.25rem;
}

.fo-pill {
  display: inline-block;
  padding: .35em 1em;
  border: 1px solid var(--fo-gray-200);
  border-radius: 999px;
  font-size: .8rem;
  color: #374151;
  text-decoration: none;
  font-weight: 500;
  transition: border-color .15s, color .15s;
  background: var(--fo-white);
}

.fo-pill:hover {
  border-color: var(--fo-green);
  color: var(--fo-green);
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.fo-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--fo-black);
}

.fo-section-head h2 {
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.fo-section-head a {
  font-size: .85rem;
  color: var(--fo-green);
  text-decoration: none;
  font-weight: 600;
  transition: color .15s;
}

.fo-section-head a:hover { color: var(--fo-green-dark); }

/* ============================================================
   BEST PICK BOX
   ============================================================ */
.fo-best-pick {
  border: 2px solid var(--fo-green);
  border-radius: 8px;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: center;
  background: var(--fo-white);
}

.fo-best-pick-badge {
  display: inline-block;
  background: var(--fo-green);
  color: var(--fo-white);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  padding: .25em .75em;
  border-radius: 999px;
  text-transform: uppercase;
  margin-bottom: .75rem;
}

.fo-best-pick-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
}

.fo-best-pick h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: .5rem 0;
  line-height: 1.25;
  font-family: Georgia, "Times New Roman", serif;
}

.fo-best-pick p {
  color: var(--fo-gray-500);
  font-size: .95rem;
  line-height: 1.6;
}

/* ============================================================
   ARTICLE CARDS (horizontal)
   ============================================================ */
.fo-article-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--fo-gray-100);
}

.fo-article-card:last-child { border-bottom: none; }

.fo-article-card-img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.fo-article-card-body { flex: 1; min-width: 0; }

.fo-article-card-badge {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fo-green);
  display: block;
  margin-bottom: .2rem;
}

.fo-article-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: .25rem 0 .4rem;
  line-height: 1.3;
}

.fo-article-card h3 a {
  color: var(--fo-black);
  text-decoration: none;
  transition: color .15s;
}

.fo-article-card h3 a:hover { color: var(--fo-green); }

.fo-article-card p {
  font-size: .875rem;
  color: var(--fo-gray-500);
  margin: 0;
  line-height: 1.5;
}

/* ============================================================
   SCORE BADGE
   ============================================================ */
.fo-score {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--fo-green-light);
  color: var(--fo-green-dark);
  font-weight: 700;
  font-size: .85rem;
  padding: .2em .6em;
  border-radius: 4px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.fo-btn {
  display: inline-block;
  padding: .65em 1.4em;
  border-radius: 4px;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  border: 2px solid transparent;
  line-height: 1.4;
}

.fo-btn-green {
  background: var(--fo-green);
  color: var(--fo-white);
  border-color: var(--fo-green);
}

.fo-btn-green:hover {
  background: var(--fo-green-dark);
  border-color: var(--fo-green-dark);
  color: var(--fo-white);
}

.fo-btn-outline {
  background: transparent;
  border-color: var(--fo-black);
  color: var(--fo-black);
}

.fo-btn-outline:hover {
  background: var(--fo-black);
  color: var(--fo-white);
}

.fo-btn-sm {
  padding: .4em 1em;
  font-size: .82rem;
}

/* ============================================================
   HOW WE TEST / TRUST SECTION
   ============================================================ */
.fo-trust {
  background: var(--fo-gray-50);
  border-radius: 8px;
  padding: 2rem;
}

.fo-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.fo-trust-item h4 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--fo-black);
}

.fo-trust-item p {
  font-size: .875rem;
  color: var(--fo-gray-500);
  line-height: 1.6;
}

.fo-trust-icon {
  font-size: 1.5rem;
  margin-bottom: .5rem;
}

/* ============================================================
   NEWSLETTER
   ============================================================ */
.fo-newsletter {
  background: var(--fo-black);
  color: var(--fo-white);
  padding: 3rem 0;
}

.fo-newsletter h2 {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: Georgia, "Times New Roman", serif;
}

.fo-newsletter p {
  color: #9ca3af;
  margin: .5rem 0 1.5rem;
  font-size: 1rem;
}

.fo-nl-form {
  display: flex;
  gap: .75rem;
  max-width: 480px;
}

.fo-nl-form input {
  flex: 1;
  padding: .7rem 1rem;
  border: none;
  border-radius: 4px;
  font-size: .95rem;
  outline: none;
  font-family: inherit;
}

.fo-nl-form input:focus { box-shadow: 0 0 0 3px rgba(22,163,74,.4); }

.fo-nl-form button {
  background: var(--fo-green);
  color: var(--fo-white);
  border: none;
  padding: .7rem 1.4rem;
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
  font-size: .9rem;
  white-space: nowrap;
  transition: background .15s;
  font-family: inherit;
}

.fo-nl-form button:hover { background: var(--fo-green-dark); }

.fo-nl-success {
  color: #86efac;
  font-weight: 600;
  font-size: .95rem;
  display: none;
  margin-top: .75rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.fo-footer {
  background: #1f2937;
  color: #9ca3af;
  padding: 3rem 0;
}

.fo-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.fo-footer h4 {
  color: var(--fo-white);
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.fo-footer a {
  color: #9ca3af;
  text-decoration: none;
  font-size: .85rem;
  display: block;
  margin-bottom: .4rem;
  transition: color .15s;
  line-height: 1.4;
}

.fo-footer a:hover { color: var(--fo-white); }

.fo-footer p { font-size: .85rem; line-height: 1.6; }

.fo-footer-bottom {
  border-top: 1px solid #374151;
  margin-top: 2rem;
  padding-top: 1.5rem;
  font-size: .8rem;
  text-align: center;
  color: #6b7280;
}

/* ============================================================
   POSTS GRID
   ============================================================ */
.fo-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.fo-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2rem;
}

/* ============================================================
   PROS / CONS
   ============================================================ */
.fo-pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

.fo-pros, .fo-cons {
  border-radius: 6px;
  padding: 1.25rem;
}

.fo-pros {
  background: var(--fo-green-light);
  border-left: 4px solid var(--fo-green);
}

.fo-cons {
  background: #fef2f2;
  border-left: 4px solid #dc2626;
}

.fo-pros h4, .fo-cons h4 {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: .75rem;
}

.fo-pros h4 { color: var(--fo-green-dark); }
.fo-cons h4 { color: #dc2626; }

.fo-pros ul li, .fo-cons ul li {
  font-size: .9rem;
  padding: .25rem 0;
  padding-left: 1.25rem;
  position: relative;
  line-height: 1.5;
}

.fo-pros ul li::before { content: "✓"; position: absolute; left: 0; color: var(--fo-green); font-weight: 700; }
.fo-cons ul li::before { content: "✗"; position: absolute; left: 0; color: #dc2626; font-weight: 700; }

/* ============================================================
   RATING BARS
   ============================================================ */
.fo-rating-bars {
  margin: 2rem 0;
}

.fo-rating-bar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: .75rem;
}

.fo-rating-bar-label {
  font-size: .875rem;
  font-weight: 600;
  width: 140px;
  flex-shrink: 0;
  color: var(--fo-black);
}

.fo-rating-bar-track {
  flex: 1;
  background: var(--fo-gray-200);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.fo-rating-bar-fill {
  height: 100%;
  background: var(--fo-green);
  border-radius: 999px;
  transition: width .4s ease;
}

.fo-rating-bar-val {
  font-size: .85rem;
  font-weight: 700;
  color: var(--fo-green-dark);
  width: 2.5rem;
  text-align: right;
  flex-shrink: 0;
}

/* ============================================================
   AFFILIATE CTA BOX
   ============================================================ */
.fo-affiliate-box {
  border: 2px solid var(--fo-green);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2.5rem 0;
  background: var(--fo-green-light);
}

.fo-affiliate-box-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fo-green);
  margin-bottom: .5rem;
  display: block;
}

.fo-affiliate-box h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: .5rem;
  font-family: Georgia, "Times New Roman", serif;
}

.fo-affiliate-box p {
  font-size: .9rem;
  color: var(--fo-gray-500);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.fo-affiliate-meta {
  font-size: .8rem;
  color: var(--fo-gray-500);
  margin-top: .75rem;
}

/* ============================================================
   SINGLE ARTICLE LAYOUT
   ============================================================ */
.fo-article-header {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--fo-gray-200);
  margin-bottom: 2rem;
}

.fo-article-header .fo-article-card-badge {
  font-size: .75rem;
  margin-bottom: .75rem;
}

.fo-article-header h1 {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.2;
  max-width: 750px;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -.02em;
}

.fo-article-header .fo-excerpt {
  font-size: 1.1rem;
  color: var(--fo-gray-500);
  max-width: 680px;
  margin: 1rem 0;
  line-height: 1.7;
}

.fo-article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .85rem;
  color: var(--fo-gray-500);
  flex-wrap: wrap;
  margin-top: 1rem;
}

.fo-article-meta .fo-score { font-size: .9rem; }

.fo-featured-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 0 2rem;
}

.fo-article-content {
  max-width: 750px;
}

.fo-article-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 2rem 0 .75rem;
  font-family: Georgia, "Times New Roman", serif;
}

.fo-article-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.5rem 0 .5rem;
}

.fo-article-content p {
  margin-bottom: 1.25rem;
  font-size: 1rem;
  line-height: 1.75;
  color: #1f2937;
}

.fo-article-content ul, .fo-article-content ol {
  margin: 1rem 0 1.25rem 1.5rem;
}

.fo-article-content li {
  margin-bottom: .4rem;
  font-size: 1rem;
  line-height: 1.65;
}

.fo-article-content ul { list-style: disc; }
.fo-article-content ol { list-style: decimal; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.fo-breadcrumb {
  font-size: .8rem;
  color: var(--fo-gray-500);
  padding: .75rem 0;
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}

.fo-breadcrumb a {
  color: var(--fo-gray-500);
  text-decoration: none;
  transition: color .15s;
}

.fo-breadcrumb a:hover { color: var(--fo-green); }

.fo-breadcrumb-sep { color: var(--fo-gray-200); }

/* ============================================================
   ARCHIVE / INDEX
   ============================================================ */
.fo-archive-header {
  padding: 2rem 0 1.5rem;
  border-bottom: 2px solid var(--fo-black);
  margin-bottom: 1.5rem;
}

.fo-archive-header h1 {
  font-size: 2rem;
  font-weight: 900;
  font-family: Georgia, "Times New Roman", serif;
}

.fo-archive-header p {
  color: var(--fo-gray-500);
  margin-top: .5rem;
}

.fo-pagination {
  display: flex;
  justify-content: center;
  gap: .5rem;
  padding: 2.5rem 0;
}

.fo-pagination a, .fo-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--fo-gray-200);
  border-radius: 4px;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--fo-black);
  transition: background .15s, border-color .15s;
}

.fo-pagination a:hover { border-color: var(--fo-green); color: var(--fo-green); }
.fo-pagination .current { background: var(--fo-green); border-color: var(--fo-green); color: var(--fo-white); }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.fo-about-header {
  padding: 3rem 0 2rem;
  border-bottom: 2px solid var(--fo-black);
  max-width: 680px;
}

.fo-about-header h1 {
  font-size: 2.4rem;
  font-weight: 900;
  font-family: Georgia, "Times New Roman", serif;
  margin-bottom: 1rem;
  letter-spacing: -.02em;
}

.fo-about-header p {
  font-size: 1.1rem;
  color: var(--fo-gray-500);
  line-height: 1.75;
}

.fo-about-content {
  max-width: 680px;
  padding: 2rem 0;
}

.fo-about-content h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 2rem 0 .75rem;
  font-family: Georgia, "Times New Roman", serif;
}

.fo-about-content p {
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
  color: #1f2937;
}

.fo-value-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.fo-value-card {
  background: var(--fo-gray-50);
  border-radius: 6px;
  padding: 1.25rem;
  border-left: 3px solid var(--fo-green);
}

.fo-value-card h4 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: .4rem;
}

.fo-value-card p {
  font-size: .875rem;
  color: var(--fo-gray-500);
  margin: 0;
  line-height: 1.6;
}

/* ============================================================
   UTILITY
   ============================================================ */
.fo-section { padding: 2.5rem 0; }
.fo-section-lg { padding: 3.5rem 0; }
.fo-divider { border: none; border-top: 1px solid var(--fo-gray-200); margin: 2rem 0; }
.fo-text-green { color: var(--fo-green); }
.fo-text-muted { color: var(--fo-gray-500); }
.fo-fw-bold { font-weight: 700; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .fo-nav { display: none; }
  .fo-nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--fo-white);
    border-bottom: 1px solid var(--fo-gray-200);
    padding: 1rem 1.5rem;
    gap: 1rem;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
  }

  .fo-menu-toggle { display: block; }

  .fo-hero { padding: 2rem 0; }
  .fo-hero h1 { font-size: 1.8rem; }
  .fo-hero p { font-size: 1rem; }

  .fo-section-head {
    flex-wrap: wrap;
    gap: .5rem;
  }

  .fo-best-pick {
    grid-template-columns: 1fr;
  }

  .fo-best-pick-img { height: 220px; }

  .fo-trust-grid {
    grid-template-columns: 1fr;
  }

  .fo-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .fo-posts-grid {
    grid-template-columns: 1fr;
  }

  .fo-two-col {
    grid-template-columns: 1fr;
  }

  .fo-pros-cons {
    grid-template-columns: 1fr;
  }

  .fo-value-grid {
    grid-template-columns: 1fr;
  }

  .fo-article-header h1 { font-size: 1.6rem; }

  .fo-nl-form {
    flex-direction: column;
  }

  .fo-nl-form button { width: 100%; }

  .fo-rating-bar-label { width: 100px; }

  .fo-page-wrap { margin: 1.5rem auto; }
  .fo-page-title { font-size: 1.6rem; }

  /* About page sidebar stacks below content on mobile */
  [style*="grid-template-columns:2fr 1fr"] {
    display: block !important;
  }
  [style*="grid-template-columns:2fr 1fr"] aside {
    margin-top: 2rem;
  }
  [style*="grid-template-columns:2fr 1fr"] aside > div {
    position: static !important;
  }

  /* Contact page 2-col grid stacks on mobile */
  [style*="grid-template-columns:1fr 1fr"] {
    display: block !important;
  }
  [style*="grid-template-columns:1fr 1fr"] > * + * {
    margin-top: 1rem;
  }
}

@media (max-width: 480px) {
  .fo-footer-grid {
    grid-template-columns: 1fr;
  }

  .fo-article-card {
    flex-direction: column;
  }

  .fo-article-card-img {
    width: 100%;
    height: 160px;
  }

  .fo-hero h1 { font-size: 1.5rem; }

  .fo-pills { gap: .35rem; }
  .fo-pill { font-size: .75rem; padding: .3em .75em; }
}

/* ── Generic page template ── */
.fo-page-wrap {
  max-width: 780px;
  margin: 3rem auto;
  padding: 0 1rem 4rem;
}
.fo-page-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--fo-black);
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--fo-gray-200);
}
.fo-page-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2.25rem 0 .75rem;
  color: var(--fo-black);
}
.fo-page-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.75rem 0 .6rem;
  color: var(--fo-black);
}
.fo-page-content p {
  line-height: 1.75;
  color: #374151;
  margin-bottom: 1rem;
}
.fo-page-content ul,
.fo-page-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.fo-page-content li {
  line-height: 1.75;
  color: #374151;
  margin-bottom: .35rem;
}
.fo-page-content a {
  color: var(--fo-green);
  text-decoration: underline;
}
.fo-page-content strong {
  color: var(--fo-black);
}
