/*
  NCPQ MAIL — original interface composition for the project.
  Supplied logo and photography are kept as separate project assets and retain
  their own provenance/rights status.
*/
:root {
  --forest-950: #052d22;
  --forest-900: #073c2c;
  --forest-800: #0a5039;
  --forest-700: #0c6848;
  --forest-600: #13845b;
  --leaf: #a3d6b8;
  --cream: #f5f1e7;
  --paper: #fffdf7;
  --paper-strong: #ffffff;
  --ink: #10241c;
  --ink-soft: #53635c;
  --line: rgba(16, 59, 43, .17);
  --line-strong: rgba(16, 59, 43, .32);
  --red: #b4272b;
  --gold: #c8a85b;
  --shadow: 0 42px 110px rgba(2, 27, 19, .30);
  --ease: cubic-bezier(.2,.72,.2,1);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { background: var(--forest-950); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--paper);
  background: var(--forest-950);
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--forest-950);
}
.scene__image {
  position: absolute;
  inset: -2%;
  width: 104%;
  height: 104%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.015);
  transition: opacity 900ms var(--ease), transform 7s ease;
  will-change: opacity, transform;
}
.scene__image--night { opacity: 0; }
html[data-scene="night"] .scene__image--day { opacity: 0; }
html[data-scene="night"] .scene__image--night { opacity: 1; }
html[data-scene="night"] .scene__image { transform: scale(1.035); }

.scene__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 39, 28, .72) 0%, rgba(3, 39, 28, .42) 38%, rgba(3, 39, 28, .08) 65%, rgba(3, 39, 28, .24) 100%),
    linear-gradient(180deg, rgba(2, 30, 22, .16) 0%, rgba(2, 30, 22, .01) 46%, rgba(2, 30, 22, .48) 100%);
  transition: background 650ms var(--ease);
}
html[data-scene="night"] .scene__veil {
  background:
    linear-gradient(90deg, rgba(1, 12, 27, .76) 0%, rgba(3, 28, 31, .48) 40%, rgba(1, 14, 30, .08) 67%, rgba(1, 13, 28, .32) 100%),
    linear-gradient(180deg, rgba(1, 9, 22, .18) 0%, rgba(1, 9, 22, .01) 48%, rgba(1, 10, 23, .58) 100%);
}
.scene__grid {
  position: absolute;
  inset: 0;
  opacity: .12;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 78px 78px;
  mask-image: linear-gradient(90deg, #000 0, transparent 57%);
  -webkit-mask-image: linear-gradient(90deg, #000 0, transparent 57%);
}

.portal-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  width: min(1680px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 3vw, 48px) clamp(20px, 4vw, 72px) max(20px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
}

.masthead {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.identity {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
}
.identity__mark {
  width: 64px;
  height: 64px;
  padding: 5px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.94);
  box-shadow: 0 10px 30px rgba(0,0,0,.14);
  flex: 0 0 auto;
}
.identity__mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.identity__copy { display: grid; gap: 5px; min-width: 0; }
.identity__copy strong {
  font-size: clamp(15px, 1.15vw, 19px);
  line-height: 1.4;
  font-weight: 760;
  text-shadow: 0 2px 14px rgba(0,0,0,.24);
}
.identity__copy small {
  direction: ltr;
  text-align: right;
  letter-spacing: .17em;
  font-size: 9px;
  opacity: .70;
}
html[dir="ltr"] .identity__copy small { text-align: left; }

.masthead__tools { display: flex; align-items: center; gap: 10px; }
.scene-dial {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,.20);
  background: rgba(3, 39, 28, .26);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 999px;
}
.scene-dial__button {
  min-height: 36px;
  padding: 0 11px;
  border: 0;
  color: rgba(255,255,255,.72);
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  cursor: pointer;
  transition: .22s var(--ease);
  font-size: 12px;
}
.scene-dial__button.is-active {
  color: var(--forest-950);
  background: rgba(255,255,255,.94);
  box-shadow: 0 4px 18px rgba(0,0,0,.11);
}
.scene-dial__icon { font-size: 14px; }

.language {
  width: 88px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(3,39,28,.24);
  color: #fff;
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  cursor: pointer;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.language__current { font-weight: 800; font-size: 12px; }
.language__next { opacity: .58; font-size: 11px; }
.language__rule { width: 1px; height: 16px; background: rgba(255,255,255,.24); }

.stage {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 505px);
  align-items: center;
  gap: clamp(36px, 7vw, 112px);
  padding: clamp(18px, 3vh, 46px) 0;
}
.campus-story {
  align-self: end;
  max-width: 790px;
  padding-bottom: clamp(26px, 5vh, 70px);
}
.campus-story__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  color: rgba(255,255,255,.80);
}
.campus-story__line { width: 54px; height: 1px; background: var(--gold); }
.campus-story__title-wrap { position: relative; }
.campus-story__code {
  position: absolute;
  inset-inline-start: -2px;
  top: -30px;
  margin: 0;
  direction: ltr;
  font-size: 10px;
  letter-spacing: .28em;
  color: rgba(255,255,255,.50);
}
.campus-story h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(46px, 6vw, 92px);
  line-height: .98;
  letter-spacing: -.045em;
  font-weight: 820;
  text-shadow: 0 6px 34px rgba(0,0,0,.30);
}
.campus-story h1 > span { display: block; }
.campus-story__title-accent {
  color: #e7f4eb;
  margin-top: 7px;
  font-weight: 600;
}
.campus-story__summary {
  max-width: 650px;
  margin: 26px 0 0;
  color: rgba(255,255,255,.73);
  font-size: clamp(14px, 1.2vw, 18px);
  line-height: 1.9;
}
.campus-stamp {
  margin-top: 34px;
  width: min(100%, 390px);
  display: grid;
  grid-template-columns: 48px 1fr 30px;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,.25);
  border-bottom: 1px solid rgba(255,255,255,.15);
  padding: 12px 0;
}
.campus-stamp__index {
  direction: ltr;
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--gold);
}
.campus-stamp__copy { display: grid; gap: 2px; }
.campus-stamp__copy small { color: rgba(255,255,255,.58); font-size: 10px; }
.campus-stamp__copy strong { direction: ltr; text-align: right; font-size: 14px; letter-spacing: .03em; }
html[dir="ltr"] .campus-stamp__copy strong { text-align: left; }
.campus-stamp__arrow { direction: ltr; font-size: 19px; opacity: .76; }

