@charset "UTF-8";
/* ==========================================================================
   Windows Server Manager — public shell (landing v2 + sign-in modal,
   forced password change). DESIGN-BRIEF.md §1-3, §6, §8.
   Dark ink ground, one accent (server = blue), system fonts, no external
   requests. Motion: transform/opacity keyframes only; everything static
   under prefers-reduced-motion.

   Contrast on --bg #0a0f1c (WCAG 2.1):
     --text 16.29 · --text-muted 7.81 · --accent 7.52
     #fff on --accent-strong #2563eb 5.17 (hover #2f6bef 4.70)
     input border #5d6e93 3.75
   ========================================================================== */

:root {
  --bg: #0a0f1c;
  --bg-2: #0f1629;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-ctl: #5d6e93;
  --text: #e8edf7;
  --text-muted: #9aa6bf;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  --accent: #60a5fa;
  --accent-strong: #2563eb;
  --accent-strong-hover: #1d4ed8;
  --on-accent: #ffffff;
  --accent-wash: rgba(96, 165, 250, 0.12);

  --ok: #4ade80;
  --ok-wash: rgba(74, 222, 128, 0.10);
  --warn: #fbbf24;
  --danger: #f87171;
  --danger-wash: rgba(248, 113, 113, 0.10);

  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(60rem 40rem at 100% 0%, rgba(96, 165, 250, 0.14), transparent 60%),
    radial-gradient(40rem 30rem at 0% 100%, rgba(37, 99, 235, 0.08), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: #93c5fd; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  padding: 10px 16px; border-radius: 10px;
  background: var(--accent-strong); color: var(--on-accent); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; color: var(--on-accent); }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }

/* Ambient glow that drifts slowly behind the hero. */
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.ambient::before, .ambient::after {
  content: ""; position: absolute; width: 46rem; height: 46rem; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(59, 130, 246, 0.16), transparent);
  top: -18rem; right: -12rem;
}
.ambient::after {
  width: 34rem; height: 34rem; top: auto; right: auto; bottom: -16rem; left: -10rem;
  background: radial-gradient(closest-side, rgba(56, 189, 248, 0.09), transparent);
}

/* -- Header ---------------------------------------------------------------- */
.site-head { padding-block: clamp(10px, 2vh, 20px); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand svg { flex: 0 0 auto; width: 36px; height: 36px; display: block; }
.brand__text { display: grid; line-height: 1.2; min-width: 0; }
.brand__name { font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; }
.brand__sub { font-size: 0.8125rem; color: var(--text-muted); }

/* -- Buttons --------------------------------------------------------------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px;
  border: 1px solid transparent; border-radius: 12px;
  font: inherit; font-weight: 600; font-size: 0.9375rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.btn--primary {
  background: var(--accent-strong); color: var(--on-accent);
  box-shadow: 0 8px 24px -10px rgba(37, 99, 235, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn--primary:hover {
  /* Brighter fill plus a stronger glow; #fff on #2f6bef is still 4.70:1. */
  background: #2f6bef; color: var(--on-accent);
  box-shadow: 0 10px 28px -8px rgba(59, 130, 246, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}
.btn--primary::after {
  /* Sheen that sweeps across on hover/focus. */
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: translateX(-160%) skewX(-18deg); pointer-events: none;
}
.btn--primary:active { background: var(--accent-strong-hover); transform: translateY(1px); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); border-color: rgba(255, 255, 255, 0.18); }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-busy { opacity: 0.7; cursor: progress; }

/* -- Stage: hero + feature row, centred between header and footer ---------- */
.stage { display: flex; align-items: center; padding-block: clamp(4px, 2vh, 28px); min-width: 0; }
.stage > .wrap { display: grid; gap: clamp(16px, 3.2vh, 36px); }

.hero { display: grid; gap: clamp(18px, 3vh, 40px) clamp(28px, 4vw, 64px); align-items: center; min-width: 0; }
@media (min-width: 1024px) {
  .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 clamp(10px, 1.8vh, 18px);
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  font-size: 0.8125rem; font-weight: 600; color: var(--text-muted);
}
.eyebrow__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.14); }

.hero h1 {
  margin: 0 0 clamp(10px, 1.8vh, 18px);
  font-size: clamp(1.75rem, 1.1rem + 2.6vw, 3.25rem);
  line-height: 1.08; letter-spacing: -0.025em; font-weight: 800;
  text-wrap: balance;
}
.grad {
  background: linear-gradient(90deg, #60a5fa, #93c5fd 45%, #38bdf8 70%, #60a5fa);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede {
  margin: 0 0 clamp(14px, 2.6vh, 26px); max-width: 52ch;
  font-size: clamp(0.9375rem, 0.88rem + 0.3vw, 1.0625rem); color: var(--text-muted);
}
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.cta__note { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--text-muted); }
.cta__note svg { width: 15px; height: 15px; color: var(--accent); }

