:root{
  --bg:#070a12;
  --card:rgba(255,255,255,.05);
  --line:rgba(255,255,255,.14);
  --txt:rgba(255,255,255,.94);
  --muted:rgba(255,255,255,.72);
  --accent:#7c3aed;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial;
  color:var(--txt);
  background:
    radial-gradient(1000px 500px at 15% 8%, rgba(124,58,237,.24), transparent 62%),
    radial-gradient(900px 540px at 85% 0, rgba(34,197,94,.16), transparent 56%),
    var(--bg);
  line-height:1.55;
}
a{color:inherit}
.wrap{max-width:1040px;margin:0 auto;padding:24px 16px 56px}
header{
  border:1px solid var(--line);
  border-radius:18px;
  background:linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  padding:16px;
  position:relative;
}
.head-row{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:nowrap;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  flex:1 1 auto;
  max-width:calc(100% - 54px);
}
.brand img{
  width:40px;
  height:40px;
  border-radius:10px;
  background:rgba(255,255,255,.08);
  padding:4px;
}
.brand strong{display:block;font-size:16px}
.brand span{display:block;font-size:12px;color:var(--muted)}
.badge{
  border:1px solid var(--line);
  border-radius:999px;
  padding:8px 12px;
  font-size:12px;
  color:var(--muted);
  background:rgba(255,255,255,.04);
}
.head-note{
  display:block;
  margin-top:10px;
  font-size:12px;
  color:var(--muted);
}
.menu-toggle{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.menu-btn{
  display:inline-flex;
  width:42px;
  height:42px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(255,255,255,.04);
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:4px;
  cursor:pointer;
  user-select:none;
}
.menu-btn img{
  display:block;
  width:22px;
  height:22px;
}
.guide-nav{
  position:absolute;
  top:66px;
  right:16px;
  width:min(84vw, 340px);
  max-height:calc(100vh - 160px);
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  margin-top:0;
  padding:10px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(7,10,18,.97);
  box-shadow:0 14px 24px rgba(0,0,0,.35);
  display:none;
  flex-direction:column;
  gap:8px;
  z-index:40;
}
.guide-nav a{
  text-decoration:none;
  border:1px solid var(--line);
  border-radius:12px;
  padding:8px 10px;
  font-size:13px;
  color:var(--muted);
  background:rgba(255,255,255,.03);
  width:100%;
}
.menu-toggle:checked ~ .guide-nav{
  display:flex;
}
main{
  margin-top:16px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--card);
  padding:18px;
}
h1{margin:0 0 8px;font-size:30px;line-height:1.2}
h2{margin:20px 0 8px;font-size:20px}
p{margin:0 0 10px;color:var(--muted)}
ul{margin:0 0 10px 18px;color:var(--muted)}
.lead{font-size:16px;max-width:78ch}
.table-wrap{
  overflow:auto;
  border:1px solid var(--line);
  border-radius:12px;
}
table{
  width:100%;
  border-collapse:collapse;
  min-width:640px;
}
th,td{
  border-bottom:1px solid var(--line);
  text-align:left;
  padding:10px;
  font-size:14px;
  vertical-align:top;
}
th{background:rgba(255,255,255,.05)}
tr:last-child td{border-bottom:none}
.table-wrap.compact table{
  min-width:0;
  table-layout:fixed;
}
.table-wrap.compact th,
.table-wrap.compact td{
  font-size:12px;
  padding:8px;
  white-space:normal;
  word-break:break-word;
}
.grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.card{
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px;
  background:rgba(255,255,255,.03);
}
.cta{
  margin-top:16px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  border-radius:12px;
  border:1px solid rgba(124,58,237,.6);
  background:linear-gradient(180deg, rgba(124,58,237,.35), rgba(124,58,237,.18));
  padding:10px 14px;
  font-weight:700;
}
.btn.secondary{
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  color:var(--muted);
}
.small{font-size:12px;color:var(--muted)}
footer{
  margin-top:16px;
  border-top:1px solid var(--line);
  padding-top:14px;
  color:var(--muted);
  font-size:12px;
}
.tool{
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(255,255,255,.03);
  padding:12px;
  margin-top:12px;
}
.tool-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:flex-end;
}
.tool label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-bottom:4px;
}
.tool input,.tool select{
  border:1px solid var(--line);
  border-radius:10px;
  background:rgba(0,0,0,.25);
  color:var(--txt);
  padding:9px 10px;
  min-width:150px;
}
.tool button{
  border:1px solid rgba(124,58,237,.6);
  border-radius:10px;
  background:rgba(124,58,237,.25);
  color:var(--txt);
  padding:9px 12px;
  font-weight:700;
  cursor:pointer;
}
.result-pill{
  margin-top:10px;
  padding:10px 12px;
  border:1px solid rgba(34,197,94,.45);
  border-radius:999px;
  background:rgba(34,197,94,.10);
  color:#34d399;
  text-align:center;
  font-weight:800;
}
@media (max-width:980px){
  h1{font-size:26px}
  .grid{grid-template-columns:1fr}
  .tool-row > div{width:100%}
  .tool input,.tool select{width:100%;min-width:0}
  .tool button{width:100%}
  .head-row{
    align-items:center;
  }
  .badge{
    width:100%;
    border-radius:12px;
  }
}
