/* ============================================
   Grow a Garden Calculator - Design System
   ============================================ */

:root {
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-300: #86efac;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-800: #166534;
  --green-900: #14532d;

  --lime-400: #a3e635;
  --lime-500: #84cc16;

  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --red-400: #f87171;
  --red-500: #ef4444;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;

  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-card: #ffffff;
  --bg-input: #ffffff;
  --bg-inset: #f1f5f9;

  --text: #0f172a;
  --text-soft: #475569;
  --text-muted: #94a3b8;

  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --primary: var(--green-600);
  --primary-hover: var(--green-700);
  --primary-soft: var(--green-50);
  --accent: var(--lime-500);

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --max-w: 1200px;
  --nav-h: 68px;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

html[data-theme="dark"] {
  --bg: #0b1120;
  --bg-soft: #0f172a;
  --bg-card: #111c33;
  --bg-input: #0f172a;
  --bg-inset: #1a2740;

  --text: #e2e8f0;
  --text-soft: #94a3b8;
  --text-muted: #64748b;

  --border: #1e2d4a;
  --border-strong: #2d3f5f;

  --primary: var(--green-500);
  --primary-hover: var(--green-400);
  --primary-soft: rgba(34, 197, 94, 0.12);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 8px 8px;
  z-index: 2000;
  font-weight: 600;
}
.skip-link:focus { top: 0; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--green-500), var(--lime-500));
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
}

.brand span { color: var(--primary); }

.nav { display: flex; align-items: center; gap: 4px; }

.nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-soft);
  transition: all 0.2s ease;
}
.nav a:hover, .nav a.active { color: var(--primary); background: var(--primary-soft); }

.header-actions { display: flex; align-items: center; gap: 10px; }

/* Theme toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--bg-inset);
  color: var(--text-soft);
  font-size: 1.15rem;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
}
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); }

.theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* Hamburger */
.hamburger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  place-items: center;
  background: var(--bg-inset);
  border: 1px solid var(--border);
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: 0.3s;
}
.hamburger span::before, .hamburger span::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: 0.3s;
}
.hamburger span::before { top: -6px; }
.hamburger span::after { top: 6px; }
.hamburger.open span { background: transparent; }
.hamburger.open span::before { top: 0; transform: rotate(45deg); }
.hamburger.open span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  line-height: 1.3;
}
.btn-primary {
  background: linear-gradient(135deg, var(--green-500), var(--green-600));
  color: #fff;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(34, 197, 94, 0.45);
}
.btn-secondary {
  background: var(--bg-inset);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.btn-lg { padding: 15px 34px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 60px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 70% 20%, rgba(34, 197, 94, 0.1), transparent),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(132, 204, 22, 0.08), transparent);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}
.hero h1 .grad {
  background: linear-gradient(135deg, var(--green-500), var(--lime-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-soft);
  margin-bottom: 28px;
  max-width: 540px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.hero-stat strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
}
.hero-stat span { font-size: 0.85rem; color: var(--text-muted); }

/* Hero tool card */
.hero-tool {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 26px;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: fadeUp 0.7s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-tool h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.hero-tool .tool-sub { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 20px; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 7px;
  color: var(--text);
}
.field .hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 5px; }

.input, .select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text);
  transition: border 0.2s, box-shadow 0.2s;
}
.input:focus, .select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}
.input::placeholder { color: var(--text-muted); }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-soft);
  cursor: pointer;
  user-select: none;
}
.checkbox-row input { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }

/* Error message */
.error-msg {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--red-500);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 14px;
  display: none;
}
.error-msg.show { display: block; }

/* ---------- Results ---------- */
.results {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 18px;
  display: none;
}
.results.show { display: block; animation: fadeUp 0.35s ease both; }

.result-main {
  text-align: center;
  padding: 14px 0 18px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 16px;
}
.result-main .label { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.result-main .value {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
  word-break: break-word;
}
.result-main .unit { font-size: 1rem; color: var(--text-soft); font-weight: 600; }

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.result-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}
.result-item .r-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.result-item .r-value { font-size: 1.15rem; font-weight: 700; color: var(--text); margin-top: 2px; word-break: break-word; }

.result-note {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-top: 14px;
  line-height: 1.5;
}

