/* =========================================
   Digital Readiness Assessment — tool pages
   Builds on style.css (nav, buttons, type, :root vars).
   ========================================= */

:root {
    --tool-accent: #0d9488;
    /* teal — interactive accents only */
    --tool-accent-dark: #0f766e;
    --tool-muted: #6b7280;
    --tool-line: #e5e7eb;
    --tool-card: #ffffff;
    --tool-bg-soft: #fafaf7;
}

/* Global tool shell — pushes content below the fixed site nav */
body.tool-page {
    background: #fff;
    padding-top: var(--nav-height);
}

/* Small subtitle slot shown in the site nav on tool pages */
.nav-tool-title {
    color: var(--tool-muted);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.2px;
}

@media (max-width: 720px) {
    .nav-tool-title {
        display: none;
    }
}

.tool-shell {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 5% 60px;
}

.tool-shell--narrow {
    max-width: 760px;
    padding-bottom: 160px;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.tool-hero-label {
    color: var(--tool-accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.72rem;
    font-weight: 700;
}

.tool-hero h1 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    line-height: 1.2;
    color: #111;
    margin: 10px 0 10px;
}

.tool-hero-sub {
    color: var(--tool-muted);
    max-width: 560px;
    font-size: 1.02rem;
}

.tool-hero-meta {
    color: var(--tool-muted);
    margin-top: 6px;
    font-size: 0.95rem;
}

/* ── Progress bar (assessment) ───────────────────────────────────────── */
.progress-wrap {
    margin: 28px 0 22px;
}

.progress-track {
    height: 6px;
    background: #e7e5de;
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--tool-accent);
    transition: width 0.35s ease;
}

.progress-label {
    margin-top: 8px;
    font-size: 0.78rem;
    color: var(--tool-muted);
    font-weight: 500;
}

/* ── Question panels ─────────────────────────────────────────────────── */
.q-stage {
    position: relative;
    min-height: 280px;
}

.q-panel {
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 0.28s ease, transform 0.28s ease;
    pointer-events: none;
    position: absolute;
    inset: 0;
}

.q-panel.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    position: relative;
}

.q-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.35rem;
    line-height: 1.35;
    color: #111;
}

.q-sub {
    margin-top: 8px;
    font-size: 0.82rem;
    color: var(--tool-muted);
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 22px;
}

.opt {
    background: var(--tool-card);
    border: 1px solid var(--tool-line);
    border-radius: 12px;
    padding: 16px 18px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 14px;
    user-select: none;
}

.opt:hover {
    border-color: #c9cec4;
    background: #fbfaf6;
}

.opt .indicator {
    flex: 0 0 22px;
    height: 22px;
    border: 1.5px solid #cfd4c9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    transition: all 0.15s ease;
}

.opt[data-type="multi"] .indicator {
    border-radius: 5px;
}

.opt .indicator::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--tool-accent);
    transform: scale(0);
    transition: transform 0.15s ease;
}

.opt[data-type="multi"] .indicator::after {
    border-radius: 2px;
}

.opt.selected {
    border-color: var(--tool-accent);
    background: #f0fdfa;
}

.opt.selected .indicator {
    border-color: var(--tool-accent);
    background: #fff;
}

.opt.selected .indicator::after {
    transform: scale(1);
}

.opt-label {
    flex: 1;
    font-size: 0.98rem;
    color: #1f2937;
}

/* ── Fixed bottom bar (assessment) ───────────────────────────────────── */
.tool-bottombar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-top: 1px solid var(--tool-line);
    padding: 14px 24px;
    z-index: 40;
}

