/* ==========================================================================
   trial-signup.css — Premium ProAudit trial-signup visual system
   --------------------------------------------------------------------------
   Light, warm, premium — matching the in-app ProAudit experience tokens
   from pe-design.css (warm cream paper, white cards, orange/teal accents,
   Roboto, soft warm shadows). Scoped to .trial-shell so this stylesheet
   never leaks into other pages.

   Used by: TrialAccept, TrialVerify, TrialSetPassword, TrialMfaSetup,
   TrialMfaVerifyForm (child), TrialRecoveryCodes, TrialWelcome,
   TrialTokenInvalid.
   ========================================================================== */

.trial-shell {
    /* Tokens — alias to pe-design.css canonical values */
    --t-bg:           #F5F2EC;
    --t-bg-end:       #EDE8E0;
    --t-card:         #FFFFFF;
    --t-card-sunk:    #FAF7F1;
    --t-rule:         rgba(90, 74, 53, 0.10);
    --t-rule-strong:  rgba(90, 74, 53, 0.18);

    --t-text:         #323232;
    --t-text-muted:   rgba(50, 50, 50, 0.72);
    --t-text-dim:     rgba(50, 50, 50, 0.55);

    --t-orange:       #DD9142;
    --t-orange-deep:  #C57A2D;
    --t-orange-ink:   #8F5714;
    --t-orange-tint:  rgba(221, 145, 66, 0.10);
    --t-orange-edge:  rgba(221, 145, 66, 0.40);

    --t-teal:         #00A69C;
    --t-teal-deep:    #00857D;
    --t-teal-tint:    rgba(0, 166, 156, 0.10);

    --t-red:          #BF1A2A;
    --t-red-tint:     rgba(191, 26, 42, 0.06);
    --t-green:        #4CAF50;

    --t-shadow-card:  0 1px 2px rgba(90, 74, 53, 0.04),
                      0 4px 16px rgba(90, 74, 53, 0.06),
                      0 24px 48px rgba(90, 74, 53, 0.08);
    --t-shadow-hover: 0 2px 4px rgba(90, 74, 53, 0.06),
                      0 8px 24px rgba(90, 74, 53, 0.10),
                      0 32px 60px rgba(90, 74, 53, 0.12);

    --t-radius-sm:    8px;
    --t-radius:       12px;
    --t-radius-lg:    16px;

    --t-font: Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --t-font-mono: 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;

    --t-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --t-fast: 180ms;
    --t-med:  280ms;
    --t-slow: 480ms;

    /* Page chrome */
    min-height: 100vh;
    background: var(--t-bg);
    color: var(--t-text);
    font-family: var(--t-font);
    font-size: 14px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

.trial-shell *,
.trial-shell *::before,
.trial-shell *::after {
    box-sizing: border-box;
}

/* ==========================================================================
   Ambient backdrop — subtle warm gradients + grain texture for depth
   ========================================================================== */

.trial-ambient {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 45% at 18% 12%, rgba(221, 145, 66, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse 55% 50% at 85% 88%, rgba(0, 166, 156, 0.08) 0%, transparent 60%),
        radial-gradient(circle at 50% 130%, rgba(221, 145, 66, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, var(--t-bg) 0%, var(--t-bg-end) 100%);
    animation: t-ambient-drift 22s var(--t-ease) infinite alternate;
}

.trial-ambient::after {
    /* SVG noise grain — adds warmth + tactility without being noisy */
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.29 0 0 0 0 0.21 0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    opacity: 0.35;
    mix-blend-mode: multiply;
}

@keyframes t-ambient-drift {
    from { background-position: 0 0, 0 0, 0 0, 0 0; }
    to   { background-position: 4% 2%, -3% -2%, 2% -3%, 0 0; }
}

.trial-accent-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 50;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--t-orange) 30%,
        var(--t-teal) 70%,
        transparent 100%);
    opacity: 0.55;
    animation: t-accent-glow 6s ease-in-out infinite;
}

@keyframes t-accent-glow {
    0%, 100% { opacity: 0.55; }
    50%      { opacity: 0.85; }
}

/* ==========================================================================
   Masthead — top logo bar + edition pill
   ========================================================================== */

