/* ==========================================================================
   BARBELLPLATECALCULATOR.COM - MODERN ATHLETIC DESIGN SYSTEM
   ========================================================================== */

:root {
  /* Color Palette - Light Mode Default */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-input: #ffffff;
  
  --border: #e2e8f0;
  --border-subtle: #cbd5e1;
  --border-focus: #2563eb;
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;
  --accent-border: #bfdbfe;
  
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  
  /* Olympic Plate Standard Colors */
  --plate-red: #dc2626;     /* 55 lb / 25 kg */
  --plate-blue: #2563eb;    /* 45 lb / 20 kg */
  --plate-yellow: #ca8a04;  /* 35 lb / 15 kg */
  --plate-green: #16a34a;   /* 25 lb / 10 kg */
  --plate-white: #e2e8f0;   /* 15 lb / 5 kg */
  --plate-white-text: #0f172a;
  --plate-black: #1e293b;   /* 10 lb / 2.5 kg */
  --plate-grey: #64748b;    /* 5 lb / 1.25 kg */
  --plate-lightgrey: #94a3b8; /* 2.5 lb / 0.5 kg */
  --plate-fractional: #475569;
  
  /* Bar Metal Gradient */
  --bar-shaft: #94a3b8;
  --bar-sleeve: #cbd5e1;
  --bar-collar: #64748b;
  
  /* Shadows & Radius */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --max-w: 1140px;
  --nav-height: 64px;
}

[data-theme="dark"] {
  --bg-body: #0b0f17;
  --bg-surface: #111827;
  --bg-card: #151f30;
  --bg-subtle: #1e293b;
  --bg-input: #1a2333;
  
  --border: #243247;
  --border-subtle: #334155;
  --border-focus: #60a5fa;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;
  
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-light: rgba(59, 130, 246, 0.15);
  --accent-border: #1e3a8a;
  
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  
  --plate-white: #f1f5f9;
  --plate-white-text: #0f172a;
  --plate-black: #0f172a;
  
  --bar-shaft: #64748b;
  --bar-sleeve: #475569;
  --bar-collar: #334155;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.4);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.5;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-body);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* GLOBAL HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
  text-decoration: none;
}
.brand-logo:hover {
  text-decoration: none;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--accent);
  color: #ffffff;
  border-radius: var(--radius-sm);
}

.main-nav {
  display: none;
}
@media (min-width: 992px) {
  .main-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
  }
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.375rem 0;
  text-decoration: none;
  position: relative;
}
.nav-link:hover, .nav-link.active {
  color: var(--accent);
  text-decoration: none;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -19px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.theme-toggle-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
}
@media (min-width: 992px) {
  .mobile-menu-toggle {
    display: none;
  }
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-surface);
  padding: 1.5rem;
  overflow-y: auto;
  z-index: 40;
  border-top: 1px solid var(--border);
}
.mobile-drawer.open {
  display: block;
}
.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.mobile-nav-link {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.mobile-nav-link:hover, .mobile-nav-link.active {
  color: var(--accent);
}

/* BREADCRUMBS */
.breadcrumbs {
  padding: 1rem 0 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.breadcrumbs ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  list-style: none;
  gap: 0.5rem;
}
.breadcrumbs li::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--border-subtle);
}
.breadcrumbs li:last-child::after {
  content: "";
}
.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}
.breadcrumbs a:hover {
  color: var(--accent);
}
.breadcrumbs [aria-current="page"] {
  color: var(--text-primary);
  font-weight: 500;
}

/* HERO */
.page-hero {
  padding: 1.5rem 0 2rem;
  text-align: center;
}
.page-hero.hero-compact {
  padding-bottom: 1.25rem;
}
.page-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}
@media (min-width: 640px) {
  .page-title {
    font-size: 2.5rem;
  }
}
.page-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/* CALCULATOR CARD */
.calc-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  margin-bottom: 3rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
@media (min-width: 768px) {
  .calc-card {
    padding: 2.25rem;
  }
}

