/*
 * Homepage Dismissal Analytics & Run Coach showcase
 * ---------------------------------------------------------------------------
 * Self-contained marketing module. Every selector below is scoped to the
 * .analytics-section band or uses the .has-* prefix, so the homepage, its
 * header/footer, the demo modal and the pricing cards are untouched.
 *
 * Palette deliberately mirrors marketing.css:
 *   navy #102a43 / #0b1f33, gold #d4af37 / #f2d46b,
 *   teal-green #82dfd0 / #4fc08d, Manrope headings, DM Sans body.
 */

.analytics-section {
    position: relative;
    padding: 96px 0;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(880px 420px at 84% -8%, rgba(79, 192, 141, .16), transparent 62%),
        radial-gradient(720px 420px at 4% 104%, rgba(212, 175, 55, .11), transparent 66%),
        linear-gradient(180deg, #0b1f33 0%, #102a43 58%, #0d2439 100%);
    border-top: 1px solid rgba(255, 255, 255, .22);
}

.analytics-section,
.analytics-section *,
.analytics-section *::before,
.analytics-section *::after {
    box-sizing: border-box;
}

.has-shell {
    width: min(1160px, calc(100% - 48px));
    margin-inline: auto;
}

/* --- Header --------------------------------------------------------------- */
.has-header {
    max-width: 830px;
    margin: 0 auto 40px;
    text-align: center;
}

.has-eyebrow {
    display: inline-block;
    margin: 0 0 14px;
    color: #f2d46b;
    font-family: Manrope, "DM Sans", Arial, sans-serif;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.has-title {
    margin: 0 0 14px;
    color: #fff;
    font-family: Manrope, "DM Sans", Arial, sans-serif;
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
    text-wrap: balance;
}

.has-title-gold {
    color: #f2d46b;
}

.has-lede {
    max-width: 720px;
    margin: 0 auto;
    color: rgba(255, 255, 255, .82);
    font-size: 17px;
    line-height: 1.65;
}

/* --- Split layout --------------------------------------------------------- */
.has-layout {
    display: grid;
    grid-template-columns: minmax(270px, 330px) minmax(0, 1fr);
    align-items: start;
    gap: 20px;
    min-width: 0;
}

/* --- Insight tabs --------------------------------------------------------- */
.has-tabs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.has-tab {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    width: 100%;
    min-width: 0;
    padding: 16px;
    color: #fff;
    background: rgba(255, 255, 255, .055);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .1);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.has-tab:hover {
    background: rgba(255, 255, 255, .09);
    border-color: rgba(130, 223, 208, .36);
    transform: translateY(-1px);
}

.has-tab[aria-selected="true"] {
    background: linear-gradient(135deg, rgba(79, 192, 141, .18), rgba(255, 255, 255, .07));
    border-color: rgba(130, 223, 208, .66);
    box-shadow: 0 14px 32px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .12);
}

.has-tab:focus-visible {
    outline: 3px solid #fff1af;
    outline-offset: 3px;
}

.has-tab-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    color: #0b1f33;
    background: #82dfd0;
    border-radius: 11px;
}

.has-tab-icon svg {
    width: 21px;
    height: 21px;
}