.tool-bottombar-inner {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.btn-tool {
    border: none;
    border-radius: 10px;
    padding: 12px 22px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn-tool-ghost {
    background: transparent;
    color: var(--tool-muted);
}

.btn-tool-ghost:hover {
    color: #111;
}

.btn-tool-ghost[disabled] {
    opacity: 0;
    pointer-events: none;
}

.btn-tool-primary {
    background: var(--tool-accent);
    color: #fff;
}

.btn-tool-primary:hover {
    background: var(--tool-accent-dark);
}

.btn-tool-primary[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ── Loading overlays ────────────────────────────────────────────────── */
.fp-overlay,
.submit-overlay {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    text-align: center;
}

.fp-overlay.hidden {
    display: none;
}

.submit-overlay {
    background: rgba(255, 255, 255, 0.96);
    z-index: 300;
    display: none;
}

.submit-overlay.active {
    display: flex;
}

.submit-overlay h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    color: #111;
    margin: 0;
}

.submit-overlay p {
    color: var(--tool-muted);
    max-width: 420px;
    margin: 0;
}

.fp-text {
    color: var(--tool-muted);
    font-size: 0.92rem;
}

.spinner {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid #e5e5e5;
    border-top-color: var(--tool-accent);
    animation: tool-spin 0.7s linear infinite;
}

@keyframes tool-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Report: score block ─────────────────────────────────────────────── */
.score-block {
    display: flex;
    align-items: center;
    gap: 32px;
    margin: 18px 0 10px;
    flex-wrap: wrap;
}

.score-number {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 72px;
    line-height: 1;
    color: #111;
}

.score-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--tool-line);
    color: #111;
    font-weight: 600;
    font-size: 0.92rem;
}

