/* ===== CSS Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --c-cream: #FDF6EC;
  --c-sand: #F5E6D3;
  --c-brown: #8B6F5E;
  --c-brown-dark: #5C4033;
  --c-peach: #E8A87C;
  --c-peach-light: #F2D4B8;
  --c-green: #6B8F71;
  --c-green-light: #A8C5AE;
  --c-red: #D4726A;
  --c-red-light: #F2B0AA;
  --c-warn: #D4A843;
  --c-warn-light: #F2D98E;
  --c-text: #3D2B1F;
  --c-text-light: #6B5744;
  --c-border: #D4C4B0;
  --c-white: #FFFFFF;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 8px rgba(61,43,31,0.08);
  --shadow-lg: 0 8px 32px rgba(61,43,31,0.12);
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --transition: 0.2s ease;
}
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font); color: var(--c-text); background: var(--c-cream); line-height: 1.6; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--c-green); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-brown-dark); text-decoration: underline; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
/* ===== Header ===== */
.site-header { background: var(--c-white); border-bottom: 1px solid var(--c-border); position: sticky; top: 0; z-index: 100; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: var(--c-brown-dark); text-decoration: none; }
.logo:hover { color: var(--c-peach); text-decoration: none; }
.logo-text { white-space: nowrap; }
.site-nav { display: flex; gap: 24px; }
.site-nav a { font-size: 0.9rem; font-weight: 500; color: var(--c-text-light); padding: 4px 0; border-bottom: 2px solid transparent; transition: all var(--transition); }
.site-nav a:hover { color: var(--c-green); border-bottom-color: var(--c-green); text-decoration: none; }
.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--c-brown-dark); border-radius: 1px; transition: all var(--transition); }
/* ===== Hero ===== */
.hero-section { background: linear-gradient(135deg, var(--c-sand) 0%, var(--c-cream) 100%); padding: 60px 0 40px; text-align: center; }
.hero-section h1 { font-size: 2.4rem; font-weight: 800; color: var(--c-brown-dark); margin-bottom: 12px; line-height: 1.2; }
.hero-sub { font-size: 1.15rem; color: var(--c-text-light); max-width: 560px; margin: 0 auto 20px; }
.ad-slot-hero { min-height: 40px; margin-top: 16px; }
/* ===== Calculator ===== */
.calculator-section { padding: 48px 0; }
.calc-layout { display: grid; grid-template-columns: 380px 1fr; gap: 32px; align-items: start; }
.calc-form-panel, .calc-result-panel { background: var(--c-white); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.calc-form-panel h2, .calc-result-panel h2 { font-size: 1.35rem; margin-bottom: 20px; color: var(--c-brown-dark); }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--c-text); }
.form-group input, .form-group select { width: 100%; padding: 10px 14px; border: 2px solid var(--c-border); border-radius: var(--radius-sm); font-size: 1rem; font-family: var(--font); color: var(--c-text); background: var(--c-cream); transition: border-color var(--transition); }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--c-peach); box-shadow: 0 0 0 3px rgba(232,168,124,0.25); }
.field-hint { display: block; margin-top: 4px; font-size: 0.8rem; color: var(--c-text-light); }
.form-actions { display: flex; gap: 12px; margin-top: 20px; }
.btn-primary { flex: 1; padding: 12px 24px; background: var(--c-green); color: var(--c-white); border: none; border-radius: var(--radius-sm); font-size: 1rem; font-weight: 600; cursor: pointer; transition: background var(--transition); }
.btn-primary:hover { background: #5A7A5F; }
.btn-secondary { padding: 12px 20px; background: var(--c-sand); color: var(--c-brown-dark); border: 2px solid var(--c-border); border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all var(--transition); }
.btn-secondary:hover { background: var(--c-peach-light); border-color: var(--c-peach); }
.presets { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--c-border); }
.presets-label { font-size: 0.8rem; font-weight: 600; color: var(--c-text-light); margin-bottom: 8px; }
.preset-btn { display: inline-block; padding: 6px 14px; margin: 4px 4px 4px 0; background: var(--c-sand); border: 1px solid var(--c-border); border-radius: 20px; font-size: 0.8rem; cursor: pointer; transition: all var(--transition); }
.preset-btn:hover { background: var(--c-peach-light); border-color: var(--c-peach); }
/* ===== Results ===== */
.result-empty { text-align: center; padding: 40px 20px; color: var(--c-text-light); }
.result-empty svg { margin-bottom: 16px; opacity: 0.5; }
.result-header { margin-bottom: 20px; }
.result-header h2 { font-size: 1.3rem; }
.result-species { display: inline-block; padding: 3px 12px; background: var(--c-peach-light); color: var(--c-brown-dark); border-radius: 20px; font-size: 0.8rem; font-weight: 600; margin-top: 4px; }
.result-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.result-card { text-align: center; padding: 16px 12px; border-radius: var(--radius-sm); border: 2px solid var(--c-border); }
.card-min { border-color: var(--c-red-light); background: #FDF0EE; }
.card-ideal { border-color: var(--c-green-light); background: #F0F5F1; }
.card-max { border-color: var(--c-peach-light); background: #FDF5EE; }
.card-label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--c-text-light); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.card-value { display: block; font-size: 1.5rem; font-weight: 800; color: var(--c-brown-dark); }
.card-note { display: block; font-size: 0.7rem; color: var(--c-text-light); margin-top: 4px; }
.result-verdict { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 600; font-size: 0.95rem; }
.verdict-safe { background: #E8F5E9; color: #2E7D32; border: 1px solid #A5D6A7; }
.verdict-warn { background: #FFF8E1; color: #F57F17; border: 1px solid #FFE082; }
.verdict-danger { background: #FFEBEE; color: #C62828; border: 1px solid #EF9A9A; }
.result-cage-check { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 0.9rem; background: var(--c-sand); border: 1px solid var(--c-border); }
.wheel-visual { margin-bottom: 20px; }
.wheel-visual h3 { font-size: 1rem; margin-bottom: 12px; }
.wheel-diagram { display: flex; align-items: flex-end; justify-content: center; gap: 24px; padding: 20px; background: var(--c-cream); border-radius: var(--radius-sm); flex-wrap: wrap; }
.wheel-compare-item { text-align: center; }
.wheel-compare-item svg { display: block; margin: 0 auto 6px; }
.wheel-compare-item .wc-label { font-size: 0.75rem; color: var(--c-text-light); }
.wheel-compare-item .wc-size { font-size: 0.8rem; font-weight: 700; color: var(--c-brown-dark); }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; }
/* ===== Saved Profiles ===== */
.saved-profiles { margin-top: 32px; }
.saved-profiles h3 { font-size: 1.1rem; margin-bottom: 12px; }
.profiles-list { display: flex; gap: 12px; flex-wrap: wrap; }
.profile-card { background: var(--c-white); border: 2px solid var(--c-border); border-radius: var(--radius-sm); padding: 14px 18px; min-width: 160px; cursor: pointer; transition: all var(--transition); }
.profile-card:hover { border-color: var(--c-peach); box-shadow: var(--shadow); }
.profile-card .p-name { font-weight: 700; font-size: 0.95rem; color: var(--c-brown-dark); }
.profile-card .p-species { font-size: 0.8rem; color: var(--c-text-light); }
.profile-card .p-wheel { font-size: 0.8rem; color: var(--c-green); font-weight: 600; margin-top: 4px; }
.profile-card .p-delete { font-size: 0.7rem; color: var(--c-red); background: none; border: none; cursor: pointer; margin-top: 6px; text-decoration: underline; }
/* ===== Info Sections ===== */
.info-section { padding: 56px 0; }
.info-section.alt-bg { background: var(--c-sand); }
.info-section h2 { font-size: 1.6rem; font-weight: 800; color: var(--c-brown-dark); margin-bottom: 28px; text-align: center; }
.section-note { text-align: center; color: var(--c-text-light); font-size: 0.95rem; margin-bottom: 20px; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.info-card { background: var(--c-white); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); text-align: center; }
.info-icon { margin-bottom: 14px; }
.info-card h3 { font-size: 1.05rem; color: var(--c-brown-dark); margin-bottom: 10px; }
.info-card p { font-size: 0.9rem; color: var(--c-text-light); line-height: 1.65; }
/* ===== Mistakes ===== */
.mistakes-list { max-width: 720px; margin: 0 auto; }
.mistake-item { display: flex; gap: 16px; margin-bottom: 24px; align-items: flex-start; }
.mistake-num { flex-shrink: 0; width: 36px; height: 36px; background: var(--c-red); color: var(--c-white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.95rem; }
.mistake-item h3 { font-size: 1.05rem; color: var(--c-brown-dark); margin-bottom: 6px; }
.mistake-item p { font-size: 0.9rem; color: var(--c-text-light); line-height: 1.6; }
/* ===== Comparison Table ===== */
.comparison-table-wrapper { overflow-x: auto; }
.comparison-table { width: 100%; border-collapse: collapse; background: var(--c-white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.comparison-table th { background: var(--c-brown-dark); color: var(--c-white); padding: 14px 16px; text-align: left; font-size: 0.85rem; font-weight: 600; }
.comparison-table td { padding: 12px 16px; border-bottom: 1px solid var(--c-border); font-size: 0.88rem; }
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:hover td { background: var(--c-cream); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; }
.badge.pass { background: #E8F5E9; color: #2E7D32; }
.badge.warn { background: #FFF8E1; color: #F57F17; }
.badge.fail { background: #FFEBEE; color: #C62828; }
.table-note { text-align: center; font-size: 0.85rem; color: var(--c-text-light); margin-top: 12px; }
/* ===== FAQ ===== */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item { background: var(--c-white); border-radius: var(--radius-sm); margin-bottom: 10px; box-shadow: var(--shadow); overflow: hidden; }
.faq-item summary { padding: 16px 20px; font-weight: 600; font-size: 0.95rem; color: var(--c-brown-dark); cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.3rem; color: var(--c-peach); transition: transform var(--transition); flex-shrink: 0; margin-left: 12px; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 20px 16px; font-size: 0.9rem; color: var(--c-text-light); line-height: 1.65; }
/* ===== Footer ===== */
.site-footer { background: var(--c-brown-dark); color: var(--c-peach-light); padding: 40px 0 20px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; margin-bottom: 8px; }
.footer-desc { font-size: 0.88rem; max-width: 420px; opacity: 0.8; margin-bottom: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.12); margin-bottom: 16px; }
.footer-links a { color: var(--c-peach-light); font-size: 0.85rem; opacity: 0.85; }
.footer-links a:hover { opacity: 1; color: var(--c-white); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 0.78rem; opacity: 0.6; }
.footer-bottom a { color: var(--c-peach-light); }
/* ===== Toast ===== */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--c-brown-dark); color: var(--c-white); padding: 12px 22px; border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 600; box-shadow: var(--shadow-lg); z-index: 999; opacity: 0; transform: translateY(10px); transition: all 0.3s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); }
/* ===== Responsive ===== */
@media (max-width: 900px) {
  .calc-layout { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .result-cards { grid-template-columns: 1fr; }
  .hero-section h1 { font-size: 1.8rem; }
  .site-nav { display: none; }
  .site-nav.open { display: flex; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: var(--c-white); padding: 16px 20px; border-bottom: 1px solid var(--c-border); box-shadow: var(--shadow); }
  .nav-toggle { display: flex; }
}
@media (max-width: 500px) {
  .hero-section { padding: 40px 0 28px; }
  .hero-section h1 { font-size: 1.5rem; }
  .calculator-section { padding: 32px 0; }
  .calc-form-panel, .calc-result-panel { padding: 20px; }
  .form-actions { flex-direction: column; }
  .result-actions { flex-direction: column; }
  .footer-bottom { 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;
}
