/* LiftLoadout v2 — shared stylesheet. Dark gym aesthetic, mobile-first. */
:root {
  color-scheme: light dark;
  --bg: #101211;
  --surface: #1a1d1b;
  --surface-2: #242825;
  --text: #f3f6f1;
  --muted: #aeb6b1;
  --line: #343a37;
  --line-strong: #555e59;
  --accent: #deff3f;
  --accent-ink: #141701;
  --danger: #ff8175;
  --shadow: 0 22px 60px rgba(0, 0, 0, .32);
  --plate-45: #d94137;
  --plate-35: #2b75cf;
  --plate-25: #e9c832;
  --plate-20: #2b75cf;
  --plate-15: #e9c832;
  --plate-10: #46a95e;
  --plate-5: #e7e8e5;
  --plate-small: #aeb5b1;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #080a09;
    --surface: #121513;
    --surface-2: #1b1f1c;
    --text: #f4f7f2;
    --muted: #aeb7b1;
    --line: #2c322f;
    --line-strong: #4b5550;
    --accent: #dfff3f;
    --accent-ink: #111400;
    --danger: #ff8175;
    --shadow: 0 24px 72px rgba(0, 0, 0, .5);
    --plate-5: #d7dad6;
    --plate-small: #8f9792;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, transparent 49.9%, color-mix(in srgb, var(--line) 24%, transparent) 50%, transparent 50.1%) 0 0 / 52px 52px,
    var(--bg);
  color: var(--text);
  font-family: "Public Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.shell { width: min(1120px, 100%); margin: 0 auto; padding: 18px 16px 72px; }

/* ---------- header ---------- */
.topline { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; flex: 0 0 auto; color: var(--accent); }
.brand-copy { display: grid; gap: 1px; }
.brand-name { font-family: "Barlow Condensed", sans-serif; font-size: 24px; font-weight: 800; line-height: 1; letter-spacing: -.01em; }
.brand-tagline { color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.2; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.session-note { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.unit-switch { display: inline-flex; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; }
.unit-switch button { border: 0; background: transparent; min-width: 52px; min-height: 38px; border-radius: 6px; font-weight: 800; cursor: pointer; }
.unit-switch button.active { background: var(--text); color: var(--bg); }

/* ---------- site nav ---------- */
.site-nav { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); margin-bottom: 30px; }
.site-nav a { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 56px; border-right: 1px solid var(--line); color: var(--muted); font-weight: 700; font-size: 14px; text-decoration: none; }
.site-nav a:last-child { border-right: 0; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -3px 0 var(--accent); }
.site-nav svg { width: 18px; height: 18px; flex: 0 0 auto; }

/* ---------- hero / type ---------- */
.hero { display: grid; grid-template-columns: minmax(0, .9fr) minmax(390px, 1.1fr); gap: 46px; align-items: start; }
.intro { padding: 26px 0 0; }
.eyebrow { margin: 0 0 10px; color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
h1, h2, h3 { font-family: "Barlow Condensed", sans-serif; margin: 0; line-height: .95; letter-spacing: -.02em; }
h1 { font-size: clamp(48px, 7vw, 78px); max-width: 620px; }
h2 { font-size: clamp(42px, 6vw, 64px); }
h3 { font-size: 26px; }
.lede { max-width: 540px; margin: 20px 0 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.quick-facts { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 28px; color: var(--muted); font-size: 13px; font-weight: 700; }
.quick-facts span { display: flex; align-items: center; gap: 7px; }
.quick-facts i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }

/* ---------- calculator ---------- */
.calculator { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.calc-inputs { padding: 24px; }
.field-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
.field { display: grid; gap: 8px; align-content: start; }
.field[hidden] { display: none; }
.field.full { grid-column: 1 / -1; }
.field label, .group-label { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.input-wrap { position: relative; }
input, select {
  width: 100%; min-height: 52px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); border-radius: 8px; padding: 0 13px; outline: none;
}
input { font-family: "Barlow Condensed", sans-serif; font-size: 26px; font-weight: 700; }
select { font-weight: 700; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
input:focus, select:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
.suffix { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; font-weight: 800; text-transform: uppercase; pointer-events: none; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; margin-bottom: 16px; }
.mode-switch button { min-height: 46px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.mode-switch button.active { background: var(--text); color: var(--bg); }
.bar-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.bar-preset, .collar-toggle { min-height: 46px; border: 1px solid var(--line-strong); border-radius: 7px; background: transparent; font-weight: 800; cursor: pointer; }
.bar-preset.active, .collar-toggle[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.plate-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.inventory-row { min-width: 0; min-height: 48px; display: grid; grid-template-columns: minmax(0, 1fr) 38px 32px 38px; align-items: center; gap: 3px; padding: 4px 4px 4px 9px; border: 1px solid var(--line); background: var(--bg); border-radius: 7px; }
.inventory-row strong { min-width: 0; white-space: normal; line-height: 1; font-family: "Barlow Condensed", sans-serif; font-size: 16px; }
.inventory-row span { text-align: center; font-family: "Barlow Condensed", sans-serif; font-size: 19px; font-weight: 800; }
.inventory-row button { width: 38px; height: 40px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 5px; font-size: 21px; font-weight: 800; cursor: pointer; }
.inventory-help { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.inventory-drawer { border-top: 1px solid var(--line); background: var(--surface); }
.inventory-drawer summary { min-height: 56px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-size: 13px; font-weight: 800; list-style: none; }
.inventory-drawer summary::-webkit-details-marker { display: none; }
.inventory-drawer summary::after { content: "+"; font-size: 24px; color: var(--accent); }
.inventory-drawer[open] summary::after { content: "−"; }
.inventory-body { padding: 0 24px 24px; }
.collar-toggle { width: 100%; }
.free-note { margin-top: 26px; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--text); font-size: 12px; font-weight: 800; }
.free-note i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.result { border-top: 1px solid var(--line); background: var(--surface-2); padding: 24px; min-height: 250px; }
.result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.result-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.status { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.big-number { font-family: "Barlow Condensed", sans-serif; font-size: clamp(48px, 8vw, 72px); font-weight: 800; line-height: .9; margin-top: 5px; }
.big-number small { font-size: .35em; color: var(--muted); letter-spacing: .02em; }
.copy-btn { min-height: 42px; border: 1px solid var(--line-strong); border-radius: 7px; padding: 0 13px; background: var(--surface); font-weight: 800; cursor: pointer; white-space: nowrap; }
.copy-btn svg { width: 16px; vertical-align: -3px; margin-right: 5px; }
.plate-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.plate-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font-family: "Barlow Condensed", sans-serif; font-size: 19px; font-weight: 700; }
.bar-visual { position: relative; height: 128px; margin-top: 18px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.bar-shaft { position: absolute; width: 100%; height: 9px; background: linear-gradient(#a9b0ad, #6f7773 44%, #c7cdca 50%, #656d69 58%, #939b97); box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.bar-sleeve { position: absolute; width: 58%; height: 17px; background: linear-gradient(#c2c8c5, #777f7b 50%, #b1b8b4); }
.plate-stack { z-index: 1; display: flex; align-items: center; gap: 3px; }
.plate-stack.full { width: 78%; justify-content: space-between; }
.plate-side { display: flex; align-items: center; gap: 3px; }
.plate-side.left { flex-direction: row-reverse; }
.visual-plate { position: relative; width: 24px; min-height: 58px; border-radius: 3px; border: 1px solid rgba(0,0,0,.24); box-shadow: inset 3px 0 rgba(255,255,255,.16), 2px 2px 5px rgba(0,0,0,.22); display: grid; place-items: center; color: #0d0f0f; font-family: "Barlow Condensed", sans-serif; font-size: 11px; font-weight: 800; writing-mode: vertical-rl; transform: rotate(180deg); }
.visual-plate b { background: rgba(255,255,255,.68); padding: 3px 1px; border-radius: 2px; }
.empty-state { color: var(--muted); line-height: 1.55; margin: 18px 0 0; }
.empty-state strong { color: var(--text); }
.error { color: var(--danger); font-weight: 700; }
.formula-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.formula { background: var(--surface); border: 1px solid var(--line); padding: 12px; }
.formula span { display: block; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.formula strong { display: block; margin-top: 4px; font-family: "Barlow Condensed", sans-serif; font-size: 25px; }
.data-card { margin-top: 22px; border: 1px solid var(--line); background: var(--surface); }
.data-card header { padding: 15px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.data-card header p { margin: 0; color: var(--muted); font-size: 12px; }
.percent-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.percent-item { padding: 14px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.percent-item:nth-child(4n) { border-right: 0; }
.percent-item:nth-last-child(-n+3) { border-bottom: 0; }
.percent-item span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.percent-item strong { font-family: "Barlow Condensed", sans-serif; font-size: 23px; }
.warm-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 20px; }
.warm-row { display: grid; grid-template-columns: 72px 90px 1fr 74px; gap: 12px; align-items: center; padding: 14px 16px; background: var(--surface); }
.warm-row.work { background: var(--accent); color: var(--accent-ink); }
.warm-row .set-no { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.warm-row.work .set-no { color: color-mix(in srgb, var(--accent-ink) 66%, transparent); }
.warm-weight { font-family: "Barlow Condensed", sans-serif; font-size: 26px; font-weight: 800; }
.breakdown { font-size: 13px; color: var(--muted); }
.warm-row.work .breakdown { color: color-mix(in srgb, var(--accent-ink) 72%, transparent); }
.reps { font-weight: 800; text-align: right; }
.subnote { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 12px 0 0; }

/* ---------- explainer sections under tools ---------- */
.tool-support { max-width: 780px; margin: 48px 0 0; }
.tool-support h2 { font-size: clamp(34px, 4.5vw, 50px); margin: 0 0 14px; }
.tool-support > p, .prose > p { color: var(--muted); line-height: 1.7; font-size: 16px; margin: 0 0 14px; }
.prose strong { color: var(--text); }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose ul { color: var(--muted); line-height: 1.7; }
.example { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 16px 20px; margin: 20px 0; }
.example p { margin: 8px 0; color: var(--muted); line-height: 1.65; font-size: 15px; }
.example strong { color: var(--text); }
.example .ex-title { font-weight: 800; color: var(--text); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.data-table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
.data-table th, .data-table td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.data-table th { background: var(--surface-2); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.data-table td { color: var(--muted); }
.data-table td strong { color: var(--text); }

/* ---------- guides / articles ---------- */
.breadcrumb { color: var(--muted); font-size: 12px; font-weight: 700; margin-bottom: 14px; letter-spacing: .02em; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb [aria-current] { color: var(--text); }
.article { max-width: 780px; }
.article h2 { font-size: clamp(34px, 4.5vw, 48px); margin: 44px 0 14px; }
.article h3 { font-size: 24px; margin: 30px 0 10px; }
.guide-meta { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin: 12px 0 0; }
.toc { background: var(--surface); border: 1px solid var(--line); padding: 18px 22px; margin: 24px 0; }
.toc strong { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.9; font-size: 14px; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--accent); }
.faq-item { border: 1px solid var(--line); background: var(--surface); margin-top: 10px; }
.faq-item summary { min-height: 54px; display: flex; align-items: center; cursor: pointer; padding: 12px 18px; font-weight: 700; list-style: none; font-size: 15px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; margin-left: auto; padding-left: 12px; color: var(--accent); font-size: 22px; flex: 0 0 auto; }
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-a { padding: 0 18px 18px; color: var(--muted); line-height: 1.65; font-size: 15px; }
.faq-item .faq-a p { margin: 0 0 10px; }
.faq-item .faq-a p:last-child { margin-bottom: 0; }
.related { margin-top: 48px; border-top: 1px solid var(--line); padding-top: 24px; }
.related h2 { font-size: 32px; margin-bottom: 4px; }

/* ---------- cards / buttons ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
.tool-card { background: var(--surface); border: 1px solid var(--line); padding: 22px; display: grid; gap: 10px; text-decoration: none; align-content: start; }
.tool-card:hover { border-color: var(--line-strong); }
.tool-card h3 { font-size: 24px; }
.tool-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.tool-card .go { color: var(--accent); font-weight: 800; font-size: 13px; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; background: var(--accent); color: var(--accent-ink); font-weight: 800; border-radius: 8px; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* ---------- footer ---------- */
.site-footer { margin-top: 60px; padding: 26px 0 6px; border-top: 1px solid var(--line); display: grid; gap: 16px; }
.footer-top { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: baseline; justify-content: space-between; }
.footer-brand strong { font-family: "Barlow Condensed", sans-serif; font-size: 22px; letter-spacing: -.01em; }
.footer-brand span { color: var(--muted); font-size: 12px; margin-left: 8px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; }
.footer-links a:hover { color: var(--text); }
.footer-base { color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .hero .calculator { order: -1; }
  .intro { padding-top: 4px; }
  .card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 590px) {
  .shell { padding: 12px 12px 48px; }
  .topline { margin-bottom: 12px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 22px; }
  .brand-tagline, .session-note { display: none; }
  .top-actions { gap: 0; }
  .site-nav { grid-template-columns: repeat(2, 1fr); margin-bottom: 24px; }
  .site-nav a { border-bottom: 1px solid var(--line); font-size: 13px; }
  .site-nav a:nth-child(2) { border-right: 0; }
  .site-nav a:nth-child(n+3) { border-bottom: 0; }
  .field-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .calc-inputs, .result { padding: 16px; }
  .plate-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bar-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bar-preset { padding: 0 4px; }
  .inventory-drawer summary { padding-inline: 16px; }
  .inventory-body { padding: 0 10px 16px; }
  .hero .intro { padding-inline: 4px; }
  .formula-row { grid-template-columns: 1fr; }
  .formula { display: flex; justify-content: space-between; align-items: center; }
  .formula strong { margin: 0; }
  .percent-grid { grid-template-columns: repeat(3, 1fr); }
  .percent-item:nth-child(4n) { border-right: 1px solid var(--line); }
  .percent-item:nth-child(3n) { border-right: 0; }
  .percent-item:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .percent-item:nth-last-child(-n+2) { border-bottom: 0; }
  .warm-row { grid-template-columns: 56px 1fr 50px; gap: 8px; }
  .warm-row .breakdown { grid-column: 2 / -1; }
  .result-head { align-items: center; }
  .result-actions { flex-direction: column; }
  .copy-btn span { display: none; }
  .copy-btn svg { margin: 0; }
  h1 { font-size: 50px; }
  .footer-top { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