.score-badge.b1 {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.score-badge.b2 {
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}

.score-badge.b3 {
    background: #dbeafe;
    border-color: #bfdbfe;
    color: #1e40af;
}

.score-badge.b4 {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

.hero-summary {
    color: #374151;
    font-size: 1.02rem;
    margin-top: 6px;
    max-width: 700px;
}

/* ── Section cards (report) ──────────────────────────────────────────── */
.tool-card {
    background: var(--tool-card);
    border: 1px solid var(--tool-line);
    border-radius: 16px;
    padding: 28px;
    margin-top: 24px;
}

.tool-card h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: #111;
    margin: 0 0 6px;
}

.tool-card .sub {
    color: var(--tool-muted);
    font-size: 0.92rem;
    margin-bottom: 18px;
}

/* ── Radar + legend ──────────────────────────────────────────────────── */
.radar-wrap {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    align-items: start;
}

.radar svg {
    max-width: 100%;
    height: auto;
    display: block;
}

.legend {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-name {
    flex: 1;
    font-size: 0.95rem;
    color: #1f2937;
    font-weight: 500;
}

.legend-bar {
    flex: 1.2;
    height: 8px;
    background: #f1f0ea;
    border-radius: 999px;
    overflow: hidden;
}

.legend-bar-fill {
    height: 100%;
    border-radius: 999px;
}

.legend-score {
    width: 44px;
    text-align: right;
    font-weight: 600;
    font-size: 0.92rem;
    color: #111;
}

@media (max-width: 720px) {
    .radar-wrap {
        grid-template-columns: 1fr;
    }
}

/* ── Action plan ─────────────────────────────────────────────────────── */
.actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action {
    background: var(--tool-bg-soft);
    border: 1px solid var(--tool-line);
    border-left: 5px solid var(--tool-accent);
    border-radius: 10px;
    padding: 16px 18px;
}

.action .head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.action .num {
    width: 26px;
    height: 26px;
    background: #111;
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.action .title {
    font-weight: 600;
    color: #111;
    font-size: 1rem;
}

.action .cat {
    margin-left: auto;
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f0f0eb;
    color: #555;
    font-weight: 600;
}

.action .desc {
    margin-top: 8px;
    color: #374151;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ── Lead capture form ───────────────────────────────────────────────── */
.capture {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.capture label {
    flex: 1 1 180px;
    margin: 0;
}

.capture input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--tool-line);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
}

.capture input:focus {
    outline: none;
    border-color: var(--tool-accent);
}

.capture-status {
    margin-top: 10px;
    font-size: 0.88rem;
    color: var(--tool-muted);
    min-height: 1.2em;
}

.capture-status.ok {
    color: #166534;
}

.capture-status.err {
    color: #991b1b;
}

/* ── Dark CTA section ────────────────────────────────────────────────── */
.tool-cta {
    background: #1a1a2e;
    color: #fff;
    border-radius: 16px;
    padding: 40px 32px;
    margin-top: 32px;
    text-align: center;
}

.tool-cta h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    margin-bottom: 12px;
    color: #fff;
}

.tool-cta p {
    color: #cbd5e1;
    max-width: 560px;
    margin: 0 auto 22px;
}

/* ── Returning visitor card ──────────────────────────────────────────── */
.return-wrap {
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 5%;
}

.return-card {
    background: #fff;
    border: 1px solid var(--tool-line);
    border-radius: 16px;
    padding: 48px 40px;
    max-width: 560px;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.return-check {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #ccfbf1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.return-check svg {
    width: 36px;
    height: 36px;
    color: var(--tool-accent);
}

.return-card h1 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    margin: 12px 0 14px;
    color: #111;
    line-height: 1.25;
}

.return-card p.sub {
    color: var(--tool-muted);
    font-size: 0.98rem;
    max-width: 440px;
    margin: 0 auto 28px;
}

.return-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.return-actions .btn-tool {
    min-width: 240px;
    justify-content: center;
}

.return-or {
    font-size: 0.78rem;
    color: var(--tool-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 4px 0;
}

/* =========================================================================
   Report dashboard (update.md spec)
   Scoped via body.report-page so other tool pages are unaffected.
   ========================================================================= */
body.report-page {
    background: #f7f6f2;
    padding-top: var(--nav-height);
}

.report-page nav {
    background: #fff;
    border-bottom: 0.5px solid #e8e6de;
}

.report-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

@media (max-width: 640px) {
    .report-shell {
        padding: 24px 16px;
    }
}

.report-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.report-meta-label {
    color: #0d9488;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.report-meta-sep {
    color: #c0bdb5;
}

.report-meta-info {
    font-size: 12px;
    color: #9a9890;
}

.report-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 24px;
    line-height: 1.25;
}

/* ── KPI cards ─────────────────────────────────────────────────────── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}

.kpi-card {
    background: #fff;
    border: 0.5px solid #e2e0d8;
    border-radius: 12px;
    padding: 18px 20px;
}

.kpi-label {
    font-size: 11px;
    color: #9a9890;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-bottom: 10px;
}

.kpi-value {
    font-family: 'Outfit', sans-serif;
    font-size: 60px;
    color: #1a1a2e;
    line-height: 1.1;
    font-weight: bold;
}

.kpi-value--stage {
    font-size: 22px;
}

.kpi-value--gap {
    color: #e24b4a;
}

.kpi-value .pct {
    font-size: 20px;
    color: #0d9488;
    margin-left: 2px;
}

.kpi-sub {
    font-size: 12px;
    color: #9a9890;
    margin-top: 6px;
}

.kpi-dot-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #9a9890;
    margin-top: 6px;
}

.kpi-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.kpi-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    margin-top: 8px;
    border-width: 1px;
    border-style: solid;
}

.kpi-badge.b1 {
    background: #fff0f0;
    color: #a32d2d;
    border-color: #f09595;
}

.kpi-badge.b2 {
    background: #fffbeb;
    color: #854f0b;
    border-color: #fac775;
}

.kpi-badge.b3 {
    background: #f0fdfb;
    color: #0a6b61;
    border-color: #99f6e4;
}

.kpi-badge.b4 {
    background: #eff6ff;
    color: #1e40af;
    border-color: #93c5fd;
}

.kpi-counts {
    display: inline-flex;
    gap: 8px;
}

.kpi-counts span {
    font-weight: 600;
}

.kpi-counts .c-high {
    color: #e24b4a;
}

.kpi-counts .c-med {
    color: #ef9f27;
}

.kpi-counts .c-low {
    color: #0d9488;
}

/* ── Two-column radar + score bars ─────────────────────────────────── */
.report-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 640px) {
    .report-two-col {
        grid-template-columns: 1fr;
    }
}

.report-panel {
    background: #fff;
    border: 0.5px solid #e2e0d8;
    border-radius: 14px;
    padding: 24px;
}

@media (max-width: 640px) {
    .report-panel {
        padding: 16px;
    }
}

.report-panel-title {

    color: #1a1a2e;
    margin: 0 0 4px;
}

.report-panel-sub {
    font-size: 12px;
    color: #9a9890;
    margin: 0 0 20px;
}

.radar-svg {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

.score-bar-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}

.score-bar-row:last-child {
    margin-bottom: 0;
}

.score-bar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.score-bar-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #1a1a2e;
}

.score-bar-val {
    font-size: 13px;
    font-weight: 500;
}

.score-bar-track {
    height: 7px;
    background: #f0ede8;
    border-radius: 4px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 4px;
}

