/* Shared sign-in and authenticator layout. Existing security states use [hidden]. */
body[data-page="login"] .trellis-home-nav { position: sticky; top: 0; }
.entry-layout {
  --paper: #fffefa;
  --text: #221e23;
  --subtle: #5e5961;
  --rule: #dcd8d5;
  --action: #bd1742;
  color: var(--text);
  font-family: "Inter", "Segoe UI", sans-serif;
  display: grid;
  grid-template-columns: minmax(0, .84fr) minmax(0, 1fr);
  width: min(1120px, calc(100% - 64px));
  margin: clamp(30px,5vw,72px) auto;
  padding: 0;
  max-width: none;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 24px;
  overflow: clip;
  box-shadow: 0 14px 44px #3621330d;
}
.entry-layout *, .entry-layout *::before, .entry-layout *::after { box-sizing: border-box; }
.entry-rail {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 490px;
  background: radial-gradient(ellipse at 83% 64%,#68243e 0,transparent 54%),linear-gradient(147deg,#21141f,#361827 60%,#271820);
  color: #fff9f4;
}
.entry-rail::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(90deg,#ffffff0b 1px,transparent 1px),linear-gradient(#ffffff0b 1px,transparent 1px);
  background-size: 38px 38px;
}
.rail-copy { position: relative; z-index: 2; padding: clamp(30px,4vw,56px); }
.entry-rail h2 { font: 500 clamp(38px,4.2vw,62px)/1.02 Georgia,serif; letter-spacing: -.055em; margin: 0; color: inherit; }
.entry-rail p { color: #e6d6df; line-height: 1.55; font-size: 15px; margin: 14px 0 0; max-width: 32ch; }
.auth-art { position: absolute; inset: 39% 0 0; display: grid; place-items: center; pointer-events: none; }
.auth-art img { display: block; width: min(58%, 244px); height: auto; object-fit: contain; }
.entry-form { display: grid; align-items: center; padding: clamp(32px,5vw,72px); }
.entry-inner { width: 100%; max-width: 400px; margin: auto; }
.entry-layout h1 { font: 650 clamp(32px,3.3vw,48px)/1.1 "Inter","Segoe UI",sans-serif; letter-spacing: -.055em; color: var(--text); margin: 0; }
.entry-intro { color: var(--subtle); margin: 10px 0 30px; font-size: 16px; }
.entry-layout #loginForm,.entry-field { display: grid; gap: 8px; }
.entry-layout #loginForm { gap: 21px; }
.entry-layout label,.label-row { color: var(--text); font-size: 14px; font-weight: 600; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.entry-form a, .security-work a:not(.button) { color: #9d2144; text-underline-offset: 3px; font-weight: 600; }
.label-row a,.entry-help { font-size: 13px; }
.entry-layout input:not([type=checkbox]),.entry-layout select {
  width: 100%; min-width: 0; min-height: 48px; padding: 11px 13px; line-height: 1.45;
  font-family: inherit; font-size: 16px; font-weight: 400;
  border: 1px solid #aba4ab; border-radius: 8px; background: white; color: var(--text);
}
.entry-layout :focus-visible { outline: 3px solid #9f2854; outline-offset: 3px; }
.entry-primary, .security-work button:not(.secondary):not(.danger),.security-work .button {
  min-height: 48px; padding: 12px 18px; border-radius: 8px; border: 1px solid var(--action); background: var(--action);
  color: white; font: 650 15px/1.3 "Inter","Segoe UI",sans-serif; cursor: pointer;
}
.entry-primary:hover,.security-work button:not(.secondary):not(.danger):hover,.security-work .button:hover { background: #991335; }
.entry-layout button:disabled { cursor: wait; opacity: .65; }
.entry-signup { border-top: 1px solid var(--rule); padding-top: 20px; margin: 24px 0 6px; color: var(--subtle); font-size: 14px; }
.entry-security {
  color-scheme: light; background: #f4f2ef; color: #251e24; font-family: "Inter","Segoe UI",sans-serif;
}
.entry-security .security-header { background: #1b1920; color: #fff; padding-block: 13px; }
.entry-security footer { color: #59545a; border-color: #d5d0cc; }
.security-entry { align-items: start; overflow: visible; background: transparent; border: none; box-shadow: none; gap: clamp(24px,4vw,55px); grid-template-columns: minmax(0,.65fr) minmax(0,1fr); }
.security-entry .entry-rail { border-radius: 18px; position: sticky; top: 20px; min-height: 0; }
.security-entry .auth-art { position: relative; inset: auto; height: clamp(190px,19vw,270px); }
.security-entry .rail-copy { padding: clamp(26px,3vw,42px); }
.security-entry .entry-rail h2 { font-size: clamp(32px,3.4vw,48px); }
.security-work {
  --ink: var(--text); --muted: var(--subtle); --line: var(--rule); --panel: var(--paper);
  min-width: 0;
}
.security-work > h1 { font-size: 26px; }
.security-work #security-message { background: transparent; border: 0; margin: 8px 0 18px; padding: 0; font-size: 14px; }
.security-work #security-message.error,.entry-form .form-msg.err { background: #fff0f2; color: #962043; padding: 12px; border-inline-start: 3px solid #bd1742; }
.security-work .account-summary { margin: 0; padding: 0 0 14px; align-items: center; flex-direction: row; flex-wrap: wrap; }
.security-work .account-summary h2 { font-size: 15px; }
.security-work .badge { white-space: normal; font-weight: 650; }
.security-work .badge.active { background: #e4f4eb; color: #185535; border-color: #b0d2be; }
.security-work .card { padding: clamp(18px,2.6vw,32px); margin: 16px 0; color: var(--text); border-radius: 14px; }
.security-work .card h2 { font-size: 23px; line-height: 1.2; color: var(--text); }
.security-work .card h3 { color: var(--text); }
.security-work .eyebrow { color: #942242; }
.security-work #security-challenge { border-top: 3px solid var(--action); }
.security-work #security-challenge p { margin-bottom: 0; }
.security-work #verify-form { margin-top: 18px; }
.security-work #verify-form [name=code] { font-family: ui-monospace,Consolas,monospace; letter-spacing: .12em; }
.security-work #device-choice { background: #f5f2ef; padding: 14px; border-radius: 8px; }
.security-work #device-choice small { font-size: 13px; line-height: 1.5; color: var(--subtle); font-weight: 400; }
.security-work .secret { background: #f5f2ef; border-color: #bdb6ba; }
.security-work .secondary { background: #fff; border-color: #aaa1a6; color: #3a3037; }
.security-work .secondary:hover { background: #eee9e6; }
.security-work .danger { background: #86213b; color: #fff; }
@media (max-width: 760px) {
  .entry-layout { width: min(540px,calc(100% - 28px)); grid-template-columns: minmax(0,1fr); margin: 18px auto 28px; border-radius: 16px; }
  .entry-rail { min-height: 0; }
  .rail-copy { padding: 22px; max-width: 74%; }
  .entry-rail h2 { font-size: 32px; }
  .entry-rail p { font-size: 13px; margin-top: 6px; }
  .auth-art { inset: 0 0 0 auto; width: 32%; }
  .auth-art img { width: 76%; }
  .entry-form { padding: 27px 22px; }
  .entry-intro { margin-bottom: 23px; }
  .security-entry { gap: 0; }
  .security-entry .entry-rail { display: none; }
  .security-work > h1 { margin-top: 4px; }
  .security-work .account-summary { gap: 6px 12px; }
  .security-work .bottom-actions > * { width: 100%; }
}
@media (max-width: 360px) {
  .entry-form { padding: 22px 16px; }
  .entry-rail h2 { font-size: 27px; }
  .security-work #security-message { margin: 4px 0 10px; }
  .security-work #account-email { font-size: 13px; }
  .security-work .account-summary { padding-bottom: 8px; }
  .security-work #verify-form { gap: 10px; margin-top: 10px; }
  .security-work #device-choice { padding: 10px; }
  .security-work #security-challenge { padding: 14px; margin: 12px 0; }
}
