/* =============================================================================
   DNS Benchmark Pro — benchmark tool styles
   Extracted from the homepage so it can be cached immutably and so the HTML
   document stays small. Colours follow the existing site palette.
   ========================================================================== */

.dbp { margin-top: 4rem; }
.dbp-h2 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 1rem; }
.dbp-h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; margin: 0 0 .6rem; }
.dbp-h3:focus-visible { outline: 2px solid #00E5FF; outline-offset: 4px; border-radius: 4px; }
.dbp-h4 { font-size: .95rem; font-weight: 700; margin: 1.25rem 0 .4rem; }
.dbp-h4:first-child { margin-top: 0; }

.dbp-panel {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.dbp-lead { color: rgba(255,255,255,.72); font-size: .95rem; line-height: 1.65; }
.dbp-fine { color: rgba(255,255,255,.5); font-size: .8125rem; line-height: 1.6; margin-top: .5rem; }
.dbp-muted { color: rgba(255,255,255,.4); font-size: .8125rem; }
.dbp-meta {
  color: rgba(255,255,255,.45);
  font-size: .75rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  margin: -.5rem 0 1rem;
}

.dbp-list { margin: .5rem 0 0; padding: 0; list-style: none; }
.dbp-list li {
  position: relative; padding-left: 1.1rem; margin-bottom: .55rem;
  color: rgba(255,255,255,.72); font-size: .875rem; line-height: 1.6;
}
.dbp-list li::before {
  content: ''; position: absolute; left: 0; top: .55em;
  width: .35rem; height: .35rem; border-radius: 50%; background: #00E5FF;
}
.dbp-linklist { margin: .4rem 0 0; padding: 0; list-style: none; }
.dbp-linklist li { margin-bottom: .4rem; }
.dbp-linklist a { color: #00E5FF; text-decoration: underline; text-underline-offset: 2px; font-size: .875rem; }

.dbp-disclosure { border-color: rgba(0,229,255,.25); background: rgba(0,229,255,.045); }

/* ---- controls ---------------------------------------------------------- */
.dbp-controls { display: grid; gap: 1.5rem; }
@media (min-width: 800px) {
  .dbp-controls { grid-template-columns: 1.2fr 1fr auto; align-items: start; }
}
.dbp-label {
  display: block; font-size: .6875rem; text-transform: uppercase;
  letter-spacing: .08em; color: rgba(255,255,255,.45); margin-bottom: .5rem;
}
.dbp-radios { display: flex; flex-direction: column; gap: .5rem; }
.dbp-radio {
  display: flex; gap: .6rem; align-items: flex-start; cursor: pointer;
  border: 1px solid rgba(255,255,255,.08); border-radius: .6rem; padding: .6rem .75rem;
}
.dbp-radio:hover { border-color: rgba(0,229,255,.35); }
.dbp-radio input { margin-top: .25rem; accent-color: #00E5FF; }
.dbp-radio input:focus-visible { outline: 2px solid #00E5FF; outline-offset: 2px; }
.dbp-radio b { display: block; font-size: .875rem; }
.dbp-radio small { display: block; color: rgba(255,255,255,.45); font-size: .75rem; }

.dbp-select {
  width: 100%; background: rgba(0,0,0,.35); color: #fff;
  border: 1px solid rgba(255,255,255,.12); border-radius: .6rem;
  padding: .6rem .75rem; font-size: .875rem; font-family: inherit;
}
.dbp-select:focus-visible { outline: 2px solid #00E5FF; outline-offset: 2px; }

.dbp-actions { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.dbp-start { border-radius: .85rem; padding: .85rem 1.75rem; font-size: 1rem; font-weight: 700; }
.dbp-start[disabled] { opacity: .6; cursor: progress; }
.dbp-secondary {
  border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.85); border-radius: .7rem; padding: .6rem 1.1rem;
  font-size: .875rem; font-weight: 600; cursor: pointer;
}
.dbp-secondary:hover { border-color: rgba(0,229,255,.5); color: #fff; }
.dbp-start:focus-visible, .dbp-secondary:focus-visible, .dbp-chip:focus-visible {
  outline: 2px solid #00E5FF; outline-offset: 2px;
}

/* ---- progress ---------------------------------------------------------- */
.dbp-proghead {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: .875rem; color: rgba(255,255,255,.7); margin-bottom: .6rem;
}
.dbp-pct { font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 700; color: #00E5FF; }
.dbp-progtrack { height: .5rem; background: rgba(255,255,255,.08); border-radius: 999px; overflow: hidden; }
.dbp-progbar { height: 100%; background: #00E5FF; border-radius: 999px; transition: width .25s ease; }

/* ---- results ----------------------------------------------------------- */
.dbp-summary p { color: rgba(255,255,255,.8); font-size: .95rem; line-height: 1.65; }
.dbp-summary p + p { margin-top: .9rem; }
.dbp-caveat {
  border-left: 2px solid rgba(0,229,255,.5); padding-left: .9rem;
  color: rgba(255,255,255,.62) !important; font-size: .8125rem !important;
}
.dbp-empty { color: rgba(255,255,255,.6); font-size: .9rem; line-height: 1.65; }

.dbp-tablewrap { overflow-x: auto; padding: 0; }
.dbp-table { width: 100%; border-collapse: collapse; font-size: .875rem; min-width: 720px; }
.dbp-table caption { text-align: left; }
.dbp-table th, .dbp-table td {
  padding: .75rem 1rem; text-align: left; border-bottom: 1px solid rgba(255,255,255,.06);
  vertical-align: middle;
}
.dbp-table thead th {
  font-size: .6875rem; text-transform: uppercase; letter-spacing: .07em;
  color: rgba(255,255,255,.45); font-weight: 600; white-space: nowrap;
}
.dbp-table tbody tr:hover { background: rgba(255,255,255,.02); }
.dbp-table-sm { min-width: 560px; font-size: .8125rem; }

.dbp-rank { font-weight: 700; color: rgba(255,255,255,.55); white-space: nowrap; }
.dbp-tie {
  display: block; font-size: .625rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: #FBBF24; margin-top: .15rem;
}
.dbp-provider { display: flex; align-items: center; gap: .65rem; }
.dbp-provider b { display: block; font-size: .875rem; }
.dbp-provider small { display: block; color: rgba(255,255,255,.42); font-size: .75rem; }
.dbp-badge {
  width: 2rem; height: 2rem; border-radius: .5rem; display: grid; place-items: center;
  font-weight: 700; font-size: .8125rem; flex-shrink: 0;
  background: color-mix(in srgb, var(--c) 15%, transparent);
  color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
}
.dbp-num { font-family: 'JetBrains Mono', ui-monospace, monospace; white-space: nowrap; }
.dbp-ips { display: flex; gap: .35rem; flex-wrap: wrap; }
.dbp-chip {
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .75rem;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  border-radius: .4rem; padding: .25rem .45rem; display: inline-flex; gap: .35rem;
  align-items: center; cursor: pointer; color: inherit;
}
.dbp-chip:hover { background: rgba(255,255,255,.1); border-color: rgba(0,229,255,.4); }

.dbp-grid2 { display: grid; gap: 2rem; }
@media (min-width: 800px) { .dbp-grid2 { grid-template-columns: 1fr 1fr; } }

/* ---- motion ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .dbp-progbar { transition: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* =============================================================================
   Long-form guide pages
   ========================================================================== */
.dbp-crumbs { padding-top: 1.75rem; font-size: .8125rem; }
.dbp-crumbs ol { display: flex; gap: .5rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.dbp-crumbs li + li::before { content: '/'; margin-right: .5rem; color: rgba(255,255,255,.25); }
.dbp-crumbs a { color: rgba(255,255,255,.55); text-decoration: none; }
.dbp-crumbs a:hover { color: #00E5FF; text-decoration: underline; }
.dbp-crumbs [aria-current] { color: rgba(255,255,255,.85); }

.dbp-doc { max-width: 52rem; margin: 0 auto; padding: 1.5rem 0 3rem; }
.dbp-doc-h1 {
  margin: .6rem 0 0; font-size: clamp(1.9rem, 4.5vw, 2.75rem); font-weight: 800;
  letter-spacing: -.03em; line-height: 1.1; color: #fff;
}
.dbp-doc-lead { margin-top: 1rem; font-size: 1.0625rem; line-height: 1.7; color: rgba(255,255,255,.7); }
.dbp-doc h2 {
  margin: 2.75rem 0 .9rem; font-size: 1.4rem; font-weight: 700;
  letter-spacing: -.02em; color: #fff;
}
.dbp-doc h3 { margin: 1.75rem 0 .6rem; font-size: 1.05rem; font-weight: 700; color: rgba(255,255,255,.92); }
.dbp-doc p { color: rgba(255,255,255,.72); font-size: .95rem; line-height: 1.75; margin: 0 0 1rem; }
.dbp-doc a { color: #00E5FF; text-decoration: underline; text-underline-offset: 2px; }
.dbp-doc code {
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .85em;
  background: rgba(255,255,255,.07); padding: .1rem .35rem; border-radius: .25rem;
}

.dbp-ol { counter-reset: step; list-style: none; margin: 0 0 1.25rem; padding: 0; }
.dbp-ol > li {
  counter-increment: step; position: relative; padding-left: 2.25rem;
  margin-bottom: .85rem; color: rgba(255,255,255,.72); font-size: .95rem; line-height: 1.7;
}
.dbp-ol > li::before {
  content: counter(step); position: absolute; left: 0; top: .1rem;
  width: 1.55rem; height: 1.55rem; border-radius: 50%;
  background: rgba(0,229,255,.12); color: #00E5FF;
  border: 1px solid rgba(0,229,255,.3);
  display: grid; place-items: center; font-size: .75rem; font-weight: 700;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.dbp-code {
  background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.09);
  border-radius: .75rem; padding: 1rem 1.1rem; overflow-x: auto;
  margin: 0 0 1.25rem; font-size: .8125rem; line-height: 1.7;
}
.dbp-code code { background: none; padding: 0; color: rgba(255,255,255,.88); }

.dbp-warn, .dbp-rollback {
  border-radius: .9rem; padding: 1.25rem 1.4rem; margin: 1.75rem 0;
  border: 1px solid rgba(252,211,77,.28); background: rgba(252,211,77,.05);
}
.dbp-rollback { border-color: rgba(0,229,255,.3); background: rgba(0,229,255,.05); }
.dbp-warn h3, .dbp-rollback h3 { margin: 0 0 .75rem; font-size: .95rem; font-weight: 700; }
.dbp-warn h3 { color: #FCD34D; }
.dbp-rollback h3 { color: #00E5FF; }
.dbp-warn ul { margin: 0; padding: 0; list-style: none; }
.dbp-warn li {
  position: relative; padding-left: 1.1rem; margin-bottom: .6rem;
  color: rgba(255,255,255,.72); font-size: .875rem; line-height: 1.65;
}
.dbp-warn li::before {
  content: ''; position: absolute; left: 0; top: .55em;
  width: .35rem; height: .35rem; border-radius: 50%; background: #FCD34D;
}
.dbp-rollback ol { counter-reset: rb; list-style: none; margin: 0; padding: 0; }
.dbp-rollback li {
  counter-increment: rb; position: relative; padding-left: 1.6rem;
  margin-bottom: .6rem; color: rgba(255,255,255,.75); font-size: .875rem; line-height: 1.65;
}
.dbp-rollback li::before {
  content: counter(rb) '.'; position: absolute; left: 0;
  color: #00E5FF; font-weight: 700;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .8125rem;
}

.dbp-updated {
  margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.08);
  font-size: .8125rem !important; color: rgba(255,255,255,.45) !important;
}
.dbp-ok { color: #34D399; font-weight: 600; white-space: nowrap; }
.dbp-pend { color: #FCD34D; font-weight: 600; white-space: nowrap; }
.dbp-endpoint code { font-size: .7rem; word-break: break-all; background: none; padding: 0; }
.dbp-table th small { display: block; font-weight: 400; color: rgba(255,255,255,.42); font-size: .7rem; }

/* =============================================================================
   Live results: distribution strips, settling state, rank transitions
   ========================================================================== */

.dbp-guide { max-width: 62ch; margin-bottom: .9rem; }

/* ---- the "measuring" state -------------------------------------------- */
.dbp-live { display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; }
.dbp-livedot {
  width: .5rem; height: .5rem; border-radius: 50%; background: #00E5FF;
  flex-shrink: 0; align-self: center; animation: dbp-pulse 1.4s ease-in-out infinite;
}
@keyframes dbp-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .35; transform: scale(.75); }
}

/* ---- distribution strip ------------------------------------------------ */
.dbp-dist-h { min-width: 260px; }
.dbp-axis { display: block; width: 260px; margin-top: .15rem; }
.dbp-axis-t {
  fill: rgba(255,255,255,.34); font-size: 9px; letter-spacing: 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.dbp-axis-label {
  display: block; font-size: .625rem; font-weight: 400; letter-spacing: 0;
  text-transform: none; color: rgba(255,255,255,.3); margin-top: .15rem;
}
.dbp-dist { padding-top: .4rem !important; padding-bottom: .4rem !important; }
.dbp-strip { display: block; overflow: visible; }
.dbp-strip-base  { stroke: rgba(255,255,255,.07); stroke-width: 1; }
.dbp-strip-range { stroke: rgba(255,255,255,.13); stroke-width: 7; stroke-linecap: round; }
/* Dots are translucent so overlap reads as density: a tight cluster becomes a
   solid block, a scattered set stays faint. */
.dbp-strip-grid  { stroke: rgba(255,255,255,.05); stroke-width: 1; }
.dbp-strip-dot   { fill: rgba(0,229,255,.5); }
.dbp-strip-med   { stroke: #fff; stroke-width: 2; stroke-linecap: round; }

/* ---- rows -------------------------------------------------------------- */
.dbp-median b { font-size: .95rem; }
.dbp-rel small { display: block; color: rgba(255,255,255,.4); font-size: .6875rem; }

/* Fewer than three samples: the row is shown, but visibly not yet trustworthy. */
.dbp-unsettled { opacity: .62; }
.dbp-unsettled .dbp-median b { color: rgba(255,255,255,.75); font-weight: 500; }

.dbp-empty-cell {
  color: rgba(255,255,255,.5); font-size: .875rem; padding: 1.5rem 1rem !important;
  text-align: center;
}

.dbp-row-enter { animation: dbp-fadein 340ms ease-out both; }
@keyframes dbp-fadein { from { opacity: 0; } to { opacity: 1; } }

/* Reordering is animated via FLIP in dbp-app.js. Honour the OS preference:
   with reduced motion the rows simply appear in their new order. */
@media (prefers-reduced-motion: reduce) {
  .dbp-livedot { animation: none; }
  .dbp-row-enter { animation: none; }
  .dbp-table tbody tr { transition: none !important; }
}

/* Address chips stay on one line so row heights do not jump around as the
   table reorders — a ragged table is much harder to follow mid-run. */
.dbp-ips { flex-wrap: nowrap; }
.dbp-ips .dbp-chip { white-space: nowrap; }

/* One "tied" marker opens the group; the rows under it carry "=" instead of
   repeating the word. */
.dbp-tie { opacity: .85; }
.dbp-rank-eq {
  display: inline-block; color: rgba(255,255,255,.3);
  font-weight: 400; font-size: 1rem; line-height: 1;
}
