/* ─────────────────────────────────────────────────────────────────────────────
   Forge — Auth Pages CSS
   login.html / forgot-password.html / reset-password.html
───────────────────────────────────────────────────────────────────────────── */

/* Self-hosted fonts (SIL OFL — licences in assets/fonts/). Served from our own
   origin so page loads don't send visitors' IP addresses to Google Fonts.
   latin + latin-ext subsets only (latin-ext covers te reo Māori macrons). */
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 300; font-display: swap;
  src: url('../assets/fonts/barlow-300-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 300; font-display: swap;
  src: url('../assets/fonts/barlow-300-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../assets/fonts/barlow-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../assets/fonts/barlow-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../assets/fonts/barlow-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../assets/fonts/barlow-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../assets/fonts/barlow-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../assets/fonts/barlow-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../assets/fonts/barlow-condensed-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../assets/fonts/barlow-condensed-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../assets/fonts/barlow-condensed-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../assets/fonts/barlow-condensed-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../assets/fonts/barlow-condensed-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../assets/fonts/barlow-condensed-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../assets/fonts/barlow-condensed-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../assets/fonts/barlow-condensed-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Bebas Neue'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../assets/fonts/bebas-neue-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Bebas Neue'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../assets/fonts/bebas-neue-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:        #C8963E;
  --gold-light:  #E8B86D;
  --gold-dim:    rgba(200,150,62,0.12);
  --gold-border: rgba(200,150,62,0.3);
  --gold-900:    #2E200C;
  --dark:        #0E0E0F;
  --surface:     #161618;
  --card:        #1E1E21;
  --card-raised: #26221C;
  --border:      rgba(255,255,255,0.08);
  --input-border: rgba(240,237,232,0.45);
  --text:        #F0EDE8;
  --muted:       rgba(240,237,232,0.62);
  --green:       #4CAF76;
  --red:         #E05252;
  --red-text:    #F08080;
  --shadow-molten: 0 8px 24px rgba(20, 10, 0, 0.5);
  --shadow-focus:  0 0 0 2px var(--dark), 0 0 0 4px var(--gold-light);
  --ease-precise:  cubic-bezier(0.16, 1, 0.3, 1);
  --font-display:'Bebas Neue', sans-serif;
  --font-body:   'Barlow', sans-serif;
  --font-cond:   'Barlow Condensed', sans-serif;
}

html, body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--dark);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* Text for screen readers only (e.g. the brand name next to a styled wordmark). */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── Background glows ─────────────────────────────────────────────────────── */
.auth-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.auth-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.auth-glow--1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(200,150,62,0.4), transparent 70%);
  top: -120px; right: -120px;
  animation: glowDrift 12s ease-in-out infinite alternate;
}

.auth-glow--2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(74,144,217,0.25), transparent 70%);
  bottom: -100px; left: -100px;
  animation: glowDrift 16s ease-in-out infinite alternate-reverse;
}

@keyframes glowDrift {
  from { transform: translate(0, 0); }
  to   { transform: translate(30px, 20px); }
}

/* Faint grain to break up the flat gradient background */
.auth-grain {
  position: absolute;
  inset: -10%;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Wrapper ──────────────────────────────────────────────────────────────── */
.auth-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Logo ─────────────────────────────────────────────────────────────────── */
.auth-logo {
  font-family: var(--font-display);
  font-size: 48px;
  letter-spacing: 5px;
  color: var(--text);
  margin-bottom: 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.auth-logo-img { width: 160px; height: 160px; display: block; }

.auth-tagline {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.5px;
  margin-bottom: 32px;
  text-wrap: balance;
}

/* ── Tab switcher ─────────────────────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
  gap: 4px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-cond);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab.active {
  background: var(--card);
  color: var(--gold);
  box-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

/* ── Panels ───────────────────────────────────────────────────────────────── */
.auth-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
  background: var(--card-raised);
  border: 0.5px solid var(--gold-border);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: var(--shadow-molten);
  animation: panelIn 0.25s var(--ease-precise);
}

.auth-panel.active { display: flex; }

/* The code emailed for a sign-in on a new device (auth.js): while it's being
   asked for, the sign-in panel shows only its messages and the code step. */
#login-code-step { display: flex; flex-direction: column; gap: 16px; }
#login-code-step[hidden] { display: none; }
#panel-login.code-step > :not(#login-error):not(#login-success):not(#login-code-step) { display: none; }
#login-code-step .field-link { align-self: center; padding: 4px 0; }
#login-code-resend[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ── Error banner ─────────────────────────────────────────────────────────── */
.auth-error {
  background: rgba(224,82,82,0.1);
  border: 0.5px solid rgba(224,82,82,0.35);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #f08080;
  line-height: 1.5;
}

.auth-success {
  background: rgba(76,175,118,0.1);
  border: 0.5px solid rgba(76,175,118,0.35);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #6ecf95;
  line-height: 1.5;
}

/* ── Field groups ─────────────────────────────────────────────────────────── */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field-link {
  font-size: 12px;
  color: var(--gold);
  text-decoration: none;
  transition: color 0.15s;
}
.field-link:hover { color: var(--gold-light); }

.field-input-wrap {
  position: relative;
}

.field-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}

