:root {
    --twbc-blue: #165897;
    --twbc-blue-dark: #1a4a89;
    --twbc-blue-deep: #224080;
    --twbc-blue-soft: #edf6ff;
    --twbc-ink: #0f2340;
    --twbc-copy: #4f6684;
    --twbc-muted: #6d7e93;
    --twbc-line: #ccd9e8;
    --twbc-card: rgba(255,255,255,.96);
}

html,
body.login {
    min-height: 100%;
}

body.login.twbc-auth {
    position: relative;
    margin: 0;
    overflow-x: hidden;
    color: var(--twbc-ink);
    background:
        radial-gradient(circle at 18% 10%, rgba(255,255,255,.98) 0, rgba(255,255,255,.62) 22%, transparent 42%),
        radial-gradient(circle at 88% 22%, rgba(182,214,244,.54) 0, rgba(217,235,251,.26) 26%, transparent 48%),
        linear-gradient(135deg, #f9fcff 0%, #eef6fd 48%, #f8fbff 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html::before {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    z-index: 10;
    height: 5px;
    background: linear-gradient(90deg, var(--twbc-blue-deep), var(--twbc-blue), #397bb8, var(--twbc-blue-deep));
}

body.login.twbc-auth::before {
    content: "";
    position: fixed;
    z-index: 0;
    left: 0;
    top: 0;
    bottom: 0;
    width: clamp(560px, 49vw, 900px);
    pointer-events: none;
    opacity: .95;
    background-image: url("open-bible-bg.png");
    background-repeat: no-repeat;
    background-position: left center;
    background-size: cover;
    filter: saturate(.88) brightness(1.025);
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 58%, rgba(0,0,0,.82) 72%, transparent 100%);
    mask-image: linear-gradient(to right, #000 0%, #000 58%, rgba(0,0,0,.82) 72%, transparent 100%);
}

body.login.twbc-auth::after {
    content: "";
    position: fixed;
    z-index: 0;
    top: 21vh;
    right: 2.5vw;
    width: clamp(390px, 34vw, 590px);
    height: clamp(343px, 29.86vw, 518px);
    pointer-events: none;
    opacity: .050;
    background-image: url("twbc-logo-black.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

body.login #login {
    position: relative;
    z-index: 2;
    width: 520px;
    max-width: calc(100% - 36px);
    margin: 0 auto;
    padding: 38px 0 34px;
}

body.login h1 {
    margin: 0 0 20px;
}

body.login h1 a {
    display: block;
    width: 360px;
    max-width: 92%;
    height: 90px;
    margin: 0 auto;
    overflow: hidden;
    text-indent: -9999px;
    background: url("truewords-logo-black.png") center / contain no-repeat;
}

.twbc-login-intro {
    margin: 0 8px 20px;
    text-align: center;
}

.twbc-login-intro .twbc-kicker {
    margin-bottom: 9px;
    color: var(--twbc-blue);
    font-size: 12px;
    line-height: 1;
    font-weight: 850;
    letter-spacing: .22em;
}

.twbc-login-intro h2 {
    margin: 0 0 8px;
    color: #102147;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 38px;
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -.025em;
}

.twbc-login-intro p {
    max-width: 425px;
    margin: 0 auto;
    color: var(--twbc-copy);
    font-size: 16px;
    line-height: 1.48;
}

.twbc-context-note {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    margin: 0 0 16px;
    padding: 16px 18px;
    border: 1px solid #bcd8f4;
    border-radius: 12px;
    background: linear-gradient(135deg, #f2f8ff 0%, #eaf5ff 100%);
    color: #38536f;
    box-shadow: 0 5px 18px rgba(42, 88, 135, .05);
    font-size: 13.5px;
    line-height: 1.5;
}

.twbc-context-note .twbc-note-icon {
    display: inline-flex;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-top: 1px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2c70b8, #214a92);
    color: #fff;
    font-family: Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 5px 12px rgba(34, 82, 145, .18);
}

.twbc-context-note strong,
.twbc-context-note span {
    display: block;
}

.twbc-context-note strong {
    margin-bottom: 2px;
    color: #173b67;
    font-size: 14px;
}

body.login form {
    margin-top: 0;
    padding: 30px;
    border: 1px solid rgba(190, 207, 224, .9);
    border-radius: 18px;
    background: var(--twbc-card);
    box-shadow:
        0 22px 60px rgba(24, 67, 110, .12),
        0 2px 8px rgba(24, 67, 110, .04);
    backdrop-filter: blur(12px);
}

body.login label {
    color: #1d3556;
    font-size: 13px;
    font-weight: 750;
}

body.login input[type="text"],
body.login input[type="password"],
body.login input[type="email"] {
    min-height: 52px;
    margin-top: 7px;
    padding: 10px 13px;
    border: 1px solid #c9d7e6;
    border-radius: 9px;
    background: rgba(255,255,255,.98);
    box-shadow: inset 0 1px 2px rgba(16, 47, 80, .02);
    color: #10233e;
    font-size: 16px;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

body.login input[type="text"]:focus,
body.login input[type="password"]:focus,
body.login input[type="email"]:focus {
    border-color: #5e97cb;
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(22, 88, 151, .11);
}

body.login .wp-pwd {
    margin-bottom: 18px;
}

body.login .forgetmenot {
    margin-top: 8px;
}

body.login input[type="checkbox"] {
    border-color: #aebfd1;
    border-radius: 3px;
}

body.login input[type="checkbox"]:focus {
    border-color: var(--twbc-blue);
    box-shadow: 0 0 0 2px rgba(22, 88, 151, .12);
}

body.login .button.wp-hide-pw {
    color: #42688f;
}

body.login .button.wp-hide-pw:hover,
body.login .button.wp-hide-pw:focus {
    color: var(--twbc-blue-dark);
}

body.login .button-primary {
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid var(--twbc-blue-dark);
    border-radius: 9px;
    background: linear-gradient(135deg, var(--twbc-blue), var(--twbc-blue-deep));
    box-shadow: 0 8px 18px rgba(28, 76, 139, .18);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-shadow: none;
    transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}

body.login .button-primary:hover,
body.login .button-primary:focus {
    border-color: #153e75;
    background: linear-gradient(135deg, #1b66ab, #1b3e7a);
    box-shadow: 0 10px 23px rgba(28, 76, 139, .24);
    color: #fff;
    transform: translateY(-1px);
}

body.login #nav,
body.login #backtoblog {
    margin: 18px 4px 0;
    padding: 0;
    text-align: center;
    font-size: 14px;
}

body.login #backtoblog {
    margin-top: 10px;
}

body.login #nav a,
body.login #backtoblog a,
body.login .privacy-policy-page-link a {
    color: #2a5f93;
    font-weight: 650;
    text-decoration: none;
    text-underline-offset: 3px;
}

body.login #nav a:hover,
body.login #backtoblog a:hover,
body.login .privacy-policy-page-link a:hover {
    color: #163f6d;
    text-decoration: underline;
}

body.login .message,
body.login .notice,
body.login #login_error {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #c9d9e9;
    border-left: 4px solid var(--twbc-blue);
    border-radius: 9px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 5px 18px rgba(22, 68, 110, .06);
    color: #314a66;
}

body.login #login_error {
    border-left-color: #b42318;
}

body.login .message.register {
    border-left-color: #2e7d5b;
}

.twbc-auth-footer {
    position: relative;
    z-index: 2;
    margin-top: 28px;
    text-align: center;
    color: #73869b;
    font-size: 12px;
    line-height: 1.6;
}

.twbc-auth-footer strong {
    color: #405873;
}

body.login .language-switcher {
    position: relative;
    z-index: 2;
    margin-top: 20px;
}

@media (max-width: 1050px) {
    body.login.twbc-auth::before {
        width: 58vw;
        opacity: .76;
    }

    body.login.twbc-auth::after {
        right: 1.5vw;
        width: 36vw;
        height: 31.65vw;
        opacity: .038;
    }
}

@media (max-width: 820px) {
    body.login.twbc-auth::before {
        width: 67vw;
        opacity: .42;
    }

    body.login.twbc-auth::after {
        top: 26vh;
        right: -4vw;
        width: 43vw;
        height: 37.8vw;
        opacity: .026;
    }
}

@media (max-width: 720px) {
    body.login #login {
        padding-top: 30px;
    }
}

@media (max-width: 540px) {
    body.login.twbc-auth::before {
        display: none;
    }

    body.login #login {
        width: auto;
        max-width: calc(100% - 26px);
        padding-top: 26px;
    }

    body.login h1 {
        margin-bottom: 14px;
    }

    body.login h1 a {
        width: 292px;
        height: 73px;
    }

    .twbc-login-intro {
        margin-bottom: 16px;
    }

    .twbc-login-intro h2 {
        font-size: 31px;
    }

    .twbc-login-intro p {
        font-size: 15px;
    }

    .twbc-context-note {
        padding: 14px 15px;
        border-radius: 11px;
    }

    body.login form {
        padding: 23px 20px;
        border-radius: 14px;
    }

    body.login .button-primary {
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.login .button-primary,
    body.login input {
        transition: none;
    }
}

/* v1.5 — unified My TWBC authentication states */
body.login #nav {
    display: none;
}

