/* ===== DESIGN TOKENS ===== */
:root {
  --green:        #2e7d32;
  --green-mid:    #388e3c;
  --green-soft:   #e8f5e9;
  --green-glow:   rgba(46,125,50,.14);
  --red:          #c62828;
  --red-mid:      #d32f2f;
  --red-soft:     #ffebee;
  --red-glow:     rgba(198,40,40,.12);

  --bg:           #f7f8f5;
  --bg2:          #ffffff;
  --surface:      #ffffff;
  --surface2:     #f0f2ed;
  --ink:          #1a2318;
  --ink-2:        #4a5548;
  --ink-3:        #7a8878;
  --border:       #dde2d9;
  --border-focus: var(--green-mid);

  --header-from:  #1b5e20;
  --header-to:    #2e7d32;

  --radius-card:  18px;
  --radius-input: 16px;
  --radius-badge: 999px;
  --shadow-xs:    0 1px 3px rgba(26,45,30,.06);
  --shadow-md:    0 4px 16px rgba(26,45,30,.09), 0 1px 4px rgba(26,45,30,.06);
  --shadow-card:  0 2px 8px rgba(26,45,30,.07), 0 1px 2px rgba(26,45,30,.05);
  --transition:   .18s cubic-bezier(.4,0,.2,1);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --green:        #66bb6a;
    --green-mid:    #81c784;
    --green-soft:   #1b3320;
    --green-glow:   rgba(102,187,106,.15);
    --red:          #ef9a9a;
    --red-mid:      #e57373;
    --red-soft:     #2d1515;
    --red-glow:     rgba(239,154,154,.12);

    --bg:           #121712;
    --bg2:          #181e17;
    --surface:      #1e2620;
    --surface2:     #242d22;
    --ink:          #e8ede6;
    --ink-2:        #b0bba9;
    --ink-3:        #788570;
    --border:       #2e3a2b;
    --border-focus: var(--green-mid);

    --header-from:  #0a1a0d;
    --header-to:    #1b3320;

    --shadow-xs:    0 1px 3px rgba(0,0,0,.3);
    --shadow-md:    0 4px 16px rgba(0,0,0,.4), 0 1px 4px rgba(0,0,0,.25);
    --shadow-card:  0 2px 8px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.25);
  }
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ===== HEADER / HERO ===== */
.site-header {
  background: linear-gradient(155deg, var(--header-from) 0%, var(--header-to) 100%);
  padding: 0;
  position: relative;
  overflow: hidden;
}

/* Decorative leaf-blob shapes */
.site-header::before,
.site-header::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: .07;
  background: #fff;
  pointer-events: none;
}
.site-header::before {
  width: 320px; height: 320px;
  top: -120px; right: -80px;
}
.site-header::after {
  width: 200px; height: 200px;
  bottom: -80px; left: -40px;
}

.header-inner {
  max-width: 740px;
  margin: 0 auto;
  padding: 28px 20px 26px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 1;
}

/* ===== BUNNY SVG ===== */
.bunny {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.22));
  will-change: transform;
}
.bunny svg { width: 100%; height: 100%; display: block; overflow: visible; }

.header-text { flex: 1 1 auto; min-width: 0; }

.header-text h1 {
  margin: 0 0 4px;
  font-size: clamp(1.35rem, 4vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,.18);
}

.subtitle {
  margin: 0;
  font-size: clamp(.82rem, 2.2vw, .96rem);
  color: rgba(255,255,255,.75);
  font-weight: 400;
  line-height: 1.4;
}

