
:root{
  --bg: #f6f7fb;
  --bg2: #ffffff;
  --text: #0b1220;
  --muted: #475569;
  --border: #dbe2ea;
  --navy: #0b1c3c;
  --accent: #10b981;
  --accent2: #0ea5e9;
  --amber: #f59e0b;
  --card: #ffffff;
  --shadow: 0 10px 28px rgba(2,6,23,.08);
  --radius: 16px;
  --max: 1240px;
}

[data-theme="dark"]{
  --bg: #0b0f17;
  --bg2: #101826;
  --text: #e5e7eb;
  --muted: #a9b4c4;
  --border: #223042;
  --card: #0f1725;
  --shadow: 0 14px 34px rgba(0,0,0,.45);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height:1.6;
}

a{color: var(--accent2); text-decoration:none}
a:hover{text-decoration:underline}

.container{
  max-width: var(--max);
  margin:0 auto;
  padding: 0 18px;
}

.header{
  position: sticky;
  top:0;
  z-index:50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding: 12px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width: 240px;
}

.brand img{height:34px}
.brand .tagline{
  display:none;
  font-size:12px;
  color: var(--muted);
}

.nav{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  align-items:center;
  justify-content:center;
}

.nav a{
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 12px;
}
.nav a:hover{
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  text-decoration:none;
}

.header-actions{
  display:flex;
  gap:10px;
  align-items:center;
}

.icon-btn{
  border:1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 10px;
  cursor:pointer;
  display:flex;
  gap:8px;
  align-items:center;
  box-shadow: 0 6px 16px rgba(2,6,23,.06);
}
.icon-btn:hover{transform: translateY(-1px)}
.icon{
  width:18px;height:18px;
}

.hero{
  padding: 30px 0 18px;
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:18px;
  align-items:stretch;
}
@media (max-width: 980px){
  .hero-grid{grid-template-columns:1fr}
  .brand{min-width: unset}
}
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.h1{
  font-size: clamp(28px, 3vw, 42px);
  line-height:1.15;
  margin: 0 0 10px;
}
.sub{
  color: var(--muted);
  margin:0 0 12px;
  font-size: 16px;
}
.pills{
  display:flex; flex-wrap:wrap; gap:8px; margin-top: 10px;
}
.pill{
  border:1px solid var(--border);
  background: color-mix(in srgb, var(--accent2) 8%, var(--bg2));
  color: var(--text);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.tile{
  grid-column: span 6;
  display:flex; gap:12px; align-items:flex-start;
}
@media (max-width: 980px){
  .tile{grid-column: span 12;}
}
.tile .tile-icon{
  width:36px; height:36px; border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--accent) 10%, var(--bg2));
  display:flex; align-items:center; justify-content:center;
}
.tile .tile-icon svg{width:18px;height:18px}
.tile h3{margin:0 0 4px; font-size: 16px}
.tile p{margin:0; color: var(--muted); font-size: 14px}

.content{
  padding: 10px 0 34px;
}
.content-wrap{
  display:grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
  align-items:start;
}
@media (max-width: 980px){
  .content-wrap{grid-template-columns:1fr;}
}

.prose h1{font-size: 30px; margin:0 0 10px}
.prose h2{margin: 18px 0 8px; font-size: 20px}
.prose h3{margin: 14px 0 6px; font-size: 16px}
.prose p{margin: 10px 0}
.prose ul{margin: 10px 0 10px 18px}
.callout{
  border-left: 4px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--bg2));
  padding: 12px 14px;
  border-radius: 12px;
  margin: 12px 0;
}
.small{font-size: 13px; color: var(--muted)}
.kv{
  display:flex; gap:10px; flex-wrap:wrap;
}
.kv .k{
  border:1px solid var(--border);
  background: var(--bg2);
  border-radius: 14px;
  padding: 10px 12px;
  flex: 1 1 140px;
}
.kv .k b{display:block; margin-bottom:4px}

.aside .card{position: sticky; top: 88px}
.aside a{display:block; padding:8px 0; color: var(--text)}
.aside a span{color: var(--muted); font-weight: 500; font-size: 13px}

.footer{
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--navy) 10%, var(--bg)) 0%, color-mix(in srgb, var(--navy) 18%, var(--bg)) 100%);
  padding: 22px 0;
}
.footer .links{
  display:flex; flex-wrap:wrap; gap: 12px 18px;
  margin-bottom: 10px;
}
.footer a{color: var(--text)}
.footer a:hover{color: var(--accent2); text-decoration:none}
.footer .fine{color: var(--muted); font-size: 12.5px}
