/* Vocabulary Tier Classifier styles */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --tier1: #10b981;
  --tier2: #4f46e5;
  --tier3: #f59e0b;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
}
.brand-icon { flex-shrink: 0; }
.site-nav { display: flex; gap: 20px; }
.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}
.site-nav a:hover { color: var(--primary); }

/* Hero */
.hero { padding: 48px 0 32px; }
.hero h1 {
  font-size: 2.2rem;
  line-height: 1.2;
  margin: 0 0 12px;
  max-width: 600px;
}
.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 0 20px;
}
.hero-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Classify section */
.classify-section { padding: 20px 0 48px; }
.layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 24px;
}
@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; }
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.panel h2 { margin: 0 0 16px; font-size: 1.2rem; }
.field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  background: var(--surface);
  color: var(--text);
}
textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

.input-actions { display: flex; gap: 10px; margin-top: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-alt); }
.btn-small { padding: 6px 14px; font-size: 0.8rem; background: var(--surface-alt); border-color: var(--border); color: var(--text); }
.btn-small:hover { background: var(--border); }

.preset-row { margin-top: 16px; }
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text);
}

.history-block { margin-top: 24px; }
.history-block h3 { font-size: 0.9rem; color: var(--text-muted); margin: 0 0 8px; }
.history-list { list-style: none; margin: 0; padding: 0; }
.history-list li {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.15s;
}
.history-list li:hover { background: var(--surface-alt); color: var(--text); }

/* Results panel */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.filter-bar { display: flex; gap: 4px; }
.filter-btn {
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
}
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.filter-btn:hover:not(.active) { background: var(--surface-alt); }

.results-summary {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.summary-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}
.summary-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot-1 { background: var(--tier1); }
.dot-2 { background: var(--tier2); }
.dot-3 { background: var(--tier3); }

.results-actions { display: flex; gap: 8px; margin-bottom: 16px; }

.results-body { min-height: 200px; }
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state p { max-width: 300px; margin: 16px auto 0; }

.result-table { width: 100%; border-collapse: collapse; }
.result-table th, .result-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.result-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}
.result-table tr:hover td { background: var(--surface-alt); }

.tier-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
}
.tier-tag-1 { background: var(--tier1); }
.tier-tag-2 { background: var(--tier2); }
.tier-tag-3 { background: var(--tier3); }

.transfer-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.transfer-track {
  flex: 1;
  height: 6px;
  background: var(--surface-alt);
  border-radius: 3px;
  overflow: hidden;
  min-width: 60px;
}
.transfer-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--primary);
}
.transfer-num { font-size: 0.8rem; font-weight: 600; min-width: 28px; }

.awl-flag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  background: #dbeafe;
  color: #1d4ed8;
}
.no-awl { background: var(--surface-alt); color: var(--text-muted); }

/* Tier cards */
.tiers-section { padding: 48px 0; }
.tiers-section h2 { font-size: 1.5rem; margin: 0 0 24px; }
.tier-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 700px) {
  .tier-cards { grid-template-columns: 1fr; }
}
.tier-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.tier-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.tier-1-card .tier-badge { background: var(--tier1); }
.tier-2-card .tier-badge { background: var(--tier2); }
.tier-3-card .tier-badge { background: var(--tier3); }
.tier-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.tier-card p { margin: 0 0 12px; font-size: 0.9rem; color: var(--text-muted); }
.tier-examples { font-size: 0.85rem; margin-bottom: 12px; }
.tier-note { font-size: 0.8rem; color: var(--text-muted); font-style: italic; }

/* Presets */
.presets-section { padding: 48px 0; }
.presets-section h2 { font-size: 1.5rem; margin: 0 0 8px; }
.section-intp { color: var(--text-muted); margin: 0 0 24px; }
.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 700px) {
  .preset-grid { grid-template-columns: 1fr; }
}
.preset-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.preset-card h3 { margin: 0 0 6px; font-size: 1rem; }
.presets-card p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }

/* About */
.about-section { padding: 48px 0; }
.about-section h2 { font-size: 1.5rem; margin: 0 0 24px; }
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 700px) {
  .about-grid { grid-template-columns: 1fr; }
}
.about-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.about-block h3 { margin: 0 0 8px; font-size: 1rem; }
.about-block p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }
.about-note {
  margin-top: 24px;
  padding: 16px 20px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  font-size: 0.85rem;
}
.about-note p { margin: 0; }

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 48px;
}
.footer-inner { text-align: center; }
.footer-inner p { margin: 0 0 8px; font-size: 0.85rem; color: var(--text-muted); }
.footer-nav { display: flex; gap: 16px; justify-content: center; margin-bottom: 8px; }
.footer-nav a { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; }
.footer-nav a:hover { color: var(--primary); }
.footer-meta { font-size: 0.75rem; }

@media print {
  .site-header, .site-footer, .input-panel, .results-actions, .filter-bar, .hero { display: none; }
  .layout { grid-template-columns: 1fr; }
  .panel { box-shadow: none; border: none; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
