/* LoadRack — Archetype B Gunmetal Instrument & IWF 7-Color Plate Rack
 * Canvas: #0F1012 · Surface: #16181C · Elevated: #1F232A · Signal Yellow: #F5C400 · Safety Orange: #FF4D00
 * WCAG AA >= 5.0:1 · Tabular Numerals · 44px Touch Targets · Zero CLS
 */
:root {
  --bg-canvas: #0F1012;
  --bg-rack: #16181C;
  --bg-surface: #1B1E24;
  --bg-elevated: #252932;
  --border-subtle: rgba(236, 238, 242, 0.12);
  --border-control: rgba(236, 238, 242, 0.24);
  --text-primary: #F5F6F8;
  --text-secondary: #C0C5D0;
  --text-muted: #949BA8;
  --brand: #FF6B2B;
  --brand-fill: #D93800;
  --brand-hover: #B82F00;
  --brand-soft: rgba(255, 77, 0, 0.14);
  --steel: #60A5FA;
  --pr-gold: #F5C400;
  --pr-gold-ink: #141205;
  --success: #34D399;
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 4px;
  --radius-pill: 2px;
  --container-max: 1140px;
  --font-display: "Bricolage Grotesque", "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: "Figtree", "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}
::selection { background: rgba(245, 196, 0, 0.30); color: var(--text-primary); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg-canvas); color: var(--text-primary); }
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--steel); text-decoration: none; text-underline-offset: 0.2em; transition: color 0.16s var(--ease-out), background-color 0.16s var(--ease-out), border-color 0.16s var(--ease-out); }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--pr-gold); outline-offset: 2px; border-radius: 2px; }
.tabular { font-variant-numeric: tabular-nums; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--pr-gold); color: var(--pr-gold-ink); font-weight: 800; padding: 10px 18px; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { left: 16px; top: 12px; text-decoration: none; }

.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }
.container--prose { max-width: 820px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }

/* IWF 5-Color Calibration Bar */
.iwf-stripe {
  height: 4px;
  width: 100%;
  background: linear-gradient(
    90deg,
    #D92638 0% 20%,
    #1D63DC 20% 40%,
    #EAB308 40% 60%,
    #15803D 60% 80%,
    #ECEEF2 80% 100%
  );
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(15, 16, 18, 0.94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1.5px solid var(--border-subtle);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 66px; padding: 10px 0; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text-primary); font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand__icon { width: 34px; height: 34px; border-radius: 6px; }
.nav-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-links a { color: var(--text-secondary); font-size: 0.92rem; font-weight: 600; padding: 7px 12px; border-radius: var(--radius-sm); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text-primary); background: var(--bg-elevated); text-decoration: none; }
.lang-switch { display: inline-flex; align-items: center; gap: 2px; background: var(--bg-rack); border: 1.5px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 3px; margin-left: 6px; }
.lang-switch span, .lang-switch a { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; padding: 4px 10px; border-radius: 2px; color: var(--text-secondary); }
.lang-switch .is-active { background: var(--pr-gold); color: var(--pr-gold-ink); }
.lang-switch a:hover { color: var(--text-primary); background: rgba(255,255,255,0.08); text-decoration: none; }

/* Breadcrumb */
.breadcrumb { padding: 20px 0 8px; font-size: 0.86rem; color: var(--text-muted); }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--border-control); }
.breadcrumb a { color: var(--text-secondary); font-weight: 600; }

/* Hero */
.hero { padding: 38px 0 46px; }
.hero__intro { max-width: 78ch; margin-bottom: 26px; }
h1, h2, h3 { font-family: var(--font-display); color: var(--text-primary); letter-spacing: -0.025em; line-height: 1.15; margin-top: 0; text-wrap: balance; }
h1 { font-size: clamp(2.05rem, 4.1vw, 3.1rem); font-weight: 800; margin-bottom: 14px; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.95rem); font-weight: 800; margin-bottom: 12px; }
h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: 8px; }
.lead { font-size: clamp(1rem, 1.32vw, 1.1rem); color: var(--text-secondary); max-width: 68ch; margin: 0 0 18px; text-wrap: pretty; }
.status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; border: 1.5px solid var(--border-subtle); background: var(--bg-surface); color: var(--text-primary); letter-spacing: 0.01em; }
.badge--red { background: var(--brand-soft); color: var(--brand); border-color: rgba(255, 107, 43, 0.38); }
.badge--gold { background: rgba(245, 196, 0, 0.14); color: var(--pr-gold); border-color: rgba(245, 196, 0, 0.38); }

