/* ============================================
   Manley Farms - Agricultural Event Monitor
   Dark earthy theme for agricultural audience
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

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

body {
  overflow-x: clip;
  max-width: 100%;
}

/* Fallback for browsers without overflow: clip */
@supports not (overflow-x: clip) {
  body { overflow-x: hidden; }
}

img {
  max-width: 100%;
  height: auto;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 2000;
  background: var(--accent-primary, #4a7c59);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus,
.skip-link:focus-visible {
  left: 12px;
  outline: 2px solid #fff;
  outline-offset: 2px;
  color: #fff;
}

/* Consistent keyboard focus ring across the site */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-secondary, #8fbc8f);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Remove default focus only when focus-visible is supported and unused */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

:root {
  --bg-primary: #1a1f16;
  --bg-card: #242b1e;
  --bg-card-hover: #2c3425;
  --accent-primary: #4a7c59;
  --accent-secondary: #8fbc8f;
  --text-primary: #e8e4d9;
  --text-muted: #9a9684;
  --text-heading: #f0ece2;
  --border-color: rgba(74, 124, 89, 0.2);
  --border-active: rgba(74, 124, 89, 0.5);
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  --radius: 8px;
  --radius-lg: 12px;

  /* category colors */
  --cat-wildfire: #e85d3a;
  --cat-storm: #4a8fe8;
  --cat-flood: #3ac5c9;
  --cat-volcanic: #e89c3a;
  --cat-other: #8a8a8a;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-heading);
  line-height: 1.3;
}

a {
  color: var(--accent-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-primary);
}

/* --- Layout --- */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Header --- */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* .logo-icon-old { 
  width: 36px;
  height: 36px;
  background: var(--accent-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
} */

.site-logo h1 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.header-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(74, 124, 89, 0.12);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 48px 20px 32px;
}

.hero h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 16px;
  line-height: 1.7;
}

.hero-privacy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--accent-secondary);
  background: rgba(74, 124, 89, 0.1);
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.hero-privacy::before {
  content: "\2713";
  font-weight: 700;
}

