:root {
  --bg: #fafafa;
  --card-bg: #ffffff;
  --text: #111111;
  --muted: #555555;
  --border: #e5e5e5;
  --accent: #111111;
  --danger: #b00020;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Layout */

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.header {
  margin-bottom: 40px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  width: 28px;
  height: 28px;
}

.brand {
  font-size: 34px;
  font-weight: 600;
  margin: 0;
}

.tagline {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.5;
  max-width: 560px;
  margin-top: 6px;
}

/* Cards */

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  margin-bottom: 32px;
}

/* Inputs */

.label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.input {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.input:focus {
  outline: none;
  border-color: #111;
}

/* Buttons */

.primary-btn {
  margin-top: 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px 20px;
  font-size: 15px;
  border-radius: 8px;
  cursor: pointer;
}

.primary-btn:hover {
  opacity: 0.9;
}

.secondary-btn {
  margin-top: 20px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 12px 18px;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
}

.secondary-btn:hover {
  background: #f2f2f2;
}

/* Secondary path */

.secondary-path {
  font-size: 14px;
  color: var(--muted);
  margin: 10px 0 6px;
}

.secondary-path a {
  color: var(--text);
  text-decoration: underline;
}

/* Meta */

.counter {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

.error {
  margin-top: 8px;
  font-size: 14px;
  color: var(--danger);
}

/* Pricing */

.pricing {
  margin-top: 20px;
  font-size: 14px;
}

.price-line {
  margin: 6px 0;
}

.muted {
  color: var(--muted);
}

/* Results */

.section-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 16px;
}

.score {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.example p {
  margin: 6px 0;
  line-height: 1.6;
}

/* Rewrite */

.rewrite-output {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 20px;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: auto;
}

/* Paywall */

.paywall {
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
}

/* About */

.about {
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
}

.about h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.about p {
  max-width: 520px;
  line-height: 1.6;
}

/* Mobile */

@media (max-width: 600px) {
  .container {
    padding: 32px 16px 60px;
  }

  .brand {
    font-size: 28px;
  }
}

.decision-block {
  margin-top: 16px;
}

.decision-block .pricing {
  margin-top: 10px;
}

.decision-block .price-line {
  margin: 4px 0;
}

/* Typography refinement */

.brand {
  font-weight: 650; /* slightly heavier than default */
}

.tagline {
  font-weight: 400;
}

.label {
  font-weight: 500;
}

.primary-btn {
  font-weight: 500;
}

.secondary-btn {
  font-weight: 500;
}

.price-line strong {
  font-weight: 600;
}

.section-title {
  font-weight: 600;
}

.score {
  font-weight: 600;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0 14px;
}

.processing {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 12px auto 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
