/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 100%; scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #1e293b;
    background: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* === Container === */
.container { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 1.25rem; }

/* === Header === */
.site-header {
    background: #0f172a;
    color: #f1f5f9;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; }
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.25rem; letter-spacing: -0.3px; }
.logo svg { color: #38bdf8; }
.main-nav ul { display: flex; gap: 1.5rem; }
.main-nav a { font-weight: 500; font-size: 0.95rem; padding: 0.25rem 0; border-bottom: 2px solid transparent; transition: border-color 0.2s; }
.main-nav a:hover, .main-nav a.active { border-color: #38bdf8; }

/* === Hero / Search === */
.hero { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); color: #f8fafc; padding: 3rem 0 2.5rem; text-align: center; }
.hero h1 { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 0.75rem; line-height: 1.2; }
.hero-subtitle { font-size: 1.1rem; max-width: 600px; margin: 0 auto 2rem; color: #cbd5e1; }
.search-box { display: flex; max-width: 520px; margin: 0 auto 1.5rem; box-shadow: 0 8px 24px rgba(0,0,0,0.25); border-radius: 12px; overflow: hidden; }
.search-box input {
    flex: 1;
    padding: 0.9rem 1.25rem;
    border: none;
    font-size: 1.1rem;
    background: #fff;
    color: #0f172a;
    outline: none;
}
.search-box input::placeholder { color: #94a3b8; }
.search-box button {
    background: #38bdf8;
    color: #0f172a;
    border: none;
    padding: 0 1.5rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.2s;
    white-space: nowrap;
}
.search-box button:hover { background: #7dd3fc; }

.result-card {
    background: #fff;
    color: #1e293b;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 520px;
    margin: 0 auto;
    text-align: left;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    display: none;
}
.result-card.visible { display: block; }
.result-card h3 { font-size: 1.4rem; margin-bottom: 0.75rem; color: #0f172a; }
.result-card ul { list-style: disc; padding-left: 1.5rem; }
.result-card li { margin-bottom: 0.4rem; line-height: 1.5; }
.result-card .no-result { color: #64748b; font-style: italic; }

/* === Features === */
.features { padding: 3rem 0; background: #fff; }
.features h2, .popular h2, .add-custom h2 { text-align: center; font-size: 1.8rem; margin-bottom: 2rem; color: #0f172a; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.feature-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.75rem;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.2s;
}
.feature-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
.feature-icon { margin: 0 auto 1rem; color: #0f172a; }
.feature-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.feature-card p { color: #475569; font-size: 0.95rem; }

/* === Add Custom === */
.add-custom { padding: 3rem 0; background: #f1f5f9; }
.section-intro { text-align: center; max-width: 560px; margin: -1rem auto 1.5rem; color: #475569; }
.add-form { display: flex; flex-wrap: wrap; gap: 1rem; max-width: 600px; margin: 0 auto; align-items: flex-end; justify-content: center; }
.form-group { display: flex; flex-direction: column; gap: 0.3rem; flex: 1 1 180px; }
.form-group label { font-weight: 600; font-size: 0.9rem; color: #334155; }
.form-group input {
    padding: 0.65rem 0.9rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
}
.add-form button {
    background: #0f172a;
    color: #fff;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.add-form button:hover { background: #1e293b; }
.feedback-msg { text-align: center; margin-top: 1rem; font-weight: 500; min-height: 1.5rem; }
.feedback-msg.success { color: #059669; }
.feedback-msg.error { color: #dc2626; }

.custom-list-container { max-width: 500px; margin: 1.5rem auto 0; background: #fff; border-radius: 10px; padding: 1.25rem; border: 1px solid #e2e8f0; }
.custom-list-container h3 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.custom-list { display: flex; flex-direction: column; gap: 0.5rem; }
.custom-list li { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid #f1f5f9; font-size: 0.95rem; }
.custom-list li:last-child { border-bottom: none; }
.custom-list .acronym-badge { font-weight: 700; color: #0f172a; background: #e0f2fe; padding: 0.15rem 0.6rem; border-radius: 20px; font-size: 0.85rem; }
.btn-text { background: none; border: none; color: #dc2626; cursor: pointer; font-size: 0.9rem; margin-top: 0.75rem; text-decoration: underline; }

/* === Popular Grid === */
.popular { padding: 3rem 0; background: #fff; }
.popular-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; max-width: 700px; margin: 0 auto; }
.popular-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 700;
    color: #0f172a;
}
.popular-card:hover { background: #e0f2fe; border-color: #38bdf8; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.04); }

/* === Footer === */
.site-footer { background: #0f172a; color: #cbd5e1; padding: 1.5rem 0; margin-top: auto; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; font-size: 0.9rem; }
.footer-inner nav ul { display: flex; gap: 1.5rem; }
.footer-inner a:hover { color: #38bdf8; }

/* === About / Legal Pages === */
.content-page { padding: 2.5rem 0; flex: 1; }
.content-page h1 { font-size: 2rem; margin-bottom: 1.5rem; }
.content-page .prose { max-width: 680px; line-height: 1.7; }

/* === Responsive === */
@media (max-width: 640px) {
    .hero h1 { font-size: 1.7rem; }
    .search-box { flex-direction: column; border-radius: 12px; }
    .search-box input { border-radius: 12px 12px 0 0; }
    .search-box button { border-radius: 0 0 12px 12px; justify-content: center; }
    .add-form { flex-direction: column; align-items: stretch; }
    .add-form button { width: 100%; }
    .footer-inner { flex-direction: column; text-align: center; }
    .features-grid { grid-template-columns: 1fr; }
    .popular-grid { grid-template-columns: repeat(2, 1fr); }
}



/* 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;
}
