/* auth.css — Pass-2 page styles (generated by tools/pass2-css.mjs) */

/* ===== folded external sheet: auth.css ===== */
:root {
    --bg: #fbfaf7;
    --bg-elev: #ffffff;
    --bg-sunk: #f3f1ec;
    --ink: #1a1a1a;
    --ink-2: #4a4a4a;
    --ink-3: #8a8780;
    --ink-4: #c4c1b8;
    --line: rgba(20,18,12,0.08);
    --line-2: rgba(20,18,12,0.04);
    --accent: #4f5eed;
    --accent-2: #6b7afa;
    --accent-soft: rgba(79,94,237,0.10);
    --accent-ink: #2b3aa8;
    --ok: #1f8a5a;
    --ok-soft: rgba(31,138,90,0.10);
    --warn: #c97a2b;
    --warn-soft: rgba(201,122,43,0.10);
    --err: #c4543a;
    --err-soft: rgba(196,84,58,0.10);
    --shadow-card: 0 1px 0 rgba(255,255,255,0.7) inset, 0 1px 2px rgba(20,18,12,0.04), 0 8px 20px rgba(20,18,12,0.05);
    --shadow-card-lg: 0 1px 0 rgba(255,255,255,0.7) inset, 0 1px 3px rgba(20,18,12,0.04), 0 20px 50px rgba(20,18,12,0.06);
    --font-display: 'Heebo', system-ui, sans-serif;
    --font-body: 'Heebo', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  }

  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; }
  body {
    background: var(--bg);
    background-image:
      radial-gradient(1200px 700px at 90% -10%, rgba(79,94,237,0.07), transparent 60%),
      radial-gradient(900px 500px at -10% 110%, rgba(184,134,43,0.05), transparent 60%);
    background-attachment: fixed;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
  }
  a { color: var(--accent); text-decoration: none; }
  a:hover { text-decoration: underline; }

  /* ── Page layout ── */
  .auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
  @media (max-width: 960px) { .auth { grid-template-columns: 1fr; } }

  /* ── Form side ── */
  .auth-form-side {
    display: flex; flex-direction: column;
    padding: 32px 48px 40px;
    min-height: 100vh;
  }
  @media (max-width: 640px) { .auth-form-side { padding: 24px 20px 32px; } }

  .auth-topbar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 56px;
  }
  .auth-logo {
    display: inline-flex; align-items: center; gap: 10px;
    text-decoration: none; color: var(--ink);
  }
  .auth-logo-mark {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent) 60%, var(--ok)));
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-weight: 700; font-size: 16px;
    box-shadow: 0 4px 12px color-mix(in oklab, var(--accent) 30%, transparent),
                inset 0 1px 0 rgba(255,255,255,0.2);
    position: relative;
  }
  .auth-logo-mark::after {
    content: ""; position: absolute; inset: 4px;
    border-radius: 6px;
    border: 1.5px solid rgba(255,255,255,0.18);
  }
  .auth-logo-name {
    font-family: var(--font-display); font-size: 17px; font-weight: 700;
    letter-spacing: -0.01em;
  }
  .auth-logo-name span { color: var(--accent); font-weight: 800; }
  .auth-back {
    font-size: 13px; color: var(--ink-3);
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 12px; border-radius: 8px;
    transition: background .15s ease, color .15s ease;
  }
  .auth-back:hover { background: var(--bg-sunk); color: var(--ink); text-decoration: none; }
  .auth-back svg { width: 13px; height: 13px; }

  .auth-form-wrap {
    flex: 1;
    display: flex; flex-direction: column;
    justify-content: safe center;
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
  }

  .auth-h1 {
    font-family: var(--font-display);
    font-size: 32px; font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    line-height: 1.15;
  }
  .auth-sub {
    font-size: 15px; color: var(--ink-2);
    margin: 0 0 28px;
    line-height: 1.55;
  }
  .auth-sub a { font-weight: 600; }

  /* Google button */
  .auth-google {
    appearance: none; cursor: pointer; text-decoration: none;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%;
    padding: 13px 18px;
    border-radius: 12px;
    border: 0.5px solid var(--line);
    background: var(--bg-elev);
    color: var(--ink);
    font: inherit; font-size: 14.5px; font-weight: 600;
    transition: background .15s ease, border-color .15s ease, transform .12s ease;
    box-shadow: var(--shadow-card);
  }
  .auth-google:hover { background: var(--bg-sunk); border-color: color-mix(in oklab, var(--accent) 20%, var(--line)); text-decoration: none; }
  .auth-google:active { transform: scale(0.99); }
  .auth-google svg { width: 18px; height: 18px; }

  /* Divider */
  .auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 22px 0;
    color: var(--ink-3);
    font-size: 12px;
  }
  .auth-divider::before, .auth-divider::after {
    content: ""; flex: 1; height: 1px; background: var(--line);
  }

  /* Tab segmented (email / phone) */
  .auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg-sunk);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 22px;
  }
  .auth-tab {
    appearance: none; border: 0; background: transparent;
    padding: 9px 14px;
    border-radius: 9px;
    font: inherit; font-size: 13.5px; font-weight: 600;
    color: var(--ink-3);
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
  }
  .auth-tab svg { width: 14px; height: 14px; }
  .auth-tab.active {
    background: var(--bg-elev);
    color: var(--ink);
    box-shadow: 0 1px 2px rgba(20,18,12,0.06), 0 0 0 0.5px var(--line);
  }

  /* Form fields */
  .auth-field { margin-bottom: 16px; }
  .auth-field-row {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 6px;
  }
  .auth-label {
    display: block;
    font-size: 13px; font-weight: 600;
    color: var(--ink-2);
  }
  .auth-link-sm {
    font-size: 12.5px; font-weight: 500;
    color: var(--accent);
    background: transparent; border: 0; cursor: pointer;
    padding: 0; font-family: inherit;
  }
  .auth-link-sm:hover { text-decoration: underline; }

  .auth-input-wrap {
    position: relative;
    display: flex; align-items: stretch;
  }
  .auth-input {
    width: 100%;
    padding: 13px 14px;
    border: 0.5px solid var(--line);
    border-radius: 12px;
    background: var(--bg-elev);
    color: var(--ink);
    font: inherit; font-size: 14.5px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  }
  .auth-input::placeholder { color: var(--ink-4); }
  .auth-input:hover { border-color: color-mix(in oklab, var(--accent) 20%, var(--line)); }
  .auth-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .auth-input.has-icon { padding-inline-start: 42px; }
  .auth-input.has-suffix { padding-inline-end: 90px; }
  .auth-input.err { border-color: var(--err); }
  .auth-input.err:focus { box-shadow: 0 0 0 3px var(--err-soft); }
  .auth-input.ltr { direction: ltr; text-align: start; font-family: var(--font-mono); letter-spacing: 0.04em; }

  .auth-input-icon {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    inset-inline-start: 14px;
    width: 16px; height: 16px;
    color: var(--ink-3);
    pointer-events: none;
  }
  .auth-input-suffix {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    inset-inline-end: 6px;
    display: inline-flex; align-items: center;
  }
  .auth-suffix-btn {
    appearance: none; border: 0; background: transparent;
    color: var(--ink-3); cursor: pointer;
    padding: 6px 8px; border-radius: 8px;
    font: inherit; font-size: 12.5px; font-weight: 500;
    display: inline-flex; align-items: center; gap: 5px;
    transition: background .15s ease, color .15s ease;
  }
  .auth-suffix-btn:hover { background: var(--bg-sunk); color: var(--ink); }
  .auth-suffix-btn svg { width: 14px; height: 14px; }

  .auth-error {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--err);
    margin-top: 6px;
  }
  .auth-error svg { width: 13px; height: 13px; flex-shrink: 0; }

  .auth-hint {
    font-size: 12px; color: var(--ink-3);
    margin-top: 6px;
    line-height: 1.5;
  }
  .auth-hint b { color: var(--ink-2); }

  /* Country code split for phone field */
  .auth-phone {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 8px;
    align-items: stretch;
  }
  .auth-phone .auth-input { padding: 13px 14px; }
  .auth-phone .auth-cc {
    text-align: center;
    color: var(--ink-2);
    font-family: var(--font-mono); font-size: 14px;
    direction: ltr;
    background: var(--bg-sunk);
  }

  /* OTP boxes */
  .auth-otp {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    direction: ltr;
  }
  .auth-otp input {
    text-align: center;
    padding: 14px 0;
    font-family: var(--font-mono);
    font-size: 22px; font-weight: 600;
    border: 0.5px solid var(--line);
    border-radius: 12px;
    background: var(--bg-elev);
    color: var(--ink);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
    -moz-appearance: textfield;
  }
  .auth-otp input::-webkit-outer-spin-button,
  .auth-otp input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
  .auth-otp input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .auth-otp input.filled { background: var(--accent-soft); border-color: color-mix(in oklab, var(--accent) 30%, var(--line)); }

  .auth-otp-bar {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 12px;
    font-size: 12.5px; color: var(--ink-3);
  }
  .auth-otp-bar button {
    appearance: none; border: 0; background: transparent;
    color: var(--accent); cursor: pointer;
    font: inherit; font-size: 12.5px; font-weight: 600;
    padding: 0;
  }
  .auth-otp-bar button:hover { text-decoration: underline; }
  .auth-otp-bar button:disabled { color: var(--ink-3); cursor: not-allowed; text-decoration: none; }

  /* Remember row */
  .auth-remember {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 22px;
    font-size: 13px;
  }
  .auth-check {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--ink-2);
    cursor: pointer;
    user-select: none;
  }
  .auth-check input { display: none; }
  .auth-check-box {
    width: 18px; height: 18px;
    border-radius: 5px;
    border: 0.5px solid var(--line);
    background: var(--bg-elev);
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s ease, border-color .15s ease;
  }
  .auth-check input:checked + .auth-check-box {
    background: var(--accent);
    border-color: var(--accent);
  }
  .auth-check-box svg {
    width: 13px; height: 13px;
    color: #fff;
    opacity: 0;
    transition: opacity .12s ease;
  }
  .auth-check input:checked + .auth-check-box svg { opacity: 1; }

  /* Primary submit */
  .auth-submit {
    appearance: none; border: 0; cursor: pointer;
    width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font: inherit; font-size: 14.5px; font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 8px 20px color-mix(in oklab, var(--accent) 28%, transparent);
    transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
  }
  .auth-submit:hover { background: color-mix(in oklab, var(--accent) 85%, #000); }
  .auth-submit:active { transform: scale(0.99); }
  .auth-submit svg { width: 14px; height: 14px; }
  .auth-submit.loading { pointer-events: none; opacity: 0.85; }
  .auth-submit.loading .auth-submit-text { opacity: 0.4; }
  .auth-submit-spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: authSpin .7s linear infinite;
    position: absolute;
  }
  @keyframes authSpin { to { transform: rotate(360deg); } }
  .auth-submit { position: relative; }

  /* Switch link bottom */
  .auth-switch {
    margin-top: 28px;
    text-align: center;
    font-size: 13.5px; color: var(--ink-2);
  }
  .auth-switch a { font-weight: 600; }

  /* Legal mini */
  .auth-legal {
    margin-top: auto;
    padding-top: 32px;
    font-size: 11.5px; color: var(--ink-3);
    text-align: center;
  }
  .auth-legal a { color: var(--ink-3); text-decoration: underline; }

  /* Recovery sent state */
  .auth-success {
    background: var(--ok-soft);
    border: 0.5px solid color-mix(in oklab, var(--ok) 22%, transparent);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 22px;
    display: flex; gap: 14px; align-items: flex-start;
  }
  .auth-success-ic {
    flex-shrink: 0;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--ok);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .auth-success-ic svg { width: 18px; height: 18px; }
  .auth-success-title { font-size: 14.5px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
  .auth-success-text { font-size: 13px; color: var(--ink-2); line-height: 1.55; }
  .auth-success-text b { color: var(--ink); }

  /* ── Brand side ── */
  .auth-brand-side {
    background:
      radial-gradient(700px 500px at 20% 30%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 60%),
      radial-gradient(500px 400px at 80% 80%, color-mix(in oklab, var(--ok) 16%, transparent), transparent 60%),
      linear-gradient(160deg, #1a1a1a, #2a2a2a);
    color: #fff;
    display: flex; flex-direction: column;
    padding: 48px 56px;
    /* Pin to the viewport so the brand text centers on screen, not in the
       grid row — otherwise a long form (e.g. signup) stretches this column
       and pushes the centered text far down. */
    align-self: start;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
  }
  @media (max-width: 960px) { .auth-brand-side { display: none; } }

  .auth-brand-side::before {
    content: ""; position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 80%);
  }

  .auth-brand-content {
    flex: 1;
    display: flex; flex-direction: column; justify-content: safe center;
    max-width: 460px;
    position: relative;
    z-index: 1;
  }

  .auth-brand-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 0.5px solid rgba(255,255,255,0.12);
    font-size: 11.5px; font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    margin-bottom: 22px;
    width: fit-content;
  }
  .auth-brand-eyebrow svg { width: 14px; height: 14px; }

  .auth-brand-title {
    font-family: var(--font-display);
    font-size: 38px; font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.022em;
    margin: 0 0 16px;
    text-wrap: balance;
  }
  .auth-brand-title em {
    font-style: normal;
    background: linear-gradient(120deg, #fff, color-mix(in oklab, var(--accent-2) 60%, #fff));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  .auth-brand-sub {
    font-size: 16px; line-height: 1.6;
    color: rgba(255,255,255,0.7);
    margin: 0 0 36px;
    max-width: 42ch;
    text-wrap: pretty;
  }

  .auth-brand-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 24px 26px;
    background: rgba(255,255,255,0.04);
    border: 0.5px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    backdrop-filter: blur(8px);
  }
  .auth-brand-stat b {
    display: block;
    font-family: var(--font-display);
    font-size: 26px; font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, #fff, color-mix(in oklab, var(--accent-2) 80%, #fff));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
  }
  .auth-brand-stat span {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    line-height: 1.4;
  }

  .auth-brand-quote {
    margin-top: 36px;
    padding: 22px 26px;
    background: rgba(255,255,255,0.04);
    border-inline-start: 3px solid var(--accent-2);
    border-radius: 12px;
  }
  .auth-brand-quote p {
    font-size: 15px; line-height: 1.55;
    color: rgba(255,255,255,0.92);
    margin: 0 0 12px;
    text-wrap: pretty;
  }
  .auth-brand-quote-meta {
    display: flex; align-items: center; gap: 10px;
  }
  .auth-brand-quote-pic {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5b91e, #c75a3a);
    color: #fff; font-weight: 700; font-size: 13px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .auth-brand-quote-meta b { font-size: 13px; font-weight: 600; }
  .auth-brand-quote-meta span { font-size: 11.5px; color: rgba(255,255,255,0.55); }

  /* Floating code snippet decoration */
  .auth-brand-code {
    margin-top: 28px;
    background: rgba(0,0,0,0.4);
    border: 0.5px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 16px 18px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.8;
    color: rgba(255,255,255,0.7);
    direction: ltr;
    text-align: left;
  }
  .auth-brand-code .k { color: #c89bff; }
  .auth-brand-code .s { color: #80d8a4; }
  .auth-brand-code .c { color: rgba(255,255,255,0.4); }
  .auth-brand-code .fn { color: #6b7afa; }

/* ===== inline design block #0 (from signup.guest.html) ===== */
/* signup-specific tweaks */
  .auth-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  @media (max-width: 480px) { .auth-grid-2 { grid-template-columns: 1fr; } }

  .auth-pwd-meter {
    margin-top: 8px;
    display: flex; gap: 4px;
  }
  .auth-pwd-meter i {
    flex: 1; height: 4px;
    border-radius: 2px;
    background: var(--bg-sunk);
    transition: background .2s ease;
  }
  .auth-pwd-meter.s1 i:nth-child(-n+1) { background: var(--err); }
  .auth-pwd-meter.s2 i:nth-child(-n+2) { background: var(--warn); }
  .auth-pwd-meter.s3 i:nth-child(-n+3) { background: #c89100; }
  .auth-pwd-meter.s4 i:nth-child(-n+4) { background: var(--ok); }
  .auth-pwd-meter-lbl {
    font-size: 12px;
    margin-top: 6px;
    color: var(--ink-3);
    display: flex; justify-content: space-between;
  }
  .auth-pwd-meter-lbl b { color: var(--ink); font-weight: 600; }

  .auth-pwd-rules {
    margin-top: 8px;
    display: flex; flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 11.5px;
    color: var(--ink-3);
  }
  .auth-pwd-rule {
    display: inline-flex; align-items: center; gap: 4px;
  }
  .auth-pwd-rule .dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--bg-sunk);
    color: var(--ink-3);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .auth-pwd-rule .dot svg { width: 8px; height: 8px; }
  .auth-pwd-rule.met { color: var(--ok); }
  .auth-pwd-rule.met .dot { background: var(--ok); color: #fff; }

  .auth-terms-check {
    display: flex; align-items: flex-start; gap: 10px;
    margin-bottom: 22px;
    cursor: pointer;
    user-select: none;
  }
  .auth-terms-check input { display: none; }
  .auth-terms-check-box {
    width: 20px; height: 20px;
    border-radius: 6px;
    border: 0.5px solid var(--line);
    background: var(--bg-elev);
    flex-shrink: 0;
    margin-top: 1px;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s ease, border-color .15s ease;
  }
  .auth-terms-check input:checked + .auth-terms-check-box {
    background: var(--accent);
    border-color: var(--accent);
  }
  .auth-terms-check-box svg {
    width: 13px; height: 13px;
    color: #fff;
    opacity: 0;
  }
  .auth-terms-check input:checked + .auth-terms-check-box svg { opacity: 1; }
  .auth-terms-text {
    font-size: 13px;
    color: var(--ink-2);
    line-height: 1.5;
  }
  .auth-terms-text a {
    font-weight: 600;
    color: var(--accent);
  }

/* ── Minimal auth chrome (header-auth.php / footer-auth.php) ───────────────── */
.cc-auth-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px 32px;
  max-width: 1100px; margin: 0 auto; width: 100%;
}
.cc-auth-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.cc-auth-logo .gh-logo-mark {
  width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--bg-elev); font-family: var(--font-mono); font-weight: 700; font-size: 14px;
}
.cc-auth-logo .gh-logo-name { font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.cc-auth-logo .gh-logo-name span { color: var(--accent); }
.cc-auth-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 500; color: var(--ink-3); text-decoration: none;
  padding: 8px 12px; border-radius: 10px;
}
.cc-auth-back:hover { color: var(--ink); background: var(--bg-sunk); text-decoration: none; }
