:root {
  --navy: var(--ef-oxford-blue, #002147);
  --navy-soft: #173f76;
  --teal: var(--ef-forum-teal, #0B8FA1);
  --teal-dark: var(--ef-forum-teal-dark, #087487);
  --text-soft: #687fa1;
  --line: var(--ef-forum-border, #D8E3EE);
  --surface: rgba(255,255,255,.95);
  --page: var(--ef-forum-page, #EDF3F6);
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: #eef2f5;
  color: var(--navy);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

.page-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(100%, 480px);
  height: 100vh;
  height: 100svh;
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 5%, rgba(218,239,246,.40), transparent 28%),
    linear-gradient(180deg, #fff 0%, var(--page) 100%);
  padding: max(12px, env(safe-area-inset-top)) 16px max(10px, env(safe-area-inset-bottom));
}

.hero {
  position: relative;
  min-height: 0;
  height: 183px;
  padding: 1px 3px 8px;
  isolation: isolate;
}

.skyline {
  position: absolute;
  z-index: -1;
  width: 112%;
  max-width: none;
  right: -27%;
  bottom: -2px;
  opacity: .72;
  pointer-events: none;
  user-select: none;
}

.brand-block {
  position: relative;
  z-index: 1;
}

.brand-name {
  margin-bottom: 1px;
  font-size: clamp(14px, 4vw, 18px);
  font-weight: 450;
  letter-spacing: -.02em;
}

h1 {
  margin: 0;
  font-size: clamp(48px, 14vw, 64px);
  line-height: .91;
  letter-spacing: -.055em;
  font-weight: 760;
}

.tagline {
  margin-top: 2px;
  font-size: clamp(17px, 4.8vw, 22px);
  line-height: 1.08;
  letter-spacing: .03em;
}

.accent-line {
  width: 32px;
  height: 2px;
  margin: 10px 0 9px;
  background: #69b8c8;
  border-radius: 999px;
}

.forum-title {
  max-width: 96%;
  color: #0c647b;
  font-size: clamp(16px, 4.3vw, 20px);
  line-height: 1.12;
  font-weight: 720;
  letter-spacing: -.02em;
}

.forum-theme {
  margin-top: 2px;
  color: #6f83a4;
  font-size: clamp(15px, 4.1vw, 19px);
  line-height: 1.12;
  font-weight: 430;
}

.login-card {
  position: relative;
  min-height: 0;
  margin-top: 0;
  padding: 14px 14px 12px;
  border: 1px solid rgba(228,234,241,.86);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(17, 50, 86, .07);
  text-align: center;
  backdrop-filter: blur(4px);
  overflow: hidden;
}

.eva-avatar {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 7px;
  object-fit: contain;
}

h2 {
  margin: 0;
  font-size: clamp(26px, 7.4vw, 33px);
  line-height: 1;
  letter-spacing: -.04em;
  font-weight: 760;
}

.intro {
  margin: 5px 0 11px;
  color: var(--text-soft);
  font-size: clamp(14px, 3.9vw, 18px);
  line-height: 1.15;
}

.login-form {
  display: grid;
  gap: 8px;
}

.field {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 13px;
  border: 1.3px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.79);
}

.field-icon,
.support-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.field-icon {
  width: 24px;
  height: 24px;
  margin-right: 10px;
  color: #758aa9;
}

.field-icon svg,
.support-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--navy);
  font-size: clamp(16px, 4.3vw, 20px);
}

.field input::placeholder { color: #8093b0; opacity: 1; }

.primary-button,
.support-button {
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
}

.primary-button {
  margin-top: 3px;
  border: 0;
  background: linear-gradient(90deg, #1598a4 0%, #168b97 100%);
  color: #fff;
  font-size: clamp(18px, 4.8vw, 22px);
  font-weight: 720;
  box-shadow: 0 6px 14px rgba(19,144,154,.10);
}

.restricted {
  margin: 9px 0 8px;
  color: #294d80;
  font-size: clamp(12px, 3.35vw, 15px);
  line-height: 1.18;
}

.support-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1.3px solid #65bfd0;
  background: linear-gradient(90deg, rgba(233,249,249,.98), rgba(245,252,252,.98));
  color: #0c5d77;
  font-size: clamp(17px, 4.5vw, 20px);
  font-weight: 520;
}

.support-icon { width: 22px; height: 22px; }

.primary-button,
.support-button {
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}

/* Slightly roomier layout on taller phones, while remaining one screen. */
@media (min-height: 730px) {
  .page-shell {
    padding-top: max(17px, env(safe-area-inset-top));
    padding-left: 18px;
    padding-right: 18px;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  .hero { height: 205px; }
  .brand-name { font-size: clamp(16px, 4.2vw, 19px); }
  h1 { font-size: clamp(54px, 15.5vw, 70px); }
  .tagline { font-size: clamp(19px, 5vw, 23px); }
  .accent-line { margin: 13px 0 11px; }
  .forum-title { font-size: clamp(17px, 4.5vw, 21px); }
  .forum-theme { font-size: clamp(16px, 4.3vw, 20px); }

  .login-card { padding: 18px 16px 15px; border-radius: 27px; }
  .eva-avatar { width: 86px; height: 86px; margin-bottom: 9px; }
  h2 { font-size: clamp(29px, 8vw, 36px); }
  .intro { margin: 6px 0 14px; font-size: clamp(15px, 4.1vw, 19px); }
  .login-form { gap: 9px; }
  .field { min-height: 53px; padding: 0 15px; }
  .primary-button,
  .support-button { min-height: 53px; }
  .primary-button { margin-top: 4px; }
  .restricted { margin: 12px 0 10px; }
}

/* Short phones such as 375×667: compact further instead of scrolling. */
@media (max-height: 700px) {
  .page-shell {
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: max(7px, env(safe-area-inset-bottom));
  }

  .hero { height: 170px; }
  .skyline { width: 106%; right: -24%; opacity: .66; }
  h1 { font-size: clamp(44px, 13vw, 58px); }
  .tagline { font-size: clamp(16px, 4.5vw, 20px); }
  .accent-line { margin: 7px 0 7px; }
  .forum-title { font-size: clamp(15px, 4vw, 18px); }
  .forum-theme { font-size: clamp(14px, 3.8vw, 17px); }

  .login-card { padding: 11px 12px 10px; border-radius: 21px; }
  .eva-avatar { width: 62px; height: 62px; margin-bottom: 5px; }
  h2 { font-size: clamp(24px, 6.9vw, 30px); }
  .intro { margin: 4px 0 8px; font-size: clamp(13px, 3.6vw, 16px); }
  .login-form { gap: 6px; }
  .field { min-height: 44px; border-radius: 12px; }
  .field-icon { width: 21px; height: 21px; }
  .field input { font-size: clamp(15px, 4vw, 18px); }
  .primary-button,
  .support-button { min-height: 44px; }
  .primary-button { margin-top: 2px; font-size: clamp(17px, 4.5vw, 20px); }
  .restricted { margin: 7px 0 6px; font-size: clamp(11px, 3.05vw, 13px); }
  .support-button { font-size: clamp(16px, 4.2vw, 19px); }
  .support-icon { width: 20px; height: 20px; }
}

@media (max-width: 390px) {
  .page-shell { padding-left: 14px; padding-right: 14px; }
}

@media (min-width: 600px) {
  body {
    display: grid;
    place-items: center;
    padding: 18px 0;
  }

  .page-shell {
    height: min(100svh - 36px, 844px);
    border-radius: 34px;
    box-shadow: 0 18px 60px rgba(13, 42, 72, .14);
  }
}

/* Bottom-align the participant notice and support action. */
.login-card {
  padding-bottom: 112px;
}

.restricted {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 69px;
  margin: 0;
  text-align: center;
}

.support-button {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  width: auto;
}

@media (max-height: 700px) {
  .login-card {
    padding-bottom: 100px;
  }

  .restricted {
    bottom: 61px;
  }

  .support-button {
    bottom: 8px;
  }
}

/* M7B2 public account access links — no changes to existing login controls */
.account-links { display:flex; align-items:center; justify-content:center;
  gap:clamp(8px,2.4vw,16px); margin:12px 0 0; font-size:13px; }
.account-links a {color:#0d7483; text-decoration:underline; text-underline-offset:3px;
  font-weight:650; white-space:nowrap}
.account-links a:hover, .account-links a:focus-visible {color:#002147}
.account-links span {color:#687fa1}


/* EVA_LOGIN_ZOOM_REFLOW_V1 */

/* Preserve browser zoom and allow vertical reflow. */
html {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  height: auto;
  min-height: 100svh;
  overflow: visible;
}

/* Never constrain the login content to one screen. */
.page-shell {
  height: auto;
  min-height: 100svh;
  grid-template-rows: max-content minmax(max-content, 1fr);
  overflow: visible;
}

/* Keep the account controls in normal document flow. */
.login-card {
  display: flex;
  flex-direction: column;
  min-height: max-content;
  overflow: visible;
  padding-bottom: 14px;
}

.restricted {
  position: static;
  margin: auto 0 10px;
  padding-top: 12px;
  text-align: center;
}

.support-button {
  position: static;
  width: 100%;
  margin: 0;
}

/* Permit account links to wrap at high zoom. */
.account-links {
  flex-wrap: wrap;
  row-gap: 8px;
  margin: 14px 0 0;
}

.account-links a {
  white-space: normal;
}

/* Preserve the desktop presentation. */
@media (min-width: 600px) {
  .page-shell {
    height: auto;
    min-height: calc(100svh - 36px);
  }
}
