@font-face {
  font-family: "Nunito";
  src: url("/fonts/Nunito-Variable.ttf") format("truetype");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #2f2925;
  --muted: #746a63;
  --paper: #fbf8f3;
  --white: #ffffff;
  --line: #ded6cf;
  --yellow: #fbb915;
  --yellow-soft: #fff1bd;
  --orange: #ee6b33;
  --orange-deep: #b94032;
  --green: #22a97b;
  --green-deep: #0f7257;
  --focus: #145f4b;
}

* { box-sizing: border-box; }

html { min-width: 320px; min-height: 100%; background: var(--paper); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Nunito", sans-serif;
  text-rendering: optimizeLegibility;
}

button, input { font: inherit; }

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

.access-context {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(28px, 4vw, 58px) clamp(28px, 6vw, 86px) clamp(34px, 5vw, 72px);
  overflow: hidden;
  background: var(--yellow);
}

.access-context::after {
  content: "";
  position: absolute;
  right: -150px;
  bottom: -210px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(47, 41, 37, .18);
  border-radius: 50%;
}

.brand-lockup {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-window {
  display: grid;
  place-items: center;
  width: min(322px, 62%);
}

.brand-window img { display: block; width: 100%; height: auto; }

.brand-product {
  padding-left: 18px;
  border-left: 1px solid rgba(47, 41, 37, .42);
  font-size: clamp(12px, 1.2vw, 16px);
  font-weight: 900;
  line-height: 1.05;
}

.access-message {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: clamp(64px, 12vh, 140px) 0 48px;
}

.privacy-mark {
  width: 54px;
  height: 54px;
  margin-bottom: 28px;
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.access-message h1 {
  max-width: 580px;
  margin: 0;
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 950;
  letter-spacing: -.04em;
  line-height: .92;
  text-wrap: balance;
}

.access-message p {
  max-width: 54ch;
  margin: 28px 0 0;
  font-size: clamp(16px, 1.45vw, 20px);
  font-weight: 650;
  line-height: 1.5;
}

.lesson-score-echo {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  width: min(560px, 100%);
}

.lesson-score-echo > span {
  display: flex;
  gap: 5px;
  height: 8px;
}

.lesson-score-echo i {
  display: block;
  flex: 1;
  border-radius: 2px;
  background: rgba(255, 255, 255, .72);
}

.lesson-score-echo span:nth-child(1) i:nth-child(2),
.lesson-score-echo span:nth-child(2) i:nth-child(3),
.lesson-score-echo span:nth-child(3) i:nth-child(4) { background: var(--orange-deep); }

.access-panel {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: clamp(36px, 7vw, 104px);
  background: var(--paper);
}

.access-form { width: min(440px, 100%); }

.access-form h2 {
  margin: 0;
  font-size: clamp(29px, 3vw, 42px);
  font-weight: 950;
  letter-spacing: -.035em;
  line-height: 1.05;
  text-wrap: balance;
}

.access-form > div:first-child p {
  margin: 12px 0 34px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.access-error {
  margin: 0 0 22px;
  padding: 12px 14px;
  border: 1px solid rgba(185, 64, 50, .38);
  border-radius: 10px;
  color: #8f3027;
  background: #fff0e8;
  font-size: 14px;
  font-weight: 750;
}

.access-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 900;
}

.passcode-field { position: relative; }

.passcode-field input {
  width: 100%;
  min-height: 54px;
  padding: 13px 52px 13px 15px;
  border: 1px solid #bdb4ac;
  border-radius: 11px;
  outline: none;
  color: var(--ink);
  background: var(--white);
  font-size: 17px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.passcode-field input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(20, 95, 75, .14);
}

.reveal-passcode {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.reveal-passcode:hover { color: var(--green-deep); background: #edf6f2; }
.reveal-passcode svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.access-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  margin-top: 18px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  color: var(--white);
  background: var(--green-deep);
  box-shadow: 0 10px 24px rgba(15, 114, 87, .18);
  font-weight: 900;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.access-submit:hover { background: #0b654d; box-shadow: 0 12px 28px rgba(15, 114, 87, .24); transform: translateY(-1px); }
.access-submit:active { transform: translateY(0); }
.access-submit svg { width: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.reveal-passcode:focus-visible,
.access-submit:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.privacy-note {
  max-width: 48ch;
  margin: 18px 2px 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

[hidden] { display: none !important; }

@media (min-width: 861px) and (max-height: 760px) {
  .lesson-score-echo { display: none; }
}

@media (max-width: 860px) {
  .access-shell { grid-template-columns: 1fr; }
  .access-context { min-height: auto; padding: 20px 20px 22px; }
  .brand-window { width: min(210px, 61%); }
  .brand-lockup { gap: 12px; }
  .brand-product { padding-left: 12px; font-size: 11px; }
  .access-message { margin: 30px 0 10px; }
  .privacy-mark { width: 34px; height: 34px; margin-bottom: 12px; }
  .access-message h1 { max-width: 520px; font-size: clamp(38px, 11vw, 58px); }
  .access-message p { max-width: 46ch; margin-top: 13px; font-size: 14px; line-height: 1.42; }
  .lesson-score-echo { display: none; }
  .access-panel { min-height: auto; padding: 32px 20px 42px; }
  .access-form > div:first-child p { margin-bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
