/* ============================================
   NATURALIST Design System
   Comparium - Editorial, quiet, timeless
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */

:root {
  /* Colors */
  --white: #fefdfb;
  --ivory: #faf9f6;
  --stone: #f4f3f0;
  --border: #e5e3de;

  --forest: #234a3a;
  --forest-light: #2d5a47;
  --gold: #9a7b4f;

  --ink: #1a1a1a;
  --ink-secondary: #4a4a4a;
  --ink-tertiary: #7a7a7a;

  /* Status colors */
  --success: #2d5a47;
  --success-bg: rgba(45, 90, 71, 0.1);
  --warning: #9a7b4f;
  --warning-bg: rgba(154, 123, 79, 0.1);
  --danger: #8b3a3a;
  --danger-bg: rgba(139, 58, 58, 0.1);

  /* Continent/Origin colors - for habitat badges and filters */
  --origin-south-america: #3d5a3d;
  --origin-south-america-bg: rgba(61, 90, 61, 0.12);
  --origin-africa: #2d4a6d;
  --origin-africa-bg: rgba(45, 74, 109, 0.12);
  --origin-asia: #4a6b5a;
  --origin-asia-bg: rgba(74, 107, 90, 0.12);
  --origin-north-central-america: #9a7b4f;
  --origin-north-central-america-bg: rgba(154, 123, 79, 0.12);
  --origin-australia-oceania: #3d6a6a;
  --origin-australia-oceania-bg: rgba(61, 106, 106, 0.12);

  /* Typography - Zodiak (editorial serif) + Figtree (warm humanist sans) */
  --font-serif: 'Zodiak', Georgia, serif;
  --font-sans: 'Figtree', system-ui, sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;

  /* Premium Effects (Living Wall) */
  --blur-glass: 4px;
  --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.12);
  --shadow-float: 0 16px 40px rgba(0, 0, 0, 0.15);

  /* Fluid Typography Scale (WCAG-compliant rem-based) */
  --text-hero: clamp(2.5rem, 2rem + 1.5vw, 4rem);
  --text-section-title: clamp(1.75rem, 1.5rem + 0.5vw, 2.5rem);
  --text-tile-title: clamp(1.125rem, 1rem + 0.25vw, 1.5rem);
  --text-tile-body: clamp(0.875rem, 0.8rem + 0.15vw, 1rem);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

/* Elements waiting to animate have initial hidden state */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
}

/* Animated state */
.animate-on-scroll.animate-in {
  animation: fadeSlideIn 0.5s ease forwards;
}

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

/* Respect reduced motion preference */
.reduce-motion .animate-on-scroll,
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ============================================
   ORIGIN BADGES
   ============================================ */

.origin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: white;
}

/* Badge on card image - positioned top-right */
.glossary-card-image .origin-badge,
.glossary-item-image-container .origin-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  z-index: 1;
}

.glossary-card-image,
.glossary-item-image-container {
  position: relative;
}

/* Inline badge - used in glossary items */
.origin-badge-inline {
  font-size: 0.65rem;
}

/* Corner positioned badge - top right of glossary item content */
.glossary-item-content {
  position: relative;
}

.glossary-item-origin-corner {
  position: absolute;
  top: 0;
  right: 0;
}

/* Continent-specific badge colors */
.origin-badge[data-origin='southAmerica'] {
  background: var(--origin-south-america);
}

.origin-badge[data-origin='africa'] {
  background: var(--origin-africa);
}

.origin-badge[data-origin='asia'] {
  background: var(--origin-asia);
}

.origin-badge[data-origin='northCentralAmerica'] {
  background: var(--origin-north-central-america);
}

.origin-badge[data-origin='australiaOceania'] {
  background: var(--origin-australia-oceania);
}

/* ============================================
   ORIGIN FILTER CHIPS (Glossary)
   ============================================ */

.origin-filters {
  display: none; /* Hidden until Species category is selected */
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: 0 var(--space-lg);
  margin-bottom: var(--space-lg);
}

.origin-filters.visible {
  display: flex;
}

.origin-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.origin-chip:hover {
  background: var(--ivory);
  border-color: var(--ink-tertiary);
}

.origin-chip.active {
  background: var(--forest);
  border-color: var(--forest);
  color: white;
}

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

.origin-chip .chip-count {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Continent-specific dot colors */
.origin-chip[data-origin='southAmerica'] .chip-dot {
  background: var(--origin-south-america);
}
.origin-chip[data-origin='africa'] .chip-dot {
  background: var(--origin-africa);
}
.origin-chip[data-origin='asia'] .chip-dot {
  background: var(--origin-asia);
}
.origin-chip[data-origin='northCentralAmerica'] .chip-dot {
  background: var(--origin-north-central-america);
}
.origin-chip[data-origin='australiaOceania'] .chip-dot {
  background: var(--origin-australia-oceania);
}

/* Active chip changes dot to white */
.origin-chip.active .chip-dot {
  background: white;
}

/* ============================================
   ORIGIN EXPLORE SECTION (Homepage)
   ============================================ */

.origin-explore-section {
  padding: var(--space-2xl) var(--space-lg);
  background: var(--ivory);
  text-align: center;
}

.origin-explore-section h2 {
  font-family: var(--font-sans);
  font-size: 2rem;
  color: var(--ink);
  margin-bottom: var(--space-sm);
}

.origin-explore-subtitle {
  color: var(--ink-secondary);
  font-size: 1.1rem;
  margin-bottom: var(--space-xl);
}

.origin-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  max-width: 1000px;
  margin: 0 auto;
}

.origin-tile {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  text-decoration: none;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.origin-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--forest);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.origin-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: var(--ink-tertiary);
}

.origin-tile:hover::before {
  opacity: 1;
}

.origin-tile-content {
  text-align: left;
}

.origin-tile-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-bottom: var(--space-sm);
}

.origin-tile h3 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 var(--space-xs) 0;
}

.origin-tile p {
  font-size: 0.85rem;
  color: var(--ink-secondary);
  margin: 0 0 var(--space-sm) 0;
  line-height: 1.4;
}

.origin-tile-count {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--forest);
  background: var(--origin-south-america-bg);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

/* Continent-specific tile colors */
.origin-tile[data-origin='southAmerica'] .origin-tile-dot {
  background: var(--origin-south-america);
}
.origin-tile[data-origin='southAmerica']::before {
  background: var(--origin-south-america);
}
.origin-tile[data-origin='southAmerica'] .origin-tile-count {
  background: var(--origin-south-america-bg);
}

.origin-tile[data-origin='africa'] .origin-tile-dot {
  background: var(--origin-africa);
}
.origin-tile[data-origin='africa']::before {
  background: var(--origin-africa);
}
.origin-tile[data-origin='africa'] .origin-tile-count {
  background: var(--origin-africa-bg);
}

.origin-tile[data-origin='asia'] .origin-tile-dot {
  background: var(--origin-asia);
}
.origin-tile[data-origin='asia']::before {
  background: var(--origin-asia);
}
.origin-tile[data-origin='asia'] .origin-tile-count {
  background: var(--origin-asia-bg);
}

.origin-tile[data-origin='northCentralAmerica'] .origin-tile-dot {
  background: var(--origin-north-central-america);
}
.origin-tile[data-origin='northCentralAmerica']::before {
  background: var(--origin-north-central-america);
}
.origin-tile[data-origin='northCentralAmerica'] .origin-tile-count {
  background: var(--origin-north-central-america-bg);
}

.origin-tile[data-origin='australiaOceania'] .origin-tile-dot {
  background: var(--origin-australia-oceania);
}
.origin-tile[data-origin='australiaOceania']::before {
  background: var(--origin-australia-oceania);
}
.origin-tile[data-origin='australiaOceania'] .origin-tile-count {
  background: var(--origin-australia-oceania-bg);
}

/* ============================================
   CATEGORY CARDS (Homepage - Browse Database)
   ============================================ */

.category-showcase {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-lg);
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-lg);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  min-width: 160px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: var(--forest);
}

.category-name {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
}

.category-count {
  font-size: 0.85rem;
  color: var(--ink-secondary);
  margin-top: 4px;
  text-align: center;
}

/* ============================================
   ORIGIN CARDS (Homepage - Explore by Origin)
   ============================================ */

.origin-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.origin-card {
  position: relative;
  display: block;
  width: 180px;
  height: 140px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.origin-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.origin-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.origin-card:hover img {
  transform: scale(1.08);
}

.origin-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.1) 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-md);
}

.origin-card-name {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
}

.origin-card-count {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 2px;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .category-showcase {
    gap: var(--space-md);
  }
  .category-card {
    padding: var(--space-lg) var(--space-md);
    min-width: 140px;
  }
  .category-name {
    font-size: 1rem;
  }
  .origin-card {
    width: 150px;
    height: 120px;
  }
  .origin-card-name {
    font-size: 0.9rem;
  }
}

/* ============================================
   SPECIES DETAIL PAGE - ORIGIN CONTEXT
   ============================================ */

