/* ============================================================
   PÁGINAS PÚBLICAS: apresentação (/) e teste de velocidade (/velocidade)
   ============================================================ */

.site-page {
    display: block;
}

.site-main {
    display: flex;
    flex-direction: column;

    gap: 88px;

    width: 100%;
    max-width: 1120px;

    margin: 0 auto;

    padding: 32px 24px 72px;
}


/* ---------- Abertura ---------- */

.site-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;

    gap: 48px;

    padding-top: 24px;
}

.site-hero-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.site-title {
    margin: 18px 0 0;

    font-size: clamp(34px, 5.2vw, 58px);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.03em;
}

.site-title .accent {
    display: block;
}

.site-lead {
    max-width: 52ch;

    margin: 20px 0 0;

    color: var(--text-2);

    font-size: 18px;
    line-height: 1.6;
}

.site-cta {
    display: flex;
    flex-wrap: wrap;

    gap: 12px;

    margin-top: 30px;
}

.site-cta-main,
.site-cta-second {
    height: 54px;

    padding: 0 26px;

    font-size: 16px;
}

.site-badges {
    display: flex;
    flex-wrap: wrap;

    gap: 10px;

    margin: 26px 0 0;
    padding: 0;

    list-style: none;
}

.site-badges li {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    height: 34px;

    padding: 0 14px;

    border: 1px solid var(--line-strong);
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.03);

    color: var(--text-2);

    font-size: 13px;
    font-weight: 600;
}

.site-badges .icon {
    width: 16px;
    height: 16px;
}


/* ---------- Vitrine ---------- */

.site-demo {
    position: relative;

    min-width: 0;
}

.demo-window {
    border: 1px solid var(--line-strong);
    border-radius: 18px;

    background: var(--surface);

    box-shadow: 0 40px 90px -30px rgba(34, 197, 94, 0.18), var(--shadow);

    overflow: hidden;

    transform: perspective(1200px) rotateY(-3deg) rotateX(1deg);
}

.demo-bar {
    display: flex;
    align-items: center;

    gap: 7px;

    height: 38px;

    padding: 0 14px;

    border-bottom: 1px solid var(--line);

    background: var(--surface-2);
}

.demo-bar i {
    width: 10px;
    height: 10px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.16);
}

.demo-bar i:first-child {
    background: var(--brand);
}

.demo-title {
    margin-left: 10px;

    color: var(--text-3);

    font-family: var(--mono);
    font-size: 12px;
}

.demo-screen {
    position: relative;

    display: flex;
    flex-direction: column;

    gap: 12px;

    min-height: 300px;

    padding: 24px;
}

.demo-line {
    height: 12px;

    border-radius: 6px;

    background: rgba(255, 255, 255, 0.07);
}

.demo-line.w60 { width: 60%; }
.demo-line.w85 { width: 85%; }
.demo-line.w40 { width: 40%; }

.demo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 12px;

    margin-top: 8px;
}

.demo-grid span {
    height: 58px;

    border: 1px solid var(--line);
    border-radius: 12px;

    background: rgba(34, 197, 94, 0.06);
}

.demo-ask {
    position: absolute;

    left: 50%;
    bottom: 22px;

    width: min(300px, calc(100% - 40px));

    padding: 14px 16px;

    border: 1px solid var(--line-strong);
    border-radius: 14px;

    background: #0a110d;

    box-shadow: 0 24px 50px -16px rgba(0, 0, 0, 0.9);

    transform: translateX(-50%);

    animation: demo-pop 9s ease-in-out infinite;
}

.demo-ask strong {
    display: block;

    font-size: 13px;
}

.demo-ask-buttons {
    display: flex;
    justify-content: flex-end;

    gap: 8px;

    margin-top: 12px;
}

.demo-ask-buttons span {
    padding: 7px 14px;

    border-radius: 9px;

    font-size: 12px;
    font-weight: 700;
}

.demo-deny {
    border: 1px solid var(--line-strong);

    color: var(--text-2);
}

