:root {
  color-scheme: light;
  --ink: #111b29;
  --navy: #0d2033;
  --blue: #134f7c;
  --paper: #f7f4ee;
  --line: #d7d1c6;
  --muted: #68717c;
  --amber: #a9680b;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: grid;
  grid-template-rows: auto 1fr;
}

button, code, input { font: inherit; }

.topbar {
  height: 72px;
  padding: 0 clamp(20px, 3vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--navy);
  color: #fff;
  border-bottom: 3px solid #183c5d;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
  font-size: 22px;
  font-weight: 760;
  letter-spacing: -.025em;
}

.brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1px solid #aab8c7;
}

.brand-mark::before,
.brand-mark::after,
.brand-mark i::before,
.brand-mark i::after {
  content: "";
  position: absolute;
  background: #aab8c7;
}

.brand-mark::before { width: 18px; height: 1px; left: 7px; top: 16px; }
.brand-mark::after { width: 1px; height: 18px; left: 16px; top: 7px; }
.brand-mark i::before { inset: 9px; border: 1px solid #aab8c7; background: transparent; border-radius: 50%; }
.brand-mark i::after { width: 3px; height: 3px; border-radius: 50%; left: 15px; top: 15px; background: #fff; }

.secure-label { color: #dce4eb; font-size: 14px; }
.secure-label span { color: #78bd71; margin-right: 7px; }

.access-stage {
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
  position: relative;
  padding: 56px 20px;
  background-image:
    linear-gradient(rgba(17,27,41,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17,27,41,.035) 1px, transparent 1px);
  background-size: 64px 64px;
}

.coord { position: absolute; color: #9b958b; font: 12px ui-monospace, monospace; }
.coord::after { content: "+"; display: block; font-size: 32px; font-weight: 200; line-height: .7; }
.coord-a { left: 4vw; top: 9%; }
.coord-b { right: 4vw; bottom: 9%; }

.access-panel {
  width: min(780px, 100%);
  background: #fbfaf7;
  border: 1px solid #c9c3b8;
  box-shadow: 0 18px 55px rgba(32, 39, 48, .08);
}

.panel-main { padding: 48px 54px; text-align: center; }
.shield { font-size: 30px; color: var(--navy); margin-bottom: 8px; }
h1 { margin: 0; font-size: clamp(34px, 5vw, 47px); letter-spacing: -.045em; }

#requestAccess {
  display: block;
  margin: 46px auto 0;
  min-width: 280px;
  border: 1px solid #0b3c61;
  background: var(--blue);
  color: #fff;
  padding: 13px 24px;
  font-weight: 760;
  cursor: pointer;
}

#requestAccess:hover { background: #0e4065; }
#requestAccess:focus-visible { outline: 3px solid #e6a641; outline-offset: 3px; }
#requestAccess:disabled { opacity: .6; cursor: wait; }

.access-dialog {
  width: min(460px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid #bfc7ce;
  border-radius: 2px;
  background: #fbfaf7;
  color: var(--ink);
  box-shadow: 0 24px 75px rgba(13, 32, 51, .24);
}

.access-dialog::backdrop { background: rgba(13, 32, 51, .58); }
.access-dialog form { padding: 30px; }
.dialog-mark { margin-bottom: 7px; color: var(--blue); font-size: 25px; }
.access-dialog h2 { margin: 0; font-size: 25px; letter-spacing: -.025em; }
.access-dialog p { margin: 8px 0 24px; color: var(--muted); line-height: 1.5; }
.access-dialog label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 750; }
.access-dialog input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #aeb9c2;
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
}
.access-dialog input:focus { outline: 3px solid rgba(19, 79, 124, .18); border-color: var(--blue); }
.dialog-error { margin-top: 9px; color: #9c2f2f; font-size: 13px; }
.dialog-error[hidden] { display: none; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 9px; margin-top: 24px; }
.dialog-actions button {
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid #0b3c61;
  border-radius: 2px;
  background: var(--blue);
  color: #fff;
  font-weight: 750;
  cursor: pointer;
}
.dialog-actions button.secondary { border-color: #aeb9c2; background: #f3f5f6; color: #263b4c; }
.dialog-actions button:hover { background: #0e4065; }
.dialog-actions button.secondary:hover { background: #e8ecef; }
.dialog-actions button:disabled { opacity: .6; cursor: wait; }
.dialog-actions button:focus-visible { outline: 3px solid #e6a641; outline-offset: 2px; }

.request-state {
  margin: 20px auto 0;
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: #4b5560;
}
.request-state[hidden] { display: none; }
.request-state strong, .request-state span { display: block; }
.request-state span { font-size: 13px; margin-top: 2px; }
.request-state code { color: var(--blue); font-weight: 800; letter-spacing: .08em; }
.spinner { width: 22px; height: 22px; border: 2px solid #b9c2cb; border-top-color: var(--blue); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 680px) {
  .topbar { height: 62px; }
  .secure-label { font-size: 0; }
  .secure-label span { font-size: 18px; }
  .access-stage { padding: 24px 12px; min-height: 0; }
  .panel-main { padding: 35px 22px 28px; }
  #requestAccess { min-width: 0; width: 100%; margin-top: 36px; }
  .access-dialog form { padding: 24px 20px; }
  .dialog-actions { grid-template-columns: 1fr; }
  .dialog-actions button[type="submit"] { grid-row: 1; }
}

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