/* TextFlow - Production Styles (matching PRD prototype) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #fafbfc;
  --surface: #fff;
  --border: #e2e8f0;
  --t1: #0f172a;
  --t2: #475569;
  --t3: #94a3b8;
  --brand: #2563eb;
  --brand2: #7c3aed;
  --ok: #059669;
  --warn: #d97706;
  --ad: #cbd5e1;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--t1);
  min-height: 100vh;
  line-height: 1.55;
  font-size: 15px;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Ad Slots */
.ad-slot { display: none; /* hidden */
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--t2);
  background: linear-gradient(180deg, #e2e8f0, #cbd5e1);
  border: 1px dashed var(--t3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  margin: 0 auto;
  max-width: 1100px;
}
.ad-slot.sm { min-height: 40px; margin: 12px auto; }

/* Nav */
.nav { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  gap: 12px;
  flex-wrap: wrap;
}
.logo {
  font-size: 17px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-links a {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--t2);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}
.nav-links a:hover { background: #f1f5f9; color: var(--t1); text-decoration: none; }
.nav-links a.act { background: #eff6ff; color: var(--brand); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.badge-pro {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: #fff;
}
.btn {
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { filter: brightness(1.05); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--t2); border: 1px solid var(--border); }
.btn-ghost:hover { background: #f8fafc; text-decoration: none; }

/* Layout */
.wrap { max-width: 1100px; margin: 0 auto; padding: 24px 20px; }
.hero { padding: 40px 20px 32px; text-align: center; max-width: 720px; margin: 0 auto; }
.hero h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; line-height: 1.2; }
.hero p { color: var(--t2); font-size: 16px; margin-bottom: 20px; }
.hero-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Tool Grid */
.section-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--t3);
  margin: 28px 0 12px;
}
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
  text-decoration: none;
  color: var(--t1);
  display: block;
}
.tool-card:hover { border-color: #bfdbfe; box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08); text-decoration: none; }
.tool-card .p { font-size: 10px; font-weight: 800; color: var(--warn); text-transform: uppercase; margin-bottom: 6px; }
.tool-card .p.p2 { color: var(--brand); }
.tool-card .p.p3 { color: var(--t3); }
.tool-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.tool-card .d { font-size: 12px; color: var(--t2); line-height: 1.45; }
.priority-block { margin-bottom: 8px; }

/* Tool Page */
.tool-page h1 { font-size: 26px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.02em; }
.canonical-hint { font-size: 12px; color: var(--t3); margin-bottom: 20px; font-family: 'JetBrains Mono', monospace; }
.grid-io { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .grid-io { grid-template-columns: 1fr; } }
.pane { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.pane-h {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  color: var(--t2);
  background: #f8fafc;
}
.pane textarea {
  width: 100%;
  min-height: 200px;
  border: none;
  padding: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
}
.pane .out {
  min-height: 200px;
  padding: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--t2);
  white-space: pre-wrap;
  word-break: break-word;
}
.toolbar { padding: 14px 0; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* SEO Block */
.seo-block { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.seo-block h2 { font-size: 18px; font-weight: 700; margin: 20px 0 10px; }
.seo-block p, .seo-block li { color: var(--t2); font-size: 14px; margin-bottom: 12px; }
.seo-block ul { margin-left: 20px; margin-bottom: 12px; }
.faq-item { margin-bottom: 14px; padding: 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.faq-item strong { display: block; font-size: 14px; margin-bottom: 6px; color: var(--t1); }
.faq-item span { font-size: 13px; color: var(--t2); }

/* AI Limit Strip */
.limit-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: 10px;
  background: linear-gradient(90deg, #fef3c7, #fff7ed);
  border: 1px solid #fcd34d;
  margin-bottom: 16px;
  font-size: 13px;
}
.limit-strip b { color: #92400e; }

/* Pricing */
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 720px; margin: 0 auto; }
@media (max-width: 640px) { .price-grid { grid-template-columns: 1fr; } }
.price-card { border: 1px solid var(--border); border-radius: 14px; padding: 24px; background: var(--surface); }
.price-card.featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.price-card h3 { font-size: 18px; margin-bottom: 8px; }
.price-card .amt { font-size: 32px; font-weight: 800; margin: 12px 0; }
.price-card ul { font-size: 14px; color: var(--t2); margin-left: 18px; }
.price-card li { margin-bottom: 8px; }

/* Auth */
.auth-box { max-width: 400px; margin: 0 auto; border: 1px solid var(--border); border-radius: 14px; padding: 28px; background: var(--surface); }
.auth-box h1 { font-size: 22px; margin-bottom: 16px; }
.auth-box label { display: block; font-size: 12px; font-weight: 600; color: var(--t2); margin-bottom: 6px; }
.auth-box input { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); margin-bottom: 14px; font-size: 14px; font-family: inherit; }
.auth-box .btn { width: 100%; margin-top: 8px; }
.auth-box .alt { text-align: center; margin-top: 14px; font-size: 13px; color: var(--t2); }

/* Footer */
footer { padding: 32px 20px; border-top: 1px solid var(--border); background: var(--surface); font-size: 12px; color: var(--t2); }
footer .cols { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; }
footer strong { color: var(--t1); }

/* Alerts */
.alert { padding: 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: 14px; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.stat-item { background: var(--bg); padding: 12px; border-radius: 8px; text-align: center; }
.stat-label { display: block; color: var(--t2); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { display: block; font-size: 24px; font-weight: 700; color: var(--brand); margin-top: 4px; }

/* Google Login Button */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 12px;
  margin-top: 8px;
  background: #fff;
  color: #333;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 16px 0;
  color: var(--t2);
  font-size: 13px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.divider span {
  padding: 0 12px;
}
