/* ============================================================
   PlantMapper — Best Egg Laying Breeds (Chickens silo)
   Pairs with plantmapper.css + ecosystem.css + garden-images.css.
   Uses the same warm hen-and-straw theme as the rest of the
   Chickens silo (body.theme-chicken), then adds the components
   this page needs: photo-led breed profile cards, a scrollable
   breed comparison table, egg-colour swatches, a seasonal laying
   strip and category recommendation cards.
   Does not modify any shared stylesheet.
   ============================================================ */

/* ---- warm hen-and-straw theme (matches chicken-coops.css) ---- */
body.theme-chicken {
  --rose:      #B06A3E;   /* warm hen terracotta accent            */
  --rose-deep: #8A4F2E;   /* deep russet — text, icons, rules      */
  --rose-soft: #F6E7DA;   /* pale straw wash                       */
  --bg-cream:  #F6EFE6;   /* warm straw cream                      */
  background:
    radial-gradient(1200px 660px at 84% -12%, #f3e6d6 0%, transparent 58%),
    radial-gradient(960px 560px at -8% 2%, #eef0df 0%, transparent 56%),
    var(--bg);
}

/* ============================================================
   BREED PROFILE CARDS
   Photo-led cards, one per breed. Same fixed-ratio, centre-cropped
   photo treatment as the other hubs so every card crops identically
   on desktop, tablet and mobile. Photographs only — no illustration,
   motif or overlay of any kind sits on a breed photo.
   ============================================================ */
.breed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 18px;
}
.breed-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .25s ease;
}
.breed-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }

/* Photo well. Deliberately has NO decorative motif, illustration or
   overlay of any kind — just a soft tint that is visible only while the
   photograph is still loading. The photograph itself is an
   <img class="card-photo"> (z-index 2, from plantmapper.css), inserted
   either by photos.js or inline in the markup, and nothing is ever
   painted over it except the small egg-colour badge below. */
.breed-photo {
  position: relative;
  height: 194px;
  overflow: hidden;
  background: linear-gradient(155deg, var(--rose-soft), var(--green-soft));
}

/* HARD GUARD — belt and braces.
   A decorative hen-and-straw motif used to be painted here via ::before and
   showed through on top of the hybrid photographs. Nothing may ever draw a
   pseudo-element inside a breed photo well again, whatever another
   stylesheet tries to do. Photographs only. */
.breed-photo::before,
.breed-photo::after,
.breed-photo img.card-photo::before,
.breed-photo img.card-photo::after { content: none !important; display: none !important; }
.breed-photo img.card-photo { z-index: 2; }

/* egg-colour badge — the only element allowed above the photograph,
   hence z-index 3 (the photo sits at 2) */
.breed-egg {
  position: absolute;
  right: 10px; top: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 7px;
  border-radius: 999px;
  background: rgba(250, 247, 239, .86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(60, 45, 30, .16);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--rose-deep);
}
.breed-egg i {
  width: 13px; height: 17px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  border: 1px solid rgba(90, 70, 50, .35);
  display: block;
  flex: none;
}

.breed-body { padding: 17px 19px 19px; display: flex; flex-direction: column; flex: 1; }
.breed-body h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.14rem;
}
.breed-body .breed-latin {
  margin: 2px 0 10px;
  font-size: .78rem;
  color: var(--muted);
}
.breed-body > p { margin: 0 0 12px; font-size: .88rem; color: var(--ink-soft); }

/* the little stat table inside each card */
.breed-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 12px;
  margin: 0 0 12px;
  font-size: .82rem;
}
.breed-facts dt { color: var(--muted); font-weight: 600; }
.breed-facts dd { margin: 0; color: var(--ink); }

/* pros & cons */
.breed-pc { display: grid; gap: 8px; margin: 0 0 12px; }
.breed-pc p { margin: 0; font-size: .83rem; color: var(--ink-soft); line-height: 1.5; }
.breed-pc p span {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 15px; height: 15px;
  border-radius: 50%;
  margin-right: 7px;
  font-size: .62rem;
  font-weight: 800;
  vertical-align: -2px;
}
.breed-pc .pc-pro span { background: var(--green-soft); color: var(--green-deep); }
.breed-pc .pc-con span { background: #f3ddd0; color: #8a4f2e; }

.breed-fact-note {
  margin: 0 0 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--bg-cream);
  font-size: .8rem;
  color: var(--ink-soft);
}
.breed-fact-note b { color: var(--rose-deep); }

