/* ===== CSS Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --green-900: #1a3a24;
  --green-800: #2D5F3E;
  --green-700: #3a7a4f;
  --green-100: #e8f5e9;
  --green-50: #f4fbf5;
  --amber-500: #E8C87A;
  --amber-600: #d4b05a;
  --stone-900: #1c1917;
  --stone-700: #44403c;
  --stone-500: #78716c;
  --stone-300: #d6d3d1;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --red-600: #dc2626;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-w: 1160px;
}
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--stone-900); background: var(--stone-100); line-height: 1.6; }
img, svg { display: block; max-width: 100%; }
a { color: var(--green-800); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--green-900); }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.site-header { background: var(--green-900); padding: 14px 0; position: sticky; top: 0; z-index: 100; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.logo-accent { color: var(--amber-500); }
.site-nav { display: flex; gap: 20px; }
.site-nav a { color: rgba(255,255,255,.85); text-decoration: none; font-size: .9rem; font-weight: 500; }
.site-nav a:hover { color: #fff; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border-radius: var(--radius-sm); font-size: .95rem; font-weight: 600; cursor: pointer; border: 2px solid transparent; transition: all .15s; text-decoration: none; }
.btn-primary { background: var(--green-800); color: #fff; border-color: var(--green-800); }
.btn-primary:hover { background: var(--green-900); border-color: var(--green-900); color: #fff; }
.btn-ghost { background: transparent; color: var(--green-800); border-color: var(--green-800); }
.btn-ghost:hover { background: var(--green-50); }
.btn-sm { padding: 6px 14px; font-size: .85rem; }

/* ===== Hero Section ===== */
.hero-section { background: linear-gradient(135deg, var(--green-50) 0%, #fff 60%); padding: 60px 0 48px; }
.hero-grid { display: grid; grid-template-columns: 1fr 340px; gap: 48px; align-items: start; }
.hero-copy h1 { font-size: 2.4rem; line-height: 1.2; color: var(--green-900); margin-bottom: 16px; }
.hero-sub { font-size: 1.1rem; color: var(--stone-700); margin-bottom: 24px; max-width: 520px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.hero-note { font-size: .85rem; color: var(--stone-500); }

/* ===== Score Panel ===== */
.score-panel { position: sticky; top: 72px; }
.score-panel-inner { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 28px; border: 1px solid var(--stone-200); }
.score-panel-header { text-align: center; margin-bottom: 16px; }
.score-panel-label { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--stone-500); font-weight: 600; }
.score-panel-version { display: block; font-size: 1rem; font-weight: 700; color: var(--green-800); margin-top: 4px; }
.score-circle { width: 120px; height: 120px; border-radius: 50%; background: conic-gradient(var(--green-800) 0%, var(--green-800) var(--pct, 0%), var(--stone-200) var(--pct, 0%)); display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto 20px; position: relative; }
.score-circle::before { content: ''; width: 96px; height: 96px; background: #fff; border-radius: 50%; position: absolute; }
.score-value { font-size: 2rem; font-weight: 800; color: var(--green-900); position: relative; z-index: 1; line-height: 1; }
.score-max { font-size: .8rem; color: var(--stone-500); position: relative; z-index: 1; }
.score-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.breakdown-item { display: flex; justify-content: space-between; font-size: .82rem; padding: 4px 8px; background: var(--stone-100); border-radius: var(--radius-sm); }
.breakdown-item span:first-child { color: var(--stone-700); }
.breakdown-item span:last-child { font-weight: 700; color: var(--green-800); }
.score-actions { display: flex; gap: 8px; justify-content: center; }
.score-saved-msg { text-align: center; font-size: .82rem; color: var(--green-700); margin-top: 8px; }

/* ===== Checklist Section ===== */
.checklist-section { padding: 48px 0 64px; }
.checklist-section h2 { font-size: 1.8rem; color: var(--green-900); margin-bottom: 24px; }
.form-row { margin-bottom: 20px; }
.form-label-inline { display: block; font-weight: 600; margin-bottom: 6px; }
.form-input { width: 100%; max-width: 400px; padding: 10px 14px; border: 2px solid var(--stone-300); border-radius: var(--radius-sm); font-size: 1rem; font-family: var(--font); transition: border-color .15s; }
.form-input:focus { outline: none; border-color: var(--green-800); box-shadow: 0 0 0 3px rgba(45,95,62,.15); }

/* Weights */
.weight-fieldset { border: 1px solid var(--stone-300); border-radius: var(--radius); padding: 20px; margin-bottom: 32px; background: #fff; }
.weight-fieldset legend { font-weight: 700; font-size: 1.05rem; padding: 0 8px; }
.fieldset-hint { font-size: .88rem; color: var(--stone-500); margin: 4px 0 16px; }
.weight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.weight-item { display: flex; align-items: center; gap: 10px; }
.weight-item label { font-size: .88rem; font-weight: 600; min-width: 110px; }
.weight-slider { flex: 1; accent-color: var(--green-800); }
.weight-val { font-weight: 700; font-size: .9rem; min-width: 20px; text-align: center; color: var(--green-800); }

/* Category Fieldsets */
.category-fieldset { border: 1px solid var(--stone-300); border-radius: var(--radius); padding: 24px; margin-bottom: 28px; background: #fff; }
.category-fieldset legend { font-size: 1.15rem; font-weight: 700; display: flex; align-items: center; gap: 8px; padding: 0 8px; }
.cat-icon { font-size: 1.3rem; }
.criteria-list { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; }
.criterion { border-bottom: 1px solid var(--stone-200); padding: 12px 0; }
.criterion:last-child { border-bottom: none; }
.criterion-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.criterion-header label { font-size: .93rem; font-weight: 600; flex: 1; }
.score-select { padding: 8px 12px; border: 2px solid var(--stone-300); border-radius: var(--radius-sm); font-size: .88rem; font-family: var(--font); min-width: 140px; background: #fff; cursor: pointer; transition: border-color .15s; }
.score-select:focus { outline: none; border-color: var(--green-800); box-shadow: 0 0 0 3px rgba(45,95,62,.15); }
.criterion-hint { font-size: .82rem; color: var(--stone-500); margin-top: 6px; padding-left: 4px; line-height: 1.5; }

.form-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

/* ===== Comparison ===== */
.comparison-wrap { margin-top: 40px; }
.comparison-wrap h3 { font-size: 1.2rem; margin-bottom: 12px; }
.comparison-table-wrap { overflow-x: auto; }
.comparison-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.comparison-table th, .comparison-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--stone-200); }
.comparison-table thead th { background: var(--green-50); font-weight: 700; color: var(--green-900); }
.comparison-table tfoot td { background: var(--stone-100); font-size: 1rem; }

/* ===== Guide Section ===== */
.guide-section { background: var(--green-50); padding: 64px 0; }
.guide-section h2 { font-size: 1.8rem; color: var(--green-900); margin-bottom: 32px; }
.guide-grid { display: grid; grid-template-columns: 1fr 300px; gap: 40px; }
.guide-main h3 { font-size: 1.15rem; color: var(--green-800); margin: 28px 0 10px; }
.guide-main h3:first-child { margin-top: 0; }
.guide-main p { color: var(--stone-700); margin-bottom: 12px; }
.score-scale { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.scale-item { display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.scale-badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-weight: 700; font-size: .8rem; color: #fff; min-width: 52px; text-align: center; }
.s0 { background: #991b1b; }
.s1 { background: #c2410c; }
.s2 { background: #b45309; }
.s3 { background: #3a7a4f; }
.s4 { background: #1a3a24; }
.guide-list { padding-left: 20px; color: var(--stone-700); }
.guide-list li { margin-bottom: 8px; }
.guide-sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--stone-200); }
.sidebar-card h3 { font-size: 1rem; color: var(--green-800); margin-bottom: 10px; }
.sidebar-card p, .sidebar-card li { font-size: .88rem; color: var(--stone-700); line-height: 1.55; }
.sidebar-card ul { padding-left: 18px; }
.sidebar-card li { margin-bottom: 6px; }
.sidebar-card strong { color: var(--stone-900); }

/* ===== Examples Section ===== */
.examples-section { padding: 64px 0; }
.examples-section h2 { font-size: 1.8rem; color: var(--green-900); margin-bottom: 8px; }
.section-hint { color: var(--stone-500); margin-bottom: 28px; font-size: .95rem; }
.example-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.example-card { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); border: 1px solid var(--stone-200); }
.example-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 12px; flex-wrap: wrap; }
.example-header h3 { font-size: 1.05rem; color: var(--green-900); }
.example-score { font-weight: 800; font-size: 1.1rem; padding: 4px 12px; border-radius: 20px; }
.score-low { background: #fef2f2; color: #991b1b; }
.score-medium { background: #fffbeb; color: #b45309; }
.score-high { background: #f0fdf4; color: #1a3a24; }
.example-card p { font-size: .9rem; color: var(--stone-700); margin-bottom: 14px; line-height: 1.55; }
.example-breakdown { display: flex; gap: 12px; flex-wrap: wrap; font-size: .82rem; font-weight: 600; color: var(--stone-500); }

/* ===== Footer ===== */
.site-footer { background: var(--green-900); color: rgba(255,255,255,.7); padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; margin-bottom: 32px; }
.footer-brand { font-weight: 700; color: #fff; font-size: 1.05rem; }
.footer-heading { font-weight: 700; color: #fff; font-size: .9rem; margin-bottom: 10px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { color: rgba(255,255,255,.7); text-decoration: none; font-size: .88rem; }
.footer-links a:hover { color: #fff; }
.footer-copy { text-align: center; font-size: .82rem; color: rgba(255,255,255,.4); border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; }

/* ===== Print ===== */
@media print {
  .site-header, .site-footer, .hero-actions, .hero-note, .score-actions, .form-actions, .comparison-wrap { display: none !important; }
  .hero-section { padding: 20px 0; }
  .hero-grid { display: block; }
  .score-panel { position: static; margin-bottom: 20px; }
  .score-panel-inner { box-shadow: none; border: 2px solid #333; }
  .category-fieldset { break-inside: avoid; }
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .score-panel { position: static; }
  .guide-grid { grid-template-columns: 1fr; }
  .hero-copy h1 { font-size: 1.8rem; }
  .criterion-header { flex-direction: column; align-items: flex-start; }
  .score-select { width: 100%; }
}
@media (max-width: 520px) {
  .site-nav { gap: 12px; }
  .site-nav a { font-size: .82rem; }
  .hero-copy h1 { font-size: 1.5rem; }
  .score-breakdown { grid-template-columns: 1fr; }
  .weight-grid { grid-template-columns: 1fr; }
  .example-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;
}