.trial-mast {
    position: relative;
    z-index: 5;
    padding: 28px clamp(20px, 5vw, 56px) 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    animation: t-fade-down var(--t-slow) var(--t-ease) 0.1s both;
}

.trial-mast-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--t-text);
}

.trial-mast-logo-symbol {
    height: 34px;
    width: auto;
    flex-shrink: 0;
}

.trial-mast-logo-symbol path {
    transform-origin: center;
    animation: t-logo-pop 0.6s var(--t-ease) both;
}
.trial-mast-logo-symbol path:nth-child(1) { animation-delay: 0.20s; }
.trial-mast-logo-symbol path:nth-child(2) { animation-delay: 0.28s; }
.trial-mast-logo-symbol path:nth-child(3) { animation-delay: 0.36s; }
.trial-mast-logo-symbol path:nth-child(4) { animation-delay: 0.44s; }

@keyframes t-logo-pop {
    from { opacity: 0; transform: scale(0.6) rotate(-10deg); }
    to   { opacity: 1; transform: scale(1) rotate(0); }
}

.trial-mast-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
    letter-spacing: -0.005em;
}

.trial-mast-logo-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--t-text);
    letter-spacing: -0.015em;
}

.trial-mast-logo-sub {
    font-size: 9px;
    font-weight: 500;
    color: var(--t-text-dim);
    letter-spacing: 0.26em;
    text-transform: uppercase;
    margin-top: 4px;
}

.trial-mast-edition {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--t-card);
    border: 1px solid var(--t-rule);
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--t-orange-ink);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    box-shadow: 0 1px 2px rgba(90, 74, 53, 0.04);
}

.trial-mast-edition::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--t-orange);
    box-shadow: 0 0 0 0 var(--t-orange-edge);
    animation: t-pulse-orange 2.4s ease-in-out infinite;
}

@keyframes t-pulse-orange {
    0%, 100% { box-shadow: 0 0 0 0 var(--t-orange-edge); }
    50%      { box-shadow: 0 0 0 6px transparent; }
}

/* ==========================================================================
   Progress indicator — the navigational anchor across all 4 steps
   ========================================================================== */

.trial-progress {
    position: relative;
    z-index: 5;
    max-width: 640px;
    width: 100%;
    margin: 36px auto 0;
    padding: 0 clamp(20px, 5vw, 32px);
    animation: t-fade-up var(--t-slow) var(--t-ease) 0.20s both;
}

.trial-progress-track {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 4px;
}

/* The connecting line behind the dots */
.trial-progress-track::before {
    content: "";
    position: absolute;
    top: 17px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: var(--t-rule-strong);
    border-radius: 1px;
    z-index: 0;
}

/* The filled portion of the line — width set inline via --fill */
.trial-progress-track::after {
    content: "";
    position: absolute;
    top: 17px;
    left: 8%;
    width: calc((100% - 16%) * var(--fill, 0));
    height: 2px;
    background: linear-gradient(90deg, var(--t-orange), var(--t-orange-deep));
    border-radius: 1px;
    z-index: 1;
    box-shadow: 0 0 0 0 var(--t-orange-edge);
    transition: width 0.8s var(--t-ease);
    animation: t-progress-fill 1.4s var(--t-ease) 0.45s both;
    transform-origin: left;
}

@keyframes t-progress-fill {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

.trial-progress-step {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.trial-progress-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--t-card);
    border: 2px solid var(--t-rule-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--t-font);
    font-size: 12px;
    font-weight: 700;
    color: var(--t-text-dim);
    transition: all var(--t-med) var(--t-ease);
    position: relative;
}

.trial-progress-step--done .trial-progress-dot {
    background: var(--t-orange);
    border-color: var(--t-orange-deep);
    color: white;
    box-shadow: 0 4px 10px rgba(221, 145, 66, 0.30);
}

.trial-progress-step--done .trial-progress-dot::after {
    content: "";
    width: 12px;
    height: 6px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg) translate(1px, -1px);
    animation: t-check-draw 0.45s var(--t-ease) 0.6s both;
}

.trial-progress-step--done .trial-progress-dot-num { display: none; }

@keyframes t-check-draw {
    from { clip-path: inset(0 100% 0 0); }
    to   { clip-path: inset(0 0 0 0); }
}