.field-input::placeholder { color: var(--muted); }

.field-input:focus {
  border-color: var(--gold-border);
  box-shadow: var(--shadow-focus);
}

.field-input.error {
  border-color: rgba(224,82,82,0.5);
}

/* Password field with toggle button */
.field-input-wrap .field-input {
  padding-right: 42px;
}

.toggle-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.toggle-pw:hover { color: var(--gold); }
.toggle-pw svg { width: 16px; height: 16px; }
.toggle-pw .pw-slash { opacity: 0; transition: opacity 0.15s; }
.toggle-pw[aria-pressed="true"] .pw-slash { opacity: 1; }

/* ── Password strength ────────────────────────────────────────────────────── */
.pw-strength {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.pw-strength-bar {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
}

.pw-strength-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  min-height: 16px;
  transition: color 0.2s;
}

/* ── Terms checkbox ───────────────────────────────────────────────────────── */
.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.terms-row + .terms-row { margin-top: -6px; }
.terms-row label { min-height: 24px; cursor: pointer; }

.terms-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--gold);
  flex-shrink: 0;
  cursor: pointer;
}

/* ── Primary button ───────────────────────────────────────────────────────── */
.btn-auth {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: var(--gold);
  color: #0E0E0F;
  font-family: var(--font-cond);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity 0.15s, transform 0.25s var(--ease-precise);
  margin-top: 4px;
}

.btn-auth:hover:not(:disabled)  { opacity: 0.9; transform: translateY(-4px); }
.btn-auth:active:not(:disabled) { transform: scale(0.99); }
.btn-auth:disabled { opacity: 0.5; cursor: not-allowed; }

/* Spinner inside button */
.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: #0E0E0F;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Divider ──────────────────────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 0.5px;
  background: var(--border);
}

/* ── OAuth button ─────────────────────────────────────────────────────────── */
.btn-oauth {
  width: 100%;
  padding: 12px 14px;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: border-color 0.15s, background 0.15s, transform 0.25s var(--ease-precise);
}

.btn-oauth:hover {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.03);
  transform: translateY(-4px);
}

/* ── Simple card (used on forgot/reset pages) ─────────────────────────────── */
.auth-card {
  background: var(--card-raised);
  border: 0.5px solid var(--gold-border);
  border-radius: 16px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-molten);
}
/* The `display: flex` above beats the UA [hidden]{display:none} rule (same
   specificity, author sheet wins), so a `hidden` card would still render. This
   restores hiding for card toggling (verify-email + reset-password states). */
.auth-card[hidden] { display: none; }
/* Same for the add-password page's box, button and Sign In link after success. */
#add-field[hidden], #add-btn[hidden], #add-signin-link[hidden] { display: none; }

.auth-card-title {
  font-family: var(--font-cond);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text);
}

.auth-card-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: -8px;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  margin-top: 16px;
  transition: color 0.15s;
  align-self: flex-start;
}
.auth-back-link:hover { color: var(--gold); }
.auth-back-link svg { width: 14px; height: 14px; }

/* ── Field hint / validation messages ────────────────────────────────────── */
.field-hint {
  font-size: 11px;
  color: var(--red-text);
  margin-top: 2px;
  min-height: 16px;
}