/* Origin badge in species title area */
.species-origin-badge {
  display: inline-flex;
  margin-top: var(--space-xs);
  text-decoration: none;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.species-origin-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Related species section */
.related-species-section {
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.related-species-section h3 {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  color: var(--ink);
  margin-bottom: var(--space-xs);
}

.related-species-subtitle {
  color: var(--ink-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--space-lg);
}

.related-species-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.related-species-card {
  display: block;
  text-decoration: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  transition: all 0.25s ease;
}

.related-species-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  border-color: var(--ink-tertiary);
}

.related-species-image {
  aspect-ratio: 4/3;
  overflow: hidden;
}

.related-species-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-species-card:hover .related-species-image img {
  transform: scale(1.08);
}

.related-species-name {
  display: block;
  padding: var(--space-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.related-species-link {
  display: inline-block;
  color: var(--forest);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.related-species-link:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ============================================
   SKELETON LOADING STATES
   ============================================ */

.skeleton {
  background: linear-gradient(90deg, var(--ivory) 25%, var(--stone) 50%, var(--ivory) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite ease-in-out;
  border-radius: var(--radius-md);
}

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

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

.skeleton-image {
  aspect-ratio: 16/10;
  border-radius: var(--radius-lg);
}

.skeleton-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.skeleton-card .skeleton-image {
  border-radius: 0;
}

.skeleton-card-content {
  padding: var(--space-lg);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ============================================
   FORM INPUT FOCUS STATES
   ============================================ */

/* Form input focus states */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(35, 74, 58, 0.15);
}

input,
select,
textarea {
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

/* ============================================
   RESET & BASE
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--forest);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--forest-light);
}

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

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
}

h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.5rem;
}
h4 {
  font-size: 1.25rem;
}
h5 {
  font-size: 1.1rem;
}
h6 {
  font-size: 1rem;
}

p {
  margin-bottom: var(--space-md);
}

.text-secondary {
  color: var(--ink-secondary);
}

.text-muted {
  color: var(--ink-tertiary);
}

.text-center {
  text-align: center;
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.section {
  padding: var(--space-3xl) var(--space-xl);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-title {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.section-text {
  color: var(--ink-secondary);
  font-size: 1.05rem;
}

/* ============================================
   HEADER
   ============================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: var(--space-lg) var(--space-3xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 56px;
  width: auto;
  display: block;
}

.logo:hover {
  opacity: 0.9;
}

.tagline {
  font-size: 0.85rem;
  color: var(--ink-tertiary);
  margin-left: var(--space-md);
}

.nav {
  display: flex;
  gap: var(--space-xl);
  align-items: center;
}

.nav a {
  color: var(--ink-secondary);
  font-size: 0.95rem;
  position: relative;
  padding: var(--space-xs) 0;
  transition: color var(--transition-base);
}

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

.nav a.active {
  color: var(--forest);
}

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--forest);
}

.nav-cta {
  background: var(--forest);
  color: var(--white) !important;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--forest-dark, #1a3a2e);
  color: var(--white) !important;
}

.nav-cta.active::after {
  display: none;
}

/* Ghost button style for Login */
.nav-ghost {
  border: 1px solid var(--forest);
  color: var(--forest) !important;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  background: transparent;
}

.nav-ghost:hover {
  background: var(--forest);
  color: var(--white) !important;
}

.nav-ghost.active::after {
  display: none;
}

/* Dashboard link - hidden by default, shown when logged in */
.nav-dashboard {
  display: none;
}

body.logged-in .nav-dashboard {
  display: inline-flex;
  background: var(--forest);
  color: var(--white) !important;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
}

body.logged-in .nav-dashboard:hover {
  background: var(--forest-dark, #1a3a2e);
  color: var(--white) !important;
}

body.logged-in .nav-dashboard.active::after {
  display: none;
}

/* Auth links in header */
#auth-links {
  display: flex;
  gap: var(--space-sm);
}

.welcome-text {
  font-size: 0.85rem;
  color: var(--ink-tertiary);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.85rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
}

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

/* Hover only on devices that support it (prevents mobile double-tap) */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background: var(--forest-light);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
  }
}

/* Keyboard focus matches hover (accessibility) */
.btn-primary:focus-visible {
  background: var(--forest-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: var(--ivory);
  color: var(--ink);
  border: 1px solid var(--border);
}

@media (hover: hover) and (pointer: fine) {
  .btn-secondary:hover {
    border-color: var(--forest);
    background: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-subtle);
  }
}

.btn-secondary:focus-visible {
  border-color: var(--forest);
  background: var(--white);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-secondary);
  padding: 0.85rem 1rem;
}

@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover {
    color: var(--forest);
    transform: translateY(-2px);
  }
}

.btn-ghost:focus-visible {
  color: var(--forest);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.btn-ghost:active {
  transform: scale(0.98);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

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

.btn-danger:hover {
  background: #a04545;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  padding: var(--space-3xl) var(--space-xl);
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--forest);
  margin-bottom: var(--space-lg);
}

.hero h1 {
  font-size: 3.25rem;
  line-height: 1.2;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: italic;
}

.hero-text {
  font-size: 1.15rem;
  color: var(--ink-secondary);
  max-width: 480px;
  margin: 0 auto var(--space-xl);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   HERO SPLIT LAYOUT (Landing Page Redesign)
   ============================================ */

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem;
  min-height: 70vh;
}

.hero-content h1 {
  font-family: var(--font-sans);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.hero-content p {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink-secondary);
  margin-bottom: 2rem;
  line-height: 1.5;
}

.hero-content .btn {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 1rem 2rem;
}

/* Fish Collage (Asymmetric) */
.fish-collage {
  position: relative;
  height: 450px;
}

.fish-collage-item {
  position: absolute;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 3px solid var(--white);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease;
}

.fish-collage-item:hover {
  transform: scale(1.05);
  z-index: 10;
}

.fish-collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fish-collage-item:nth-child(1) {
  width: 220px;
  height: 165px;
  top: 0;
  right: 60px;
  z-index: 4;
}

.fish-collage-item:nth-child(2) {
  width: 180px;
  height: 135px;
  top: 140px;
  right: 0;
  z-index: 3;
}

.fish-collage-item:nth-child(3) {
  width: 200px;
  height: 150px;
  top: 180px;
  right: 200px;
  z-index: 2;
}

.fish-collage-item:nth-child(4) {
  width: 160px;
  height: 120px;
  bottom: 20px;
  right: 80px;
  z-index: 1;
}

/* ============================================
   DEMO PREVIEW SECTION
   ============================================ */

.demo-section {
  background: var(--ivory);
  padding: 5rem 2rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.demo-container {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.demo-section h2 {
  font-family: var(--font-sans);
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--ink);
}

.demo-section .lead {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink-secondary);
  margin-bottom: 2.5rem;
}

.demo-preview {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: left;
}

.demo-preview-placeholder {
  font-family: var(--font-sans);
  background: var(--stone);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  color: var(--ink-tertiary);
  font-weight: 500;
  font-style: italic;
}

/* ============================================
   SPECIES SHOWCASE
   ============================================ */

.showcase-section {
  padding: 5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.showcase-section h2 {
  font-family: var(--font-sans);
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--ink);
}

.species-showcase {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.showcase-item {
  text-align: center;
  text-decoration: none;
  color: inherit;
}

.showcase-item:hover .showcase-image {
  border-color: var(--forest);
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.showcase-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border);
  margin-bottom: 0.75rem;
  transition:
    transform 0.25s ease,
    border-color var(--transition-base),
    box-shadow 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.showcase-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.showcase-item:hover .showcase-image img {
  transform: scale(1.05);
}

.showcase-name {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.showcase-cta {
  text-align: center;
}

.showcase-cta a {
  font-family: var(--font-sans);
  color: var(--forest);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

.showcase-cta a:hover {
  text-decoration: underline;
}

/* ============================================
   ORIGIN NOTE
   ============================================ */

.origin-note {
  padding: 3rem 2rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.origin-note p {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-tertiary);
  line-height: 1.7;
}

/* ============================================
   STATS BAR
   ============================================ */

.stats {
  display: flex;
  justify-content: center;
  gap: var(--space-3xl);
  padding: var(--space-2xl) var(--space-xl);
  background: var(--ivory);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat {
  text-align: center;
}

.stat-value {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--ink);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--ink-tertiary);
  margin-top: var(--space-xs);
}

/* ============================================
   CARDS
   ============================================ */

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: all var(--transition-base);
}

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

.card-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
}

.card-text {
  font-size: 0.95rem;
  color: var(--ink-secondary);
  line-height: 1.7;
}

/* Feature cards with left border */
.feature {
  padding-left: var(--space-md);
  border-left: 2px solid var(--border);
  transition: border-color var(--transition-base);
}

.feature:hover {
  border-left-color: var(--forest);
}

.feature-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.feature-text {
  font-size: 0.95rem;
  color: var(--ink-secondary);
  line-height: 1.7;
}

/* ============================================
   TAGS & BADGES
   ============================================ */

.tag {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
  background: var(--success-bg);
  color: var(--forest);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-full);
}

.badge-peaceful {
  background: var(--success-bg);
  color: var(--success);
}

.badge-semi-aggressive {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge-aggressive {
  background: var(--danger-bg);
  color: var(--danger);
}

/* Compatibility list items (replaces emoji indicators) */
.compat-good,
.compat-warning,
.compat-critical {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: var(--space-sm);
}

.compat-good::before,
.compat-warning::before,
.compat-critical::before {
  position: absolute;
  left: 0;
  top: 0.1em;
  font-weight: 700;
  font-size: 0.9rem;
}

.compat-good::before {
  content: '+';
  color: var(--success);
}

.compat-warning::before {
  content: '!';
  color: var(--warning);
}

.compat-critical::before {
  content: '-';
  color: var(--danger);
}

/* ============================================
   SPECIES CARDS
   ============================================ */

.species-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.species-card {
  text-align: center;
  cursor: pointer;
}

.species-card a {
  text-decoration: none;
  color: inherit;
}

.species-image {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: var(--space-md);
  transition: all var(--transition-base);
}

.species-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.species-card:hover .species-image {
  border-color: var(--forest);
  transform: scale(1.05);
}

.species-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--ink);
}

.species-latin {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--ink-tertiary);
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 500;
  color: var(--ink);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--ink);
  transition: border-color var(--transition-base);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--forest);
}

.form-group input::placeholder {
  color: var(--ink-tertiary);
}

/* Form validation error states */
.form-group input.input-error,
.form-group select.input-error,
.form-group textarea.input-error {
  border-color: #dc3545;
}

.form-group input.input-error:focus,
.form-group select.input-error:focus,
.form-group textarea.input-error:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.15);
}

.form-error-message {
  display: none;
  color: #dc3545;
  font-size: 0.85rem;
  margin-top: var(--space-xs);
}

.form-error-message.visible {
  display: block;
}

/* Search input */
.search-input {
  width: 100%;
  padding: 0.75rem var(--space-md);
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  transition: border-color var(--transition-base);
}

.search-input:focus {
  outline: none;
  border-color: var(--forest);
}

/* General search box with icon */
.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
  transition: all var(--transition-base);
  color: var(--ink);
}

.search-box input::placeholder {
  color: var(--ink-tertiary);
}

.search-box input:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(35, 74, 58, 0.1);
}

.search-box .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-tertiary);
  font-size: 1.1rem;
  pointer-events: none;
}

/* Auth forms */
.auth-container {
  max-width: 450px;
  margin: var(--space-3xl) auto;
  padding: var(--space-xl);
}

.auth-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
}

.auth-box h2 {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.auth-button {
  width: 100%;
  padding: var(--space-md);
  font-size: 1rem;
}

.auth-links {
  text-align: center;
  margin-top: var(--space-lg);
  color: var(--ink-tertiary);
}

.auth-links a {
  color: var(--forest);
  font-weight: 600;
}

/* ============================================
   ALERTS & MESSAGES
   ============================================ */

.alert {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  border-left: 3px solid;
}

.alert-success {
  background: var(--success-bg);
  border-color: var(--success);
  color: var(--success);
}

.alert-warning {
  background: var(--warning-bg);
  border-color: var(--warning);
  color: var(--gold);
}

.alert-danger {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
}

.error-message {
  background: var(--danger-bg);
  border-left: 3px solid var(--danger);
  color: var(--danger);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.success-message {
  background: var(--success-bg);
  border-left: 3px solid var(--success);
  color: var(--success);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta {
  padding: var(--space-3xl) var(--space-xl);
  text-align: center;
}

.cta h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.cta p {
  color: var(--ink-secondary);
  margin-bottom: var(--space-xl);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  padding: var(--space-xl) var(--space-3xl);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  display: flex;
  align-items: center;
}

.footer-logo img {
  height: 40px;
  width: auto;
}

.footer-links {
  display: flex;
  gap: var(--space-xl);
}

.footer-links a {
  color: var(--ink-tertiary);
  font-size: 0.9rem;
}

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

.footer-copy {
  font-size: 0.85rem;
  color: var(--ink-tertiary);
}

/* ============================================
   COMPARISON PAGE
   ============================================ */

.selection-section {
  margin-bottom: var(--space-xl);
}

/* Selector Grid - Three Premium Cards */
.selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 900px) {
  .selector-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Selector Card */
.selector-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  transition: all 0.3s ease;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.04);
}

.selector-card:hover {
  border-color: var(--ink-tertiary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.selector-card.has-selection {
  border-color: var(--forest);
  box-shadow: 0 4px 20px rgba(35, 74, 58, 0.15);
}

/* Card Header */
.selector-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.selector-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.selector-optional {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ink-tertiary);
  margin-left: 0.25rem;
}

.selector-clear {
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--ink-tertiary);
  transition: all 0.2s ease;
}

.selector-clear:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(239, 68, 68, 0.05);
}

/* Selection Preview Area */
.selector-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  background: var(--stone);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border);
  margin-bottom: 1rem;
  min-height: 120px;
  transition: all 0.3s ease;
}

.selector-preview.has-fish {
  border-style: solid;
  border-color: var(--forest);
  background: var(--ivory);
}

.selector-preview-placeholder {
  color: var(--ink-tertiary);
  font-size: 0.9rem;
}

.selector-preview-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.selector-preview-image {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.selector-preview-name {
  font-weight: 600;
  color: var(--forest);
  font-size: 1rem;
}

.selector-preview-scientific {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--ink-tertiary);
}

/* Add Species Button */
.add-species-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.add-species-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.6rem 1.2rem;
  background: transparent;
  border: 1px dashed var(--forest);
  color: var(--forest);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
}

.add-species-btn:hover {
  background: var(--forest);
  color: var(--white);
  border-style: solid;
}

.species-slot-count {
  font-size: 0.85rem;
  color: var(--ink-tertiary);
}

/* Compare Button Wrapper */
.compare-button-wrapper {
  text-align: center;
  margin-top: 1rem;
}

.selection-status {
  font-size: 0.9rem;
  color: var(--ink-tertiary);
  margin-bottom: 0.75rem;
}

.selection-status.ready {
  color: var(--forest);
  font-weight: 500;
}

.species-panel {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  padding: var(--space-sm);
}

.category-details {
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-xs);
}

.category-details:last-child {
  border-bottom: none;
}

.category-details summary {
  padding: 0.75rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--forest);
  background: var(--ivory);
  border-radius: var(--radius-md);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition-base);
}

.category-details summary:hover {
  background: var(--stone);
}

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

.species-count {
  font-size: 0.85rem;
  color: var(--ink-tertiary);
  font-weight: normal;
}

.species-list {
  padding: var(--space-sm);
}

.species-item {
  padding: 0.75rem;
  margin: var(--space-xs) 0;
  cursor: pointer;
  border-radius: var(--radius-md);
  border-left: 3px solid transparent;
  transition: all var(--transition-base);
}

.species-item:hover {
  background: var(--ivory);
  border-left-color: var(--forest);
}

.species-item.selected {
  background: var(--success-bg);
  border-left-color: var(--forest);
  font-weight: 500;
}

.species-common-name {
  font-size: 0.95rem;
  color: var(--ink);
}

.species-scientific-name {
  font-size: 0.8rem;
  color: var(--ink-tertiary);
  font-style: italic;
}

/* ========================================
   Compare Page Hero - Overlapping Fish Cards
   ======================================== */

.compare-hero {
  padding: 3rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.compare-hero h1 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.compare-hero-subtitle {
  color: var(--ink-secondary);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

/* Overlapping Fish Card Stack */
.hero-fish-stack {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 200px;
  margin-bottom: 2rem;
}

.hero-fish-card {
  position: absolute;
  width: 160px;
  height: 200px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  transition:
    transform 0.4s ease,
    box-shadow 0.3s ease;
  cursor: pointer;
  border: 3px solid var(--white);
}

.hero-fish-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-fish-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, transparent 50%);
}

.hero-fish-label {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 1;
}

/* Card positions - overlapping at angles */
.hero-fish-card:nth-child(1) {
  transform: translateX(-120px) rotate(-8deg);
  z-index: 1;
}

