/* Free beekeeping calculators (sugar syrup, mite wash, winter feed). Uses the site's colors from
   style.css. Nothing here scrolls sideways: fields, pills and rows wrap or stack at any width. */
:root { --calc-focus: var(--green); --calc-ok: #2e7d32; --calc-watch: #b36b00; --calc-high: #c0392b; }
:root[data-theme="dark"] { --calc-focus: var(--green-light); --calc-ok: #7fc58a; --calc-watch: #f0b44c; --calc-high: #e0675a; }

.calc-page { padding: 20px 0 48px; }
.calc-wrap { max-width: 760px; margin: 0 auto; }
.calc-crumbs { font-size: 0.85rem; color: var(--muted); margin: 0 0 14px; }
.calc-crumbs a { color: inherit; }
.calc-page h1 { text-align: center; margin-bottom: 8px; }
.calc-intro { text-align: center; color: var(--muted); margin: 0 auto 26px; max-width: 600px; }
.calc-page h2 { font-size: 1.3rem; margin: 34px 0 10px; }
.calc-page p, .calc-page li { overflow-wrap: anywhere; }
.calc-page a { color: var(--green); font-weight: 600; }
:root[data-theme="dark"] .calc-page a { color: var(--green-light); }
.calc-page .btn { color: var(--white); }

.calc-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px; box-shadow: var(--shadow); }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 16px; }
.calc-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.calc-field > label, .calc-field > legend { display: block; padding: 0; margin: 0 0 6px; font-weight: 600; font-size: 0.9rem; color: var(--heading); }
.calc-hint { display: block; margin-top: 5px; font-size: 0.8rem; color: var(--muted); }
.calc-inline { display: flex; gap: 8px; }
.calc-inline .calc-input:first-child { flex: 1 1 100px; min-width: 0; }
.calc-input { width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
select.calc-input { width: auto; flex: 0 0 auto; }
.calc-input:focus-visible { outline: 3px solid var(--calc-focus); outline-offset: 1px; }

.calc-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.calc-pill { position: relative; }
.calc-pill input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.calc-pill span { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 88px; min-height: 48px; padding: 6px 16px; border: 2px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 700; text-align: center; }
.calc-pill small { font-weight: 500; font-size: 0.72rem; color: var(--muted); }
.calc-pill input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.calc-pill input:checked + span small { color: #e3eee4; }
.calc-pill input:focus-visible + span { outline: 3px solid var(--calc-focus); outline-offset: 2px; }

.calc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.calc-chip { min-height: 40px; padding: 6px 14px; border: 2px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.calc-chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.calc-chip:focus-visible { outline: 3px solid var(--calc-focus); outline-offset: 2px; }

.calc-result { margin-top: 20px; padding: 16px 18px; border: 1px solid var(--border); border-left: 6px solid var(--green); border-radius: 12px; background: var(--surface-2); }
.calc-result.is-ok { border-left-color: var(--calc-ok); }
.calc-result.is-watch { border-left-color: var(--calc-watch); }
.calc-result.is-high { border-left-color: var(--calc-high); }
.calc-big { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.7rem, 7vw, 2.3rem); line-height: 1.15; color: var(--heading); }
.calc-big small { font-size: 0.9rem; font-family: inherit; color: var(--muted); }
.calc-verdict { margin: 8px 0 4px; font-weight: 700; color: var(--heading); }
.is-ok .calc-verdict { color: var(--calc-ok); }
.is-watch .calc-verdict { color: var(--calc-watch); }
.is-high .calc-verdict { color: var(--calc-high); }
.calc-result p { margin: 6px 0 0; }
.calc-note { font-size: 0.85rem; color: var(--muted); }

.calc-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.calc-line:last-of-type { border-bottom: 0; }
.calc-line-name { flex: 0 0 4.5rem; font-weight: 600; color: var(--muted); }
.calc-line-main { font-family: Georgia, "Times New Roman", serif; font-size: 1.5rem; color: var(--heading); }
.calc-line-alt { color: var(--muted); font-size: 0.9rem; }

.calc-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.calc-list li { padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.calc-list strong { color: var(--heading); }

.calc-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.calc-table th, .calc-table td { padding: 9px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.calc-table th { color: var(--heading); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
@media (max-width: 560px) {
  .calc-table thead { display: none; }
  .calc-table, .calc-table tbody, .calc-table tr, .calc-table td { display: block; width: 100%; }
  .calc-table tr { padding: 8px 0; border-bottom: 1px solid var(--border); }
  .calc-table td { border: 0; padding: 3px 4px; }
  .calc-table td[data-label]::before { content: attr(data-label) ": "; font-weight: 700; color: var(--heading); }
  .calc-table td:first-child { font-weight: 700; color: var(--heading); }
  .calc-table td:first-child::before { content: none; }
}

.calc-steps { padding-left: 22px; margin: 0; }
.calc-steps li { margin-bottom: 6px; }
.calc-sources { padding-left: 20px; font-size: 0.9rem; color: var(--muted); }
.calc-sources li { margin-bottom: 6px; }

.calc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.calc-tile { display: flex; flex-direction: column; gap: 8px; padding: 22px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); text-decoration: none; color: var(--text); }
.calc-page .calc-tile { font-weight: 400; color: var(--text); }
.calc-tile:hover { border-color: var(--green); }
.calc-tile h2, .calc-tile h3 { margin: 0; font-size: 1.2rem; }
.calc-tile p { margin: 0; color: var(--muted); font-size: 0.92rem; flex: 1; }
.calc-tile-go { font-weight: 700; color: var(--green); }
:root[data-theme="dark"] .calc-tile-go { color: var(--green-light); }
.calc-icon { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--green); color: #fff; }
.calc-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.calc-more { margin-top: 34px; }
.calc-more h2 { margin-top: 0; }

.calc-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 34px; padding: 18px 20px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; }
.calc-cta img { width: 64px; height: 64px; border-radius: 14px; flex: 0 0 auto; }
.calc-cta div { flex: 1 1 220px; min-width: 0; }
.calc-cta h2 { margin: 0 0 4px; font-size: 1.15rem; }
.calc-cta p { margin: 0 0 10px; color: var(--muted); font-size: 0.92rem; }
.calc-disclaimer { margin-top: 28px; font-size: 0.8rem; color: var(--muted-2); }
