/*  ============================================
    Landing Pages — theEngine v2
    Covers: services.html, login.html and reset-password.html

    Each page is its own document. Cross-document view
    transitions morph the shared canvas + brand logo
    between navigations (see @view-transition below).

    Font: Avenir Next (system)
    Palette: deep navy radial gradient + #f2e94b yellow
    ============================================ */

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

:root {
    --auth-font:      'Avenir Next', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --auth-navy:      #0b2236;
    --auth-dark:      #081722;
    --auth-backdrop:  radial-gradient(120% 95% at 25% 22%, #11304a 0%, var(--auth-navy) 40%, var(--auth-dark) 100%);
    --auth-yellow:    #f2e94b;
    --auth-text:      #eaf1f7;
    --auth-muted:     rgba(204, 217, 228, 0.72);
    --auth-muted-dim: rgba(159, 179, 196, 0.65);
    /* Right panel (form) */
    --form-bg:        #f7f9fb;
    --form-border:    #e2e8ee;
    --form-text:      #0b2236;
    --form-muted:     #6b8294;
    --form-link:      #3f6f96;
    /* Status colours, mirrored from variables.css (not loaded on these pages). */
    --success-rgb:        16, 185, 129;
    --danger-rgb:         239, 68, 68;
    --warning-rgb:        245, 158, 11;
    --color-success:      rgb(var(--success-rgb));
    --color-success-text: #047857;
    --color-danger-text:  #B91C1C;
    --color-warning-text: #92400E;
}

/* -----------------------------------------------
   Page shell
   ----------------------------------------------- */
body {
    font-family: var(--auth-font);
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    background: var(--auth-dark);
    display: flex;
    color: var(--auth-text);
}

.auth-root {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* -----------------------------------------------
   Shared: canvas + vignette overlay
   ----------------------------------------------- */
.auth-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
    view-transition-name: auth-canvas;
}

/* Keep the canvas and brand logo continuous between account pages. */
@view-transition {
    navigation: auto;
}

::view-transition-group(root),
::view-transition-group(auth-canvas),
::view-transition-group(brand-logo) {
    animation-duration: 600ms;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
}

.auth-vignette {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(80% 60% at 50% 50%, rgba(8,23,34,0) 40%, rgba(8,23,34,0.55) 100%);
}

/* ===============================================
   LANDING PANEL — default state
   =============================================== */
.landing-panel {
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 90% at 22% 18%, #11304a 0%, #0b2236 38%, #081722 100%);
    overflow: hidden;
    z-index: 2;
}

/* Content wrapper — sits above canvas */
.landing-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Matches .login-left__inner padding so the logo sits at the same viewport
       coordinates on both pages — keeps the brand-logo view-transition morph
       position-neutral (logo appears to stay put across navigations). */
    padding: 44px clamp(36px, 4.5vw, 72px) 36px;
}

/* -----------------------------------------------
   Header / topbar
   ----------------------------------------------- */
.landing-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-shrink: 0;
}

/* Keep the brand logo in place during transitions between account pages. */
.logo--landing {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
    view-transition-name: brand-logo;
    /* Force content-sized box so old/new view-transition snapshots match
       even when the logo sits inside a column-flex parent that would
       otherwise stretch it. */
    width: max-content;
}

.logo--landing img {
    height: 36px;
    filter: brightness(0) invert(1);
}

.logo__sep {
    color: #FFFFFF;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
}

.logo__text {
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    letter-spacing: 0.02em;
}

.logo__the {
    color: var(--auth-yellow);
    font-style: normal;
}

/* Navigation — right side of header */
.landing-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 12.5px;
    letter-spacing: 0.16em;
    font-weight: 600;
    color: var(--auth-muted-dim);
}

.landing-nav .nav-dot {
    opacity: 0.5;
}

/* Hero */
.landing-kicker {
    font-size: clamp(11px, 0.9vw, 13px);
    letter-spacing: 0.34em;
    font-weight: 700;
    color: var(--auth-yellow);
    margin-bottom: clamp(12px, 2vh, 24px);
}

