:root {
  --paper: #f6f5f0;
  --card: #ffffff;
  --ink: #17201d;
  --muted: #66706b;
  --line: #e4e3dc;
  --green: #0f5c4c;
  --green-2: #127a63;
  --green-soft: #e3efe9;
  --lime: #d4f27a;
  --red: #b4372f;
  --red-soft: #f8e6e3;
  --up: #13795b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 32, 29, .05), 0 6px 24px rgba(23, 32, 29, .06);
  --font: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.55; font-size: 16px; }
a { color: var(--green); }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 440px; }
.tnum { font-variant-numeric: tabular-nums; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(246, 245, 240, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 62px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.logo-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--green); display: grid; place-items: center; }
.logo-mark svg { width: 18px; height: 18px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a, .nav button.link { color: var(--ink); text-decoration: none; font-size: 15px; padding: 8px 10px; border-radius: 8px; background: none; border: 0; font: inherit; cursor: pointer; }
.nav a:hover, .nav button.link:hover { background: rgba(23, 32, 29, .06); }
.nav a.active { font-weight: 650; }
.nav a.btn { background: var(--green); color: #fff; margin-left: 6px; }
.nav a.btn:hover { background: var(--green-2); }
.nav form { margin: 0; }
.menu-toggle { display: none; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 10px; border: 1px solid transparent; background: var(--green); color: #fff !important; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; transition: background .15s, transform .05s; white-space: nowrap; }
.btn:hover { background: var(--green-2); }
.btn:active { transform: translateY(1px); }
.btn.big { padding: 14px 24px; font-size: 17px; border-radius: 12px; }
.btn.ghost { background: transparent; color: var(--ink) !important; border-color: var(--line); }
.btn.ghost:hover { background: #fff; }
.btn.small { padding: 7px 12px; font-size: 14px; border-radius: 8px; }
.btn.danger { background: var(--red); }
.btn.full { width: 100%; }
.btn.lime { background: var(--lime); color: var(--ink) !important; }
.btn.lime:hover { background: #c5ea5c; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; }
.link-btn:hover { color: var(--red); }

label { display: block; font-weight: 600; font-size: 14px; margin: 0 0 6px; }
input[type=email], input[type=password], input[type=text], input[type=url], textarea, select {
  width: 100%; padding: 11px 13px; border: 1px solid #d6d5cd; border-radius: 10px; font: inherit; background: #fff; color: var(--ink); }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
textarea { resize: vertical; min-height: 84px; }
.field { margin-bottom: 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 15px; }
.check input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--green); }
.hint { color: var(--muted); font-size: 13px; margin-top: 5px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card h2, .card h3 { margin-top: 0; }
.stack > * + * { margin-top: 18px; }

/* Flash */
.flash { padding: 12px 16px; border-radius: 10px; margin: 18px 0 0; font-size: 15px; background: var(--green-soft); color: #0b4a3d; }
.flash.error { background: var(--red-soft); color: #7f231d; }

/* Auth */
.auth { padding-top: 56px; padding-bottom: 80px; }
.auth h1 { font-size: 30px; letter-spacing: -.02em; margin: 0 0 6px; }
.auth .sub { color: var(--muted); margin: 0 0 22px; }
.auth .alt { text-align: center; margin-top: 18px; font-size: 15px; color: var(--muted); }

/* Landing */
.hero { padding: 64px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; letter-spacing: .02em; color: var(--green); background: var(--green-soft); padding: 6px 12px; border-radius: 99px; }
.hero h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.04; letter-spacing: -.035em; margin: 18px 0 18px; font-weight: 800; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--lime) 62%); }
.hero p.lead { font-size: 19px; color: #3b4541; max-width: 34em; margin: 0 0 28px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero .cta small { color: var(--muted); font-size: 14px; }

.climb { background: var(--ink); color: #fff; border-radius: 22px; padding: 24px; box-shadow: 0 30px 60px -20px rgba(15, 92, 76, .45); position: relative; overflow: hidden; }
.climb-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: #a9b5b0; }
.climb-head strong { color: #fff; font-size: 16px; }
.climb-pos { font-size: 74px; font-weight: 800; letter-spacing: -.04em; line-height: 1; margin: 14px 0 4px; font-variant-numeric: tabular-nums; }
.climb-pos span { font-size: 18px; font-weight: 600; color: var(--lime); letter-spacing: 0; margin-left: 10px; vertical-align: middle; }
.climb svg { width: 100%; height: 150px; display: block; margin-top: 10px; }
.climb-steps { display: flex; justify-content: space-between; font-size: 12px; color: #a9b5b0; margin-top: 6px; font-variant-numeric: tabular-nums; }
.climb-mail { margin-top: 18px; background: #26302d; border-radius: 12px; padding: 12px 14px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.climb-mail b { color: var(--lime); font-weight: 650; }

.section { padding: 64px 0; }
.section h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.03em; line-height: 1.1; margin: 0 0 12px; }
.section .intro { color: var(--muted); font-size: 18px; max-width: 40em; margin: 0 0 36px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.step { padding: 22px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: var(--lime); font-weight: 800; margin-bottom: 14px; }
.step h3 { margin: 0 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feature { background: #fff; padding: 24px; }
.feature .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; margin-bottom: 12px; }
.feature .ic svg { width: 20px; height: 20px; }
.feature h3 { margin: 0 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

.dark { background: var(--ink); color: #fff; }
.dark .intro { color: #a9b5b0; }
.pricing-toggle { display: inline-flex; background: #26302d; border-radius: 99px; padding: 4px; margin-bottom: 28px; }
.pricing-toggle button { border: 0; background: transparent; color: #cfd8d4; font: inherit; font-weight: 600; padding: 8px 16px; border-radius: 99px; cursor: pointer; font-size: 15px; }
.pricing-toggle button.on { background: #fff; color: var(--ink); }
.pricing-toggle .save { color: var(--lime); font-size: 12px; margin-left: 4px; }
.pricing-toggle button.on .save { color: var(--green); }
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.price { background: #fff; color: var(--ink); border-radius: 18px; padding: 26px; display: flex; flex-direction: column; position: relative; }
.price.hl { outline: 3px solid var(--lime); }
.price .tag { position: absolute; top: -12px; left: 24px; background: var(--lime); color: var(--ink); font-size: 12px; font-weight: 750; padding: 4px 10px; border-radius: 99px; }
.price h3 { margin: 0; font-size: 18px; }
.price .amount { font-size: 46px; font-weight: 800; letter-spacing: -.04em; margin: 10px 0 0; font-variant-numeric: tabular-nums; }
.price .amount small { font-size: 16px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.price .per { color: var(--muted); font-size: 14px; min-height: 22px; }
.price ul { list-style: none; padding: 0; margin: 18px 0 24px; flex: 1; }
.price li { padding: 6px 0 6px 26px; position: relative; font-size: 15px; }
.price li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 12px; height: 7px; border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(-45deg); }
.compare-note { color: #a9b5b0; font-size: 15px; margin-top: 26px; }

.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 650; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: #3b4541; }

.cta-band { background: var(--lime); border-radius: 22px; padding: 40px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.03em; }
.cta-band .btn { background: var(--ink); }

footer.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer.foot a { color: var(--muted); margin-right: 16px; }

/* App */
.page { padding-top: 28px; padding-bottom: 70px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; font-size: 28px; letter-spacing: -.02em; }
.page-head .sub { color: var(--muted); margin: 4px 0 0; }
.usage { flex-wrap: wrap; display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.meter { width: 120px; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--green); border-radius: 99px; }

.app-grid { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.site-block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.site-block + .site-block { margin-top: 18px; }
.site-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); gap: 12px; }
.site-head h2 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.site-head h2 .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
table.kw { width: 100%; border-collapse: collapse; }
table.kw th { white-space: nowrap; text-align: left; font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 18px; background: #fbfbf8; }
table.kw td { padding: 13px 18px; border-top: 1px solid var(--line); vertical-align: middle; font-size: 15px; }
table.kw tr.kwrow { cursor: pointer; }
table.kw tr.kwrow:hover td { background: #fbfbf8; }
table.kw tr.inactive td { opacity: .5; }
.kw-name { font-weight: 650; color: var(--ink); text-decoration: none; }
.kw-meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.pos { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pos.top { color: var(--green); }
.pos.none { color: var(--muted); font-size: 16px; font-weight: 650; }
.chg { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chg.up { color: var(--up); }
.chg.down { color: var(--red); }
.chg.flat { color: var(--muted); font-weight: 500; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: #eef0ec; color: #4a5450; white-space: nowrap; }
.badge.ai { background: #efe9fb; color: #5a3fa0; }
.badge.warn { background: #fdf0d9; color: #8a5a00; }
.badge.wait { background: var(--green-soft); color: var(--green); }
.spark { width: 110px; height: 30px; display: block; }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); }
.side .card + .card { margin-top: 18px; }
.side h3 { font-size: 16px; }
.alert-item { font-size: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.alert-item:first-of-type { border-top: 0; padding-top: 0; }
.alert-item time { display: block; color: var(--muted); font-size: 12px; }
.ref-box { display: flex; gap: 8px; }
.ref-box input { font-family: var(--mono); font-size: 13px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.kpi .l { font-size: 13px; color: var(--muted); }
.kpi .v { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.chart-box { position: relative; height: 300px; }
.comp { width: 100%; border-collapse: collapse; }
.comp td { padding: 10px 6px; border-top: 1px solid var(--line); font-size: 14px; vertical-align: top; }
.comp tr.mine td { background: #f3f9e6; }
.comp .r { width: 38px; font-weight: 800; font-variant-numeric: tabular-nums; font-size: 16px; }
.comp .t { color: var(--muted); font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 380px; }
.comp .c { text-align: right; width: 64px; }
.paa li { padding: 6px 0; }
.url-list { list-style: none; padding: 0; margin: 0; }
.url-list li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; word-break: break-all; }
.url-list li:first-child { border-top: 0; }
.back { display: inline-block; margin-bottom: 12px; color: var(--muted); text-decoration: none; font-size: 14px; }

.plan-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan-card { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: #fff; display: flex; flex-direction: column; }
.plan-card.current { border-color: var(--green); box-shadow: 0 0 0 2px var(--green) inset; }
.plan-card h3 { margin: 0 0 4px; }
.plan-card .amount { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.plan-card form { margin-top: auto; padding-top: 14px; display: grid; gap: 8px; }

.legal { max-width: 760px; }
.legal h1 { letter-spacing: -.02em; }
.legal h2 { font-size: 20px; margin-top: 30px; }
.legal p, .legal li { color: #333c38; }
.note-box { background: #fdf0d9; border-radius: 10px; padding: 12px 16px; font-size: 14px; color: #6b4600; }

@media (max-width: 900px) {
  .hero-grid, .app-grid { grid-template-columns: 1fr; }
  .steps, .features, .prices, .plan-cards { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .hero { padding-top: 36px; }
}
@media (max-width: 640px) {
  .menu-toggle { display: inline-flex; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; }
  .nav { display: none; position: absolute; top: 62px; left: 0; right: 0; background: var(--paper); flex-direction: column; align-items: stretch; padding: 10px 20px 16px; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav .btn { margin-top: 6px; }
  table.kw .hide-sm { display: none; }
  table.kw td, table.kw th { padding-left: 14px; padding-right: 14px; }
  .cta-band { padding: 28px; }
  .section { padding: 48px 0; }
}
.usage > span { white-space: nowrap; }
