/* ==========================================================================
   Eefri — global styles. ALL article components live here.
   Never add per-article inline CSS; extend this file instead.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --pine: #1e3a2b;
  --pine-deep: #142819;
  --leaf: #3d7a4e;
  --leaf-soft: #e7f0e6;
  --paper: #f7f6f1;
  --card: #ffffff;
  --ink: #232820;
  --ink-soft: #5b6155;
  --line: #e4e2d7;
  --osta: #e07b12;
  --osta-hover: #c96a08;
  --gold: #b98a1f;
  --danger: #b3402e;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(30, 58, 43, 0.06), 0 6px 20px rgba(30, 58, 43, 0.07);
  --shadow-lift: 0 2px 4px rgba(30, 58, 43, 0.08), 0 12px 32px rgba(30, 58, 43, 0.12);
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --maxw: 1120px;
  --maxw-article: 780px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--leaf); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--pine);
  line-height: 1.22;
  overflow-wrap: break-word;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(1.7rem, 4.5vw, 2.5rem); font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }

p, ul, ol { margin: 0 0 1.1em; overflow-wrap: break-word; }

:focus-visible { outline: 3px solid var(--osta); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--pine); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 246, 241, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 62px;
}
.logo {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.45rem;
  color: var(--pine); letter-spacing: -0.02em;
}
.logo:hover { text-decoration: none; }
.logo-mark { width: 30px; height: 30px; flex: 0 0 auto; }
.logo span { color: var(--leaf); }

/* Category nav: horizontal scroll on mobile, never breaks layout */
.cat-nav {
  display: flex; gap: 4px; align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 100%;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav a {
  flex: 0 0 auto;
  padding: 10px 13px;
  font-size: 0.92rem; font-weight: 600;
  color: var(--ink-soft);
  border-radius: 999px;
  min-height: 44px; display: inline-flex; align-items: center;
  white-space: nowrap;
}
.cat-nav a:hover { color: var(--pine); background: var(--leaf-soft); text-decoration: none; }
.cat-nav a[aria-current="page"] { color: var(--pine); background: var(--leaf-soft); }

/* ---------- Hero (homepage) ---------- */
.hero {
  background:
    radial-gradient(1100px 420px at 85% -60%, rgba(61, 122, 78, 0.16), transparent 65%),
    var(--pine);
  color: #f2f4ee;
  padding: clamp(44px, 7vw, 84px) 0 clamp(40px, 6vw, 72px);
}
.hero h1 { color: #fff; max-width: 640px; margin-bottom: 0.4em; }
.hero p { color: #ccd8cc; max-width: 560px; font-size: 1.1rem; margin-bottom: 1.6em; }
.hero-cats { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-cats a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 9px 18px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff; font-weight: 600; font-size: 0.95rem;
}
.hero-cats a:hover { background: rgba(255, 255, 255, 0.2); text-decoration: none; }

/* ---------- Section headings ---------- */
.section { padding: clamp(36px, 5vw, 60px) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; font-size: 0.95rem; white-space: nowrap; }

/* ---------- Article cards grid ---------- */
.grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.card-img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--leaf-soft); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-cat {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--leaf);
}
.card-title { font-size: 1.12rem; margin: 0; }
.card-title a { color: var(--pine); }
.card-title a:hover { text-decoration: underline; }
.card-desc { font-size: 0.93rem; color: var(--ink-soft); margin: 0; }
.card-meta { margin-top: auto; padding-top: 10px; font-size: 0.82rem; color: var(--ink-soft); }

/* Category chips section on homepage */
.cat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.cat-tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: block;
}
.cat-tile:hover { border-color: var(--leaf); text-decoration: none; box-shadow: var(--shadow); }
.cat-tile h3 { margin-bottom: 4px; }
.cat-tile p { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- Article page ---------- */
.article-header { padding: clamp(28px, 5vw, 52px) 0 8px; }
.article-header .wrap, .article-body-outer { max-width: var(--maxw-article); }
.breadcrumbs { font-size: 0.86rem; color: var(--ink-soft); margin-bottom: 14px; }
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--leaf); }
.article-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  font-size: 0.88rem; color: var(--ink-soft); margin: 14px 0 6px;
}
.article-meta .avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.article-meta .byline { display: flex; align-items: center; gap: 9px; }
.article-meta .byline b { color: var(--ink); font-weight: 600; }