.hero-fish-card:nth-child(2) {
  transform: translateY(-10px);
  z-index: 3;
}

.hero-fish-card:nth-child(3) {
  transform: translateX(120px) rotate(8deg);
  z-index: 2;
}

/* Hover effects - cards spread apart */
.hero-fish-stack:hover .hero-fish-card:nth-child(1) {
  transform: translateX(-140px) rotate(-12deg) translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.hero-fish-stack:hover .hero-fish-card:nth-child(2) {
  transform: translateY(-20px) scale(1.02);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}

.hero-fish-stack:hover .hero-fish-card:nth-child(3) {
  transform: translateX(140px) rotate(12deg) translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.hero-cta-text {
  font-size: 1rem;
  color: var(--ink-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.hero-cta-text::before,
.hero-cta-text::after {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--border);
}

/* Mobile responsive for compare hero */
@media (max-width: 640px) {
  .compare-hero {
    padding: 2rem 1rem 3rem;
  }

  .compare-hero h1 {
    font-size: 1.75rem;
  }

  .hero-fish-stack {
    height: 160px;
  }

  .hero-fish-card {
    width: 120px;
    height: 150px;
  }

  .hero-fish-card:nth-child(1) {
    transform: translateX(-80px) rotate(-8deg);
  }

  .hero-fish-card:nth-child(3) {
    transform: translateX(80px) rotate(8deg);
  }

  .hero-fish-stack:hover .hero-fish-card:nth-child(1) {
    transform: translateX(-90px) rotate(-10deg) translateY(-3px);
  }

  .hero-fish-stack:hover .hero-fish-card:nth-child(3) {
    transform: translateX(90px) rotate(10deg) translateY(-3px);
  }
}

/* ========================================
   Compare Page Main Content
   ======================================== */

.compare-button {
  background: var(--forest);
  color: var(--white);
  border: none;
  padding: 1rem 3rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.compare-button:hover:not(:disabled) {
  background: var(--forest-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(35, 74, 58, 0.3);
}

.compare-button:disabled {
  background: var(--ink-tertiary);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Comparison Grid */
.comparison-grid {
  display: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
}

.comparison-grid.active {
  display: block;
}

.comparison-header {
  display: grid;
  grid-template-columns: 200px repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--forest);
}

.fish-column {
  text-align: center;
  padding: var(--space-md);
  background: var(--forest);
  color: var(--white);
  border-radius: var(--radius-md);
}

.fish-column h3 {
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: var(--space-xs);
}

.fish-column h3 a {
  color: var(--white);
  text-decoration: none;
}

.fish-column h3 a:hover {
  color: var(--white);
  text-decoration: underline;
}

.fish-column .scientific {
  font-size: 0.85rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
}

.comparison-row {
  display: grid;
  grid-template-columns: 200px repeat(3, 1fr);
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
}

.comparison-row:last-child {
  border-bottom: none;
}

.attribute-label {
  font-weight: 600;
  color: var(--ink);
  padding: var(--space-sm);
  display: flex;
  align-items: center;
}

.attribute-value {
  padding: var(--space-sm) var(--space-md);
  background: var(--ivory);
  border-radius: var(--radius-md);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Compatibility Alert */
.compatibility-alert {
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  border-left: 4px solid;
}

.compatibility-alert.good {
  background: var(--success-bg);
  border-color: var(--success);
}

.compatibility-alert.warning {
  background: var(--warning-bg);
  border-color: var(--gold);
}

.compatibility-alert.danger {
  background: var(--danger-bg);
  border-color: var(--danger);
}

.compatibility-alert h3 {
  margin-bottom: var(--space-sm);
}

.compatibility-alert ul {
  margin-left: var(--space-lg);
  margin-top: var(--space-sm);
}

/* ============================================
   DASHBOARD
   ============================================ */

.dashboard-container {
  max-width: 1200px;
  margin: var(--space-xl) auto;
  padding: var(--space-xl);
}

.dashboard-header {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-lg);
}

.dashboard-header-text {
  flex: 1;
}

.dashboard-header h1 {
  color: var(--forest);
  margin-bottom: var(--space-sm);
}

.dashboard-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Dashboard Header Icon Buttons */
.notification-wrapper,
.settings-wrapper {
  position: relative;
}

.icon-btn {
  background: var(--stone);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  color: var(--ink);
}

.icon-btn:hover {
  background: var(--ivory);
  border-color: var(--forest);
  color: var(--forest);
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--forest);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.notification-badge:empty,
.notification-badge[data-count='0'] {
  display: none;
}

/* Shared Dropdown Styles */
.header-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  z-index: 9999;
  display: none;
}

.header-dropdown.open {
  display: block;
}

.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.dropdown-header h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.dropdown-action {
  background: none;
  border: none;
  color: var(--forest);
  font-size: 0.85rem;
  cursor: pointer;
}

.dropdown-action:hover {
  text-decoration: underline;
}

/* Notification Dropdown */
.notification-dropdown {
  width: 320px;
  max-height: 400px;
}

.notification-list {
  max-height: 320px;
  overflow-y: auto;
}

.notification-empty {
  padding: var(--space-xl);
  text-align: center;
  color: var(--ink-secondary);
}

.notification-empty p {
  margin-bottom: var(--space-xs);
}

.notification-empty small {
  font-size: 0.85rem;
}

.notification-item {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s ease;
}

.notification-item:hover {
  background: var(--ivory);
}

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

.notification-item.unread {
  background: rgba(35, 74, 58, 0.05);
}

.notification-item-title {
  font-weight: 500;
  margin-bottom: var(--space-xs);
}

.notification-item-body {
  font-size: 0.9rem;
  color: var(--ink-secondary);
  margin-bottom: var(--space-xs);
}

.notification-item-time {
  font-size: 0.8rem;
  color: var(--ink-tertiary);
}

/* Settings Dropdown */
.settings-dropdown {
  width: 220px;
}

.settings-dropdown-content {
  padding: var(--space-sm);
  max-height: 300px;
  overflow-y: auto;
}

.settings-dropdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
}

.settings-label {
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

.settings-value {
  font-weight: 500;
}

.settings-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-sm) 0;
}

.settings-dropdown-btn {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--ink);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.settings-dropdown-btn:hover {
  background: var(--ivory);
  border-color: var(--forest);
  color: var(--forest);
}

.settings-toggle-btn {
  padding: var(--space-xs) var(--space-sm);
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 70px;
}

.settings-toggle-btn:hover {
  border-color: var(--forest);
  color: var(--forest);
}

.settings-toggle-btn.active {
  background: var(--forest);
  border-color: var(--forest);
  color: white;
}

.settings-toggle-btn.active:hover {
  background: var(--forest-light, #2d5c4a);
}

.settings-toggle-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  text-align: center;
  transition: border-color var(--transition-base);
}

.stat-card:hover {
  border-color: var(--forest);
}

.stat-card .stat-number {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--forest);
}

.stat-card .stat-label {
  color: var(--ink-tertiary);
  font-size: 0.9rem;
  margin-top: var(--space-sm);
}

.dashboard-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.dashboard-section h2 {
  color: var(--ink);
  margin-bottom: var(--space-lg);
}

/* Tank Cards */
.tank-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color var(--transition-base);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.04);
}

.tank-card:hover {
  border-color: var(--forest);
  transform: translateY(-4px);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.25),
    0 12px 32px rgba(0, 0, 0, 0.1);
}

.tank-card h3 {
  color: var(--forest);
  margin-bottom: var(--space-sm);
}

.tank-card-meta {
  color: var(--ink-tertiary);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
}

.tank-species-preview {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.species-badge {
  background: var(--success-bg);
  color: var(--forest);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
}

.tank-card-actions {
  margin-top: var(--space-md);
  display: flex;
  gap: var(--space-sm);
}

/* Tank Form */
.tank-form {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  border: 1px solid var(--border);
}

.tank-preview {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  border: 1px solid var(--border);
}

.fish-list {
  list-style: none;
  padding: 0;
}

.fish-list-item {
  padding: var(--space-md);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.remove-fish-btn {
  background: var(--danger);
  color: var(--white);
  border: none;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* Tank Notes */
.tank-notes-container {
  margin: 0.75rem 0;
}

.tank-notes {
  font-size: 0.9rem;
  color: var(--ink-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tank-notes.expanded {
  -webkit-line-clamp: unset;
  display: block;
}

.tank-notes-toggle {
  background: none;
  border: none;
  font-size: 0.8rem;
  color: var(--forest);
  cursor: pointer;
  padding: 0.25rem 0;
  margin-top: 0.25rem;
}

.tank-notes-toggle:hover {
  text-decoration: underline;
}

/* ============================================
   TANK MAINTENANCE
   ============================================ */

/* Upcoming Maintenance Banner */
.maintenance-banner {
  background: var(--warning-bg);
  border: 1px solid var(--warning);
  border-radius: var(--radius-xl);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
}

.maintenance-banner.all-clear {
  background: var(--success-bg);
  border-color: var(--success);
}

.maintenance-banner h3 {
  margin: 0 0 var(--space-sm) 0;
  font-size: 1rem;
  color: var(--warning);
}

.maintenance-banner.all-clear h3 {
  color: var(--success);
}

.maintenance-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.maintenance-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.maintenance-list li:last-child {
  border-bottom: none;
}

.maintenance-task {
  font-weight: 500;
  color: var(--ink);
}

.maintenance-due {
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

.maintenance-due.overdue {
  color: var(--danger);
  font-weight: 600;
}

.maintenance-due.due-soon {
  color: var(--warning);
  font-weight: 500;
}

/* Tank Card Maintenance Section */
.tank-maintenance {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

.tank-maintenance-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.tank-maintenance-header h4 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

/* Quick Log Buttons */
.quick-log-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: 0.75rem;
}

.quick-log-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--ink);
}

.quick-log-btn:hover {
  background: var(--forest);
  color: var(--white);
  border-color: var(--forest);
  transform: none;
}

.quick-log-btn.logged {
  background: var(--success-bg);
  border-color: var(--success);
  color: var(--success);
}

/* Recent Events List */
.recent-events {
  max-height: 150px;
  overflow-y: auto;
}

.event-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

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

.event-info {
  flex: 1;
}

.event-type {
  font-weight: 500;
  color: var(--ink);
}

.event-date {
  font-size: 0.75rem;
  color: var(--ink-secondary);
}

.event-notes {
  font-size: 0.75rem;
  color: var(--ink-secondary);
  font-style: italic;
  margin-top: 0.25rem;
}

.event-delete {
  background: none;
  border: none;
  color: var(--ink-tertiary);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 0.9rem;
}

.event-delete:hover {
  color: var(--danger);
  transform: none;
}

/* Event delete button in tank modal */
.event-delete-btn {
  background: none;
  border: none;
  color: var(--ink-tertiary);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-size: 1.1rem;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.event-delete-btn:hover {
  color: var(--danger);
  background: rgba(220, 38, 38, 0.1);
}

/* Clickable schedule pills */
.schedule-pill.clickable {
  cursor: pointer;
  transition: all 0.2s ease;
}

.schedule-pill.clickable:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ============================================
   SCHEDULE PILLS
   ============================================ */

.tank-schedules {
  margin-bottom: var(--space-md);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.schedules-header {
  margin-bottom: var(--space-sm);
}

.schedules-header h5 {
  font-size: 0.85rem;
  color: var(--ink-secondary);
  margin: 0;
  font-weight: 600;
}

.schedule-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  margin-top: var(--space-sm);
}

.schedule-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.6rem;
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-base);
}

.schedule-pill:hover {
  border-color: var(--forest);
  background: rgba(35, 74, 58, 0.05);
}

.schedule-pill.disabled {
  opacity: 0.5;
}

.schedule-pill .schedule-icon {
  font-size: 0.9rem;
}

.schedule-pill .schedule-label {
  font-weight: 500;
  color: var(--ink);
}

.schedule-pill .schedule-due {
  font-size: 0.75rem;
  color: var(--ink-secondary);
  margin-left: 0.25rem;
}

/* Due Status Colors */
.schedule-pill.overdue {
  background: var(--danger-bg);
  border-color: var(--danger);
}

.schedule-pill.overdue .schedule-due {
  color: var(--danger);
  font-weight: 600;
}

.schedule-pill.due-today {
  background: var(--warning-bg);
  border-color: var(--warning);
}

.schedule-pill.due-today .schedule-due {
  color: var(--warning);
  font-weight: 600;
}

.schedule-pill.due-soon {
  background: rgba(154, 123, 79, 0.05);
  border-color: var(--warning);
}

.schedule-pill.due-soon .schedule-due {
  color: var(--warning);
}

/* Complete Button on Pill */
.schedule-complete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 0.25rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--forest);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: bold;
  cursor: pointer;
  transition: all var(--transition-base);
}

.schedule-complete-btn:hover {
  background: var(--forest-light);
  transform: scale(1.1);
}

/* Add Schedule Button */
.add-schedule-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.6rem;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
}

