/* PlotCraft — Botanical Editorial Theme */
:root {
  --bg: #F6F3EA;
  --surface: #FFFDF8;
  --surface-alt: #EFE9DA;
  --border: #DED6C4;
  --border-strong: #C9BEA6;

  --text: #1E2A22;
  --text-muted: #556358;
  --text-light: #748277;

  --primary: #2D5A3D;
  --primary-hover: #22462F;
  --primary-soft: #E5F0E8;

  --accent: #C85A32;
  --accent-soft: #FAEAE3;

  --soil: #6E4F3A;
  --sun: #D99B26;
  --sun-soft: #FDF4DC;

  --indoor: #6382B5;
  --outdoor: #4D965B;
  --harvest: #D46637;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 10px rgba(30, 42, 34, 0.06);
  --shadow-lg: 0 16px 42px rgba(30, 42, 34, 0.18);

  --font-serif: Georgia, Cambria, "Times New Roman", serif;
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  margin: 0 0 0.4rem;
  line-height: 1.25;
  color: var(--text);
}

p {
  margin: 0 0 0.75rem;
}

code {
  font-family: var(--font-mono);
  background: var(--surface-alt);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.88em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

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

.small-hint {
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* ==================== HEADER & NAV ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0.8rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--primary);
  font-size: 1.35rem;
  box-shadow: var(--shadow);
}

.brand-title {
  font-size: 1.3rem;
  margin: 0;
  letter-spacing: -0.01em;
}

.brand-sub {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  background: var(--surface-alt);
  padding: 0.28rem;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.nav-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.48rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.nav-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.6);
}

.nav-btn.active {
  background: var(--primary);
  color: #FFFDF8;
  box-shadow: 0 2px 6px rgba(45, 90, 61, 0.25);
}

.hemisphere-toggle {
  display: inline-flex;
  background: var(--surface-alt);
  padding: 0.2rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.hemi-btn {
  border: none;
  background: transparent;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.hemi-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ==================== MAIN CONTAINER & HERO ==================== */
.main-content {
  max-width: 1260px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero-strip {
  background: linear-gradient(135deg, #285237 0%, #3A6B4A 100%);
  color: #FFFDF8;
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  box-shadow: var(--shadow);
}

.hero-strip h2 {
  color: #FFFDF8;
  font-size: 1.65rem;
  margin-bottom: 0.35rem;
}

.hero-strip p {
  margin: 0;
  color: rgba(255, 253, 248, 0.88);
  max-width: 680px;
  font-size: 0.95rem;
}

.hero-strip.compact {
  padding: 1.25rem 1.6rem;
}

.hero-stats {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.stat-chip {
  background: rgba(255, 253, 248, 0.14);
  border: 1px solid rgba(255, 253, 248, 0.22);
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  text-align: center;
  min-width: 92px;
}

.stat-chip strong {
  display: block;
  font-size: 1.3rem;
  font-family: var(--font-mono);
  line-height: 1.1;
}

.stat-chip span {
  font-size: 0.75rem;
  opacity: 0.88;
}

/* ==================== FILTER BAR ==================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1.35rem;
  box-shadow: var(--shadow);
}

.search-wrap {
  flex: 1 1 220px;
}

.search-wrap input {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  background: #FFFDF8;
  color: var(--text);
}

.search-wrap input:focus,
.select-control:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.pill {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  padding: 0.46rem 0.82rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFDF8;
}

.select-control {
  padding: 0.48rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
}

.full-width {
  width: 100%;
}

/* ==================== CROP CARDS GRID ==================== */
.crop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.1rem;
}

.crop-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  cursor: pointer;
}

.crop-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30, 42, 34, 0.1);
  border-color: var(--primary);
}

.crop-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.crop-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.crop-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  background: var(--surface-alt);
  flex-shrink: 0;
}

.crop-card h3 {
  font-size: 1.12rem;
  margin: 0;
}

.crop-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.badge {
  display: inline-block;
  padding: 0.18rem 0.52rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-veg {
  background: var(--primary-soft);
  color: var(--primary);
}

.badge-fruit {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-easy {
  background: #E8F3E5;
  color: #2B6731;
}

.badge-moderate {
  background: var(--sun-soft);
  color: #93640E;
}

.crop-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.7rem;
  font-size: 0.82rem;
}

.metric-item span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-light);
}

