:root {
  --bg: #0d1b2a;
  --bg-alt: #13253a;
  --card: #16283d;
  --accent: #00c8b4;
  --accent2: #6a5cff;
  --text: #eaf2f8;
  --text-dim: #93a7b8;
  --track: #22384f;
  --danger: #ff5d73;
  --good: #3ddc97;
  --warn: #ffcc4d;
  font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 50% -10%, #1c3350 0%, var(--bg) 55%);
  color: var(--text);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100%;
}

a { color: inherit; text-decoration: none; }

.topbar {
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.topbar-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.brand-icon { color: var(--accent); }
.brand-name { color: var(--accent); }

.topnav {
  display: flex;
  gap: 28px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.topnav a {
  color: var(--text-dim);
  padding-bottom: 6px;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}

.topnav a:hover { color: var(--text); }
.topnav a.active { color: var(--accent); border-color: var(--accent); }

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 24px 60px;
}

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

.hero-h1 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 4px 0 0;
}

.page-tagline {
  max-width: 640px;
  margin: 10px auto 0;
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.5;
}

.provider-line {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 28px 0 6px;
}

.provider-line .dot { opacity: 0.5; }

.gauge-wrap {
  position: relative;
  width: min(420px, 90vw);
  margin-top: 18px;
}

.gauge { width: 100%; height: auto; overflow: visible; }

.gauge-track, .gauge-fill {
  fill: none;
  stroke-width: 14;
  stroke-linecap: round;
}

.gauge-track { stroke: var(--track); }

.gauge-fill {
  stroke: var(--accent);
  transition: d .15s linear;
}

.needle {
  stroke: var(--text);
  stroke-width: 3;
  stroke-linecap: round;
  transform-origin: 150px 170px;
  transition: transform .18s cubic-bezier(.4,1.4,.6,1);
  filter: drop-shadow(0 0 4px rgba(0,200,180,0.6));
}

.needle-hub { fill: var(--text); }

.tick { stroke: var(--text-dim); stroke-width: 1.5; opacity: 0.6; }
.tick-label { fill: var(--text-dim); font-size: 9px; text-anchor: middle; }

.gauge-readout {
  position: absolute;
  top: 62%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gauge-readout #gaugeValue {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.gauge-unit {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.gauge-phase {
  margin-bottom: 6px;
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  min-height: 1em;
}

.start-btn {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, -55%);
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  background: radial-gradient(circle at 30% 30%, #123a34, var(--bg-alt));
  color: var(--accent);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(0,200,180,0.5);
  transition: transform .15s ease, box-shadow .3s ease, background .3s ease;
}

.start-btn:hover:not(:disabled) {
  transform: translate(-50%, -55%) scale(1.05);
  box-shadow: 0 0 24px 4px rgba(0,200,180,0.35);
}

.start-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.start-btn.running {
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0,200,180,0.45); }
  70% { box-shadow: 0 0 0 18px rgba(0,200,180,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,200,180,0); }
}

.metrics {
  margin-top: 70px;
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 12px;
  width: 100%;
}

.metric {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px;
  padding: 16px 10px;
}

.metric-icon { font-size: 1.2rem; opacity: 0.85; }

.metric-label {
  color: var(--text-dim);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.metric-value {
  margin-top: 6px;
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.metric-value small {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-left: 3px;
  font-weight: 500;
}

.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: var(--track);
  border-radius: 3px;
  margin-top: 26px;
  overflow: hidden;
  opacity: 0;
  transition: opacity .3s;
}

.progress-bar-wrap.active { opacity: 1; }

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width .2s ease;
}

.history-section, .about-section {
  margin-top: 70px;
}

.history-section h2, .about-section h2 {
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 10px;
}

.history-empty {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 14px;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 0.88rem;
}

.history-table th, .history-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.history-table th {
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
}

.about-section p {
  color: var(--text-dim);
  line-height: 1.6;
  font-size: 0.92rem;
  margin-top: 12px;
}

/* Related-tests + blog teaser cards on the homepage */
.related-section, .blog-teaser-section {
  margin-top: 70px;
  width: 100%;
}

.related-section h2, .blog-teaser-section h2 {
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 10px;
  text-align: left;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.link-card {
  display: block;
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px;
  padding: 18px;
  text-align: left;
  transition: border-color .2s, transform .2s;
}

.link-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.link-card .link-card-icon { font-size: 1.4rem; }

.link-card h3 {
  margin: 10px 0 6px;
  font-size: 0.98rem;
  color: var(--text);
}

.link-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.84rem;
  line-height: 1.5;
}

.blog-card-date {
  color: var(--text-dim);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Shared article / content-page layout used by subpages and blog posts */
.breadcrumbs {
  max-width: 900px;
  margin: 16px auto 0;
  padding: 0 24px;
  font-size: 0.78rem;
  color: var(--text-dim);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.breadcrumbs a { color: var(--text-dim); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { opacity: 0.4; }
.breadcrumbs .current { color: var(--text); }

.article-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 24px 60px;
}

.article-page h1 {
  font-size: 1.9rem;
  line-height: 1.25;
  margin: 6px 0 8px;
}

.article-page .lede {
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 28px;
}

.article-page h2 {
  font-size: 1.3rem;
  margin: 34px 0 12px;
}

.article-page h3 {
  font-size: 1.05rem;
  margin: 22px 0 8px;
  color: var(--accent);
}

.article-page p {
  color: var(--text-dim);
  line-height: 1.7;
  font-size: 0.96rem;
  margin: 0 0 14px;
}

.article-page ul, .article-page ol {
  color: var(--text-dim);
  line-height: 1.7;
  font-size: 0.96rem;
  padding-left: 22px;
  margin: 0 0 16px;
}

.article-page li { margin-bottom: 6px; }
.article-page strong { color: var(--text); }

.article-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 20px;
  font-size: 0.9rem;
}

.article-page th, .article-page td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: var(--text-dim);
}

.article-page th { color: var(--text); font-weight: 600; }

.cta-box {
  margin: 32px 0;
  padding: 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0,200,180,0.12), rgba(106,92,255,0.10));
  border: 1px solid rgba(0,200,180,0.25);
  text-align: center;
}

.cta-box p {
  color: var(--text);
  margin: 0 0 14px;
  font-size: 1rem;
}

.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #06231f;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
}

.cta-btn:hover { filter: brightness(1.08); }

.article-meta {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-bottom: 20px;
}

.blog-index-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.blog-index-item {
  display: block;
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px;
  padding: 20px;
  transition: border-color .2s;
}

.blog-index-item:hover { border-color: var(--accent); }

.blog-index-item h2 {
  font-size: 1.1rem;
  margin: 6px 0 8px;
  color: var(--text);
}

.blog-index-item p {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

/* Footer sitemap */
.footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 40px 24px 20px;
}

.footer-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.footer-col h4 {
  color: var(--text);
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.footer-col a {
  display: block;
  color: var(--text-dim);
  font-size: 0.86rem;
  margin-bottom: 9px;
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  max-width: 1000px;
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.78rem;
}

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .topnav { display: none; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric-value { font-size: 1.25rem; }
  .article-page h1 { font-size: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
