:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --ink: #f4f6f9;
  --ink-soft: #c9ced8;
  --muted: #8f98a8;
  --quiet: #697181;
  --panel: #10131a;
  --panel-raised: #151922;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.2);
  --accent: #a9c7ff;
  --accent-strong: #d8e6ff;
  --accent-ink: #0a1830;
  --danger: #ffaaa7;
  --success: #a5dab5;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #090b10;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 14% 8%, rgba(70, 108, 177, 0.14), transparent 30rem),
    #090b10;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(169, 199, 255, 0.38);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #090b10;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 140ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.access-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(390px, 0.92fr) minmax(510px, 1.08fr);
}

.context-panel,
.form-panel {
  min-width: 0;
  padding: clamp(34px, 5vw, 72px);
}

.context-panel {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(155deg, rgba(25, 31, 43, 0.94), rgba(10, 13, 19, 0.98)),
    #0c0f15;
}

.context-panel::before,
.context-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.context-panel::before {
  width: min(58vw, 760px);
  aspect-ratio: 1;
  right: -46%;
  bottom: -31%;
  border: 1px solid rgba(169, 199, 255, 0.13);
  border-radius: 50%;
  box-shadow:
    0 0 0 72px rgba(169, 199, 255, 0.025),
    0 0 0 144px rgba(169, 199, 255, 0.018);
}

.context-panel::after {
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent, black 38%, transparent 92%);
}

.brand-lockup,
.context-copy,
.assurance-list,
.context-footnote {
  position: relative;
  z-index: 1;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  position: relative;
  width: 30px;
  height: 30px;
  display: grid;
  grid-template-columns: repeat(2, 8px);
  grid-template-rows: repeat(2, 8px);
  place-content: center;
  gap: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.brand-mark span {
  display: block;
  border: 1px solid rgba(244, 246, 249, 0.72);
  border-radius: 2px;
}

.brand-word {
  color: #f0f2f6;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.27em;
}

.context-copy {
  width: min(100%, 610px);
  margin-top: auto;
  padding-top: 96px;
}

.eyebrow,
.card-kicker {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.18em;
  line-height: 1.3;
  text-transform: uppercase;
}

.context-copy h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(46px, 5.25vw, 78px);
  font-weight: 450;
  letter-spacing: -0.048em;
  line-height: 0.99;
}

.context-summary {
  max-width: 54ch;
  margin: 28px 0 0;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.65;
}

.assurance-list {
  width: min(100%, 610px);
  margin: 55px 0 0;
  padding: 25px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  list-style: none;
}

.assurance-list li {
  display: flex;
  align-items: baseline;
  gap: 11px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.assurance-list strong {
  color: var(--ink-soft);
  font-weight: 650;
}

.assurance-icon {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(165, 218, 181, 0.08);
}

.context-footnote {
  margin: auto 0 0;
  padding-top: 48px;
  color: var(--quiet);
  font-size: 11px;
  letter-spacing: 0.025em;
}

.form-panel {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  background:
    radial-gradient(circle at 78% 10%, rgba(87, 119, 179, 0.09), transparent 24rem),
    #090b10;
}

.access-card {
  width: min(100%, 470px);
  margin: 40px 0;
  padding: clamp(30px, 4vw, 46px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(17, 20, 27, 0.88);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(18px);
}

.card-heading h2,
.code-state h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 3.3vw, 40px);
  font-weight: 520;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.card-heading > p:last-child,
.code-state > p:not(.card-kicker):not(.form-message) {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

#access-form,
#code-form {
  margin-top: 31px;
}

.field-group {
  display: grid;
  gap: 9px;
}

.field-group label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.field-group input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(5, 7, 11, 0.58);
  padding: 0 15px;
  color: var(--ink);
  font-size: 16px;
  outline: none;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.field-group input:hover {
  border-color: rgba(255, 255, 255, 0.27);
}

.field-group input:focus {
  border-color: rgba(169, 199, 255, 0.72);
  background: rgba(7, 10, 16, 0.82);
  box-shadow: 0 0 0 4px rgba(169, 199, 255, 0.1);
}

.field-group input:disabled {
  cursor: wait;
  opacity: 0.62;
}

.field-help {
  margin: -1px 0 0;
  color: var(--quiet);
  font-size: 11px;
  line-height: 1.45;
}

.field-group .access-code-input {
  height: 60px;
  padding-right: 12px;
  padding-left: calc(12px + 0.36em);
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: 0.36em;
  text-align: center;
}

.button {
  width: 100%;
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 720;
  transition:
    transform 130ms ease,
    background 130ms ease,
    border-color 130ms ease,
    opacity 130ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.button[aria-busy="true"] {
  cursor: wait;
}

.button--primary {
  margin-top: 15px;
  background: var(--accent-strong);
  color: var(--accent-ink);
}

.button--primary:hover:not(:disabled) {
  background: #edf4ff;
}

.button--primary svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.button--secondary {
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--line-strong);
  color: var(--ink);
}

.button--secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.29);
}