/* Interactive Barbell Plate, Warm-Up Ramp & 1RM Rack Tool */
.calc-grid { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
@media (min-width: 960px) { .calc-grid { grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.9fr); } }

.rack-card, .rm-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-control);
  border-radius: var(--radius-md);
  padding: 20px;
}
.rack-topbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.seg-group { display: inline-flex; background: var(--bg-rack); border: 1.5px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 3px; gap: 3px; }
.seg-btn {
  min-height: 40px; padding: 6px 14px; border-radius: 2px;
  border: none; background: transparent; color: var(--text-secondary);
  font-family: var(--font-mono); font-size: 0.84rem; font-weight: 700; cursor: pointer;
}
.seg-btn.is-active { background: var(--pr-gold); color: var(--pr-gold-ink); }
.seg-btn--bar.is-active { background: var(--bg-elevated); color: var(--text-primary); box-shadow: inset 0 0 0 1.5px var(--border-control); }

.weight-control {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--bg-rack); border: 1.5px solid var(--border-subtle); border-radius: var(--radius-sm);
  padding: 14px; margin-bottom: 16px;
}
.weight-stepper { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.step-btn {
  min-width: 52px; min-height: 44px; padding: 0 10px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-control); background: var(--bg-elevated); color: var(--text-primary);
  font-family: var(--font-mono); font-size: 0.86rem; font-weight: 700; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.step-btn:hover { border-color: var(--pr-gold); color: var(--pr-gold); }
.step-btn--major { background: var(--bg-surface); color: var(--text-secondary); }
.weight-input-wrap { display: inline-flex; align-items: baseline; gap: 6px; margin: 0 4px; }
.weight-input {
  width: 108px; min-height: 44px; padding: 6px 8px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-control); background: var(--bg-canvas); color: var(--text-primary);
  font-family: var(--font-mono); font-size: 1.55rem; font-weight: 700; text-align: center;
  font-variant-numeric: tabular-nums;
}
.weight-unit { font-family: var(--font-mono); font-weight: 700; color: var(--pr-gold); font-size: 0.96rem; }
.preset-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.preset-btn {
  min-height: 36px; padding: 4px 12px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-subtle); background: var(--bg-surface); color: var(--text-secondary);
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums;
}
.preset-btn:hover { color: var(--text-primary); border-color: var(--pr-gold); }

.barbell-well {
  background: var(--bg-rack);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  margin-bottom: 14px;
  overflow: hidden;
}
.barbell-svg { width: 100%; height: auto; display: block; }

.breakdown-bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 14px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  font-family: var(--font-mono); font-size: 0.86rem; margin-bottom: 14px;
}
.breakdown-bar strong { color: var(--pr-gold); }
.snap-note {
  display: none; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 14px;
  background: rgba(245, 196, 0, 0.12); border: 1.5px solid rgba(245, 196, 0, 0.38);
  color: var(--pr-gold); font-size: 0.86rem; font-weight: 600;
}
.snap-note.is-visible { display: flex; }
.snap-btn {
  min-height: 36px; padding: 4px 12px; border-radius: var(--radius-sm);
  border: none; background: var(--pr-gold); color: var(--pr-gold-ink); font-family: var(--font-mono); font-weight: 700; font-size: 0.8rem; cursor: pointer;
}