.has-tab[aria-selected="true"] .has-tab-icon {
    background: linear-gradient(145deg, #f4dc87, #d4af37);
}

.has-tab-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.has-tab-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.has-tab-title {
    color: #fff;
    font-family: Manrope, "DM Sans", Arial, sans-serif;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
}

.has-tab-badge {
    padding: 3px 7px;
    color: #b8f4ea;
    background: rgba(130, 223, 208, .14);
    border: 1px solid rgba(130, 223, 208, .32);
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.has-tab[aria-selected="true"] .has-tab-badge {
    color: #ffe08a;
    background: rgba(242, 212, 107, .14);
    border-color: rgba(242, 212, 107, .42);
}

.has-tab-desc {
    margin: 0;
    color: rgba(255, 255, 255, .68);
    font-size: 13px;
    line-height: 1.5;
}

/* --- Telemetry stage ------------------------------------------------------ */
.has-stage {
    min-width: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, .055);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.has-stage-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    flex-wrap: wrap;
    padding: 14px 18px;
    background: linear-gradient(110deg, rgba(11, 31, 51, .96), rgba(13, 36, 57, .8));
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.has-stage-identity {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.has-stage-live {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: #4fc08d;
    box-shadow: 0 0 0 4px rgba(79, 192, 141, .18);
    animation: has-live-pulse 2.4s ease-in-out infinite;
}

@keyframes has-live-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(79, 192, 141, .18); }
    50% { box-shadow: 0 0 0 6px rgba(79, 192, 141, .08); }
}

.has-stage-school {
    color: #fff;
    font-family: Manrope, "DM Sans", Arial, sans-serif;
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: .09em;
    overflow-wrap: anywhere;
}

.has-stage-sep {
    color: rgba(255, 255, 255, .38);
}

.has-stage-kpis {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.has-kpi {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    padding: 5px 9px;
    color: rgba(255, 255, 255, .72);
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
}

.has-kpi strong {
    color: #ffe08a;
    font-family: Manrope, "DM Sans", Arial, sans-serif;
    font-size: 12px;
    font-weight: 800;
}

.has-stage-panels {
    padding: 16px;
}

.has-stage-panel {
    min-width: 0;
}

.has-stage-panel[hidden] {
    display: none !important;
}

.has-panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 6px 14px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.has-panel-kicker {
    margin: 0 0 2px;
    color: #82dfd0;
    font-family: Manrope, "DM Sans", Arial, sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.has-panel-title {
    margin: 0;
    color: #fff;
    font-family: Manrope, "DM Sans", Arial, sans-serif;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.15;
}

.has-panel-note {
    margin: 0;
    color: rgba(255, 255, 255, .62);
    font-size: 12px;
    line-height: 1.4;
}

.has-panel-note strong {
    color: #ffe08a;
}

/* --- Chart surface -------------------------------------------------------- */
.has-chart-surface {
    padding: 10px 10px 6px;
    background: #f7f9fb;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 #fff, 0 10px 24px rgba(0, 0, 0, .16);
}

.has-chart {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.has-chart text {
    font-family: "DM Sans", Arial, sans-serif;
    user-select: none;
    -webkit-user-select: none;
}

.has-chart .has-chart-axis {
    fill: #40566b;
    font-size: 16px;
    font-weight: 600;
}

.has-chart .has-chart-ref {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .04em;
}

/* Pointer focus must never paint a ring around the chart surface or any
   interactive mark inside it. The gold ring is reserved for keyboard users. */
.has-chart:focus,
.has-chart-surface :is(svg, circle, path, rect, g)[tabindex]:focus,
.has-chart .has-pace-hit:focus,
.has-chart .has-release-hit:focus {
    outline: none;
}

.has-chart:focus-visible,
.has-chart-surface :is(svg, circle, path, rect, g)[tabindex]:focus-visible,
.has-chart .has-pace-hit:focus-visible,
.has-chart .has-release-hit:focus-visible {
    outline: 2px solid rgba(242, 212, 107, 0.85);
    outline-offset: 3px;
}

/* --- In-chart floating telemetry overlays --------------------------------- */
.has-pace-stats,
.has-release-pill {
    pointer-events: none;
    filter: drop-shadow(0 2px 3px rgba(11, 31, 51, .24));
}

.has-pace-active-dot {
    filter: drop-shadow(0 1px 2px rgba(11, 31, 51, .24));
}

.has-pace-stats-title {
    fill: #102a43;
    font-family: Manrope, "DM Sans", Arial, sans-serif;
    font-size: 18px;
    font-weight: 800;
}

.has-pace-stats-main {
    fill: #102a43;
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
}

.has-pace-stats-detail {
    fill: #40566b;
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
}

.has-release-pill-tag {
    fill: #102a43;
    font-family: Manrope, "DM Sans", Arial, sans-serif;
    font-size: 20px;
    font-weight: 800;
    text-anchor: middle;
}

/* --- Legends -------------------------------------------------------------- */
.has-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 9px;
    color: rgba(255, 255, 255, .62);
    font-size: 11.5px;
    line-height: 1.3;
}

.has-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.has-legend-line {
    width: 18px;
    height: 3px;
    border-radius: 2px;
    background: #4fc08d;
}

.has-legend-bar {
    width: 8px;
    height: 12px;
    border-radius: 2px;
    background: rgba(79, 192, 141, .35);
}

.has-legend-dash {
    width: 18px;
    height: 0;
    border-top: 2px dashed #d4af37;
}

.has-legend-dash--soft {
    border-top-color: #8ba0b2;
}

.has-legend-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: #4fc08d;
}

.has-legend-dot--buffer {
    background: #f2d46b;
    box-shadow: 0 0 0 1px #a47d16;
}

/* --- Principal Pulse & Run Coach ----------------------------------------- */
/* Living Mint Telemetry: the same three-stop mint gradient, 16px dot grid,
   4px teal accent rail and beveled deep-teal heartbeat well used by the live
   app's School Pulse / Principal Pulse cards. */
.has-pulse {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "icon body pill";
    align-items: center;
    gap: 10px 14px;
    min-width: 0;
    padding: 13px 16px 13px 14px;
    color: #19374a;
    background-color: #d8f1e8;
    background-image:
        radial-gradient(rgba(19, 90, 92, 0.085) 1px, transparent 1px),
        linear-gradient(155deg, rgba(238, 252, 246, 0.96) 0%, rgba(196, 238, 226, 0.90) 58%, rgba(164, 221, 206, 0.88) 100%);
    background-size: 16px 16px, 100% 100%;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-left: 4px solid #176f71;
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 10px 24px rgba(3, 18, 24, .14);
}

.has-pulse-icon {
    display: grid;
    grid-area: icon;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    color: #82dfd0;
    background-color: #143f43;
    background-image: linear-gradient(160deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 52%, rgba(0, 0, 0, .16));
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 10px rgba(19, 90, 92, 0.22);
}

.has-pulse-icon svg {
    display: block;
    width: 22px;
    height: 22px;
    overflow: visible;
}

.has-pulse-wave-track {
    fill: none;
    stroke: #82dfd0;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .3;
}

.has-pulse-wave-path {
    fill: none;
    stroke: #82dfd0;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: has-pulse-heartbeat-wave 3.2s cubic-bezier(.45, 0, .25, 1) infinite, has-pulse-heartbeat-glow 3.2s ease-in-out infinite;
}

@keyframes has-pulse-heartbeat-wave {
    0% { stroke-dashoffset: 100; opacity: .45; }
    16% { stroke-dashoffset: 0; opacity: 1; }
    58% { stroke-dashoffset: 0; opacity: 1; }
    76% { stroke-dashoffset: -100; opacity: .35; }
    100% { stroke-dashoffset: 100; opacity: .45; }
}

@keyframes has-pulse-heartbeat-glow {
    0%, 62%, 100% { filter: drop-shadow(0 0 0 rgba(130, 223, 208, 0)); }
    20% { filter: drop-shadow(0 0 6px rgba(130, 223, 208, .95)); }
    34% { filter: drop-shadow(0 0 3px rgba(130, 223, 208, .55)); }
}

.has-pulse-body {
    grid-area: body;
    min-width: 0;
}

.has-pulse-pill {
    display: inline-flex;
    grid-area: pill;
    align-items: center;
    justify-content: center;
    justify-self: end;
    gap: 6px;
    padding: 4px 10px;
    color: #135a5c;
    background: rgba(255, 255, 255, .56);
    border: 1px solid rgba(19, 90, 92, .18);
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
    font-family: Manrope, "DM Sans", Arial, sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.has-pulse-pill::before {
    width: 5px;
    height: 5px;
    flex: 0 0 5px;
    border-radius: 50%;
    background: #176f71;
    content: "";
}

.has-pulse-kicker {
    margin: 0 0 2px;
    color: #135a5c;
    font-family: Manrope, "DM Sans", Arial, sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.has-pulse-copy {
    margin: 0;
    color: #19374a;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    overflow-wrap: break-word;
}

.has-coach-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.has-coach-card {
    position: relative;
    overflow: hidden;
    padding: 14px;
    color: #142f45;
    background: #f7f9fb;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 13px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .14);
}

.has-coach-card[hidden] {
    display: none !important;
}

.has-coach-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #4fc08d;
    content: "";
}

.has-coach-card--wave::before {
    background: #d4af37;
}

.has-coach-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.has-coach-kind {
    color: #40566b;
    font-family: Manrope, "DM Sans", Arial, sans-serif;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .09em;
    line-height: 1.2;
    text-transform: uppercase;
}

.has-coach-tag {
    padding: 3px 7px;
    color: #166b53;
    background: rgba(79, 192, 141, .16);
    border-radius: 999px;
    font-family: Manrope, "DM Sans", Arial, sans-serif;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.2;
    white-space: nowrap;
}

.has-coach-card--wave .has-coach-tag {
    color: #7b5a05;
    background: rgba(212, 175, 55, .18);
}

.has-coach-copy {
    margin: 0;
    color: #223c52;
    font-size: 13px;
    line-height: 1.5;
}

/* --- Utility -------------------------------------------------------------- */
.has-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 900px) {
    .has-shell {
        width: min(100% - 36px, 760px);
    }

    .has-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .has-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .has-tab {
        flex: 1 1 210px;
        align-items: center;
        padding: 11px 12px;
    }

    .has-tab-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .has-tab-desc {
        display: none;
    }

    .has-tab-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        border-radius: 9px;
    }

    .has-chart .has-chart-axis {
        font-size: 18px;
    }

    .has-chart .has-chart-ref {
        font-size: 16px;
    }
}

@media (max-width: 760px) {
    .analytics-section {
        padding: 72px 0;
    }

    .has-shell {
        width: calc(100% - 30px);
    }

    .has-header {
        margin-bottom: 30px;
    }

    .has-lede {
        font-size: 15px;
    }

    .has-stage-panels {
        padding: 13px;
    }

    .has-stage-bar {
        padding: 12px 14px;
    }
}

@media (max-width: 600px) {
    .has-tab {
        flex: 1 1 150px;
    }

    .has-panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .has-coach-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .has-chart .has-chart-axis {
        font-size: 21px;
    }

    .has-chart .has-chart-ref {
        font-size: 18px;
    }
}

@media (max-width: 620px) {
    .has-pulse {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            "icon pill"
            "body body";
        gap: 8px 12px;
        padding: 11px 13px 12px 11px;
    }

    .has-pulse-pill {
        justify-self: end;
    }
}

@media (max-width: 480px) {
    .analytics-section {
        padding: 60px 0;
    }

    .has-title {
        font-size: 30px;
    }

    .has-stage {
        border-radius: 15px;
    }

    .has-stage-panels {
        padding: 10px;
    }

    .has-stage-bar {
        padding: 11px 12px;
    }

    .has-stage-school {
        font-size: 10.5px;
        letter-spacing: .06em;
    }

    .has-kpi {
        gap: 4px;
        padding: 4px 8px;
        font-size: 10.5px;
    }

    .has-kpi strong {
        font-size: 11.5px;
    }

    .has-chart-surface {
        padding: 6px 4px 3px;
        border-radius: 11px;
    }

    .has-pulse-copy {
        font-size: 13.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .analytics-section *,
    .analytics-section *::before,
    .analytics-section *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }

    .has-stage-live {
        animation: none;
    }

    .has-pulse-wave-path {
        animation: none !important;
        stroke-dashoffset: 0;
        opacity: 1;
        filter: none;
    }
}