.twbc-auth-links {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 10px;
    margin: 18px 0 0;
    padding: 0 12px;
    text-align: center;
    font-size: 14px;
}

.twbc-auth-links a {
    color: #2a5f93;
    font-weight: 700;
    text-decoration: none;
    text-underline-offset: 3px;
}

.twbc-auth-links a:hover,
.twbc-auth-links a:focus {
    color: #163f6d;
    text-decoration: underline;
}

.twbc-link-divider {
    color: #a2b4c7;
    font-size: 12px;
}

body.login.twbc-auth-register form,
body.login.twbc-auth-lostpassword form,
body.login.twbc-auth-retrievepassword form,
body.login.twbc-auth-rp form,
body.login.twbc-auth-resetpass form,
body.login.twbc-auth-logout form {
    margin-top: 0;
}

body.login.twbc-auth-register #reg_passmail {
    margin: 14px 0 0;
    color: #61758b;
    font-size: 12.5px;
    line-height: 1.5;
}

body.login.twbc-auth-register .button-primary,
body.login.twbc-auth-lostpassword .button-primary,
body.login.twbc-auth-retrievepassword .button-primary,
body.login.twbc-auth-rp .button-primary,
body.login.twbc-auth-resetpass .button-primary {
    min-width: 150px;
}

body.login.twbc-auth-logout .button-primary,
body.login.twbc-auth-logout .button-secondary {
    min-height: 44px;
    border-radius: 9px;
    font-weight: 750;
}

