/* Yarn Dye Lot Tracker - Styles */
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; line-height: 1.6; color: #333; background: #fff; }
a { color: #2a5298; text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.site-header { background: #f8f8f8; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 100; }
.main-nav { display: flex; gap: 1.5rem; }
.main-nav a { font-weight: 500; }
.hero-section { background: linear-gradient(135deg, #2a5298 0%, #5d8aa8 100%); color: white; padding: 2rem 0; text-align: center; }
.site-tagline { font-size: 1.8rem; margin: 0 0 0.5rem; }
.preset-buttons { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1rem; }
.preset-btn { background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.3); color: white; padding: 0.5rem 1rem; border-radius: 20px; cursor: pointer; transition: all 0.2s; }
.preset-btn:hover { background: rgba(255,255,255,0.3); }
.preset-btn.active { background: white; color: #2a5298; }
.matcher-section, .gradient-section, .substitution-section, .content-section { padding: 2rem 0; }
h2 { color: #2a5298; margin-top: 0; }
h3 { color: #333; margin-bottom: 0.5rem; }
.input-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.input-group { display: flex; flex-direction: column; }
.input-group label { font-size: 0.85rem; font-weight: 500; margin-bottom: 0.25rem; }
.input-group input, .input-group select { padding: 0.5rem; border: 1px solid #ccc; border-radius: 4px; font-size: 1rem; }
.input-group input:focus, .input-group select:focus { outline: 2px solid #2a5298; border-color: #2a5298; }
.match-results { background: #f9f9f9; padding: 1rem; border-radius: 8px; margin-top: 1rem; }
.matches-list { list-style: none; padding: 0; margin: 0; }
.match-item { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid #eee; }
.match-item:last-child { border-bottom: none; }
.match-name { font-weight: 500; }
.match-score { color: #666; font-size: 0.9rem; }
.section-intro { color: #666; margin-bottom: 1rem; font-size: 1.05rem; }
.gradient-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.gradient-preview { background: #f0f8ff; padding: 1rem; border-radius: 8px; margin: 1rem 0; }
.gradient-bar { border-radius: 4px; width: 100%; }
.gradient-steps { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.75rem; font-size: 0.85rem; }
.step { padding: 0.25rem 0.5rem; background: #e0e0e0; border-radius: 4px; }
.step.active { background: #2a5298; color: white; }
.copy-btn, .calc-btn { background: #2a5298; color: white; border: none; padding: 0.75rem 1.5rem; border-radius: 4px; cursor: pointer; font-size: 1rem; transition: background 0.2s; }
.copy-btn:hover, .calc-btn:hover { background: #1a4070; }
.substitution-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.substitution-form .input-group { flex-direction: column; }
.substitution-result h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.result-card { background: #f9f9f9; padding: 1rem; border-radius: 8px; border-left: 4px solid #2a5298; }
.result-name { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.5rem; }
.result-details { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.85rem; color: #666; margin-bottom: 0.75rem; }
.confidence-meter { height: 6px; background: #ddd; border-radius: 3px; overflow: hidden; margin-bottom: 0.5rem; }
.confidence-bar { height: 100%; background: linear-gradient(90deg, #28a745, #20c997); }
.result-notes { font-size: 0.85rem; color: #666; }
.content-section { background: #fafafa; }
.content-section h2 { border-bottom: 2px solid #2a5298; padding-bottom: 0.5rem; }
.content-section ol, .content-section ul { padding-left: 1.5rem; }
.content-section li { margin-bottom: 0.5rem; }
.assumptions { font-size: 0.85rem; color: #666; font-style: italic; }
.footer-section { background: #f8f8f8; padding: 1rem 0; text-align: center; }
.site-footer { background: #2a5298; color: white; padding: 2rem 0 1rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-bottom: 1.5rem; }
.footer-col h4 { font-size: 1rem; margin-bottom: 0.5rem; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 0.25rem; }
.hub-credit { text-align: center; font-size: 0.85rem; color: #aaa; margin-top: 1rem; }
@media (max-width: 768px) { .main-nav { flex-direction: column; gap: 0.5rem; }
.preset-buttons { flex-direction: column; align-items: center; }
.gradient-steps { font-size: 0.75rem; }
.substitution-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .input-grid { grid-template-columns: 1fr; }
.gradient-controls { flex-direction: column; }
}


/* 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;
}