.trial-progress-step--current .trial-progress-dot {
    background: var(--t-card);
    border-color: var(--t-orange);
    color: var(--t-orange-ink);
    box-shadow:
        0 0 0 4px var(--t-orange-tint),
        0 6px 16px rgba(221, 145, 66, 0.20);
    animation: t-current-pulse 2.4s ease-in-out infinite;
}

@keyframes t-current-pulse {
    0%, 100% {
        box-shadow:
            0 0 0 4px var(--t-orange-tint),
            0 6px 16px rgba(221, 145, 66, 0.20);
    }
    50% {
        box-shadow:
            0 0 0 8px var(--t-orange-tint),
            0 6px 16px rgba(221, 145, 66, 0.32);
    }
}

.trial-progress-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--t-text-dim);
    letter-spacing: 0.06em;
    line-height: 1.3;
    max-width: 100px;
}

.trial-progress-step--done .trial-progress-label {
    color: var(--t-text-muted);
}
.trial-progress-step--current .trial-progress-label {
    color: var(--t-text);
}

/* ==========================================================================
   Stage — main content area
   ========================================================================== */

.trial-stage {
    position: relative;
    z-index: 5;
    flex: 1;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: clamp(36px, 6vw, 64px) clamp(20px, 5vw, 32px) 80px;
}

.trial-stage--wide {
    max-width: 880px;
}

.trial-stage--xwide {
    max-width: 1040px;
}

/* ==========================================================================
   Card — the primary content surface
   ========================================================================== */

.trial-card {
    position: relative;
    background: var(--t-card);
    border: 1px solid var(--t-rule);
    border-radius: var(--t-radius-lg);
    padding: clamp(28px, 4.5vw, 44px) clamp(24px, 4vw, 44px);
    box-shadow: var(--t-shadow-card);
    overflow: hidden;
    animation: t-card-rise var(--t-slow) var(--t-ease) 0.35s both;
}

@keyframes t-card-rise {
    from { opacity: 0; transform: translateY(18px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.trial-card-stripe {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        var(--t-orange) 0%,
        var(--t-orange-deep) 35%,
        var(--t-teal) 100%);
    transform-origin: left;
    animation: t-stripe-grow 0.7s var(--t-ease) 0.5s both;
}

@keyframes t-stripe-grow {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

.trial-card-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--t-orange-ink);
    margin: 0 0 16px;
    animation: t-fade-up var(--t-slow) var(--t-ease) 0.55s both;
}

.trial-card-eyebrow::before {
    content: "";
    width: 22px;
    height: 1px;
    background: var(--t-orange);
}

.trial-card-title {
    font-family: var(--t-font);
    font-weight: 700;
    font-size: clamp(28px, 3.6vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--t-text);
    margin: 0 0 14px;
    animation: t-fade-up var(--t-slow) var(--t-ease) 0.6s both;
}

.trial-card-title-script {
    color: var(--t-orange);
    font-style: italic;
    font-weight: 600;
}

.trial-card-deck {
    font-size: 16px;
    line-height: 1.6;
    color: var(--t-text-muted);
    margin: 0 0 28px;
    max-width: 56ch;
    animation: t-fade-up var(--t-slow) var(--t-ease) 0.65s both;
}

.trial-card-deck strong {
    font-weight: 600;
    color: var(--t-text);
}

.trial-card-body {
    animation: t-fade-up var(--t-slow) var(--t-ease) 0.7s both;
}

.trial-card-foot {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--t-rule);
    font-size: 13px;
    color: var(--t-text-muted);
    line-height: 1.55;
    animation: t-fade-up var(--t-slow) var(--t-ease) 0.95s both;
}

.trial-card-foot a {
    color: var(--t-teal-deep);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dotted var(--t-teal);
    transition: color var(--t-fast) var(--t-ease), border-color var(--t-fast) var(--t-ease);
}
.trial-card-foot a:hover {
    color: var(--t-orange-ink);
    border-bottom-color: var(--t-orange);
    border-bottom-style: solid;
}

/* ==========================================================================
   Credential block — used on TrialAccept to show the locked-in email
   ========================================================================== */

.trial-credential {
    background: var(--t-card-sunk);
    border: 1px solid var(--t-rule);
    border-left: 3px solid var(--t-orange);
    border-radius: var(--t-radius-sm);
    padding: 16px 20px;
    margin: 0 0 24px;
    animation: t-fade-up var(--t-slow) var(--t-ease) 0.7s both;
}

