* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(circle at top, #2f65ff 0%, #191f4e 30%, #0b122f 100%);
  color: #e9eeff;
  min-height: 100vh;
}

.page-shell {
  width: min(900px, 94vw);
  margin: 20px auto 40px;
  display: grid;
  gap: 18px;
}

.glass {
  background: linear-gradient(140deg, rgba(18, 35, 90, 0.75), rgba(33, 21, 86, 0.65));
  border: 1px solid rgba(124, 167, 255, 0.22);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(7, 12, 33, 0.4);
}

.top-nav {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand {
  font-weight: 800;
  font-size: 1.4rem;
}

.brand span {
  color: #8ef47d;
}

.tagline {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
  font-weight: 400;
}

/* LibreSpeed gauges — glassy shiny techno-futuristic HUD (smooth dials = JS lerp) */
.libre-gauges.tech-hud {
  --neon-cyan: #4df4ff;
  --neon-mint: #4fffe6;
  --glass-ice: rgba(200, 250, 255, 0.1);
  --hud-ink: #020608;
  --hud-panel: linear-gradient(145deg, rgba(150, 230, 255, 0.14) 0%, rgba(20, 60, 80, 0.35) 42%, rgba(4, 12, 22, 0.7) 100%);
  text-align: center;
  color: #c4f2ff;
  font-family: "Rajdhani", "Segoe UI", system-ui, sans-serif;
  border-radius: 12px;
  padding: 0.65rem 0.85rem 1.3rem;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(200, 250, 255, 0.32);
  border-top-color: rgba(255, 255, 255, 0.4);
  border-left-color: rgba(200, 255, 255, 0.3);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset, 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 -1px 0 rgba(0, 0, 0, 0.35) inset,
    0 0 0 1px rgba(0, 220, 255, 0.08) inset, 0 8px 40px rgba(0, 0, 0, 0.45), 0 0 80px rgba(0, 200, 255, 0.12),
    0 0 1px rgba(0, 240, 255, 0.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  backdrop-filter: blur(20px) saturate(1.35);
  background: linear-gradient(180deg, rgba(100, 220, 255, 0.15) 0%, transparent 32%),
    linear-gradient(185deg, rgba(255, 255, 255, 0.05) 0%, transparent 25%),
    repeating-linear-gradient(0deg, transparent, transparent 28px, rgba(0, 200, 255, 0.05) 29px),
    repeating-linear-gradient(90deg, transparent, transparent 28px, rgba(0, 200, 255, 0.04) 29px),
    linear-gradient(160deg, rgba(8, 20, 35, 0.7) 0%, rgba(4, 10, 18, 0.9) 45%, #02060c 100%);
  animation: techHudBreathe 8s ease-in-out infinite;
}

@keyframes techHudBreathe {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset, 0 1px 0 rgba(255, 255, 255, 0.1) inset, 0 8px 40px rgba(0, 0, 0, 0.45), 0 0 60px rgba(0, 200, 255, 0.1);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset, 0 1px 0 rgba(255, 255, 255, 0.16) inset, 0 8px 40px rgba(0, 0, 0, 0.45), 0 0 100px rgba(0, 240, 255, 0.16);
  }
}

.libre-gauges.tech-hud::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: conic-gradient(
    from 0deg at 30% 20%,
    transparent 0deg,
    rgba(200, 255, 255, 0.06) 25deg,
    transparent 50deg,
    rgba(0, 240, 255, 0.08) 100deg,
    transparent 180deg
  );
  pointer-events: none;
  z-index: 0;
  animation: techGlint 14s ease-in-out infinite;
}

@keyframes techGlint {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: rotate(2deg) scale(1.02);
    opacity: 0.85;
  }
}

.libre-gauges.tech-hud::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.2) 3px), linear-gradient(180deg, rgba(0, 220, 255, 0.1) 0%, transparent 22%);
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: soft-light;
  z-index: 0;
  border-radius: inherit;
}

.tech-hud__chrome {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 55% at 50% -2%, rgba(200, 255, 255, 0.22) 0%, rgba(0, 220, 255, 0.1) 28%, transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, transparent 18%);
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
  box-shadow: inset 0 2px 1px rgba(255, 255, 255, 0.18);
  animation: techChromePulse 6s ease-in-out infinite;
}

