/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --green-900: #1a3a25;
  --green-700: #2d5f3e;
  --green-500: #4a8c5c;
  --green-100: #e8f5e9;
  --cream: #f4efe8;
  --cream-dark: #e8dfd4;
  --ink: #1c1c1c;
  --ink-light: #4a4a4a;
  --gray-200: #e0e0e0;
  --gray-400: #9e9e9e;
  --red-700: #c62828;
  --red-100: #fce4ec;
  --blue-700: #1565c0;
  --blue-100: #e3f2fd;
  --yellow-700: #f57f17;
  --yellow-100: #fff8e1;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --max-width: 1120px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
}
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--ink); background: var(--cream); line-height: 1.6; }
img, svg { display: block; max-width: 100%; }
a { color: var(--green-700); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--green-900); }
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }
.skip-link { position: absolute; top: -100%; left: 1rem; background: var(--green-700); color: #fff; padding: 0.5rem 1rem; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { top: 1rem; }

/* ===== Header ===== */
.site-header { background: var(--green-900); color: #fff; padding: 0.75rem 0; position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { display: flex; align-items: center; gap: 0.5rem; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.logo:hover { color: var(--cream); }
.logo-accent { color: #a5d6a7; }
.main-nav ul { display: flex; list-style: none; gap: 1.25rem; }
.main-nav a { color: rgba(255,255,255,0.85); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* ===== Hero ===== */
.hero-section { background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 100%); color: #fff; padding: 3rem 0 2.5rem; }
.hero-section h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; line-height: 1.2; margin-bottom: 0.75rem; }
.hero-sub { font-size: 1.1rem; opacity: 0.9; max-width: 560px; }

/* ===== Checker Section ===== */
.checker-section { padding: 2.5rem 0; }
.checker-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 860px) {
  .checker-layout { grid-template-columns: 1fr 1fr; align-items: start; }
  .checker-results-col { position: sticky; top: 5rem; }
}

/* ===== Form ===== */
.form-block { border: none; margin-bottom: 1.5rem; }
.form-block legend { font-size: 1.1rem; font-weight: 700; color: var(--green-900); margin-bottom: 0.75rem; }
.field-group { margin-bottom: 1rem; }
.field-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink-light); margin-bottom: 0.3rem; }
.field-group input, .field-group select {
  width: 100%; padding: 0.65rem 0.85rem; border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 1rem; font-family: var(--font); background: #fff; transition: border-color 0.15s;
}
.field-group input:focus, .field-group select:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(74,140,92,0.15); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field-hint { font-size: 0.82rem; color: var(--gray-400); margin-bottom: 0.75rem; }

/* ===== Condition Cards ===== */
.condition-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.condition-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 1rem 0.5rem; border: 2px solid var(--gray-200); border-radius: var(--radius);
  cursor: pointer; transition: all 0.15s; background: #fff;
}
.condition-card:hover { border-color: var(--green-500); }
.condition-card input { position: absolute; opacity: 0; pointer-events: none; }
.condition-card:has(input:checked) { border-color: var(--green-700); background: var(--green-100); box-shadow: 0 0 0 2px var(--green-700); }
.condition-card:has(input:focus-visible) { outline: 2px solid var(--green-500); outline-offset: 2px; }
.card-visual { margin-bottom: 0.4rem; }
.card-label { font-weight: 700; font-size: 0.9rem; color: var(--ink); }
.card-desc { font-size: 0.72rem; color: var(--gray-400); margin-top: 0.15rem; }

/* ===== Buttons ===== */
.form-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn-primary {
  padding: 0.75rem 1.75rem; background: var(--green-700); color: #fff; border: none; border-radius: var(--radius-sm);
  font-size: 1rem; font-weight: 700; cursor: pointer; font-family: var(--font); transition: background 0.15s;
}
.btn-primary:hover { background: var(--green-900); }
.btn-primary:focus-visible { outline: 2px solid var(--green-900); outline-offset: 2px; }
.btn-secondary {
  padding: 0.65rem 1.25rem; background: #fff; color: var(--green-700); border: 2px solid var(--green-700);
  border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 600; cursor: pointer; font-family: var(--font); transition: all 0.15s;
}
.btn-secondary:hover { background: var(--green-100); }
.btn-secondary:focus-visible { outline: 2px solid var(--green-700); outline-offset: 2px; }

