:root {
  --bg: #0E1116;
  --text: #F5F3EF;
  --muted: #9CA3AF;
  --glass: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.12);
  --amber: #F2A65A;
  --teal: #4FD1C5;
  --violet: #A78BFA;
  --sso-glow: rgba(79, 209, 197, 0.25);
  --local-glow: rgba(242, 166, 90, 0.2);
  --knowledge-glow: rgba(167, 139, 250, 0.2);
  --focus: #4FD1C5;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

.blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: drift 28s ease-in-out infinite alternate;
}

.blob-amber { width: 480px; height: 480px; background: var(--amber); top: -120px; right: -80px; }
.blob-teal { width: 420px; height: 420px; background: var(--teal); bottom: -100px; left: -60px; animation-delay: -8s; animation-duration: 32s; }
.blob-mix { width: 320px; height: 320px; background: linear-gradient(135deg, var(--amber), var(--teal)); top: 40%; left: 45%; opacity: 0.15; animation-delay: -14s; animation-duration: 36s; }

@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -30px) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.wrap-wide {
  max-width: 820px;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: center;
  margin-bottom: 2rem;
  padding: 0.75rem 1rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--teal);
}

.hero {
  text-align: center;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto;
}

.section { margin-bottom: 2.5rem; }

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.section-header h2 { font-size: 1.15rem; }

.badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid;
}

.badge-sso { color: var(--teal); border-color: rgba(79, 209, 197, 0.4); background: rgba(79, 209, 197, 0.1); }
.badge-local { color: var(--amber); border-color: rgba(242, 166, 90, 0.4); background: rgba(242, 166, 90, 0.1); }
.badge-knowledge { color: var(--violet); border-color: rgba(167, 139, 250, 0.4); background: rgba(167, 139, 250, 0.1); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card-sso { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 40px var(--sso-glow); }
.card-local { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 30px var(--local-glow); }
.card-knowledge { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 30px var(--knowledge-glow); }
.card:hover { border-color: rgba(255, 255, 255, 0.2); }

.card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.card p { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.25rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.btn-sso { background: rgba(79, 209, 197, 0.15); color: var(--teal); border-color: rgba(79, 209, 197, 0.35); }
.btn-sso:hover { background: rgba(79, 209, 197, 0.25); }

.btn-local { background: rgba(242, 166, 90, 0.12); color: var(--amber); border-color: rgba(242, 166, 90, 0.35); }
.btn-local:hover { background: rgba(242, 166, 90, 0.22); }

.btn-knowledge { background: rgba(167, 139, 250, 0.12); color: var(--violet); border-color: rgba(167, 139, 250, 0.35); }
.btn-knowledge:hover { background: rgba(167, 139, 250, 0.22); }

.btn-admin { background: rgba(255, 255, 255, 0.06); color: var(--text); border-color: var(--glass-border); font-size: 0.85rem; padding: 0.5rem 1rem; }
.btn-admin:hover { background: rgba(255, 255, 255, 0.1); }

.btn-admin-primary { background: rgba(79, 209, 197, 0.18); border-color: rgba(79, 209, 197, 0.45); color: var(--teal); }
.btn-admin-primary:hover { background: rgba(79, 209, 197, 0.28); }

.request-panel, .admin-panel {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.request-panel p, .admin-panel p { color: var(--muted); font-size: 0.9rem; }
.request-panel strong, .admin-panel strong { color: var(--text); }
.request-panel ul { margin: 1rem 0 0 1.25rem; color: var(--muted); font-size: 0.9rem; }

.admin-panel { border-color: rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.04); }

.admin-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--glass-border);
  width: 100%;
}

.admin-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }

.note {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--amber);
  background: rgba(242, 166, 90, 0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.85rem;
  color: var(--muted);
}

footer {
  text-align: center;
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.8rem;
}

/* Knowledge pages */
.knowledge-header {
  margin-bottom: 2rem;
}

.knowledge-header .back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.knowledge-header .back:hover { color: var(--teal); }

.knowledge-header h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
}

.knowledge-header .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.knowledge-header .tagline {
  color: var(--muted);
  font-size: 1rem;
  max-width: 640px;
}

.knowledge-block {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.knowledge-block h2 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.knowledge-block ul {
  margin-left: 1.25rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.knowledge-block li { margin-bottom: 0.45rem; }

.knowledge-block li strong { color: var(--text); font-weight: 500; }

.knowledge-block code {
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  color: var(--teal);
}

.knowledge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.knowledge-grid .card p { margin-bottom: 1rem; min-height: 2.8rem; }