.form-message {
  margin: 13px 0 0;
  color: var(--success);
  font-size: 12px;
  line-height: 1.5;
}

.form-message--error {
  color: var(--danger);
}

.staff-access {
  margin-top: 26px;
}

.staff-divider {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--quiet);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.staff-divider::before,
.staff-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.staff-access .button {
  margin-top: 14px;
}

.privacy-note {
  margin: 22px 0 0;
  color: var(--quiet);
  font-size: 10px;
  line-height: 1.55;
}

.session-check {
  min-height: 292px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
}

.session-check p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.status-orbit {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.status-orbit::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  top: 2px;
  left: 50%;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
  transform-origin: 50% 15px;
  animation: orbit 1.15s linear infinite;
}

@keyframes orbit {
  to {
    transform: translateX(-50%) rotate(360deg);
  }
}

.code-state {
  text-align: left;
}

.code-state strong {
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.code-context {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.code-actions {
  margin-top: 27px;
  display: grid;
  gap: 8px;
}

.text-button {
  min-height: 44px;
  border: 0;
  background: none;
  color: var(--muted);
  padding: 10px 12px;
  cursor: pointer;
  font-size: 12px;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.2);
  text-underline-offset: 4px;
}

.text-button:hover {
  color: var(--ink-soft);
}

.text-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.access-footer {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: #535b69;
  font-size: 10px;
}

.access-footer a {
  color: #747d8d;
  text-decoration: none;
}

.access-footer a:hover {
  color: var(--ink-soft);
}

.noscript-message {
  position: fixed;
  inset: auto 20px 20px;
  z-index: 100;
  max-width: 620px;
  margin: auto;
  border: 1px solid rgba(255, 170, 167, 0.3);
  border-radius: 10px;
  background: #28191c;
  padding: 14px 18px;
  color: #ffd5d3;
  font-size: 13px;
  text-align: center;
}

body[data-context="robotics"],
body[data-context="admin"] {
  --accent: #a7d1c3;
  --accent-strong: #d5eee6;
  --accent-ink: #09251d;
}

body[data-context="robotics"] .context-panel,
body[data-context="admin"] .context-panel {
  background:
    linear-gradient(155deg, rgba(19, 37, 36, 0.93), rgba(9, 14, 18, 0.99)),
    #0a1012;
}

body[data-context="robotics"] .context-panel::before,
body[data-context="admin"] .context-panel::before {
  border-color: rgba(167, 209, 195, 0.14);
  box-shadow:
    0 0 0 72px rgba(167, 209, 195, 0.025),
    0 0 0 144px rgba(167, 209, 195, 0.018);
}

@media (max-width: 920px) {
  .access-shell {
    grid-template-columns: 1fr;
  }

  .context-panel,
  .form-panel {
    min-height: auto;
  }

  .context-panel {
    padding-bottom: 42px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .context-copy {
    margin-top: 82px;
    padding-top: 0;
  }

  .context-copy h1 {
    max-width: 15ch;
    font-size: clamp(41px, 9.5vw, 66px);
  }

  .context-summary {
    margin-top: 22px;
  }

  .assurance-list {
    margin-top: 36px;
  }

  .context-footnote {
    display: none;
  }

  .form-panel {
    min-height: 630px;
    padding-top: 58px;
  }
}

@media (max-width: 560px) {
  .context-panel,
  .form-panel {
    padding: 26px 20px;
  }

  .context-panel {
    padding-bottom: 33px;
  }

  .context-copy {
    margin-top: 58px;
  }

  .context-copy h1 {
    font-size: clamp(39px, 13vw, 52px);
  }

  .context-summary {
    font-size: 15px;
    line-height: 1.55;
  }

  .assurance-list {
    display: none;
  }

  .form-panel {
    min-height: 610px;
    padding-top: 34px;
    padding-bottom: 24px;
  }

  .access-card {
    margin: 0 0 34px;
    padding: 29px 22px;
    border-radius: 16px;
  }

  .card-heading h2,
  .code-state h2 {
    font-size: 31px;
  }

  .field-group .access-code-input {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
