/* ============================================================
   CALL-OUT SERVICES — Public Theme Layer
   ------------------------------------------------------------
   Loaded ONLY by app/Views/layouts/main.php (public pages).
   The admin / client / artisan portals load metro.css + app.css
   only, so nothing here can reach them.

   Palette is taken from the logo and contrast-verified:
     navy  #071F4D on white ............ 16.00:1  (AA)
     white on navy ..................... 16.00:1  (AA)
     navy  on orange #F7941F ...........  7.02:1  (AA)  <- logo lockup
     white on orange ...................  2.28:1  (FAIL - never used)
     orange #F7941F on white ...........  2.28:1  (FAIL - never text)
     #B26200 on white ..................  4.53:1  (AA)  <- orange as text
     #4A5468 on white ..................  7.61:1  (AA)  <- secondary text

   Rule with meaning: orange marks ACT or LIVE. Nowhere else.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;600;700&family=Source+Sans+3:wght@400;500;600;700&display=swap");

/* ── Tokens ───────────────────────────────────────────────── */
:root {
  /* Brand — sampled from public/images/logo1.jpeg */
  --ink:         #071F4D;   /* logo navy */
  --ink-deep:    #041434;   /* pressed / deeper navy */
  --ink-soft:    #4A5468;   /* secondary text, 7.61:1 */
  --ink-faint:   #6B7488;   /* tertiary text on white */
  --signal:      #F7941F;   /* logo orange — FILLS ONLY */
  --signal-hi:   #FFA733;   /* orange on navy surfaces, 8.25:1 */
  --signal-ink:  #B26200;   /* orange as TEXT on white, 4.53:1 */
  --signal-wash: #FEF3E4;   /* orange tint ground */

  --paper:       #FFFFFF;
  --mist:        #F1F4F9;   /* navy-tinted ground (deliberately cool) */
  --mist-deep:   #E6EBF4;
  --line:        #DCE3EE;
  --line-strong: #C3CDDE;

  --good:        #1F7A5C;
  --good-wash:   #E7F4EF;
  --bad:         #C0392B;
  --bad-wash:    #FBECEA;
  --warn-wash:   #FEF3E4;

  /* Remap metro.css primitives so every existing component
     inherits the brand without editing metro.css or app.css. */
  --primary:    #071F4D;
  --primary-dk: #041434;
  --accent:     #C0392B;
  --success:    #1F7A5C;
  --warning:    #F7941F;
  --dark:       #071F4D;
  --mid:        #4A5468;
  --muted:      #6B7488;
  --border:     #DCE3EE;
  --bg:         #F1F4F9;

  /* Type */
  --font:       "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-head:  "Lexend", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Rhythm — 4/8 scale */
  --s1: .25rem; --s2: .5rem;  --s3: .75rem; --s4: 1rem;
  --s5: 1.5rem; --s6: 2rem;   --s7: 3rem;   --s8: 4rem; --s9: 6rem;

  --r-sm: 6px;  --r: 10px;   --r-lg: 16px;  --r-pill: 999px;
  --shadow-lift: 0 18px 44px -20px rgba(7,31,77,.45);
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ── Base ─────────────────────────────────────────────────── */
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  color: var(--ink);
  letter-spacing: -0.018em;
  text-wrap: balance;
}
h1 { font-weight: 700; line-height: 1.06; }
h2 { font-weight: 600; line-height: 1.14; font-size: clamp(1.6rem, 3.4vw, 2.35rem); }
h3 { font-weight: 600; line-height: 1.25; font-size: 1.2rem; }
h4 { font-weight: 600; line-height: 1.3;  font-size: 1rem; letter-spacing: -0.01em; }

p { color: var(--ink-soft); line-height: 1.65; }
a { color: var(--ink); }
a:hover { color: var(--signal-ink); }
small { color: var(--ink-faint); }
strong { font-weight: 600; color: var(--ink); }
::selection { background: var(--signal); color: var(--ink); }

/* Numeric alignment for stats, prices, phone numbers */
.tabular, .stat-value, .fee-display { font-variant-numeric: tabular-nums; }

/* Long tokens (emails, URLs, serials) must reflow, not overflow */
.wrap-any { overflow-wrap: anywhere; }

/* ── Focus: one visible ring everywhere ───────────────────── */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
.on-ink :where(a, button):focus-visible,
.navbar :where(a, button):focus-visible,
footer :where(a, button):focus-visible {
  outline-color: var(--signal-hi);
}

/* Skip link — keyboard users land here first */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--signal); color: var(--ink);
  padding: 12px 20px; font-weight: 600; border-radius: 0 0 var(--r) 0;
}
.skip-link:focus { left: 0; }