.mode-selector {
  display: flex;
  background-color: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 1.75rem;
  border: 1px solid var(--border);
}
.mode-btn {
  flex: 1;
  padding: 0.625rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.mode-btn.active {
  background-color: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}
@media (min-width: 640px) {
  .calc-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .calc-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .calc-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.form-hint {
  font-size: 0.75rem;
  font-weight: normal;
  color: var(--text-muted);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.form-input, .form-select {
  width: 100%;
  height: 48px;
  padding: 0.5rem 1rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-input:focus, .form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.input-unit {
  position: absolute;
  right: 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
}

.segmented-control {
  display: inline-flex;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 3px;
}
.segmented-btn {
  padding: 0.5rem 1.25rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}
.segmented-btn.active {
  background-color: var(--accent);
  color: #ffffff;
}

.inventory-section {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.75rem;
}
.inventory-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.plate-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.plate-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}
.plate-checkbox-label:has(input:checked) {
  border-color: var(--accent);
  background-color: var(--accent-light);
  color: var(--accent);
}
.plate-checkbox-label input {
  accent-color: var(--accent);
}

/* RESULTS PANEL */
.results-panel {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.75rem;
}
.results-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
@media (min-width: 640px) {
  .results-header {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    text-align: left;
  }
}

.total-weight-display {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.total-weight-unit {
  font-size: 1.25rem;
  color: var(--text-muted);
  font-weight: 600;
}
.per-side-summary {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.per-side-summary strong {
  color: var(--accent);
  font-weight: 700;
}

.plate-breakdown-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  margin: 1rem 0 1.5rem;
}
.plate-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 700;
  color: #ffffff;
  box-shadow: var(--shadow-sm);
  letter-spacing: -0.01em;
}
.plate-badge.p-red { background-color: var(--plate-red); }
.plate-badge.p-blue { background-color: var(--plate-blue); }
.plate-badge.p-yellow { background-color: var(--plate-yellow); color: #000; }
.plate-badge.p-green { background-color: var(--plate-green); }
.plate-badge.p-white { background-color: var(--plate-white); color: var(--plate-white-text); border: 1px solid var(--border); }
.plate-badge.p-black { background-color: var(--plate-black); border: 1px solid var(--border-subtle); }
.plate-badge.p-grey { background-color: var(--plate-grey); }
.plate-badge.p-lightgrey { background-color: var(--plate-lightgrey); }

.barbell-visual-wrap {
  width: 100%;
  overflow-x: auto;
  padding: 1.5rem 0;
  margin: 1rem 0;
  display: flex;
  justify-content: center;
}
.barbell-svg {
  width: 100%;
  max-width: 680px;
  height: auto;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.plate-adder-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  justify-content: center;
  margin: 1.25rem 0;
}
.plate-adder-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid transparent;
  font-weight: 800;
  font-size: 0.875rem;
  cursor: pointer;
  color: #ffffff;
  box-shadow: var(--shadow-md);
  transition: transform 0.1s ease, filter 0.15s ease;
}
.plate-adder-btn:active {
  transform: scale(0.93);
}
.plate-adder-btn:hover {
  filter: brightness(1.1);
}

.calc-action-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  text-decoration: none;
}
.btn-secondary {
  background-color: var(--bg-card);
  border-color: var(--border);
  color: var(--text-secondary);
}
.btn-secondary:hover {
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  text-decoration: none;
}
.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
}
.btn-primary:hover {
  background-color: var(--accent-hover);
  color: #ffffff;
  text-decoration: none;
}
.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.alert-box {
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.alert-warning {
  background-color: var(--warning-bg);
  border: 1px solid var(--warning);
  color: var(--warning);
}
.alert-info {
  background-color: var(--accent-light);
  border: 1px solid var(--accent-border);
  color: var(--accent);
}

/* EDITORIAL CONTENT SECTIONS */
.content-section {
  max-width: 860px;
  margin: 0 auto 3.5rem;
}
.article-header {
  margin-bottom: 2rem;
}
.article-h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 2rem 0 1rem;
}
.article-h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.5rem 0 0.75rem;
}
.article-p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.article-ul, .article-ol {
  margin: 0 0 1.5rem 1.5rem;
  color: var(--text-secondary);
  font-size: 1.025rem;
  line-height: 1.7;
}
.article-li {
  margin-bottom: 0.5rem;
}

.callout {
  background-color: var(--bg-subtle);
  border-left: 4px solid var(--accent);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.75rem 0;
}
.callout-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
  font-size: 1rem;
}
.callout-p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 1.75rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9375rem;
  background-color: var(--bg-card);
}
.data-table th {
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  font-weight: 700;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.data-table tr:last-child td {
  border-bottom: none;
}
.data-table tr:hover td {
  background-color: var(--bg-subtle);
}

/* FAQ ACCORDION */
.faq-section {
  max-width: 860px;
  margin: 0 auto 3.5rem;
}
.faq-item {
  border: 1px solid var(--border);
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  transition: border-color 0.15s ease;
}
.faq-item[open] {
  border-color: var(--accent-border);
}
.faq-summary {
  padding: 1.125rem 1.25rem;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq-summary::-webkit-details-marker {
  display: none;
}
.faq-chevron {
  width: 18px;
  height: 18px;
  stroke: var(--text-muted);
  transition: transform 0.2s ease;
}
.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  stroke: var(--accent);
}
.faq-content {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.975rem;
  line-height: 1.65;
}
.faq-content p:last-child {
  margin-bottom: 0;
}

/* RELATED TOOLS GRID */
.related-tools-section {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.5rem;
  margin: 3rem auto;
  max-width: 1040px;
}
.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 1.75rem;
  letter-spacing: -0.01em;
}
.tools-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.15rem;
  margin: 0 auto;
}
.tool-card {
  flex: 1 1 270px;
  max-width: 320px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.tool-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background-color: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.tool-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}