body.login.twbc-auth-checkemail form {
    display: none;
}

body.login.twbc-auth-checkemail #backtoblog {
    margin-top: 14px;
}

@media (max-width: 600px) {
    .twbc-auth-links {
        flex-direction: column;
        gap: 7px;
    }

    .twbc-link-divider {
        display: none;
    }
}

/* v1.6 — registration anti-spam protection */
.twbc-registration-honeypot {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.twbc-registration-turnstile {
    margin: 18px 0 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
}

.twbc-registration-turnstile p {
    margin: 0 !important;
    color: #61758b;
    font-size: 11.5px;
    line-height: 1.4;
    text-align: center;
}

.twbc-registration-turnstile .cf-turnstile {
    max-width: 100%;
}

/* 1.7.0 — Optional SMS consent + mobile field for My TWBC registration */
.login form .twbc-register-optional{font-weight:500;color:#6f7c85;font-size:12px}
.twbc-registration-sms-consent{display:grid!important;grid-template-columns:22px minmax(0,1fr);gap:11px;align-items:start;margin:16px 0 18px;padding:14px 15px;border:1px solid #d7dde1;background:#f8fafb;color:#173650!important}
.twbc-registration-sms-consent input[type=checkbox]{width:18px;height:18px;margin:2px 0 0;accent-color:#0b3b63}
.twbc-registration-sms-consent strong{display:block;font-size:12px;line-height:1.35}.twbc-registration-sms-consent small{display:block;margin-top:5px;color:#687984;font-size:10.5px;line-height:1.5}.twbc-registration-sms-consent a{color:#0a527f;text-decoration:underline;text-underline-offset:2px}

/* 1.7.1 — Required operational email agreement + voluntary SMS opt-in */
.twbc-registration-consent{display:grid!important;grid-template-columns:22px minmax(0,1fr);gap:11px;align-items:start;margin:12px 0;padding:14px 15px;border:1px solid #d7dde1;background:#f8fafb;color:#173650!important}
.twbc-registration-consent.twbc-registration-email-consent{background:#f6fafc;border-color:#cad9e1}
.twbc-registration-consent input[type=checkbox]{width:18px;height:18px;margin:2px 0 0;accent-color:#0b3b63}
.twbc-registration-consent strong{display:block;font-size:12px;line-height:1.35}
.twbc-registration-consent small{display:block;margin-top:5px;color:#687984;font-size:10.5px;line-height:1.5}
.twbc-registration-consent a{color:#0a527f;text-decoration:underline;text-underline-offset:2px}
.twbc-auth-legal{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:10px;font-size:11px}
.twbc-auth-legal a{color:inherit;text-decoration:underline;text-underline-offset:2px}
