:root{--bg:#0f172a;--panel:#111827;--text:#e5e7eb;--muted:#9ca3af;--accent:#22d3ee;--header-offset:56px}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font:16px system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif}
a{color:var(--accent)}
a:visited{color:var(--accent)}
a:hover{color:var(--text)}
.site-header{display:flex;gap:.75rem;align-items:center;justify-content:space-between;padding:.5rem .75rem;border-bottom:1px solid #1f2937;position:sticky;top:0;z-index:100;background:transparent;backdrop-filter:none;transition:background .2s ease,box-shadow .2s ease,border-color .2s ease}
.site-header h1{font-size:1.1rem;margin:0}
.site-header.is-sticky{background:rgba(17,24,39,.6);backdrop-filter:saturate(120%) blur(6px);box-shadow:0 2px 12px rgba(0,0,0,.25)}
.site-header nav a{color:var(--muted);text-decoration:none;margin-right:.75rem}
.site-header nav a[aria-current="page"],.site-header nav a:hover{color:var(--text)}
.container{max-width:960px;margin:0 auto;padding:1rem}
.hero{padding:2rem 0}
input[type=search]{width:100%;padding:.75rem 1rem;border-radius:.5rem;border:1px solid #334155;background:#0b1220;color:var(--text)}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.form-grid .full{grid-column:1 / -1}
label{display:block;color:#cbd5e1;margin:.25rem 0}
input[type=text],input[type=url]{width:100%;padding:.6rem .75rem;border-radius:.4rem;border:1px solid #334155;background:#0b1220;color:var(--text)}
button.chip{border:1px solid #334155;color:#0f172a;background:#22d3ee;border-radius:999px;padding:.4rem .9rem;font-size:.9rem;cursor:pointer}
button.chip:hover{filter:brightness(1.05)}
.search-controls{margin-top:.5rem;color:var(--muted);font-size:.9rem}
.results{margin-top:1rem;display:grid;gap:.75rem}
.result{padding:1rem;border:1px solid #1f2937;border-radius:.5rem;background:var(--panel)}
.result .word{font-weight:600}
.result .pos{color:var(--muted)}
.letter{margin-top:2rem}
.letter h2{color:var(--accent)}
.entry{padding:1rem;border:1px solid #1f2937;border-radius:.5rem;background:var(--panel);margin:.75rem 0}
.entry h3{margin:.25rem 0 .25rem 0}
.entry .posline{margin:.1rem 0 .5rem 0; font-size:.9rem; color:var(--muted)}
.def{margin:.25rem 0}
.ex,.ety{color:var(--muted);margin:.25rem 0}
.az-nav{display:flex;flex-wrap:wrap;gap:.25rem;margin:1rem 0}
.az-nav a{color:var(--muted);text-decoration:none;padding:.25rem .5rem;border:1px solid #1f2937;border-radius:.25rem}
.az-float{position:fixed;right:12px;top:calc(var(--header-offset) + 12px);display:none;flex-direction:column;gap:4px;background:rgba(17,24,39,.6);backdrop-filter:saturate(120%) blur(6px);padding:6px;border-radius:8px;border:1px solid #1f2937;max-height:80vh;overflow:auto}
.az-float.show{display:flex}
.az-float a{color:#cbd5e1;text-decoration:none;font-size:12px;padding:2px 6px;border-radius:4px}
.az-float a:hover{background:rgba(34,211,238,.15)}
.prose-custom{color:#cbd5e1}
.prose-custom h1,.prose-custom h2,.prose-custom h3,.prose-custom h4{color:#e5e7eb;margin:1.25rem 0 .5rem;font-weight:700}
.prose-custom p{line-height:1.75;margin:.75rem 0}
.prose-custom ul{padding-left:1.25rem;margin:.75rem 0}
.prose-custom li{margin:.25rem 0}
.prose-custom table{width:100%;border-collapse:collapse;margin:1rem 0}
.prose-custom th,.prose-custom td{border:1px solid #334155;padding:.5rem;text-align:left}
.prose-custom th{background:#0b1220}
.prose-custom code{background:#0b1220;padding:.1rem .25rem;border-radius:.25rem}
.card-grid{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.card{background:var(--panel);border:1px solid #1f2937;padding:1rem;border-radius:.5rem}
.card .media{position:relative;width:100%;padding-top:56.25%;border:1px solid #1f2937;border-radius:.5rem;overflow:hidden;background:#0b1220;margin:.5rem 0}
.card .media iframe{position:absolute;inset:0;width:100%;height:100%;display:block}
code{background:#0b1220;padding:.15rem .35rem;border-radius:.25rem}
.badge{display:inline-block;margin-right:.5rem;background:#0b1220;border:1px solid #334155;color:#cbd5e1;padding:.05rem .4rem;border-radius:.4rem;font-size:.75rem}
.chip-row{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.5rem}
.chip{border:1px solid #334155;color:#cbd5e1;background:#0b1220;border-radius:999px;padding:.25rem .6rem;font-size:.85rem;cursor:pointer;user-select:none}
.chip.is-active{border-color:var(--accent);background:rgba(34,211,238,.12)}
.appendix-grid{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));margin-top:1rem}
.appendix-card{background:var(--panel);border:1px solid #1f2937;padding:1rem;border-radius:.5rem}
.appendix-card h3{margin-top:0}
.pill{display:inline-block;background:#0b1220;border:1px solid #334155;color:#cbd5e1;padding:.1rem .5rem;border-radius:999px;font-size:.75rem;margin-right:.5rem}
.meta{color:var(--muted);font-size:.85rem}
.prewrap{white-space:pre-wrap}
/* Research imagery */
.thumb{width:100%;height:180px;object-fit:cover;border-radius:.5rem;margin-bottom:.5rem;border:1px solid #1f2937}
.hero-image{width:100%;max-height:520px;object-fit:contain;background:#0b1220;border:1px solid #1f2937;border-radius:.5rem;margin:1rem 0}
/* Back-to-top button */
.to-top-button{position:fixed;right:16px;bottom:16px;opacity:0;pointer-events:none;transition:opacity .2s ease,transform .2s ease;transform:translateY(6px);background:#0b1220;border:1px solid #334155;color:#cbd5e1;padding:.5rem .75rem;border-radius:.5rem;z-index:200;cursor:pointer}
.to-top-button.show{opacity:1;pointer-events:auto;transform:translateY(0)}