@keyframes techChromePulse {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

.tech-hud__vignette {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(ellipse 75% 55% at 50% 0%, rgba(0, 220, 255, 0.09) 0%, transparent 55%),
    radial-gradient(ellipse 100% 80% at 50% 100%, #000 0%, transparent 50%);
  mix-blend-mode: multiply;
  opacity: 0.65;
}

.tech-hud__hexgrid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background-image: radial-gradient(rgba(0, 220, 255, 0.09) 1.2px, transparent 1.2px);
  background-size: 20px 20px;
  opacity: 0.45;
  mask-image: linear-gradient(180deg, #000, transparent 85%);
}

.tech-hud__frame {
  position: absolute;
  inset: 10px;
  z-index: 1;
  pointer-events: none;
  border-radius: 2px;
}

.tech-hud__corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(0, 240, 255, 0.45);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}
.tech-hud__corner--tl {
  top: 0;
  left: 0;
  border-right: 0;
  border-bottom: 0;
}
.tech-hud__corner--tr {
  top: 0;
  right: 0;
  border-left: 0;
  border-bottom: 0;
}
.tech-hud__corner--bl {
  bottom: 0;
  left: 0;
  border-right: 0;
  border-top: 0;
}
.tech-hud__corner--br {
  bottom: 0;
  right: 0;
  border-left: 0;
  border-top: 0;
}

.tech-hud__inner {
  position: relative;
  z-index: 2;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0.1rem 0.35rem 0.2rem;
}

.tech-hud__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15em;
  margin: 0.1em 0 0.35em;
}

.tech-hud__chart {
  width: 100%;
  max-width: 20rem;
  height: 3rem;
  display: block;
  opacity: 0.95;
}

.tech-hud__badge {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(0, 240, 200, 0.55);
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.3);
}
.tech-hud__badge span {
  color: rgba(180, 255, 255, 0.5);
  letter-spacing: 0.2em;
  margin-left: 0.1em;
}

.tech-hud__spectrum {
  height: 5px;
  max-width: 20rem;
  width: 100%;
  margin: 0.25em auto 0.45em;
  border-radius: 1px;
  background: linear-gradient(90deg, #003040 0%, #005060 8%, #006080 20%, #00a8c0 50%, #006080 80%, #003040 100%);
  background-size: 200% 100%;
  animation: spectrumScan 3.5s linear infinite;
  box-shadow: 0 0 12px rgba(0, 200, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
}
.tech-hud__spectrum::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0, 0, 0, 0.2) 3px, transparent 4px);
  opacity: 0.4;
  pointer-events: none;
}
@keyframes spectrumScan {
  0% {
    background-position: 0% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.tech-sechead {
  text-align: left;
  max-width: 32rem;
  margin: 0.65rem auto 0.35rem;
  padding: 0 0.2rem 0.15rem;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(0, 200, 255, 0.35);
  border-bottom: 1px solid rgba(0, 220, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  position: relative;
  z-index: 1;
}
.tech-sechead::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 220, 255, 0.25) 0%, transparent 100%);
  margin-top: 2px;
}
.tech-sechead__n {
  font-size: 0.55rem;
  padding: 0.15em 0.4em 0.12em;
  border: 1px solid rgba(0, 200, 255, 0.3);
  color: rgba(0, 220, 255, 0.5);
  border-radius: 2px;
  letter-spacing: 0.1em;
}

.tech-ico {
  display: inline-block;
  margin-right: 0.15em;
  color: rgba(0, 220, 255, 0.45);
  font-size: 0.7em;
  vertical-align: middle;
}
.tech-ico--dl {
  color: rgba(0, 200, 255, 0.5);
  font-size: 0.55em;
  margin-right: 0.25em;
  vertical-align: 0.1em;
}
.tech-ico--ul {
  color: rgba(0, 255, 180, 0.5);
  font-size: 0.55em;
  margin-right: 0.25em;
  vertical-align: 0.1em;
}

.tech-panel--dl {
  border-color: rgba(0, 200, 255, 0.28) !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2) inset, 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 0 28px rgba(0, 200, 255, 0.1) !important;
}
.tech-panel--ul {
  border-color: rgba(0, 255, 200, 0.2) !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2) inset, 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 0 28px rgba(0, 255, 200, 0.08) !important;
}

