:root {
  /* Primary brand colors */
  --brand-teal: #0f766e;
  --brand-teal-600: #0d675f;
  --brand-teal-100: #e8f7f5;
  --brand-teal-50: #f0fdf9;  /* Very light teal for table headers */

  /* New: Secondary sage green for botanical accents */
  --sage-green: #8BA888;
  --sage-green-light: #B8C9B6;

  /* Text colors */
  --brand-ink: #3E2F1F;   /* primary body text – soil brown */
  --brand-ink-2: #5A4A3B; /* secondary text */
  --brand-muted: #7A6A5A; /* muted/labels */

  /* Backgrounds - warmed up */
  --bg-warm-white: #F8F9F6;
  --card-bg: #F5F5F2;
  --brand-border: #E8E6E3;

  /* Accent colors for highlights */
  --terracotta: #D4745E;
  --warm-gold: #E8B86D;

  /* Focus & interaction */
  --focus: #0f766e;

  /* Site logo */
  --logo-bg: #111;
  --logo-fg: #fff;

  /* Site header gradient */
  --header-gradient-start: #0f766e;
  --header-gradient-end: #0b4c57;

  /* Links - WCAG compliant for light/dark modes */
  --link: #0f766e;        /* Light mode: 4.6:1 on white (WCAG AA) */
  --link-dark: #7aeadd;   /* Dark mode: 11.5:1 on #060a0a (WCAG AAA) */

  /* Shadow system - warm brown-tinted */
  --shadow-sm: 0 2px 8px rgba(62, 47, 31, 0.08);
  --shadow-md: 0 4px 16px rgba(62, 47, 31, 0.12);
  --shadow-lg: 0 8px 32px rgba(62, 47, 31, 0.15);

  /* Enhanced depth shadows (dual-layer for modern feel) */
  --shadow-depth-sm:
    0 1px 3px rgba(62, 47, 31, 0.08),
    0 8px 24px rgba(62, 47, 31, 0.04);
  --shadow-depth-md:
    0 4px 8px rgba(62, 47, 31, 0.12),
    0 16px 32px rgba(62, 47, 31, 0.08);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--brand-teal) 0%, var(--brand-teal-600) 100%);
  --gradient-card-subtle: linear-gradient(135deg, var(--card-bg) 0%, var(--brand-teal-50) 100%);

  /* Semantic colors for feedback */
  --success: #06D6A0;
  --success-light: #D1FAE5;
  --warning: #F4A261;
  --warning-light: #FEF3C7;
  --error: #EF4444;
  --error-light: #FEE2E2;
  --info: #3B82F6;
  --info-light: #DBEAFE;
}

/* =====================================================
   TABLE OF CONTENTS
   =====================================================

   1. Base Styles & Reset
   2. Utilities & Accessibility
   3. Site Header & Navigation
   4. Layout & Cards
   5. Forms & Inputs
   6. Buttons
   7. Weather Components
   8. Loading States
   9. User Menu & Dropdowns
   10. Authentication Pages
   11. Dashboard Components
   12. Account Settings
   13. Features/Pricing Page
   14. Flash Messages
   15. Footer
   16. Animations & Effects
   17. Dark Mode
   18. Responsive Design

   ===================================================== */

/* =====================================================
   1. BASE STYLES & RESET
   ===================================================== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 16px; /* Explicit base font size for better mobile readability */
  line-height: 1.6; /* Improved readability for all ages */
  color: var(--brand-ink);
  background: var(--bg-warm-white); /* Warm white background */
}
.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.5rem;
  overflow: visible;
}

/* Mobile container adjustments */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
    /* Account for bottom navigation on mobile */
    padding-bottom: calc(1rem + 80px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 400px) {
  .container {
    padding: 0.75rem;
    padding-bottom: calc(0.75rem + 80px + env(safe-area-inset-bottom));
  }
}

/* =====================================================
   2. UTILITIES & ACCESSIBILITY
   ===================================================== */
.nowrap { white-space: nowrap; }
.visually-hidden {
  position: absolute !important; height: 1px; width: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  left: 1rem; top: 1rem; width: auto; height: auto;
  padding: .5rem .75rem; background: var(--bg-warm-white); color: #000;
  border: 2px solid var(--focus); border-radius: 10px; z-index: 9999;
}

/* =====================================================
   SITE HEADER & NAVIGATION
   ===================================================== */

/* Site header with gradient background */
.site-header {
  background:
    radial-gradient(1200px 400px at 20% 0%, rgba(255,255,255,0.08), transparent 60%),
    linear-gradient(135deg, var(--header-gradient-start), var(--header-gradient-end));
  color: #fff;
  position: relative;
  overflow: visible;
}

.header-inner {
  position: relative;
  z-index: 100;
  padding-top: .75rem;
  padding-bottom: 1.5rem;
  overflow: visible;
}

/* Site logo and branding */
.logo-lockup {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--logo-bg);
  color: var(--logo-fg);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .5px;
  box-shadow: 0 2px 10px rgba(0,0,0,.25), inset 0 0 0 2px rgba(255,255,255,.1);
}

.logo-icon {
  font-size: 2.75rem;
  /* Drop shadow for depth */
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3))
          drop-shadow(0 0 8px rgba(94, 234, 212, 0.4));
  /* Soft glow effect */
  text-shadow: 0 0 20px rgba(94, 234, 212, 0.3),
               0 0 40px rgba(94, 234, 212, 0.2);
}

.brand-text,
.brand-text:hover {
  text-decoration: none;
}

.site-title {
  margin: 0;
  font-size: clamp(1.25rem, 1.6rem, 2rem);
  color: #fff;
}

.title-decoration {
  font-size: .9em;
  margin-left: .35rem;
}

.site-tagline {
  margin: .25rem 0 0 0;
  color: #e8fffb;
}

.nav-links a {
  color: #e8fffb;
}

/* =====================================================
   4. LAYOUT & CARDS
   ===================================================== */
main { display: grid; grid-template-columns: 1fr; gap: 1rem; position: relative; z-index: 1; }
.grid-two { position: relative; display: grid; gap: 1.25rem; }
@media (min-width: 960px) { .grid-two { grid-template-columns: 1fr 1fr; align-items: start; } }

/* Cards & text */
.card {
  border: 1px solid var(--brand-border);
  border-radius: 16px; /* Softer, more organic feel */
  background: var(--card-bg);
  padding: 1.25rem; /* More breathing room */
  box-shadow: var(--shadow-depth-sm); /* Dual-layer depth */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Smooth, modern easing */
}

.card:hover {
  transform: translateY(-2px); /* Subtle lift on hover */
  box-shadow: var(--shadow-depth-md); /* Deeper shadow on hover */
}

/* Featured card variant - gradient background with accent border */
.card-featured {
  background: var(--gradient-card-subtle);
  border: 2px solid var(--brand-teal);
  position: relative;
  overflow: hidden;
}