.landing-desc {
    max-width: 580px;
    margin: clamp(20px, 3vh, 34px) 0 0;
    font-size: clamp(16px, 1.25vw, 19px);
    line-height: 1.55;
    color: var(--auth-muted);
}

/* CTA buttons */
.btn-landing-secondary,
.btn-landing-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-landing-secondary {
    padding: 17px 30px;
    border-radius: 12px;
    border: 1.5px solid rgba(207, 218, 228, 0.28);
    background: rgba(255, 255, 255, 0.02);
    color: #eaf1f7;
    font-family: var(--auth-font);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-landing-secondary:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(207, 218, 228, 0.5);
}

.btn-landing-primary {
    padding: 17px 34px;
    border-radius: 12px;
    border: none;
    background: var(--auth-yellow);
    color: var(--auth-navy);
    font-family: var(--auth-font);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(242, 233, 75, 0.22);
    transition: all 0.2s ease;
}

.btn-landing-primary:hover {
    background: #f7f06a;
    box-shadow: 0 10px 38px rgba(242, 233, 75, 0.34);
}

/* -----------------------------------------------
   Landing footer — copyright + background switcher
   ----------------------------------------------- */
.landing-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.trademark {
    font-size: 13px;
    color: rgba(159, 179, 196, 0.5);
}


/* Sign-in page */
body.sign-in-page {
    display: grid;
    grid-template-rows: 1fr auto 1fr;
    gap: clamp(16px, 3vh, 28px);
    min-height: 100dvh;
    height: auto;
    padding: clamp(20px, 3.5vw, 44px) clamp(16px, 4.5vw, 72px);
    overflow: visible;
    isolation: isolate;
}

.sign-in-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--auth-backdrop);
}

.sign-in-page > header {
    place-self: start;
}

.sign-in-card {
    --card-section-gap: clamp(22px, 2.4vw, 28px);
    --form-bg: #edf4f9;
    --form-border: #233e4f;
    --form-text: #081a29;
    --form-muted: #0a2234;
    --form-link: #05243d;
    --color-success: #0b6548;
    justify-self: center;
    width: min(100%, 496px);
    min-width: 0;
    padding: clamp(28px, 3.4vw, 44px);
    border: 1px solid rgba(240, 249, 255, 0.64);
    border-radius: 24px;
    background: #deebf3;
    color: var(--form-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 20px 60px rgba(4, 12, 20, 0.32);
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
    .sign-in-card {
        --form-bg: linear-gradient(125deg, rgba(249, 252, 255, 0.40), rgba(239, 248, 255, 0.23));
        --form-focus-bg: var(--form-bg), rgba(243, 250, 255, 0.20);
        background: linear-gradient(140deg,
            rgba(248, 252, 255, 0.71),
            rgba(232, 243, 252, 0.58) 58%,
            rgba(228, 241, 251, 0.63));
        -webkit-backdrop-filter: blur(1px) saturate(135%) brightness(135%);
        backdrop-filter: blur(1px) saturate(135%) brightness(135%);
    }
}

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
    .sign-in-card {
        --form-bg: #edf4f9;
        --form-focus-bg: #fff;
        background: #deebf3;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}

.sign-in-card input {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66), 0 1px 2px rgba(8, 26, 41, 0.10);
}

.sign-in-card input::placeholder {
    color: #1f3848;
    opacity: 1;
}

.sign-in-card .btn-submit:disabled {
    opacity: 1;
}

.sign-in-card .login-title {
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -0.025em;
    white-space: normal;
}

.sign-in-card .typewriter-word {
    white-space: nowrap;
}

/* Keep the active view's heading and form in the card's mobile grid. */
.sign-in-card__view {
    display: contents;
}

.sign-in-card__view:not(#sign-in):not(:target),
.sign-in-card__view:target ~ #sign-in {
    display: none;
}

.sign-in-card__heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: var(--card-section-gap);
}

