:root{
  color-scheme:dark;
  --bg:#0d1322;
  --bg-soft:#131d33;
  --panel:rgba(15,22,38,.82);
  --panel-strong:rgba(15,22,38,.95);
  --text:#eef3ff;
  --muted:#aeb8ca;
  --line:rgba(255,255,255,.09);
  --line-strong:rgba(255,255,255,.18);
  --accent:#d0a676;
  --accent-2:#79c3de;
  --accent-3:#c6a9f4;
  --shadow:0 24px 80px rgba(0,0,0,.34);
  --radius:24px;
  --radius-sm:18px;
  --max:1180px;
  --sidebar:280px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Inter,Arial,Helvetica,sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(139,94,52,.12), transparent 24%),
    radial-gradient(circle at top right, rgba(36,93,115,.1), transparent 22%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}

a{color:inherit}
img{max-width:100%}
code{
  padding:2px 7px;
  border-radius:8px;
  background:rgba(127,127,127,.14);
  font-family:Consolas,"SFMono-Regular",monospace;
  font-size:.92em;
}

.site-header{
  position:fixed;
  left:0;
  top:0;
  bottom:0;
  width:var(--sidebar);
  z-index:20;
  backdrop-filter:blur(18px);
  background:linear-gradient(180deg, var(--panel-strong), var(--panel));
  border-right:1px solid var(--line);
}

.header-inner{
  height:100%;
  padding:20px 18px 22px;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:16px;
}

.brand{
  text-decoration:none;
  padding:4px 4px 16px;
  border-bottom:1px solid var(--line);
}

.eyebrow{
  margin:0 0 4px;
  color:var(--accent);
  font-size:11px;
  font-weight:700;
  letter-spacing:.18em;
  text-transform:uppercase;
}

.brand strong{
  display:block;
  font-size:18px;
  line-height:1.1;
  letter-spacing:-.03em;
}

.brand span{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
}

.site-nav{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:4px;
}

.site-nav a{
  padding:10px 12px;
  border-radius:14px;
  text-decoration:none;
  color:var(--muted);
  font-size:14px;
  transition:background .18s ease,color .18s ease,transform .18s ease;
}

.site-nav a:hover,
.site-nav a.active{
  color:var(--text);
  background:rgba(127,127,127,.12);
  transform:translateX(2px);
}

.page{
  max-width:var(--max);
  margin:0 auto 0 calc(var(--sidebar) + 18px);
  padding:36px 20px 80px;
}

.hero{
  padding:42px;
  border:1px solid var(--line);
  border-radius:32px;
  background:linear-gradient(180deg, var(--panel-strong), var(--panel));
  box-shadow:var(--shadow);
}

.hero h1{
  margin:0;
  max-width:840px;
  font-size:62px;
  line-height:.95;
  letter-spacing:-.05em;
}

.hero p{
  max-width:860px;
  margin:18px 0 0;
  color:var(--muted);
  font-size:21px;
  line-height:1.75;
}

.hero-actions,
.pill-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:24px;
}

.pill{
  display:inline-flex;
  align-items:center;
  padding:10px 13px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(127,127,127,.08);
  font-size:13px;
  color:var(--muted);
}

.section{
  margin-top:72px;
}

.section-header{
  margin-bottom:20px;
}

.section-header h2{
  margin:0;
  font-size:42px;
  line-height:1;
  letter-spacing:-.04em;
}

.section-header p{
  max-width:820px;
  margin:12px 0 0;
  color:var(--muted);
  font-size:19px;
  line-height:1.8;
}

.card{
  padding:28px;
  border-radius:var(--radius);
  border:1px solid var(--line);
  background:linear-gradient(180deg, var(--panel-strong), var(--panel));
  box-shadow:var(--shadow);
}

.card + .card{
  margin-top:16px;
}

.card h3{
  margin:0 0 12px;
  font-size:28px;
  line-height:1.15;
}

.card h4{
  margin:0 0 10px;
  font-size:21px;
  line-height:1.2;
}

.card p,
.mini p,
.note p,
.list li{
  color:var(--muted);
  font-size:17px;
  line-height:1.82;
}

.card p:last-child{margin-bottom:0}

.grid-2,
.grid-3{
  display:grid;
  gap:16px;
}

.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}

.mini{
  padding:22px;
  border-radius:var(--radius-sm);
  border:1px solid var(--line);
  background:rgba(127,127,127,.06);
}

