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

:root {
  --bg: #faf8f3;
  --card-bg: #fff;
  --text: #2d2a24;
  --text-muted: #6b6560;
  --accent: #5a8f3c;
  --accent-light: #e8f2e0;
  --border: #e2ddd5;
  --tomato: #c0392b;
  --pepper: #e67e22;
  --melon: #f39c12;
  --watermelon: #e74c3c;
  --herb: #27ae60;
  --other: #8e44ad;
  --shadow: 0 2px 8px rgba(0,0,0,.08);
  --radius: 12px;
}

body {
  font-family: 'Patrick Hand', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Hub page */
.hub-header {
  text-align: center;
  padding: 2rem 0 1rem;
}
.hub-header h1 {
  font-family: 'Caveat', cursive;
  font-size: 2.4rem;
  color: var(--accent);
}
.hub-header p { color: var(--text-muted); font-size: 1.1rem; margin-top: .5rem; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.family-section { margin: 2rem 0; }
.family-section h2 {
  font-family: 'Caveat', cursive;
  font-size: 1.7rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: .3rem;
  margin-bottom: 1rem;
}

.variety-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.variety-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
}
.variety-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  text-decoration: none;
}
.variety-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}
.variety-card .card-body {
  padding: .8rem;
}
.variety-card .card-body h3 {
  font-size: 1.15rem;
  margin-bottom: .25rem;
}
.variety-card .card-body .card-meta {
  font-size: .85rem;
  color: var(--text-muted);
}
.badge {
  display: inline-block;
  font-size: .75rem;
  padding: .15rem .5rem;
  border-radius: 99px;
  font-weight: 600;
  color: #fff;
}
.badge-easy { background: var(--herb); }
.badge-medium { background: var(--melon); }
.badge-hard { background: var(--watermelon); }
.badge-no { background: #999; }
.badge-op { background: var(--accent); }
.badge-hybrid { background: #c0392b; }

/* Variety detail page */
.variety-header {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.variety-hero {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}
.variety-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  padding: 2rem 1.2rem 1rem;
  color: #fff;
}
.variety-hero-overlay h1 {
  font-family: 'Caveat', cursive;
  font-size: 2rem;
}
.variety-hero-overlay .subtitle {
  font-size: .95rem;
  opacity: .9;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .8rem;
  margin-bottom: 1.5rem;
}
.info-box {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: .8rem;
  text-align: center;
}
.info-box .label {
  font-size: .8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.info-box .value {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: .2rem;
}

.content-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  margin-bottom: 1.2rem;
}
.content-section h2 {
  font-family: 'Caveat', cursive;
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: .8rem;
}

.steps {
  list-style: none;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  padding: .6rem 0 .6rem 2.5rem;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.steps li:last-child { border-bottom: none; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: .6rem;
  width: 1.8rem;
  height: 1.8rem;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
}

.tip-box {
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: .8rem 1rem;
  margin: 1rem 0;
}
.tip-box strong { color: var(--accent); }

.warning-box {
  background: #fef3e8;
  border-left: 4px solid var(--melon);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: .8rem 1rem;
  margin: 1rem 0;
}
.warning-box strong { color: var(--pepper); }

.cross-table {
  width: 100%;
  border-collapse: collapse;
  margin: .5rem 0;
}
.cross-table th, .cross-table td {
  padding: .5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.cross-table th {
  font-size: .85rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.nav-bottom {
  display: flex;
  justify-content: space-between;
  margin: 2rem 0;
  gap: 1rem;
}
.nav-bottom a {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: .8rem 1.2rem;
  flex: 1;
  text-align: center;
}

@media (max-width: 600px) {
  .variety-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .variety-hero { height: 200px; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  body { padding: .5rem; }
}
