/* Orthodox Barbell Club - limestone ground, iron type, oxblood and icon-gold accents */
:root {
  --bg: #eceef1;
  --surface: #ffffff;
  --fg: #1a1d22;
  --muted: #5b616b;
  --line: #c9ced6;
  --accent: #7a1f2b;
  --accent-fg: #ffffff;
  --accent-soft: #f3e3e5;
  --gilt: #9a7424;
  --gilt-soft: #f4ecd9;
  --ok: #2e7d4f;
  --ok-soft: #e1f2e8;
  --bad: #b3261e;
  --bad-soft: #fbe4e2;
  --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121417; --surface: #1b1f24; --fg: #e7e9ec; --muted: #9aa1ab; --line: #333a43;
    --accent: #e0707e; --accent-fg: #1a0b0e; --accent-soft: #3a1d22; --gilt: #d9b45a; --gilt-soft: #352c17;
    --ok: #6fcf97; --ok-soft: #173325; --bad: #ff8a80; --bad-soft: #3d1a17;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 var(--font-body); overflow-wrap: break-word; }
a { color: var(--accent); }
img, video { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; }
h1, h2 { font-family: var(--font-display); letter-spacing: .02em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 .4em; }
h2 { font-size: 1.35rem; margin: 1.8em 0 .5em; }
h3 { font-size: 1.05rem; margin: 1.4em 0 .4em; }
p, li { max-width: 70ch; }
small, .muted { color: var(--muted); }
code, .mono { font-family: var(--font-mono); font-size: .88em; }
:focus-visible { outline: 2px solid var(--gilt); outline-offset: 2px; }

.wrap { max-width: 1040px; margin: 0 auto; padding-inline: 16px; }
main.wrap { padding-block: 28px 64px; }

/* header */
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--fg);
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; letter-spacing: .03em; }
.brand .cross { color: var(--gilt); font-size: 1.3rem; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 16px; flex: 1; }
.nav a { color: var(--fg); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:hover, .nav a.on { color: var(--accent); }
.nav-right { display: flex; gap: 12px; align-items: center; }
.nav-right form { margin: 0; }
.club-bar { background: var(--accent-soft); border-bottom: 1px solid var(--line); }
.club-bar .wrap { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline; padding-block: 8px; }
.club-bar strong { font-family: var(--font-display); }
.club-bar a { color: var(--accent); text-decoration: none; font-weight: 500; font-size: .93rem; }
.club-bar a.on { text-decoration: underline; text-underline-offset: 4px; }

/* flash */
.flash { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.flash li { max-width: none; padding: 10px 14px; border-radius: var(--radius); }
.flash .ok { background: var(--ok-soft); color: var(--ok); }
.flash .error { background: var(--bad-soft); color: var(--bad); }

/* surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.grid > * { min-width: 0; }
.stack { display: grid; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.eyebrow { font: 600 .74rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--gilt); }
.lede { font-size: 1.12rem; color: var(--muted); }
.hero { padding-block: 24px 8px; }
.act-now { margin-top: 20px; border-left: 4px solid var(--accent); background: linear-gradient(var(--accent-soft), var(--surface) 70%); }
.act-now h2 { margin: 6px 0 8px; }
.act-steps { margin: 12px 0 18px; padding-left: 1.3em; display: grid; gap: 8px; }
.act-steps li::marker { color: var(--accent); font-weight: 700; }
.worldwide { margin-top: 16px; border-left: 4px solid var(--gilt); }
.worldwide h2 { margin: 6px 0 8px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.stat { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; }
.pill { display: inline-block; font: 600 .7rem/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 7px; border-radius: 3px; background: var(--gilt-soft); color: var(--gilt); vertical-align: 2px; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.red { background: var(--accent-soft); color: var(--accent); }
.empty { color: var(--muted); padding: 18px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* forms */
form.stack { max-width: 560px; }
label { display: grid; gap: 4px; font-weight: 600; font-size: .92rem; }
label .hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=url], input[type=number],
input:not([type]), select, textarea {
  font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
  padding: 8px 10px; width: 100%; min-width: 0; font-weight: 400;
}
textarea { min-height: 90px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 4px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 0; min-width: 0; }
legend { font-weight: 600; padding: 0 6px; }
.btn, button { font: 600 .95rem var(--font-body); border-radius: 4px; padding: 9px 16px; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-fg); text-decoration: none;
  display: inline-block; }
.btn.ghost, button.ghost { background: transparent; color: var(--accent); }
button.link { background: none; border: none; color: var(--accent); padding: 0; font-weight: 500; text-decoration: underline; }
button.small, .btn.small { padding: 5px 10px; font-size: .85rem; }
.inline { display: inline; margin: 0; }

