:root {
  --bg: #fafaf8;
  --panel: #ffffff;
  --ink: #1c1c1a;
  --muted: #6b6f6d;
  --line: #e4e6e2;
  --accent: #0f766e;
  --accent-soft: #e6f4f2;
  --gold: #b45309;
  --gold-soft: #fdf3e3;
  --radius: 8px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, "Helvetica Neue", Arial, "PingFang SC", sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.55;
}
a { color: var(--accent); text-decoration: none; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* header */
.topbar {
  background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.topbar .wrap { display: flex; align-items: center; gap: 18px; height: 56px; }
.logo { font-weight: 800; font-size: 17px; color: var(--ink); letter-spacing: -0.3px; }
.logo span { color: var(--accent); }
.topnav { margin-left: auto; display: flex; gap: 4px; }
.topnav a {
  color: var(--muted); font-size: 13.5px; padding: 6px 10px; border-radius: 6px;
}
.topnav a:hover, .topnav a.active { color: var(--accent); background: var(--accent-soft); }

/* answer block — the AI-citation unit */
.answer-block {
  background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 18px 20px; font-size: 15.5px; margin: 20px 0;
}
.answer-block .label {
  font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--accent); display: block; margin-bottom: 6px;
}

h1 { font-size: 30px; letter-spacing: -0.5px; line-height: 1.2; margin: 26px 0 4px; }
.updated { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.updated i { vertical-align: -2px; }

h2 { font-size: 20px; margin: 36px 0 14px; letter-spacing: -0.3px; }
.section-note { color: var(--muted); font-size: 13.5px; margin: -8px 0 14px; }

/* ranking cards */
.rank-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 14px; display: grid;
  grid-template-columns: 44px 64px 1fr; gap: 16px; position: relative;
}
.rank-badge {
  width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px;
}
.rank-card.first .rank-badge { background: var(--gold); }
.rank-note {
  position: absolute; top: -9px; left: 76px; background: var(--gold-soft); color: var(--gold);
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; border: 1px solid #f0ddba;
}
.p-visual {
  width: 64px; height: 64px; border-radius: var(--radius); display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 13px; color: #fff; text-align: center;
  line-height: 1.15;
}
.p-body h3 { font-size: 16.5px; margin-bottom: 2px; }
.p-body .brand { color: var(--muted); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; }
.p-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); margin: 6px 0; }
.p-meta b { color: var(--ink); }
.stars { color: var(--gold); font-size: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.tag {
  font-size: 11.5px; background: var(--accent-soft); color: var(--accent);
  padding: 2px 8px; border-radius: 4px; font-weight: 600;
}
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; font-size: 13px; margin-top: 6px; }
.proscons li { list-style: none; padding-left: 16px; position: relative; margin-bottom: 3px; }
.pros li::before { content: "+"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.cons li::before { content: "−"; position: absolute; left: 0; color: #b91c1c; font-weight: 800; }
.buy-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: #fff;
  font-size: 13.5px; font-weight: 700; padding: 9px 16px; border-radius: 6px; border: 0; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
.price { font-size: 17px; font-weight: 800; }
.price small { color: var(--muted); font-weight: 500; font-size: 12px; }

/* comparison table */
.table-scroll { overflow-x: auto; }
table.cmp { width: 100%; border-collapse: collapse; background: var(--panel); font-size: 13px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.cmp th, table.cmp td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.cmp th { background: #f3f4f0; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
table.cmp tr:last-child td { border-bottom: 0; }
table.cmp td.num { font-weight: 700; }

/* faq */
.faq-item { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
.faq-item summary {
  cursor: pointer; padding: 14px 18px; font-weight: 600; font-size: 14.5px; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { transition: transform .15s; color: var(--muted); }
.faq-item[open] summary i { transform: rotate(180deg); }
.faq-item p { padding: 0 18px 14px; font-size: 14px; color: #3d403e; }

/* quiz */
.quiz-shell { max-width: 640px; margin: 30px auto; }
.quiz-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.quiz-progress { height: 6px; background: var(--line); border-radius: 3px; margin-bottom: 22px; overflow: hidden; }
.quiz-progress div { height: 100%; background: var(--accent); transition: width .25s; }
.q-title { font-size: 19px; font-weight: 700; margin-bottom: 16px; }
.opt {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px; border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 10px; cursor: pointer; font-size: 14.5px; background: var(--bg);
}
.opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.opt.sel { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.quiz-actions { display: flex; justify-content: space-between; margin-top: 18px; }

/* result cards */
.match-score { font-size: 12px; font-weight: 700; color: var(--accent); }
.meter { width: 90px; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.meter div { height: 100%; background: var(--accent); }

/* home */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0 8px; }
.cat-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 8px;
}
.cat-card:hover { border-color: var(--accent); }
.cat-card .ic { width: 36px; height: 36px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.cat-card h3 { font-size: 15.5px; }
.cat-card p { font-size: 12.5px; color: var(--muted); }
.hero-tool {
  background: var(--accent); color: #fff; border-radius: var(--radius); padding: 26px;
  display: flex; align-items: center; gap: 20px; margin: 26px 0;
}
.hero-tool h2 { color: #fff; margin: 0 0 4px; }
.hero-tool p { font-size: 14px; opacity: .9; }
.hero-tool .btn { background: #fff; color: var(--accent); margin-left: auto; flex-shrink: 0; }

footer { border-top: 1px solid var(--line); margin-top: 50px; padding: 22px 0 34px; }
footer p { font-size: 12px; color: var(--muted); max-width: 720px; }

.method { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; font-size: 13.5px; color: #3d403e; }
.method ul { padding-left: 18px; margin-top: 6px; }
.method li { margin-bottom: 4px; }

@media (max-width: 720px) {
  .rank-card { grid-template-columns: 34px 1fr; }
  .p-visual { display: none; }
  .cat-grid { grid-template-columns: 1fr; }
  .proscons { grid-template-columns: 1fr; }
  .hero-tool { flex-direction: column; align-items: flex-start; }
  .hero-tool .btn { margin-left: 0; }
  h1 { font-size: 24px; }
}