.libre-gauges.tech-hud .tech-hud__label,
.libre-gauges .tech-hud__label,
.tech-hud__label {
  position: relative;
  z-index: 1;
  margin: 0.4rem 0 0;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  color: rgba(180, 255, 255, 0.5);
  font-family: "Orbitron", "Rajdhani", sans-serif;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.35);
}

.tech-title {
  position: relative;
  z-index: 1;
  margin: 0.1em 0 0.15em;
  font-size: clamp(1.5rem, 3.4vw, 1.95rem);
  font-family: "Orbitron", "Rajdhani", sans-serif;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #f0ffff;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.9), 0 0 20px rgba(0, 240, 255, 0.65), 0 0 50px rgba(0, 200, 255, 0.35), 0 4px 12px rgba(0, 0, 0, 0.4);
  filter: drop-shadow(0 0 0.5px rgba(200, 255, 255, 0.8));
}

.libre-gauges .tech-hud > h1,
.libre-gauges.tech-hud h1 {
  z-index: 1;
  position: relative;
}

.libre-gauges #test {
  position: relative;
  z-index: 1;
  margin-top: 0.2em;
  margin-bottom: 0.1em;
}

.libre-gauges #startStopBtn.tech-go,
.libre-gauges #startStopBtn {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin: 0.4em auto 0.1em;
  color: #021018;
  font-weight: 700;
  font-size: 0.9em;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  background: linear-gradient(175deg, rgba(255, 255, 255, 0.4) 0%, rgba(0, 230, 255, 0.95) 20%, #0090b8 55%, #006080 100%);
  border: 1px solid rgba(180, 255, 255, 0.5);
  border-top-color: rgba(255, 255, 255, 0.6);
  border-radius: 0;
  clip-path: polygon(0.45em 0, 100% 0, 100% calc(100% - 0.45em), calc(100% - 0.45em) 100%, 0 100%, 0 0.45em);
  width: 11.5em;
  height: 2.85em;
  line-height: 2.75em;
  padding: 0;
  box-shadow: 0 0 32px rgba(0, 240, 255, 0.45), 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.5), inset 0 -2px 0 rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.2s ease, filter 0.2s ease, transform 0.2s ease;
  cursor: pointer;
  font: inherit;
  overflow: hidden;
}

.libre-gauges #startStopBtn::after {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 42%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 100%);
  border-radius: 2px;
  pointer-events: none;
  opacity: 0.5;
}

.libre-gauges #startStopBtn:hover {
  filter: brightness(1.08) saturate(1.1);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.65), 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.55);
  transform: translateY(-2px);
}

.libre-gauges #startStopBtn.running {
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 120, 150, 0.95);
  background: linear-gradient(175deg, rgba(255, 255, 255, 0.35) 0%, #ff3d5c 30%, #b01030 100%);
  border-color: rgba(255, 160, 180, 0.55);
  box-shadow: 0 0 24px rgba(255, 60, 100, 0.55), 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 2px 0 rgba(255, 200, 210, 0.4);
}

.libre-gauges #startStopBtn.running::after {
  background: linear-gradient(180deg, rgba(255, 200, 210, 0.4) 0%, transparent 100%);
}

.libre-gauges #startStopBtn::before {
  content: "Start";
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  display: inline-block;
  width: 100%;
  text-align: center;
}

.libre-gauges #startStopBtn.running::before {
  content: "Abort";
}

.tech-panel {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.03) 25%, transparent 50%),
    linear-gradient(145deg, rgba(120, 220, 255, 0.15) 0%, rgba(30, 80, 110, 0.2) 45%, rgba(4, 12, 22, 0.6) 100%);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(180, 250, 255, 0.25);
  border-top-color: rgba(255, 255, 255, 0.32);
  border-left-color: rgba(200, 255, 255, 0.2);
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2) inset, 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 -1px 0 rgba(0, 0, 0, 0.2) inset,
    0 0 0 1px rgba(0, 220, 255, 0.06) inset, 0 6px 28px rgba(0, 0, 0, 0.2), 0 0 40px rgba(0, 200, 255, 0.1);
}

/* Glass reflection ribbon */
.tech-panel--dial,
.tech-panel--sm {
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18) inset, 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 6px 24px rgba(0, 0, 0, 0.22),
    0 0 32px rgba(0, 220, 255, 0.1);
}

.tech-panel::before,
.tech-panel::after {
  content: "";
  position: absolute;
  width: 0.55rem;
  height: 0.55rem;
  border: 1px solid rgba(180, 255, 255, 0.75);
  opacity: 0.85;
  pointer-events: none;
  z-index: 3;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.45);
}