.add-schedule-btn:hover {
  border-color: var(--forest);
  color: var(--forest);
  transform: none;
}

/* Empty Schedules State */
.schedules-empty {
  font-size: 0.8rem;
  color: var(--ink-secondary);
  padding: 0.25rem 0;
}

.schedules-empty a {
  color: var(--forest);
  text-decoration: none;
}

.schedules-empty a:hover {
  text-decoration: underline;
}

/* ============================================
   EVENT & SCHEDULE MODALS
   ============================================ */

.event-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: var(--space-md);
}

.event-modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.event-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.event-modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--ink);
}

.event-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--ink-secondary);
  padding: 0;
  line-height: 1;
}

.event-modal-close:hover {
  color: var(--ink);
  transform: none;
}

.event-modal-body {
  padding: var(--space-lg);
}

.event-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border);
}

/* Form Styles for Modal */
.event-form .form-group {
  margin-bottom: var(--space-md);
}

.event-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ink);
}

.event-form input,
.event-form select,
.event-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  background: var(--white);
  color: var(--ink);
}

.event-form input:focus,
.event-form select:focus,
.event-form textarea:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(35, 74, 58, 0.1);
}

/* Event Type Grid */
.event-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.event-type-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
}

.event-type-option:hover {
  border-color: var(--forest);
}

.event-type-option.selected {
  border-color: var(--forest);
  background: var(--success-bg);
}

.event-type-option input {
  display: none;
}

.event-type-icon {
  font-size: 1.2rem;
}

.event-type-label {
  font-size: 0.85rem;
  font-weight: 500;
}

/* Schedule Type Grid */
.schedule-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

/* Empty State for Events */
.events-empty {
  text-align: center;
  padding: var(--space-md);
  color: var(--ink-secondary);
  font-size: 0.85rem;
}

/* View All Link */
.view-all-link {
  display: block;
  text-align: center;
  margin-top: var(--space-sm);
  font-size: 0.8rem;
  color: var(--forest);
  text-decoration: none;
}

.view-all-link:hover {
  text-decoration: underline;
}

/* Responsive for Maintenance UI */
@media (max-width: 768px) {
  .quick-log-buttons {
    gap: 0.35rem;
  }

  .quick-log-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
  }

  .event-type-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .schedule-pills {
    gap: 0.35rem;
  }

  .schedule-pill {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
  }

  .schedule-pill .schedule-icon {
    font-size: 0.8rem;
  }

  .schedule-complete-btn {
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
  }

  .schedule-type-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Item Lists */
.item-list {
  list-style: none;
}

.item-list li {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.item-list li:hover {
  background: var(--ivory);
}

/* Item Links (dashboard favorites, comparisons) */
.item-link {
  text-decoration: none;
  color: inherit;
  flex: 1;
  display: block;
}

.item-link:hover {
  color: var(--forest);
}

.item-link:hover strong {
  text-decoration: underline;
}

/* Empty State */
.empty-state {
  text-align: center;
  color: var(--ink-tertiary);
  padding: var(--space-2xl);
}

.empty-state h3 {
  margin-bottom: var(--space-sm);
  color: var(--ink-secondary);
}

.empty-state-small {
  text-align: center;
  padding: var(--space-xl);
  color: var(--ink-tertiary);
}

/* Empty state with error styling */
.empty-state-small.empty-state-error .error-text {
  color: var(--danger);
  font-weight: bold;
  margin-bottom: var(--space-sm);
}

/* Empty species list item in tank form */
.species-list-empty {
  color: var(--ink-tertiary);
  padding: var(--space-md);
  font-style: italic;
}

/* ============================================
   DASHBOARD REDESIGN - Living Ecosystem
   ============================================ */

/* Dashboard Layout Grid */
.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl);
}

.dashboard-main-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.dashboard-activity-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

/* ----------------------------------------
   Dashboard Hero Section
   ---------------------------------------- */
.dashboard-hero {
  background: linear-gradient(135deg, var(--white) 0%, var(--ivory) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  position: relative;
  overflow: visible;
  text-align: center;
  z-index: 1;
}

/* Ambient caustic light effect */
.dashboard-hero-ambient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(35, 74, 58, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(35, 74, 58, 0.02) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 80%, rgba(35, 74, 58, 0.03) 0%, transparent 45%);
  animation: caustic-drift 20s infinite ease-in-out;
  pointer-events: none;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

@keyframes caustic-drift {
  0%,
  100% {
    transform: translateX(0) translateY(0) scale(1);
  }
  25% {
    transform: translateX(-8px) translateY(4px) scale(1.02);
  }
  50% {
    transform: translateX(-5px) translateY(-3px) scale(0.98);
  }
  75% {
    transform: translateX(6px) translateY(2px) scale(1.01);
  }
}

.dashboard-hero-content {
  position: relative;
  z-index: 1;
}

.dashboard-greeting {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

.dashboard-greeting .username {
  font-weight: 700;
  color: var(--forest);
}

.dashboard-status {
  font-size: 1.1rem;
  color: var(--ink-secondary);
  margin-bottom: var(--space-lg);
}

.dashboard-status.needs-attention {
  color: var(--warning);
}

/* Hero integrated stats */
.dashboard-hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.hero-stat {
  font-size: 0.95rem;
  color: var(--ink-secondary);
}

.hero-stat-divider {
  color: var(--border);
}

/* Hero actions */
.dashboard-hero-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Position notification/settings in hero top-right */
.dashboard-hero .dashboard-header-actions {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: 10;
}

/* ----------------------------------------
   Tank Gallery (Portraits)
   ---------------------------------------- */
.tank-gallery-section {
  background: var(--ivory);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
}

.tank-gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.tank-gallery-header h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.tank-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

/* Tank Portrait Card */
.tank-portrait {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.2s ease;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.04);
}

.tank-portrait:hover {
  transform: translateY(-6px);
  border-color: var(--forest);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.25),
    0 16px 40px rgba(0, 0, 0, 0.12);
}

/* Species Image Mosaic */
.tank-portrait-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  aspect-ratio: 16 / 10;
  gap: 2px;
  background: var(--border);
}

.tank-portrait-mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.tank-portrait:hover .tank-portrait-mosaic img {
  transform: scale(1.05);
}

/* Single image mode for tanks with few species */
.tank-portrait-mosaic.single-image {
  display: block;
}

.tank-portrait-mosaic.single-image img {
  width: 100%;
  height: 100%;
}

/* Placeholder when no images */
.tank-portrait-placeholder {
  aspect-ratio: 16 / 10;
  background: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-tertiary);
  font-size: 0.9rem;
}

/* Floating size badge */
.tank-portrait-badge {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

/* Tank info section (below images) */
.tank-portrait-overlay {
  padding: var(--space-md) var(--space-lg);
  background: var(--white);
}

.tank-portrait-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.tank-portrait-meta {
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

/* Maintenance indicator on portrait */
.tank-portrait-status {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
}

/* Empty tank gallery state */
.tank-gallery-empty {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--ink-secondary);
}

.tank-gallery-empty p {
  margin-bottom: var(--space-lg);
}

/* Tank Cover Photo (user uploaded) */
.tank-portrait-cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.tank-portrait-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.tank-portrait:hover .tank-portrait-cover img {
  transform: scale(1.05);
}

/* Photo Upload Zone */
.photo-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
  background: var(--ivory);
}

.photo-upload-zone:hover {
  border-color: var(--forest);
  background: rgba(35, 74, 58, 0.03);
}

.photo-upload-zone.drag-over {
  border-color: var(--forest);
  background: rgba(35, 74, 58, 0.08);
  border-style: solid;
}

.photo-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--ink-secondary);
  text-align: center;
}

.photo-upload-icon {
  font-size: 2rem;
  font-weight: 300;
  color: var(--ink-light);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-xs);
}

.photo-upload-placeholder small {
  font-size: 0.8rem;
  color: var(--ink-light);
}

.photo-upload-preview {
  position: relative;
}

.photo-upload-preview img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.photo-remove-btn {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.photo-remove-btn:hover {
  background: rgba(180, 60, 60, 0.9);
}

/* ----------------------------------------
   Share Tank Privacy Selector
   ---------------------------------------- */
.share-toggle-group {
  padding: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: var(--space-md);
  background: var(--ivory);
}

.privacy-selector {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.privacy-buttons {
  display: flex;
  gap: 4px;
  background: var(--stone);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.privacy-btn {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
  color: var(--ink-secondary);
  transition: all 0.15s ease;
}

.privacy-btn:hover {
  color: var(--ink);
}

.privacy-btn.selected {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.privacy-btn.selected[data-value='true'] {
  background: var(--forest);
  color: var(--white);
}

.privacy-label {
  font-weight: 500;
  color: var(--ink);
}

/* ----------------------------------------
   Tank Detail Modal
   ---------------------------------------- */
.tank-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.tank-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.tank-modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.tank-modal-backdrop.active .tank-modal {
  transform: scale(1);
}

.tank-modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.95);
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.tank-modal-close:hover {
  transform: scale(1.1);
  background: var(--white);
}

.tank-modal-header {
  position: relative;
}

.tank-modal-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  aspect-ratio: 16 / 9;
  gap: 2px;
  background: var(--border);
}

.tank-modal-mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tank-modal-mosaic.single-image {
  display: block;
}

.tank-modal-body {
  padding: var(--space-xl);
  overflow-y: auto;
  flex: 1;
}

.tank-modal-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--space-xs);
}

.tank-modal-meta {
  color: var(--ink-secondary);
  margin-bottom: var(--space-lg);
}

.tank-modal-notes {
  background: var(--ivory);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  font-size: 0.95rem;
  color: var(--ink-secondary);
  line-height: 1.6;
}

.tank-modal-section {
  margin-bottom: var(--space-lg);
}

.tank-modal-section h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

/* Section header with action button */
.section-header-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.section-header-with-action h3 {
  margin-bottom: 0;
}

.btn-text {
  background: none;
  border: none;
  color: var(--forest);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}

.btn-text:hover {
  background: rgba(35, 74, 58, 0.1);
}

/* Species list in modal */
.tank-modal-species-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tank-modal-species-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--ivory);
  border-radius: var(--radius-lg);
  padding: var(--space-sm) var(--space-md);
}

.tank-modal-species-item img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.tank-modal-species-item span {
  font-size: 0.9rem;
  color: var(--ink);
}

/* Quick log in modal */
.tank-modal-quicklog .quick-log-buttons {
  margin-bottom: 0;
}

/* Modal footer */
.tank-modal-footer {
  padding: var(--space-md) var(--space-xl);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
}

/* ----------------------------------------
   Upcoming Care (Maintenance Timeline)
   ---------------------------------------- */
.maintenance-timeline-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
}

.maintenance-timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.maintenance-timeline-header h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.maintenance-timeline-summary {
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

/* Timeline groups */
.timeline-group {
  margin-bottom: var(--space-lg);
}

.timeline-group:last-child {
  margin-bottom: 0;
}

.timeline-label {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  color: var(--ink-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

/* Maintenance task card */
.maintenance-task-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--ivory);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-sm);
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.maintenance-task-card:hover {
  transform: translateX(4px);
  background: var(--stone);
}

.maintenance-task-card:last-child {
  margin-bottom: 0;
}

/* Organic ripple status indicator */
.maintenance-status-indicator {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.maintenance-status-indicator.relaxed {
  border: 2px solid var(--forest);
  opacity: 0.5;
}

.maintenance-status-indicator.approaching {
  border: 2px solid var(--warning);
}

.maintenance-status-indicator.approaching::before {
  content: '';
  position: absolute;
  inset: -4px;
  border: 1px solid var(--warning);
  border-radius: 50%;
  animation: ripple-pulse 2s ease-out infinite;
}

.maintenance-status-indicator.overdue {
  border: 2px solid var(--danger);
}

.maintenance-status-indicator.overdue::before,
.maintenance-status-indicator.overdue::after {
  content: '';
  position: absolute;
  border: 1px solid var(--danger);
  border-radius: 50%;
  animation: ripple-pulse 1.5s ease-out infinite;
}

.maintenance-status-indicator.overdue::before {
  inset: -4px;
}

.maintenance-status-indicator.overdue::after {
  inset: -8px;
  animation-delay: 0.3s;
}

@keyframes ripple-pulse {
  0% {
    opacity: 0.6;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.4);
  }
}

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

.task-name {
  font-weight: 600;
  color: var(--ink);
  display: block;
}

.task-tank {
  font-size: 0.85rem;
  color: var(--ink-tertiary);
}

.task-complete-btn {
  padding: 0.4rem 0.8rem;
  background: var(--forest);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.task-complete-btn:hover {
  background: var(--forest-light, #2d5c4a);
}

/* Task actions container */
.task-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-left: auto;
  flex-shrink: 0;
}

/* Task edit button */
.task-edit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink-tertiary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.task-edit-btn:hover {
  background: var(--stone);
  border-color: var(--forest);
  color: var(--forest);
}

.task-edit-btn svg {
  width: 16px;
  height: 16px;
}

/* Empty timeline state */
.maintenance-timeline-empty {
  text-align: center;
  padding: var(--space-xl);
  color: var(--ink-secondary);
}

/* Quick log in timeline */
.timeline-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.timeline-actions .btn {
  flex: 1;
}

/* Tank selector modal */
.tank-selector-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.tank-selector-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: var(--space-md);
  background: var(--ivory);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.tank-selector-btn:hover {
  border-color: var(--forest);
  background: rgba(35, 74, 58, 0.05);
}

.tank-selector-name {
  font-weight: 600;
  color: var(--ink);
}

.tank-selector-meta {
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

/* ----------------------------------------
   Activity Sections (Comparisons/Favorites)
   ---------------------------------------- */
.activity-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
}

.activity-section-header {
  margin-bottom: var(--space-lg);
}

.activity-section-header h2 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Activity item card */
.activity-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--ivory);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.activity-item:hover {
  border-color: var(--forest);
  transform: translateX(4px);
  background: var(--stone);
}

.activity-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 1.25rem;
}