.card-featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}
/* Universal link styling for content areas - ensures brand consistency */
.card p a:not(.btn):not(.support-link):not(.muted-link),
.card li a:not(.btn):not(.support-link):not(.muted-link) {
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  border-bottom: 1px solid var(--link);
}
.card p a:not(.btn):not(.support-link):not(.muted-link):hover,
.card li a:not(.btn):not(.support-link):not(.muted-link):hover {
  color: var(--brand-teal-600);
  border-bottom-color: var(--brand-teal-600);
}
.section-title { margin: 0 0 .5rem 0; font-size: 1.1rem; font-weight: 700; }
.section-subtitle { margin: 0 0 .5rem 0; font-size: 1rem; font-weight: 700; }
.preline { white-space: pre-line; margin: 0; }
.prewrap { white-space: pre-wrap; margin: 0; }
a.muted-link { text-decoration: none; color: var(--link); font-size: .95rem; }
.muted { color: var(--brand-muted); font-size: .95rem; }
.small { font-size: .9rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* Presets */
#presets { display: flex; flex-wrap: wrap; gap: .5rem; }
.preset-btn {
  border: 1px solid #cbe6e2;
  background: var(--brand-teal-100);
  color: var(--brand-teal);
  font-size: .9rem;
  padding: .35rem .6rem;
  border-radius: 999px;
  cursor: pointer;
}
.preset-btn:hover, .preset-btn:focus { outline: none; border-color: #9fd1ca; background: #dff2f0; }

/* Form */
.form-card { position: relative; }
.form-grid { display: grid; gap: .9rem; }
.form-row { display: grid; gap: .75rem; }
@media (min-width: 720px) { .form-row--two { grid-template-columns: 1fr 1fr; } }

label { display: block; font-weight: 600; margin-bottom: .25rem; }
input[type="text"], textarea, select {
  width: 100%;
  padding: .6rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  background: #fff;
  color: inherit;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="text"]:focus,
textarea:focus,
select:focus {
  border-color: var(--brand-teal);
  outline: none;
  border-width: 2px;
  padding: calc(.6rem - 1px); /* Compensate for thicker border */
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .1);
  animation: input-pulse 0.3s ease;
}

@keyframes input-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.4);
  }
  100% {
    box-shadow: 0 0 0 3px rgba(15, 118, 110, .1);
  }
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand-teal);
  border-width: 2px;
  padding: calc(.6rem - 1px); /* Compensate for thicker border */
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1); /* Subtle teal glow */
}
input::placeholder, textarea::placeholder { color: #6a7582; }
textarea { resize: vertical; min-height: 120px; }

/* Buttons */
.actions { display: flex; align-items: center; gap: .75rem; }
button.primary {
  padding: .7rem 1rem; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--brand-teal); color: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow-sm);
}
button.primary:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
button.primary:active {
  transform: scale(0.98);
}
button.primary:disabled { opacity: 0.7; cursor: default; transform: none; }
button.secondary {
  padding: .7rem 1rem;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  cursor: pointer;
  background: var(--card-bg);
  color: #0b1212;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
button.secondary:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
button.secondary:active {
  transform: scale(0.98);
}

/* Combined loading overlay */
.combined-loading-overlay {
  position: absolute; inset: 0; display: none;
  align-items: center; justify-content: center;
  background: rgba(248, 249, 246, 0.75); /* Use warm background */
  backdrop-filter: blur(1px);
  border-radius: 16px; /* Match card border-radius */
  z-index: 2;
}
.grid-two.is-submitting .combined-loading-overlay { display: flex; }
.grid-two.is-submitting .card { pointer-events: none; opacity: 0.95; }
.grid-two.is-submitting .form-grid input,
.grid-two.is-submitting .form-grid select,
.grid-two.is-submitting .form-grid textarea,
.grid-two.is-submitting .form-grid button { pointer-events: none; }

.answer-card:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
.answer-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.answer-text { font-family: "Nunito", "Segoe UI", "Helvetica Neue", sans-serif; }

/* Spinner */
.spinner {
  width: 22px; height: 22px;
  border: 3px solid #c7ece7; border-top-color: var(--brand-teal);
  border-radius: 50%; animation: spin 0.9s linear infinite;
  margin-right: .5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Skeleton Loading States - Modern alternative to spinners */
@keyframes skeleton-loading {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--card-bg) 0%,
    #e8e6e3 20%,
    var(--card-bg) 40%,
    var(--card-bg) 100%
  );
  background-size: 200px 100%;
  animation: skeleton-loading 1.2s ease-in-out infinite;
  border-radius: 4px;
}

.skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
}

.skeleton-text:last-child {
  width: 80%;
}

.skeleton-title {
  width: 60%;
  height: 1.5em;
  margin-bottom: 0.75em;
}

.skeleton-card {
  height: 200px;
  border-radius: 16px;
}

.skeleton-button {
  width: 120px;
  height: 40px;
  border-radius: 10px;
}

/* Dark mode skeleton */
@media (prefers-color-scheme: dark) {
  .skeleton {
    background: linear-gradient(
      90deg,
      #0b1212 0%,
      #1a2828 20%,
      #0b1212 40%,
      #0b1212 100%
    );
  }
}

/* Weather section container */
#weather-section {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

/* Weather header & units toggle */
.weather-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .9rem; /* extra space before hourly */
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
}
.units-toggle { margin: 0; }
.units-toggle fieldset { display: inline-flex; gap: .25rem; border: 0; margin: 0; padding: 0; }
.toggle-seg {
  display: inline-flex; align-items: center; gap: .35rem;
  border: 1px solid var(--brand-border); border-radius: 999px; padding: .25rem .55rem;
  background: var(--card-bg); color: var(--brand-ink); cursor: pointer; user-select: none;
  transition: all 0.2s ease;
}
.toggle-seg input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-seg:has(input:checked) {
  background: var(--brand-teal);
  color: #fff;
  border-color: var(--brand-teal);
}

/* Unit display toggling */
#weather-section .only-f { display: inline; }
#weather-section .only-c { display: none; }
#weather-section[data-units="c"] .only-f { display: none; }
#weather-section[data-units="c"] .only-c { display: inline; }