/* tables */
.tbl { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.me td { background: var(--gilt-soft); }

/* workout */
.ex { border-top: 1px solid var(--line); padding-block: 12px; }
.ex:first-child { border-top: 0; }
.ex h3 { margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.ex .rx { font-variant-numeric: tabular-nums; }
.sets { display: grid; gap: 6px; margin-top: 8px; }
.set { display: grid; grid-template-columns: 3.2em minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr); gap: 8px; align-items: center; }
.set .n { color: var(--muted); font-size: .85rem; }

/* tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 16px; }
.tabs a { padding: 6px 12px; border-radius: 20px; border: 1px solid var(--line); text-decoration: none; color: var(--fg);
  font-size: .9rem; background: var(--surface); }
.tabs a.on { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }

/* chart */
svg.chart { width: 100%; height: auto; max-width: 560px; display: block; }
svg.chart .axis { stroke: var(--line); }
svg.chart .line { stroke: var(--accent); fill: none; stroke-width: 2.5; }
svg.chart .dot { fill: var(--accent); }
svg.chart text { fill: var(--muted); font: 11px var(--font-body); }

.video { position: relative; aspect-ratio: 16 / 9; max-width: 100%; background: var(--line); border-radius: var(--radius); overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

footer.site-foot { border-top: 1px solid var(--line); padding-block: 24px; color: var(--muted); font-size: .88rem; }
footer.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

/* app walkthrough video and the Get the app section on the home page */
.tour { margin: 24px 0 0; max-width: 960px; }
.tour video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; border-radius: var(--radius); }
.tour figcaption { margin-top: 6px; font-size: .92rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }  /* honeypot: people never see it */

@media (max-width: 760px) {
  .site-head .wrap { gap: 0 12px; }
  .brand { font-size: 1rem; flex: 1 1 auto; min-height: 44px; }
  .nav { flex: 1 1 100%; order: 3; gap: 0 4px; }
  .nav a { padding: 11px 8px; }  /* 44px tall tap targets */
  .nav-right { gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
  .nav-right a, .nav-right button.link { padding: 11px 8px; min-height: 44px; display: inline-flex; align-items: center; }
  .nav-right .btn.small { padding: 11px 16px; font-size: .95rem; }
  .club-bar .wrap { gap: 0 8px; }
  .club-bar a { padding: 12px 6px; display: inline-block; }
  .tabs { gap: 8px; }
  .tabs a { padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center; font-size: .95rem; }
  footer.site-foot a { display: inline-block; padding: 10px 2px; }
  footer.site-foot { font-size: .95rem; }
}
@media (max-width: 560px) {
  main.wrap { padding-block: 20px 48px; }
  .set { grid-template-columns: 2.4em minmax(0, 1fr) minmax(0, 1fr); }
  .set .rpe { display: none; }
  .card { padding: 16px; }
  .hero .lede { font-size: 1.05rem; }
  .eyebrow { font-size: .8rem; line-height: 1.3; }
  .pill { font-size: .75rem; }
  table { font-size: .9rem; }
  th { font-size: .78rem; }
  small, .muted { font-size: .92rem; }

  /* forms: 16px text so iPhones don't zoom in, 44px fields, full-width buttons */
  input[type=text], input[type=email], input[type=password], input[type=date], input[type=url], input[type=number],
  input:not([type]), select, textarea { font-size: 1rem; min-height: 44px; padding: 10px 12px; }
  .check { align-items: center; min-height: 44px; }
  .check input, input[type=checkbox], input[type=radio] { width: 22px; height: 22px; margin: 0; flex: none; }
  .btn, button { min-height: 44px; font-size: 1rem; padding: 10px 16px; }
  form.stack button, form.stack .btn, .hero .row .btn, .app p > .btn, .empty .btn { display: block; width: 100%; text-align: center; }
  .hero .row { display: grid; }
  button.small, .btn.small { min-height: 44px; padding: 10px 14px; font-size: .95rem; }
  button.link { min-height: 44px; padding: 0 6px; }
  .row .btn.small, .row button.small { flex: 1 1 auto; }
  .bar { display: grid; }
  .bar select { width: 100%; min-width: 0; font-size: 1rem; padding: 10px 8px; }
  .bar .btn, .bar button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* leaderboard + lifter pages: dark, dense, OpenPowerlifting-style. Only the page below the header goes dark. */
body.board-page { background: #1b1b1b; }
body.board-page main, body.board-page footer.site-foot {
  --bg: #1b1b1b; --surface: #222; --fg: #ddd; --muted: #9a9a9a; --line: #3a3a3a;
  --accent: #8cb4ff; --gilt: #d9b45a; --gilt-soft: #352c17; --ok: #6fcf97; --bad: #ff8a80;
  color: #ddd; color-scheme: dark;
}
body.board-page main.wrap, body.board-page footer.site-foot .wrap { max-width: 1240px; }
body.board-page h1, body.board-page h2 { color: #eee; }
body.board-page a { text-decoration: none; }
body.board-page a:hover { text-decoration: underline; }
.bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin: 12px 0 14px; padding: 10px 12px;
  background: #222; border: 1px solid #3a3a3a; border-radius: 4px; max-width: none; }
.bar label { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #9a9a9a; }
.bar select { width: auto; min-width: 11em; background: #1b1b1b; color: #ddd; border-color: #444; font-size: .9rem; padding: 6px 8px; }
body.board-page .tbl { overflow: auto; max-height: 78vh; border: 1px solid #333; border-radius: 4px; }
table.rank { font-size: .86rem; }
table.rank th, table.rank td { padding: 4px 10px; border-bottom: 1px solid #333; vertical-align: middle; white-space: nowrap; }
table.rank thead th { position: sticky; top: 0; z-index: 1; background: #111; color: #aaa; border-bottom: 1px solid #555; }
table.rank tbody tr:nth-child(odd) td { background: #262626; }
table.rank tbody tr:nth-child(even) td { background: #2d2d2d; }
table.rank tbody tr:hover td { background: #38404f; }
table.rank tbody tr.me td { background: #3a3220; }
table.rank td strong { color: #fff; }
table.rank small { color: #8d8d8d; font-size: .74rem; }
table.rank .dim { color: #666; }
table.rank a.play { font-size: .7rem; margin-left: 2px; opacity: .8; }
table.rank a.play:hover { opacity: 1; }
body.board-page .empty { border-color: #444; }
