:root {
  --background: #f8fafc;
  --foreground: #0f172a;
  --muted: #475569;
  --subtle: #64748b;
  --card: #ffffff;
  --border: #e2e8f0;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --quora-brand: #b92b27;
  --reddit-brand: #ff4500;
  --live: #059669;
  --live-bg: #ecfdf5;
  --removed: #e11d48;
  --removed-bg: #fff1f2;
  --amber: #d97706;
  --amber-bg: #fffbeb;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--background);
  color: var(--foreground);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--foreground);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--foreground);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.95rem;
}

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

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

.nav a:hover {
  color: var(--foreground);
}

.nav .nav-cta {
  background: var(--foreground);
  color: #ffffff;
  padding: 7px 14px;
  border-radius: 8px;
  font-weight: 600;
}

.nav .nav-cta:hover {
  color: #ffffff;
  opacity: 0.92;
}

/* Hero */
.hero {
  padding: 44px 0 56px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: start;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.lead {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 1rem;
}

.input-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}

.input-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.url-counter {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--subtle);
}

.url-counter.over {
  color: var(--removed);
  font-weight: 700;
}

textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--foreground);
  background: #f8fafc;
  resize: vertical;
}

textarea:focus {
  outline: 2px solid rgba(59, 130, 246, 0.25);
  border-color: var(--primary);
  background: #ffffff;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-ghost {
  background: #ffffff;
  color: var(--foreground);
  border-color: var(--border);
}

.btn-ghost:hover:not(:disabled) {
  background: #f1f5f9;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 0.78rem;
  background: #ffffff;
  border-color: var(--border);
  color: var(--foreground);
}

.btn-block {
  width: 100%;
}

.form-error {
  margin: 10px 0 0;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--removed-bg);
  color: var(--removed);
  font-size: 0.84rem;
  font-weight: 500;
}

.input-footnote {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: var(--subtle);
}

/* Paper Receipt */
.receipt-paper {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 4px solid var(--foreground);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.receipt-head {
  font-family: var(--mono);
}

.receipt-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.receipt-meta {
  margin-top: 4px;
  font-size: 0.74rem;
  color: var(--subtle);
}

.receipt-divider {
  border-top: 1px dashed #cbd5e1;
  margin: 14px 0;
}

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

.score-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--subtle);
}

.score-value {
  font-family: var(--mono);
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

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

.pill {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
}

.pill-live {
  background: var(--live-bg);
  color: var(--live);
}

.pill-collapsed,
.pill-rate {
  background: var(--amber-bg);
  color: var(--amber);
}

.pill-removed {
  background: var(--removed-bg);
  color: var(--removed);
}

.receipt-body {
  min-height: 132px;
}

.receipt-empty {
  margin: 0;
  font-size: 0.88rem;
  color: var(--subtle);
}

.receipt-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.receipt-item {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #f8fafc;
}

.receipt-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.receipt-platform {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--subtle);
  font-weight: 700;
}

.receipt-url {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--foreground);
  word-break: break-all;
}

.receipt-reason {
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--muted);
}

.receipt-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.receipt-note {
  font-size: 0.75rem;
  color: var(--subtle);
}

/* Sections */
.section {
  padding: 56px 0;
}

.section-alt {
  background: #ffffff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 680px;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.feature-card h3 {
  margin: 10px 0 8px;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.tag-reddit {
  background: rgba(255, 69, 0, 0.12);
  color: var(--reddit-brand);
}

.tag-quora {
  background: rgba(185, 43, 39, 0.12);
  color: var(--quora-brand);
}

.tag-blue {
  background: rgba(59, 130, 246, 0.12);
  color: var(--primary-hover);
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.price-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.price-card-featured {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.08);
}

.price-badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-hover);
  background: rgba(59, 130, 246, 0.1);
  padding: 4px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.price-tier {
  font-weight: 700;
  font-size: 1.05rem;
}

.price-amount {
  font-size: 2.1rem;
  font-weight: 800;
  margin: 6px 0;
  letter-spacing: -0.03em;
}

.price-amount span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--subtle);
}

.price-desc {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.price-list {
  margin: 0 0 22px;
  padding-left: 18px;
  color: var(--foreground);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.cta-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 36px;
  font-size: 0.84rem;
  color: var(--subtle);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-links a {
  color: var(--foreground);
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 900px) {
  .hero-grid,
  .cards-3,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}