.demo-allow {
    background: var(--brand);

    color: var(--on-brand);

    animation: demo-allow 9s ease-in-out infinite;
}

.demo-cursor {
    position: absolute;

    left: 18%;
    top: 20%;

    width: 26px;
    height: 26px;

    fill: #fff;
    stroke: #04140a;
    stroke-width: 1.4;

    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6));

    animation: demo-cursor 9s ease-in-out infinite;
}

@keyframes demo-cursor {
    0%   { left: 18%; top: 18%; }
    35%  { left: 52%; top: 32%; }
    60%  { left: 76%; top: 84%; }
    72%  { left: 76%; top: 84%; transform: scale(0.88); }
    100% { left: 18%; top: 18%; }
}

@keyframes demo-pop {
    0%, 45% { opacity: 0; transform: translate(-50%, 14px); }
    55%, 88% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, 14px); }
}

@keyframes demo-allow {
    0%, 68% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
    75% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0.35); }
    90%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.demo-chip {
    position: absolute;

    display: inline-flex;
    align-items: center;

    gap: 8px;

    padding: 9px 14px;

    border: 1px solid var(--line-strong);
    border-radius: 999px;

    background: rgba(9, 14, 11, 0.94);

    color: var(--text);

    font-size: 13px;
    font-weight: 700;

    box-shadow: var(--shadow);

    animation: demo-float 8s ease-in-out infinite;
}

.demo-chip .icon {
    width: 16px;
    height: 16px;

    color: var(--spark);
}

.demo-chip-a { left: -14px; top: 22%; }
.demo-chip-b { right: -10px; bottom: 10%; animation-delay: -2.4s; }

@keyframes demo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}


/* ---------- Seções ---------- */

.site-section {
    display: flex;
    flex-direction: column;
    align-items: center;

    text-align: center;
}

.site-h2 {
    margin: 0;

    font-size: clamp(26px, 3.6vw, 38px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.site-sub {
    max-width: 56ch;

    margin: 12px 0 0;

    color: var(--text-2);

    font-size: 17px;
    line-height: 1.55;
}

.site-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 20px;

    width: 100%;

    margin: 36px 0 0;
    padding: 0;

    list-style: none;
}

.site-steps li {
    padding: 26px 24px;

    border: 1px solid var(--line);
    border-radius: var(--radius);

    background: var(--surface);

    text-align: left;
}

.site-step-num {
    display: inline-grid;
    place-items: center;

    width: 36px;
    height: 36px;

    border-radius: 50%;

    background: var(--brand-soft);

    color: var(--spark);

    font-family: var(--mono);
    font-weight: 700;
}

.site-steps h3,
.site-card h3 {
    margin: 16px 0 6px;

    font-size: 18px;
}

.site-steps p,
.site-card p {
    margin: 0;

    color: var(--text-2);

    font-size: 15px;
    line-height: 1.6;
}

.site-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 20px;

    width: 100%;

    margin-top: 36px;
}

.site-card {
    padding: 26px 24px;

    border: 1px solid var(--line);
    border-radius: var(--radius);

    background: var(--surface);

    text-align: left;

    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-card:hover {
    border-color: rgba(34, 197, 94, 0.4);

    box-shadow: var(--shadow);

    transform: translateY(-2px);
}

.site-card > .icon {
    width: 28px;
    height: 28px;

    color: var(--spark);
}

.site-band {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;

    gap: 24px;

    padding: 36px 40px;

    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 24px;

    background:
        radial-gradient(600px 220px at 0% 0%, rgba(34, 197, 94, 0.18), transparent 70%),
        var(--surface);
}

.site-band .site-sub {
    margin-top: 8px;
}

.site-checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 14px 28px;

    width: 100%;

    margin: 32px 0 0;
    padding: 0;

    list-style: none;
}

.site-checks li {
    display: flex;
    align-items: flex-start;

    gap: 12px;

    color: var(--text-2);

    font-size: 16px;
    line-height: 1.55;

    text-align: left;
}

