/*
 * Revision · Preview sign-in page, in the Mission Control Refined language
 * (tokens copied from src/concepts/refined/style.css). Self-hosted OFL fonts,
 * no inline styles or scripts (the server's CSP forbids both).
 */
@font-face {
  font-family: 'Unbounded Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url('fonts/unbounded-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Manrope Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('fonts/manrope-latin-wght-normal.woff2') format('woff2-variations');
}

:root {
  --bg0: #060a10;
  --bg1: #0a1019;
  --bg2: #0f1824;
  --surface: rgba(17, 27, 41, 0.72);
  --line: rgba(160, 200, 240, 0.12);
  --line-2: rgba(160, 200, 240, 0.22);
  --line-3: rgba(160, 200, 240, 0.38);
  --text: #e8eef6;
  --text-2: #b6c2d1;
  --text-3: #8b98ab;
  --ice: #a9dcff;
  --cyan: #62d8e8;
  --accent: #7fc8ff;
  --accent-ink: #04121f;
  --fault: #ff7a6b;
  --f-display: 'Unbounded Variable', 'Space Grotesk', system-ui, sans-serif;
  --f-text: 'Manrope Variable', system-ui, sans-serif;
  --f-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --radius: 10px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, rgba(98, 216, 232, 0.07), transparent 70%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
  color: var(--text);
  font: 400 15px/1.55 var(--f-text);
  -webkit-font-smoothing: antialiased;
}

/* Fine technical grid behind the panel. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center center;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 45%, #000 20%, transparent 75%);
}

.gate {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 32px 20px;
}

.panel {
  position: relative;
  width: min(100%, 400px);
  padding: 34px 32px 30px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow:
    0 0 0 1px rgba(6, 10, 16, 0.6),
    0 24px 60px -24px rgba(0, 0, 0, 0.7);
}

/* Instrument corner ticks. */
.tick {
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--ice);
  border-style: solid;
  border-width: 0;
  opacity: 0.7;
}
.tl { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; }
.tr { top: -1px; right: -1px; border-top-width: 1px; border-right-width: 1px; }
.bl { bottom: -1px; left: -1px; border-bottom-width: 1px; border-left-width: 1px; }
.br { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
  color: var(--ice);
}
.mark {
  flex: none;
}
.brand h1 {
  margin: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  font: 500 16px/1.2 var(--f-display);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.word {
  color: var(--text);
}
.dot {
  color: var(--cyan);
  letter-spacing: 0;
}
.sub {
  color: var(--ice);
  font-weight: 300;
}

.label {
  margin: 0 0 14px;
  font: 500 11px/1 var(--f-display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}
.note {
  margin: 0 0 18px;
  color: var(--text-2);
}

.error {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 122, 107, 0.4);
  border-left-width: 2px;
  border-radius: 6px;
  background: rgba(255, 122, 107, 0.08);
  color: #ffc4bb;
  font-size: 14px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.form label {
  font: 500 12px/1 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}
.form input[type='password'] {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: rgba(6, 10, 16, 0.65);
  color: var(--text);
  font: 500 15px/1.2 var(--f-mono);
  letter-spacing: 0.04em;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form input[type='password']:hover {
  border-color: var(--line-3);
}
.form input[type='password']:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(127, 200, 255, 0.18);
}
.form button {
  margin-top: 8px;
  padding: 11px 16px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 14px/1 var(--f-text);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.form button:hover {
  background: var(--ice);
}
.form button:focus-visible,
.cancel:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 3px;
}
.cancel {
  align-self: center;
  margin-top: 4px;
  color: var(--ice);
  font-size: 14px;
  text-decoration: none;
}
.cancel:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.foot {
  margin: 0;
  font: 500 11px/1 var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

@media (max-width: 420px) {
  .panel {
    padding: 28px 22px 24px;
  }
  .brand h1 {
    font-size: 14px;
    letter-spacing: 0.18em;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
