:root {
  --primary: #2b368c;
  --primary-dark: #182060;
  --accent: #ff6080;
  --surface: #ffffff;
  --background: #eaeaed;
  --fill-blue: #f4f4f6;
  --text: #222330;
  --muted: #5a5b65;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--background);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; }
a { color: var(--primary); font-weight: 700; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
button, input { font: inherit; }

.app-shell {
  min-height: 100vh;
  padding: 24px;
  background: var(--background);
}
.page-shell { width: min(100%, 1536px); margin: 0 auto; padding: 6px 0 56px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 48px; }
.site-header nav { display: flex; align-items: center; gap: 20px; }
.site-header nav a { font-size: .9rem; text-decoration: none; }
.nav-tab { padding: 9px 0; }
.brand { color: var(--primary); font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.nav-cta { padding: 9px 14px; border-radius: 7px; background: var(--primary); color: white; transition: background .18s ease, transform .18s ease; }
.nav-cta:hover { background: var(--primary-dark); transform: translateY(-1px); }

.auth-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); align-items: center; gap: clamp(40px, 8vw, 110px); min-height: 540px; }
.auth-intro { max-width: 500px; }
.eyebrow { margin: 0 0 14px; color: var(--accent); font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
h1, h2 { margin: 0; color: var(--primary); letter-spacing: -.035em; }
h1 { font-size: clamp(2.35rem, 5vw, 4.4rem); line-height: 1.04; }
h2 { font-size: 1.65rem; line-height: 1.2; }
.auth-intro > p:not(.eyebrow), .content-card > p { line-height: 1.65; }
.auth-intro > p:not(.eyebrow) { max-width: 450px; margin: 24px 0 0; color: var(--muted); font-size: 1.08rem; }
.content-card { padding: clamp(28px, 4vw, 46px); border: 1px solid rgb(43 54 140 / 10%); border-radius: 16px; background: var(--surface); box-shadow: 0 20px 52px rgb(43 54 140 / 14%); }
.auth-card { max-width: 460px; justify-self: end; width: 100%; }
.content-card--narrow { width: min(100%, 600px); margin: 0 auto; }
.card-intro { margin: 10px 0 0; color: var(--muted); font-size: .96rem; }

label { display: block; margin: 28px 0 9px; color: var(--primary); font-size: .92rem; font-weight: 800; }
input[type="email"] { display: block; width: 100%; padding: 13px 14px; border: 1px solid #d2d5db; border-radius: 7px; background: #fff; color: var(--text); transition: border-color .18s ease, box-shadow .18s ease; }
input[type="email"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgb(43 54 140 / 12%); outline: 0; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: .91rem; line-height: 1.5; font-weight: 400; }
.checkbox-row input { accent-color: var(--accent); margin-top: 4px; flex: none; }
button { width: 100%; min-height: 48px; margin-top: 24px; padding: 12px 18px; border: 2px solid var(--primary); border-radius: 7px; background: var(--primary); color: white; font-weight: 800; cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
button:hover:not(:disabled) { border-color: var(--primary-dark); background: var(--primary-dark); transform: translateY(-1px); }
button:disabled { cursor: not-allowed; opacity: .58; }
.secondary-button { background: transparent; color: var(--primary); }
.secondary-button:hover:not(:disabled) { background: var(--fill-blue); color: var(--primary); }
.form-error { margin: 16px 0 0; color: #b4233d; font-weight: 700; }
.hint { color: var(--muted); font-size: .92rem; }
.secondary-action { margin: 26px 0 0; color: var(--muted); font-size: .92rem; text-align: center; }
.email-display { overflow-wrap: anywhere; color: var(--primary); font-weight: 800; }
.account-title { font-size: clamp(2rem, 4vw, 3rem); }
.email-check-title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.confirmation-error-title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }

.deck-shell { width: 100%; min-height: 100vh; background: white; }
.deck-header-band { background: var(--background); }
.deck-header { width: min(100% - 48px, 1536px); margin: 0 auto; padding: 18px 0; justify-content: flex-end; }
#science-deck { display: block; width: min(100% - 48px, 1536px); min-height: 720px; height: 720px; margin: 0 auto; border: 0; background: white; }
.loading { width: min(100% - 32px, 620px); margin: 48px auto; color: var(--primary); }

@media (max-width: 760px) {
  .app-shell { padding: 16px; }
  .page-shell { padding-top: 2px; }
  .site-header { align-items: flex-start; margin-bottom: 36px; }
  .site-header nav { gap: 12px; }
  .site-header nav a { font-size: .82rem; }
  .nav-cta { padding: 8px 10px; }
  .auth-layout { grid-template-columns: 1fr; gap: 32px; min-height: auto; }
  .auth-card { justify-self: stretch; max-width: none; }
  h1 { font-size: clamp(2.2rem, 12vw, 3.5rem); }
  .deck-header { width: min(100% - 32px, 1536px); }
  #science-deck { width: min(100% - 32px, 1536px); }
}

@media (max-width: 420px) {
  .site-header { gap: 16px; }
  .brand { font-size: 1rem; }
  .content-card { padding: 24px; }
  .site-header nav { gap: 9px; }
}

@media (max-width: 767px) {
  #science-deck { width: 100%; }
}
