/* Imperial to Metric Conversion Companion 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; } 
.container { max-width: 900px; margin: 0 auto; padding: 1.5rem; }
.site-header { text-align: center; padding: 2rem 0 1rem; border-bottom: 1px solid #eee; }
.site-header h1 { margin: 0 0 0.5rem; font-size: 2.2rem; color: #2c3e50; }
.tagline { margin: 0; color: #7f8c8d; font-size: 1.1rem; }
.converter-section { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; margin-bottom: 2rem; padding: 1.5rem; background: #f8f9fa; border-radius: 12px; }
.input-area { flex: 1; min-width: 200px; }
.input-group { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
#imperial-input { flex: 2; padding: 0.8rem; font-size: 1.5rem; border: 2px solid #ddd; border-radius: 8px; width: 100%; text-align: center; }
#unit-select { flex: 1; padding: 0.8rem; font-size: 1rem; border: 2px solid #ddd; border-radius: 8px; background: white; }
.input-unit { font-size: 0.9rem; color: #666; }
.result-area { text-align: center; flex: 1; min-width: 180px; }
#metric-result { font-size: 3.5rem; font-weight: 700; color: #2c3e50; margin: 0.2rem 0 0.3rem; }
#metric-unit { font-size: 1.5rem; color: #7f8c8d; }
.copy-button { padding: 0.6rem 1.2rem; background: #3498db; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 0.9rem; transition: background 0.2s; }
.copy-button:hover { background: #2980b9; }
.copy-button.copied { background: #27ae60; }
.examples-section { margin-bottom: 2.5rem; }
.examples-section h2 { font-size: 1.4rem; margin-bottom: 1rem; color: #2c3e50; }
.example-card { background: white; padding: 1.2rem; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 1rem; }
.example-card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; color: #555; }
.example-value { font-size: 1.3rem; font-weight: 600; color: #2c3e50; display: block; margin-bottom: 0.3rem; }
.example-note { margin: 0; color: #7f8c8d; font-size: 0.95rem; }
.cooking { border-left: 4px solid #e74c3c; }
.diy { border-left: 4px solid #27ae60; }
.objects { border-left: 4px solid #9b59b6; }
.presets-section { margin-bottom: 2rem; }
.presets-section h2 { font-size: 1.4rem; margin-bottom: 1rem; color: #2c3e50; }
.preset-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.preset-btn { padding: 0.6rem 1rem; background: #ecf0f1; border: 1px solid #ddd; border-radius: 6px; cursor: pointer; transition: all 0.2s; font-size: 0.9rem; }
.preset-btn:hover { background: #3498db; color: white; }
.history-section { margin-bottom: 2rem; }
.history-section h2 { font-size: 1.4rem; margin-bottom: 1rem; color: #2c3e50; }
.history-list { list-style: none; padding: 0; margin: 0; }
.history-item { padding: 0.8rem; background: #f8f9fa; border-radius: 6px; margin-bottom: 0.5rem; display: flex; justify-content: space-between; align-items: center; }
.history-item.favorite { background: #fef9e7; border-left: 3px solid #f39c12; }
.history-value { font-family: monospace; font-size: 0.95rem; }
.favorite-btn { background: none; border: none; color: #f39c12; cursor: pointer; font-size: 1.1rem; }
.ad-placeholder { text-align: center; margin: 2rem 0; padding: 1rem; }
.ad-label { color: #95a5a6; font-size: 0.85rem; }
.usage-guide, .tips-section, .caveats-section, .faqs-section { margin: 2.5rem 0; }
.usage-guide h2, .tips-section h2, .caveats-section h2, .faqs-section h2 { font-size: 1.4rem; margin-bottom: 1rem; color: #2c3e50; }
.tips-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.tip-card { background: #f8f9fa; padding: 1rem; border-radius: 8px; }
.tip-card h4 { margin: 0 0 0.5rem; font-size: 1rem; color: #555; }
.caveats-list { list-style: none; padding: 0; }
.caveats-list li { padding: 0.5rem 0; border-bottom: 1px solid #eee; }
.caveats-list li:last-child { border-bottom: none; }
.faqs-section .faq-item { margin-bottom: 1.2rem; }
.faqs-section .faq-item h4 { margin: 0 0 0.3rem; font-size: 1rem; color: #2c3e50; }
.site-footer { background: #2c3e50; color: #ecf0f1; padding: 1.5rem 0; margin-top: 2rem; }
.footer-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 0.8rem; }
.footer-nav a { color: #bdc3c7; text-decoration: none; font-size: 0.95rem; }
.footer-nav a:hover { color: #ecf0f1; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
@media (max-width: 600px) { 
  .converter-section { flex-direction: column; }
  .input-area, .result-area { flex: 1 1 100%; }
  .site-header h1 { font-size: 1.8rem; }
  .preset-buttons { justify-content: center; }
  .footer-nav { justify-content: center; }
}
@media (max-width: 400px) { 
  .container { padding: 1rem; }
  .site-header { padding: 1.5rem 0 1rem; }
  #imperial-input { font-size: 1.3rem; padding: 0.6rem; }
  #metric-result { font-size: 2.8rem; }
}
</style>


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