.tech-panel::before {
  top: -1px;
  left: -1px;
  border-right: 0;
  border-bottom: 0;
}
.tech-panel::after {
  bottom: -1px;
  right: -1px;
  border-left: 0;
  border-top: 0;
}

.tech-panel--sm {
  display: inline-block;
  width: 13.2em;
  min-height: 6.2em;
  padding: 0.45rem 0.5rem 0.55rem;
  margin: 0.4em 0.35em;
  text-align: center;
  vertical-align: top;
}

.tech-panel--dial {
  display: inline-block;
  width: 16.2em;
  height: 12.5em;
  margin: 0.4em 0.35em;
  padding: 0.2rem 0.25rem 0;
  vertical-align: top;
  overflow: hidden;
  border-radius: 10px;
}

.tech-panel--dial::before,
.tech-panel--dial::after {
  z-index: 2;
}

.tech-panel--dial .testName {
  position: absolute;
  top: 0.3em;
  left: 0;
  width: 100%;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  z-index: 4;
  color: rgba(0, 200, 255, 0.7);
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 0 12px rgba(0, 200, 255, 0.3);
}

.tech-panel--sm .testName {
  color: rgba(0, 220, 255, 0.75);
  font-size: 0.68rem;
  font-weight: 600;
  margin: 0.15em 0 0.05em;
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.tech-metric {
  font-family: "Share Tech Mono", ui-monospace, monospace;
  color: #ff3d7f;
  text-shadow: 0 0 16px rgba(255, 60, 150, 0.45);
}

.tech-panel--sm .meterText {
  display: block;
  font-size: 2.1em;
  font-weight: 400;
  line-height: 1.1;
  margin: 0.05em 0 0.02em;
  width: 100%;
}

.tech-dl,
.dial-num.tech-dl,
.tech-panel--dial .tech-dl {
  background: none;
  color: #00f0ff;
  -webkit-text-fill-color: #00f0ff;
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.55);
  font-family: "Share Tech Mono", ui-monospace, monospace;
}

.tech-ul,
.dial-num.tech-ul,
.tech-panel--dial .tech-ul {
  background: none;
  color: #00ffaa;
  -webkit-text-fill-color: #00ffaa;
  text-shadow: 0 0 18px rgba(0, 255, 180, 0.4);
  font-family: "Share Tech Mono", ui-monospace, monospace;
}

.tech-panel--dial .dial-num {
  position: absolute;
  bottom: 1.45em;
  left: 0;
  width: 100%;
  font-size: 2.2em;
  z-index: 3;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
}

.tech-panel--dial .unit {
  position: absolute;
  bottom: 1.9em;
  left: 0;
  width: 100%;
  z-index: 2;
  color: rgba(0, 200, 255, 0.4);
  font-size: 0.72rem;
  font-weight: 600;
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.tech-panel--sm .unit {
  display: block;
  color: rgba(0, 200, 255, 0.4);
  font-size: 0.72rem;
  font-weight: 600;
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.tech-metric:empty::before,
.dial-num:empty::before,
.tech-panel--sm .meterText:empty::before {
  content: "0.00";
  color: rgba(0, 200, 255, 0.2);
  text-shadow: none;
  -webkit-text-fill-color: rgba(0, 200, 255, 0.2);
  -webkit-background-clip: unset;
  background-clip: unset;
}

.tech-panel--dial .meter,
.tech-panel--dial canvas.meter {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  filter: drop-shadow(0 0 4px rgba(0, 240, 255, 0.15));
}

.tech-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  margin: 0.2em 0 0.45em;
  gap: 0.1em 0.25em;
  position: relative;
  z-index: 1;
}

.tech-ip,
#ipArea.tech-ip {
  position: relative;
  z-index: 1;
  margin: 0.5em auto 0.12em;
  max-width: 32rem;
  text-align: left;
  display: block;
  padding: 0.5em 1em 0.55em 1.05em;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(0, 40, 60, 0.45) 100%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(200, 255, 255, 0.22);
  border-top-color: rgba(255, 255, 255, 0.28);
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(160, 240, 255, 0.6);
  font-family: "Share Tech Mono", monospace;
  letter-spacing: 0.1em;
  text-transform: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2) inset, 0 1px 0 rgba(255, 255, 255, 0.1) inset, 0 4px 20px rgba(0, 0, 0, 0.2), 0 0 24px rgba(0, 200, 255, 0.12);
  border-radius: 4px;
  clip-path: polygon(0.28em 0, 100% 0, 100% 100%, 0.28em 100%, 0 calc(100% - 0.28em), 0 0.28em);
}

