:root {
  --color-primary: #26a156;
  --color-primary-dark: #1e7f44;
  --color-text: #2f3b40;
  --color-heading: #222222;
  --color-muted: #6b7280;
  --color-border: #d7dce1;
  --color-bg: #f7f8f6;
  --color-surface: #ffffff;
  --color-error-bg: #fdecec;
  --color-error-text: #9b1c1c;
  --color-success-bg: #eaf6ee;
  --color-success-text: #1b5e33;
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Poppins', -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  color: var(--color-heading);
}

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

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--color-primary-dark);
}
.brand__logo { height: 52px; width: auto; display: block; }
.main-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.main-nav a { text-decoration: none; }

.bell-link { position: relative; font-size: 1.1rem; }
.bell-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: #d9463c;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.2rem 0.35rem;
  border-radius: 999px;
  min-width: 1rem;
  text-align: center;
}
.greeting { color: var(--color-muted); }

.inline-form { display: inline; }
.link-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-primary-dark);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}

.site-main { max-width: 960px; margin: 0 auto; padding: 1.5rem; }
.container { max-width: 960px; }
.container--narrow { max-width: 480px; margin: 0 auto; }

.auth-illustration { max-width: 520px; margin: 0.5rem auto 1.5rem; background: #ffffff; border-radius: 8px; }
.auth-illustration img { display: block; width: 100%; height: auto; }

.site-footer {
  text-align: center;
  color: var(--color-muted);
  font-size: 0.85rem;
  padding: 2rem 1rem;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}
.flash p { margin: 0; }
.flash--error { background: var(--color-error-bg); color: var(--color-error-text); }
.flash--success { background: var(--color-success-bg); color: var(--color-success-text); }

.form { display: flex; flex-direction: column; gap: 0.35rem; margin: 1rem 0; }
.form label { font-weight: 600; margin-top: 0.5rem; }
.form input, .form textarea, .form select {
  padding: 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font: inherit;
}
.radio-group { display: flex; gap: 1.5rem; margin: 0.25rem 0 0.5rem; }

.reminder-grid { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1rem; }
.reminder-grid th, .reminder-grid td {
  padding: 0.6rem;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}
.reminder-grid th:first-child, .reminder-grid td:first-child { text-align: left; font-weight: 600; }
.reminder-grid thead th { color: var(--color-muted); font-weight: 600; font-size: 0.85rem; }
.reminder-grid input[type="checkbox"] { width: 1.1rem; height: 1.1rem; }
.radio-option { display: flex; align-items: center; gap: 0.4rem; font-weight: 400; margin-top: 0; }
.radio-option input { width: auto; }

.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 5px;
  border: none;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn--primary { background: var(--color-primary); color: #000; }
.btn--primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn--secondary { background: var(--color-surface); color: var(--color-primary-dark); border: 1px solid var(--color-primary); }

.progress-meter {
  width: 100%;
  height: 16px;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.5rem;
}
.progress-meter__bar {
  height: 100%;
  background: var(--color-primary);
  transition: width 0.3s ease;
}
.progress-meter__label { color: var(--color-muted); margin: 0.25rem 0 1rem; }

.all-done { font-weight: 600; color: var(--color-success-text); }

.checklist { list-style: none; padding: 0; margin: 1rem 0; }
.checklist__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}
.checklist__item--complete { opacity: 0.7; }
.checklist__status { font-size: 1.2rem; color: var(--color-primary); width: 1.2rem; text-align: center; }
.checklist__title { flex: 1; font-weight: 600; text-decoration: none; }
.checklist__date { color: var(--color-muted); font-size: 0.9rem; }

.step-icon { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; }
.step-icon--lg { width: 44px; height: 44px; border-radius: 10px; vertical-align: middle; margin-right: 0.5rem; }

.view-toggle { display: flex; gap: 0.5rem; margin: 1.5rem 0 0.5rem; }
.view-toggle__btn {
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--color-text);
}
.view-toggle__btn.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

.calendar-view { margin-top: 1rem; }
.calendar-legend { color: var(--color-muted); font-size: 0.85rem; margin-bottom: 0.75rem; }
.calendar-legend__swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; }
.calendar-legend__swatch--solid { background: var(--color-primary); }
.calendar-legend__swatch--outline { border: 2px solid var(--color-primary); }
#calendar { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; padding: 1rem; }

.embed-container { margin: 1rem 0; }
.embed-loading {
  color: var(--color-muted);
  padding: 2rem;
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
.embed-iframe { width: 100%; height: 480px; border: 1px solid var(--color-border); border-radius: 8px; }
.embed-fallback-note {
  color: var(--color-muted);
  padding: 1.5rem;
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin: 0;
}
.embed-fallback { margin: 0.5rem 0 0; font-size: 0.9rem; }

.step-description {
  color: var(--color-text);
  border-left: 4px solid transparent;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}
.step-description p { margin: 0 0 0.5rem; white-space: pre-line; }
.step-description p:last-child { margin-bottom: 0; }
.step-description__link { font-size: 0.9rem; }
.step-status { margin: 1rem 0; }

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  vertical-align: middle;
}
.badge--optional { background: #fdf3d9; color: #8a6400; }
.badge--active { background: #eaf6ee; color: #1b5e33; }
.badge--pending { background: #fdf3d9; color: #8a6400; }
.badge--revoked { background: #fdecec; color: #9b1c1c; }

.item-checklist { list-style: none; padding: 0; margin: 1rem 0; }
.item-checklist--nested { margin: 0.5rem 0 0.5rem 1.75rem; }
.item-checklist__item {
  padding: 0.5rem 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}
.item-checklist--nested .item-checklist__item { background: var(--color-bg); }
.item-checklist__item label { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; }
.item-checkbox { width: 1.1rem; height: 1.1rem; }

.home-hero { text-align: center; padding: 3rem 1rem; }
.home-hero__actions { display: flex; gap: 1rem; justify-content: center; margin-top: 1.5rem; }

.get-help-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.get-help-btn:hover { background: var(--color-primary-dark); }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal {
  position: relative;
  background: var(--color-surface);
  border-radius: 10px;
  padding: 1.5rem;
  max-width: 420px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-muted);
}

.report-meta { color: var(--color-muted); margin: 1rem 0; }
.report-step {
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 0.75rem;
}
.report-step h2 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.report-step__status { color: var(--color-muted); margin: 0 0 0.5rem; }
.report-step__notes { margin: 0; white-space: pre-line; }

@media print {
  .site-header, .site-footer, .get-help-btn, .modal-overlay,
  .view-toggle, .btn, button, .link-button, input[type="file"] { display: none !important; }
  .report-step { break-inside: avoid; }
}