.tool-card-desc {
  font-size: 0.8375rem;
  color: var(--text-secondary);
  line-height: 1.45;
  flex-grow: 1;
}
.tool-card-action {
  margin-top: 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* AUTHOR BOX */
.author-box {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2.5rem 0;
}
@media (min-width: 640px) {
  .author-box {
    flex-direction: row;
    align-items: center;
  }
}
.author-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background-color: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid var(--accent);
}
.author-meta {
  flex-grow: 1;
}
.author-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.author-role {
  font-size: 0.8125rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.author-bio {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* GLOBAL FOOTER */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 2rem;
  margin-top: auto;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}
.footer-brand-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-desc {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  max-width: 380px;
}
.footer-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--text-primary);
  font-weight: 500;
}
.footer-col-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-link:hover {
  color: var(--accent);
  text-decoration: underline;
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
}
@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* PWA INSTALL BANNER */
.pwa-banner {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.pwa-banner.show {
  display: flex;
}
.pwa-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.pwa-icon {
  width: 36px;
  height: 36px;
  background-color: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pwa-text strong {
  display: block;
  font-size: 0.9375rem;
  color: var(--text-primary);
}
.pwa-text span {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.pwa-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
/* ==========================================================================
   COMPACT UPPER-FOLD CALCULATOR REDESIGN
   ========================================================================== */
.pwa-banner {
  display: none !important;
}

.page-hero-ultra-compact {
  padding: 0.75rem 0 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.page-hero-ultra-compact .page-title {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
  text-align: center;
}
.page-hero-ultra-compact .page-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.45;
  display: block;
}

.calc-card-compact {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.25rem 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 768px) {
  .calc-card-compact {
    padding: 1.5rem 2rem;
  }
}

/* Visual Stage at Top of Card */
.visual-stage {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1rem 1.25rem;
  margin-bottom: 1.25rem;
  text-align: center;
  position: relative;
}

.stage-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stage-weight-headline {
  font-size: 2.75rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.03em;
}
.stage-weight-headline small {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

.stage-per-side-pill {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  font-weight: 600;
}
.stage-per-side-pill strong {
  color: var(--accent);
}

/* Compact SVG Barbell */
.barbell-stage-svg-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem 0 0.25rem;
}
.barbell-stage-svg-wrap svg {
  max-height: 150px;
  width: 100%;
  max-width: 650px;
}

/* Quick Control Toolbar */
.quick-controls-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.control-group-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.control-label-micro {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pill-btn-group {
  display: inline-flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.pill-btn {
  padding: 0.35rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pill-btn.active {
  background: var(--accent);
  color: #ffffff;
}

/* Mode-Specific Interactive Area */
.interactive-input-stage {
  margin-bottom: 1rem;
}

/* Target Input Box with Steppers */
.target-stepper-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.75rem auto 1rem;
  max-width: 440px;
}
.stepper-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.stepper-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--accent);
  color: var(--accent);
}
.target-main-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}
.target-main-input {
  width: 100%;
  height: 48px;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 2.5rem 0 1rem;
  outline: none;
  transition: border-color 0.15s ease;
}
.target-main-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.target-main-unit {
  position: absolute;
  right: 1rem;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-muted);
  pointer-events: none;
}

/* Competitor-style circular plate buttons with count badge */
.circular-plate-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  margin: 0.75rem 0;
}
.circle-plate-btn {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 2px solid transparent;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.875rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  transition: transform 0.1s ease, filter 0.15s ease;
  user-select: none;
}
.circle-plate-btn:active {
  transform: scale(0.92);
}
.circle-plate-btn:hover {
  filter: brightness(1.1);
}
.circle-plate-btn small {
  font-size: 0.65rem;
  font-weight: normal;
}
.plate-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ffffff;
  color: #0f172a;
  border: 2px solid #0f172a;
  font-size: 0.75rem;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

/* Compact Settings Accordion */
.compact-settings-details {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  margin-top: 0.75rem;
}
.compact-settings-summary {
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.compact-settings-content {
  padding: 0 1rem 0.875rem;
}

/* PRINT STYLESHEET FOR CHEAT SHEET & TABLES */
@media print {
  /* Hide unnecessary layout elements during print */
  .site-header,
  .mobile-drawer,
  .breadcrumbs,
  .page-hero,
  .calc-card:has(#chartFilterInput),
  .content-section,
  .faq-section,
  .related-tools-section,
  .site-footer,
  .theme-toggle-btn,
  .mobile-menu-toggle,
  button,
  .btn,
  input {
    display: none !important;
  }

  body, main, .container, .calc-card {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .calc-card h2 {
    font-size: 1.25rem !important;
    color: #000000 !important;
    margin-bottom: 0.75rem !important;
    text-align: center !important;
  }

  .table-responsive {
    overflow: visible !important;
    border: 1px solid #000000 !important;
    border-radius: 0 !important;
  }

  .data-table {
    width: 100% !important;
    font-size: 10.5pt !important;
    border-collapse: collapse !important;
    background: #ffffff !important;
  }

  .data-table th,
  .data-table td {
    padding: 6px 10px !important;
    border: 1px solid #94a3b8 !important;
    color: #000000 !important;
    background: #ffffff !important;
  }

  .data-table th {
    background-color: #f1f5f9 !important;
    font-weight: bold !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  tr {
    page-break-inside: avoid !important;
  }
}