.sign-in-card__intro p {
    margin-top: 8px;
    color: var(--form-muted);
    font-size: 15px;
    line-height: 1.45;
}

.sign-in-card .btn-back-to-landing {
    min-height: 36px;
    padding: 0 10px 0 6px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--form-text);
}

.sign-in-card .btn-back-to-landing:hover {
    color: var(--form-text);
    background: rgba(11, 34, 54, 0.08);
}

.sign-in-card form {
    display: grid;
    gap: var(--card-section-gap);
    min-width: 0;
}

.sign-in-fields {
    display: grid;
    gap: 18px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.sign-in-card .form-group {
    display: grid;
    row-gap: 6px;
    min-width: 0;
    margin: 0;
}

.sign-in-card label {
    margin: 0;
    line-height: 1.4;
}

.sign-in-card .form-group input {
    min-width: 0;
    min-height: 52px;
    padding: 12px 16px;
}

.sign-in-card .password-input-wrapper input {
    padding-right: 52px;
}

.sign-in-card .password-toggle {
    display: grid;
    place-items: center;
    right: 4px;
    width: 44px;
    height: 44px;
    padding: 0;
}

.sign-in-password {
    grid-template-columns: 1fr auto;
    grid-template-areas: "label help" "input input";
    align-items: baseline;
    column-gap: 12px;
}

.sign-in-password label { grid-area: label; }
.sign-in-password .password-input-wrapper { grid-area: input; }

.sign-in-password .link {
    grid-area: help;
    font-size: 14px;
    line-height: 1.75;
    text-underline-offset: 3px;
}

.sign-in-actions .btn-submit {
    display: block;
    min-height: 52px;
    margin: 0;
    padding: 14px 18px;
    line-height: 1.4;
}

.sign-in-actions :is(.error, .success, p:not(:empty)) {
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 1.45;
    text-align: left;
}

.sign-in-card .info-message {
    margin: 0;
    text-align: left;
}

.sign-in-card__footer {
    display: grid;
    justify-items: center;
    gap: 2px;
    padding-top: 14px;
    color: var(--form-muted);
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.sign-in-card__footer .link {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    font-size: inherit;
    text-underline-offset: 3px;
}

/* ===============================================
   SPLIT LAYOUT (.auth-split on .auth-root)
   Used by reset-password.
   Dark left brand panel (54%) + white right form panel (46%).
   =============================================== */

/* Left panel — brand panel with canvas */
.login-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 54%;
    height: 100%;
    background: var(--auth-backdrop);
    overflow: hidden;
    z-index: 3;
    color: var(--auth-text);
}

.admin-logo {
    display: block;
    width: auto;
    height: 36px;
    color: #fff;
}

.admin-logo__label {
    fill: var(--auth-yellow);
    font-size: 33px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.login-left__inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 44px clamp(36px, 4.5vw, 72px) 36px;
}

.login-left__content {
    margin-top: auto;
}

.login-left__eyebrow {
    font-size: 13px;
    letter-spacing: 0.32em;
    font-weight: 700;
    color: var(--auth-yellow);
    margin-bottom: 22px;
}

.login-left__headline {
    font-size: clamp(44px, 5vw, 78px);
    line-height: 0.95;
    letter-spacing: -0.02em;
    font-weight: 800;
    max-width: 9ch;
    margin: 0;
}

.login-left__headline span {
    color: var(--auth-yellow);
}

.login-left__sub {
    max-width: 420px;
    margin: 28px 0 0;
    font-size: clamp(15px, 1.1vw, 18px);
    line-height: 1.55;
    color: rgba(204, 217, 228, 0.7);
}

.login-left__footer {
    margin-top: auto;
    padding-top: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.btn-back-to-landing {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: none;
    border: none;
    font-family: var(--auth-font);
    font-size: 14px;
    font-weight: 500;
    color: rgba(204, 217, 228, 0.62);
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.btn-back-to-landing__icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

.btn-back-to-landing:hover {
    color: #eaf1f7;
    background: transparent;
    transform: none;
    box-shadow: none;
}

/* Right panel — white form */
.login-right {
    position: absolute;
    top: 0;
    right: 0;
    width: 46%;
    height: 100%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px clamp(28px, 4vw, 64px);
    z-index: 3;
}

/* -----------------------------------------------
   Form wrapper
   ----------------------------------------------- */
.login-form-wrapper {
    width: 100%;
    max-width: 420px;
}

/* Blinking cursor on "Welcome back" */
@keyframes engBlink {
    0%, 49%  { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.login-title {
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--form-text);
    margin: 0;
    white-space: nowrap;
}

.login-cursor {
    display: inline-block;
    width: 3px;
    height: 0.82em;
    background: var(--form-text);
    animation: engBlink 1.1s steps(1) infinite;
    flex-shrink: 0;
}

.login-subtitle {
    margin: 14px 0 40px;
    font-size: 17px;
    color: var(--form-muted);
}

/* -----------------------------------------------
   Form fields
   ----------------------------------------------- */
.form-group {
    margin-bottom: 26px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--form-text);
    margin-bottom: 9px;
    font-family: var(--auth-font);
    letter-spacing: 0;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 16px 18px;
    border: 1.5px solid var(--form-border);
    border-radius: 12px;
    font-size: 16px;
    font-family: var(--auth-font);
    color: var(--form-text);
    background: var(--form-bg);
    transition: border-color 0.15s, box-shadow 0.15s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--form-text);
    box-shadow: 0 0 0 4px rgba(11, 34, 54, 0.08);
    background: var(--form-focus-bg, #ffffff);
}

.sign-in-card :is(input, button, a):focus-visible {
    outline: 2px solid var(--form-text);
    outline-offset: 3px;
}

input::placeholder {
    color: #9aa9b6;
}

/* Password toggle */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 52px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    padding: 7px 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--form-muted);
    font-family: var(--auth-font);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: color 0.15s;
    width: auto;
    height: auto;
    margin: 0;
}

.password-toggle:hover {
    color: var(--form-text);
    background: transparent;
    transform: translateY(-50%);
    box-shadow: none;
}

.password-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

/* -----------------------------------------------
   Links
   ----------------------------------------------- */
.link {
    cursor: pointer;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    color: var(--form-link);
    transition: color 0.15s;
}

.link:hover {
    text-decoration: underline;
}

.link.link--create-account {
    color: var(--form-text);
    font-weight: 700;
    text-decoration: none;
}

.link.link--create-account:hover {
    text-decoration: underline;
}

.back-to-signin {
    text-align: center;
    margin-top: 28px;
}

.back-to-signin a {
    color: var(--form-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: color 0.2s;
}

.back-to-signin a:hover {
    color: var(--form-text);
}

/* -----------------------------------------------
   Submit button
   ----------------------------------------------- */
.btn-submit {
    width: 100%;
    margin-top: 34px;
    padding: 18px;
    border: none;
    border-radius: 12px;
    background: var(--form-text);
    color: #ffffff;
    font-family: var(--auth-font);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.1s;
}

/* Inset shadow draws the outline without shifting layout (the button has no border). */
.btn-submit:hover:not(:disabled) {
    background: transparent;
    color: var(--form-text);
    box-shadow: inset 0 0 0 2px var(--form-text);
}

.btn-submit:active:not(:disabled) {
    background: #0f2d45;
    color: #E8D72F;
    box-shadow: none;
    transform: scale(0.99);
}

.btn-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Success flash — applied via JS on a successful submit */
.btn-submit.is-success,
.btn-submit.is-success:hover {
    background: var(--color-success);
    color: #ffffff;
    box-shadow: none;
}

button {
    font-family: var(--auth-font);
}

/* -----------------------------------------------
   Feedback banners
   ----------------------------------------------- */
.error,
.success {
    margin-top: 16px;
    padding: 12px 16px;
    border: 1px solid;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    display: none;
}

.error {
    background: #FEF2F2;
    color: var(--color-danger-text);
    border-color: rgba(var(--danger-rgb), 0.30);
}

.success {
    background: #ECFDF5;
    color: var(--color-success-text);
    border-color: rgba(var(--success-rgb), 0.30);
}

.error.show,
.success.show { display: block; }

/* Sibling: info banner (e.g. "logged out due to inactivity") — prepended
   above the form so it uses margin-bottom instead of margin-top. */
.info-message {
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #FFFBEB;
    color: var(--color-warning-text);
    border: 1px solid rgba(var(--warning-rgb), 0.35);
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

/* -----------------------------------------------
   Loading spinner
   ----------------------------------------------- */
.loading-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.30);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

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

/* -----------------------------------------------
   Mobile responsive (≤900px)
   ----------------------------------------------- */
@media (max-width: 900px) {
    .landing-inner {
        padding: 36px 28px;
    }

    .landing-panel {
        overflow-y: auto;
    }

    .landing-inner {
        height: auto;
        min-height: 100%;
    }

    .landing-kicker {
        display: none;
    }

    .landing-desc {
        font-size: 16px;
    }

    .landing-nav {
        display: none;
    }

    .auth-root.auth-split {
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        background: #ffffff;
    }

    .login-left,
    .login-right {
        position: relative;
        width: 100%;
        height: auto;
    }

    .login-left {
        background: #ffffff;
    }

    .login-left .auth-canvas,
    .login-left .auth-vignette,
    .login-left__content {
        display: none;
    }

    .login-left__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 28px 28px 0;
    }

    .login-left__footer {
        margin: 0;
        padding: 0;
    }

    .login-left .btn-back-to-landing {
        color: #5b7186;
        white-space: nowrap;
    }

    .login-left .btn-back-to-landing:hover {
        color: var(--auth-navy);
    }

    .auth-split .admin-logo {
        color: #000;
    }

    .login-right {
        align-items: center;
        padding: 44px 56px 48px;
        z-index: 4;
        flex: 1 0 auto;
    }

    .login-form-wrapper {
        max-width: 100%;
    }
}

@media (max-width: 600px), (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
    body.sign-in-page {
        grid-template: minmax(0, 1fr) / minmax(0, 420px);
        justify-content: center;
        height: 100dvh;
        padding: 24px;
        background: #fff;
    }

    .sign-in-background {
        display: none;
    }

    .sign-in-page > header {
        grid-area: 1 / 1;
        z-index: 1;
    }

    .sign-in-page .admin-logo {
        color: #000;
    }

    .sign-in-card {
        --form-bg: #f7f9fb;
        --form-focus-bg: #fff;
        --form-border: #788995;
        --form-muted: #455b6c;
        --form-link: #285574;
        grid-area: 1 / 1;
        display: grid;
        grid-template-rows: 1fr auto minmax(0, 1fr);
        width: 100%;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    /* Keep a scrollable bottom gutter when the form fills a short screen. */
    .sign-in-card::after {
        content: "";
        min-height: 24px;
    }

    .sign-in-card input {
        box-shadow: none;
    }

    .sign-in-card__heading {
        align-self: end;
        /* Leave room for the logo when the viewport is short. */
        margin-block-start: 56px;
    }

    .sign-in-card .login-title {
        font-size: clamp(24px, 6.6vw, 28px);
    }

    .sign-in-card .btn-back-to-landing {
        min-height: 44px;
    }

    .sign-in-card .typewriter-word {
        display: block;
        min-block-size: 1lh;
    }
}

/* Phone: one 24px gutter shared by header and form, tighter vertical rhythm. */
@media (max-width: 480px) {
    .login-left__inner {
        gap: 12px;
        padding: 20px 24px 0;
    }

    .admin-logo {
        height: 32px;
    }

    .login-left .btn-back-to-landing {
        font-size: 14px;
        gap: 4px;
    }

    .btn-back-to-landing__extra {
        display: none;
    }

    .login-right {
        padding: 32px 24px 40px;
    }

    /* Fits the longest typed word ("Welcome back researcher") at 375px. */
    .login-title {
        font-size: 25px;
    }

    .login-subtitle {
        margin: 8px 0 32px;
        font-size: 15px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .btn-submit {
        margin-top: 24px;
        padding: 16px;
    }

}

/* ===============================================
   SERVICES PAGE — scrollable, hero band + content
   =============================================== */
body.services-page {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: block;
}

.services-root {
    height: auto;
    overflow: visible;
}

.services-hero {
    position: relative;
    height: 100vh;
    min-height: 560px;
}

.services-hero__inner {
    padding: 44px clamp(36px, 4.5vw, 72px) 48px;
}

.services-hero__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 720px;
}

.services-content {
    position: relative;
    z-index: 2;
    background: var(--auth-dark);
    padding: 72px clamp(36px, 4.5vw, 72px) 56px;
}

/* Services page navigation */
.landing-nav__link {
    color: var(--auth-muted-dim);
    text-decoration: none;
    transition: color 0.2s ease;
}

.landing-nav__link:hover,
.landing-nav__link:focus-visible {
    color: var(--auth-text);
}

.landing-nav__link.is-active {
    color: var(--auth-yellow);
}

.landing-nav__link:focus-visible {
    outline: 2px solid var(--auth-yellow);
    outline-offset: 3px;
    border-radius: 2px;
}

.services-hero__headline {
    margin: clamp(16px, 2.5vh, 28px) 0 0;
    font-size: clamp(34px, 4.2vw, 54px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--auth-text);
}

.services-hero__headline em {
    font-style: normal;
    color: var(--auth-yellow);
}

.services-hero__desc {
    max-width: 640px;
}

/* -----------------------------------------------
   Services page — pricing
   ----------------------------------------------- */
.pricing-section {
    max-width: 1080px;
    margin: 0 auto;
}

.pricing-toggle {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin: 0 auto 40px;
    padding: 4px;
    width: max-content;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(122, 150, 176, 0.18);
}

.pricing-toggle__option {
    padding: 10px 20px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--auth-muted);
    font-family: var(--auth-font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pricing-toggle__option:hover {
    color: var(--auth-text);
}

.pricing-toggle__option.is-active {
    background: var(--auth-yellow);
    color: var(--auth-navy);
}

.pricing-toggle__option:focus-visible {
    outline: 2px solid var(--auth-yellow);
    outline-offset: 2px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

.pricing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 36px 30px;
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(20,44,64,0.72), rgba(12,30,44,0.62));
    border: 1px solid rgba(122, 150, 176, 0.18);
}

.pricing-card--featured {
    border-color: rgba(242, 233, 75, 0.45);
    box-shadow: 0 24px 60px rgba(4, 12, 20, 0.4);
    transform: scale(1.03);
}

.pricing-card__ribbon {
    position: absolute;
    top: -12px;
    left: 30px;
    padding: 5px 14px;
    border-radius: 999px;
    background: var(--auth-yellow);
    color: var(--auth-navy);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.pricing-card__tier {
    font-size: 18px;
    font-weight: 700;
    color: #f3f7fa;
    margin: 0 0 16px;
}

.pricing-card__price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 0;
}

.pricing-card__price-amount {
    font-size: 40px;
    font-weight: 800;
    color: #f3f7fa;
    letter-spacing: -0.02em;
}

.pricing-card__price-period {
    font-size: 14px;
    color: var(--auth-muted);
}

.pricing-card__billing-note {
    margin: 6px 0 24px;
    font-size: 13px;
    color: var(--auth-muted-dim);
}

.pricing-card__desc {
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--auth-muted);
}

.pricing-card__features {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.pricing-card__features li {
    position: relative;
    padding-left: 26px;
    font-size: 14.5px;
    line-height: 1.4;
    color: var(--auth-text);
}

.pricing-card__features li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--auth-yellow);
    font-weight: 700;
}

