:root {
  --bg: #f0fdf4;
  --bg-soft: #dcfce7;
  --bg-card: #ffffff;
  --accent: #059669;
  --accent-dark: #047857;
  --accent-ink: #064e3b;
  --text: #1f2937;
  --muted: #5b6b63;
  --border: #d1fae5;
  --border-strong: #a7f3d0;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 8px 28px rgba(5, 150, 105, 0.08);
  --shadow-hover: 0 14px 34px rgba(5, 150, 105, 0.16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(circle at 8% -10%, rgba(16, 185, 129, 0.16), transparent 32rem),
    radial-gradient(circle at 92% 2%, rgba(5, 150, 105, 0.1), transparent 26rem),
    var(--bg);
  color: var(--text);
  line-height: 1.58;
  overflow-x: hidden;
}

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

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

p { margin: 0 0 14px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 6px; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 12px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-ink);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.logo:hover { text-decoration: none; color: var(--accent-ink); }

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 19px;
  background: linear-gradient(135deg, #10b981, #047857);
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.24);
}

.logo-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.08;
  font-size: 17px;
}
.logo-text small {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.main-nav a {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 11px;
  border-radius: 999px;
}
.main-nav a:hover { background: var(--bg-soft); text-decoration: none; color: var(--accent-ink); }
.main-nav a.active { background: var(--accent); color: #fff; }

.breadcrumbs {
  padding: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.breadcrumbs li { display: inline-flex; gap: 6px; margin: 0; }
.breadcrumbs li + li::before { content: "/"; color: #9ca3af; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }

main { padding-top: 12px; padding-bottom: 24px; }

.hero {
  margin: 18px 0 10px;
  padding: clamp(22px, 4vw, 42px);
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.9), transparent 16rem),
    linear-gradient(135deg, #ecfdf5 0%, #d1fae5 54%, #a7f3d0 100%);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}
.hero.compact { padding: clamp(20px, 3vw, 32px); }

h1 {
  font-size: clamp(25px, 4.2vw, 40px);
  line-height: 1.16;
  letter-spacing: -0.025em;
  margin: 8px 0 12px;
  color: var(--accent-ink);
  overflow-wrap: anywhere;
}
.hero h1 { max-width: 900px; }

h2 {
  font-size: clamp(21px, 2.6vw, 28px);
  line-height: 1.24;
  letter-spacing: -0.015em;
  margin: 38px 0 14px;
  color: var(--accent-ink);
}

h3 {
  font-size: 18px;
  line-height: 1.3;
  margin: 14px 0 6px;
  color: var(--text);
}

.lead {
  font-size: 17px;
  color: #3f534a;
  max-width: 880px;
  margin: 0;
}
.page-intro {
  font-size: 16px;
  color: #3f534a;
  max-width: 900px;
  margin: 0 0 14px;
}
.section-intro { color: var(--muted); max-width: 820px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(5, 150, 105, 0.18);
  padding: 5px 11px;
  border-radius: 999px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.section-head h2 { margin-bottom: 10px; }
.section-link { font-size: 14px; font-weight: 650; white-space: nowrap; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 265px), 1fr));
  gap: 16px;
  margin: 16px 0 8px;
}
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
}
.card h3 { margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.card h3 a { color: var(--accent-ink); }
.card .short {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.analog-note {
  margin: 0;
  font-size: 13px;
  color: #3f534a;
  background: #f8fdfa;
  border-left: 3px solid var(--border-strong);
  padding: 6px 9px;
  border-radius: 0 8px 8px 0;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  padding: 4px;
  box-shadow: 0 5px 14px rgba(5, 150, 105, 0.2);
  flex: 0 0 auto;
}
.logo-img--lg {
  width: 66px;
  height: 66px;
}
.logo-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 19px;
  flex: 0 0 auto;
  box-shadow: 0 5px 14px rgba(5, 150, 105, 0.2);
}
.rank {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-dark);
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 3px 9px;
}
.card-cat {
  font-size: 12px;
  font-weight: 650;
  color: var(--accent-dark);
  background: #ecfdf5;
  border-radius: 999px;
  padding: 2px 9px;
  align-self: flex-start;
}
.card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
  flex-wrap: wrap;
}
.rating { color: #b45309; font-weight: 750; white-space: nowrap; }
.price { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-flex;
  align-items: center;
  background: #ecfdf5;
  color: var(--accent-dark);
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}
.badge:hover { background: #d1fae5; text-decoration: none; }

.card-link {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
}
.card-link::after { content: " →"; }

.category-card {
  text-decoration: none;
  color: inherit;
}
.category-card:hover { text-decoration: none; }
.category-card .emoji {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1px solid var(--border-strong);
}
.category-card h3 { margin-top: 4px; }
.category-card .count {
  margin-top: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.filters a, .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.filters a:hover {
  background: #ecfdf5;
  border-color: var(--border-strong);
  color: var(--accent-dark);
  text-decoration: none;
}
.filters .muted-chip { color: var(--muted); background: #f8faf9; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid var(--accent);
}
.btn:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }
.btn.secondary {
  background: #fff;
  color: var(--accent-dark);
  border-color: var(--border-strong);
}
.btn.secondary:hover { background: #ecfdf5; color: var(--accent-dark); }

.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(16px, 3vw, 24px);
  box-shadow: var(--shadow);
}
.panel + .panel { margin-top: 16px; }

.tool-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
}
.tool-hero .logo-circle { width: 66px; height: 66px; font-size: 29px; }
.tool-hero h1 { margin-top: 0; }
.tool-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px 18px;
  margin: 16px 0;
}
.fact {
  background: #f8fdfa;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-width: 0;
}
.fact span { display: block; font-size: 12px; color: var(--muted); font-weight: 650; }
.fact strong { display: block; font-size: 14px; overflow-wrap: anywhere; }