.site-checks .icon {
    flex: none;

    width: 22px;
    height: 22px;

    margin-top: 1px;

    color: var(--spark);
}

.site-faq {
    max-width: 780px;

    margin: 0 auto;
}

.site-faq details {
    width: 100%;

    border-bottom: 1px solid var(--line);

    text-align: left;
}

.site-faq details:first-of-type {
    margin-top: 28px;

    border-top: 1px solid var(--line);
}

.site-faq summary {
    padding: 18px 0;

    cursor: pointer;

    font-size: 17px;
    font-weight: 700;

    list-style: none;
}

.site-faq summary::-webkit-details-marker {
    display: none;
}

.site-faq summary::after {
    content: "+";

    float: right;

    color: var(--spark);

    font-family: var(--mono);
    font-size: 20px;
}

.site-faq details[open] summary::after {
    content: "–";
}

.site-faq details p {
    margin: 0 0 18px;

    color: var(--text-2);

    line-height: 1.65;
}

.site-final {
    display: flex;
    flex-direction: column;
    align-items: center;

    text-align: center;
}

.site-final .site-cta {
    justify-content: center;
}

.site-footer {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 14px;

    padding: 28px 24px 40px;

    border-top: 1px solid var(--line);

    color: var(--text-3);

    font-size: 13px;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 8px 22px;
}

.site-footer a {
    color: var(--text-2);

    text-decoration: none;
}

.site-footer a:hover {
    color: var(--spark);
}

.site-footer p {
    margin: 0;
}

.site-footer p {
    display: flex;
    gap: 6px;
}

.site-footer p span + span::before {
    content: "·";

    margin-right: 6px;
}


@media (max-width: 900px) {

    .site-hero {
        grid-template-columns: minmax(0, 1fr);

        gap: 36px;
    }

    .demo-window {
        transform: none;
    }

    .demo-chip-a { left: 6px; }
    .demo-chip-b { right: 6px; }

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

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

    .site-main {
        gap: 64px;
    }
}

@media (max-width: 520px) {

    .site-main {
        padding: 20px 16px 56px;
    }

    .site-band {
        padding: 26px 22px;
    }

    .site-cta-main,
    .site-cta-second {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {

    .demo-ask,
    .demo-allow,
    .demo-cursor,
    .demo-chip {
        animation: none;
    }

    .demo-ask {
        opacity: 1;
    }
}


/* ============================================================
   TESTE DE VELOCIDADE (estilo Matrix)
   ============================================================ */

.st-page .matrix-bg {
    opacity: 0.55;
}

.st-main {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 28px;

    width: 100%;
    max-width: 920px;

    margin: 0 auto;

    padding: 28px 20px 64px;
}

.st-head {
    width: 100%;

    text-align: center;
}

.st-head h1 {
    margin: 14px 0 0;

    font-family: var(--mono);
    font-size: clamp(28px, 5vw, 46px);
    font-weight: 700;
    letter-spacing: -0.02em;

    text-shadow: 0 0 24px rgba(74, 222, 128, 0.22);
}

.st-head p {
    max-width: 56ch;

    margin: 12px auto 0;

    color: var(--text-2);

    line-height: 1.6;
}

.st-console {
    position: relative;

    width: 100%;

    padding: 28px 24px 24px;

    border: 1px solid rgba(74, 222, 128, 0.35);
    border-radius: 22px;

    background: rgba(3, 9, 5, 0.86);

    box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.08), 0 30px 80px -30px rgba(34, 197, 94, 0.22);

    backdrop-filter: blur(6px);
}

.st-gauge {
    position: relative;

    container-type: inline-size;

    width: min(340px, 78vw);

    margin: 0 auto;
}

.st-gauge svg {
    display: block;

    width: 100%;
    height: auto;
}

.gauge-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 14;
    stroke-linecap: round;
}

