@font-face {
  font-family: Instrument;
  src: url('/instrument-sans.ttf') format('truetype');
  font-weight: 400 700;
  font-display: swap;
}
:root {
  color-scheme: dark;
  font-family: Instrument, Arial, sans-serif;
  font-synthesis: none;
  color: #f7f5f3;
  background: #101013;
  --muted: #c1bbb7;
  --gold: #ffb323;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  background: #101013 url('/fibras.webp') center / 100% 100% no-repeat;
}
button { font: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid #ffe09a; outline-offset: 4px; }
h1, h2, p { margin: 0; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.2rem;
  height: 1.2rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wrap {
  width: min(clamp(347.5px, 50.25svh, 492.5px), calc(100% - 24px));
  container-type: inline-size;
  margin: auto;
  padding: 14px 0;
  display: grid;
  justify-items: center;
}
.logo {
  display: block;
  width: clamp(68px, 11svh, 110px);
  height: auto;
  margin-bottom: clamp(10px, 1.5svh, 15px);
  filter: drop-shadow(0 5px 10px #0008);
}
.console {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(10px, 1.5svh, 16px) 15px 0;
  border: 1px solid transparent;
  border-radius: clamp(12px, 1.9svh, 20px);
  background:
    radial-gradient(ellipse at 50% 100%, #49301844, transparent 56%),
    linear-gradient(115deg, #211e1d, #292829 37%, #1a1a1d 66%, #191613) padding-box,
    linear-gradient(140deg, #ffbd5e, #85501e 23%, #4b352b 53%, #d78a39 87%, #835027) border-box;
  box-shadow: 0 18px 28px -10px #000b, inset 0 1px 0 #ffffff12, inset 0 -1px 18px #e8982520;
}
.console-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 6px; width: 100%; }
.console-title { display: inline-flex; align-items: center; gap: 5px; font-size: 1.02rem; font-weight: 650; letter-spacing: -.035em; }
.console-title .icon { color: var(--gold); width: 1.12em; height: 1.12em; }
.state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border: 1px solid #6d655e;
  border-radius: 99px;
  color: #e0dcd7;
  background: #191817;
  font-size: .78rem;
  line-height: 1.3;
  white-space: nowrap;
}
.state b { width: .52em; height: .52em; border-radius: 50%; background: currentColor; }
.state.running { color: #ffce70; border-color: #876128; background: #302617; }
.state.done { color: #a9eca5; border-color: #3d613e; background: #142118; }
.state.done b { background: #5ee76c; }
.gauge { position: relative; width: min(100%, 71cqi, 349px); margin: 5px auto 0; container-type: inline-size; }
#dial { display: block; width: 100%; height: auto; overflow: visible; }
.dial-label { fill: #f1ede9; font-size: 19px; font-weight: 700; text-anchor: middle; dominant-baseline: central; font-variant-numeric: tabular-nums; }
.readout {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 45%;
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
  pointer-events: none;
  text-shadow: 0 3px 9px #0005;
}
#phase { color: #d9d6d3; font-size: clamp(.68rem, 3.5cqi, .85rem); font-weight: 700; letter-spacing: .065em; text-transform: uppercase; }
.readout strong { font-size: 15.4cqi; font-weight: 700; line-height: 1.12; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.readout strong.long { font-size: 11.4cqi; }
.readout-unit { font-size: .88rem; color: #c8c3bf; font-weight: 600; }
.start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 5px;
  min-height: 35px;
  min-width: min(100%, 169px);
  margin: 0 auto clamp(11px, 1.875svh, 20px);
  padding: 3px 11px;
  border: 1px solid #ffc654;
  border-radius: 7px;
  background: linear-gradient(#ffb920, #ff9d05 58%, #e88700);
  box-shadow: inset 0 1px 1px #ffe49a, 0 0 24px #f996172d, 0 4px 12px #0008;
  color: #211505;
  font-size: .94rem;
  font-weight: 700;
}
.start:hover { background: linear-gradient(#ffc446, #ffac17); }
.start .icon { width: .82em; height: .82em; }
.start.active { color: #ffe4ac; background: #382b1b; border-color: #a57032; box-shadow: none; }
.results {
  display: grid;
  grid-template-columns: 1.25fr 1.25fr .85fr .85fr;
  width: 100%;
  margin-top: 8px;
  padding: 5px 2px;
  border: 1px solid #70563b;
  border-radius: 9px;
  background: linear-gradient(135deg, #201e1d, #2a2623 40%, #161517);
  box-shadow: 0 10px 20px -6px #000a;
}
.metric { min-width: 0; padding: 0 3px; text-align: center; }
.metric + .metric { border-left: 1px solid #ffffff20; }
.metric h2 { display: flex; align-items: center; justify-content: center; gap: 3px; color: #e6e2e0; font-size: .73rem; line-height: 1.2; font-weight: 500; }
.metric .icon { color: var(--gold); width: 12px; height: 12px; }
.metric.active h2 { color: #ffd07a; }
.value { margin-top: 1px; color: #d0cbc7; font-size: .65rem; line-height: 1.15; white-space: nowrap; }
.value strong { color: white; font-size: .88rem; font-weight: 650; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.spark { width: 17px; height: 11px; }
.spark polyline { fill: none; stroke: #ffb727; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.message { text-align: center; font-size: .92rem; line-height: 1.45; margin-top: 12px; color: #eadcca; }
.message:empty { margin: 0; }
.wrap:has(.state.done) .message { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.help { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; margin-top: 2px; border: 0; background: none; font-size: .73rem; color: var(--muted); }
.help .icon { width: .95rem; height: .95rem; }
.help:hover { color: #ffcd79; text-decoration: underline; }
dialog { width: min(440px, calc(100% - 32px)); padding: 26px; border: 1px solid #886942; border-radius: 16px; background: #252325; color: #f4efe9; box-shadow: 0 16px 60px #0009; }
dialog::backdrop { background: #09090bc4; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.dialog-head h2 { font-size: 1.35rem; letter-spacing: -.04em; }
.dialog-head button { display: grid; place-items: center; border: 0; border-radius: 8px; padding: 8px; background: #393638; color: inherit; }
dialog p, dialog dd { font-size: 1rem; line-height: 1.5; color: #d5d0cd; }
dialog dt { font-weight: 650; margin: 14px 0 3px; }
dialog dd { margin: 0; }
.test-info, .test-info > span { display: flex; align-items: center; gap: 6px; }
.test-info { justify-content: space-between; flex-wrap: wrap; margin: 14px 0; padding: 12px 0; border-block: 1px solid #ffffff21; font-size: .82rem; color: #e8c78c; }
.test-info .icon { width: 15px; height: 15px; }
@container (max-width: 340px) {
  .spark { display: none; }
}
@media (max-width: 700px) {
  .wrap { width: min(clamp(315px, 58.75vw, 375px), calc(100% - 20px)); }
  .logo { width: clamp(68px, 13vw, 82px); }
  .console { padding-inline: 8px; }
  .console-title { font-size: .88rem; }
  .state { font-size: .73rem; }
}
@media (pointer: coarse) {
  .start::before { position: absolute; content: ""; inset: -8px 0; }
}
