/* Same palette as the popup (entrypoints/popup/style.css) and the lint kind colors. */
:root {
  --bg: #f4f3ef;
  --surface: #fbfaf7;
  --fg: #1d1d1b;
  --muted: #6b6a66;
  --line: #e4e2dc;
  --panel: #f0eee8;
  --code: #efece4;
  --brand: #1f6f4a;
  --brand-hover: #185a3c;
  --on-brand: #ffffff;
  --accent: #2f7d4f;
  --agreement: #2f8a57;
  --grammar: #7c5cc4;
  --spelling: #d64541;
  --shadow: 0 24px 60px -24px rgb(30 30 20 / 0.25), 0 2px 6px rgb(30 30 20 / 0.06);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161615;
    --surface: #1f1f1d;
    --fg: #ecebe7;
    --muted: #9a9993;
    --line: #34332f;
    --panel: #272725;
    --code: #3a3935;
    --brand: #2f8a5c;
    --brand-hover: #38a06b;
    --accent: #5fbf85;
    --agreement: #5fbf85;
    --grammar: #a58ae6;
    --spelling: #ef6b5f;
    --shadow: 0 24px 60px -24px rgb(0 0 0 / 0.6), 0 2px 6px rgb(0 0 0 / 0.3);
  }

  /* More specific than the .card rule below, which holds the light colors. */
  .editor .card {
    --bg: #1b1b1a;
    --fg: #ecebe7;
    --muted: #9a9993;
    --line: #34332f;
    --panel: #242422;
    --accent: #5fbf85;
    --code: #3a3935;
    --card-shadow: 0 8px 24px rgb(0 0 0 / 0.5), 0 1px 3px rgb(0 0 0 / 0.4);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font:
    17px/1.55 system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

h1,
h2,
h3 {
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 1em;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

section {
  padding: 72px 0;
}

@media (max-width: 640px) {
  section {
    padding: 48px 0;
  }
}

/* Buttons */

.btn {
  display: inline-block;
  background: var(--brand);
  color: var(--on-brand);
  border: 0;
  border-radius: 12px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}

.btn:hover {
  background: var(--brand-hover);
}

.btn:focus-visible,
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.btn-small {
  padding: 8px 14px;
  font-size: 0.9rem;
  border-radius: 10px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin: 28px 0 14px;
}

.alt {
  color: var(--muted);
  font-size: 0.95rem;
}

.fine {
  color: var(--muted);
  font-size: 0.9rem;
}

.mobile-note {
  font-size: 0.9rem;
  background: var(--panel);
  border-radius: 10px;
  padding: 10px 14px;
}

/* Nav */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
}

.brand img {
  border-radius: 8px;
}

.nav nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav nav a:not(.btn) {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.nav nav a:not(.btn):hover {
  color: var(--fg);
}

@media (max-width: 640px) {
  .nav nav a:not(.btn) {
    display: none;
  }
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 56px;
  align-items: center;
  padding-top: 48px;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 24px;
  }
}

.eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 34em;
}

/* Demo: a textarea over a backdrop that draws the underlines in the same spot. */

.window {
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: visible;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border-radius: 18px 18px 0 0;
  padding: 14px 18px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.window-bar i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--line);
}

.window-bar span {
  margin-left: 12px;
}