.tech-ip__title {
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: rgba(0, 220, 255, 0.45);
  margin-bottom: 0.4em;
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.25);
}

.tech-ip__detail {
  text-transform: none;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.55;
  color: #a8f4ff;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.35);
  white-space: pre-line;
  font-size: 0.9em;
}

@media all and (max-width: 40em) {
  .tech-panel--dial,
  .tech-panel--sm {
    display: block;
    max-width: 20rem;
    margin: 0.4em auto;
  }
  .tech-panel--dial {
    width: 100%;
    max-width: 18.5em;
  }
  .tech-panel--sm {
    width: 100%;
  }
}

.qualify {
  padding: 16px 18px 18px;
}

.qualify .section-title {
  margin-bottom: 0.35rem;
}

.qualify-lead {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(220, 230, 255, 0.88);
  max-width: 42rem;
}

.qualify-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 14px;
  align-items: end;
}

.qualify-field--wide {
  grid-column: 1 / -1;
}

.qualify-field--third {
  grid-column: span 1;
}

.qualify-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.qualify-field span {
  font-size: 0.78rem;
  font-weight: 600;
  color: #a8c4ff;
  letter-spacing: 0.02em;
}

.qualify-field input,
.qualify-field select {
  border: 1px solid rgba(172, 192, 255, 0.35);
  border-radius: 10px;
  background: rgba(10, 18, 50, 0.65);
  color: #f0f5ff;
  padding: 10px 12px;
  font-size: 0.95rem;
  width: 100%;
  min-width: 0;
}

.qualify-field select {
  cursor: pointer;
}

.qualify-actions {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.qualify-btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 28px;
  font-weight: 700;
  color: #001413;
  background: linear-gradient(90deg, #4df4ff, #7cff9a);
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
}

.qualify-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.qualify-result {
  margin-top: 1rem;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: left;
  max-width: 42rem;
}

.qualify-result[hidden] {
  display: none;
}

.qualify-result--yes {
  background: rgba(32, 120, 64, 0.35);
  border: 1px solid rgba(100, 255, 150, 0.45);
  color: #c8ffd8;
}

.qualify-result--no {
  background: rgba(80, 50, 24, 0.4);
  border: 1px solid rgba(255, 180, 100, 0.4);
  color: #ffe8d0;
}

.qualify-result--error {
  background: rgba(100, 28, 28, 0.4);
  border: 1px solid rgba(255, 120, 120, 0.45);
  color: #ffd8d8;
}

.qualify-footnote {
  margin: 0.85rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: rgba(200, 210, 255, 0.55);
  max-width: 42rem;
}

@media (max-width: 760px) {
  .qualify-grid {
    grid-template-columns: 1fr;
  }
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: #c8d8ff;
}

.input {
  border: 1px solid rgba(172, 192, 255, 0.35);
  border-radius: 10px;
  background: rgba(10, 18, 50, 0.65);
  color: #f0f5ff;
  padding: 10px 12px;
  min-width: 190px;
}

.tool button {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  color: #001413;
  background: linear-gradient(90deg, #c4ff45, #84ff8f);
  cursor: pointer;
}

.tools {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.tool {
  padding: 14px;
}

.tool h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.output {
  margin: 10px 0 0;
  min-height: 120px;
  background: rgba(3, 8, 24, 0.7);
  border: 1px solid rgba(176, 196, 255, 0.18);
  border-radius: 10px;
  padding: 10px;
  font-size: 0.8rem;
  color: #bbecff;
  overflow: auto;
  white-space: pre-wrap;
}

.history {
  padding: 16px;
}

.history h2 {
  margin-top: 0;
  font-size: 1.05rem;
}

.history h4 {
  margin: 0.5rem 0 0.4rem;
  font-size: 0.95rem;
  color: #8ecfff;
}

.history-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

th,
td {
  border-bottom: 1px solid rgba(140, 173, 255, 0.22);
  text-align: left;
  padding: 8px 6px;
}

th {
  color: #7ed6ff;
}