.facts {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  margin: clamp(14px, 2.6vh, 26px) 0 0; padding: 0; list-style: none;
  font-size: 0.8125rem; color: var(--text-muted);
}
.facts li { display: inline-flex; align-items: center; gap: 7px; }
.facts svg { width: 15px; height: 15px; color: var(--ok); flex: 0 0 auto; }

/* -- Console mock (illustrative, "Demo") ---------------------------------- */
.console {
  position: relative; margin: 0; min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(17, 26, 46, 0.92), rgba(12, 18, 34, 0.92));
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(96, 165, 250, 0.06), 0 0 60px -20px rgba(59, 130, 246, 0.35);
}
.console__bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  font-size: 0.8125rem; color: var(--text-muted);
}
.console__dots { display: inline-flex; gap: 6px; }
.console__dots i { width: 10px; height: 10px; border-radius: 50%; background: #34426a; }
.console__dots i:first-child { background: #f87171; }
.console__dots i:nth-child(2) { background: #fbbf24; }
.console__dots i:nth-child(3) { background: #4ade80; }
.console__title { font-weight: 600; color: var(--text); }
.console__demo {
  margin-left: auto; padding: 1px 8px; border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.35); color: var(--accent); font-size: 0.75rem; font-weight: 700;
}
.console__body { display: grid; gap: 12px; padding: 14px; }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile {
  min-width: 0; padding: 10px 12px 8px;
  border: 1px solid var(--border); border-radius: 12px; background: rgba(255, 255, 255, 0.03);
}
.tile__head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tile__name { font-family: var(--mono); font-size: 0.8125rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile__os { margin-left: auto; font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.tile__metric { display: flex; align-items: baseline; justify-content: space-between; margin-top: 6px; font-size: 0.75rem; color: var(--text-muted); }
.tile__metric b { font-family: var(--mono); font-size: 0.9375rem; color: var(--text); font-weight: 600; }
.led { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: 0 0 auto; }
.led::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid currentColor; color: var(--ok); opacity: 0; }
.led--warn { background: var(--warn); }
.led--warn::after { color: var(--warn); }

.spark { position: relative; height: 34px; margin-top: 4px; overflow: hidden; }
.spark svg { position: absolute; left: 0; top: 0; width: 200%; height: 100%; display: block; }
.spark path { vector-effect: non-scaling-stroke; }
.spark .line { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; }
.spark .area { fill: rgba(96, 165, 250, 0.14); stroke: none; }
.spark--ram .line { stroke: #38bdf8; }
.spark--ram .area { fill: rgba(56, 189, 248, 0.12); }
.spark--warn .line { stroke: var(--warn); }
.spark--warn .area { fill: rgba(251, 191, 36, 0.12); }

.services { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.services__head {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 7px 12px; background: rgba(255, 255, 255, 0.03); border-bottom: 1px solid var(--border);
  font-size: 0.75rem; font-weight: 600; color: var(--text-muted);
}
.svc { display: flex; align-items: center; gap: 10px; padding: 7px 12px; font-size: 0.8125rem; }
.svc + .svc { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.svc__name { font-family: var(--mono); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc__state { position: relative; margin-left: auto; display: grid; justify-items: end; }
.svc__state > span { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 6px; padding: 1px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.st--start { color: var(--warn); background: rgba(251, 191, 36, 0.10); opacity: 0; }
.st--run { color: var(--ok); background: rgba(74, 222, 128, 0.10); }
.st--run::before, .st--start::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.toast {
  /* Hangs over the top edge, between the window title and the Demo badge,
     so it never covers tiles or service states. */
  position: absolute; top: -22px; left: 36%; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  max-width: 270px; padding: 10px 14px 10px 10px;
  border: 1px solid rgba(248, 113, 113, 0.35); border-radius: 12px;
  background: #1a1420; box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.9);
  font-size: 0.8125rem;
}
.toast__icon {
  display: grid; place-items: center; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 8px;
  background: rgba(248, 113, 113, 0.14); color: var(--danger);
}
.toast__icon svg { width: 16px; height: 16px; }
.toast b { display: block; font-weight: 700; color: var(--text); }
.toast span { color: var(--text-muted); font-size: 0.75rem; }

/* -- Feature row ------------------------------------------------------------ */
.features {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 16px);
  margin: 0; padding: 0; list-style: none;
}
.card {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px;
  padding: clamp(12px, 1.6vw, 16px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  min-width: 0;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.card:hover { transform: translateY(-2px); border-color: rgba(96, 165, 250, 0.35); background: rgba(96, 165, 250, 0.05); }
.card__icon {
  grid-row: span 2; display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(96, 165, 250, 0.12); color: var(--accent);
}
.card__icon svg { width: 20px; height: 20px; }
.card h2 { margin: 0; font-size: 0.9375rem; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
.card p { margin: 0; font-size: 0.8125rem; line-height: 1.4; color: var(--text-muted); }

/* -- Footer ---------------------------------------------------------------- */
.site-foot { padding-block: clamp(8px, 1.6vh, 18px); font-size: 0.8125rem; color: var(--text-muted); }
.site-foot__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; border-top: 1px solid var(--border); padding-top: clamp(8px, 1.6vh, 14px); }
.site-foot nav { display: flex; gap: 16px; }
.site-foot a { color: var(--text-muted); }
.site-foot a:hover { color: var(--text); }

/* ==========================================================================
   Motion (transform / opacity only)
   ========================================================================== */
@keyframes fade-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes drift-a { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-6rem, 4rem); } }
@keyframes drift-b { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(5rem, -3rem); } }
@keyframes led-ping { 0% { opacity: 0.7; transform: scale(0.6); } 70%, 100% { opacity: 0; transform: scale(1.5); } }
@keyframes spark-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes svc-start { 0%, 8% { opacity: 1; } 14%, 92% { opacity: 0; } 100% { opacity: 1; } }
@keyframes svc-run { 0%, 8% { opacity: 0; transform: scale(0.9); } 14%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes toast-cycle {
  0%, 18% { opacity: 0; transform: translateY(14px) scale(0.96); }
  24%, 70% { opacity: 1; transform: none; }
  76%, 100% { opacity: 0; transform: translateY(-6px); }
}
@keyframes sheen { to { transform: translateX(360%) skewX(-18deg); } }
@keyframes grad-shift { from { background-position: 0% 0; } to { background-position: 200% 0; } }

@media (prefers-reduced-motion: no-preference) {
  .fade { animation: fade-in 0.5s ease both; }
  .fade--2 { animation-delay: 0.08s; }
  .fade--3 { animation-delay: 0.16s; }
  .console { animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both; }
  .features .card { animation: fade-in 0.5s ease both; }
  .features .card:nth-child(2) { animation-delay: 0.06s; }
  .features .card:nth-child(3) { animation-delay: 0.12s; }
  .features .card:nth-child(4) { animation-delay: 0.18s; }
  .ambient::before { animation: drift-a 22s ease-in-out infinite; }
  .ambient::after { animation: drift-b 26s ease-in-out infinite; }
  .grad { animation: grad-shift 8s linear infinite; }
  .led::after { animation: led-ping 2s ease-out infinite; }
  .tile:nth-child(2) .led::after { animation-delay: 0.6s; }
  .tile:nth-child(3) .led::after { animation-delay: 1.2s; animation-duration: 1.2s; }
  .spark svg { animation: spark-scroll 9s linear infinite; }
  .tile:nth-child(2) .spark svg { animation-duration: 11s; }
  .tile:nth-child(3) .spark svg { animation-duration: 7s; }
  .st--start { animation: svc-start 7s ease infinite; }
  .st--run { animation: svc-run 7s ease infinite; }
  .svc:nth-child(3) .svc__state > span { animation-delay: 0.9s; }
  .svc:nth-child(4) .svc__state > span { animation-delay: 1.8s; }
  .toast { animation: toast-cycle 9s ease 1.2s infinite both; }
  .btn--primary:hover::after, .btn--primary:focus-visible::after { animation: sheen 0.8s ease; }
}

/* ==========================================================================
   Responsive — compact spacing, content stays
   ========================================================================== */
@media (max-width: 1023.98px) {
  .stage > .wrap { max-width: 760px; }
  .console { max-width: 640px; width: 100%; justify-self: center; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 601px) and (max-width: 1023.98px) {
  .hero { gap: 28px; }
  .eyebrow { margin-bottom: 10px; }
  .hero h1 { margin-bottom: 12px; }
  .lede { margin-bottom: 16px; }
  .facts { margin-top: 14px; }
  .console__bar { padding-block: 8px; }
  .console__body { padding: 10px; gap: 8px; }
  .tile { padding: 8px 10px 6px; }
  .spark { height: 24px; }
  .svc { padding-block: 5px; }
  .card { padding: 11px 14px; }
}
@media (min-width: 1024px) and (max-height: 800px) {
  .hero h1 { font-size: clamp(1.75rem, 1rem + 2.3vw, 2.9rem); }
  .console__body { gap: 10px; padding: 12px; }
  .spark { height: 28px; }
  .svc { padding-block: 6px; }
  .card { padding: 11px 14px; }
}
@media (min-width: 1024px) and (max-height: 740px) {
  .site-head { padding-block: 10px; }
  .eyebrow { margin-bottom: 10px; }
  .hero h1 { margin-bottom: 10px; font-size: clamp(1.7rem, 0.95rem + 2.2vw, 2.6rem); }
  .lede { margin-bottom: 16px; }
  .facts { margin-top: 14px; }
  .console__bar { padding-block: 8px; }
  .tile { padding: 8px 10px 6px; }
  .spark { height: 24px; }
  .svc { padding-block: 5px; }
  .card__icon { width: 34px; height: 34px; }
}

@media (max-width: 600px) {
  .site-head { padding-block: 6px; }
  .brand { gap: 10px; }
  .brand svg { width: 32px; height: 32px; }
  .brand__name { font-size: 0.875rem; white-space: nowrap; }
  .brand__sub { font-size: 0.78125rem; }
  .btn--head { min-height: 40px; padding: 8px 16px; }
  .stage { padding-block: 2px 6px; }
  .stage > .wrap { gap: 12px; }
  .hero { gap: 12px; }
  .eyebrow { margin-bottom: 8px; padding-block: 3px; font-size: 0.78125rem; }
  .hero h1 { margin-bottom: 8px; font-size: 1.625rem; }
  .lede { margin-bottom: 12px; font-size: 0.875rem; line-height: 1.45; }
  .cta { gap: 8px 14px; }
  .cta__note { font-size: 0.78125rem; }
  .facts { margin-top: 10px; gap: 4px 12px; font-size: 0.78125rem; }
  .facts svg { width: 13px; height: 13px; }
  /* Phone: the demo shows the three server tiles only (illustration, not
     information); the service list returns from 601px up. */
  .console { border-radius: 14px; }
  .console__bar { padding: 7px 10px; gap: 8px; }
  .console__dots i { width: 8px; height: 8px; }
  .console__body { padding: 8px; gap: 8px; }
  .services { display: none; }
  .tiles { gap: 6px; }
  .tile { padding: 6px 7px 4px; border-radius: 10px; }
  .tile__os { display: none; }
  .tile__name { font-size: 0.75rem; }
  .tile__metric { margin-top: 2px; }
  .tile__metric b { font-size: 0.8125rem; }
  .spark { height: 16px; margin-top: 2px; }
  .toast { left: auto; right: 6px; top: -14px; max-width: 220px; padding: 5px 10px 5px 6px; gap: 8px; }
  .toast__icon { width: 22px; height: 22px; }
  .features { gap: 8px; }
  .card { position: relative; display: block; padding: 8px 10px; border-radius: 12px; }
  .card__icon { position: absolute; top: 7px; right: 7px; width: 22px; height: 22px; border-radius: 7px; }
  .card__icon svg { width: 13px; height: 13px; }
  .card h2 { font-size: 0.8125rem; padding-right: 24px; white-space: nowrap; }
  .card p { margin-top: 3px; font-size: 0.78125rem; line-height: 1.35; }
  .site-foot { padding-block: 6px 8px; font-size: 0.78125rem; }
  .site-foot__bar { padding-top: 6px; }
}
@media (max-width: 600px) and (max-height: 700px) {
  .hero h1 { font-size: 1.5rem; }
  .stage > .wrap, .hero { gap: 8px; }
  .eyebrow { margin-bottom: 6px; }
  .facts { margin-top: 8px; }
  .lede { margin-bottom: 10px; }
}

/* ==========================================================================
   Sign-in / password change card
   ========================================================================== */
.auth-main { display: flex; align-items: center; padding-block: clamp(8px, 3vh, 40px); }
.auth-main .wrap { display: grid; place-items: center; }
.auth-card {
  width: min(420px, 100%);
  padding: clamp(20px, 4vw, 32px);
  background: rgba(15, 22, 41, 0.82);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.auth-card__icon {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px;
  border-radius: 12px; background: rgba(96, 165, 250, 0.12); color: var(--accent);
}
.auth-card__icon svg { width: 22px; height: 22px; }
.auth-card h1 { margin: 0 0 6px; font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.02em; font-weight: 800; }
.auth-card .sub { margin: 0 0 20px; font-size: 0.9375rem; color: var(--text-muted); }

.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 6px; font-size: 0.875rem; font-weight: 600; color: var(--text); }
.input {
  display: block; width: 100%; min-height: 44px;
  padding: 10px 12px;
  font: inherit; font-size: 1rem; color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-ctl);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.input::placeholder { color: #8592ad; }
.input:hover { border-color: #7a89ad; }
.input:focus, .input:focus-visible {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.35);
  background: rgba(255, 255, 255, 0.06);
}
.input--code { font-family: var(--mono); letter-spacing: 0.3em; text-align: center; font-size: 1.15rem; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 48px; }
.reveal {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 40px; height: 36px;
  border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); cursor: pointer;
}
.reveal:hover { color: var(--text); background: var(--surface-2); }
.reveal svg { width: 18px; height: 18px; }
.reveal .icon-hide { display: none; }
.reveal[aria-pressed="true"] .icon-show { display: none; }
.reveal[aria-pressed="true"] .icon-hide { display: block; }

.check { display: flex; align-items: center; gap: 10px; margin: 4px 0 20px; font-size: 0.875rem; color: var(--text); cursor: pointer; }
.check input {
  appearance: none; -webkit-appearance: none; flex: 0 0 auto;
  width: 18px; height: 18px; margin: 0;
  border: 1px solid var(--border-ctl); border-radius: 5px;
  background: rgba(255, 255, 255, 0.04) center / 12px no-repeat;
  cursor: pointer;
}
.check input:checked {
  background-color: var(--accent-strong); border-color: var(--accent-strong);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5 6.5 11.5 12.5 4.5'/%3E%3C/svg%3E");
}
.check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.hint { display: block; margin-top: 6px; font-size: 0.8125rem; color: var(--text-muted); }

.alert {
  display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: 16px; padding: 10px 12px;
  border: 1px solid; border-radius: var(--radius-sm);
  font-size: 0.875rem; color: var(--text);
}
.alert svg { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; }
.alert--error { background: var(--danger-wash); border-color: rgba(248, 113, 113, 0.45); }
.alert--error svg { color: var(--danger); }
.alert--ok { background: var(--ok-wash); border-color: rgba(74, 222, 128, 0.45); }
.alert--ok svg { color: var(--ok); }

.auth-meta {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border);
  font-size: 0.8125rem; color: var(--text-muted);
}
.auth-meta code { font-family: var(--mono); color: var(--text); font-size: 0.8125rem; }
.link-btn { display: block; margin-top: 10px; text-align: center; font-size: 0.875rem; }

@keyframes spin { to { transform: rotate(360deg); } }
.btn.is-busy::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: spin 0.7s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   Sign-in modal (landing). Open state is rendered server-side by
   pages/login.php; assets/js/landing.js opens/closes it in place.
   ========================================================================== */
.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  padding: 16px;
}
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(3, 6, 15, 0.72);
  cursor: default;
}
.modal__dialog {
  position: relative;
  width: min(420px, 100%);
  max-height: calc(100vh - 32px);
  max-height: calc(100svh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(20px, 4vw, 30px);
  background: #0f1629;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(96, 165, 250, 0.08);
}
@media (prefers-reduced-motion: no-preference) {
  .modal:not([hidden]) .modal__dialog { animation: fade-in 0.2s ease both; }
}
.modal__close {
  position: absolute; top: 12px; right: 12px;
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 10px; color: var(--text-muted);
}
.modal__close:hover { color: var(--text); background: var(--surface-2); }
.modal__close svg { width: 20px; height: 20px; }
.modal__title { margin: 0 0 6px; padding-right: 40px; font-size: 1.375rem; line-height: 1.2; letter-spacing: -0.02em; font-weight: 800; }
.modal__dialog .sub { margin: 0 0 18px; font-size: 0.9375rem; color: var(--text-muted); }
.modal__dialog .auth-card__icon { margin-bottom: 12px; }
@media (max-height: 700px) {
  .modal__dialog { padding: 18px 20px; }
  .modal__dialog .auth-card__icon { display: none; }
  .modal__dialog .sub { margin-bottom: 12px; font-size: 0.875rem; }
  .modal__dialog .field { margin-bottom: 10px; }
  .modal__dialog .check { margin: 2px 0 14px; }
}
/* The landing content sits in #pageRoot (made inert while the modal is open),
   so the header/hero/footer rows live on it rather than on <body>. */
#pageRoot {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
}
