:root {
  --black: #0b0b0b;
  --ink: #141414;
  --panel: #1a1a1a;
  --line: #2a2a2a;
  --white: #f6f4f0;
  --muted: #a3a09a;
  --red: #e10600;
  --red-dark: #b30500;
  --green: #2fbf71;
  --radius: 14px;
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; }
.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(520px, 100% - 40px); margin-inline: auto; }

/* header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 11, 11, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.logo {
  font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: 0.02em;
  text-decoration: none; text-transform: uppercase; line-height: 1; white-space: nowrap;
}
.logo span { color: var(--red); }
.nav { display: flex; gap: 10px; align-items: center; }
.nav a.link { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; }
.nav a.link:hover { color: var(--white); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--red); color: #fff; border: 0; border-radius: 999px;
  padding: 13px 26px; cursor: pointer; text-decoration: none;
  transition: background 0.15s, transform 0.05s;
}
.btn:hover { background: var(--red-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: wait; }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); color: var(--white); }
.btn.ghost:hover { border-color: var(--white); }
.btn.small { font-size: 15px; padding: 8px 16px; }
.btn.block { width: 100%; }
.btn.light { background: var(--white); color: var(--black); }
.btn.light:hover { background: #fff; }

/* type */
h1, h2, h3 { font-family: var(--display); text-transform: uppercase; line-height: 0.95; margin: 0 0 14px; letter-spacing: 0.01em; }
h1 { font-size: clamp(52px, 11vw, 112px); font-weight: 800; }
h2 { font-size: clamp(36px, 6vw, 56px); font-weight: 800; }
h3 { font-size: 24px; font-weight: 700; }
.red { color: var(--red); }
.muted { color: var(--muted); }
.eyebrow {
  font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--red); margin-bottom: 12px;
}
section { padding: 72px 0; }

/* cards / forms */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
label { display: block; font-weight: 600; font-size: 14px; margin: 16px 0 6px; color: #d8d5cf; }
input, textarea, select {
  width: 100%; font: inherit; color: var(--white);
  background: var(--ink); border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--red); }
textarea { min-height: 96px; resize: vertical; }
.pin { letter-spacing: 0.6em; font-size: 22px; text-align: center; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.msg { margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-size: 15px; display: none; }
.msg.show { display: block; }
.msg.err { background: rgba(225, 6, 0, 0.12); border: 1px solid rgba(225, 6, 0, 0.5); }
.msg.ok { background: rgba(47, 191, 113, 0.12); border: 1px solid rgba(47, 191, 113, 0.5); }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }

/* pills / tabs */
.tabs { display: inline-flex; background: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; }
.tabs button {
  font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: 0.05em; text-transform: uppercase;
  background: transparent; color: var(--muted); border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer;
}
.tabs button.on { background: var(--red); color: #fff; }
.badge {
  display: inline-block; font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
}
.badge.live { border-color: var(--green); color: var(--green); }
.badge.off { border-color: var(--red); color: var(--red); }

/* workout display */
.wod-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.wod-date { font-family: var(--display); font-weight: 700; color: var(--red); letter-spacing: 0.12em; text-transform: uppercase; font-size: 15px; }
.wod-title { font-size: clamp(40px, 8vw, 68px); margin: 4px 0 0; }
.block { border-top: 1px solid var(--line); padding: 18px 0; }
.block:first-of-type { border-top: 0; }
.block h4 {
  font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 20px; letter-spacing: 0.06em;
  margin: 0 0 8px; display: flex; align-items: center; gap: 10px;
}
.block h4::before { content: ""; width: 10px; height: 10px; background: var(--red); border-radius: 2px; }
.block .text { white-space: pre-wrap; font-size: 18px; }
.note { border-left: 3px solid var(--red); padding: 10px 16px; background: var(--ink); border-radius: 0 10px 10px 0; margin-top: 18px; }
.note b { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.08em; }

.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.days button {
  flex: 0 0 auto; background: var(--ink); color: var(--muted); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 12px; cursor: pointer; font: inherit; font-size: 14px; text-align: center; min-width: 64px;
}
.days button b { display: block; font-family: var(--display); font-size: 22px; color: var(--white); line-height: 1; }
.days button.on { border-color: var(--red); background: rgba(225, 6, 0, 0.12); }

/* tables (admin) */
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.scroll-x { overflow-x: auto; }

footer { border-top: 1px solid var(--line); padding: 30px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.hidden { display: none !important; }
.center { text-align: center; }
.mt { margin-top: 22px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  section { padding: 52px 0; }
  .row { flex-direction: column; gap: 0; }
  .nav a.link.hide-sm { display: none; }
  .card { padding: 20px; }
}
