@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600&family=Inter:wght@400;500&display=swap');

:root{
  --bg:#1A1A1E;
  --bg-1:#212124;
  --bg-card:#232326;
  --bg-card-2:#1E1E21;
  --border:#38383D;
  --border-soft:#2C2C30;
  --text-primary:#FFFFFF;
  --text-secondary:#B8B8BD;
  --text-muted:#8F8F94;
  --amber:#F5A623;
  --amber-tint:#2E2418;
  --caution-border:#B45A1E;
  --caution-text:#D98A4A;
  --caution-bg:#2A211A;
  --radius:10px;
}

*{box-sizing:border-box;}

body{
  margin:0;
  background:var(--bg);
  color:var(--text-primary);
  font-family:'Inter', system-ui, sans-serif;
  line-height:1.7;
}

h1,h2,h3{
  font-family:'Space Grotesk', 'Inter', sans-serif;
  font-weight:500;
  margin:0;
}

a{color:inherit; text-decoration:none;}

.topnav{
  position:sticky; top:0; z-index:20;
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 32px;
  background:var(--bg);
  border-bottom:1px solid var(--border);
}
.brand{display:flex; align-items:baseline; gap:2px; font-family:'Space Grotesk',sans-serif; font-size:17px;}
.brand .b1{color:var(--amber); font-weight:600;}
.brand .b2{color:var(--text-primary); font-weight:600;}
.brand-tag{color:var(--text-muted); font-size:12px; margin-left:12px; display:none;}
@media(min-width:900px){.brand-tag{display:inline;}}

.navlinks{display:flex; align-items:center; gap:26px;}
.navlinks a{color:var(--text-secondary); font-size:14px; padding-bottom:18px;}
.navlinks a.active{color:var(--text-primary); font-weight:500; border-bottom:2px solid var(--amber); padding-bottom:16px;}
.navlinks a:hover{color:var(--text-primary);}

.subscribe-btn{
  background:var(--amber); color:var(--bg); border:none; font-weight:500;
  padding:9px 16px; border-radius:8px; font-size:13px; font-family:'Inter',sans-serif;
  cursor:pointer;
}

.menu-toggle{display:none; background:none; border:none; color:var(--text-primary); font-size:20px; cursor:pointer;}
@media(max-width:820px){
  .navlinks{position:fixed; top:57px; left:0; right:0; background:var(--bg); flex-direction:column; align-items:flex-start; padding:16px 24px; border-bottom:1px solid var(--border); display:none; gap:14px;}
  .navlinks.open{display:flex;}
  .menu-toggle{display:block;}
}

.layout{display:flex; align-items:flex-start; max-width:1120px; margin:0 auto;}
@media(max-width:820px){.layout{display:block;}}

.sidebar{
  flex:0 0 220px; width:220px;
  position:sticky; top:57px; align-self:flex-start; max-height:calc(100vh - 57px);
  overflow-y:auto; padding:28px 16px; border-right:1px solid var(--border);
}
@media(max-width:820px){.sidebar{display:none;}}
.sidebar-label{color:var(--text-muted); font-size:11px; font-weight:500; letter-spacing:.04em; margin:0 0 12px 8px;}
.sidebar a{display:block; color:var(--text-secondary); font-size:13px; padding:7px 8px; border-radius:6px; line-height:1.5;}
.sidebar a:hover{background:var(--bg-1); color:var(--text-primary);}
.sidebar a.sub{font-size:12px; padding-left:22px; color:var(--text-muted);}
.sidebar a.sub:hover{color:var(--text-primary);}

main{flex:1 1 auto; padding:40px 32px 80px; min-width:0;}

.hero{padding:8px 0 48px; border-bottom:1px solid var(--border); margin-bottom:48px;}
.hero-eyebrow{color:var(--amber); font-size:13px; font-weight:500; margin-bottom:10px;}
.hero h1{font-size:36px; line-height:1.2; max-width:600px; margin-bottom:14px;}
.hero p{color:var(--text-secondary); font-size:16px; max-width:520px; margin-bottom:24px;}

section.chapter{padding-top:24px; margin-bottom:56px; border-top:1px solid var(--border-soft);}
section.chapter:first-of-type{border-top:none;}
.chapter-num{color:var(--amber); font-size:12px; font-weight:500; letter-spacing:.04em; margin-bottom:8px;}
.chapter h2{font-size:24px; margin-bottom:10px;}
.chapter > p.lede{color:var(--text-secondary); font-size:15px; max-width:640px; margin-bottom:20px;}

.subcap{margin:20px 0;}
.subcap h3{font-size:16px; margin-bottom:6px;}
.subcap p{color:var(--text-secondary); font-size:14px; margin:0 0 4px;}
.subcap .from{color:var(--text-muted); font-size:13px;}
.subcap .to{color:var(--text-primary); font-size:13px;}

.card-stack{display:grid; gap:12px; margin-top:20px; max-width:640px;}
.card{background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:16px 18px;}
.card p.label{color:var(--amber); font-size:11px; font-weight:500; letter-spacing:.04em; margin:0 0 6px;}
.card p.body{color:var(--text-secondary); font-size:14px; margin:0;}

.card.tip{background:#F5D949; border:none;}
.card.tip p.label{color:#4A3B00; display:flex; align-items:center; gap:6px;}
.card.tip p.body{color:#4A3B00;}
.card.tip svg{width:14px; height:14px; flex:0 0 auto;}

.card.caution{background:var(--amber); border:none;}
.card.caution p.label{color:#3D2408; display:flex; align-items:center; gap:6px;}
.card.caution p.body{color:#3D2408;}
.card.caution svg{width:14px; height:14px; flex:0 0 auto;}

.chapter-visual{
  max-width:640px; margin:18px 0 4px; padding:18px 20px;
  background:var(--bg-card); border:1px solid var(--border); border-radius:12px;
}
.chapter-visual svg{width:100%; height:auto; display:block;}

.subdomain-block{border:1px solid var(--border); border-radius:12px; padding:20px 22px; margin-bottom:20px; background:var(--bg-1);}
.subdomain-block h3{font-size:17px; color:var(--amber); margin-bottom:12px;}

.author-intro-card{display:flex; gap:18px; align-items:flex-start; max-width:640px;}

.acknowledgements p.lede{margin-bottom:16px;}

.author-strip{
  display:flex; align-items:center; gap:14px; max-width:1120px; margin:0 auto;
  padding:24px 32px; border-top:1px solid var(--border); background:var(--bg-card-2);
}
.avatar{width:42px; height:42px; border-radius:50%; background:var(--amber); color:var(--bg); font-weight:600; font-size:13px; display:flex; align-items:center; justify-content:center; font-family:'Space Grotesk',sans-serif;}
.author-strip .role{color:var(--text-muted); font-size:10px; font-weight:500; letter-spacing:.04em; margin-bottom:2px;}
.author-strip .name{font-size:14px; font-weight:500;}
.author-strip .title{color:var(--text-muted); font-size:12px;}
.author-strip a.site-link{margin-left:auto; color:var(--amber); font-size:13px;}

footer.site-footer{padding:20px 32px 40px; text-align:center; color:var(--text-muted); font-size:12px;}
