/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-fire-900: #7c2d12;
  --c-fire-800: #9a3412;
  --c-fire-700: #c2410c;
  --c-fire-600: #ea580c;
  --c-fire-500: #f97316;
  --c-fire-400: #fb923c;
  --c-fire-300: #fdba74;
  --c-fire-200: #fed7aa;
  --c-fire-100: #ffedd5;
  --c-fire-50: #fff7ed;
  --c-slate-900: #0f172a;
  --c-slate-800: #1e293b;
  --c-slate-700: #334155;
  --c-slate-600: #475569;
  --c-slate-500: #64748b;
  --c-slate-400: #94a3b8;
  --c-slate-300: #cbd5e1;
  --c-slate-200: #e2e8f0;
  --c-slate-100: #f1f5f9;
  --c-slate-50: #f8fafc;
  --c-green-600: #16a34a;
  --c-green-500: #22c55e;
  --c-green-100: #dcfce7;
  --c-red-600: #dc2626;
  --c-red-100: #fee2e2;
  --c-amber-500: #f59e0b;
  --c-amber-100: #fef3c7;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --max-width: 1100px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font); color: var(--c-slate-800); background: var(--c-slate-50); line-height: 1.6; }

a { color: var(--c-fire-700); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--c-fire-900); }
img { max-width: 100%; height: auto; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }
.skip-link { position: absolute; top: -100%; left: 1rem; background: var(--c-fire-700); color: #fff; padding: .5rem 1rem; border-radius: 0 0 var(--radius) var(--radius); z-index: 9999; }
.skip-link:focus { top: 0; }

/* ===== HEADER ===== */
.site-header { background: #fff; border-bottom: 1px solid var(--c-slate-200); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .75rem 0; gap: 1rem; }
.logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; flex-shrink: 0; }
.logo:hover { text-decoration: none; }
.logo-text { display: flex; flex-direction: column; }
.logo-name { font-weight: 700; font-size: 1.05rem; color: var(--c-slate-900); line-height: 1.2; }
.logo-tag { font-size: .7rem; color: var(--c-slate-500); line-height: 1.2; }

.site-nav ul { display: flex; list-style: none; gap: .25rem; }
.site-nav a { display: block; padding: .4rem .75rem; font-size: .85rem; font-weight: 500; color: var(--c-slate-700); text-decoration: none; border-radius: var(--radius); transition: background .15s, color .15s; }
.site-nav a:hover { background: var(--c-fire-50); color: var(--c-fire-800); text-decoration: none; }

.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: .5rem; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--c-slate-700); border-radius: 2px; }