.breed-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.breed-tag {
  font-size: .69rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--rose-soft);
  color: var(--rose-deep);
}
.breed-tag.is-easy { background: var(--green-soft); color: var(--green-deep); }
.breed-tag.is-key  { background: #f0ddc7; color: #8a4f2e; }

/* ============================================================
   BREED COMPARISON TABLE
   Wide 9-column table. Scrolls horizontally on small screens
   with a soft fade hint, rather than squashing or wrapping.
   ============================================================ */
.table-scroll {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elev);
}
.table-scroll::-webkit-scrollbar { height: 9px; }
.table-scroll::-webkit-scrollbar-thumb { background: #d9cdbd; border-radius: 999px; }
.table-scroll::-webkit-scrollbar-track { background: transparent; }

.breed-table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  font-size: .86rem;
}
.breed-table th, .breed-table td {
  text-align: left;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.breed-table thead th {
  position: sticky; top: 0;
  background: var(--rose-soft);
  color: var(--rose-deep);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  /* headings wrap onto two lines so the nine columns fit a desktop
     container without horizontal scrolling; the min-width below is the
     fallback that turns on scrolling for tablets and phones */
  white-space: normal;
  line-height: 1.25;
}
.breed-table thead th:first-child { white-space: nowrap; }
.breed-table tbody tr:nth-child(even) { background: rgba(246, 239, 230, .55); }
.breed-table tbody tr:hover { background: var(--rose-soft); }
.breed-table tbody tr:last-child td { border-bottom: 0; }
.breed-table td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }
.breed-table td:first-child a { color: var(--rose-deep); text-decoration: none; border-bottom: 1px solid rgba(176,106,62,.35); }
.breed-table td:first-child a:hover { border-bottom-color: var(--rose); }
.breed-table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.breed-table .yn {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}
.breed-table .yn.y  { background: var(--green-soft); color: var(--green-deep); }
.breed-table .yn.m  { background: #f6ecd8; color: #8a6a2e; }
.breed-table .yn.n  { background: #f3ddd0; color: #8a4f2e; }
.breed-table .note  { color: var(--ink-soft); font-size: .82rem; }
.table-hint {
  margin: 8px 0 0;
  font-size: .78rem;
  color: var(--muted);
}
.table-hint svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 5px; }

/* ============================================================
   EGG COLOUR SWATCHES
   ============================================================ */
.egg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(184px, 1fr));
  gap: 14px;
}
.egg-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px 18px;
  box-shadow: var(--shadow-1);
  text-align: center;
  transition: transform .18s ease, box-shadow .25s ease;
}
.egg-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.egg-shape {
  width: 54px; height: 70px;
  margin: 0 auto 12px;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  border: 1px solid rgba(90, 70, 50, .22);
  box-shadow: inset -7px -9px 16px rgba(90, 70, 50, .13), 0 3px 9px rgba(90, 70, 50, .12);
}
.egg-card h3 {
  margin: 0 0 5px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.02rem;
}
.egg-card p { margin: 0 0 9px; font-size: .84rem; color: var(--ink-soft); }
.egg-card .egg-breeds {
  display: block;
  font-size: .74rem;
  font-weight: 600;
  color: var(--rose-deep);
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

/* ============================================================
   SEASONAL LAYING STRIP (infographic)
   ============================================================ */
.season-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.season-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 19px;
  box-shadow: var(--shadow-1);
}
.season-head { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.season-head span {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
}
.season-head span svg { width: 17px; height: 17px; }
.season-card h3 { margin: 0; font-family: var(--font-serif); font-weight: 600; font-size: 1.06rem; }
.season-card.s-spring .season-head span { background: #e4efdb; color: #4d6a37; }
.season-card.s-summer .season-head span { background: #fbeecd; color: #8a6a2e; }
.season-card.s-autumn .season-head span { background: #f6e0cf; color: #8a4f2e; }
.season-card.s-winter .season-head span { background: #dde8ef; color: #3f5c72; }

.season-meter { margin: 12px 0 10px; }
.season-bar {
  height: 9px;
  border-radius: 999px;
  background: var(--bg-cream);
  overflow: hidden;
}
.season-bar i { display: block; height: 100%; border-radius: 999px; }
.season-card.s-spring .season-bar i { background: linear-gradient(90deg, #7d9a5e, #5e7152); }
.season-card.s-summer .season-bar i { background: linear-gradient(90deg, #e0b458, #c99036); }
.season-card.s-autumn .season-bar i { background: linear-gradient(90deg, #d0864f, #a75f31); }
.season-card.s-winter .season-bar i { background: linear-gradient(90deg, #7f9cb2, #5c7c94); }
.season-pct {
  display: flex; justify-content: space-between;
  margin-top: 6px;
  font-size: .74rem;
  font-weight: 700;
  color: var(--rose-deep);
}
.season-pct em { font-style: normal; color: var(--muted); font-weight: 600; }
.season-card p { margin: 0 0 8px; font-size: .86rem; color: var(--ink-soft); }
.season-card ul { margin: 0; padding-left: 17px; font-size: .84rem; color: var(--ink-soft); }
.season-card li { margin-bottom: 5px; }

/* ============================================================
   CATEGORY PICK CARDS ("best for…")
   ============================================================ */
.pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 15px;
}
.pick-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 19px 20px;
  box-shadow: var(--shadow-1);
  transition: transform .18s ease, box-shadow .25s ease, border-color .2s ease;
}
.pick-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--rose); }
.pick-head { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.pick-head span {
  width: 32px; height: 32px;
  flex: none;
  border-radius: 10px;
  background: var(--rose-soft);
  color: var(--rose-deep);
  display: inline-flex; align-items: center; justify-content: center;
}
.pick-head span svg { width: 18px; height: 18px; }
.pick-card h3 { margin: 0; font-family: var(--font-serif); font-weight: 600; font-size: 1.05rem; }
.pick-card > p { margin: 0 0 11px; font-size: .86rem; color: var(--ink-soft); }
.pick-list { list-style: none; margin: 0; padding: 0; }
.pick-list li {
  display: flex;
  gap: 9px;
  align-items: baseline;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: .85rem;
  color: var(--ink-soft);
}
.pick-list li b { color: var(--ink); font-weight: 600; flex: none; }
.pick-rank {
  flex: none;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--rose-soft);
  color: var(--rose-deep);
  font-size: .64rem;
  font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  align-self: center;
}

/* ============================================================
   SHARED COMPONENTS reused from the Chickens silo
   (scheme cards, link cards, callout, cost table) — kept
   identical to chicken-coops.css so the silo reads as one set.
   ============================================================ */
.scheme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.scheme {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 21px;
  box-shadow: var(--shadow-1);
}
.scheme h3 { margin: 0 0 3px; font-family: var(--font-serif); font-weight: 600; font-size: 1.12rem; }
.scheme .scheme-meta {
  font-size: .74rem; font-weight: 600; letter-spacing: .02em;
  text-transform: uppercase; color: var(--rose-deep); margin: 0 0 11px;
}
.scheme ul { margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: .9rem; }
.scheme li { margin-bottom: 6px; }
.scheme li b { color: var(--ink); font-weight: 600; }
.scheme .scheme-note {
  margin: 12px 0 0; padding-top: 11px;
  border-top: 1px solid var(--line);
  font-size: .86rem; color: var(--ink-soft);
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.link-card {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 17px;
  text-decoration: none;
  box-shadow: var(--shadow-1);
  transition: transform .18s ease, box-shadow .25s ease, border-color .2s ease;
}
.link-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--rose); }
.link-card .lc-ic { width: 26px; height: 26px; color: var(--rose-deep); margin-bottom: 4px; }
.link-card .lc-ic svg { display: block; width: 100%; height: 100%; }
.link-card .lc-name { font-family: var(--font-serif); font-weight: 600; font-size: 1rem; color: var(--ink); }
.link-card .lc-desc { font-size: .84rem; color: var(--ink-soft); }
.link-card .lc-go { font-size: .82rem; font-weight: 600; color: var(--rose-deep); margin-top: 2px; }
.link-card .lc-soon {
  font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--earth); background: var(--bg-cream);
  border-radius: 999px; padding: 2px 8px; align-self: flex-start; margin-top: 2px;
}

.callout-tip {
  background: var(--rose-soft);
  border-left: 3px solid var(--rose);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 15px 20px;
}
.callout-tip p { margin: 0; font-size: .92rem; color: var(--ink-soft); }
.callout-tip p strong, .callout-tip p b { color: var(--rose-deep); font-weight: 600; }

.cost-table {
  width: 100%; border-collapse: collapse; margin: 8px 0 4px;
  font-size: .92rem; background: var(--bg-elev);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.cost-table th, .cost-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.cost-table thead th {
  background: var(--rose-soft); color: var(--rose-deep); font-weight: 700;
  font-size: .8rem; letter-spacing: .03em; text-transform: uppercase;
}
.cost-table td:last-child, .cost-table th:last-child { text-align: right; }
.cost-table tr:last-child td { border-bottom: 0; }
.cost-table tfoot td { font-weight: 700; color: var(--ink); background: var(--bg-cream); }

/* ---- narrow-phone hero guard ----
   .eco-hero--photo .eco-hero-inner uses a `1fr` track, whose automatic
   minimum is min-content. The hero disclaimer is a flex row of inline
   links, so on a page with several of them its min-content width can
   exceed a small phone viewport and stretch the whole hero panel.
   minmax(0,1fr) caps the track, and letting the disclaimer wrap keeps
   the text inside the frosted panel. Scoped to this page only. */
.eco-hero--photo .eco-hero-inner { grid-template-columns: minmax(0, 1fr); }
.eco-hero--photo .eco-hero-inner > div { max-width: min(528px, 100%); }
.eco-hero--photo .disclaimer { flex-wrap: wrap; }

/* ---- FAQ / disclosure notes use <h3> here for a correct H1–H4
        outline, so mirror the shared .compliance .note h4 styling
        exactly — the notes look identical to every other page. ---- */
.compliance .note h3 {
  margin: 0 0 5px;
  font-size: .84rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--rose-deep);
  font-family: inherit;
  font-weight: 700;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
  .breed-grid { grid-template-columns: 1fr; }
  .breed-photo { height: 208px; }
  .egg-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .breed-table { font-size: .82rem; }
  .breed-table th, .breed-table td { padding: 9px 11px; }
}
@media (max-width: 480px) {
  .egg-grid { grid-template-columns: 1fr 1fr; }
  .egg-shape { width: 46px; height: 60px; }
  .pick-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .breed-card, .egg-card, .pick-card, .link-card { transition: none; }
  .breed-card:hover, .egg-card:hover, .pick-card:hover, .link-card:hover { transform: none; }
}
