:root {
  --bg: #f7f5f1;
  --surface: #ffffff;
  --ink: #1c241b;
  --muted: #5a6358;
  --line: #e3dfd4;
  --accent: #2f6b4c;
  --accent-ink: #ffffff;
  --warn: #b46200;
  --low: #2f6b4c;
  --med: #b46200;
  --high: #a83232;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(28,36,27,.04), 0 8px 24px rgba(28,36,27,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid; place-items: center;
}
.topnav { display: flex; gap: 16px; flex-wrap: wrap; }
.topnav a { color: var(--ink); font-size: 14px; }

main { max-width: 1100px; margin: 0 auto; padding: 32px 24px 64px; }
section { margin-bottom: 56px; }
.section-head { margin-bottom: 24px; }
.section-head h2 { margin: 0 0 6px; font-size: 28px; }
.section-head p { margin: 0; color: var(--muted); }

.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.hero h1 { font-size: 36px; line-height: 1.15; margin: 0 0 12px; }
.hero p { color: var(--muted); margin: 0 0 18px; }
.hero-actions { display: flex; gap: 10px; margin-bottom: 18px; }
.hero-stats { list-style: none; padding: 0; margin: 0; display: flex; gap: 24px; flex-wrap: wrap; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 22px; }
.hero-stats span { color: var(--muted); font-size: 13px; }

.hero-card {
  background: #f3f1ea;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--line);
}
.hero-card-title { font-size: 13px; color: var(--muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .04em; }
.hero-card-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.hero-card-row.total { border-bottom: none; margin-top: 8px; font-weight: 700; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: all .15s ease;
  background: var(--surface); color: var(--ink);
}
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.ghost:hover { background: #efede6; }
.btn.small { padding: 8px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.ws-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.presets { border-right: 1px solid var(--line); padding-right: 24px; }
.presets h3 { margin: 0 0 12px; font-size: 16px; }
.preset {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; margin-bottom: 8px;
  background: #f3f1ea; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; cursor: pointer;
}
.preset:hover { background: #ebe8df; }

.fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.fields label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.fields label span { color: var(--muted); }
.fields input, .fields select {
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  font-size: 14px; background: #fbfaf7; color: var(--ink);
}
.fields input:focus, .fields select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.fields .actions { grid-column: 1 / -1; display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

.plan-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
}
.plan-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.plan-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
}
.plan-item .rank {
  width: 32px; height: 32px; border-radius: 50%;
  background: #efede6; display: grid; place-items: center; font-weight: 700;
}
.plan-item .name { font-weight: 600; }
.plan-item .desc { color: var(--muted); font-size: 13px; margin-top: 2px; }
.plan-item .cost { font-size: 13px; text-align: right; }
.risk {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .03em;
}
.risk.low { background: #e3f2ea; color: var(--low); }
.risk.medium { background: #fde7c8; color: var(--med); }
.risk.high { background: #f6d4d4; color: var(--high); }

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 10px;
}

.plan-side { display: flex; flex-direction: column; gap: 16px; }
.side-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.side-card h3 { margin: 0 0 12px; font-size: 16px; }
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.summary-row strong { font-weight: 700; }
.side-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.saved-list { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.saved-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.saved-list li:last-child { border-bottom: none; }
.saved-list .muted { color: var(--muted); }
.saved-list button { font-size: 12px; padding: 4px 8px; }

.example-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.example {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.example h3 { margin: 0 0 6px; font-size: 18px; }
.example ol { padding-left: 20px; margin: 8px 0; font-size: 14px; }
.example li { margin-bottom: 4px; }
.example .note { font-size: 13px; color: var(--muted); margin-top: 8px; }

.mistake-list { list-style: none; padding: 0; margin: 0; }
.mistake-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  font-size: 14px;
}

.faq-list { margin: 0; padding: 0; }
.faq-list dt { font-weight: 700; margin-top: 14px; font-size: 15px; }
.faq-list dd { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.content-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.content-block h2 { margin-top: 0; }
.content-block h3 { margin-top: 20px; }

.footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 32px 24px;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px;
}
.footer-inner ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-inner p { color: var(--muted); margin: 6px 0 0; font-size: 14px; }
.footer-bottom {
  max-width: 1100px; margin: 16px auto 0;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  color: var(--muted); font-size: 13px;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 24px; }
  .hero h1 { font-size: 28px; }
  .ws-grid { grid-template-columns: 1fr; }
  .presets { border-right: none; padding-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
  .fields { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .example-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .topnav { display: none; }
}

@media print {
  .topnav, .hero-actions, .actions, .side-actions, .footer, .presets { display: none; }
  body { background: #fff; }
  .plan-item break-inside: avoid; }
}



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