/* --- Stats Bar --- */
.stats-bar {
  display: flex;
  gap: 12px;
  padding: 0 20px 16px;
  max-width: 1400px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stat-dot.total { background: var(--accent-primary); }
.stat-dot.wildfire { background: var(--cat-wildfire); }
.stat-dot.storm { background: var(--cat-storm); }

.stat-value {
  font-weight: 600;
  color: var(--text-heading);
}

.stat-label {
  color: var(--text-muted);
}

.stat-timestamp {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* --- Filter Bar --- */
.filter-bar {
  display: flex;
  gap: 8px;
  padding: 0 20px 16px;
  max-width: 1400px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

/* --- State Grid --- */
.state-grid-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px 24px;
}

.state-grid-title {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.state-grid,
.state-map {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(7, auto);
  gap: 4px;
  max-width: 720px;
  margin: 0 auto;
}

.state-card {
  background: var(--bg-card);
  border: 1.5px solid rgba(74, 124, 89, 0.15);
  border-radius: 6px;
  padding: 10px 4px 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  user-select: none;
  -webkit-user-select: none;
}

.state-card:hover {
  border-color: var(--border-active);
  box-shadow: 0 0 10px rgba(74, 124, 89, 0.2);
  background: var(--bg-card-hover);
}

.state-card.selected {
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px rgba(74, 124, 89, 0.35);
  background: rgba(74, 124, 89, 0.12);
}

.state-card-abbr {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.2;
}

.state-card-count {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.2;
}

/* Event heat levels */
.state-card.heat-1 {
  border-color: rgba(232, 156, 58, 0.35);
}
.state-card.heat-1 .state-card-count {
  color: #e89c3a;
}

.state-card.heat-2 {
  border-color: rgba(232, 120, 58, 0.45);
}
.state-card.heat-2 .state-card-count {
  color: #e8783a;
}

.state-card.heat-3 {
  border-color: rgba(232, 93, 58, 0.55);
  background: rgba(232, 93, 58, 0.06);
}
.state-card.heat-3 .state-card-count {
  color: #e85d3a;
  font-weight: 600;
}

@media (max-width: 900px) {
  .state-grid,
  .state-map {
    max-width: 100%;
    gap: 3px;
  }
  .state-card {
    padding: 6px 2px 4px;
  }
  .state-card-abbr {
    font-size: 0.85rem;
  }
  .state-card-count {
    font-size: 0.6rem;
  }
}

@media (max-width: 600px) {
  .state-grid-section {
    padding: 0 4px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .state-grid,
  .state-map {
    min-width: 420px;
    gap: 2px;
    font-size: 0.7rem;
  }
  .state-card {
    padding: 4px 1px 3px;
    border-radius: 3px;
  }
  .state-card-abbr {
    font-size: 0.7rem;
  }
  .state-card-count {
    font-size: 0.55rem;
  }
  .state-grid-title {
    font-size: 0.8rem;
    margin-bottom: 8px;
  }
  .filter-bar {
    gap: 4px;
    padding: 0 8px;
  }
  .filter-btn {
    padding: 4px 8px;
    font-size: 0.7rem;
  }
  .hero h2 {
    font-size: 1.3rem;
  }
  .hero-subtitle {
    font-size: 0.8rem;
  }
  .stats-bar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    font-size: 0.75rem;
  }
  .site-header .container {
    padding: 0 8px;
  }
  .site-logo img {
    height: 28px !important;
  }
  .site-nav {
    gap: 12px;
  }
  .site-nav a {
    font-size: 0.75rem;
  }
}

/* --- Dashboard Layout --- */
.dashboard {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  padding: 0 20px 32px;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 500px;
}

/* --- Map --- */
.map-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  min-height: 500px;
}

/* #map removed - replaced by #event-map SVG */

.map-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.map-loading .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.map-error {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
  color: var(--cat-wildfire);
  font-size: 0.9rem;
  padding: 20px;
  background: rgba(26, 31, 22, 0.95);
  border-radius: var(--radius);
  border: 1px solid rgba(232, 93, 58, 0.3);
  display: none;
}

/* --- SVG Map --- */
#event-map {
  width: 100%;
  height: 100%;
  min-height: 500px;
  display: block;
  background: var(--bg-card);
}

#event-map .event-dot {
  cursor: pointer;
  transition: r 0.2s, opacity 0.2s;
}

#event-map .event-dot:hover {
  filter: url(#glow);
}

#event-map .event-dot.dimmed {
  opacity: 0.18;
}

#event-map .event-dot.highlighted {
  opacity: 1;
  stroke: #fff;
  stroke-width: 1.5;
}

/* SVG tooltip */
.svg-tooltip {
  display: none;
  position: absolute;
  pointer-events: none;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px 14px;
  max-width: 300px;
  z-index: 100;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.svg-tooltip .tt-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: var(--text-heading);
}

.svg-tooltip .tt-cat {
  display: inline-block;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 4px;
  font-weight: 500;
  color: #fff;
}

.svg-tooltip .tt-meta {
  color: var(--text-muted);
  font-size: 0.75rem;
}

@keyframes pulse-dot {
  0%, 100% { r: 5; opacity: 0.9; }
  50% { r: 7; opacity: 1; }
}

#event-map .event-dot.pulse {
  animation: pulse-dot 2s ease-in-out infinite;
}

/* --- Event Sidebar --- */
.event-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  max-height: 564px;
}

.sidebar-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.event-list {
  overflow-y: auto;
  flex: 1;
  padding: 4px 0;
}

.event-list::-webkit-scrollbar {
  width: 6px;
}

.event-list::-webkit-scrollbar-track {
  background: transparent;
}

.event-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.event-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(74, 124, 89, 0.08);
}

.event-row:hover {
  background: var(--bg-card-hover);
}

.event-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.event-info {
  flex: 1;
  min-width: 0;
}

