/* Account entry uses the same brand tokens as the portal and keeps the form first. */
.portal-auth-body.portal-auth-body--entry {
  --entry-canvas: #141414;
  --entry-surface: #1d1d1c;
  --entry-rule: #393938;
  --entry-text: #f6f4f1;
  --entry-muted: #c3bfb9;
  --entry-accent: #ff9b59;
}
html[data-portal-theme="light"] .portal-auth-body--entry {
  --entry-canvas: #faf9f6;
  --entry-surface: #f0eeea;
  --entry-rule: #d7d3cc;
  --entry-text: #201f1e;
  --entry-muted: #57544f;
  --entry-accent: #9e4009;
}
body.portal-auth-body--entry .portal-auth-shell {
  background: var(--entry-canvas);
  min-height: 0;
}
body.portal-auth-body--entry .portal-auth-container {
  width: min(100%, 1256px);
  padding-inline: clamp(18px, 3.5vw, 54px);
  margin-inline: auto;
}
body.portal-auth-body--entry .portal-auth-topbar {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--entry-rule);
  border-radius: 0;
  box-shadow: none;
  padding: 12px 0;
  min-height: 64px;
}
body.portal-auth-body--entry .portal-auth-topbar .portal-auth-back { display: none; }
body.portal-auth-body--entry .portal-auth-grid {
  display: grid;
  grid-template-columns: minmax(290px, .82fr) minmax(0, 1.18fr);
  align-items: center;
  min-height: 0;
  gap: clamp(44px, 7.5vw, 112px);
  margin: 0;
  padding: clamp(42px, 5.2vw, 76px) 0;
}
body.portal-auth-body--entry .portal-auth-panel {
  grid-column: auto;
  width: 100%;
  max-width: 480px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: var(--entry-text);
}
body.portal-auth-body--entry .portal-auth-panel::before,
body.portal-auth-body--entry .portal-auth-panel::after { content: none; }
body.portal-auth-body--entry .portal-auth-form-head { margin: 0 0 1.6rem; }
body.portal-auth-body--entry .portal-auth-form-head__title {
  font-size: clamp(2.45rem, 3.5vw, 3.7rem);
  line-height: 1.05;
  letter-spacing: -.045em;
  margin: 0;
  color: var(--entry-text);
  text-wrap: balance;
}
body.portal-auth-body--entry .portal-auth-form-head__text {
  max-width: 44ch;
  margin: .85rem 0 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--entry-muted);
}
body.portal-auth-body--entry .portal-form-stack { gap: 1.05rem; }
body.portal-auth-body--entry .portal-auth-panel .portal-input {
  background: var(--entry-surface);
  color: var(--entry-text);
  border: 1px solid var(--entry-rule);
  border-radius: .45rem;
  box-shadow: none;
  min-height: 48px;
}
body.portal-auth-body--entry .portal-form-stack .portal-inline-actions {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem 1rem;
  flex-wrap: wrap;
}
body.portal-auth-body--entry .portal-form-actions { gap: .75rem; margin: 0; }
body.portal-auth-body--entry .portal-form-actions .portal-button-primary { min-height: 48px; }
body.portal-auth-body--entry .portal-entry-note { margin: .8rem 0 0; color: var(--entry-muted); font-size: .83rem; line-height: 1.5; }
body.portal-auth-body--entry .portal-entry-help {
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.portal-entry-help figure {
  margin: 0;
  overflow: hidden;
  border-radius: .65rem;
  background: var(--entry-surface);
}
.portal-entry-help figure img {
  display: block;
  width: 100%;
  height: clamp(210px, 21vw, 310px);
  object-fit: cover;
  object-position: center;
}
.portal-entry-resources { margin-top: 1.2rem; }
.portal-entry-resources a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .9rem 0;
  color: var(--entry-text);
  border-bottom: 1px solid var(--entry-rule);
  text-decoration: none;
}
.portal-entry-resources a strong,.portal-entry-resources a small { display: block; }
.portal-entry-resources a strong { font-size: 1rem; line-height: 1.3; }
.portal-entry-resources a small { margin-top: .15rem; font-size: .86rem; color: var(--entry-muted); line-height: 1.4; }
.portal-entry-resources a>span:last-child { color: var(--entry-accent); font-size: 1.25rem; transition: transform .18s ease-out; }
.portal-entry-resources a:hover strong { color: var(--entry-accent); }
@media (prefers-reduced-motion:no-preference) { .portal-entry-resources a:hover>span:last-child { transform: translateX(3px); } }
body.portal-auth-body--entry :where(a,button,input,summary):focus-visible { outline: 2px solid var(--entry-accent); outline-offset: 3px; }
.portal-entry-footer-extra { margin: 0 0 1.25rem; }
.portal-entry-footer-extra>summary { cursor: pointer; width: fit-content; color: var(--entry-text); padding: .55rem 0; font-weight: 600; }
.portal-entry-footer-extra[open]>summary { margin-bottom: 1rem; }
@media(max-width:820px){
  body.portal-auth-body--entry .portal-auth-grid { grid-template-columns: minmax(0,1fr); gap: 1.75rem; padding: 2rem 0; }
  body.portal-auth-body--entry .portal-auth-container { max-width: 620px; }
  body.portal-auth-body--entry .portal-auth-panel { max-width: none; }
  .portal-entry-help figure { display: none; }
  .portal-entry-resources { margin: 0; }
  .portal-entry-resources a:first-child { border-top: 1px solid var(--entry-rule); }
}
@media(max-width:380px){
  body.portal-auth-body--entry .portal-auth-container { padding-inline: 14px; }
}