.metric-item strong {
  color: var(--text);
  font-weight: 600;
}

.mono {
  font-family: var(--font-mono);
}

.crop-seasons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.season-tag {
  font-size: 0.74rem;
  padding: 0.16rem 0.48rem;
  border-radius: 6px;
  background: var(--surface-alt);
  color: var(--text-muted);
  font-weight: 600;
}

.crop-card-footer {
  margin-top: auto;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.83rem;
}

.bed-fit-pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
}

.link-cta {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.82rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

/* ==================== BUTTONS ==================== */
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-ghost {
  font-family: var(--font-sans);
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: #FFFDF8;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface-alt);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: #E5DEC9;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.btn-sm {
  padding: 0.38rem 0.75rem;
  font-size: 0.82rem;
}

/* ==================== BED DIAGRAMS VIEW ==================== */
.section-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.section-header-row h2 {
  font-size: 1.55rem;
}

.section-header-row p {
  margin: 0;
  color: var(--text-muted);
}

.mode-switch {
  display: inline-flex;
  background: var(--surface-alt);
  padding: 0.25rem;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.mode-btn {
  border: none;
  background: transparent;
  padding: 0.48rem 0.9rem;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.mode-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow);
}

.bed-size-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.bed-size-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  transition: all 0.15s ease;
  text-align: left;
}

.bed-size-card:hover {
  border-color: var(--primary);
}

.bed-size-card.active {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.bed-size-title {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  display: block;
}

.bed-size-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.bed-thumb {
  border: 2px solid var(--soil);
  background: #8B694E;
  border-radius: 3px;
  flex-shrink: 0;
}

.bed-workspace,
.mixed-workspace {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 1.25rem;
  align-items: start;
}

.bed-controls-card,
.bed-canvas-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.control-block {
  margin-bottom: 1.05rem;
}

.control-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.42rem;
}

.segmented {
  display: flex;
  background: var(--surface-alt);
  border-radius: 8px;
  padding: 0.2rem;
  border: 1px solid var(--border);
}

.seg-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.42rem 0.5rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.seg-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.spacing-summary-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  margin-bottom: 1rem;
  font-size: 0.86rem;
}

.spacing-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.spacing-stat strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--primary);
}

.spacing-stat span {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.spacing-mini-svg {
  width: 100%;
  height: auto;
  display: block;
}

.canvas-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.svg-stage {
  background: #F4EFE3;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: auto;
}

.bed-svg {
  max-width: 100%;
  height: auto;
  display: block;
}

.info-banner {
  margin-top: 0.9rem;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--sun-soft);
  border: 1px solid #EBD396;
  font-size: 0.85rem;
  color: #5E430B;
}

.capacity-compare-section {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.capacity-compare-section h4 {
  font-size: 0.96rem;
  margin-bottom: 0.65rem;
}

.capacity-compare-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}

.cap-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cap-box:hover {
  border-color: var(--primary);
}

