:root {
  color-scheme: light;
  --accent: #6366F1;
  --text: #0f172a;
  --muted: #475569;
  --line: #dbe3ef;
  --soft: #f8fafc;
  --success: #0f766e;
  --danger: #b91c1c;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: #ffffff;
}

button,
textarea {
  font: inherit;
}

.shell {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 28px 18px 56px;
}

.workspace {
  display: grid;
  gap: 20px;
}

.masthead {
  display: grid;
  gap: 18px;
  align-items: center;
  padding-top: 18px;
}

.hero-copy {
  min-width: 0;
}

.hero-art {
  width: min(100%, 420px);
  height: auto;
  aspect-ratio: 7 / 4;
  justify-self: start;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 8vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.lede {
  max-width: 690px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.analyzer {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

label,
.section-label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

textarea {
  width: 100%;
  min-height: 330px;
  resize: vertical;
  padding: 16px;
  color: var(--text);
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  background: #ffffff;
  line-height: 1.55;
}

textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#counter {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

button {
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: var(--accent);
  font-weight: 800;
  cursor: pointer;
}

.secondary-button {
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line);
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.trust-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.trust-strip span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
  font-size: 0.84rem;
  font-weight: 700;
}

.trust-strip strong {
  color: var(--text);
}

.result {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.scoreline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.scoreline strong {
  display: block;
  margin-top: 4px;
  font-size: 2.6rem;
  line-height: 1;
}

meter {
  width: 100%;
  height: 18px;
}

.result-grid {
  display: grid;
  gap: 18px;
  padding-top: 18px;
}

article {
  min-width: 0;
}

h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: #1e293b;
  line-height: 1.5;
}

.ad-slot {
  min-height: 92px;
  display: grid;
  place-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  background: #f8fafc;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.affiliate-block {
  display: grid;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.affiliate-block .section-heading p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.affiliate-grid {
  display: grid;
  gap: 12px;
}

.affiliate-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.affiliate-card h3,
.affiliate-card p {
  margin: 0;
}

.affiliate-card p {
  color: var(--muted);
  line-height: 1.55;
}

.affiliate-card a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.affiliate-note {
  margin: 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.45;
}

.content-section {
  display: grid;
  gap: 18px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  gap: 8px;
}

.section-heading h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(1.55rem, 5vw, 2.4rem);
  line-height: 1.08;
}

.example-grid,
.step-grid {
  display: grid;
  gap: 14px;
}

.example-card,
.step-grid article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.example-card p {
  margin: 0;
  color: #1e293b;
  line-height: 1.55;
}

.example-card .section-label {
  display: block;
  margin-bottom: 10px;
}

.step-grid span {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--accent);
  font-size: 0.86rem;
  font-weight: 800;
}

h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.step-grid p,
.faq-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.faq-list {
  display: grid;
  gap: 10px;
}

details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

summary {
  cursor: pointer;
  padding: 15px 16px;
  font-weight: 800;
}

details p {
  padding: 0 16px 16px;
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.site-footer a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

.article-shell {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 24px 18px 56px;
}

.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 28px;
}

.article-nav a,
.primary-link,
.secondary-link,
.related-links a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.article-hero {
  display: grid;
  gap: 22px;
  align-items: center;
  padding: 18px 0 30px;
}

.article-art {
  width: min(100%, 440px);
  aspect-ratio: 7 / 4;
  justify-self: start;
  object-fit: contain;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.primary-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--accent);
}

.secondary-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.primary-link.compact {
  min-height: 40px;
  margin-top: 12px;
}

.quick-answer,
.side-panel {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.quick-answer {
  margin-bottom: 22px;
  background: var(--soft);
}

.article-cta {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.article-cta .section-heading p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.seo-checker-wrap {
  display: grid;
  gap: 16px;
}

.seo-terms-analyzer textarea {
  min-height: 190px;
}

.seo-count {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.quick-answer h2,
.side-panel h2,
.article-block h2 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.18;
}

.quick-answer p,
.side-panel p,
.article-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.sample-panel .sample-text {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #1e293b;
  background: var(--soft);
  font-size: 0.9rem;
}

.article-layout {
  display: grid;
  gap: 22px;
}

.article-content {
  display: grid;
  gap: 24px;
}

.article-block {
  display: grid;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.article-block:first-child {
  padding-top: 0;
  border-top: 0;
}

.article-example-grid {
  grid-template-columns: 1fr;
}

.article-aside {
  display: grid;
  align-content: start;
  gap: 16px;
}

.related-links {
  align-content: start;
}

.related-links a {
  display: block;
  padding-top: 8px;
}

.policy-page {
  display: grid;
  gap: 22px;
}

.policy-page h1 {
  font-size: clamp(2rem, 7vw, 3.4rem);
  line-height: 1.04;
}

.policy-page .quick-answer {
  margin-bottom: 0;
}

.policy-page .article-content {
  gap: 0;
}

@media (max-width: 759px) {
  .hero-art {
    width: min(78%, 300px);
    justify-self: center;
  }

  textarea {
    min-height: 180px;
  }
}

@media (min-width: 760px) {
  .shell {
    padding-top: 54px;
  }

  .masthead {
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.72fr);
  }

  .hero-art {
    width: 100%;
    max-height: 320px;
    justify-self: end;
  }

  .analyzer {
    padding: 20px;
  }

  .scoreline {
    grid-template-columns: 220px 1fr;
    align-items: center;
  }

  .result-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .example-grid,
  .step-grid,
  .affiliate-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .article-shell {
    padding-top: 40px;
  }

  .article-hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.7fr);
  }

  .article-art {
    width: 100%;
    max-height: 340px;
    justify-self: end;
  }

  .article-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .article-example-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-aside .affiliate-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .action-buttons,
  .action-buttons button {
    width: 100%;
  }
}
