/* Livestock site "Hayvancılık aydınlatması" (Faz 2 plan §3.1–§3.2). Owner: package S. Loaded on every livestock page
   after site.css and hub.css (layout.mjs), before the page's own stylesheet. Ported from the prototype's
   hayvancilik/site.css with live class names: the shell (header, Applications menu, footer), the shared parts of
   src/pages/livestock/parts.mjs (24-hour rings, day-length window, status line, evidence labels, "Bu sayfada",
   table toggle, tool cards, development block, related pages, veterinarian line). The site's gold stays in the
   drawings (decision 17), never as text colour. */

[data-site='livestock'] { --site-accent: #e0b84a; --site-accent-line: #e0b84a; --site-accent-soft: rgba(224, 184, 74, 0.18); --ls-gold: #e0b84a; --ls-gold-soft: rgba(224, 184, 74, 0.42); }

/* ---------- Header: five items; the menu button takes over below the measured widths (TR/EN and FR apart) ---------- */
@media (max-width: 1520px) { [data-site='livestock'] .site-header .wrap { gap: 14px; } [data-site='livestock'] .site-header .nav { gap: 4px; } [data-site='livestock'] .site-header .nav > ul { margin-right: 4px; } [data-site='livestock'] .site-header .nav .nav-link { padding: 0 8px; font-size: 0.88rem; } }
html[lang='fr-CA'][data-site='livestock'] .site-header .wrap { gap: 14px; }
html[lang='fr-CA'][data-site='livestock'] .site-header .nav { gap: 4px; }
html[lang='fr-CA'][data-site='livestock'] .site-header .nav > ul { margin-right: 4px; }
html[lang='fr-CA'][data-site='livestock'] .site-header .nav .nav-link { padding: 0 8px; font-size: 0.88rem; }
@media (max-width: 1180px) { [data-site='livestock'] .nav { display: none; } [data-site='livestock'] .site-header .menu-btn, [data-site='livestock'] .lang-m { display: inline-flex; } }
@media (max-width: 1360px) { html[lang='fr-CA'][data-site='livestock'] .nav { display: none; } html[lang='fr-CA'][data-site='livestock'] .site-header .menu-btn, html[lang='fr-CA'][data-site='livestock'] .lang-m { display: inline-flex; } }
@media (max-width: 560px) {
  [data-site='livestock'] .site-header .wrap { gap: 10px; }
  [data-site='livestock'] .site-header .brand img { height: 32px; }
  [data-site='livestock'] .lang-m a { min-width: 30px; padding: 0 5px; }
  [data-site='livestock'] .lang-m + .menu-btn { margin-left: -2px; }
}
@media (max-width: 380px) { [data-site='livestock'] .site-header .brand img { height: 28px; } [data-site='livestock'] .lang-m a { min-width: 27px; padding: 0 4px; font-size: 0.74rem; } }

/* "Uygulamalar ▾": two columns (Kanatlı · Sığır, koyun ve keçi) and the UV-B page as a full-width row */
.subnav.ls-subnav { width: 620px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ls-subnav > li.sn-wide { grid-column: 1 / -1; margin-top: 6px; padding-top: 6px; border-top: 1px solid #e6ece8; }

/* Footer: brand block and three columns */
.foot-grid.foot-livestock { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); }
@media (max-width: 980px) { .foot-grid.foot-livestock { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Drawings (inline SVG, class "chart") ---------- */
.chart .hv-track { fill: none; stroke: #10231c; }
.chart .hv-edge { fill: none; stroke: rgba(255, 255, 255, 0.14); stroke-width: 1; }
.chart .hv-lit { fill: none; stroke: var(--ls-gold); stroke-linecap: butt; }
.chart .hv-ramp { fill: none; stroke: var(--ls-gold); stroke-opacity: 0.42; }
.chart .hv-dark-win { fill: none; stroke: var(--lemon, #d8f36a); stroke-dasharray: 3 3; }
.chart .hv-nat { fill: none; stroke: #5f8a7a; }
.chart .hv-tick { stroke: #8fa59c; stroke-width: 1.2; }
.chart .hv-hr { fill: #8fa59c; font-size: 10.5px; font-weight: 650; }
.chart .hv-now line { stroke: var(--lemon, #d8f36a); stroke-width: 2; stroke-linecap: round; }
.chart .hv-now circle { fill: var(--lemon, #d8f36a); stroke: #0a1813; stroke-width: 2; }
.chart .hv-day { fill: #5f8a7a; }
.chart .hv-add { fill: var(--ls-gold); }
.chart .hv-ref { fill: none; stroke: #8fa59c; stroke-width: 1.2; stroke-dasharray: 4 4; }
.chart .hv-ref:not(.is-limit) { stroke: var(--ls-gold); }
.chart .g { stroke: rgba(255, 255, 255, 0.08); stroke-width: 1; }
.chart .ax { fill: #8fa59c; font-size: 11px; font-weight: 600; }
.chart .val { fill: #fff; font-size: 11px; font-weight: 750; }
.chart .lbl { fill: #c9d8d1; font-size: 11px; font-weight: 650; }
.chart.is-m :is(.lbl, .ax, .val) { font-size: 12px; }

/* 24-hour rings */
.hv-rings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 10px; margin: 4px 0 0; padding: 6px 0 2px; }
.hv-ring { margin: 0; display: grid; justify-items: center; align-content: start; gap: 8px; min-width: 0; }
.hv-ring-in { position: relative; width: 100%; max-width: 160px; aspect-ratio: 140 / 160; }
.hv-ring-in > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hv-ring-c { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; pointer-events: none; }
.hv-ring-c b { font-size: clamp(0.98rem, 1.35vw, 1.22rem); font-weight: 750; letter-spacing: -0.02em; line-height: 1.1; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hv-ring-c small { display: block; max-width: 11ch; margin-top: 3px; font-size: 0.6rem; line-height: 1.25; color: #a9bbb3; }
.hv-ring figcaption { margin: 0; max-width: 15ch; text-align: center; font-size: 0.78rem; font-weight: 600; line-height: 1.3; color: #c9d8d1; }
.hv-now { opacity: 0; transition: opacity 0.5s var(--ease); }
.hv-now.is-set { opacity: 1; }
.hv-now-t { font-weight: 750; color: #fff; font-variant-numeric: tabular-nums; }
.app-window .legend .k-lit { --k: var(--ls-gold); }
.app-window .legend .k-day { --k: #5f8a7a; }
.app-window .legend .k.dash::before { height: 0; border-top: 2px dashed var(--k, var(--ls-gold)); background: none; border-radius: 0; }
.app-window .legend .k-limit { --k: #8fa59c; }
@media (prefers-reduced-motion: no-preference) { .hv-draw .hv-lit { animation: hv-draw 1.1s var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms + 260ms); } }
@keyframes hv-draw { from { stroke-dasharray: 0 400; } }
@media (max-width: 1180px) and (min-width: 901px) { .hv-rings { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hv-ring-in { max-width: 140px; } }
@media (max-width: 640px) { .hv-rings { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; } .hv-ring-in { max-width: 148px; } }

/* Day-length window: latitude tabs, KPIs, bars (desktop and phone drawings), readout, table */
.hv-model-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-bottom: 18px; }
.hv-model-top .pill-tabs { flex: none; }
.hv-model-top .legend { margin: 0; }
.hv-kpis { margin-bottom: 4px; }
.hv-kpis dd { font-size: clamp(1.15rem, 1.7vw, 1.5rem); white-space: normal; }
.hv-kpis dd small.hv-kp-note { display: block; margin: 3px 0 0; font-size: 0.68rem; }
.ls-daylength .chart { display: block; width: 100%; height: auto; }
.ls-daylength .chart.is-m { display: none; }
@media (max-width: 640px) { .ls-daylength .chart.is-d { display: none; } .ls-daylength .chart.is-m { display: block; } }
.hv-mo { cursor: pointer; outline: none; }
.hv-mo .hv-hit { fill: transparent; }
.hv-mo .sel { fill: rgba(216, 243, 106, 0.07); opacity: 0; transition: opacity 0.2s var(--ease); }
.hv-mo.is-sel .sel { opacity: 1; }
.hv-mo .hv-mo-l { fill: #8a9b93; font-size: 11px; font-weight: 650; }
.hv-mo.is-sel .hv-mo-l { fill: var(--lemon, #d8f36a); font-weight: 800; }
.hv-mo:hover .hv-day { fill: #6f9d8b; }
.hv-mo:focus-visible .hv-hit { stroke: var(--lemon, #d8f36a); stroke-width: 1.5; }
.chart.is-m .hv-mo .hv-mo-l { font-size: 12px; }
.hv-readout { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); font-size: 0.86rem; color: #c9d8d1; }
.hv-readout b { color: #fff; font-weight: 750; font-variant-numeric: tabular-nums; }
.hv-readout .hv-rm { color: var(--lemon, #d8f36a); font-weight: 800; }
@media (max-width: 640px) {
  .hv-kpis { grid-template-columns: 1fr; gap: 12px; }
  .hv-kpis > div { padding: 0 0 12px; border-left: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
  .hv-kpis > div:last-child { border-bottom: 0; padding-bottom: 0; }
  .hv-model-top .pill-tabs { width: 100%; }
  .hv-model-top .pill-tabs button { flex: 1 1 0; }
}

/* Table toggle ("Tablo olarak göster") and the table it opens */
.ls-table-btn { display: inline-flex; align-items: center; min-height: 40px; margin-top: 14px; padding: 0 14px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.22); background: transparent; color: inherit; font: inherit; font-size: 0.84rem; font-weight: 700; cursor: pointer; }
.section:not(.surface) .ls-table-btn:not(.app-window *) { border-color: var(--line-2); }
.ls-table-btn:hover { border-color: var(--lemon, #d8f36a); }
.ls-table-btn:focus-visible { outline: 2px solid var(--lemon, #d8f36a); outline-offset: 2px; }
.ls-table { margin-top: 12px; }
.app-window .ls-table { background: #fff; color: var(--fg); }
.ls-table caption { padding: 10px 16px; text-align: left; font-size: 0.8rem; color: var(--fg-2); caption-side: top; }
.ls-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Text blocks ---------- */
.hv-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 20px 0 0; font-size: 0.9rem; color: var(--fg-2); }
.page-hero .hv-status, .surface .hv-status { color: #c9d8d1; }
.hv-status > span:first-child { font-weight: 650; }
.ls-vet { margin: 18px 0 0; padding-left: 14px; border-left: 3px solid var(--ls-gold); font-size: 0.92rem; line-height: 1.5; color: var(--fg-2); }
.surface .ls-vet, .app-window .ls-vet { color: #c9d8d1; }

/* Evidence labels: the five classes of the live site (Tahmin added; no Demonstration badge here) */
.tag.ev.forecast { background: rgba(43, 140, 196, 0.12); color: #1d6f9c; border-color: rgba(43, 140, 196, 0.3); }
.aw-badge.ev-forecast { color: #9fd3f0; }

/* "Bu sayfada" strip */
.jump.ls-jump { position: relative; border-top: 1px solid rgba(255, 255, 255, 0.1); background: rgba(7, 18, 15, 0.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.ls-jump ul { display: flex; gap: 4px 28px; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.ls-jump ul::-webkit-scrollbar { display: none; }
.ls-jump li { scroll-snap-align: start; }
.ls-jump a { display: inline-flex; align-items: center; min-height: 52px; white-space: nowrap; color: #b9cac2; font-size: 0.86rem; font-weight: 650; text-decoration: none; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s; }
.ls-jump a:hover, .ls-jump a:focus-visible, .ls-jump a[aria-current='true'] { color: #fff; border-bottom-color: var(--lemon, #d8f36a); }

/* Tool cards */
.ls-tools { margin-top: clamp(40px, 5vw, 64px); }
.ls-tools > .h3 { margin-bottom: 16px; }
.cap-grid.ls-caps { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
@media (max-width: 1180px) { .cap-grid.ls-caps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .cap-grid.ls-caps { grid-template-columns: 1fr; } }
.section.surface .cap-grid.ls-caps .cap { background: var(--ink-2); }

/* Development block */
.dev-cards { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.dev-card { display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 20px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); }
.dev-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dev-card h3 { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.dev-card p { margin: 0; color: var(--fg-2); font-size: 0.92rem; line-height: 1.5; }
@media (max-width: 980px) { .dev-cards { --cols: 2 !important; } }
@media (max-width: 620px) { .dev-cards { --cols: 1 !important; } }
.dev-card .ls-dev-links { margin-top: 10px; font-size: 0.86rem; }
.ls-dev-links-k { display: block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-3, var(--fg-2)); }
.ls-road-title { margin: clamp(32px, 4vw, 48px) 0 0; }
.ls-road-title + .ls-road { margin-top: 16px; }
.ls-road { list-style: none; counter-reset: road; margin: clamp(32px, 4vw, 48px) 0 0; padding: 0; display: grid; gap: 18px; }
.ls-road li { counter-increment: road; position: relative; padding-left: 44px; }
.ls-road li::before { content: counter(road); position: absolute; left: 0; top: 0; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--chip, #e6f2ec); color: var(--chip-fg, #075c41); font-size: 0.84rem; font-weight: 800; }
.ls-road h3 { margin: 4px 0 4px; font-size: 1.02rem; }
.ls-road p { margin: 0; color: var(--fg-2); }
.hv-scale-wrap { margin-top: clamp(40px, 5vw, 60px); }
.status-scale li.is-here { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); color: var(--fg); font-weight: 650; }
.status-note { margin: 14px 0 0; font-size: 0.9rem; color: var(--fg-2); }

/* Related pages and areas */
.ls-related, .ls-areas { margin-top: clamp(36px, 4vw, 56px); }
.ls-related > .h3, .ls-areas > .h3 { margin-bottom: 16px; }
.rel-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 12px; }
.rel-link { position: relative; display: grid; align-items: center; height: 100%; padding: 16px 64px 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); color: var(--fg); text-decoration: none; transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease); }
.rel-link.is-plain { padding-right: 18px; }
a.rel-link:hover { color: var(--fg); border-color: rgba(8, 128, 90, 0.45); box-shadow: var(--shadow); transform: translateY(-2px); }
.rel-txt { display: grid; gap: 3px; min-width: 0; }
.rel-k { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--eyebrow, var(--fg-3)); }
.rel-link strong { font-size: 1.06rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.rel-t { color: var(--fg-2); font-size: 0.9rem; line-height: 1.5; }
.rel-go { position: absolute; right: 16px; top: 50%; width: 34px; height: 34px; margin-top: -17px; display: grid; place-items: center; border-radius: 9px; background: var(--chip, #e6f2ec); color: var(--chip-fg, #075c41); transition: background-color 0.25s, color 0.25s; }
.rel-go svg { width: 16px; height: 16px; }
a.rel-link:hover .rel-go { background: var(--brand); color: #fff; }
@media (max-width: 560px) { .rel-link { padding: 14px 52px 14px 14px; } .rel-go { right: 12px; width: 30px; height: 30px; margin-top: -15px; } }

/* Draft page of a module that has not arrived (src/pages/livestock/index.mjs) */
.ls-stub .section p { max-width: 62ch; color: var(--fg-2); }

/* Long CTA labels (e.g. FR « Système d’éclairage en poulailler et en étable ») wrap on narrow screens
   instead of spilling past the viewport (review, 30.11.2026). */
@media (max-width: 520px) {
  .btn-row .btn { white-space: normal; max-width: 100%; text-align: center; }
}