/* ===== SHARED NAV ===== */
.site-nav {
  display: flex;
  gap: 4px;
  padding: 0 20px 10px;
  max-width: 740px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.nav-link {
  font-size: .82rem;
  font-weight: 600;
  color: rgba(255,255,255,.72);
  text-decoration: none;
  padding: 5px 14px;
  border-radius: var(--radius-badge);
  transition: background var(--transition), color var(--transition);
  border: 1px solid transparent;
}
.nav-link:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.nav-link--active {
  background: rgba(255,255,255,.18);
  color: #fff;
  border-color: rgba(255,255,255,.2);
}
.nav-link:focus-visible {
  outline: 2px solid rgba(255,255,255,.7);
  outline-offset: 2px;
}

/* ===== MAIN LAYOUT ===== */
main {
  flex: 1 1 auto;
  max-width: 740px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 20px 12px;
}

/* ===== SEARCH BOX ===== */
.search-wrap {
  position: relative;
  margin-bottom: 16px;
}

.search-icon {
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--ink-3);
  pointer-events: none;
  transition: color var(--transition);
}

#search {
  display: block;
  width: 100%;
  padding: 16px 16px 16px 50px;
  font-size: 1.05rem;
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-input);
  outline: none;
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
}
#search::placeholder { color: var(--ink-3); }
#search:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--green-glow), var(--shadow-md);
}
.search-wrap:focus-within .search-icon { color: var(--green-mid); }

/* Clear button on search */
#search::-webkit-search-cancel-button { display: none; }

/* ===== STATUS LINE ===== */
.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 28px;
  margin-bottom: 4px;
}

#status {
  font-size: .875rem;
  color: var(--ink-2);
  flex: 1 1 auto;
  min-width: 0;
}

/* ===== META CHIPS ===== */
.meta-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: var(--radius-badge);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-2);
  box-shadow: var(--shadow-xs);
  white-space: nowrap;
}
.chip-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.chip-dot.green { background: var(--green-mid); }
.chip-dot.red   { background: var(--red-mid); }
.chip-dot.gray  { background: var(--ink-3); }

/* ===== RESULTS LIST ===== */
.results {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ===== EMPTY / LOADING STATES ===== */
.state-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 52px 20px;
  gap: 12px;
  color: var(--ink-3);
}
.state-block .state-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 4px;
}
.state-block .state-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink-2);
  margin: 0;
}
.state-block .state-hint {
  font-size: .875rem;
  margin: 0;
  max-width: 340px;
  line-height: 1.55;
}
.state-block.error .state-icon  { filter: grayscale(.4); }
.state-block.empty .state-icon  { }