.access-gate {
  position: relative;
  width: 100%;
  isolation: isolate;
}
.access-gate__rail { position: absolute; pointer-events: none; z-index: -1; }
.access-gate__rail--top {
  height: 1px;
  width: min(38vw, 590px);
  inset-inline-end: 80%;
  top: 72px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.76));
}
html[dir="ltr"] .access-gate__rail--top { background: linear-gradient(90deg, rgba(255,255,255,.76), transparent); }
.access-gate__rail--side {
  width: 1px;
  height: 110%;
  inset-inline-start: -18px;
  top: -5%;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.72) 20%, rgba(255,255,255,.22) 78%, transparent);
}
.access-gate__label {
  position: absolute;
  z-index: 2;
  inset-inline-start: -38px;
  bottom: 34px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  direction: ltr;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .32em;
  color: rgba(255,255,255,.56);
}

.login-card {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background: rgba(255,253,247,.965);
  border: 1px solid rgba(255,255,255,.78);
  box-shadow: var(--shadow);
  padding: clamp(28px, 3vw, 42px);
  clip-path: polygon(0 0, calc(100% - 38px) 0, 100% 38px, 100% 100%, 0 100%);
}
.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  width: 76px;
  height: 76px;
  background: linear-gradient(135deg, transparent 49.4%, rgba(10,80,57,.13) 50%, rgba(10,80,57,.13) 51%, transparent 51.4%);
  pointer-events: none;
}
.login-card::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  inset-inline-end: -110px;
  bottom: -105px;
  border: 1px solid rgba(10,80,57,.10);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(10,80,57,.035), 0 0 0 56px rgba(10,80,57,.02);
  pointer-events: none;
}
.login-card__topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.status-dot { display: inline-flex; align-items: center; gap: 9px; color: var(--forest-700); font-size: 10px; }
.status-dot span { width: 7px; height: 7px; border-radius: 50%; background: var(--forest-600); box-shadow: 0 0 0 4px rgba(19,132,91,.11); }
.status-dot b { font-weight: 750; }
.login-card__sequence { direction: ltr; font-size: 9px; letter-spacing: .19em; color: #87928d; }

.login-card__heading {
  display: grid;
  grid-template-columns: 60px 1fr;
  align-items: end;
  gap: 18px;
  padding: 30px 0 26px;
}
.login-card__number {
  direction: ltr;
  color: var(--forest-800);
  font-size: 44px;
  line-height: .9;
  font-weight: 300;
  letter-spacing: -.06em;
}
.login-card__heading p { margin: 0 0 5px; color: var(--ink-soft); font-size: 11px; }
.login-card__heading h2 { margin: 0; font-size: clamp(28px, 2.6vw, 38px); line-height: 1; letter-spacing: -.03em; }

.login-form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { color: #5a6962; font-size: 11px; font-weight: 700; }
.field__control {
  position: relative;
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.60);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.field__control:focus-within {
  border-color: var(--forest-700);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(12,104,72,.08);
}
.field__index {
  height: 100%;
  display: grid;
  place-items: center;
  border-inline-end: 1px solid var(--line);
  direction: ltr;
  color: var(--forest-700);
  font-size: 9px;
  font-weight: 900;
}
.field input {
  min-width: 0;
  width: 100%;
  height: 56px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 14px;
  direction: ltr;
  text-align: left;
  font-size: 14px;
}
.field input::placeholder { color: #9ba39f; }
.field__domain { direction: ltr; padding-inline-end: 13px; color: #a4aaa7; font-size: 8px; letter-spacing: .18em; }
.password-toggle {
  width: 46px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 0;
  border-inline-start: 1px solid var(--line);
  background: transparent;
  color: #6b7772;
  cursor: pointer;
}
.password-toggle svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.field__error { min-height: 0; margin: -2px 0 0; color: var(--red); font-size: 10px; line-height: 1.5; }
.field.is-invalid .field__control { border-color: rgba(180,39,43,.62); box-shadow: 0 0 0 4px rgba(180,39,43,.06); }

.login-form__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 1px 0 3px;
  font-size: 10px;
}
.remember { display: inline-flex; align-items: center; gap: 8px; color: #607069; cursor: pointer; }
.remember input { position: absolute; opacity: 0; pointer-events: none; }
.remember__box {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: #fff;
}
.remember input:checked + .remember__box { background: var(--forest-700); border-color: var(--forest-700); }
.remember input:checked + .remember__box::after { content: "✓"; color: #fff; font-size: 10px; line-height: 1; }
.remember input:focus-visible + .remember__box { outline: 3px solid rgba(12,104,72,.18); outline-offset: 2px; }
.text-link { color: var(--forest-700); font-weight: 760; text-decoration: none; border-bottom: 1px solid rgba(12,104,72,.24); padding-bottom: 2px; }
.text-link:hover { border-bottom-color: currentColor; }

.submit {
  min-height: 61px;
  border: 0;
  background: var(--forest-800);
  color: #fff;
  display: grid;
  grid-template-columns: 1fr 52px;
  align-items: stretch;
  padding: 0 0 0 18px;
  cursor: pointer;
  text-align: center;
  font-weight: 800;
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
  box-shadow: 0 14px 28px rgba(10,80,57,.18);
}
html[dir="ltr"] .submit { padding: 0 18px 0 0; }
.submit:hover { transform: translateY(-2px); background: var(--forest-700); box-shadow: 0 18px 34px rgba(10,80,57,.25); }
.submit:active { transform: translateY(0); }
.submit:focus-visible, .password-toggle:focus-visible, .language:focus-visible, .scene-dial__button:focus-visible { outline: 3px solid rgba(163,214,184,.75); outline-offset: 3px; }
.submit__arrow {
  direction: ltr;
  height: 100%;
  display: grid;
  place-items: center;
  border-inline-start: 1px solid rgba(255,255,255,.18);
  font-size: 18px;
}
.notice {
  display: none;
  padding: 11px 12px;
  border-inline-start: 3px solid var(--gold);
  background: #f6eed9;
  color: #6b5725;
  font-size: 10px;
  line-height: 1.7;
}
.notice.is-visible { display: block; }
.notice.is-error { border-inline-start-color: var(--red); background: #fbebeb; color: #812f31; }

.login-card__footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 20px auto;
  align-items: center;
  gap: 8px;
  color: #7a8580;
  font-size: 9px;
}
.login-card__footer > :last-child { direction: ltr; }
.login-card__footer-mark { height: 1px; background: var(--line-strong); }

.footbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.58);
  font-size: 9px;
}
.footbar__seal { display: inline-flex; align-items: center; gap: 8px; }
.footbar__pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 5px rgba(163,214,184,.08); }
.footbar__meta { display: inline-flex; align-items: center; gap: 9px; }
.footbar__slash { opacity: .35; }
.noscript { position: fixed; inset: auto 20px 20px; z-index: 30; padding: 12px 16px; background: #fff; color: #222; box-shadow: 0 10px 30px rgba(0,0,0,.2); }

@media (max-width: 1120px) {
  .stage { grid-template-columns: minmax(0, 1fr) minmax(390px, 455px); gap: 50px; }
  .campus-story h1 { font-size: clamp(44px, 6vw, 70px); }
  .access-gate__label { display: none; }
}

@media (max-width: 900px) {
  body { overflow: auto; }
  .portal-shell { min-height: 100svh; padding: 20px; gap: 28px; }
  .masthead { align-items: flex-start; }
  .identity__copy strong { max-width: 420px; }
  .stage { grid-template-columns: 1fr; gap: 26px; padding: 4px 0 0; }
  .campus-story { align-self: auto; padding-bottom: 0; max-width: 680px; }
  .campus-story h1 { max-width: 620px; }
  .campus-story__summary { max-width: 600px; }
  .campus-stamp { display: none; }
  .access-gate { width: min(100%, 540px); margin-inline-start: auto; }
  .access-gate__rail--top { display: none; }
  .access-gate__rail--side { inset-inline-start: -10px; }
  .login-card { box-shadow: 0 34px 80px rgba(2,27,19,.34); }
  .scene__veil {
    background: linear-gradient(180deg, rgba(3,39,28,.76), rgba(3,39,28,.38) 43%, rgba(3,39,28,.72));
  }
  html[data-scene="night"] .scene__veil {
    background: linear-gradient(180deg, rgba(1,12,27,.80), rgba(1,12,27,.42) 43%, rgba(1,12,27,.76));
  }
  .scene__grid { opacity: .18; mask-image: linear-gradient(180deg,#000,transparent 72%); -webkit-mask-image: linear-gradient(180deg,#000,transparent 72%); }
}

@media (max-width: 640px) {
  .portal-shell { padding: 16px 14px 14px; gap: 20px; }
  .identity { gap: 10px; }
  .identity__mark { width: 50px; height: 50px; }
  .identity__copy strong { font-size: 12px; max-width: 215px; }
  .identity__copy small { font-size: 7px; }
  .scene-dial { display: none; }
  .language { width: 70px; height: 40px; }
  .campus-story { padding: 18px 4px 2px; }
  .campus-story__eyebrow { margin-bottom: 16px; font-size: 10px; }
  .campus-story__line { width: 34px; }
  .campus-story__code { top: -23px; font-size: 8px; }
  .campus-story h1 { font-size: clamp(39px, 12vw, 56px); line-height: 1.02; }
  .campus-story__summary { margin-top: 16px; font-size: 12px; line-height: 1.75; max-width: 94%; }
  .access-gate { width: 100%; }
  .access-gate__rail--side { display: none; }
  .login-card { padding: 24px 18px; clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%); }
  .login-card__topline { padding-bottom: 14px; }
  .login-card__sequence { font-size: 7px; }
  .login-card__heading { grid-template-columns: 45px 1fr; gap: 12px; padding: 22px 0 20px; }
  .login-card__number { font-size: 35px; }
  .login-card__heading h2 { font-size: 28px; }
  .field__control { min-height: 54px; grid-template-columns: 31px 1fr auto; }
  .field input, .password-toggle { height: 52px; }
  .field__domain { display: none; }
  .login-form__meta { align-items: flex-start; gap: 12px; font-size: 9px; }
  .submit { min-height: 56px; }
  .login-card__footer { grid-template-columns: 1fr auto; }
  .login-card__footer-mark { display: none; }
  .footbar { padding: 12px 2px 0; font-size: 8px; }
  .footbar__seal span:last-child { display: none; }
}

@media (max-width: 390px) {
  .identity__copy strong { max-width: 175px; font-size: 10.5px; }
  .identity__copy small { letter-spacing: .12em; }
  .language { width: 62px; padding: 0 7px; gap: 5px; }
  .campus-story__summary { display: none; }
  .login-card { padding-inline: 15px; }
  .login-form__meta { flex-direction: column; }
}

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

/* ============================================================
   V3 — VIEWPORT / DIMENSION SYSTEM
   Tuned for laptop browsers first, then large desktop and mobile.
   Goal: one-screen desktop composition without accidental vertical scroll.
   ============================================================ */
html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  min-height: 100dvh;
}

.scene__image {
  inset: 0;
  width: 100%;
  height: 100%;
  transform: scale(1.008);
}
.scene__image--day { object-position: 50% 42%; }
.scene__image--night { object-position: 50% 50%; }
html[data-scene="night"] .scene__image { transform: scale(1.018); }

/* Keep the photography readable. Darkness is concentrated behind controls,
   not laid uniformly across the building. */
.scene__veil {
  background:
    linear-gradient(90deg, rgba(3, 39, 28, .58) 0%, rgba(3, 39, 28, .34) 31%, rgba(3, 39, 28, .08) 57%, rgba(3, 39, 28, .17) 100%),
    linear-gradient(180deg, rgba(2, 30, 22, .10) 0%, rgba(2, 30, 22, 0) 48%, rgba(2, 30, 22, .34) 100%);
}
html[data-scene="night"] .scene__veil {
  background:
    linear-gradient(90deg, rgba(1, 12, 27, .63) 0%, rgba(3, 28, 31, .36) 34%, rgba(1, 14, 30, .07) 61%, rgba(1, 13, 28, .22) 100%),
    linear-gradient(180deg, rgba(1, 9, 22, .12) 0%, rgba(1, 9, 22, 0) 49%, rgba(1, 10, 23, .42) 100%);
}

.portal-shell {
  width: min(1760px, 100%);
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding:
    clamp(14px, 2.25dvh, 30px)
    clamp(22px, 4vw, 68px)
    max(clamp(12px, 1.75dvh, 24px), env(safe-area-inset-bottom));
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(10px, 1.7dvh, 18px);
  overflow: hidden;
}

.masthead {
  min-height: clamp(50px, 7.5dvh, 66px);
}
.identity { gap: clamp(10px, 1.2vw, 15px); }
.identity__mark {
  width: clamp(50px, 6.8dvh, 62px);
  height: clamp(50px, 6.8dvh, 62px);
}
.identity__copy strong { font-size: clamp(14px, 1.05vw, 18px); }

.stage {
  min-height: 0;
  height: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 31.5vw);
  align-items: center;
  gap: clamp(34px, 6vw, 96px);
  padding: 0;
}

.campus-story {
  align-self: center;
  max-width: 720px;
  padding-bottom: 0;
  text-shadow: 0 3px 22px rgba(0,0,0,.30);
}
.campus-story__eyebrow {
  margin-bottom: clamp(14px, 2.4dvh, 22px);
  font-size: clamp(10px, .78vw, 12px);
}
.campus-story__code { top: -24px; }
.campus-story h1 {
  max-width: 700px;
  font-size: clamp(42px, 5.1vw, 78px);
  line-height: .99;
  letter-spacing: -.04em;
}
.campus-story__title-accent { margin-top: 4px; }
.campus-story__summary {
  max-width: 620px;
  margin: clamp(14px, 2.4dvh, 22px) 0 0;
  font-size: clamp(13px, 1vw, 16px);
  line-height: 1.78;
}
.campus-stamp {
  margin-top: clamp(16px, 2.8dvh, 28px);
  width: min(100%, 390px);
  padding: 9px 0;
}

.access-gate {
  width: 100%;
  max-width: 505px;
  justify-self: end;
}
.access-gate__rail--top { top: 52px; }
.access-gate__label { bottom: 26px; }

.login-card {
  width: 100%;
  padding: clamp(22px, 3.2dvh, 34px) clamp(24px, 2.5vw, 36px);
  clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 0 100%);
}
.login-card__topline { padding-bottom: clamp(12px, 1.8dvh, 17px); }
.login-card__heading {
  grid-template-columns: 52px 1fr;
  gap: 14px;
  padding: clamp(17px, 2.6dvh, 24px) 0 clamp(15px, 2.2dvh, 21px);
}
.login-card__number { font-size: clamp(36px, 5.4dvh, 43px); }
.login-card__heading p { margin-bottom: 4px; }
.login-card__heading h2 { font-size: clamp(28px, 2.15vw, 36px); }
.login-form { gap: clamp(12px, 1.85dvh, 16px); }
.field { gap: 6px; }
.field__control { min-height: clamp(50px, 6.5dvh, 56px); }
.field input {
  height: clamp(48px, 6.3dvh, 54px);
  font-size: 13px;
}
.password-toggle {
  height: clamp(48px, 6.3dvh, 54px);
}
.login-form__meta { margin: 0; }
.submit {
  min-height: clamp(52px, 6.7dvh, 58px);
}
.login-card__footer {
  margin-top: clamp(16px, 2.5dvh, 23px);
  padding-top: clamp(11px, 1.6dvh, 14px);
}

.footbar {
  min-height: 24px;
  padding-top: clamp(8px, 1.25dvh, 12px);
}

/* Browser-height pressure: common laptop viewport once Chrome's toolbar is open. */
@media (min-width: 901px) and (max-height: 760px) {
  .portal-shell {
    padding-top: 12px;
    padding-bottom: 10px;
    gap: 8px;
  }
  .masthead { min-height: 48px; }
  .identity__mark { width: 50px; height: 50px; }
  .identity__copy strong { font-size: 14px; }
  .scene-dial__button { min-height: 32px; padding-inline: 9px; }
  .language { height: 38px; }
  .stage { gap: clamp(30px, 5vw, 72px); }
  .campus-story h1 { font-size: clamp(40px, 4.55vw, 66px); }
  .campus-story__summary { margin-top: 12px; font-size: 13px; line-height: 1.62; }
  .campus-stamp { margin-top: 14px; padding: 7px 0; }
  .login-card { padding: 19px 30px; }
  .login-card__topline { padding-bottom: 11px; }
  .login-card__heading { padding: 14px 0 13px; }
  .login-card__number { font-size: 35px; }
  .login-card__heading h2 { font-size: 30px; }
  .login-form { gap: 10px; }
  .field { gap: 5px; }
  .field__control { min-height: 48px; }
  .field input, .password-toggle { height: 46px; }
  .submit { min-height: 50px; }
  .login-card__footer { margin-top: 13px; padding-top: 10px; }
  .footbar { min-height: 20px; padding-top: 7px; }
}

/* Extra-short desktop windows: preserve function and image, drop secondary copy. */
@media (min-width: 901px) and (max-height: 650px) {
  .campus-story__summary,
  .campus-stamp,
  .access-gate__label { display: none; }
  .campus-story h1 { font-size: clamp(38px, 4.25vw, 60px); }
  .login-card { padding-block: 16px; }
  .login-card__heading { padding: 11px 0; }
  .login-form { gap: 8px; }
  .login-card__footer { margin-top: 10px; padding-top: 8px; }
}

/* Tablet/mobile use natural document flow; desktop one-screen constraints are removed. */
@media (max-width: 900px) {
  body { min-height: 100dvh; overflow: auto; }
  .portal-shell {
    width: 100%;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }
  .stage { height: auto; }
  .access-gate { justify-self: auto; }
  .scene__image--day { object-position: 53% center; }
  .scene__image--night { object-position: 50% center; }
}

@media (max-width: 640px) {
  .portal-shell { padding-top: max(14px, env(safe-area-inset-top)); }
  .campus-story h1 { font-size: clamp(36px, 11vw, 52px); }
  .login-card { padding: 22px 18px; }
}

/* V3 mobile correction: the desktop two-column override must collapse again
   after the earlier responsive rules in the cascade. */
@media (max-width: 900px) {
  .masthead,
  .stage,
  .footbar { min-width: 0; width: 100%; }

  .stage {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 20px;
    padding: 4px 0 0;
  }

  .campus-story {
    width: 100%;
    max-width: 680px;
    align-self: auto;
  }

  .access-gate {
    width: min(100%, 540px);
    max-width: 540px;
    margin-inline-start: auto;
    margin-inline-end: 0;
  }
}

@media (max-width: 640px) {
  .stage { gap: 14px; }
  .campus-story { padding: 8px 4px 0; }
  .campus-story__eyebrow { margin-bottom: 12px; }
  .campus-story__summary,
  .campus-stamp { display: none; }
  .campus-story h1 {
    max-width: 100%;
    font-size: clamp(32px, 10.5vw, 44px);
    line-height: 1.02;
  }
  .campus-story__code { top: -18px; }
  .login-card { padding-block: 20px; }
  .login-card__heading { padding: 18px 0 17px; }
  .login-form { gap: 12px; }
  .login-card__footer { margin-top: 16px; }
}

/* V4 — real Webmail integration state */
.secure-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: rgba(5, 72, 52, .72);
  font-size: .72rem;
  white-space: nowrap;
}
.secure-link__dot {
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: #0d8b5f;
  box-shadow: 0 0 0 4px rgba(13, 139, 95, .10);
  flex: 0 0 auto;
}

/* Production submit state */
.submit:disabled {
  cursor: wait;
  opacity: .82;
}