/* ── Layout helpers ───────────────────────────────────────── */
.container { max-width: 1180px; padding-inline: var(--s5); }
.section        { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section--mist  { background: var(--mist); }
.section--ink   { background: var(--ink); color: #fff; }
.section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4 { color: #fff; }
.section--ink p { color: rgba(255,255,255,.72); }

/* Section heading: no all-caps eyebrow; hierarchy by size + a short rule */
.sec-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.sec-head h2 { margin-bottom: var(--s3); }
.sec-head p  { font-size: 1.06rem; margin: 0; max-width: 60ch; }
.sec-head--center { margin-inline: auto; text-align: center; }
.rule {
  width: 56px; height: 4px; background: var(--signal);
  border-radius: var(--r-pill); margin-bottom: var(--s4);
}
.sec-head--center .rule { margin-inline: auto; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: 0;
  border-radius: var(--r-sm);
  padding: 12px 22px;
  min-height: 44px;             /* touch target */
  justify-content: center;
  transition: background .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), transform .12s var(--ease);
  touch-action: manipulation;
}
.btn:hover  { filter: none; text-decoration: none; }
.btn:active { filter: none; transform: translateY(1px); }
.btn-sm { padding: 8px 14px; min-height: 36px; font-size: .85rem; }
.btn-lg { padding: 15px 30px; min-height: 52px; font-size: 1.02rem; }

/* Default action — navy, 16:1 */
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-deep); color: #fff; }

/* Conversion action — the logo lockup: navy on orange, 7.02:1 */
.btn-cta { background: var(--signal); color: var(--ink); }
.btn-cta:hover { background: var(--signal-hi); color: var(--ink); }

/* metro.css puts white on orange (2.28:1). Fix it. */
.btn-warning { background: var(--signal); color: var(--ink); }
.btn-warning:hover { background: var(--signal-hi); color: var(--ink); }

.btn-outline { background: transparent; border: 2px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink-soft); border: 2px solid var(--line-strong); }
.btn-ghost:hover { background: var(--mist); color: var(--ink); border-color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-deep); }