/* Spinner */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--green-mid);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== CARDS ===== */
.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  animation: card-in .36s cubic-bezier(.2,.8,.3,1) both;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Left accent bar */
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  border-radius: var(--radius-card) 0 0 var(--radius-card);
}
.card.allowed::before { background: linear-gradient(180deg, #43a047, #2e7d32); }
.card.poison::before  { background: linear-gradient(180deg, #ef5350, #c62828); }

/* Subtle background tint */
.card.allowed { background: linear-gradient(110deg, var(--green-soft) 0%, var(--surface) 55%); }
.card.poison  { background: linear-gradient(110deg, var(--red-soft)   0%, var(--surface) 55%); }
@media (prefers-color-scheme: dark) {
  .card.allowed { background: linear-gradient(110deg, var(--green-soft) 0%, var(--surface) 55%); }
  .card.poison  { background: linear-gradient(110deg, var(--red-soft)   0%, var(--surface) 55%); }
}

/* Card name row */
.card-name {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
  padding-left: 10px;
}
.plant-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
  line-height: 1.3;
}

/* Status badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 3px 10px 3px 8px;
  border-radius: var(--radius-badge);
  line-height: 1.4;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge.allowed {
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid rgba(46,125,50,.25);
}
.badge.poison {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid rgba(198,40,40,.22);
}
.badge-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.badge.allowed .badge-dot { background: var(--green); }
.badge.poison  .badge-dot { background: var(--red); }

/* Card body */
.card-body {
  padding-left: 10px;
}
.card .comment {
  font-size: .9rem;
  color: var(--ink-2);
  margin: 0 0 6px;
  line-height: 1.5;
}
.card .family {
  font-size: .8rem;
  color: var(--ink-3);
  margin: 0 0 6px;
  font-style: italic;
}
.card .wiki {
  margin: 4px 0 0;
}
.card .wiki a {
  font-size: .82rem;
  font-weight: 600;
  color: var(--green-mid);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: color var(--transition);
}
.card .wiki a:hover { color: var(--green); text-decoration: underline; }
.card .wiki a:focus-visible {
  outline: 2px solid var(--green-mid);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== FOOTER ===== */
footer {
  max-width: 740px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 20px 32px;
}

.footer-inner {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.disclaimer {
  font-size: .82rem;
  color: var(--ink-2);
  margin: 0;
  line-height: 1.5;
}
.disclaimer strong {
  color: var(--ink);
  font-weight: 700;
}

.footer-meta {
  font-size: .78rem;
  color: var(--ink-3);
  margin: 0;
}

/* ===== ANIMATIONS ===== */
@keyframes card-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Bunny ears idle + reactive wiggle */
.bunny-ears   { transform-box: fill-box; transform-origin: 60px 60px; }
.ear-left     { transform-box: fill-box; transform-origin: 44px 60px; }
.ear-right    { transform-box: fill-box; transform-origin: 76px 60px; }
.bunny.typing .ear-left  { animation: ear-wiggle-l .5s ease-in-out; }
.bunny.typing .ear-right { animation: ear-wiggle-r .5s ease-in-out .04s; }
@keyframes ear-wiggle-l { 0%,100%{transform:rotate(0)} 35%{transform:rotate(-11deg)} 70%{transform:rotate(4deg)} }
@keyframes ear-wiggle-r { 0%,100%{transform:rotate(0)} 35%{transform:rotate(11deg)}  70%{transform:rotate(-4deg)} }

/* Bunny mood */
.bunny.happy { animation: bunny-hop .55s ease; }
@keyframes bunny-hop { 0%,100%{transform:translateY(0)} 30%{transform:translateY(-8px)} 60%{transform:translateY(0)} }
.bunny.sad .ear-left  { animation: droop-l .5s ease forwards; }
.bunny.sad .ear-right { animation: droop-r .5s ease forwards; }
@keyframes droop-l { to { transform: rotate(20deg); } }
@keyframes droop-r { to { transform: rotate(-20deg); } }

/* Blink */
.bunny-eyes { animation: blink 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes blink { 0%,92%,100%{transform:scaleY(1)} 95%{transform:scaleY(.1)} }

/* Pulse for loading */
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }

/* ===== ACCESSIBILITY ===== */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .bunny, .bunny *,
  .bunny-eyes,
  .spinner { animation: none !important; transition: none !important; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .header-inner { padding: 20px 16px; gap: 14px; }
  .bunny { width: 58px; height: 58px; }
  main { padding: 20px 14px 8px; }
  footer { padding: 12px 14px 28px; }
  #search { padding: 14px 14px 14px 46px; font-size: 1rem; }
  .card { padding: 13px 14px; border-radius: 14px; }
  .site-nav { padding: 0 14px 8px; }
}

/* ===== TABLES PAGE ===== */
.tables-main {
  flex: 1 1 auto;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 16px;
}

.tables-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-wrap {
  position: relative;
  flex: 1 1 260px;
  min-width: 0;
}
.filter-wrap .search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--ink-3);
  pointer-events: none;
}
#filter {
  display: block;
  width: 100%;
  padding: 11px 14px 11px 44px;
  font-size: .95rem;
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-input);
  outline: none;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
}
#filter::placeholder { color: var(--ink-3); }
#filter:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--green-glow), var(--shadow-xs);
}
#filter::-webkit-search-cancel-button { display: none; }

.btn-sheet {
  display: inline-block;
  padding: 10px 18px;
  font-size: .88rem;
  font-weight: 700;
  color: #fff;
  background: var(--green);
  border-radius: var(--radius-badge);
  text-decoration: none;
  transition: background var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-xs);
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-sheet:hover { background: var(--green-mid); box-shadow: var(--shadow-md); }
.btn-sheet:focus-visible { outline: 2px solid var(--green-mid); outline-offset: 3px; }

