/* Homepage-only styles. Loaded after style.css on index.html. */

/* Hero band */
.hero { background: radial-gradient(1200px 400px at 85% -10%, #1aa396 0%, transparent 60%), linear-gradient(160deg, #0b4f4a 0%, #0f766e 100%); color: #fff; padding: 34px 0 120px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(180deg, #000 0%, transparent 85%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { color: #fff; max-width: 720px; text-wrap: balance; }
.hero .lede { color: rgba(255,255,255,.88); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding: 0; list-style: none; }
.chips li { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); padding: 5px 12px; border-radius: 999px; }
.chips svg { width: 16px; height: 16px; }
.calc.lifted { margin-top: -96px; position: relative; z-index: 2; box-shadow: 0 2px 4px rgba(16,24,20,.06), 0 24px 48px rgba(11,79,74,.18); }

/* Section jump links */
.toc { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; margin: 0 0 6px; scrollbar-width: thin; }
.toc a { flex: none; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); padding: 7px 13px; border-radius: 999px; }
.toc a:hover { border-color: var(--brand); color: var(--brand-2); }
html { scroll-padding-top: 76px; scroll-behavior: smooth; }

/* Section heading with icon */
.content h2.ico { display: flex; align-items: center; gap: 12px; }
.content h2.ico .badge { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); }
.badge svg { width: 22px; height: 22px; }
.content .wide { max-width: none; }
.content { max-width: 820px; }

/* Step cards */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 18px 0; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; position: relative; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: 15px; margin-bottom: 10px; }
.step h3 { margin: 0 0 6px; font-size: 17.5px; }
.step p { margin: 0 0 8px; font-size: 15.5px; }
.step .mini { font-family: var(--mono); font-size: 13.5px; background: var(--brand-soft); color: var(--brand-2); border-radius: 8px; padding: 6px 9px; display: inline-block; margin-top: 4px; }

