:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #5c5c5c;
  --border: #e8e4df;
  --accent: #2d6a4f;
  --accent-light: #d8f3dc;
  --overdue: #c1121f;
  --overdue-bg: #fde8e8;
  --soon: #b45309;
  --soon-bg: #fef3c7;
  --ok: #2d6a4f;
  --ok-bg: #d8f3dc;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(26, 26, 26, 0.06);
  --font: "Source Sans 3", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1rem; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: #1b4332; }

.container {
  width: min(720px, 92vw);
  margin: 0 auto;
  padding: 0 0 4rem;
}

.container--wide {
  width: min(960px, 92vw);
}

/* Header */
.site-header {
  padding: 1.25rem 0;
  margin-bottom: 2rem;
}

.site-header__inner {
  width: min(960px, 92vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.logo-tld { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
}

.nav-links a:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s, box-shadow 0.12s;
}

.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(45, 106, 79, 0.25);
}

.btn--primary:hover { color: #fff; background: #1b4332; }

.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn--ghost {
  background: transparent;
  color: var(--muted);
  padding: 0.5rem 0.75rem;
}

.btn--danger {
  background: transparent;
  color: var(--overdue);
  border: 1.5px solid var(--overdue-bg);
}

.btn--block { width: 100%; }

.btn--lg {
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.35rem;
}

.card + .card { margin-top: 0.75rem; }

/* Grids handle spacing via gap — don't stack card margins too */
.pain-grid > .card,
.features > .card,
.testimonial-grid > .card,
.faq-list > .card {
  margin-top: 0;
}

.card--status-overdue { border-left: 4px solid var(--overdue); }
.card--status-due_soon { border-left: 4px solid var(--soon); }
.card--status-ok { border-left: 4px solid var(--ok); }

/* Status badges */
.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.badge--overdue { background: var(--overdue-bg); color: var(--overdue); }
.badge--due_soon { background: var(--soon-bg); color: var(--soon); }
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--lifetime { background: #ede9fe; color: #5b21b6; }

/* Item rows */
.item-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.item-row__main { flex: 1; min-width: 0; }

.item-row__title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.item-row__meta {
  font-size: 0.88rem;
  color: var(--muted);
}

.item-row__actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-shrink: 0;
}

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 0 2.5rem;
}

.hero__eyebrow {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.hero__tagline {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 34rem;
  margin: 0.75rem auto 2rem;
}

.hero__fine {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 1rem 0 0;
}

.hero__cta {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Feature grid */
.features {
  display: grid;
  gap: 1rem;
  margin: 2.5rem 0;
}

@media (min-width: 600px) {
  .features { grid-template-columns: repeat(3, 1fr); }
}

.feature {
  text-align: center;
  padding: 1.25rem;
}

.feature__icon { font-size: 2rem; margin-bottom: 0.5rem; }

/* Section headers */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 2rem 0 0.75rem;
}

.section-head h2 { margin: 0; }

.section-head__count {
  font-size: 0.88rem;
  color: var(--muted);
}

/* Forms */
.form-group { margin-bottom: 1.1rem; }

label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: var(--font);
  font-size: 1rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.help-text, .helptext {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.errorlist {
  margin: 0.3rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--overdue);
  font-size: 0.85rem;
}

/* Template picker */
.template-grid {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0;
}

.template-option {
  display: block;
  cursor: pointer;
}

.template-option input { display: none; }

.template-option__card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.12s, background 0.12s;
}

.template-option input:checked + .template-option__card {
  border-color: var(--accent);
  background: var(--accent-light);
}

.template-option__icon { font-size: 1.5rem; }

.template-option__name {
  font-weight: 700;
  font-size: 0.98rem;
}

.template-option__tagline {
  font-size: 0.82rem;
  color: var(--muted);
}

.category-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 1.5rem 0 0.5rem;
}

/* Pricing */
.pricing-card {
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 420px;
  margin: 0 auto;
}

.pricing-card__price {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0.5rem 0;
}

.pricing-card__price small {
  font-size: 1rem;
  color: var(--muted);
  font-family: var(--font);
}

