﻿:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-2: #0b1a2e;
  --card: rgba(255, 255, 255, .085);
  --card-strong: rgba(255, 255, 255, .13);
  --stroke: rgba(255, 255, 255, .16);
  --text: #f7fbff;
  --muted: #9fb1c7;
  --soft: #dbeafe;
  --blue: #22d3ee;
  --violet: #8b5cf6;
  --green: #00f0a8;
  --orange: #f59e0b;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, .35);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #eff6ff;
  --bg-2: #dbeafe;
  --card: rgba(255, 255, 255, .78);
  --card-strong: rgba(255, 255, 255, .96);
  --stroke: rgba(15, 23, 42, .12);
  --text: #07111f;
  --muted: #53657a;
  --soft: #0f172a;
  --shadow: 0 24px 80px rgba(30, 64, 175, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at 15% 8%, rgba(34, 211, 238, .22), transparent 28%),
    radial-gradient(circle at 86% 12%, rgba(139, 92, 246, .25), transparent 32%),
    radial-gradient(circle at 42% 78%, rgba(0, 240, 168, .14), transparent 28%),
    linear-gradient(145deg, var(--bg), var(--bg-2));
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .12;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='170' height='170' viewBox='0 0 170 170'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='170' height='170' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }

.shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 36px;
  position: relative;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(22px);
  border-radius: 999px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 16px;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(34,211,238,.25), rgba(139,92,246,.22));
  border: 1px solid rgba(255,255,255,.18);
}
.brand-mark svg { width: 33px; height: 33px; }
.brand-mark svg path:first-child { fill: url(#none); fill: #22d3ee; opacity: .9; }
.brand-mark svg path:last-child { fill: #fff; }
.brand strong { display: block; font-size: 1rem; letter-spacing: -.02em; }
.brand small { display: block; color: var(--muted); font-size: .78rem; margin-top: 1px; }

.top-actions { display: flex; gap: 10px; align-items: center; }
.ghost-btn, .secondary-btn, .primary-btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, opacity .18s ease;
}
.ghost-btn {
  padding: 11px 15px;
  color: var(--text);
  background: rgba(255,255,255,.08);
  border: 1px solid var(--stroke);
}
.ghost-btn:hover, .secondary-btn:hover, .primary-btn:hover { transform: translateY(-1px); }
.ghost-btn:active, .secondary-btn:active, .primary-btn:active { transform: translateY(0) scale(.99); }
button:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 26px;
  align-items: stretch;
  padding: 44px 0 24px;
}
.hero-copy, .gauge-card, .chart-panel, .side-panel, .result-panel, .metric-card {
  border: 1px solid var(--stroke);
  background: linear-gradient(145deg, var(--card), rgba(255,255,255,.045));
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
}
.hero-copy {
  border-radius: var(--radius-xl);
  padding: clamp(28px, 5vw, 58px);
  overflow: hidden;
  position: relative;
}
.hero-copy::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -120px;
  bottom: -130px;
  background: radial-gradient(circle, rgba(34,211,238,.22), transparent 68%);
  pointer-events: none;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .11em;
  font-size: .76rem;
}
.eyebrow span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 24px currentColor;
}
h1 {
  margin: 0;
  font-size: clamp(2.35rem, 6vw, 5.35rem);
  line-height: .92;
  letter-spacing: -.075em;
  max-width: 850px;
}
.lead {
  margin: 24px 0 0;
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.19rem);
  line-height: 1.65;
}
.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 23px;
  color: #06121f;
  font-weight: 900;
  background: linear-gradient(135deg, var(--green), var(--blue));
  box-shadow: 0 18px 45px rgba(34,211,238,.25);
}
.primary-btn.small { padding: 13px 18px; }
.secondary-btn {
  padding: 16px 22px;
  color: var(--text);
  background: rgba(255,255,255,.08);
  border: 1px solid var(--stroke);
}
.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #07111f;
  box-shadow: 0 0 0 0 rgba(7,17,31,.45);
  animation: pulse 1.5s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(7,17,31,0); } }