.plate-palette-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 0.84rem; color: var(--text-secondary); }
.plate-chips { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
@media (max-width: 560px) { .plate-chips { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.plate-chip {
  min-height: 52px; border-radius: 3px; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.94rem;
  font-variant-numeric: tabular-nums;
  transition: transform 0.14s var(--ease-out);
}
.plate-chip:active { transform: scale(0.95); }
.plate-chip small { font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700; opacity: 0.88; }
.rack-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rack-action-btn {
  min-height: 44px; padding: 6px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-control); background: var(--bg-rack); color: var(--text-primary);
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 700; cursor: pointer;
}
.rack-action-btn:hover { border-color: var(--brand); color: var(--brand); }

/* Right Panel: Warm-Up Ramp & Epley 1RM */
.panel-tabs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px;
  background: var(--bg-rack); border: 1.5px solid var(--border-subtle); border-radius: var(--radius-sm);
  padding: 3px; margin-bottom: 16px;
}
.panel-tab {
  min-height: 44px; padding: 6px 10px; border: none; border-radius: 2px;
  background: transparent; color: var(--text-secondary);
  font-family: var(--font-mono); font-size: 0.84rem; font-weight: 700; cursor: pointer;
}
.panel-tab.is-active { background: var(--pr-gold); color: var(--pr-gold-ink); }
.panel-pane[hidden] { display: none; }

.ramp-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--bg-rack); border: 1.5px solid var(--border-subtle); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 12px;
}
.ramp-head__label { font-size: 0.82rem; color: var(--text-secondary); font-weight: 600; }
.ramp-head__val { font-family: var(--font-mono); font-size: 1.15rem; font-weight: 700; color: var(--pr-gold); }
.ramp-list { display: flex; flex-direction: column; gap: 8px; }
.ramp-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--bg-rack); border: 1.5px solid var(--border-subtle);
}
.ramp-row.is-loaded { border-color: var(--pr-gold); }
.ramp-stage {
  font-family: var(--font-mono); font-size: 0.76rem; font-weight: 700;
  padding: 3px 7px; border-radius: 2px; background: var(--bg-elevated); color: var(--pr-gold);
  min-width: 52px; text-align: center;
}
.ramp-detail { min-width: 0; }
.ramp-weight { font-family: var(--font-mono); font-size: 0.94rem; font-weight: 700; color: var(--text-primary); }
.ramp-plates { font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-secondary); margin-top: 2px; }
.ramp-note { margin: 12px 0 0; font-size: 0.82rem; color: var(--text-muted); }

