@font-face {
  font-family: "Twemoji Country Flags";
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
  src: url("https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #0f0e14;
  --card: #171520;
  --card-2: #1f1c2b;
  --border: #6e6882;
  --border-dim: #353145;
  --text: #f4f1f8;
  --text-soft: #b1abc2;
  --text-muted: #77708a;

  /* Vibrant distinct lab colors */
  --claude: #ff6d3f;
  --chatgpt: #38d996;
  --gemini: #5caeff;
  --alarm: #ff3b30;
  --heat: 0.65;

  --disp: "Bricolage Grotesque", "Twemoji Country Flags", system-ui, sans-serif;
  --sans: "Plus Jakarta Sans", "Twemoji Country Flags", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Twemoji Country Flags", monospace;
  --emo: "Twemoji Country Flags", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

[hidden] { display: none !important; }

html, body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Tactile dot-weave background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(244, 241, 248, 0.055) 1px, transparent 1px);
  background-size: 20px 20px;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 840px;
  margin: 0 auto;
  padding: 26px 22px 56px;
}

/* --- TOP HEADER --- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.brand h1 {
  font-family: var(--disp);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand h1 .brand-muted {
  opacity: 0.65;
}

.brand small {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
}

.top-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-tabs {
  display: inline-flex;
  background: var(--card);
  border: 1.5px solid var(--border-dim);
  border-radius: 99px;
  padding: 3px;
  gap: 2px;
}
.filter-tabs button {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 99px;
  color: var(--text-soft);
  transition: background 0.15s, color 0.15s;
}
.filter-tabs button:hover {
  color: var(--text);
}
.filter-tabs button.on {
  background: var(--text);
  color: var(--bg);
}

/* --- HERO VERDICT BOX --- */
.hero-box {
  margin-top: 16px;
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 20px 22px;
  background-color: var(--card);
  background-image: radial-gradient(rgba(244, 241, 248, 0.065) 1px, transparent 1px);
  background-size: 14px 14px;
  display: flex;
  align-items: center;
  gap: 22px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.face-frame {
  --c: var(--claude);
  width: 192px;
  height: 192px;
  border-radius: 16px;
  border: 2.5px solid var(--c);
  box-shadow: 5px 5px 0 var(--c);
  background: #100e16;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transform: rotate(-2.5deg);
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s, box-shadow 0.2s;
}
.face-frame:hover {
  transform: rotate(1.5deg) scale(1.05);
}
.face-frame:active {
  transform: scale(0.95);
}
.face-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.face-fb {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--c);
  background: repeating-linear-gradient(45deg, #13111c 0 8px, #181523 8px 16px);
}
.face-fb svg {
  width: 72%;
  height: 72%;
  fill: currentColor;
  opacity: 0.85;
  margin-top: 14%;
}
.face-fb small {
  position: absolute;
  top: 5px;
  left: 6px;
  right: 6px;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--text-soft);
  word-break: break-all;
  line-height: 1.15;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-kicker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sticker-badge {
  display: inline-block;
  background: var(--claude);
  color: #110e16;
  font-family: var(--disp);
  font-weight: 800;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  padding: 7px 16px 9px;
  border-radius: 12px;
  transform: rotate(-1.2deg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  transition: background 0.25s, transform 0.15s;
  cursor: pointer;
}
.sticker-badge:hover {
  transform: rotate(-0.3deg) scale(1.015);
}
.sticker-badge:active {
  transform: rotate(-1.6deg) scale(0.985);
}

.hero-foot {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.hero-foot b {
  color: var(--text);
}

/* --- 3 TILTED OFFSET CARDS WITH BREAKOUT BARS --- */
.cards-row {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.lab-card {
  position: relative;
  border-radius: 16px;
  padding: 16px 16px 17px;
  color: #110e16;
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s;
  overflow: visible; /* Lets the rage bar shoot past the right border */
}
.lab-card[data-k="claude"] {
  background: var(--claude);
  transform: rotate(-1.25deg);
}
.lab-card[data-k="chatgpt"] {
  background: var(--chatgpt);
  transform: rotate(1.05deg);
}
.lab-card[data-k="gemini"] {
  background: var(--gemini);
  transform: rotate(-0.9deg);
}
.lab-card.dimmed {
  opacity: 0.4;
}
.lab-card.dimmed:hover {
  opacity: 1;
}
.lab-card:hover {
  transform: rotate(0deg) translateY(-3px);
  z-index: 6;
}
.lab-card.bump {
  animation: cardBump 0.16s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
@keyframes cardBump {
  35% { transform: scale(0.965) rotate(-0.4deg); }
  70% { transform: scale(1.015) rotate(0.4deg); }
}

.lab-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.lab-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-face {
  width: 45px;
  height: 45px;
  border-radius: 8px;
  border: 1.5px solid #110e16;
  background: #171520;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
  transition: transform 0.12s;
}
.mini-face:hover {
  transform: scale(1.1) rotate(-5deg);
}
.mini-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mini-face .m-fb {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  color: var(--text);
}

.lab-kicker {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.lab-status-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(17, 14, 22, 0.18);
  text-transform: uppercase;
  white-space: nowrap;
}
.lab-status-tag.hot {
  background: #110e16;
  color: var(--claude);
}

.lab-big {
  margin-top: 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.lab-pct {
  font-family: var(--disp);
  font-weight: 800;
  font-size: 44px;
  line-height: 0.95;
  letter-spacing: -0.03em;
  display: inline-block;
}
.lab-card.cooked-shake .lab-pct {
  animation: pctTremble 0.28s infinite;
}
@keyframes pctTremble {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(1px, -1px); }
  50% { transform: translate(-1px, 1px); }
  75% { transform: translate(1px, 1px); }
}

.lab-norm-note {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  opacity: 0.8;
}

/* Uncapped Rage Bar: 100% normal sits at 38%. Over 245% bursts past the card edge! */
.rage-track {
  position: relative;
  height: 13px;
  background: rgba(17, 14, 22, 0.22);
  border: 1.5px solid #110e16;
  border-radius: 6px;
  margin: 12px 0 20px;
  overflow: visible;
}

.rage-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: #110e16;
  border-radius: 4px;
  transition: width 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.rage-track.breakout .rage-fill {
  background: repeating-linear-gradient(
    -45deg,
    #110e16 0 7px,
    #ff2e1f 7px 14px
  );
  background-size: 20px 20px;
  animation: stripeSlide 0.55s linear infinite;
  border: 1.5px solid #110e16;
  box-shadow: 4px 4px 0 #110e16, 0 0 14px rgba(255, 46, 31, 0.55);
  z-index: 6;
}
@keyframes stripeSlide {
  to { background-position: 20px 0; }
}

.breakout-flag {
  position: absolute;
  right: -10px;
  top: -20px;
  background: #110e16;
  color: #ffcf4a;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  transform: rotate(3.5deg);
  white-space: nowrap;
  display: none;
  z-index: 7;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
}
.rage-track.breakout .breakout-flag {
  display: block;
}

.norm-tick {
  position: absolute;
  left: 38%;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: #110e16;
  z-index: 4;
}
.norm-tick span {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 800;
  white-space: nowrap;
  opacity: 0.85;
}

/* --- MASH BUTTON & FLOATING EMOJIS --- */
.mash-stage {
  position: relative;
}

.fx-layer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 115px;
  pointer-events: none;
  overflow: visible;
  z-index: 20;
}

.fl-emo {
  position: absolute;
  bottom: 2px;
  font-family: var(--emo);
  font-weight: 800;
  font-size: 18px;
  white-space: nowrap;
  pointer-events: none;
  will-change: transform, opacity;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5));
}

.lab-mash-btn {
  width: 100%;
  background: #110e16;
  color: var(--text);
  border-radius: 10px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.45);
  transition: transform 0.05s, box-shadow 0.05s, background 0.12s;
  touch-action: manipulation;
}
.lab-mash-btn:hover {
  background: #1d1926;
}
.lab-mash-btn:active, .lab-mash-btn.down {
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}
.lab-mash-btn .cnt {
  color: #ffcf4a;
  font-variant-numeric: tabular-nums;
}

/* --- LEFT-FADING MULTI-COLOR BARCODE --- */
.sec-head {
  margin-top: 28px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.sec-head-left {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.sec-head h2 {
  font-family: var(--disp);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.legend {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-soft);
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.range-pills {
  display: inline-flex;
  gap: 4px;
  font-family: var(--mono);
  font-size: 11px;
}
.range-pills button {
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid var(--border-dim);
  color: var(--text-soft);
  background: var(--card);
}
.range-pills button.on {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  font-weight: 800;
}

.barcode-box {
  position: relative;
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 18px 18px 14px;
  background: var(--card);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.barcode-stage {
  position: relative;
  height: 146px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding-top: 16px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.22) 8%, #000 25%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.22) 8%, #000 25%);
}

.barcode-norm-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 36%;
  border-top: 1.5px dashed rgba(244, 241, 248, 0.38);
  z-index: 3;
  pointer-events: none;
}
.barcode-norm-note {
  position: absolute;
  left: 0;
  top: 122px;
  z-index: 4;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.barcode-norm-note:hover {
  opacity: 1;
}
.barcode-norm-note span {
  position: absolute;
  left: 0;
  top: -36px;
  transform: translateX(-50%) rotate(-45deg);
  z-index: 1;
  white-space: nowrap;
  background: var(--card);
  padding: 5px 8px;
  border: 1px solid white;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 10px;
  color: white;
}
.barcode-norm-note svg {
  position: absolute;
  left: 12px;
  top: -36px;
  width: 100px;
  height: 44px;
  overflow: visible;
  pointer-events: none;
}

.b-col {
  flex: 1 1 0;
  min-width: 3px;
  height: 100%;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  cursor: crosshair;
  border-radius: 3px;
}
.b-col i {
  display: block;
  width: 100%;
  border-radius: 1.5px;
  margin-top: 1px;
  transition: height 0.18s ease, filter 0.1s ease;
}
.b-col:hover i {
  filter: brightness(1.35);
}
.b-col.today {
  outline: 1.5px solid var(--text);
  outline-offset: 2px;
  border-radius: 3px;
}

.barcode-foot {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-dim);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-soft);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.barcode-foot b {
  color: var(--text);
}

@media (max-width: 720px) {
  .cards-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .lab-card[data-k="claude"],
  .lab-card[data-k="chatgpt"],
  .lab-card[data-k="gemini"] {
    transform: none;
  }
  .hero-box {
    padding: 16px;
    gap: 16px;
  }
  .face-frame {
    width: 156px;
    height: 156px;
  }
}