.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* WFL badge */
.wfl-badge {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  margin-top: 6px;
}
.wfl-win { background: rgba(34, 197, 94, 0.15); color: var(--green-500); border: 2px solid var(--green-500); }
.wfl-fair { background: rgba(245, 158, 11, 0.15); color: var(--amber-500); border: 2px solid var(--amber-500); }
.wfl-lose { background: rgba(239, 68, 68, 0.15); color: var(--red-500); border: 2px solid var(--red-500); }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head .eyebrow {
  display: inline-block;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  line-height: 1.2;
}
.section-head p { color: var(--text-soft); font-size: 1.05rem; }

/* ---------- Cards / Features ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: var(--primary-soft);
  margin-bottom: 18px;
}
.card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--text-soft); font-size: 0.94rem; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 22px; max-width: 760px; margin: 0 auto; }
.step {
  display: flex;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.step-num {
  counter-increment: step;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green-500), var(--lime-500));
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  display: grid;
  place-items: center;
}
.step-num::before { content: counter(step); }
.step h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 5px; }
.step p { color: var(--text-soft); font-size: 0.94rem; }

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-inset);
  padding: 6px;
  border-radius: var(--radius);
  margin-bottom: 26px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  flex: 1;
  min-width: max-content;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-soft);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp 0.3s ease both; }

/* ---------- Tool Page Layout ---------- */
.tool-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: start;
}
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 30px;
  box-shadow: var(--shadow);
}
.tool-card h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 6px; }
.tool-card .tool-desc { color: var(--text-soft); font-size: 0.93rem; margin-bottom: 22px; }

/* Info sidebar */
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}
.info-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-card ul { display: grid; gap: 9px; }
.info-card li {
  font-size: 0.9rem;
  color: var(--text-soft);
  padding-left: 18px;
  position: relative;
}
.info-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 800px; margin: 0 auto; display: grid; gap: 14px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  text-align: left;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: background 0.2s;
}
.faq-q:hover { background: var(--bg-inset); }
.faq-q .chev {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 700;
  transition: transform 0.3s;
  font-size: 0.85rem;
}
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-a-inner {
  padding: 0 22px 18px;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.blog-thumb {
  height: 170px;
  background: linear-gradient(135deg, var(--green-600), var(--lime-500));
  display: grid;
  place-items: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}
.blog-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.2), transparent 60%);
}
.blog-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.blog-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  width: fit-content;
}
.blog-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; line-height: 1.35; }
.blog-body p { color: var(--text-soft); font-size: 0.9rem; flex: 1; }
.blog-meta { margin-top: 16px; font-size: 0.82rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.blog-link {
  margin-top: 14px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.2s;
}
.blog-card:hover .blog-link { gap: 10px; }

/* Article */
.article {
  max-width: 800px;
  margin: 0 auto;
}
.article h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  line-height: 1.2;
}
.article-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.article h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 38px 0 14px;
  letter-spacing: -0.01em;
}
.article h3 { font-size: 1.2rem; font-weight: 700; margin: 26px 0 10px; }
.article p { color: var(--text-soft); margin-bottom: 16px; line-height: 1.75; }
.article ul, .article ol { margin: 0 0 18px 1.4rem; color: var(--text-soft); }
.article ul { list-style: disc; }
.article ol { list-style: decimal; }
.article li { margin-bottom: 8px; line-height: 1.65; }
.article strong { color: var(--text); }
.article a { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.article blockquote {
  border-left: 4px solid var(--primary);
  background: var(--primary-soft);
  padding: 16px 22px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 22px 0;
  color: var(--text);
  font-style: italic;
}
.article .table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--border); border-radius: var(--radius); }
.article table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.article th, .article td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.article th { background: var(--bg-inset); font-weight: 700; color: var(--text); }
.article td { color: var(--text-soft); }
.article tr:last-child td { border-bottom: none; }

/* ---------- Page Hero (inner pages) ---------- */
.page-hero {
  padding: 56px 0 44px;
  background:
    radial-gradient(ellipse 50% 60% at 50% 0%, rgba(34, 197, 94, 0.09), transparent),
    var(--bg-soft);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}