/* ── Focus states (keyboard accessibility) ────────────────────────────────── */
.auth-tab:focus-visible,
.field-link:focus-visible,
.toggle-pw:focus-visible,
.btn-auth:focus-visible,
.btn-oauth:focus-visible,
.auth-back-link:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

/* ── Install modal (iOS "Add to Home Screen" instructions) ──────────────────── */
.auth-install-modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,0.6);
  opacity: 0; transition: opacity 0.2s;
}
/* `display: flex` above beats the UA [hidden]{display:none} rule (same
   specificity, author sheet wins) — restore hiding while `hidden` is set. */
.auth-install-modal[hidden] { display: none; }
.auth-install-modal.is-open { opacity: 1; }
.auth-install-card {
  position: relative;
  width: 100%; max-width: 400px;
  padding: 28px 24px calc(28px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background: var(--card-raised);
  border: 0.5px solid var(--border);
  border-bottom: none;
  text-align: center;
  transform: translateY(16px);
  transition: transform 0.25s var(--ease-precise);
}
.auth-install-modal.is-open .auth-install-card { transform: translateY(0); }
@media (min-width: 640px) {
  .auth-install-modal { align-items: center; }
  .auth-install-card { border-radius: 20px; border-bottom: 0.5px solid var(--border); margin-bottom: 40px; }
}
.auth-install-icon { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 14px; }
.auth-install-card h2 { font-family: var(--font-display); font-size: 22px; letter-spacing: 0.5px; margin-bottom: 16px; }
.auth-install-card ol { text-align: left; display: flex; flex-direction: column; gap: 12px; list-style: none; counter-reset: step; }
.auth-install-card li { counter-increment: step; font-size: 14px; color: var(--muted); line-height: 1.5; display: flex; gap: 12px; align-items: flex-start; }
.auth-install-card li::before {
  content: counter(step); flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold-dim); color: var(--gold);
  font-family: var(--font-cond); font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.auth-install-card strong { color: var(--text); font-weight: 600; }
.auth-install-card .fi-share-icon { display: inline-flex; vertical-align: middle; margin: 0 2px; color: var(--gold); }
.auth-install-card .fi-share-icon svg { width: 16px; height: 16px; }
.auth-install-card .fi-lead { font-size: 14px; color: var(--text); line-height: 1.5; margin-bottom: 14px; }
.auth-install-card .fi-note { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 12px 0 0; }
.auth-install-card .fi-qr { width: 168px; margin: 0 auto; padding: 8px; background: #fff; border-radius: 12px; }
.auth-install-card .fi-qr svg { display: block; width: 100%; height: auto; }
.auth-install-card .fi-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0 14px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.auth-install-card .fi-divider::before,
.auth-install-card .fi-divider::after { content: ''; flex: 1; height: 0.5px; background: var(--border); }
.auth-install-close {
  position: absolute; top: 14px; right: 14px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: none; color: var(--muted);
  font-size: 18px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.auth-install-close:hover { background: rgba(255,255,255,0.12); color: var(--text); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-wrap { padding: 32px 16px 48px; }
  .auth-panel { padding: 20px 16px; }
  .field-row  { grid-template-columns: 1fr; }
}

/* Windows High Contrast / forced colours drops box-shadows, which is how every
   focus ring here is drawn — give keyboard focus a system-colour outline. */
@media (forced-colors: active) {
  :focus-visible { outline: 2px solid CanvasText !important; outline-offset: 2px; }
}

/* ── Field hints + gated Google sign-up (IMP-06, IMP-14) ──────────────────── */
.field-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.oauth-hint { margin: 0 0 8px; text-align: center; }
.btn-oauth[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-oauth[aria-disabled="true"]:hover { transform: none; background: var(--surface); }
.field-input[aria-invalid="true"] { border-color: #E05252; }

@media (prefers-reduced-motion: reduce) {
  .auth-glow, .auth-panel, .btn-spinner { animation: none !important; }
}

h1.auth-tagline { font-weight: 400; margin-top: 0; }

/* iOS Safari zooms in on any text field under 16px when it's tapped, and
   doesn't zoom back out. Touchscreens only, so desktop keeps its sizes. */
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  textarea, select { font-size: max(16px, 1em) !important; }
}