.rm-hero {
  background: var(--bg-rack); border: 1.5px solid var(--border-subtle); border-radius: var(--radius-sm);
  padding: 14px 16px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
}
.rm-hero__label { font-size: 0.84rem; font-weight: 700; color: var(--text-secondary); }
.rm-hero__val { font-family: var(--font-mono); font-size: 1.85rem; font-weight: 700; color: var(--pr-gold); }
.rm-controls-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 0.84rem; color: var(--text-secondary); font-weight: 600; }
.db-toggle {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 10px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--border-control);
  background: var(--bg-rack); color: var(--text-secondary);
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; cursor: pointer;
}
.db-toggle.is-active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.reps-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 16px; }
.rep-btn {
  min-width: 44px; min-height: 44px; padding: 4px 10px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-subtle); background: var(--bg-rack); color: var(--text-secondary);
  font-family: var(--font-mono); font-weight: 700; font-size: 0.84rem; cursor: pointer; font-variant-numeric: tabular-nums;
}
.rep-btn.is-active { background: var(--steel); color: #0B1220; border-color: var(--steel); }
.rm-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.rm-table th, .rm-table td { padding: 9px 8px; border-bottom: 1px solid var(--border-subtle); text-align: left; }
.rm-table tbody tr:last-child td { border-bottom: none; }
.rm-load-btn {
  min-height: 36px; padding: 4px 10px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-control); background: var(--bg-elevated); color: var(--text-primary);
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.rm-load-btn:hover { border-color: var(--pr-gold); color: var(--pr-gold); }

/* GEO Direct-Answer Summary Box */
.geo-summary {
  margin-top: 22px;
  background: var(--bg-rack);
  border: 1.5px solid var(--border-control);
  border-left: 4px solid var(--pr-gold);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  color: var(--text-secondary);
  font-size: 0.94rem;
}
.geo-summary strong { color: var(--text-primary); }

/* Bridge CTA */
.bridge-cta {
  margin-top: 18px;
  padding: 16px 20px;
  background: var(--brand-soft);
  border: 1.5px solid rgba(255, 107, 43, 0.36);
  border-radius: var(--radius-sm);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px;
  font-size: 0.94rem; color: var(--text-primary);
}
.bridge-cta p { margin: 0; max-width: 68ch; }

/* Buttons & Sections */
.btn-group { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border-radius: var(--radius-sm); font-size: 0.94rem; font-weight: 700; border: 1.5px solid transparent; cursor: pointer; }
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--brand-fill); color: #FFFFFF; }
.btn--primary:hover { background: var(--brand-hover); color: #FFFFFF; }
.btn--secondary { background: var(--bg-surface); color: var(--text-primary); border-color: var(--border-control); }
.btn--secondary:hover { background: var(--bg-elevated); border-color: var(--pr-gold); }

.section { padding: 50px 0; border-top: 1.5px solid var(--border-subtle); }
.section--tight { padding: 32px 0; border-top: none; }
.feature-ledger { display: grid; grid-template-columns: 1fr; gap: 26px; margin-top: 24px; }
@media (min-width: 760px) { .feature-ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 36px; } }
.feature-row { padding-top: 16px; border-top: 1.5px solid var(--border-control); }
.feature-row p { margin: 0; color: var(--text-secondary); font-size: 0.95rem; }

.lang-pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.lang-pill {
  padding: 5px 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-control); background: var(--bg-rack);
  color: var(--text-primary); font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700;
}

.callout { background: var(--bg-surface); border: 1.5px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 18px 20px; margin: 18px 0; color: var(--text-secondary); font-size: 0.94rem; }
.callout strong { color: var(--text-primary); }
.callout--red { background: var(--brand-soft); border-color: rgba(255, 107, 43, 0.36); }
.meta-line { display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: 0.86rem; color: var(--text-muted); margin-bottom: 20px; }
.prose h2 { margin-top: 32px; font-size: 1.3rem; }
.prose p, .prose li { color: var(--text-secondary); max-width: 68ch; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }
code { font-family: var(--font-mono); font-size: 0.86em; background: var(--bg-elevated); padding: 2px 6px; border-radius: 2px; color: var(--text-primary); }

.faq-list { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.faq-item { background: var(--bg-surface); border: 1.5px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 18px 20px; }
.faq-item h3 { margin-bottom: 8px; }
.faq-item p { margin: 0; color: var(--text-secondary); font-size: 0.94rem; }

/* Footer */
.site-footer { margin-top: auto; background: #090A0C; color: var(--text-secondary); padding: 42px 0 30px; font-size: 0.9rem; border-top: 1.5px solid var(--border-subtle); }
.site-footer__grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 40px; }
.site-footer__brand { font-family: var(--font-display); font-weight: 800; color: var(--text-primary); font-size: 1.08rem; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; }
.site-footer a { color: var(--steel); font-weight: 600; }
.site-footer__copy { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border-subtle); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 0.84rem; color: var(--text-muted); }

/* 6-Language Switcher 390px Responsive Overrides */
body { overflow-x: clip; }
.lang-switch { flex-wrap: wrap; max-width: 100%; }
.lang-switch a, .lang-switch span { font-size: 0.74rem; padding: 4px 8px; white-space: nowrap; line-height: 1.2; }
.lang-switch [aria-current="page"] { background: var(--pr-gold); color: var(--pr-gold-ink); }
@media (max-width: 640px) {
  .lang-switch { margin-left: 0; padding: 2px; gap: 1px; }
  .lang-switch a, .lang-switch span { font-size: 0.7rem; padding: 4px 6px; }
}