.plant-section {
  margin-bottom: 32px;
}
.section-heading {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.section-heading--allowed { color: var(--green); border-color: var(--green-mid); }
.section-heading--poison  { color: var(--red);   border-color: var(--red-mid);   }
.section-count { font-weight: 500; font-size: .9em; opacity: .75; }

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

.plant-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  background: var(--surface);
}
.plant-table thead {
  background: var(--surface2);
}
.plant-table th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--ink-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.plant-table td {
  padding: 9px 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}
.plant-table tr:last-child td { border-bottom: none; }
.plant-table tbody tr:hover { background: var(--surface2); }

.plant-name-cell { font-weight: 600; min-width: 160px; }
.wiki-cell { white-space: nowrap; }
.wiki-cell a {
  font-size: .82rem;
  font-weight: 600;
  color: var(--green-mid);
  text-decoration: none;
  transition: color var(--transition);
}
.wiki-cell a:hover { color: var(--green); text-decoration: underline; }
.wiki-cell a:focus-visible { outline: 2px solid var(--green-mid); outline-offset: 2px; border-radius: 3px; }
.no-wiki { color: var(--ink-3); }

.table-empty {
  text-align: center;
  color: var(--ink-3);
  padding: 24px;
  font-style: italic;
}

@media (max-width: 600px) {
  .tables-main { padding: 16px 14px 12px; }
  .tables-toolbar { flex-direction: column; align-items: stretch; }
  /* In a column flex, flex-basis maps to height — reset it so the filter box
     keeps its natural height (otherwise the search icon floats in a tall gap). */
  .filter-wrap { flex: 0 0 auto; }
  .plant-table th,
  .plant-table td { padding: 8px 10px; }
}

/* ===== HISTORY PAGE ===== */
.history-main {
  flex: 1 1 auto;
  max-width: 740px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 16px;
}

.history-intro {
  font-size: .92rem;
  color: var(--ink-2);
  margin: 0 0 24px;
  line-height: 1.6;
  border-left: 3px solid var(--green-mid);
  padding-left: 14px;
}

.history-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.history-date {
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 10px;
  letter-spacing: .01em;
}

.history-label {
  display: inline-block;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 3px 10px;
  border-radius: var(--radius-badge);
  margin-bottom: 8px;
}
.history-label--initial {
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid rgba(46,125,50,.2);
}

.history-summary {
  font-size: .9rem;
  color: var(--ink-2);
  margin: 0;
}

.history-group {
  margin-bottom: 12px;
}
.history-group:last-child { margin-bottom: 0; }