.pricing-features {
  text-align: left;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.pricing-features li {
  padding: 0.45rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.pricing-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Messages */
.messages {
  width: min(720px, 92vw);
  margin: 0 auto 1rem;
  padding-top: 1rem;
}

.message {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
}

.message--success { background: var(--accent-light); color: #1b4332; }
.message--info { background: #e0f2fe; color: #0369a1; }
.message--warning { background: var(--soon-bg); color: var(--soon); }
.message--error { background: var(--overdue-bg); color: var(--overdue); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--muted);
}

.empty-state__icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

/* Detail page */
.detail-hero {
  margin-bottom: 1.5rem;
}

.tip-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  font-size: 0.92rem;
  margin: 1rem 0;
}

.tip-box strong { color: #0369a1; }

.affiliate-cta {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.5rem 0;
  text-align: center;
}

.affiliate-cta p {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.affiliate-disclosure {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 1rem;
}

/* Usage meter */
.usage-meter {
  font-size: 0.88rem;
  color: var(--muted);
  padding: 0.65rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-block;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding: 2rem 0;
  background: var(--surface);
}

.site-footer__inner {
  width: min(960px, 92vw);
  margin: 0 auto;
  text-align: center;
}

.site-footer p {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.site-footer__affiliate {
  font-size: 0.8rem !important;
  max-width: 28rem;
  margin-left: auto !important;
  margin-right: auto !important;
}

.site-footer__affiliate a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.affiliate-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
  font-style: italic;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: center;
  font-size: 0.85rem;
}

.site-footer__links a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--accent);
}

/* Legal pages */
.legal-page {
  padding-top: 0.5rem;
  padding-bottom: 2rem;
}

.legal-page h2 {
  margin-top: 2rem;
  font-size: 1.2rem;
}

.legal-page ul {
  padding-left: 1.25rem;
}

.legal-page li {
  margin-bottom: 0.4rem;
}

.legal-updated {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Landing SEO sections */
.section-title {
  text-align: center;
  font-size: 1.65rem;
  margin: 2.5rem 0 0.5rem;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  max-width: 32rem;
  margin: 0 auto 1.5rem;
  font-size: 0.95rem;
}

.pain-grid {
  display: grid;
  gap: 0.85rem;
  margin: 1.25rem 0 2rem;
}

@media (min-width: 640px) {
  .pain-grid { grid-template-columns: repeat(2, 1fr); }
}

.pain-card {
  padding: 1.1rem 1.2rem;
}

.pain-card strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.pain-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.track-section {
  margin: 2.5rem 0;
}

.track-list {
  display: grid;
  gap: 0.5rem 1.5rem;
  list-style: none;
  padding: 0;
  max-width: 36rem;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .track-list { grid-template-columns: repeat(2, 1fr); }
}

.track-list li {
  font-size: 0.95rem;
  padding: 0.4rem 0;
}

.testimonials-section {
  margin: 2.5rem 0;
}

.testimonial-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
  align-items: start;
}

@media (min-width: 700px) {
  .testimonial-grid { grid-template-columns: repeat(3, 1fr); }
}

.testimonial-card {
  padding: 1.2rem 1.25rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.testimonial-card__header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
  min-height: 72px;
}

.testimonial-card__photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.testimonial-card__name {
  display: block;
  font-size: 0.98rem;
}

.testimonial-card__location {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

.testimonial-card__badge {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.testimonial-card__quote {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
}

.faq-section {
  margin: 2.5rem 0;
}

.faq-list {
  display: grid;
  gap: 0.65rem;
  max-width: 40rem;
  margin: 1rem auto 0;
}

.faq-item {
  padding: 0;
  overflow: hidden;
}

.faq-item summary {
  padding: 1rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-weight: 700;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding: 0 1.2rem 1rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  border-top: 1px solid var(--border);
  padding-top: 0.85rem;
}

.cta-card {
  text-align: center;
  padding: 2rem 1.5rem;
  margin-top: 2rem;
}

.cta-card p {
  color: var(--muted);
  max-width: 28rem;
  margin: 0.5rem auto 1.25rem;
}

.cta-card__note {
  font-size: 0.82rem !important;
  margin-top: 1.25rem !important;
  margin-bottom: 0 !important;
}