.window-row {
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.window-row span {
  color: var(--muted);
}

.editor {
  position: relative;
}

.editor textarea,
.backdrop {
  margin: 0;
  padding: 20px 22px 28px;
  font:
    1.1rem/1.9 system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  letter-spacing: normal;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: normal;
  border: 0;
}

.backdrop {
  position: absolute;
  inset: 0;
  color: transparent;
  pointer-events: none;
}

.backdrop mark {
  color: transparent;
  background: color-mix(in srgb, var(--kind) 12%, transparent);
  border-radius: 3px;
  text-decoration: underline 2px var(--kind);
  text-underline-offset: 5px;
}

.editor textarea {
  position: relative;
  display: block;
  width: 100%;
  min-height: 150px;
  resize: none;
  overflow: hidden;
  background: transparent;
  color: var(--fg);
  caret-color: var(--fg);
  outline: none;
  border-radius: 0 0 18px 18px;
}

/* The hint card copies the extension's card colors (SuggestionBox.ts in vendor/lint-framework),
   so the demo looks like the real thing. */
.card {
  --bg: #fbfaf7;
  --fg: #1d1d1b;
  --muted: #6b6a66;
  --line: #e4e2dc;
  --panel: #f2f0ea;
  --accent: #2f7d4f;
  --code: #efece4;
  --card-shadow: 0 8px 24px rgb(29 29 27 / 0.14), 0 1px 3px rgb(29 29 27 / 0.08);
  position: absolute;
  z-index: 2;
  width: min(330px, calc(100% - 24px));
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  font-size: 0.95rem;
}

.card-kind {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-kind b {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--kind);
}

.card-why {
  padding: 12px 16px 0;
  margin: 0;
}

.card-why code {
  /* Same as the extension's card (SuggestionBox.ts). */
  font: inherit;
  font-weight: 600;
  background: var(--code);
  border-radius: 4px;
  padding: 0 3px;
  margin: 0 -2px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 14px;
}

.card button {
  font: inherit;
  font-weight: 600;
  color: var(--fg);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
}

.answer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.answer[hidden] {
  display: none;
}

.card .chip {
  padding: 3px 12px;
  border-radius: 7px;
}

.demo-status {
  margin: 18px 4px 0;
  color: var(--muted);
  font-size: 0.95rem;
  min-height: 1.5em;
}

.demo-status button {
  font: inherit;
  color: var(--accent);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
}

/* How it works */

.how h2 {
  max-width: 16em;
}

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 0;
  margin: 32px 0 0;
}

@media (max-width: 800px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.steps li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
}

.steps p {
  color: var(--muted);
  margin: 0;
}

/* Progress */

.progress {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 900px) {
  .progress {
    grid-template-columns: 1fr;
  }
}

.progress p {
  color: var(--muted);
}

.progress img {
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ticks li {
  position: relative;
  padding-left: 28px;
  margin: 10px 0;
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
}

/* Private */

.private {
  background: var(--brand);
  color: var(--on-brand);
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 40px;
  margin-top: 24px;
}

@media (max-width: 800px) {
  .facts {
    grid-template-columns: 1fr;
  }
}

.facts p {
  margin: 0;
  opacity: 0.92;
}

.facts b {
  display: block;
  margin-bottom: 4px;
  opacity: 1;
}

.more {
  display: inline-block;
  margin-top: 28px;
  font-weight: 600;
}

/* Teachers */

.teachers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 800px) {
  .teachers {
    grid-template-columns: 1fr;
  }
}

.teachers p {
  color: var(--muted);
}

.waitlist {
  display: grid;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}

.waitlist label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.95rem;
}

.optional {
  color: var(--muted);
  font-weight: 400;
}

.waitlist input {
  font: inherit;
  font-weight: 400;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}

.waitlist input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.waitlist .btn {
  justify-self: start;
}

.hp {
  position: absolute;
  left: -9999px;
}

.form-status {
  margin: 0;
  font-size: 0.95rem;
  color: var(--accent);
}

/* FAQ */

.faq {
  max-width: 760px;
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
}

.faq details p {
  color: var(--muted);
  margin: 12px 0 0;
}

/* Final + footer */

.final {
  text-align: center;
}

.final .cta {
  justify-content: center;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 32px;
  padding-bottom: 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

/* Privacy page */

.doc {
  max-width: 720px;
  padding-top: 24px;
  padding-bottom: 72px;
}

.doc h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
}

.doc h2 {
  font-size: 1.3rem;
  margin-top: 2em;
}

.doc li {
  margin: 8px 0;
}

.doc .updated {
  color: var(--muted);
}