.event-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-meta {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.event-list-loading,
.event-list-error {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- Signup Section --- */
.signup-section {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 48px 20px;
  text-align: center;
  margin-top: 32px;
}

.signup-section h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  margin-bottom: 8px;
}

.signup-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.signup-form {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.signup-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.signup-form input[type="email"]::placeholder {
  color: var(--text-muted);
}

.signup-form input[type="email"]:focus {
  border-color: var(--accent-primary);
}

.signup-form button {
  padding: 12px 28px;
  background: var(--accent-primary);
  border: none;
  border-radius: var(--radius);
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.signup-form button:hover {
  background: #3d6a4b;
}

.signup-form button:active {
  transform: scale(0.98);
}

.signup-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.signup-success {
  color: var(--accent-secondary);
  font-size: 0.9rem;
  margin-top: 12px;
  display: none;
}

.signup-error {
  color: var(--cat-wildfire);
  font-size: 0.85rem;
  margin-top: 12px;
  display: none;
}

/* --- Coffee Section --- */
.coffee-section {
  text-align: center;
  padding: 32px 20px 0;
}

.coffee-section p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border-color);
  margin-top: 32px;
}

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

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

/* --- Category Colors (dots & popup badges) --- */
.cat-wildfires { background: var(--cat-wildfire); }
.cat-storms { background: var(--cat-storm); }
.cat-flood { background: var(--cat-flood); }
.cat-volcanic { background: var(--cat-volcanic); }
.cat-other { background: var(--cat-other); }

.popup-cat.cat-wildfires { background: rgba(232, 93, 58, 0.15); color: var(--cat-wildfire); }
.popup-cat.cat-storms { background: rgba(74, 143, 232, 0.15); color: var(--cat-storm); }
.popup-cat.cat-flood { background: rgba(58, 197, 201, 0.15); color: var(--cat-flood); }
.popup-cat.cat-volcanic { background: rgba(232, 156, 58, 0.15); color: var(--cat-volcanic); }
.popup-cat.cat-other { background: rgba(138, 138, 138, 0.15); color: var(--cat-other); }

/* --- Responsive --- */
@media (max-width: 900px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .event-sidebar {
    max-height: 320px;
  }

  .stats-bar {
    justify-content: center;
  }

  .stat-timestamp {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 32px 16px 24px;
  }

  .filter-bar {
    padding: 0 12px 12px;
    gap: 6px;
  }

  .filter-btn {
    padding: 6px 14px;
    font-size: 0.78rem;
  }

  .dashboard {
    padding: 0 12px 24px;
  }

  .map-container {
    min-height: 280px;
  }

  #event-map {
    min-height: 280px;
  }

  .header-badge {
    display: none;
  }

  .signup-form input[type="email"] {
    min-width: 100%;
  }
}

/* ============================================
   Multi-Page Layout Styles
   Nav, Page Hero, Cards, Steps, Prose
   ============================================ */

/* --- Site Nav --- */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.site-logo:hover {
  opacity: 0.9;
}

.site-logo:hover h1 {
  color: var(--text-heading);
}

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

.site-nav a {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}

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

.site-nav a.nav-active {
  color: var(--accent-secondary);
}

.site-nav a.nav-active::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-primary);
  border-radius: 1px;
}

/* --- Page Hero (home + about) --- */
.page-hero {
  text-align: center;
  padding: 80px 20px 64px;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--border-color);
}

.page-hero-headline {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
  color: var(--text-heading);
}

.page-hero-sub {
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* --- Hero CTAs --- */
.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background: #3d6a4b;
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--accent-secondary);
  border: 1px solid var(--border-active);
}

.btn-secondary:hover {
  background: rgba(74, 124, 89, 0.1);
  color: var(--accent-secondary);
}

