:root {
  --slate: #293c50;
  --bronze: #6b5d4f;
  --red: #f73c00;
  --white: #fff;
  --gainsboro: #dae1e4;
  --antique: #fce1d3;
  --steel: #adbec6;
  --ink: #14212c;
  --muted: #5f6d76;
  --hairline: #c9d2d6;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(218, 225, 228, 0.34) 1px, transparent 1px),
    linear-gradient(180deg, rgba(218, 225, 228, 0.34) 1px, transparent 1px),
    var(--white);
  background-size: 72px 72px;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

body.has-modal {
  overflow: hidden;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

input,
button {
  border-radius: 0;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--hairline);
  backdrop-filter: blur(14px);
}

.alaid-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--slate);
  text-decoration: none;
}

.logo-grid {
  display: grid;
  width: 38px;
  height: 38px;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  background: var(--white);
}

.logo-grid--hero {
  width: clamp(108px, 15vw, 168px);
  height: clamp(108px, 15vw, 168px);
  gap: 9px;
  margin-bottom: 28px;
}

.logo-cell {
  display: block;
}

.logo-cell--slate {
  background: var(--slate);
}

.logo-cell--bronze {
  background: var(--bronze);
}

.brand-wordmark strong {
  display: block;
  color: var(--slate);
  font-size: 14px;
  font-weight: 800;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: transparent;
  color: var(--slate);
  cursor: pointer;
  padding: 0 4px;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--red);
}

.nav-link--boxed {
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid var(--slate);
  background: var(--white);
}

.nav-link--boxed:hover,
.nav-link--boxed:focus-visible {
  border-color: var(--red);
}

.construction-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 118px 24px 64px;
}

.construction-hero {
  width: min(760px, 100%);
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--bronze);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 900;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  color: var(--slate);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(46px, 9vw, 98px);
  line-height: 0.95;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1;
}

.construction-copy {
  max-width: 560px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
}

.build-orbit {
  position: relative;
  display: inline-grid;
  width: 56px;
  height: 56px;
  place-items: center;
  margin: 2px auto 24px;
  border: 1px solid rgba(41, 60, 80, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 34px rgba(41, 60, 80, 0.08);
}

.build-orbit::before {
  content: "";
  width: 34px;
  height: 34px;
  border: 2px solid var(--gainsboro);
  border-top-color: var(--red);
  border-right-color: var(--bronze);
  border-radius: 50%;
  animation: orbit-spin 1.4s linear infinite;
}

.build-orbit::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--slate);
  transform: translateY(-27px);
  box-shadow: 0 0 0 5px rgba(41, 60, 80, 0.08);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal[hidden],
.modal:not(.is-open) {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

.modal.is-open {
  display: flex;
  visibility: visible;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 33, 44, 0.54);
}

.access-panel {
  position: relative;
  width: min(560px, 100%);
  min-height: 330px;
  padding: 34px;
  background: var(--white);
  border: 1px solid var(--hairline);
  box-shadow: 0 22px 80px rgba(20, 33, 44, 0.24);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--hairline);
  background: var(--white);
  color: var(--slate);
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 800;
}

.access-step {
  display: none !important;
}

.access-step.is-active {
  display: block !important;
}

.access-step p {
  color: var(--muted);
}

.google-button {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  border: 1px solid var(--slate);
  background: var(--white);
  color: var(--slate);
  cursor: pointer;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
}

.google-button:hover,
.google-button:focus-visible {
  border-color: var(--red);
  color: var(--red);
}

.google-button span {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  font-weight: 900;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 18px 0 0;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 900;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--hairline);
}

.access-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.access-form label,
.reset-form label {
  color: var(--slate);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 900;
}

.access-form input,
.reset-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--hairline);
  padding: 0 14px;
  color: var(--ink);
}

.access-form input:focus,
.reset-form input:focus {
  outline: 2px solid var(--steel);
  outline-offset: 2px;
}

.access-form button,
.reset-form button,
.logout-button {
  min-height: 46px;
  border: 1px solid var(--slate);
  background: var(--slate);
  color: var(--white);
  cursor: pointer;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
}

.reset-form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
}

.reset-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.reset-row button {
  padding: 0 14px;
  white-space: nowrap;
}

.auth-status {
  min-height: 20px;
  margin: 14px 0 0;
  font-size: 12px;
  font-weight: 800;
}

.auth-status[data-tone="warning"] {
  color: #8b5a00;
}

.auth-status[data-tone="error"] {
  color: #9d2200;
}

.auth-status[data-tone="success"] {
  color: #1d6f43;
}

.access-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.internal-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

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

.internal-card {
  display: grid;
  min-height: 132px;
  align-content: end;
  gap: 8px;
  border: 1px solid var(--hairline);
  padding: 18px;
  background: var(--white);
  color: var(--slate);
  text-align: left;
  text-decoration: none;
}

.internal-card:not(:disabled) {
  cursor: pointer;
}

.internal-card:not(:disabled):hover,
.internal-card:not(:disabled):focus-visible {
  border-color: var(--red);
  color: var(--red);
}

.internal-card:disabled {
  opacity: 0.56;
}

.internal-card span {
  font-size: 20px;
  font-weight: 900;
}

.internal-card small {
  color: var(--muted);
  font-size: 12px;
}

.logout-button {
  margin-top: 18px;
  padding: 0 18px;
}

.auth-callback-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-callback {
  width: min(560px, 100%);
  text-align: center;
}

.auth-callback .logo-grid {
  margin: 0 auto 22px;
}

.internal-page {
  min-height: 100vh;
  padding: 140px 24px 72px;
}

.internal-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--hairline);
}

.internal-shell h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(42px, 8vw, 82px);
}

.internal-shell p {
  max-width: 760px;
  color: var(--muted);
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}

.role-grid article {
  display: grid;
  gap: 10px;
  min-height: 138px;
  align-content: end;
  padding: 18px;
  border: 1px solid var(--hairline);
  background: var(--white);
}

.role-grid strong {
  color: var(--slate);
  font-size: 18px;
}

.role-grid span {
  color: var(--muted);
  font-size: 13px;
}

.security-reset {
  max-width: 680px;
}

@keyframes orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

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

@media (max-width: 620px) {
  .topbar {
    min-height: 70px;
    padding: 14px;
  }

  .topnav {
    gap: 8px;
  }

  .topnav .nav-link:first-child {
    display: none;
  }

  .nav-link {
    font-size: 11px;
  }

  .nav-link--boxed {
    padding: 0 12px;
  }

  .construction-page {
    padding-top: 102px;
  }

  .access-panel {
    padding: 28px 20px 22px;
  }

  .internal-menu {
    grid-template-columns: 1fr;
  }

  .reset-row {
    grid-template-columns: 1fr;
  }

  .role-grid {
    grid-template-columns: 1fr;
  }
}
