/* Heritage Fields Farm — the Bee Hives page (/bees). Loaded only there.
   The page is written by wip/bees/build_bees.py (kept with the project files, outside this repo). */

.bee-intro, .bee-fly, .bee-year, .bee-needs, .bee-bloom, .bee-anat, .bee-castes, .bee-jobs, .bee-home {
	--honey: #e9a81d;
	--honey-deep: #a86400;
	--comb: #f8d778;
	--wax: #fdf3d3;
	--b-cold: #8fa9b8;
	--b-build: #7fb069;
	--b-flow: #f0b429;
	--b-dearth: #d9773a;
	--b-fall: #c8922a;
}

/* ---------- Intro ---------- */
.bee-intro { display: grid; gap: clamp(24px, 5vw, 64px); align-items: center; }
@media (min-width: 820px) { .bee-intro { grid-template-columns: 1.25fr 0.75fr; } }
.bee-intro h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.bee-jump { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.bee-jump a { display: block; padding: 9px 18px; border-radius: 999px; background: #fdf3d3; border: 1px solid rgba(168, 100, 0, 0.28); color: #6b4100; font-weight: 600; text-decoration: none; }
.bee-jump a:hover, .bee-jump a:focus-visible { background: #f8d778; color: #4a2c00; }

/* The paintings sit on their own cream paper, like the iris cards. */
.bee-paint { margin: 0; }
.bee-paint img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); background: #fbf1dc; }
.bee-paint figcaption { margin-top: 8px; font-size: 0.82rem; color: var(--muted); text-align: center; }
.bee-paint--tilt { max-width: 400px; margin-inline: auto; transform: rotate(2deg); }
.bee-pair { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: min(100%, 420px); flex: none; }
.bee-pair .bee-paint img { border-radius: var(--radius-sm); }
.bee-pair .bee-paint:nth-child(2) { transform: translateY(-12px); }

.bee-src { font-size: 0.86rem; color: var(--muted); max-width: 86ch; margin: 22px 0 0; }
.section--green .bee-src { color: rgba(238, 241, 230, 0.82); }
.section--green .bee-src a { color: #fff; }

/* ---------- Gaye's notes ---------- */
.bee-gaye-sec { padding-block: clamp(36px, 5vw, 60px); }
.bee-gaye { background: #fdf3d3; border: 1px dashed rgba(168, 100, 0, 0.45); border-radius: calc(var(--radius) + 4px); padding: clamp(22px, 4vw, 40px); position: relative; overflow: hidden; }
.bee-gaye::after {
	content: ""; position: absolute; right: -30px; top: -30px; width: 210px; height: 210px; opacity: 0.5; pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 97'%3E%3Cpath d='M28 1l27 15.600v31.200L28 63.400 1 47.800V16.600zM28 63.400V97M1 47.800l-1 .600M55 47.800l1 .600' fill='none' stroke='%23e9a81d' stroke-width='2'/%3E%3C/svg%3E") 0 0 / 56px 97px;
	-webkit-mask-image: radial-gradient(circle at 70% 30%, #000 20%, transparent 70%); mask-image: radial-gradient(circle at 70% 30%, #000 20%, transparent 70%);
}
.bee-gaye__text { position: relative; z-index: 1; max-width: 70ch; }
.bee-gaye h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-top: 12px; }
.bee-gaye p { margin: 0; }
.bee-gaye blockquote { margin: 0 0 18px; padding: 0 0 0 18px; border-left: 4px solid #e9a81d; font-family: var(--serif); font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.45; color: var(--green-deep); }
.bee-gaye__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0; }
.bee-gaye__facts div { background: #fff; border: 1px solid rgba(168, 100, 0, 0.2); border-radius: var(--radius-sm); padding: 12px 16px; }
.bee-gaye__facts dt { font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: #8a5600; font-weight: 700; }
.bee-gaye__facts dd { margin: 2px 0 0; font-family: var(--serif); font-size: 1.2rem; color: var(--green-deep); line-height: 1.25; }
.bee-gaye.is-sample::before { content: "Sample text, not real"; position: absolute; left: 14px; top: 10px; z-index: 2; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; background: var(--tomato); color: #fff; padding: 2px 10px; border-radius: 999px; }
.bee-gaye.is-sample { padding-top: 46px; }

/* ---------- Flying weather ---------- */
.bee-fly { background: var(--paper); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: clamp(20px, 3.4vw, 38px); box-shadow: var(--shadow); margin-bottom: 26px; }
.bee-fly__now { display: grid; grid-template-columns: auto 1fr; gap: clamp(16px, 3vw, 34px); align-items: center; }
.bee-fly__dial { position: relative; width: clamp(104px, 16vw, 150px); aspect-ratio: 1; }
.bee-fly__dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.bee-fly__dial circle { fill: none; stroke: #efe6cc; stroke-width: 10; }
.bee-fly__dial .bee-fly__arc { stroke: var(--dial, #8fa9b8); stroke-linecap: round; stroke-dasharray: var(--fill, 0) 100; transition: stroke-dasharray 0.8s ease; }
.bee-fly__dial span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: clamp(1.7rem, 3.4vw, 2.5rem); color: var(--green-deep); }
.bee-fly__verdict { margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(1.6rem, 3.6vw, 2.6rem); line-height: 1.1; color: var(--green); }
.bee-fly[data-state="maybe"] .bee-fly__verdict { color: #a86400; }
.bee-fly[data-state="no"] .bee-fly__verdict { color: #4d6676; }
.bee-fly__why { margin: 8px 0 14px; color: var(--muted); max-width: 56ch; }
.bee-fly__stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.bee-fly__stats li { background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 4px 13px; font-size: 0.92rem; }
.bee-fly__stats b { color: var(--green-deep); }
.bee-fly__hours { margin-top: clamp(20px, 3vw, 30px); padding-top: clamp(18px, 2.6vw, 26px); border-top: 1px solid var(--line); }
.bee-fly__hourshead { margin: 0 0 12px; font-weight: 600; color: var(--green-deep); }
.bee-fly__strip { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.bee-fly__strip li { position: relative; height: 46px; border-radius: 6px; background: #c9d6dd; }
.bee-fly__strip li[data-s="go"] { background: #f0b429; }
.bee-fly__strip li[data-s="maybe"] { background: #f8d778; background-image: repeating-linear-gradient(135deg, transparent 0 5px, rgba(255, 255, 255, 0.6) 5px 8px); }
.bee-fly__strip li[data-s="no"][data-dark] { background: #5d7180; }
.bee-fly__strip li span { position: absolute; left: 0; top: calc(100% + 4px); font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.bee-fly__strip li.is-now { outline: 2px solid var(--green-deep); outline-offset: 1px; }
.bee-fly__hours .bee-key { margin-top: 30px; }
@media (max-width: 560px) {
	.bee-fly__now { grid-template-columns: 1fr; justify-items: start; }
	.bee-fly__strip { gap: 2px; }
	.bee-fly__strip li { height: 38px; border-radius: 4px; }
}

.bee-rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 760px) { .bee-rules { grid-template-columns: repeat(3, 1fr); } }
.bee-rules li { background: rgba(255, 255, 255, 0.6); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; }
.bee-rules b { display: block; font-family: var(--serif); font-size: 1.15rem; color: var(--green-deep); }
.bee-rules span { font-size: 0.95rem; color: var(--muted); }

/* ---------- Keys ---------- */
.bee-key { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.86rem; color: var(--muted); }
.bee-key li { display: flex; align-items: center; gap: 7px; }
.bee-key li::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: var(--k, #ccc); flex: none; }
.bee-key--go { --k: #f0b429; } .bee-key--no { --k: #c9d6dd; }
.bee-key--maybe::before { background: #f8d778 repeating-linear-gradient(135deg, transparent 0 4px, rgba(255, 255, 255, 0.7) 4px 6px) !important; }
.bee-key--cold { --k: #8fa9b8; } .bee-key--build { --k: #7fb069; } .bee-key--flow { --k: #f0b429; } .bee-key--dearth { --k: #d9773a; } .bee-key--fall { --k: #c8922a; }
.bee-key--wild { --k: #7fb069; } .bee-key--crop { --k: #e0782f; } .bee-key--iris { --k: #9a7bc4; } .bee-key--main { --k: #f0b429; }
.bee-key--today::before { width: 3px !important; height: 16px !important; border-radius: 2px !important; background: var(--tomato) !important; }
.section--green .bee-key { color: rgba(238, 241, 230, 0.9); }

/* ---------- What's in bloom ---------- */
.bee-now { background: #fdf3d3; border: 1px solid rgba(168, 100, 0, 0.28); border-radius: var(--radius-sm); padding: 12px 18px; margin: 0 0 22px; color: #4a2c00; }
.bee-now b { color: #6b4100; }
.bee-bloom { --namew: clamp(150px, 24vw, 250px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(14px, 2.4vw, 26px); }
.bee-bloom__months, .bee-bloom__row { display: grid; grid-template-columns: var(--namew) 1fr; gap: 0 14px; align-items: center; }
.bee-bloom__mrow { display: grid; grid-template-columns: repeat(12, 1fr); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.bee-bloom__mrow span { text-align: center; }
.bee-bloom__group { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; }
.bee-bloom__row { padding: 5px 0; }
.bee-bloom__name { color: var(--ink); line-height: 1.2; }
.bee-bloom__name b { font-weight: 600; }
.bee-bloom__name small { display: block; font-weight: 400; font-size: 0.8rem; color: var(--muted); }
.bee-bloom__track { position: relative; height: 22px; border-radius: 6px; background: repeating-linear-gradient(90deg, #f6f1e2 0 calc(100% / 12 - 1px), #fff calc(100% / 12 - 1px) calc(100% / 12)); }
.bee-bloom__track i { position: absolute; top: 3px; bottom: 3px; left: calc(var(--a) / 24 * 100%); width: calc((var(--b) - var(--a)) / 24 * 100%); border-radius: 999px; background: #7fb069; }
.bee-bloom__row--crop .bee-bloom__track i { background: #e0782f; }
.bee-bloom__row--iris .bee-bloom__track i { background: #9a7bc4; }
.bee-bloom__row.is-main .bee-bloom__track i { background: #f0b429; top: 1px; bottom: 1px; box-shadow: 0 0 0 2px rgba(240, 180, 41, 0.3); }
.bee-bloom__row.is-on .bee-bloom__name b { color: var(--green); }
.bee-bloom__row.is-on .bee-bloom__name b::after { content: "in bloom"; margin-left: 8px; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; background: var(--green); color: #fff; padding: 2px 8px; border-radius: 999px; vertical-align: 2px; white-space: nowrap; }
.bee-bloom[data-now] .bee-bloom__track::after { content: ""; position: absolute; top: -5px; bottom: -5px; left: calc(var(--now) * 100%); width: 2px; margin-left: -1px; background: var(--tomato); border-radius: 2px; }
@media (max-width: 640px) {
	.bee-bloom__months, .bee-bloom__row { grid-template-columns: 1fr; }
	.bee-bloom__months > span:first-child { display: none; }
	.bee-bloom__mrow { font-size: 0.62rem; letter-spacing: 0; }
	.bee-bloom__name { margin-bottom: 3px; }
	.bee-bloom__name small { display: inline; margin-left: 6px; }
	.bee-pair { width: 100%; }
}

/* ---------- The hive year ---------- */
.bee-year { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (min-width: 900px) { .bee-year { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); } }
.bee-wheel { position: relative; max-width: 500px; width: 100%; margin-inline: auto; }
.bee-wheel__svg { display: block; width: 100%; height: auto; overflow: visible; }
.bee-wheel__rim { fill: rgba(255, 255, 255, 0.05); stroke: rgba(255, 255, 255, 0.2); stroke-dasharray: 2 6; }
.bee-wheel__hit { fill: transparent; }
.bee-wheel__wedge { fill: var(--w); opacity: 0.86; transition: opacity 0.2s, transform 0.2s; transform-origin: 220px 220px; }
.bee-wheel__m { cursor: pointer; }
.bee-wheel__m text { fill: rgba(255, 255, 255, 0.78); font: 600 13px var(--sans); letter-spacing: 0.04em; }
.bee-wheel__m--cold { --w: #8fa9b8; } .bee-wheel__m--build { --w: #7fb069; } .bee-wheel__m--flow { --w: #f0b429; } .bee-wheel__m--dearth { --w: #d9773a; } .bee-wheel__m--fall { --w: #c8922a; }
.bee-wheel__m:hover .bee-wheel__wedge { opacity: 1; }
.bee-wheel__m.is-on .bee-wheel__wedge { opacity: 1; stroke: #fff; stroke-width: 3; }
.bee-wheel__m.is-on text { fill: #fff; font-weight: 800; }
.bee-wheel__m.is-today text { text-decoration: underline; }
.bee-wheel__hub { position: absolute; left: 50%; top: 220px; top: calc(50% * 440 / 440); width: 29%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; overflow: hidden; border: 3px solid rgba(255, 255, 255, 0.85); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3); pointer-events: none; }
.bee-wheel__hub img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.25); }
.bee-wheel .bee-key { justify-content: center; margin-top: 14px; }
/* The hub is centred on the wheel drawing, not on the key underneath it. */
.bee-wheel { display: grid; }
.bee-wheel__svg, .bee-wheel__hub { grid-area: 1 / 1; }
.bee-wheel__hub { position: static; transform: none; place-self: center; }

.bee-year__tabs { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin-bottom: 16px; }
.bee-year__tabs button { font: 600 0.78rem var(--sans); padding: 8px 0; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.08); color: #fff; cursor: pointer; }
.bee-year__tabs button:hover { background: rgba(255, 255, 255, 0.2); }
.bee-year__tabs button[aria-pressed="true"] { background: #fff; color: var(--green-deep); border-color: #fff; }
@media (max-width: 520px) { .bee-year__tabs { grid-template-columns: repeat(6, 1fr); } }
.bee-year__months { display: grid; gap: 14px; }
.bee-month { background: #fffdf6; color: var(--ink); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); border-top: 8px solid var(--w, #ccc); box-shadow: 0 14px 40px -18px rgba(0, 0, 0, 0.5); scroll-margin-top: 110px; }
.bee-month--cold { --w: #8fa9b8; } .bee-month--build { --w: #7fb069; } .bee-month--flow { --w: #f0b429; } .bee-month--dearth { --w: #d9773a; } .bee-month--fall { --w: #c8922a; }
.bee-month__when { margin: 0 0 2px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.section--green .bee-month h3 { color: var(--green); font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin-bottom: 12px; }
.bee-month dl { margin: 0; }
.bee-month dt { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #8a5600; margin-top: 12px; }
.bee-month dd { margin: 2px 0 0; }
.bee-year.is-live .bee-month { display: none; }
.bee-year.is-live .bee-month.is-on { display: block; }
.bee-year.is-live .bee-year__months { min-height: 420px; align-content: start; }
@media (max-width: 899px) { .bee-year.is-live .bee-year__months { min-height: 0; } }

/* ---------- Crops that need bees ---------- */
.bee-needs { display: grid; gap: 18px; }
@media (min-width: 860px) { .bee-needs { grid-template-columns: repeat(3, 1fr); } }
.bee-need { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 2.6vw, 28px); border-top: 8px solid var(--n); }
.bee-need--must { --n: #f0b429; } .bee-need--helps { --n: #7fb069; } .bee-need--none { --n: #b9c3b3; }
.bee-need h3 { font-size: 1.5rem; margin-bottom: 8px; }
.bee-need p { margin: 0 0 16px; color: var(--muted); font-size: 0.98rem; }
.bee-need__crops { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.bee-need__crops a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); font-size: 0.84rem; font-weight: 600; text-align: center; line-height: 1.15; height: 100%; transition: transform 0.15s, box-shadow 0.15s; }
.bee-need__crops a:hover, .bee-need__crops a:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--green); }
.bee-need__crops img { width: 52px; height: 52px; }

/* ---------- Honeycomb of small facts ---------- */
.bee-comb { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 1040px; }
.bee-comb li {
	aspect-ratio: 1 / 1.1547; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
	background: linear-gradient(160deg, #fbe08c, #f0b429); color: #3d2600;
	display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 22% 13%;
}
.bee-comb li:nth-child(even) { background: linear-gradient(160deg, #fdf3d3, #f8d778); }
.bee-comb b { font-family: var(--serif); font-weight: 600; font-size: clamp(1.5rem, 5.4vw, 2.3rem); line-height: 1; color: #4a2c00; }
.bee-comb i { font-style: normal; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 4px; color: #7a4a00; }
.bee-comb span { font-size: clamp(0.76rem, 2.6vw, 0.92rem); line-height: 1.3; margin-top: 8px; }
.bee-comb li:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - 5px); justify-self: center; padding: 11% 6.5%; }
@media (min-width: 620px) and (max-width: 979px) {
	.bee-comb { grid-template-columns: repeat(6, 1fr); max-width: 720px; }
	.bee-comb li { grid-column: span 2; }
	.bee-comb li:nth-child(4) { grid-column: 2 / 4; }
	.bee-comb li:nth-child(n+4):nth-child(-n+5) { margin-top: calc(-9.6% - 2px); }
	.bee-comb li:nth-child(n+6) { margin-top: calc(-9.6% - 2px); }
	.bee-comb li:last-child:nth-child(odd) { grid-column: span 2; width: auto; justify-self: stretch; padding: 22% 13%; }
	.bee-comb li:nth-child(6) { grid-column: 1 / 3; }
	.bee-comb li:nth-child(7) { grid-column: 3 / 5; }
	.bee-comb b { font-size: 1.7rem; } .bee-comb span { font-size: 0.82rem; }
}
@media (min-width: 980px) {
	.bee-comb { grid-template-columns: repeat(8, 1fr); }
	.bee-comb li { grid-column: span 2; }
	.bee-comb li:nth-child(5) { grid-column: 2 / 4; }
	.bee-comb li:nth-child(n+5) { margin-top: calc(-7.2% - 3px); }
	.bee-comb li:last-child:nth-child(odd) { grid-column: span 2; width: auto; justify-self: stretch; padding: 22% 13%; }
	.bee-comb b { font-size: 2.1rem; } .bee-comb span { font-size: 0.9rem; }
}

/* ---------- Helping the bees ---------- */
.bee-help { list-style: none; counter-reset: help; margin: 0 0 clamp(28px, 4vw, 48px); padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.bee-help li { counter-increment: help; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; }
.bee-help li::before { content: counter(help); display: grid; place-items: center; width: 42px; height: 48px; margin-bottom: 12px; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: #4a2c00; background: #f0b429; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.bee-help h3 { font-size: 1.3rem; margin-bottom: 6px; }
.bee-help p { margin: 0; color: var(--muted); font-size: 0.98rem; }
@media (min-width: 860px) { .bee-swarm { grid-template-columns: 1fr auto; } }

@media (prefers-reduced-motion: reduce) { .bee-wheel__wedge, .bee-fly__arc, .bee-need__crops a { transition: none; } }
@media print { .bee-jump, .bee-year__tabs { display: none; } .bee-year.is-live .bee-month { display: block; } }
.section--green .section-head .lede { color: rgba(238, 241, 230, 0.92); }

/* ---------- Shared by the two diagram sections ---------- */
.bee-sub { max-width: 74ch; margin: 0 0 22px; color: var(--muted); font-size: 1.04rem; }
.bee-jobs, .bee-home { margin-top: clamp(40px, 6vw, 72px); }
.bee-jobs > h3, .bee-home > h3 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin-bottom: 8px; }

/* ---------- Who's who: worker, queen, drone ---------- */
.bee-castes { display: grid; gap: 18px; }
@media (min-width: 860px) { .bee-castes { grid-template-columns: repeat(3, 1fr); } }
.bee-caste { background: #fbefd9; border: 1px solid rgba(168, 100, 0, 0.22); border-radius: var(--radius); padding: 0 clamp(18px, 2.4vw, 26px) clamp(20px, 2.6vw, 28px); overflow: hidden; display: grid; grid-template-columns: 1fr; align-content: start; }
.bee-caste img { width: 100%; height: auto; max-width: 340px; justify-self: center; -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%); mask-image: radial-gradient(closest-side, #000 72%, transparent 100%); }
.bee-caste__count { margin: -6px 0 2px; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #8a5600; }
.bee-caste h3 { font-size: clamp(1.6rem, 2.6vw, 2rem); margin-bottom: 6px; }
.bee-caste > p:not(.bee-caste__count) { margin: 0 0 14px; }
.bee-caste dl { margin: 0; border-top: 1px solid rgba(168, 100, 0, 0.22); }
.bee-caste dl div { display: grid; grid-template-columns: 6.2em 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(168, 100, 0, 0.14); font-size: 0.94rem; }
.bee-caste dl div:last-child { border-bottom: 0; padding-bottom: 0; }
.bee-caste dt { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #8a5600; padding-top: 3px; }
.bee-caste dd { margin: 0; }
@media (min-width: 560px) and (max-width: 859px) {
	.bee-caste { grid-template-columns: 200px 1fr; column-gap: 20px; padding-top: 18px; }
	.bee-caste img { grid-row: 1 / span 4; align-self: start; }
	.bee-caste__count { margin-top: 6px; }
}

/* ---------- A worker's jobs by age ---------- */
.bee-jobs { --j-clean: #8fa9b8; --j-nurse: #e58fa0; --j-build: #f0b429; --j-guard: #d9773a; --j-forage: #7fb069; }
.bee-jobs__scale { margin: 0 0 18px; }
.bee-jobs__bar { display: flex; height: 22px; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.bee-jobs__seg { flex: 1 1 0; }
.bee-jobs__seg + .bee-jobs__seg { border-left: 2px solid #fff; }
.bee-jobs__seg--clean, .bee-job--clean { --j: var(--j-clean); } .bee-jobs__seg--nurse, .bee-job--nurse { --j: var(--j-nurse); } .bee-jobs__seg--build, .bee-job--build { --j: var(--j-build); } .bee-jobs__seg--guard, .bee-job--guard { --j: var(--j-guard); } .bee-jobs__seg--forage, .bee-job--forage { --j: var(--j-forage); }
.bee-jobs__seg { background: var(--j); }
.bee-jobs__ticks { position: relative; height: 22px; margin-top: 4px; font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.bee-jobs__ticks span { position: absolute; top: 0; transform: translateX(-50%); }
.bee-jobs__ticks span:first-child { transform: none; } .bee-jobs__ticks span:last-child { transform: translateX(-100%); }
.bee-jobs__unit { margin: 0; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.bee-jobs__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.bee-job { background: var(--paper); border: 1px solid var(--line); border-top: 8px solid var(--j); border-radius: var(--radius-sm); padding: 16px 18px 18px; }
.bee-job__when { margin: 0 0 2px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.bee-job h4 { font-family: var(--serif); font-size: 1.22rem; line-height: 1.2; margin: 0 0 6px; color: var(--green-deep); }
.bee-job p:last-child { margin: 0; font-size: 0.95rem; }
@media (min-width: 1100px) { .bee-jobs__list { grid-template-columns: repeat(5, 1fr); } }

/* ---------- How the home is laid out ---------- */
.bee-home__grid { display: grid; gap: 18px; align-items: start; }
@media (min-width: 900px) { .bee-home__grid { grid-template-columns: 1.55fr 1fr; } }
.bee-frame, .bee-hive { margin: 0; background: #fbefd9; border: 1px solid rgba(168, 100, 0, 0.22); border-radius: var(--radius); padding: clamp(16px, 2.4vw, 26px); }
.bee-frame__svg, .bee-hive__svg { display: block; width: 100%; height: auto; }
.bee-hive__svg { max-width: 300px; margin-inline: auto; }
.bee-frame figcaption, .bee-hive figcaption { margin: 12px 0 14px; font-family: var(--serif); font-size: 1.18rem; color: var(--green-deep); }
.bee-frame__n circle { fill: #fff; stroke: #4a2c00; stroke-width: 2; }
.bee-frame__n text { fill: #4a2c00; }
.bee-nlist { list-style: none; counter-reset: n; margin: 0; padding: 0; display: grid; gap: 9px; }
.bee-nlist li { counter-increment: n; display: grid; grid-template-columns: 26px 1fr; column-gap: 10px; font-size: 0.95rem; }
.bee-nlist li::before { content: counter(n); grid-row: 1 / span 2; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #4a2c00; background: #fff; color: #4a2c00; font-weight: 700; font-size: 0.82rem; display: grid; place-items: center; }
.bee-nlist b { color: var(--green-deep); }
.bee-nlist span { grid-column: 2; color: var(--muted); }
@media (min-width: 620px) { .bee-frame .bee-nlist { grid-template-columns: 1fr 1fr; column-gap: 22px; } }

/* ---------- The parts of a bee ----------
   Phones: the painting with numbered dots, and the list underneath.
   Wide screens: the painting sits in a wider stage, with each name beside it and a line to the spot. */
.bee-anat { background: #fbefd9; border: 1px solid rgba(168, 100, 0, 0.25); border-radius: calc(var(--radius) + 4px); padding: clamp(10px, 2vw, 22px); box-shadow: var(--shadow); }
.bee-anat__stage { position: relative; }
.bee-anat__art { position: relative; }
.bee-anat__art img { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); }
.bee-anat__lines, .bee-anat__label { display: none; }
.bee-anat__dot { position: absolute; transform: translate(-50%, -50%); width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 2px solid #4a2c00; background: #fff; color: #4a2c00; font: 700 0.74rem/1 var(--sans); display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
.bee-anat__dot::after { content: ""; position: absolute; inset: -9px; }
.bee-anat__dot.is-on, .bee-anat__dot:hover, .bee-anat__dot:focus-visible { background: #4a2c00; color: #fff; outline: 3px solid #f0b429; outline-offset: 1px; z-index: 2; }
.bee-anat__hint { margin: 10px 4px 14px; font-size: 0.86rem; color: var(--muted); }
.bee-anat__list { list-style: none; counter-reset: part; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.bee-anat__list li { counter-increment: part; position: relative; background: #fffdf6; border: 1px solid rgba(168, 100, 0, 0.2); border-radius: var(--radius-sm); padding: 12px 14px 13px 50px; font-size: 0.95rem; cursor: pointer; scroll-margin-top: 120px; transition: background 0.2s, border-color 0.2s; }
.bee-anat__list li::before { content: counter(part); position: absolute; left: 12px; top: 12px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #4a2c00; background: #fff; color: #4a2c00; font-weight: 700; font-size: 0.8rem; display: grid; place-items: center; }
.bee-anat__list b { font-family: var(--serif); font-size: 1.12rem; color: var(--green-deep); }
.bee-anat__list i { color: #8a5600; font-size: 0.9rem; margin-left: 4px; }
.bee-anat__list span { display: block; margin-top: 2px; color: #3f4a39; }
.bee-anat__list li.is-on { background: #fbe08c; border-color: #a86400; }
.bee-anat__list li.is-on::before { background: #4a2c00; color: #fff; }
@media (max-width: 520px) { .bee-anat__dot { width: 21px; height: 21px; font-size: 0.68rem; border-width: 1.5px; } }
@media (min-width: 900px) {
	.bee-anat__stage { aspect-ratio: 1000 / 594; container-type: inline-size; }
	.bee-anat__art { position: absolute; left: 16%; top: 12%; width: 68%; }
	.bee-anat__art img { -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent), linear-gradient(transparent, #000 4%, #000 92%, transparent); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent), linear-gradient(transparent, #000 4%, #000 92%, transparent); mask-composite: intersect; }
	.bee-anat__lines { display: block; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; overflow: visible; }
	.bee-anat__lines line { stroke: #4a2c00; stroke-width: 1.4; vector-effect: non-scaling-stroke; opacity: 0.7; }
	.bee-anat__lines line.is-on { stroke: #b02a16; stroke-width: 2.6; opacity: 1; }
	.bee-anat__label { display: block; position: absolute; z-index: 2; white-space: nowrap; padding: 3px 10px 4px; border-radius: 999px; border: 1px solid rgba(74, 44, 0, 0.35); background: #fffdf6; color: #2c1a00; font: 600 clamp(0.74rem, 1.32cqw, 1rem)/1.25 var(--sans); cursor: pointer; }
	.bee-anat__label b { color: #8a5600; font-weight: 700; margin-right: 2px; }
	.bee-anat__label--l, .bee-anat__label--r { transform: translateY(-50%); }
	.bee-anat__label--t, .bee-anat__label--b { transform: translateX(-50%); }
	.bee-anat__label.is-on, .bee-anat__label:hover { background: #4a2c00; color: #fff; border-color: #4a2c00; }
	.bee-anat__label.is-on b, .bee-anat__label:hover b { color: #f8d778; }
	.bee-anat__dot { left: var(--sx) !important; top: var(--sy) !important; width: 9px; height: 9px; font-size: 0; border-width: 2px; box-shadow: none; z-index: 2; }
	.bee-anat__dot.is-on, .bee-anat__dot:hover, .bee-anat__dot:focus-visible { background: #b02a16; border-color: #b02a16; outline-width: 2px; }
	.bee-anat__hint { text-align: center; }
}
@media print { .bee-anat__hint { display: none; } }

/* ---------- Bees drifting across the hero ----------
   Decoration only. They sit behind the heading, ignore taps, and hold still when motion is turned down. */
.bee-fliers { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.bee-flier { position: absolute; left: 0; top: var(--y); width: var(--s); animation: bee-cross var(--t) linear var(--d) infinite; will-change: transform; }
.bee-flier img { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 6px rgba(10, 36, 22, 0.28)); animation: bee-bob var(--b) ease-in-out infinite alternate; }
.bee-flier--back { animation-name: bee-cross-back; }
.bee-flier--back img { animation-name: bee-bob-back; }
@keyframes bee-cross { from { transform: translateX(-14vw); } to { transform: translateX(108vw); } }
@keyframes bee-cross-back { from { transform: translateX(108vw); } to { transform: translateX(-14vw); } }
@keyframes bee-bob { 0% { transform: translateY(-16px) rotate(-7deg); } 50% { transform: translateY(6px) rotate(3deg); } 100% { transform: translateY(18px) rotate(-3deg); } }
@keyframes bee-bob-back { 0% { transform: scaleX(-1) translateY(-16px) rotate(-7deg); } 50% { transform: scaleX(-1) translateY(6px) rotate(3deg); } 100% { transform: scaleX(-1) translateY(18px) rotate(-3deg); } }
@media (max-width: 700px) {
	.bee-flier { width: calc(var(--s) * 0.7); }
	.bee-flier:nth-child(n+4) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.bee-flier, .bee-flier img { animation: none; }
	.bee-flier { left: var(--x); }
	.bee-flier--back img { transform: scaleX(-1); }
	.bee-flier:nth-child(n+4) { display: none; }
}
@media print { .bee-fliers { display: none; } }