.gauge-fill {
    fill: none;
    stroke: var(--spark);
    stroke-width: 14;
    stroke-linecap: round;

    filter: drop-shadow(0 0 4px rgba(74, 222, 128, 0.4));

    transition: stroke-dashoffset 0.35s ease-out;
}

.gauge-tick {
    stroke: rgba(255, 255, 255, 0.22);
    stroke-width: 2;
}

.gauge-label {
    fill: var(--text-3);

    font-family: var(--mono);
    font-size: 10px;

    text-anchor: middle;
}

.st-readout {
    position: absolute;

    left: 0;
    right: 0;
    top: 38%;

    text-align: center;
}

.st-value {
    font-family: var(--mono);
    font-size: clamp(28px, 19cqw, 64px);
    font-weight: 700;
    line-height: 1;

    color: var(--spark);

    text-shadow: 0 0 18px rgba(74, 222, 128, 0.35);
}

.st-unit {
    margin-top: 6px;

    color: var(--text-3);

    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0.18em;
}

.st-phase {
    min-height: 22px;

    margin: 10px 0 0;

    color: var(--spark);

    font-family: var(--mono);
    font-size: 14px;
    letter-spacing: 0.12em;

    text-align: center;
}

.st-start {
    display: flex;
    justify-content: center;

    margin-top: 18px;
}

.st-start .btn {
    height: 56px;

    padding: 0 34px;

    font-family: var(--mono);
    font-size: 16px;
    letter-spacing: 0.06em;
}

.st-graph {
    display: block;

    width: 100%;
    height: 90px;

    margin-top: 18px;

    border: 1px solid var(--line);
    border-radius: 12px;

    background: rgba(0, 0, 0, 0.35);
}

.st-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 12px;

    width: 100%;
}

.st-stat {
    padding: 16px 14px;

    border: 1px solid var(--line);
    border-radius: 16px;

    background: rgba(3, 9, 5, 0.86);

    text-align: center;
}

.st-stat .icon {
    width: 18px;
    height: 18px;

    color: var(--spark);
}

.st-stat b {
    display: block;

    margin-top: 6px;

    font-family: var(--mono);
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 700;
}

.st-stat small {
    display: block;

    margin-top: 4px;

    color: var(--text-3);

    font-size: 12px;
}

.st-stat.active {
    border-color: rgba(74, 222, 128, 0.6);

    box-shadow: 0 0 16px -8px rgba(74, 222, 128, 0.35);
}

.st-verdict {
    width: 100%;

    padding: 18px 20px;

    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 16px;

    background: rgba(34, 197, 94, 0.07);

    color: var(--text);

    line-height: 1.6;

    text-align: center;
}

.st-verdict strong {
    display: block;

    margin-bottom: 4px;

    color: var(--spark);

    font-family: var(--mono);
}

.st-note {
    max-width: 62ch;

    margin: 0;

    color: var(--text-3);

    font-size: 12.5px;
    line-height: 1.6;

    text-align: center;
}

@media (max-width: 640px) {

    .st-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .st-console {
        padding: 22px 14px 18px;
    }
}

.st-net {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 12px;

    width: 100%;
}

.st-net[hidden] {
    display: none;
}

.st-net > div {
    display: flex;
    align-items: flex-start;

    gap: 12px;

    min-width: 0;

    padding: 14px 16px;

    border: 1px solid var(--line);
    border-radius: 16px;

    background: rgba(3, 9, 5, 0.86);
}

.st-net .icon {
    flex: none;

    width: 20px;
    height: 20px;

    margin-top: 2px;

    color: var(--spark);
}

.st-net span {
    min-width: 0;
}