.pricing-card__industry-select {
    width: 100%;
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid rgba(122, 150, 176, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--auth-text);
    font-family: var(--auth-font);
    font-size: 14.5px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.pricing-card__industry-select:hover {
    border-color: rgba(122, 150, 176, 0.32);
    background: rgba(255, 255, 255, 0.08);
}

.pricing-card__industry-select:focus-visible {
    outline: 2px solid var(--auth-yellow);
    outline-offset: 2px;
}

.pricing-card__cta {
    width: 100%;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* -----------------------------------------------
   Services page — feature comparison + section titles
   ----------------------------------------------- */
.services-section-title {
    font-size: 26px;
    font-weight: 700;
    color: #f3f7fa;
    margin: 0 0 24px;
    text-align: center;
}

.feature-compare {
    max-width: 1080px;
    margin: 88px auto 0;
}

.feature-table-wrap {
    overflow-x: auto;
}

.feature-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.feature-table th,
.feature-table td {
    padding: 14px 18px;
    text-align: left;
    font-size: 14.5px;
    border-bottom: 1px solid rgba(122, 150, 176, 0.18);
}

.feature-table thead th {
    color: var(--auth-muted-dim);
    font-size: 12.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
}

.feature-table tbody th {
    font-weight: 500;
    color: var(--auth-muted);
    white-space: nowrap;
}

.feature-table td {
    color: var(--auth-text);
}

/* -----------------------------------------------
   Services page — FAQ accordion
   ----------------------------------------------- */
.faq-section {
    max-width: 760px;
    margin: 88px auto 0;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    border: 1px solid rgba(122, 150, 176, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
}

.faq-item__question {
    width: 100%;
    padding: 18px 22px;
    background: transparent;
    border: none;
    text-align: left;
    font-family: var(--auth-font);
    font-size: 15.5px;
    font-weight: 600;
    color: #f3f7fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item__question:hover {
    background: rgba(255, 255, 255, 0.04);
}

.faq-item__question:focus-visible {
    outline: 2px solid var(--auth-yellow);
    outline-offset: -2px;
}

.faq-item__question::after {
    content: '+';
    font-size: 20px;
    font-weight: 400;
    color: var(--auth-muted-dim);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 12px;
}

.faq-item.is-open .faq-item__question::after {
    transform: rotate(45deg);
}

.faq-item__answer {
    padding: 0 22px 20px;
}

.faq-item__answer p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--auth-muted);
}

/* -----------------------------------------------
   Services page — closing CTA + footer
   ----------------------------------------------- */
.closing-cta {
    max-width: 640px;
    margin: 96px auto 0;
    text-align: center;
}

.closing-cta__title {
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 800;
    color: #f3f7fa;
    margin: 0 0 12px;
}

.closing-cta__desc {
    font-size: 16px;
    color: var(--auth-muted);
    margin: 0 0 32px;
}

.closing-cta__actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.services-footer {
    margin-top: 64px;
    justify-content: center;
}

/* -----------------------------------------------
   Services page — mobile overrides (≤900px)
   Kept as a small, separate block placed after the
   base .pricing-grid rule (defined earlier in this
   file) so these rules win the same-specificity
   cascade tie without touching the pre-existing
   shared @media (max-width: 900px) block above,
   which serves the other landing pages.
   ----------------------------------------------- */
@media (max-width: 900px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card--featured {
        transform: none;
    }

    .services-hero {
        height: auto;
        min-height: 100vh;
    }

    .closing-cta__actions {
        flex-direction: column;
    }

    .closing-cta__actions .btn-landing-secondary,
    .closing-cta__actions .btn-landing-primary {
        width: 100%;
        justify-content: center;
    }
}