/* Hourly forecast (capped width chips) */
.hourly-wrap {
  margin-bottom: 1rem;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.hourly-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(72px, 120px);
  gap: .5rem;
  overflow-x: auto;
  width: 100%;
  max-width: 100%;
  padding-bottom: .25rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  outline: none;
  justify-content: start;
}
.hourly-scroll:focus-visible { outline: 2px solid #17a29a; outline-offset: 2px; }
.hourly-chip {
  display: grid; place-items: center;
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  padding: .55rem .35rem;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
  max-width: 120px;
  min-width: 72px;
  box-sizing: border-box;
}
.hourly-chip:hover {
  box-shadow: var(--shadow-md);
}
.hourly-time { font-size: .85rem; color: var(--brand-muted); }
.hourly-emoji { font-size: 1.25rem; line-height: 1.25rem; margin: .15rem 0; }
.hourly-temp { font-weight: 600; }

/* Weather alerts */
.weather-alerts { margin-top: .6rem; display: grid; gap: .5rem; }
.alert-item {
  background: #fff3cd;
  color: #5c3c00;
  border: 1px solid #ffe39a;
  border-radius: 12px; /* Softer corners */
  padding: .55rem .7rem;
}
.alert-title { margin-right: .4rem; }

/* Forecast grid — single row at wide screens (today + 5 days) */
.forecast-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: 1fr;
  margin-top: .6rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
@media (min-width: 560px) {
  .forecast-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 880px) {
  .forecast-grid { grid-template-columns: repeat(6, 1fr); }
}

/* Daily forecast cards */
.forecast-card {
  border: 1px solid var(--brand-border);
  border-radius: 14px; /* Softer, more organic */
  background: linear-gradient(135deg, var(--card-bg) 0%, #f0f7f6 100%);
  padding: .75rem;
  display: grid; gap: .35rem; align-content: start;
  box-shadow: var(--shadow-depth-sm);
  transition: all 0.2s ease;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  position: relative;
  overflow: hidden;
}

/* Subtle radial gradient overlay for depth */
.forecast-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(15, 118, 110, 0.05) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.forecast-card:hover {
  box-shadow: var(--shadow-depth-md);
  transform: translateY(-2px);
}

/* Weather condition-based gradients */
.forecast-card[data-condition*="clear"],
.forecast-card[data-condition*="sun"] {
  background: linear-gradient(135deg, #FFF9E5 0%, #FFF3CC 100%);
}

.forecast-card[data-condition*="rain"],
.forecast-card[data-condition*="drizzle"] {
  background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
}

.forecast-card[data-condition*="cloud"],
.forecast-card[data-condition*="overcast"] {
  background: linear-gradient(135deg, #F5F5F5 0%, #E0E0E0 100%);
}

.forecast-card[data-condition*="snow"],
.forecast-card[data-condition*="ice"] {
  background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
}

.forecast-card[data-condition*="storm"],
.forecast-card[data-condition*="thunder"] {
  background: linear-gradient(135deg, #E8EAF6 0%, #C5CAE9 100%);
}
.forecast-card.today {
  background: var(--brand-teal-100);
  border-color: #9fd1ca;
  order: -1;
  box-shadow: 0 0 0 2px #0f766e22;
  transition: box-shadow 0.2s ease-in-out;
}
.forecast-card.today .forecast-day { color: var(--brand-teal); }
.forecast-card.today:hover, .forecast-card.today:focus-within { box-shadow: 0 0 0 3px #0f766e44; }

.forecast-top { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.forecast-day { font-weight: 700; }
.forecast-daywrap { display: inline-flex; align-items: baseline; gap: .35rem; }
.forecast-date { color: #6b7280; font-size: .9rem; }
.forecast-emoji {
  font-size: 1.6rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
  display: inline-block;
}

.forecast-card:hover .forecast-emoji {
  transform: scale(1.1) rotate(5deg);
}
.forecast-desc { color: var(--brand-ink-2); font-size: .95rem; }
.forecast-temps { display: flex; gap: .5rem; align-items: baseline; margin-top: .25rem; flex-wrap: wrap; }
.forecast-temps .tlabel { font-weight: 600; margin-right: .15rem; }
.forecast-temps .tmax { font-weight: 700; }
.forecast-temps .tmin { color: #6b7280; opacity: 0.95; }
.forecast-extras { margin-top: .25rem; }

.badge {
  display: inline-block; font-size: 0.75rem; padding: 0.1rem 0.4rem;
  border-radius: 999px; background: var(--brand-teal); color: #fff;
  margin-left: 0.35rem; vertical-align: middle;
}

/* History */
.history-header { display: flex; justify-content: space-between; align-items: baseline; }
ul.history { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
ul.history li {
  border: 1px solid var(--brand-border);
  border-radius: 12px; /* Softer corners */
  padding: .75rem;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}
ul.history li:hover {
  box-shadow: var(--shadow-md);
}
.history-q { margin-top: .35rem; }
.history-details { margin-top: .35rem; }
.history-answer { margin-top: .4rem; }

/* ============================================================================
   Footer - Modern, accessible, responsive
   ========================================================================= */
.site-footer {
  margin-top: 4rem;
  padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: linear-gradient(180deg, transparent 0%, rgba(255, 253, 250, 0.5) 100%);
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.footer-copyright {
  font-size: 0.9rem;
  color: var(--brand-muted);
  margin: 0;
  line-height: 1.6;
}

.footer-tagline {
  color: var(--brand-muted);
  font-style: italic;
}

.footer-divider {
  margin: 0 0.5rem;
  opacity: 0.4;
}

/* Footer navigation links */
.footer-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.9rem;
}

.footer-link {
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.footer-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--brand-teal);
  border-radius: 1px;
  transition: width 0.3s ease;
}

.footer-link:hover,
.footer-link:focus {
  color: var(--brand-teal-600);
  background: rgba(15, 118, 110, 0.05);
  outline: none;
}

.footer-link:hover::after,
.footer-link:focus::after {
  width: 80%;
}

.footer-link:focus-visible {
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2);
}

/* Support/Coffee button */
.footer-support {
  margin-top: 0.5rem;
}

.support-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: linear-gradient(135deg, #FFDD00 0%, #FFC600 100%);
  color: #1a1a1a;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  box-shadow:
    0 2px 8px rgba(255, 221, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 44px; /* WCAG touch target */
}

.support-link:hover,
.support-link:focus {
  background: linear-gradient(135deg, #FFC600 0%, #FFB800 100%);
  transform: translateY(-2px);
  box-shadow:
    0 4px 12px rgba(255, 221, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  border-color: var(--brand-teal-600);
  outline: none;
}

.support-link:focus-visible {
  box-shadow:
    0 4px 12px rgba(255, 221, 0, 0.4),
    0 0 0 3px rgba(15, 118, 110, 0.3);
}

.support-link:active {
  transform: translateY(0);
  box-shadow:
    0 2px 6px rgba(255, 221, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Responsive footer for mobile */
@media (max-width: 768px) {
  .site-footer {
    margin-top: 3rem;
    padding: 1.5rem 1rem calc(80px + env(safe-area-inset-bottom)); /* Account for bottom nav */
  }

  .footer-content {
    gap: 0.75rem;
  }

  .footer-copyright {
    font-size: 0.85rem;
  }

  .footer-links {
    font-size: 0.85rem;
  }

  .footer-divider {
    margin: 0 0.35rem;
  }
}

/* Loading shimmer */
#weather-section.loading .forecast-card,
#weather-section.loading .hourly-chip {
  position: relative;
  color: transparent !important;
}
#weather-section.loading .forecast-card::before,
#weather-section.loading .hourly-chip::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(0,0,0,0.06) 25%, rgba(0,0,0,0.12) 37%, rgba(0,0,0,0.06) 63%);
  animation: shimmer 1.1s infinite linear;
}
@keyframes shimmer { 0% { transform: translateX(-40%); } 100% { transform: translateX(40%); } }

/* A11y & motion */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
  .hourly-scroll { scroll-behavior: auto; }
  #weather-section.loading .forecast-card::before,
  #weather-section.loading .hourly-chip::before { animation: none; }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  /* WCAG AA Compliant Dark Mode Color Palette
     All colors meet 4.5:1 contrast ratio on dark backgrounds */
  :root {
    --brand-ink: #EADFCF;   /* primary text – warm sand (WCAG AAA: 13.8:1) */
    --brand-ink-2: #D6C6B3; /* secondary text (WCAG AA: 11.2:1) */
    --brand-muted: #B9AA97; /* muted text (WCAG AA: 7.8:1) */
    --brand-border: rgba(255,255,255,.18);
    --card-bg: #0b1212;
    /* Logo chip keeps dark background in dark mode (emoji has its own colors) */
  }
  body { background: #060a0a; }

  .card { background: var(--card-bg); }
  input[type="text"], textarea, select {
    background: #0f1a1a;
    color: #e8edf2;
    border-color: rgba(255,255,255,.22);
  }
  input::placeholder, textarea::placeholder { color: #8aa0ad; }
  select option:checked { background-color: #17a29a !important; color: #031212 !important; }

  /* All non-button links use --link-dark for WCAG compliance */
  a.muted-link { color: var(--link-dark); }
  .auth-footer a { color: var(--link-dark); }
  .privacy-notice a { color: var(--link-dark); }
  .legal-content a { color: var(--link-dark); }

  /* Footer dark mode styling */
  .site-footer {
    border-top-color: rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, transparent 0%, rgba(11, 18, 18, 0.3) 100%);
  }

  .footer-copyright,
  .footer-tagline {
    color: #9ca3af;
  }

  .footer-link {
    color: var(--link-dark);
  }

  .footer-link::after {
    background: #5eead4;
  }

  .footer-link:hover,
  .footer-link:focus {
    color: #9ff4e8;
    background: rgba(94, 234, 212, 0.1);
  }

  /* Keep support button bright in dark mode */
  .support-link {
    background: linear-gradient(135deg, #FFDD00 0%, #FFC600 100%);
    color: #1a1a1a;
    box-shadow:
      0 2px 8px rgba(255, 221, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }

  .support-link:hover,
  .support-link:focus {
    box-shadow:
      0 4px 12px rgba(255, 221, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }

  /* Other link hover states for dark mode */
  .auth-footer a:hover,
  .privacy-notice a:hover,
  .legal-content a:hover {
    color: #9ff4e8;
  }

  /* FAQ links in dark mode */
  .faq-item a {
    color: var(--link-dark);
    border-bottom-color: var(--link-dark);
  }
  .faq-item a:hover {
    color: #9ff4e8;
    border-bottom-color: #9ff4e8;
  }

  /* Universal card content links in dark mode */
  .card p a:not(.btn):not(.support-link):not(.muted-link),
  .card li a:not(.btn):not(.support-link):not(.muted-link) {
    color: var(--link-dark);
    border-bottom-color: var(--link-dark);
  }
  .card p a:not(.btn):not(.support-link):not(.muted-link):hover,
  .card li a:not(.btn):not(.support-link):not(.muted-link):hover {
    color: #9ff4e8;
    border-bottom-color: #9ff4e8;
  }

  .preset-btn { border-color: #17464a; background: #0c1716; color: #d2faf3; }
  .preset-btn:hover, .preset-btn:focus { background: #11302d; border-color: #1e5b54; }

  .toggle-seg { background: #0f1a1a; color: #e5e7eb; border-color: rgba(255,255,255,.22); }
  .toggle-seg:has(input:checked) { background: #17a29a; color: #031212; border-color: #17a29a; }

  button.secondary { background: #0f1a1a; color: #e5e7eb; border-color: rgba(255,255,255,.28); }
  button.secondary:hover { background: #122121; }

  .weather-alerts .alert-item {
    background: #312e1b;
    color: #fff5cc;
    border-color: #5f5627;
  }

  .hourly-chip { background: #0e1616; border-color: rgba(255,255,255,.18); color: #e9f2f0; }

  .forecast-card { background: #0e1616; border-color: rgba(255,255,255,.18); }
  .forecast-date { color: #b7c1cd; }
  .forecast-temps .tmin { color: #bdc9d6; opacity: 1; }
  .forecast-desc { color: var(--brand-ink-2); }
  .forecast-card.today {
    background: #0f1c1b;
    border-color: #1a6d64;
    box-shadow: 0 0 0 2px #1a6d6433;
  }

  ul.history li { background: #0e1616; color: #eaf2f8; border-color: rgba(255,255,255,.22); }
  ul.history li .muted { color: #d6dee8; }
  ul.history li .mono { color: #eaf2f8; }
}

/* ================================================================
   NEW STYLES FOR AUTH, DASHBOARD, PRICING (Phase 1-2)
   ================================================================ */

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.required { color: #dc2626; margin-left: .15rem; }
.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; }

/* Site navigation */
.site-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  flex-wrap: wrap;
  overflow: visible;
  position: relative;
}
.nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  padding: .5rem .75rem;
  border-radius: 10px;
  font-size: .95rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover, .nav-link:focus {
  background: rgba(255, 255, 255, .15);
  color: rgba(255, 255, 255, 1);
}

.nav-link.active {
  background: rgba(255, 255, 255, .25);
  color: #fff;
  font-weight: 600;
}

/* Modern animated underline indicator */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: white;
  border-radius: 1px;
  transition: width 0.3s ease;
}

.nav-link.active::after {
  width: 60%;
}

/* User Menu Dropdown */
.user-menu { position: relative; z-index: 10000; }
.user-menu-btn {
  background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2);
  padding: .4rem .75rem; border-radius: 10px; /* Softer corners */
  cursor: pointer; font-size: .95rem;
  transition: background .2s ease;
}
.user-menu-btn:hover, .user-menu-btn:focus { background: rgba(255,255,255,.2); }
.user-menu-dropdown {
  position: absolute; top: 100%; right: 0; margin-top: .5rem;
  background: var(--card-bg); /* Use warm background */
  border: 1px solid var(--brand-border); border-radius: 12px; /* Softer corners */
  box-shadow: var(--shadow-lg); /* Use warm shadow system */
  min-width: 200px; z-index: 10000;
}
.user-menu-dropdown[hidden] { display: none; }
.user-menu-dropdown a, .user-menu-dropdown span {
  display: block; padding: .65rem 1rem; color: var(--brand-ink);
  text-decoration: none; border-bottom: 1px solid var(--brand-border);
  transition: background .15s ease;
}
.user-menu-dropdown a:last-child { border-bottom: none; }
.user-menu-dropdown a:hover { background: var(--brand-teal-100); }

/* Buttons */
.btn {
  display: inline-block;
  padding: .7rem 1.25rem;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary); /* Modern gradient */
  color: #fff;
  box-shadow:
    0 2px 8px rgba(15, 118, 110, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.1); /* Subtle highlight for depth */
}

.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, var(--brand-teal-600) 0%, var(--brand-teal) 100%); /* Reverse gradient */
  transform: translateY(-1px);
  box-shadow:
    0 4px 12px rgba(15, 118, 110, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:active {
  transform: scale(0.98) translateY(0); /* Press down effect */
  box-shadow:
    0 1px 4px rgba(15, 118, 110, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-primary:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  background: var(--brand-teal); /* No gradient when disabled */
}

/* Glow variant for important CTAs */
.btn-glow {
  position: relative;
}

.btn-glow::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.btn-glow:hover::before {
  width: 300px;
  height: 300px;
}
.btn-secondary {
  background: var(--card-bg);
  color: var(--brand-ink);
  border: 1px solid var(--brand-border);
  box-shadow: 0 1px 3px rgba(62, 47, 31, 0.05);
}

.btn-secondary:hover, .btn-secondary:focus {
  background: var(--brand-teal-100);
  border-color: #9fd1ca;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(62, 47, 31, 0.1);
}

.btn-secondary:active {
  transform: scale(0.98) translateY(0);
  box-shadow: 0 1px 2px rgba(62, 47, 31, 0.05);
}
.btn-outline {
  background: transparent; color: var(--brand-teal);
  border: 2px solid var(--brand-teal);
}
.btn-outline:hover, .btn-outline:focus {
  background: var(--brand-teal); color: #fff;
}
.btn-block { display: block; width: 100%; }
.btn-small { padding: .45rem .85rem; font-size: .85rem; }

/* Action Buttons Grid */
.action-buttons {
  display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 1rem;
}

/* Auth Pages */
.auth-card {
  max-width: 480px; margin: 2rem auto;
}
.auth-subtitle {
  text-align: center; color: var(--brand-muted); margin: .5rem 0 1.5rem;
}
.auth-icon {
  font-size: 3rem; text-align: center; margin-bottom: 1rem;
}
.auth-email {
  font-size: 1.1rem; font-weight: 600; text-align: center;
  color: var(--brand-teal); margin: 1rem 0;
}
.auth-message {
  text-align: center; margin: 1rem 0;
}
.auth-instructions ol {
  padding-left: 1.5rem; margin: 1.5rem 0;
}
.auth-instructions li {
  margin: .5rem 0;
}
.auth-help {
  background: var(--brand-teal-100); border: 1px solid #9fd1ca;
  border-radius: 12px; /* Softer corners */
  padding: 1rem; margin: 1.5rem 0;
}
.auth-help h3 {
  margin-top: 0; font-size: 1rem;
}
.auth-help ul {
  padding-left: 1.5rem; margin-bottom: 0;
}
.auth-footer {
  margin-top: 1.5rem; text-align: center; color: var(--brand-muted);
}
.auth-footer p {
  margin: .5rem 0;
}
.auth-footer a {
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}
.auth-footer a:hover {
  color: var(--brand-teal-600);
  text-decoration: underline;
}

/* Benefits List */
.benefits-list ul {
  list-style: none; padding: 0; margin: 1.5rem 0;
}
.benefits-list li {
  padding: .5rem 0;
}

/* Privacy Notice */
.privacy-notice {
  background: var(--brand-teal-100); border-color: #9fd1ca;
}
.privacy-notice h3 {
  margin-top: 0;
}
.privacy-notice ul {
  padding-left: 1.25rem; margin-bottom: 0;
}
.privacy-notice a {
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}
.privacy-notice a:hover {
  color: var(--brand-teal-600);
  text-decoration: underline;
}

/* Forms */
.auth-form {
  margin-top: 2rem;
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block; font-weight: 600; margin-bottom: .4rem;
  color: var(--brand-ink);
}
.form-input {
  width: 100%; padding: .75rem; border: 1px solid #ccc; border-radius: 10px; /* Softer corners */
  font-size: .95rem; background: #fff; color: var(--brand-ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-input:focus {
  border-color: var(--brand-teal); outline: none;
  border-width: 2px;
  padding: calc(.75rem - 1px); /* Compensate for thicker border */
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .1);
}
.form-input[aria-invalid="true"] {
  border-color: #dc2626;
}
.form-help {
  display: block; margin-top: .35rem; font-size: .85rem;
  color: var(--brand-muted);
}

/* Honeypot - Bot Protection (hidden from humans) */
.honeypot {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
  opacity: 0; pointer-events: none;
}

/* Flash Messages */
.flash-messages {
  margin: 1rem 0; display: grid; gap: .75rem;
}
.flash {
  display: flex; align-items: center; justify-content: space-between;
  padding: .85rem 1rem; border-radius: 10px; border: 1px solid;
  animation: slideIn .3s ease-out;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.flash-message {
  flex: 1;
}
.flash-close {
  background: transparent; border: 0; font-size: 1.5rem; line-height: 1;
  cursor: pointer; padding: 0 .25rem; margin-left: 1rem; color: inherit;
  opacity: .6; transition: opacity .2s ease;
}
.flash-close:hover { opacity: 1; }

/* Flash variants */
.flash-success {
  background: #d1fae5; color: #065f46; border-color: #a7f3d0;
}
.flash-error {
  background: #fee2e2; color: #991b1b; border-color: #fecaca;
}
.flash-warning {
  background: #fef3c7; color: #92400e; border-color: #fde68a;
}
.flash-info {
  background: #dbeafe; color: #1e40af; border-color: #bfdbfe;
}

/* Toast Notifications - Modern alternative to flash messages */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
  pointer-events: none; /* Allow clicks through container */
}

.toast {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: toast-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto; /* Toasts are clickable */
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.toast:hover {
  transform: translateX(-2px);
}

@keyframes toast-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.toast-exit {
  animation: toast-out 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes toast-out {
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.toast-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  font-size: 1.5rem;
  line-height: 1;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0 0 0.25rem 0;
}

.toast-message {
  font-size: 0.875rem;
  margin: 0;
  opacity: 0.9;
}

.toast-close {
  background: transparent;
  border: 0;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
  color: inherit;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.toast-close:hover {
  opacity: 1;
}

/* Toast variants with colored left border */
.toast-success {
  border-left: 4px solid var(--success);
  color: #065f46;
}

.toast-error {
  border-left: 4px solid var(--error);
  color: #991b1b;
}

.toast-warning {
  border-left: 4px solid var(--warning);
  color: #92400e;
}

.toast-info {
  border-left: 4px solid var(--info);
  color: #1e40af;
}

/* Mobile toast positioning */
@media (max-width: 640px) {
  .toast-container {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }

  .toast {
    width: 100%;
  }
}

/* Dark mode toasts */
@media (prefers-color-scheme: dark) {
  .toast {
    background: rgba(11, 18, 18, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .toast-success {
    color: #a7f3d0;
    border-left-color: var(--success);
  }

  .toast-error {
    color: #fecaca;
    border-left-color: var(--error);
  }

  .toast-warning {
    color: #fef3c7;
    border-left-color: var(--warning);
  }

  .toast-info {
    color: #bfdbfe;
    border-left-color: var(--info);
  }
}

/* Dashboard */
.dashboard-hero {
  margin-bottom: 1.5rem;
}
.dashboard-greeting {
  font-size: 1.8rem; margin: 0; color: var(--brand-ink);
}
.dashboard-subtitle {
  margin: .5rem 0 0; color: var(--brand-muted);
}

/* Trial Banner */
.trial-banner {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #fbbf24; border-radius: 12px; padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.trial-banner-content {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.trial-icon {
  font-size: 1.8rem;
}
.trial-text {
  flex: 1; min-width: 200px;
}
.trial-text strong {
  display: block; font-size: 1.1rem; color: #78350f;
}
.trial-days {
  display: block; margin-top: .25rem; color: #92400e;
}
.trial-message {
  margin: .75rem 0 0; color: #92400e;
}

/* Dashboard Stats */
.dashboard-stats {
  display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--card-bg); /* Use warm background */
  border: 1px solid var(--brand-border);
  border-radius: 12px; /* Softer corners */
  padding: 1.25rem; display: flex; align-items: center; gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease;
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
/* Clickable stat cards */
.stat-card-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.stat-card-link:hover {
  border-color: var(--brand-teal);
  box-shadow: var(--shadow-depth-md);
  transform: translateY(-4px);
}
.stat-card-link:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
/* Disabled stat cards (coming soon) */
.stat-card-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.stat-card-disabled:hover {
  box-shadow: var(--shadow-sm);
  transform: none;
}
.stat-icon {
  font-size: 2.5rem; line-height: 1;
}
.stat-content {
  flex: 1;
}
.stat-value {
  font-size: 1.8rem; font-weight: 700; color: var(--brand-ink);
}
.stat-label {
  font-size: .9rem; color: var(--brand-muted); margin-top: .25rem;
}
.stat-warning {
  color: #dc2626; font-weight: 600;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
  display: inline-block;
}

/* Floating animation for empty state icons */
@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

/* Seed growing animation for plant empty states */
@keyframes seed-grow {
  0% {
    transform: scale(0.9);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
}

.empty-icon-seed {
  animation: seed-grow 2s ease-in-out infinite;
}

.empty-state h3 {
  margin: .5rem 0;
  font-size: 1.3rem;
  animation: fade-in-up 0.6s ease;
}

.empty-state p {
  margin: .75rem 0 1.5rem;
  animation: fade-in-up 0.6s ease 0.2s both;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Upgrade Prompt */
.upgrade-prompt {
  background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
  border-color: #5eead4;
}
.upgrade-benefits ul {
  list-style: none; padding: 0; margin: 1rem 0 1.5rem;
  display: grid; gap: .5rem;
}
.section-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 1rem;
}

/* Account Page */
.breadcrumb {
  margin-bottom: 1.5rem;
}
.breadcrumb ol {
  list-style: none; padding: 0; margin: 0; display: flex; gap: .5rem;
  font-size: .9rem; color: var(--brand-muted);
}
.breadcrumb li {
  display: flex; align-items: center;
}
.breadcrumb li:not(:last-child)::after {
  content: '›'; margin-left: .5rem; color: var(--brand-muted);
}
.breadcrumb a {
  color: var(--brand-teal); text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.info-list {
  display: grid; gap: 1rem; margin: 0;
}
/* Mobile-first: Stack labels above values */
.info-item {
  display: grid; grid-template-columns: 1fr; gap: .5rem;
  padding: .75rem 0; border-bottom: 1px solid var(--brand-border);
}
.info-item:last-child {
  border-bottom: none;
}
.info-item dt {
  font-weight: 600; color: var(--brand-muted); font-size: .9rem;
}
.info-item dd {
  margin: 0; color: var(--brand-ink);
  word-wrap: break-word;
  overflow-wrap: break-word;
}
/* Desktop: Side-by-side layout */
@media (min-width: 560px) {
  .info-item {
    grid-template-columns: 150px 1fr;
    gap: 1rem;
  }
}
.code-snippet {
  font-family: 'Courier New', monospace; font-size: .85rem;
  background: #f3f4f6; padding: .2rem .5rem; border-radius: 6px; /* Slightly softer */
  color: #374151;
}
.plan-status {
  margin-bottom: 1.5rem;
}
/* Mobile-first: Plan badge */
.plan-badge {
  display: flex; align-items: center; gap: .75rem;
  padding: .875rem; border-radius: 12px; /* Softer corners */
  margin-bottom: 1rem;
  border: 2px solid;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}
@media (min-width: 560px) {
  .plan-badge {
    padding: 1rem;
    gap: 1rem;
  }
}
.plan-badge-premium {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: #fbbf24; color: #78350f;
}
.plan-badge-trial {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: #60a5fa; color: #1e40af;
}
.plan-badge-starter {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-color: #34d399; color: #065f46;
}
.badge-icon {
  font-size: 2rem; line-height: 1;
}
.badge-content {
  flex: 1;
}
.badge-content strong {
  display: block; font-size: 1.1rem; margin-bottom: .25rem;
}
.badge-subtitle {
  font-size: .9rem; opacity: .9;
}
.plan-details {
  margin-bottom: 1.5rem;
}
.plan-details p {
  margin: .5rem 0;
}
.plan-comparison {
  margin-top: 1.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--brand-border);
}
.plan-comparison summary {
  cursor: pointer;
  color: var(--brand-teal);
  font-weight: 600;
  list-style: none;
  padding: .75rem 0; /* Increased for better touch target */
  border-radius: 6px;
  transition: background-color 0.2s ease;
}
.plan-comparison summary::-webkit-details-marker {
  display: none;
}
.plan-comparison summary:hover,
.plan-comparison summary:focus {
  outline: 2px solid var(--brand-teal);
  outline-offset: 2px;
}
.plan-comparison summary::after {
  content: ' ▾';
  font-size: .8em;
  display: inline-block;
  transition: transform 0.2s ease;
}
.plan-comparison[open] summary::after {
  content: ' ▴';
  transform: rotate(180deg);
}
/* Mobile-first: Scrollable comparison table */
.comparison-table {
  margin-top: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.comparison-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 400px; /* Ensure table doesn't get too cramped */
}
.comparison-table th,
.comparison-table td {
  padding: .7rem .5rem; /* Increased padding for better touch targets (WCAG 2.5.5) */
  text-align: left;
  border-bottom: 1px solid var(--brand-border);
  font-size: .9rem;
}
.comparison-table thead th {
  background: var(--brand-teal-50);
  font-weight: 600;
  color: var(--brand-ink);
  position: sticky;
  top: 0;
  z-index: 1;
}
.comparison-table tbody th {
  font-weight: 500;
  color: var(--brand-muted);
}
.comparison-table tbody td {
  color: var(--brand-ink); /* Explicit color for better consistency */
}
@media (min-width: 560px) {
  .comparison-table th,
  .comparison-table td {
    padding: .75rem;
    font-size: 1rem;
  }
}
.card-danger {
  border-color: #fca5a5;
}
.danger-actions {
  display: grid; gap: 1.5rem;
}
/* Mobile-first: Stack danger item content */
.danger-item {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  background: #fef2f2;
  border-radius: 12px; /* Softer corners */
  border: 1px solid #fecaca;
}
.danger-item > div {
  flex: 1;
}
.danger-item strong {
  display: block; margin-bottom: .25rem; color: #991b1b;
}
/* Desktop: Side-by-side layout */
@media (min-width: 560px) {
  .danger-item {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .danger-item > .btn,
  .danger-item > a {
    flex-shrink: 0;
  }
}
.page-actions {
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--brand-border);
  text-align: center;
}

/* Pricing Page */
.pricing-hero {
  margin: 2rem 0 3rem; text-align: center;
}
.pricing-hero .section-title {
  font-size: 2rem; margin-bottom: .75rem;
}
.pricing-grid {
  display: grid; gap: 1.5rem; margin: 2rem 0;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.pricing-card {
  background: var(--card-bg); /* Use warm background */
  border: 2px solid var(--brand-border);
  border-radius: 16px; /* Softer, more organic feel */
  padding: 1.75rem; position: relative;
  box-shadow: var(--shadow-sm);
  transition: all .3s ease;
}
.pricing-card:hover {
  border-color: var(--brand-teal); transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.pricing-card-featured {
  border-color: var(--brand-teal); border-width: 3px;
  box-shadow: var(--shadow-md);
}
.pricing-card-featured:hover {
  box-shadow: var(--shadow-lg);
}
.pricing-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--brand-teal); color: #fff; font-size: .75rem;
  font-weight: 700; padding: .35rem .85rem; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .5px;
}
.pricing-header {
  text-align: center; margin-bottom: 1.5rem;
}
.pricing-title {
  font-size: 1.5rem; margin: 0 0 .75rem; color: var(--brand-ink);
}
.pricing-price {
  margin: 1rem 0;
}
.price-amount {
  font-size: 2.5rem; font-weight: 700; color: var(--brand-teal);
}
.price-period {
  font-size: 1rem; color: var(--brand-muted);
}
.pricing-description {
  color: var(--brand-muted); margin: .5rem 0 0;
}
.pricing-features {
  list-style: none; padding: 0; margin: 0 0 1.5rem;
}
.pricing-features li {
  padding: .6rem 0; border-bottom: 1px solid var(--brand-border);
  font-size: .95rem;
}
.pricing-features li:last-child {
  border-bottom: none;
}
.pricing-features .feature-disabled {
  color: var(--brand-muted); opacity: .6;
}
.badge-sm {
  font-size: .7rem; padding: .15rem .45rem; border-radius: 999px;
  background: #fbbf24; color: #78350f; margin-left: .35rem;
  vertical-align: middle;
}

/* Pricing FAQ */
.pricing-faq {
  min-width:100%; max-width: 720px; margin: 3rem auto;
}
.faq-item {
  border-bottom: 1px solid var(--brand-border); padding: 1rem 0;
}
.faq-item:last-child {
  border-bottom: none;
}
.faq-item summary {
  font-weight: 600; cursor: pointer; list-style: none;
  padding: .5rem 0; color: var(--brand-ink);
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::before {
  content: '▶'; display: inline-block; margin-right: .75rem;
  transition: transform .2s ease; font-size: .8rem;
}
.faq-item[open] summary::before {
  transform: rotate(90deg);
}
.faq-item p {
  margin: .75rem 0 .5rem 1.5rem; color: var(--brand-ink-2);
}
.faq-item a {
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  border-bottom: 1px solid var(--link);
}
.faq-item a:hover {
  color: var(--brand-teal-600);
  border-bottom-color: var(--brand-teal-600);
}

/* Badges */
.badge-premium {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #78350f; padding: .35rem .75rem; border-radius: 999px;
  font-size: .85rem; font-weight: 600;
}

/* Auth Callback Loading Page */
.auth-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
}
.auth-loading h1 {
  margin: 1rem 0 0.5rem;
  font-size: 1.5rem;
  color: var(--brand-ink);
}
.auth-loading .spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: var(--brand-teal);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.auth-status-message {
  margin: 1rem 0 0.5rem;
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}
.auth-loading-phrase {
  margin: 0.75rem 0 0;
  font-size: 1.25rem;
  color: var(--brand-teal);
  font-weight: 600;
  font-style: italic;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}
@keyframes spin-auth {
  to { transform: rotate(360deg); }
}

/* Dark Mode Additions */
@media (prefers-color-scheme: dark) {
  .form-input {
    background: #0f1a1a; color: #e8edf2; border-color: rgba(255,255,255,.22);
  }
  .user-menu-dropdown {
    background: #0e1616; border-color: rgba(255,255,255,.22);
  }
  .user-menu-dropdown a, .user-menu-dropdown span {
    color: #e8edf2; border-color: rgba(255,255,255,.15);
  }
  .user-menu-dropdown a:hover {
    background: #17464a;
  }
  .btn-secondary {
    background: #0f1a1a; color: #e5e7eb; border-color: rgba(255,255,255,.28);
  }
  .btn-secondary:hover {
    background: #122121; border-color: var(--brand-teal);
  }
  .auth-help, .privacy-notice, .upgrade-prompt {
    background: #0f1c1b; border-color: #1a6d64;
  }
  .trial-banner {
    background: linear-gradient(135deg, #312e1b 0%, #5f5627 100%);
    border-color: #a16207; color: #fff5cc;
  }
  .trial-text strong, .trial-days, .trial-message {
    color: #fef3c7;
  }
  .stat-card {
    background: #0e1616; border-color: rgba(255,255,255,.18);
  }
  .pricing-card {
    background: #0e1616; border-color: rgba(255,255,255,.22);
  }
  .pricing-card:hover {
    border-color: #17a29a;
    box-shadow: 0 12px 24px rgba(23, 162, 154, .3);
  }
  .pricing-card-featured {
    border-color: #17a29a;
    box-shadow: 0 8px 20px rgba(23, 162, 154, .4);
  }
  .flash-success {
    background: #0c2e20; color: #a7f3d0; border-color: #166534;
  }
  .flash-error {
    background: #2c1515; color: #fecaca; border-color: #991b1b;
  }
  .flash-warning {
    background: #312e1b; color: #fef3c7; border-color: #78350f;
  }
  .flash-info {
    background: #1e3a5f; color: #bfdbfe; border-color: #1e40af;
  }
  /* Account Page Dark Mode */
  .breadcrumb a {
    color: #5eead4;
  }
  .info-item {
    border-color: rgba(255,255,255,.15);
  }
  .info-item dt {
    color: #9ca3af;
  }
  .info-item dd {
    color: #e8edf2;
  }
  .code-snippet {
    background: #1f2937; color: #d1d5db;
  }
  .plan-badge-premium {
    background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
    border-color: #fbbf24; color: #fef3c7;
  }
  .plan-badge-trial {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border-color: #60a5fa; color: #dbeafe;
  }
  .plan-badge-starter {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
    border-color: #34d399; color: #d1fae5;
  }
  .plan-comparison {
    border-color: rgba(255,255,255,.15);
  }
  .comparison-table th,
  .comparison-table td {
    border-color: rgba(255,255,255,.15);
  }
  .comparison-table thead th {
    background: #0f3632; color: #e8edf2;
  }
  .comparison-table tbody th {
    color: #9ca3af; /* WCAG AA: 7.1:1 contrast on #0b1212 */
  }
  .comparison-table tbody td {
    color: #EADFCF; /* WCAG AAA: 13.8:1 contrast on #0b1212 */
  }
  .card-danger {
    border-color: #ef4444;
  }
  .danger-item {
    background: #2c1515;
    border-color: #991b1b;
    color: #fecaca; /* WCAG AAA compliant: 11.3:1 contrast on #2c1515 */
  }
  .danger-item strong {
    color: #fca5a5; /* WCAG AAA compliant: 8.9:1 contrast on #2c1515 */
  }
  .danger-item .muted,
  .danger-item .small {
    color: #fecaca; /* Override default muted color for WCAG compliance */
  }
  .page-actions {
    border-color: rgba(255,255,255,.15);
  }
  .legal-content h3,
  .legal-content h4 {
    color: #e8edf2;
  }
  .legal-content a {
    color: #5eead4;
  }
  .auth-loading .spinner {
    border-color: #374151;
    border-top-color: var(--brand-teal);
  }
  .auth-status-message {
    color: #9ca3af;
  }
  .auth-loading-phrase {
    color: #5eead4;
  }
  /* Button contrast fixes for WCAG compliance */
  .btn-outline {
    color: #5eead4; /* WCAG AAA compliant: 11.2:1 contrast on #0e1616 */
    border-color: #5eead4;
  }
  .btn-outline:hover, .btn-outline:focus {
    background: #5eead4;
    color: #0b1212;
  }
  .danger-item .btn-outline {
    color: #fca5a5; /* WCAG AAA compliant: 8.9:1 contrast on #2c1515 */
    border-color: #fca5a5;
  }
  .danger-item .btn-outline:hover, .danger-item .btn-outline:focus {
    background: #fca5a5;
    color: #2c1515;
  }
}

/* =====================================================
   Legal pages (Terms & Privacy)
   ===================================================== */

.legal-content {
  line-height: 1.6;
  max-width: 800px;
}

.legal-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--brand-ink);
  border-bottom: 2px solid var(--brand-border);
  padding-bottom: 0.5rem;
}

.legal-content h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brand-ink-2);
}

.legal-content p {
  margin-bottom: 1rem;
  color: var(--brand-ink);
}

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

.legal-content li {
  margin-bottom: 0.5rem;
  color: var(--brand-ink);
}

.legal-content strong {
  font-weight: 600;
  color: var(--brand-ink);
}

.legal-content a {
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.legal-content a:hover {
  color: var(--brand-teal-600);
  text-decoration: underline;
}

/* =====================================================
   Phase 2: Botanical Touches
   ===================================================== */

/* Logo animation: gentle grow on hover */
@keyframes gentle-grow {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}

.site-logo {
  transition: transform 0.2s ease;
}

.site-logo:hover {
  animation: gentle-grow 1.5s ease-in-out;
}

/* Respect user preferences for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .site-logo:hover {
    animation: none;
    transform: scale(1.03);
  }
}

/* Botanical watermark background - repeating pattern (header only) */
.header-watermark {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image: url('../images/illustrations/botanical-watermark.svg');
  background-repeat: repeat;
  background-position: 0 0;
  background-size: 320px 320px;
  opacity: 0.15;
}

.site-header .header-inner {
  position: relative;
  z-index: 100;
}

/* Leaf checkmark benefits list */
.benefits-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.benefit-item::before {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  min-width: 16px;
  background-image: url('../images/illustrations/leaf-check.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  margin-top: 0.3rem;
}

/* Empty state illustration */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-state-illustration {
  width: 240px;
  height: 240px;
  margin: 0 auto 2rem;
  opacity: 0.9;
  animation: float 3s ease-in-out infinite;
}

/* Seed/plant specific illustration animation */
.empty-state-illustration.seed {
  animation: seed-grow 2s ease-in-out infinite;
}

.empty-state-message {
  font-size: 1.25rem;
  color: var(--brand-ink-2);
  margin-bottom: 1rem;
  animation: fade-in-up 0.6s ease;
}

.empty-state-hint {
  font-size: 0.95rem;
  color: var(--brand-muted);
  animation: fade-in-up 0.6s ease 0.2s both;
}

/* Dark mode adjustments for Phase 2 */
@media (prefers-color-scheme: dark) {
  .page-watermark {
    opacity: 0.08;
  }

  .empty-state-message {
    color: #d1d5db;
  }

  .empty-state-hint {
    color: #9ca3af;
  }

  /* Stronger glow for emoji in dark mode */
  .brand-initials {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5))
            drop-shadow(0 0 12px rgba(94, 234, 212, 0.6));
    text-shadow: 0 0 25px rgba(94, 234, 212, 0.4),
                 0 0 50px rgba(94, 234, 212, 0.3);
  }
}

/* Responsive site logo - smaller on mobile */
@media (max-width: 640px) {
  .site-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }
  .logo-icon {
    font-size: 2.25rem;
  }
  .logo-lockup {
    gap: 0.75rem;
  }
}

/* Additional mobile optimizations for very small screens */
@media (max-width: 400px) {
  /* Smaller padding on cards for more content space */
  .card {
    padding: 1rem;
  }

  /* Ensure buttons don't overflow */
  .btn-small {
    padding: .35rem .65rem;
    font-size: .8rem;
  }

  /* Stack danger-item buttons on very small screens */
  .danger-item {
    gap: .75rem;
  }

  /* Reduce table minimum width for better small screen experience */
  .comparison-table table {
    min-width: 340px;
  }

  /* Better spacing for action buttons on small screens */
  .action-buttons {
    grid-template-columns: 1fr;
  }

  /* Smaller stat cards */
  .dashboard-stats {
    gap: .75rem;
  }

  .stat-card {
    padding: 1rem;
  }

  /* Reduce navigation gap */
  .site-nav {
    gap: .75rem;
  }

  /* Smaller form inputs for better mobile experience */
  input[type="text"], textarea, select {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* =====================================================
   Mobile Bottom Navigation - App-like experience
   ===================================================== */

/* Hide bottom nav by default on desktop */
.bottom-nav {
  display: none;
}

/* Show bottom nav only on mobile */
@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(10px); /* Safari/iOS support */
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom));
    z-index: 1000;
    justify-content: space-around;
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
  }

  .bottom-nav.hidden {
    transform: translateY(100%);
  }

  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    min-height: 44px; /* WCAG 2.2 touch target minimum */
    min-width: 44px;
    color: var(--brand-muted);
    text-decoration: none;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    position: relative;
  }

  /* Touch press-down feedback */
  .bottom-nav-item:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }

  .bottom-nav-item-icon {
    font-size: 1.5rem;
    transition: transform 0.2s ease;
  }

  .bottom-nav-item.active {
    color: var(--brand-teal);
    font-weight: 600;
  }

  .bottom-nav-item.active .bottom-nav-item-icon {
    transform: scale(1.1);
  }

  /* Animated indicator pill */
  .bottom-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--brand-teal);
    border-radius: 0 0 2px 2px;
    transition: width 0.3s ease;
  }

  .bottom-nav-item.active::before {
    width: 40px;
  }

  /* Add padding to body to prevent content hiding */
  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }

  /* Hide main navigation on mobile when bottom nav is present */
  .site-nav {
    display: none;
  }
}

/* Dark mode bottom nav */
@media (max-width: 768px) and (prefers-color-scheme: dark) {
  .bottom-nav {
    background: rgba(11, 18, 18, 0.98);
    border-top-color: rgba(255, 255, 255, 0.1);
  }

  .bottom-nav-item {
    color: #9ca3af;
  }

  .bottom-nav-item.active {
    color: #5eead4;
  }

  .bottom-nav-item::before {
    background: #5eead4;
  }
}

/* =====================================================
   Touch Interactions & Mobile Polish
   ===================================================== */

/* Touch-friendly press-down states for interactive elements */
@media (hover: none) and (pointer: coarse) {
  /* Buttons - scale down on tap for tactile feedback */
  .btn:active,
  button:active {
    transform: scale(0.97);
    transition: transform 0.1s ease;
  }

  .btn-primary:active {
    transform: scale(0.97) translateY(-1px);
  }

  /* Cards - subtle scale feedback when tapped */
  .card:active,
  .plant-card:active,
  .weather-card:active,
  .forecast-card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }

  /* Links and nav items */
  .nav-link:active,
  a:active:not(.bottom-nav-item) {
    opacity: 0.7;
    transition: opacity 0.1s ease;
  }

  /* Form inputs - enhanced focus on tap */
  input:active:not([type="submit"]),
  textarea:active,
  select:active {
    border-width: 2px;
    border-color: var(--brand-teal);
  }

  /* Remove hover effects on touch devices (prevents sticky hover) */
  .card:hover:not(:active),
  .btn:hover:not(:active),
  .nav-link:hover:not(:active) {
    transform: none;
  }
}

/* Ensure all interactive elements meet WCAG 2.2 touch target minimum (44x44px) */
@media (max-width: 768px) {
  /* Buttons */
  .btn {
    min-height: 44px;
    padding: 0.75rem 1.5rem;
  }

  .btn-icon,
  .btn-sm {
    min-height: 44px;
    min-width: 44px;
  }

  /* Icon buttons and close buttons */
  .flash-close,
  .toast-close,
  .user-menu-btn,
  button[aria-label] {
    min-height: 44px;
    min-width: 44px;
    padding: 0.5rem;
  }

  /* Nav links */
  .nav-link {
    min-height: 44px;
    padding: 0.75rem 1rem;
  }

  /* Form inputs */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  input[type="url"],
  textarea,
  select {
    min-height: 44px;
    font-size: 16px; /* Prevents iOS zoom on focus */
    padding: 0.75rem;
  }

  /* Links in cards */
  .card a,
  .plant-card a,
  .weather-card a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.5rem;
  }

  /* Form checkboxes and radio buttons */
  input[type="checkbox"],
  input[type="radio"] {
    min-height: 24px;
    min-width: 24px;
    /* Labels should be 44px, not inputs themselves */
  }

  /* Labels for checkboxes/radios provide the touch target */
  label {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
  }
}

/* =====================================================
   Coming Soon Badge Component
   ===================================================== */

.badge-soon {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #78350f;
  border-radius: 6px;
  margin-left: 0.5rem;
  vertical-align: middle;
  box-shadow: 0 1px 3px rgba(251, 191, 36, 0.3);
}

@media (prefers-color-scheme: dark) {
  .badge-soon {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1a1a1a;
    box-shadow: 0 1px 3px rgba(251, 191, 36, 0.4);
  }
}

/* =====================================================
   Plant Management Styles
   ===================================================== */

/* Page header for plant pages */
.page-header {
  margin-bottom: 2rem;
}

.page-subtitle {
  color: var(--brand-muted);
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

.plant-nickname-large {
  font-size: 0.9em;
  color: var(--brand-muted);
  font-weight: 400;
  font-style: italic;
}

/* Actions bar */
.actions-bar {
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Plants grid */
.plants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 640px) {
  .plants-grid {
    grid-template-columns: 1fr;
  }
}

/* Plant card */
.plant-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.plant-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-depth-md);
}

.plant-photo {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--gradient-card-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.plant-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.plant-photo-placeholder {
  background: linear-gradient(135deg, #f0f7f6 0%, #e6f2f0 100%);
}

.plant-icon {
  font-size: 4rem;
  opacity: 0.3;
}

.plant-info {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.plant-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-ink);
  margin: 0 0 0.5rem 0;
}

.plant-nickname {
  font-size: 0.9em;
  color: var(--brand-muted);
  font-weight: 400;
  font-style: italic;
}

.plant-species {
  color: var(--brand-muted);
  font-size: 0.95rem;
  margin: 0 0 1rem 0;
}

.plant-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.plant-tag {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  background: rgba(15, 118, 110, 0.1);
  color: var(--brand-teal-600);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

.plant-actions {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--brand-border);
}

/* Plant detail page */
.plant-detail {
  max-width: 800px;
  margin: 0 auto;
}

.plant-detail-photo {
  margin-bottom: 2rem;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-depth-md);
}

.plant-detail-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.plant-detail-info {
  margin-bottom: 2rem;
}

.info-list {
  margin: 1.5rem 0 0 0;
}

.info-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--brand-border);
}

.info-item:last-child {
  border-bottom: none;
}

.info-item dt {
  font-weight: 600;
  color: var(--brand-ink-2);
}

.info-item dd {
  margin: 0;
  color: var(--brand-ink);
}

@media (max-width: 640px) {
  .info-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

/* Plant actions section */
.plant-actions-section {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 2px solid var(--brand-border);
}

.delete-form {
  margin-left: auto;
}

/* Plant form */
.form-container {
  max-width: 600px;
  margin: 0 auto;
}

.plant-form {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-depth-sm);
}

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

.form-label {
  display: block;
  font-weight: 600;
  color: var(--brand-ink-2);
  margin-bottom: 0.5rem;
}

.required {
  color: var(--error);
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: var(--bg-warm-white);
}

.form-input:focus {
  border-color: var(--brand-teal);
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.form-help {
  display: block;
  margin-top: 0.5rem;
  color: var(--brand-muted);
  font-size: 0.9rem;
}

.form-row--two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .form-row--two {
    grid-template-columns: 1fr;
  }
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--brand-border);
}

/* Current photo in edit form */
.current-photo {
  margin-bottom: 1.5rem;
}

.current-photo-thumb {
  max-width: 200px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  margin-top: 0.5rem;
}

/* Danger button for delete */
.btn-danger {
  color: var(--error);
  border-color: var(--error);
}

.btn-danger:hover,
.btn-danger:focus {
  background: var(--error);
  color: white;
  border-color: var(--error);
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  .plant-photo-placeholder {
    background: linear-gradient(135deg, #0f1a1a 0%, #1a2828 100%);
  }

  .plant-tag {
    background: rgba(94, 234, 212, 0.15);
    color: #5eead4;
  }

  .form-input {
    background: #0f1a1a;
    color: #e8edf2;
    border-color: rgba(255, 255, 255, 0.22);
  }

  .plant-form {
    background: #0b1212;
  }
}
