/* Loading screen: original late-90s racing-game style (rev counter, gear, LED bar). */
.lug-loader {
  position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 45%, #1b0d0e 0, #070707 62%), #070707;
  color: #f3f0ed; font-family: "Barlow Condensed", Impact, "Arial Narrow", sans-serif;
  opacity: 1; transition: opacity .45s ease, visibility 0s linear .45s;
}
/* Normal page changes: only appear if loading takes a moment, so fast pages never flash. */
.lug-loader.is-pending { opacity: 0; }
.lug-loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
html.lug-loading, html.lug-loading body { overflow: hidden; }

.ll-scan { position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.28) 0 1px, transparent 1px 3px);
  animation: ll-flicker 3.2s steps(1) infinite; }
.ll-scan::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.75) 100%); }
@keyframes ll-flicker { 0%, 100% { opacity: 1; } 47% { opacity: .86; } 48% { opacity: 1; } 81% { opacity: .9; } 82% { opacity: 1; } }

.ll-corner { position: absolute; z-index: 2; color: #6e6a66; font: 700 12px/1 "DM Sans", Arial, sans-serif; letter-spacing: .28em; text-transform: uppercase; }
.ll-corner.tl { top: 24px; left: 28px; }
.ll-corner.tr { top: 24px; right: 28px; color: var(--red, #df202c); animation: ll-blink 1s steps(1) infinite; }
.ll-corner.bl { bottom: 30px; left: 28px; }
@keyframes ll-blink { 50% { opacity: .25; } }

.ll-center { position: relative; z-index: 2; display: grid; justify-items: center; gap: 14px; width: min(560px, 92vw); text-align: center; }
.ll-tach { width: min(300px, 70vw); height: auto; overflow: visible; filter: drop-shadow(0 0 18px rgba(223, 32, 44, .25)); }
.ll-tach .face { fill: #0d0d0d; stroke: #2c2c2c; stroke-width: 2; }
.ll-tach .tick { stroke: #bdb9b4; stroke-width: 2; }
.ll-tach .tick.minor { stroke: #5c5955; stroke-width: 1.5; }
.ll-tach .tick.red { stroke: #df202c; }
.ll-tach .num { fill: #d8d4cf; font: 700 15px "Barlow Condensed", Impact, sans-serif; text-anchor: middle; dominant-baseline: middle; }
.ll-tach .num.red { fill: #ff4b55; }
.ll-tach .redzone { fill: none; stroke: #df202c; stroke-width: 7; opacity: .85; }
.ll-tach .unit { fill: #77736e; font: 600 9px "DM Sans", Arial, sans-serif; letter-spacing: .18em; text-anchor: middle; }
.ll-tach .gear { fill: #e7c566; font: 800 34px "Barlow Condensed", Impact, sans-serif; text-anchor: middle; }
.ll-tach .gear-label { fill: #77736e; font: 700 8px "DM Sans", Arial, sans-serif; letter-spacing: .22em; text-anchor: middle; }
.ll-needle { transform-origin: 110px 110px; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.ll-needle line { stroke: #ff3b45; stroke-width: 3.5; stroke-linecap: round; }
.ll-tach .hub { fill: #1a1a1a; stroke: #df202c; stroke-width: 2; }

.ll-title { margin: 2px 0 0; font: italic 900 clamp(40px, 9vw, 64px)/.9 "Barlow Condensed", Impact, sans-serif; letter-spacing: .06em; transform: skewX(-12deg);
  text-shadow: 2px 0 0 rgba(223, 32, 44, .85), -2px 0 0 rgba(70, 190, 255, .45), 0 0 26px rgba(223, 32, 44, .35); }
.ll-title span { display: inline-block; animation: ll-dots 1.2s steps(4) infinite; width: 1.1em; overflow: hidden; vertical-align: bottom; text-align: left; }
@keyframes ll-dots { from { width: 0; } to { width: 1.1em; } }

.ll-bar { display: grid; grid-template-columns: repeat(20, 1fr); gap: 4px; width: 100%; padding: 6px; border: 2px solid #2e2e2e; background: #0a0a0a; transform: skewX(-12deg); }
.ll-bar i { height: 16px; background: #1b1b1b; box-shadow: inset 0 0 0 1px #222; transition: background .15s, box-shadow .15s; }
.ll-bar i.on { background: #4fd16a; box-shadow: 0 0 8px rgba(79, 209, 106, .6); }
.ll-bar i.on.warm { background: #e7c566; box-shadow: 0 0 8px rgba(231, 197, 102, .6); }
.ll-bar i.on.hot { background: #df202c; box-shadow: 0 0 10px rgba(223, 32, 44, .75); }
.ll-readout { display: flex; justify-content: space-between; width: 100%; color: #8a8681; font: 700 13px/1 "DM Sans", Arial, sans-serif; letter-spacing: .2em; text-transform: uppercase; }
.ll-readout b { color: #f3f0ed; font: 800 22px/1 "Barlow Condensed", Impact, sans-serif; letter-spacing: .04em; }
.ll-tip { min-height: 2.8em; margin: 6px 0 0; max-width: 460px; color: #b7b3ae; font: 500 13px/1.45 "DM Sans", Arial, sans-serif; }
.ll-tip b { color: #e7c566; letter-spacing: .14em; }
.ll-stripe { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 12px; background: repeating-linear-gradient(135deg, #e7c566 0 14px, #111 14px 28px); opacity: .75; }

@media (max-width: 650px) {
  .ll-corner.tl, .ll-corner.bl { display: none; }
  .ll-bar i { height: 12px; }
  .ll-tip { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ll-scan, .ll-corner.tr, .ll-title span { animation: none; }
  .ll-needle { transition: none; }
}