.activity-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.activity-icon.compatible {
  background: var(--success-bg);
  color: var(--forest);
}

.activity-icon.incompatible {
  background: rgba(220, 53, 69, 0.1);
  color: var(--danger);
}

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

.activity-title {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.activity-meta {
  font-size: 0.85rem;
  color: var(--ink-tertiary);
}

.activity-action {
  background: none;
  border: none;
  color: var(--ink-tertiary);
  cursor: pointer;
  padding: var(--space-sm);
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.activity-action:hover {
  color: var(--danger);
}

/* Favorite star (compare page, species page, glossary modal) */
.favorite-star {
  cursor: pointer;
  transition: color 0.2s ease;
  font-size: 1.2em;
  margin-left: 0.5rem;
  display: none; /* Hidden by default until auth confirmed */
}

/* Show stars when user is logged in */
body.logged-in .favorite-star {
  display: inline;
}

.favorite-star:hover {
  color: var(--warning);
}

.favorite-star.active {
  color: var(--warning);
}

/* Empty activity state */
.activity-empty {
  text-align: center;
  padding: var(--space-lg);
  color: var(--ink-secondary);
}

.activity-empty a {
  color: var(--forest);
}

/* ----------------------------------------
   Dashboard Stagger Animations
   ---------------------------------------- */
.dashboard-section-animate {
  opacity: 0;
  transform: translateY(20px);
  animation: dashboard-fade-in 0.5s ease forwards;
}

.dashboard-hero {
  animation-delay: 0s;
}

.tank-gallery-section {
  animation-delay: 0.1s;
}

.maintenance-timeline-section {
  animation-delay: 0.15s;
}

.activity-section:nth-of-type(1) {
  animation-delay: 0.2s;
}

.activity-section:nth-of-type(2) {
  animation-delay: 0.25s;
}

@keyframes dashboard-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Dashboard Tabs (Phase 4.4)
   ============================================ */

.dashboard-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin: 0 2rem;
  padding: 0;
}

.dashboard-tab {
  padding: 1rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ink-secondary);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dashboard-tab:hover {
  color: var(--ink);
}

.dashboard-tab.active {
  color: var(--forest);
  border-bottom-color: var(--forest);
}

.dashboard-tab-content {
  padding: 2rem;
}

.dashboard-tab-panel {
  display: none;
}

.dashboard-tab-panel.active {
  display: block;
}

/* Profile Sub-tabs */
.dashboard-subtabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.dashboard-subtab {
  padding: 0.5rem 1rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 2rem;
  color: var(--ink-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dashboard-subtab:hover {
  border-color: var(--ink-secondary);
}

.dashboard-subtab.active {
  background: var(--forest);
  border-color: var(--forest);
  color: white;
}

.dashboard-subtab-panel {
  display: none;
}

.dashboard-subtab-panel.active {
  display: block;
}

/* Profile Card */
.profile-card {
  display: flex;
  gap: 2rem;
  padding: 2rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 600px;
}

.profile-card__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.profile-card__info {
  flex: 1;
}

.profile-card__info h2 {
  margin: 0 0 0.25rem 0;
  font-size: 1.5rem;
}

.profile-card__details {
  color: var(--ink-secondary);
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
}

.profile-card__bio {
  margin: 0 0 1rem 0;
  font-style: italic;
  color: var(--ink-secondary);
}

.profile-card__stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.profile-card__stats strong {
  color: var(--ink);
}

.profile-card__actions {
  display: flex;
  gap: 0.75rem;
}

/* Settings */
.settings-section {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  max-width: 600px;
}

.settings-section h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
}

.settings-description {
  color: var(--ink-secondary);
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
}

.settings-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.settings-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.settings-checkbox input[type='checkbox'] {
  width: 18px;
  height: 18px;
  accent-color: var(--forest);
}

.settings-account {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.settings-label {
  width: 80px;
  color: var(--ink-secondary);
  font-size: 0.9rem;
}

.settings-value {
  flex: 1;
}

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

  .maintenance-timeline-section {
    order: -1;
  }

  .dashboard-activity-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .dashboard-layout {
    padding: var(--space-md);
    gap: var(--space-md);
  }

  .dashboard-hero {
    padding: var(--space-xl) var(--space-md);
  }

  .dashboard-hero-content {
    display: flex;
    flex-direction: column;
  }

  .dashboard-hero .dashboard-header-actions {
    position: static; /* Remove absolute positioning on mobile */
    order: -1; /* Move to top of flex container */
    align-self: flex-end; /* Right-align the icons row */
    margin-bottom: var(--space-sm);
  }

  .dashboard-greeting {
    font-size: 1.5rem;
    /* Full width now that icons are on their own row */
  }

  .dashboard-hero-stats {
    flex-direction: column;
    gap: var(--space-xs);
  }

  .hero-stat-divider {
    display: none;
  }

  .tank-gallery {
    grid-template-columns: 1fr;
  }

  .tank-modal {
    max-height: 95vh;
    border-radius: var(--radius-lg);
  }

  .tank-modal-footer {
    flex-direction: column;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .dashboard-hero-ambient {
    animation: none;
  }

  .maintenance-status-indicator::before,
  .maintenance-status-indicator::after {
    animation: none;
    opacity: 0.3;
  }

  .dashboard-section-animate {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .tank-portrait,
  .activity-item,
  .maintenance-task-card {
    transition: none;
  }
}

/* ============================================
   GLOSSARY PAGE
   ============================================ */

/* Glossary Hero Section */
.glossary-hero {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.glossary-hero h1 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.glossary-hero-subtitle {
  color: var(--ink-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.glossary-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  padding: 1rem 1.5rem;
  background: var(--ivory);
  border-radius: var(--radius-lg);
  min-width: 100px;
}

.stat-number {
  display: block;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--forest);
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-secondary);
  margin-top: 0.25rem;
}

.glossary-hero-cta {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: var(--ink-secondary);
}

.glossary-hero-cta a {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.glossary-hero-cta a:hover {
  color: var(--ink);
}

/* Glossary Container */
.glossary-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Category Cards */
.category-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  padding: 2rem 0;
}

@media (max-width: 1000px) {
  .category-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .category-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 450px) {
  .category-cards {
    grid-template-columns: 1fr;
  }
}

/* Glossary Category Filter Buttons (renamed from .category-card to avoid collision) */
.category-filter {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.category-filter:hover {
  border-color: var(--ink-tertiary);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.category-filter.active {
  border-color: var(--forest);
  background: var(--success-bg);
}

.category-filter-name {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.category-filter-count {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-tertiary);
}

.category-filter.active .category-filter-name {
  color: var(--forest);
}

/* Glossary Controls */
.glossary-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.glossary-search-wrapper {
  flex: 1;
  min-width: 200px;
  max-width: 400px;
}

.glossary-search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.glossary-search-input:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(35, 74, 58, 0.1);
}

.glossary-sort-wrapper {
  flex-shrink: 0;
}

.sort-dropdown {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  background: var(--white);
  cursor: pointer;
  min-width: 180px;
}

.sort-dropdown:focus {
  outline: none;
  border-color: var(--forest);
}

.glossary-content {
  padding: var(--space-xl);
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.glossary-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color var(--transition-base);
  text-decoration: none;
  display: block;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.04);
}

.glossary-card:hover {
  border-color: var(--forest);
  transform: translateY(-6px);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.25),
    0 12px 32px rgba(0, 0, 0, 0.12);
}

.glossary-card-image {
  aspect-ratio: 16/10;
  background: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.glossary-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.glossary-card:hover .glossary-card-image img {
  transform: scale(1.08);
}

.glossary-card-content {
  padding: 1rem;
}

.glossary-card-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.glossary-card-subtitle {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-tertiary);
}

.glossary-card h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
  color: var(--ink);
}

.glossary-card .scientific-name {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-tertiary);
  margin-bottom: var(--space-sm);
}

.glossary-card p {
  font-size: 0.9rem;
  color: var(--ink-secondary);
  line-height: 1.6;
}

/* Glossary Items */
.glossary-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.glossary-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
}

.glossary-item:hover {
  border-color: var(--forest);
}

.glossary-item.has-image {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.glossary-item-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--ivory);
}

.glossary-item-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.glossary-item-title span {
  color: var(--forest);
  font-size: 0.9rem;
}

.glossary-item-meta {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--ink-tertiary);
  margin-bottom: var(--space-sm);
}

.glossary-item-description {
  font-size: 0.95rem;
  color: var(--ink-secondary);
  line-height: 1.7;
}

.glossary-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.glossary-item-tags .tag {
  background: var(--ivory);
  color: var(--ink-secondary);
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  border-radius: var(--radius-full);
}

/* Glossary Pagination */
.pagination-info {
  color: var(--ink-tertiary);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
}

.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  flex-wrap: wrap;
}

.pagination-btn {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--ink-secondary);
}

.pagination-btn:hover:not([disabled]) {
  border-color: var(--forest);
  color: var(--forest);
}

.pagination-btn.active {
  background: var(--forest);
  color: var(--white);
  border-color: var(--forest);
}

.pagination-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-ellipsis {
  color: var(--ink-tertiary);
  padding: 0 var(--space-sm);
}

/* Section title in glossary content */
.glossary-content .section-title {
  font-size: 1.5rem;
  color: var(--forest);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--border);
}

/* Species Modal */
.species-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 1rem;
}

.species-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.species-modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  position: relative;
}

.species-modal-backdrop.active .species-modal {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--white);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--ivory);
  transform: scale(1.1);
}

.modal-image {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--ivory);
  overflow: hidden;
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-content {
  padding: 1.5rem;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.modal-scientific {
  font-style: italic;
  color: var(--ink-tertiary);
  margin-bottom: 1rem;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.modal-tags .tag {
  background: var(--ivory);
  color: var(--ink-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
}

.modal-description {
  color: var(--ink-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.modal-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding: 1rem;
  background: var(--ivory);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}

.modal-stat {
  text-align: center;
}

.modal-stat-label {
  font-size: 0.75rem;
  color: var(--ink-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-stat-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
}

.modal-actions .btn {
  flex: 1;
  text-align: center;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.modal-actions .btn-primary {
  background: var(--forest);
  color: var(--white);
  border: none;
}

.modal-actions .btn-primary:hover {
  background: var(--forest-light);
}

.modal-actions .btn-ghost {
  background: transparent;
  color: var(--forest);
  border: 1px solid var(--forest);
}

.modal-actions .btn-ghost:hover {
  background: var(--success-bg);
}

.modal-report-link {
  display: block;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--ink-tertiary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-align: center;
}

.modal-report-link:hover {
  color: var(--forest);
}

/* Report Error Links (species page, compare page) */
.report-error-link {
  font-size: 0.85rem;
  color: var(--ink-tertiary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.report-error-link:hover {
  color: var(--forest);
}

.report-error-line {
  margin-bottom: 0.5rem;
}

.comparison-footer {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--ink);
  color: var(--white);
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.toast.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

/* Glossary Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--ink-secondary);
}

.empty-state h3 {
  font-size: 1.25rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.95rem;
}

/* ============================================
   FAQ PAGE
   ============================================ */

/* FAQ Hero */
.faq-hero {
  background: linear-gradient(135deg, var(--forest) 0%, #1a3a2e 100%);
  padding: 4rem 2rem 3.5rem;
  text-align: center;
}

.faq-hero__content {
  max-width: 600px;
  margin: 0 auto;
}

.faq-hero h1 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.faq-hero__subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
}

.faq-hero__search {
  max-width: 500px;
  margin: 0 auto;
}

.faq-hero__search input {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  border: none;
  border-radius: var(--radius-full);
  background: var(--white);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  color: var(--ink);
  transition: box-shadow 0.2s ease;
}

.faq-hero__search input::placeholder {
  color: var(--ink-tertiary);
}

.faq-hero__search input:focus {
  outline: none;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.2),
    0 0 0 3px rgba(35, 74, 58, 0.3);
}

/* FAQ Navigation */
.faq-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.faq-nav__tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.faq-nav__tabs::-webkit-scrollbar {
  display: none;
}

.faq-nav__tab {
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-sans);
  color: var(--ink-secondary);
  cursor: pointer;
  transition: color 0.2s ease;
  white-space: nowrap;
  position: relative;
}

.faq-nav__tab:hover {
  color: var(--forest);
}

.faq-nav__tab.active {
  color: var(--forest);
}

.faq-nav__indicator {
  position: absolute;
  bottom: 0;
  height: 2px;
  background: var(--forest);
  transition:
    left 0.3s ease,
    width 0.3s ease;
  pointer-events: none;
}

/* FAQ Container */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  background: var(--ivory);
  min-height: 60vh;
}

.faq-content {
  background: transparent;
}

/* FAQ Section */
.faq-section {
  margin-bottom: 3rem;
}

.faq-section:last-of-type {
  margin-bottom: 0;
}

.faq-section__header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
}

.faq-section__number {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--forest);
  opacity: 0.35;
  line-height: 1;
}

.faq-section__title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

/* FAQ Cards */
.faq-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.faq-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.faq-card__question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
}

.faq-card__q {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--forest);
  flex-shrink: 0;
}

.faq-card__text {
  flex: 1;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink);
}