.gauge-card {
  border-radius: var(--radius-xl);
  padding: 28px;
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 480px;
}
.gauge {
  width: min(390px, 82vw);
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle, rgba(7,17,31,.95) 0 51%, transparent 52%),
    conic-gradient(from 225deg, var(--green) calc(var(--value) * .75deg), rgba(255,255,255,.11) 0 270deg, transparent 0);
  filter: drop-shadow(0 26px 60px rgba(0,0,0,.32));
}
[data-theme="light"] .gauge { background: radial-gradient(circle, rgba(255,255,255,.96) 0 51%, transparent 52%), conic-gradient(from 225deg, var(--blue) calc(var(--value) * .75deg), rgba(15,23,42,.10) 0 270deg, transparent 0); }
.gauge::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.14);
}
.gauge::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 39%;
  background: linear-gradient(to top, transparent, var(--text));
  border-radius: 999px;
  transform-origin: 50% 92%;
  transform: rotate(calc(-135deg + (var(--value) * .75deg))) translateY(-8%);
  opacity: .84;
  filter: drop-shadow(0 0 16px rgba(34,211,238,.55));
}
.gauge-inner {
  width: 54%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  background: linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.035));
  border: 1px solid var(--stroke);
  z-index: 2;
}
.gauge-inner span { color: var(--muted); font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .11em; }
.gauge-inner strong { font-size: clamp(2.1rem, 6vw, 4rem); letter-spacing: -.07em; margin-top: 8px; }
.gauge-inner small { color: var(--muted); font-size: .92rem; font-weight: 700; }
.meter-scale {
  width: min(330px, 74vw);
  margin-top: -14px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}
