/* Справочники: удобрения и культуры */
.ref-main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 22px 0 64px; }
.breadcrumbs { display: flex; gap: 9px; color: var(--muted); font-size: 13px; font-weight: 700; }
.breadcrumbs a { color: var(--brand); }
.ref-heading { padding: 30px 0 22px; }
.ref-heading h1 { margin: 0; color: var(--brand-dark); font-size: clamp(30px, 4vw, 42px); line-height: 1.08; }
.ref-heading p:last-child { max-width: 780px; margin: 14px 0 0; color: var(--muted); font-size: 17px; line-height: 1.6; }
.ref-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.ref-toc a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border: 1px solid #b9ccc1; border-radius: 999px; background: var(--surface); color: var(--brand); font-size: 13px; font-weight: 700; }
.ref-toc a:hover { background: var(--brand-soft); }
.ref-section { margin: 0 0 36px; scroll-margin-top: 100px; }
.ref-section h2 { margin: 0 0 12px; color: var(--brand-dark); font-size: 26px; }
.ref-section h3 { margin: 22px 0 8px; color: var(--brand-dark); font-size: 17px; }
.ref-section > p { max-width: 820px; margin: 0 0 14px; color: var(--muted); line-height: 1.6; }
.ref-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ref-card { min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 18px 20px 16px; box-shadow: 0 6px 20px rgba(20, 52, 43, 0.04); }
.ref-card h3 { margin: 0 0 4px; font-size: 18px; color: var(--brand-dark); }
.ref-card__formula { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.ref-card__formula b { color: var(--brand); }
.ref-card__facts { display: grid; gap: 6px; margin: 0; }
.ref-card__facts div { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 10px; border-bottom: 1px dotted #d9e3dc; padding: 4px 0; font-size: 13px; }
.ref-card__facts dt { color: var(--muted); }
.ref-card__facts dd { margin: 0; color: var(--ink); font-weight: 600; }
.ref-card__tip { margin: 12px 0 0; color: #2b4a3f; font-size: 13.5px; line-height: 1.55; }
.table-wrap { overflow-x: auto; }
.ref-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.ref-table th, .ref-table td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top; }
.ref-table th { background: #edf3ef; color: #3a594e; font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; }
.ref-note { margin: 24px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.ad-slot { display: none; margin: 18px 0; }
.ad-slot--active { display: block; min-height: 90px; }
.ad-slot--active::before { content: "Реклама"; display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
@media (max-width: 980px) { .ref-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .ref-main { width: min(100% - 28px, 1180px); } .ref-grid { grid-template-columns: 1fr; } .ref-card__facts div { grid-template-columns: 1fr; gap: 2px; } }

/* Каталог культур */
.ref-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 22px; }
.ref-summary a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.ref-summary a:hover { background: var(--brand-soft); }
.ref-summary b { color: var(--brand); font-size: 22px; line-height: 1; }
.ref-summary span { color: var(--muted); font-size: 12.5px; }
.ref-parent { margin: 26px 0 0; }
.ref-parent h2 { margin: 0 0 4px; font-size: 22px; padding-top: 8px; border-top: 2px solid var(--brand-soft); }
.ref-parent h3 { scroll-margin-top: 100px; }
.ref-parent > p, .ref-parent h3 + p { margin: 0 0 10px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.ref-count { display: inline-block; min-width: 22px; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 12px; text-align: center; vertical-align: middle; }
.ref-latin { color: var(--muted); font-size: 12px; }
.ref-dim { color: var(--muted); font-size: 12px; }
.ref-badge { display: inline-block; margin: 4px 4px 0 0; padding: 1px 7px; border-radius: 999px; background: #fbf1d8; color: var(--accent-dark); font-size: 11px; font-weight: 700; }
.ref-badge:hover { background: var(--accent); color: #fff; }
.ref-table--catalog { min-width: 960px; }
.ref-table--catalog td:first-child { min-width: 170px; }
.ref-table--catalog .ref-row td:nth-child(3), .ref-table--catalog .ref-row td:nth-child(5), .ref-table--catalog .ref-row td:nth-child(7) { white-space: nowrap; }
.ref-crop-link { color: var(--brand-dark); }
.ref-crop-link:hover b { text-decoration: underline; }
.ref-btn { display: inline-block; padding: 5px 11px; border: 1px solid #b9ccc1; border-radius: 999px; color: var(--brand); font-size: 12px; font-weight: 700; white-space: nowrap; }
.ref-btn:hover { background: var(--brand-soft); }
/* Карточка культуры */
.crop-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 0 0 8px; }
.crop-facts div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.crop-facts dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.crop-facts dd { margin: 4px 0 0; color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.4; }
.crop-facts dd a { color: var(--brand); }
.crop-bio { display: grid; gap: 0; margin: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.crop-bio div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.55; }
.crop-bio div:last-child { border-bottom: 0; }
.crop-bio dt { color: var(--muted); font-weight: 700; }
.crop-bio dd { margin: 0; color: #2b4a3f; }
.crop-phases { min-width: 900px; }
.crop-phases td:nth-child(2), .crop-phases td:nth-child(3) { white-space: nowrap; font-weight: 600; color: var(--brand-dark); }
.crop-phases td:nth-child(4), .crop-phases td:nth-child(5) { font-size: 12.5px; line-height: 1.5; }
.crop-phase-note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; }
#rotation p { max-width: 820px; margin: 0 0 8px; color: #2b4a3f; line-height: 1.6; }
.crop-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin: 30px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); font-weight: 700; }
.crop-nav a { color: var(--brand); }
.crop-siblings { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.crop-siblings a { color: var(--brand); }
@media (max-width: 640px) { .crop-bio div { grid-template-columns: 1fr; gap: 3px; } }

/* Животные */
.ref-table--animals { min-width: 900px; table-layout: fixed; }
.ref-table--animals th:nth-child(1) { width: 19%; } .ref-table--animals th:nth-child(3) { width: 27%; } .ref-table--animals th:nth-child(9) { width: 90px; }
.ref-table--animals td:nth-child(3) { font-size: 12.5px; line-height: 1.45; }
.ref-table--animals td { overflow-wrap: break-word; }
.ref-table--animals .ref-row td:nth-child(3), .ref-table--animals .ref-row td:nth-child(5), .ref-table--animals .ref-row td:nth-child(7) { white-space: normal; }
.crop-product { margin: 12px 0 0; color: #2b4a3f; font-size: 15px; line-height: 1.6; }
.crop-note { max-width: 820px; margin: 0; padding: 14px 18px; border-left: 4px solid var(--accent); border-radius: 8px; background: #fbf8ef; color: #2b4a3f; line-height: 1.6; }
.animal-phases { table-layout: fixed; }
.animal-phases th:nth-child(1) { width: 16%; } .animal-phases th:nth-child(2) { width: 90px; }
.animal-phases td:nth-child(3) { white-space: normal; font-weight: 400; color: #2b4a3f; font-size: 12.5px; line-height: 1.5; }
.animal-phases td { overflow-wrap: break-word; }

/* Почвы */
.ref-table--soils { table-layout: fixed; min-width: 900px; }
.ref-table--soils th:nth-child(1) { width: 21%; } .ref-table--soils th:nth-child(6) { width: 16%; } .ref-table--soils th:nth-child(7) { width: 12%; } .ref-table--soils th:nth-child(9) { width: 90px; }
.ref-table--soils td { overflow-wrap: break-word; }
.ref-table--soils .ref-row td:nth-child(3), .ref-table--soils .ref-row td:nth-child(5), .ref-table--soils .ref-row td:nth-child(7) { white-space: normal; }
.soil-profile { table-layout: fixed; }
.soil-profile th:nth-child(1) { width: 18%; } .soil-profile th:nth-child(2) { width: 18%; }
.soil-profile td:first-child b { color: var(--brand-dark); }