.faq-card__icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--forest);
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-card.open .faq-card__icon {
  transform: rotate(45deg);
}

/* FAQ Answer - CSS Grid animation */
.faq-card__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}

.faq-card.open .faq-card__answer {
  grid-template-rows: 1fr;
}

.faq-card__answer-inner {
  overflow: hidden;
  padding: 0 1.5rem 0 3.5rem;
  color: var(--ink-secondary);
  line-height: 1.7;
}

.faq-card.open .faq-card__answer-inner {
  padding-bottom: 1.5rem;
}

.faq-card__answer-inner p {
  margin-bottom: 1rem;
}

.faq-card__answer-inner p:last-child {
  margin-bottom: 0;
}

.faq-card__answer-inner ul,
.faq-card__answer-inner ol {
  margin-left: 1.25rem;
  margin-bottom: 1rem;
}

.faq-card__answer-inner li {
  margin-bottom: 0.5rem;
}

.faq-card__answer-inner a {
  color: var(--forest);
  font-weight: 500;
}

.faq-card__answer-inner a:hover {
  text-decoration: underline;
}

/* Hidden state for filtering */
.faq-card.hidden {
  display: none;
}

/* No Results */
.faq-no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--ink-tertiary);
}

.faq-no-results h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--ink-secondary);
}

/* FAQ Minimal Hero (Revamped) */
.faq-hero--minimal {
  background: var(--ivory);
  padding: 3rem 2rem 2.5rem;
  text-align: center;
}

.faq-hero--minimal h1 {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.faq-hero--minimal .faq-hero__subtitle {
  font-size: 1rem;
  color: var(--ink-secondary);
  margin-bottom: 1.5rem;
}

.faq-hero--minimal .faq-hero__search input {
  max-width: 450px;
  width: 100%;
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.faq-hero--minimal .faq-hero__search input:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 2px 12px rgba(35, 74, 58, 0.12);
}

/* FAQ Contribution CTA */
.faq-contribute {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--stone);
  border-bottom: 1px solid var(--border);
}

.faq-contribute__text {
  font-size: 0.9rem;
  color: var(--ink-secondary);
  margin: 0;
}

.faq-contribute .btn {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

.faq-contribute__note {
  font-size: 0.75rem;
  color: var(--ink-tertiary);
  font-style: italic;
}

/* FAQ Grid Layout */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  align-items: start;
}

/* FAQ Card - Grid Version */
.faq-grid .faq-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all 0.25s ease;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.04);
}

.faq-grid .faq-card:hover {
  border-color: var(--ink-tertiary);
  transform: translateY(-4px);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 24px rgba(0, 0, 0, 0.08);
}

.faq-grid .faq-card.open {
  border-color: var(--forest);
}

/* Category Pill */
.faq-card__category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  margin: 1rem 1rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--forest);
  background: rgba(35, 74, 58, 0.1);
  border-radius: var(--radius-full);
}

/* Category-specific pill colors */
.faq-card[data-category='getting-started'] .faq-card__category {
  background: rgba(35, 74, 58, 0.1);
  color: #234a3a;
}

.faq-card[data-category='compatibility'] .faq-card__category {
  background: rgba(45, 74, 109, 0.1);
  color: #2d4a6d;
}

.faq-card[data-category='water'] .faq-card__category {
  background: rgba(74, 107, 90, 0.1);
  color: #4a6b5a;
}

.faq-card[data-category='health'] .faq-card__category {
  background: rgba(139, 58, 58, 0.1);
  color: #8b3a3a;
}

.faq-card[data-category='maintenance'] .faq-card__category {
  background: rgba(154, 123, 79, 0.1);
  color: #9a7b4f;
}

/* FAQ Card Question - Grid Version */
.faq-grid .faq-card__question {
  width: 100%;
  padding: 0.75rem 1rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
}

.faq-grid .faq-card__text {
  flex: 1;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--ink);
}

.faq-grid .faq-card__icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--forest);
  font-size: 1.25rem;
  font-weight: 300;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-grid .faq-card.open .faq-card__icon {
  transform: rotate(45deg);
}

/* FAQ Card Answer - CSS Grid Animation */
.faq-grid .faq-card__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}

.faq-grid .faq-card.open .faq-card__answer {
  grid-template-rows: 1fr;
}

.faq-grid .faq-card__answer-inner {
  overflow: hidden;
  padding: 0 1rem;
  color: var(--ink-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.faq-grid .faq-card.open .faq-card__answer-inner {
  padding-bottom: 1.25rem;
}

/* FAQ Grid Responsive */
@media (max-width: 700px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .faq-contribute {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .faq-hero--minimal {
    padding: 2rem 1.5rem 2rem;
  }

  .faq-hero--minimal h1 {
    font-size: 1.75rem;
  }
}

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

/* ============================================
   SPECIES DETAIL PAGE
   ============================================ */

.species-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-xl);
}

.species-description {
  background: var(--ivory);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  line-height: 1.7;
  color: var(--ink-secondary);
}

.species-description p {
  margin: 0;
}

.species-hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.species-hero-image {
  aspect-ratio: 4/3;
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.species-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.species-hero-info h1 {
  margin-bottom: var(--space-sm);
}

.species-hero-info .scientific-name {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--ink-tertiary);
  margin-bottom: var(--space-lg);
}

.species-actions {
  display: flex;
  gap: var(--space-md);
}

.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
}

.info-card h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-tertiary);
  margin-bottom: var(--space-md);
  font-family: var(--font-sans);
  font-weight: 600;
}

.info-card-value {
  font-size: 1.1rem;
  color: var(--ink);
}

/* ============================================
   CONTENT SECTIONS (About page)
   ============================================ */

.content-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.content-section h2 {
  color: var(--forest);
  margin-bottom: var(--space-md);
}

.content-section h3 {
  color: var(--ink);
  margin-top: var(--space-lg);
  margin-bottom: 0.75rem;
}

.content-section ul {
  margin-left: var(--space-xl);
  margin-bottom: var(--space-md);
}

.content-section li {
  margin-bottom: var(--space-sm);
}

.warning-box {
  background: var(--warning-bg);
  border-left: 4px solid var(--gold);
  padding: var(--space-md);
  margin: var(--space-md) 0;
  border-radius: var(--radius-md);
}

.info-box {
  background: var(--success-bg);
  border-left: 4px solid var(--success);
  padding: var(--space-md);
  margin: var(--space-md) 0;
  border-radius: var(--radius-md);
}

/* ============================================
   LOADING STATE
   ============================================ */

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  min-height: 200px;
}

.loading-text {
  color: var(--forest);
  font-size: 1.1rem;
  font-weight: 500;
}

/* ============================================
   UTILITIES
   ============================================ */

.hidden {
  display: none !important;
}

.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 to content link (accessibility) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--forest);
  color: var(--white);
  padding: var(--space-sm);
  z-index: 100;
  transition: top var(--transition-base);
}

.skip-link:focus {
  top: 0;
}

/* Loading spinner animation */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--border);
  border-radius: 50%;
  border-top-color: var(--forest);
  animation: spin 1s ease-in-out infinite;
}

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

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  /* Header */
  .header {
    padding: var(--space-md) var(--space-lg);
    flex-direction: column;
    gap: var(--space-md);
  }

  .nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .nav a {
    font-size: 0.85rem;
    padding: var(--space-sm) var(--space-md);
  }

  .tagline {
    display: none;
  }

  /* Video Hero (Mobile) */
  .hero-video {
    min-height: 70vh;
  }

  .hero-video__content {
    padding: var(--space-xl) var(--space-lg);
  }

  .hero-video__content p {
    font-size: 1rem;
  }

  /* Hero */
  .hero {
    padding: var(--space-xl) var(--space-lg);
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero-text {
    font-size: 1rem;
  }

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

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

  /* Hero Split (Landing Page) */
  .hero-split {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 4rem 1.5rem;
    min-height: auto;
  }

  .hero-content {
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .fish-collage {
    height: 300px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    justify-self: center;
  }

  .fish-collage-item:nth-child(1) {
    width: 160px;
    height: 120px;
    top: 0;
    right: 40px;
  }

  .fish-collage-item:nth-child(2) {
    width: 130px;
    height: 98px;
    top: 100px;
    right: 0;
  }

  .fish-collage-item:nth-child(3) {
    width: 150px;
    height: 112px;
    top: 130px;
    right: 140px;
  }

  .fish-collage-item:nth-child(4) {
    width: 120px;
    height: 90px;
    bottom: 10px;
    right: 60px;
  }

  /* Species Showcase */
  .species-showcase {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Stats */
  .stats {
    flex-direction: column;
    gap: var(--space-lg);
  }

  /* Grids */
  .species-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .glossary-grid {
    grid-template-columns: 1fr;
  }

  /* Comparison */
  .comparison-header,
  .comparison-row {
    grid-template-columns: 1fr;
  }

  .attribute-label {
    background: var(--forest);
    color: var(--white);
    border-radius: var(--radius-md);
    margin-top: var(--space-md);
  }

  /* Species Detail */
  .species-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .species-hero-image {
    max-width: 100%;
    margin: 0 auto var(--space-lg);
  }

  .species-actions {
    justify-content: center;
  }

  /* Footer */
  .footer {
    flex-direction: column;
    gap: var(--space-lg);
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Dashboard */
  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  /* Glossary */
  .glossary-header {
    padding: var(--space-xl) var(--space-md);
  }

  .glossary-header h1 {
    font-size: 2rem;
  }

  .glossary-search {
    padding: var(--space-md);
  }

  .glossary-categories {
    padding: var(--space-md);
  }

  .category-card {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .glossary-content {
    padding: var(--space-md);
  }

  .glossary-item.has-image {
    grid-template-columns: 1fr;
  }

  .glossary-item-image {
    max-width: 150px;
    margin: 0 auto var(--space-md);
  }

  /* FAQ */
  .faq-container {
    padding: var(--space-md);
  }

  .faq-hero h1 {
    font-size: 2rem;
  }

  .faq-hero__subtitle {
    font-size: 0.95rem;
  }

  .faq-nav__tabs {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .faq-nav__tab {
    padding: 0.75rem 0;
    font-size: 0.85rem;
  }

  .faq-section__number {
    font-size: 2rem;
  }

  .faq-section__title {
    font-size: 1.25rem;
  }

  /* Container padding */
  .container,
  .container-narrow {
    padding: 0 var(--space-md);
  }

  .section {
    padding: var(--space-xl) var(--space-md);
  }
}

@media (max-width: 600px) {
  .species-showcase {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Touch-friendly targets */
@media (pointer: coarse) {
  .btn,
  .nav a,
  .filter-btn,
  .species-item,
  .faq-card__question,
  .faq-nav__tab,
  .category-card,
  .pagination-btn {
    min-height: 44px;
  }

  .form-group input,
  .form-group select,
  .search-box input {
    min-height: 44px;
    font-size: 16px; /* Prevents iOS zoom */
  }
}

/* ============================================
   ABOUT PAGE - Letter Format
   ============================================ */

.about-letter {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.about-letter h1 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.about-letter__content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--ink);
}

.about-letter__content p {
  margin-bottom: 1.5rem;
}

.about-letter__content h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ink);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.about-letter__content ul {
  margin: 0 0 1.5rem 1.25rem;
  padding: 0;
}

.about-letter__content li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.about-letter__signature {
  margin-top: 2rem;
  font-style: italic;
  color: var(--ink-secondary);
}

.about-letter__signature strong {
  font-style: normal;
  color: var(--ink);
}

/* Contact Section */
.about-letter__contact {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.about-letter__contact h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.about-letter__contact p {
  color: var(--ink-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.about-letter__email {
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--forest);
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--forest);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s ease;
}

.about-letter__email:hover {
  background: var(--forest);
  color: var(--white);
}

/* About Page Responsive */
@media (max-width: 768px) {
  .about-letter {
    padding: 2rem 1.5rem 3rem;
  }

  .about-letter h1 {
    font-size: 2rem;
  }

  .about-letter__content {
    font-size: 1rem;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .header,
  .footer,
  .nav,
  .btn {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .card,
  .content-section {
    border: 1px solid #ccc;
    box-shadow: none;
  }
}

/* ============================================
   AQUATIC ACCENTS
   Subtle underwater ambiance elements
   ============================================ */

/* -----------------------------------------
   Video Hero (Homepage only)
   ----------------------------------------- */
.hero-video {
  position: relative;
  min-height: 80vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-video__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

/* Hide Safari's native video controls and play button */
.hero-video__bg::-webkit-media-controls {
  display: none !important;
}

.hero-video__bg::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
}

.hero-video__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(35, 74, 58, 0.4) 0%, rgba(35, 74, 58, 0.85) 100%);
  z-index: 0;
}

.hero-video__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-2xl);
  text-align: center;
}

.hero-video__content h1 {
  color: var(--white);
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: var(--space-lg);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-video__content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto var(--space-xl);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
}

.hero-video__content .btn {
  background: var(--white);
  color: var(--forest);
  border: none;
  padding: var(--space-md) var(--space-xl);
  font-size: 1.1rem;
  font-weight: 600;
}

.hero-video__content .btn:hover {
  background: var(--ivory);
  transform: translateY(-2px);
}

/* Glass Edge Highlights integrated into .glossary-card and .tank-card definitions above */

/* ============================================
   COMMUNITY GALLERY PAGE
   ============================================ */

/* Hero Section */
.community-hero {
  background: var(--white);
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.community-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--ink);
  margin-bottom: var(--space-sm);
}

.community-hero-subtitle {
  color: var(--ink-secondary);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto;
}

/* Main Container */
.community-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

/* Toolbar */
.community-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.community-sort {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.community-sort label {
  color: var(--ink-secondary);
  font-size: 0.9rem;
}

.community-sort select {
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
}

.community-count {
  color: var(--ink-tertiary);
  font-size: 0.9rem;
}

/* Gallery Grid */
.community-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

/* Tank Card */
.community-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.community-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.community-card__image {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--stone);
  overflow: hidden;
}

.community-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-card__badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

.community-card__mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 100%;
  height: 100%;
}

.community-card__mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-card__mosaic.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--stone);
  color: var(--ink-tertiary);
  font-size: 0.9rem;
}

