
:root{
  --bg:#f5f7fb; --card:#ffffff; --text:#1f2937; --muted:#5b6473; --line:#d7deea; --brand:#1f4ea3;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;color:var(--text);background:var(--bg);line-height:1.55}
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}
.wrap{width:min(1180px,92vw);margin:0 auto}
.site-header{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}
.site-header .wrap{display:flex;justify-content:space-between;align-items:center;padding:14px 0}
.brand{font-weight:700;color:var(--text)}
.top-nav{display:flex;gap:18px;flex-wrap:wrap}
.hero{padding:46px 0 28px;background:linear-gradient(180deg,#ffffff 0%, #f5f7fb 100%)}
.hero-grid{display:grid;grid-template-columns:1fr;gap:24px;align-items:start}
.hero-card,.chapter-card,.section-card,.result-card{background:var(--card);border:1px solid var(--line);border-radius:18px;box-shadow:0 8px 28px rgba(16,24,40,.05)}
.hero-card,.section-card{padding:24px}
.eyebrow{text-transform:uppercase;letter-spacing:.08em;font-size:.76rem;color:var(--muted);font-weight:700}
h1,h2,h3{line-height:1.2;margin:0 0 10px}
h1{font-size:clamp(1.9rem,3vw,3rem)}
h2{font-size:1.4rem}
h3{font-size:1.08rem}
.lede{font-size:1.05rem;color:var(--muted);max-width:58ch}
.search-bar{display:flex;gap:10px;margin-top:16px}
.search-bar input{flex:1;padding:14px 16px;border:1px solid var(--line);border-radius:14px;font-size:1rem}
.search-bar button{padding:14px 18px;border:0;border-radius:14px;background:var(--brand);color:#fff;font-weight:700;cursor:pointer}
.section-head{display:flex;justify-content:space-between;align-items:end;margin:26px 0 14px}
.chapter-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;padding-bottom:32px}
.chapter-card{display:block;padding:18px;color:var(--text)}
.chapter-card p,.meta,.muted{color:var(--muted)}
.chapter-layout{display:grid;grid-template-columns:300px 1fr;gap:24px;padding:24px 0 40px}
.chapter-sidebar .sticky{position:sticky;top:80px;background:#fff;border:1px solid var(--line);border-radius:18px;padding:18px}
.sidebar-links{display:flex;flex-direction:column;gap:10px;margin-top:16px;max-height:calc(100vh - 180px);overflow:auto}
.sidebar-links a{padding:8px 10px;border-radius:10px}
.sidebar-links a:hover{background:#f1f5fb;text-decoration:none}
.secno{display:inline-block;min-width:64px;font-weight:700}
.chapter-content{display:grid;gap:16px}
.minor-heading{font-weight:700;color:var(--muted);margin:10px 0}
p{margin:10px 0}
.search-page{padding:28px 0 42px}
.results{display:grid;gap:14px}
.result-card{padding:18px}
.result-card h3{margin-bottom:8px}
mark{background:#fff2a8;padding:0 .1em;border-radius:.2em}
.search-meta{margin:14px 0;color:var(--muted)}
@media (max-width: 900px){
  .chapter-layout{grid-template-columns:1fr}
  .chapter-sidebar .sticky{position:static}
}