.st-net small,
.st-net b,
.st-net em {
    display: block;

    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.st-net small {
    color: var(--text-3);

    font-size: 12px;
}

.st-net b {
    margin-top: 2px;

    font-size: 15px;
}

.st-net em {
    overflow: visible;

    white-space: normal;
    overflow-wrap: anywhere;

    margin-top: 2px;

    color: var(--text-2);

    font-size: 13px;
    font-style: normal;
}

@media (max-width: 640px) {

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


/* ============================================================
   STATUS
   ============================================================ */

.st-narrow {
    max-width: 640px;
}

.st-note {
    margin: 0;

    color: var(--text-3);

    font-size: 13px;

    text-align: center;
}

.status-summary {
    display: flex;
    align-items: center;

    gap: 14px;

    width: 100%;

    padding: 20px;

    border: 1px solid var(--line);
    border-radius: var(--radius);

    background: rgba(3, 9, 5, 0.86);
}

.status-summary strong {
    font-size: 18px;
}

.status-dot {
    flex: none;

    width: 14px;
    height: 14px;

    border-radius: 50%;

    background: var(--text-2);
}

.status-summary.ok .status-dot {
    background: var(--ok);

    box-shadow: 0 0 0 6px rgba(74, 222, 128, 0.15);
}

.status-summary.bad .status-dot {
    background: var(--danger);

    box-shadow: 0 0 0 6px rgba(244, 63, 94, 0.15);
}

.status-list {
    width: 100%;

    margin: 0;
    padding: 0;

    border: 1px solid var(--line);
    border-radius: var(--radius);

    background: rgba(3, 9, 5, 0.86);

    list-style: none;
}

.status-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding: 16px 20px;
}

.status-list li + li {
    border-top: 1px solid var(--line);
}

.status-list small {
    display: block;

    color: var(--text-2);
}

.status-tag {
    color: var(--ok);

    font-size: 14px;
    font-weight: 700;

    white-space: nowrap;
}

.status-tag.bad {
    color: var(--danger);
}

/* ---------- Status animado ---------- */

.status-summary.ok {
    border-color: rgba(74, 222, 128, 0.4);

    box-shadow: 0 0 40px -22px rgba(74, 222, 128, 0.3);
}

.status-summary.bad {
    border-color: rgba(244, 63, 94, 0.45);
}

.status-dot {
    position: relative;
}

.status-dot::after {
    content: "";

    position: absolute;
    inset: -6px;

    border: 2px solid currentColor;
    border-radius: 50%;

    color: var(--ok);

    opacity: 0;

    animation: status-ripple 3.6s ease-out infinite;
}

.status-summary.bad .status-dot::after {
    color: var(--danger);
}

@keyframes status-ripple {
    0%   { opacity: 0.45; transform: scale(0.7); }
    100% { opacity: 0;   transform: scale(1.7); }
}

.status-pulse {
    width: 100%;
    height: 54px;

    overflow: hidden;
}

.status-pulse svg {
    display: block;

    width: 100%;
    height: 100%;
}

.status-pulse path {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;

    vector-effect: non-scaling-stroke;
}

.pulse-base {
    stroke: rgba(74, 222, 128, 0.14);
}

.pulse-live {
    stroke: var(--spark);

    stroke-dasharray: 90 700;

    filter: drop-shadow(0 0 3px rgba(74, 222, 128, 0.45));

    animation: status-beat 4.2s linear infinite;
}

@keyframes status-beat {
    from { stroke-dashoffset: 90; }
    to   { stroke-dashoffset: -700; }
}

.status-history {
    width: 100%;

    padding: 16px 18px;

    border: 1px solid var(--line);
    border-radius: var(--radius);

    background: rgba(3, 9, 5, 0.86);
}

.status-history-head {
    display: flex;
    justify-content: space-between;

    gap: 12px;

    color: var(--text-2);

    font-size: 13px;
}

.status-uptime {
    color: var(--spark);

    font-family: var(--mono);
    font-weight: 700;
}

.status-bars {
    display: grid;
    grid-template-columns: repeat(40, minmax(0, 1fr));

    gap: 3px;

    grid-template-rows: 34px;

    height: 34px;

    margin-top: 12px;
}

.status-bars i {
    display: block;

    min-height: 0;

    border: 0;
    border-radius: 3px;

    background: var(--ok);

    transform-origin: bottom;

    animation: status-bar 0.5s ease-out both;
}

.status-bars i.ok {
    box-shadow: 0 0 6px -3px rgba(74, 222, 128, 0.4);
}

.status-bars i.bad {
    background: var(--danger);
}

.status-bars i.none {
    background: rgba(255, 255, 255, 0.06);

    animation: none;
}

@keyframes status-bar {
    from { transform: scaleY(0.1); opacity: 0; }
    to   { transform: scaleY(1);   opacity: 1; }
}

.status-list li {
    transition: background 0.2s ease;
}

.status-list li:hover {
    background: rgba(74, 222, 128, 0.05);
}

@media (prefers-reduced-motion: reduce) {

    .status-dot::after,
    .pulse-live,
    .status-bars i {
        animation: none;
    }
}


/* ---------- Teste de velocidade em tela grande: tudo numa tela, sem rolar ---------- */

@media (min-width: 1000px) and (min-height: 640px) {

    .st-page {
        min-height: 100vh;
    }

    .st-wide {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas:
            "head head"
            "console side";
        align-items: stretch;

        gap: 20px 28px;

        max-width: 1160px;

        padding-top: 8px;
        padding-bottom: 16px;
    }

    .st-wide .st-head {
        grid-area: head;
    }

    .st-wide .st-head h1 {
        margin-top: 8px;

        font-size: clamp(26px, 4.2vh, 38px);
    }

    .st-wide .st-head p {
        margin-top: 6px;

        font-size: 14px;
    }

    .st-wide .st-console {
        grid-area: console;

        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .st-wide .st-gauge {
        width: min(340px, 42vh);
    }

    .st-wide .st-graph {
        height: clamp(54px, 9vh, 90px);
    }

    .st-wide .st-side {
        grid-area: side;

        display: flex;
        flex-direction: column;
        justify-content: center;

        gap: 14px;

        min-width: 0;
    }

    .st-wide .st-stat {
        padding: 12px 10px;
    }

    .st-wide .site-cta {
        margin-top: 0;
    }

    .st-wide .site-cta-main,
    .st-wide .site-cta-second {
        height: 46px;
    }

    .st-wide .st-note {
        font-size: 11.5px;
    }
    .st-wide .st-console {
        padding: 18px 20px 16px;
    }

    .st-wide .st-gauge {
        width: min(340px, 36vh);
    }

    .st-wide .st-start {
        margin-top: 12px;
    }

    .st-wide .st-start .btn {
        height: 48px;
    }
}

.st-side {
    display: contents;
}

@media (min-width: 1000px) and (min-height: 640px) {

    .st-wide .st-side {
        display: flex;
    }
}


/* Botão de velocidade do topo: só o ícone, sem borda. */
.help-link.speed-link {
    border-color: transparent;

    background: transparent;

    box-shadow: none;
}

.help-link.speed-link:hover {
    background: rgba(255, 255, 255, 0.06);
}


/* ============================================================
   Medidor redondo e caixas com sombra (sem bordas)
   ============================================================ */

.st-console {
    border: 0;
    border-radius: 28px;

    background: linear-gradient(160deg, rgba(22, 34, 27, 0.92), rgba(6, 12, 8, 0.94));

    box-shadow:
        0 30px 60px -28px rgba(0, 0, 0, 0.9),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.st-gauge {
    width: min(300px, 78vw);
}

.gauge-face {
    fill: rgba(255, 255, 255, 0.035);

    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.55));
}

.gauge-track {
    stroke-width: 12;
}

.gauge-fill {
    stroke-width: 12;

    filter: drop-shadow(0 4px 8px rgba(34, 197, 94, 0.35));
}

.st-readout {
    top: 50%;

    transform: translateY(-56%);
}

.st-value {
    font-size: clamp(24px, 17cqw, 54px);
}

.st-unit {
    margin-top: 4px;

    font-size: 12px;
}

.st-graph {
    border: 0;
    border-radius: 14px;

    background: rgba(0, 0, 0, 0.35);

    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.55);
}