/* On navy surfaces */
.btn-on-ink { background: transparent; border: 2px solid rgba(255,255,255,.45); color: #fff; }
.btn-on-ink:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* ── Busy submit state (js/form-busy.js) ──────────────────── */
/* A busy button is not a disabled button: keep it fully legible so the
   label stays readable while the request is in flight. */
.btn.is-busy,
.btn.is-busy[disabled],
.btn.is-busy[aria-disabled="true"] {
  opacity: 1;
  cursor: progress;
  pointer-events: none;
  transform: none;
}
.btn__spin {
  width: 1.05em; height: 1.05em;
  flex-shrink: 0;
  border: 2px solid currentColor;      /* inherits navy on orange, white on navy */
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin .7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* Screen-reader-only live region for the busy announcement */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ── Forms ────────────────────────────────────────────────── */
.form-label {
  text-transform: none;          /* sentence case, not shouting */
  letter-spacing: 0;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.form-label .req { color: var(--bad); margin-left: 2px; }
.form-control {
  font-family: var(--font);
  font-size: 1rem;              /* >=16px stops iOS zoom-on-focus */
  min-height: 46px;
  padding: 11px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--ink);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.form-control::placeholder { color: var(--ink-faint); opacity: 1; }
.form-control:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(7,31,77,.14);
  outline: none;
}
.form-control:focus-visible { outline: none; }
.form-control.is-invalid { border-color: var(--bad); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(192,57,43,.16); }
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%234A5468' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.form-hint { color: var(--ink-faint); font-size: .85rem; margin-top: 5px; }
.form-error {
  color: var(--bad); font-size: .87rem; font-weight: 600;
  margin-top: 5px; display: flex; align-items: center; gap: 5px;
}
.form-check input[type="checkbox"], .form-check input[type="radio"] {
  width: 20px; height: 20px; accent-color: var(--ink);
}

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
  border-left-width: 4px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  align-items: center;
  font-size: .95rem;
  max-width: 1180px;
  margin-inline: auto;
  margin-block: var(--s4);
}
.alert i { font-size: 1.25rem; flex-shrink: 0; }
.alert-success { background: var(--good-wash); border-color: var(--good); color: #10503C; }
.alert-error   { background: var(--bad-wash);  border-color: var(--bad);  color: #8B2318; }
.alert-warning { background: var(--warn-wash); border-color: var(--signal); color: #7A4400; }
.alert-info    { background: var(--mist);      border-color: var(--ink);   color: var(--ink); }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  text-transform: none; letter-spacing: 0;
  font-size: .78rem; font-weight: 600;
  padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--ink);
}
.badge-warning { background: var(--signal); color: var(--ink); }
.badge-success { background: var(--good); }
.badge-accent  { background: var(--bad); }

/* ── Cards ────────────────────────────────────────────────── */
.card { border: 1px solid var(--line); border-radius: var(--r); padding: var(--s5); }
.card-header { border-bottom: 1px solid var(--line); }

/* ══════════════════════════════════════════════════════════
   NAVIGATION
   Keeps the #navToggle / #navMenu / .nav-toggle-icon contract
   that public/js/app.js binds to.
   ══════════════════════════════════════════════════════════ */
.navbar {
  background: var(--ink);
  height: 68px;
  padding-inline: clamp(1rem, 4vw, 2rem);
  gap: var(--s4);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.navbar-brand { gap: 12px; }
.navbar-logo {
  height: 42px; padding: 3px 6px;
  border-radius: var(--r-sm); background: #fff;
}
.navbar-brand .navbar-appname {
  font-family: var(--font-head);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;          /* was ALL CAPS */
  color: #fff;
}
.navbar-brand .navbar-appname span { color: var(--signal-hi); }

.navbar-nav { gap: 2px; }
.navbar-nav a {
  height: 40px;
  padding-inline: 14px;
  border-radius: var(--r-sm);
  border-bottom: none;
  font-size: .94rem;
  font-weight: 500;
  color: rgba(255,255,255,.78);
}
.navbar-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.navbar-nav a.active {
  color: #fff;
  background: rgba(255,255,255,.1);
  border-bottom: none;
  box-shadow: inset 0 -2px 0 var(--signal);
}
.navbar-nav a.btn {
  height: 40px; min-height: 40px;
  margin-left: 6px; padding: 0 18px;
  border-radius: var(--r-sm);
  font-size: .92rem; font-weight: 600;
}
.navbar-nav a.btn-cta,
.navbar-nav a.btn-primary { background: var(--signal); color: var(--ink); }
.navbar-nav a.btn-cta:hover,
.navbar-nav a.btn-primary:hover { background: var(--signal-hi); color: var(--ink); }
.navbar-nav a.btn-on-ink { border: 1.5px solid rgba(255,255,255,.4); color: #fff; }
.navbar-nav a.btn-on-ink:hover { background: rgba(255,255,255,.12); border-color: #fff; }

.nav-toggle {
  border-radius: var(--r-sm);
  border-color: rgba(255,255,255,.3);
  width: 44px; height: 44px;
  display: none;
  align-items: center; justify-content: center;
}

@media (max-width: 900px) {
  .navbar { height: 62px; }
  .nav-toggle { display: inline-flex; }
  .navbar-nav {
    top: 62px;
    background: var(--ink);
    border-top: 3px solid var(--signal);
    padding: var(--s2) var(--s3) var(--s4);
    gap: 2px;
  }
  .navbar-nav a { height: 50px; min-height: 50px; border-top: none; border-radius: var(--r-sm); }
  .navbar-nav a.btn,
  .navbar-nav a.btn-primary,
  .navbar-nav a.btn-cta {
    height: 50px; min-height: 50px;
    margin: 6px 0 0; padding-inline: 14px;
    justify-content: flex-start;
    background: var(--signal); color: var(--ink);
    border: none;
  }
  .navbar-nav a.btn-on-ink {
    background: transparent; color: #fff;
    border: 1.5px solid rgba(255,255,255,.35);
  }
  .navbar-brand .navbar-appname { font-size: .85rem; }
}
@media (max-width: 380px) {
  .navbar-brand .navbar-appname { display: none; }
}

/* ══════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════ */
footer {
  background: var(--ink);
  color: rgba(255,255,255,.68);
  padding: clamp(3rem, 6vw, 4.5rem) var(--s4) var(--s6);
  border-top: 4px solid var(--signal);
}
footer h4 {
  color: #fff !important;
  font-size: .98rem; font-weight: 600;
  margin-bottom: var(--s3) !important;
}
footer p { color: rgba(255,255,255,.68); font-size: .93rem; margin-bottom: var(--s2); }
footer a { color: rgba(255,255,255,.72); }
footer a:hover { color: var(--signal-hi); text-decoration: none; }
footer strong { color: #fff; }
/* Stacked footer links are navigation, not prose — give them a real tap
   target (WCAG 2.2 target-size) instead of relying on the inline exception. */
footer li { margin-bottom: 2px; }
footer li a,
footer p a {
  display: inline-flex; align-items: center;
  min-height: 40px; padding: 4px 0;
}
.footer-links a {
  display: inline-flex; align-items: center;
  min-height: 40px; padding: 4px 0;
}
.footer-grid { gap: var(--s6); }
.footer-logo {
  height: 68px; width: auto;
  background: #fff; border-radius: var(--r-sm);
  padding: 5px 9px; object-fit: contain;
  display: block; margin-bottom: var(--s4);
}
.footer-base {
  border-top: 1px solid rgba(255,255,255,.14);
  padding-top: var(--s5); margin-top: var(--s6);
  display: flex; flex-wrap: wrap; gap: var(--s3);
  align-items: center; justify-content: space-between;
  font-size: .88rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s4); }
.footer-links a { color: rgba(255,255,255,.6); }
.footer-links a:hover { color: #fff; }

/* PWA install banner */
#install-banner { background: var(--ink); border-top: 3px solid var(--signal); }
#install-banner .btn-primary { background: var(--signal); color: var(--ink); }

/* ══════════════════════════════════════════════════════════
   PAGE SHELL — used by the legal / contact / auth pages
   ══════════════════════════════════════════════════════════ */
.page-head {
  background: var(--ink);
  color: #fff;
  padding: clamp(2.75rem, 6vw, 4.5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
}
.page-head h1 {
  color: #fff;
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  margin-bottom: var(--s3);
}
.page-head p { color: rgba(255,255,255,.75); font-size: 1.06rem; max-width: 62ch; margin: 0; }
.page-head .rule { background: var(--signal); margin-bottom: var(--s4); }

.crumb { display: flex; gap: 8px; align-items: center; font-size: .9rem; margin-bottom: var(--s3); }
.crumb a {
  color: rgba(255,255,255,.7);
  display: inline-flex; align-items: center;
  min-height: 36px; padding: 2px 0;
}
.crumb a:hover { color: var(--signal-hi); }
.crumb span { color: rgba(255,255,255,.4); }

/* Long-form legal copy */
.prose {
  max-width: 74ch;
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4rem) var(--s5);
  font-size: 1.02rem;
}
.prose h2 {
  font-size: 1.4rem; margin-top: var(--s7); margin-bottom: var(--s3);
  padding-bottom: var(--s3); border-bottom: 1px solid var(--line);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.1rem; margin-top: var(--s5); margin-bottom: var(--s2); }
.prose p, .prose li { color: var(--ink-soft); line-height: 1.75; }
.prose p { margin-bottom: var(--s4); }
.prose ul, .prose ol { margin: 0 0 var(--s4) 1.3rem; }
.prose li { margin-bottom: var(--s2); }
.prose a { color: var(--signal-ink); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--ink); }
.prose strong { color: var(--ink); }
.prose__updated {
  display: inline-block; background: var(--mist);
  border-left: 3px solid var(--signal);
  padding: 10px 16px; border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: .92rem; color: var(--ink-soft); margin-bottom: var(--s6);
}
/* The lead-in panel each legal page opens with */
.legal-box {
  background: var(--mist);
  border: 1px solid var(--line);
  border-left: 4px solid var(--signal);
  border-radius: 0 var(--r) var(--r) 0;
  padding: var(--s5);
  margin-bottom: var(--s6);
  color: var(--ink-soft);
  line-height: 1.7;
}
.legal-box strong { display: block; margin-bottom: var(--s2); color: var(--ink); }
/* Tables inside long-form copy (privacy policy) */
.prose table {
  width: 100%; border-collapse: collapse;
  margin: var(--s4) 0 var(--s5); font-size: .93rem;
  display: block; overflow-x: auto;          /* never push the page sideways */
}
.prose thead, .prose table tr:first-child { background: var(--ink); }
.prose table th {
  background: var(--ink); color: #fff;
  padding: 10px 14px; text-align: left; font-weight: 600; white-space: nowrap;
}
.prose table td {
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  vertical-align: top; color: var(--ink-soft);
}
.prose table tr:nth-child(even) td { background: var(--mist); }

/* ══════════════════════════════════════════════════════════
   AUTH — login / register / password shells
   ══════════════════════════════════════════════════════════ */
.auth-wrap {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  background: var(--mist);
}
.auth-panel { padding: clamp(2rem, 5vw, 3.5rem) var(--s5); display: grid; place-items: center; }

/* Single centred card — password reset and other short utility screens */
.auth-solo {
  min-height: calc(100vh - 68px);
  background: var(--mist);
  display: grid; place-items: center;
  padding: clamp(2rem, 6vw, 4rem) var(--s5);
}
.auth-solo .auth-card { max-width: 440px; }
.auth-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .93rem; font-weight: 600; color: var(--ink-soft);
  min-height: 40px; padding: 2px 0;
  margin-bottom: var(--s4);
}
.auth-back:hover { color: var(--signal-ink); }

/* Password strength meter (reset screen) */
.pw-meter { height: 5px; border-radius: var(--r-pill); background: var(--mist-deep); margin-top: 8px; overflow: hidden; }
.pw-meter__bar { height: 100%; width: 0; border-radius: var(--r-pill); transition: width .3s var(--ease), background .3s var(--ease); }
.pw-meter__label { font-size: .82rem; font-weight: 600; margin-top: 5px; min-height: 1.1em; }

/* Left: navy brand rail */
.auth-rail {
  position: relative;
  background: var(--ink);
  color: #fff;
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3.5rem);
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden; isolation: isolate;
}
.auth-rail::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--auth-art, none) center/cover no-repeat;
  opacity: .18;
}
.auth-rail::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(85% 70% at 20% 15%, rgba(247,148,31,.2) 0%, transparent 60%);
}
.auth-rail__mark { display: flex; align-items: center; gap: 12px; margin-bottom: var(--s7); }
.auth-rail__mark img { height: 56px; width: auto; background: #fff; border-radius: var(--r-sm); padding: 4px 7px; }
.auth-rail__mark span { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: #fff; }
.auth-rail h2 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: var(--s4); }
.auth-rail > p { color: rgba(255,255,255,.75); font-size: 1.05rem; max-width: 40ch; margin-bottom: var(--s6); }
.auth-rail ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.auth-rail li { display: flex; align-items: flex-start; gap: 10px; color: rgba(255,255,255,.8); font-size: .96rem; }
.auth-rail li i { color: var(--signal-hi); font-size: 1.2rem; flex-shrink: 0; line-height: 1.35; }

@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; min-height: 0; }
  .auth-rail { padding-block: var(--s6); }
  .auth-rail__mark { margin-bottom: var(--s5); }
  .auth-rail > p { margin-bottom: var(--s5); }
  .auth-rail ul { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; gap: var(--s5); }
  .auth-rail li { font-size: .88rem; white-space: nowrap; }
}
@media (max-width: 620px) {
  .auth-rail h2 { font-size: 1.4rem; }
  .auth-rail > p { font-size: .98rem; }
  .auth-rail ul { display: none; }
}

