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

:root {
  --color-primary: #2c5f2d;
  --color-primary-dark: #1e3f1f;
  --color-secondary: #f4a261;
  --color-accent: #e76f51;
  --color-bg: #fdfcf8;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-light: #555;
  --color-border: #ddd;
  --color-focus: #2c5f2d;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --max-width: 960px;
  --spacing: 1.5rem;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 700;
  color: var(--color-primary-dark);
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover,
a:focus {
  color: var(--color-primary-dark);
}

/* ===== Header & Navigation ===== */
.site-header {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-list a {
  text-decoration: none;
  font-weight: 500;
  color: var(--color-text);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

.nav-list a:hover,
.nav-list a:focus {
  border-bottom-color: var(--color-primary);
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #e8f5e9 0%, #fdfcf8 100%);
  padding: 3rem 0 2rem;
  text-align: center;
}

.subtitle {
  font-size: 1.2rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Planner Section ===== */
.planner-section {
  padding: 2rem 0;
}

.planner-form {
  background: var(--color-surface);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

fieldset {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

legend {
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0 0.5rem;
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--color-primary);
}

.form-row {
  margin-bottom: 1.5rem;
}

.form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.form-row input[type="text"],
.form-row input[type="date"] {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-row input:focus {
  outline: none;
  border-color: var(--color-focus);
  box-shadow: 0 0 0 3px rgba(44, 95, 45, 0.2);
}

.form-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.btn-primary,
.btn-secondary {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--color-primary-dark);
}

.btn-secondary {
  background-color: #e0e0e0;
  color: var(--color-text);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: #ccc;
}

.btn-primary:active,
.btn-secondary:active {
  transform: scale(0.98);
}

/* ===== Plan Output ===== */
.plan-output {
  background: var(--color-surface);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  display: none; /* Hidden by default */
}

.plan-output.active {
  display: block;
}

.plan-output h3 {
  color: var(--color-primary-dark);
  border-bottom: 2px solid var(--color-secondary);
  padding-bottom: 0.5rem;
  margin-top: 1.5rem;
}

.plan-output ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.plan-output .print-btn {
  margin-top: 1rem;
}

/* ===== Saved Plans ===== */
.saved-plans {
  background: var(--color-surface);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.saved-plans h3 {
  margin-bottom: 1rem;
}

#saved-plans-list {
  list-style: none;
}

#saved-plans-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}

#saved-plans-list li:last-child {
  border-bottom: none;
}

.saved-plan-name {
  font-weight: 500;
}

.saved-plan-actions button {
  background: none;
  border: 1px solid var(--color-border);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  margin-left: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
}

.saved-plan-actions button:hover {
  background-color: #f0f0f0;
}

/* ===== Content Sections ===== */
.content-section,
.faq-section {
  padding: 2rem 0;
}

.guide-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.faq-list {
  max-width: 700px;
}

.faq-list dt {
  font-weight: 600;
  margin-top: 1.5rem;
  font-size: 1.1rem;
}

.faq-list dd {
  margin-left: 0;
  margin-top: 0.5rem;
  color: var(--color-text-light);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

/* ===== Footer ===== */
.site-footer {
  background-color: var(--color-primary-dark);
  color: white;
  padding: 2rem 0;
  margin-top: auto;
  text-align: center;
}

.site-footer a {
  color: var(--color-secondary);
}

.site-footer .version {
  font-size: 0.85rem;
  margin-top: 0.5rem;
  opacity: 0.8;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-list {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .planner-form {
    padding: 1.5rem;
  }

  .checkbox-group {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }

  h1 {
    font-size: 1.8rem;
  }
}



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