/**
 * Shared pieces: gauges, LEDs, the log block, tables, stats, the footer.
 */

/* ═══════════════════════════════════════════════════════════════════════
   SHARED PIECES
   ═══════════════════════════════════════════════════════════════════════ */

.gauge {
  display: flex;
  gap: 3px;
  margin: 10px 0 6px;
}
.gauge span {
  flex: 1;
  height: 17px;
  background: var(--panel-2);
  border: 2px solid var(--line);
}
.gauge span.on {
  background: var(--accent);
  border-color: var(--accent);
}
.gauge span.over {
  background: var(--bad);
  border-color: var(--bad);
}
.gauge-row {
  margin-bottom: 18px;
}
.gauge-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 22px;
}
.gauge-head b {
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.led {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  vertical-align: -1px;
  background: var(--good);
  box-shadow:
    0 0 0 2px var(--bg),
    0 0 0 4px var(--line);
}
.led.warn {
  background: var(--warn);
}
.led.bad {
  background: var(--bad);
  animation: blink 1.1s steps(1, end) infinite;
}
@keyframes blink {
  50% {
    opacity: 0.25;
  }
}

.log {
  background: var(--bg);
  border: 3px solid var(--line);
  padding: 14px;
  font-size: 23px;
  line-height: 1.6;
  overflow-x: auto;
}
.log div {
  white-space: pre;
}
.log .ok {
  color: var(--good);
}
.log .no {
  color: var(--bad);
}
.log .ax {
  color: var(--accent);
}
.log .t {
  color: var(--ink-dim);
}

.scroll {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 580px;
  font-size: 25px;
}
th,
td {
  text-align: left;
  padding: 9px 14px;
  border-bottom: 2px solid var(--line);
}
th {
  font-family: "Archivo", system-ui, sans-serif;
  color: var(--ink-dim);
  background: var(--panel-2);
  border-bottom: 3px solid var(--line);
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
}
td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
tr.win td {
  color: var(--accent);
}
tr.win td:first-child::before {
  content: "▶ ";
}

.grid-3 {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  align-items: stretch;
}
/* Cards of unequal content leave ragged holes in a row. Stretch them, and let the last thing in
   each one sit on the floor rather than wherever the text happened to stop. */
.grid-3 > .panel,
.grid-2 > .panel {
  display: flex;
  flex-direction: column;
}
.grid-3 > .panel > .aside:last-child,
.grid-2 > .panel > .aside:last-child {
  margin-top: auto;
  padding-top: 16px;
}
.grid-2 {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
}
.strip {
  margin-top: 64px;
}

.stat .n {
  font-family: "Archivo", system-ui, sans-serif;
  font-size: clamp(30px, 4vw, 44px);
  color: var(--accent);
  text-shadow: var(--glow);
  display: block;
  line-height: 1.2;
  margin-bottom: 8px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat .cap {
  font-size: 17px;
  color: var(--ink-dim);
  line-height: 1.5;
}

.payoff {
  font-family: "Archivo", system-ui, sans-serif;
  font-size: clamp(21px, 2.4vw, 28px);
  color: var(--ink);
  max-width: 32ch;
  font-weight: 700;
  line-height: 1.35;
}

.close {
  padding: 96px 0 8px;
  border-top: 3px solid var(--line);
  margin-top: 70px;
}
.close-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}
.close-line {
  font-size: clamp(31px, 3.7vw, 47px);
  color: var(--ink);
  max-width: 24ch;
  line-height: 1.3;
  margin: 0;
}
.close-line em {
  font-style: normal;
  color: var(--accent);
  text-shadow: var(--glow);
}
@media (max-width: 760px) {
  .close-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   THE FOOTER

   Three columns over a rule. The old one was two spans with space-between,
   which put "Razorpay AI Buildathon" and "SEED 20260826" at opposite ends of
   a very wide page with nothing in between — a footer by position rather than
   by structure, and it said nothing about who built the thing.

   Links here are dimmed rather than accented. The global rule gives every
   anchor a 2px accent underline, which is right in body copy and far too loud
   in a column of four; they come up to full accent on hover and focus, so the
   affordance is still carried by more than colour.
   ═══════════════════════════════════════════════════════════════════════ */
footer {
  border-top: 3px solid var(--line);
  margin-top: 60px;
  padding: 30px 0 52px;
  color: var(--ink-dim);
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(230px, 0.85fr) 2fr;
  gap: 22px 56px;
  align-items: start;
}

/* Mark and wordmark share a line; the sentence sits under both. */
.foot-brand {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 6px 11px;
}
.foot-brand img {
  width: 24px;
  height: auto;
}
.foot-name {
  font-family: "Silkscreen", monospace;
  font-size: 19px;
  letter-spacing: 0.16em;
  color: var(--ink);
}
.foot-line {
  grid-column: 1 / -1;
  font-size: 19px;
  line-height: 1.45;
  max-width: 30ch;
}

/* Label beside its links rather than above them — the whole reason this is two
   rows deep instead of five. */
.foot-links {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 12px 26px;
  margin: 0;
  font-size: 19px;
  line-height: 1.55;
}
.foot-links dt {
  padding-top: 3px;
}
.foot-links dd {
  margin: 0;
}
/* The separator, as an element rather than a character in the copy: a screen
   reader announcing "middot" between every link is noise, and a bare dot in the
   text would be selected and copied along with it. */
.foot-links i {
  font-style: normal;
  padding: 0 9px;
  opacity: 0.5;
}
.foot-links dd > span,
.foot-links a {
  white-space: nowrap;
}
.foot-links a {
  color: var(--ink-dim);
  border-bottom: 1px solid var(--line);
}
.foot-links a:hover,
.foot-links a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.foot-rule {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: space-between;
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
@media (max-width: 820px) {
  .foot-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}
@media (max-width: 560px) {
  .foot-links {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .foot-links dd {
    margin-bottom: 8px;
  }
  /* Keeping an item atomic stops a name splitting across lines, which is worth it
     on a wide column and not worth it on a phone: at 376px the longest item is
     wider than the screen, and an overflow is a worse break than a bad one. */
  .foot-links dd > span {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  /* A reduced-motion override has to beat every animation on the page, including ones declared
     later and more specifically. That is what !important is for. */
  *,
  *::before,
  *::after {
    /* biome-ignore lint/complexity/noImportantStyles: see above */
    animation: none !important;
    /* biome-ignore lint/complexity/noImportantStyles: see above */
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}