/* ===== Results Panel ===== */
.results-panel { background: #fff; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); min-height: 200px; }
.results-empty { display: flex; align-items: center; justify-content: center; }
.results-placeholder { text-align: center; color: var(--gray-400); }
.results-placeholder svg { margin: 0 auto 1rem; }
.verdict-bar { padding: 0.75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.verdict-fair { background: var(--green-100); }
.verdict-high { background: var(--red-100); }
.verdict-low { background: var(--blue-100); }
.verdict-badge { font-weight: 800; font-size: 0.85rem; padding: 0.2rem 0.65rem; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.5px; }
.verdict-fair .verdict-badge { background: var(--green-700); color: #fff; }
.verdict-high .verdict-badge { background: var(--red-700); color: #fff; }
.verdict-low .verdict-badge { background: var(--blue-700); color: #fff; }
.verdict-text { font-size: 0.95rem; font-weight: 500; }

/* ===== Price Range Bar ===== */
.price-range-display { margin-bottom: 1.5rem; }
.range-bar { position: relative; height: 8px; background: var(--gray-200); border-radius: 999px; margin-bottom: 0.5rem; }
.range-fill { position: absolute; top: 0; left: 0; height: 100%; background: linear-gradient(90deg, var(--green-500), var(--green-700)); border-radius: 999px; width: 100%; }
.range-marker {
  position: absolute; top: -6px; width: 20px; height: 20px; background: var(--green-900); border: 3px solid #fff;
  border-radius: 50%; transform: translateX(-50%); box-shadow: 0 1px 4px rgba(0,0,0,0.2); transition: left 0.3s;
}
.range-labels { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--ink-light); }
.range-mid { font-weight: 700; color: var(--green-700); }

/* ===== Comparison Table ===== */
.platform-comparison h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.comparison-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.comparison-table th { text-align: left; padding: 0.5rem 0.75rem; background: var(--cream); color: var(--ink-light); font-weight: 600; }
.comparison-table td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--gray-200); }
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table .price-match { font-weight: 700; color: var(--green-700); }
.comparison-table .price-high { color: var(--red-700); }
.comparison-table .price-low { color: var(--blue-700); }

/* ===== Results Actions ===== */
.results-actions { display: flex; gap: 0.5rem; margin-top: 1.25rem; flex-wrap: wrap; }

/* ===== How Section ===== */
.how-section { padding: 3rem 0; background: #fff; }
.how-section h2 { font-size: 1.5rem; font-weight: 800; color: var(--green-900); margin-bottom: 1.5rem; }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.how-card { padding: 1.25rem; background: var(--cream); border-radius: var(--radius); }
.how-num { width: 32px; height: 32px; background: var(--green-700); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.9rem; margin-bottom: 0.75rem; }
.how-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.how-card p { font-size: 0.9rem; color: var(--ink-light); }

/* ===== Mistakes Section ===== */
.mistakes-section { padding: 3rem 0; }
.mistakes-section h2 { font-size: 1.5rem; font-weight: 800; color: var(--green-900); margin-bottom: 1.5rem; }
.mistakes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.mistake-card { padding: 1.25rem; background: #fff; border-radius: var(--radius); border-left: 4px solid var(--yellow-700); box-shadow: var(--shadow); }
.mistake-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.4rem; }
.mistake-card p { font-size: 0.88rem; color: var(--ink-light); }

/* ===== Scenario Section ===== */
.scenario-section { padding: 3rem 0; background: #fff; }
.scenario-section h2 { font-size: 1.5rem; font-weight: 800; color: var(--green-900); margin-bottom: 1.5rem; }
.scenario-timeline { position: relative; padding-left: 2rem; }
.scenario-timeline::before { content: ''; position: absolute; left: 7px; top: 0; bottom: 0; width: 2px; background: var(--green-500); }
.timeline-step { position: relative; margin-bottom: 2rem; }
.timeline-step:last-child { margin-bottom: 0; }
.step-dot { position: absolute; left: -2rem; top: 4px; width: 16px; height: 16px; background: var(--green-700); border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--green-700); }
.step-content h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.3rem; }
.step-content p { font-size: 0.9rem; color: var(--ink-light); }

/* ===== History Section ===== */
.history-section { padding: 3rem 0; }
.history-section h2 { font-size: 1.5rem; font-weight: 800; color: var(--green-900); margin-bottom: 0.25rem; }
.section-hint { font-size: 0.85rem; color: var(--gray-400); margin-bottom: 1rem; }
.history-list { display: grid; gap: 0.75rem; }
.history-empty { color: var(--gray-400); font-size: 0.9rem; }
.history-item { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow); gap: 1rem; flex-wrap: wrap; }
.history-item-title { font-weight: 600; font-size: 0.9rem; }
.history-item-meta { font-size: 0.8rem; color: var(--gray-400); }
.history-item-price { font-weight: 700; font-size: 0.95rem; }
.history-verdict { font-size: 0.75rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 999px; text-transform: uppercase; }
.history-verdict-fair { background: var(--green-100); color: var(--green-700); }
.history-verdict-high { background: var(--red-100); color: var(--red-700); }
.history-verdict-low { background: var(--blue-100); color: var(--blue-700); }

/* ===== FAQ Section ===== */
.faq-section { padding: 3rem 0; background: #fff; }
.faq-section h2 { font-size: 1.5rem; font-weight: 800; color: var(--green-900); margin-bottom: 1.25rem; }
.faq-list dt { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.3rem; margin-top: 1.25rem; }
.faq-list dt:first-child { margin-top: 0; }
.faq-list dd { font-size: 0.9rem; color: var(--ink-light); }

/* ===== Footer ===== */
.site-footer { background: var(--green-900); color: rgba(255,255,255,0.8); padding: 2rem 0; }
.footer-inner { display: flex; flex-direction: column; gap: 1rem; }
.footer-brand .logo-text { color: #fff; font-size: 1.1rem; }
.footer-tagline { font-size: 0.85rem; opacity: 0.7; margin-top: 0.25rem; }
.footer-nav ul { display: flex; list-style: none; gap: 1rem; flex-wrap: wrap; }
.footer-nav a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.85rem; }
.footer-nav a:hover { color: #fff; }
.footer-note { font-size: 0.78rem; opacity: 0.5; }
@media (min-width: 640px) {
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ===== Print ===== */
@media print {
  .site-header, .site-footer, .form-actions, .results-actions, .history-section, .how-section, .mistakes-section, .scenario-section, .faq-section { display: none; }
  .hero-section { background: none; color: #000; padding: 1rem 0; }
  .checker-section { padding: 0; }
  .checker-layout { display: block; }
  .checker-form-col { display: none; }
  .checker-results-col { position: static; }
  .results-panel { box-shadow: none; border: 1px solid #ccc; }
}

/* ===== Responsive Tweaks ===== */
@media (max-width: 480px) {
  .condition-cards { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .hero-section { padding: 2rem 0 1.5rem; }
}



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