:root {
  color-scheme: light;
  --ground: #f3f6f7;
  --paper: #fff;
  --ink: #172126;
  --muted: #536267;
  --line: #dce4e6;
  --accent: #167286;
  --soft-accent: #e7f2f4;
  --font: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  font-family: var(--font);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--ground); }
body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--ink); background: var(--ground); font: 15px/1.5 var(--font); }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button, input { font: inherit; }
svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.access-page { width: min(1120px, calc(100% - 48px)); min-height: 100vh; margin: 0 auto; padding: 28px 0 20px; display: flex; flex-direction: column; }
.access-header { display: flex; align-items: center; justify-content: space-between; min-height: 70px; }
.brand { display: flex; width: 210px; height: 70px; align-items: center; justify-content: center; padding: 5px 8px; overflow: hidden; border-radius: 7px; background: #151b20; }
.brand-logo { display: block; width: 100%; height: auto; }
.back-link { color: var(--muted); font-size: 13px; }
.back-link:hover, .back-to-app:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.access-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 460px); gap: clamp(42px, 8vw, 112px); align-items: center; width: 100%; max-width: 980px; margin: auto; padding: 64px 0; }
.access-intro { max-width: 470px; }
.eyebrow { margin: 0 0 12px; color: #44636a; font-size: 11px; font-weight: 600; letter-spacing: .1em; }
h1 { max-width: 12ch; margin: 0; font-size: clamp(36px, 4.2vw, 52px); line-height: 1.08; font-weight: 500; letter-spacing: -.035em; }
.intro-copy { max-width: 43ch; margin: 20px 0 32px; color: var(--muted); font-size: 16px; }
.security-list { display: grid; gap: 21px; }
.security-row { display: flex; gap: 14px; align-items: flex-start; }
.security-symbol { display: grid; flex: none; place-items: center; width: 38px; height: 38px; border: 1px solid #d8e4e6; border-radius: 10px; background: var(--paper); color: #245f6a; }
.security-symbol svg { width: 18px; height: 18px; }
.security-row > span:last-child { display: grid; gap: 3px; padding-top: 1px; }
.security-row strong { font-size: 14px; font-weight: 600; }
.security-row small { max-width: 38ch; color: var(--muted); font-size: 13px; }
.invite-note { max-width: 46ch; margin: 31px 0 0; padding: 15px 16px; border: 1px solid #dce4e6; border-radius: 8px; background: #fff; color: var(--muted); font-size: 13px; }
.invite-note strong { color: var(--ink); font-weight: 600; }
.account-panel { align-self: center; width: 100%; min-height: 470px; padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 14px 40px rgb(22 44 50 / 7%); }
.panel-heading { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.panel-heading h2 { margin: 0 0 5px; font-size: 20px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; }
.panel-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.lock-mark { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--soft-accent); color: #205d68; }
.status-message { margin: 16px 0; padding: 14px 15px; border: 1px solid #d4e2e4; border-radius: 7px; background: #f1f7f8; color: #294f56; font-size: 13px; }
.status-message[data-state="error"] { border-color: #e6cbc7; background: #fbf1ef; color: #7d332c; }
.status-message[data-state="setup"] { border-color: #e7d9b5; background: #fbf6e8; color: #684d19; }
.native-auth-form { display: grid; gap: 9px; margin-top: 20px; }
.native-auth-form[hidden] { display: none; }
.native-auth-form label { margin-top: 5px; color: #35494f; font-size: 13px; font-weight: 600; }
.native-auth-form input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #ccd9dc; border-radius: 7px; background: #fff; color: var(--ink); }
.native-auth-form input:focus { outline: 3px solid #16728630; border-color: var(--accent); }
.auth-submit { width: 100%; min-height: 44px; margin-top: 10px; padding: 10px 14px; border: 0; border-radius: 7px; background: #126d7c; color: #fff; font-weight: 600; cursor: pointer; }
.auth-submit:hover { background: #0d5966; }
.auth-submit:disabled { opacity: .6; cursor: wait; }
.auth-switch { min-height: 40px; border: 0; background: transparent; color: #245f6a; font-weight: 600; cursor: pointer; }
.factor-panel { margin: 24px 0 12px; padding: 18px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafb; }
.factor-panel h3 { margin: 0; font-size: 16px; }
.factor-panel .account-help { text-align: left; }
.factor-list { display: grid; gap: 8px; margin: 14px 0; }
.factor-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: white; font-size: 13px; }
.factor-row button { border: 0; background: none; color: #9d3e32; font: inherit; cursor: pointer; }
.factor-actions { display: grid; gap: 8px; }
.factor-actions .auth-submit { margin: 0; }
.factor-secret, .recovery-codes { overflow-wrap: anywhere; white-space: pre-wrap; padding: 12px; border-radius: 7px; background: #eef3f4; color: #24383f; font: 12px/1.6 "IBM Plex Mono", monospace; }
.account-help { margin: 18px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.back-to-app { display: block; margin-top: 24px; color: #41565c; font-size: 13px; text-align: center; }
.access-footer { display: flex; justify-content: space-between; gap: 16px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.access-footer span:first-child { color: #36545a; font-weight: 600; }
.access-footer a { color: #285d68; text-decoration: underline; text-underline-offset: 2px; }
::selection { color: #fff; background: #176a78; }

@media (max-width: 760px) {
  .access-page { width: min(100% - 32px, 520px); padding-top: 18px; }
  .access-layout { grid-template-columns: 1fr; gap: 30px; padding: 48px 0 34px; }
  .access-intro { max-width: none; }
  h1 { max-width: 15ch; font-size: clamp(34px, 9vw, 44px); }
  .intro-copy { margin: 15px 0 22px; font-size: 15px; }
  .security-list { grid-template-columns: 1fr; gap: 15px; }
  .invite-note { margin-top: 22px; }
  .account-panel { min-height: 0; padding: 21px 18px; }
  .access-footer { flex-direction: column; gap: 3px; }
}

@media (prefers-reduced-motion: no-preference) {
  .access-intro, .account-panel { animation: enter .52s cubic-bezier(.2,.8,.2,1) both; }
  .account-panel { animation-delay: 70ms; }
  @keyframes enter { from { opacity: .5; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
}