/* Password field with a show/hide control */
.pw { position: relative; }
/* app.js injects a password-strength bar after every [name="password"].
   It is useful when choosing a password, meaningless when typing a known
   one — so hide it on sign-in forms without touching the shared script. */
.pw--nometer > div { display: none; }
.pw .form-control { padding-right: 48px; }
.pw__toggle {
  position: absolute; top: 0; right: 0;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: none; border: none; cursor: pointer;
  color: var(--ink-faint); font-size: 1.25rem;
  border-radius: var(--r-sm);
}
.pw__toggle:hover { color: var(--ink); }
.auth-card {
  width: 100%; max-width: 460px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-lift);
}
.auth-card--wide { max-width: 780px; }
.auth-card h1 { font-size: 1.6rem; margin-bottom: var(--s2); }
.auth-card > p:first-of-type { margin-bottom: var(--s5); }
.auth-mark { display: flex; align-items: center; gap: 12px; margin-bottom: var(--s5); }
.auth-mark img { height: 52px; width: auto; border-radius: var(--r-sm); }
.auth-foot {
  margin-top: var(--s5); padding-top: var(--s4);
  border-top: 1px solid var(--line);
  font-size: .94rem; color: var(--ink-soft); text-align: center;
}
.auth-foot a {
  color: var(--signal-ink); font-weight: 600;
  display: inline-flex; align-items: center;
  min-height: 36px; padding: 2px 4px;
}

/* Role switch — replaces the old uppercase tab strip */
.role-switch {
  display: grid; grid-auto-flow: column; gap: 4px;
  background: var(--mist-deep); padding: 4px;
  border-radius: var(--r); margin-bottom: var(--s5);
}
.role-switch a {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: .92rem; font-weight: 600;
  color: var(--ink-soft); text-decoration: none;
}
.role-switch a:hover { background: rgba(255,255,255,.7); color: var(--ink); }
.role-switch a[aria-current="page"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(7,31,77,.16); }
.role-switch i { font-size: 1.05rem; }

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  /* Exception: the submit spinner reports status rather than decorating.
     Freezing it at one frame would read as a stuck page, so it keeps
     turning — just slowly, and without the sweeping arc. */
  .btn__spin {
    animation-duration: 1.6s !important;
    animation-iteration-count: infinite !important;
    border-right-color: currentColor;
    opacity: .55;
  }
}
