/* The browser quick test /schnelltest (Site::quickTest, quick.js) */
.qt { margin-top: var(--s6); }
.qt-stage { display: grid; grid-template-columns: 260px minmax(0, 1fr); grid-template-areas: 'meter phases' 'meter live' 'actions actions' 'busy busy'; gap: 22px 32px; align-items: center;
  background: radial-gradient(120% 90% at 0% 0%, rgba(255, 179, 71, .13), transparent 60%), radial-gradient(90% 80% at 100% 100%, rgba(124, 255, 178, .07), transparent 60%), var(--card); }

/* the meter: a conic ring filling with the run, the live value in its middle */
.qt-meter { grid-area: meter; position: relative; width: 240px; aspect-ratio: 1; justify-self: center; }
.qt-ring, .qt-ring i { position: absolute; inset: 0; border-radius: 50%; }
.qt-ring { background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--border); }
.qt-ring i { --p: 0; background: conic-gradient(from -90deg, #ffd27a, #ffb347 calc(var(--p) * 50%), #ff6b9d calc(var(--p) * 100%), transparent calc(var(--p) * 100%));
  -webkit-mask: radial-gradient(closest-side, transparent 82%, #000 83%); mask: radial-gradient(closest-side, transparent 82%, #000 83%); transition: --p .2s; filter: drop-shadow(0 0 14px rgba(255, 179, 71, .45)); }
.qt-val { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 4px; }
.qt-val b { font: 800 44px/1 var(--mono); letter-spacing: -.03em; color: var(--text); font-variant-numeric: tabular-nums; }
.qt-val small { font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.qt-u-gflops, .qt[data-unit="gflops"] .qt-u-pts { display: none; }
.qt[data-unit="gflops"] .qt-u-gflops { display: inline; }
.qt.running .qt-val b { text-shadow: 0 0 26px rgba(255, 179, 71, .55); }

/* the three phases */
.qt-phases { grid-area: phases; list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.qt-phases li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--border); background: rgba(255, 255, 255, .02); transition: border-color .3s, background .3s; }
.qt-phases li i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.qt-phases li b { display: block; font-size: 15px; }
.qt-phases li small { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; }
.qt-phases li em { font: 600 12px var(--mono); font-style: normal; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.qt-phases li[data-state="run"] { border-color: rgba(255, 179, 71, .55); background: rgba(255, 179, 71, .07); }
.qt-phases li[data-state="run"] i { background: #ffb347; box-shadow: 0 0 0 0 rgba(255, 179, 71, .6); animation: qt-pulse 1.2s infinite; }
.qt-phases li[data-state="run"] em { color: #ffd27a; }
.qt-phases li[data-state="ok"] i { background: #7cffb2; }
.qt-phases li[data-state="ok"] em { color: #7cffb2; }
.qt-phases li[data-state="skip"] { opacity: .6; }
@keyframes qt-pulse { to { box-shadow: 0 0 0 10px rgba(255, 179, 71, 0); } }

/* live work per thread: one column each */
.qt-live { grid-area: live; min-width: 0; }
.qt-thr { margin: 0 0 8px; font: 600 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.qt-thr b { color: var(--text); }
.qt-threads { display: flex; align-items: flex-end; gap: 3px; height: 64px; padding: 6px; border-radius: 12px; background: rgba(0, 0, 0, .25); border: 1px solid var(--border); }
.qt-threads i { flex: 1 1 0; min-width: 2px; height: 100%; display: flex; align-items: flex-end; border-radius: 3px; background: rgba(255, 255, 255, .04); }
.qt-threads s { --h: 0; display: block; width: 100%; height: calc(var(--h) * 100%); border-radius: 3px; background: linear-gradient(0deg, #ff6b9d, #ffb347 60%, #ffd27a); box-shadow: 0 0 12px rgba(255, 179, 71, .35); transition: height .25s ease-out; }

.qt-actions { grid-area: actions; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.qt-go { font-size: 17px; padding: 14px 30px; }
.qt-go:disabled { opacity: .55; cursor: progress; transform: none; }
.qt-busy { grid-area: busy; margin: 0; }

/* the result */
.qt-result { margin-top: var(--s6); }
.qt-result h2 { margin-bottom: 14px; }
.qt-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.qt-tile { display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--c) 16%, transparent), transparent 62%), var(--card); animation: qt-in .6s cubic-bezier(.2, 1.3, .4, 1) var(--d) both; }
.qt-tile span { font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.qt-tile b { font: 800 38px/1.1 var(--mono); letter-spacing: -.03em; color: var(--c); text-shadow: 0 0 24px color-mix(in srgb, var(--c) 45%, transparent); font-variant-numeric: tabular-nums; }
.qt-tile small { color: var(--muted); font-size: 13px; }
@keyframes qt-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
.qt-scale { margin: 16px 0 4px; font-size: 16px; }
.qt-gpu { margin: 0; }
.qt-note { margin: 10px 0 0; max-width: 75ch; }
.qt-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: 18px;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255, 107, 157, .16), transparent 60%), var(--card); }
.qt-cta h3 { margin: 0 0 4px; }
.qt-cta p { margin: 0; color: var(--text-2); max-width: 60ch; }

/* quick test or app */
.qt-compare { margin-top: var(--s7); }
.qt-table { padding: 0; overflow-x: auto; }
.qt-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.qt-table th, .qt-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.qt-table tr:last-child th, .qt-table tr:last-child td { border-bottom: 0; }
.qt-table thead th { font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.qt-table thead th:last-child, .qt-table td:last-child { color: var(--text); background: rgba(255, 179, 71, .05); }
.qt-table tbody th { font-weight: 600; color: var(--text-2); }

@media (max-width: 760px) {
  .qt-stage { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'meter' 'phases' 'live' 'actions' 'busy'; }
  .qt-meter { width: 200px; }
  .qt-val b { font-size: 36px; }
  .qt-tiles { grid-template-columns: minmax(0, 1fr); }
  .qt-table { font-size: 14px; }
  .qt-table th, .qt-table td { padding: 10px 10px; }
}
@media (prefers-reduced-motion: reduce) { .qt-tile, .qt-phases li[data-state="run"] i { animation: none; } .qt-threads s { transition: none; } }
@property --p { syntax: '<number>'; inherits: true; initial-value: 0; }
.qt-jump { margin: 18px 0 0; }
.qt { scroll-margin-top: 90px; }
