/* ============================================================
SPEAKING TOOL — PAGE-SCOPED STYLES
============================================================ */

/* Override top padding for the tool hero (navbar is fixed-top) */
.speaking-tool-page {
    padding-top: 80px;
    /* matches navbar height */
}

/* HERO BANNER */
.tool-hero {
    background: linear-gradient(135deg, var(--navy-dark, #0f1d3a) 0%, var(--navy, #1a2e5a) 60%, #1d3a6e 100%);
    padding: 48px 0 60px;
    position: relative;
    overflow: hidden;
}

.tool-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(192, 32, 42, .2) 0%, transparent 70%);
    top: -150px;
    right: -100px;
    pointer-events: none;
}

.tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50px;
    padding: 5px 14px;
    font-size: .75rem;
    font-weight: 700;
    color: #f5a623;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.tool-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f5a623;
    animation: badgeBlink 2s infinite;
}

@keyframes badgeBlink {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: .3
    }
}

.tool-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: #fff;
    margin-bottom: .75rem;
    font-weight: 800;
}

.tool-hero h1 em {
    color: #f5a623;
    font-style: normal;
}

.tool-hero p {
    color: rgba(255, 255, 255, .7);
    font-size: 1rem;
    max-width: 540px;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.hstat {
    text-align: left;
}

.hstat-n {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
}

.hstat-l {
    font-size: .72rem;
    color: rgba(255, 255, 255, .5);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* MAIN CARD */
.main-card {
    background: #fff;
    border-radius: 36px;
    box-shadow: 0 20px 60px rgba(26, 46, 90, .12);
    border: 1px solid #dde3ef;
    overflow: hidden;
    margin-top: -32px;
    position: relative;
    z-index: 2;
}

/* STEP TABS */
.step-nav {
    display: flex;
    background: #f4f7fc;
    border-bottom: 1px solid #dde3ef;
}

.step-tab {
    flex: 1;
    padding: 1rem .5rem;
    text-align: center;
    font-size: .78rem;
    font-weight: 700;
    color: #6b7a99;
    letter-spacing: .04em;
    text-transform: uppercase;
    border-bottom: 3px solid transparent;
    transition: all .3s;
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.step-tab.active {
    color: #c0202a;
    border-bottom-color: #c0202a;
    background: #fff;
}

.step-tab.done {
    color: #1a2e5a;
    opacity: .7;
}

.step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 800;
    transition: all .3s;
}

.step-tab.active .step-num {
    background: #c0202a;
    border-color: #c0202a;
    color: #fff;
}

.step-tab.done .step-num {
    background: #1a2e5a;
    border-color: #1a2e5a;
    color: #fff;
}

/* STEP PANELS */
.step-panel {
    display: none;
    padding: 2.5rem;
}

.step-panel.active {
    display: block;
    animation: slideInPanel .35s ease;
}

@keyframes slideInPanel {
    from {
        opacity: 0;
        transform: translateX(16px)
    }

    to {
        opacity: 1;
        transform: translateX(0)
    }
}

/* PROMPT GRID */
.prompt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin-top: 1rem;
}

.prompt-card {
    background: #f4f7fc;
    border: 2px solid #dde3ef;
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
    cursor: pointer;
    transition: all .25s;
}

.prompt-card:hover {
    border-color: #1a2e5a;
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 46, 90, .08);
}

.prompt-card.selected {
    border-color: #c0202a;
    background: rgba(192, 32, 42, .04);
}

.prompt-cat {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #c0202a;
    margin-bottom: .35rem;
}

.prompt-text {
    font-size: .88rem;
    font-weight: 600;
    color: #1a2e5a;
    line-height: 1.4;
}

.prompt-time {
    font-size: .75rem;
    color: #6b7a99;
    margin-top: .35rem;
}