.mini h3,
.mini h4{
  margin:0 0 8px;
  font-size:20px;
  line-height:1.2;
}

.equation{
  margin:18px 0 22px;
  padding:22px;
  overflow:auto;
  border-radius:22px;
  border:1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(127,127,127,.08), rgba(127,127,127,.04));
}

.equation-label{
  margin:0 0 12px;
  color:var(--accent);
  font-size:12px;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
}

math{
  color:var(--text);
  font-size:1.28rem;
}

.equation-text{
  margin-top:14px;
  color:var(--muted);
  font-family:Consolas,"SFMono-Regular",monospace;
  font-size:14px;
  line-height:1.7;
  white-space:pre-wrap;
}

.quote{
  margin:20px 0 0;
  padding:18px 20px;
  border-left:3px solid var(--accent);
  border-radius:0 18px 18px 0;
  background:rgba(127,127,127,.07);
  color:var(--text);
  font-size:22px;
  line-height:1.65;
}

.list{
  margin:0;
  padding-left:20px;
}

.list li strong{color:var(--text)}

.callout{
  padding:18px 20px;
  border-radius:18px;
  border:1px solid var(--line);
  background:rgba(127,127,127,.08);
}

.callout strong{
  display:block;
  margin-bottom:8px;
  color:var(--text);
  font-size:15px;
}

.table{
  width:100%;
  border-collapse:collapse;
  overflow:hidden;
  border-radius:20px;
  border:1px solid var(--line);
}

.table th,
.table td{
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  text-align:left;
  vertical-align:top;
  font-size:15px;
  line-height:1.7;
}

.table th{
  color:var(--text);
  background:rgba(127,127,127,.08);
}

.table td{
  color:var(--muted);
}

.steps{
  display:grid;
  gap:14px;
}

.step{
  padding:18px 18px 18px 54px;
  position:relative;
  border-radius:18px;
  border:1px solid var(--line);
  background:rgba(127,127,127,.06);
}

.step-index{
  position:absolute;
  left:16px;
  top:18px;
  width:26px;
  height:26px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:rgba(127,127,127,.14);
  color:var(--accent);
  font-size:12px;
  font-weight:700;
}

.step strong{
  display:block;
  margin-bottom:6px;
  color:var(--text);
  font-size:15px;
}

.step span{
  color:var(--muted);
  font-size:14px;
  line-height:1.7;
}

.cta-grid{
  display:grid;
  gap:16px;
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.footer{
  margin-top:64px;
  padding-top:22px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:13px;
  line-height:1.7;
}

@media (max-width:980px){
  .site-header{
    position:sticky;
    left:auto;
    bottom:auto;
    width:auto;
    border-right:0;
    border-bottom:1px solid var(--line);
  }
  .header-inner{
    height:auto;
    max-width:var(--max);
    margin:0 auto;
    padding:16px 20px;
    flex-direction:row;
    flex-wrap:wrap;
    align-items:center;
    gap:18px;
  }
  .brand{
    min-width:200px;
    padding:0;
    border-bottom:0;
  }
  .site-nav{
    flex-direction:row;
    flex-wrap:wrap;
    order:3;
    width:100%;
    margin-left:0;
    margin-top:0;
    gap:8px;
  }
  .site-nav a{
    border-radius:999px;
  }
  .site-nav a:hover,
  .site-nav a.active{
    transform:translateY(-1px);
  }
  .page{
    margin:0 auto;
  }
  .hero h1{
    font-size:48px;
  }
  .grid-2,
  .grid-3,
  .cta-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:640px){
  .page{
    padding:24px 14px 64px;
  }
  .header-inner{
    padding:12px 14px;
  }
  .hero{
    padding:28px 22px;
  }
  .hero h1{
    font-size:38px;
  }
  .hero p,
  .section-header p{
    font-size:17px;
  }
  .card{
    padding:22px 18px;
  }
  math{
    font-size:1.05rem;
  }
}

@media print{
  :root{
    --bg:#fff;
    --bg-soft:#fff;
    --panel:#fff;
    --panel-strong:#fff;
    --text:#000;
    --muted:#333;
    --line:#ccc;
    --line-strong:#999;
  }
  body{background:#fff}
  .site-header,
  .site-nav{
    display:none;
  }
  .page{
    margin:0 auto;
  }
  a{
    color:inherit;
    text-decoration:none;
  }
}