.st-stat,
.st-net > div,
.st-verdict,
.status-summary,
.status-list,
.status-history {
    border: 0;
    border-radius: 20px;

    background: linear-gradient(160deg, rgba(22, 34, 27, 0.86), rgba(8, 14, 10, 0.9));

    box-shadow:
        0 16px 32px -20px rgba(0, 0, 0, 0.9),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.st-stat.active {
    background: linear-gradient(160deg, rgba(34, 197, 94, 0.18), rgba(8, 14, 10, 0.9));

    box-shadow:
        0 16px 32px -20px rgba(34, 197, 94, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.st-verdict {
    background: linear-gradient(160deg, rgba(34, 197, 94, 0.14), rgba(8, 14, 10, 0.9));
}

.status-list li + li {
    border-top-color: rgba(255, 255, 255, 0.05);
}

@media (min-width: 1000px) and (min-height: 640px) {

    .st-wide .st-gauge {
        width: min(300px, 27vh);
    }

    .st-wide .st-graph {
        height: clamp(40px, 7vh, 80px);
    }

    .st-wide .st-console {
        padding: 14px 20px 14px;
    }

    .st-wide .st-phase {
        margin-top: 4px;
    }
}


/* ============================================================
   Mostrador no estilo do Speedtest: arco em degradê, ponteiro e escala dentro
   ============================================================ */

.gauge-track {
    stroke: rgba(255, 255, 255, 0.09);
    stroke-width: 15;
    stroke-linecap: butt;
}

.gauge-fill {
    stroke: url(#gaugeGrad);
    stroke-width: 15;
    stroke-linecap: butt;

    filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.45));

    transition: none;
}

.gauge-label {
    fill: rgba(230, 238, 233, 0.7);

    font-size: 8.5px;
    font-weight: 700;
}

.gauge-needle {
    fill: #e6eee9;

    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.7));
}