/* The legacy theme sets these shared auth-shell properties with priority. */
body.portal-auth-body--entry .portal-auth-topbar {
  min-height: 64px !important; padding: .65rem 0 !important;
  background: transparent !important; box-shadow:none !important;
  grid-template-columns: 1fr auto !important; border-width: 0 0 1px !important; border-radius:0 !important;
}
body.portal-auth-body--entry .portal-auth-topbar .portal-auth-brand { grid-column:1 !important; grid-row:1 !important; justify-self:start !important; }
body.portal-auth-body--entry .portal-auth-topbar .portal-auth-preferences { grid-column:2 !important; grid-row:1 !important; justify-self:end !important; }
body.portal-auth-body--entry .portal-auth-container { padding-block:0 !important; }
body.portal-auth-body--entry .portal-auth-grid {
  grid-template-columns:minmax(285px,.85fr) minmax(0,1.15fr) !important;
  min-height:0 !important; margin:0 !important; padding:clamp(38px,5.1vw,74px) 0 !important;
  gap:clamp(44px,7vw,104px) !important; align-items:center !important;
}
body.portal-auth-body--entry .portal-auth-panel {
  min-height:0 !important; padding:0 !important; margin:0 !important; border:0 !important;
  border-radius:0 !important; box-shadow:none !important; background:transparent !important;
}
body.portal-auth-body--entry .portal-auth-panel::before,body.portal-auth-body--entry .portal-auth-panel::after { display:none !important; }
body.portal-auth-body--entry .portal-auth-form-head__title { font-size:clamp(2.6rem,4vw,3.8rem) !important; line-height:1.05 !important; }
body.portal-auth-body--entry .portal-auth-form-head__text { font-size:1rem !important; max-width:44ch !important; }
body.portal-auth-body--entry .portal-auth-shell { min-height:0 !important; background:var(--entry-canvas) !important; }
@media(max-width:820px) {
 body.portal-auth-body--entry .portal-auth-grid {grid-template-columns:minmax(0,1fr) !important;gap:1.75rem !important;padding:2rem 0 1.4rem !important;}
 body.portal-auth-body--entry .portal-auth-topbar { display:grid !important; gap:.35rem !important; }
 body.portal-auth-body--entry .portal-auth-brand img { max-width:clamp(98px,32vw,140px); }
}
