:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #eef2ff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #dbe3ef;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --success: #166534;
  --danger: #b91c1c;
  --radius: 18px;
  --shadow: 0 16px 40px rgba(15, 23, 42, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.site-header { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: 18px clamp(20px, 5vw, 72px); background: rgba(248,250,252,.88); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(219,227,239,.8); }
.brand { font-size: 1.35rem; font-weight: 850; letter-spacing: -.03em; }
.brand span { color: var(--brand); }
.site-header nav { display: flex; gap: 22px; color: var(--muted); font-size: .95rem; }
.hero { padding: 88px clamp(20px, 8vw, 120px) 64px; background: radial-gradient(circle at top right, #dbeafe, transparent 38%), linear-gradient(180deg,#fff,#f8fafc); }
.hero > div { max-width: 850px; }
.eyebrow { margin: 0 0 10px; color: var(--brand); font-weight: 750; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; }
h1 { margin: 0; font-size: clamp(2.5rem, 6vw, 5.4rem); line-height: .98; letter-spacing: -.055em; }
h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.8rem); letter-spacing: -.035em; }
.hero p:not(.eyebrow) { max-width: 720px; margin: 24px 0; color: var(--muted); font-size: 1.12rem; line-height: 1.65; }
.search-box { display: flex; gap: 12px; align-items: center; max-width: 650px; padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; }
.section, .workspace { padding: 64px clamp(20px, 8vw, 120px); }
.section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 28px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.filter-button { border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; background: var(--surface); color: var(--muted); }
.filter-button.active { background: var(--text); color: white; border-color: var(--text); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.tool-card { text-align: left; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 22px; min-height: 168px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #bfdbfe; }
.tool-icon { font-size: 1.8rem; }
.tool-card h3 { margin: 18px 0 8px; font-size: 1.15rem; }
.tool-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.workspace { background: #eef2f7; min-height: 70vh; }
.hidden { display: none !important; }
.close-button { margin-bottom: 22px; border: 0; background: transparent; color: var(--brand); font-weight: 700; }
.tool-panel { max-width: 980px; margin: 0 auto; background: var(--surface); border-radius: 24px; border: 1px solid var(--line); padding: clamp(22px, 5vw, 42px); box-shadow: var(--shadow); }
.tool-panel header { margin-bottom: 28px; }
.tool-panel header p { color: var(--muted); line-height: 1.6; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1/-1; }
.field label { font-weight: 700; font-size: .92rem; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: white; padding: 12px 13px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96,165,250,.18); }
textarea { min-height: 170px; resize: vertical; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.button { border: 0; border-radius: 12px; padding: 12px 18px; background: var(--brand); color: white; font-weight: 750; }
.button:hover { background: var(--brand-dark); }
.button.secondary { background: #e2e8f0; color: var(--text); }
.result { margin-top: 22px; border-radius: 16px; padding: 18px; background: #f8fafc; border: 1px solid var(--line); }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; }
.metric { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.metric span { display:block; color: var(--muted); font-size: .84rem; }
.metric strong { display:block; margin-top:6px; font-size:1.25rem; overflow-wrap:anywhere; }
.notice { padding: 13px 15px; border-left: 4px solid var(--brand); background: #eff6ff; border-radius: 8px; color: #1e3a8a; line-height: 1.55; }
.error { color: var(--danger); }
.success { color: var(--success); }
.word-list { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.word-chip { padding:7px 10px; border-radius:999px; background:#eef2ff; border:1px solid #c7d2fe; }
.ad-shell { margin: 20px auto; max-width: 1100px; padding: 0 20px; }
.ad-placeholder { min-height: 90px; border: 1px dashed #cbd5e1; border-radius: 14px; display:flex; align-items:center; justify-content:center; color:#94a3b8; background:#fff; }
.prose { max-width: 980px; }
.prose p { color:var(--muted); line-height:1.75; }
footer { display:flex; justify-content:space-between; gap:20px; padding:28px clamp(20px,5vw,72px); border-top:1px solid var(--line); color:var(--muted); }
footer div { display:flex; gap:18px; }
.consent { position:fixed; z-index:50; left:20px; right:20px; bottom:20px; max-width:900px; margin:auto; display:flex; justify-content:space-between; gap:20px; align-items:center; background:#0f172a; color:#fff; padding:20px; border-radius:18px; box-shadow:0 22px 60px rgba(15,23,42,.35); }
.consent h2 { font-size:1.2rem; }
.consent p { margin:8px 0 0; color:#cbd5e1; }
.consent-actions { display:flex; gap:10px; flex-shrink:0; }
.stats-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:16px; }
.table-wrap { overflow:auto; border:1px solid var(--line); border-radius:14px; }
table { width:100%; border-collapse:collapse; background:white; }
th,td { text-align:left; padding:12px 14px; border-bottom:1px solid var(--line); }
th { background:#f8fafc; }
@media (max-width: 760px) {
  .site-header nav { display:none; }
  .section-heading { align-items:flex-start; flex-direction:column; }
  .filters { justify-content:flex-start; }
  .form-grid { grid-template-columns:1fr; }
  .consent { flex-direction:column; align-items:stretch; }
  footer { flex-direction:column; }
}