.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}
.list-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.list-card h3 { margin-top: 0; }
.list-card ul { margin-bottom: 0; }
.list-card.pros { border-top: 3px solid #10b981; }
.list-card.cons { border-top: 3px solid #f59e0b; }

.prose { max-width: 820px; }
.prose p { margin: 12px 0; }
.prose h2 { margin-top: 28px; }
.prose h3 { margin-top: 22px; }
.prose ul, .prose ol { margin: 12px 0; }
.prose blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  background: #fff;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #3f534a;
}
.prose table { margin: 18px 0; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  min-width: 640px;
}
th, td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
  vertical-align: top;
}
th { background: #ecfdf5; color: var(--accent-ink); font-size: 13px; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fdfa; }

.faq { margin: 16px 0 8px; }
.faq details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0;
  margin-bottom: 9px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 13px 16px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 16px 14px; margin: 0; color: #3f534a; }

.article-list { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 12px; }
.article-list li {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 0;
  box-shadow: var(--shadow);
}
.article-list a { font-weight: 750; font-size: 17px; color: var(--accent-ink); }
.article-meta { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.article-card-meta { color: var(--muted); font-size: 12px; margin-top: 6px; }

.review-empty {
  background: #f8fdfa;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 18px;
  color: var(--muted);
}
.review-empty strong { color: var(--text); display: block; margin-bottom: 4px; }
.review-form {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  max-width: 520px;
}
.review-form input,
.review-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #f8faf9;
  color: #8a9991;
  border-radius: 10px;
  padding: 9px 11px;
  font: inherit;
  font-size: 14px;
}
.review-form button {
  justify-self: start;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: #d1fae5;
  color: #6b7280;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: not-allowed;
}

.site-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  margin-top: 54px;
  padding: 34px 0 22px;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 1fr));
  gap: 26px;
}
.footer-brand p { color: var(--muted); font-size: 14px; margin-top: 12px; max-width: 330px; }
.footer-grid strong { color: var(--accent-ink); }
.footer-grid ul { list-style: none; padding: 0; margin: 10px 0 0; }
.footer-grid li { margin-bottom: 6px; font-size: 14px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.not-found { text-align: center; padding: 40px 0 20px; }
.not-found .big { font-size: clamp(70px, 18vw, 140px); line-height: 1; font-weight: 800; color: var(--border-strong); margin: 0; }

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

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .container { padding: 0 14px; }
  .header-inner { align-items: flex-start; }
  .main-nav { width: 100%; gap: 2px; }
  .main-nav a { padding: 7px 9px; font-size: 13px; }
  .hero { border-radius: 20px; }
  .grid { grid-template-columns: 1fr; }
  .tool-hero { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; }
  .card:hover { transform: none; }
}

@media (max-width: 380px) {
  .logo-text { font-size: 15px; }
  .logo-mark { width: 34px; height: 34px; font-size: 17px; }
  .filters a, .chip { font-size: 12px; padding: 6px 10px; }
  th, td { padding: 9px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
}