/* ===== HERO ===== */
.hero { background: linear-gradient(135deg, var(--c-fire-900) 0%, var(--c-fire-700) 50%, var(--c-fire-600) 100%); color: #fff; padding: 3.5rem 0 3rem; }
.hero h1 { font-size: 2.4rem; font-weight: 800; line-height: 1.15; margin-bottom: .75rem; max-width: 600px; }
.hero-sub { font-size: 1.1rem; opacity: .9; max-width: 520px; margin-bottom: 1.5rem; line-height: 1.5; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 2rem; }
.hero-stats { display: flex; gap: 2rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 1.3rem; font-weight: 700; }
.stat span { font-size: .8rem; opacity: .8; }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: .6rem 1.25rem; font-size: .9rem; font-weight: 600; border-radius: var(--radius); border: 2px solid transparent; cursor: pointer; transition: all .15s; text-decoration: none; line-height: 1.4; }
.btn-primary { background: #fff; color: var(--c-fire-800); border-color: #fff; }
.btn-primary:hover { background: var(--c-fire-50); color: var(--c-fire-900); text-decoration: none; }
.btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-secondary:hover { background: rgba(255,255,255,.1); border-color: #fff; color: #fff; text-decoration: none; }
.btn-small { padding: .35rem .85rem; font-size: .8rem; }
.btn-danger { background: var(--c-red-100); color: var(--c-red-600); border-color: var(--c-red-100); }
.btn-danger:hover { background: var(--c-red-600); color: #fff; border-color: var(--c-red-600); }

/* ===== SECTIONS ===== */
section { padding: 3rem 0; }
.section-alt { background: #fff; }
h2 { font-size: 1.6rem; font-weight: 700; color: var(--c-slate-900); margin-bottom: .5rem; }
.section-intro { color: var(--c-slate-600); max-width: 640px; margin-bottom: 1.75rem; font-size: .95rem; }

/* ===== RANKING LIST ===== */
.ranking-list { display: flex; flex-direction: column; gap: .5rem; }
.rank-item { display: flex; gap: 1rem; background: var(--c-slate-50); border: 1px solid var(--c-slate-200); border-radius: var(--radius-lg); padding: 1rem 1.25rem; align-items: flex-start; }
.rank-number { font-size: 1.4rem; font-weight: 800; color: var(--c-fire-600); min-width: 2rem; text-align: center; flex-shrink: 0; padding-top: .1rem; }
.rank-body h3 { font-size: 1rem; font-weight: 600; color: var(--c-slate-900); margin-bottom: .2rem; }
.rank-body p { font-size: .88rem; color: var(--c-slate-600); line-height: 1.5; }
.rank-tag { display: inline-block; font-size: .7rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px; margin-top: .4rem; text-transform: uppercase; letter-spacing: .03em; }
.rank-tag.high { background: var(--c-red-100); color: var(--c-red-600); }
.rank-tag.medium { background: var(--c-amber-100); color: #92400e; }
.rank-tag.low { background: var(--c-slate-200); color: var(--c-slate-600); }

/* ===== CHECKLIST ===== */
.checklist-toolbar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; padding: 1rem; background: var(--c-slate-50); border: 1px solid var(--c-slate-200); border-radius: var(--radius-lg); }
.progress-bar { flex: 1; min-width: 120px; height: 10px; background: var(--c-slate-200); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--c-green-500); border-radius: 999px; transition: width .3s ease; width: 0%; }
.progress-text { font-size: .8rem; font-weight: 600; color: var(--c-slate-600); white-space: nowrap; }
.toolbar-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.checklist-filters { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.filter-btn { padding: .35rem .85rem; font-size: .8rem; font-weight: 500; border: 1px solid var(--c-slate-300); background: #fff; color: var(--c-slate-600); border-radius: 999px; cursor: pointer; transition: all .15s; }
.filter-btn:hover { border-color: var(--c-fire-400); color: var(--c-fire-700); }
.filter-btn.active { background: var(--c-fire-700); color: #fff; border-color: var(--c-fire-700); }

.room-group { margin-bottom: 1.5rem; }
.room-header { font-size: 1.1rem; font-weight: 700; color: var(--c-slate-900); margin-bottom: .5rem; padding-bottom: .35rem; border-bottom: 2px solid var(--c-fire-200); }

.checklist-item { display: flex; align-items: flex-start; gap: .75rem; padding: .6rem .75rem; border-radius: var(--radius); transition: background .15s; border: 1px solid transparent; margin-bottom: .25rem; }
.checklist-item:hover { background: var(--c-fire-50); border-color: var(--c-fire-200); }
.checklist-item.sealed { background: var(--c-green-100); border-color: #bbf7d0; }
.checklist-item.sealed .item-text { text-decoration: line-through; color: var(--c-slate-500); }

.item-checkbox { width: 20px; height: 20px; accent-color: var(--c-fire-700); flex-shrink: 0; margin-top: .15rem; cursor: pointer; }
.item-body { flex: 1; }
.item-text { font-size: .9rem; font-weight: 500; color: var(--c-slate-800); display: block; }
.item-note { font-size: .78rem; color: var(--c-slate-500); display: block; margin-top: .15rem; }

.item-actions { display: flex; gap: .3rem; flex-shrink: 0; align-items: center; }
.item-btn { background: none; border: 1px solid var(--c-slate-300); border-radius: var(--radius); padding: .2rem .5rem; font-size: .72rem; cursor: pointer; color: var(--c-slate-600); transition: all .15s; }
.item-btn:hover { border-color: var(--c-fire-400); color: var(--c-fire-700); }
.item-btn.na-btn.active { background: var(--c-slate-200); border-color: var(--c-slate-400); color: var(--c-slate-700); }
.item-btn.skip-btn.active { background: var(--c-amber-100); border-color: var(--c-amber-500); color: #92400e; }

.checklist-summary { margin-top: 2rem; padding: 1.25rem; background: var(--c-fire-50); border: 1px solid var(--c-fire-200); border-radius: var(--radius-lg); }
.checklist-summary h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.checklist-summary p { font-size: .9rem; color: var(--c-slate-600); }

/* ===== MATERIALS ===== */
.material-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.material-card { background: var(--c-slate-50); border: 1px solid var(--c-slate-200); border-radius: var(--radius-lg); padding: 1.25rem; transition: box-shadow .15s; }
.material-card:hover { box-shadow: var(--shadow-md); }
.material-icon { font-size: 1.8rem; margin-bottom: .5rem; }
.material-card h3 { font-size: 1rem; color: var(--c-slate-900); margin-bottom: .35rem; }
.material-card p { font-size: .85rem; color: var(--c-slate-600); line-height: 1.5; margin-bottom: .5rem; }
.material-rating { font-size: .75rem; font-weight: 600; color: var(--c-fire-700); }

.supply-note { background: var(--c-fire-100); border: 1px solid var(--c-fire-300); border-radius: var(--radius-lg); padding: 1.25rem; }
.supply-note h3 { font-size: 1rem; margin-bottom: .35rem; color: var(--c-fire-900); }
.supply-note p { font-size: .88rem; color: var(--c-fire-800); }

/* ===== MISTAKES ===== */
.mistake-list { display: flex; flex-direction: column; gap: .75rem; }
.mistake-item { display: flex; gap: 1rem; padding: 1rem 1.25rem; background: var(--c-slate-50); border: 1px solid var(--c-slate-200); border-radius: var(--radius-lg); align-items: flex-start; }
.mistake-icon { font-size: 1.3rem; flex-shrink: 0; }
.mistake-item h3 { font-size: .95rem; color: var(--c-slate-900); margin-bottom: .2rem; }
.mistake-item p { font-size: .85rem; color: var(--c-slate-600); line-height: 1.5; }

/* ===== FAQ ===== */
.faq-list { display: flex; flex-direction: column; gap: .5rem; }
.faq-item { border: 1px solid var(--c-slate-200); border-radius: var(--radius-lg); overflow: hidden; }
.faq-item summary { padding: 1rem 1.25rem; font-weight: 600; font-size: .95rem; color: var(--c-slate-900); cursor: pointer; list-style: none; display: flex; align-items: center; justify-content:; transition: background .15s; }
.faq-item summary:hover { background: var(--c-slate-50); }
.faq-item summary::after { content: '+'; margin-left: auto; font-size: 1.2rem; color: var(--c-fire-600); flex-shrink: 0; }
.faq-item[open] summary::after { content: '−'; }
.faq-item[open] summary { border-bottom: 1px solid var(--c-slate-200); }
.faq-item p { padding: 1rem 1.25rem; font-size: .9rem; color: var(--c-slate-600); line-height: 1.6; }

/* ===== SCENARIO ===== */
.scenario-section { background: var(--c-slate-900); color: #fff; }
.scenario-section h2 { color: #fff; }
.scenario-timeline { display: flex; flex-direction: column; gap: 0; position: relative; }
.scenario-timeline::before { content: ''; position: absolute; left: 3.5rem; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,.15); }
.scenario-step { display: flex; gap: 1.5rem; padding: 1.25rem 0; position: relative; }
.step-time { min-width: 3.5rem; font-size: .75rem; font-weight: 700; color: var(--c-fire-400); text-align: right; padding-top: .15rem; }
.step-body { position: relative; padding-left: 1.5rem; }
.step-body::before { content: ''; position: absolute; left: -.35rem; top: .4rem; width: 12px; height: 12px; border-radius: 50%; background: var(--c-fire-500); border: 2px solid var(--c-slate-900); z-index: 1; }
.step-body h3 { font-size: 1rem; font-weight: 600; color: #fff; margin-bottom: .2rem; }
.step-body p { font-size: .88rem; color: var(--c-slate-400); line-height: 1.5; }
.step-body strong { color: var(--c-fire-300); }

/* ===== FOOTER ===== */
.site-footer { background: var(--c-slate-900); color: var(--c-slate-400); padding: 2.5rem 0 1.5rem; font-size: .85rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.footer-col h3 { color: #fff; font-size: .9rem; margin-bottom: .5rem; }
.footer-col p { line-height: 1.5; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .3rem; }
.footer-col a { color: var(--c-slate-400); text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1rem; text-align: center; font-size: .8rem; }
.footer-bottom a { color: var(--c-fire-400); }

/* ===== PRINT ===== */
@media print {
  .site-header, .site-footer, .hero-actions, .hero-stats, .checklist-toolbar, .checklist-filters, .nav-toggle, .scenario-section { display: none !important; }
  body { background: #fff; color: #000; }
  .hero { background: none; color: #000; padding: 1rem 0; }
  .hero h1 { color: #000; }
  section { padding: 1rem 0; break-inside: avoid; }
  .checklist-summary { break-inside: avoid; }
  .faq-item { break-inside: avoid; }
  .checklist-item.sealed .item-text { text-decoration: line-through; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .site-nav { display: none; }
  .site-nav.open { display: block; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--c-slate-200); box-shadow: var(--shadow-lg); }
  .site-nav.open ul { flex-direction: column; padding: .5rem 1rem; }
  .site-nav.open a { padding: .6rem .5rem; }
  .nav-toggle { display: flex; }
  .hero h1 { font-size: 1.75rem; }
  .hero-stats { gap: 1rem; }
  .checklist-toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-actions { justify-content: flex-start; }
  .scenario-timeline::before { left: 2.5rem; }
  .step-time { min-width: 2.5rem; }
  .rank-item { flex-direction: column; gap: .5rem; }
  .rank-number { text-align: left; }
  .material-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.5rem; }
  h2 { font-size: 1.3rem; }
  .btn { width: 100%; }
  .hero-actions { 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;
}
