:root{
  --bg0:#0b0f22;
  --bg1:#141a34;
  --glass: rgba(18,22,42,0.78);
  --glass2: rgba(18,22,42,0.62);
  --stroke: rgba(255,255,255,0.10);
  --text: rgba(245,246,255,0.92);
  --muted: rgba(245,246,255,0.66);
  --primary:#6f63ff;
  --shadow: 0 18px 50px rgba(0,0,0,0.40);
}
*{ box-sizing: border-box; }
html, body{ min-height: 100%; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  line-height: 1.5;
  background:
    radial-gradient(1200px 900px at 25% 20%, rgba(143,87,255,0.45), transparent 60%),
    radial-gradient(1100px 800px at 80% 30%, rgba(0,210,255,0.30), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  padding: 16px;
}
.wrap{
  max-width: 980px;
  margin: 0 auto;
}
.topbar{
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: var(--glass2);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.brand{
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.brandLogo{
  width: 24px;
  height: 24px;
  border-radius: 7px;
  object-fit: cover;
  box-shadow: 0 0 14px rgba(143,87,255,0.38);
}
.nav{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a{
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  min-height: 36px;
  padding: 7px 11px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.nav a.active{
  border-color: rgba(111,99,255,0.75);
  background: rgba(111,99,255,0.18);
}
.nav a:focus-visible,
.linkCard:focus-visible,
.brand:focus-visible{
  outline: 3px solid rgba(197,190,255,0.70);
  outline-offset: 3px;
}
.card{
  margin-top: 14px;
  border: 1px solid var(--stroke);
  border-radius: 20px;
  background: var(--glass);
  box-shadow: var(--shadow);
  padding: 18px;
}
h1{
  margin: 0 0 6px;
  font-size: 32px;
  line-height: 1.1;
}
h2{
  margin: 18px 0 8px;
  font-size: 22px;
}
.meta{
  color: var(--muted);
  font-size: 14px;
}
p, li{
  color: var(--text);
}
.muted{
  color: var(--muted);
}
.alert{
  border: 1px solid rgba(255,196,87,0.55);
  background: rgba(255,196,87,0.10);
  border-radius: 14px;
  padding: 10px 12px;
  color: #ffe8ba;
}
ul{
  padding-left: 20px;
}
a{
  color: #c5beff;
}
.footer{
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}
.grid{
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.linkCard{
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 12px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255,255,255,0.04);
  display: block;
}
.linkCard strong{
  display: block;
  margin-bottom: 4px;
}
.tableWrap{
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.toolMatrix{
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}
.toolMatrix th,
.toolMatrix td{
  border-bottom: 1px solid var(--stroke);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.toolMatrix th{
  color: var(--text);
  background: rgba(111,99,255,0.18);
  font-size: 13px;
}
.toolMatrix td{
  color: var(--text);
  font-size: 14px;
}
.toolMatrix tr:last-child td{
  border-bottom: 0;
}
@media (max-width: 720px){
  body{ padding: 12px; }
  h1{ font-size: 27px; }
  h2{ font-size: 20px; }
  .card{
    border-radius: 16px;
    padding: 16px;
  }
  .topbar{
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }
  .nav{
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 2px 2px 6px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar{ display: none; }
  .nav a{
    min-height: 42px;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
}