/* RECORDER */
.recorder-area {
    background: linear-gradient(135deg, #0f1d3a, #1a2e5a);
    border-radius: 22px;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.recorder-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.selected-prompt-box {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.75rem;
    text-align: left;
    position: relative;
    z-index: 1;
}

.selected-prompt-box .label {
    font-size: .7rem;
    font-weight: 700;
    color: #f5a623;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .3rem;
}

.selected-prompt-box .text {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
}

.selected-prompt-box .hint {
    font-size: .78rem;
    color: rgba(255, 255, 255, .5);
    margin-top: .4rem;
}

.mic-btn {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    transition: all .3s;
    margin: 0 auto;
    background: #c0202a;
    color: #fff;
    box-shadow: 0 6px 24px rgba(192, 32, 42, .4);
}

.mic-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 32px rgba(192, 32, 42, .5);
}

.mic-btn.recording {
    background: #e8333e;
    animation: recordPulse 1.2s ease infinite;
}

.mic-btn.st-disabled {
    background: rgba(255, 255, 255, .15);
    color: rgba(255, 255, 255, .4);
    cursor: not-allowed;
    box-shadow: none;
}

@keyframes recordPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(232, 51, 62, .7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(232, 51, 62, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(232, 51, 62, 0);
    }
}

.rec-status {
    font-size: .85rem;
    color: rgba(255, 255, 255, .7);
    margin-top: 1rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.rec-timer {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    position: relative;
    z-index: 1;
    margin-top: .5rem;
    display: none;
}

.rec-indicator {
    display: none;
    align-items: center;
    gap: 6px;
    background: rgba(232, 51, 62, .2);
    border: 1px solid rgba(232, 51, 62, .4);
    border-radius: 50px;
    padding: 4px 12px;
    font-size: .75rem;
    font-weight: 700;
    color: #ff8080;
    position: relative;
    z-index: 1;
}

.rec-indicator .reddot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4444;
    animation: badgeBlink 1s infinite;
}

.waveform {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin: 1rem 0;
    position: relative;
    z-index: 1;
}

.wave-bar {
    width: 4px;
    background: rgba(255, 255, 255, .2);
    border-radius: 4px;
    transition: height .1s ease;
    height: 6px;
}

.audio-preview {
    margin-top: 1.25rem;
    position: relative;
    z-index: 1;
    display: none;
}

.audio-preview audio {
    width: 100%;
    border-radius: 50px;
    opacity: .8;
}

/* TRANSCRIPT */
.transcript-box {
    background: #f4f7fc;
    border: 1.5px solid #dde3ef;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    min-height: 100px;
    font-size: .9rem;
    line-height: 1.7;
    color: #1a2e5a;
    margin-top: .75rem;
    width: 100%;
    resize: vertical;
    font-family: 'Plus Jakarta Sans', sans-serif;
    outline: none;
    transition: border .2s;
}

.transcript-box:focus {
    border-color: #c0202a;
}

/* LEAD GATE */
.lead-gate {
    background: linear-gradient(135deg, #0f1d3a 0%, #1a2e5a 100%);
    border-radius: 22px;
    padding: 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.lead-gate::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(192, 32, 42, .25) 0%, transparent 70%);
    top: -100px;
    right: -50px;
    pointer-events: none;
}

.lead-gate h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: .5rem;
}

.lead-gate p {
    color: rgba(255, 255, 255, .7);
    font-size: .9rem;
    margin-bottom: 1.75rem;
    line-height: 1.7;
}

.preview-scores {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.preview-score-chip {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    padding: .75rem 1rem;
    text-align: center;
    min-width: 80px;
    position: relative;
}

.preview-score-chip .blur-val {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    filter: blur(6px);
    user-select: none;
}

.preview-score-chip .sc-label {
    font-size: .68rem;
    color: rgba(255, 255, 255, .5);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-top: 2px;
}

.lock-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    color: #f5a623;
}

.lead-form input {
    background: rgba(255, 255, 255, .08) !important;
    border: 1.5px solid rgba(255, 255, 255, .2) !important;
    color: #fff !important;
    border-radius: 8px !important;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: .9rem;
    padding: .7rem 1rem;
    width: 100%;
    margin-bottom: .75rem;
    outline: none;
    transition: border .2s;
    display: block;
}

.lead-form input::placeholder {
    color: rgba(255, 255, 255, .4) !important;
}

.lead-form input:focus {
    border-color: #f5a623 !important;
    background: rgba(255, 255, 255, .12) !important;
}