.cap-box.active {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.cap-box .cap-dim {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.cap-box .cap-num {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0.15rem 0;
}

.cap-box .cap-sub {
  font-size: 0.73rem;
  color: var(--text-light);
}

/* ==================== MIXED BED PLANNER ==================== */
.mixed-palette {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  max-height: 390px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.palette-item {
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 8px;
  padding: 0.42rem 0.5rem;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.38rem;
  cursor: pointer;
  text-align: left;
  color: var(--text);
}

.palette-item:hover {
  border-color: var(--primary);
}

.palette-item.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFDF8;
  font-weight: 600;
}

.mixed-actions-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mixed-bed-board {
  background: #8B6544;
  padding: 12px;
  border-radius: 10px;
  border: 2px solid #5E422C;
  overflow-x: auto;
}

.mixed-grid {
  display: grid;
  gap: 4px;
  background: #4C3524;
  padding: 6px;
  border-radius: 6px;
}

.mixed-cell {
  aspect-ratio: 1 / 1;
  min-height: 76px;
  border-radius: 6px;
  border: 1px dashed rgba(255, 253, 248, 0.25);
  background: #614633;
  color: #FFFDF8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.12s ease;
  text-align: center;
  user-select: none;
}

.mixed-cell:hover {
  border-color: #FFFDF8;
  transform: scale(0.98);
}

.mixed-cell.filled {
  border-style: solid;
  border-color: rgba(255, 253, 248, 0.55);
}

.mixed-cell .cell-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.mixed-cell .cell-name {
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 0.2rem;
  line-height: 1.1;
}

.mixed-cell .cell-qty {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  opacity: 0.92;
  background: rgba(0,0,0,0.28);
  padding: 0.08rem 0.35rem;
  border-radius: 99px;
  margin-top: 0.18rem;
}

.mixed-cell .cell-empty {
  font-size: 0.7rem;
  opacity: 0.55;
}

.mixed-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.1rem;
}

.mixed-summary-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
}

.mixed-summary-box h4 {
  font-size: 0.95rem;
  margin-bottom: 0.55rem;
}

.tally-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.85rem;
}

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

.comp-alert {
  font-size: 0.83rem;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  margin-bottom: 0.45rem;
}

.comp-good {
  background: #E6F3E8;
  color: #21532B;
}

.comp-warn {
  background: #FDECE8;
  color: #962E1F;
}

/* ==================== SEASON CALENDAR ==================== */
.calendar-filters {
  display: flex;
  gap: 0.4rem;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.84rem;
}

.swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  vertical-align: -2px;
  margin-right: 0.35rem;
}

.swatch-indoor { background: var(--indoor); }
.swatch-outdoor { background: var(--outdoor); }
.swatch-harvest { background: var(--harvest); }

.legend-tip {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.calendar-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: var(--shadow);
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
  font-size: 0.84rem;
}

.calendar-table th,
.calendar-table td {
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.calendar-table thead th {
  background: var(--surface-alt);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.calendar-table th:first-child,
.calendar-table td:first-child {
  text-align: left;
  padding-left: 0.9rem;
  min-width: 195px;
  position: sticky;
  left: 0;
  background: var(--surface);
  z-index: 2;
}

.calendar-table thead th:first-child {
  background: var(--surface-alt);
}

.calendar-table tbody tr {
  cursor: pointer;
}

.calendar-table tbody tr:hover td {
  background: #F4F7F3;
}

.cal-crop-name {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
}

.cal-time-col {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.cal-cell-bars {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  justify-content: center;
  min-height: 22px;
}

.cal-bar {
  width: 100%;
  height: 7px;
  border-radius: 3px;
}

.cal-bar.indoor { background: var(--indoor); }
.cal-bar.outdoor { background: var(--outdoor); }
.cal-bar.harvest { background: var(--harvest); }

.current-month-col {
  background: rgba(217, 155, 38, 0.12) !important;
}

/* ==================== GARDENING GUIDE ==================== */
.quick-ref-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.quick-ref-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow);
}

.quick-ref-card h4 {
  font-size: 1rem;
  margin-bottom: 0.55rem;
}

.soil-bar {
  display: flex;
  height: 26px;
  border-radius: 6px;
  overflow: hidden;
  font-size: 0.74rem;
  font-weight: 700;
  color: #FFFDF8;
  margin-bottom: 0.5rem;
}

.soil-seg {
  display: grid;
  place-items: center;
}

.seg-topsoil { background: #7D5C43; }
.seg-compost { background: #473325; }
.seg-grit { background: #9E998E; color: #1E2A22; }

.compact-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
}

.compact-list li {
  margin-bottom: 0.25rem;
}

.guides-grid {
  display: grid;
  gap: 1.25rem;
}

.guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.guide-card-header {
  padding: 1.15rem 1.4rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg);
}

.guide-step-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  color: #FFFDF8;
  flex-shrink: 0;
}

.guide-card-header h3 {
  font-size: 1.28rem;
  margin: 0 0 0.2rem;
}

.guide-card-header p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.guide-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.15rem;
  padding: 1.3rem 1.4rem;
}

