:root{
  --bg: #0B1020;
  --card: rgba(255,255,255,.06);
  --cardBorder: rgba(255,255,255,.10);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);
  --link: rgba(167, 219, 255, .95);
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --radius: 18px;
}

*{ box-sizing: border-box; }
html, body { margin:0; padding:0; }
body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 700px at 20% 0%, rgba(123,97,255,.22), transparent 60%),
              radial-gradient(900px 500px at 80% 10%, rgba(167,219,255,.18), transparent 55%),
              var(--bg);
  line-height: 1.55;
}

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

.container{
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
}

.header{
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(11,16,32,.92), rgba(11,16,32,.72));
  border-bottom: 1px solid rgba(255,255,255,.08);
}

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

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
}
.brand__logo{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  font-weight: 800;
  letter-spacing: .5px;
  background: linear-gradient(135deg, rgba(123,97,255,.95), rgba(167,219,255,.85));
  color: rgba(10,10,20,.95);
  box-shadow: var(--shadow);
}
.brand__name{ font-weight: 800; font-size: 16px; }
.brand__subtitle{ color: var(--muted); font-size: 13px; margin-top: 2px; }

.env{
  display:flex;
  align-items:center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav{
  display:flex;
  gap: 14px;
  padding: 10px 0 14px;
  overflow-x: auto;
}
.nav a{
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  white-space: nowrap;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  font-size: 12px;
}
.badge--soft{
  background: rgba(255,255,255,.03);
}
.badge--dev{
  border-color: rgba(255, 193, 7, .35);
  background: rgba(255, 193, 7, .12);
}
.badge--prod{
  border-color: rgba(76, 175, 80, .35);
  background: rgba(76, 175, 80, .12);
}
#envBadge { min-width: 110px; justify-content: center; }

.main{
  padding: 18px 0 32px;
}

.card{
  padding: 18px 18px;
  margin: 14px 0;
  border-radius: var(--radius);
  border: 1px solid var(--cardBorder);
  background: var(--card);
  box-shadow: 0 18px 40px rgba(0,0,0,.25);
}

h1{ margin: 0 0 8px; font-size: 24px; }
h2{ margin: 18px 0 10px; font-size: 18px; }

.muted{ color: var(--muted); }

/* NEW: make the legal text readable */
.legal{
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255,255,255,.90);
}

.footer{
  padding: 14px 0 6px;
  text-align: center;
}

@media (max-width: 720px){
  .header__inner{ flex-direction: column; align-items: flex-start; }
  .env{ justify-content: flex-start; }
}

/* Fix: anchor links hidden behind sticky header */
html { scroll-behavior: smooth; }

/* Adjust this value if you change header height */
:root { --stickyHeaderOffset: 150px; }

section[id] { scroll-margin-top: var(--stickyHeaderOffset); }
