/* The lead board's pages: the TV, its status page, the passcode. Axle petrol and gold on white. */
:root {
  --petrol: #004968;
  --petrol-soft: #e6f0f4;
  --teal: #19b3b3;
  --gold: #c4952b;
  --gold-soft: #fbf3df;
  --gold-ink: #6f5110;
  --ink: #14232b;
  --muted: #5d6c74;
  --line: #e3e9ec;
  --soft: #f3f7f8;
  --ok: #1f7a4d;
  --warn: #a8620a;
  --alert: #b3261e;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family:
    Inter,
    "Segoe UI",
    system-ui,
    -apple-system,
    Roboto,
    Arial,
    sans-serif;
}
.brand {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--petrol);
}
.brand span {
  color: var(--gold);
  font-weight: 400;
}

/* ---- the grade: a ring that fills with the score (the same badge as amplo's Leads page) */
.grade {
  --pct: 50;
  --ring-from: #b8c3c8;
  --ring-to: #8a979e;
  --track: #e8eef1;
  --letter: #6b7a82;
  --size: 2.75rem;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: none;
  background: conic-gradient(
    from -90deg,
    var(--ring-from),
    var(--ring-to) calc(var(--pct) * 1%),
    var(--track) 0
  );
}
.grade::before {
  content: "";
  position: absolute;
  inset: calc(var(--size) * 0.09);
  border-radius: 50%;
  background: #fff;
}
.grade-letter,
.grade-score {
  position: relative;
  line-height: 1;
}
.grade-letter {
  font-size: calc(var(--size) * 0.4);
  font-weight: 800;
  color: var(--letter);
}
.grade-score {
  font-size: calc(var(--size) * 0.2);
  font-weight: 600;
  color: var(--muted);
  margin-top: 0.1em;
}
.grade-a {
  --ring-from: var(--teal);
  --ring-to: var(--petrol);
  --track: #dcecf1;
  --letter: var(--petrol);
  box-shadow:
    0 0 0 calc(var(--size) * 0.06) rgba(25, 179, 179, 0.14),
    0 0.3em 0.8em rgba(0, 73, 104, 0.18);
}
.grade-a::before {
  background: radial-gradient(circle at 35% 30%, #fff, #eaf6f8);
}
.grade-b {
  --ring-from: #f0c66a;
  --ring-to: var(--gold);
  --track: #f6ecd6;
  --letter: var(--gold-ink);
  box-shadow: 0 0.25em 0.6em rgba(196, 149, 43, 0.16);
}
.grade-b::before {
  background: radial-gradient(circle at 35% 30%, #fff, #fdf7ea);
}

/* ---- pills */
.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 0.25em 0.9em;
  font-weight: 600;
  border: 1px solid var(--line);
}
.pill-ok {
  color: var(--ok);
  background: #e9f6ef;
  border-color: #b9e2cb;
}
.pill-warn {
  color: var(--warn);
  background: #fdf3e2;
  border-color: #f0cf95;
}

/* ---- the TV: sized by the screen's width, so any TV shows two columns of 12 */
.tv {
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.2vw 2.4vw 0.8vw;
  font-size: 1vw;
  overflow: hidden;
}
.tv-head {
  display: flex;
  align-items: center;
  gap: 1.6vw;
  padding-bottom: 0.7vw;
  border-bottom: 0.18vw solid var(--petrol);
}
.tv-head .brand {
  font-size: 1.6vw;
}
.tv-head h1 {
  margin: 0;
  font-size: 2.4vw;
  letter-spacing: -0.02em;
}
.tv-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.4vw;
  font-size: 1.15vw;
}
.tv-right time {
  font-size: 2vw;
  font-weight: 700;
  color: var(--petrol);
  font-variant-numeric: tabular-nums;
}
.tv-rows {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(12, minmax(0, 1fr));
  grid-auto-flow: column;
  gap: 0.4vw 1.6vw;
  padding: 0.8vw 0 0.5vw;
}
.tv-row {
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 1.1vw;
  padding: 0 1vw;
  border-radius: 0.7vw;
  background: var(--soft);
  min-width: 0;
}
.tv-row .grade {
  --size: min(3vw, 5.6vh);
}
.tv-row-fresh {
  background: var(--petrol-soft);
  box-shadow: inset 0 0 0 0.14vw var(--petrol);
  animation: glow 2.4s ease-in-out infinite;
}
@keyframes glow {
  50% {
    box-shadow:
      inset 0 0 0 0.14vw var(--teal),
      0 0 1.2vw rgba(25, 179, 179, 0.35);
  }
}
.tv-main {
  min-width: 0;
}
.tv-name-line {
  display: flex;
  align-items: center;
  gap: 0.7vw;
}
.tv-name {
  font-size: 1.55vw;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tv-new {
  font-size: 0.85vw;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--petrol);
  border-radius: 999px;
  padding: 0.15vw 0.6vw;
}
.tv-sub {
  display: flex;
  align-items: center;
  gap: 0.8vw;
  font-size: 0.95vw;
  color: var(--muted);
  margin-top: 0.1vw;
}
.tv-dot {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.tv-tag {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0 0.6vw;
}
.tv-tag-strong {
  color: var(--petrol);
  border-color: var(--petrol);
  background: var(--petrol-soft);
  font-weight: 600;
}
.enter {
  animation: enter 0.9s ease-out both;
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(0.8vw) scale(0.98);
  }
}
.tv-empty {
  font-size: 2vw;
  color: var(--muted);
  text-align: center;
  margin-top: 10vh;
}
.tv-foot {
  display: flex;
  justify-content: space-between;
  font-size: 1vw;
  color: var(--muted);
  padding-top: 0.6vw;
}
.offline {
  position: fixed;
  left: 50%;
  bottom: 2vw;
  transform: translateX(-50%);
  background: var(--alert);
  color: #fff;
  font-size: 1.4vw;
  font-weight: 700;
  padding: 0.6vw 1.6vw;
  border-radius: 999px;
}

/* ---- the status page: a phone first */
.status {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}
.status h1 {
  font-size: 1.5rem;
  margin: 0.2rem 0 0.6rem;
}
.status h2 {
  font-size: 1rem;
  color: var(--muted);
  margin: 1.4rem 0 0.4rem;
}
.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-wrap: anywhere;
}
.item-down {
  border-color: var(--alert);
  background: #fdecea;
}
.item-late {
  border-color: var(--gold);
  background: var(--gold-soft);
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex: none;
  background: #a3afb5;
}
.dot-ok {
  background: var(--ok);
}
.dot-late {
  background: var(--gold);
}
.dot-down {
  background: var(--alert);
}
.state {
  color: var(--muted);
  font-size: 0.85rem;
}
.detail {
  font-size: 0.85rem;
  color: var(--muted);
}
.meta {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 1.4rem;
}

/* ---- the passcode */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  background: linear-gradient(160deg, #fff, var(--petrol-soft));
}
.login-card {
  width: min(360px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 12px 30px rgba(0, 73, 104, 0.08);
}
.login-card h1 {
  margin: 0 0 6px;
  font-size: 1.4rem;
}
.login-card input {
  font: inherit;
  font-size: 1.3rem;
  padding: 10px 12px;
  border: 1px solid #b8c3c8;
  border-radius: 8px;
  letter-spacing: 0.2em;
}
.login-card button {
  font: inherit;
  font-weight: 700;
  padding: 11px;
  border: 0;
  border-radius: 8px;
  background: var(--petrol);
  color: #fff;
  cursor: pointer;
}
.error {
  color: var(--alert);
  margin: 0;
}
