@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --bg: #eceeed;
  --surface: #ffffff;
  --surface-2: #e1e4e3;
  --ink: #121417;
  --muted: #51565a;
  --line: #d3d7d7;
  /* Colours of competition bumper plates (IWF): 25 kg red, 20 kg blue, 15 kg yellow, 10 kg green */
  --plate-red: #d7262b;
  --plate-blue: #1f57c3;
  --plate-yellow: #f4c20d;
  --plate-green: #1e9a4b;
  --plate-black: #17191c;
  --track: #e8572a;
  --acc: var(--plate-red);
  --acc-ink: #ffffff;
  --acc-hi: #ff5a5f;
  --hot: #ff4f1f;
  --hot-text: #c93a0f;
  --board: #15171a;
  --board-ink: #f1f3f3;
  --board-muted: #9ea4a8;
  --ok: #1f8a4c;
  --warn: #c98a00;
  --bad: #d23b1a;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(18, 20, 23, .04), 0 10px 30px -18px rgba(18, 20, 23, .35);
  --wrap: 1160px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1012;
    --surface: #181b1e;
    --surface-2: #23272b;
    --ink: #eef1f2;
    --muted: #a0a7ab;
    --line: #2c3135;
    --hot-text: #ff7a52;
    --board: #1c2024;
    --plate-black: #eef1f2;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 30px -18px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #0e1012;
    --surface: #181b1e;
    --surface-2: #23272b;
    --ink: #eef1f2;
    --muted: #a0a7ab;
    --line: #2c3135;
    --hot-text: #ff7a52;
    --board: #1c2024;
    --plate-black: #eef1f2;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 30px -18px rgba(0, 0, 0, .8);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-stretch: 100%;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--hot); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--hot-text); }
