/* Lora (headings) and Golos Text (body), OFL, self-hosted: Cyrillic and Latin only; build.ts copies the files */
@font-face {
  font-family: "Golos Text Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url(/assets/fonts/golos-text-cyrillic-wght-normal.woff2)
    format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Golos Text Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url(/assets/fonts/golos-text-latin-wght-normal.woff2)
    format("woff2-variations");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Lora Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(/assets/fonts/lora-cyrillic-wght-normal.woff2)
    format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Lora Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(/assets/fonts/lora-latin-wght-normal.woff2)
    format("woff2-variations");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

:root {
  --green: #2e8b47;
  --yellow: #c98a00;
  --red: #c8423b;
  --unknown: #8a8f98;
  --ink: #1f2a22;
  --muted: #5f6b63;
  --paper: #fbfaf6;
  --line: #e2e0d8;
  --accent: #2f6f3e;
  --font-body:
    "Golos Text Variable", system-ui, -apple-system, "Segoe UI", Roboto,
    sans-serif;
  --font-head: "Lora Variable", Georgia, "Times New Roman", serif;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

a {
  color: var(--accent);
}

.top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  /* stays at the top while scrolling; sticky keeps it in flow, so content needs no offset */
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 1px 6px rgb(0 0 0 / 0.06);
}

.brand {
  font-family: var(--font-head);
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.top nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.top nav a {
  text-decoration: none;
}

.top nav a.current {
  font-weight: 700;
  color: var(--ink);
}

.menu-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

/* three bars drawn by one span and its pseudo-elements; they turn into a cross when open */
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  position: absolute;
  left: 10px;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: var(--ink);
  transition:
    transform 0.15s,
    top 0.15s,
    opacity 0.15s;
}

.menu-toggle span {
  top: 19px;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  left: 0;
}

.menu-toggle span::before {
  top: -6px;
}

.menu-toggle span::after {
  top: 6px;
}

.menu-toggle[aria-expanded="true"] span {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] span::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span::after {
  top: 0;
  transform: rotate(-45deg);
}

@media (max-width: 640px) {
  .top.collapsible .menu-toggle {
    display: block;
  }

  .top.collapsible nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 4px 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 6px 12px rgb(0 0 0 / 0.08);
  }

  .top.collapsible.open nav {
    display: flex;
  }

  .top.collapsible nav a {
    padding: 12px 16px;
  }

  .top.collapsible nav a + a {
    border-top: 1px solid var(--line);
  }

  .top.collapsible nav a.current {
    box-shadow: inset 4px 0 0 var(--accent);
    background: #f3f7f1;
  }
}

.crumbs,
main,
.bottom {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px;
}

.crumbs {
  font-size: 0.85em;
  color: var(--muted);
  padding-top: 12px;
}

h1,
h2 {
  font-family: var(--font-head);
  font-weight: 600;
}

h2.status-badge {
  font-family: var(--font-body);
}

/* section labels: a badge or caption with its count */
h3 {
  font-family: var(--font-body);
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

button,
input {
  font-family: inherit;
}

h1 {
  font-size: 1.7em;
  line-height: 1.25;
  margin: 16px 0 12px;
}

h2 {
  font-size: 1.25em;
  margin: 28px 0 10px;
}

h3 {
  font-size: 1.05em;
  margin: 16px 0 6px;
}

.latin {
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.7em;
}

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

.small {
  font-size: 0.85em;
}

.verdict {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

.verdict p {
  margin: 10px 0;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.8em;
  font-weight: 600;
  vertical-align: middle;
}

.badge-green {
  background: var(--green);
}

.badge-yellow {
  background: var(--yellow);
}

.badge-red {
  background: var(--red);
}

.badge-unknown {
  background: var(--unknown);
}

.share {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  background: #eceae2;
  max-width: 320px;
}

.share-green {
  background: var(--green);
}

.share-yellow {
  background: var(--yellow);
}

.share-red {
  background: var(--red);
}

.button {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.note {
  background: #fff6e0;
  border-left: 4px solid var(--yellow);
  padding: 8px 12px;
  border-radius: 6px;
}

.facts {
  margin: 0;
  background: #fff;
  border-radius: 10px;
  padding: 4px 12px;
  border: 1px solid var(--line);
}

.facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}

.facts div:last-child {
  border-bottom: 0;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
  text-align: right;
}

.factors,
.advice,
.cultivars,
.species-list,
.columns {
  list-style: none;
  padding: 0;
  margin: 0;
}

.factor {
  border-left: 4px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 8px 12px;
  margin: 8px 0;
}

.factor p {
  margin: 4px 0 0;
}

.factor-yellow {
  border-left-color: var(--yellow);
}

.factor-red {
  border-left-color: var(--red);
}

.advice li {
  position: relative;
  padding-left: 14px;
  margin: 8px 0;
}

.advice li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.cultivars li,
.species-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.species-list .share {
  flex: 1 1 160px;
}

.species-list .muted,
.cultivars .muted {
  font-size: 0.85em;
}

.columns {
  columns: 3 220px;
  column-gap: 24px;
}

.columns li {
  break-inside: avoid;
  padding: 3px 0;
}

.see-also {
  border-top: 1px solid var(--line);
  margin-top: 28px;
}

/* Ad slots reserve their height so content does not shift when an ad loads. */
.ad {
  margin: 24px 0;
  min-height: 250px;
}

.ad-bottom {
  min-height: 300px;
}

.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    45deg,
    #efede6,
    #efede6 10px,
    #e7e4db 10px,
    #e7e4db 20px
  );
  color: var(--muted);
  border-radius: 10px;
  font-size: 0.85em;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.bottom {
  margin-top: 40px;
  padding-top: 16px;
  padding-bottom: 32px;
  border-top: 1px solid var(--line);
  font-size: 0.85em;
  color: var(--muted);
}

.cookie {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding: 12px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  font-size: 0.9em;
  z-index: 10;
}

/* display: flex above would otherwise override the hidden attribute */
.cookie[hidden] {
  display: none;
}

.cookie a {
  color: #cfe8d3;
}

.cookie button {
  margin-left: auto;
  padding: 6px 14px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.legal p {
  max-width: 70ch;
}

@media (min-width: 720px) {
  .cultivars {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    column-gap: 24px;
  }
}

.region-group {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.region-group h2 {
  font-size: 1.05em;
  margin: 4px 0;
}

.region-group p {
  margin: 2px 0 4px;
  font-size: 0.92em;
}