.status-text { color: var(--muted); text-align: center; margin: 18px auto 0; max-width: 420px; line-height: 1.55; }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 4px 0 24px;
}
.metric-card {
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.metric-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .12;
  background: radial-gradient(circle at 82% 14%, currentColor, transparent 36%);
}
.metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 900;
  background: rgba(255,255,255,.10);
  border: 1px solid var(--stroke);
}
.metric-card p { margin: 16px 0 8px; color: var(--muted); font-weight: 800; }
.metric-card strong { display: flex; align-items: baseline; gap: 7px; font-size: clamp(1.55rem, 3vw, 2.4rem); letter-spacing: -.055em; }
.metric-card strong small { color: var(--muted); font-size: .88rem; letter-spacing: 0; }
.metric-card em { display: block; margin-top: 9px; color: var(--muted); font-size: .86rem; font-style: normal; }
.accent-blue { color: var(--blue); }
.accent-violet { color: var(--violet); }
.accent-green { color: var(--green); }
.accent-orange { color: var(--orange); }

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
}
.chart-panel, .side-panel, .result-panel { border-radius: var(--radius-xl); padding: 24px; }
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.section-title p { margin: 0 0 5px; color: var(--muted); font-weight: 900; text-transform: uppercase; letter-spacing: .10em; font-size: .72rem; }
.section-title h2 { margin: 0; font-size: clamp(1.25rem, 3vw, 2rem); letter-spacing: -.04em; }
.section-title.compact { margin-bottom: 14px; }
.quality-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255,255,255,.09);
  border: 1px solid var(--stroke);
  font-size: .84rem;
  font-weight: 900;
}
#speedChart {
  width: 100%;
  height: 270px;
  display: block;
  border-radius: 22px;
  background: rgba(0,0,0,.17);
  border: 1px solid var(--stroke);
}
.diagnostics { display: grid; gap: 10px; margin: 0; }
.diagnostics div {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.065);
  border: 1px solid var(--stroke);
}
.diagnostics dt { color: var(--muted); font-size: .74rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.diagnostics dd { margin: 5px 0 0; font-weight: 800; overflow-wrap: anywhere; }
.tips {
  margin-top: 14px;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(0,240,168,.11), rgba(34,211,238,.08));
  border: 1px solid rgba(0,240,168,.22);
}
.tips strong { display: block; margin-bottom: 7px; }
.tips p { margin: 0; color: var(--muted); line-height: 1.55; font-size: .92rem; }
.result-panel {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.result-panel[hidden] { display: none; }
.result-panel h2 { margin: 0 0 10px; font-size: clamp(1.4rem, 3vw, 2.5rem); letter-spacing: -.055em; }
.result-panel p:not(.eyebrow) { margin: 0; color: var(--muted); line-height: 1.6; }
.footer { padding: 24px 4px 0; color: var(--muted); text-align: center; line-height: 1.6; font-size: .92rem; }

.is-testing .primary-btn .pulse-dot { background: var(--danger); }

@media (max-width: 960px) {
  .hero, .panel-grid { grid-template-columns: 1fr; }
  .gauge-card { min-height: auto; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .panel-grid { gap: 16px; }
}
@media (max-width: 640px) {
  .shell { width: min(100% - 22px, 1200px); padding-top: 10px; }
  .topbar { position: static; border-radius: 24px; align-items: flex-start; }
  .brand small { display: none; }
  .top-actions { flex-wrap: wrap; justify-content: flex-end; }
  .ghost-btn { padding: 9px 10px; font-size: .82rem; }
  .hero { padding-top: 18px; }
  .hero-copy, .gauge-card, .chart-panel, .side-panel, .result-panel { border-radius: 26px; padding: 20px; }
  .hero-buttons { display: grid; grid-template-columns: 1fr; }
  .primary-btn, .secondary-btn { width: 100%; }
  .metrics { grid-template-columns: 1fr; }
  .result-panel { align-items: stretch; flex-direction: column; }
  #speedChart { height: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ============================================================
   TitanSpeed v2 â€” adiÃ§Ãµes (latÃªncia sob carga, bufferbloat,
   conteÃºdo SEO e grade de mÃ©tricas responsiva)
   ============================================================ */

/* 6 cartÃµes de mÃ©trica: layout adaptÃ¡vel */
.metrics { grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }
@media (max-width: 720px) { .metrics { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .metrics { grid-template-columns: 1fr; } }

/* Novas cores de acento */
.accent-cyan { color: #38bdf8; }
.accent-rose { color: var(--danger); }

/* PÃ­lula de nota do bufferbloat (A+ â€¦ F) */
.bloat-grade {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 20px; padding: 0 7px; margin-left: 6px;
  border-radius: 999px; font-size: .74rem; font-weight: 900; line-height: 1;
  color: #07111f; background: var(--muted); vertical-align: middle;
}
.bloat-grade.b-a { background: var(--green); }
.bloat-grade.b-b { background: #67e8f9; }
.bloat-grade.b-c { background: var(--orange); }
.bloat-grade.b-d { background: #fb923c; }
.bloat-grade.b-f { background: var(--danger); color: #fff; }
.bloat-grade:empty { display: none; }

.metric-card em span:not(:empty) { color: var(--text); font-weight: 800; }

/* Bloco de conteÃºdo indexÃ¡vel (SEO) */
.content {
  margin-top: 30px;
  padding: clamp(22px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  line-height: 1.7;
}
.content h2 {
  margin: 30px 0 10px;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  letter-spacing: -.02em;
}
.content h2:first-child { margin-top: 0; }
.content p, .content li { color: var(--soft); }
.content ul, .content ol { padding-left: 20px; margin: 10px 0 6px; }
.content li { margin: 6px 0; }
.content strong { color: var(--text); }
.content abbr { text-decoration: underline dotted; cursor: help; }

/* FAQ acordeÃ£o */
.faq { margin-top: 10px; display: grid; gap: 10px; }
.faq details {
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  background: var(--card);
  overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 14px 18px; font-weight: 800; color: var(--text);
  list-style: none; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 12px;
  font-size: 1.2rem; color: var(--muted); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 18px 16px; color: var(--soft); }


