:root {
  color-scheme: dark;
  --space: #080b1b;
  --panel: rgba(25, 29, 47, .76);
  --field: rgba(255, 255, 255, .08);
  --text: #f7f7fb;
  --muted: #b4b8c9;
  --line: rgba(255, 255, 255, .17);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background: var(--space);
  font-family: "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
}

.background-video {
  position: fixed;
  inset: -1.5rem;
  width: calc(100% + 3rem);
  height: calc(100% + 3rem);
  object-fit: cover;
  filter: blur(8px) brightness(.48) saturate(.82);
  transform: scale(1.035);
}

.background-wash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 44%, transparent 8%, rgba(4, 6, 17, .2) 58%),
    linear-gradient(120deg, rgba(17, 10, 48, .22), rgba(3, 12, 28, .36));
}

main {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.card {
  width: min(100%, 23rem);
  padding: 2.35rem 2.15rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .48), inset 0 1px rgba(255, 255, 255, .04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.portal-main {
  place-items: start center;
  padding-block: clamp(2rem, 7vh, 5rem);
}

.portal {
  width: min(100%, 62rem);
  display: grid;
  gap: 1.5rem;
}

.download-card { margin-inline: auto; }

.guide-card {
  width: 100%;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background: rgba(21, 25, 42, .82);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .42), inset 0 1px rgba(255, 255, 255, .04);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.guide-header {
  padding-bottom: 1.35rem;
  border-bottom: 1px solid var(--line);
}

.guide-header .eyebrow { text-align: left; }

h2 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2rem);
  letter-spacing: -.035em;
}

.guide-copy {
  width: 100%;
  color: #d8dbe6;
  font-size: .96rem;
  line-height: 1.72;
}

.guide-copy > p { margin: 1.25rem 0; }

.guide-figure {
  width: fit-content;
  max-width: 100%;
  margin: 1.5rem 0;
  padding: .75rem;
  background: rgba(3, 6, 16, .52);
  border: 1px solid var(--line);
  border-radius: .9rem;
}

.guide-figure img {
  display: block;
  width: min(100%, 366px);
  height: auto;
  border-radius: .55rem;
}

.guide-figure figcaption {
  margin-top: .65rem;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.4;
}

.security-note {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  color: #e7e9f5;
  background: rgba(96, 107, 173, .16);
  border: 1px solid rgba(166, 177, 255, .2);
  border-left: 3px solid #a9b4ff;
  border-radius: .7rem;
}

.problems {
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.problem {
  margin-top: 1rem;
  padding: 1.1rem 1.2rem;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: .8rem;
}

.problem h3 { margin: 0 0 .45rem; font-size: 1rem; }
.problem p { margin: 0; color: var(--muted); }

.eyebrow {
  margin: 0 0 .7rem;
  color: #c9ccec;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-align: center;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  letter-spacing: -.04em;
}

.lede {
  margin: .55rem 0 1.8rem;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
  text-align: center;
}

label {
  display: block;
  margin: 1rem 0 .42rem;
  color: #e1e3ec;
  font-size: .78rem;
  font-weight: 700;
}

input {
  width: 100%;
  padding: .82rem .9rem;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: .7rem;
  font: inherit;
  outline: none;
  transition: border-color .14s ease, box-shadow .14s ease;
}

input:focus {
  border-color: rgba(210, 217, 255, .64);
  box-shadow: 0 0 0 3px rgba(128, 142, 255, .14);
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 1.25rem;
  padding: .82rem 1rem;
  color: #11131c;
  background: linear-gradient(100deg, #dce3ff, #fff);
  border: 0;
  border-radius: .7rem;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 .65rem 1.6rem rgba(0, 0, 0, .2);
  transition: transform .14s ease, filter .14s ease;
}

button:hover,
.button:hover { filter: brightness(1.08); transform: translateY(-1px); }

.error {
  margin: 0 0 1rem;
  padding: .7rem .8rem;
  color: #ffd8df;
  background: rgba(164, 44, 73, .28);
  border: 1px solid rgba(255, 143, 169, .22);
  border-radius: .65rem;
  font-size: .85rem;
}

.error:empty { display: none; }

.notice {
  margin: 0 0 1rem;
  padding: .7rem .8rem;
  color: #dfffe9;
  background: rgba(39, 137, 81, .24);
  border: 1px solid rgba(118, 229, 161, .2);
  border-radius: .65rem;
  font-size: .85rem;
}

.notice:empty { display: none; }

.registration-link,
.secondary-link {
  margin: 1.35rem 0 0;
  color: var(--muted);
  font-size: .84rem;
  text-align: center;
}

.registration-link a,
.secondary-link a {
  color: #e5e8ff;
  font-weight: 700;
  text-underline-offset: .2rem;
}

.code-input {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.form-hint {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.5;
}

.meta {
  margin-top: 1.6rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .85rem;
}

.logout { margin: 1rem 0 0; }
.logout button { width: auto; margin: 0; padding: 0; color: var(--muted); background: transparent; box-shadow: none; font-size: .85rem; text-decoration: underline; }

@media (max-width: 34rem) {
  main { padding: .9rem; }
  .card { padding: 2rem 1.45rem; border-radius: 1rem; }
  .portal-main { padding-block: 1rem; }
  .portal { gap: 1rem; }
  .guide-card { border-radius: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .background-video { display: none; }
  body {
    background:
      radial-gradient(circle at 12% 16%, #37227d, transparent 30rem),
      radial-gradient(circle at 88% 82%, #075779, transparent 30rem),
      var(--space);
  }
}
