:root{
  --bg:#f8fafc; --text:#0f172a; --muted:#64748b; --primary:#2563eb;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font:16px/1.5 Inter,system-ui,Segoe UI,Roboto,Arial,sans-serif}
.container{max-width:1100px;margin:0 auto;padding:24px}
h1{font-size:40px;margin:0 0 6px}
h2{margin:24px 0 12px}
h3{margin:28px 0 12px}
.muted{color:var(--muted);transition:opacity .2s ease}

/* legend — use only this one */
.legend { font-size:14px;color:#475569;margin:4px 0 6px 4px; }

.chips{display:flex;flex-wrap:wrap;gap:12px}
.chip{
  border:1px solid #cbd5e1;background:#eef2f7;
  padding:10px 14px;border-radius:999px;cursor:pointer;
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.chip:hover{ transform:scale(1.03); box-shadow:0 2px 10px rgba(0,0,0,.10); }

.search-wrap{display:flex;gap:10px;align-items:center;margin:18px 0 28px}
.search-wrap input{flex:1;padding:16px 18px;border-radius:16px;border:1px solid #e2e8f0;background:white;font-size:16px;outline:none}
.search-wrap input:focus{border-color:#94a3b8;box-shadow:0 0 0 3px #94a3b833}
.search-wrap button{padding:14px 20px;border-radius:16px;border:0;background:var(--primary);color:white;font-weight:600;cursor:pointer}
.search-wrap button:hover{filter:brightness(1.05)}

.result{padding:12px 0;border-bottom:1px solid #e2e8f0}
.result a{font-weight:700;color:#0b4acb;text-decoration:none}
.result a:hover{text-decoration:underline}
.result .meta{color:var(--muted);font-size:14px;margin-top:4px}

.footnote{color:var(--muted);font-size:14px;margin-top:24px}

.toast{
  position:fixed; left:50%; bottom:28px; transform:translateX(-50%);
  background:#0f172a; color:#fff; padding:10px 14px; border-radius:10px;
  font-size:14px; box-shadow:0 6px 24px rgba(2,6,23,.25); opacity:0; pointer-events:none;
  transition:opacity .2s ease;
}
.toast.show{opacity:1}

/* Tighten header → main vertical gap */
#rotating-subtitle {
  margin: 4px 0 6px;
}

header.container {
  padding-bottom: 8px;
}

main.container {
  padding-top: 8px;
}

/* Reduce first section heading top gap */
main.container section:first-of-type > h2 {
  margin-top: 6px;
}