:root {
  --sun: #FFBE0B;
  --flame: #FB5607;
  --magenta: #FF006E;
  --iris: #8338EC;
  --sky: #3A86FF;
  --ink: #15161A;
  --paper: #fafafa;
  --soft: rgba(0,0,0,0.06);
  --grad: linear-gradient(135deg, var(--iris) 0%, var(--magenta) 55%, var(--flame) 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}
.hidden { display: none !important; }

/* nav */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--soft);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-logo {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--grad);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 900; font-size: 16px; letter-spacing: -0.02em;
  box-shadow: 0 6px 18px rgba(131, 56, 236, 0.35);
}
.brand-name { font-weight: 800; letter-spacing: -0.01em; font-size: 17px; }
.nav nav { display: flex; gap: 22px; }
.nav nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 13px; }
.nav nav a:hover { color: var(--magenta); }

/* hero */
.hero {
  padding: 100px 32px 72px;
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}
.hero h1 {
  font-size: clamp(36px, 6.4vw, 72px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 18px;
}
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede { font-size: 17px; color: #4b5563; max-width: 720px; margin: 0 auto 28px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  font-family: inherit;
  transition: filter 120ms ease, transform 120ms ease;
}
.btn.primary {
  color: #fff; background: var(--grad);
  box-shadow: 0 10px 24px rgba(255, 0, 110, 0.30);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost {
  color: var(--ink); background: #fff;
  border: 1px solid var(--soft);
}
.btn.ghost:hover { background: #f3f4f6; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 30px; }
.chip {
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
  background: #fff; border: 1px solid var(--soft);
  color: #4b5563;
}

/* features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  max-width: 1120px;
  margin: 24px auto;
  padding: 0 32px 32px;
}
.card {
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  border: 1px solid var(--soft);
  box-shadow: 0 4px 16px rgba(0,0,0,0.03);
}
.card p { color: #4b5563; font-size: 14px; margin: 8px 0 0; }
.card-head { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; }
.dot { width: 10px; height: 10px; border-radius: 999px; }
.dot-sun { background: var(--sun); }
.dot-flame { background: var(--flame); }
.dot-magenta { background: var(--magenta); }
.dot-iris { background: var(--iris); }
.dot-sky { background: var(--sky); }

/* try */
.try, .pricing, .account {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 32px;
}
.try h2, .pricing h2, .account h2 {
  font-weight: 900; letter-spacing: -0.02em;
  font-size: clamp(26px, 3vw, 36px);
  margin: 0 0 8px;
}
.muted { color: #6b7280; font-size: 13px; }
.muted code { background: #fff; border: 1px solid var(--soft); padding: 1px 6px; border-radius: 6px; font-family: ui-monospace, monospace; }

textarea, input[type="email"], input[type="password"], input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 12px;
}
textarea:focus, input:focus { outline: none; border-color: var(--iris); box-shadow: 0 0 0 3px rgba(131, 56, 236, 0.18); }
textarea { min-height: 140px; resize: vertical; margin: 16px 0 12px; }
.try-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

#try-results { margin-top: 16px; display: grid; gap: 8px; }
.suggestion {
  padding: 12px 14px; background: #fff; border: 1px solid var(--soft); border-radius: 12px;
}
.suggestion .h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.suggestion .pill {
  text-transform: uppercase; letter-spacing: 0.05em; font-weight: 800; font-size: 10px;
  padding: 3px 8px; border-radius: 999px;
}
.suggestion .pill.spelling    { background: rgba(255, 0, 110, 0.14); color: var(--magenta); }
.suggestion .pill.grammar     { background: rgba(251, 86, 7, 0.14); color: var(--flame); }
.suggestion .pill.punctuation { background: rgba(255, 190, 11, 0.20); color: #B8860B; }
.suggestion .pill.clarity     { background: rgba(58, 134, 255, 0.14); color: var(--sky); }
.suggestion .pill.style       { background: rgba(131, 56, 236, 0.14); color: var(--iris); }
.suggestion .body { display: flex; gap: 10px; align-items: baseline; }
.suggestion .orig { text-decoration: line-through; color: #9ca3af; }
.suggestion .repl { font-weight: 700; }
.suggestion .why { color: #4b5563; font-size: 13px; margin-top: 6px; }

/* pricing */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.tier {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--soft);
  padding: 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.tier h3 { margin: 0; font-size: 18px; font-weight: 800; }
.tier .price { margin: 0; font-weight: 900; font-size: 26px; letter-spacing: -0.02em; }
.tier ul { margin: 0; padding-left: 18px; color: #4b5563; font-size: 14px; }
.tier.featured {
  border: 0;
  background: linear-gradient(180deg, #fff, #fff) padding-box,
              var(--grad) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 10px 30px rgba(255, 0, 110, 0.12);
}

/* account */
.auth { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
@media (max-width: 640px) { .auth { grid-template-columns: 1fr; } }
.auth-form {
  background: #fff; border: 1px solid var(--soft); border-radius: 16px; padding: 18px;
  display: flex; flex-direction: column; gap: 8px;
}
.auth-form h3 { margin: 0 0 4px; font-size: 14px; font-weight: 800; }
#auth-state { margin-top: 12px; }
#dashboard { margin-top: 28px; }
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px; margin-top: 8px;
}
.stat-tile {
  background: #fff; border: 1px solid var(--soft); border-radius: 12px; padding: 14px;
}
.stat-tile .k { color: #6b7280; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-tile .v { font-size: 22px; font-weight: 900; letter-spacing: -0.02em; margin-top: 4px; }

#history-list { margin-top: 12px; display: grid; gap: 8px; }
.history-row {
  background: #fff; border: 1px solid var(--soft); border-radius: 10px;
  padding: 8px 12px; font-size: 13px; display: flex; gap: 10px; align-items: baseline;
}
.history-row .ts { color: #6b7280; font-size: 11px; min-width: 130px; }
.history-row .orig { text-decoration: line-through; color: #9ca3af; }
.history-row .repl { font-weight: 700; }

footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 30px 32px; color: #6b7280; font-size: 12px;
  border-top: 1px solid var(--soft); margin-top: 30px;
}

kbd {
  font-family: ui-monospace, monospace;
  background: #fff; border: 1px solid var(--soft);
  border-bottom-width: 2px; border-radius: 6px;
  padding: 1px 6px; font-size: 11px;
}

/* GitHub pill button in nav */
.github-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  text-decoration: none;
}
.github-btn:hover { background: #000; color: #fff; }

/* "No store needed" banner under the hero */
.banner {
  max-width: 1120px; margin: 0 auto; padding: 8px 32px 0;
}
.banner-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: linear-gradient(135deg, rgba(131, 56, 236, 0.08), rgba(255, 0, 110, 0.08));
  border: 1px solid rgba(131, 56, 236, 0.18);
  border-radius: 16px;
  padding: 16px 22px;
  flex-wrap: wrap;
}
.banner-inner h3 { margin: 0 0 4px; font-weight: 800; font-size: 16px; }
.banner-inner p { margin: 0; color: #4b5563; font-size: 13px; }
.banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* /install + /how-to "how" sections */
.install-hero { padding-top: 70px; padding-bottom: 36px; }
.how { max-width: 1120px; margin: 0 auto; padding: 8px 32px 32px; }
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.how-card {
  background: #fff;
  border: 1px solid var(--soft);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}
.how-card h2 {
  display: flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: 800; margin: 0 0 8px;
}
.how-card h3 { font-size: 13px; font-weight: 800; margin: 14px 0 6px; }
.how-card p, .how-card li { color: #374151; font-size: 14px; line-height: 1.55; }
.how-card ol, .how-card ul { padding-left: 22px; margin: 6px 0; }
.how-card pre {
  background: #15161A; color: #f3f4f6;
  padding: 12px 14px; border-radius: 10px;
  font: 12px/1.5 ui-monospace, monospace;
  overflow-x: auto;
  margin: 8px 0;
}
.how-card code {
  background: #f3f4f6;
  border: 1px solid var(--soft);
  padding: 1px 6px; border-radius: 6px;
  font: 12px ui-monospace, monospace;
}
.how-card pre code { background: transparent; border: 0; padding: 0; }

/* CTA card */
.cta { max-width: 1120px; margin: 24px auto; padding: 0 32px 32px; }
.cta-card {
  background: linear-gradient(135deg, var(--iris), var(--magenta), var(--flame));
  color: #fff;
  border-radius: 20px;
  padding: 36px 32px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(255, 0, 110, 0.30);
}
.cta-card h2 {
  margin: 0 0 8px; font-weight: 900;
  letter-spacing: -0.02em; font-size: clamp(22px, 3vw, 30px);
}
.cta-card p { margin: 0 auto 18px; max-width: 640px; opacity: 0.92; font-size: 15px; }
.cta-card .btn { margin: 4px; }
.cta-card .btn.primary { background: #fff; color: var(--ink); box-shadow: none; }
.cta-card .btn.primary:hover { background: #f3f4f6; }
.cta-card .btn.ghost {
  background: rgba(255,255,255,0.14); color: #fff; border: 1px solid rgba(255,255,255,0.35);
}
.cta-card .btn.ghost:hover { background: rgba(255,255,255,0.22); }