.community-card__content {
  padding: var(--space-md);
}

.community-card__title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: var(--space-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.community-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--ink-tertiary);
}

.community-card__owner {
  color: var(--forest);
}

/* Loading State */
.community-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-2xl);
  color: var(--ink-tertiary);
}

/* Error State */
.community-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-2xl);
}

.community-error p {
  color: var(--ink-secondary);
  margin-bottom: var(--space-md);
}

/* Empty State */
.community-empty {
  text-align: center;
  padding: var(--space-2xl);
}

.community-empty h3 {
  font-family: var(--font-serif);
  color: var(--ink);
  margin-bottom: var(--space-sm);
}

.community-empty p {
  color: var(--ink-secondary);
  margin-bottom: var(--space-lg);
}

/* Load More */
.load-more-container {
  display: flex;
  justify-content: center;
  padding: var(--space-xl) 0;
}

/* Responsive */
@media (max-width: 600px) {
  .community-toolbar {
    flex-direction: column;
    gap: var(--space-sm);
    align-items: flex-start;
  }

  .community-gallery {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   TANK DETAIL PAGE
   ============================================ */

/* Back Link */
.tank-detail-back {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg);
}

.back-link {
  color: var(--forest);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--forest-light);
}

/* Main Container */
.tank-detail-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-lg) var(--space-2xl);
}

/* Loading & Error States */
.tank-detail-loading,
.tank-detail-error {
  text-align: center;
  padding: var(--space-2xl);
}

.tank-detail-error h2 {
  font-family: var(--font-serif);
  color: var(--ink);
  margin-bottom: var(--space-sm);
}

.tank-detail-error p {
  color: var(--ink-secondary);
  margin-bottom: var(--space-lg);
}

/* Content Container */
.tank-detail-content {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* Hero Section */
.tank-detail-hero {
  aspect-ratio: 16 / 9;
  max-height: 400px;
  background: var(--stone);
  overflow: hidden;
}

.tank-detail-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tank-detail-hero-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  width: 100%;
  height: 100%;
}

.tank-detail-hero-mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tank-detail-hero-mosaic.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-tertiary);
}

/* Info Section */
.tank-detail-info {
  padding: var(--space-xl);
}

.tank-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-xs);
}

.tank-detail-header h1 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--ink);
  margin: 0;
}

.tank-detail-size {
  background: var(--forest);
  color: white;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
}

.tank-detail-owner {
  color: var(--ink-secondary);
  margin-bottom: var(--space-lg);
}

.tank-detail-owner a {
  color: var(--forest);
  text-decoration: none;
}

.tank-detail-owner a:hover {
  text-decoration: underline;
}

.tank-detail-description {
  color: var(--ink-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

/* Sections */
.tank-detail-section {
  margin-bottom: var(--space-xl);
}

.tank-detail-section h2 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: var(--space-md);
}

.section-count {
  font-weight: normal;
  color: var(--ink-tertiary);
}

/* Species Grid */
.tank-detail-species-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-md);
}

.species-mini-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  transition: background 0.2s ease;
}

.species-mini-card:hover {
  background: var(--stone);
}

.species-mini-card__image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--stone);
  margin-bottom: var(--space-xs);
}

.species-mini-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.species-mini-card__name {
  font-size: 0.85rem;
  color: var(--ink);
  text-align: center;
  line-height: 1.3;
}

/* Plants List */
.tank-detail-plants-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.plant-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  background: var(--stone);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background 0.2s ease;
}

.plant-list-item:hover {
  background: var(--border);
}

.plant-list-item__name {
  color: var(--ink);
  font-weight: 500;
}

.plant-list-item__meta {
  color: var(--ink-tertiary);
  font-size: 0.85rem;
}

/* Meta */
.tank-detail-meta {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  color: var(--ink-tertiary);
  font-size: 0.9rem;
}

.empty-message {
  color: var(--ink-tertiary);
  font-style: italic;
}