/* RESULTS */
.results-header {
    background: linear-gradient(135deg, #0f1d3a, #1a2e5a);
    border-radius: 22px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.overall-band {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: #c0202a;
    border-radius: 22px;
    padding: 1.25rem 2rem;
    margin: 1rem auto;
}

.overall-band .band-num {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.overall-band .band-label {
    font-size: .75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, .7);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-top: 4px;
}

.score-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 1.5rem;
}

@media(min-width:600px) {
    .score-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.score-card {
    background: #fff;
    border: 1.5px solid #dde3ef;
    border-radius: 14px;
    padding: 1.25rem .75rem;
    text-align: center;
    transition: all .3s;
}

.score-card:hover {
    border-color: #c0202a;
    box-shadow: 0 4px 16px rgba(192, 32, 42, .1);
    transform: translateY(-3px);
}

.score-val {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: #1a2e5a;
    margin-bottom: .25rem;
}

.score-val.hi {
    color: #22c55e;
}

.score-val.md {
    color: #f5a623;
}

.score-val.lo {
    color: #c0202a;
}

.score-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6b7a99;
}

.band-bar-wrap {
    margin-top: .5rem;
}

.band-bar-bg {
    background: #f4f7fc;
    border-radius: 50px;
    height: 6px;
    overflow: hidden;
}

.band-bar-fill {
    height: 100%;
    border-radius: 50px;
    background: linear-gradient(90deg, #c0202a, #f5a623);
    transition: width 1.2s cubic-bezier(.34, 1.56, .64, 1);
}

.feedback-section {
    background: #f4f7fc;
    border-radius: 22px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.feedback-section h5 {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: #1a2e5a;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fb-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: .65rem 0;
    border-bottom: 1px solid #dde3ef;
}

.fb-item:last-child {
    border: none;
}

.fb-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.fb-icon.good {
    background: #dcfce7;
    color: #16a34a;
}

.fb-icon.warn {
    background: #fef9c3;
    color: #ca8a04;
}

.fb-icon.bad {
    background: #fee2e2;
    color: #dc2626;
}

.fb-text {
    font-size: .85rem;
    line-height: 1.6;
    color: #1a2e5a;
}

.cta-box {
    background: #c0202a;
    border-radius: 22px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 50%, rgba(255, 255, 255, .1) 0%, transparent 60%);
    pointer-events: none;
}

.cta-box h4 {
    font-family: 'Playfair Display', serif;
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: .5rem;
}

.cta-box p {
    color: rgba(255, 255, 255, .8);
    font-size: .875rem;
    margin-bottom: 1.5rem;
    line-height: 1.65;
}

/* AI LOADER */
.ai-loader {
    text-align: center;
    padding: 3rem 1rem;
}

.ai-loader-ring {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 4px solid #f4f7fc;
    border-top-color: #c0202a;
    animation: spinRing 1s linear infinite;
    margin: 0 auto 1.5rem;
}

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

.ai-loader-text {
    font-weight: 600;
    color: #1a2e5a;
    font-size: .9rem;
    margin-bottom: .5rem;
}

.ai-loader-sub {
    font-size: .8rem;
    color: #6b7a99;
}

.ai-dots span {
    animation: dotPulse 1.4s ease infinite;
    opacity: .3;
    font-size: 1.2rem;
}

.ai-dots span:nth-child(2) {
    animation-delay: .2s;
}

.ai-dots span:nth-child(3) {
    animation-delay: .4s;
}

@keyframes dotPulse {

    0%,
    100% {
        opacity: .3
    }

    50% {
        opacity: 1
    }
}

/* TIPS */
.tips-strip {
    background: rgba(245, 166, 35, .08);
    border: 1px solid rgba(245, 166, 35, .25);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-top: 1.25rem;
}

.tips-strip p {
    font-size: .82rem;
    color: #1a2e5a;
    margin: 0;
    line-height: 1.6;
}

.tips-strip strong {
    color: #c0202a;
}

/* TOOL BUTTONS */
.btn-st-red {
    background: #c0202a;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: .9rem;
    padding: .7rem 1.75rem;
    cursor: pointer;
    transition: all .25s;
    box-shadow: 0 4px 16px rgba(192, 32, 42, .3);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn-st-red:hover {
    background: #e8333e;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(192, 32, 42, .4);
}

.btn-st-red:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-st-navy {
    background: #1a2e5a;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: .9rem;
    padding: .7rem 1.75rem;
    cursor: pointer;
    transition: all .25s;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn-st-navy:hover {
    background: #243870;
    transform: translateY(-2px);
}

.btn-st-outline {
    background: transparent;
    color: #1a2e5a;
    border: 2px solid #dde3ef;
    border-radius: 50px;
    font-weight: 700;
    font-size: .85rem;
    padding: .6rem 1.25rem;
    cursor: pointer;
    transition: all .25s;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn-st-outline:hover {
    border-color: #1a2e5a;
    background: #f4f7fc;
}

.btn-st-white {
    background: #fff;
    color: #c0202a;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: .9rem;
    padding: .7rem 1.75rem;
    cursor: pointer;
    transition: all .25s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn-st-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
}

/* UTILITIES */
.st-d-none {
    display: none !important;
}

.st-flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Word count chip */
.wc-chip {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
    background: #f1f5f9;
    color: #6b7a99;
    border: 1px solid #e2e8f0;
    transition: all .3s;
}

.wc-chip.good {
    background: #dcfce7;
    color: #15803d;
    border-color: #86efac;
}

.wc-chip.warn {
    background: #fef9c3;
    color: #b45309;
    border-color: #fde68a;
}

.wc-chip.low {
    background: #fee2e2;
    color: #c0202a;
    border-color: #fca5a5;
}

@media(max-width:600px) {
    .step-panel {
        padding: 1.25rem;
    }

    .prompt-grid {
        grid-template-columns: 1fr;
    }
}