:root {
  color: #142033;
  background: #f4f7f8;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 20px;
  line-height: 1.4;
}

* { box-sizing: border-box; }

body { margin: 0; }

button, input, select {
  font: inherit;
  min-height: 3rem;
}

button, .button {
  background: #1d4e89;
  color: white;
  border: 0;
  border-radius: 0.4rem;
  padding: 0.6rem 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

button:active { transform: translateY(1px); }

.top, .session-head, main { padding: 1rem 1.25rem; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #142033;
  color: white;
}

.brand { color: white; font-weight: 700; text-decoration: none; font-size: 1.4rem; }

.lang { display: flex; gap: 0.4rem; align-items: center; }

.lang button { background: transparent; color: white; border: 2px solid white; }
.lang button[aria-current="true"] { background: white; color: #142033; }

main { max-width: 72rem; margin: 0 auto; }

label, .choice { display: block; margin: 0.8rem 0; }

input, select { width: 100%; padding: 0.4rem 0.6rem; }

fieldset { border: 1px solid #c5d0d8; border-radius: 0.5rem; margin: 1rem 0; }

.sessions { list-style: none; padding: 0; }

.sessions li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid #d5dee6;
}

.phase { color: #1d4e89; font-weight: 700; }

.session-head, .head-actions { display: flex; gap: 1rem; align-items: center; justify-content: space-between; }

.eyebrow { margin: 0; color: #526173; }

h2 { margin: 0.2rem 0 0.6rem; font-size: 2rem; }

.hint { font-size: 1.15rem; }

.live-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.6rem;
  margin: 1rem 0;
}

.live-strip div {
  background: white;
  border-radius: 0.5rem;
  padding: 0.6rem 0.8rem;
  box-shadow: 0 1px 2px rgba(20, 32, 51, 0.08);
}

.live-strip span { color: #526173; font-size: 0.85rem; }

.live-strip strong { display: block; font-size: 1.6rem; font-variant-numeric: tabular-nums; }

.live-strip .wide { grid-column: span 2; }

.chip { display: inline-block; margin-right: 0.6rem; font-size: 1rem; }

#link-banner { display: none; }
#link-banner.visible {
  display: block;
  background: #f59e0b;
  color: #1c1917;
  font-size: 1.4rem;
  font-weight: 700;
  padding: 0.8rem 1rem;
  border-radius: 0.4rem;
}

.checks { list-style: none; padding: 0; }

.checks li {
  background: white;
  margin: 0.4rem 0;
  padding: 0.7rem 0.9rem;
  border-radius: 0.4rem;
  border-left: 0.4rem solid #94a3b8;
}

.checks li.ok { border-left-color: #15803d; }
.checks li.bad { border-left-color: #b91c1c; }

.tick { font-weight: 800; margin-right: 0.4rem; }

.checks p { margin: 0.35rem 0 0; }

.tracks {
  display: flex;
  align-items: flex-end;
  gap: 0.3rem;
  height: 14rem;
  position: relative;
  margin-top: 1rem;
}

.track { flex: 1; height: 100%; display: flex; align-items: flex-end; background: #e7eef2; }

.bar { width: 100%; background: #1f7a4d; }
.bar.low { background: #c2410c; }
.bar.high { background: #b91c1c; }

.mark { position: absolute; left: 0; right: 0; border-top: 2px dashed #1d4e89; pointer-events: none; }
.mark.uv { border-top-color: #b91c1c; }

.bar-labels { display: flex; gap: 0.3rem; }
.bar-labels div { flex: 1; text-align: center; font-size: 0.75rem; min-width: 0; }
.bar-labels span { display: block; }
.bar-labels span:first-child { font-weight: 700; }

.countdown { display: flex; align-items: center; gap: 1rem; margin: 0.5rem 0 1rem; }

.ring { width: 7rem; height: 7rem; }
.ring-bg, .ring-fg { fill: none; stroke-width: 3; }
.ring-bg { stroke: #d5dee6; }
.ring-fg { stroke: #1d4e89; }

.remaining { font-size: 2.4rem; font-variant-numeric: tabular-nums; margin: 0; }

.restart { animation: flash 0.7s ease; }
@keyframes flash { from { background: #fee2e2; } }

.meter { margin: 0.6rem 0; }
.meter-track { height: 1rem; background: #e7eef2; border-radius: 999px; overflow: hidden; }
.meter-bar { height: 100%; background: #1d4e89; }

.chart-box { position: relative; height: 16rem; margin: 1rem 0; }
.chart-box.tall { height: 22rem; }

.watermark {
  border: 3px dashed #b45309;
  color: #9a3412;
  font-weight: 800;
  padding: 0.7rem 1rem;
  margin: 0.6rem 0;
}

.overlay { display: none; }
.overlay.visible {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(159, 18, 57, 0.96);
  color: white;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  gap: 1rem;
}

.overlay h2 { font-size: 6rem; margin: 0; letter-spacing: 0.08em; }
.overlay ul { list-style: none; padding: 0; font-size: 1.6rem; }
.overlay button { background: white; color: #9f1239; font-size: 1.4rem; padding: 0.8rem 1.4rem; }

.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.6rem; }
.figures div { background: white; padding: 0.7rem; border-radius: 0.4rem; }
.figures dd { margin: 0; font-size: 1.6rem; font-weight: 700; }

.action, .override, .abort { margin: 0.8rem 0; }
.override { background: #fff7ed; padding: 0.8rem; border-radius: 0.5rem; }
.abort summary { cursor: pointer; font-weight: 700; min-height: 3rem; display: flex; align-items: center; }

.error { color: #b91c1c; font-weight: 700; }
.ok { color: #15803d; font-weight: 700; }

.reason { font-size: 1.4rem; }

.top-nav { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }
.top-nav a { color: white; }
.top-nav .who { opacity: 0.85; }
.top-nav button { min-height: 2.4rem; background: transparent; border: 1px solid white; }

.filters, form label { display: flex; flex-direction: column; gap: 0.2rem; margin: 0.4rem 0; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.6rem; align-items: end; }
.hint { color: #3f4d63; max-width: 40rem; }

.history { width: 100%; border-collapse: collapse; background: white; }
.history th, .history td { text-align: left; padding: 0.5rem 0.7rem; border-bottom: 1px solid #d5dee6; vertical-align: top; }
.history form { display: flex; gap: 0.4rem; align-items: center; margin: 0.2rem 0; }

textarea { width: 100%; font-family: ui-monospace, monospace; font-size: 0.9rem; }
.note.bad { color: #b91c1c; font-weight: 700; }

@media (max-width: 700px) {
  :root { font-size: 18px; }
  .overlay h2 { font-size: 4rem; }
  .live-strip .wide { grid-column: span 1; }
}