.trial-credential-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--t-text-dim);
    margin: 0 0 8px;
}

.trial-credential-value {
    font-family: var(--t-font-mono);
    font-size: 15px;
    font-weight: 500;
    color: var(--t-text);
    margin: 0 0 6px;
    word-break: break-all;
    letter-spacing: -0.01em;
}

.trial-credential-hint {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--t-text-muted);
    margin: 0;
}

/* ==========================================================================
   Forms — labels, fields, inputs
   ========================================================================== */

.trial-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.trial-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.trial-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--t-text);
}

.trial-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    background: var(--t-card);
    border: 1px solid var(--t-rule-strong);
    border-radius: var(--t-radius-sm);
    font-family: var(--t-font);
    font-size: 15px;
    color: var(--t-text);
    transition: border-color var(--t-fast) var(--t-ease),
                box-shadow var(--t-fast) var(--t-ease),
                background var(--t-fast) var(--t-ease);
    box-sizing: border-box;
}
.trial-input::placeholder { color: var(--t-text-dim); }
.trial-input:hover {
    border-color: var(--t-rule-strong);
    background: var(--t-card-sunk);
}
.trial-input:focus {
    outline: none;
    border-color: var(--t-orange);
    background: var(--t-card);
    box-shadow: 0 0 0 4px var(--t-orange-tint);
}

.trial-input--code {
    font-family: var(--t-font-mono);
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.32em;
    height: 64px;
    background: var(--t-card-sunk);
    border-width: 2px;
}
.trial-input--code:focus {
    background: var(--t-card);
    box-shadow: 0 0 0 5px var(--t-orange-tint);
}
.trial-input--code::placeholder {
    color: var(--t-text-dim);
    letter-spacing: 0.32em;
}

.trial-field-hint {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--t-text-muted);
    margin: 4px 0 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.trial-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 26px;
    min-height: 50px;
    border-radius: var(--t-radius-sm);
    font-family: var(--t-font);
    font-weight: 600;
    font-size: 14.5px;
    letter-spacing: 0.005em;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    transition: transform var(--t-fast) var(--t-ease),
                box-shadow var(--t-fast) var(--t-ease),
                background var(--t-fast) var(--t-ease),
                color var(--t-fast) var(--t-ease),
                border-color var(--t-fast) var(--t-ease);
}

.trial-btn:focus-visible {
    outline: 3px solid var(--t-orange-tint);
    outline-offset: 2px;
}

.trial-btn--full {
    width: 100%;
    min-height: 56px;
    padding: 16px 28px;
    font-size: 15px;
}

.trial-btn--primary {
    background: linear-gradient(135deg, var(--t-orange) 0%, var(--t-orange-deep) 100%);
    color: white;
    border-color: var(--t-orange-deep);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.22) inset,
        0 2px 8px rgba(221, 145, 66, 0.32),
        0 8px 22px rgba(221, 145, 66, 0.20);
}

.trial-btn--primary::after {
    /* Shimmer sweep */
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.28),
        transparent);
    transform: skewX(-18deg);
    animation: t-shimmer 5s ease-in-out 2.5s infinite;
}

@keyframes t-shimmer {
    0%   { left: -100%; }
    25%  { left: 180%; }
    100% { left: 180%; }
}

.trial-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.28) inset,
        0 4px 14px rgba(221, 145, 66, 0.42),
        0 12px 30px rgba(221, 145, 66, 0.26);
}
.trial-btn--primary:active { transform: translateY(0) scale(0.995); }
.trial-btn--primary:disabled {
    opacity: 0.6;
    cursor: progress;
    transform: none;
}

.trial-btn--ghost {
    background: var(--t-card);
    color: var(--t-text);
    border-color: var(--t-rule-strong);
}
.trial-btn--ghost:hover {
    background: var(--t-card-sunk);
    border-color: var(--t-orange);
    color: var(--t-orange-ink);
}

.trial-btn--teal {
    background: var(--t-teal);
    color: white;
    border-color: var(--t-teal-deep);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.18) inset,
        0 2px 8px rgba(0, 166, 156, 0.28);
}
.trial-btn--teal:hover {
    transform: translateY(-1px);
    background: var(--t-teal-deep);
}