.history-group-title {
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.history-group--added   .history-group-title { color: var(--green); }
.history-group--removed .history-group-title { color: var(--red); }
.history-group--changed .history-group-title { color: #b8860b; }
@media (prefers-color-scheme: dark) {
  .history-group--changed .history-group-title { color: #d4a843; }
}

.history-name-list {
  list-style: none;
  margin: 0;
  padding: 0 0 0 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.history-name-list li {
  font-size: .88rem;
  color: var(--ink-2);
}

.plant-allowed { color: var(--green); font-weight: 600; }
.plant-poison  { color: var(--red);   font-weight: 600; }

.changed-fields {
  font-size: .78rem;
  color: var(--ink-3);
  font-style: italic;
}

@media (max-width: 480px) {
  .history-main { padding: 16px 14px 12px; }
  .history-card { padding: 14px 14px; }
}

/* ===== REFERENCE TABLES (calcium, vitamin C) on /tables ===== */
.reference-content { margin-top: 28px; }
.ref-group-title {
  font-size: 1.15rem;
  margin: 8px 0 4px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--ink);
}
.ref-section { margin-top: 18px; }
.ref-note {
  font-size: .85rem;
  color: var(--ink-2);
  margin: 4px 0 10px;
  line-height: 1.45;
}
.ref-footnotes {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: .82rem;
  color: var(--ink-2);
}
.ref-footnotes li { margin: 2px 0; }
.ref-table th:first-child,
.ref-table td:first-child { white-space: nowrap; }

/* ===== Colour-code the РАЗРЕШЕНО (green) and ЯДОВИТО (red) tables ===== */
.section-heading { border-bottom-width: 3px; }

.plant-section--allowed .plant-table thead { background: var(--green-soft); }
.plant-section--allowed .plant-table th    { color: var(--green); }

.plant-section--poison  .plant-table thead { background: var(--red-soft); }
.plant-section--poison  .plant-table th    { color: var(--red); }

/* Вики links inside the poison table read red, not green */
.plant-section--poison .wiki-cell a        { color: var(--red-mid); }
.plant-section--poison .wiki-cell a:hover  { color: var(--red); }

/* Whole-table colour identity: red frame for ЯДОВИТО, green for РАЗРЕШЕНО */
.plant-section--poison .table-wrap {
  border: 1px solid var(--red-mid);
  border-left: 5px solid var(--red-mid);
}
.plant-section--poison .plant-table td { border-bottom-color: var(--red-glow); }
.plant-section--poison .plant-table tbody tr:hover { background: var(--red-soft); }

.plant-section--allowed .table-wrap {
  border: 1px solid var(--green-mid);
  border-left: 5px solid var(--green-mid);
}
.plant-section--allowed .plant-table td { border-bottom-color: var(--green-glow); }
.plant-section--allowed .plant-table tbody tr:hover { background: var(--green-soft); }

/* Full colour wash over the WHOLE table body (not just the frame) */
.plant-section--poison  .plant-table { background: var(--red-soft); }
.plant-section--allowed .plant-table { background: var(--green-soft); }
/* Header a touch stronger so it still stands out against the washed body */
.plant-section--poison  .plant-table thead {
  background: color-mix(in srgb, var(--red-mid) 24%, var(--red-soft));
}
.plant-section--allowed .plant-table thead {
  background: color-mix(in srgb, var(--green-mid) 24%, var(--green-soft));
}
.plant-section--poison  .plant-table tbody tr:hover {
  background: color-mix(in srgb, var(--red-mid) 16%, var(--red-soft));
}
.plant-section--allowed .plant-table tbody tr:hover {
  background: color-mix(in srgb, var(--green-mid) 16%, var(--green-soft));
}

/* ===== Tabs on the /tables page ===== */
.table-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.table-tabs::-webkit-scrollbar { display: none; }
.ttab {
  flex: 0 0 auto;
  font-family: var(--font);
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-badge);
  padding: 7px 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.ttab:hover { border-color: var(--green-mid); color: var(--ink); }
.ttab--active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.ttab:focus-visible { outline: 2px solid var(--green-mid); outline-offset: 2px; }

/* ===== INFO / USEFUL RESOURCES PAGE ===== */
.info-main {
  flex: 1 1 auto;
  max-width: 740px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 20px 12px;
}
.info-intro { color: var(--ink-2); font-size: .95rem; margin: 0 0 18px; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { margin: 0 0 14px; }
.info-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--green-mid);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.info-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-left-color: var(--green); }
.info-card:focus-visible { outline: 2px solid var(--green-mid); outline-offset: 2px; }
.info-card-head { display: flex; align-items: center; gap: 10px; }
.info-title { font-weight: 700; font-size: 1.05rem; color: var(--green); flex: 1 1 auto; }
.info-lang {
  flex: 0 0 auto;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: var(--radius-badge);
  background: var(--surface2);
  color: var(--ink-2);
  border: 1px solid var(--border);
}
.info-source { margin: 4px 0 0; font-size: .78rem; color: var(--ink-3); }
.info-desc { margin: 8px 0 0; font-size: .92rem; color: var(--ink); line-height: 1.5; }