.aff-note {
  font-size: 0.8rem; color: var(--ink-soft);
  background: var(--leaf-soft); border-radius: var(--radius-sm);
  padding: 9px 13px; margin: 14px 0 4px;
}

.article-cover { border-radius: var(--radius); overflow: hidden; margin: 18px 0 6px; box-shadow: var(--shadow); }
.article-cover img { width: 100%; }

.article-body { padding-bottom: 40px; }
.article-body > h2 { margin-top: 1.9em; }
.article-body > h3 { margin-top: 1.5em; }
.article-body figure { margin: 1.5em 0; }
.article-body figure img { border-radius: var(--radius-sm); }
.article-body figcaption { font-size: 0.84rem; color: var(--ink-soft); margin-top: 8px; }
.article-body blockquote {
  margin: 1.4em 0; padding: 4px 0 4px 18px;
  border-left: 3px solid var(--leaf); color: var(--ink-soft); font-style: italic;
}

/* Table of contents */
.toc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; margin: 1.6em 0;
}
.toc-title { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; color: var(--pine); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 5px 0; font-size: 0.95rem; }

/* ---------- Product card (the signature component) ---------- */
.product-card {
  position: relative;
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--line);
  margin: 1.8em 0; overflow: hidden;
}
.product-card.is-winner { border: 2px solid var(--leaf); box-shadow: var(--shadow-lift); }

.pc-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.pc-rank {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px;
  background: var(--leaf-soft); color: var(--pine);
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  display: flex; align-items: center; justify-content: center;
}
.is-winner .pc-rank { background: var(--pine); color: #fff; }
.pc-title { margin: 0; font-size: 1.18rem; flex: 1; min-width: 0; }
.pc-badge {
  flex: 0 0 auto;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 5px 10px; border-radius: 999px; white-space: nowrap;
}
.pc-badge--winner { background: var(--pine); color: #fff; }
.pc-badge--value { background: #f4e9d0; color: var(--gold); }
.pc-badge--budget { background: var(--leaf-soft); color: var(--leaf); }

.pc-main { display: grid; grid-template-columns: 260px 1fr; gap: 0; }
.pc-img {
  padding: 18px; display: flex; align-items: center; justify-content: center;
  background: #fbfaf6;
}
.pc-img img { max-height: 230px; width: auto; max-width: 100%; object-fit: contain; border-radius: var(--radius-sm); }
.pc-body { padding: 18px 20px 20px; min-width: 0; }
.pc-desc { font-size: 0.96rem; margin-bottom: 1em; }

.pc-score { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pc-score-num {
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--pine);
  flex: 0 0 auto;
}
.pc-score-num small { font-size: 0.75rem; font-weight: 600; color: var(--ink-soft); }
.pc-score-bar { flex: 1; height: 7px; border-radius: 99px; background: var(--line); overflow: hidden; }
.pc-score-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--leaf), var(--pine)); }

.pc-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; margin-bottom: 16px; }
.pc-pros, .pc-cons { margin: 0; padding: 0; list-style: none; font-size: 0.92rem; }
.pc-pros li, .pc-cons li { padding: 3px 0 3px 24px; position: relative; }
.pc-pros li::before, .pc-cons li::before {
  position: absolute; left: 0; top: 3px; font-weight: 700;
}
.pc-pros li::before { content: "✓"; color: var(--leaf); }
.pc-cons li::before { content: "✕"; color: var(--danger); }

