/* Vintage Bike Pedal Puller - Production Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #2e5d5f;
  --secondary: #3a7ca5;
  --accent: #e76f51;
  --light: #f8f9fa;
  --dark: #2d3748;
  --success: #2a9d8f;
  --warning: #e76f51;
  --text: #333;
  --text-muted: #666;
  --border: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--light);
  font-size: 16px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: white;
  padding: 1.5rem 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header h1 {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.site-header .tagline {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.main-nav a:hover, .main-nav a:focus {
  border-bottom-color: rgba(255,255,255,0.3);
}

.hero-section {
  background: linear-gradient(120deg, #e3f2fd, #e8f4f8);
  padding: 2rem 0;
  text-align: center;
}

.hero-section h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.preset-selector, .tool-selector {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0;
  align-items: center;
}

.preset-selector label, .tool-selector label {
  font-weight: 500;
  color: var(--text);
}

select, input {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  background: white;
  min-width: 200px;
}

select:focus, input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(42, 124, 185, 0.2);
}

.torque-result {
  margin: 2rem 0;
}

.torque-value {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.torque-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.unit-toggle {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.unit-toggle button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  background: white;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
}

.unit-toggle button[aria-pressed="true"] {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.help-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 1rem;
}

.tools-section, .steps-section, .reference-section, .faq-section {
  padding: 2rem 0;
}

.tools-section h2, .steps-section h2, .reference-section h2, .faq-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--dark);
}

.tool-recommendation {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
  display: flex;
  gap: 1rem;
  align-items: center;
}

.tool-card {
  display: flex;
  gap: 1rem;
  align-items: center;
  width: 100%;
}

.tool-icon {
  font-size: 2rem;
}

.tool-info h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.tool-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.tool-item {
  background: white;
  padding: 1rem;
  border-radius: 6px;
  border-left: 4px solid var(--secondary);
}

.step-tracker {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding: 1rem 0;
}

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.step-indicator .step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
}

.step-indicator[aria-current="true"] .step-num {
  background: var(--primary);
  color: white;
}

.step-gallery {
  display: grid;
  gap: 2rem;
}

.step-card {
  display: none;
}

.step-card.active {
  display: block;
}

.step-image {
  margin-bottom: 1rem;
}

.step-svg {
  width: 100%;
  height: 200px;
  background: white;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.step-content h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.mistake-callout {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 6px;
  padding: 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.mistake-callout strong {
  color: #856404;
}

.reference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.ref-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.ref-card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.torque-table, .thread-diagram, .arrow-diagram {
  width: 100%;
  margin-top: 1rem;
}

.torque-table, .thread-diagram {
  border-collapse: collapse;
  width: 100%;
}

.torque-table th, .torque-table td {
  border: 1px solid var(--border);
  padding: 0.75rem;
  text-align: center;
}

.torque-table th {
  background: var(--light);
  color: var(--dark);
}

.print-actions {
  margin-top: 2rem;
  text-align: center;
  gap: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-secondary:hover, .btn-secondary:focus {
  background: var(--primary);
  color: white;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.faq-item {
  background: white;
  padding: 1.25rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.faq-item h3 {
  color: var(--primary);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.faq-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.shop-support {
  background: var(--light);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 8px;
  border: 1px dashed var(--border);
  text-align: center;
}

.affiliate-btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}

.affiliate-btn:hover, .affiliate-btn:focus {
  background: #c65c3f;
}

.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.8);
  padding: 1.5rem 0;
  margin-top: 2rem;
}

.site-footer a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.disclaimer {
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 2rem;
  font-size: 0.85rem;
}

.disclaimer p {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .site-header h1 { font-size: 1.5rem; }
  .main-nav { gap: 1rem; }
  .torque-value { font-size: 2.5rem; }
  .step-tracker { flex-wrap: wrap; }
  .disclaimer { font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .tool-card { flex-direction: column; text-align: center; }
  .reference-grid { grid-template-columns: 1fr; }
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
