:root {
  --blue: #0236dc;
  --blue-deep: #0818f8;
  --panel: #132ba2;
  --lime: #6dfc22;
  --lime-soft: rgba(109, 252, 34, 0.8);
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.8);
  --font-sans: 'Geist', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100svh;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--blue-deep);
  -webkit-font-smoothing: antialiased;
}

.topography-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.login-root {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.tint-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(2, 54, 220, 0.18), rgba(2, 54, 220, 0.18));
}

.login-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 72rem;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: var(--panel);
  box-shadow: 0 24px 60px rgba(1, 20, 87, 0.32);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.corner-plus {
  pointer-events: none;
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 40px;
  height: 40px;
  opacity: 0.95;
}

.corner-plus::before,
.corner-plus::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--lime);
  box-shadow: 0 0 10px rgba(109, 252, 34, 0.38);
}

.corner-plus::before {
  width: 2px;
  height: 40px;
}

.corner-plus::after {
  width: 40px;
  height: 2px;
}

.login-grid {
  display: grid;
  align-items: center;
  gap: 3rem;
}

.hero {
  color: var(--text);
}

.hero-logo-wrap {
  margin-bottom: 3rem;
}

.hero-logo {
  display: block;
  width: min(100%, 20rem);
  height: auto;
  filter: brightness(0) invert(1);
}

.hero-title {
  max-width: 36rem;
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.hero-accent {
  font-style: italic;
  color: var(--lime);
}

.hero-copy {
  max-width: 32rem;
  margin: 2rem 0 0;
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.55;
  color: var(--text-muted);
}

.form-rail {
  width: 100%;
  max-width: 32rem;
  justify-self: center;
}

.login-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}

.topic-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-bottom: 0.5rem;
}

.topic-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: rgba(109, 252, 34, 0.8);
  border: 1px solid rgba(109, 252, 34, 0.4);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  text-transform: uppercase;
}

.form-title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-align: center;
  white-space: nowrap;
}

.ms-signin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ms-signin-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

.ms-signin-btn:active {
  transform: translateY(1px);
}

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

.ms-logo {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .login-root {
    padding: 2.5rem;
  }

  .login-panel {
    padding: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .login-grid {
    grid-template-columns: 1.12fr 0.88fr;
    gap: 3rem;
  }

  .form-rail {
    justify-self: end;
    padding-left: 1.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
  }

  .form-title {
    font-size: 2.25rem;
  }
}

@media (max-width: 1023px) {
  .corner-plus {
    width: 32px;
    height: 32px;
    top: 0.9rem;
    right: 0.9rem;
  }

  .corner-plus::before {
    width: 1.5px;
    height: 32px;
  }

  .corner-plus::after {
    width: 32px;
    height: 1.5px;
  }

  .form-title {
    white-space: normal;
  }
}