.page-hero p { color: var(--text-soft); max-width: 640px; margin: 0 auto; font-size: 1.05rem; }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  justify-content: center;
}
.breadcrumb a { color: var(--text-soft); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text-muted); }

/* ---------- Content pages ---------- */
.content-page { max-width: 820px; margin: 0 auto; padding: 56px 20px; }
.content-page h1 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); font-weight: 800; margin-bottom: 8px; letter-spacing: -0.02em; }
.content-page .updated { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 32px; }
.content-page h2 { font-size: 1.35rem; font-weight: 700; margin: 34px 0 12px; }
.content-page h3 { font-size: 1.1rem; font-weight: 700; margin: 24px 0 8px; }
.content-page p { color: var(--text-soft); margin-bottom: 14px; line-height: 1.75; }
.content-page ul, .content-page ol { margin: 0 0 16px 1.4rem; color: var(--text-soft); }
.content-page ul { list-style: disc; }
.content-page ol { list-style: decimal; }
.content-page li { margin-bottom: 7px; line-height: 1.65; }
.content-page a { color: var(--primary); font-weight: 600; }
.content-page strong { color: var(--text); }

/* ---------- Contact form ---------- */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 34px;
  box-shadow: var(--shadow);
}
.form-status {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.92rem;
  display: none;
}
.form-status.success { display: block; background: rgba(34,197,94,0.12); color: var(--green-500); border: 1px solid rgba(34,197,94,0.3); }
.form-status.error { display: block; background: rgba(239,68,68,0.1); color: var(--red-500); border: 1px solid rgba(239,68,68,0.3); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--green-700), var(--green-600) 50%, var(--lime-500));
  border-radius: var(--radius-xl);
  padding: 54px 40px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.12), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.08), transparent 40%);
}
.cta-band > * { position: relative; }
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; margin-bottom: 12px; letter-spacing: -0.02em; }
.cta-band p { opacity: 0.92; max-width: 560px; margin: 0 auto 26px; font-size: 1.05rem; }
.cta-band .btn { background: #fff; color: var(--green-700); font-weight: 700; }
.cta-band .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 56px 0 0;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 40px;
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { color: var(--text-soft); font-size: 0.92rem; max-width: 300px; line-height: 1.65; }

.footer h4 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text);
  margin-bottom: 16px;
}
.footer-links { display: grid; gap: 10px; }
.footer-links a { color: var(--text-soft); font-size: 0.92rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary); }

.social-row { display: flex; gap: 10px; margin-top: 18px; }
.social-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-soft);
  transition: all 0.2s;
}
.social-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-3px);
}
.social-btn svg { width: 18px; height: 18px; fill: currentColor; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.86rem;
  color: var(--text-muted);
}
.footer-bottom a { color: var(--text-soft); }
.footer-bottom a:hover { color: var(--primary); }
.footer-legal { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- Scroll to top ---------- */
.scroll-top {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: all 0.3s ease;
  z-index: 900;
}
.scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { background: var(--primary-hover); transform: translateY(-3px); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Copy toast */
.toast {
  position: fixed;
  bottom: 90px;
  right: 26px;
  background: var(--text);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1500;
}
.toast.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding: 52px 0 48px; }
  .tool-layout { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 14px 20px 22px;
    gap: 4px;
    transform: translateY(-140%);
    transition: transform 0.32s ease;
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 13px 16px; font-size: 1rem; border-radius: var(--radius); }
  .hamburger { display: grid; }

  .grid-3, .grid-2, .blog-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 52px 0; }
  .hero h1 { font-size: 1.85rem; }
  .hero-stats { gap: 16px; }
  .hero-cta .btn { width: 100%; }
  .tool-card { padding: 22px 18px; }
  .hero-tool { padding: 20px 18px; }
  .cta-band { padding: 40px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .grid-4 { grid-template-columns: 1fr; }
  .step { flex-direction: column; gap: 14px; }
  .content-page, .article { padding-left: 0; padding-right: 0; }
  .page-hero { padding: 40px 0 32px; }
  .form-card { padding: 24px 18px; }
}

@media (max-width: 360px) {
  .container { padding: 0 14px; }
  .brand { font-size: 1.02rem; }
  .tab-btn { padding: 10px 12px; font-size: 0.82rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