/* ── Action plan ───────────────────────────────────────────────────── */
.report-section-head {
    margin-bottom: 16px;
}

.report-section-head h2 {

    color: #1a1a2e;
    margin: 0 0 4px;
}

.report-section-head p {
    font-size: 13px;
    color: #9a9890;
    margin: 0;
}

.action-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.action-card {
    background: #fff;
    border: 0.5px solid #e2e0d8;
    border-radius: 0 12px 12px 0;
    padding: 16px 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.action-card.p-high {
    border-left: 3px solid #e24b4a;
}

.action-card.p-mid {
    border-left: 3px solid #ef9f27;
}

.action-card.p-low {
    border-left: 3px solid #0d9488;
}

.action-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #1a1a2e;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.action-body {
    flex: 1;
    min-width: 0;
}

.action-card .action-title {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.action-card .action-desc {
    font-size: 13px;
    color: #7a7870;
    line-height: 1.55;
}

.action-tag {
    display: inline-block;
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 20px;
    margin-top: 8px;
    border-width: 1px;
    border-style: solid;
}

.action-tag.p-high {
    background: #fff0f0;
    color: #a32d2d;
    border-color: #f09595;
}

.action-tag.p-mid {
    background: #fffbeb;
    color: #854f0b;
    border-color: #fac775;
}

.action-tag.p-low {
    background: #f0fdfb;
    color: #0a6b61;
    border-color: #5dcaa5;
}

/* ── Lead capture (restyled) ───────────────────────────────────────── */
.lead-capture-v2 {
    background: #fff;
    border: 0.5px solid #e2e0d8;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 640px) {
    .lead-capture-v2 {
        padding: 16px;
    }
}

.lead-capture-v2 .text h3 {

    color: #1a1a2e;
    margin: 0 0 3px;
}

.lead-capture-v2 .text p {
    font-size: 12px;
    color: #9a9890;
    margin: 0;
}

.lead-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.lead-form input {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    padding: 9px 14px;
    border: 0.5px solid #e2e0d8;
    border-radius: 8px;
    background: #f7f6f2;
    width: 160px;
}

.lead-form input:focus {
    outline: none;
    border-color: #0d9488;
}

.lead-form button {
    background: #1a1a2e;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 9px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.lead-form button:hover {
    background: #000;
}

/* ── Dark CTA ──────────────────────────────────────────────────────── */
.report-cta {
    background: #1a1a2e;
    border-radius: 14px;
    padding: 36px;
    text-align: center;
    margin-bottom: 32px;
}

@media (max-width: 640px) {
    .report-cta {
        padding: 28px 20px;
    }
}

.report-cta h2 {
    font-family: 'Outfit', sans-serif;

    color: #fff;
    margin: 0 0 8px;
    font-weight: 600;
}

.report-cta p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.6;
    margin: 0 auto 22px;
    max-width: 560px;
}

.report-cta a.btn {
    display: inline-block;
    background: #0d9488;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    padding: 13px 32px;
    border-radius: 8px;
    text-decoration: none;
}

.report-cta a.btn:hover {
    background: #0f766e;
}

.report-cta .note {
    margin-top: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}

/* ── Responsive tweaks ───────────────────────────────────────────────── */
@media (max-width: 600px) {
    .tool-shell {
        padding: 24px 5% 40px;
    }

    .tool-shell--narrow {
        padding-bottom: 140px;
    }

    .tool-card {
        padding: 22px 18px;
    }

    .score-number {
        font-size: 56px;
    }

    .tool-cta {
        padding: 32px 20px;
    }

    .q-text {
        font-size: 1.15rem;
    }

    .opt {
        padding: 14px 16px;
    }

    .tool-bottombar {
        padding: 12px 18px;
    }

    .return-card {
        padding: 36px 24px;
    }

    .return-card h1 {
        font-size: 1.5rem;
    }
}

/* =========================================
   TOOL INTRO PAGE (www/tool/index.html)
   Lightweight — leans on style.css for layout.
   ========================================= */
.tool-terms-note {
    margin-top: 20px;
    font-size: 0.82rem;
    color: var(--text-light);
    max-width: 520px;
    font-weight: 400;
}

.tool-terms-note a {
    color: var(--brand-blue);
    text-decoration: underline;
}

.tool-terms-note a:hover {
    color: var(--brand-black);
}