.trial-btn-arrow {
    font-size: 18px;
    line-height: 1;
    transition: transform var(--t-fast) var(--t-ease);
}
.trial-btn:hover .trial-btn-arrow { transform: translateX(4px); }

.trial-btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: t-spin 0.7s linear infinite;
}

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

/* ==========================================================================
   Alerts
   ========================================================================== */

.trial-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background: var(--t-red-tint);
    border: 1px solid rgba(191, 26, 42, 0.20);
    border-left: 3px solid var(--t-red);
    border-radius: 0 var(--t-radius-sm) var(--t-radius-sm) 0;
    margin: 0 0 20px;
    animation: t-shake 0.42s var(--t-ease);
}

.trial-alert-icon {
    flex-shrink: 0;
    color: var(--t-red);
    margin-top: 1px;
}

.trial-alert-body {
    flex: 1;
    min-width: 0;
}

.trial-alert-label {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--t-red);
    margin-bottom: 3px;
}

.trial-alert-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--t-text);
}

@keyframes t-shake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-4px); }
    50%      { transform: translateX(4px); }
    75%      { transform: translateX(-2px); }
}

/* ==========================================================================
   MFA / two-column QR layout
   ========================================================================== */

.trial-mfa-grid {
    display: grid;
    grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 40px);
    align-items: start;
    margin: 0 0 28px;
}

@media (max-width: 720px) {
    .trial-mfa-grid {
        grid-template-columns: 1fr;
    }
}

.trial-mfa-col-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--t-orange-ink);
    margin: 0 0 12px;
}

.trial-mfa-qr-frame {
    background: white;
    border: 1px solid var(--t-rule-strong);
    border-radius: var(--t-radius-sm);
    padding: 16px;
    aspect-ratio: 1 / 1;
    max-width: 240px;
    box-shadow: 0 4px 16px rgba(90, 74, 53, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.trial-mfa-qr-frame img {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.trial-mfa-qr-caption {
    margin: 14px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--t-text-muted);
    max-width: 220px;
}

.trial-mfa-manual {
    margin: 0 0 24px;
    padding: 14px 18px;
    background: var(--t-card-sunk);
    border: 1px solid var(--t-rule);
    border-radius: var(--t-radius-sm);
}

.trial-mfa-manual summary {
    font-size: 13px;
    font-weight: 600;
    color: var(--t-teal-deep);
    cursor: pointer;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.trial-mfa-manual summary::-webkit-details-marker { display: none; }
.trial-mfa-manual summary::before {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: var(--t-teal-tint);
    color: var(--t-teal-deep);
    border-radius: 50%;
    font-weight: 700;
    transition: transform var(--t-fast) var(--t-ease);
}
.trial-mfa-manual[open] summary::before {
    transform: rotate(45deg);
}

.trial-mfa-manual-key {
    display: block;
    margin: 14px 0 8px;
    padding: 12px 14px;
    background: white;
    border: 1px solid var(--t-rule);
    border-radius: var(--t-radius-sm);
    font-family: var(--t-font-mono);
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 0.10em;
    color: var(--t-text);
    word-break: break-all;
    line-height: 1.55;
}

.trial-mfa-manual-hint {
    margin: 0;
    font-size: 12px;
    color: var(--t-text-dim);
}

/* ==========================================================================
   Recovery codes sheet
   ========================================================================== */

.trial-codes-sheet {
    background: var(--t-card-sunk);
    border: 1px solid var(--t-rule-strong);
    border-radius: var(--t-radius);
    padding: 22px clamp(20px, 4vw, 28px);
    margin: 0 0 24px;
    position: relative;
    overflow: hidden;
}

.trial-codes-sheet::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--t-orange), var(--t-teal));
}

.trial-codes-sheet-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--t-rule);
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.trial-codes-sheet-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--t-orange-ink);
    margin: 0;
}

.trial-codes-sheet-meta {
    font-family: var(--t-font-mono);
    font-size: 11px;
    color: var(--t-text-dim);
}

.trial-codes-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    row-gap: 10px;
}

@media (max-width: 520px) {
    .trial-codes-list { grid-template-columns: 1fr; }
}

