/* NCAER editorial typography and colours; native HTML forms throughout. */
:root {
  --paper: #f8f7f3;
  --white: #fff;
  --ink: #262723;
  --muted: #64655f;
  --rule: #dfdfd7;
  --wine: #850c2d;
  --wine-hover: #650820;
  --gold: #ad8e49;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 4px; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 3px solid #00539b; outline-offset: 5px; }
.skip-link { position: absolute; top: -100px; left: 24px; padding: 12px; background: white; z-index: 10; }
.skip-link:focus { top: 12px; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 108px;
  padding: 20px max(32px, calc((100vw - 1240px) / 2));
  background: var(--white);
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 28px; text-decoration: none; flex-shrink: 0; }
.brand img { display: block; width: 148px; height: 66px; object-fit: contain; }
.brand-name { border-left: 1px solid var(--rule); padding-left: 28px; font-size: 19px; font-family: var(--serif); }
.site-link { display: inline-flex; align-items: center; gap: 16px; text-decoration: none; font-size: 14px; min-height: 44px; }
.site-link:hover, .ncaer-link:hover { color: var(--wine); }
.eyebrow { font-size: 11px; line-height: 1.6; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 20px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; }
.auth-layout {
  width: min(1120px, calc(100% - 80px));
  margin: auto;
  padding: 88px 0;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 100px;
  align-items: center;
}
.auth-intro h2 { font-size: clamp(38px, 4vw, 55px); line-height: 1.15; letter-spacing: -.035em; margin: 0 0 26px; }
.auth-intro .eyebrow { max-width: 360px; }
.intro-copy { max-width: 360px; color: var(--muted); font-size: 17px; line-height: 1.8; margin-bottom: 42px; }
.institution-line { display: inline-block; margin: 0; padding-top: 18px; border-top: 2px solid var(--gold); font-family: var(--serif); font-size: 17px; color: #6f602e; }
.auth-panel { padding: 40px; border: 1px solid var(--rule); border-top: 3px solid var(--wine); background: var(--white); }
.auth-panel h1 { font-size: 30px; line-height: 1.2; letter-spacing: -.025em; margin-bottom: 14px; }
.auth-panel .eyebrow { margin-bottom: 16px; }
.auth-subtitle { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 30px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
input:not([type=hidden]) { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid #aaa9a1; border-radius: 3px; background: white; color: var(--ink); }
input::placeholder { color: #797a74; }
input:focus { outline: 2px solid #00539b; outline-offset: 2px; }
.button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: 100%;
  min-height: 50px;
  padding: 12px 18px;
  margin-top: 16px;
  border: 1px solid var(--wine);
  border-radius: 3px;
  background: var(--wine);
  color: white;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--wine-hover); border-color: var(--wine-hover); }
.button span { font-size: 20px; font-weight: 400; line-height: 1; }
.auth-footer { font-size: 12px; line-height: 1.8; color: var(--muted); margin: 20px 0 0; }
.back-link { display: inline-block; padding: 10px 0; margin-top: 12px; color: var(--wine); font-size: 13px; }
.otp-input { letter-spacing: .4em; font-size: 22px; }
.request-reference { margin: 24px 0 0; padding: 14px 0; border-block: 1px solid var(--rule); font-size: 12px; color: var(--muted); }
.request-reference code { color: var(--ink); display: inline-block; margin-left: 8px; font-size: 13px; overflow-wrap: anywhere; }
.error { border-left: 3px solid var(--wine); background: #fbf0f1; padding: 12px 14px; color: #7b1630; font-size: 14px; }
.site-footer {
  width: min(1240px, calc(100% - 64px));
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: auto auto 0;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 11px;
}
.account { display: flex; align-items: center; gap: 24px; }
.account-email { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.sign-out { min-height: 44px; padding: 8px 0; border: 0; background: none; color: var(--ink); font-size: 13px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; white-space: nowrap; }
.sign-out:hover { color: var(--wine); }
.workspace { width: min(1120px, calc(100% - 80px)); margin: 0 auto; padding: 64px 0 72px; }
.welcome { margin-bottom: 36px; }
.welcome .eyebrow { margin-bottom: 12px; }
.welcome h1 { font-size: clamp(30px, 3.5vw, 42px); line-height: 1.2; letter-spacing: -.025em; margin-bottom: 0; overflow-wrap: anywhere; }
.research-feature { display: grid; grid-template-columns: 1.2fr 1fr; background: white; border: 1px solid var(--rule); border-top: 3px solid var(--wine); }
.research-main { padding: 44px 48px; }
.research-main .eyebrow { color: #7b6436; margin-bottom: 14px; }
.research-main h2 { font-size: 48px; line-height: 1.15; letter-spacing: -.035em; margin-bottom: 18px; }
.research-description { color: var(--muted); margin-bottom: 30px; font-size: 17px; line-height: 1.8; }
.chat-button { width: fit-content; min-width: 180px; margin-top: 0; }
.research-details { border-left: 1px solid var(--rule); margin: 40px 0; padding: 4px 44px; }
.research-details h3 { font-family: var(--serif); font-size: 21px; line-height: 1.3; font-weight: 400; margin-bottom: 8px; }
.research-details p { font-size: 14px; color: var(--muted); line-height: 1.8; margin-bottom: 26px; max-width: 330px; }
.research-details .source-note { font-size: 12px; border-top: 1px solid var(--rule); padding-top: 16px; margin-bottom: 0; }
.ncaer-link { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 26px 0; text-decoration: none; font-size: 14px; border-bottom: 1px solid var(--rule); }
.link-detail { color: var(--muted); margin-left: 20px; font-size: 13px; }
.empty-state { border-block: 1px solid var(--rule); padding: 36px 0; }
.empty-state h2 { font-size: 28px; margin-bottom: 12px; }
.empty-state p { color: var(--muted); }
.dev { position: fixed; bottom: 4px; left: 8px; font-size: 11px; background: white; padding: 4px 8px; border: 1px solid var(--rule); }
.mail { padding: 16px; border: 1px solid var(--rule); margin: 16px 0; }
.mail pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
@media (max-width: 1050px) {
  .auth-layout { gap: 48px; }
  .auth-panel { padding: 30px; }
  .research-main { padding: 36px; }
  .research-details { padding: 0 30px; }
  .desktop-break { display: none; }
}
@media (max-width: 760px) {
  .site-header { min-height: 88px; padding: 16px 24px; gap: 16px; }
  .brand { gap: 18px; }
  .brand img { width: 112px; height: 50px; }
  .brand-name { padding-left: 18px; font-size: 17px; }
  .site-link { font-size: 12px; gap: 8px; }
  .auth-layout { width: min(480px, calc(100% - 40px)); grid-template-columns: 1fr; gap: 30px; padding: 40px 0 52px; }
  .auth-intro { display: none; }
  .auth-panel { padding: 32px; }
  .auth-panel h1 { font-size: 29px; }
  .site-footer { width: calc(100% - 48px); flex-direction: column; gap: 4px; padding: 20px 0; }
  .account { gap: 14px; }
  .account-email { display: none; }
  .workspace { width: calc(100% - 48px); padding: 36px 0 44px; }
  .welcome { margin-bottom: 26px; }
  .research-feature { grid-template-columns: 1fr; }
  .research-main { padding: 30px; }
  .research-main h2 { font-size: 39px; }
  .research-description { font-size: 16px; margin-bottom: 24px; }
  .research-details { border-left: 0; border-top: 1px solid var(--rule); margin: 0 30px; padding: 26px 0; }
  .research-details p { max-width: none; }
  .link-detail { display: block; margin: 4px 0 0; }
}
@media (max-width: 380px) {
  .site-header { padding-inline: 20px; }
  .brand { gap: 12px; }
  .brand-name { padding-left: 12px; font-size: 16px; }
  .brand img { width: 90px; }
  .auth-panel { padding: 26px 22px; }
  .site-link { gap: 4px; }
}
