  :root {
    --blue-700: #1e40af;
    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --blue-50: #eff6ff;
    --ink-900: #0a0a0f;
    --ink-800: #18181b;
    --ink-700: #27272a;
    --ink-500: #71717a;
    --ink-400: #a1a1aa;
    --ink-300: #d4d4d8;
    --ink-200: #e4e4e7;
    --ink-100: #f4f4f5;
    --ink-50: #fafafa;
    --green-500: #10b981;
    --amber-500: #f59e0b;
    --red-500: #dc2626;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08), 0 4px 8px rgba(15, 23, 42, 0.04);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
  }

  *,
  *::before,
  *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink-800);
    background: var(--ink-50);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  /* Always push the footer below the fold, only applies on single-section pages
     so multi-section pages aren't affected */
  body>section:only-of-type,
  body>main:only-of-type {
    flex: 1 0 auto;
    min-height: calc(100vh - 65px);
  }

  body>footer {
    margin-top: auto;
  }

  a {
    color: var(--blue-600);
    text-decoration: none;
  }

  a:hover {
    text-decoration: underline;
  }

  .container {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 40px;
  }

  /* Buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
  }

  .btn-primary {
    background: var(--blue-600);
    color: #fff;
  }

  .btn-primary:hover {
    background: var(--blue-700);
    text-decoration: none;
  }

  .btn-block {
    width: 100%;
  }

  /* In-button spinner used while the form is submitting */
  .btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
    display: inline-block;
    vertical-align: middle;
  }

  @keyframes btn-spin {
    to {
      transform: rotate(360deg);
    }
  }

  .btn[disabled] {
    opacity: 0.85;
    cursor: not-allowed;
  }

  /* Nav (black, logo-only on auth pages) */
  .nav {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: #0f172a;
  }

  .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    /* 1000px outer minus 40+40 padding = 920px visible content (matches body content width) */
    max-width: 1380px;
    margin: 0 auto;
  }

  .logo {
    display: inline-block;
    line-height: 0;
  }

  .nav .logo img {
    height: 28px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
  }

  .nav-meta {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
  }

  .nav-meta-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    background: transparent;
    text-decoration: none;
    transition: all 0.15s ease;
  }

  .nav-meta-btn:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: #fff;
    text-decoration: none;
  }

  /* Auth card, top-aligned at a fixed height so login + signup match */
  .auth-shell {
    flex: 1 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 56px 24px 48px;
  }

  .auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
  }

  .auth-title {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 26px;
    font-weight: 600;
    color: var(--ink-900);
    line-height: 1.2;
    margin-bottom: 36px;
    text-align: center;
  }

  .auth-sub {
    color: var(--ink-500);
    font-size: 14px;
    margin-bottom: 28px;
  }

  /* Social sign-in buttons, official Google + Apple brand specs */
  .social-login {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
  }

  .btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    border: 1px solid transparent;
  }

  .btn-google {
    background: #fff;
    color: #1f1f1f;
    border-color: #dadce0;
    font-family: 'Roboto', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  }

  .btn-google:hover {
    background: #f8f9fa;
    border-color: #d2d4d8;
    text-decoration: none;
  }

  .btn-apple {
    background: #000;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    font-weight: 500;
  }

  .btn-apple:hover {
    background: #1a1a1a;
    text-decoration: none;
  }

  .btn-apple .apple-glyph {
    display: inline-flex;
    align-items: center;
    margin-top: -2px;
  }

  .auth-or {
    position: relative;
    text-align: center;
    margin: 4px 0 20px;
    color: var(--ink-500);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
  }

  .auth-or::before,
  .auth-or::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 24px);
    height: 1px;
    background: var(--ink-200);
  }

  .auth-or::before {
    left: 0;
  }

  .auth-or::after {
    right: 0;
  }

  /* Form */
  .form-row {
    margin-bottom: 16px;
  }

  .form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-700);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
  }

  .form-input {
    width: 100%;
    background: #fff;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    color: var(--ink-900);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
  }

  .form-input:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  }

  .form-input-wrap {
    position: relative;
  }

  .form-toggle-pw {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-500);
    cursor: pointer;
    border-radius: 4px;
  }

  .form-toggle-pw:hover {
    color: var(--ink-800);
    background: var(--ink-100);
  }

  /* Password strength meter */
  .pw-strength {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--ink-500);
  }

  .pw-strength-bar {
    flex: 1;
    height: 4px;
    background: var(--ink-100);
    border-radius: 2px;
    overflow: hidden;
  }

  .pw-strength-bar-fill {
    height: 100%;
    width: 0;
    background: var(--ink-300);
    transition: width 0.15s, background 0.15s;
  }

  .pw-strength.weak .pw-strength-bar-fill {
    width: 25%;
    background: var(--red-500);
  }

  .pw-strength.fair .pw-strength-bar-fill {
    width: 50%;
    background: var(--amber-500);
  }

  .pw-strength.good .pw-strength-bar-fill {
    width: 75%;
    background: #84cc16;
  }

  .pw-strength.strong .pw-strength-bar-fill {
    width: 100%;
    background: var(--green-500);
  }

  .pw-strength.weak .pw-strength-label {
    color: var(--red-500);
  }

  .pw-strength.fair .pw-strength-label {
    color: var(--amber-500);
  }

  .pw-strength.good .pw-strength-label {
    color: #65a30d;
  }

  .pw-strength.strong .pw-strength-label {
    color: var(--green-500);
  }

  .form-fineprint {
    margin-top: 16px;
    font-size: 12px;
    color: var(--ink-500);
    line-height: 1.5;
  }

  .form-fineprint a {
    color: var(--blue-600);
  }

  .auth-divider {
    margin: 24px 0;
    border-top: 1px solid var(--ink-200);
  }

  .auth-switch {
    text-align: center;
    color: var(--ink-500);
    font-size: 14px;
  }

  .auth-switch a {
    font-weight: 600;
  }

  /* Trust line under the card */
  .auth-trust {
    margin-top: 18px;
    text-align: center;
    color: var(--ink-500);
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  .auth-trust svg {
    color: var(--green-500);
  }

  /* Footer (matches sitewide) */
  .footer {
    background: #1a202c;
    color: var(--ink-400);
    padding: 64px 0 32px;
  }

  .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 48px;
    max-width: 1300px;
    margin: 0 auto 48px;
  }

  .footer-brand p {
    margin-top: 16px;
    font-size: 14px;
    color: var(--ink-400);
    max-width: 280px;
    line-height: 1.55;
  }

  .footer-col h4 {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
  }

  .footer-col ul {
    list-style: none;
  }

  .footer-col li {
    margin-bottom: 10px;
  }

  .footer-col a {
    color: var(--ink-400);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.15s;
  }

  .footer-col a:hover {
    color: #fff;
  }

  .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--ink-500);
    max-width: 1300px;
    margin: 0 auto;
  }

  .footer .logo img {
    height: 24px;
    filter: brightness(0) invert(1) opacity(0.92);
  }

  @media (max-width: 760px) {
    .footer-grid {
      grid-template-columns: 1fr 1fr;
    }
  }

  @media (max-width: 640px) {
    .footer {
      padding: 32px 0 18px;
    }

    .footer-grid {
      grid-template-columns: 1fr;
      gap: 24px;
      margin-bottom: 24px;
    }

    .footer-bottom {
      flex-direction: column;
      gap: 10px;
      align-items: flex-start;
      font-size: 12px;
    }
  }

  @media (max-width: 480px) {
    .auth-card {
      padding: 28px 22px;
    }
  }

  /* =========================================================
     Mobile responsive (≤ 640px)
     ========================================================= */
  @media (max-width: 640px) {
    .container {
      padding: 0 16px;
    }

    /* Nav */
    .nav-inner {
      padding: 12px 16px;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: center;
    }

    .nav .logo img {
      height: 26px;
    }

    .nav-meta {
      font-size: 13px;
    }

    /* Auth shell */
    .auth-shell {
      padding: 28px 0;
    }

    .auth-card {
      padding: 24px 18px;
      border-radius: var(--radius-md);
    }

    .auth-title {
      font-size: 22px;
      line-height: 1.2;
    }

    .auth-sub {
      font-size: 13px;
    }

    /* Social buttons */
    .social-login {
      gap: 8px;
    }

    .btn-social {
      height: 44px;
      font-size: 14px;
    }

    /* Form */
    .form-group {
      gap: 6px;
    }

    .form-label {
      font-size: 13px;
    }

    .form-input {
      font-size: 16px;
      padding: 12px 14px;
    }

    .auth-submit {
      width: 100%;
      padding: 14px;
      font-size: 15px;
    }

    /* Strength meter */
    .strength-meter {
      gap: 4px;
    }

    .strength-bars {
      gap: 3px;
    }

    .strength-bar {
      height: 4px;
    }

    .strength-label {
      font-size: 11px;
    }

    /* Legal disclosure */
    .auth-legal {
      font-size: 11px;
      padding: 12px;
    }

    /* Footer */
    .footer {
      padding: 28px 0 16px;
    }

    .footer-bottom {
      flex-direction: column;
      align-items: flex-start;
      gap: 8px;
      font-size: 12px;
    }
  }

  /* Small phones (≤ 380px) */
  @media (max-width: 380px) {
    .auth-title {
      font-size: 19px;
    }

    .nav-meta {
      font-size: 12px;
    }
  }