:focus-visible { outline: 3px solid var(--hot); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 2px; text-decoration: none; font-weight: 900; font-stretch: 125%; letter-spacing: -.02em; font-size: 22px; text-transform: uppercase; color: var(--ink); }
.logo b { background: var(--plate-red); color: #fff; padding: 0 6px; border-radius: 6px; transform: skewX(-8deg); display: inline-block; }
.logo:hover { color: var(--ink); }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav .lang { border: 1.5px solid var(--ink); font-weight: 800; font-size: 13px; letter-spacing: .06em; padding: 6px 12px; }
@media (max-width: 640px) { .nav .hide-sm { display: none; } }

/* Hero */
.hero { background: var(--bg); color: var(--ink); overflow: hidden; position: relative; border-bottom: 1px solid var(--line); }
.hero .wrap { padding-top: 64px; padding-bottom: 72px; position: relative; z-index: 1; }
.eyebrow { display: inline-block; font-weight: 800; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: #fff; background: var(--ink); padding: 4px 10px; border-radius: 6px; }
.hero h1 { font-size: clamp(40px, 7.4vw, 84px); line-height: .92; font-weight: 900; font-stretch: 125%; letter-spacing: -.035em; text-transform: uppercase; margin: 22px 0 18px; max-width: 13ch; }
.hero h1 em { font-style: normal; color: var(--plate-red); }
.hero p { font-size: clamp(17px, 2.2vw, 21px); color: var(--muted); max-width: 52ch; margin: 0; }
.plates { position: absolute; right: max(20px, calc((100% - var(--wrap)) / 2 + 20px)); top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 6px; }
.plates span { display: block; width: 26px; border-radius: 6px; box-shadow: inset -5px 0 0 rgba(0,0,0,.18); }
.plates .bar { width: 44px; height: 16px; border-radius: 3px; background: linear-gradient(#c9cdd0, #8f959a); box-shadow: none; }
.plates .collar { width: 18px; height: 40px; background: #9aa0a5; border-radius: 4px; }
@media (max-width: 1180px) { .plates { display: none; } }

/* Grid of calculators */
.section { padding: 56px 0; }
.section-title { font-weight: 900; font-stretch: 115%; text-transform: uppercase; letter-spacing: -.01em; font-size: clamp(24px, 3.5vw, 34px); margin: 0 0 24px; line-height: 1.05; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.card { position: relative; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-decoration: none; box-shadow: var(--shadow); transition: transform .18s ease, border-color .18s ease; min-height: 190px; }
.card:hover { transform: translateY(-3px); border-color: var(--ink); color: var(--ink); }
.card .icon { width: 48px; height: 48px; border-radius: 50%; background: var(--acc); color: var(--acc-ink); box-shadow: inset 0 0 0 4px rgba(255,255,255,.18); display: grid; place-items: center; }
.card .icon svg { width: 26px; height: 26px; }
.card h3 { margin: 6px 0 0; font-size: 21px; font-weight: 800; font-stretch: 110%; line-height: 1.15; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.card .go { margin-top: auto; font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; display: inline-flex; gap: 6px; align-items: center; }
.card .go::after { content: "→"; transition: transform .18s; }
.card:hover .go::after { transform: translateX(4px); }
.card.mini { min-height: 0; padding: 18px; flex-direction: row; align-items: center; gap: 14px; }
.card.mini h3 { margin: 0; font-size: 17px; }
.card.mini .icon { width: 40px; height: 40px; flex: none; }

/* Calculator page */
.page-head { padding: 36px 0 8px; }
.crumbs { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.page-head h1 { font-size: clamp(32px, 5.5vw, 58px); line-height: 1; font-weight: 900; font-stretch: 120%; letter-spacing: -.03em; text-transform: uppercase; margin: 0 0 14px; }
.page-head .lead { font-size: clamp(17px, 2vw, 19px); color: var(--muted); max-width: 70ch; margin: 0; }

.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin: 28px 0 8px; align-items: start; }
@media (max-width: 860px) { .calc { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.board { background: var(--board); color: var(--board-ink); border-radius: var(--radius); padding: 26px; position: sticky; top: 84px; min-height: 280px; }
@media (max-width: 860px) { .board { position: static; } }
.board h2 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--board-muted); margin: 0 0 6px; font-weight: 700; }

/* Form */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 7px; letter-spacing: .01em; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.input-wrap { position: relative; display: flex; align-items: center; }
input[type="number"], input[type="text"], select {
  width: 100%;
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  min-height: 50px;
  appearance: none;
  -moz-appearance: textfield;
}
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input:focus, select:focus { outline: none; border-color: var(--ink); background: var(--surface); }
.input-wrap .unit { position: absolute; right: 14px; color: var(--muted); font-weight: 700; font-size: 14px; pointer-events: none; }
.input-wrap input { padding-right: 52px; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; font-size: 16px; }

.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { cursor: pointer; padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 15px; user-select: none; }
.seg input:checked + label { background: var(--ink); color: var(--bg); }
.seg input:focus-visible + label { outline: 3px solid var(--hot); outline-offset: 1px; }
.seg.full { display: flex; }
.seg.full label { flex: 1; text-align: center; }
.form-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { font: inherit; font-size: 14px; font-weight: 700; border: 1.5px solid var(--line); background: transparent; color: var(--ink); padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.chip:hover { border-color: var(--ink); }

/* Results */
.big { font-size: clamp(48px, 8vw, 76px); font-weight: 900; font-stretch: 115%; line-height: 1; letter-spacing: -.03em; color: var(--acc-hi); font-variant-numeric: tabular-nums; }
.big small { font-size: .32em; font-weight: 700; color: var(--board-ink); letter-spacing: 0; margin-left: 6px; font-stretch: 100%; }
.sub { color: var(--board-muted); font-size: 15px; margin: 8px 0 0; }
.empty { color: var(--board-muted); font-size: 16px; display: flex; align-items: center; min-height: 220px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 22px; }
.stat { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; padding: 12px 14px; }
.stat .k { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--board-muted); font-weight: 700; }
.stat .v { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: 2px; }
.stat .v small { font-size: 13px; color: var(--board-muted); font-weight: 600; margin-left: 3px; }
.goal-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 6px; }
.goal-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 14px; border-radius: 10px; background: rgba(255, 255, 255, .05); font-size: 15px; }
.goal-list li strong { font-size: 19px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.goal-list li span small { display: block; color: var(--board-muted); font-size: 12.5px; }
.goal-list li.hl { background: var(--acc); color: var(--acc-ink); }
.goal-list li.hl span small { color: inherit; opacity: .78; }
.bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; margin-top: 22px; background: rgba(255, 255, 255, .08); }
.bar span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 13px; color: var(--board-muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.c-pro { background: #ff5a5f; }
.c-carb { background: var(--plate-yellow); }
.c-fat { background: #5b8cff; }
.gauge { position: relative; margin-top: 26px; }
.gauge .track { display: flex; height: 14px; border-radius: 999px; overflow: hidden; }
.gauge .track span { height: 100%; }
.gauge .marker { position: absolute; top: -7px; width: 4px; height: 28px; background: var(--board-ink); border-radius: 2px; transform: translateX(-2px); transition: left .3s ease; box-shadow: 0 0 0 3px var(--board); }
.gauge .ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--board-muted); margin-top: 8px; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; padding: 5px 12px; border-radius: 999px; margin-top: 12px; color: #0f100d; }
.note { font-size: 13px; color: var(--board-muted); margin: 16px 0 0; line-height: 1.5; }
.note.warn { color: #ffb38f; }
.tbl { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 15px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.tbl th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--board-muted); font-weight: 700; }
.tbl tr.hl td { color: var(--acc-hi); font-weight: 800; }

/* Article content */
.content { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding: 32px 0 64px; }
@media (max-width: 960px) { .content { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.prose { max-width: 72ch; }
.prose h2 { font-weight: 900; font-stretch: 112%; font-size: clamp(24px, 3vw, 30px); line-height: 1.1; letter-spacing: -.01em; margin: 40px 0 12px; }
.prose h2:first-child { margin-top: 8px; }
.prose h3 { font-size: 19px; margin: 24px 0 6px; font-weight: 800; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin: 4px 0; }
.formula { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 15px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--acc); border-radius: 10px; padding: 14px 16px; overflow-x: auto; white-space: pre; line-height: 1.7; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; margin: 14px 0; background: var(--surface); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.prose th, .prose td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.prose th { background: var(--surface-2); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.prose tr:last-child td { border-bottom: 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 800; font-size: 17.5px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; line-height: 1; font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 10px 0 0; color: var(--muted); }
.disclaimer { font-size: 14px; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; padding: 14px 16px; margin-top: 36px; }
.aside h2 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.aside .cards { grid-template-columns: 1fr; gap: 10px; }
.aside-sticky { position: sticky; top: 84px; display: grid; gap: 24px; }

/* Ads: hidden until an AdSense client id is configured */
.ad-slot { display: none; }
.ads-on .ad-slot { display: block; min-height: 120px; margin: 24px 0; text-align: center; }
.ads-on .ad-slot::before { content: attr(data-label); display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ads-on .aside .ad-slot { min-height: 250px; margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 14.5px; color: var(--muted); }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }
.site-footer h3 { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin: 0 0 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer p { margin: 10px 0 0; max-width: 42ch; }

/* Simple pages */
.simple { max-width: 760px; padding: 40px 20px 72px; }
.simple h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 900; font-stretch: 118%; text-transform: uppercase; letter-spacing: -.02em; line-height: 1.02; }

/* Home extras */
.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.why div { border-top: 4px solid var(--ink); padding-top: 14px; }
.why h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.why p { margin: 0; color: var(--muted); font-size: 15.5px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Unit and mode toggles */
.calc-form[data-units="metric"] [data-show="imperial"],
.calc-form[data-units="imperial"] [data-show="metric"],
.calc-form[data-mode="pace"] [data-mode="time"],
.calc-form[data-mode="time"] [data-mode="pace"] { display: none; }
.goal-list li.low { opacity: .55; }
.goal-list li.low strong::after { content: " *"; color: #ffb38f; }
@media (max-width: 480px) {
  .prose th, .prose td { padding: 8px 10px; font-size: 14px; }
  .formula { font-size: 13px; }
  .panel, .board { padding: 18px; }
}

/* Each calculator takes the colour of one plate */
.t-calories { --acc: var(--plate-red); --acc-ink: #fff; --acc-hi: #ff5a5f; }
.t-macros { --acc: var(--plate-yellow); --acc-ink: #121417; --acc-hi: #f4c20d; }
.t-bmi { --acc: var(--plate-green); --acc-ink: #fff; --acc-hi: #3ddc7a; }
.t-onerm { --acc: var(--plate-blue); --acc-ink: #fff; --acc-hi: #6f9bff; }
.t-protein { --acc: var(--plate-black); --acc-ink: var(--bg); --acc-hi: #f1f3f3; }
.t-pace { --acc: var(--track); --acc-ink: #fff; --acc-hi: #ff7a4d; }
.t-protein .goal-list li.hl, .t-protein .tbl tr.hl td { color: var(--acc-ink); }