.pc-specs { margin: 0 0 16px; padding: 0; list-style: none; font-size: 0.88rem; color: var(--ink-soft); }
.pc-specs li { display: flex; gap: 8px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.pc-specs li:last-child { border-bottom: 0; }
.pc-specs b { color: var(--ink); font-weight: 600; flex: 0 0 42%; }

.pc-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn-osta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 34px;
  background: var(--osta); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
  border-radius: var(--radius-sm); border: 0; cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn-osta:hover { background: var(--osta-hover); color: #fff; text-decoration: none; transform: translateY(-1px); }
.pc-price { font-family: var(--font-display); font-weight: 700; color: var(--pine); font-size: 1.1rem; }

/* ---------- Comparison table ---------- */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.6em 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
}
.compare-table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.92rem; }
.compare-table th, .compare-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.compare-table thead th {
  background: var(--pine); color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: 0.85rem;
  position: sticky; top: 0;
}
.compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table tbody tr:nth-child(even) { background: #fbfaf6; }
.compare-table .tw { color: var(--leaf); font-weight: 700; }

/* ---------- Info boxes / verdict ---------- */
.note-box, .verdict {
  border-radius: var(--radius); padding: 20px 22px; margin: 1.8em 0;
}
.note-box { background: var(--leaf-soft); border-left: 4px solid var(--leaf); }
.note-box p:last-child { margin-bottom: 0; }
.verdict { background: var(--pine); color: #ecf1ea; }
.verdict h2, .verdict h3 { color: #fff; margin-top: 0; }
.verdict a { color: #ffd9a8; font-weight: 600; }
.verdict p:last-child { margin-bottom: 0; }

/* ---------- FAQ ---------- */
.faq { margin: 1.6em 0; }
.faq details {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); margin-bottom: 10px;
  padding: 0 18px;
}
.faq summary {
  cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 600; color: var(--pine);
  padding: 15px 26px 15px 0; position: relative; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  font-size: 1.3rem; color: var(--leaf); font-weight: 400;
}
.faq details[open] summary::after { content: "–"; }
.faq details > p, .faq details > ul { padding-bottom: 15px; margin-bottom: 0; font-size: 0.96rem; }

/* ---------- Author box ---------- */
.author-box {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; margin: 2.2em 0 0;
}
.author-box img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.author-box h3 { margin: 0 0 2px; font-size: 1.05rem; }
.author-box .role { font-size: 0.82rem; color: var(--leaf); font-weight: 600; margin-bottom: 6px; }
.author-box p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- Static pages ---------- */
.page-body { max-width: var(--maxw-article); padding-top: clamp(28px, 5vw, 52px); padding-bottom: 48px; }
.page-body .lead { font-size: 1.15rem; color: var(--ink-soft); }
.contact-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; margin: 1.4em 0;
}
.contact-card p { margin-bottom: 0.5em; }
.contact-card p:last-child { margin-bottom: 0; }

/* ---------- Category page header ---------- */
.cat-header { background: var(--leaf-soft); padding: clamp(30px, 5vw, 54px) 0; }
.cat-header p { color: var(--ink-soft); max-width: 620px; margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--pine-deep); color: #b9c4b6;
  padding: 44px 0 30px; margin-top: 40px;
  font-size: 0.9rem;
}
.footer-grid { display: grid; gap: 30px; grid-template-columns: 1.4fr 1fr 1fr; margin-bottom: 28px; }
.site-footer .logo { color: #fff; margin-bottom: 10px; }
.site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: #b9c4b6; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px; font-size: 0.8rem; color: #8b998a;
}
.footer-bottom p { margin: 0 0 4px; }

/* ---------- 404 ---------- */
.page-404 { text-align: center; padding: 90px 20px; }
.page-404 h1 { font-size: 4rem; }

/* ==========================================================================
   Mobile — verified for Chrome + Safari touch scrolling.
   No 100vw anywhere. No fixed elements that trap scroll.
   ========================================================================== */
@media (max-width: 760px) {
  body { font-size: 1rem; }
  .header-inner { flex-wrap: wrap; padding: 8px 0; row-gap: 0; }
  .cat-nav { order: 3; width: calc(100% + 40px); margin: 0 -20px; padding: 0 20px 6px; }

  .pc-main { grid-template-columns: 1fr; }
  .pc-img { padding: 16px 16px 4px; }
  .pc-img img { max-height: 200px; }
  .pc-lists { grid-template-columns: 1fr; }
  .pc-head { flex-wrap: wrap; }
  .pc-title { flex: 1 1 100%; order: 3; margin-top: 4px; }
  .btn-osta { width: 100%; }
  .pc-cta { gap: 10px; }
  .pc-price { order: -1; }

  .author-box { flex-direction: row; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 4px; }
}

@media (max-width: 420px) {
  .author-box { flex-direction: column; }
}