.guide-section h4 {
  font-size: 0.98rem;
  color: var(--primary);
  margin-bottom: 0.45rem;
}

.guide-section ul {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.88rem;
  color: var(--text);
}

.guide-section li {
  margin-bottom: 0.42rem;
}

/* ==================== CROP DETAIL MODAL ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 23, 0.56);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}

.modal-sheet {
  background: var(--surface);
  border-radius: 16px;
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  padding: 1.6rem 1.75rem 2rem;
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  border: 1px solid var(--border);
  background: var(--surface);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
  display: grid;
  place-items: center;
}

.modal-close:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.modal-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.modal-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: var(--surface-alt);
  display: grid;
  place-items: center;
  font-size: 2rem;
}

.modal-botanical {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.modal-facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.fact-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
}

.fact-box span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-light);
  font-weight: 700;
}

.fact-box strong {
  font-size: 0.9rem;
}

.modal-section {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
}

.modal-section h3 {
  font-size: 1.15rem;
  margin-bottom: 0.65rem;
}

.mini-timeline {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  margin-top: 0.4rem;
}

.tl-month {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.2rem;
  text-align: center;
}

.tl-month-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.modal-bed-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.modal-bed-tab {
  border: 1px solid var(--border-strong);
  background: var(--bg);
  border-radius: 8px;
  padding: 0.45rem 0.78rem;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
}

.modal-bed-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFDF8;
}

.care-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

.care-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
}

.care-card h4 {
  font-size: 0.96rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.care-card ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
}

.care-card li {
  margin-bottom: 0.38rem;
}

.companions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.6rem;
  font-size: 0.86rem;
}

/* ==================== PDF EXPORT BUTTON & MODAL ==================== */
.header-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-pdf-header {
  border: none;
  background: var(--accent);
  color: #FFFDF8;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.48rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(200, 90, 50, 0.25);
  transition: background 0.15s ease, transform 0.12s ease;
  white-space: nowrap;
}

.btn-pdf-header:hover {
  background: #B14B26;
  transform: translateY(-1px);
}

.pdf-modal-sheet {
  max-width: 620px;
}

.pdf-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0;
}

.pdf-field-full {
  grid-column: 1 / -1;
}

.pdf-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.pdf-input {
  width: 100%;
  padding: 0.52rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  background: var(--surface);
  color: var(--text);
}

.pdf-input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.pdf-checklist-wrap {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.95rem;
  margin-bottom: 1rem;
}

.pdf-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.pdf-check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.86rem;
  color: var(--text);
  cursor: pointer;
  padding: 0.2rem 0.3rem;
  border-radius: 6px;
}

.pdf-check-item:hover {
  background: rgba(45, 90, 61, 0.06);
}

.pdf-check-item input[type="checkbox"] {
  margin-top: 0.2rem;
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.pdf-status-banner {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.95rem;
}

.pdf-status-banner.success {
  background: #E6F3E8;
  color: #21532B;
  border: 1px solid #B6D8BC;
}

.pdf-status-banner.error {
  background: #FDECE8;
  color: #962E1F;
  border: 1px solid #EBC0B8;
}

.pdf-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.site-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 960px) {
  .bed-workspace,
  .mixed-workspace {
    grid-template-columns: 1fr;
  }
  .bed-size-selector,
  .capacity-compare-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .care-3col,
  .quick-ref-strip,
  .mixed-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .header-inner {
    padding: 0.7rem 0.9rem;
  }
  .mini-timeline {
    grid-template-columns: repeat(6, 1fr);
  }
  .modal-sheet {
    padding: 1.15rem;
  }
  .pdf-form-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== PRINT STYLES ==================== */
@media print {
  .site-header,
  .filter-bar,
  .mode-switch,
  .bed-controls-card,
  .canvas-actions,
  .site-footer {
    display: none !important;
  }
  body {
    background: #FFFFFF;
  }
  .bed-workspace,
  .mixed-workspace {
    grid-template-columns: 1fr;
  }
  .bed-canvas-card {
    border: none;
    box-shadow: none;
    padding: 0;
  }
}