.trial-codes-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    animation: t-fade-up 0.4s var(--t-ease) both;
}
.trial-codes-item:nth-child(1)  { animation-delay: 0.05s; }
.trial-codes-item:nth-child(2)  { animation-delay: 0.10s; }
.trial-codes-item:nth-child(3)  { animation-delay: 0.15s; }
.trial-codes-item:nth-child(4)  { animation-delay: 0.20s; }
.trial-codes-item:nth-child(5)  { animation-delay: 0.25s; }
.trial-codes-item:nth-child(6)  { animation-delay: 0.30s; }
.trial-codes-item:nth-child(7)  { animation-delay: 0.35s; }
.trial-codes-item:nth-child(8)  { animation-delay: 0.40s; }
.trial-codes-item:nth-child(9)  { animation-delay: 0.45s; }
.trial-codes-item:nth-child(10) { animation-delay: 0.50s; }

.trial-codes-item-num {
    font-family: var(--t-font-mono);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.10em;
    color: var(--t-orange-ink);
    min-width: 22px;
}

.trial-codes-item-code {
    font-family: var(--t-font-mono);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--t-text);
    background: white;
    border: 1px solid var(--t-rule);
    border-radius: 4px;
    padding: 6px 10px;
    flex: 1;
}

.trial-codes-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 24px;
}

.trial-codes-note {
    padding: 16px 20px;
    background: var(--t-teal-tint);
    border: 1px solid rgba(0, 166, 156, 0.22);
    border-left: 3px solid var(--t-teal);
    border-radius: 0 var(--t-radius-sm) var(--t-radius-sm) 0;
    margin: 0 0 28px;
}

.trial-codes-note-label {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--t-teal-deep);
    margin-bottom: 6px;
}

.trial-codes-note p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--t-text);
}

.trial-codes-note p strong {
    font-weight: 600;
    color: var(--t-teal-deep);
}

.trial-codes-finalize {
    margin: 0 0 8px;
    padding-top: 22px;
    border-top: 1px solid var(--t-rule);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.trial-codes-confirm {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    padding: 12px;
    border-radius: var(--t-radius-sm);
    transition: background var(--t-fast) var(--t-ease);
}
.trial-codes-confirm:hover {
    background: var(--t-card-sunk);
}

.trial-codes-confirm input[type="checkbox"] {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    accent-color: var(--t-orange);
    cursor: pointer;
}

.trial-codes-confirm-text {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--t-text);
    line-height: 1.45;
}

.trial-codes-submit-hint {
    margin: 0;
    font-size: 12.5px;
    color: var(--t-text-muted);
    text-align: center;
}

/* ==========================================================================
   Trust strip — security/privacy reassurance at the bottom
   ========================================================================== */

.trial-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 16px 0;
    margin-top: 18px;
    font-size: 12px;
    color: var(--t-text-dim);
    animation: t-fade-up var(--t-slow) var(--t-ease) 1.0s both;
}

.trial-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.trial-trust-item svg {
    color: var(--t-teal);
    opacity: 0.85;
}

.trial-trust-sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--t-rule-strong);
}

/* ==========================================================================
   Welcome page — celebration grid
   ========================================================================== */

.trial-welcome-banner {
    position: relative;
    background: linear-gradient(135deg,
        var(--t-orange) 0%,
        var(--t-orange-deep) 60%,
        var(--t-teal) 100%);
    color: white;
    border-radius: var(--t-radius-lg);
    padding: clamp(28px, 4vw, 40px);
    margin: 0 0 32px;
    overflow: hidden;
    box-shadow:
        0 4px 16px rgba(221, 145, 66, 0.20),
        0 24px 48px rgba(221, 145, 66, 0.16);
    animation: t-card-rise var(--t-slow) var(--t-ease) 0.35s both;
}

.trial-welcome-banner::before {
    /* Soft glow blob top-right */
    content: "";
    position: absolute;
    top: -40%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
    pointer-events: none;
    animation: t-blob-drift 14s ease-in-out infinite alternate;
}

