:root {
  --ink: #0f1424;
  --muted: #687082;
  --line: #e3e5ed;
  --panel: #f3f4f8;
  --white: #ffffff;
  --violet: #5047fa;
  --violet-dark: #3e36db;
  --blue: #2ba3f5;
  --mint: #29c78c;
  --orange: #ff9b42;
  --pink: #ff466b;
  --red: #df3347;
  --shadow: 0 16px 48px rgba(15, 20, 36, 0.08);
  --content: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

a { color: var(--violet-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--violet); }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
button { cursor: pointer; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  color: white;
  background: var(--ink);
  border-radius: 6px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(227, 229, 237, 0.9);
  backdrop-filter: saturate(150%) blur(18px);
}

.nav-wrap {
  width: min(calc(100% - 40px), var(--content));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 19px;
  text-decoration: none;
}
.brand img { width: 34px; height: 34px; border-radius: 8px; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a {
  color: #3c4251;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--violet); }
.nav-cta { padding: 9px 14px; border: 1px solid #d9d6ff; border-radius: 6px; background: #f5f4ff; }
.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.menu-button span, .menu-button::before, .menu-button::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  content: "";
}

.container { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; }
.narrow { width: min(calc(100% - 40px), 760px); margin-inline: auto; }
.band { padding: 84px 0; }
.band-soft { background: #f7f8fb; }
.band-dark { color: white; background: var(--ink); }
.section-head { max-width: 700px; margin-bottom: 38px; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--violet);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: 0; }
h1 { font-size: clamp(38px, 6vw, 66px); }
h2 { font-size: clamp(30px, 4vw, 44px); }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }
.lead { max-width: 700px; margin-top: 18px; color: var(--muted); font-size: clamp(18px, 2.2vw, 22px); line-height: 1.55; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.note { padding: 18px 20px; background: #f1f7ff; border-left: 3px solid var(--blue); }

.button {
  min-height: 48px;
  padding: 12px 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: white;
  background: var(--violet);
  border: 0;
  border-radius: 7px;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  transition: transform .16s ease, background .16s ease;
}
.button:hover { color: white; background: var(--violet-dark); transform: translateY(-1px); }
.button-secondary { color: var(--ink); background: white; border: 1px solid var(--line); }
.button-secondary:hover { color: var(--violet); background: #fafaff; }
.button-blue { background: var(--blue); }
.button-blue:hover { background: #168dda; }
.button[disabled] { cursor: wait; opacity: .78; transform: none; }

/* Homepage test surface */
.test-hero { padding: 56px 0 72px; overflow: hidden; }
.test-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(290px, .75fr); gap: 64px; align-items: center; }
.test-intro { align-self: start; padding-top: 22px; }
.test-intro h1 { max-width: 720px; }
.test-intro .lead { max-width: 620px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; color: var(--muted); font-size: 14px; }
.trust-row span::before { margin-right: 7px; color: var(--mint); content: "✓"; font-weight: 900; }

.test-panel {
  width: 100%;
  max-width: 570px;
  justify-self: end;
  padding: 26px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.test-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.test-panel-head h2 { font-size: 25px; }
.test-status { min-height: 26px; margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.connection-pill { padding: 6px 9px; color: var(--muted); background: var(--panel); border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }

.speedometer { position: relative; width: min(100%, 410px); aspect-ratio: 1.18; margin: 18px auto 0; }
.speedometer svg { width: 100%; height: 100%; overflow: visible; }
.meter-track, .meter-progress { fill: none; stroke-width: 17; }
.meter-track { stroke: #e8e9ef; }
.meter-progress { stroke: url(#meter-color); stroke-linecap: butt; transition: stroke-dashoffset .28s ease; }
.meter-tick { fill: var(--muted); font-size: 11px; font-weight: 700; text-anchor: middle; }
.meter-tick.active { fill: var(--ink); }
.needle { transform-origin: 150px 141px; transition: transform .3s cubic-bezier(.2,.9,.25,1); }
.needle-line { stroke: var(--ink); stroke-width: 7; stroke-linecap: round; }
.needle-center { fill: white; stroke: #414652; stroke-width: 3; }
.meter-reading { position: absolute; left: 50%; bottom: 31px; width: 58%; transform: translateX(-50%); text-align: center; }
.meter-value { display: block; font-size: clamp(36px, 7vw, 48px); font-variant-numeric: tabular-nums; font-weight: 350; line-height: 1; }
.meter-unit { display: block; margin-top: 7px; color: var(--blue); font-size: 14px; font-weight: 750; }

.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.metric { min-width: 0; padding: 13px; background: var(--panel); border-radius: 7px; }
.metric-label { display: block; overflow: hidden; color: var(--muted); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.metric:nth-child(1) .metric-label { color: var(--orange); }
.metric:nth-child(2) .metric-label { color: var(--violet); }
.metric:nth-child(3) .metric-label { color: var(--blue); }
.metric-number { display: inline-block; margin-top: 3px; font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.metric-unit { margin-left: 3px; color: var(--muted); font-size: 11px; }
.test-action { width: 100%; margin-top: 12px; }
.test-error { display: none; margin-top: 12px; padding: 12px 14px; color: #9a2433; background: #fff0f2; border: 1px solid #ffd3d9; border-radius: 6px; font-size: 13px; }
.test-error.visible { display: block; }
.privacy-line { margin: 11px 0 0; color: var(--muted); font-size: 11px; text-align: center; }

.result-summary { display: none; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.result-summary.visible { display: block; }
.result-summary h3 { font-size: 16px; }
.result-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; color: var(--muted); font-size: 12px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature-card { padding: 24px; background: white; border: 1px solid var(--line); border-radius: 8px; }
.feature-card .icon-tile { margin-bottom: 18px; }
.feature-card p { margin: 8px 0 0; color: var(--muted); }
.icon-tile {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--violet);
  border-radius: 7px;
  font-size: 18px;
  font-weight: 800;
}
.icon-blue { background: var(--blue); }
.icon-mint { background: var(--mint); }
.icon-orange { background: var(--orange); }
.icon-pink { background: var(--pink); }
.icon-ink { background: var(--ink); }

.app-showcase { display: grid; grid-template-columns: .9fr 1.1fr; gap: 72px; align-items: center; }
.phone-row { display: flex; align-items: end; justify-content: center; gap: 18px; min-height: 540px; }
.phone-shot { width: min(44%, 260px); border: 7px solid #161922; border-radius: 35px; box-shadow: 0 24px 48px rgba(15,20,36,.16); }
.phone-shot.secondary { transform: translateY(34px); }
.check-list { margin: 24px 0 30px; padding: 0; list-style: none; }
.check-list li { margin: 12px 0; padding-left: 28px; position: relative; }
.check-list li::before { position: absolute; left: 0; color: var(--mint); content: "✓"; font-weight: 900; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.topic-links {
  margin-top: 34px;
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid var(--line);
}
.topic-links a {
  padding: 8px 12px;
  color: #43495a;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.topic-links a:hover { color: var(--violet); border-color: #c9c5ff; }

.history-table { width: 100%; margin-top: 22px; border-collapse: collapse; }
.history-table th, .history-table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }
.history-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.history-empty { color: var(--muted); text-align: center !important; }

/* Content pages */
.page-hero { padding: 78px 0 64px; border-bottom: 1px solid var(--line); }
.page-hero .hero-grid { display: grid; grid-template-columns: 1fr .78fr; gap: 64px; align-items: center; }
.page-hero h1 { max-width: 820px; }
.page-hero .app-mark { width: 92px; height: 92px; margin-bottom: 24px; border-radius: 20px; box-shadow: 0 12px 30px rgba(80,71,250,.22); }
.single-phone { width: min(100%, 310px); justify-self: center; border: 8px solid #151820; border-radius: 42px; box-shadow: var(--shadow); }
.prose { padding: 64px 0 90px; }
.prose h2 { margin: 2em 0 .6em; font-size: 29px; }
.prose h3 { margin: 1.7em 0 .55em; }
.prose p, .prose li { color: #414858; }
.prose a { overflow-wrap: anywhere; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin: 9px 0; }
.prose .callout { margin: 30px 0; padding: 22px; background: var(--panel); border-radius: 7px; }
.prose table { width: 100%; margin: 24px 0; border-collapse: collapse; }
.prose th, .prose td { padding: 13px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--panel); }
.updated { margin-top: 10px; color: var(--muted); font-size: 14px; }

.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tool-card { display: flex; gap: 18px; padding: 22px; color: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.tool-card:hover { color: inherit; border-color: #c9c5ff; background: #f8f7ff; }
.tool-card p { margin: 5px 0 0; color: var(--muted); }
.tool-card .arrow { margin-left: auto; color: #a2a7b2; align-self: center; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { padding: 25px; background: white; border: 1px solid var(--line); border-radius: 8px; counter-increment: step; }
.step::before { display: block; margin-bottom: 16px; color: var(--violet); content: "0" counter(step); font-size: 14px; font-weight: 850; }
.step p { margin: 8px 0 0; color: var(--muted); }

.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item button { width: 100%; padding: 22px 4px; display: flex; justify-content: space-between; gap: 20px; color: var(--ink); background: none; border: 0; font-weight: 750; text-align: left; }
.faq-item button::after { flex: 0 0 auto; content: "+"; color: var(--violet); font-size: 24px; font-weight: 400; line-height: 1; }
.faq-item button[aria-expanded="true"]::after { content: "−"; }
.faq-answer { display: none; max-width: 700px; padding: 0 4px 22px; color: var(--muted); }
.faq-answer.open { display: block; }

.cta-band { padding: 58px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 38px; }
.cta-inner h2 { font-size: 32px; }
.cta-inner p { margin: 8px 0 0; color: #b9c0d1; }

.site-footer { padding: 54px 0 28px; background: #f7f8fb; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 44px; }
.footer-copy { max-width: 330px; margin-top: 15px; color: var(--muted); font-size: 14px; }
.footer-heading { margin-bottom: 13px; font-size: 13px; font-weight: 800; text-transform: uppercase; }
.footer-links { display: grid; gap: 9px; }
.footer-links a { color: var(--muted); font-size: 14px; text-decoration: none; }
.footer-links a:hover { color: var(--violet); }
.footer-bottom { margin-top: 46px; padding-top: 22px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; }

@media (max-width: 900px) {
  .test-layout, .app-showcase, .page-hero .hero-grid { grid-template-columns: 1fr; }
  .test-panel { justify-self: start; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .phone-row { order: 2; }
  .footer-grid { grid-template-columns: 1.5fr repeat(2, 1fr); }
  .footer-grid > :last-child { grid-column: 2; }
}

@media (max-width: 720px) {
  .nav-wrap { width: min(calc(100% - 28px), var(--content)); min-height: 62px; }
  .menu-button { display: block; }
  .site-nav {
    position: fixed;
    inset: 62px 0 auto;
    padding: 18px 20px 26px;
    display: none;
    align-items: stretch;
    gap: 0;
    background: white;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 28px rgba(15,20,36,.08);
  }
  .site-nav.open { display: grid; }
  .site-nav a { padding: 12px 4px; font-size: 16px; }
  .site-nav .nav-cta { margin-top: 8px; padding: 11px 12px; text-align: center; }
  .container, .narrow { width: min(calc(100% - 30px), var(--content)); }
  .band { padding: 62px 0; }
  .test-hero { padding: 38px 0 56px; }
  .test-layout { gap: 36px; }
  .test-intro { padding-top: 0; }
  .test-panel { padding: 18px 14px; }
  .speedometer { margin-top: 10px; }
  .meter-reading { bottom: 25px; }
  .metrics { gap: 6px; }
  .metric { padding: 10px 8px; }
  .metric-number { font-size: 18px; }
  .feature-grid, .tool-grid, .steps { grid-template-columns: 1fr; }
  .phone-row { min-height: 430px; gap: 10px; }
  .phone-shot { border-width: 5px; border-radius: 25px; }
  .page-hero { padding: 52px 0; }
  .single-phone { max-width: 260px; border-width: 6px; border-radius: 35px; }
  .cta-inner { align-items: flex-start; flex-direction: column; }
  .topic-links { display: grid; grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child, .footer-grid > :last-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 400px) {
  h1 { font-size: 37px; }
  .test-panel-head h2 { font-size: 21px; }
  .meter-value { font-size: 34px; }
  .metric-label { font-size: 10px; }
  .metric-number { font-size: 16px; }
  .metric-unit { font-size: 9px; }
}

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