.gauge-hub {
    fill: #0b120e;

    stroke: rgba(255, 255, 255, 0.35);
    stroke-width: 2;
}

.st-readout {
    top: 69%;

    transform: none;
}

.st-value {
    font-size: clamp(20px, 12.5cqw, 40px);
}


/* ============================================================
   Mostrador sem ponteiro: borda fina que carrega e facho em degradê por dentro
   ============================================================ */

.st-gauge {
    width: min(340px, 82vw);
}

.gauge-face {
    fill: rgba(5, 10, 7, 0.9);

    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.55));
}

.gauge-track {
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 3;
}

.gauge-fill {
    stroke-width: 3;

    filter: drop-shadow(0 0 5px rgba(34, 197, 94, 0.7));
}

.gauge-label {
    fill: rgba(230, 238, 233, 0.62);

    font-size: 8px;
}

.gauge-sweep {
    --sweep: 0;

    position: absolute;
    left: 50%;
    top: 50%;

    width: 81.5%;
    aspect-ratio: 1;

    border-radius: 50%;

    background: conic-gradient(
        from 225deg,
        rgba(34, 197, 94, 0) 0deg,
        rgba(34, 197, 94, 0.5) calc(var(--sweep) * 1deg),
        rgba(34, 197, 94, 0) calc(var(--sweep) * 1deg + 0.01deg),
        rgba(34, 197, 94, 0) 360deg
    );

    /* Escurece para o centro: é onde fica o número. */
    -webkit-mask-image: radial-gradient(circle, transparent 12%, rgba(0, 0, 0, 0.55) 46%, #000 96%);
    mask-image: radial-gradient(circle, transparent 12%, rgba(0, 0, 0, 0.55) 46%, #000 96%);

    transform: translate(-50%, -50%);

    pointer-events: none;
}

.st-readout {
    top: 50%;

    z-index: 1;

    transform: translateY(-52%);
}

.st-value {
    font-size: clamp(26px, 16cqw, 52px);
}

@media (min-width: 1000px) and (min-height: 640px) {

    .st-wide .st-gauge {
        width: min(340px, 29vh);
    }
}

/* Sem fundo preto dentro do mostrador (fica o fundo normal da página) e números da escala maiores. */
.gauge-face {
    fill: transparent;

    filter: none;
}

.gauge-label {
    fill: rgba(230, 238, 233, 0.78);

    font-size: 10.5px;
}


/* ============================================================
   Teste de velocidade: fade entre as fases e sem "--" quando não há medição
   ============================================================ */

.st-gauge,
.st-graph,
.st-phase {
    transition: opacity 0.28s ease;
}

.st-console.is-fading .st-gauge,
.st-console.is-fading .st-graph,
.st-console.is-fading .st-phase {
    opacity: 0;
}

.st-stat b[data-value]:empty::before {
    content: "\00a0";
}

.st-verdict:not([hidden]) {
    animation: st-fade-in 0.5s ease both;
}

@keyframes st-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {

    .st-gauge,
    .st-graph,
    .st-phase {
        transition: none;
    }

    .st-verdict:not([hidden]) {
        animation: none;
    }
}

/* Velocidade em tela grande: sobra um respiro entre o conteúdo e o rodapé (que fica no limite da página). */
@media (min-width: 1000px) and (min-height: 640px) {

    .st-wide .st-gauge {
        width: min(340px, 26vh);
    }

    .st-wide .st-graph {
        height: clamp(36px, 6vh, 72px);
    }

    .st-wide {
        padding-bottom: 6px;
    }
}

/* Espaço igual entre o cabeçalho e o conteúdo e entre o conteúdo e o rodapé (na velocidade, em tela grande). */
@media (min-width: 1000px) and (min-height: 640px) {

    .st-wide {
        padding-top: var(--edge-gap);
        padding-bottom: 0;
    }

    .st-wide .st-gauge {
        width: min(340px, 24vh);
    }
}

/* Páginas de velocidade e status: o conteúdo fica centralizado entre o cabeçalho e o rodapé,
   com o mesmo espaço em cima e embaixo, e o rodapé sempre no limite da tela. */
.st-page {
    display: flex;
    flex-direction: column;

    min-height: 100vh;
}

.st-page .st-main {
    flex: 1 0 auto;

    align-content: center;
    justify-content: center;
}

@media (min-width: 1000px) and (min-height: 640px) {

    .st-wide {
        padding-top: var(--edge-gap);
        padding-bottom: var(--edge-gap);
    }

    .st-wide .st-gauge {
        width: min(340px, 22vh);
    }
}

@media (min-width: 1000px) and (min-height: 640px) and (max-height: 760px) {

    .st-wide .st-head p {
        display: none;
    }

    .st-wide .st-graph {
        height: clamp(34px, 5vh, 60px);
    }
}

@media (min-width: 1000px) and (min-height: 860px) {

    .st-wide .st-gauge {
        width: min(340px, 32vh);
    }

    .st-wide .st-graph {
        height: clamp(60px, 8vh, 90px);
    }
}



/* Páginas de velocidade e status: espaço de baixo igual ao de cima (o resto é feito por flutuantes.js). */
.st-main {
    padding-top: 28px;
    padding-bottom: 28px;
}

@media (min-width: 1000px) and (min-height: 640px) {

    .st-main.st-wide {
        padding-top: var(--edge-gap);
        padding-bottom: var(--edge-gap);
    }
}

/* Espaço fixo entre o conteúdo e o rodapé, igual em todas as páginas (o espaço vem do fim do conteúdo) */
.site-footer {
    margin-top: 0;
}

main.st-main {
    padding-bottom: 56px;
}

/* Rodapé sempre no fim da tela: em página curta vai para o pé; em página longa fica logo depois do conteúdo */
body:has(> .site-footer) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body:has(> .site-footer) > main {
    flex: 1 0 auto;
    width: 100%;
}

.site-footer {
    width: 100%;
    box-sizing: border-box;
    margin-top: auto;
}

main.st-main.st-wide,
main.st-main {
    padding-bottom: 56px;
}