.trial-welcome-banner::after {
    /* Sparkle particles via radial dot pattern */
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.6) 1px, transparent 1.5px),
        radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.5) 1px, transparent 1.5px),
        radial-gradient(circle at 88% 62%, rgba(255, 255, 255, 0.55) 1px, transparent 1.5px),
        radial-gradient(circle at 32% 82%, rgba(255, 255, 255, 0.45) 1px, transparent 1.5px),
        radial-gradient(circle at 56% 48%, rgba(255, 255, 255, 0.5) 1px, transparent 1.5px);
    pointer-events: none;
    opacity: 0.7;
    animation: t-sparkle 4s ease-in-out infinite;
}

@keyframes t-blob-drift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(-30px, 20px) scale(1.1); }
}

@keyframes t-sparkle {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 0.85; }
}

.trial-welcome-eyebrow {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 18px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.trial-welcome-eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 8px white;
    animation: t-pulse-white 1.8s ease-in-out infinite;
}

@keyframes t-pulse-white {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(0.7); }
}

.trial-welcome-banner-title {
    position: relative;
    z-index: 2;
    font-weight: 700;
    font-size: clamp(32px, 4.5vw, 48px);
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin: 0 0 14px;
    color: white;
}

.trial-welcome-banner-title-name {
    display: inline-block;
    color: white;
    background: rgba(255, 255, 255, 0.22);
    padding: 0 12px;
    border-radius: 8px;
    font-style: italic;
    font-weight: 600;
    backdrop-filter: blur(8px);
}

.trial-welcome-banner-deck {
    position: relative;
    z-index: 2;
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.92);
    margin: 0 0 24px;
    max-width: 56ch;
}

.trial-welcome-banner-deck strong {
    color: white;
    font-weight: 600;
}

.trial-welcome-stat {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.95);
    font-family: var(--t-font-mono);
    font-size: 12px;
    letter-spacing: 0.02em;
    backdrop-filter: blur(8px);
}

.trial-welcome-stat-mark {
    color: white;
    font-weight: 700;
}

.trial-welcome-cards-heading {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--t-text-dim);
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--t-rule);
}

.trial-welcome-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 32px;
}

@media (max-width: 720px) {
    .trial-welcome-grid {
        grid-template-columns: 1fr;
    }
}

.trial-welcome-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px 24px 20px;
    background: var(--t-card);
    border: 1px solid var(--t-rule);
    border-radius: var(--t-radius);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--t-shadow-card);
    transition: transform var(--t-med) var(--t-ease),
                box-shadow var(--t-med) var(--t-ease),
                border-color var(--t-med) var(--t-ease);
    min-height: 200px;
    overflow: hidden;
    animation: t-fade-up var(--t-slow) var(--t-ease) both;
}
.trial-welcome-card:nth-child(1) { animation-delay: 0.55s; }
.trial-welcome-card:nth-child(2) { animation-delay: 0.65s; }
.trial-welcome-card:nth-child(3) { animation-delay: 0.75s; }
.trial-welcome-card:nth-child(4) { animation-delay: 0.85s; }

.trial-welcome-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--t-orange), var(--t-teal));
    transform-origin: left;
    transform: scaleX(0);
    transition: transform var(--t-med) var(--t-ease);
}

.trial-welcome-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--t-shadow-hover);
    border-color: var(--t-orange-edge);
}
.trial-welcome-card:hover::before {
    transform: scaleX(1);
}

.trial-welcome-card--primary {
    background: linear-gradient(135deg, #2A2A2A 0%, #1F1F1F 100%);
    color: white;
    border-color: transparent;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.2),
        0 12px 32px rgba(0, 0, 0, 0.18);
}
.trial-welcome-card--primary:hover {
    background: linear-gradient(135deg, #1F1F1F 0%, #151515 100%);
    border-color: var(--t-orange);
}

.trial-welcome-card-num {
    font-family: var(--t-font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.20em;
    color: var(--t-text-dim);
    margin-bottom: 14px;
}
.trial-welcome-card--primary .trial-welcome-card-num {
    color: rgba(255, 255, 255, 0.5);
}

.trial-welcome-card-title {
    font-weight: 700;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: -0.018em;
    color: inherit;
    margin: 0 0 10px;
}

.trial-welcome-card-body {
    font-size: 14px;
    line-height: 1.55;
    color: var(--t-text-muted);
    margin: 0 0 18px;
    flex: 1;
}
.trial-welcome-card--primary .trial-welcome-card-body {
    color: rgba(255, 255, 255, 0.78);
}

.trial-welcome-card-body strong {
    font-weight: 600;
    color: var(--t-text);
}
.trial-welcome-card--primary .trial-welcome-card-body strong {
    color: white;
}

.trial-welcome-card-go {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.01em;
    color: var(--t-orange-ink);
    margin-top: auto;
}
.trial-welcome-card--primary .trial-welcome-card-go {
    color: white;
}

.trial-welcome-card-arrow {
    transition: transform var(--t-fast) var(--t-ease);
}
.trial-welcome-card:hover .trial-welcome-card-arrow {
    transform: translateX(5px);
}

/* ==========================================================================
   Token-invalid page — error state
   ========================================================================== */

.trial-invalid-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--t-red-tint);
    border: 2px solid rgba(191, 26, 42, 0.20);
    color: var(--t-red);
    margin: 0 0 24px;
    animation: t-icon-pop 0.5s var(--t-ease) 0.4s both;
}