.hero-trust {
  font-size: 0.82rem;
  color: var(--accent-secondary);
  background: rgba(74, 124, 89, 0.1);
  display: inline-block;
  padding: 6px 18px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

/* --- Content Sections --- */
.content-section {
  padding: 64px 20px;
}

.content-section-alt {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  letter-spacing: -0.02em;
}

/* --- Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.card-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  max-width: 700px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: border-color 0.2s;
}

.content-section-alt .info-card {
  background: var(--bg-primary);
}

.info-card:hover {
  border-color: var(--border-active);
}

.info-card-muted {
  opacity: 0.7;
  border-style: dashed;
}

.info-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.info-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-heading);
}

.info-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.card-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent-secondary);
}

.card-link:hover {
  text-decoration: underline;
}

/* --- Steps Grid --- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.step-card {
  text-align: center;
  padding: 24px 20px;
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--accent-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 auto 16px;
}

.step-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- Prose (about page) --- */
.prose-container {
  max-width: 720px;
  margin: 0 auto;
}

.prose p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose a {
  color: var(--accent-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover {
  color: var(--accent-primary);
}

/* --- Footer Links --- */
.footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--accent-secondary);
}

/* --- Multi-Page Responsive --- */
@media (max-width: 768px) {
  .page-hero {
    padding: 56px 16px 48px;
  }

  .content-section {
    padding: 48px 16px;
  }

  .section-title {
    margin-bottom: 28px;
  }

  .site-nav {
    gap: 16px;
  }

  .site-nav a {
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .site-nav {
    gap: 12px;
  }

  .site-nav a {
    font-size: 0.78rem;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
  }
}

/* ============================================
   Mobile Hamburger Nav
   Injected via site.js on pages with .site-nav
   ============================================ */

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  transition: border-color 0.2s, background 0.2s;
}

.nav-toggle:hover {
  border-color: var(--border-active);
  background: rgba(74, 124, 89, 0.08);
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
}

.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 640px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.22s ease, opacity 0.18s ease;
  }

  .site-nav.open {
    max-height: 360px;
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    display: block;
    padding: 12px 20px;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(74, 124, 89, 0.08);
  }

  .site-nav a:last-child {
    border-bottom: none;
  }

  .site-nav a.nav-active::after {
    display: none;
  }

  .site-nav a.nav-active {
    background: rgba(74, 124, 89, 0.12);
  }

  .site-header {
    position: sticky;
  }

  .site-header .container,
  .site-header .header-inner {
    position: relative;
  }
}

/* ============================================
   Tools Index Page
   Moved from tools/index.html inline styles
   ============================================ */

.tools-hero {
  text-align: center;
  padding: 80px 20px 40px;
}

.tools-hero h1 {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: var(--text-heading);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.tools-hero p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 640px;
  margin: 0 auto 8px;
  line-height: 1.7;
}

.tools-hero .badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(74, 124, 89, 0.15);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  color: var(--accent-secondary);
  font-size: 0.8rem;
  margin-top: 12px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
}

.tool-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
}

.tool-card h3 {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-heading);
  font-size: 1.1rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.tool-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.tool-card .tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(74, 124, 89, 0.14);
  border-radius: 4px;
  color: var(--accent-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 12px;
  align-self: flex-start;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tool-card a {
  display: inline-block;
  padding: 10px 20px;
  background: var(--accent-primary);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  transition: background 0.2s;
  align-self: flex-start;
}

.tool-card a:hover {
  background: #3d6a4b;
  color: #fff;
}

.tool-card.coming-soon {
  opacity: 0.6;
}

.tool-card.coming-soon a {
  background: #3a3a3a;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================
   Blog Index / Cards
   Moved from blog/index.html inline styles
   ============================================ */

.blog-hero {
  text-align: center;
  padding: 64px 20px 48px;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--border-color);
}

.blog-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  color: var(--text-heading);
}

.blog-hero p {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
}

.blog-card h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 12px;
  line-height: 1.35;
}

.blog-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 16px;
}

.blog-card-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent-secondary);
}

.blog-card:hover .blog-card-link {
  text-decoration: underline;
}

/* ============================================
   404 Page
   ============================================ */

.notfound-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding: 48px 20px;
  text-align: center;
}

.notfound-card {
  max-width: 560px;
  margin: 0 auto;
}

.notfound-code {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 700;
  color: var(--accent-secondary);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
  opacity: 0.9;
}

.notfound-card h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.notfound-card p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 28px;
}

.notfound-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