/* Funnel */
.funnel { margin: 18px 0; display: grid; gap: 6px; }
.funnel-row { display: grid; grid-template-columns: minmax(0,1fr) 120px; align-items: center; gap: 12px; }
.funnel-bar { height: 46px; border-radius: 10px; display: flex; align-items: center; padding: 0 14px; color: #fff; font-weight: 700; font-size: 15px; margin: 0 auto; white-space: nowrap; }
.funnel-row:nth-child(1) .funnel-bar { width: 100%; background: #0b4f4a; }
.funnel-row:nth-child(2) .funnel-bar { width: 62%; background: #0f766e; }
.funnel-row:nth-child(3) .funnel-bar { width: 30%; background: #14a394; }
.funnel-tag { font-size: 13.5px; color: var(--muted); line-height: 1.35; }
.funnel-tag b { display: block; color: var(--brand-2); font-size: 16px; }
.fig-note { font-size: 13.5px; color: var(--muted); margin: 6px 0 0; }

/* Platform cards */
.platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 16px 0; }
.platform { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.platform-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.platform-head .badge { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #fff; flex: none; }
.platform-head .badge svg { width: 20px; height: 20px; }
.platform-head strong { font-size: 16.5px; color: var(--ink); }
.platform p { margin: 0 0 8px; font-size: 15px; }
.platform dl { margin: 10px 0 8px; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 4px 10px; font-size: 14px; }
.platform dt { color: var(--muted); }
.platform dd { margin: 0; font-weight: 600; color: var(--ink); }
.platform .more { font-size: 14px; font-weight: 600; }

/* Formula equation */
.equation { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 16px; margin: 16px 0; }
.equation .term { text-align: center; background: var(--brand-soft); border-radius: 12px; padding: 10px 16px; min-width: 110px; }
.equation .term b { display: block; font-size: 24px; color: var(--brand-2); font-variant-numeric: tabular-nums; }
.equation .term span { font-size: 13px; color: var(--muted); font-weight: 600; }
.equation .term.out { background: var(--brand); }
.equation .term.out b, .equation .term.out span { color: #fff; }
.equation .op { font-size: 26px; font-weight: 700; color: var(--muted); }
.example-note { font-size: 13px; color: var(--muted); text-align: center; width: 100%; margin: 6px 0 0; }

/* Benchmark bar chart */
.bench { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 8px; margin: 16px 0; }
.bench-row { display: grid; grid-template-columns: 170px minmax(0,1fr) 78px; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.bench-row:last-child { border-bottom: 0; }
.bench-label { font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.bench-label small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.bench-track { position: relative; height: 14px; background: #eef2f0; border-radius: 999px; }
.bench-fill { position: absolute; top: 0; bottom: 0; left: 0; background: var(--brand); border-radius: 999px; }
.bench-fill.old { background: repeating-linear-gradient(45deg, #9fb3ad 0 6px, #b9c8c3 6px 12px); }
.bench-fill.range { background: linear-gradient(90deg, #5ec2b6, #0f766e); }
.bench-val { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--brand-2); white-space: nowrap; font-size: 15.5px; }
.bench-axis { display: grid; grid-template-columns: 170px minmax(0,1fr) 78px; gap: 12px; font-size: 12px; color: var(--muted); padding-top: 4px; }
.bench-axis div:nth-child(2) { display: flex; justify-content: space-between; }

/* Reason / warning cards */
.cards-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin: 16px 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.card .card-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--bad-soft); color: var(--bad); margin-bottom: 10px; }
.card .card-ico svg { width: 20px; height: 20px; }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; font-size: 15.5px; }
.card.warn { border-color: #f1dfb4; background: linear-gradient(180deg, #fffaf0, #fff); }
.card.warn .card-ico { background: var(--mid-soft); color: var(--mid); }
.card.warn .tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--mid); background: var(--mid-soft); border-radius: 999px; padding: 2px 9px; margin-bottom: 8px; }

/* Tips columns */
.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 16px 0; }
.tip-col { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; border-top: 4px solid var(--brand); }
.tip-col h3 { margin: 0 0 8px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.tip-col h3 svg { width: 20px; height: 20px; color: var(--brand); }
.tip-col ul { list-style: none; padding: 0; margin: 0; }
.tip-col li { position: relative; padding-left: 26px; font-size: 15px; margin: 9px 0; }
.tip-col li::before { content: ""; position: absolute; left: 0; top: 4px; width: 17px; height: 17px; border-radius: 50%; background: var(--good-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315803d' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/11px no-repeat; }

/* CTR x conversion matrix */
.matrix { display: grid; grid-template-columns: 30px minmax(0,1fr) minmax(0,1fr); gap: 8px; margin: 18px 0; }
.matrix .axis-x { font-size: 12.5px; font-weight: 700; color: var(--muted); text-align: center; text-transform: uppercase; letter-spacing: .05em; }
.matrix .axis-y { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; text-transform: uppercase; letter-spacing: .05em; align-self: center; white-space: nowrap; }
.cell { border-radius: 12px; padding: 14px; font-size: 14.5px; color: var(--ink-2); border: 1px solid var(--line); background: var(--surface); }
.cell b { display: block; font-size: 15px; margin-bottom: 4px; color: var(--ink); }
.cell.good { background: var(--good-soft); border-color: #cce9d5; }
.cell.bad { background: var(--bad-soft); border-color: #f5cfca; }
.cell.mid { background: var(--mid-soft); border-color: #f1dfb4; }

/* CPC from CTR mini chart */
.cpc-viz { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 14px 0; }
.cpc-viz p.cap { margin: 0 0 8px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.cpc-row { display: grid; grid-template-columns: 88px minmax(0,1fr) 64px; gap: 10px; align-items: center; margin: 7px 0; font-size: 14.5px; }
.cpc-row .t { height: 12px; background: #eef2f0; border-radius: 999px; position: relative; }
.cpc-row .t i { position: absolute; inset: 0 auto 0 0; background: var(--bad); border-radius: 999px; opacity: .8; }
.cpc-row b { text-align: right; font-variant-numeric: tabular-nums; }

/* Related cards with icon */
.related-card.with-ico { display: flex; gap: 12px; align-items: flex-start; }
.related-card .rc-ico { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); }
.related-card .rc-ico svg { width: 18px; height: 18px; }

/* FAQ number */
.faq summary h3 { display: inline; font-size: inherit; font-weight: inherit; margin: 0; }

@media (max-width: 600px) {
  .hero { padding-bottom: 104px; }
  .bench-row, .bench-axis { grid-template-columns: minmax(0,1fr) 70px; }
  .bench-row .bench-track { grid-column: 1 / -1; grid-row: 2; }
  .bench-axis div:first-child { display: none; }
  .bench-axis { grid-template-columns: minmax(0,1fr); }
  .bench-axis div:last-child { display: none; }
  .funnel-row { grid-template-columns: minmax(0,1fr) 92px; }
  .funnel-bar { font-size: 13.5px; padding: 0 10px; }
  .matrix { grid-template-columns: 26px minmax(0,1fr) minmax(0,1fr); }
  .cell { padding: 10px; font-size: 13.5px; }
}

.cards-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 16px 0; }
.platform.rule { background: var(--brand-soft); border-color: #cfe7e2; }
.platform.rule p { color: var(--ink-2); }
@media (max-width: 600px) { .matrix { grid-template-columns: 22px minmax(0,1fr) minmax(0,1fr); } }