/* Responsive */
@media (max-width: 600px) {
  .tank-detail-header {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .tank-detail-species-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   PROFILE PAGE
   ============================================ */

.profile-main {
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

.profile-loading,
.profile-error {
  text-align: center;
  padding: var(--space-2xl);
}

.profile-error h2 {
  font-family: var(--font-serif);
  color: var(--ink);
  margin-bottom: var(--space-sm);
}

.profile-error p {
  color: var(--ink-secondary);
  margin-bottom: var(--space-lg);
}

/* Profile Header */
.profile-header {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding-bottom: var(--space-xl);
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-placeholder {
  font-size: 2rem;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
}

.profile-info h1 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: var(--space-xs);
}

.profile-meta {
  color: var(--ink-tertiary);
  font-size: 0.9rem;
}

/* Profile Bio */
.profile-bio {
  font-style: italic;
  color: var(--ink-secondary);
  margin: 0.5rem 0 1rem 0;
  max-width: 500px;
}

/* Profile Follow Stats & Button */
.profile-stats {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--ink-secondary);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.profile-stats__divider {
  color: var(--border);
}

.profile-follow-btn {
  margin-top: 1rem;
}

.profile-follow-btn .btn {
  min-width: 100px;
}

.profile-follow-btn .btn--following {
  background: var(--forest);
  color: white;
}

.profile-follow-btn .btn--following:hover {
  background: #c0392b;
}

/* Tanks Section */
.profile-tanks-section h2 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: var(--space-lg);
}

.profile-tanks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.profile-no-tanks {
  text-align: center;
  padding: var(--space-xl);
  color: var(--ink-secondary);
  background: var(--stone);
  border-radius: var(--radius-lg);
}

/* Profile Tabs (own profile only) */
.profile-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.profile-tab {
  background: none;
  border: none;
  padding: 1rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.profile-tab:hover {
  color: var(--ink);
}

.profile-tab.active {
  color: var(--forest);
  border-bottom-color: var(--forest);
}

.profile-tab-panel {
  display: none;
}

.profile-tab-panel.active {
  display: block;
}

/* Responsive */
@media (max-width: 600px) {
  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .profile-tanks-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   COMMUNITY TABS & POSTS FEED (Phase 4 Full)
   ============================================ */

/* View Toggle Tabs */
.community-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 2rem auto 0;
  max-width: 300px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--ivory);
}

.community-tab {
  flex: 1;
  padding: 0.75rem 1.5rem;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.community-tab:hover {
  background: rgba(35, 74, 58, 0.05);
}

.community-tab.active {
  background: var(--forest);
  color: white;
}

/* Category Filter Buttons */
.post-categories {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.category-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-btn:hover {
  border-color: var(--forest);
  color: var(--forest);
}

.category-btn.active {
  background: var(--forest);
  border-color: var(--forest);
  color: white;
}

/* New Post Container */
.new-post-container {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

/* Posts Feed */
.posts-feed {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 700px;
  margin: 0 auto;
}

/* Post Card */
.post-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: box-shadow 0.2s ease;
}

.post-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.post-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.post-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--forest);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
}

.post-card__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.post-card__meta {
  flex: 1;
}

.post-card__author {
  font-weight: 600;
  color: var(--ink);
}

.post-card__info {
  font-size: 0.875rem;
  color: var(--ink-secondary);
}

.post-card__category {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: rgba(35, 74, 58, 0.1);
  color: var(--forest);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-right: 0.5rem;
}

.post-card__content {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.post-card__images {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  overflow: hidden;
}

.post-card__images.single {
  grid-template-columns: 1fr;
}

.post-card__images.double {
  grid-template-columns: 1fr 1fr;
}

.post-card__images.triple,
.post-card__images.quad {
  grid-template-columns: 1fr 1fr;
}

.post-card__images img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  cursor: pointer;
}

/* Tank Preview in Post Cards */
.post-card__tank-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.post-card__tank-preview:hover {
  border-color: var(--forest);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.post-card__tank-image {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.post-card__tank-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card__tank-image.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--forest);
  color: white;
  font-family: 'Libre Baskerville', serif;
  font-size: 1.5rem;
  font-weight: 700;
}

.post-card__tank-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.post-card__tank-name {
  font-family: 'Libre Baskerville', serif;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-card__tank-stats {
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

.post-card__tank-link {
  color: var(--forest);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

.post-card__actions {
  display: flex;
  gap: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.post-card__action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.post-card__action:hover {
  color: var(--forest);
}

.post-card__action.liked {
  color: #e74c3c;
}

/* ===== Bookmark Button ===== */
.post-card__bookmark {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--ink-secondary);
  transition: color 0.2s;
}

.post-card__bookmark:hover {
  color: var(--forest);
}

.post-card__bookmark.bookmarked {
  color: var(--forest);
}

.bookmark-icon {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z'/%3E%3C/svg%3E");
  background-size: contain;
}

.post-card__bookmark.bookmarked .bookmark-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' viewBox='0 0 24 24'%3E%3Cpath d='M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z'/%3E%3C/svg%3E");
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .community-tabs {
    margin: 1rem auto 0;
  }

  .post-categories {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
  }

  .category-btn {
    flex-shrink: 0;
  }

  .post-card {
    padding: 1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .post-card__images img {
    height: 150px;
  }
}

/* Post Composer Modal */
.composer-modal {
  max-width: 600px;
  width: 95%;
}

.composer-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 120px;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--forest);
}

.char-counter {
  text-align: right;
  font-size: 0.875rem;
  color: var(--ink-secondary);
  margin-top: 0.5rem;
}

.image-preview-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.image-preview {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview-remove:hover {
  background: rgba(0, 0, 0, 0.8);
}

.image-upload-area {
  display: flex;
  justify-content: center;
}

/* Post Detail Page */
.post-detail-main {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.post-detail-container {
  min-height: 400px;
}

.post-detail {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}

.post-detail__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.post-detail__meta {
  flex: 1;
}

.post-detail__delete {
  background: none;
  border: 1px solid #e74c3c;
  color: #e74c3c;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.post-detail__delete:hover {
  background: #e74c3c;
  color: white;
}

.post-detail__author {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.1rem;
}

.post-detail__author:hover {
  color: var(--forest);
}

.post-detail__info {
  font-size: 0.875rem;
  color: var(--ink-secondary);
  margin-top: 0.25rem;
}

.post-detail__content {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 1.5rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.post-detail__images {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
}

.post-detail__images.single {
  grid-template-columns: 1fr;
}

.post-detail__images.single img {
  max-height: 500px;
  object-fit: contain;
  background: var(--ivory);
}

.post-detail__images.double,
.post-detail__images.triple,
.post-detail__images.quad {
  grid-template-columns: 1fr 1fr;
}

.post-detail__images img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  cursor: pointer;
}

/* Tank preview in post detail (for tank-linked posts) */
.post-detail__tank-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.post-detail__tank-preview:hover {
  border-color: var(--forest);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.post-detail__tank-image {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.post-detail__tank-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-detail__tank-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--forest);
  color: white;
  font-family: 'Libre Baskerville', serif;
  font-size: 1.75rem;
  font-weight: 700;
}

.post-detail__tank-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.post-detail__tank-name {
  font-family: 'Libre Baskerville', serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-detail__tank-stats {
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

.post-detail__tank-link {
  color: var(--forest);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.post-detail__actions {
  display: flex;
  gap: 2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.post-detail__comments {
  margin-top: 1.5rem;
}

.post-detail__comments h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.comments-placeholder {
  color: var(--ink-secondary);
  font-style: italic;
  padding: 2rem;
  text-align: center;
  background: var(--ivory);
  border-radius: 8px;
}

.back-link {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.75rem 1.25rem;
  color: var(--forest);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--forest);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.back-link:hover {
  background: var(--forest);
  color: white;
  text-decoration: none;
}

/* ============================================================================
   COMMENTS - Phase 4.2
   ============================================================================ */

.comments-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.comments-header {
  margin-bottom: 1rem;
}

.comments-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
}

.comments-loading,
.comments-empty,
.comments-error {
  color: var(--ink-secondary);
  font-style: italic;
  padding: 1rem 0;
}

.comment-input-container {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.comment-input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9375rem;
  resize: vertical;
  min-height: 60px;
  max-height: 200px;
}

.comment-input:focus {
  outline: none;
  border-color: var(--forest);
}

.comment-input--reply {
  min-height: 40px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment {
  padding: 1rem;
  background: var(--stone);
  border-radius: 8px;
}

.comment--reply {
  margin-left: 2rem;
  background: var(--ivory);
  border-left: 2px solid var(--border);
}

.comment__header {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.comment__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--forest);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  overflow: hidden;
}

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

.comment__meta {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.comment__author {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.875rem;
}

.comment__author:hover {
  color: var(--forest);
}

.comment__time {
  font-size: 0.75rem;
  color: var(--ink-secondary);
}

.comment__content {
  color: var(--ink);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment__actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.comment__action {
  background: none;
  border: none;
  color: var(--ink-secondary);
  cursor: pointer;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0;
}

.comment__action:hover {
  color: var(--forest);
}

.comment__action.liked {
  color: #e74c3c;
}

.comment__action.liked .like-icon {
  color: #e74c3c;
}

.comment__action--delete {
  color: #999;
  margin-left: auto;
}

.comment__action--delete:hover {
  color: #e74c3c;
}

.comment__replies {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.reply-input-container {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  align-items: flex-start;
}

/* Like button states */
.post-card__action.liked,
.post-detail__action.liked {
  color: #e74c3c;
}

.post-card__action.liked .like-icon,
.post-detail__action.liked .like-icon {
  color: #e74c3c;
}

.like-icon {
  transition: transform 0.15s ease;
}

.post-card__action:active .like-icon,
.post-detail__action:active .like-icon,
.comment__action:active .like-icon {
  transform: scale(1.2);
}

/* ============================================
   Modal Base Styles
   ============================================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: white;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--ink-secondary);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

/* Profile Edit Modal */
.profile-edit-modal {
  max-width: 480px;
}

/* ============================================================================
   MY POSTS & BOOKMARKS CARDS - Phase 4.4
   ============================================================================ */

/* My Posts Cards */
.my-posts-list,
.my-bookmarks-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
}

.my-post-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.my-post-card:hover {
  border-color: var(--forest);
}

.my-post-card__content {
  flex: 1;
}

.my-post-card__author {
  font-size: 0.85rem;
  color: var(--forest);
  margin-right: 0.5rem;
}

.my-post-card__category {
  font-size: 0.8rem;
  color: var(--ink-secondary);
  background: var(--ivory);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.my-post-card__text {
  margin: 0.5rem 0;
  color: var(--ink);
  line-height: 1.4;
}

.my-post-card__meta {
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

.my-post-card__delete,
.my-post-card__bookmark {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--ink-secondary);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.my-post-card__delete:hover {
  color: #dc3545;
}

.my-post-card__bookmark.bookmarked {
  color: var(--forest);
}

/* ============================================
   Favorites Grid (Dashboard)
   ============================================ */

.favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.favorite-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.favorite-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.favorite-card__image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ivory);
}

.favorite-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.favorite-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-tertiary);
  font-size: 0.85rem;
}

.favorite-card__name {
  padding: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================
   FEATURED TANK SECTION
   ============================================ */

.featured-tank-section {
  padding: var(--space-3xl) var(--space-lg);
  background: var(--white);
}

.featured-tank {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  max-width: 1000px;
  margin: 0 auto;
  align-items: center;
}

.featured-tank__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
}

.featured-tank__image img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

@media (hover: hover) and (pointer: fine) {
  .featured-tank__image:hover img {
    transform: scale(1.02);
  }
}

.featured-tank__info {
  padding: var(--space-lg) 0;
}

.featured-tank__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--forest);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.featured-tank__name {
  font-family: var(--font-serif);
  font-size: var(--text-section-title);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--space-xs);
}

.featured-tank__name a {
  color: inherit;
  text-decoration: none;
}

.featured-tank__name a:hover {
  color: var(--forest);
}

.featured-tank__author {
  font-size: var(--text-tile-body);
  color: var(--ink-secondary);
  margin-bottom: var(--space-md);
}

.featured-tank__author a {
  color: var(--forest);
  text-decoration: none;
}

.featured-tank__author a:hover {
  text-decoration: underline;
}

.featured-tank__description {
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.featured-tank__stats {
  display: flex;
  gap: var(--space-lg);
  font-size: 0.875rem;
  color: var(--ink-secondary);
  margin-bottom: var(--space-md);
}

.featured-tank__stats span {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.featured-tank__species,
.featured-tank__plants {
  font-size: 0.875rem;
  color: var(--ink-secondary);
  margin-bottom: var(--space-sm);
}

.featured-tank__species strong,
.featured-tank__plants strong {
  color: var(--ink);
  font-weight: 500;
}

.featured-tank__plants {
  margin-bottom: var(--space-lg);
}

/* Featured Tank Responsive */
@media (max-width: 768px) {
  .featured-tank {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .featured-tank__info {
    padding: 0;
    text-align: center;
  }

  .featured-tank__stats {
    justify-content: center;
  }
}

/* ============================================
   JOIN COMMUNITY CTA SECTION
   ============================================ */

.join-cta-section {
  padding: var(--space-3xl) var(--space-lg);
  background: var(--ivory);
}

.join-cta {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.join-cta__title {
  font-family: var(--font-serif);
  font-size: var(--text-section-title);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--space-sm);
}

.join-cta__subtitle {
  font-size: 1rem;
  color: var(--ink-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
}

.join-cta__actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .join-cta__actions {
    flex-direction: column;
    align-items: center;
  }

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

/* ============================================
   GUIDES PAGES
   ============================================ */

/* Guides Hero */
.guides-hero {
  padding: var(--space-3xl) var(--space-lg) var(--space-2xl);
  background: var(--ivory);
  text-align: center;
}

.guides-hero__content {
  max-width: 700px;
  margin: 0 auto;
}

.guides-hero h1 {
  font-family: var(--font-serif);
  font-size: var(--text-hero);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--space-md);
}

.guides-hero__subtitle {
  font-size: 1.125rem;
  color: var(--ink-secondary);
  line-height: 1.6;
}

/* Guides Navigation */
.guides-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) var(--space-lg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.guides-nav__tabs {
  display: flex;
  gap: var(--space-sm);
  max-width: 1200px;
  margin: 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.guides-nav__tab {
  padding: var(--space-sm) var(--space-md);
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-secondary);
  cursor: pointer;
  white-space: nowrap;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.guides-nav__tab:hover {
  color: var(--ink);
  background: var(--stone);
}

.guides-nav__tab.active {
  color: var(--white);
  background: var(--forest);
}

/* Featured Guide Section */
.guides-featured {
  padding: var(--space-2xl) var(--space-lg);
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.guides-featured__content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.guides-featured__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--forest);
  background: var(--success-bg);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.guides-featured__title {
  font-family: var(--font-serif);
  font-size: var(--text-section-title);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

.guides-featured__description {
  font-size: 1rem;
  color: var(--ink-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.guides-featured__meta {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-bottom: var(--space-lg);
  font-size: 0.875rem;
  color: var(--ink-tertiary);
}

.guides-featured__btn {
  display: inline-block;
}

/* Guides Container */
.guides-container {
  padding: var(--space-2xl) var(--space-lg);
  background: var(--stone);
}

/* Guides Grid */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.guides-grid--small {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  max-width: 1000px;
}

/* Guide Card */
.guide-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-decoration: none;
  transition: all var(--transition-base);
  border: 1px solid var(--border);
  display: block;
}

.guide-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--forest);
}

.guide-card__category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: block;
  margin-bottom: var(--space-sm);
}

.guide-card__title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.guide-card__description {
  font-size: 0.875rem;
  color: var(--ink-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.guide-card__meta {
  display: flex;
  gap: var(--space-md);
  font-size: 0.8rem;
  color: var(--ink-tertiary);
}

.guide-card--small .guide-card__title {
  font-size: 1.1rem;
}

.guide-card--small .guide-card__description {
  display: none;
}

/* Guides Empty State */
.guides-empty {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  max-width: 500px;
  margin: 0 auto;
}

.guides-empty h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: var(--space-sm);
}

.guides-empty p {
  color: var(--ink-secondary);
}

/* ============================================
   GUIDE DETAIL PAGE (Article)
   ============================================ */

.guide-article {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}

/* Article Header */
.guide-article__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border);
}

.guide-article__back {
  display: inline-block;
  font-size: 0.875rem;
  color: var(--ink-secondary);
  text-decoration: none;
  margin-bottom: var(--space-lg);
  transition: color var(--transition-fast);
}

.guide-article__back:hover {
  color: var(--forest);
}

.guide-article__back::before {
  content: '\2190';
  margin-right: var(--space-xs);
}

.guide-article__category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.guide-article__title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 1.5rem + 1vw, 2.5rem);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--space-md);
  line-height: 1.2;
}

.guide-article__meta {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  font-size: 0.875rem;
  color: var(--ink-tertiary);
}

/* Table of Contents */
.guide-article__toc {
  background: var(--ivory);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.guide-article__toc h3 {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-secondary);
  margin-bottom: var(--space-md);
}

.guide-article__toc ol {
  list-style: decimal;
  padding-left: var(--space-lg);
  margin: 0;
}

.guide-article__toc li {
  margin-bottom: var(--space-sm);
}

.guide-article__toc a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.guide-article__toc a:hover {
  color: var(--forest);
}

/* Article Content */
.guide-article__content {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
}

.guide-section {
  margin-bottom: var(--space-2xl);
  scroll-margin-top: var(--space-2xl);
}

.guide-section h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.guide-section h4 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.guide-section p {
  margin-bottom: var(--space-md);
}

.guide-section ul,
.guide-section ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

.guide-section li {
  margin-bottom: var(--space-sm);
}

.guide-section a {
  color: var(--forest);
  text-decoration: underline;
}

.guide-section a:hover {
  color: var(--forest-light);
}

/* Guide Tips and Warnings */
.guide-tip,
.guide-warning {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin: var(--space-lg) 0;
}

.guide-tip {
  background: var(--success-bg);
  border-left: 3px solid var(--success);
}

.guide-warning {
  background: var(--danger-bg);
  border-left: 3px solid var(--danger);
}

/* Guide CTA Box */
.guide-cta {
  background: var(--ivory);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  margin: var(--space-2xl) 0;
}

.guide-cta h4 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.guide-cta p {
  color: var(--ink-secondary);
  margin-bottom: var(--space-md);
}

/* Article Footer */
.guide-article__footer {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.guide-article__share {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  justify-content: center;
}

.guide-article__share span {
  color: var(--ink-secondary);
}

/* Related Guides Section */
.guide-related {
  padding: var(--space-2xl) var(--space-lg);
  background: var(--stone);
}

.guide-related h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  text-align: center;
  margin-bottom: var(--space-xl);
}

/* Guides Responsive */
@media (max-width: 768px) {
  .guides-hero {
    padding: var(--space-2xl) var(--space-md) var(--space-xl);
  }

  .guides-nav {
    padding: var(--space-sm) var(--space-md);
  }

  .guides-grid {
    grid-template-columns: 1fr;
  }

  .guide-article {
    padding: var(--space-xl) var(--space-md);
  }

  .guide-article__meta {
    flex-direction: column;
    gap: var(--space-xs);
  }
}

@media (max-width: 480px) {
  .guides-nav__tabs {
    gap: var(--space-xs);
  }

  .guides-nav__tab {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.8rem;
  }
}