@keyframes t-icon-pop {
    from { opacity: 0; transform: scale(0.6); }
    to   { opacity: 1; transform: scale(1); }
}

.trial-invalid-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
    animation: t-fade-up var(--t-slow) var(--t-ease) 0.7s both;
}

/* ==========================================================================
   Resend block (TrialVerify)
   ========================================================================== */

.trial-resend {
    margin-top: 20px;
    padding: 18px 20px;
    background: var(--t-card-sunk);
    border: 1px dashed var(--t-rule-strong);
    border-radius: var(--t-radius-sm);
    text-align: center;
    animation: t-fade-up var(--t-slow) var(--t-ease) 0.85s both;
}

.trial-resend-copy {
    margin: 0 0 12px;
    font-size: 13.5px;
    color: var(--t-text-muted);
}

.trial-resend-hint {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--t-text-dim);
}

/* ==========================================================================
   Password requirements (TrialSetPassword)
   ========================================================================== */

.trial-pwd-rules {
    margin: 22px 0 0;
    padding: 16px 20px;
    background: var(--t-card-sunk);
    border: 1px solid var(--t-rule);
    border-radius: var(--t-radius-sm);
}

.trial-pwd-rules-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--t-text-dim);
    margin: 0 0 10px;
}

.trial-pwd-rules-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
}

@media (max-width: 540px) {
    .trial-pwd-rules-list { grid-template-columns: 1fr; }
}

.trial-pwd-rules-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--t-text-muted);
}

.trial-pwd-rule-bullet {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--t-orange-tint);
    color: var(--t-orange-ink);
    font-family: var(--t-font-mono);
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ==========================================================================
   Animations — shared
   ========================================================================== */

@keyframes t-fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes t-fade-down {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes t-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Field stagger — children of .trial-form auto-stagger */
.trial-form .trial-field {
    opacity: 0;
    transform: translateY(8px);
    animation: t-fade-up 0.5s var(--t-ease) both;
}
.trial-form .trial-field:nth-child(1) { animation-delay: 0.75s; }
.trial-form .trial-field:nth-child(2) { animation-delay: 0.83s; }
.trial-form .trial-field:nth-child(3) { animation-delay: 0.91s; }
.trial-form .trial-field:nth-child(4) { animation-delay: 0.99s; }
.trial-form .trial-btn,
.trial-form button[type="submit"] {
    opacity: 0;
    transform: translateY(8px);
    animation: t-fade-up 0.5s var(--t-ease) 1.05s both;
}

/* ==========================================================================
   Reduced-motion respect
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .trial-shell *,
    .trial-shell *::before,
    .trial-shell *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .trial-ambient { animation: none; }
}

/* ==========================================================================
   Print — minimal styles for the recovery codes sheet
   ========================================================================== */

@media print {
    .trial-shell { background: white; }
    .trial-ambient,
    .trial-accent-bar,
    .trial-mast,
    .trial-progress,
    .trial-card-eyebrow,
    .trial-codes-actions,
    .trial-codes-note,
    .trial-codes-finalize,
    .trial-trust,
    .trial-card-foot { display: none !important; }
    .trial-card { box-shadow: none; border: 2px solid #000; }
    .trial-codes-sheet { border: 2px solid #000; }
}
