:root {
    --ink: #181817;
    --paper: #F7F3EA;
    --bg: var(--paper);
    --panel: #FFFDF8;
    --card: #FFFDF8;
    --border: #D7D1C5;
    --muted: #68645B;
    --surface: #242420;
    --charcoal: var(--surface);
    --line: var(--ink);
    --line-soft: var(--border);
    --orange: #E87535;
    --accent: var(--orange);
    --danger: #9B302C;
    --red: var(--danger);
    --blue: #4F6682;
    --steel: var(--blue);
    --green: #3E6443;
    --field-green: var(--green);
    --field: #F1EBDD;
    --pollen: #D9B74E;
}
* {
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, "Public Sans", system-ui, -apple-system, Segoe UI, sans-serif;
    line-height: 1.45;
    margin: 0;
}

body > header,
body > h2,
body > h3,
body > p,
body > form,
body > div,
body > section,
body > table {
    margin-left: auto;
    margin-right: auto;
    max-width: 1120px;
}

header {
    background: var(--surface);
    border-bottom: 3px solid var(--orange);
    color: var(--bg);
    margin-bottom: 1rem;
    padding: .85rem 1.25rem;
}

.site-title {
    align-items: center;
    display: inline-flex;
    gap: .65rem;
    letter-spacing: .02em;
}

.site-title::before {
    display: none;
}

h1 {
    font-size: clamp(1.35rem, 3vw, 2rem);
    letter-spacing: 0;
    margin: 0 0 1rem;
}

h2,
h3 {
    line-height: 1.2;
}

h3 {
    border-left: 4px solid var(--orange);
    font-size: 1rem;
    letter-spacing: .04em;
    padding-left: .55rem;
}

nav,
.actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

nav {
    gap: .45rem;
}

nav a,
.actions a,
button {
    background: #EFE6D6;
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    color: var(--ink);
    cursor: pointer;
    display: inline-block;
    font: inherit;
    font-weight: 800;
    padding: .55rem .8rem;
    text-decoration: none;
}

nav a:hover,
.actions a:hover,
button:hover {
    background: #F0E6D4;
    border-color: rgba(232, 117, 53, .45);
}

.logout-form {
    display: inline;
    margin: 0;
}

.userline,
.hint,
.helptext,
.lede {
    color: var(--muted);
}

header .userline {
    color: #D8D0BF;
}

.actions,
.dashboard-section,
.dashboard-status,
.form-heading,
.record-form {
    margin-bottom: 1.5rem;
}

.dashboard-status {
    align-items: center;
    background: transparent;
    border-bottom: 1px solid var(--line-soft);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: .35rem 1rem 1rem;
}

.dashboard-status h2 {
    font-size: clamp(1.2rem, 2.4vw, 1.65rem);
    letter-spacing: 0;
    line-height: 1.15;
    margin: 0;
}

.compact-heading h2 {
    font-size: clamp(1.15rem, 2.2vw, 1.55rem);
}

.status-strip {
    display: grid;
    gap: .5rem;
    grid-template-columns: repeat(4, minmax(90px, 1fr));
    min-width: min(520px, 100%);
}

.status-strip div {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 7px;
    padding: .7rem;
}

.status-strip strong {
    display: block;
    font-size: 1.05rem;
}

.status-strip span {
    color: var(--muted);
    font-size: .86rem;
}

.eyebrow,
.tag {
    color: var(--muted);
    display: inline-block;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .08em;
    margin-bottom: .3rem;
    text-transform: uppercase;
}

.tag {
    background: var(--ink);
    color: var(--bg);
    padding: .12rem .35rem;
    width: fit-content;
}

/* Home dashboard refinement: keep the operational view compact and calm. */
body > header { padding-block: .48rem; }
body header .app-header-top { gap: .5rem; }
body header .site-title.brand-wordmark { font-size: clamp(1.28rem, 2.5vw, 1.65rem) !important; }
body header .site-nav-menu > summary { min-height: 2.2rem; padding: .4rem .62rem; }
body header .site-nav-menu[open] { margin-top: .3rem; }
body header .site-nav-menu nav { gap: .6rem; }
.site-nav-group { gap: .28rem; }
.site-nav-group-label { color: rgba(255,253,248,.65); display: block; font-size: .62rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.site-nav-primary,
.site-nav-operations,
.site-nav-admin { display: flex; flex-wrap: wrap; grid-template-columns: none; }
.site-nav-primary .site-nav-group-label,
.site-nav-operations .site-nav-group-label,
.site-nav-admin .site-nav-group-label { flex-basis: 100%; }
body header .site-nav-menu nav a,
body header .site-nav-menu nav button,
body header .site-nav-menu .logout-form button { flex: 0 1 auto; min-height: 2.18rem; padding: .34rem .52rem; }
.site-nav-admin { border-top-color: rgba(255,253,248,.14); padding-top: .42rem; }
.site-nav-account { max-width: min(100%, 26rem); overflow: hidden; padding: .1rem 0; text-overflow: ellipsis; white-space: nowrap; }
body header .farm-session-bar { margin-top: .05rem; padding-top: .3rem; }
body header .farm-session-bar label { display: none; }
body header .farm-session-bar select { min-height: 1.9rem; }

.mobile-home-title { margin-bottom: .38rem; }
.mobile-home-title h2 { line-height: 1.08; }
.dashboard-view-switcher { display: none !important; }

.dashboard-technical-section.dashboard-weather-first { margin-bottom: .58rem; }
.dashboard-weather-first .weather-card,
.dashboard-weather-first .weather-card.warn { border-left-color: var(--line-soft) !important; border-left-width: 1px; padding: .62rem .72rem; }
.dashboard-weather-first .weather-card-header { margin-bottom: .25rem; }
.dashboard-weather-first .weather-body { gap: .28rem; }
.dashboard-weather-first .weather-primary-metrics { gap: .5rem; }
.dashboard-weather-first .forecast-strip { gap: .2rem; }
.dashboard-weather-first .forecast-strip > div { padding: .26rem .3rem; }
.dashboard-weather-first .classic-weather-outlook { margin-top: .28rem; }

.module-dashboard-section { margin-top: .1rem; }
.module-dashboard-section > .section-heading { display: none; }
.module-dashboard-grid { gap: .52rem; }
.module-dashboard-card { gap: .34rem; padding: .66rem .7rem; }
.module-dashboard-card > strong { line-height: 1.12; }
.module-dashboard-card > p { margin: 0; }
.module-dashboard-heading { margin-bottom: .02rem; }
.module-dashboard-metrics { border-top-color: var(--line-soft); padding: .3rem 0; }
.module-dashboard-actions { margin-top: .04rem; }

.module-crop-command { align-items: center; gap: .28rem .5rem; grid-template-columns: minmax(4.5rem, 7.25rem) auto minmax(0,1fr); }
.module-crop-command-visuals { align-items: center; display: flex; grid-row: span 2; isolation: isolate; min-width: 4.5rem; padding: .06rem .15rem; }
.module-crop-command-visual { align-items: center; background: #f6f0df; border: 1px solid #e4d8bc; border-radius: 50%; display: grid; height: 3.65rem; justify-content: center; margin-left: -.72rem; overflow: hidden; position: relative; width: 3.65rem; }
.module-crop-command-visual:first-child { margin-left: 0; z-index: 4; }
.module-crop-command-visual:nth-child(2) { z-index: 3; }
.module-crop-command-visual:nth-child(3) { z-index: 2; }
.module-crop-command-visual:nth-child(4) { z-index: 1; }
.module-crop-command-visual .crop-visual { height: 3.4rem; margin: 0; width: 3.4rem; }
.module-crop-command-read { align-self: end; }
.module-crop-command-read b { font-size: 1.35rem; }
.module-crop-command-state { align-self: end; border-top: 0; display: grid; gap: .08rem; grid-column: auto; padding: 0; }
.module-crop-command-state b { font-size: .82rem; }
.module-crop-command-state span { font-size: .72rem; text-transform: capitalize; }
.module-crop-command-priority { border-top: 1px solid var(--line-soft); font-size: .78rem; margin-top: .12rem; padding-top: .35rem; }

.module-tree-pulse { gap: .4rem; grid-template-columns: 2.35rem auto minmax(0,1fr); padding: .38rem .48rem; }
.module-tree-pulse-art { transform: scale(.9); transform-origin: center; }
.module-tree-pulse-state { gap: .04rem; }

.dashboard-layout-preview { margin-top: .45rem; }
.dashboard-layout-preview .layout-headline-card { padding: .62rem .7rem .7rem; }
.dashboard-layout-preview .section-heading { align-items: center; display: flex; justify-content: space-between; margin-bottom: .5rem; }
.dashboard-layout-preview .section-heading h3 { font-size: .98rem; line-height: 1.1; }
.dashboard-layout-preview .layout-thumbnail-link { height: clamp(185px, 53vw, 260px); }
.dashboard-layout-preview .farm-layout-thumb { transform: scale(1.08); }
.dashboard-layout-preview .layout-mini-key { margin-top: .34rem; }

.dashboard-followup-strip { margin-top: .55rem; padding: .55rem .65rem; }
.dashboard-followup-strip > div { gap: .05rem; }
.dashboard-followup-strip span { line-height: 1.25; }
.offline-capture-panel { margin-top: .35rem; }
.offline-capture-panel > summary { min-height: 2.35rem; }
.legal-footer { margin-top: .58rem; padding-bottom: calc(.7rem + env(safe-area-inset-bottom)); }

/* Shared bee status language for dashboard, apiary, and hive views. */
.bee-hive-card.status-current,
.hive-stack-graphic.status-current,
.module-bee-pulse-hive.status-current { --bee-status: var(--green); }
.bee-hive-card.status-watch,
.hive-stack-graphic.status-watch,
.module-bee-pulse-hive.status-watch { --bee-status: var(--steel); }
.bee-hive-card.status-due,
.hive-stack-graphic.status-due,
.module-bee-pulse-hive.status-due { --bee-status: #b68227; }
.bee-hive-card.status-attention,
.hive-stack-graphic.status-attention,
.module-bee-pulse-hive.status-attention { --bee-status: var(--red); }
.bee-hive-card.status-current,
.bee-hive-card.status-watch,
.bee-hive-card.status-due,
.bee-hive-card.status-attention { border-left-color: var(--bee-status); }
.care-status-pill.status-current,
.care-status-pill.status-watch,
.care-status-pill.status-due,
.care-status-pill.status-attention { border-color: color-mix(in srgb, var(--bee-status) 42%, white); color: var(--bee-status); }
.module-bee-pulse-hive.status-watch { border-bottom-color: var(--steel); }
.module-bee-pulse-hive.status-watch b { background: rgba(85, 111, 133, .24); }

@media (max-width: 720px) {
    body > header { padding: calc(.38rem + env(safe-area-inset-top)) .65rem .42rem; }
    body header .site-nav-menu[open] { width: 100%; }
    .site-nav-primary,
    .site-nav-operations,
    .site-nav-admin { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .site-nav-group-label,
    .site-nav-primary .site-nav-group-label,
    .site-nav-operations .site-nav-group-label,
    .site-nav-admin .site-nav-group-label,
    .site-nav-account { grid-column: 1 / -1; }
    body header .site-nav-menu nav a,
    body header .site-nav-menu nav button,
    body header .site-nav-menu .logout-form button { min-height: 2.35rem; text-align: left; width: 100%; }
    .site-nav-admin .logout-form { display: block; }
    .mobile-home-title { margin: .08rem auto .35rem; }
    .dashboard-weather-first .weather-card { padding: .58rem .64rem; }
    .dashboard-weather-first .forecast-strip { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .module-crop-command { grid-template-columns: 4.2rem auto minmax(0,1fr); }
    .module-crop-command-visuals { min-width: 4.2rem; }
    .module-crop-command-visual { height: 3.35rem; margin-left: -1.05rem; width: 3.35rem; }
    .module-crop-command-visual:nth-child(n+3) { display: none; }
    .module-crop-command-visual .crop-visual { height: 3.1rem; width: 3.1rem; }
    .module-crop-command-state b { font-size: .77rem; }
    .module-crop-command-state span { font-size: .68rem; }
    .dashboard-layout-preview .layout-thumbnail-link { height: clamp(190px, 58vw, 245px); }
    body .floating-timer-action { bottom: calc(.4rem + env(safe-area-inset-bottom)) !important; right: .4rem !important; }
    body .floating-timer-action button { font-size: .74rem !important; min-height: 2.15rem !important; padding: .42rem .62rem !important; }
}

/* Second-pass dashboard corrections (final cascade). */
.module-dashboard-metrics { overflow: visible; }
.module-dashboard-metrics span { align-items: center; justify-content: center; min-width: 0; padding: .48rem .9rem; text-align: center; }
.module-dashboard-metrics span:first-child { padding-left: 1rem; }
.module-dashboard-metrics span:last-child { padding-right: 1rem; }
.module-dashboard-metrics b { flex: 0 0 auto; }
.module-crop-command { grid-template-columns: minmax(6rem, 8rem) minmax(5.5rem, 7.5rem) minmax(0, 1fr); }
.module-crop-command-visuals { min-width: 0; overflow: visible; }
.module-crop-command-visual { flex: 0 0 auto; }
.module-crop-command-read, .module-crop-command-state { min-width: 0; }
.module-crop-command-read span, .module-crop-command-state b, .module-crop-command-state span { overflow-wrap: anywhere; }
.dashboard-layout-preview .section-heading { align-items: center; display: flex; flex-wrap: nowrap; gap: .5rem; justify-content: space-between; margin-bottom: .35rem; }
.dashboard-layout-preview .section-heading > div { min-width: 0; }
.dashboard-layout-preview .section-heading h3 { margin: 0; }
.dashboard-layout-preview .layout-open-action { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 720px) {
    .module-dashboard-metrics span { padding-inline: .72rem; }
    .module-dashboard-metrics span:first-child { padding-left: .82rem; }
    .module-dashboard-metrics span:last-child { padding-right: .82rem; }
    .module-crop-command { grid-template-columns: minmax(5.65rem, 6rem) minmax(5.2rem, 6.6rem) minmax(0, 1fr); }
    .module-crop-command-visual { margin-left: -.72rem; }
    .module-crop-command-visual:first-child { margin-left: 0; }
    .module-crop-command-visual:nth-child(n+3) { display: none; }
}
@media (max-width: 390px) {
    .module-dashboard-metrics span { font-size: .64rem; padding-inline: .58rem; }
    .module-dashboard-metrics b { font-size: .9rem; }
    .module-crop-command { grid-template-columns: 5.2rem minmax(4.8rem, 5.8rem) minmax(0, 1fr); }
    .module-crop-command-visual { height: 3.05rem; width: 3.05rem; }
    .module-crop-command-visual .crop-visual { height: 2.85rem; width: 2.85rem; }
}

/* Final dashboard polish overrides keep the shared refinements active at each breakpoint. */
.module-dashboard-metrics span { min-width: 0; padding-inline: .72rem; }
.module-dashboard-metrics span:first-child { padding-left: .8rem; }
.module-dashboard-metrics span:last-child { padding-right: .8rem; }
.module-crop-command { grid-template-columns: minmax(4.7rem, 7.25rem) minmax(5.2rem, auto) minmax(0, 1fr); }
.module-crop-command-visuals { min-width: 0; overflow: hidden; }
.module-crop-command-read, .module-crop-command-state { min-width: 0; }
.module-crop-command-state b, .module-crop-command-state span { overflow-wrap: anywhere; }
.dashboard-layout-preview .section-heading { margin-bottom: .35rem; }
.dashboard-layout-preview .section-heading > div { min-width: 0; }
.dashboard-layout-preview .section-heading h3 { margin: 0; }
@media (max-width: 720px) {
    .module-crop-command { grid-template-columns: minmax(4.2rem, 5.4rem) minmax(4.7rem, auto) minmax(0, 1fr); }
}

/* During active weighing, live totals matter more than the saved-history list. */
.harvest-measure-summary > span:nth-child(3),
.harvest-measure-summary > span:nth-child(4) { display: none; }
.harvest-items-list--collapsible > summary { align-items: center; cursor: pointer; display: flex; justify-content: space-between; list-style: none; }
.harvest-items-list--collapsible > summary::-webkit-details-marker { display: none; }
.harvest-items-list--collapsible > summary > span { color: var(--steel); font-size: .8rem; font-weight: 800; }
.harvest-items-list--collapsible[open] > summary > span::after { content: " · hide"; }

/* Crop-specific planting cards use the same clearly rounded actions as the rest of YFS. */
.crop-module-shell .crop-record-row--planting nav a {
    border-radius: var(--yfs-radius-control, 8px);
}

/* Harvest start uses an h2; keep it readable on the shared light tab header. */
.crop-tab-header h2 { color: var(--ink) !important; }

/* Keep crop and planting actions in the same rounded control family as the rest of YFS. */
.planting-form :is(button, .button-link, .secondary-button, .primary-button),
.crop-tab-workspace .crop-record-row nav :is(a, button) {
    border-radius: var(--yfs-radius-control, 8px);
}

.tag.bees {
    background: var(--pollen);
    color: var(--ink);
}

.tag.pasture {
    background: #5E7F3A;
    color: #FFFDF7;
}

.section-heading {
    align-items: baseline;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: .65rem;
}

.section-heading h3 {
    margin: 0;
}

.section-heading p {
    color: var(--muted);
    margin: 0;
}

.ops-hero {
    align-items: end;
    border-bottom: 1px solid var(--line-soft);
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 1.25rem;
    padding: .35rem 1rem 1rem;
}

.ops-hero h2 {
    font-size: clamp(1.35rem, 2.4vw, 2.1rem);
    letter-spacing: 0;
    line-height: 1.05;
    margin: 0;
}

.ops-kpis {
    display: grid;
    gap: .65rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ops-kpi {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: .75rem;
}

.ops-kpi.warn {
    border-color: var(--orange);
    box-shadow: inset 4px 0 0 var(--orange);
}

.ops-kpi strong {
    display: block;
    font-size: 1.35rem;
    line-height: 1;
}

.ops-kpi span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.ops-grid-section {
    margin-bottom: 1.5rem;
}

.headline-grid {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, .8fr);
}

.layout-headline-card {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: 1rem;
}

.layout-thumbnail-link {
    align-items: center;
    background: #FFFDF7;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: flex;
    height: 330px;
    justify-content: center;
    margin-bottom: .75rem;
    overflow: hidden;
    position: relative;
}

.farm-layout-thumb-shell {
    padding: 0;
}

.farm-layout-thumb {
    height: 100%;
    min-height: 0;
    width: 100%;
}

.layout-headline-card .farm-layout-svg {
    max-height: 390px;
}

.layout-mini-key {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .45rem .8rem;
    margin-bottom: .75rem;
}

.layout-mini-key span {
    align-items: center;
    color: var(--muted);
    display: inline-flex;
    font-size: .82rem;
    font-weight: 800;
    gap: .35rem;
}

.ops-board {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
}

.ops-tile {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    box-shadow: 0 1px 0 rgba(28, 28, 26, .04);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.tile-tasks,
.tile-pastures,
.tile-financials {
    grid-column: auto;
}

.ops-tile.ok {
    border-top: 3px solid #5E7F3A;
}

.ops-tile.warn {
    border-top: 3px solid var(--orange);
}

.ops-tile.setup {
    border-top: 3px solid var(--line-soft);
}

.ops-tile-main {
    color: var(--ink);
    display: block;
    padding: .8rem .85rem .35rem;
    text-decoration: none;
}

.ops-tile-top {
    align-items: center;
    display: flex;
    gap: .55rem;
    justify-content: space-between;
    margin-bottom: .55rem;
}

.ops-state {
    color: var(--muted);
    flex: 0 0 auto;
    font-size: .72rem;
    font-weight: 900;
    line-height: 1.1;
    text-align: right;
    text-transform: uppercase;
}

.ops-tile.warn .ops-state {
    color: var(--danger);
}

.ops-tile h3 {
    border: 0;
    font-size: 1.08rem;
    letter-spacing: 0;
    line-height: 1.15;
    margin: 0;
    padding: 0;
    text-transform: none;
}

.ops-tile p {
    color: var(--muted);
    margin: 0;
}

.ops-tile,
.action-card,
.module-card,
.attention-card,
.pasture-card,
.shape-row,
.weather-work-plan {
    border-left: 3px solid var(--orange, #e87535);
}

.weather-plan-note {
    margin: .5rem 0 0;
    color: var(--muted, #68645b);
}

.weather-plan-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin-top: .8rem;
}

.weather-plan-grid > div {
    display: grid;
    gap: .3rem;
    align-content: start;
}

.weather-plan-grid strong {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.weather-plan-grid a {
    color: inherit;
    text-decoration: none;
}

.weather-plan-recommendations {
    display: grid;
    gap: .45rem;
    margin-top: .8rem;
}

.weather-plan-recommendations a {
    display: grid;
    gap: .12rem;
    padding: .55rem .7rem;
    border: 1px solid var(--border, #d7d1c5);
    border-radius: 6px;
    color: inherit;
    text-decoration: none;
}

.weather-plan-recommendations span {
    color: var(--muted, #68645b);
    font-size: .92rem;
}

.farm-day-planner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
    margin-top: .8rem;
}

.farm-day-planner article,
.farm-day-planner details {
    padding: .7rem;
    border: 1px solid var(--border, #d7d1c5);
    border-radius: 6px;
}

.farm-day-planner details > summary {
    list-style: none;
    cursor: pointer;
    display: block;
    width: 100%;
}

.farm-day-planner details > summary::-webkit-details-marker {
    display: none;
}

.farm-day-planner details > summary::after {
    content: '+';
    float: right;
    color: var(--orange, #e87535);
}

.farm-day-planner details[open] > summary::after {
    content: '−';
}

.farm-day-planner header,
.farm-day-planner summary {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    align-items: start;
}

.planner-group {
    margin-top: .55rem;
    padding-top: .45rem;
    border-top: 1px solid var(--border, #d7d1c5);
}

.planner-day-content {
    display: grid;
    gap: .55rem;
}

.planner-group > summary {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    align-items: center;
    min-width: 0;
    cursor: pointer;
    list-style: none;
}

.planner-group > summary::-webkit-details-marker {
    display: none;
}

.planner-group > summary span {
    color: var(--muted, #68645b);
    font-size: .8rem;
    white-space: nowrap;
    margin-left: auto;
}

.planner-group-single > strong {
    display: block;
    margin-bottom: .25rem;
}

.farm-day-planner article > header,
.farm-day-planner details > summary {
    padding: .55rem .65rem;
    background: var(--ink, #181817);
    border-bottom: 3px solid var(--orange, #e87535);
    color: var(--paper, #f7f3ea);
}

.farm-day-planner details > summary > header {
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    color: inherit;
}

.farm-day-planner header span,
.planner-empty {
    color: var(--muted, #68645b);
    font-size: .85rem;
}

.farm-day-planner article > header span,
.farm-day-planner details > summary span {
    color: rgba(247, 243, 234, .78);
}

.planner-weather { align-items: center; display: inline-flex; font-size: .76rem; gap: .28rem; margin-left: auto; white-space: nowrap; }
.planner-weather i { background: var(--pollen); border-radius: 50%; display: inline-block; height: .55rem; position: relative; width: .55rem; }
.planner-weather-rain i { background: var(--steel); border-radius: .5rem; height: .38rem; width: .76rem; }
.planner-weather-rain i::after { background: repeating-linear-gradient(110deg, transparent 0 .12rem, #9fc0da .13rem .19rem, transparent .2rem .3rem); content: ""; height: .35rem; left: .08rem; position: absolute; top: .35rem; width: .62rem; }
.planner-weather-heat i { background: var(--orange); box-shadow: 0 0 0 .12rem rgba(232, 117, 53, .35); }
.planner-weather-wind i { background: var(--steel); border-radius: .12rem; transform: rotate(-25deg); }
.planner-weather-frost i { background: #c9e2ef; box-shadow: 0 0 0 .1rem rgba(201, 226, 239, .35); }

.farm-day-planner p {
    color: var(--muted, #68645b);
    font-size: .9rem;
}

.planner-task {
    display: grid;
    gap: .45rem;
    padding-top: .45rem;
    margin-top: .45rem;
    border-top: 1px solid var(--border, #d7d1c5);
}

.planner-task > a,
.planner-task-title {
    color: inherit;
    display: block;
    font-weight: 700;
}

.planner-timer-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.1rem;
    padding: .35rem .65rem;
    border: 1px solid var(--border, #d7d1c5);
    border-radius: .45rem;
    background: var(--card, #fffdf8);
    color: var(--ink, #181817) !important;
    font-size: .8rem;
    white-space: nowrap;
}

.planner-move-actions,
.planner-task-actions,
.planner-unscheduled-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .35rem;
    width: 100%;
}

.planner-move-actions button,
.planner-task-actions button,
.planner-unscheduled-actions button,
.planner-now-link,
.planner-finish-link {
    width: 100%;
    white-space: nowrap;
    min-height: 2.25rem;
    padding: .38rem .45rem;
    font-size: .76rem;
    border-radius: 6px;
}

.planner-now-link {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    grid-column: 1 / -1;
    background: var(--ink);
    color: var(--paper) !important;
}

.planner-unscheduled {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-left: 3px solid var(--orange, #e87535);
    border-radius: 8px;
    display: grid;
    gap: .45rem;
    margin-top: .85rem;
    padding: .75rem;
}

.planner-unscheduled > span {
    color: var(--muted, #68645b);
    font-size: .85rem;
}

.planner-unscheduled-row {
    display: grid;
    gap: .45rem;
    padding-top: .45rem;
    margin-top: .45rem;
    border-top: 1px solid var(--border, #d7d1c5);
}

.planner-unscheduled-row > a {
    color: inherit;
    display: block;
    font-weight: 700;
}

@media (max-width: 700px) {
    .harvest-current-plant__heading { align-items: stretch; flex-direction: column; }
    .harvest-current-plant__heading form, .harvest-current-plant__heading button { width: 100%; }
    .harvest-current-plant__totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .harvest-current-plant__totals span { min-width: 0; }
    .planner-task {
        gap: .4rem;
    }

    .planner-move-actions,
    .planner-task-actions,
    .planner-unscheduled-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .weather-plan-grid {
        grid-template-columns: 1fr;
    }

    .farm-day-planner {
        grid-template-columns: 1fr;
    }
}

.weather-card {
    overflow-wrap: normal;
    word-break: normal;
}

.ops-tile h3,
.action-card strong,
.module-card h4,
.attention-card strong,
.pasture-card h4 {
    hyphens: none;
    overflow-wrap: normal;
    word-break: normal;
}

.ops-metrics {
    display: grid;
    gap: .45rem;
    grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
    margin: .45rem .85rem .75rem;
}

.ops-metric {
    background: rgba(248, 240, 226, .66);
    border: 1px solid rgba(168, 145, 112, .34);
    border-radius: 6px;
    min-width: 0;
    padding: .42rem .5rem .38rem;
}

.ops-metric-link {
    color: inherit;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.ops-metric-link:hover,
.ops-metric-link:focus-visible {
    border-color: var(--orange);
    box-shadow: 0 2px 0 rgba(255, 107, 31, .18);
    outline: none;
    transform: translateY(-1px);
}


.ops-metrics strong,
.ops-metrics span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ops-metrics strong {
    color: var(--blue);
    font-size: 1.05rem;
    line-height: 1.1;
    white-space: nowrap;
}

.ops-metrics span {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1.1;
    margin-top: .18rem;
    white-space: nowrap;
    text-transform: uppercase;
}

.ops-links {
    align-items: center;
    border-top: 1px solid var(--line-soft);
    margin: auto 0 0;
    padding: .6rem .85rem;
}

.ops-links a {
    background: rgba(255, 253, 247, .58);
    flex: 1 1 110px;
    font-size: .86rem;
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
}

.weather-card {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-left: 4px solid #5E7F3A;
    border-radius: 8px;
    padding: 1rem;
}

.weather-card.warn {
    border-left-color: var(--orange);
}

.weather-card.setup {
    border-left-color: var(--line-soft);
}

.weather-card-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .8rem;
}

.weather-card-header h3 {
    border: 0;
    letter-spacing: 0;
    margin: 0;
    padding: 0;
    text-transform: none;
}

.weather-card-header > strong {
    font-size: 2rem;
    line-height: 1;
}

.weather-metrics {
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: .75rem;
}

.weather-metrics div {
    background: var(--field);
    padding: .65rem;
}

.weather-metrics strong,
.weather-metrics span {
    display: block;
}

.weather-metrics span {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.weather-flags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: .65rem;
}

.weather-flags span {
    background: #EFE6D6;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 800;
    padding: .25rem .55rem;
}

.weather-watchlist {
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: grid;
    gap: .15rem;
    margin-top: .75rem;
    padding: .65rem;
}

.weather-watchlist strong {
    font-size: .86rem;
    text-transform: uppercase;
}

.weather-watchlist span {
    color: var(--muted);
    font-size: .86rem;
}

.status-bars {
    display: grid;
    gap: .45rem;
    margin: .15rem .85rem .75rem;
}

.pasture-bars {
    margin: .85rem 0;
}

.status-bar-row {
    align-items: center;
    display: grid;
    gap: .55rem;
    grid-template-columns: 82px minmax(0, 1fr);
}

.status-bar-row > span {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-transform: uppercase;
}

.status-bar {
    background: #E8DFCF;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    min-height: 1.25rem;
    overflow: hidden;
    position: relative;
}

.status-bar i {
    background: var(--blue);
    bottom: 0;
    display: block;
    left: 0;
    position: absolute;
    top: 0;
    width: var(--bar-width);
}

.status-bar strong {
    color: #FFFDF7;
    display: block;
    font-size: .76rem;
    line-height: 1.25rem;
    padding: 0 .55rem;
    position: relative;
    text-shadow: 0 1px 1px rgba(28, 28, 26, .6);
    z-index: 1;
}

.track-water i {
    background: #2563EB;
}

.track-fence i {
    background: #7C5C2E;
}

.track-shelter i {
    background: #475569;
}

.track-condition i {
    background: #5E7F3A;
}

.track-rest i {
    background: #60A5FA;
}

.track-check i {
    background: #2563EB;
}

.track-timing i {
    background: #5E7F3A;
}

.track-followup i {
    background: #7C5C2E;
}

.quick-actions,
.module-grid,
.attention-grid,
.activity-list,
.brief-grid {
    display: grid;
    gap: .9rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.compact-actions {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.action-card,
.module-card,
.attention-card,
.activity-row,
.brief-item,
.empty-panel,
.panel,
.filters,
.stat,
.record-form {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
}

.action-card,
.module-card,
.attention-card,
.activity-row {
    color: var(--ink);
    display: block;
    padding: 1rem;
    text-decoration: none;
}

.compact-action {
    min-height: 92px;
    padding: .85rem;
}

.activity-list {
    grid-template-columns: 1fr;
}

.activity-row {
    align-items: baseline;
    display: grid;
    gap: .75rem;
    grid-template-columns: 110px 160px minmax(0, 1fr);
}

.activity-row span:first-child,
.activity-row span:last-child {
    color: var(--muted);
}

.preference-row {
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: grid;
    gap: .75rem;
    grid-template-columns: minmax(0, 1fr) minmax(150px, auto) minmax(160px, 220px);
    padding: .85rem;
}

.preference-row strong,
.preference-row span {
    display: block;
}

.preference-row span {
    color: var(--muted);
}

.email-preview pre {
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    overflow-x: auto;
    padding: .85rem;
    white-space: pre-wrap;
}

.brief-item {
    padding: 1rem;
}

.brief-item strong {
    display: block;
    margin-bottom: .25rem;
}

.brief-item span {
    color: var(--muted);
}

.report-table-wrap {
    overflow-x: auto;
}

.dashboard-section h4 {
    margin: 1.2rem 0 .5rem;
}

.action-card {
    border-left: 4px solid var(--blue);
}

.action-card.primary,
.attention-card {
    border-left-color: var(--orange);
}

.action-card strong,
.module-card h4,
.attention-card strong {
    display: block;
    font-size: 1.05rem;
    margin: .15rem 0;
}

.action-card span:last-child,
.module-card p,
.attention-card span:last-child {
    color: var(--muted);
}

.module-card {
    border-top: 4px solid var(--orange);
}

.bee-module {
    border-top-color: var(--pollen);
}

.pasture-module {
    border-top-color: #5E7F3A;
}

.muted-module,
.setup-card {
    opacity: .78;
}

.module-links,
.setup-links {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.module-links a,
.setup-links a,
.filters a {
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    color: var(--ink);
    padding: .35rem .55rem;
    text-decoration: none;
}

.empty-panel {
    border-left: 4px solid var(--line-soft);
    color: var(--muted);
    padding: .9rem;
}

.calm-empty {
    background: rgba(255, 253, 247, .72);
    font-weight: 800;
}

.compact-stats {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.compact-stats div {
    border-bottom: 1px solid var(--line-soft);
    border-right: 1px solid var(--line-soft);
    padding: .65rem;
}

.compact-stats strong,
.stat strong {
    color: var(--blue);
    display: block;
    font-size: 1.35rem;
}

.compact-stats span {
    color: var(--muted);
    font-size: .9rem;
}

.secondary-section details {
    background: rgba(255, 253, 247, .58);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: .75rem 1rem;
}

.secondary-section summary,
.advanced-fields summary,
.seed-use-row summary {
    cursor: pointer;
    font-weight: 900;
}

.secondary-section summary {
    color: var(--muted);
}

.settings-groups {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin-top: .85rem;
}

.settings-groups > div {
    background: rgba(248, 240, 226, .62);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: .75rem;
}

.settings-groups strong {
    display: block;
    margin-bottom: .45rem;
}

.secondary-button {
    background: transparent;
    border-color: var(--line);
}

.danger-link {
    border-color: rgba(155, 28, 28, .35);
    color: var(--danger);
}

.setup-form ul {
    display: grid;
    gap: .5rem;
    list-style: none;
    padding-left: 0;
}

.setup-form li label {
    align-items: center;
    display: flex;
    gap: .55rem;
    margin-top: 0;
}

.setup-form input[type="radio"] {
    width: auto;
}

.setup-module-fields[hidden] {
    display: none;
}

.pasture-card-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.pasture-status-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.pasture-card {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-top: 4px solid #5E7F3A;
    border-radius: 8px;
    padding: 1rem;
}

.land-card {
    box-shadow: 0 8px 22px rgba(28, 28, 26, .07);
    display: grid;
    gap: .75rem;
    padding: .85rem;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.land-card-grazing,
.land-card-occupied {
    border-top-color: #E8792E;
}

.land-card-hay {
    border-top-color: #D6A514;
}

.land-card-resting {
    border-top-color: #3B82C4;
}

.land-card-idle {
    border-top-color: #94A3B8;
}

.land-card-attention {
    border-color: rgba(159, 57, 44, .55);
}

.land-card-highlight {
    border-color: var(--blue);
    box-shadow: 0 12px 28px rgba(37, 99, 235, .18);
    transform: translateY(-1px);
}

.pasture-card-header {
    align-items: start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.pasture-card h4 {
    font-size: 1.15rem;
    line-height: 1.15;
    margin: .2rem 0 0;
}

.pasture-card p {
    color: var(--muted);
    margin: .25rem 0;
}

.pasture-facts {
    display: grid;
    gap: .5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: .85rem 0;
}

.pasture-facts div {
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    padding: .55rem;
}

.pasture-facts span {
    color: var(--muted);
    display: block;
    font-size: .78rem;
    font-weight: 800;
}

.pasture-facts strong {
    display: block;
}

.land-use-pill,
.land-status-pill {
    border-radius: 999px;
    display: inline-flex;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .03em;
    line-height: 1;
    padding: .38rem .52rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.land-use-pill {
    background: rgba(94, 127, 58, .14);
    color: #334D20;
}

.land-card-hay .land-use-pill {
    background: rgba(214, 165, 20, .22);
    color: #6B4E00;
}

.land-card-resting .land-use-pill {
    background: rgba(59, 130, 196, .16);
    color: #1D4E75;
}

.land-status-pill {
    background: #1C1C1A;
    color: #FFFDF7;
    max-width: 11rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.land-card-animals {
    color: var(--muted);
    font-size: .86rem;
    font-weight: 800;
    margin: .25rem 0 0;
}

.land-card-metrics {
    display: grid;
    gap: .45rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.land-card-metrics div {
    background: rgba(248, 240, 226, .72);
    border: 1px solid rgba(168, 145, 112, .32);
    border-radius: 6px;
    min-width: 0;
    padding: .5rem;
}

.land-card-metrics span {
    color: var(--muted);
    display: block;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.land-card-metrics strong {
    display: block;
    font-size: .95rem;
    line-height: 1.15;
    margin-top: .12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.land-readiness-strip {
    display: flex;
    flex-wrap: wrap;
    gap: .38rem;
}

.readiness-chip {
    background: #ECE3D3;
    border: 1px solid rgba(168, 145, 112, .35);
    border-radius: 999px;
    color: var(--ink);
    font-size: .74rem;
    font-weight: 900;
    line-height: 1;
    max-width: 100%;
    overflow: hidden;
    padding: .42rem .55rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.water-reliable,
.water-seasonal {
    background: #DBEAFE;
    color: #17427C;
}

.water-none,
.fence-none,
.fence-needs_repair,
.shelter-none {
    background: #FEE2D5;
    color: #7A2D1C;
}

.fence-good,
.shelter-good {
    background: #DDECCB;
    color: #314F1C;
}

.rest-chip {
    background: #E0F2FE;
    color: #1D4E75;
}

.compact-card-actions {
    gap: .4rem;
    margin-top: 0;
    min-width: 0;
}

.compact-card-actions a {
    box-sizing: border-box;
    flex: 1 1 6.75rem;
    min-width: 0;
    overflow: hidden;
    padding: .34rem .52rem;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-card-actions form {
    flex: 1 1 5.5rem;
    margin: 0;
    min-width: 0;
}

.compact-card-actions button {
    background: #FFFDF7;
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    padding: .34rem .52rem;
    width: 100%;
}

.inline-form {
    display: inline;
}

.task-card.priority-1 {
    border-left-color: var(--orange);
}

.acreage-visual {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: 1rem;
}

.acreage-bar {
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    display: flex;
    height: 1.2rem;
    overflow: hidden;
}

.acreage-segment {
    display: block;
    min-width: 2px;
    width: var(--segment-width);
}

.acreage-legend {
    display: grid;
    gap: .65rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: .85rem;
}

.acreage-legend div {
    align-items: center;
    display: grid;
    gap: .25rem .5rem;
    grid-template-columns: auto 1fr;
}

.acreage-legend span:last-child {
    color: var(--muted);
    grid-column: 2;
}

.legend-swatch {
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    display: inline-block;
    height: .85rem;
    width: .85rem;
}

.status-animals_on {
    background: #5E7F3A;
}

.status-resting {
    background: #F6C945;
}

.status-hay {
    background: #7BA7C7;
}

.status-idle {
    background: #D8D0BF;
}

.status-unknown {
    background: #8B8A84;
}

.setup-links {
    margin-top: .85rem;
}

table {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-collapse: collapse;
    margin-bottom: 2rem;
    width: 100%;
}

th {
    background: var(--ink);
    color: var(--bg);
    text-transform: uppercase;
}

th,
td {
    border-bottom: 1px solid var(--line-soft);
    padding: .65rem;
    text-align: left;
    vertical-align: top;
}

.record-form,
.panel,
.filters,
.stat {
    padding: 1rem;
}

label {
    display: block;
    font-weight: 800;
    margin-top: 1rem;
}

.field-label {
    display: block;
    font-weight: 800;
    margin-top: 1rem;
}

input,
select,
textarea {
    background: #FFFDF7;
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    color: var(--ink);
    font: inherit;
    max-width: 620px;
    padding: .55rem;
    width: 100%;
}

input[type="checkbox"] {
    height: 1.1rem;
    margin: 0;
    width: 1.1rem;
}

.checkbox-field label {
    align-items: center;
    display: flex;
    gap: .65rem;
}

.checkbox-field label input {
    flex: 0 0 auto;
}

textarea {
    min-height: 7rem;
}

.form-field {
    margin-bottom: .85rem;
}

.field-help-disclosure {
    display: inline-block;
    margin: .3rem 0 0;
    position: relative;
}

.field-help-disclosure > summary {
    align-items: center;
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    font-size: .76rem;
    font-weight: 900;
    height: 1.35rem;
    justify-content: center;
    list-style: none;
    width: 1.35rem;
}

.field-help-disclosure > summary::-webkit-details-marker { display: none; }
.field-help-disclosure[open] > summary { border-color: var(--orange); color: var(--ink); }
.field-help-disclosure > span {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    box-shadow: 0 .4rem 1rem rgba(24, 24, 23, .12);
    color: var(--paper);
    font-size: .82rem;
    line-height: 1.35;
    left: 0;
    margin-top: .35rem;
    max-width: min(19rem, calc(100vw - 3rem));
    padding: .55rem .65rem;
    position: absolute;
    width: max-content;
    z-index: 3;
}

/* Sensor active-session controls are intentionally compact: the scale page is
   used beside a real platform, often on a laptop in a barn or feed room. */
.active-scale-grid { margin-bottom: .8rem; }
.scale-controls { align-items: end; }
.known-weight { color: var(--muted); display: grid; font-size: .78rem; font-weight: 800; gap: .25rem; }
.known-weight input { background: var(--card); border: 1px solid var(--line-soft); border-radius: 6px; color: var(--ink); font: inherit; min-width: 7.25rem; padding: .48rem .55rem; }

/* Compact visual cue for a fast weather read; motion stays optional. */
.weather-sky-mark { flex: 0 0 3.55rem; height: 2.8rem; margin-left: auto; pointer-events: none; position: relative; width: 3.55rem; }
.weather-sun { background: var(--pollen); border-radius: 50%; height: 1.1rem; left: .15rem; position: absolute; top: .1rem; width: 1.1rem; }
.weather-sun::before { border: 2px solid var(--pollen); border-radius: 50%; content: ""; inset: -.28rem; opacity: .7; position: absolute; }
.weather-cloud { background: #cbd4db; border-radius: 1rem; bottom: .62rem; height: .72rem; left: .78rem; position: absolute; width: 2.1rem; }
.weather-cloud::before, .weather-cloud::after { background: #cbd4db; border-radius: 50%; content: ""; position: absolute; }
.weather-cloud::before { height: .9rem; left: .32rem; top: -.45rem; width: .9rem; }
.weather-cloud::after { height: .68rem; right: .24rem; top: -.29rem; width: .68rem; }
.weather-rain { display: none; }
.weather-sky-mark.rain-likely .weather-rain { display: block; height: .55rem; left: 1.12rem; position: absolute; top: 2.12rem; width: 1.4rem; }
.weather-sky-mark.rain-likely .weather-rain::before { background: repeating-linear-gradient(110deg, transparent 0 .19rem, var(--steel) .2rem .28rem, transparent .29rem .47rem); content: ""; inset: 0; position: absolute; }
.weather-moon { display: none; }
.weather-sky-mark.weather-condition-rain .weather-rain { display: block; height: .55rem; left: 1.12rem; position: absolute; top: 2.12rem; width: 1.4rem; }
.weather-sky-mark.weather-condition-rain .weather-rain::before { background: repeating-linear-gradient(110deg, transparent 0 .19rem, var(--steel) .2rem .28rem, transparent .29rem .47rem); content: ""; inset: 0; position: absolute; }
.weather-sky-mark.weather-condition-cloud .weather-sun,
.weather-sky-mark.weather-condition-rain .weather-sun,
.weather-sky-mark.is-night .weather-sun { display: none; }
.weather-sky-mark.is-night .weather-moon { background: #e5e2d7; border-radius: 50%; display: block; height: 1.12rem; left: .32rem; position: absolute; top: .18rem; width: 1.12rem; }
.weather-sky-mark.is-night .weather-moon::after { background: var(--card); border-radius: 50%; content: ""; height: .95rem; left: .34rem; position: absolute; top: -.12rem; width: .95rem; }
@media (prefers-reduced-motion: no-preference) { .weather-sun { animation: weather-sun-glow 5s ease-in-out infinite; } .weather-sky-mark.rain-likely .weather-rain, .weather-sky-mark.weather-condition-rain .weather-rain { animation: weather-rain-fall 1.7s linear infinite; } }
@keyframes weather-sun-glow { 50% { transform: scale(1.08); } }
@keyframes weather-rain-fall { 50% { transform: translateY(.12rem); } }

.form-field > input:not([type="checkbox"]):not([type="radio"]),
.form-field > select,
.form-field > textarea,
.record-form input:not([type="checkbox"]):not([type="radio"]),
.record-form select,
.record-form textarea,
.receipt-line-fields input:not([type="checkbox"]):not([type="radio"]),
.receipt-line-fields select,
.seed-use-row input:not([type="checkbox"]):not([type="radio"]),
.seed-use-row select {
    box-sizing: border-box;
    display: block;
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

.advanced-fields,
.seed-use-row {
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    margin: 1rem 0;
    padding: .75rem;
}

.form-actions {
    margin-top: 1rem;
}

.errorlist {
    color: var(--danger);
}

.messages {
    background: var(--pollen);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: .75rem 1rem;
}

.stats,
.filter-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.seed-use-list {
    display: grid;
    gap: 1rem;
}

.quiet-link {
    color: var(--blue);
    font-weight: 800;
    text-decoration: none;
}

.compact-page-heading h2 {
    font-size: clamp(1.35rem, 2vw, 2rem);
}

.map-editor {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    margin: 1rem auto 2rem;
    max-width: 1120px;
    padding: 1rem;
    width: calc(100% - 2rem);
}

.map-first-editor {
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    max-width: 1120px;
    width: min(1120px, calc(100% - 2rem));
}

.feature-shape-editor {
    display: grid;
    gap: 1rem;
}

.map-toolbar {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: .85rem;
}

.map-meta-grid {
    align-items: end;
    display: grid;
    gap: .65rem;
    grid-template-columns: minmax(160px, .75fr) minmax(180px, 1fr) minmax(180px, 1fr);
    width: min(720px, 100%);
}

.map-meta-grid label {
    margin-top: 0;
}

.map-toolbar span {
    color: var(--muted);
    display: block;
    margin-top: .2rem;
}

.inline-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: 0;
}

.map-canvas {
    aspect-ratio: 16 / 9;
    background: var(--field);
    border: 1px solid var(--line);
    border-radius: 8px;
    min-height: 420px;
    overflow: hidden;
    width: 100%;
}

.map-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr);
}

.farm-layout-editor .map-canvas {
    aspect-ratio: 16 / 9;
    min-height: 560px;
}

.map-first-editor .map-canvas {
    aspect-ratio: 16 / 9;
    min-height: 560px;
}

.map-feature-details {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
}

.feature-detail-panel {
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: .9rem;
}

.feature-detail-panel h3 {
    margin: 0 0 .65rem;
}

.feature-detail-panel label:first-child {
    margin-top: 0;
}

.feature-detail-panel input,
.feature-detail-panel select,
.feature-detail-panel textarea,
.map-meta-grid input,
.map-meta-grid select {
    max-width: none;
}

.feature-connection-panel select[multiple] {
    min-height: 8rem;
}

.receipt-import-grid,
.receipt-review-grid,
.receipt-source-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(260px, .7fr) minmax(0, 1.3fr);
}

.receipt-import-form textarea,
.receipt-review-form textarea,
.receipt-review-form input,
.receipt-review-form select {
    max-width: none;
}

.receipt-lines-section {
    padding-left: 0;
    padding-right: 0;
}

.receipt-line-list {
    display: grid;
    gap: .8rem;
}

.receipt-line-row {
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: .7rem;
}

.receipt-line-row.low-confidence {
    border-left: 4px solid var(--orange);
}

.receipt-line-row summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: .5rem;
    justify-content: space-between;
    font-weight: 900;
}

.receipt-line-fields {
    display: grid;
    gap: .55rem .7rem;
    grid-template-columns: minmax(120px, .7fr) minmax(220px, 1.6fr) minmax(110px, .7fr) repeat(3, minmax(92px, .55fr));
}

.receipt-line-fields .form-field {
    margin-bottom: 0;
}

[data-stock-field][hidden],
[data-crop-stock-details][hidden] {
    display: none;
}

.receipt-module-details {
    grid-column: 1 / -1;
}

.receipt-line-fields .field-label,
.receipt-line-fields label {
    margin-top: .6rem;
}

.receipt-warning-text,
.receipt-source-text {
    background: rgba(255, 253, 247, .78);
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    overflow: auto;
    padding: .75rem;
    white-space: pre-wrap;
}

.review-warning {
    border-left-color: var(--orange);
}

.receipt-unparsed-list {
    margin-bottom: 0;
}

.receipt-lines-details summary {
    cursor: pointer;
    font-weight: 900;
}

.nested-lines-table {
    font-size: .9rem;
    margin: .65rem 0 0;
}

.nested-lines-table th {
    background: var(--field);
    color: var(--ink);
}

.nested-lines-table th,
.nested-lines-table td {
    padding: .45rem;
}

.map-side-panel {
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: .9rem;
}

.map-side-panel h3 {
    margin-top: 0;
}

.map-option {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    margin: .8rem 0;
    padding: .65rem;
}

.shape-list {
    display: grid;
    gap: .55rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.shape-row {
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: grid;
    gap: .45rem;
    grid-template-columns: auto minmax(0, 1fr);
    padding: .55rem;
}

.shape-row strong,
.shape-row span:last-child {
    overflow: hidden;
    overflow-wrap: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: normal;
}

.shape-row span:last-child {
    color: var(--muted);
    font-size: .78rem;
    grid-column: 2;
    text-transform: uppercase;
}

.legend-swatch.map-farm {
    background: var(--blue);
}

.legend-swatch.map-pasture {
    background: #5E7F3A;
}

.legend-swatch.map-pasture.status-occupied,
.legend-swatch.map-pasture.status-animals-on {
    background: #F97316;
}

.legend-swatch.map-pasture.status-grazing {
    background: #5E7F3A;
}

.legend-swatch.map-pasture.status-resting {
    background: #3B82C4;
}

.legend-swatch.map-pasture.status-hay {
    background: #D6A514;
}

.legend-swatch.map-pasture.status-idle {
    background: #CBD5E1;
}

.legend-swatch.map-field_area {
    background: #C084FC;
}

.legend-swatch.map-feature {
    background: var(--ink);
}

.farm-layout-shell {
    background: #FFFDF7;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.farm-layout-svg {
    display: block;
    min-height: 520px;
    width: 100%;
}

.layout-shape polygon {
    stroke: var(--ink);
    stroke-linejoin: round;
    stroke-width: 2;
    transition: filter .15s ease, opacity .15s ease, stroke-width .15s ease;
}

.layout-shape a {
    cursor: pointer;
}

.layout-shape a:hover polygon,
.layout-shape a:focus polygon {
    filter: brightness(1.08);
    opacity: .92;
    stroke-width: 4;
}

.layout-farm polygon {
    fill: #DBEAFE;
    opacity: .55;
    stroke: var(--blue);
    stroke-width: 4;
}

.layout-pasture.status-animals-on polygon {
    fill: #F97316;
}

.layout-pasture.status-occupied polygon {
    fill: #E8792E;
}

.layout-pasture.status-grazing polygon {
    fill: #5E7F3A;
}

.layout-pasture.status-resting polygon {
    fill: #3B82C4;
}

.layout-pasture.status-hay polygon {
    fill: #D6A514;
}

.layout-pasture.status-idle polygon {
    fill: #CBD5E1;
}

.layout-pasture.status-unknown polygon,
.layout-pasture polygon {
    fill: #A7C957;
}

.layout-field_area polygon {
    fill: #C084FC;
}

.layout-feature polygon {
    fill: #1C1C1A;
    opacity: .78;
}

.layout-feature.status-pond polygon,
.layout-feature.status-well polygon {
    fill: #2563EB;
}

.layout-feature.status-house polygon,
.layout-feature.status-barn polygon,
.layout-feature.status-shed polygon,
.layout-feature.status-greenhouse polygon {
    fill: #7C5C2E;
}

.layout-feature.status-driveway polygon,
.layout-feature.status-path polygon,
.layout-feature.status-gate polygon,
.layout-feature.status-fence polygon {
    fill: #64748B;
}

.layout-feature-dot {
    fill: #1C1C1A;
    opacity: .94;
    stroke: #FFFDF7;
    stroke-width: 4;
}

.layout-feature-icon {
    dominant-baseline: middle;
    fill: #FFFDF7;
    font-size: 16px;
    font-weight: 900;
    pointer-events: none;
    text-anchor: middle;
}

.layout-shape text {
    dominant-baseline: middle;
    fill: var(--ink);
    font-size: 18px;
    font-weight: 900;
    paint-order: stroke;
    pointer-events: none;
    stroke: #FFFDF7;
    stroke-width: 5px;
    text-anchor: middle;
}

.layout-label {
    opacity: 0;
    transition: opacity .12s ease;
}

.layout-shape:hover .layout-label,
.layout-shape:focus-within .layout-label {
    opacity: 1;
}

.layout-hover-card {
    background: rgba(255, 253, 247, .98);
    border: 1px solid rgba(28, 28, 26, .22);
    border-radius: 8px;
    box-shadow: 0 16px 36px rgba(28, 28, 26, .22);
    left: 1rem;
    max-width: min(280px, calc(100% - 2rem));
    padding: .75rem;
    pointer-events: auto;
    position: absolute;
    top: 1rem;
    z-index: 20;
}

.layout-hover-card[hidden] {
    display: none;
}

.layout-hover-card > div:first-child {
    align-items: start;
    display: flex;
    gap: .55rem;
    justify-content: space-between;
}

.layout-hover-card [data-layout-use] {
    background: #ECE3D3;
    border-radius: 999px;
    color: var(--muted);
    flex: 0 0 auto;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .03em;
    padding: .32rem .45rem;
    text-transform: uppercase;
}

.layout-hover-card [data-layout-title] {
    font-size: 1.02rem;
    line-height: 1.15;
    text-align: right;
}

.layout-hover-card p {
    color: var(--muted);
    font-weight: 800;
    margin: .4rem 0 .55rem;
}

.layout-hover-card dl {
    display: grid;
    gap: .4rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 .65rem;
}

.layout-hover-card dl div {
    background: var(--field);
    border-radius: 6px;
    padding: .35rem;
}

.layout-hover-card dt {
    color: var(--muted);
    font-size: .62rem;
    font-weight: 900;
    text-transform: uppercase;
}

.layout-hover-card dd {
    font-size: .82rem;
    font-weight: 900;
    margin: .1rem 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.layout-hover-card a {
    display: inline-flex;
    font-size: .8rem;
    font-weight: 900;
}

.shape-row-highlight {
    border-color: var(--blue);
    box-shadow: 0 8px 20px rgba(37, 99, 235, .14);
}

.layout-farm text {
    font-size: 22px;
}

.layout-list {
    margin-top: 1rem;
}

.layout-list a {
    color: var(--ink);
    text-decoration: none;
}

.leaflet-container {
    color: var(--ink);
    font-family: inherit;
}

body > h2,
body > h3,
body > p,
body > form,
body > div,
body > section {
    padding-left: 1rem;
    padding-right: 1rem;
}

body > .ops-hero,
body > .ops-grid-section {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (max-width: 720px) {
    table {
        display: block;
        overflow-x: auto;
    }

    nav a,
    .actions a,
    button,
    .action-card {
        width: 100%;
    }

    .section-heading,
    .dashboard-status {
        display: block;
    }

    .land-card-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .land-status-pill {
        max-width: 8.5rem;
    }

    .layout-hover-card {
        left: .75rem !important;
        max-width: calc(100% - 1.5rem);
    }

    .layout-hover-card dl {
        grid-template-columns: 1fr;
    }

    .activity-row {
        grid-template-columns: 1fr;
    }

    .preference-row {
        grid-template-columns: 1fr;
    }

    .status-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 1rem;
    }

    .ops-hero {
        display: block;
    }

    .headline-grid {
        grid-template-columns: 1fr;
    }

    .ops-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 1rem;
    }

    .ops-board {
        grid-template-columns: 1fr;
    }

    .ops-tile,
    .tile-tasks,
    .tile-pastures,
    .tile-financials {
        grid-column: auto;
    }

    .ops-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .map-toolbar {
        align-items: stretch;
        display: grid;
    }

    .map-meta-grid {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .map-canvas {
        aspect-ratio: 3 / 4;
        min-height: 520px;
    }

    .map-layout {
        grid-template-columns: 1fr;
    }

    .map-feature-details {
        grid-template-columns: 1fr;
    }

    .receipt-import-grid,
    .receipt-review-grid,
    .receipt-source-grid,
    .receipt-line-fields {
        grid-template-columns: 1fr;
    }

    .map-first-editor {
        width: 100%;
    }
}
.record-list {
    display: grid;
    gap: 0.9rem;
}

.record-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--panel);
}

.record-card-main {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.record-card-main > * {
    hyphens: none;
    overflow-wrap: normal;
    word-break: normal;
}

.record-card-main strong {
    font-size: 1.05rem;
    line-height: 1.2;
}

.record-card-main strong a {
    color: inherit;
    text-decoration-color: rgba(37, 99, 235, .45);
    text-underline-offset: .16rem;
}

.record-card-main span:not(.eyebrow) {
    color: var(--muted);
}

.muted-card {
    opacity: 0.68;
}

.compact-metrics {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.compact-metrics span {
    min-width: 5.25rem;
    padding: 0.45rem 0.55rem;
    border-radius: 6px;
    background: var(--field);
    border: 1px solid var(--line-soft);
    text-align: center;
}

.compact-metrics strong,
.compact-metrics small {
    display: block;
    white-space: nowrap;
}

.compact-metrics small {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.record-card .record-actions {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    white-space: nowrap;
}

.record-card-details {
    border-top: 1px solid var(--line-soft);
    grid-column: 1 / -1;
    padding-top: .7rem;
}

.receipt-line-card-list {
    display: grid;
    gap: .45rem;
    margin-top: .6rem;
}

.receipt-line-card {
    align-items: center;
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-radius: 7px;
    display: grid;
    gap: .45rem .75rem;
    grid-template-columns: minmax(220px, 1fr) minmax(130px, auto) minmax(100px, auto) minmax(90px, auto) auto;
    padding: .55rem .65rem;
}

.receipt-line-card strong {
    line-height: 1.2;
}

.receipt-line-card span {
    color: var(--muted);
    font-size: .86rem;
}

.money-amount {
    color: var(--ink) !important;
    font-weight: 900;
    text-align: right;
}

.detail-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(280px, .7fr);
}

.detail-list {
    display: grid;
    gap: .45rem;
    margin: .75rem 0 0;
}

.detail-list div {
    border-bottom: 1px solid var(--line-soft);
    display: grid;
    gap: .75rem;
    grid-template-columns: 150px minmax(0, 1fr);
    padding: .45rem 0;
}

.detail-list dt {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.detail-list dd {
    margin: 0;
}

@media (max-width: 760px) {
    .record-card {
        grid-template-columns: 1fr;
    }

    .compact-metrics {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .receipt-line-card {
        grid-template-columns: 1fr;
    }

    .detail-grid,
    .detail-list div {
        grid-template-columns: 1fr;
    }

    .money-amount {
        text-align: left;
    }
}


.tag.poultry {
    background: #7C5C2E;
    color: #FFFDF7;
}

.task-overdue {
    color: var(--danger);
    font-weight: 900;
}

.tile-poultry {
    border-top-color: #7C5C2E;
}


.priority-section .attention-grid {
    align-items: start;
    grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
}

.task-group-card {
    display: grid;
    gap: .42rem;
    padding: .72rem .78rem;
}

.task-card-top {
    align-items: center;
    display: flex;
    gap: .5rem;
    justify-content: space-between;
}

.task-due {
    background: #F8F0E2;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    color: var(--muted);
    flex: 0 0 auto;
    font-size: .72rem;
    font-weight: 900;
    padding: .18rem .45rem;
    white-space: nowrap;
}

.task-title {
    line-height: 1.15;
    margin: 0;
}

.task-reason {
    color: var(--ink);
    display: -webkit-box;
    font-size: .93rem;
    line-height: 1.32;
    margin: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.task-related-list {
    display: flex;
    flex-wrap: wrap;
    gap: .32rem;
}

.task-related-list span {
    background: rgba(248, 240, 226, .8);
    border: 1px solid rgba(168, 145, 112, .32);
    border-radius: 999px;
    color: var(--muted) !important;
    font-size: .75rem;
    font-weight: 850;
    line-height: 1;
    max-width: 100%;
    overflow: hidden;
    padding: .34rem .45rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .38rem;
    margin-top: .1rem;
}

.task-actions a,
.task-actions button {
    background: #FFFDF7;
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    color: var(--ink);
    font-size: .86rem;
    font-weight: 900;
    line-height: 1.1;
    padding: .42rem .58rem;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.task-actions a {
    background: #EFE6D6;
    flex: 1 1 8rem;
}

.task-actions form {
    flex: 1 1 5.3rem;
    margin: 0;
}

.task-actions button {
    width: 100%;
}

.task-group-details {
    background: rgba(248, 240, 226, .52);
    border: 1px solid var(--line-soft);
    border-radius: 7px;
    margin-top: .1rem;
    padding: .55rem;
}

.task-group-details summary {
    color: var(--ink);
    cursor: pointer;
    font-size: .86rem;
    font-weight: 950;
}

.task-mini-list {
    display: grid;
    gap: .45rem;
    margin-top: .55rem;
}

.task-mini-row {
    align-items: center;
    background: rgba(255, 253, 247, .72);
    border: 1px solid rgba(216, 208, 191, .8);
    border-radius: 6px;
    display: grid;
    gap: .5rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: .45rem;
}

.task-mini-title {
    color: var(--ink) !important;
    font-size: .84rem;
    font-weight: 850;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-mini-actions {
    display: flex;
    gap: .28rem;
}

.task-mini-actions form {
    margin: 0;
}

.task-mini-actions button {
    font-size: .78rem;
    padding: .28rem .42rem;
    width: auto;
}

@media (max-width: 720px) {
    .priority-section .attention-grid {
        grid-template-columns: 1fr;
    }

    .task-mini-row {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .task-mini-actions {
        flex-wrap: wrap;
    }

    .task-mini-actions form {
        flex: 1 1 5rem;
    }
}


.timer-card {
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-left: 4px solid var(--blue);
    border-radius: 8px;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    margin-left: auto;
    min-width: min(340px, 100%);
    padding: .7rem .8rem;
}

.timer-card strong {
    display: block;
    line-height: 1.15;
}

.timer-card form {
    margin: 0;
}

.timer-card button {
    white-space: nowrap;
}

@media (max-width: 720px) {
    .timer-card {
        align-items: stretch;
        display: grid;
        margin-top: .75rem;
        min-width: 0;
    }

    .timer-card button {
        width: 100%;
    }
}


/* Dashboard tightening pass */
.ops-hero {
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: .9rem;
    padding-bottom: .8rem;
}

.ops-hero h2 {
    font-size: clamp(1.45rem, 2.6vw, 2.35rem);
}

.timer-card {
    border-left-width: 3px;
    gap: .65rem;
    min-width: 285px;
    padding: .55rem .65rem;
}

.timer-card .tag {
    margin-bottom: 0;
}

.timer-card strong {
    font-size: .92rem;
}

.timer-card button {
    padding: .42rem .65rem;
}


.mobile-timer-card {
    display: none;
}

.weather-body {
    align-items: stretch;
    display: grid;
    gap: .75rem;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
}

.weather-forecast-panel {
    min-width: 0;
}

.weather-timer-card {
    align-content: center;
    align-self: end;
    display: flex;
    gap: .7rem;
    justify-content: space-between;
    margin-left: 0;
    margin-top: auto;
    min-height: 96px;
    min-width: 0;
    padding: .75rem;
    width: 100%;
}

.weather-timer-card form {
    flex: 0 0 auto;
}

.weather-timer-card button {
    width: auto;
}

.compact-weather {
    display: flex;
    flex-direction: column;
    padding: .85rem;
}

.compact-weather .weather-body {
    flex: 1 1 auto;
}

.compact-weather .weather-card-header {
    margin-bottom: .65rem;
}

.compact-weather .weather-card-header h3 {
    font-size: 1rem;
}

.compact-weather .weather-card-header > strong {
    font-size: 1.65rem;
}


.weather-primary-metrics {
    display: grid;
    gap: .55rem;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    margin-bottom: .6rem;
}

.weather-primary-metrics > div {
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    min-width: 0;
    padding: .65rem .75rem;
}

.weather-primary-metrics span,
.weather-primary-metrics em {
    color: var(--muted);
    display: block;
    font-size: .72rem;
    font-style: normal;
    font-weight: 900;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.weather-primary-metrics strong {
    display: block;
    font-size: 1.65rem;
    line-height: 1;
    margin: .18rem 0;
    white-space: nowrap;
}

.weather-primary-rain {
    border-left: 4px solid var(--blue) !important;
}

.weather-primary-rain.rain-alert {
    border-left-color: var(--orange) !important;
}

.forecast-strip {
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: .65rem;
}

.forecast-strip div {
    background: var(--field);
    min-width: 0;
    padding: .55rem .6rem;
}

.forecast-strip strong,
.forecast-strip span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forecast-strip strong {
    font-size: 1rem;
    line-height: 1.05;
}

.forecast-strip span {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .02em;
    margin-top: .18rem;
    text-transform: uppercase;
}

.compact-weather-flags {
    margin-bottom: 0;
}

.classic-weather-outlook {
    border-top: 1px solid var(--line-soft);
    margin-bottom: .65rem;
    padding-top: .55rem;
}

.classic-weather-outlook > summary {
    color: var(--steel, #4f6682);
    cursor: pointer;
    font-size: .82rem;
    font-weight: 800;
}

.classic-weather-summary {
    display: grid;
    gap: .4rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: .55rem;
}

.classic-weather-summary div,
.classic-weather-days div {
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    min-width: 0;
    padding: .45rem .5rem;
}

.classic-weather-summary strong,
.classic-weather-summary span,
.classic-weather-days strong,
.classic-weather-days span {
    display: block;
}

.classic-weather-summary strong {
    font-size: .9rem;
    line-height: 1.1;
}

.classic-weather-summary span,
.classic-weather-days span {
    color: var(--muted);
    font-size: .68rem;
    margin-top: .15rem;
}

.classic-weather-days {
    display: grid;
    gap: .35rem;
    margin-top: .4rem;
}

.classic-weather-days div {
    display: flex;
    gap: .5rem;
    justify-content: space-between;
}

.classic-weather-days strong,
.classic-weather-days span {
    margin-top: 0;
}

@media (max-width: 700px) {
    .classic-weather-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .classic-weather-days div {
        align-items: start;
        flex-direction: column;
        gap: .15rem;
    }
}

.compact-weather-flags span {
    font-size: .78rem;
    padding: .22rem .48rem;
}

.weather-watchlist,
.compact-weather > .hint.weather-status,
.compact-weather > .weather-location-note {
    display: block;
}

.weather-location-note {
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.35;
    margin: .55rem 0 0;
}

.task-group-card {
    gap: .48rem;
    padding: .75rem;
}

.task-title {
    font-size: 1rem !important;
}

.task-reason {
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.25;
    -webkit-line-clamp: 2;
}

.task-related-list span {
    font-size: .7rem;
    padding: .28rem .4rem;
}

.task-group-details {
    background: transparent;
    border: 0;
    border-top: 1px solid var(--line-soft);
    border-radius: 0;
    padding: .45rem 0 0;
}

.task-group-details summary {
    font-size: .82rem;
}

.task-mini-list {
    gap: .35rem;
}

.task-mini-row {
    align-items: center;
    background: rgba(248, 240, 226, .5);
    border-color: rgba(216, 208, 191, .7);
    grid-template-columns: minmax(0, 1fr) auto;
    padding: .42rem;
}

.task-mini-copy {
    display: grid;
    gap: .12rem;
    min-width: 0;
}

.task-mini-copy strong,
.task-mini-copy span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-mini-copy strong {
    font-size: .82rem;
    line-height: 1.15;
}

.task-mini-copy span {
    color: var(--muted);
    font-size: .74rem;
}

.task-mini-actions {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: .25rem;
}

.task-mini-actions a,
.task-mini-actions button {
    background: #FFFDF7;
    border: 1px solid var(--line-soft);
    border-radius: 5px;
    color: var(--ink);
    display: inline-flex;
    font-size: .72rem;
    font-weight: 900;
    line-height: 1;
    padding: .32rem .38rem;
    text-decoration: none;
    white-space: nowrap;
    width: auto;
}

@media (max-width: 720px) {
    .ops-hero {
        display: flex;
        flex-direction: column;
        gap: .65rem;
    }

    .mobile-timer-card {
        display: grid;
        order: -1;
        width: 100%;
    }

    .weather-body {
        grid-template-columns: 1fr;
    }

    .weather-timer-card {
        display: none;
    }

    .weather-primary-metrics {
        grid-template-columns: 1fr;
    }

    .forecast-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .task-mini-row {
        grid-template-columns: 1fr;
    }

    .task-mini-actions {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    }

    .task-mini-actions a,
    .task-mini-actions button {
        justify-content: center;
        width: 100%;
    }
}


/* Stable task summary tiles */
.priority-section .attention-grid {
    align-items: stretch;
}

.task-group-card {
    grid-template-rows: auto auto auto minmax(2.35rem, 1fr) auto;
    min-height: 240px;
}

.task-related-list {
    align-content: start;
    min-height: 2.2rem;
    overflow: hidden;
}

.task-card-actions,
.task-open-list {
    align-self: end;
    margin-top: auto;
}

.task-open-list {
    border-top: 1px solid var(--line-soft);
    margin-top: .15rem;
    padding-top: .48rem;
}

.task-open-list-link {
    color: var(--ink);
    display: inline-flex;
    font-size: .88rem;
    font-weight: 950;
    line-height: 1.15;
    text-decoration: none;
}

.planner-do-form {
    margin: 0;
    min-width: 0;
}

.planner-do-form .planner-finish-link {
    width: 100%;
}

.task-open-list-link:hover {
    color: var(--blue);
}

.task-list-open {
    margin-top: .2rem;
}

.priority-section .task-list-open + .task-open-list {
    display: none;
}

@media (min-width: 721px) {
    .priority-section .attention-grid {
        grid-auto-rows: 1fr;
    }
}


/* Performance spine */
.performance-hero h2 {
    max-width: 820px;
}

.performance-stats {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.performance-candidate {
    border-left: 4px solid var(--orange);
}

.performance-decision {
    border-left: 4px solid #5E7F3A;
}

.performance-decision .compact-metrics {
    min-width: 170px;
}


/* Direct task workflow */
.task-title-link {
    color: var(--ink) !important;
    display: inline-block;
    text-decoration: none;
}

.task-title-link:hover,
.task-mini-title:hover,
.task-related-badge:hover {
    color: var(--orange) !important;
}

.task-related-list span,
.task-related-list a {
    background: rgba(248, 240, 226, .8);
    border: 1px solid rgba(168, 145, 112, .32);
    border-radius: 999px;
    color: var(--muted) !important;
    font-size: .75rem;
    font-weight: 850;
    line-height: 1;
    max-width: 100%;
    overflow: hidden;
    padding: .32rem .48rem;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.narrow-section {
    max-width: 860px;
}

.task-detail-card {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-left: 3px solid var(--orange);
    border-radius: 8px;
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.task-detail-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.task-detail-grid > div {
    background: rgba(248, 240, 226, .55);
    border: 1px solid rgba(216, 208, 191, .7);
    border-radius: 6px;
    display: grid;
    gap: .2rem;
    padding: .65rem;
}

.micro-label {
    color: var(--muted);
    display: block;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.task-detail-actions {
    align-items: center;
    border-top: 1px solid var(--line-soft);
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding-top: .75rem;
}

.task-detail-actions form {
    margin: 0;
}

.task-detail-actions a,
.task-detail-actions button,
.button-link {
    background: var(--button);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink) !important;
    display: inline-flex;
    font-weight: 900;
    justify-content: center;
    padding: .55rem .8rem;
    text-decoration: none;
    width: auto;
}

.task-mini-title {
    text-decoration: none;
}


/* Performance review context */
.performance-context-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .45rem;
}

.performance-context-chips span {
    align-items: center;
    background: rgba(248, 240, 226, .75);
    border: 1px solid rgba(168, 145, 112, .35);
    border-radius: 999px;
    color: var(--muted);
    display: inline-flex;
    font-size: .74rem;
    font-weight: 850;
    gap: .3rem;
    max-width: 100%;
    padding: .28rem .46rem;
    white-space: nowrap;
}

.performance-context-chips b {
    color: var(--ink);
    font-size: .78rem;
}


.performance-suggestion {
    border-left: 3px solid var(--orange);
    color: var(--ink) !important;
    display: inline-block;
    font-weight: 900;
    margin-top: .35rem;
    padding-left: .45rem;
}

/* Guided setup / orientation */
.setup-path-section {
    border-left: 3px solid var(--blue);
}

.setup-path-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.setup-step-card {
    align-content: start;
    background: linear-gradient(180deg, rgba(248, 240, 226, .8), rgba(255, 252, 246, .92));
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    color: var(--ink);
    display: grid;
    gap: .42rem;
    min-height: 148px;
    padding: .8rem;
    position: relative;
    text-decoration: none;
}

.setup-step-card:hover,
.setup-step-card:focus-visible {
    border-color: var(--orange);
    box-shadow: 0 2px 0 rgba(255, 107, 31, .16);
    outline: none;
}

.setup-step-number {
    align-items: center;
    background: var(--ink);
    border-radius: 999px;
    color: white;
    display: inline-flex;
    font-size: .78rem;
    font-weight: 950;
    height: 1.55rem;
    justify-content: center;
    width: 1.55rem;
}

.setup-step-card strong,
.setup-step-card span,
.setup-step-card em {
    overflow-wrap: normal;
    word-break: normal;
}

.setup-step-card strong {
    font-size: .98rem;
    line-height: 1.18;
}

.setup-step-card > span:not(.setup-step-number) {
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.28;
}

.setup-step-card em {
    align-self: end;
    color: var(--blue);
    font-style: normal;
    font-weight: 900;
    margin-top: auto;
}

@media (max-width: 720px) {
    .setup-path-grid {
        grid-template-columns: 1fr;
    }

    .setup-step-card {
        min-height: 0;
    }
}

/* Performance objectives */
.objective-guide-section {
    border-left: 3px solid var(--orange);
}

.objective-preset-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.objective-preset {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    color: var(--ink);
    cursor: pointer;
    display: grid;
    gap: .38rem;
    padding: .8rem;
    text-align: left;
}

.objective-preset:hover,
.objective-preset:focus-visible {
    border-color: var(--orange);
    box-shadow: 0 2px 0 rgba(255, 107, 31, .16);
    outline: none;
}

.objective-preset strong,
.objective-preset span {
    overflow-wrap: normal;
    word-break: normal;
}

.objective-preset strong {
    font-size: .98rem;
    line-height: 1.2;
}

.objective-preset > span:last-child {
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.3;
}

.performance-objective-form {
    max-width: 1120px;
}

.objective-form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
    margin: 0;
    max-width: none;
}

.objective-form-main,
.objective-form-helper,
.objective-advanced {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: 1rem;
}

.objective-form-main h3 {
    margin-top: 0;
}

.objective-form-helper {
    align-self: start;
    display: grid;
    gap: .65rem;
}

.objective-form-helper strong {
    font-size: 1rem;
    line-height: 1.2;
}

.objective-form-helper p {
    color: var(--muted);
    margin: 0;
}

.objective-form-helper dl,
.objective-mini-list {
    display: grid;
    gap: .5rem;
    margin: 0;
}

.objective-form-helper dl div,
.objective-mini-list div {
    background: rgba(248, 240, 226, .66);
    border: 1px solid rgba(168, 145, 112, .24);
    border-radius: 6px;
    padding: .5rem;
}

.objective-form-helper dt,
.objective-mini-list dt {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.objective-form-helper dd,
.objective-mini-list dd {
    margin: .1rem 0 0;
}

.objective-advanced {
    margin-top: 1rem;
}

.objective-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.objective-card {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.objective-card-top {
    align-items: center;
    display: flex;
    gap: .5rem;
    justify-content: space-between;
}

.objective-state {
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    color: var(--muted);
    font-size: .7rem;
    font-weight: 900;
    padding: .18rem .45rem;
    text-transform: uppercase;
}

.objective-state.active {
    background: rgba(94, 127, 58, .12);
    color: #3F642B;
}

.objective-state.inactive {
    background: rgba(101, 100, 95, .12);
}

.objective-metric {
    color: var(--blue);
    font-weight: 900;
}

.objective-card p {
    color: var(--muted);
    margin: 0;
}

.objective-card .module-links {
    margin-top: auto;
}

.objective-empty {
    align-items: start;
    display: grid;
    gap: .4rem;
}

.objective-empty a {
    color: var(--blue);
    font-weight: 900;
}

@media (max-width: 780px) {
    .objective-form-grid {
        grid-template-columns: 1fr;
    }
}


/* User display preferences */
.pref-theme-high_contrast {
    --bg: #FAFAFA;
    --panel: #FFFFFF;
    --ink: #111111;
    --muted: #3F3F3F;
    --line: #111111;
    --line-soft: #B8B8B8;
    --field: #EFEFEF;
}

.pref-theme-soft {
    --bg: #F7F6F1;
    --panel: #FFFDF8;
    --ink: #24231F;
    --muted: #706C60;
    --line-soft: #DDD6C8;
    --field: #F1EDE2;
}

.pref-density-compact {
    font-size: 14px;
}

.pref-density-compact .dashboard-section,
.pref-density-compact .dashboard-status,
.pref-density-compact .record-form {
    margin-bottom: .85rem;
}

.pref-density-compact .action-card,
.pref-density-compact .activity-row,
.pref-density-compact .preference-row,
.pref-density-compact .panel,
.pref-density-compact .empty-panel {
    padding: .65rem;
}

.pref-density-compact .quick-actions {
    gap: .55rem;
}

.pref-detail-summary .lede,
.pref-detail-summary .section-heading p,
.pref-detail-summary .weather-insights,
.pref-detail-summary .record-card-main span {
    display: none;
}

.pref-detail-detailed .activity-row {
    grid-template-columns: minmax(120px, .35fr) minmax(120px, .35fr) minmax(0, 1fr);
}

.pref-hide-weather .weather-card,
.pref-hide-weather .weather-panel,
.pref-hide-maps .layout-thumbnail-link,
.pref-hide-maps .farm-layout-thumb-shell,
.pref-hide-money .money-value,
.pref-hide-money [data-sensitive="money"] {
    display: none;
}

.notification-action-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.preferences-form {
    display: grid;
    gap: 1.15rem;
    padding: 1rem;
}

.preference-section {
    display: grid;
    gap: .75rem;
}

.display-preference-grid label,
.preference-toggle-grid label {
    display: grid;
    gap: .4rem;
    margin: 0;
}

.preference-toggle-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}


/* Intent landing pages */
.intent-page {
    display: grid;
    gap: 1rem;
    padding: 0 1rem 1.5rem;
}

.intent-page > section,
.intent-page > .dashboard-section {
    margin-bottom: 0;
    max-width: 1120px;
    width: 100%;
}

.intent-page {
    --intent-accent: var(--orange);
    --intent-accent-dark: #8F3C16;
    --intent-accent-soft: rgba(242, 107, 33, .14);
    --intent-surface: rgba(255, 253, 247, .9);
}

.intent-bees {
    --intent-accent: #D69E17;
    --intent-accent-dark: #6F4B00;
    --intent-accent-soft: rgba(214, 158, 23, .18);
}

.intent-poultry {
    --intent-accent: #B65A2A;
    --intent-accent-dark: #783719;
    --intent-accent-soft: rgba(182, 90, 42, .16);
}

.intent-barn {
    --intent-accent: #6B5B45;
    --intent-accent-dark: #3F3326;
    --intent-accent-soft: rgba(107, 91, 69, .17);
}

.intent-fields {
    --intent-accent: #4F7A35;
    --intent-accent-dark: #2F4F1E;
    --intent-accent-soft: rgba(79, 122, 53, .16);
}

.intent-farm {
    --intent-accent: var(--orange);
    --intent-accent-dark: #8F3C16;
    --intent-accent-soft: rgba(242, 107, 33, .14);
}

.intent-landing-hero {
    background:
        linear-gradient(90deg, rgba(28, 28, 26, .055) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 253, 247, .94), rgba(248, 240, 226, .58));
    background-size: 30px 30px, auto;
    border: 1px solid var(--line-soft);
    border-top: 5px solid var(--intent-accent);
    border-radius: 8px;
    display: grid;
    gap: .85rem;
    grid-template-columns: 1fr;
    padding: 1rem;
}

.intent-hero-copy {
    display: grid;
    gap: .65rem;
}

.intent-landing-hero .eyebrow,
.intent-setup-copy .eyebrow {
    color: var(--intent-accent-dark);
    margin: 0;
}

.intent-landing-hero h2 {
    font-size: clamp(2.15rem, 13vw, 4.35rem);
    line-height: .96;
    margin: 0;
    overflow-wrap: anywhere;
}

.intent-headline {
    color: var(--ink);
    font-size: clamp(1.1rem, 5vw, 1.55rem);
    font-weight: 880;
    line-height: 1.16;
    margin: 0;
    max-width: 900px;
}

.intent-landing-hero .lede {
    font-size: 1rem;
    margin: 0;
    max-width: 760px;
}

.intent-actions {
    display: grid;
    gap: .55rem;
    grid-template-columns: 1fr;
    margin-top: .3rem;
}

.intent-actions .button-link,
.intent-actions .button-link:visited,
.intent-bottom-actions .button-link,
.intent-bottom-actions .button-link:visited {
    align-items: center;
    background: #FFFDF7;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--ink) !important;
    display: inline-flex;
    font-weight: 950;
    justify-content: center;
    line-height: 1.1;
    min-height: 3rem;
    padding: .78rem 1rem;
    text-align: center;
    text-decoration: none;
    width: 100%;
}

.intent-actions .button-link.primary,
.intent-actions .button-link.primary:visited,
.intent-bottom-actions .button-link.primary,
.intent-bottom-actions .button-link.primary:visited {
    background: var(--intent-accent-dark);
    border-color: var(--intent-accent-dark);
    color: #FFFDF7 !important;
}

.intent-actions .button-link:hover,
.intent-bottom-actions .button-link:hover {
    background: var(--pollen);
    color: var(--ink) !important;
}

.intent-actions .button-link.primary:hover,
.intent-bottom-actions .button-link.primary:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: #FFFDF7 !important;
}

.intent-proof-panel {
    background: var(--intent-surface);
    border: 1px solid rgba(28, 28, 26, .16);
    border-left: 5px solid var(--intent-accent);
    border-radius: 8px;
    display: grid;
    gap: .7rem;
    padding: .85rem;
}

.intent-proof-panel .tag,
.intent-record-card .tag {
    background: var(--intent-accent-dark);
    color: #FFFDF7;
    margin: 0;
    width: fit-content;
}

.intent-proof-panel strong {
    font-size: 1.02rem;
    line-height: 1.22;
}

.intent-proof-list {
    display: grid;
    gap: .4rem;
}

.intent-proof-list span {
    background: rgba(248, 240, 226, .74);
    border: 1px solid rgba(168, 145, 112, .34);
    border-radius: 6px;
    color: var(--ink);
    display: block;
    font-size: .9rem;
    font-weight: 760;
    line-height: 1.26;
    padding: .52rem .58rem;
}

.intent-evidence-band {
    display: grid;
    gap: .45rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.intent-evidence-band span {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-top: 3px solid var(--intent-accent);
    border-radius: 7px;
    color: var(--ink);
    font-size: .78rem;
    font-weight: 950;
    letter-spacing: .04em;
    line-height: 1.1;
    min-height: 3rem;
    padding: .62rem .7rem;
    text-transform: uppercase;
}

.intent-section-heading {
    align-items: start;
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: .7rem;
    padding-bottom: .55rem;
}

.intent-section-heading h3,
.intent-setup-copy h3 {
    border-left-color: var(--intent-accent);
    letter-spacing: .02em;
    margin: 0 0 .35rem;
}

.intent-section-heading p,
.intent-setup-copy p {
    color: var(--muted);
    line-height: 1.32;
    margin: 0;
}

.intent-record-grid,
.intent-decision-grid {
    display: grid;
    gap: .65rem;
    grid-template-columns: 1fr;
}

.intent-record-card,
.intent-decision-card,
.intent-next-section {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
}

.intent-record-card {
    border-left: 4px solid var(--intent-accent);
    display: grid;
    gap: .55rem;
    padding: .78rem;
}

.intent-record-card p {
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.32;
    margin: 0;
}

.intent-decision-card {
    align-items: start;
    display: grid;
    gap: .62rem;
    grid-template-columns: auto minmax(0, 1fr);
    padding: .78rem;
}

.intent-decision-card span {
    align-items: center;
    background: var(--intent-accent-dark);
    border-radius: 999px;
    color: #FFFDF7;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .78rem;
    font-weight: 950;
    height: 1.7rem;
    justify-content: center;
    width: 1.7rem;
}

.intent-decision-card strong {
    font-size: .98rem;
    line-height: 1.24;
}

.intent-next-section {
    border-left: 5px solid var(--intent-accent);
    display: grid;
    gap: .8rem;
    padding: .9rem;
}

.intent-setup-steps {
    counter-reset: setup;
    display: grid;
    gap: .45rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.intent-setup-steps li {
    align-items: center;
    background: var(--intent-accent-soft);
    border: 1px solid rgba(28, 28, 26, .1);
    border-radius: 6px;
    display: grid;
    font-weight: 850;
    gap: .55rem;
    grid-template-columns: auto minmax(0, 1fr);
    line-height: 1.22;
    padding: .55rem .6rem;
}

.intent-setup-steps li::before {
    align-items: center;
    background: var(--intent-accent-dark);
    border-radius: 999px;
    color: #FFFDF7;
    content: counter(setup);
    counter-increment: setup;
    display: inline-flex;
    font-size: .75rem;
    font-weight: 950;
    height: 1.45rem;
    justify-content: center;
    width: 1.45rem;
}

.intent-bottom-actions {
    margin-top: 0;
}

@media (max-width: 720px) {
    body:has(.intent-page) > header {
        margin-bottom: .65rem;
        padding: .75rem .85rem;
    }

    body:has(.intent-page) .site-title {
        font-size: 1.55rem;
        margin-bottom: .65rem;
    }

    body:has(.intent-page) nav {
        align-items: stretch;
        display: grid;
        gap: .45rem;
        grid-template-columns: 1fr 1fr;
    }

    body:has(.intent-page) nav a,
    body:has(.intent-page) nav button {
        min-width: 0;
        padding: .58rem .6rem;
        text-align: center;
        width: 100%;
    }

    body:has(.intent-page) .logout-form {
        display: block;
    }
}

@media (min-width: 560px) {
    .intent-actions {
        display: flex;
        flex-wrap: wrap;
    }

    .intent-actions .button-link,
    .intent-bottom-actions .button-link {
        width: auto;
    }

    .intent-evidence-band {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 780px) {
    .intent-page {
        gap: 1.15rem;
    }

    .intent-landing-hero {
        align-items: stretch;
        gap: 1rem;
        grid-template-columns: minmax(0, 1fr) minmax(300px, .45fr);
        padding: 1.15rem;
    }

    .intent-hero-copy {
        align-content: center;
        min-height: 330px;
    }

    .intent-record-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .intent-decision-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .intent-next-section {
        align-items: start;
        grid-template-columns: minmax(0, .8fr) minmax(280px, 1fr) auto;
        padding: 1rem;
    }

    .intent-bottom-actions {
        justify-content: end;
    }
}




/* Landing polish */
.intent-page {
    gap: .85rem;
}

.intent-landing-hero {
    box-shadow: 0 12px 26px rgba(28, 28, 26, .07);
    overflow: hidden;
    position: relative;
}

.intent-landing-hero::after {
    background: var(--intent-accent);
    border-radius: 999px;
    content: '';
    height: .55rem;
    position: absolute;
    right: 1rem;
    top: 1rem;
    width: 3.5rem;
}

.intent-hero-copy {
    max-width: 780px;
}

.intent-landing-hero h2 {
    font-size: clamp(2rem, 10vw, 4rem);
    max-width: 11ch;
}

.intent-headline {
    font-size: clamp(1.08rem, 4vw, 1.42rem);
    max-width: 760px;
}

.intent-landing-hero .lede,
.intent-proof-panel strong,
.intent-proof-list span,
.intent-record-card p,
.intent-section-heading p,
.intent-setup-copy p {
    text-wrap: pretty;
}

.intent-proof-panel {
    align-content: start;
}

.intent-proof-panel strong {
    font-size: .98rem;
}

.intent-proof-list span {
    font-size: .86rem;
}

.intent-evidence-band span {
    align-items: center;
    display: flex;
    justify-content: center;
    text-align: center;
}

.intent-record-card,
.intent-decision-card {
    box-shadow: 0 1px 0 rgba(28, 28, 26, .04);
}

.intent-record-card p {
    font-size: .9rem;
}

.intent-decision-card strong {
    font-size: .94rem;
}

.intent-next-section {
    box-shadow: inset 0 0 0 1px rgba(255, 253, 247, .7);
}

@media (min-width: 780px) {
    .intent-landing-hero {
        grid-template-columns: minmax(0, 1.05fr) minmax(280px, .48fr);
        min-height: 430px;
    }

    .intent-hero-copy {
        min-height: 0;
    }

    .intent-next-section {
        grid-template-columns: minmax(0, .85fr) minmax(300px, 1fr);
    }

    .intent-bottom-actions {
        grid-column: 1 / -1;
        justify-content: start;
    }
}

@media (max-width: 720px) {
    .intent-page {
        padding-left: .75rem;
        padding-right: .75rem;
    }

    .intent-landing-hero {
        padding: .9rem;
    }

    .intent-landing-hero::after {
        right: .9rem;
        top: .9rem;
        width: 2.5rem;
    }

    .intent-landing-hero h2 {
        padding-right: 2.25rem;
    }

    .intent-proof-panel,
    .intent-record-card,
    .intent-decision-card,
    .intent-next-section {
        border-radius: 7px;
    }

    .intent-section-heading {
        display: block;
    }

    .intent-setup-steps li {
        font-size: .92rem;
    }
}

/* Connected equipment control-panel refinement. Scoped to the existing sensor
   screens so hardware behavior and other module layouts remain untouched. */
.sensor-page {
    display: grid;
    gap: 1rem;
    margin: 1rem auto 2rem;
    max-width: 1100px;
    overflow-x: clip;
    padding: 0;
    width: min(calc(100% - 2rem), 1100px);
}

.sensor-page a:not(.primary-button):not(.secondary-button):not(.danger-button) {
    color: var(--ink);
    text-decoration-color: var(--orange);
    text-decoration-thickness: 2px;
    text-underline-offset: .16em;
}

.sensor-page .primary-button,
.sensor-page .secondary-button,
.sensor-page .danger-button {
    align-items: center;
    border-radius: var(--yfs-radius-control, 8px);
    display: inline-flex;
    justify-content: center;
    min-height: 44px;
    text-align: center;
    text-decoration: none;
}

.sensor-page .primary-button { color: #fff; }
.sensor-page .secondary-button { color: var(--ink); }
.sensor-page .danger-button { color: #fff; }

.sensor-control-header,
.sensor-page-heading {
    align-items: center;
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-left: 4px solid var(--orange);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(24, 24, 23, .045);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.1rem;
}

.sensor-control-header .eyebrow,
.sensor-page-heading .eyebrow { margin: 0 0 .16rem; }

.sensor-control-header h2,
.sensor-page-heading h2 {
    font-size: clamp(1.35rem, 2.4vw, 1.9rem);
    letter-spacing: 0;
    margin: 0;
}

.sensor-header-identity { min-width: 0; }
.sensor-assignment { font-size: .9rem; margin: .32rem 0 0; }

.sensor-header-controls,
.sensor-list-header-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    justify-content: flex-end;
}

.sensor-connection-summary {
    align-items: center;
    background: var(--paper-deep);
    border: 1px solid var(--line-soft);
    border-radius: 9px;
    display: flex;
    gap: .48rem;
    padding: .48rem .62rem;
}

.sensor-connection-summary strong,
.sensor-connection-summary span:not(.sensor-status-dot) {
    display: block;
    line-height: 1.2;
}

.sensor-connection-summary strong { color: var(--ink); font-size: .78rem; }
.sensor-connection-summary span:not(.sensor-status-dot) { color: var(--muted); font-size: .72rem; margin-top: .08rem; }

.sensor-status-dot {
    background: var(--green);
    border: 2px solid rgba(62, 100, 67, .16);
    border-radius: 50%;
    flex: 0 0 auto;
    height: .7rem;
    width: .7rem;
}

.sensor-status-dot.is-idle { background: var(--steel); border-color: rgba(77, 102, 128, .14); }
.sensor-header-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .55rem; }
.sensor-connect-panel { display: grid; gap: .2rem; }
.sensor-connection-state { color: var(--muted); font-size: .72rem; font-weight: 700; max-width: 15rem; }

.sensor-operation-panel,
.sensor-config-section,
.sensor-history-section,
.sensor-maintenance-section,
.sensor-advanced-section,
.sensor-technical-details {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    box-shadow: 0 5px 16px rgba(24, 24, 23, .035);
}

.sensor-operation-panel { padding: 1rem 1.1rem; }
.sensor-panel-heading,
.sensor-section-heading {
    align-items: start;
    display: flex;
    gap: .65rem;
    justify-content: space-between;
    margin: 0 0 .75rem;
}

.sensor-panel-heading h3,
.sensor-section-heading h3 { color: var(--ink); font-size: 1.08rem; margin: 0; }
.sensor-panel-heading .eyebrow,
.sensor-section-heading .eyebrow { margin: 0 0 .12rem; }
.sensor-sync-state,
.sensor-section-note { flex: 0 0 auto; font-size: .72rem; max-width: 13rem; text-align: right; }

.sensor-live-grid {
    align-items: stretch;
    display: grid;
    gap: .6rem;
    grid-template-columns: minmax(15rem, 1.2fr) repeat(2, minmax(0, .9fr));
}

.sensor-status-grid.sensor-live-grid > article,
.sensor-status-grid.sensor-live-grid > article + article {
    border: 0;
    min-height: 0;
}

.sensor-status-grid .sensor-primary-reading {
    background: var(--surface);
    border: 0;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 13rem;
    padding: 1rem;
    grid-row: span 3;
}

.sensor-status-grid .sensor-primary-reading span,
.sensor-status-grid .sensor-primary-reading small { color: rgba(255, 255, 255, .78); }
.sensor-status-grid .sensor-primary-reading strong { color: #fff; font-size: clamp(2.55rem, 5vw, 4.3rem); letter-spacing: -.03em; line-height: .96; margin: .45rem 0 auto; overflow-wrap: anywhere; }

.sensor-status-grid.sensor-live-grid > article:not(.sensor-primary-reading) {
    background: var(--paper-deep);
    border: 1px solid var(--line-soft);
    border-radius: 9px;
    display: grid;
    gap: .18rem;
    min-height: 6.1rem;
    padding: .7rem .75rem;
}

.sensor-status-grid strong { color: var(--ink); font-size: 1.05rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.sensor-status-grid small { color: var(--muted); font-size: .7rem; line-height: 1.28; }
.sensor-status-grid span { color: var(--muted); font-size: .66rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }

.sensor-workspace-actions {
    align-items: center;
    border-top: 1px solid var(--line-soft);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: .85rem;
    padding-top: .85rem;
}

.sensor-workspace-actions h3 { color: var(--ink); font-size: 1rem; margin: 0; }
.sensor-workspace-actions p:not(.eyebrow) { color: var(--muted); font-size: .8rem; margin: .14rem 0 0; max-width: 35rem; }
.sensor-primary-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .48rem; justify-content: flex-end; }
.sensor-utility-action { font-size: .86rem; }
.sensor-live-message { color: var(--muted); font-size: .79rem; margin: .7rem 0 0; }

.sensor-config-section,
.sensor-history-section { padding: 1rem 1.1rem; }
.sensor-configuration-grid { display: grid; gap: .7rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sensor-configuration-card { background: var(--paper-deep); border: 1px solid var(--line-soft); border-radius: 9px; padding: .85rem; }
.sensor-configuration-card .sensor-panel-heading { margin-bottom: .55rem; }
.sensor-configuration-card .record-form { margin: 0; }
.sensor-configuration-card .form-field { margin: 0 0 .65rem; }
.sensor-configuration-card .form-actions { margin: .65rem 0 0; }
.sensor-configuration-card details { border-top: 1px solid var(--line-soft); margin-top: .55rem; padding-top: .55rem; }
.sensor-configuration-card details summary { color: var(--ink); font-size: .82rem; font-weight: 800; }
.sensor-configuration-card .checkbox-field { align-items: start; display: grid; gap: .25rem .55rem; grid-template-columns: auto 1fr; }
.sensor-configuration-card .checkbox-field .helptext { grid-column: 2; margin: 0; }

.sensor-maintenance-section,
.sensor-advanced-section,
.sensor-technical-details { overflow: clip; }
.sensor-maintenance-section > summary,
.sensor-advanced-section > summary,
.sensor-technical-details > summary {
    align-items: center;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    font-weight: 850;
    justify-content: space-between;
    min-height: 3.4rem;
    padding: .75rem 1rem;
}
.sensor-maintenance-section > summary small,
.sensor-technical-details > summary small { color: var(--muted); display: block; font-size: .73rem; font-weight: 600; margin-top: .08rem; }
.sensor-maintenance-section[open] > summary,
.sensor-advanced-section[open] > summary,
.sensor-technical-details[open] > summary { border-bottom: 1px solid var(--line-soft); }
.sensor-calibration-disclosure,
.sensor-firmware-notice,
.sensor-advanced-section .sensor-panel-heading,
.sensor-advanced-section .record-form,
.sensor-raw-section { margin: 0; padding: .9rem 1rem; }
.sensor-calibration-disclosure p { color: var(--muted); font-size: .84rem; margin: 0 0 .75rem; max-width: 50rem; }
.sensor-calibration-actions { align-items: end; display: flex; flex-wrap: wrap; gap: .55rem; }
.sensor-calibration-actions .known-weight { align-items: end; display: flex; flex: 1 1 18rem; flex-wrap: wrap; gap: .55rem; }
.sensor-calibration-actions .known-weight label { flex: 1 1 10rem; }
.sensor-firmware-notice { align-items: center; background: var(--paper-deep); border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; gap: .45rem .7rem; }
.sensor-firmware-notice strong { color: var(--ink); }
.sensor-firmware-notice span { color: var(--muted); font-size: .8rem; }

.sensor-compact-empty { align-items: start; background: var(--paper-deep); border: 1px dashed var(--line-soft); border-radius: 9px; color: var(--muted); display: grid; gap: .18rem; min-height: 0; padding: 1rem; }
.sensor-compact-empty strong { color: var(--ink); }
.sensor-compact-empty span { font-size: .83rem; }
.sensor-history-section canvas { display: block; max-height: 240px; max-width: 100%; width: 100%; }

.sensor-device-list { display: grid; gap: .7rem; }
.sensor-device-card { align-items: center; background: var(--card); border: 1px solid var(--line-soft); border-left: 4px solid var(--steel); border-radius: 10px; display: grid; gap: .75rem; grid-template-columns: minmax(13rem, 1.35fr) minmax(10rem, .8fr) minmax(7rem, .45fr) auto; padding: .9rem 1rem; }
.sensor-device-main h3 { color: var(--ink); margin: .1rem 0; }
.sensor-device-bluetooth { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.sensor-device-state { align-items: center; display: flex; gap: .45rem; }
.sensor-device-state strong,
.sensor-device-state small { display: block; }
.sensor-device-state strong { color: var(--ink); font-size: .8rem; }
.sensor-device-state small { color: var(--muted); font-size: .72rem; margin-top: .08rem; }
.sensor-device-meta { margin: 0; }
.sensor-device-meta div { background: var(--paper-deep); border-radius: 8px; padding: .48rem .58rem; }
.sensor-device-meta dt { color: var(--muted); font-size: .66rem; font-weight: 800; text-transform: uppercase; }
.sensor-device-meta dd { color: var(--ink); font-size: 1.05rem; font-weight: 850; margin: .1rem 0 0; }
.sensor-device-actions { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: flex-end; }
.sensor-back-link.secondary-button::before { content: none; }

.equipment-settings-entry { padding: 1rem 1.1rem; }
.equipment-settings-layout { align-items: center; gap: 1rem; }
.equipment-settings-copy { max-width: 48rem; }
.equipment-settings-entry .equipment-entry-action { flex: 0 0 auto; }

.sensor-technical-details .table-wrap { margin: 0; overflow: hidden; }
.sensor-technical-details table { border-collapse: collapse; min-width: 0; table-layout: fixed; width: 100%; }
.sensor-technical-details th,
.sensor-technical-details td { overflow-wrap: anywhere; padding: .6rem .55rem; vertical-align: top; }
.sensor-technical-details th { color: var(--muted); font-size: .7rem; }
.sensor-technical-details td { color: var(--ink); font-size: .82rem; font-variant-numeric: tabular-nums; }

@media (max-width: 800px) {
    .sensor-live-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .sensor-status-grid .sensor-primary-reading { min-height: 10rem; }
    .sensor-status-grid .sensor-primary-reading { grid-column: 1 / -1; grid-row: auto; }
    .sensor-device-card { grid-template-columns: minmax(0, 1fr) auto; }
    .sensor-device-meta { grid-column: 1; }
    .sensor-device-actions { grid-column: 1 / -1; justify-content: start; }
}

@media (max-width: 600px) {
    .sensor-page { gap: .8rem; margin-top: .7rem; width: calc(100% - 1rem); }
    .sensor-control-header,
    .sensor-page-heading { align-items: stretch; display: grid; padding: .85rem; }
    .sensor-header-controls,
    .sensor-list-header-actions { align-items: stretch; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sensor-header-controls .sensor-connection-summary,
    .sensor-header-controls .sensor-header-actions,
    .sensor-list-header-actions .primary-button { grid-column: 1 / -1; }
    .sensor-header-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sensor-connect-panel,
    .sensor-header-actions > .secondary-button { grid-column: 1 / -1; }
    .sensor-connect-panel .primary-button,
    .sensor-header-actions > .secondary-button { width: 100%; }
    .sensor-operation-panel,
    .sensor-config-section,
    .sensor-history-section { padding: .85rem; }
    .sensor-panel-heading,
    .sensor-section-heading { align-items: start; }
    .sensor-sync-state,
    .sensor-section-note { font-size: .66rem; max-width: 8.5rem; }
    .sensor-live-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sensor-status-grid .sensor-primary-reading { grid-column: 1 / -1; }
    .sensor-status-grid.sensor-live-grid > article:not(.sensor-primary-reading) { min-height: 5.55rem; padding: .62rem; }
    .sensor-workspace-actions { align-items: stretch; display: grid; gap: .75rem; }
    .sensor-primary-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
    .sensor-primary-actions .primary-button { grid-column: 1 / -1; }
    .sensor-primary-actions > * { min-width: 0; width: 100%; }
    .sensor-configuration-grid { grid-template-columns: minmax(0, 1fr); }
    .sensor-calibration-actions,
    .sensor-calibration-actions .known-weight { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
    .sensor-calibration-actions .secondary-button { width: 100%; }
    .sensor-device-card { display: grid; grid-template-columns: minmax(0, 1fr); padding: .85rem; }
    .sensor-device-state,
    .sensor-device-meta,
    .sensor-device-actions { grid-column: auto; }
    .sensor-device-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sensor-device-actions > * { width: 100%; }
    .sensor-technical-details .table-wrap,
    .sensor-technical-details table,
    .sensor-technical-details tbody { display: block; width: 100%; }
    .sensor-technical-details thead { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
    .sensor-technical-details tbody { display: grid; gap: .5rem; }
    .sensor-technical-details tr { background: var(--paper-deep); border: 1px solid var(--line-soft); border-radius: 8px; display: grid; gap: .3rem; padding: .55rem .65rem; }
    .sensor-technical-details td { align-items: baseline; border: 0; display: grid; font-size: .8rem; gap: .65rem; grid-template-columns: 5.5rem minmax(0, 1fr); padding: 0; }
    .sensor-technical-details td::before { color: var(--muted); content: attr(data-label); font-size: .66rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
}

/* Farm home dashboard: compact app chrome and a clear operational reading order. */
body > header {
    padding-block: .7rem;
}

body header .app-header-top {
    align-items: center;
    display: flex !important;
    gap: .7rem;
    justify-content: space-between;
}

body header .site-title.brand-wordmark {
    font-size: clamp(1.35rem, 2.8vw, 1.8rem) !important;
}

body header .site-nav-menu {
    margin: 0;
    width: auto;
}

body header .site-nav-menu > summary {
    min-height: 2.4rem;
    padding: .5rem .7rem;
}

body header .site-nav-menu[open] {
    margin-top: .45rem;
    width: min(100%, 42rem);
}

body header .site-nav-menu nav {
    align-items: start;
    display: grid;
    gap: .55rem;
    grid-template-columns: minmax(0, 1fr);
}

.site-nav-group {
    display: grid;
    gap: .38rem;
}

.site-nav-primary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.site-nav-operations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.site-nav-admin {
    border-top: 1px solid rgba(255, 253, 248, .18);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: .55rem;
}

body header .site-nav-menu nav a,
body header .site-nav-menu nav button,
body header .site-nav-menu .logout-form button {
    border-radius: 7px;
    min-height: 2.5rem;
    padding: .46rem .55rem;
}

.site-nav-primary a:first-child {
    background: var(--paper) !important;
    color: var(--ink) !important;
}

.site-nav-account {
    color: rgba(255, 253, 248, .72);
    font-size: .73rem;
    grid-column: 1 / -1;
    overflow-wrap: anywhere;
    padding: .15rem .15rem 0;
}

.site-nav-admin .logout-form { margin: 0; }

body header .farm-session-bar {
    align-items: center;
    border-top: 1px solid rgba(255, 253, 248, .14);
    gap: .45rem;
    margin-top: .15rem;
    padding-top: .45rem;
}

body header .farm-session-bar form { gap: .3rem; }
body header .farm-session-bar label { font-size: .64rem; }
body header .farm-session-bar select { min-height: 2rem; }
body header .farm-session-bar .userline,
body header .farm-session-bar > a { display: none; }

.mobile-home-title {
    align-items: end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: .7rem;
}

.mobile-home-title h2 { font-size: clamp(1.35rem, 3.5vw, 2rem); }
.mobile-home-title .eyebrow { margin: 0 0 .05rem; }

.dashboard-view-switcher {
    display: inline-grid;
    gap: .3rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(21rem, 58%);
}

.dashboard-view-switcher a {
    align-items: center;
    border-radius: 7px;
    display: inline-flex;
    font-size: .78rem;
    justify-content: center;
    min-height: 2.25rem;
    padding: .35rem .45rem;
    text-decoration: none;
}

.dashboard-technical-section.dashboard-weather-first {
    margin-bottom: .75rem;
    max-width: 1120px;
}

.dashboard-weather-first .weather-card {
    border-left-width: 4px;
    padding: .75rem .85rem;
}

.dashboard-weather-first .weather-card-header { margin-bottom: .4rem; }
.dashboard-weather-first .weather-body { gap: .45rem; }
.dashboard-weather-first .weather-location-note { font-size: .72rem; margin: .15rem 0 0; }
.dashboard-weather-first .forecast-strip { gap: .28rem; }
.dashboard-weather-first .forecast-strip > div { min-height: 0; padding: .32rem; }
.dashboard-weather-first .classic-weather-outlook { margin-top: .42rem; }

.module-dashboard-section { margin-bottom: .75rem; }
.module-dashboard-section .section-heading { align-items: center; margin-bottom: .5rem; }
.module-dashboard-section .section-heading h3 { font-size: 1.05rem; }

.module-dashboard-grid { gap: .6rem; }
.module-dashboard-card {
    gap: .42rem;
    padding: .72rem .78rem;
}

.module-dashboard-heading { gap: .45rem; }
.module-dashboard-heading .tag { font-size: .61rem; padding: .2rem .34rem; }
.module-dashboard-heading > span:last-child { font-size: .67rem; }
.module-dashboard-card > strong { font-size: 1.03rem; }
.module-dashboard-card > p {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    font-size: .78rem;
    line-height: 1.25;
    overflow: hidden;
}

.module-dashboard-metrics { font-size: .75rem; gap: .24rem .6rem; padding: .38rem 0; }
.module-dashboard-metrics span { padding: .1rem 0; }
.module-dashboard-actions { display: flex; gap: .42rem; grid-template-columns: none; }
.module-dashboard-actions .module-dashboard-primary,
.module-dashboard-actions .module-dashboard-secondary {
    flex: 0 1 auto;
    min-height: 2.25rem;
    padding-inline: .72rem;
    width: auto;
}
.module-dashboard-actions .module-dashboard-primary { min-width: 8.4rem; }
.module-dashboard-card:has(.module-dashboard-secondary) .module-dashboard-actions { display: flex; grid-template-columns: none; }
.module-dashboard-card:has(.module-dashboard-secondary) .module-dashboard-actions .module-dashboard-primary { width: auto; }

.module-dashboard-card.status-ok { border-left-width: 3px; }
.module-dashboard-card.status-attention { border-left-width: 4px; }

.module-bee-pulse,
.module-crop-command,
.module-tree-pulse,
.module-poultry-pulse,
.module-livestock-pulse { min-height: 0; }

.dashboard-layout-preview { margin-top: .25rem; }
.dashboard-layout-preview .layout-headline-card { padding: .72rem .78rem; }
.dashboard-layout-preview .section-heading { align-items: center; margin-bottom: .45rem; }
.dashboard-layout-preview .section-heading h3 { font-size: 1rem; }
.dashboard-layout-preview .section-heading .eyebrow { margin: 0 0 .08rem; }
.dashboard-layout-preview .layout-thumbnail-link { height: clamp(92px, 17vw, 142px); }
.dashboard-layout-preview .farm-layout-thumb { transform: scale(1.05); }
.dashboard-layout-preview .layout-mini-key { font-size: .66rem; gap: .3rem .55rem; margin-top: .42rem; }
.dashboard-layout-preview .layout-open-action { min-height: 2.15rem; padding: .38rem .6rem; }

.dashboard-followup-strip {
    border: 1px solid var(--line-soft);
    border-radius: 9px;
    gap: .6rem;
    padding: .65rem .75rem;
}
.dashboard-followup-strip strong { font-size: .95rem; }
.dashboard-followup-strip span { font-size: .75rem; }
.dashboard-followup-strip nav { gap: .35rem; }
.dashboard-followup-strip a { border-radius: 7px; font-size: .76rem; min-height: 2.15rem; padding: .35rem .55rem; }

.offline-capture-panel { margin-top: .25rem; }
.offline-capture-panel > summary { min-height: 2.6rem; padding: .5rem .65rem; }
.offline-capture-panel > summary strong { font-size: .74rem; }

.legal-footer { margin-top: 1rem; padding: .7rem 1rem; }
.legal-footer a { color: var(--ink); font-weight: 750; text-decoration-color: var(--line); text-underline-offset: .16em; }
.legal-footer a:hover,
.legal-footer a:focus-visible { color: var(--orange); text-decoration-color: currentColor; }

@media (min-width: 721px) {
    .dashboard-weather-first { width: calc(100% - 2rem); }
    .module-dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-layout-preview { width: calc(100% - 2rem); }
    .dashboard-layout-preview .layout-thumbnail-link { height: 145px; }
}

@media (max-width: 720px) {
    body { padding-bottom: calc(4rem + env(safe-area-inset-bottom)); }
    body > header { gap: .35rem; padding: calc(.5rem + env(safe-area-inset-top)) .7rem .5rem; }
    body header .app-header-top { width: 100%; }
    body header .site-title.brand-wordmark { font-size: clamp(1.28rem, 6vw, 1.7rem) !important; }
    body header .site-nav-menu { width: auto; }
    body header .site-nav-menu > summary { min-height: 2.25rem; padding: .4rem .58rem; }
    body header .site-nav-menu[open] { margin-top: .35rem; width: 100%; }
    body header .site-nav-menu nav { gap: .42rem; }
    .site-nav-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-nav-operations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-nav-admin { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body header .site-nav-menu nav a,
    body header .site-nav-menu nav button,
    body header .site-nav-menu .logout-form button { font-size: .79rem; min-height: 2.5rem; }
    body header .farm-session-bar { display: flex; margin-top: 0; padding-top: .35rem; }
    body header .farm-session-bar form { flex: 1 1 auto; }
    body header .farm-session-bar select { max-width: none; width: 100%; }

    .mobile-home-title { align-items: start; margin: .1rem auto .55rem; }
    .mobile-home-title h2 { font-size: clamp(1.25rem, 6vw, 1.6rem); }
    .dashboard-view-switcher { flex: 0 0 auto; width: min(54%, 13.5rem); }
    .dashboard-view-switcher a { font-size: .7rem; min-height: 2.15rem; padding: .32rem; }

    .dashboard-weather-first .weather-card { padding: .68rem .72rem; }
    .dashboard-weather-first .weather-sky-mark { transform: scale(.92); transform-origin: right center; }
    .dashboard-weather-first .forecast-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dashboard-weather-first .forecast-strip > div { font-size: .64rem; }
    .dashboard-weather-first .forecast-strip strong { font-size: .82rem; }

    .module-dashboard-card { padding: .68rem .7rem; }
    .module-dashboard-card > p { display: none; }
    .module-dashboard-actions .module-dashboard-primary { min-width: 0; }
    .module-dashboard-actions .module-dashboard-primary,
    .module-dashboard-actions .module-dashboard-secondary { flex: 1 1 0; }
    .dashboard-layout-preview .layout-thumbnail-link { height: 94px; }
    .dashboard-layout-preview .layout-mini-key { display: none; }
    .dashboard-followup-strip { align-items: stretch; display: grid; }
    .dashboard-followup-strip nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-followup-strip a { text-align: center; }

    body .floating-timer-action { bottom: calc(.55rem + env(safe-area-inset-bottom)) !important; right: .55rem !important; z-index: 119; }
    body .floating-timer-action button { font-size: .78rem !important; min-height: 2.35rem !important; padding: .5rem .72rem !important; }
}

/* Final home-dashboard refinement override. Kept last to safely supersede legacy dashboard rules. */
body > header { padding-block: .48rem; }
body header .app-header-top { gap: .5rem; }
body header .site-title.brand-wordmark { font-size: clamp(1.28rem, 2.5vw, 1.65rem) !important; }
body header .site-nav-menu > summary { min-height: 2.2rem; padding: .4rem .62rem; }
body header .site-nav-menu[open] { margin-top: .3rem; }
body header .site-nav-menu nav { gap: .6rem; }
.site-nav-group { gap: .28rem; }
.site-nav-group-label { color: rgba(255,253,248,.65); display: block; font-size: .62rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.site-nav-primary, .site-nav-operations, .site-nav-admin { display: flex; flex-wrap: wrap; grid-template-columns: none; }
.site-nav-primary .site-nav-group-label, .site-nav-operations .site-nav-group-label, .site-nav-admin .site-nav-group-label { flex-basis: 100%; }
body header .site-nav-menu nav a, body header .site-nav-menu nav button, body header .site-nav-menu .logout-form button { flex: 0 1 auto; min-height: 2.18rem; padding: .34rem .52rem; }
.site-nav-admin { border-top-color: rgba(255,253,248,.14); padding-top: .42rem; }
.site-nav-account { max-width: min(100%, 26rem); overflow: hidden; padding: .1rem 0; text-overflow: ellipsis; white-space: nowrap; }
body header .farm-session-bar { margin-top: .05rem; padding-top: .3rem; }
body header .farm-session-bar label { display: none; }
body header .farm-session-bar select { min-height: 1.9rem; }
.mobile-home-title { margin-bottom: .38rem; }
.mobile-home-title h2 { line-height: 1.08; }
.dashboard-view-switcher { display: none !important; }

.dashboard-technical-section.dashboard-weather-first { margin-bottom: .58rem; }
.dashboard-weather-first .weather-card, .dashboard-weather-first .weather-card.warn { border-left-color: var(--line-soft) !important; border-left-width: 1px; padding: .62rem .72rem; }
.dashboard-weather-first .weather-card-header { margin-bottom: .25rem; }
.dashboard-weather-first .weather-body { gap: .28rem; }
.dashboard-weather-first .weather-primary-metrics { gap: .5rem; }
.dashboard-weather-first .forecast-strip { gap: .2rem; }
.dashboard-weather-first .forecast-strip > div { padding: .26rem .3rem; }
.dashboard-weather-first .classic-weather-outlook { margin-top: .28rem; }

.module-dashboard-section { margin-top: .1rem; }
.module-dashboard-section > .section-heading { display: none; }
.module-dashboard-grid { gap: .52rem; }
.module-dashboard-card { gap: .34rem; padding: .66rem .7rem; }
.module-dashboard-card > strong { line-height: 1.12; }
.module-dashboard-card > p { margin: 0; }
.module-dashboard-heading { margin-bottom: .02rem; }
.module-dashboard-metrics { border-top-color: var(--line-soft); padding: .3rem 0; }
.module-dashboard-actions { margin-top: .04rem; }

.module-crop-command { align-items: center; gap: .28rem .5rem; grid-template-columns: minmax(4.5rem, 7.25rem) auto minmax(0,1fr); }
.module-crop-command-visuals { align-items: center; display: flex; grid-row: span 2; isolation: isolate; min-width: 4.5rem; padding: .06rem .15rem; }
.module-crop-command-visual { align-items: center; background: #f6f0df; border: 1px solid #e4d8bc; border-radius: 50%; display: grid; height: 3.65rem; justify-content: center; margin-left: -.72rem; overflow: hidden; position: relative; width: 3.65rem; }
.module-crop-command-visual:first-child { margin-left: 0; z-index: 4; }
.module-crop-command-visual:nth-child(2) { z-index: 3; }.module-crop-command-visual:nth-child(3) { z-index: 2; }.module-crop-command-visual:nth-child(4) { z-index: 1; }
.module-crop-command-visual .crop-visual { height: 3.4rem; margin: 0; width: 3.4rem; }
.module-crop-command-read { align-self: end; }
.module-crop-command-read b { font-size: 1.35rem; }
.module-crop-command-state { align-self: end; border-top: 0; display: grid; gap: .08rem; grid-column: auto; padding: 0; }
.module-crop-command-state b { font-size: .82rem; }
.module-crop-command-state span { font-size: .72rem; text-transform: capitalize; }
.module-crop-command-priority { border-top: 1px solid var(--line-soft); font-size: .78rem; margin-top: .12rem; padding-top: .35rem; }

.module-tree-pulse { gap: .4rem; grid-template-columns: 2.35rem auto minmax(0,1fr); padding: .38rem .48rem; }
.module-tree-pulse-art { transform: scale(.9); transform-origin: center; }
.module-tree-pulse-state { gap: .04rem; }
.dashboard-layout-preview { margin-top: .45rem; }
.dashboard-layout-preview .layout-headline-card { padding: .62rem .7rem .7rem; }
.dashboard-layout-preview .section-heading { align-items: center; display: flex; justify-content: space-between; margin-bottom: .5rem; }
.dashboard-layout-preview .section-heading h3 { font-size: .98rem; line-height: 1.1; }
.dashboard-layout-preview .layout-thumbnail-link { height: clamp(185px, 53vw, 260px); }
.dashboard-layout-preview .farm-layout-thumb { transform: scale(1.08); }
.dashboard-layout-preview .layout-mini-key { margin-top: .34rem; }
.dashboard-followup-strip { margin-top: .55rem; padding: .55rem .65rem; }
.dashboard-followup-strip > div { gap: .05rem; }.dashboard-followup-strip span { line-height: 1.25; }
.offline-capture-panel { margin-top: .35rem; }.offline-capture-panel > summary { min-height: 2.35rem; }
.legal-footer { margin-top: .58rem; padding-bottom: calc(.7rem + env(safe-area-inset-bottom)); }

/* Reusable bee status semantics for dashboard, apiary, and hive views. */
.bee-hive-card.status-current, .hive-stack-graphic.status-current, .module-bee-pulse-hive.status-current { --bee-status: var(--green); }
.bee-hive-card.status-watch, .hive-stack-graphic.status-watch, .module-bee-pulse-hive.status-watch { --bee-status: var(--steel); }
.bee-hive-card.status-due, .hive-stack-graphic.status-due, .module-bee-pulse-hive.status-due { --bee-status: #b68227; }
.bee-hive-card.status-attention, .hive-stack-graphic.status-attention, .module-bee-pulse-hive.status-attention { --bee-status: var(--red); }
.bee-hive-card.status-current, .bee-hive-card.status-watch, .bee-hive-card.status-due, .bee-hive-card.status-attention { border-left-color: var(--bee-status); }
.care-status-pill.status-current, .care-status-pill.status-watch, .care-status-pill.status-due, .care-status-pill.status-attention { border-color: color-mix(in srgb, var(--bee-status) 42%, white); color: var(--bee-status); }
.module-bee-pulse-hive.status-watch { border-bottom-color: var(--steel); }.module-bee-pulse-hive.status-watch b { background: rgba(85,111,133,.24); }

@media (max-width: 720px) {
    body > header { padding: calc(.38rem + env(safe-area-inset-top)) .65rem .42rem; }
    body header .site-nav-menu[open] { width: 100%; }
    .site-nav-primary, .site-nav-operations, .site-nav-admin { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .site-nav-group-label, .site-nav-primary .site-nav-group-label, .site-nav-operations .site-nav-group-label, .site-nav-admin .site-nav-group-label, .site-nav-account { grid-column: 1 / -1; }
    body header .site-nav-menu nav a, body header .site-nav-menu nav button, body header .site-nav-menu .logout-form button { min-height: 2.35rem; text-align: left; width: 100%; }
    .site-nav-admin .logout-form { display: block; }
    .mobile-home-title { margin: .08rem auto .35rem; }
    .dashboard-weather-first .weather-card { padding: .58rem .64rem; }
    .dashboard-weather-first .forecast-strip { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .module-crop-command { grid-template-columns: 4.2rem auto minmax(0,1fr); }
    .module-crop-command-visuals { min-width: 4.2rem; }
    .module-crop-command-visual { height: 3.35rem; margin-left: -1.05rem; width: 3.35rem; }
    .module-crop-command-visual:nth-child(n+3) { display: none; }
    .module-crop-command-visual .crop-visual { height: 3.1rem; width: 3.1rem; }
    .module-crop-command-state b { font-size: .77rem; }.module-crop-command-state span { font-size: .68rem; }
    .dashboard-layout-preview .layout-thumbnail-link { height: clamp(190px, 58vw, 245px); }
    body .floating-timer-action { bottom: calc(.4rem + env(safe-area-inset-bottom)) !important; right: .4rem !important; }
    body .floating-timer-action button { font-size: .74rem !important; min-height: 2.15rem !important; padding: .42rem .62rem !important; }
}

/* Sensor workspace refinement: keep the operational surface compact and make
   every secondary area subordinate without changing its existing controls. */
.sensor-page { box-sizing: border-box; max-width: 1120px; min-width: 0; width: 100%; }
.sensor-page *, .sensor-page *::before, .sensor-page *::after { box-sizing: border-box; min-width: 0; }
.sensor-page-heading, .sensor-scale-header { align-items: center; background: var(--card); border: 1px solid var(--line-soft); border-radius: 12px; box-shadow: 0 7px 20px rgba(24, 24, 23, .04); padding: 1rem 1.15rem; }
.sensor-scale-header { border-left: 5px solid var(--orange); }
.sensor-scale-header h2, .sensor-page-heading h2 { color: var(--ink); font-size: clamp(1.35rem, 2.2vw, 1.85rem); line-height: 1.08; }
.sensor-page-heading p:not(.eyebrow), .sensor-bluetooth-name, .sensor-assignment { color: var(--muted); }
.sensor-assignment span { color: var(--ink); font-weight: 800; }
.sensor-header-actions { align-items: center; }
.sensor-connect-panel { max-width: 21rem; }
.sensor-connect-panel span { color: var(--muted); font-size: .78rem; font-weight: 750; }
.sensor-operation-panel { border-left: 5px solid var(--green); box-shadow: 0 10px 26px rgba(24, 24, 23, .05); padding: 1.1rem 1.15rem; }
.sensor-panel-heading { margin-bottom: .8rem; }
.sensor-panel-heading h3, .sensor-section-heading h3 { color: var(--ink); }
.sensor-sync-state { background: rgba(62, 100, 67, .08); color: var(--green); font-size: .7rem; max-width: 15rem; overflow: hidden; text-overflow: ellipsis; }
.sensor-status-grid { border: 0; gap: .55rem; grid-template-columns: minmax(14rem, 1.45fr) repeat(3, minmax(8rem, 1fr)); }
.sensor-status-grid article, .sensor-status-grid article + article { background: var(--paper-deep); border: 1px solid var(--line-soft); border-radius: 8px; min-height: 4.6rem; padding: .72rem .78rem; }
.sensor-status-grid .sensor-primary-reading { background: var(--surface); border-color: var(--surface); grid-row: span 2; min-height: 9.8rem; }
.sensor-status-grid .sensor-primary-reading span, .sensor-status-grid .sensor-primary-reading small { color: rgba(255,255,255,.74); }
.sensor-status-grid .sensor-primary-reading strong { color: #fff; font-size: clamp(2.15rem, 5vw, 3.65rem); letter-spacing: -.045em; line-height: 1; margin-top: auto; }
.sensor-status-grid strong { font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.sensor-status-grid small { color: var(--muted); display: block; font-size: .73rem; line-height: 1.25; }
.sensor-workspace-actions { align-items: center; border-top: 1px solid var(--line-soft); display: flex; gap: 1rem; justify-content: space-between; margin-top: .85rem; padding-top: .9rem; }
.sensor-workspace-actions h3 { color: var(--ink); font-size: 1.05rem; margin: 0; }
.sensor-workspace-actions p:not(.eyebrow) { color: var(--muted); font-size: .82rem; margin: .16rem 0 0; }
.sensor-primary-actions { justify-content: end; }
.sensor-primary-actions .primary-button { box-shadow: 0 3px 0 rgba(24,24,23,.16); }
.sensor-utility-action { border-style: dashed !important; }
.sensor-live-message { background: var(--paper-deep); border-radius: 6px; margin-bottom: 0; padding: .55rem .7rem; }
.sensor-section-heading { align-items: center; display: flex; justify-content: space-between; margin-bottom: .8rem; }
.sensor-section-heading h3 { font-size: 1.15rem; margin: 0; }
.sensor-section-note { color: var(--muted); font-size: .74rem; font-weight: 800; }
.sensor-configuration-section { padding: 1rem 1.15rem; }
.sensor-configuration-grid { display: grid; gap: .7rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sensor-configuration-card { background: var(--paper-deep); border: 1px solid var(--line-soft); border-radius: 8px; padding: .8rem; }
.sensor-configuration-card .sensor-panel-heading { margin-bottom: .5rem; }
.sensor-configuration-card .sensor-panel-heading .eyebrow { color: var(--muted); }
.sensor-configuration-card .form-actions { margin-top: .45rem; }
.sensor-configuration-card .form-actions button { min-height: 2.4rem; }
.sensor-maintenance-section, .sensor-advanced-section, .sensor-technical-details { overflow: hidden; }
.sensor-maintenance-section > summary, .sensor-technical-details > summary, .sensor-advanced-section > summary { align-items: center; background: var(--paper-deep); border: 0; border-radius: 7px; display: flex; justify-content: space-between; min-height: 3rem; padding: .55rem .7rem; text-align: left; }
.sensor-maintenance-section > summary > span:first-child, .sensor-technical-details > summary > span:first-child { display: grid; gap: .1rem; }
.sensor-maintenance-section summary small, .sensor-technical-details summary small { color: var(--muted); font-size: .73rem; font-weight: 600; }
.sensor-maintenance-section summary > span:last-child, .sensor-technical-details summary > span:last-child { color: var(--orange); font-size: 1.25rem; font-weight: 500; }
.sensor-maintenance-section[open] > summary, .sensor-technical-details[open] > summary, .sensor-advanced-section[open] > summary { border-bottom: 1px solid var(--line-soft); border-radius: 7px 7px 0 0; }
.sensor-maintenance-section[open] > summary > span:last-child, .sensor-technical-details[open] > summary > span:last-child { transform: rotate(45deg); }
.sensor-firmware-notice { align-items: center; grid-template-columns: auto minmax(0,1fr) auto; }
.sensor-history-section { min-height: 0; }
.sensor-history-section:has(.sensor-compact-empty) { padding-bottom: .85rem; }
.sensor-compact-empty { background: var(--paper-deep); border-style: dashed; color: var(--muted); font-size: .86rem; }
.sensor-technical-details .sensor-raw-section { border: 0; border-radius: 0; padding: .8rem 0 0; }
.sensor-technical-details .sensor-raw-section .sensor-panel-heading { display: none; }
.sensor-technical-details .table-wrap { max-width: 100%; overflow-x: auto; }
.sensor-technical-details table { font-variant-numeric: tabular-nums; min-width: 38rem; }
.sensor-technical-details th, .sensor-technical-details td { white-space: nowrap; }
.sensor-device-card { border-left-width: 5px; box-shadow: 0 5px 16px rgba(24,24,23,.035); grid-template-columns: minmax(0, 1fr) minmax(9rem, auto) auto auto; }
.sensor-device-state { align-items: start; display: grid; gap: .08rem; }
.sensor-device-state strong { color: var(--green); font-size: .78rem; }
.sensor-device-state small { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.sensor-status-dot { background: var(--green); border-radius: 50%; height: .52rem; margin-bottom: .05rem; width: .52rem; }
.sensor-device-actions { min-width: 13rem; }
.sensor-page ~ .legal-footer a { color: var(--ink); font-weight: 750; text-decoration-color: var(--line); }
.sensor-page ~ .legal-footer a:hover, .sensor-page ~ .legal-footer a:focus-visible { color: var(--orange); }
@media (max-width: 900px) {
    .sensor-status-grid { grid-template-columns: minmax(13rem, 1.3fr) repeat(2, minmax(8rem, 1fr)); }
    .sensor-status-grid .sensor-primary-reading { grid-row: span 2; }
    .sensor-device-card { grid-template-columns: minmax(0, 1fr) minmax(9rem, auto) auto; }
    .sensor-device-actions { grid-column: 1 / -1; justify-self: end; }
}
@media (max-width: 720px) {
    .sensor-page { gap: .7rem; padding-inline: .65rem; }
    .sensor-page-heading, .sensor-scale-header { align-items: stretch; padding: .85rem; }
    .sensor-header-actions { align-items: stretch; }
    .sensor-connect-panel { width: 100%; }
    .sensor-connect-panel .primary-button { width: 100%; }
    .sensor-operation-panel { padding: .85rem; }
    .sensor-panel-heading { align-items: start; }
    .sensor-sync-state { max-width: 10rem; white-space: normal; text-align: right; }
    .sensor-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sensor-status-grid .sensor-primary-reading { grid-column: 1 / -1; grid-row: auto; min-height: 8.2rem; }
    .sensor-status-grid article, .sensor-status-grid article + article { min-height: 4.1rem; }
    .sensor-workspace-actions { align-items: stretch; display: grid; gap: .7rem; }
    .sensor-primary-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .sensor-primary-actions .primary-button { grid-column: 1 / -1; }
    .sensor-primary-actions > * { min-width: 0; width: 100%; }
    .sensor-configuration-grid { grid-template-columns: 1fr; }
    .sensor-firmware-notice { grid-template-columns: 1fr; }
    .sensor-device-card { grid-template-columns: minmax(0, 1fr) auto; padding: .85rem; }
    .sensor-device-state { grid-column: 2; grid-row: 1; }
    .sensor-device-meta { grid-column: 1 / -1; }
    .sensor-device-meta div { border-left: 0; padding-left: 0; }
    .sensor-device-actions { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.75fr); min-width: 0; width: 100%; }
    .sensor-page ~ .legal-footer { flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
}

/* Crop visual signature pass. Kept at the end of the crop styles so older
   planting-card decorations cannot flatten the profile-driven illustration. */
.crop-visual {
    --crop-green: #4d7b47;
    --crop-green-light: #86a95c;
    --crop-produce: #d3a138;
    --crop-earth: #81583a;
    --crop-line: rgba(45, 49, 39, .28);
    align-items: end;
    display: inline-grid;
    height: 5.45rem;
    isolation: isolate;
    justify-items: center;
    overflow: hidden;
    position: relative;
    width: 6.15rem;
}
.crop-visual::before {
    background: radial-gradient(circle at 50% 88%, rgba(69, 48, 29, .16), transparent 63%);
    border-radius: 50%;
    bottom: .14rem;
    content: "";
    height: 1rem;
    position: absolute;
    width: 4.5rem;
    z-index: -1;
}
.crop-visual__sun { box-shadow: 0 0 0 .2rem rgba(239, 189, 56, .11); height: .7rem; left: .62rem; top: .54rem; width: .7rem; }
.crop-visual__sun-rays { border: 1px dashed rgba(218, 163, 31, .55); border-radius: 50%; height: 1.18rem; left: .38rem; opacity: .56; position: absolute; top: .3rem; width: 1.18rem; }
.crop-visual__shadow { background: rgba(69, 48, 29, .15); border-radius: 50%; bottom: .04rem; height: .42rem; position: absolute; width: 3.9rem; }
.crop-visual__soil { background: linear-gradient(180deg, #bc8c58 0%, var(--crop-earth) 100%); border: 1px solid rgba(70, 47, 27, .2); border-bottom: 0; border-radius: 100% 100% .12rem .12rem; bottom: .1rem; height: .66rem; width: 4.82rem; }
.crop-visual__plant { bottom: .58rem; height: 3.85rem; transform-origin: bottom center; width: 3.8rem; }
.crop-visual__stem { box-shadow: .92rem .37rem 0 -.05rem var(--crop-green-light), -.92rem .46rem 0 -.05rem var(--crop-green-light); height: 2.85rem; left: 1.78rem; width: .2rem; }
.crop-visual__leaf { box-shadow: inset -.09rem -.1rem rgba(29, 55, 28, .14); height: .88rem; width: 1.45rem; }
.crop-visual__leaf--one { left: .38rem; top: 1.58rem; }
.crop-visual__leaf--two { right: .32rem; top: .93rem; }
.crop-visual__leaf--three { left: .7rem; top: .4rem; }
.crop-visual__produce { border: 1px solid var(--crop-line); height: .96rem; left: 1.2rem; width: .96rem; }
.crop-visual__produce--two { left: 2.02rem; transform: scale(.77); }
.crop-visual__accent { display: block; position: absolute; }

/* Alliums read as upright leaves and a bulb below the soil, not generic fruit. */
.crop-visual--garlic, .crop-visual--onion { --crop-green: #52794e; --crop-produce: #efe2cb; }
.crop-visual--garlic .crop-visual__stem, .crop-visual--onion .crop-visual__stem { background: transparent; box-shadow: .48rem 0 0 -.05rem var(--crop-green), .96rem 0 0 -.05rem var(--crop-green-light), 1.44rem 0 0 -.05rem var(--crop-green), 1.92rem 0 0 -.05rem var(--crop-green-light), 2.4rem 0 0 -.05rem var(--crop-green); height: 3.25rem; left: .7rem; transform: skewX(-5deg); width: .15rem; }
.crop-visual--garlic .crop-visual__leaf, .crop-visual--onion .crop-visual__leaf { display: none; }
.crop-visual--garlic .crop-visual__produce { border-radius: 48% 48% 55% 55%; bottom: -.15rem; box-shadow: -.28rem .04rem #e8dac2, .28rem .04rem #e8dac2, inset -.13rem -.1rem #c7b79b; height: 1.05rem; left: 1.38rem; width: 1.05rem; }
.crop-visual--garlic .crop-visual__produce--two { display: none; }
.crop-visual--garlic .crop-visual__accent { border-left: 1px solid rgba(121, 91, 48, .4); border-right: 1px solid rgba(121, 91, 48, .4); bottom: .08rem; height: .78rem; left: 1.88rem; width: .18rem; }
.crop-visual--onion { --crop-produce: #d6a272; }
.crop-visual--onion .crop-visual__produce { border-radius: 45% 45% 58% 58%; box-shadow: -.25rem .05rem #e4bd94, .25rem .05rem #e4bd94, inset -.13rem -.1rem #b97863; }

/* Potatoes are broad foliage with a faint, deliberately underground tuber cue. */
.crop-visual--potato, .crop-visual--sweet-potato { --crop-green: #49794b; --crop-produce: #bd8d59; }
.crop-visual--potato .crop-visual__stem, .crop-visual--sweet-potato .crop-visual__stem { height: 2.45rem; left: 1.7rem; transform: rotate(-4deg); }
.crop-visual--potato .crop-visual__leaf, .crop-visual--sweet-potato .crop-visual__leaf { border-radius: 65% 22% 65% 22%; height: 1rem; width: 1.25rem; }
.crop-visual--potato .crop-visual__leaf--one, .crop-visual--sweet-potato .crop-visual__leaf--one { left: .3rem; top: 1.05rem; transform: rotate(-32deg); }
.crop-visual--potato .crop-visual__leaf--two, .crop-visual--sweet-potato .crop-visual__leaf--two { right: .25rem; top: .58rem; }
.crop-visual--potato .crop-visual__leaf--three, .crop-visual--sweet-potato .crop-visual__leaf--three { left: .96rem; top: .04rem; }
.crop-visual--potato .crop-visual__produce, .crop-visual--sweet-potato .crop-visual__produce { bottom: -.26rem; height: .64rem; left: 1.04rem; opacity: .87; transform: rotate(-16deg); width: 1.08rem; }
.crop-visual--potato .crop-visual__produce--two, .crop-visual--sweet-potato .crop-visual__produce--two { bottom: -.18rem; left: 1.95rem; }

/* Fruiting crops gain visible blossom/fruit at their productive stages. */
.crop-visual--tomato { --crop-produce: #c94c3d; }
.crop-visual--tomato .crop-visual__produce { bottom: .85rem; left: 2.12rem; }
.crop-visual--tomato .crop-visual__produce--two { bottom: 1.38rem; left: 1.2rem; }
.crop-visual--tomato .crop-visual__accent { border: .22rem solid #e4b644; border-radius: 50%; left: 1.66rem; top: .45rem; transform: scale(.8); }
.crop-visual--pepper { --crop-produce: #cf533d; }
.crop-visual--pepper .crop-visual__produce { border-radius: 42% 42% 60% 60%; bottom: .6rem; height: 1.12rem; left: 2.18rem; width: .62rem; }
.crop-visual--pepper .crop-visual__produce--two { display: none; }

/* Corn has a tall central stalk, long blades, and an ear rather than fruit. */
.crop-visual--corn { --crop-green: #4b7644; --crop-produce: #ddb445; }
.crop-visual--corn .crop-visual__plant { height: 4.18rem; }
.crop-visual--corn .crop-visual__stem { height: 3.55rem; left: 1.78rem; width: .27rem; }
.crop-visual--corn .crop-visual__leaf { border-radius: 100% 0 100% 0; height: .54rem; width: 1.8rem; }
.crop-visual--corn .crop-visual__leaf--one { left: .16rem; top: 2.1rem; }
.crop-visual--corn .crop-visual__leaf--two { right: .08rem; top: 1.35rem; }
.crop-visual--corn .crop-visual__leaf--three { left: .05rem; top: .72rem; }
.crop-visual--corn .crop-visual__produce { border-radius: 44%; bottom: .75rem; height: 1.15rem; left: 2.08rem; width: .46rem; }
.crop-visual--corn .crop-visual__produce--two { display: none; }

.crop-visual--beans, .crop-visual--peas { --crop-produce: #83a553; }
.crop-visual--beans .crop-visual__accent, .crop-visual--peas .crop-visual__accent { border-left: 2px solid #6f9351; border-radius: 50%; height: 2.1rem; left: .55rem; top: 1rem; transform: rotate(-28deg); width: 1.85rem; }
.crop-visual--beans .crop-visual__produce, .crop-visual--peas .crop-visual__produce { bottom: .65rem; height: .38rem; left: 1.9rem; width: 1.12rem; }
.crop-visual--peas { --crop-produce: #a4bd6d; }

.crop-visual--cucumber, .crop-visual--squash, .crop-visual--pumpkin, .crop-visual--watermelon { --crop-green: #4b7945; }
.crop-visual--cucumber .crop-visual__accent, .crop-visual--squash .crop-visual__accent, .crop-visual--pumpkin .crop-visual__accent, .crop-visual--watermelon .crop-visual__accent { border-bottom: 2px solid var(--crop-green); border-radius: 50%; bottom: .44rem; height: 1.7rem; left: .1rem; transform: rotate(-10deg); width: 3.45rem; }
.crop-visual--cucumber .crop-visual__produce { border-radius: 999px; height: .48rem; left: 1.2rem; width: 1.45rem; }
.crop-visual--pumpkin .crop-visual__produce { height: 1.22rem; width: 1.22rem; }.crop-visual--pumpkin .crop-visual__produce--two { display:none; }

.crop-visual--lettuce, .crop-visual--cabbage { --crop-green: #668e55; }
.crop-visual--lettuce .crop-visual__stem, .crop-visual--cabbage .crop-visual__stem { display:none; }
.crop-visual--lettuce .crop-visual__leaf, .crop-visual--cabbage .crop-visual__leaf { border-radius: 58% 42% 55% 45%; bottom: .14rem; height: 1.65rem; left: .75rem; top:auto; width: 1.85rem; }
.crop-visual--lettuce .crop-visual__leaf--two, .crop-visual--cabbage .crop-visual__leaf--two { left: 1.35rem; transform: rotate(35deg); }.crop-visual--lettuce .crop-visual__leaf--three, .crop-visual--cabbage .crop-visual__leaf--three { left:1.15rem; transform:rotate(-6deg) scale(.78); }
.crop-visual--lettuce .crop-visual__produce, .crop-visual--cabbage .crop-visual__produce { display:none; }
.crop-visual--cabbage .crop-visual__accent { border: 1px solid rgba(60,91,46,.24); border-radius: 50%; bottom:.25rem; height:1.25rem; left:1.27rem; width:1.25rem; }

.crop-visual--carrot, .crop-visual--beet, .crop-visual--radish { --crop-green:#4f8249; }
.crop-visual--carrot .crop-visual__leaf, .crop-visual--beet .crop-visual__leaf, .crop-visual--radish .crop-visual__leaf { height:.72rem; width:1.15rem; }
.crop-visual--carrot .crop-visual__produce { border-radius: 70% 30% 70% 30%; bottom:-.23rem; height:1.25rem; left:1.6rem; transform:rotate(43deg); width:.56rem; }.crop-visual--carrot .crop-visual__produce--two { display:none; }
.crop-visual--beet .crop-visual__produce, .crop-visual--radish .crop-visual__produce { bottom:-.12rem; left:1.47rem; }.crop-visual--beet .crop-visual__produce--two, .crop-visual--radish .crop-visual__produce--two { display:none; }

.crop-visual--sunflower { --crop-green:#4d7945; --crop-produce:#eebf38; }
.crop-visual--sunflower .crop-visual__plant { height:4.2rem; }.crop-visual--sunflower .crop-visual__stem { height:3.35rem; }.crop-visual--sunflower .crop-visual__produce { background:radial-gradient(circle, #654b27 0 29%, #edbd37 31%); bottom:2.48rem; height:1.28rem; left:1.2rem; width:1.28rem; }.crop-visual--sunflower .crop-visual__produce--two { display:none; }
.crop-visual--wheat { --crop-green:#708d51; --crop-produce:#dcb44c; }
.crop-visual--wheat .crop-visual__stem { box-shadow:.65rem .22rem 0 -.04rem var(--crop-green), 1.3rem .08rem 0 -.04rem var(--crop-green), 1.95rem .28rem 0 -.04rem var(--crop-green); height:3.12rem; left:.38rem; }.crop-visual--wheat .crop-visual__produce { border-radius:48% 48% 16% 16%; bottom:2.18rem; box-shadow:.65rem .18rem var(--crop-produce), 1.3rem .03rem var(--crop-produce), 1.95rem .22rem var(--crop-produce); height:.78rem; left:.35rem; width:.34rem; }.crop-visual--wheat .crop-visual__produce--two { display:none; }

/* Stage changes are visual state only: they never say anything about health. */
.crop-visual--seed .crop-visual__sun, .crop-visual--seed .crop-visual__sun-rays { display:none; }
.crop-visual--seed .crop-visual__plant { opacity:.36; transform:translateY(1.48rem) scale(.4); }
.crop-visual--seed .crop-visual__produce { background:#8d6740; bottom:.02rem; left:1.66rem; transform:scale(.46); }
.crop-visual--dormant { filter:saturate(.65); }.crop-visual--dormant .crop-visual__plant { opacity:.55; transform:scale(.73); }
.crop-visual--sprout .crop-visual__plant { transform:scale(.58); }.crop-visual--sprout .crop-visual__produce { display:none; }
.crop-visual--harvest .crop-visual__produce { box-shadow:0 0 0 .22rem rgba(237,179,58,.17), inset -.16rem -.13rem rgba(0,0,0,.12); }.crop-visual--stored { filter:saturate(.58); opacity:.76; }.crop-visual--stored .crop-visual__plant { transform:translateY(.75rem) scale(.53); }

@media (prefers-reduced-motion: no-preference) {
    .crop-visual--growing .crop-visual__plant { animation:crop-plant-sway 5.2s ease-in-out infinite; }
    .crop-visual--sprout .crop-visual__plant { animation:crop-sprout-rise .62s cubic-bezier(.16,.8,.34,1) both; }
    .crop-visual--harvest .crop-visual__produce { animation:crop-harvest-pulse 2.2s ease-in-out infinite; }
    .crop-visual--tomato.crop-visual--growing .crop-visual__produce, .crop-visual--pepper.crop-visual--growing .crop-visual__produce { animation:crop-fruit-set 3.6s ease-in-out infinite; }
}
@keyframes crop-plant-sway { 0%, 100% { transform:rotate(-1.5deg); } 50% { transform:rotate(1.5deg) translateY(-.06rem); } }
@keyframes crop-sprout-rise { from { opacity:0; transform:translateY(1.45rem) scale(.22); } to { opacity:1; transform:scale(.58); } }
@keyframes crop-harvest-pulse { 50% { box-shadow:0 0 0 .32rem rgba(237,179,58,.12), inset -.16rem -.13rem rgba(0,0,0,.12); } }
@keyframes crop-fruit-set { 50% { transform:scale(1.08) translateY(-.04rem); } }

.crop-planting-visual { align-items:center; background:linear-gradient(145deg, #faf6ec, #eee5d1); border:1px solid rgba(131,101,66,.12); height:5.6rem; justify-content:center; }
.crop-planting-visual .crop-visual { transform:scale(.96); transform-origin:center bottom; }
.crop-planting-identity { align-items:center; grid-template-columns:6.2rem minmax(0,1fr); }
.crop-planting-glance .section-heading { align-items:end; background:transparent; border:0; border-bottom:1px solid var(--line-soft); color:var(--ink); margin-bottom:.85rem; padding:.2rem 0 .75rem; }
.crop-planting-glance .section-heading .eyebrow { color:var(--muted); }.crop-planting-glance .section-heading h3 { color:var(--ink); }
.crop-recent-activity > header { background:transparent; color:var(--ink); }
@media (max-width: 720px) {
    .crop-planting-visual { height:5.25rem; }
    .crop-planting-identity { grid-template-columns:6rem minmax(0,1fr); }
    .crop-planting-visual .crop-visual { transform:scale(.89); }
}

/* Crops record workspaces: the same shell as Overview, tuned for each job. */
.crop-tab-workspace { display: grid; gap: .9rem; width: 100%; }
.crop-tab-header { align-items: center; background: var(--card); border: 1px solid var(--line-soft); border-left: 4px solid var(--orange); border-radius: 8px; display: flex; gap: 1rem; justify-content: space-between; padding: .85rem 1rem; }
.crop-tab-header > div { display: grid; gap: .12rem; min-width: 0; }
.crop-tab-header .eyebrow { margin: 0; }
.crop-tab-header h2, .crop-tab-header h3 { color: var(--ink); font-size: 1.22rem; margin: 0; }
.crop-tab-header span { color: var(--muted); font-size: .88rem; }
.crop-tab-primary { flex: 0 0 auto; }
.crop-tab-metrics { display: flex; flex-wrap: wrap; gap: .55rem; }
.crop-tab-metrics span { background: var(--paper-deep); border: 1px solid var(--line-soft); border-radius: 6px; color: var(--muted); font-size: .83rem; padding: .42rem .6rem; }
.crop-tab-metrics b { color: var(--ink); font-size: 1rem; margin-right: .12rem; }
.crop-planting-workspace-grid, .crop-seed-lot-grid, .crop-area-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.crop-tab-workspace .crop-record-list { gap: .8rem; }
.crop-tab-workspace .crop-record-row { background: var(--card); border: 1px solid var(--line-soft); border-left: 3px solid var(--steel); border-radius: 8px; box-shadow: none; min-width: 0; padding: .85rem .95rem; }
.crop-tab-workspace .crop-record-row.status-due { border-left-color: var(--orange); }
.crop-tab-workspace .crop-record-row.status-attention { border-left-color: var(--red); }
.crop-tab-workspace .crop-record-row > div { gap: .18rem; min-width: 0; }
.crop-tab-workspace .crop-record-row > div > span { color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.crop-tab-workspace .crop-record-row strong { color: var(--ink); font-size: 1.04rem; line-height: 1.22; }
.crop-tab-workspace .crop-record-row small { color: var(--muted); line-height: 1.35; }
.crop-tab-workspace .crop-record-row nav { align-items: center; display: flex; flex-wrap: wrap; gap: .45rem; }
.crop-tab-workspace .crop-record-row nav a, .crop-tab-workspace .crop-record-row nav button { background: var(--card); border: 1px solid var(--line); border-radius: 6px; color: var(--ink); font-weight: 700; min-height: 2.25rem; padding: .42rem .65rem; text-decoration: none; }
.crop-tab-workspace .crop-record-row nav a:first-child { background: var(--charcoal); border-color: var(--charcoal); color: #fff !important; }
.crop-output-list .crop-record-row { align-items: center; display: grid; grid-template-columns: 6.25rem minmax(0, 1fr) auto auto; }
.crop-output-list .crop-record-row > div:last-of-type { align-items: end; }
.variety-season-workspace { display: grid; gap: 1rem; width: 100%; }
.variety-season-hero { align-items: center; background: var(--card); border: 1px solid var(--line-soft); border-left: 4px solid var(--orange); border-radius: 8px; display: flex; gap: 1rem; justify-content: space-between; padding: 1rem 1.1rem; }
.variety-season-hero h2 { color: var(--ink); font-size: clamp(1.45rem, 3vw, 2rem); margin: .08rem 0; }
.variety-season-hero h2 span { color: var(--muted); display: block; font-size: .68em; font-weight: 650; }
.variety-season-hero p:last-child { color: var(--muted); margin: 0; }
.variety-season-summary { background: var(--paper-deep); border: 1px solid var(--line-soft); border-radius: 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; }
.variety-season-summary > span, .variety-season-summary > a { border-right: 1px solid var(--line-soft); color: var(--ink); display: grid; gap: .08rem; min-width: 0; padding: .72rem .84rem; text-decoration: none; }
.variety-season-summary > :last-child { border-right: 0; }
.variety-season-summary b { color: var(--ink); font-size: .98rem; overflow-wrap: anywhere; }
.variety-season-summary small { color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.variety-season-summary > a { background: var(--card); }
.variety-season-section { display: grid; gap: .7rem; }
.variety-season-section .section-heading { background: transparent; border-bottom: 1px solid var(--line-soft); margin: 0; padding: .15rem 0 .65rem; }
.variety-planting-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.variety-planting-card { background: var(--card); border: 1px solid var(--line-soft); border-left: 3px solid var(--green); border-radius: 8px; display: grid; gap: .58rem; min-width: 0; padding: .85rem .95rem; text-decoration: none; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.variety-planting-card:hover, .variety-planting-card:focus-visible { border-color: var(--orange); box-shadow: 0 .35rem 1rem rgba(56,45,25,.09); outline: none; transform: translateY(-1px); }
.variety-planting-card > div:first-child { align-items: center; display: flex; gap: .45rem; justify-content: space-between; }
.variety-planting-card > div:first-child > span { color: var(--muted); font-size: .8rem; font-weight: 750; }
.variety-planting-card > strong { color: var(--ink); font-size: 1.05rem; }
.variety-planting-card > small { color: var(--muted); }
.variety-history-list { background: var(--card); border: 1px solid var(--line-soft); border-radius: 8px; overflow: hidden; }
.variety-history-list > a { align-items: center; border-bottom: 1px solid var(--line-soft); color: var(--ink); display: grid; gap: .4rem .75rem; grid-template-columns: 5.4rem minmax(0, 1fr) minmax(0, 2fr); padding: .72rem .9rem; text-decoration: none; }
.variety-history-list > a:last-child { border-bottom: 0; }
.variety-history-list > a:hover, .variety-history-list > a:focus-visible { background: var(--paper-deep); outline: none; }
.variety-history-list span { color: var(--steel); font-size: .76rem; font-weight: 850; text-transform: uppercase; }
.variety-history-list strong { color: var(--ink); }
.variety-history-list small { color: var(--muted); }
@media (max-width: 560px) {
    .variety-season-hero { align-items: stretch; flex-direction: column; }
    .variety-season-hero .secondary-button { text-align: center; }
    .variety-season-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .variety-season-summary > :nth-child(2) { border-right: 0; }
    .variety-season-summary > :nth-child(n+3) { border-top: 1px solid var(--line-soft); }
    .variety-history-list > a { align-items: start; grid-template-columns: 1fr; gap: .12rem; }
}
.harvest-measure-workspace { gap: 1rem; }
.harvest-measure-header { align-items: start; }
.harvest-measure-header h3, .harvest-measure-header p, .harvest-measure-header span:not(.care-status-pill) { color: var(--ink); }
.harvest-workflow-help { align-items: start; background: #fff8ee; border-left: 4px solid var(--orange); border-radius: 8px; color: var(--ink); display: grid; gap: .35rem; padding: .8rem 1rem; }
.harvest-workflow-help > span { color: var(--muted); }
.harvest-workflow-help details { margin-top: .2rem; }
.harvest-workflow-help summary { color: var(--ink); cursor: pointer; font-weight: 750; }
.harvest-workflow-help details p { color: var(--muted); margin: .45rem 0 0; max-width: 75ch; }
.harvest-recording-date { align-items: center; border-bottom: 1px solid var(--line-soft); color: var(--muted); display: flex; flex-wrap: wrap; font-size: .86rem; gap: .45rem 1rem; justify-content: space-between; padding-bottom: .7rem; }
.harvest-recording-date > span strong { color: var(--ink); }
.harvest-recording-date details { margin-left: auto; }
.harvest-recording-date summary { color: var(--ink); cursor: pointer; font-weight: 750; }
.harvest-recording-date form { align-items: end; display: grid; gap: .4rem; grid-template-columns: minmax(10rem, 1fr) auto; padding-top: .55rem; }
.harvest-recording-date label { color: var(--ink); font-size: .78rem; font-weight: 750; grid-column: 1 / -1; }
.harvest-recording-date input { min-height: 44px; }
.harvest-recording-date small { color: var(--muted); grid-column: 1 / -1; max-width: 54ch; }
.harvest-current-plant { background: var(--card); border: 1px solid var(--line-soft); border-left: 4px solid var(--orange); border-radius: 10px; display: grid; gap: .8rem; padding: .9rem 1rem; }
.harvest-current-plant__heading { align-items: center; display: flex; gap: 1rem; justify-content: space-between; }
.harvest-current-plant__heading > div { display: grid; gap: .15rem; min-width: 0; }
.harvest-current-plant__heading h3, .harvest-current-plant__heading p { color: var(--ink); margin: 0; }
.harvest-current-plant__heading > div > p:last-child { color: var(--muted); }
.harvest-current-plant__totals { display: flex; flex-wrap: wrap; gap: .55rem; }
.harvest-current-plant__totals span { background: var(--paper); border-radius: 7px; display: grid; min-width: 7rem; padding: .55rem .7rem; }
.harvest-current-plant__totals b { color: var(--ink); font-variant-numeric: tabular-nums; }
.harvest-current-plant__totals small { color: var(--muted); }
.harvest-current-plant__totals .needs-attention, .harvest-plant-result__metrics .needs-attention { background: #fff0e8; }
.harvest-plant-details, .harvest-recording-options { margin: 0; }
.harvest-plant-details .harvest-plant-form { margin-top: .7rem; }
.harvest-lineage-note { color: var(--muted); margin: 0; }
.harvest-selection-result { align-items: start; display: grid; gap: .25rem; }
.harvest-selection-result small { color: var(--muted); max-width: 62ch; }
.harvest-measure-summary { background: var(--card); border: 1px solid var(--line-soft); border-radius: 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; }
.harvest-measure-summary > span { border-right: 1px solid var(--line-soft); display: grid; gap: .05rem; min-width: 0; padding: .75rem .8rem; }
.harvest-measure-summary > span:last-child { border-right: 0; }
.harvest-measure-summary b { color: var(--ink); font-size: 1.05rem; overflow-wrap: anywhere; }
.harvest-measure-summary small { color: var(--muted); font-size: .72rem; font-weight: 750; text-transform: uppercase; }
.harvest-selection-summary { align-items: center; background: #F4F8F0; border: 1px solid #C9D8BB; border-left: 4px solid var(--green); border-radius: 8px; color: var(--ink); display: flex; flex-wrap: wrap; gap: .4rem .7rem; padding: .6rem .75rem; }
.harvest-selection-summary strong { color: var(--green); font-size: .8rem; }
.harvest-selection-summary span { border-left: 1px solid #C9D8BB; font-size: .78rem; padding-left: .7rem; }
.harvest-plant-disclosure { background: var(--paper-deep); border: 1px solid var(--line-soft); border-radius: 8px; }
.harvest-plant-disclosure summary { align-items: baseline; cursor: pointer; display: flex; justify-content: space-between; gap: .75rem; list-style: none; padding: .85rem 1rem; }
.harvest-plant-disclosure summary::-webkit-details-marker { display: none; }
.harvest-plant-disclosure summary span { color: var(--ink); font-weight: 800; }
.harvest-plant-disclosure summary small { color: var(--muted); font-size: .78rem; text-align: right; }
.harvest-plant-form { border-top: 1px solid var(--line-soft); display: grid; gap: .62rem; padding: .9rem 1rem 1rem; }
.harvest-plant-form label, .harvest-weight-form label { color: var(--ink); font-size: .84rem; font-weight: 750; }
.harvest-plant-form label span, .harvest-weight-form label span { color: var(--muted); font-weight: 600; }
.harvest-plant-form__grid { display: grid; gap: .5rem .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.harvest-plant-form__grid label { display: grid; gap: .25rem; }
.harvest-plant-form__weight { display: grid; gap: .35rem; }
.harvest-plant-form__weight > div, .harvest-weight-input { display: grid; gap: .45rem; grid-template-columns: minmax(0, 1fr) 7rem; }
.harvest-entry-card { background: var(--card); border: 1px solid var(--line-soft); border-left: 4px solid var(--orange); border-radius: 8px; display: grid; gap: .85rem; padding: 1rem; }
.harvest-entry-card h3 { color: var(--ink); font-size: 1.15rem; margin: .1rem 0; }
.harvest-entry-card p { color: var(--muted); margin: 0; }
.harvest-capture-guide { background: var(--paper-deep); border: 1px solid var(--line-soft); border-radius: 10px; display: grid; gap: .8rem; padding: .9rem 1rem; }
.harvest-capture-guide h3 { color: var(--ink); font-size: 1.05rem; margin: .1rem 0; }
.harvest-capture-guide p { color: var(--muted); margin: 0; }
.harvest-capture-guide ol { counter-reset: harvest-choice; display: grid; gap: .55rem; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.harvest-capture-guide li { background: var(--card); border: 1px solid var(--line-soft); border-radius: 7px; display: grid; gap: .18rem; grid-template-columns: 1.65rem minmax(0, 1fr); padding: .6rem; }
.harvest-capture-guide li::before { align-items: center; background: var(--surface); border-radius: 50%; color: var(--paper); content: counter(harvest-choice); counter-increment: harvest-choice; display: inline-flex; font-size: .72rem; font-weight: 850; grid-row: span 2; height: 1.35rem; justify-content: center; width: 1.35rem; }
.harvest-capture-guide li strong { color: var(--ink); font-size: .85rem; }
.harvest-capture-guide li span { color: var(--muted); font-size: .76rem; line-height: 1.32; }
.harvest-form-intro { background: var(--field); border-left: 3px solid var(--steel); color: var(--muted); font-size: .82rem; line-height: 1.4; margin: 0; padding: .6rem .7rem; }
.harvest-weighing-context { align-items: end; background: var(--paper-deep); border: 1px solid var(--line-soft); border-radius: 8px; display: grid; gap: .55rem .75rem; grid-template-columns: minmax(12rem, 1.4fr) minmax(10rem, 1fr) minmax(13rem, 1.25fr) auto; padding: .75rem .85rem; }
.harvest-weighing-context > div { align-self: center; }
.harvest-weighing-context h3 { color: var(--ink); font-size: .95rem; margin: .08rem 0; }
.harvest-weighing-context p:not(.eyebrow) { color: var(--muted); font-size: .78rem; margin: 0; }
.harvest-weighing-context label { color: var(--ink); display: grid; font-size: .78rem; font-weight: 750; gap: .25rem; }
.harvest-weighing-context label span { color: var(--muted); font-weight: 600; }
.harvest-context-note { color: var(--muted); font-size: .75rem; grid-column: 1 / -1; line-height: 1.35; }
.harvest-context-note strong { color: var(--ink); }
.harvest-live-scale { align-items: center; background: #f3eee2; border: 1px solid var(--line-soft); border-left: 4px solid var(--orange); border-radius: 8px; color: var(--ink); display: grid; gap: .8rem; grid-template-columns: minmax(0, 1fr) auto; padding: .85rem .9rem; }
.harvest-live-scale__reading { display: grid; gap: .18rem; min-width: 0; }
.harvest-live-scale .eyebrow, .harvest-live-scale small { color: var(--muted); }
.harvest-live-scale strong { color: var(--ink) !important; font-size: clamp(1.65rem, 4vw, 2.6rem); font-variant-numeric: tabular-nums; letter-spacing: -.03em; line-height: 1; }
.harvest-live-scale .form-actions { align-items: stretch; display: grid; gap: .45rem; grid-template-columns: repeat(2, max-content); margin: 0; }
.harvest-live-scale .primary-button { background: var(--orange); border-color: var(--orange); color: var(--surface); }
.harvest-live-scale .secondary-button { background: var(--card); border-color: var(--ink); color: var(--ink); }
.harvest-live-scale .secondary-button:disabled { border-color: var(--line); color: var(--muted); }
.harvest-item-follow-up h3, .harvest-item-follow-up p, .harvest-item-follow-up strong { color: var(--ink); }
.harvest-item-identity { display: grid; gap: .25rem; }
.harvest-item-identity small { color: var(--muted); }
.harvest-choice-fieldset { border: 0; display: grid; gap: .4rem; margin: 0; padding: 0; }
.harvest-choice-fieldset legend { color: var(--ink); font-weight: 850; margin-bottom: .35rem; }
.harvest-choice-tiles { display: flex; flex-wrap: wrap; gap: .4rem; }
.harvest-choice-tiles label { cursor: pointer; margin: 0; position: relative; }
.harvest-choice-tiles input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.harvest-choice-tiles span { align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); display: inline-flex; font-size: .86rem; font-weight: 750; min-height: 2.75rem; padding: .5rem .72rem; }
.harvest-choice-tiles input:checked + span { background: var(--charcoal); border-color: var(--charcoal); color: #fffdf8; }
.harvest-choice-tiles input:focus-visible + span { box-shadow: 0 0 0 3px rgba(238, 111, 46, .28); outline: 2px solid var(--orange); outline-offset: 1px; }
.harvest-observation-owned { background: #eef4ea; border-radius: 8px; color: var(--ink); margin: 0; padding: .65rem .75rem; }
.harvest-sensor-action { align-items: center; background: var(--paper-deep); border: 1px solid var(--line-soft); border-radius: 7px; display: flex; flex-wrap: wrap; gap: .5rem; padding: .6rem .7rem; }
.harvest-sensor-action small { color: var(--muted); font-size: .75rem; }
.harvest-entry-card > .harvest-weight-form { border-top: 1px solid var(--line-soft); margin-top: .1rem; padding-top: .75rem; }
.harvest-item-condition-grid { display: grid; gap: .6rem .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.harvest-item-condition-grid label { display: grid; gap: .28rem; }
.harvest-quick-exceptions { align-items: center; background: #FFF8E9; border: 1px solid #E5CF9E; border-left: 4px solid var(--orange); border-radius: 8px; display: grid; gap: .65rem; grid-template-columns: minmax(0, 1fr) auto; padding: .7rem .8rem; }
.harvest-quick-exceptions strong { color: var(--ink); display: block; font-size: .88rem; }
.harvest-quick-exceptions small { color: var(--muted); font-size: .76rem; }
.harvest-quick-exceptions__actions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.harvest-quick-exceptions__actions .secondary-button, .harvest-quick-exceptions__actions .text-button { min-height: 2.35rem; padding: .38rem .58rem; }
.harvest-sensor-action { display: flex; }
.harvest-weight-form { display: grid; gap: .6rem; }
.harvest-weight-form .button-link, .harvest-plant-form .secondary-button { justify-self: start; }
.harvest-results-list, .harvest-items-list { background: var(--card); border: 1px solid var(--line-soft); border-radius: 8px; overflow: hidden; }
.harvest-results-list .section-heading, .harvest-items-list .section-heading { background: var(--paper-deep); border-bottom: 1px solid var(--line-soft); margin: 0; padding: .75rem 1rem; }
.harvest-results-list .section-heading h3, .harvest-items-list .section-heading h3 { font-size: 1rem; }
.harvest-plant-result { align-items: center; border-bottom: 1px solid var(--line-soft); display: grid; gap: .6rem; grid-template-columns: minmax(0, 1fr) auto auto; padding: .8rem 1rem; }
.harvest-plant-result:last-child, .harvest-item-row:last-child { border-bottom: 0; }
.harvest-plant-result > div:first-child { display: grid; gap: .1rem; min-width: 0; }
.harvest-plant-result strong { color: var(--ink); }
.harvest-plant-result small, .harvest-item-row small { color: var(--muted); }
.harvest-plant-result__metrics { display: flex; gap: .45rem; }
.harvest-plant-result__metrics span { background: var(--paper-deep); border-radius: 5px; display: grid; gap: .04rem; padding: .35rem .48rem; text-align: right; }
.harvest-plant-result__metrics b { color: var(--ink); font-size: .88rem; }
.harvest-plant-result__metrics small { font-size: .67rem; font-weight: 750; text-transform: uppercase; }
.harvest-plant-result__note { grid-column: 1 / -1; }
.harvest-selection-pill { border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .74rem; font-weight: 800; padding: .3rem .5rem; text-align: center; }
.harvest-selection-pill--candidate { background: #edf4ea; border-color: #a6c29b; color: #39683d; }
.harvest-selection-pill--watch { background: #fbf0dc; border-color: #d8ad64; color: #8a5e1d; }
.harvest-selection-pill--avoid { background: #f9e5e1; border-color: #d49a8b; color: #8a4234; }
.harvest-selection-pill--limited { background: var(--paper-deep); }
.harvest-item-row { align-items: center; border-bottom: 1px solid var(--line-soft); display: grid; gap: .7rem; grid-template-columns: minmax(0, 1fr) auto auto; padding: .72rem 1rem; }
.harvest-item-row > div { display: grid; gap: .08rem; min-width: 0; }
.harvest-item-row b { color: var(--ink); white-space: nowrap; }
.harvest-item-edit { grid-column: 1 / -1; }
.harvest-item-edit summary { color: var(--steel); cursor: pointer; font-size: .82rem; font-weight: 800; }
.harvest-item-edit form { display: grid; gap: .45rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: .55rem; }
.harvest-item-edit label { color: var(--muted); display: grid; font-size: .75rem; font-weight: 750; gap: .16rem; }
.harvest-item-edit form button { justify-self: start; }
.harvest-finish-actions { margin-top: 0; }
@media (min-width: 760px) {
    .harvest-measure-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .harvest-plant-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .harvest-plant-form > label, .harvest-plant-form > textarea, .harvest-plant-form > button { grid-column: 1 / -1; }
    .harvest-plant-form__identity, .harvest-plant-form__grid, .harvest-plant-form__weight { min-width: 0; }
}
@media (max-width: 560px) {
    .harvest-measure-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .harvest-measure-summary > span:nth-child(2) { border-right: 0; }
    .harvest-measure-summary > span:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
    .harvest-selection-summary { align-items: flex-start; display: grid; gap: .25rem; }
    .harvest-selection-summary span { border-left: 0; padding-left: 0; }
    .harvest-capture-guide ol { grid-template-columns: 1fr; }
    .harvest-recording-date { align-items: flex-start; display: grid; }
    .harvest-recording-date details { margin-left: 0; width: 100%; }
    .harvest-recording-date form { grid-template-columns: 1fr; }
    .harvest-recording-date form button { width: 100%; }
    .harvest-weighing-context { align-items: stretch; grid-template-columns: 1fr; }
    .harvest-live-scale { align-items: stretch; grid-template-columns: 1fr; }
    .harvest-live-scale .form-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
    .harvest-live-scale .form-actions > * { min-width: 0; width: 100%; }
    .harvest-item-condition-grid { grid-template-columns: 1fr; }
    .harvest-quick-exceptions { grid-template-columns: 1fr; }
    .harvest-quick-exceptions__actions { justify-content: stretch; }
    .harvest-quick-exceptions__actions > * { flex: 1 1 8rem; }
    .harvest-plant-disclosure summary { align-items: start; flex-direction: column; gap: .16rem; }
    .harvest-plant-disclosure summary small { text-align: left; }
    .harvest-plant-form__grid { grid-template-columns: 1fr; }
    .harvest-plant-result, .harvest-item-row { align-items: start; grid-template-columns: minmax(0, 1fr) auto; }
    .harvest-plant-result__metrics, .harvest-selection-pill, .harvest-plant-result__note { grid-column: 1 / -1; }
    .harvest-selection-pill { justify-self: start; }
    .harvest-item-row form { grid-column: 1 / -1; }
    .harvest-item-edit form { grid-template-columns: 1fr; }
}
.crop-seed-lot-grid .crop-record-row, .crop-area-grid .crop-record-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.crop-seed-lot-grid .crop-record-row nav, .crop-area-grid .crop-record-row nav { grid-column: 1 / -1; margin-top: .35rem; }
.crop-history-feed .crop-record-row { align-items: start; border-left-color: var(--blue); display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.crop-history-feed .crop-record-row nav { grid-column: 1 / -1; }
.crop-filter-drawer { background: var(--paper-deep); border: 1px solid var(--line-soft); border-radius: 8px; }
.crop-filter-drawer summary { color: var(--ink); font-weight: 700; padding: .7rem .85rem; }
.crop-filter-drawer .filters { padding: 0 .85rem .85rem; }
.crop-filter-chips { align-items: center; display: flex; flex-wrap: wrap; gap: .42rem; }
.crop-filter-chips a { color: var(--steel); font-size: .85rem; font-weight: 700; }

@media (min-width: 900px) {
    .crop-tab-header { padding: 1rem 1.15rem; }
    .crop-output-list .crop-record-row { padding: .72rem 1rem; }
    .crop-history-feed .crop-record-row { grid-template-columns: minmax(0, 1fr) auto; }
}

/* Crop overview visual target: this stays last so legacy crop experiments do
   not override the deliberately compact overview composition. */
.crop-module-shell .crop-view-nav {
    align-items: center;
    display: flex;
    gap: .32rem;
    margin-bottom: 1.15rem;
    overflow: visible;
    padding: 0 0 .55rem;
}

.crop-module-shell .crop-view-nav-primary { display: flex; gap: .24rem; min-width: 0; }
.crop-module-shell .crop-view-nav a,
.crop-module-shell .crop-view-nav-more summary {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    font-size: .78rem;
    font-weight: 850;
    gap: .28rem;
    justify-content: center;
    min-height: 2.35rem;
    padding: .38rem .68rem;
    text-decoration: none;
    white-space: nowrap;
}
.crop-module-shell .crop-view-nav a:hover,
.crop-module-shell .crop-view-nav a:focus-visible,
.crop-module-shell .crop-view-nav-more summary:hover,
.crop-module-shell .crop-view-nav-more summary:focus-visible { background: var(--field); border-color: var(--line-soft); color: var(--ink); outline: none; }
.crop-module-shell .crop-view-nav a[aria-current="page"],
.crop-module-shell .crop-view-nav a[aria-current="page"]:visited { background: var(--charcoal); border-color: var(--charcoal); color: #fffdf8 !important; }
.crop-module-shell .crop-view-nav-more { position: relative; }
.crop-module-shell .crop-view-nav-more summary { list-style: none; }
.crop-module-shell .crop-view-nav-more summary::-webkit-details-marker { display: none; }
.crop-module-shell .crop-view-nav-more summary span { color: var(--orange); font-size: 1.1rem; line-height: .7; }
.crop-module-shell .crop-view-nav-more > div {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(24, 24, 23, .14);
    display: grid;
    gap: .14rem;
    min-width: 10rem;
    padding: .35rem;
    position: absolute;
    right: 0;
    top: calc(100% + .35rem);
    z-index: 8;
}
.crop-module-shell .crop-view-nav-more:not([open]) > div { display: none; }
.crop-module-shell .crop-view-nav-more > div a { border-radius: 7px; color: var(--ink); justify-content: flex-start; padding-inline: .62rem; }
.crop-module-shell .crop-view-nav-more > div a[aria-current="page"] { color: #fffdf8 !important; }

.crop-module-shell .crop-operations { border-radius: 12px; box-shadow: 0 7px 20px rgba(24, 24, 23, .045); }
.crop-module-shell .crop-operations-main { grid-template-columns: minmax(8.7rem, .82fr) minmax(0, 1.35fr) minmax(7.5rem, .64fr); }
.crop-module-shell .crop-care-read { min-width: 0; overflow-wrap: anywhere; }
.crop-module-shell .crop-care-read strong { font-size: 1.7rem; line-height: .95; }
.crop-module-shell .crop-care-read span { line-height: 1.1; }
.crop-module-shell .crop-metric-rail { grid-auto-columns: unset; grid-auto-flow: unset; grid-template-columns: repeat(auto-fit, minmax(7.2rem, 1fr)); overflow: visible; }

.crop-module-shell .crop-planting-grid { display: grid; gap: .72rem; grid-template-columns: repeat(auto-fit, minmax(18.5rem, 1fr)); overflow: visible; padding: 0; }
.crop-module-shell .crop-planting-card {
    border-bottom-width: 3px;
    border-radius: 12px;
    box-shadow: 0 5px 16px rgba(24, 24, 23, .045);
    gap: .55rem;
    min-height: 0;
    padding: .8rem;
}
.crop-module-shell .crop-planting-card:hover { box-shadow: 0 9px 20px rgba(24, 24, 23, .09); transform: translateY(-1px); }
.crop-module-shell .crop-planting-card-topline { gap: .5rem; min-height: 1.85rem; }
.crop-module-shell .crop-planting-card-topline > span { max-width: 58%; }
.crop-module-shell .crop-planting-card-topline > div { align-items: center; display: flex; flex: 0 0 auto; gap: .42rem; }
.crop-module-shell .crop-planting-card-topline b { font-size: .67rem; }
.crop-module-shell .crop-planting-card-open {
    align-items: center;
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-radius: 50%;
    color: var(--ink);
    display: inline-flex;
    font-size: 1.45rem;
    font-weight: 500;
    height: 1.85rem;
    justify-content: center;
    line-height: 1;
    text-decoration: none;
    width: 1.85rem;
}
.crop-module-shell .crop-planting-card-open:hover,
.crop-module-shell .crop-planting-card-open:focus-visible { background: var(--charcoal); color: #fffdf8; outline: none; }
.crop-module-shell .crop-planting-identity { align-items: center; display: grid; gap: .75rem; grid-template-columns: 6.5rem minmax(0, 1fr); }
.crop-module-shell .crop-planting-visual { align-items: center; background: radial-gradient(circle at 50% 39%, #fffdf8 0 31%, #f3ecd9 32% 100%); border-radius: 50%; display: grid; height: 6.35rem; justify-items: center; overflow: hidden; width: 6.35rem; }
.crop-module-shell .crop-planting-card .crop-planting-visual .crop-visual { height: 6rem; transform: none; width: 6rem; }
.crop-module-shell .crop-planting-card h4 { font-size: 1.28rem; line-height: 1.03; }
.crop-module-shell .crop-planting-card h4 span { font-size: .83rem; line-height: 1.22; }
.crop-module-shell .crop-stage-timeline { margin-top: .55rem; min-width: 0; }
.crop-module-shell .crop-stage-visual { gap: 0; margin: 0; min-height: 1rem; padding: 0 .42rem; }
.crop-module-shell .crop-stage-visual i { background: #d8d3c8; border-radius: 0; flex: 1 1 0; height: .19rem; }
.crop-module-shell .crop-stage-visual i::before {
    align-items: center;
    background: #fffdf8;
    border: 2px solid #cbc4b6;
    border-radius: 50%;
    color: transparent;
    content: "";
    display: flex;
    font-size: .55rem;
    font-style: normal;
    font-weight: 900;
    height: .82rem;
    justify-content: center;
    left: -.36rem;
    position: absolute;
    top: -.31rem;
    width: .82rem;
}
.crop-module-shell .crop-stage-visual i.complete { background: var(--green); }
.crop-module-shell .crop-stage-visual i.complete::before { background: var(--green); border-color: var(--green); color: #fffdf8; content: "✓"; }
.crop-module-shell .crop-stage-visual i.current { background: var(--orange); box-shadow: none; transform: none; }
.crop-module-shell .crop-stage-visual i.current::before { background: #fffdf8; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(231, 109, 49, .12); }
.crop-module-shell .crop-stage-visual i.future { background: #d8d3c8; }
.crop-module-shell .crop-stage-timeline-labels { display: flex; justify-content: space-between; margin-top: .28rem; }
.crop-module-shell .crop-stage-timeline-labels span { color: var(--muted); flex: 1 1 0; font-size: .58rem; font-weight: 750; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.crop-module-shell .crop-stage-timeline-labels span:first-child { text-align: left; }
.crop-module-shell .crop-stage-timeline-labels span:last-child { text-align: right; }
.crop-module-shell .crop-stage-timeline-labels .is-key { color: var(--ink); }
.crop-module-shell .crop-planting-source { border-top: 1px solid var(--line-soft); padding-top: .55rem; }
.crop-module-shell .crop-planting-source span { font-size: .64rem; letter-spacing: .055em; }
.crop-module-shell .crop-planting-card-meta { background: rgba(243, 236, 217, .54); border: 0; border-radius: 7px; margin: 0; padding: .42rem .48rem; }
.crop-module-shell .crop-planting-card-meta > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crop-module-shell .crop-last-read { border-left: 2px solid var(--line); font-size: .75rem; line-height: 1.35; padding-left: .48rem; white-space: normal; }
.crop-module-shell .crop-planting-card nav { border: 0; margin: 0; padding: 0; }
.crop-module-shell .crop-planting-card nav a,
.crop-module-shell .crop-planting-card nav a:first-child { background: transparent; border: 0; border-radius: 0; color: var(--steel); flex: 0 0 auto; font-size: .76rem; justify-content: flex-start; min-height: 1.65rem; padding: 0; text-decoration: none; }
.crop-module-shell .crop-planting-card nav a::after { color: var(--orange); content: "›"; font-size: 1.05rem; margin-left: .24rem; }

/* Crop-specific illustration refinements: detail lives in the vector, not extra UI. */
.crop-illustration__corn-tassel,
.crop-illustration__corn-silk,
.crop-illustration__branch { fill: none; stroke: #5e7544; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.crop-illustration__corn-husk { fill: #779949; stroke: #3d6038; stroke-width: 1.4; }
.crop-illustration__corn-cob { fill: #e4b63f; stroke: #ac7d20; stroke-width: 1.1; }
.crop-illustration__corn-kernels { fill: none; stroke: #fff0a0; stroke-linecap: round; stroke-width: 2; }
.crop-illustration__broccoli-crown .crop-illustration__head { fill: #467a43; }
.crop-illustration__broccoli-crown .crop-illustration__floret { fill: #67a453; stroke: #3d703c; stroke-width: .75; }
.crop-illustration__broccoli-crown .crop-illustration__head--cauliflower,
.crop-illustration__broccoli-crown .crop-illustration__head--cauliflower + .crop-illustration__floret { fill: #f2eddd; }

@media (max-width: 720px) {
    .crop-module-shell .crop-view-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .25rem; }
    .crop-module-shell .crop-view-nav-primary { display: contents; }
    .crop-module-shell .crop-view-nav a,
    .crop-module-shell .crop-view-nav-more summary { font-size: .68rem; min-width: 0; padding-inline: .32rem; }
    .crop-module-shell .crop-view-nav-more { min-width: 0; position: relative; }
    .crop-module-shell .crop-view-nav-more > div { min-width: 10.5rem; }
    .crop-module-shell .crop-operations-main { grid-template-columns: minmax(0, 1fr) minmax(6.45rem, .7fr); }
    .crop-module-shell .crop-care-read { grid-column: 2; grid-row: 1 / span 2; }
    .crop-module-shell .crop-care-read small { display: none; }
    .crop-module-shell .crop-metric-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .crop-module-shell .crop-metric { min-width: 0; }
    .crop-module-shell .crop-planting-grid { grid-template-columns: 1fr; }
    .crop-module-shell .crop-planting-card { padding: .75rem; }
    .crop-module-shell .crop-planting-identity { gap: .62rem; grid-template-columns: 5.9rem minmax(0, 1fr); }
    .crop-module-shell .crop-planting-visual { height: 5.75rem; width: 5.75rem; }
    .crop-module-shell .crop-planting-card .crop-planting-visual .crop-visual { height: 5.45rem; width: 5.45rem; }
    .crop-module-shell .crop-stage-timeline-labels span { font-size: .52rem; }
}

@media (min-width: 721px) {
    .crop-module-shell .crop-view-nav-more { display: contents; }
    .crop-module-shell .crop-view-nav-more summary { display: none; }
    .crop-module-shell .crop-view-nav-more > div,
    .crop-module-shell .crop-view-nav-more:not([open]) > div { background: transparent; border: 0; box-shadow: none; display: flex; gap: .24rem; min-width: 0; padding: 0; position: static; }
    .crop-module-shell .crop-view-nav-more > div a { color: var(--muted); justify-content: center; padding: .38rem .68rem; }
}

@media (prefers-reduced-motion: reduce) {
    .crop-module-shell .crop-planting-card,
    .crop-module-shell .crop-planting-card .crop-planting-visual .crop-visual { animation: none !important; transition: none !important; }
}

/* Crop visual system: compact CSS illustrations driven by common-crop profiles. */
.crop-visual { --crop-green: #477b4e; --crop-produce: #d8a634; --crop-earth: #8b6a45; align-items:end; display:inline-grid; height:4.5rem; isolation:isolate; justify-items:center; overflow:hidden; position:relative; width:5rem; }
.crop-visual__sun { background:#f0bf3b; border-radius:50%; height:.72rem; left:.65rem; opacity:.8; position:absolute; top:.52rem; width:.72rem; }
.crop-visual__soil { background:linear-gradient(180deg, #b88a56, #765233); border-radius:100% 100% 0 0; bottom:.1rem; height:.58rem; position:absolute; width:4.2rem; }
.crop-visual__plant { bottom:.47rem; display:block; height:3.2rem; position:absolute; width:3rem; }
.crop-visual__stem { background:var(--crop-green); border-radius:999px; bottom:0; height:2.38rem; left:1.42rem; position:absolute; width:.18rem; }
.crop-visual__leaf { background:var(--crop-green); border-radius:100% 0 100% 0; height:.76rem; position:absolute; transform:rotate(-28deg); width:1.2rem; }
.crop-visual__leaf--one { left:.4rem; top:1.18rem; }
.crop-visual__leaf--two { right:.34rem; top:.72rem; transform:scaleX(-1) rotate(-28deg); }
.crop-visual__leaf--three { left:.72rem; top:.35rem; transform:rotate(20deg) scale(.82); }
.crop-visual__produce { background:var(--crop-produce); border:1px solid rgba(37, 36, 31, .2); border-radius:50%; bottom:.1rem; box-shadow:inset -.16rem -.13rem rgba(0,0,0,.12); height:.82rem; left:.92rem; position:absolute; width:.82rem; }
.crop-visual__produce--two { left:1.72rem; transform:scale(.76); }
.crop-visual--small { height:3.1rem; transform:scale(.76); transform-origin:center; width:3.5rem; }
.crop-visual--tiny { height:2.1rem; transform:scale(.53); transform-origin:center; width:2.45rem; }
.crop-visual--garlic, .crop-visual--onion { --crop-produce:#f3e7d2; --crop-green:#527d47; }
.crop-visual--garlic .crop-visual__produce { border-radius:48% 48% 52% 52%; box-shadow:inset -.13rem -.08rem #cfbea6, -.23rem 0 #ece1ce, .23rem 0 #ece1ce; }
.crop-visual--onion .crop-visual__produce { --crop-produce:#d5a87b; border-radius:46% 46% 55% 55%; box-shadow:inset -.13rem -.08rem #b77965, -.19rem 0 #e5bf9b, .19rem 0 #e5bf9b; }
.crop-visual--potato, .crop-visual--sweet-potato { --crop-produce:#c89b62; --crop-green:#4f7d4e; }
.crop-visual--potato .crop-visual__produce, .crop-visual--sweet-potato .crop-visual__produce { bottom:-.08rem; height:.68rem; transform:rotate(-17deg); width:1.05rem; }
.crop-visual--tomato { --crop-produce:#c84536; --crop-green:#477b4e; }
.crop-visual--tomato .crop-visual__produce { bottom:.83rem; left:1.62rem; transform:scale(.72); }
.crop-visual--tomato .crop-visual__produce--two { bottom:1.22rem; left:.96rem; }
.crop-visual--pepper { --crop-produce:#d14e38; }
.crop-visual--pepper .crop-visual__produce { border-radius:42% 42% 58% 58%; bottom:.62rem; height:1rem; left:1.76rem; width:.55rem; }
.crop-visual--corn { --crop-produce:#e0b53c; --crop-green:#4d7a44; }
.crop-visual--corn .crop-visual__stem { height:2.82rem; left:1.43rem; width:.24rem; }
.crop-visual--corn .crop-visual__leaf { height:.58rem; width:1.55rem; }
.crop-visual--corn .crop-visual__produce { border-radius:45%; bottom:.55rem; height:1.1rem; left:1.66rem; width:.42rem; }
.crop-visual--beans, .crop-visual--peas { --crop-produce:#77a14d; }
.crop-visual--beans .crop-visual__produce, .crop-visual--peas .crop-visual__produce { border-radius:999px; bottom:.6rem; height:.36rem; left:1.64rem; transform:rotate(-31deg); width:1rem; }
.crop-visual--peas .crop-visual__produce { --crop-produce:#a2bd68; }
.crop-visual--cucumber, .crop-visual--squash, .crop-visual--pumpkin, .crop-visual--watermelon { --crop-green:#4d814c; }
.crop-visual--cucumber .crop-visual__produce { --crop-produce:#5a914d; border-radius:999px; height:.45rem; left:1.08rem; width:1.35rem; }
.crop-visual--squash .crop-visual__produce { --crop-produce:#e1b744; height:.9rem; width:.9rem; }
.crop-visual--pumpkin .crop-visual__produce { --crop-produce:#d97833; height:1.12rem; width:1.12rem; }
.crop-visual--watermelon .crop-visual__produce { --crop-produce:#5b9659; border-radius:48%; height:.94rem; width:1.12rem; }
.crop-visual--watermelon .crop-visual__produce::after { border-left:2px solid #d6df90; border-right:2px solid #d6df90; border-radius:50%; content:""; inset:.12rem .22rem; position:absolute; }
.crop-visual--lettuce, .crop-visual--cabbage { --crop-green:#638d56; }
.crop-visual--lettuce .crop-visual__stem, .crop-visual--cabbage .crop-visual__stem { display:none; }
.crop-visual--lettuce .crop-visual__leaf, .crop-visual--cabbage .crop-visual__leaf { border-radius:55% 45% 50% 50%; bottom:.2rem; height:1.35rem; left:.75rem; transform:rotate(-20deg); width:1.5rem; }
.crop-visual--lettuce .crop-visual__leaf--two, .crop-visual--cabbage .crop-visual__leaf--two { left:1.16rem; transform:rotate(32deg); }
.crop-visual--lettuce .crop-visual__leaf--three, .crop-visual--cabbage .crop-visual__leaf--three { background:#8baa62; left:1.1rem; top:1.35rem; }
.crop-visual--cabbage { --crop-green:#74935c; }
.crop-visual--carrot, .crop-visual--beet, .crop-visual--radish { --crop-green:#4d854b; }
.crop-visual--carrot .crop-visual__produce, .crop-visual--beet .crop-visual__produce, .crop-visual--radish .crop-visual__produce { bottom:-.1rem; height:1.08rem; left:1.22rem; transform:rotate(45deg); width:.6rem; }
.crop-visual--carrot .crop-visual__produce { --crop-produce:#df8139; }
.crop-visual--beet .crop-visual__produce { --crop-produce:#a84551; border-radius:50%; transform:none; width:.8rem; }
.crop-visual--radish .crop-visual__produce { --crop-produce:#d7515a; border-radius:50%; transform:none; width:.76rem; }
.crop-visual--sunflower { --crop-produce:#edbd37; --crop-green:#4d7e45; }
.crop-visual--sunflower .crop-visual__stem { height:2.8rem; }
.crop-visual--sunflower .crop-visual__produce { background:radial-gradient(circle, #664b26 0 30%, #edbd37 33%); bottom:2.15rem; height:1rem; left:1rem; width:1rem; }
.crop-visual--wheat { --crop-produce:#d8b34d; --crop-green:#749254; }
.crop-visual--wheat .crop-visual__stem { box-shadow:.48rem .16rem var(--crop-green), -.48rem .25rem var(--crop-green); height:2.55rem; }
.crop-visual--wheat .crop-visual__produce { border-radius:45% 45% 15% 15%; bottom:2.05rem; box-shadow:.48rem .2rem var(--crop-produce), -.48rem .26rem var(--crop-produce); height:.78rem; left:1.12rem; width:.32rem; }
.crop-visual--custom { --crop-green:#547b68; --crop-produce:#98b275; }
.crop-visual--seed .crop-visual__plant { opacity:.28; transform:translateY(1.35rem) scale(.45); }
.crop-visual--seed .crop-visual__produce { background:#8b6740; bottom:.02rem; left:1.32rem; transform:scale(.42); }
.crop-visual--dormant .crop-visual__plant { opacity:.48; transform:scale(.75); transform-origin:bottom; }
.crop-visual--sprout .crop-visual__plant { transform:scale(.58); transform-origin:bottom; }
.crop-visual--harvest .crop-visual__produce { box-shadow:0 0 0 .16rem rgba(237, 179, 58, .2), inset -.16rem -.13rem rgba(0,0,0,.12); }
.crop-visual--stored { filter:saturate(.64); opacity:.76; }
.crop-profile-picker { align-items:center; display:grid; gap:.2rem; grid-template-columns:minmax(0,1fr) 3.7rem; }
.crop-profile-picker > label, .crop-profile-picker > .hint, .crop-profile-picker > .errorlist { grid-column:1 / -1; }
.crop-profile-picker > select { grid-column:1; }
.crop-profile-inline-visual { grid-column:2; grid-row:2; justify-self:center; margin:-.6rem; pointer-events:none; }
@media (prefers-reduced-motion: no-preference) {
    .crop-visual--sprout .crop-visual__leaf { animation:crop-leaf-arrival .55s ease-out both; }
    .crop-visual--growing .crop-visual__leaf--two { animation:crop-leaf-breathe 3.4s ease-in-out infinite; transform-origin:bottom left; }
    .crop-visual--harvest .crop-visual__produce { animation:crop-harvest-glow 1.8s ease-in-out infinite; }
}
@keyframes crop-leaf-arrival { from { opacity:0; transform:translateY(.5rem) scale(.35); } to { opacity:1; } }
@keyframes crop-leaf-breathe { 50% { transform:scaleX(-1) rotate(-22deg) translateY(-.08rem); } }
@keyframes crop-harvest-glow { 50% { box-shadow:0 0 0 .26rem rgba(237, 179, 58, .12), inset -.16rem -.13rem rgba(0,0,0,.12); } }

.module-crop-command { grid-template-columns:auto auto minmax(0, 1fr); }
.module-crop-command-visual { align-items:center; display:grid; min-width:3.4rem; }
.module-crop-command-visual .crop-visual { margin:-.5rem; }
.crop-planting-identity { align-items:center; display:grid; gap:.35rem; grid-template-columns:5.1rem minmax(0, 1fr); min-width:0; }
.crop-planting-identity h4 { margin:0; }
.crop-planting-identity .crop-stage-visual { margin-top:.36rem; }
.crop-record-visual { align-items:center; display:grid; min-height:3.3rem; width:3.35rem; }
.crop-record-row--planting, .crop-record-row--harvest, .crop-record-row--seed { align-items:center; }
.crop-record-row--planting { grid-template-columns:auto minmax(0, 1fr) auto; }
.crop-record-row--harvest { grid-template-columns:auto 6.25rem minmax(0, 1fr) auto auto; }
.crop-seed-lot-grid .crop-record-row--seed { grid-template-columns:auto minmax(0, 1fr) auto; }
.crop-seed-lot-grid .crop-record-row--seed nav { grid-column:2 / -1; }
.crop-history-feed .crop-record-row { grid-template-columns:auto minmax(0, 1fr) auto; }
.crop-history-feed .crop-record-row nav { grid-column:2 / -1; }

/* On phones, direct daily destinations remain visible while administration has one discoverable menu. */
.crop-view-nav { align-items:center; justify-content:space-between; overflow:visible; }
.crop-view-nav-primary { display:flex; gap:.2rem; min-width:0; }
.crop-view-nav-more { position:relative; }
.crop-view-nav-more summary { align-items:center; background:var(--field); border:1px solid var(--line-soft); border-radius:999px; color:var(--ink); cursor:pointer; display:flex; font-size:.78rem; font-weight:900; gap:.32rem; list-style:none; min-height:2.1rem; padding:.35rem .65rem; }
.crop-view-nav-more summary::-webkit-details-marker { display:none; }
.crop-view-nav-more summary span { color:var(--orange); font-size:1.1rem; line-height:1; }
.crop-view-nav-more > div { background:var(--card); border:1px solid var(--line-soft); border-radius:8px; box-shadow:0 10px 26px rgba(24,24,23,.15); display:grid; gap:.15rem; min-width:9rem; padding:.35rem; position:absolute; right:0; top:calc(100% + .35rem); z-index:5; }
.crop-view-nav-more:not([open]) > div { display:none; }
.crop-view-nav-more > div a { color:var(--ink); padding:.5rem .6rem; }
.crop-view-nav-more > div a[aria-current="page"] { background:var(--charcoal); color:#fffdf8; }
@media (min-width:721px) {
    .crop-view-nav-more { display:contents; }
    .crop-view-nav-more summary { display:none; }
    .crop-view-nav-more > div, .crop-view-nav-more:not([open]) > div { background:transparent; border:0; box-shadow:none; display:flex; gap:.2rem; min-width:0; padding:0; position:static; }
    .crop-view-nav-more > div a { border-radius:999px; color:var(--muted); font-size:.78rem; font-weight:900; padding:.42rem .7rem; text-decoration:none; }
    .crop-view-nav-more > div a[aria-current="page"] { background:var(--charcoal); color:#fffdf8; }
}
@media (max-width:720px) {
    .crop-view-nav { gap:.35rem; }
    .crop-view-nav-primary { gap:.05rem; }
    .crop-view-nav a { font-size:.7rem; padding:.42rem .48rem; }
    .crop-planting-identity { grid-template-columns:4.45rem minmax(0,1fr); }
    .crop-planting-visual .crop-visual { transform:scale(.86); transform-origin:center; }
    .crop-record-row--planting, .crop-record-row--harvest, .crop-seed-lot-grid .crop-record-row--seed, .crop-history-feed .crop-record-row { grid-template-columns:auto minmax(0,1fr); }
    .crop-record-row--planting > div:nth-of-type(3), .crop-record-row--harvest > div:nth-of-type(3) { grid-column:2; }
    .crop-record-row--planting nav, .crop-record-row--harvest nav, .crop-seed-lot-grid .crop-record-row--seed nav, .crop-history-feed .crop-record-row nav { grid-column:1 / -1; }
}

/* Common-crop visuals: keep each catalog entry recognizable while sharing
   the same restrained motion language. */
.crop-illustration__head { fill:#4f8b4d; stroke:#39683d; stroke-width:1.5; }
.crop-illustration__head--cauliflower { fill:#f0e7cf; stroke:#a99b7d; }
.crop-illustration__floret { fill:#6fa052; stroke:#47733f; stroke-width:1; }
.crop-illustration__head--cauliflower + .crop-illustration__floret,
.crop-illustration__head--cauliflower ~ .crop-illustration__floret { fill:#f5eedb; stroke:#b9aa8b; }
.crop-visual--spinach .crop-illustration__leaf { fill:#4f8f52; }
.crop-visual--broccoli .crop-illustration__floret { fill:#70a052; }
.crop-visual--cauliflower .crop-illustration__floret { fill:#f5eedb; stroke:#b9aa8b; }
.crop-visual--turnip .crop-illustration__produce { fill:#d7c8d8; stroke:#827087; }
.crop-illustration__pod--pea { fill:#9abf65; }
.crop-visual--onion .crop-illustration__bulb--onion { fill:#d2a06f; }
.crop-section-actions { align-items:center; display:flex; flex-wrap:wrap; gap:.55rem; justify-content:flex-end; }
.form-actions--subtle { margin-top:-.35rem; }

@media (prefers-reduced-motion: no-preference) {
    body .crop-visual--growing .crop-illustration__canopy,
    body .crop-visual--growing .crop-illustration__leaf,
    body .crop-visual--fruiting .crop-illustration__canopy,
    body .crop-visual--fruiting .crop-illustration__leaf {
        animation: crop-foliage-sway 3.8s ease-in-out infinite;
        transform-box: fill-box;
        transform-origin: center bottom;
    }
    body .crop-visual--fruiting .crop-illustration__produce,
    body .crop-visual--harvest .crop-illustration__produce,
    body .crop-visual--harvest .crop-illustration__head {
        animation: crop-produce-ready 2.4s ease-in-out infinite;
        transform-box: fill-box;
        transform-origin: center;
    }
}

/* Planting identity owns its visual column so the illustration can never
   intrude into crop names, stage bars, or source metadata. */
body .crop-planting-visual { overflow: hidden; min-width: 0; }
body .crop-planting-visual > .crop-visual { flex: 0 0 auto; max-width: 100%; overflow: hidden; }
body .crop-planting-identity > div:last-child { min-width: 0; overflow: hidden; }
body .crop-planting-identity h4,
body .crop-planting-source,
body .crop-planting-card-meta { min-width: 0; overflow-wrap: anywhere; }
body .crop-stage-visual { min-width: 0; }
@media (max-width:720px) {
    .crop-section-actions { justify-content:flex-start; }
}

@media (max-width: 720px) {
    .crop-tab-header { align-items: flex-start; flex-direction: column; padding: .8rem; }
    .crop-tab-primary { align-self: stretch; text-align: center; }
    .crop-tab-metrics { gap: .4rem; }
    .crop-tab-metrics span { flex: 1 1 7rem; }
    .crop-output-list .crop-record-row, .crop-seed-lot-grid .crop-record-row, .crop-area-grid .crop-record-row, .crop-history-feed .crop-record-row { display: grid; grid-template-columns: minmax(0, 1fr); }
    .crop-output-list .crop-record-row > div:last-of-type { align-items: start; }
    .crop-tab-workspace .crop-record-row nav { margin-top: .18rem; width: 100%; }
    .crop-tab-workspace .crop-record-row nav a, .crop-tab-workspace .crop-record-row nav button { flex: 1 1 8rem; text-align: center; }
}

/* Crop composition correction: all destinations visible, no sideways navigation. */
.crop-view-nav {
    background: transparent;
    border: 0;
    display: block;
    margin: 0 0 1.15rem;
    overflow: visible;
    padding: 0;
}

.crop-view-nav-grid {
    display: grid;
    gap: .35rem;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.crop-view-nav-grid a {
    align-items: center;
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 7px;
    color: var(--muted);
    display: inline-flex;
    font-size: .78rem;
    font-weight: 850;
    justify-content: center;
    min-height: 2.45rem;
    padding: .42rem .5rem;
    text-align: center;
    text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
}

.crop-view-nav-grid a:hover,
.crop-view-nav-grid a:focus-visible { border-color: var(--steel); color: var(--ink); }
.crop-view-nav-grid a:active { transform: scale(.985); }
.crop-view-nav-grid a[aria-current="page"],
.crop-view-nav-grid a[aria-current="page"]:visited {
    background: var(--charcoal);
    border-color: var(--charcoal);
    box-shadow: inset 0 -2px 0 var(--orange);
    color: #FFFDF8 !important;
}

.crop-planting-glance .section-heading {
    border-bottom: 0;
    padding-bottom: .1rem;
}

.crop-planting-grid { gap: .9rem; }
.crop-planting-card {
    background: linear-gradient(145deg, #FFFDF8 0%, var(--card) 72%, #F8F1E4 100%);
    border-color: var(--line-soft);
    box-shadow: 0 7px 18px rgba(24, 24, 23, .065);
    gap: .58rem;
    min-height: 0;
    overflow: hidden;
    padding: .9rem;
    position: relative;
    transition: box-shadow .2s ease, transform .2s ease;
}

.crop-planting-card::before {
    background: radial-gradient(circle, rgba(243, 196, 77, .15), transparent 68%);
    content: "";
    height: 10rem;
    pointer-events: none;
    position: absolute;
    right: -4rem;
    top: -4.5rem;
    width: 10rem;
}

.crop-planting-card > * { position: relative; z-index: 1; }
.crop-planting-card:hover { box-shadow: 0 11px 24px rgba(24, 24, 23, .1); transform: translateY(-2px); }
.crop-planting-card:active { transform: translateY(0); }
.crop-planting-card-topline { min-height: 1.6rem; }
.crop-planting-card-topline > span { max-width: 68%; }
.crop-planting-identity { align-items: center; gap: .85rem; }
.crop-planting-identity > div:last-child { flex: 1 1 auto; min-width: 0; }
.crop-planting-visual {
    align-items: center;
    background: radial-gradient(circle at 50% 45%, rgba(255, 253, 248, .98) 0 18%, rgba(243, 196, 77, .14) 19% 50%, transparent 70%), var(--paper-deep);
    border: 1px solid rgba(54, 70, 54, .08);
    border-radius: 50%;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 4px 10px rgba(24, 24, 23, .06);
    display: flex;
    flex: 0 0 6.5rem;
    height: 6.5rem;
    justify-content: center;
    overflow: hidden;
    width: 6.5rem;
}

.crop-planting-card .crop-planting-visual .crop-visual {
    height: 6.15rem;
    transform: scale(1.02);
    transition: transform .2s ease;
    width: 6.15rem;
}

.crop-planting-card:hover .crop-planting-visual .crop-visual { transform: translateY(-2px) scale(1.06); }
.crop-planting-card h4 { font-size: 1.3rem; line-height: 1.04; }
.crop-planting-card h4 span { font-size: .84rem; line-height: 1.2; }

/* Restore readable lifecycle segments: complete, current, then upcoming. */
.crop-stage-visual {
    align-items: center;
    display: flex;
    gap: .3rem;
    margin: .35rem 0 .1rem;
    min-height: .7rem;
    padding: 0;
}

.crop-stage-visual::before { display: none; }
.crop-stage-visual i {
    background: var(--line-soft);
    border: 0;
    border-radius: 999px;
    flex: 1 1 auto;
    height: .38rem;
    max-width: none;
    min-width: 0;
    transform: none;
}

.crop-stage-visual i.complete { background: var(--green); }
.crop-stage-visual i.current {
    background: linear-gradient(90deg, var(--pollen), var(--orange));
    box-shadow: 0 0 0 3px rgba(243, 196, 77, .16);
    transform: scaleY(1.14);
}
.crop-stage-visual i.current::after { display: none; }
.crop-stage-visual i.future { background: #D8D3C8; }
.crop-planting-source { border-top: 1px solid var(--line-soft); padding-top: .55rem; }
.crop-planting-card-meta { margin-top: 0; }
.crop-planting-card nav { margin-top: .05rem; }

@media (prefers-reduced-motion: no-preference) {
    .crop-planting-card .crop-planting-visual .crop-visual { animation: crop-artwork-breathe 4.8s ease-in-out infinite; }
    .crop-planting-card:hover .crop-planting-visual .crop-visual { animation-play-state: paused; }
}

@keyframes crop-artwork-breathe {
    0%, 100% { transform: translateY(0) scale(1.02); }
    50% { transform: translateY(-2px) scale(1.035); }
}

@media (max-width: 720px) {
    .crop-view-nav-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .crop-view-nav-grid a { font-size: .76rem; min-height: 2.55rem; padding-inline: .32rem; }
    .crop-planting-grid {
        grid-auto-columns: auto;
        grid-auto-flow: row;
        grid-template-columns: minmax(0, 1fr);
        overflow: visible;
        padding: 0;
    }
    .crop-planting-visual { flex-basis: 6rem; height: 6rem; width: 6rem; }
    .crop-planting-card .crop-planting-visual .crop-visual { height: 5.7rem; width: 5.7rem; }
    .crop-planting-card-topline > span { max-width: 64%; }
}

@media (prefers-reduced-motion: reduce) {
    .crop-planting-card .crop-planting-visual .crop-visual { animation: none; }
    .crop-planting-card,
    .crop-view-nav-grid a { transition: none; }
}

/* Crop interaction polish: one discoverable tab rail, tactile cards, and a readable stage path. */
.crop-view-nav {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(34, 35, 31, .04);
    padding: .3rem;
}

.crop-view-tab-scroller {
    display: flex;
    gap: .25rem;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}

.crop-view-tab-scroller::-webkit-scrollbar { display: none; }
.crop-view-tab-scroller a {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 7px;
    color: var(--muted);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .83rem;
    font-weight: 800;
    justify-content: center;
    min-height: 2.55rem;
    padding: .5rem .85rem;
    scroll-snap-align: start;
    text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.crop-view-tab-scroller a:hover { background: var(--paper-deep); color: var(--ink); }
.crop-view-tab-scroller a:active { transform: scale(.98); }
.crop-view-tab-scroller a[aria-current="page"] { background: var(--charcoal); border-color: var(--charcoal); color: #FFFDF8 !important; }
.crop-view-tab-scroller a:focus-visible { outline: 3px solid rgba(231, 109, 49, .42); outline-offset: 2px; }

.crop-card-location,
.crop-card-age,
.crop-planting-source > span { align-items: center; display: inline-flex; gap: .25rem; min-width: 0; }
.crop-card-location i,
.crop-card-age i,
.crop-planting-source > span i { color: var(--orange); font-size: .9rem; font-style: normal; line-height: 1; }
.crop-card-location i { color: var(--green); }

.crop-planting-card {
    background: linear-gradient(145deg, var(--card) 0%, #FFFDF8 72%);
    box-shadow: 0 7px 18px rgba(34, 35, 31, .07);
    overflow: hidden;
    position: relative;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.crop-planting-card::before {
    background: radial-gradient(circle, rgba(230, 196, 90, .17), transparent 68%);
    content: "";
    height: 9rem;
    pointer-events: none;
    position: absolute;
    right: -3rem;
    top: -4rem;
    width: 9rem;
}

.crop-planting-card:hover { box-shadow: 0 11px 26px rgba(34, 35, 31, .11); transform: translateY(-2px); }
.crop-planting-card:active { transform: translateY(0) scale(.997); }
.crop-planting-card > * { position: relative; z-index: 1; }
.crop-planting-card-topline { min-height: 1.8rem; }
.crop-planting-card-topline > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crop-planting-card-topline b { box-shadow: 0 2px 8px rgba(34, 35, 31, .05); }
.crop-planting-identity { align-items: center; gap: .75rem; }
.crop-planting-identity > div:last-child { flex: 1 1 auto; min-width: 0; }
.crop-planting-visual {
    align-items: center;
    background: radial-gradient(circle at 50% 48%, rgba(230, 196, 90, .16), transparent 68%), var(--paper-deep);
    border: 1px solid rgba(34, 35, 31, .06);
    border-radius: 10px;
    display: flex;
    flex: 0 0 6rem;
    height: 6rem;
    justify-content: center;
    overflow: hidden;
    width: 6rem;
}

.crop-planting-card .crop-planting-visual .crop-visual { height: 5.75rem; width: 5.75rem; transition: transform .22s ease; }
.crop-planting-card:hover .crop-planting-visual .crop-visual { transform: translateY(-2px) scale(1.04); }
.crop-planting-card h4 { line-height: 1.08; }
.crop-planting-card h4 span { line-height: 1.18; }

.crop-stage-visual {
    align-items: center;
    display: flex;
    gap: 0;
    min-height: 1.25rem;
    padding: .18rem .1rem;
    position: relative;
}

.crop-stage-visual::before {
    background: var(--line-soft);
    content: "";
    height: .16rem;
    left: .3rem;
    position: absolute;
    right: .3rem;
    top: 50%;
    transform: translateY(-50%);
}

.crop-stage-visual i {
    background: var(--line-soft);
    border: 2px solid var(--card);
    border-radius: 50%;
    display: block;
    flex: 1 1 0;
    height: .72rem;
    max-width: .72rem;
    min-width: .58rem;
    position: relative;
    transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
    z-index: 1;
}

.crop-stage-visual i.complete { background: var(--green); }
.crop-stage-visual i.current { background: var(--orange); box-shadow: 0 0 0 .2rem rgba(231, 109, 49, .14); transform: scale(1.2); }
.crop-stage-visual i.future { background: var(--line); }

@media (prefers-reduced-motion: no-preference) {
    .crop-planting-card { animation: crop-card-rise .28s ease both; }
    .crop-planting-card:nth-child(2) { animation-delay: .04s; }
    .crop-planting-card:nth-child(3) { animation-delay: .08s; }
    .crop-stage-visual i.current { animation: crop-stage-pulse 2.4s ease-in-out infinite; }
}

@keyframes crop-card-rise { from { opacity: .2; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes crop-stage-pulse { 0%, 100% { box-shadow: 0 0 0 .16rem rgba(231, 109, 49, .12); } 50% { box-shadow: 0 0 0 .28rem rgba(231, 109, 49, .2); } }

.crop-module-shell a,
.crop-module-shell button,
.crop-module-shell summary { transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease; }
.crop-module-shell button:active,
.crop-module-shell summary:active { transform: scale(.985); }
.crop-module-shell details[open] > :not(summary) { animation: crop-disclosure-in .2s ease both; }
@keyframes crop-disclosure-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 720px) {
    .crop-view-nav { position: relative; }
    .crop-view-nav::after {
        background: linear-gradient(90deg, transparent, var(--card));
        content: "";
        height: calc(100% - .4rem);
        pointer-events: none;
        position: absolute;
        right: .3rem;
        top: .2rem;
        width: 1.6rem;
    }
    .crop-view-tab-scroller { padding-right: 1.2rem; }
    .crop-view-tab-scroller a { min-height: 2.7rem; padding-inline: .8rem; }
    .crop-planting-card { padding: .8rem; }
    .crop-planting-visual { flex-basis: 5.6rem; height: 5.6rem; width: 5.6rem; }
    .crop-planting-card .crop-planting-visual .crop-visual { height: 5.35rem; width: 5.35rem; }
}

@media (prefers-reduced-motion: reduce) {
    .crop-planting-card,
    .crop-stage-visual i.current { animation: none !important; }
}

/* Must be last: older card art styled every nested span, including the new
   crop-visual wrapper, as a tiny circular status badge. */
body .crop-planting-visual {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    height: 6.25rem;
    justify-content: center;
    overflow: visible;
    width: 6.75rem;
}
body .crop-planting-visual > .crop-visual {
    background: transparent;
    border-radius: 0;
    color: inherit;
    display: inline-flex;
    font-size: inherit;
    font-weight: inherit;
    height: 6.1rem;
    position: static;
    transform: none;
    width: 6.6rem;
}
body .crop-planting-visual > .crop-visual svg { height: 100%; width: 100%; }
body .crop-planting-identity { grid-template-columns: 7rem minmax(0, 1fr); }
@media (max-width: 720px) {
    body .crop-planting-visual { height: 5.8rem; width: 6.2rem; }
    body .crop-planting-visual > .crop-visual { height: 5.7rem; transform: none; width: 6.1rem; }
    body .crop-planting-identity { grid-template-columns: 6.35rem minmax(0, 1fr); }
}

/* Recognition details for the two current planting families. */
.crop-illustration__strap { fill:#5f8d54; stroke:#3f6d43; stroke-linejoin:round; stroke-width:1.2; }
.crop-illustration__strap--center { fill:#719c5c; }
.crop-illustration__strap--right { fill:#547f4d; }
.crop-illustration__scape { fill:none; stroke:#487846; stroke-linecap:round; stroke-width:2.3; }
.crop-illustration__clove { fill:none; stroke:#b6a486; stroke-linecap:round; stroke-width:1.25; }
.crop-illustration__roots { fill:none; stroke:#9e8055; stroke-linecap:round; stroke-width:1.15; }
.crop-illustration__soil-cutaway { fill:#9a6c43; opacity:.62; }
.crop-illustration__soil-line { fill:none; stroke:#6f4e34; stroke-linecap:round; stroke-width:2; }
.crop-illustration__potato-eye { fill:#76543a; opacity:.72; }
.crop-illustration__flower { fill:#f4f0e7; stroke:#766b87; stroke-width:1; }
.crop-illustration__flower-center { fill:#e0b846; }
body .crop-visual--growing .crop-illustration { animation:none; }
.crop-illustration__trellis { fill:none; stroke:#9d8057; stroke-width:2; }
.crop-illustration__vine { fill:none; stroke:#4e814c; stroke-linecap:round; stroke-width:3.3; }
.crop-illustration__pod { fill:#76a653; stroke:#456e42; stroke-width:1.15; }
.crop-illustration__produce--melon { fill:#5f9959; stroke:#376c43; stroke-width:1.4; }
.crop-illustration__produce--pumpkin { fill:#e18a37; stroke:#9e5527; stroke-width:1.25; }
.crop-illustration__produce--squash { fill:#e5b83d; stroke:#9b7625; stroke-width:1.25; }
.crop-illustration__leaf--outer { fill:#5d8d51; }
.crop-illustration__leaf--inner { fill:#87a963; }
.crop-illustration__vein { fill:none; stroke:#c4d19a; stroke-linecap:round; stroke-width:1.3; }
.crop-illustration__sunflower-ring { fill:#edbd37; stroke:#b88424; stroke-width:2; stroke-dasharray:2 3; }
.crop-illustration__sunflower-center { fill:#674a29; }
@media (prefers-reduced-motion: no-preference) {
    body .crop-visual--growing .crop-illustration__canopy,
    body .crop-visual--harvest .crop-illustration__canopy {
        animation:crop-foliage-sway 3.8s ease-in-out infinite;
        transform-box:fill-box;
        transform-origin:center bottom;
    }
    body .crop-visual--potato.crop-visual--growing .crop-illustration__potato-flowers { animation:crop-flower-breathe 2.8s ease-in-out infinite; transform-box:fill-box; transform-origin:center; }
}
@keyframes crop-foliage-sway { 0%,100% { transform:rotate(-3deg); } 50% { transform:rotate(3deg) translateY(-1px); } }
@keyframes crop-flower-breathe { 50% { filter:brightness(1.12); transform:scale(1.08); } }
body .crop-planting-identity { min-width:0; }
body .crop-planting-visual { flex:0 0 5.8rem; max-width:5.8rem; }
body .crop-planting-visual > .crop-visual { max-width:100%; }

/* Read-only planting details lead with the crop itself; editing stays separate. */
.planting-detail-page { display:grid; gap:1rem; }
.planting-detail-hero { align-items:center; background:var(--card); border:1px solid var(--line-soft); border-top:4px solid var(--orange); border-radius:12px; display:grid; gap:1rem; grid-template-columns:minmax(7rem,9rem) minmax(0,1fr) auto; padding:1rem; }
.planting-detail-hero-visual { align-items:center; background:linear-gradient(145deg,#faf6ec,#eee5d1); border:1px solid var(--line-soft); border-radius:10px; display:flex; height:8rem; justify-content:center; overflow:hidden; }
.planting-detail-hero-visual .crop-visual { height:7.4rem; width:7.4rem; }
.planting-detail-hero-copy { min-width:0; }
.planting-detail-hero-copy h2 { font-size:clamp(1.6rem,3vw,2.35rem); margin:.15rem 0 0; overflow-wrap:anywhere; }
.planting-detail-variety { color:var(--muted); font-size:1.1rem; font-weight:750; margin:.15rem 0 .55rem; }
.planting-detail-badges { align-items:center; display:flex; flex-wrap:wrap; gap:.4rem; }
.planting-detail-context { color:var(--muted); margin:.6rem 0 0; }
.planting-detail-actions { display:grid; gap:.45rem; min-width:9rem; }
.planting-detail-actions .primary-button { align-items:center; background:var(--charcoal); border:1px solid var(--charcoal); border-radius:8px; color:#FFFDF8; display:flex; font-weight:850; justify-content:center; min-height:2.75rem; padding:.5rem .75rem; text-align:center; text-decoration:none; }
.planting-detail-actions .primary-button:hover, .planting-detail-actions .primary-button:focus-visible { background:#34342f; color:#FFFDF8; }
.planting-detail-actions a { align-items:center; display:flex; justify-content:center; min-height:2.75rem; text-align:center; }
.planting-detail-section { background:var(--card); border:1px solid var(--line-soft); border-radius:10px; min-width:0; padding:1rem; }
.detail-section-heading { align-items:center; border-bottom:1px solid var(--line-soft); display:flex; gap:1rem; justify-content:space-between; margin-bottom:.8rem; padding-bottom:.65rem; }
.detail-section-heading h3 { margin:.15rem 0 0; }
.detail-section-heading > span { color:var(--muted); font-size:.85rem; font-weight:800; }
.secondary-button--compact { min-height:2.25rem; padding:.35rem .65rem; }
.planting-detail-lifecycle { overflow:hidden; }
.detail-lifecycle-track { display:grid; gap:.35rem; grid-template-columns:repeat(auto-fit,minmax(5.5rem,1fr)); }
.detail-lifecycle-step { color:var(--muted); display:grid; font-size:.76rem; gap:.35rem; min-width:0; }
.detail-lifecycle-step i { background:var(--line); border-radius:99px; display:block; height:.45rem; }
.detail-lifecycle-step.is-complete i { background:var(--green); }
.detail-lifecycle-step.is-current { color:var(--ink); font-weight:850; }
.detail-lifecycle-step.is-current i { background:var(--orange); box-shadow:0 0 0 3px rgba(224,104,47,.13); }
.detail-lifecycle-step span { hyphens:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lifecycle-guidance { border-top:1px solid var(--line-soft); margin-top:.85rem; padding-top:.7rem; }
.lifecycle-guidance summary { color:var(--muted); cursor:pointer; font-size:.82rem; font-weight:800; }
.lifecycle-guidance p { color:var(--muted); font-size:.86rem; line-height:1.45; margin:.6rem 0; max-width:48rem; }
.planting-detail-grid { display:grid; gap:1rem; grid-template-columns:repeat(2,minmax(0,1fr)); }
.detail-facts { display:grid; gap:.7rem; grid-template-columns:repeat(2,minmax(0,1fr)); margin:0; }
.detail-facts div { border-bottom:1px solid var(--line-soft); min-width:0; padding-bottom:.55rem; }
.detail-facts dt { color:var(--muted); font-size:.7rem; font-weight:850; text-transform:uppercase; }
.detail-facts dd { font-weight:750; margin:.15rem 0 0; overflow-wrap:anywhere; }
.detail-stock-row, .detail-history-row { border-bottom:1px solid var(--line-soft); display:grid; gap:.18rem; padding:.65rem 0; }
.detail-stock-row:last-child, .detail-history-row:last-child { border-bottom:0; padding-bottom:0; }
.detail-stock-row strong, .detail-history-row strong { overflow-wrap:anywhere; }
.detail-stock-row span, .detail-stock-row small, .detail-history-row span, .detail-history-row small, .detail-muted { color:var(--muted); }
.detail-history-row > div { align-items:baseline; display:flex; gap:.55rem; justify-content:space-between; }
.detail-history-row p { margin:.2rem 0 0; overflow-wrap:anywhere; }
.detail-history-row small { font-size:.78rem; }
.planting-detail-footer-actions { align-items:center; display:flex; gap:.75rem; justify-content:space-between; }
.planting-detail-footer-actions .danger-link { color:var(--red); font-weight:800; }
.detail-empty-state { align-items:center; background:var(--paper-deep); border:1px dashed var(--line); border-radius:9px; display:flex; flex-wrap:wrap; gap:.55rem .75rem; padding:.8rem; }
.detail-empty-state p { color:var(--muted); flex:1 1 12rem; margin:0; }
.detail-empty-icon { align-items:center; background:var(--field); border:1px solid var(--line-soft); border-radius:50%; color:var(--orange); display:inline-flex; flex:0 0 2rem; font-size:1.2rem; height:2rem; justify-content:center; width:2rem; }
.planting-detail-hero .secondary-button, .planting-detail-section .secondary-button, .planting-detail-footer-actions .secondary-button { align-items:center; display:inline-flex; justify-content:center; min-height:2.35rem; text-decoration:none; }
.planting-detail-hero .secondary-button { background:var(--field); color:var(--ink); }
.planting-form-heading { display:grid; gap:.25rem; margin-bottom:.1rem; }
.planting-form-heading .lede { margin:.15rem 0 .25rem; max-width:52rem; }
.planting-form .planting-form-section { background:var(--card); border:1px solid var(--line-soft); border-radius:10px; box-shadow:0 2px 10px rgba(35,31,24,.035); padding:1rem; }
.planting-form .planting-form-section > h3 { border-bottom:1px solid var(--line-soft); font-size:1.15rem; margin:0 0 .85rem; padding-bottom:.65rem; }
.planting-form .form-field label, .planting-form .field-label { color:var(--ink); font-size:.82rem; font-weight:850; }
.planting-form .form-field { gap:.34rem; }
.planting-form .helptext { color:var(--muted); font-size:.78rem; line-height:1.35; }
.planting-form input, .planting-form select, .planting-form textarea { border-radius:8px; }
.planting-form .advanced-fields { background:var(--paper-deep); border:1px solid var(--line-soft); border-radius:9px; margin-top:.9rem; padding:.75rem; }
.planting-form .advanced-fields summary { color:var(--ink); font-weight:850; }
.planting-form .form-actions { align-items:center; display:flex; flex-wrap:wrap; gap:.55rem; }
.planting-form button, .planting-form .button-link, .planting-form .secondary-button { border-radius:8px; }
.planting-form .form-actions button, .planting-form .form-actions a { align-items:center; border-radius:8px; display:inline-flex; justify-content:center; min-height:2.55rem; text-decoration:none; }
.planting-form .seed-use-row { background:var(--paper-deep); border:1px solid var(--line-soft); border-radius:8px; margin-bottom:.6rem; padding:.65rem .75rem; }
.planting-form .seed-use-row summary { color:var(--ink); display:flex; flex-wrap:wrap; gap:.2rem; }
.planting-form .seed-use-row__label { flex:0 0 auto; }
.planting-form .seed-use-row__name { color:var(--muted); font-weight:700; min-width:0; overflow-wrap:anywhere; }
.planting-form .seed-use-row--identified summary { color:var(--ink); }
.crop-planting-card .crop-planting-visual { align-items:center; height:5.2rem; }
.crop-planting-card .crop-planting-visual .crop-visual { height:5rem; transform:scale(.94); width:5rem; }
.crop-planting-card-topline { align-items:center; min-height:1.7rem; }
.crop-planting-card-meta { min-width:0; }
.crop-planting-card-meta .care-status-pill { max-width:100%; overflow:hidden; text-overflow:ellipsis; }
.crop-planting-card nav a { border-radius:8px; min-height:2.5rem; }
@media (max-width:720px) {
    .planting-detail-hero { grid-template-columns:5.8rem minmax(0,1fr); padding:.8rem; }
    .planting-detail-hero-visual { height:5.8rem; }
    .planting-detail-hero-visual .crop-visual { height:5.5rem; width:5.5rem; }
    .planting-detail-actions { display:flex; grid-column:1 / -1; min-width:0; }
    .planting-detail-actions a { flex:1 1 0; }
    .planting-detail-grid { grid-template-columns:minmax(0,1fr); }
    .detail-lifecycle-track { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .detail-section-heading { align-items:flex-start; }
    .detail-section-heading .secondary-button { white-space:nowrap; }
}
@media (max-width:720px) {
    body .crop-planting-identity { gap:.25rem; grid-template-columns:5.65rem minmax(0,1fr); }
    body .crop-planting-visual { flex-basis:5.35rem; max-width:5.35rem; width:5.35rem; }
    body .crop-planting-visual > .crop-visual { height:5.35rem; width:5.35rem; }
}

/* Final cascade: these deliberately outrank the early generic crop glyphs. */
body .crop-visual { height:5.45rem; width:6.15rem; }
body .crop-visual__sun { height:.7rem; left:.62rem; top:.54rem; width:.7rem; }
body .crop-visual__sun-rays { border:1px dashed rgba(218,163,31,.55); border-radius:50%; height:1.18rem; left:.38rem; opacity:.56; position:absolute; top:.3rem; width:1.18rem; }
body .crop-visual__shadow { background:rgba(69,48,29,.15); border-radius:50%; bottom:.04rem; height:.42rem; position:absolute; width:3.9rem; }
body .crop-visual__soil { height:.66rem; width:4.82rem; }
body .crop-visual__plant { bottom:.58rem; height:3.85rem; width:3.8rem; }
body .crop-visual__stem { height:2.85rem; left:1.78rem; width:.2rem; }
body .crop-visual__leaf { height:.88rem; width:1.45rem; }
body .crop-visual__produce { height:.96rem; left:1.2rem; width:.96rem; }
body .crop-visual--garlic .crop-visual__stem, body .crop-visual--onion .crop-visual__stem { background:transparent; box-shadow:.48rem 0 0 -.05rem var(--crop-green), .96rem 0 0 -.05rem var(--crop-green-light), 1.44rem 0 0 -.05rem var(--crop-green), 1.92rem 0 0 -.05rem var(--crop-green-light), 2.4rem 0 0 -.05rem var(--crop-green); height:3.25rem; left:.7rem; transform:skewX(-5deg); width:.15rem; }
body .crop-visual--garlic .crop-visual__leaf, body .crop-visual--onion .crop-visual__leaf { display:none; }
body .crop-visual--garlic .crop-visual__produce { border-radius:48% 48% 55% 55%; bottom:-.15rem; box-shadow:-.28rem .04rem #e8dac2, .28rem .04rem #e8dac2, inset -.13rem -.1rem #c7b79b; height:1.05rem; left:1.38rem; width:1.05rem; }
body .crop-visual--garlic .crop-visual__produce--two { display:none; }
body .crop-visual--garlic .crop-visual__accent { border-left:1px solid rgba(121,91,48,.4); border-right:1px solid rgba(121,91,48,.4); bottom:.08rem; height:.78rem; left:1.88rem; width:.18rem; }
body .crop-visual--onion .crop-visual__produce { border-radius:45% 45% 58% 58%; box-shadow:-.25rem .05rem #e4bd94, .25rem .05rem #e4bd94, inset -.13rem -.1rem #b97863; }
body .crop-visual--potato .crop-visual__stem, body .crop-visual--sweet-potato .crop-visual__stem { height:2.45rem; left:1.7rem; transform:rotate(-4deg); }
body .crop-visual--potato .crop-visual__leaf, body .crop-visual--sweet-potato .crop-visual__leaf { border-radius:65% 22% 65% 22%; height:1rem; width:1.25rem; }
body .crop-visual--potato .crop-visual__leaf--one, body .crop-visual--sweet-potato .crop-visual__leaf--one { left:.3rem; top:1.05rem; transform:rotate(-32deg); }
body .crop-visual--potato .crop-visual__leaf--two, body .crop-visual--sweet-potato .crop-visual__leaf--two { right:.25rem; top:.58rem; }
body .crop-visual--potato .crop-visual__leaf--three, body .crop-visual--sweet-potato .crop-visual__leaf--three { left:.96rem; top:.04rem; }
body .crop-visual--potato .crop-visual__produce, body .crop-visual--sweet-potato .crop-visual__produce { bottom:-.26rem; height:.64rem; left:1.04rem; opacity:.87; transform:rotate(-16deg); width:1.08rem; }
body .crop-visual--potato .crop-visual__produce--two, body .crop-visual--sweet-potato .crop-visual__produce--two { bottom:-.18rem; left:1.95rem; }
body .crop-visual--tomato .crop-visual__produce { bottom:.85rem; left:2.12rem; }
body .crop-visual--tomato .crop-visual__produce--two { bottom:1.38rem; left:1.2rem; }
body .crop-visual--tomato .crop-visual__accent { border:.22rem solid #e4b644; border-radius:50%; left:1.66rem; top:.45rem; transform:scale(.8); }
body .crop-visual--pepper .crop-visual__produce { border-radius:42% 42% 60% 60%; bottom:.6rem; height:1.12rem; left:2.18rem; width:.62rem; }
body .crop-visual--corn .crop-visual__plant { height:4.18rem; } body .crop-visual--corn .crop-visual__stem { height:3.55rem; left:1.78rem; width:.27rem; } body .crop-visual--corn .crop-visual__leaf { border-radius:100% 0 100% 0; height:.54rem; width:1.8rem; } body .crop-visual--corn .crop-visual__produce { border-radius:44%; bottom:.75rem; height:1.15rem; left:2.08rem; width:.46rem; }
body .crop-visual--beans .crop-visual__accent, body .crop-visual--peas .crop-visual__accent { border-left:2px solid #6f9351; border-radius:50%; height:2.1rem; left:.55rem; top:1rem; transform:rotate(-28deg); width:1.85rem; }
body .crop-visual--cucumber .crop-visual__accent, body .crop-visual--squash .crop-visual__accent, body .crop-visual--pumpkin .crop-visual__accent, body .crop-visual--watermelon .crop-visual__accent { border-bottom:2px solid var(--crop-green); border-radius:50%; bottom:.44rem; height:1.7rem; left:.1rem; transform:rotate(-10deg); width:3.45rem; }
body .crop-visual--lettuce .crop-visual__stem, body .crop-visual--cabbage .crop-visual__stem { display:none; } body .crop-visual--lettuce .crop-visual__leaf, body .crop-visual--cabbage .crop-visual__leaf { border-radius:58% 42% 55% 45%; bottom:.14rem; height:1.65rem; left:.75rem; top:auto; width:1.85rem; }
body .crop-visual--carrot .crop-visual__produce { border-radius:70% 30% 70% 30%; bottom:-.23rem; height:1.25rem; left:1.6rem; transform:rotate(43deg); width:.56rem; }
body .crop-visual--sunflower .crop-visual__plant { height:4.2rem; } body .crop-visual--sunflower .crop-visual__stem { height:3.35rem; } body .crop-visual--sunflower .crop-visual__produce { bottom:2.48rem; height:1.28rem; left:1.2rem; width:1.28rem; }
body .crop-visual--wheat .crop-visual__stem { box-shadow:.65rem .22rem 0 -.04rem var(--crop-green), 1.3rem .08rem 0 -.04rem var(--crop-green), 1.95rem .28rem 0 -.04rem var(--crop-green); height:3.12rem; left:.38rem; } body .crop-visual--wheat .crop-visual__produce { bottom:2.18rem; box-shadow:.65rem .18rem var(--crop-produce), 1.3rem .03rem var(--crop-produce), 1.95rem .22rem var(--crop-produce); left:.35rem; }
body .crop-planting-visual { align-items:center; background:linear-gradient(145deg, #faf6ec, #eee5d1); height:5.6rem; justify-content:center; } body .crop-planting-visual .crop-visual { transform:scale(.96); transform-origin:center bottom; } body .crop-planting-identity { align-items:center; grid-template-columns:6.2rem minmax(0,1fr); }
body .crop-planting-glance .section-heading { background:transparent; border:0; border-bottom:1px solid var(--line-soft); color:var(--ink); margin-bottom:.85rem; padding:.2rem 0 .75rem; } body .crop-planting-glance .section-heading h3 { color:var(--ink); }
@media (max-width:720px) { body .crop-planting-visual { height:5.25rem; } body .crop-planting-identity { grid-template-columns:6rem minmax(0,1fr); } body .crop-planting-visual .crop-visual { transform:scale(.89); } }

/* SVG crop scenes replace the former generic glyph: each family has a distinct
   real-world silhouette while staying intentionally small and operational. */
body .crop-visual { align-items:center; display:inline-flex; justify-content:center; overflow:visible; }
body .crop-visual::before, body .crop-visual__sun, body .crop-visual__sun-rays, body .crop-visual__shadow, body .crop-visual__soil, body .crop-visual__plant { display:none; }
body .crop-visual svg { display:block; height:100%; overflow:visible; width:100%; }
.crop-illustration__ground { fill:#8b6543; opacity:.28; }
.crop-illustration__stem { fill:none; stroke:#507b49; stroke-linecap:round; stroke-linejoin:round; stroke-width:4; }
.crop-illustration__leaf { fill:#6e9856; stroke:#416b42; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.25; }
.crop-illustration__bulb { fill:#f2e4c7; stroke:#8d7657; stroke-width:1.35; }
.crop-illustration__bulb--onion { fill:#d9aa78; }
.crop-illustration__produce { fill:#c99a62; stroke:#76543a; stroke-width:1.25; }
.crop-illustration--fruiting .crop-illustration__produce { fill:#c94c3d; stroke:#7d392e; }
.crop-illustration--grain .crop-illustration__produce { fill:#dbb44e; stroke:#947333; }
.crop-illustration--root .crop-illustration__produce { fill:#db7a3a; stroke:#985126; }
.crop-illustration__flower { fill:#e5b943; stroke:#a27b27; stroke-width:1; }
.crop-visual--beet .crop-illustration__produce { fill:#a84b57; stroke:#6f303e; }
.crop-visual--radish .crop-illustration__produce { fill:#d85a64; stroke:#913b45; }
.crop-visual--onion .crop-illustration__leaf, .crop-visual--garlic .crop-illustration__leaf { fill:#668f53; }
.crop-visual--wheat .crop-illustration__stem { stroke:#7c9554; }
.crop-visual--sunflower .crop-illustration__produce { fill:#e4b83a; }
body .crop-visual--seed svg { opacity:.48; transform:translateY(1.25rem) scale(.55); transform-origin:center bottom; }
body .crop-visual--dormant svg { filter:saturate(.54); opacity:.62; transform:scale(.78); transform-origin:center bottom; }
body .crop-visual--sprout svg { transform:scale(.66); transform-origin:center bottom; }
body .crop-visual--stored svg { filter:saturate(.58); opacity:.78; transform:translateY(.5rem) scale(.68); transform-origin:center bottom; }
body .crop-visual--harvest .crop-illustration__produce { filter:drop-shadow(0 0 .22rem rgba(227,178,58,.46)); }
@media (prefers-reduced-motion: no-preference) {
    body .crop-visual--growing svg { animation:crop-scene-sway 5.6s ease-in-out infinite; transform-origin:center bottom; }
    body .crop-visual--sprout svg { animation:crop-scene-emerge .62s cubic-bezier(.16,.8,.34,1) both; }
    body .crop-visual--harvest .crop-illustration__produce { animation:crop-produce-ready 2.2s ease-in-out infinite; transform-box:fill-box; transform-origin:center; }
    body .crop-visual--tomato.crop-visual--growing .crop-illustration__produce, body .crop-visual--pepper.crop-visual--growing .crop-illustration__produce { animation:crop-produce-ready 3.8s ease-in-out infinite; transform-box:fill-box; transform-origin:center; }
}
@keyframes crop-scene-sway { 0%,100% { transform:rotate(-1.3deg); } 50% { transform:rotate(1.3deg) translateY(-1px); } }
@keyframes crop-scene-emerge { from { opacity:0; transform:translateY(1.2rem) scale(.28); } to { opacity:1; transform:scale(.66); } }
@keyframes crop-produce-ready { 50% { filter:brightness(1.08) drop-shadow(0 0 .28rem rgba(227,178,58,.36)); transform:scale(1.06); } }

/* Crop visual refinements are last so the shared module shell keeps one consistent cascade. */
.module-crop-command { grid-template-columns:auto auto minmax(0,1fr); }
.module-crop-command-visual { align-items:center; display:grid; min-width:3.4rem; }
.module-crop-command-visual .crop-visual { margin:-.5rem; }
.crop-view-nav { align-items:center; justify-content:space-between; overflow:visible; }
.crop-view-nav-primary { display:flex; gap:.2rem; min-width:0; }
.crop-view-nav-more { position:relative; }
.crop-view-nav-more summary { align-items:center; background:var(--field); border:1px solid var(--line-soft); border-radius:999px; color:var(--ink); cursor:pointer; display:flex; font-size:.78rem; font-weight:900; gap:.32rem; list-style:none; min-height:2.1rem; padding:.35rem .65rem; }
.crop-view-nav-more summary::-webkit-details-marker { display:none; }
.crop-view-nav-more summary span { color:var(--orange); font-size:1.1rem; line-height:1; }
.crop-view-nav-more > div { background:var(--card); border:1px solid var(--line-soft); border-radius:8px; box-shadow:0 10px 26px rgba(24,24,23,.15); display:grid; gap:.15rem; min-width:9rem; padding:.35rem; position:absolute; right:0; top:calc(100% + .35rem); z-index:5; }
.crop-view-nav-more:not([open]) > div { display:none; }
.crop-view-nav-more > div a { color:var(--ink); padding:.5rem .6rem; }
.crop-view-nav-more > div a[aria-current="page"] { background:var(--charcoal); color:#fffdf8; }
.crop-planting-identity { align-items:center; display:grid; gap:.35rem; grid-template-columns:5.1rem minmax(0,1fr); min-width:0; }
.crop-planting-identity h4 { margin:0; }
.crop-planting-identity .crop-stage-visual { margin-top:.36rem; }
.crop-record-visual { align-items:center; display:grid; min-height:3.3rem; width:3.35rem; }
.crop-record-row--planting, .crop-record-row--harvest, .crop-record-row--seed { align-items:center; }
.crop-record-row--planting { grid-template-columns:auto minmax(0,1fr) auto; }
.crop-record-row--harvest { grid-template-columns:auto 6.25rem minmax(0,1fr) auto auto; }
.crop-seed-lot-grid .crop-record-row--seed { grid-template-columns:auto minmax(0,1fr) auto; }
.crop-seed-lot-grid .crop-record-row--seed nav { grid-column:2 / -1; }
.crop-history-feed .crop-record-row { grid-template-columns:auto minmax(0,1fr) auto; }
.crop-history-feed .crop-record-row nav { grid-column:2 / -1; }
@media (min-width:721px) {
    .crop-view-nav-more { display:contents; }
    .crop-view-nav-more summary { display:none; }
    .crop-view-nav-more > div, .crop-view-nav-more:not([open]) > div { background:transparent; border:0; box-shadow:none; display:flex; gap:.2rem; min-width:0; padding:0; position:static; }
    .crop-view-nav-more > div a { border-radius:999px; color:var(--muted); font-size:.78rem; font-weight:900; padding:.42rem .7rem; text-decoration:none; }
    .crop-view-nav-more > div a[aria-current="page"] { background:var(--charcoal); color:#fffdf8; }
}
@media (max-width:720px) {
    .crop-view-nav { gap:.35rem; }
    .crop-view-nav-primary { gap:.05rem; }
    .crop-view-nav a { font-size:.7rem; padding:.42rem .48rem; }
    .crop-planting-identity { grid-template-columns:4.45rem minmax(0,1fr); }
    .crop-planting-visual .crop-visual { transform:scale(.86); transform-origin:center; }
    .crop-record-row--planting, .crop-record-row--harvest, .crop-seed-lot-grid .crop-record-row--seed, .crop-history-feed .crop-record-row { grid-template-columns:auto minmax(0,1fr); }
    .crop-record-row--planting > div:nth-of-type(3), .crop-record-row--harvest > div:nth-of-type(3) { grid-column:2; }
    .crop-record-row--planting nav, .crop-record-row--harvest nav, .crop-seed-lot-grid .crop-record-row--seed nav, .crop-history-feed .crop-record-row nav { grid-column:1 / -1; }
}

/* Bee dashboard refinement: one shared data read, composed for the room each
   screen has. These rules sit after the earlier mobile-first layers so neither
   layout inherits a cramped intermediate grid. */
.bee-command-center {
    overflow: hidden;
}

.bee-command-center-heading {
    align-items: center;
    min-height: 2.75rem;
    padding-block: .6rem;
}

.bee-command-center-heading > * {
    min-width: 0;
}

.bee-cockpit-status div span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.bee-command-metrics {
    align-items: stretch;
}

.bee-command-metric {
    min-width: 0;
}

.bee-command-metric strong {
    line-height: 1;
    overflow-wrap: anywhere;
}

.bee-command-metric small {
    line-height: 1.2;
}

.bee-hive-glance-card {
    scroll-snap-align: start;
}

.bee-hive-glance-strip {
    scroll-snap-type: x proximity;
}

.bee-hive-card nav .hive-card-more {
    justify-content: center;
}

@media (max-width: 720px) {
    .bee-command-center-heading {
        padding-inline: .8rem;
    }

    .bee-cockpit {
        grid-template-areas:
            "weather health"
            "conditions health"
            "status status";
        grid-template-columns: minmax(0, 1fr) 6.15rem;
    }

    .bee-cockpit-health {
        min-height: 7.15rem;
    }

    .bee-cockpit-weather,
    .bee-cockpit-conditions {
        min-width: 0;
    }

    .bee-cockpit-status {
        grid-template-columns: 1.75rem minmax(0, 1fr);
    }

    .bee-command-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .bee-command-metric {
        min-height: 4.85rem;
        padding: .6rem .5rem;
    }

    .bee-command-metric strong {
        font-size: clamp(1.1rem, 5.4vw, 1.55rem);
    }

    .bee-command-metric span,
    .bee-command-metric small {
        font-size: .64rem;
    }

    .bee-hive-glance-strip {
        grid-auto-columns: minmax(9rem, 43vw);
        padding-bottom: .55rem;
    }

    .bee-hive-glance-card {
        min-height: 14.75rem;
    }
}

@media (min-width: 721px) {
    .bee-command-center-heading {
        padding-inline: 1rem;
    }

    .bee-command-metric {
        min-height: 5.4rem;
    }

    .bee-hive-card nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .bee-hive-card nav .hive-card-more {
        grid-column: auto;
    }
}

@media (min-width: 1050px) {
    .bee-cockpit {
        grid-template-areas: "weather conditions health status";
        grid-template-columns: minmax(9.5rem, .9fr) minmax(13rem, 1.25fr) 7.35rem minmax(13rem, 1.1fr);
    }

    .bee-cockpit-status {
        border-left: 1px solid var(--border);
        border-top: 0;
        grid-template-columns: 1.85rem minmax(0, 1fr);
        min-height: 0;
    }

    .bee-cockpit-status > a {
        grid-column: 1 / -1;
    }

    .bee-command-metrics {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* Bee command refinement: the operating read, priority, and KPIs are three
   deliberate layers rather than nested cards competing for attention. */
.bee-cockpit {
    grid-template-areas: "weather conditions health";
    grid-template-columns: minmax(9.5rem, .92fr) minmax(0, 1.55fr) 7.25rem;
}

.bee-cockpit-weather,
.bee-cockpit-conditions {
    min-height: 5.35rem;
}

.bee-cockpit-conditions {
    border-right: 1px solid var(--line-soft);
}

.bee-command-priority {
    align-items: center;
    background: linear-gradient(90deg, rgba(62, 100, 67, .075), transparent 64%);
    border-top: 1px solid var(--line-soft);
    display: grid;
    gap: .55rem;
    grid-template-columns: 1.85rem minmax(0, 1fr) auto auto;
    min-height: 3.65rem;
    padding: .55rem .85rem;
}

.bee-command-priority.tone-due,
.bee-command-priority.tone-attention {
    background: linear-gradient(90deg, rgba(232, 117, 53, .09), transparent 64%);
}

.bee-command-priority .bee-status-icon {
    align-items: center;
    background: var(--green);
    border-radius: 50%;
    color: #FFFDF8;
    display: inline-flex;
    font-size: .62rem;
    font-weight: 950;
    height: 1.65rem;
    justify-content: center;
    width: 1.65rem;
}

.bee-command-priority.tone-due .bee-status-icon { background: var(--orange); }
.bee-command-priority.tone-attention .bee-status-icon { background: var(--red); }
.bee-command-priority > div { display: grid; gap: .08rem; min-width: 0; }
.bee-command-priority > div > span { color: var(--muted); font-size: .6rem; font-weight: 900; letter-spacing: .055em; text-transform: uppercase; }

/* Bloom & Forage stays deliberately quiet: a field notebook with an honest
   seasonal estimate, not a confident prediction engine. */
.forage-page { display: grid; gap: 1rem; }
.forage-page-heading { align-items: start; }
.forage-page-heading .lede { max-width: 45rem; }
.forage-outlook-card, .forage-detail-card { background: var(--card); border: 1px solid var(--line-soft); border-radius: 10px; padding: 1rem; }
.forage-outlook-card { border-left: 4px solid var(--green); }
.forage-section-heading { align-items: center; display: flex; gap: .7rem; justify-content: space-between; margin-bottom: .6rem; }
.forage-section-heading h3 { margin: 0; }
.forage-section-heading .eyebrow { margin: 0 0 .12rem; }
.forage-location-chip, .forage-confidence { border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .72rem; font-weight: 800; padding: .25rem .5rem; white-space: nowrap; }
.forage-confidence.user { background: rgba(62, 100, 67, .09); border-color: rgba(62, 100, 67, .35); color: var(--green); }
.forage-disclaimer { color: var(--muted); font-size: .92rem; line-height: 1.4; margin: 0 0 1rem; max-width: 52rem; }
.forage-outlook-groups { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.forage-outlook-groups h4 { font-size: .82rem; letter-spacing: .04em; margin: 0 0 .5rem; text-transform: uppercase; }
.forage-outlook-list, .forage-source-list, .forage-observation-list { display: grid; gap: .45rem; }
.forage-outlook-item { align-items: start; border-top: 1px solid var(--line-soft); display: grid; gap: .35rem .5rem; grid-template-columns: minmax(0, 1fr) auto; padding: .65rem 0 0; }
.forage-outlook-item.local { border-top-color: rgba(62, 100, 67, .35); }
.forage-outlook-item div { display: grid; gap: .08rem; min-width: 0; }
.forage-outlook-item strong { color: var(--ink); }
.forage-outlook-item span, .forage-outlook-item small { color: var(--muted); line-height: 1.3; }
.forage-outlook-item small { grid-column: 1 / -1; font-size: .78rem; }
.forage-detail-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.forage-source-list article, .forage-observation-list article { align-items: center; border-top: 1px solid var(--line-soft); display: grid; gap: .45rem; grid-template-columns: minmax(0, 1fr) auto; padding-top: .65rem; }
.forage-source-list article > div, .forage-observation-list article > div { display: grid; gap: .08rem; min-width: 0; }
.forage-source-list span, .forage-observation-list span, .forage-source-list small { color: var(--muted); font-size: .84rem; }
.forage-source-list a, .compact-action { background: var(--paper-deep); border: 1px solid var(--line); border-radius: 6px; color: var(--ink); font-weight: 800; padding: .37rem .55rem; text-decoration: none; }
.forage-observation-list time { color: var(--muted); font-size: .8rem; font-weight: 800; }
.forage-empty-state, .compact-empty { color: var(--muted); display: grid; gap: .45rem; line-height: 1.45; }
.forage-empty-state { background: var(--paper-deep); border-radius: 7px; padding: .85rem; }
.forage-empty-state strong { color: var(--ink); }
.forage-empty-state a { color: var(--steel); font-weight: 800; }
@media (max-width: 720px) {
    .forage-page-heading { display: grid; gap: .8rem; }
    .forage-page-heading .module-page-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .forage-page-heading .module-page-actions a:last-child { grid-column: 1 / -1; }
    .forage-outlook-card, .forage-detail-card { padding: .85rem; }
    .forage-section-heading { align-items: start; }
    .forage-source-list article { align-items: start; grid-template-columns: minmax(0, 1fr); }
    .forage-source-list article a { justify-self: start; }
}

/* Connected equipment uses the existing YFS palette and controls, composed as
   a compact field tool rather than a series of administrative cards. */
.sensor-page { display: grid; gap: .9rem; margin: 0 auto; max-width: 1040px; padding-inline: 1rem; }
.sensor-page-heading, .sensor-scale-header { align-items: start; display: flex; gap: 1rem; justify-content: space-between; }
.sensor-page-heading h2, .sensor-scale-header h2 { margin: 0; }
.sensor-page-heading p:not(.eyebrow), .sensor-bluetooth-name, .sensor-assignment { color: var(--muted); margin: .22rem 0 0; }
.sensor-page .primary-button, .sensor-page button.primary-button { align-items: center; background: var(--surface); border-color: var(--surface); border-radius: 8px; color: var(--paper) !important; display: inline-flex; justify-content: center; min-height: 2.7rem; padding: .58rem .85rem; text-align: center; text-decoration: none; }
.sensor-page .primary-button:visited { color: var(--paper) !important; }
.sensor-page .primary-button:hover { background: #34342f; border-color: #34342f; color: var(--paper) !important; }
.sensor-page .secondary-button, .sensor-page button.secondary-button { align-items: center; background: var(--field); border-color: var(--line-soft); border-radius: 8px; color: var(--ink) !important; display: inline-flex; justify-content: center; min-height: 2.7rem; padding: .58rem .85rem; text-align: center; text-decoration: none; }
.sensor-page .secondary-button:visited { color: var(--ink) !important; }
.sensor-page .secondary-button:hover { background: #eee5d4; border-color: var(--line); color: var(--ink) !important; }
.sensor-page .primary-button:focus-visible, .sensor-page .secondary-button:focus-visible, .sensor-page .danger-button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.sensor-back-link { align-items: center; color: var(--ink); display: inline-flex; font-size: .88rem; font-weight: 800; gap: .25rem; text-decoration: none; width: fit-content; }
.sensor-back-link::before { content: "<"; }
.sensor-device-list { display: grid; gap: .65rem; }
.sensor-device-card { align-items: center; background: var(--card); border: 1px solid var(--line-soft); border-left: 4px solid var(--green); border-radius: 8px; display: grid; gap: .85rem; grid-template-columns: minmax(0, 1fr) auto auto; padding: .85rem 1rem; }
.sensor-device-main { min-width: 0; }
.sensor-device-main .eyebrow { margin: 0 0 .12rem; }
.sensor-device-main h3 { border: 0; font-size: 1.08rem; letter-spacing: 0; margin: 0; overflow-wrap: anywhere; padding: 0; }
.sensor-device-bluetooth { color: var(--muted); display: block; font-size: .84rem; margin-top: .18rem; overflow-wrap: anywhere; }
.sensor-device-meta { display: grid; gap: .45rem; grid-template-columns: repeat(2, minmax(5.5rem, auto)); margin: 0; }
.sensor-device-meta div { border-left: 1px solid var(--line-soft); display: grid; gap: .06rem; padding-left: .7rem; }
.sensor-device-meta dt { color: var(--muted); font-size: .67rem; font-weight: 900; letter-spacing: .055em; text-transform: uppercase; }
.sensor-device-meta dd { color: var(--ink); font-size: .88rem; font-weight: 800; margin: 0; }
.sensor-device-actions { align-items: stretch; display: grid; gap: .45rem; grid-template-columns: repeat(2, minmax(6.2rem, 1fr)); }
.sensor-device-actions > * { min-width: 0; }
.sensor-empty-state, .sensor-compact-empty { background: var(--paper-deep); border: 1px solid var(--line-soft); border-radius: 8px; color: var(--muted); display: grid; gap: .42rem; padding: 1rem; }
.sensor-empty-state h3 { border: 0; color: var(--ink); font-size: 1.05rem; letter-spacing: 0; margin: 0; padding: 0; }
.sensor-empty-state p { margin: 0; }
.sensor-empty-state .primary-button { justify-self: start; margin-top: .2rem; }
.sensor-header-actions { align-items: stretch; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: end; }
.sensor-connect-panel { align-items: start; display: grid; gap: .38rem; justify-items: start; max-width: 25rem; }
.sensor-connect-panel span, .sensor-live-message { color: var(--muted); font-size: .86rem; line-height: 1.35; }
.sensor-operation-panel, .sensor-config-section, .sensor-history-section, .sensor-raw-section, .sensor-advanced-section, .sensor-action-panel { background: var(--card); border: 1px solid var(--line-soft); border-radius: 9px; padding: .9rem 1rem; }
.sensor-action-panel { align-items: center; border-left: 4px solid var(--blue); display: flex; gap: 1rem; justify-content: space-between; }
.sensor-action-panel .eyebrow { margin: 0 0 .08rem; }
.sensor-action-panel h3 { border: 0; font-size: 1.08rem; letter-spacing: 0; margin: 0; padding: 0; }
.sensor-action-panel p:not(.eyebrow) { color: var(--muted); font-size: .88rem; margin: .2rem 0 0; }
.sensor-primary-actions { align-items: stretch; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: end; }
.sensor-operation-panel { border-left: 4px solid var(--green); }
.sensor-panel-heading { align-items: center; display: flex; gap: .6rem; justify-content: space-between; margin-bottom: .65rem; }
.sensor-panel-heading .eyebrow { margin: 0 0 .08rem; }
.sensor-panel-heading h3 { border: 0; font-size: 1.08rem; letter-spacing: 0; margin: 0; padding: 0; }
.sensor-sync-state { background: rgba(62, 100, 67, .1); border: 1px solid rgba(62, 100, 67, .32); border-radius: 999px; color: var(--green); font-size: .75rem; font-weight: 900; padding: .26rem .52rem; white-space: nowrap; }
.sensor-status-grid { border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: repeat(auto-fit, minmax(8.75rem, 1fr)); }
.sensor-status-grid article { display: grid; gap: .14rem; min-height: 5.15rem; padding: .72rem .65rem; }
.sensor-status-grid article + article { border-left: 1px solid var(--line-soft); }
.sensor-status-grid span { color: var(--muted); font-size: .68rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.sensor-status-grid strong { color: var(--ink); font-size: 1.22rem; line-height: 1.05; overflow-wrap: anywhere; }
.sensor-status-grid small { color: var(--muted); font-size: .75rem; line-height: 1.25; overflow-wrap: anywhere; }
.sensor-action-group { align-items: stretch; border-top: 1px solid var(--line-soft); display: grid; gap: .5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: .2rem; padding-top: .7rem; }
.sensor-action-group .secondary-button { min-height: 2.65rem; width: 100%; }
.sensor-action-group .sensor-calibration-disclosure { grid-column: 1 / -1; }
.sensor-maintenance-section > summary { align-items: center; background: var(--field); border: 1px solid var(--line-soft); border-radius: 8px; color: var(--ink); cursor: pointer; display: flex; font-weight: 900; justify-content: center; min-height: 2.65rem; padding: .58rem .85rem; text-align: center; }
.sensor-maintenance-section[open] > summary { border-color: rgba(232, 117, 53, .45); margin-bottom: .7rem; }
.sensor-maintenance-section { background: var(--card); border: 1px solid var(--line-soft); border-radius: 9px; padding: .9rem 1rem; }
.sensor-maintenance-section > summary { color: var(--ink); cursor: pointer; font-weight: 900; }
.sensor-maintenance-section[open] > summary { margin-bottom: .8rem; }
.sensor-calibration-disclosure { border-bottom: 1px solid var(--line-soft); padding-bottom: .8rem; }
.sensor-calibration-disclosure > p { color: var(--muted); font-size: .84rem; margin: .15rem 0 .55rem; }
.sensor-calibration-actions { align-items: stretch; display: flex; flex-wrap: wrap; gap: .5rem; padding-bottom: .65rem; }
.sensor-calibration-actions .known-weight { align-items: end; display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; }
.sensor-calibration-actions label { color: var(--muted); display: grid; font-size: .76rem; font-weight: 800; gap: .15rem; }
.sensor-calibration-actions input { min-height: 2.55rem; width: 7rem; }
.sensor-calibration-actions > button, .sensor-calibration-actions .known-weight button { min-height: 2.65rem; }
.sensor-live-message { margin: .65rem 0 0; }
.sensor-config-section .record-form { box-shadow: none; margin: 0; max-width: none; padding: 0; }
.sensor-config-section .record-form .form-field { margin-bottom: .7rem; }
.sensor-config-section details { border-top: 1px solid var(--line-soft); margin-top: .45rem; padding-top: .6rem; }
.sensor-config-section summary { color: var(--ink); cursor: pointer; font-weight: 800; }
.sensor-firmware-notice { align-items: start; background: var(--paper-deep); border-left: 3px solid var(--blue); border-radius: 5px; color: var(--muted); display: grid; gap: .1rem; grid-template-columns: auto minmax(0, 1fr); margin-top: .8rem; padding: .65rem .75rem; }
.sensor-firmware-notice strong { color: var(--ink); font-size: .84rem; }
.sensor-firmware-notice span { font-size: .82rem; line-height: 1.35; }
.sensor-history-section canvas { display: block; max-width: 100%; width: 100%; }
.sensor-advanced-section summary { color: var(--ink); cursor: pointer; font-weight: 900; }
.sensor-advanced-section[open] > summary { margin-bottom: .8rem; }
.sensor-advanced-section .record-form { box-shadow: none; margin: 0; max-width: none; padding: 0; }
.sensor-raw-section .table-wrap { margin-bottom: 0; }
.sensor-manage-form .form-actions, .sensor-delete-form { align-items: center; display: flex; flex-wrap: wrap; gap: .65rem; margin: .8rem 0 0; }
.sensor-delete-panel { background: rgba(155, 48, 44, .06); border: 1px solid rgba(155, 48, 44, .3); border-left: 4px solid var(--danger); border-radius: 9px; padding: .9rem 1rem; }
.sensor-delete-panel p { color: var(--muted); margin: 0; max-width: 48rem; }
.sensor-delete-form .checkbox-field { align-items: start; flex: 1 1 20rem; margin: 0; }
.sensor-delete-form .danger-button { align-items: center; background: var(--danger); border-color: var(--danger); border-radius: 8px; color: #fff !important; display: inline-flex; justify-content: center; min-height: 2.7rem; padding: .58rem .85rem; text-decoration: none; }
.sensor-delete-form .danger-button:visited { color: #fff !important; }
.equipment-settings-entry { background: var(--panel); border: 1px solid var(--line-soft); border-left: 4px solid var(--steel); border-radius: 8px; padding: .85rem 1rem; }
.equipment-settings-entry .section-heading { align-items: center; margin: 0; }
.equipment-settings-entry .eyebrow { margin: 0 0 .1rem; }
.equipment-settings-entry h3 { border: 0; font-size: 1.05rem; letter-spacing: 0; padding: 0; }
.equipment-settings-entry p:not(.eyebrow) { margin-bottom: 0; }
.equipment-entry-action { align-items: center; background: var(--field); color: var(--ink) !important; display: inline-flex; justify-content: center; min-height: 2.6rem; text-decoration: none; white-space: nowrap; }
.equipment-entry-action:visited { color: var(--ink) !important; }
.sensor-page input, .sensor-page select, .sensor-page textarea { border-radius: 8px; }
.sensor-page .form-actions { align-items: stretch; display: flex; flex-wrap: wrap; gap: .5rem; }
.sensor-page .form-actions button { min-height: 2.7rem; }
.sensor-page .sensor-panel-heading + p { margin-top: 0; }
@media (max-width: 720px) {
    .sensor-page { padding-inline: .75rem; }
    .sensor-page-heading, .sensor-scale-header { display: grid; }
    .sensor-page-heading .primary-button, .sensor-connect-panel .primary-button { width: 100%; }
    .sensor-connect-panel { max-width: none; width: 100%; }
    .sensor-header-actions { display: grid; justify-content: stretch; width: 100%; }
    .sensor-action-panel { align-items: stretch; display: grid; }
    .sensor-primary-actions { display: grid; justify-content: stretch; }
    .sensor-primary-actions > * { width: 100%; }
    .sensor-header-actions > .secondary-button { width: 100%; }
    .sensor-device-card { align-items: start; grid-template-columns: minmax(0, 1fr); }
    .sensor-device-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
    .sensor-device-actions { width: 100%; }
    .sensor-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sensor-status-grid article:nth-child(odd) { border-left: 0; }
    .sensor-status-grid article:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
    .sensor-action-group { grid-template-columns: 1fr 1fr; }
    .sensor-action-group .secondary-button { width: 100%; }
    .sensor-calibration-actions, .sensor-calibration-actions .known-weight { display: grid; width: 100%; }
    .sensor-calibration-actions input { width: 100%; }
    .sensor-firmware-notice { grid-template-columns: 1fr; }
    .equipment-settings-entry .section-heading { align-items: stretch; display: grid; }
    .equipment-entry-action { width: 100%; }
}
.bee-command-priority strong { display: -webkit-box; font-size: .88rem; line-height: 1.2; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.bee-command-priority > small { color: var(--muted); font-size: .69rem; font-weight: 800; text-align: right; white-space: nowrap; }
.bee-command-priority > a {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink) !important;
    display: inline-flex;
    font-size: .72rem;
    font-weight: 900;
    justify-content: center;
    min-height: 2rem;
    padding: .3rem .62rem;
    text-decoration: none;
    white-space: nowrap;
}

.bee-command-metrics {
    border-top: 1px solid var(--line-soft);
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.bee-command-metric {
    background: transparent;
    border: 0;
    border-left: 1px solid var(--line-soft);
    border-radius: 0;
    min-height: 5.1rem;
    padding: .58rem .7rem .5rem;
}

.bee-command-metric:first-child { border-left: 0; }
.bee-command-metric::after { left: .7rem; right: .7rem; }
.bee-command-metric strong { overflow-wrap: normal; white-space: nowrap; }
.bee-command-metric span { line-height: 1.15; }
.bee-command-metric small { min-height: 1.35em; }

.bee-hive-glance-card {
    grid-template-rows: auto minmax(6.75rem, 1fr) auto auto minmax(1.55rem, auto);
}

.hive-glance-name {
    display: -webkit-box;
    line-height: 1.15;
    min-height: 2.3em;
    overflow: hidden;
    text-overflow: clip;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.hive-glance-facts {
    align-content: start;
    grid-auto-rows: minmax(1rem, auto);
    min-height: 2.3rem;
}

.hive-glance-facts span {
    align-items: center;
    display: inline-flex;
    gap: .25rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hive-glance-facts i {
    background: var(--steel);
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 auto;
    height: .42rem;
    width: .42rem;
}

.hive-glance-facts .signal-queen i { background: var(--pollen); }
.hive-glance-facts .signal-brood i { background: var(--green); }
.hive-glance-facts .signal-mites i { background: var(--orange); }
.hive-glance-facts .signal-check i { background: var(--muted); }

.langstroth-cover { height: .84rem; width: 5.12rem; }
.langstroth-inner-cover { height: .2rem; width: 4.42rem; }
.langstroth-box { margin-top: .08rem; width: 4.14rem; }
.langstroth-box.deep { min-height: 1.1rem; }
.langstroth-entrance { height: .28rem; width: 4.28rem; }
.langstroth-bottom-board { height: .34rem; width: 4.76rem; }

.bee-hive-card {
    gap: .75rem;
    padding: .85rem;
}

.bee-hive-visual {
    align-items: stretch;
    gap: .75rem;
    grid-template-columns: minmax(9.2rem, .8fr) minmax(0, 1.2fr);
}

.hive-stack-graphic {
    background: linear-gradient(155deg, #F1EBDB, #FFFDF8 68%);
    min-height: 8rem;
}

.hive-detail-hive { min-height: 6.45rem; transform: scale(.98); }
.bee-hive-observations { align-content: center; gap: .45rem; }
.bee-last-check { border-bottom: 1px solid var(--line-soft); margin: 0; padding-bottom: .45rem; }

.bee-observation-list {
    grid-template-columns: repeat(auto-fit, minmax(5.8rem, 1fr));
    row-gap: .2rem;
}

.bee-observation-list div {
    background: transparent;
    border-bottom: 1px solid var(--line-soft);
    border-left: 0;
    border-top: 2px solid var(--steel);
    padding: .28rem .08rem .34rem;
}

.bee-observation-list .tone-current { border-top-color: var(--green); }
.bee-observation-list .tone-due { border-top-color: var(--orange); }
.bee-observation-list .tone-attention { border-top-color: var(--red); }

.bee-hive-performance {
    border-top: 1px solid var(--line-soft);
    gap: 0;
    grid-template-columns: repeat(auto-fit, minmax(5.8rem, 1fr));
}

.bee-hive-metric {
    background: transparent;
    border: 0;
    border-left: 1px solid var(--line-soft);
    padding: .42rem .5rem;
}

.bee-hive-metric:first-child { border-left: 0; }

@media (max-width: 720px) {
    .bee-cockpit {
        grid-template-areas:
            "weather health"
            "conditions health";
        grid-template-columns: minmax(0, 1fr) 6.3rem;
    }

    .bee-cockpit-weather,
    .bee-cockpit-conditions { min-height: 3.45rem; padding: .48rem .65rem; }
    .bee-cockpit-weather strong { font-size: 1.35rem; }
    .bee-cockpit .bee-health-ring { margin: auto; min-height: 5.35rem; min-width: 5.35rem; }
    .bee-command-priority { grid-template-columns: 1.7rem minmax(0, 1fr) auto; padding: .48rem .65rem; }
    .bee-command-priority > small { display: none; }
    .bee-command-priority > a { min-height: 1.85rem; padding-inline: .52rem; }

    .bee-command-metrics {
        display: grid;
        grid-auto-columns: minmax(6.55rem, 31vw);
        grid-auto-flow: column;
        grid-template-columns: none;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-snap-type: x proximity;
    }

    .bee-command-metric { border-left: 1px solid var(--line-soft); min-height: 4.85rem; scroll-snap-align: start; }
    .bee-command-metric:first-child { border-left: 0; }
    .bee-command-metric small { display: block; font-size: .57rem; }
    .bee-hive-glance-strip { grid-auto-columns: minmax(9.35rem, 44vw); }
    .bee-hive-glance-card { min-height: 14.5rem; }
    .bee-hive-visual { grid-template-columns: 1fr; }
    .bee-hive-card .hive-stack-graphic { grid-template-columns: minmax(7.8rem, .9fr) minmax(0, 1.1fr); min-height: 7rem; }
.bee-hive-card .hive-detail-hive { min-height: 5.75rem; transform: scale(.9); }
    .bee-observation-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Crop command center corrective pass. These classes are intentionally last in
   the cascade because older generic button/link rules use !important. */
.module-page-shell {
    box-sizing: border-box;
    margin: 1.25rem auto 2.25rem;
    max-width: 1120px;
    width: min(1120px, calc(100% - 2rem));
}

.crop-module-shell > section,
.crop-module-shell > nav,
.crop-module-shell > details { box-sizing: border-box; width: 100%; }

.crop-module-shell .button-link,
.crop-module-shell .crop-dark-action,
.crop-quick-actions .button-link,
.crop-records-heading .button-link {
    background: var(--charcoal);
    color: #FFFDF8 !important;
    text-decoration: none;
}

.crop-module-shell .button-link:visited,
.crop-module-shell .button-link:hover,
.crop-module-shell .button-link:focus-visible,
.crop-quick-actions .button-link:visited,
.crop-quick-actions .button-link:hover,
.crop-quick-actions .button-link:focus-visible,
.crop-records-heading .button-link:visited,
.crop-records-heading .button-link:hover,
.crop-records-heading .button-link:focus-visible {
    color: #FFFDF8 !important;
}

.crop-view-nav a[aria-current="page"] {
    background: var(--charcoal);
    color: #FFFDF8 !important;
}

.crop-view-nav a[aria-current="page"]:visited { color: #FFFDF8 !important; }

.crop-inline-action,
.crop-record-action,
.crop-record-row nav a,
.crop-dashboard-tools a {
    align-items: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--ink) !important;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    min-height: 2.45rem;
    padding: .45rem .7rem;
    text-decoration: none;
}

.crop-inline-action:hover,
.crop-record-action:hover,
.crop-record-row nav a:hover,
.crop-dashboard-tools a:hover { border-color: var(--orange); color: var(--ink) !important; }

.module-dashboard-card:has(.module-crop-command) .module-dashboard-heading + strong { margin-bottom: .2rem; }
.module-dashboard-card:has(.module-crop-command) > p { margin: 0 0 .65rem; }
.module-crop-command {
    background: linear-gradient(140deg, #F6F0DF, #FFFDF8);
    border: 1px solid var(--border);
    border-radius: 7px;
    display: grid;
    gap: .45rem .7rem;
    grid-template-columns: minmax(4.5rem, auto) minmax(0, 1fr);
    margin: .6rem 0;
    padding: .65rem;
}
.module-crop-command-stage { align-items: end; display: flex; gap: .15rem; min-height: 2.55rem; }
.module-crop-command-stage i { background: #E7DFC9; border: 1px solid #D5C7A4; border-radius: 1px 1px 0 0; flex: 1; height: 42%; }
.module-crop-command-stage i:nth-child(2) { height: 58%; }.module-crop-command-stage i:nth-child(3) { background: #A8BF5A; height: 76%; }.module-crop-command-stage i:nth-child(4) { background: #D8B548; height: 61%; }.module-crop-command-stage i:nth-child(5) { height: 34%; }
.module-crop-command-read { display: grid; align-content: center; line-height: 1; }
.module-crop-command-read b { color: var(--ink); font-size: 1.45rem; }.module-crop-command-read span { color: var(--muted); font-size: .77rem; font-weight: 700; text-transform: uppercase; }
.module-crop-command-state { border-top: 1px solid var(--line-soft); color: var(--muted); display: flex; flex-wrap: wrap; gap: .25rem .55rem; grid-column: 1 / -1; padding-top: .45rem; }.module-crop-command-state b { color: var(--green); }.module-crop-command-state.is-due b { color: var(--orange); }.module-crop-command-state span { font-size: .82rem; }
.module-crop-command-priority { color: var(--ink); font-size: .84rem; font-weight: 700; grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.module-crop-command-progress { grid-column: 1 / -1; margin-top: .15rem; }
.module-crop-command-progress .crop-stage-visual { gap: .2rem; min-height: .75rem; }
.module-crop-command-progress .crop-stage-visual i { height: .26rem; }
.module-crop-command-progress .crop-stage-visual i.current::after { height: .44rem; top: -.09rem; width: .44rem; }

.crop-dashboard-header,
.crop-view-nav,
.crop-operations,
.crop-planting-glance,
.crop-season-detail-grid,
.crop-records-view,
.crop-dashboard-tools { max-width: none; }

.crop-operations { background: var(--card); border-color: var(--border); box-shadow: 0 1px 0 rgba(24,24,23,.04); }
.crop-operations > header,
.crop-planting-glance > header { border-bottom: 1px solid var(--line-soft); padding-bottom: .8rem; }
.crop-operations-main { align-items: stretch; grid-template-columns: minmax(10rem, .8fr) minmax(14rem, 1.25fr) minmax(9rem, .75fr); }
.crop-weather-read, .crop-season-read, .crop-care-read { min-width: 0; }
.crop-care-read { border-left: 1px solid var(--line-soft); }
.crop-metric-rail { grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); overflow: visible; }
.crop-metric { min-width: 0; }
.crop-metric strong, .crop-metric span, .crop-metric small { overflow-wrap: anywhere; }
.crop-planting-glance { background: transparent; border: 0; padding: 0; }
.crop-planting-glance > header { margin-bottom: .8rem; }
.crop-planting-card { box-shadow: 0 1px 0 rgba(24,24,23,.04); }
.crop-records-view { background: transparent; border: 0; padding: 0; }
.crop-records-heading { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--orange); border-radius: 7px; padding: .85rem 1rem; }
.crop-record-list { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }
.crop-record-row { min-width: 0; }
.crop-record-row nav { gap: .45rem; }

@media (max-width: 720px) {
    .module-page-shell { margin-top: .85rem; width: calc(100% - 1rem); }
    .crop-dashboard-header { gap: .75rem; }
    .crop-quick-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .crop-quick-actions a { font-size: .82rem; min-width: 0; padding-inline: .35rem; }
    .crop-operations-main { grid-template-columns: 1fr 1fr; }
    .crop-weather-read { border-bottom: 1px solid var(--line-soft); }.crop-season-read { border-bottom: 1px solid var(--line-soft); }
    .crop-care-read { border-left: 0; grid-column: 1 / -1; padding-top: .65rem; }
    .crop-metric-rail { display: grid; grid-auto-columns: minmax(8.2rem, 42vw); grid-auto-flow: column; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; }
    .crop-metric { scroll-snap-align: start; }
    .crop-record-list { grid-template-columns: 1fr; }
    .crop-record-row { grid-template-columns: minmax(0, 1fr); }
    .crop-record-row > div + div { display: none; }
    .crop-record-row nav { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
    .crop-record-row nav a { min-width: 0; }
}

/* Crop command center: seasonal production has a different visual rhythm from
   colony operations, but uses the same concise, evidence-led dashboard language. */
.crop-dashboard-header { margin-bottom: .7rem; }
.crop-quick-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin: 0 0 1.15rem; }
.crop-quick-actions a { align-items: center; border: 1px solid var(--line); border-radius: .55rem; color: var(--ink); display: inline-flex; font-weight: 800; justify-content: center; min-height: 2.45rem; padding: .38rem .75rem; text-decoration: none; }
.crop-dashboard-tools { border-bottom: 1px solid var(--line-soft); margin: -.35rem 0 1.1rem; padding: 0 0 .85rem; }
.crop-dashboard-tools summary { color: var(--muted); cursor: pointer; font-size: .82rem; font-weight: 800; }
.crop-dashboard-tools > div { display: flex; flex-wrap: wrap; gap: .5rem; padding-top: .65rem; }
.crop-dashboard-tools a { color: var(--steel); font-size: .78rem; font-weight: 800; }
.crop-operations { background: var(--card); border: 1px solid var(--line); border-radius: .8rem; margin: 0 0 1.4rem; overflow: hidden; }
.crop-operations-heading { align-items: center; display: flex; gap: .8rem; justify-content: space-between; padding: .8rem 1rem .55rem; }
.crop-operations-heading .eyebrow { margin: 0; }
.crop-operations-heading h3 { font-size: 1.35rem; margin: .05rem 0 0; }
.crop-operations-heading a { color: var(--steel); font-weight: 800; text-decoration: none; }
.crop-operations-read { display: grid; grid-template-columns: minmax(9rem, 1fr) minmax(0, 1.45fr) 7rem; }
.crop-operations-read > div { align-content: center; display: grid; gap: .1rem; min-height: 6.2rem; padding: .8rem 1rem; }
.crop-operations-read > div + div { border-left: 1px solid var(--line-soft); }
.crop-weather-read { grid-template-columns: 2.3rem auto; }
.crop-weather-mark { align-items: center; color: #D99C23; display: flex; font-size: 1.9rem; grid-row: span 3; justify-content: center; }
.crop-weather-read strong { font-size: 1.5rem; line-height: 1; }
.crop-weather-read span:not(.crop-weather-mark), .crop-stage-read > span:last-child, .crop-care-read span { color: var(--muted); font-size: .8rem; }
.crop-operations-read small { color: var(--muted); font-size: .72rem; font-weight: 700; }
.crop-stage-read strong { font-size: 1rem; }
.crop-care-read { justify-items: center; position: relative; text-align: center; }
.crop-care-read::before { border: 7px solid color-mix(in srgb, var(--green) 24%, transparent); border-radius: 50%; content: ""; height: 4.2rem; position: absolute; width: 4.2rem; }
.crop-care-read.tone-due::before { border-color: color-mix(in srgb, var(--orange) 28%, transparent); }
.crop-care-read.tone-attention::before { border-color: color-mix(in srgb, var(--red) 28%, transparent); }
.crop-care-read strong, .crop-care-read span, .crop-care-read small { position: relative; }
.crop-care-read strong { font-size: 1.55rem; line-height: 1; margin-top: .15rem; }
.crop-priority { align-items: center; background: linear-gradient(90deg, rgba(79,102,130,.08), transparent 72%); border-bottom: 1px solid var(--line-soft); border-top: 1px solid var(--line-soft); color: var(--ink); display: grid; gap: .65rem; grid-template-columns: 2rem minmax(0,1fr) auto; padding: .7rem 1rem; text-decoration: none; }
.crop-priority.tone-attention { background: linear-gradient(90deg, rgba(155,48,44,.09), transparent 72%); }
.crop-priority.tone-due { background: linear-gradient(90deg, rgba(232,117,53,.1), transparent 72%); }
.crop-priority i { align-items: center; background: var(--steel); border-radius: 50%; color: white; display: inline-flex; font-style: normal; font-weight: 900; height: 1.7rem; justify-content: center; width: 1.7rem; }
.crop-priority.tone-attention i { background: var(--red); }.crop-priority.tone-due i { background: var(--orange); }
.crop-priority span { display: grid; min-width: 0; }.crop-priority small { color: var(--muted); font-size: .63rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }.crop-priority strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.crop-priority b { color: var(--steel); font-size: .78rem; white-space: nowrap; }
.crop-metric-rail { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.6rem,1fr)); }
.crop-metric { border-left: 1px solid var(--line-soft); display: grid; gap: .05rem; min-height: 5.1rem; padding: .65rem .72rem; }.crop-metric:first-child { border-left: 0; }
.crop-metric i { color: var(--steel); font-size: .9rem; font-style: normal; font-weight: 900; }.crop-metric.tone-green i { color: var(--green); }.crop-metric.tone-gold i { color: #BE8517; }.crop-metric.tone-due i { color: var(--orange); }
.crop-metric strong { font-size: 1.3rem; line-height: 1.05; }.crop-metric span { font-size: .72rem; font-weight: 900; text-transform: uppercase; }.crop-metric small { color: var(--muted); font-size: .65rem; }
.crop-planting-glance { margin: 0 0 1.45rem; }.crop-planting-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(14rem,1fr)); }
.crop-planting-card { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--steel); border-radius: .72rem; display: grid; gap: .4rem; min-width: 0; overflow: hidden; padding: .75rem; position: relative; }.crop-planting-card.status-current { border-top-color: var(--green); }.crop-planting-card.status-due { border-top-color: var(--orange); }.crop-planting-card.status-attention { border-top-color: var(--red); }
.crop-planting-visual { align-items: end; background: linear-gradient(180deg, #F4F0E6, #E7E0CE); border-radius: .45rem; display: flex; gap: .25rem; height: 3.25rem; justify-content: center; overflow: hidden; position: relative; }.crop-planting-visual i { background: linear-gradient(90deg, #547D46, #84A75F); border-radius: 55% 55% 18% 18%; display: block; height: 1.9rem; transform: rotate(-12deg); width: .48rem; }.crop-planting-visual i:nth-child(2) { height: 2.55rem; transform: rotate(8deg); }.crop-planting-visual i:nth-child(3) { height: 1.45rem; transform: rotate(15deg); }.crop-planting-visual span { align-items: center; background: rgba(255,253,248,.86); border-radius: 50%; color: var(--green); display: flex; font-size: .78rem; font-weight: 900; height: 1.45rem; justify-content: center; position: absolute; right: .45rem; top: .42rem; width: 1.45rem; }.stage-harvesting .crop-planting-visual i { background: linear-gradient(90deg,#D99C23,#F0C758); }.stage-overwintering .crop-planting-visual i { background: linear-gradient(90deg,#728BA4,#B5C5D4); }
.crop-planting-card-head { display: flex; font-size: .71rem; font-weight: 900; gap: .45rem; justify-content: space-between; text-transform: uppercase; }.crop-planting-card-head span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.crop-planting-card-head b { color: var(--steel); white-space: nowrap; }.crop-planting-card h4 { font-size: 1rem; line-height: 1.15; margin: .05rem 0; }.crop-planting-card p { color: var(--muted); font-size: .78rem; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.crop-planting-card-meta { display: flex; gap: .4rem; }.crop-planting-card-meta span { background: #F1ECDC; border-radius: 99px; font-size: .68rem; font-weight: 850; padding: .22rem .4rem; }.crop-planting-card nav { display: grid; gap: .35rem; grid-template-columns: minmax(0,1fr) minmax(0, .7fr); margin-top: .25rem; }.crop-planting-card nav a { align-items: center; border: 1px solid var(--line); border-radius: .4rem; color: var(--ink); display: flex; font-size: .75rem; font-weight: 800; justify-content: center; min-height: 2rem; padding: .2rem; text-align: center; text-decoration: none; }.crop-planting-card nav a:first-child { background: var(--ink); color: #FFFDF8; }
.crop-empty-state { display: grid; gap: .6rem; margin: 1rem 0; }.crop-records-section { margin-top: 1rem; }

@media (max-width: 720px) {
  .crop-quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }.crop-quick-actions a { text-align: center; }
  .crop-operations-heading { padding-inline: .75rem; }.crop-operations-read { grid-template-columns: minmax(0,1fr) 5.7rem; }.crop-operations-read > div { min-height: 4.7rem; padding: .58rem .65rem; }.crop-weather-read { grid-template-columns: 2rem auto; }.crop-weather-mark { font-size: 1.55rem; }.crop-stage-read { grid-column: 1 / 2; border-top: 1px solid var(--line-soft); }.crop-stage-read strong { font-size: .92rem; }.crop-care-read { grid-column: 2; grid-row: 1 / span 2; }.crop-priority { grid-template-columns: 1.65rem minmax(0,1fr) auto; padding: .58rem .7rem; }.crop-priority b { font-size: .68rem; }.crop-metric-rail { grid-auto-columns: minmax(6.4rem, 33vw); grid-auto-flow: column; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x proximity; }.crop-metric { scroll-snap-align: start; }.crop-planting-grid { display: grid; grid-auto-columns: minmax(13.5rem, 78vw); grid-auto-flow: column; grid-template-columns: none; overflow-x: auto; padding: 0 .05rem .5rem; scroll-snap-type: x proximity; }.crop-planting-card { scroll-snap-align: start; }
}

@media (min-width: 1000px) {
  .crop-operations-read { grid-template-columns: 15rem minmax(20rem,1.45fr) 8.5rem; }.crop-planting-grid { grid-template-columns: repeat(auto-fit, minmax(16rem,1fr)); }
}

@media (min-width: 721px) {
    .bee-command-priority { padding-inline: 1rem; }
    .bee-hive-card nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .bee-hive-card nav .hive-card-more { grid-column: auto; }
}

@media (min-width: 1050px) {
    .bee-cockpit {
        grid-template-columns: minmax(11rem, .9fr) minmax(16rem, 1.35fr) 7.9rem;
    }

    .bee-command-priority {
        grid-template-columns: 1.85rem minmax(0, 1fr) 7.5rem auto;
    }

    .bee-hive-list { grid-template-columns: repeat(auto-fit, minmax(24rem, 1fr)); }
}

/* Staff pulse and notification device controls */
.pulse-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .7rem;
}

.pulse-metric-card,
.pulse-health-panel {
    border: 1px solid var(--border, #D7D1C5);
    background: var(--card, #FFFDF8);
    border-radius: 8px;
}

.pulse-metric-card {
    display: grid;
    gap: .25rem;
    padding: 1rem;
}

.pulse-metric-card span,
.pulse-bar-row span,
.pulse-signal-list span {
    color: var(--muted, #68645B);
}

.pulse-metric-card strong {
    color: var(--ink, #181817);
    font-size: 1.7rem;
}

.admin-pulse-overview {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 1fr);
    gap: 1rem;
}

.pulse-health-panel {
    padding: 1.1rem;
}

.pulse-bars,
.pulse-signal-list {
    display: grid;
    gap: .9rem;
}

.pulse-bar-row {
    display: grid;
    gap: .35rem;
}

.pulse-bar-row > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.pulse-bar-track {
    height: .55rem;
    overflow: hidden;
    border-radius: 999px;
    background: #E8E1D4;
}

.pulse-bar-track span {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
}

.signal-good { background: var(--field-green, #3E6443); }
.signal-info { background: var(--steel-blue, #4F6682); }
.signal-warn { background: var(--action-orange, #E87535); }

.pulse-signal-list > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: .7rem;
    border-bottom: 1px solid var(--border, #D7D1C5);
}

.pulse-signal-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.pulse-signal-list strong { font-size: 1.5rem; }

.device-list {
    display: grid;
    gap: .55rem;
}

.device-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem .9rem;
    border: 1px solid var(--border, #D7D1C5);
    border-radius: 7px;
    background: var(--card, #FFFDF8);
}

.device-row > div { display: grid; gap: .2rem; }
.device-row span { color: var(--muted, #68645B); font-size: .9rem; }
.device-row-inactive { opacity: .62; }

.delivery-status {
    font-weight: 700;
    white-space: nowrap;
}

.delivery-status-sent { color: var(--field-green, #3E6443); }
.delivery-status-failed { color: var(--signal-red, #9B302C); }
.delivery-status-skipped,
.delivery-status-preview { color: var(--muted, #68645B); }
.delivery-status-queued { color: var(--steel-blue, #4F6682); }

.brand-token-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .7rem;
}

.brand-token {
    display: grid;
    grid-template-columns: 2.4rem 1fr;
    gap: .15rem .65rem;
    align-items: center;
    padding: .7rem;
    border: 1px solid var(--border, #D7D1C5);
    border-radius: 7px;
    background: var(--card, #FFFDF8);
}

.brand-token .brand-swatch {
    grid-row: span 2;
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid rgba(24, 24, 23, .2);
    border-radius: 5px;
}

.brand-token code,
.brand-type-label {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: .75rem;
    letter-spacing: .04em;
}

.brand-type-board {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border, #D7D1C5);
}

.brand-type-board > div { display: grid; align-content: start; gap: .35rem; }
.brand-type-display { font-size: clamp(1.5rem, 3vw, 2.3rem); line-height: 1.05; }
.brand-type-board p { margin: 0; color: var(--muted, #68645B); }

@media (max-width: 720px) {
    .pulse-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-pulse-overview { grid-template-columns: 1fr; }
    .pulse-metric-card { padding: .8rem; }
    .pulse-metric-card strong { font-size: 1.45rem; }
    .device-row { align-items: flex-start; }
    .brand-token-grid,
    .brand-type-board { grid-template-columns: 1fr 1fr; }
    .brand-type-board > div:first-child { grid-column: 1 / -1; }
}

/* Public demo dashboard: same visual language as the live farm, but read-only. */
.demo-page {
    display: grid;
    gap: 1rem;
    padding: 0 1rem 1.5rem;
}

.demo-home-title {
    margin-bottom: 0;
}

.demo-banner {
    align-items: center;
    display: grid;
    gap: .85rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.demo-banner-copy {
    display: grid;
    gap: .35rem;
}

.demo-banner-copy strong {
    display: block;
    font-size: 1.04rem;
}

.demo-banner-copy p {
    color: var(--muted);
    margin: 0;
}

.demo-banner-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.demo-record-card {
    color: var(--ink);
    display: grid;
    gap: .35rem;
    text-decoration: none;
}

.demo-record-card span:last-child {
    color: var(--muted);
}

.demo-next-step {
    display: grid;
    gap: .75rem;
}

.demo-floating-cta {
    background: var(--ink);
    border: 1px solid rgba(255, 253, 247, .22);
    border-radius: 999px;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    color: var(--paper);
    font-weight: 900;
    padding: .7rem 1rem;
    position: fixed;
    right: 1rem;
    text-decoration: none;
    z-index: 80;
}

.demo-floating-cta:hover,
.demo-floating-cta:focus-visible {
    background: #2D2D28;
    color: var(--paper);
}

@media (max-width: 720px) {
    .demo-page {
        width: calc(100% - 1rem);
    }

    .demo-banner {
        grid-template-columns: 1fr;
    }

    .demo-banner-actions {
        width: 100%;
    }

    .demo-banner-actions .button-link {
        flex: 1 1 160px;
    }

    .demo-floating-cta {
        left: .75rem;
        right: .75rem;
        text-align: center;
    }
}

/* Center the boundary/location editor with normal page content. */
.farm-layout-editor.map-editor,
.map-first-editor.map-editor {
    margin-left: auto;
    margin-right: auto;
    max-width: 1120px;
    width: calc(100% - 2rem);
}

.farm-layout-editor .map-layout,
.map-first-editor .map-layout {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

@media (max-width: 720px) {
    .farm-layout-editor.map-editor,
    .map-first-editor.map-editor {
        width: calc(100% - 1rem);
    }

    .farm-layout-editor .map-canvas,
    .map-first-editor .map-canvas {
        min-height: 460px;
    }
}


/* Stronger no-split branding and mobile field workflow */
.site-title,
.intent-landing-hero h2,
.intent-actions .button-link,
.intent-evidence-band span,
.mobile-field-actions a {
    white-space: nowrap;
}

.intent-landing-hero h2 {
    max-width: none;
    width: min-content;
}

.intent-page {
    overflow-x: hidden;
}

.mobile-field-dashboard {
    display: none;
}

@media (max-width: 720px) {
    .site-title {
        white-space: nowrap;
    }

    .intent-landing-hero h2 {
        font-size: clamp(1.65rem, 8.7vw, 2.65rem);
        letter-spacing: 0;
        max-width: 100%;
        overflow: visible;
        padding-right: 2.4rem;
        white-space: nowrap;
        width: auto;
    }

    .intent-headline {
        font-size: 1.02rem;
        line-height: 1.18;
    }

    .intent-landing-hero .lede {
        font-size: .92rem;
        line-height: 1.34;
    }

    .intent-proof-panel strong,
    .intent-proof-list span,
    .intent-record-card p,
    .intent-decision-card strong {
        font-size: .86rem;
        line-height: 1.25;
    }

    .intent-record-grid,
    .intent-decision-grid {
        gap: .5rem;
    }

    .intent-record-card,
    .intent-decision-card {
        padding: .65rem;
    }

    .intent-evidence-band {
        gap: .35rem;
    }

    .intent-evidence-band span {
        font-size: .68rem;
        min-height: 2.35rem;
        padding: .45rem .35rem;
    }

    .intent-actions .button-link,
    .intent-bottom-actions .button-link {
        min-height: 2.75rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ops-hero {
        background: var(--ink);
        border-bottom: 3px solid var(--orange);
        color: #FFFDF7;
        margin: -.65rem auto .75rem;
        padding: .75rem;
        width: 100%;
    }

    .ops-hero .eyebrow,
    .ops-hero h2 {
        color: #FFFDF7;
    }

    .ops-hero h2 {
        font-size: 1.35rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        width: 100%;
    }

    .timer-card {
        background: #FFFDF7;
        border-left-color: var(--orange);
        box-shadow: 0 8px 18px rgba(28, 28, 26, .14);
        margin-top: .65rem;
        width: 100%;
    }

    .timer-card strong {
        font-size: 1.02rem;
    }

    .timer-card button {
        min-height: 2.8rem;
    }

    .mobile-field-dashboard {
        background: var(--panel);
        border: 1px solid var(--line-soft);
        border-left: 4px solid var(--orange);
        border-radius: 8px;
        display: grid;
        gap: .65rem;
        margin: 0 auto .85rem;
        max-width: 1120px;
        padding: .75rem;
        width: calc(100% - 1.5rem);
    }

    .mobile-field-topline {
        align-items: center;
        display: flex;
        justify-content: space-between;
        gap: .6rem;
    }

    .mobile-field-topline strong {
        color: var(--danger);
        font-size: .95rem;
        text-align: right;
    }

    .mobile-field-actions {
        display: grid;
        gap: .45rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mobile-field-actions a {
        align-items: center;
        background: var(--field);
        border: 1px solid var(--line-soft);
        border-radius: 7px;
        color: var(--ink);
        display: flex;
        font-size: .84rem;
        font-weight: 900;
        justify-content: center;
        min-height: 2.6rem;
        overflow: hidden;
        padding: .5rem;
        text-align: center;
        text-decoration: none;
        text-overflow: ellipsis;
    }

    .mobile-priority-section {
        margin-top: .75rem;
    }

    .quick-capture-section .quick-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick-capture-section .compact-action {
        min-height: 74px;
        padding: .65rem;
    }

    .quick-capture-section .compact-action strong {
        font-size: .9rem;
        line-height: 1.12;
    }

    .dashboard-technical-section,
    .desktop-technical-dashboard {
        margin-top: .9rem;
    }

    .desktop-technical-dashboard .ops-board {
        grid-template-columns: 1fr;
    }

    .desktop-technical-dashboard .status-bars,
    .dashboard-technical-section .layout-mini-key,
    .dashboard-technical-section .module-links {
        display: none;
    }

    .recent-activity-section .activity-row {
        gap: .25rem;
        grid-template-columns: 1fr;
        padding: .7rem;
    }

    .recent-activity-section .activity-row span,
    .recent-activity-section .activity-row strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (min-width: 721px) {
    .desktop-technical-dashboard .ops-board {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .ops-grid-section,
    .dashboard-technical-section,
    .secondary-section {
        max-width: 1200px;
    }
}


/* Simplified intent landing pages */
.intent-simple-page {
    gap: .8rem;
    margin-inline: auto;
    max-width: 1180px;
    padding-inline: .85rem;
}

.intent-simple-page .intent-landing-hero {
    background: linear-gradient(180deg, rgba(255, 253, 247, .98), rgba(248, 244, 234, .82));
    border: 1px solid var(--line-soft);
    border-top: 4px solid var(--intent-accent);
    box-shadow: 0 8px 18px rgba(28, 28, 26, .06);
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 1rem;
}

.intent-simple-page .intent-landing-hero::after {
    display: none;
}

.intent-simple-page .intent-hero-copy {
    gap: .65rem;
    min-height: 0;
}

.intent-simple-page .intent-landing-hero h2 {
    font-size: clamp(1.85rem, 8.4vw, 4.15rem);
    line-height: .98;
    max-width: 100%;
    overflow: visible;
    padding-right: 0;
    white-space: nowrap;
    width: auto;
}

.intent-simple-page .intent-headline {
    font-size: clamp(1.05rem, 3.6vw, 1.42rem);
    line-height: 1.15;
    margin: 0;
    max-width: 820px;
}

.intent-simple-page .lede {
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.36;
    max-width: 720px;
}

.intent-action-section,
.intent-start-path,
.intent-compact-panel {
    background: rgba(255, 253, 247, .78);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
}

.intent-action-section {
    display: grid;
    gap: .75rem;
    padding: .85rem;
}

.intent-action-grid {
    display: grid;
    gap: .55rem;
    grid-template-columns: 1fr;
}

.intent-action-tile {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-left: 4px solid var(--intent-accent);
    border-radius: 7px;
    color: var(--ink);
    display: grid;
    gap: .35rem;
    padding: .75rem;
    text-decoration: none;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.intent-action-tile:hover,
.intent-action-tile:focus-visible {
    border-color: var(--intent-accent);
    box-shadow: 0 8px 18px rgba(28, 28, 26, .08);
    transform: translateY(-1px);
}

.intent-action-tile .tag,
.intent-compact-heading .tag {
    background: var(--intent-accent-dark);
    color: #FFFDF7;
    font-size: .72rem;
    margin: 0;
    width: fit-content;
}

.intent-action-tile strong {
    font-size: 1rem;
    line-height: 1.15;
}

.intent-action-tile span:not(.tag) {
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.3;
}

.intent-action-tile em {
    color: var(--intent-accent-dark);
    font-size: .78rem;
    font-style: normal;
    font-weight: 900;
    line-height: 1.2;
}

.intent-compact-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: 1fr;
}

.intent-compact-panel {
    display: grid;
    gap: .7rem;
    padding: .85rem;
}

.intent-compact-heading {
    display: grid;
    gap: .35rem;
}

.intent-compact-heading h3,
.intent-start-path h3 {
    margin: 0;
}

.intent-compact-list {
    display: grid;
    gap: .55rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.intent-compact-list li {
    border-top: 1px solid rgba(28, 28, 26, .1);
    display: grid;
    gap: .2rem;
    padding-top: .55rem;
}

.intent-compact-list li:first-child {
    border-top: 0;
    padding-top: 0;
}

.intent-compact-list strong {
    font-size: .94rem;
    line-height: 1.18;
}

.intent-compact-list span {
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.3;
}

.intent-decision-list li {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: .55rem;
}

.intent-decision-list strong {
    align-items: center;
    background: var(--intent-accent-dark);
    border-radius: 999px;
    color: #FFFDF7;
    display: inline-flex;
    font-size: .74rem;
    height: 1.45rem;
    justify-content: center;
    width: 1.45rem;
}

.intent-start-path {
    display: grid;
    gap: .75rem;
    padding: .85rem;
}

.intent-start-path .intent-setup-copy p {
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.3;
    margin: .25rem 0 0;
}

.intent-start-path .intent-setup-steps {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.intent-start-path .intent-setup-steps li {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    font-size: .78rem;
    line-height: 1.15;
    min-height: 2rem;
    padding: .45rem .65rem;
}

.intent-start-path .intent-setup-steps li::before {
    display: none;
}

@media (min-width: 640px) {
    .intent-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .intent-simple-page .intent-actions {
        display: flex;
        flex-wrap: wrap;
    }
}

@media (min-width: 900px) {
    .intent-simple-page {
        gap: 1rem;
        padding-inline: 1rem;
    }

    .intent-simple-page .intent-landing-hero {
        padding: 1.25rem;
    }

    .intent-action-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .intent-compact-grid {
        grid-template-columns: 1fr 1fr;
    }

    .intent-start-path {
        align-items: start;
        grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
    }

    .intent-start-path .intent-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 420px) {
    .intent-simple-page {
        padding-inline: .65rem;
    }

    .intent-simple-page .intent-landing-hero h2 {
        font-size: clamp(1.58rem, 7.9vw, 2.2rem);
    }

    .intent-simple-page .intent-headline {
        font-size: .98rem;
    }

    .intent-action-section,
    .intent-start-path,
    .intent-compact-panel {
        padding: .72rem;
    }

    .intent-start-path .intent-setup-steps li {
        border-radius: 7px;
        width: 100%;
    }
}


/* Public landing page refresh */
html {
    scroll-behavior: smooth;
}

#demo-map-weather,
#demo-work-queue,
#demo-records,
#demo-review {
    scroll-margin-top: 6.5rem;
}

.public-landing-page {
    gap: .9rem;
}

.public-hero {
    align-items: start;
    background:
        linear-gradient(180deg, rgba(255, 253, 248, .98), rgba(248, 242, 231, .85));
    border: 1px solid var(--line-soft);
    border-top: 4px solid var(--intent-accent);
    border-radius: 10px;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr);
    padding: 1rem;
}

.public-hero-copy {
    display: grid;
    gap: .75rem;
}

.public-brand-mark {
    font-size: clamp(2.1rem, 8vw, 4rem);
    line-height: .96;
    margin: 0;
}

.public-hero-headline {
    color: var(--ink);
    font-size: clamp(1.05rem, 3.5vw, 1.6rem);
    font-weight: 900;
    line-height: 1.15;
    margin: 0;
    max-width: 34rem;
}

.public-product-definition {
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
    max-width: 44rem;
}

.public-faq-list {
    display: grid;
    gap: .55rem;
}

.public-faq-list details {
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: .8rem .9rem;
}

.public-faq-list summary {
    color: var(--ink);
    cursor: pointer;
    font-weight: 800;
}

.public-faq-list p {
    color: var(--muted);
    line-height: 1.45;
    margin: .65rem 0 0;
}

.public-hero-actions {
    margin-top: .15rem;
}

.intent-actions .button-link.public-login-link,
.intent-actions .button-link.public-login-link:visited,
.site-nav-menu nav a.public-nav-login {
    background: var(--charcoal);
    border-color: var(--charcoal);
    color: var(--paper) !important;
    font-weight: 900;
}

.intent-actions .button-link.public-login-link:hover,
.intent-actions .button-link.public-login-link:focus-visible,
.site-nav-menu nav a.public-nav-login:hover,
.site-nav-menu nav a.public-nav-login:focus-visible {
    background: var(--ink);
    color: #fff !important;
}

.public-home-preview {
    display: grid;
    gap: .9rem;
    min-width: 0;
}

.public-home-preview > .dashboard-section {
    margin: 0;
    max-width: none;
    min-width: 0;
}

.public-home-preview .dashboard-technical-section {
    align-items: start;
}

.public-home-preview .weather-timer-card {
    display: none;
}

.public-home-preview .farm-layout-thumb {
    min-height: 220px;
}

.public-home-preview .planner-move-actions {
    grid-template-columns: minmax(0, 1fr);
}

.public-chip-row,
.public-built-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.public-chip,
.public-built-chip {
    background: rgba(255, 253, 248, .92);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    color: var(--ink);
    display: inline-flex;
    font-size: .82rem;
    font-weight: 850;
    line-height: 1;
    min-height: 2rem;
    padding: .42rem .68rem;
    white-space: nowrap;
}

.public-hero-visual {
    display: grid;
    gap: .7rem;
}

.public-preview-card {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(28, 28, 26, .06);
    display: grid;
    gap: .75rem;
    padding: .9rem;
}

.public-preview-head {
    display: grid;
    gap: .3rem;
}

.public-preview-head strong {
    font-size: 1rem;
    line-height: 1.16;
}

.public-preview-metrics {
    display: grid;
    gap: .5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.public-preview-metrics div {
    background: rgba(255, 253, 248, .8);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: grid;
    gap: .12rem;
    min-height: 4.4rem;
    padding: .55rem .6rem;
}

.public-preview-metrics strong {
    font-size: 1.3rem;
    line-height: 1;
}

.public-preview-metrics span,
.public-preview-list span,
.public-review-item {
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.32;
}

.public-preview-list,
.public-review-list {
    display: grid;
    gap: .45rem;
}

.public-preview-list div,
.public-review-item {
    background: rgba(255, 253, 248, .92);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: grid;
    gap: .16rem;
    padding: .55rem .62rem;
}

.public-preview-list strong,
.public-review-item strong {
    font-size: .94rem;
    line-height: 1.16;
}

.public-map-svg {
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    width: 100%;
    height: auto;
}

.public-benefit-grid,
.public-track-grid,
.public-flow-grid {
    display: grid;
    gap: .7rem;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.public-benefit-card,
.public-track-card,
.public-flow-grid article {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    display: grid;
    gap: .55rem;
    padding: .85rem;
}

.public-benefit-card {
    border-left: 4px solid var(--intent-accent);
}

.public-benefit-card strong,
.public-track-card strong,
.public-flow-grid strong {
    font-size: 1rem;
    line-height: 1.18;
}

.public-track-grid {
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
}

.public-track-card {
    align-items: center;
    justify-items: start;
    min-height: 4.25rem;
}

.public-detail-grid {
    display: grid;
    gap: .75rem;
}

.public-detail-card {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-left: 4px solid var(--intent-accent);
    border-radius: 10px;
    overflow: hidden;
}

.public-detail-card > summary {
    cursor: pointer;
    display: grid;
    gap: .42rem;
    list-style: none;
    padding: .9rem;
}

.public-detail-card > summary::-webkit-details-marker {
    display: none;
}

.public-detail-card > summary strong {
    font-size: 1rem;
    line-height: 1.18;
}

.public-detail-card > summary span:last-child {
    color: var(--muted);
    line-height: 1.3;
}

.public-detail-body {
    border-top: 1px solid var(--line-soft);
    display: grid;
    gap: .7rem;
    padding: .85rem .9rem .95rem;
}

.public-detail-facts {
    display: grid;
    gap: .55rem;
    margin: 0;
}

.public-detail-facts div {
    background: rgba(248, 240, 226, .58);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: grid;
    gap: .1rem;
    padding: .55rem .62rem;
}

.public-detail-facts dt {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .04em;
    line-height: 1;
    text-transform: uppercase;
}

.public-detail-facts dd {
    font-size: .95rem;
    font-weight: 850;
    line-height: 1.2;
    margin: 0;
}

.public-detail-bullets {
    color: var(--ink);
    display: grid;
    gap: .45rem;
    margin: 0;
    padding-left: 1.15rem;
}

.public-detail-bullets li {
    line-height: 1.32;
}

.public-detail-actions {
    margin-top: .2rem;
}

.public-track-card strong {
    max-width: 100%;
}

.public-built-grid {
    gap: .5rem;
}

.public-built-chip {
    background: rgba(232, 117, 53, .08);
    border-color: rgba(232, 117, 53, .22);
}

.public-demo-section,
.public-final-cta {
    align-items: center;
    background: rgba(255, 253, 248, .82);
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    display: grid;
    gap: .9rem;
    padding: 1rem;
}

.public-demo-copy,
.public-final-copy {
    display: grid;
    gap: .4rem;
}

.public-demo-copy h3,
.public-final-copy h3 {
    margin: 0;
}

.public-demo-copy p,
.public-final-copy p {
    color: var(--muted);
    line-height: 1.36;
    margin: 0;
}

.public-demo-actions,
.public-final-actions {
    margin-top: .15rem;
}

@media (min-width: 900px) {
    .public-hero {
        padding: 1.15rem;
    }

    .public-demo-section,
    .public-final-cta {
        grid-template-columns: minmax(0, 1fr) auto;
    }
}

@media (max-width: 720px) {
    .public-hero,
    .public-demo-section,
    .public-final-cta {
        grid-template-columns: 1fr;
    }
}



/* Account security */
.turnstile-field {
    margin: .85rem 0;
}

/* Decision reviews */
.decision-review-page {
    display: grid;
    gap: .9rem;
    margin-inline: auto;
    max-width: 1120px;
    padding: 0 1rem 1.5rem;
}

.decision-review-hero,
.decision-review-summary,
.decision-review-gaps,
.locked-review-panel,
.decision-review-card {
    border-radius: 8px;
}

.decision-review-hero {
    align-items: start;
    display: grid;
    gap: .8rem;
}

.decision-review-hero h2 {
    margin: 0;
}

.decision-review-summary ul,
.decision-review-gaps ul,
.decision-review-card ul {
    margin-bottom: 0;
}

.decision-review-list {
    display: grid;
    gap: .85rem;
}

.decision-review-card {
    border-left: 5px solid var(--line-soft);
    display: grid;
    gap: .75rem;
}

.decision-review-card.priority-high {
    border-left-color: #B42318;
}

.decision-review-card.priority-medium {
    border-left-color: var(--accent);
}

.decision-review-card.priority-low {
    border-left-color: var(--ok);
}

.decision-card-topline {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: space-between;
}

.decision-card-topline > span:last-child {
    color: var(--muted);
    font-size: .85rem;
    font-weight: 800;
}

.decision-recommendation {
    color: var(--ink);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.32;
    margin: 0;
}

.decision-review-columns {
    display: grid;
    gap: .75rem;
}

.decision-review-columns h4,
.decision-supplies h4 {
    margin: 0 0 .35rem;
}

.decision-followups {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.decision-followups form {
    margin: 0;
}

.supply-grid {
    display: grid;
    gap: .55rem;
}

.supply-card {
    background: rgba(255, 253, 247, .74);
    border: 1px solid var(--line-soft);
    border-radius: 7px;
    display: grid;
    gap: .35rem;
    padding: .65rem;
}

.supply-card span,
.decision-data-gaps {
    color: var(--muted);
    font-size: .9rem;
}

@media (min-width: 780px) {
    .decision-review-hero {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .decision-review-columns {
        grid-template-columns: minmax(0, 1fr) minmax(240px, .55fr);
    }

    .supply-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media print {
    header,
    .no-print,
    .messages {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .decision-review-page {
        max-width: none;
        padding: 0;
    }

    .panel,
    .decision-review-card {
        box-shadow: none !important;
        break-inside: avoid;
    }
}

/* Admin pulse */
.admin-pulse-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.admin-pulse-grid .panel,
.dashboard-section.panel {
    padding: 1rem;
}

.admin-pulse-list {
    display: grid;
    gap: .5rem;
}

.admin-pulse-list div {
    align-items: baseline;
    background: rgba(248, 240, 226, .62);
    border: 1px solid rgba(216, 208, 191, .72);
    border-radius: 6px;
    display: flex;
    gap: .6rem;
    justify-content: space-between;
    padding: .55rem .65rem;
}

.admin-pulse-list strong {
    color: var(--blue);
    font-size: 1.15rem;
}

.admin-pulse-list span,
.admin-pulse-table td {
    color: var(--muted);
}

.module-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
}

.module-chip {
    background: rgba(28, 28, 26, .08);
    border: 1px solid rgba(28, 28, 26, .12);
    border-radius: 999px;
    color: var(--ink);
    display: inline-flex;
    font-size: .72rem;
    font-weight: 900;
    line-height: 1;
    margin-left: .25rem;
    padding: .25rem .42rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-last-path {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Account management */
.account-danger-section,
.danger-panel {
    border-left: 4px solid var(--danger);
}

.danger-button {
    background: var(--danger);
    border-color: var(--danger);
    color: #FFFDF7;
}

/* Landing buttons must stay readable over intent-specific primary backgrounds. */
.intent-actions .button-link.primary,
.intent-actions .button-link.primary:visited {
    color: #FFFDF7 !important;
}
/* Page alignment and form polish */
:root {
    --page-max: 1200px;
}

body > header,
body > h2,
body > h3,
body > p,
body > form,
body > div,
body > section,
body > table,
.dashboard-section,
.dashboard-status,
.form-heading,
.record-form,
.ops-hero,
.ops-grid-section,
.dashboard-technical-section,
.secondary-section {
    max-width: var(--page-max);
    width: calc(100% - 2rem);
}

body > header {
    border-radius: 0 0 8px 8px;
}

.form-heading {
    padding-inline: 0;
}

.record-form {
    display: grid;
    gap: .9rem;
    min-width: 0;
    overflow-x: hidden;
}

.record-form .form-field,
.advanced-fields .form-field,
.seed-use-row .form-field,
.receipt-line-fields .form-field {
    align-content: start;
    display: grid;
    gap: .28rem;
    margin-bottom: 0;
    min-width: 0;
}

.record-form label,
.record-form .field-label,
.advanced-fields label,
.advanced-fields .field-label,
.seed-use-row label,
.seed-use-row .field-label,
.receipt-line-fields label,
.receipt-line-fields .field-label {
    line-height: 1.18;
    margin-top: 0;
}

.record-form input,
.record-form select,
.record-form textarea,
.advanced-fields input,
.advanced-fields select,
.advanced-fields textarea,
.seed-use-row input,
.seed-use-row select,
.seed-use-row textarea {
    max-width: none;
}

.record-form input:not([type="checkbox"]):not([type="radio"]),
.record-form select,
.receipt-line-fields input:not([type="checkbox"]):not([type="radio"]),
.receipt-line-fields select,
.seed-use-row input:not([type="checkbox"]):not([type="radio"]),
.seed-use-row select {
    min-height: 2.7rem;
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
}

.record-form input[type="date"] {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    display: block;
    -webkit-appearance: none;
    appearance: none;
    inline-size: 100%;
}

.record-form input[type="datetime-local"],
.record-form input[type="time"] {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    display: block;
}

.form-notice {
    margin: 1rem 0;
    padding: .85rem 1rem;
    border-left: 4px solid var(--action-orange, #e87535);
    background: var(--card, #fffdf8);
}

.planner-finish-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    grid-column: 1 / -1;
    min-height: 2.7rem;
    padding: .55rem .8rem;
    border: 1px solid var(--border, #d7d1c5);
    border-radius: .5rem;
    background: var(--card, #fffdf8);
    color: var(--ink, #181817);
    font-weight: 700;
    text-decoration: none;
}

.planner-group-actions {
    display: grid;
    gap: .35rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: .55rem 0 .8rem;
}

.planner-group-actions form { margin: 0; }

.record-form .helptext,
.record-form .errorlist {
    margin: .1rem 0 0;
}

.receipt-line-fields {
    align-items: end;
}

.receipt-line-fields label,
.receipt-line-fields .field-label {
    min-height: 2.35rem;
}

.performance-stats {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.outcome-due-section {
    border-left: 4px solid var(--blue);
}

.outcome-review-card {
    border-left: 4px solid var(--blue);
}

.outcome-actions {
    align-content: start;
    display: grid;
    gap: .45rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: min(340px, 100%);
}

.outcome-actions form {
    margin: 0;
}

.outcome-actions button {
    min-height: 2.6rem;
    padding-inline: .55rem;
    width: 100%;
}

@media (max-width: 720px) {
    body > header,
    body > h2,
    body > h3,
    body > p,
    body > form,
    body > div,
    body > section,
    body > table,
    .dashboard-section,
    .dashboard-status,
    .form-heading,
    .record-form,
    .ops-hero,
    .ops-grid-section,
    .dashboard-technical-section,
    .secondary-section {
        width: calc(100% - 1rem);
    }

    body > header {
        border-radius: 0;
        width: 100%;
    }

    .performance-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .outcome-actions {
        grid-template-columns: 1fr;
        min-width: 0;
        width: 100%;
    }

    .receipt-line-fields label,
    .receipt-line-fields .field-label {
        min-height: 0;
    }
}


/* Map-backed apiary setup and actionable weather chips */
.apiary-location-picker {
    background: rgba(248, 240, 226, .62);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: grid;
    gap: .65rem;
    padding: .85rem;
}

.point-map-canvas {
    margin-inline: auto;
    max-width: 100%;
}

.weather-insight-chip {
    background: #EFE6D6;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    max-width: min(100%, 360px);
    position: relative;
}

.weather-insight-chip[open] {
    background: var(--panel);
    box-shadow: 0 8px 18px rgba(28, 28, 26, .08);
    flex-basis: min(100%, 360px);
}

.weather-insight-chip summary {
    cursor: pointer;
    font-size: .78rem;
    font-weight: 900;
    list-style: none;
    padding: .24rem .52rem;
}

.weather-insight-chip summary::-webkit-details-marker {
    display: none;
}

.weather-insight-chip summary::after {
    content: '?';
    color: var(--muted);
    margin-left: .35rem;
}

.weather-insight-chip p {
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.32;
    margin: 0;
    padding: 0 .65rem .55rem;
}

.weather-insight-chip a {
    border-top: 1px solid var(--line-soft);
    color: var(--ink);
    display: block;
    font-size: .82rem;
    font-weight: 900;
    padding: .5rem .65rem;
    text-decoration: none;
}

.weather-insight-chip a:hover,
.weather-insight-chip a:focus-visible {
    background: var(--pollen);
    outline: none;
}

@media (max-width: 720px) {
    .apiary-location-picker {
        padding: .65rem;
    }

    .weather-insight-chip,
    .weather-insight-chip[open] {
        flex-basis: 100%;
        max-width: 100%;
    }
}

/* Reusable YFS farm tags */
.tag-hero,
.tag-detail-panel {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.tag-card-grid,
.tag-scan-actions {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.tag-card {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-left: 4px solid var(--blue);
    border-radius: 8px;
    color: var(--ink);
    display: grid;
    gap: .35rem;
    padding: .85rem;
    text-decoration: none;
}

.tag-card strong,
.tag-scan-url span {
    color: var(--blue);
    font-size: 1.35rem;
    line-height: 1;
}

.tag-card em,
.tag-card span:not(.tag),
.tag-scan-url small {
    color: var(--muted);
    font-style: normal;
}

.tag-status-assigned {
    border-left-color: #5E7F3A;
}

.tag-status-retired,
.tag-status-lost,
.tag-status-replaced {
    border-left-color: var(--danger);
    opacity: .82;
}

.tag-qr {
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    height: 150px;
    padding: .45rem;
    width: 150px;
}

.tag-scan-url {
    display: grid;
    gap: .25rem;
}

.tag-scan-panel {
    display: grid;
    gap: .85rem;
    margin-top: 1rem;
}

.tag-lookup-form {
    align-items: end;
    grid-template-columns: minmax(0, 1fr) auto;
}

.tag-lookup-form .form-actions {
    margin: 0;
}

.tag-print-sheet {
    display: grid;
    gap: .65rem;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    margin: 0 auto 2rem;
    max-width: var(--page-max);
    width: calc(100% - 2rem);
}

.print-tag-label {
    align-items: center;
    background: #fff;
    border: 1px dashed #333;
    border-radius: 4px;
    color: #111;
    display: grid;
    gap: .45rem;
    grid-template-columns: minmax(0, 1fr) 86px;
    min-height: 132px;
    padding: .55rem;
}

.print-tag-label span,
.print-tag-label em,
.print-tag-label small {
    display: block;
    font-size: .7rem;
    font-style: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

.print-tag-label strong {
    display: block;
    font-size: 1.2rem;
    letter-spacing: .04em;
}

.print-tag-label img {
    background: #fff;
    grid-row: span 2;
    height: 86px;
    width: 86px;
}

.print-tag-label small {
    grid-column: 1 / -1;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .tag-hero,
    .tag-detail-panel,
    .tag-lookup-form {
        align-items: stretch;
        display: grid;
    }

    .tag-qr {
        height: 180px;
        justify-self: center;
        width: 180px;
    }

    .tag-scan-actions {
        grid-template-columns: 1fr;
    }
}

@media print {
    body {
        background: #fff;
    }

    header,
    .no-print,
    .messages {
        display: none !important;
    }

    .tag-print-sheet {
        gap: .18in;
        grid-template-columns: repeat(3, 2.35in);
        margin: 0;
        max-width: none;
        width: auto;
    }

    .print-tag-label {
        break-inside: avoid;
        height: 1.35in;
        min-height: 0;
        width: 2.35in;
    }
}

/* Mobile field-use polish and tag reader */
.weather-insight-chip summary {
    align-items: center;
    display: flex;
    gap: .42rem;
    justify-content: space-between;
}

.weather-insight-chip summary::after {
    align-items: center;
    border: 1px solid rgba(28, 28, 26, .22);
    border-radius: 999px;
    content: 'i';
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .68rem;
    height: 1.15rem;
    justify-content: center;
    margin-left: .35rem;
    opacity: .82;
    width: 1.15rem;
}

.tag-reader-panel {
    align-items: stretch;
    display: grid;
    gap: .9rem;
    grid-template-columns: minmax(0, 1fr) minmax(260px, .75fr);
}

.tag-reader-camera {
    background: rgba(248, 240, 226, .7);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: grid;
    gap: .65rem;
    padding: .75rem;
}

.tag-reader-camera video {
    background: #111;
    border-radius: 7px;
    max-height: 360px;
    min-height: 220px;
    object-fit: cover;
    width: 100%;
}

.tag-reader-state {
    color: var(--muted);
    font-size: .9rem;
}

.tag-reader-form input[name="payload"] {
    font-size: 1rem;
    letter-spacing: .02em;
}

@media (max-width: 720px) {
    body {
        line-height: 1.38;
    }

    header {
        margin-bottom: .65rem;
        padding: .72rem .75rem .8rem;
    }

    .site-title {
        font-size: 1.35rem;
        margin-bottom: .55rem;
    }

    nav {
        display: grid;
        gap: .42rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    nav a,
    nav button,
    .logout-form button {
        min-height: 2.55rem;
        padding: .48rem .55rem;
        text-align: center;
        width: 100%;
    }

    .logout-form {
        width: 100%;
    }

    .ops-hero,
    .dashboard-section,
    .dashboard-status,
    .form-heading,
    .record-form,
    .mobile-field-dashboard {
        width: calc(100% - .75rem);
    }

    .ops-hero {
        border-bottom: 0;
        margin-bottom: .55rem;
        padding: .15rem 0 0;
    }

    .ops-hero h2 {
        font-size: clamp(1.28rem, 6vw, 1.65rem);
    }

    .timer-card {
        box-shadow: 0 4px 12px rgba(28, 28, 26, .1);
        gap: .55rem;
        margin-top: .45rem;
        padding: .6rem;
    }

    .mobile-field-dashboard {
        border-left-width: 3px;
        box-shadow: 0 4px 12px rgba(28, 28, 26, .06);
        gap: .55rem;
        margin-bottom: .65rem;
        padding: .65rem;
    }

    .mobile-field-topline {
        align-items: center;
        display: flex;
        gap: .55rem;
        justify-content: space-between;
    }

    .mobile-field-topline strong {
        font-size: .96rem;
        line-height: 1.15;
        text-align: right;
    }

    .mobile-field-actions {
        display: grid;
        gap: .45rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mobile-field-actions a {
        align-items: center;
        background: rgba(248, 240, 226, .72);
        border: 1px solid var(--line-soft);
        border-radius: 7px;
        color: var(--ink);
        display: flex;
        font-size: .86rem;
        font-weight: 900;
        justify-content: center;
        line-height: 1.12;
        min-height: 2.75rem;
        padding: .45rem;
        text-align: center;
        text-decoration: none;
    }

    .section-heading {
        align-items: start;
        gap: .5rem;
        margin-bottom: .5rem;
    }

    .section-heading h3 {
        font-size: .96rem;
    }

    .section-heading p,
    .quiet-link {
        font-size: .84rem;
    }

    .dashboard-technical-section {
        gap: .65rem;
    }

    .compact-weather {
        padding: .68rem;
    }

    .weather-card-header {
        margin-bottom: .45rem;
    }

    .weather-primary-metrics {
        gap: .45rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .forecast-strip {
        gap: .35rem;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .forecast-strip div,
    .weather-primary-temp,
    .weather-primary-rain {
        min-height: 0;
        padding: .5rem;
    }

    .weather-flags {
        gap: .35rem;
    }

    .weather-insight-chip,
    .weather-insight-chip[open] {
        border-radius: 8px;
        flex-basis: 100%;
        max-width: 100%;
    }

    .weather-insight-chip summary {
        min-height: 2.4rem;
        padding: .42rem .55rem;
    }

    .priority-section .attention-grid {
        gap: .55rem;
    }

    .task-group-card {
        gap: .42rem;
        grid-template-rows: auto;
        min-height: 0;
        padding: .68rem;
    }

    .task-card-top {
        gap: .4rem;
    }

    .task-title {
        font-size: .98rem !important;
        line-height: 1.18;
    }

    .task-reason {
        font-size: .88rem;
        line-height: 1.26;
    }

    .task-related-list {
        max-height: 2.4rem;
        min-height: 0;
    }

    .task-card-actions,
    .task-mini-actions {
        display: grid;
        gap: .4rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .task-card-actions a,
    .task-card-actions button,
    .task-mini-actions a,
    .task-mini-actions button {
        min-height: 2.45rem;
        padding: .45rem .5rem;
        width: 100%;
    }

    .quick-capture-section .quick-actions {
        gap: .5rem;
    }

    .quick-capture-section .compact-action {
        min-height: 68px;
    }

    .recent-activity-section .activity-list {
        gap: .5rem;
    }

    .tag-reader-panel {
        gap: .65rem;
        grid-template-columns: 1fr;
        padding: .75rem;
    }

    .tag-reader-camera {
        padding: .65rem;
    }

    .tag-reader-camera video {
        min-height: 260px;
    }

    .tag-reader-form .form-actions {
        display: grid;
        gap: .5rem;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 380px) {
    nav,
    .mobile-field-actions,
    .weather-primary-metrics,
    .task-card-actions,
    .task-mini-actions {
        grid-template-columns: 1fr;
    }

    .forecast-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile accordion cleanup */
.dashboard-accordion summary,
.mobile-field-dashboard summary {
    cursor: pointer;
    list-style: none;
}

.dashboard-accordion summary::-webkit-details-marker,
.mobile-field-dashboard summary::-webkit-details-marker {
    display: none;
}

.accordion-state {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-accordion[open] .accordion-state::before {
    content: 'Close';
}

.dashboard-accordion:not([open]) .accordion-state::before {
    content: 'Open';
}

.dashboard-accordion .accordion-state {
    font-size: 0;
}

.dashboard-accordion .accordion-state::before {
    font-size: .78rem;
}

.mobile-section-link {
    margin: -.2rem 0 .65rem;
}

@media (max-width: 720px) {
    body {
        padding-bottom: 0;
    }

    .ops-hero {
        gap: .5rem;
    }

    .timer-card,
    .mobile-timer-card {
        align-items: center;
        box-shadow: none;
        display: flex;
        gap: .55rem;
        justify-content: space-between;
        margin-top: .35rem;
        min-height: 0;
        padding: .48rem .55rem;
        width: 100%;
    }

    .timer-card strong {
        font-size: .9rem;
        line-height: 1.1;
    }

    .timer-card form {
        flex: 0 0 auto;
    }

    .timer-card button {
        font-size: .86rem;
        min-height: 2.2rem;
        padding: .35rem .58rem;
        width: auto;
    }

    .mobile-field-dashboard {
        background: var(--panel);
        border: 1px solid var(--line-soft);
        border-left: 3px solid var(--orange);
        border-radius: 8px;
        display: block;
        margin: 0 auto .7rem;
        max-width: 1120px;
        overflow: hidden;
        padding: 0;
        width: calc(100% - .75rem);
    }

    .mobile-field-topline {
        align-items: center;
        display: flex;
        gap: .55rem;
        justify-content: space-between;
        min-height: 2.85rem;
        padding: .58rem .65rem;
    }

    .mobile-field-topline::after,
    .accordion-summary::after {
        color: var(--muted);
        content: '+';
        font-size: 1.2rem;
        font-weight: 900;
        line-height: 1;
    }

    .mobile-field-dashboard[open] .mobile-field-topline::after,
    .dashboard-accordion[open] .accordion-summary::after {
        content: '-';
    }

    .mobile-field-topline strong {
        color: var(--danger);
        font-size: .9rem;
        line-height: 1.1;
        text-align: right;
    }

    .mobile-field-actions {
        display: grid;
        gap: .42rem;
        grid-template-columns: 1fr;
        padding: 0 .65rem .65rem;
    }

    .mobile-field-actions a {
        min-height: 2.35rem;
        padding: .42rem .5rem;
    }

    .dashboard-accordion {
        overflow: hidden;
        padding: 0;
    }

    .dashboard-accordion > :not(summary) {
        margin-left: .65rem;
        margin-right: .65rem;
    }

    .dashboard-accordion .accordion-summary {
        align-items: center;
        display: flex;
        gap: .55rem;
        justify-content: space-between;
        margin: 0;
        min-height: 3rem;
        padding: .65rem .7rem;
    }

    .dashboard-accordion .accordion-summary h3 {
        font-size: .94rem;
    }

    .dashboard-accordion .accordion-summary p {
        font-size: .82rem;
    }

    .dashboard-accordion .accordion-state {
        display: none;
    }

    .quick-capture-section .compact-action {
        min-height: 58px;
        padding: .65rem;
    }

    .tag-reader-panel {
        grid-template-columns: 1fr;
    }

    .tag-reader-camera button {
        min-height: 2.45rem;
    }
}
/* Dashboard alignment repair */
.dashboard-section,
.dashboard-status,
.form-heading,
.record-form,
.ops-hero,
.ops-grid-section,
.dashboard-technical-section,
.secondary-section,
.mobile-field-dashboard {
    margin-left: auto;
    margin-right: auto;
}

.dashboard-accordion {
    display: block;
}

.dashboard-accordion .accordion-summary {
    align-items: baseline;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: .65rem;
}

.dashboard-accordion .accordion-summary h3,
.dashboard-accordion .accordion-summary p {
    margin: 0;
}

.dashboard-accordion > .attention-grid,
.dashboard-accordion > .quick-actions,
.dashboard-accordion > .activity-list {
    width: 100%;
}

@media (max-width: 720px) {
    .dashboard-accordion .accordion-summary {
        align-items: center;
        margin-bottom: 0;
    }
}

/* Progressive setup/tool disclosure */
.progressive-settings-section details {
    background: rgba(255, 253, 247, .72);
}

.progressive-settings-groups > div {
    display: grid;
    gap: .45rem;
}

.settings-note {
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.35;
    margin: 0 0 .2rem;
}

.tool-discovery {
    border-top: 1px solid var(--line-soft);
    margin-top: .9rem;
    padding-top: .75rem;
}

.secondary-section .tool-discovery summary {
    color: var(--ink);
    font-size: .95rem;
}

.tool-discovery .setup-links a {
    background: rgba(255, 253, 247, .7);
}

@media (max-width: 720px) {
    .progressive-settings-groups {
        grid-template-columns: 1fr;
    }

    .progressive-settings-section .setup-links {
        display: grid;
        grid-template-columns: 1fr;
    }

    .progressive-settings-section .setup-links a {
        align-items: center;
        display: flex;
        min-height: 2.35rem;
    }
}

/* Bee harvest fast capture */
.bee-harvest-form {
    gap: .85rem;
}

.harvest-capture-panel {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: grid;
    gap: .7rem;
    padding: .85rem;
}

.primary-harvest-panel {
    border-left: 4px solid var(--gold, #d69e17);
}

.two-field-grid {
    display: grid;
    gap: .7rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.harvest-finalize-panel {
    border-left: 3px solid var(--blue);
}

.harvest-weather-panel {
    border-left: 3px solid var(--green);
}

.weather-snapshot-list {
    display: grid;
    gap: .45rem;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    margin: .75rem 0 0;
}

.weather-snapshot-list div {
    background: rgba(248, 240, 226, .62);
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    padding: .55rem;
}

.weather-snapshot-list dt {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.weather-snapshot-list dd {
    font-weight: 900;
    margin: .1rem 0 0;
}

.weather-context-note {
    border-left: 3px solid var(--orange);
    color: var(--muted);
    font-weight: 800;
    margin: .75rem 0 0;
    padding-left: .65rem;
}

@media (max-width: 720px) {
    .harvest-capture-panel {
        gap: .58rem;
        padding: .7rem;
    }

    .two-field-grid {
        grid-template-columns: 1fr;
    }

    .sticky-save-action {
        background: rgba(248, 244, 234, .96);
        border-top: 1px solid var(--line-soft);
        bottom: 0;
        margin: .3rem -.5rem 0;
        padding: .65rem .5rem env(safe-area-inset-bottom);
        position: sticky;
        z-index: 5;
    }

    .sticky-save-action button,
    .sticky-save-action a {
        min-height: 2.65rem;
    }
}
/* Calmer mobile header and readable flash messages */
.site-nav-menu {
    display: block;
}

.site-nav-menu > summary {
    display: none;
}

.messages {
    display: grid;
    gap: .45rem;
    margin-bottom: 1rem;
}

.message {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-left: 4px solid #5E7F3A;
    border-radius: 8px;
    font-weight: 800;
    padding: .65rem .8rem;
}

.message-warning {
    border-left-color: var(--orange);
}

.message-error {
    border-left-color: var(--danger);
}

@media (max-width: 720px) {
    header {
        display: grid;
        gap: .55rem;
    }

    .site-title {
        margin-bottom: 0;
    }

    .site-nav-menu {
        border: 1px solid rgba(244, 239, 227, .35);
        border-radius: 8px;
        overflow: hidden;
    }

    .site-nav-menu > summary {
        align-items: center;
        color: var(--bg);
        cursor: pointer;
        display: flex;
        font-weight: 900;
        justify-content: space-between;
        list-style: none;
        min-height: 2.6rem;
        padding: .55rem .7rem;
    }

    .site-nav-menu > summary::-webkit-details-marker {
        display: none;
    }

    .site-nav-menu > summary::after {
        content: '+';
        font-size: 1.2rem;
        line-height: 1;
    }

    .site-nav-menu[open] > summary::after {
        content: '-';
    }

    .site-nav-menu:not([open]) nav {
        display: none;
    }

    .site-nav-menu nav {
        border-top: 1px solid rgba(244, 239, 227, .22);
        padding: .55rem;
    }

    header .userline {
        margin: 0;
    }

    .messages {
        width: calc(100% - .75rem);
    }

    .message {
        font-size: .92rem;
        line-height: 1.28;
        padding: .58rem .65rem;
    }

    .setup-path-section .setup-path-grid {
        gap: .55rem;
        grid-template-columns: 1fr;
    }
}
/* Mobile dashboard field-app pass */
.timer-label {
    color: var(--muted);
    display: block;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .04em;
    line-height: 1;
    margin-bottom: .18rem;
    text-transform: uppercase;
}

.layout-open-action {
    background: rgba(255, 253, 247, .82);
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    color: var(--ink);
    font-weight: 900;
    padding: .38rem .58rem;
    text-decoration: none;
}

@media (max-width: 720px) {
    body {
        padding-bottom: calc(.5rem + env(safe-area-inset-bottom));
    }

    header {
        gap: .32rem;
        margin-bottom: .4rem;
        padding: calc(.5rem + env(safe-area-inset-top)) .6rem .55rem;
    }

    .site-title {
        font-size: 1.05rem;
        line-height: 1.05;
    }

    .site-nav-menu {
        border-color: rgba(244, 239, 227, .24);
        border-radius: 7px;
    }

    .site-nav-menu > summary {
        font-size: .9rem;
        min-height: 2.2rem;
        padding: .38rem .55rem;
    }

    .site-nav-menu nav {
        gap: .34rem;
        grid-template-columns: 1fr 1fr;
        padding: .42rem;
    }

    .site-nav-menu nav a,
    .site-nav-menu nav button,
    .site-nav-menu .logout-form button {
        font-size: .84rem;
        min-height: 2.25rem;
        padding: .38rem .42rem;
    }

    header .userline {
        font-size: .72rem;
        line-height: 1.1;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ops-hero {
        align-items: center;
        display: grid;
        gap: .5rem;
        grid-template-columns: minmax(0, 1fr) auto;
        margin-bottom: .45rem;
        padding: 0;
    }

    .ops-hero .eyebrow {
        font-size: .66rem;
        margin-bottom: .12rem;
    }

    .ops-hero h2 {
        font-size: clamp(1.08rem, 5vw, 1.38rem);
        line-height: 1.08;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .timer-card,
    .mobile-timer-card {
        background: rgba(255, 253, 247, .72);
        border: 1px solid var(--line-soft);
        border-radius: 999px;
        gap: .45rem;
        margin: 0;
        min-width: 0;
        padding: .32rem .35rem .32rem .55rem;
        width: auto;
    }

    .timer-label {
        font-size: .58rem;
        letter-spacing: .03em;
        margin-bottom: .05rem;
    }

    .timer-card strong {
        font-size: .78rem;
        max-width: 6.8rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .timer-card button {
        border-radius: 999px;
        font-size: .78rem;
        min-height: 2rem;
        padding: .28rem .52rem;
        white-space: nowrap;
    }

    .mobile-field-dashboard {
        border-left: 0;
        border-radius: 9px;
        box-shadow: none;
        margin-bottom: .55rem;
    }

    .mobile-field-topline {
        min-height: 3rem;
        padding: .56rem .65rem;
    }

    .field-mode-copy {
        display: grid;
        gap: .08rem;
    }

    .field-mode-copy strong {
        color: var(--ink);
        font-size: 1rem;
        line-height: 1.05;
        text-align: left;
    }

    .field-mode-copy small {
        color: var(--muted);
        font-size: .74rem;
        font-weight: 800;
        letter-spacing: .02em;
        text-transform: uppercase;
    }

    .mobile-field-dashboard[open] {
        border-color: rgba(242, 107, 33, .42);
    }

    .mobile-field-actions {
        gap: .45rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0 .65rem .65rem;
    }

    .mobile-field-actions a {
        background: rgba(248, 240, 226, .62);
        border-radius: 8px;
        font-size: .86rem;
        min-height: 2.45rem;
    }

    .dashboard-technical-section {
        display: grid;
        grid-template-columns: 1fr;
        margin-bottom: .7rem;
    }

    .layout-headline-card {
        border-radius: 9px;
        padding: .68rem;
    }

    .layout-headline-card .section-heading {
        align-items: center;
        margin-bottom: .45rem;
    }

    .layout-headline-card h3 {
        border-left: 0;
        font-size: .96rem;
        padding-left: 0;
    }

    .layout-open-action {
        font-size: .78rem;
        min-height: 2rem;
        padding: .35rem .5rem;
        white-space: nowrap;
    }

    .layout-thumbnail-link {
        background: rgba(255, 253, 247, .78);
        border-radius: 7px;
        height: clamp(135px, 36vw, 175px);
        margin-bottom: .45rem;
    }

    .farm-layout-thumb {
        height: 100%;
        max-height: 100%;
        transform: scale(1.04);
        transform-origin: center;
        width: 100%;
    }

    .layout-label,
    .layout-feature-icon {
        font-size: 10px;
    }


    .layout-mini-key {
        gap: .3rem .55rem;
        margin-bottom: .45rem;
    }

    .layout-mini-key span {
        font-size: .72rem;
    }

    .layout-headline-card .module-links {
        display: grid;
        gap: .4rem;
        grid-template-columns: 1fr 1fr;
    }

    .layout-headline-card .module-links a {
        align-items: center;
        display: flex;
        font-size: .8rem;
        justify-content: center;
        min-height: 2.25rem;
        text-align: center;
    }

    .layout-headline-card .module-links a:nth-child(3) {
        display: none;
    }

    .dashboard-accordion {
        border-radius: 9px;
        margin-bottom: .65rem;
    }

    .dashboard-accordion .accordion-summary {
        min-height: 2.65rem;
        padding: .55rem .65rem;
    }

    .dashboard-accordion .accordion-summary h3 {
        border-left: 0;
        font-size: .92rem;
        padding-left: 0;
    }

    .dashboard-accordion .accordion-summary p {
        font-size: .76rem;
    }

    .dashboard-accordion .accordion-summary::after,
    .mobile-field-topline::after {
        font-size: 1rem;
    }

    .setup-path-section {
        opacity: .92;
    }

    .setup-path-section .setup-step-card {
        min-height: 0;
        padding: .65rem;
    }

    .setup-path-section .setup-step-number {
        height: 1.65rem;
        width: 1.65rem;
    }

    .tag,
    .eyebrow {
        letter-spacing: .05em;
    }

    .quick-capture-section .compact-action .tag,
    .attention-card .tag,
    .task-group-card .tag {
        background: rgba(28, 28, 26, .08);
        color: var(--muted);
    }
}

@media (max-width: 380px) {
    .ops-hero {
        grid-template-columns: 1fr;
    }

    .timer-card,
    .mobile-timer-card {
        justify-content: space-between;
        width: 100%;
    }
}

/* Mobile field-first dashboard refinement */
.mobile-field-focus,
.mobile-quick-capture-strip,
.mobile-classic-switch {
    display: none;
}

@media (max-width: 720px) {
    body {
        padding-bottom: calc(4.75rem + env(safe-area-inset-bottom));
    }

    header {
        align-items: center;
        display: grid;
        gap: .38rem .6rem;
        grid-template-columns: minmax(0, 1fr) auto;
        padding: calc(.65rem + env(safe-area-inset-top)) .8rem .65rem;
    }

    .site-title {
        font-size: clamp(1.05rem, 5vw, 1.35rem);
        line-height: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .site-nav-menu {
        justify-self: end;
        min-width: 0;
    }

    .site-nav-menu > summary {
        min-height: 2rem;
        padding: .28rem .48rem;
    }

    header .userline {
        grid-column: 1 / -1;
        margin: 0;
        opacity: .78;
    }

    main {
        padding-top: .55rem;
    }

    .ops-hero {
        background: var(--ink);
        border-left: 0;
        border-radius: 0;
        box-shadow: none;
        color: var(--bg);
        display: block;
        margin: -.55rem -.8rem .65rem;
        min-height: 4.7rem;
        padding: .85rem .95rem .75rem;
    }

    .ops-hero .eyebrow,
    .ops-hero h2 {
        color: var(--bg);
    }

    .ops-hero .eyebrow {
        opacity: .82;
    }

    .ops-hero h2 {
        font-size: clamp(1.32rem, 8vw, 2rem);
        max-width: 100%;
    }

    .timer-card,
    .mobile-timer-card {
        background: transparent;
        border: 0;
        border-radius: 0;
        bottom: calc(.85rem + env(safe-area-inset-bottom));
        box-shadow: none;
        margin: 0;
        min-width: 0;
        padding: 0;
        position: fixed;
        right: .85rem;
        width: auto;
        z-index: 40;
    }

    .timer-card > div,
    .mobile-timer-card > div {
        display: none;
    }

    .timer-card form,
    .mobile-timer-card form {
        margin: 0;
    }

    .timer-card button,
    .mobile-timer-card button {
        background: var(--ink);
        border: 1px solid rgba(255, 253, 247, .22);
        border-radius: 999px;
        box-shadow: 0 10px 24px rgba(28, 28, 26, .26);
        color: var(--bg);
        font-size: .88rem;
        min-height: 2.85rem;
        padding: .68rem 1rem;
    }

    .dashboard-technical-section {
        gap: .65rem;
        margin-bottom: .65rem;
    }

    .layout-headline-card,
    .weather-card {
        border-radius: 9px;
        box-shadow: none;
    }

    .layout-thumbnail-link {
        height: clamp(150px, 43vw, 205px);
        overflow: hidden;
    }

    .farm-layout-thumb {
        transform: scale(1.2);
    }

    .mobile-field-focus {
        display: grid;
        gap: .45rem;
        margin: 0 0 .65rem;
    }

    .field-focus-card {
        align-items: center;
        background: var(--card);
        border: 1px solid var(--line-soft);
        border-left: 4px solid var(--accent);
        border-radius: 9px;
        box-shadow: 0 1px 0 rgba(28, 28, 26, .04);
        display: grid;
        gap: .65rem;
        grid-template-columns: minmax(0, 1fr) auto;
        padding: .72rem .72rem;
    }

    .field-focus-card.priority-high {
        border-left-color: #e25b22;
    }

    .field-focus-card.calm {
        border-left-color: var(--green);
    }

    .field-focus-card span {
        color: var(--muted);
        display: block;
        font-size: .7rem;
        font-weight: 800;
        letter-spacing: .06em;
        margin-bottom: .12rem;
        text-transform: uppercase;
    }

    .field-focus-card strong {
        display: block;
        font-size: 1rem;
        line-height: 1.12;
    }

    .field-focus-card p {
        color: var(--muted);
        font-size: .86rem;
        line-height: 1.25;
        margin: .18rem 0 0;
    }

    .field-focus-card a,
    .field-focus-secondary,
    .mobile-classic-switch button {
        align-items: center;
        background: rgba(248, 240, 226, .66);
        border: 1px solid var(--line-soft);
        border-radius: 999px;
        color: var(--ink);
        display: inline-flex;
        font-family: inherit;
        font-size: .86rem;
        font-weight: 900;
        justify-content: center;
        min-height: 2.35rem;
        padding: .5rem .75rem;
        text-decoration: none;
        white-space: nowrap;
    }

    .field-focus-secondary {
        justify-self: start;
        min-height: 2.15rem;
    }

    .mobile-quick-capture-strip {
        display: grid;
        gap: .45rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin: 0 0 .7rem;
    }

    .mobile-quick-capture-strip a {
        align-items: center;
        background: var(--card);
        border: 1px solid var(--line-soft);
        border-radius: 9px;
        color: var(--ink);
        display: flex;
        font-weight: 900;
        justify-content: center;
        min-height: 2.65rem;
        padding: .55rem .6rem;
        text-align: center;
        text-decoration: none;
    }

    .classic-dashboard-detail {
        display: none;
    }

    body.mobile-classic-dashboard .classic-dashboard-detail {
        display: block;
    }

    .mobile-classic-switch {
        display: flex;
        justify-content: center;
        margin: .8rem 0 .6rem;
    }

    .mobile-classic-switch button {
        background: transparent;
        color: var(--muted);
        cursor: pointer;
        min-height: 2.2rem;
    }

    .recent-activity-section,
    .setup-path-section,
    .progressive-settings-section {
        opacity: .96;
    }

    .dashboard-accordion .accordion-summary::after {
        color: var(--muted);
    }
}

@media (max-width: 380px) {
    .ops-hero {
        margin-left: -.65rem;
        margin-right: -.65rem;
    }

    .mobile-quick-capture-strip {
        grid-template-columns: 1fr;
    }

    .field-focus-card {
        grid-template-columns: 1fr;
    }

    .field-focus-card a {
        justify-self: start;
    }
}

/* Mobile hero/timer correction */
.floating-timer-action {
    display: none;
}

@media (max-width: 720px) {
    .ops-hero {
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        color: var(--ink);
        margin: 0 0 .55rem;
        min-height: 0;
        padding: .15rem 0 .25rem;
    }

    .ops-hero .eyebrow,
    .ops-hero h2 {
        color: var(--ink);
    }

    .ops-hero .eyebrow {
        color: var(--muted);
        font-size: .67rem;
        letter-spacing: .08em;
        margin-bottom: .08rem;
    }

    .ops-hero h2 {
        font-size: clamp(1.28rem, 7vw, 1.85rem);
        line-height: 1.05;
        white-space: normal;
    }

    .ops-hero .desktop-timer-card {
        display: none;
    }

    .floating-timer-action {
        bottom: calc(.85rem + env(safe-area-inset-bottom));
        display: block;
        position: fixed;
        right: .85rem;
        z-index: 45;
    }

    .floating-timer-action form {
        margin: 0;
    }

    .floating-timer-action button {
        background: var(--ink);
        border: 1px solid rgba(255, 253, 247, .22);
        border-radius: 999px;
        box-shadow: 0 10px 24px rgba(28, 28, 26, .26);
        color: var(--bg);
        font-size: .88rem;
        font-weight: 900;
        min-height: 2.85rem;
        padding: .68rem 1rem;
        white-space: nowrap;
    }
}

@media (max-width: 380px) {
    .ops-hero {
        margin-left: auto;
        margin-right: auto;
        width: calc(100% - 2rem);
    }
}

/* Keep home-page sections on the same comfortable mobile gutter. */
@media (max-width: 720px) {
    .dashboard-section,
    .dashboard-status,
    .dashboard-technical-section,
    .secondary-section {
        width: calc(100% - 2rem);
    }
}

/* Stable farm title row and single timer action */
.mobile-home-title {
    margin: 0 0 1rem;
    min-width: 0;
}

.mobile-home-title .eyebrow {
    color: var(--muted);
    font-size: .76rem;
    letter-spacing: .08em;
    margin-bottom: .15rem;
}

.mobile-home-title h2 {
    color: var(--ink);
    font-size: clamp(1.55rem, 4vw, 2.35rem);
    line-height: 1.04;
    margin: 0;
}

.floating-timer-action {
    display: flex;
    justify-content: flex-end;
    margin: -3.1rem 0 1rem;
}

.floating-timer-action form {
    margin: 0;
}

.floating-timer-action button {
    border-radius: 999px;
    font-weight: 900;
    min-height: 2.5rem;
    padding: .52rem .9rem;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .mobile-home-title {
        margin: .05rem 0 .58rem;
        padding: 0;
    }

    .mobile-home-title .eyebrow {
        font-size: .67rem;
        letter-spacing: .08em;
        margin-bottom: .08rem;
    }

    .mobile-home-title h2 {
        font-size: clamp(1.3rem, 7vw, 1.85rem);
        line-height: 1.05;
    }

    .floating-timer-action {
        bottom: calc(.85rem + env(safe-area-inset-bottom));
        display: block;
        left: auto;
        margin: 0;
        position: fixed;
        right: .85rem;
        width: auto;
        z-index: 60;
    }

    .floating-timer-action button {
        background: var(--ink);
        border: 1px solid rgba(255, 253, 247, .22);
        border-radius: 999px;
        box-shadow: 0 10px 24px rgba(28, 28, 26, .26);
        color: var(--bg);
        font-size: .88rem;
        min-height: 2.85rem;
        padding: .68rem 1rem;
    }
}

/* Farm workspace access */
.farm-session-bar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .45rem .7rem;
    grid-column: 1 / -1;
}

.farm-session-bar form {
    align-items: center;
    display: flex;
    gap: .35rem;
    margin: 0;
}

.farm-session-bar label {
    color: rgba(244, 239, 227, .72);
    font-size: .76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.farm-session-bar select {
    min-height: 2.1rem;
    max-width: 14rem;
}

.farm-session-bar a {
    color: var(--bg);
    font-weight: 900;
}

.member-list {
    display: grid;
    gap: .65rem;
}

.member-row {
    align-items: center;
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: grid;
    gap: .75rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: .8rem;
}

.member-row span,
.role-pill {
    color: var(--muted);
    font-size: .86rem;
    font-weight: 800;
}

.member-role-form {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    justify-content: end;
    margin: 0;
}

.checkbox-inline {
    align-items: center;
    display: inline-flex;
    gap: .25rem;
    font-weight: 800;
}

@media (max-width: 720px) {
    .farm-session-bar {
        align-items: stretch;
        display: grid;
    }

    .farm-session-bar form,
    .member-row,
    .member-role-form {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .farm-session-bar select {
        max-width: none;
        width: 100%;
    }
}

/* Active farm workspace polish */
.active-farm-name {
    align-items: center;
    display: inline-flex;
    gap: .4rem;
    line-height: 1;
}

.active-farm-name span {
    color: rgba(244, 239, 227, .72);
    font-size: .76rem;
    font-weight: 900;
    text-transform: uppercase;
}

@media (min-width: 721px) {
    .mobile-home-title,
    .floating-timer-action,
    .dashboard-technical-section,
    .mobile-field-focus,
    .mobile-quick-capture-strip,
    .dashboard-section,
    .mobile-classic-switch {
        max-width: 1120px;
        margin-left: auto;
        margin-right: auto;
        width: calc(100% - 2rem);
    }

    .floating-timer-action {
        margin-top: -3.1rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 720px) {
    .active-farm-name {
        color: var(--bg);
        font-size: .84rem;
        font-weight: 900;
    }
}

/* Brand wordmark and staff preview */
.brand-wordmark,
.site-title,
.intent-landing-hero h2 {
    font-family: "Aptos Display", "IBM Plex Sans", Inter, system-ui, -apple-system, Segoe UI, sans-serif;
    font-feature-settings: "ss01" 1, "cv05" 1;
    font-weight: 850;
    letter-spacing: -.01em;
}

.brand-wordmark {
    align-items: baseline;
    display: inline-flex;
    gap: 0;
    white-space: nowrap;
}

.brand-bracket {
    color: var(--orange);
    font-family: "Aptos", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 900;
    opacity: .95;
}

.brand-inline {
    white-space: nowrap;
}

.mobile-time-strip {
    align-items: center;
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-left: 4px solid var(--orange);
    border-radius: 999px;
    display: flex;
    gap: .7rem;
    justify-content: space-between;
    margin: -.35rem 0 1rem;
    padding: .42rem .45rem .42rem .75rem;
}

.mobile-time-strip span,
.mobile-time-strip strong {
    display: block;
}

.mobile-time-strip span {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .08em;
    line-height: 1;
    text-transform: uppercase;
}

.mobile-time-strip strong {
    font-size: .95rem;
    line-height: 1.1;
}

.mobile-time-strip form {
    flex: 0 0 auto;
    margin: 0;
}

.mobile-time-strip button {
    border-radius: 999px;
    min-height: 2.25rem;
    padding: .45rem .8rem;
    white-space: nowrap;
}

.brand-preview-hero {
    align-items: end;
}

.brand-preview-section {
    display: grid;
    gap: 1rem;
}

.brand-preview-wordmarks,
.brand-preview-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.brand-preview-wordmarks > div {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    font-size: 1.35rem;
    padding: .85rem;
}

.brand-preview-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
}

.brand-email-preview {
    background: var(--paper);
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    max-width: 680px;
    padding: 1.1rem;
}

.brand-email-wordmark {
    font-weight: 900;
    margin-bottom: .7rem;
}

.brand-email-preview article {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: grid;
    grid-template-columns: 6px minmax(0, 1fr);
    overflow: hidden;
}

.brand-email-preview article > span {
    background: var(--orange);
}

.brand-email-preview article > div {
    padding: 1.2rem;
}

.brand-email-preview h4 {
    font-size: 1.45rem;
    line-height: 1.15;
    margin: 0 0 .6rem;
}

.brand-email-preview a {
    background: var(--surface);
    border-radius: 6px;
    color: var(--card);
    display: inline-block;
    font-weight: 900;
    margin-top: .4rem;
    padding: .65rem .9rem;
    text-decoration: none;
}

.brand-email-footer {
    color: var(--muted);
    font-size: .82rem;
    margin: .7rem .2rem 0;
}

@media (max-width: 720px) {
    .site-title.brand-wordmark {
        display: inline-flex;
    }

    .mobile-time-strip {
        border-radius: 10px;
        margin: 0 0 .65rem;
        padding: .58rem .6rem .58rem .7rem;
    }

    .mobile-time-strip strong {
        font-size: .9rem;
    }

    .mobile-time-strip button {
        background: var(--ink);
        color: var(--bg);
        min-height: 2.35rem;
        padding: .48rem .72rem;
    }

    .floating-timer-action {
        display: none !important;
    }
}

/* Tighten bracketed wordmarks: brackets are part of the mark, not separated decoration. */
.brand-wordmark {
    gap: 0 !important;
    letter-spacing: -.01em;
}

.site-title.brand-wordmark,
.intent-landing-hero .brand-wordmark {
    gap: 0 !important;
}

.brand-wordmark span {
    display: inline-block;
}

.brand-wordmark .brand-bracket:first-child {
    margin-right: -.045em;
}

.brand-wordmark .brand-bracket:last-child {
    margin-left: -.045em;
}

/* Admin pulse and email preference controls */
.admin-pulse-hero {
    align-items: end;
}

.admin-pulse-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
}

.admin-overview-grid,
.email-schedule-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
}

.admin-overview-panel {
    display: grid;
    gap: .75rem;
    padding: 1rem;
}

.admin-overview-panel h3 {
    margin: 0;
}

.admin-stat-list {
    display: grid;
    gap: .55rem;
}

.admin-stat-list div {
    background: rgba(248, 240, 226, .62);
    border: 1px solid var(--line-soft);
    border-radius: 7px;
    padding: .65rem;
}

.admin-stat-list strong {
    color: var(--blue);
    display: block;
    font-size: 1.25rem;
    line-height: 1.05;
}

.admin-stat-list span {
    display: block;
    font-weight: 900;
}

.admin-stat-list em {
    color: var(--muted);
    display: block;
    font-size: .82rem;
    font-style: normal;
    margin-top: .12rem;
}

.notification-mode-panel,
.email-mode-note {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-left: 4px solid var(--orange);
    border-radius: 8px;
    color: var(--muted);
    display: grid;
    gap: .2rem;
    padding: .85rem 1rem;
}

.notification-mode-panel strong,
.email-mode-note strong {
    color: var(--ink);
}

.notification-mode-panel.enabled,
.email-mode-note.enabled {
    border-left-color: var(--green);
}

.email-schedule-section .section-heading {
    margin-bottom: .5rem;
}

.email-schedule-grid {
    margin-top: .85rem;
}

.email-schedule-card {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: grid;
    gap: .72rem;
    padding: .9rem;
}

.email-schedule-card strong,
.email-schedule-card p {
    display: block;
    margin: 0;
}

.email-schedule-card p {
    color: var(--muted);
    font-size: .9rem;
}

.email-schedule-card label,
.email-preference-row label {
    margin: 0;
}

.email-schedule-card select,
.email-schedule-card input[type="time"],
.email-preference-row input[type="number"] {
    margin-top: .28rem;
    width: 100%;
}

.email-preference-row.urgent-row {
    border-left: 4px solid var(--danger);
}

.urgent-toggle {
    background: rgba(155, 48, 44, .06);
    border: 1px solid rgba(155, 48, 44, .2);
    border-radius: 7px;
    padding: .55rem;
}

.preference-toggle-grid .checkbox-field,
.email-schedule-card .checkbox-field {
    align-items: center;
    background: rgba(248, 240, 226, .5);
    border: 1px solid var(--line-soft);
    border-radius: 7px;
    display: flex;
    gap: .45rem;
    padding: .55rem;
}

.preference-toggle-grid input[type="checkbox"],
.email-schedule-card input[type="checkbox"],
.email-preference-row input[type="checkbox"] {
    flex: 0 0 auto;
    margin: 0;
    width: auto;
}

@media (max-width: 720px) {
    .admin-pulse-hero {
        align-items: stretch;
    }

    .admin-pulse-actions {
        display: grid;
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .admin-pulse-actions a,
    .email-preference-row {
        width: 100%;
    }

    .email-preference-row {
        grid-template-columns: 1fr;
    }
}

/* PWA install/offline foundation */
.pwa-status-pill {
    background: var(--surface);
    border: 1px solid rgba(255, 253, 247, .18);
    border-radius: 999px;
    bottom: calc(.75rem + env(safe-area-inset-bottom));
    box-shadow: 0 10px 24px rgba(28, 28, 26, .22);
    color: var(--bg);
    font-size: .82rem;
    font-weight: 900;
    left: 50%;
    padding: .48rem .78rem;
    position: fixed;
    transform: translateX(-50%);
    z-index: 80;
}

.pwa-status-pill[hidden] {
    display: none;
}

.pwa-status-pill[data-mode="offline"] {
    background: var(--danger);
}

.pwa-status-pill[data-mode="install"] {
    background: var(--blue);
}

.pwa-status-pill[data-mode="warning"] {
    background: var(--orange);
    color: var(--ink);
}

.offline-page {
    border-bottom: 0;
}

.offline-actions-panel {
    display: grid;
    gap: .85rem;
    padding: 1rem;
}

.offline-actions-panel h3 {
    margin: 0;
}

@media (max-width: 720px) {
    .pwa-status-pill {
        bottom: calc(.6rem + env(safe-area-inset-bottom));
        max-width: calc(100vw - 1.2rem);
        white-space: nowrap;
    }
}

/* Offline quick capture foundation */
.offline-capture-panel {
    display: none;
}

.offline-capture-panel details {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-left: 4px solid var(--blue);
    border-radius: 9px;
    overflow: hidden;
}

.offline-capture-panel summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    min-height: 2.75rem;
    padding: .65rem .75rem;
}

.offline-capture-panel summary span {
    font-weight: 900;
}

.offline-capture-panel summary strong {
    color: var(--muted);
    font-size: .82rem;
}

.offline-capture-grid {
    display: grid;
    gap: .65rem;
    padding: 0 .75rem .75rem;
}

.offline-capture-grid label {
    margin: 0;
}

.offline-note-field {
    grid-column: 1 / -1;
}

.offline-capture-actions {
    align-items: center;
    border-top: 1px solid var(--line-soft);
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .65rem .75rem .75rem;
}

.offline-capture-actions span {
    color: var(--muted);
    font-size: .86rem;
    font-weight: 800;
}

@media (max-width: 720px) {
    .offline-capture-panel {
        display: block;
        margin-bottom: .65rem;
    }
}

.offline-capture-available {
    display: block;
}


.mobile-draft-review .section-heading {
    align-items: flex-start;
}

.draft-review-status {
    background: var(--paper);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    color: var(--muted);
    font-weight: 800;
    margin-bottom: .75rem;
    padding: .75rem;
}

.draft-review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .85rem;
}

.draft-review-list {
    display: grid;
    gap: .65rem;
}

.draft-review-item {
    align-items: start;
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-left: 4px solid var(--orange);
    border-radius: 8px;
    display: grid;
    gap: .75rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: .75rem;
}

.draft-review-item strong,
.draft-review-item span,
.draft-review-item code,
.draft-review-item p {
    display: block;
}

.draft-review-item span,
.draft-review-item code {
    color: var(--muted);
    font-size: .82rem;
}

.draft-review-item p {
    margin: .35rem 0;
}

.draft-review-item code {
    overflow-wrap: anywhere;
}

.draft-history-row {
    align-items: center;
}

.status-synced {
    background: var(--green);
}

.status-duplicate {
    background: var(--blue);
}

.status-failed {
    background: var(--danger);
}

@media (max-width: 720px) {
    .draft-review-item {
        grid-template-columns: 1fr;
    }

    .draft-review-item-actions button,
    .draft-review-actions button,
    .draft-review-actions a {
        width: 100%;
    }
}
/* Notification setup polish */
.notification-heading .status-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-width: min(430px, 100%);
}

.push-setup-panel .section-heading {
    align-items: start;
}

.push-setup-panel .notification-mode-panel {
    margin: .6rem 0;
}

.push-setup-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.push-setup-actions button {
    min-height: 2.45rem;
}

.push-setup-actions [data-push-state] {
    color: var(--muted);
    flex: 1 1 220px;
    font-size: .9rem;
    font-weight: 800;
}

@media (max-width: 720px) {
    .notification-heading {
        align-items: stretch;
        gap: .65rem;
        padding: .2rem 0 .8rem;
    }

    .notification-heading .lede {
        font-size: .95rem;
        margin-bottom: 0;
    }

    .notification-heading .status-strip {
        gap: .35rem;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-top: .35rem;
        min-width: 0;
    }

    .notification-heading .status-strip div {
        border-radius: 8px;
        min-height: 0;
        padding: .48rem .5rem;
    }

    .notification-heading .status-strip strong {
        font-size: .98rem;
        line-height: 1.05;
    }

    .notification-heading .status-strip span {
        font-size: .72rem;
        line-height: 1.1;
    }

    .notification-mode-panel,
    .email-mode-note {
        border-radius: 8px;
        font-size: .95rem;
        padding: .68rem .78rem;
    }

    .push-setup-panel .section-heading {
        display: grid;
        gap: .35rem;
    }

    .push-setup-panel .tag {
        justify-self: start;
        margin-bottom: 0;
    }

    .push-setup-actions {
        display: grid;
        gap: .45rem;
        grid-template-columns: 1fr;
    }

    .push-setup-actions button {
        width: 100%;
    }

    .push-setup-actions [data-push-state] {
        font-size: .88rem;
        line-height: 1.3;
    }

    .notification-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .notification-action-grid .action-card {
        min-height: 5.2rem;
        padding: .75rem;
    }
}

/* Shell polish: brand, nav, install, and consistent content widths */
.app-header-top {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .55rem .75rem;
    justify-content: space-between;
}

.site-title.brand-wordmark {
    margin: 0;
}

.site-title.brand-wordmark a,
.brand-wordmark a {
    align-items: baseline;
    color: inherit;
    display: inline-flex;
    gap: 0;
    text-decoration: none;
    white-space: nowrap;
}

.brand-wordmark,
.site-title,
.intent-landing-hero h2 {
    font-family: "IBM Plex Sans", "Inter Tight", "Aptos Display", Inter, system-ui, -apple-system, Segoe UI, sans-serif;
    font-feature-settings: "ss01" 1, "cv05" 1, "cv11" 1;
    font-weight: 900;
    letter-spacing: .005em;
}

.brand-bracket {
    color: var(--orange);
    font-family: "IBM Plex Mono", "Aptos Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 900;
}

.app-back-button,
.install-app-button {
    align-items: center;
    background: rgba(255, 253, 248, .08);
    border: 1px solid rgba(244, 239, 227, .28);
    border-radius: 999px;
    color: var(--bg);
    display: inline-flex;
    font-size: .82rem;
    font-weight: 900;
    justify-content: center;
    min-height: 2.1rem;
    padding: .38rem .7rem;
}

.install-app-button {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--ink);
}

.site-nav-menu nav a,
.site-nav-menu nav button,
.site-nav-menu .logout-form button {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    line-height: 1.1;
    text-align: center;
}

body > section,
body > details.dashboard-section,
body > .dashboard-section,
body > .mobile-home-title,
body > .mobile-time-strip,
body > .floating-timer-action,
body > .mobile-field-focus,
body > .mobile-quick-capture-strip,
body > .mobile-classic-switch,
body > .messages {
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    max-width: 1120px;
    width: min(1120px, calc(100% - 2rem));
}

@media (min-width: 721px) {
    .desktop-time-strip {
        justify-self: end;
        margin-top: -.5rem;
        max-width: 24rem;
        width: min(24rem, calc(100% - 2rem));
    }

    .floating-timer-action {
        display: none !important;
    }
}

@media (max-width: 720px) {
    body > section,
    body > details.dashboard-section,
    body > .dashboard-section,
    body > .mobile-home-title,
    body > .mobile-time-strip,
    body > .floating-timer-action,
    body > .mobile-field-focus,
    body > .mobile-quick-capture-strip,
    body > .mobile-classic-switch,
    body > .messages {
        width: calc(100% - 1rem);
    }

    .app-header-top {
        display: grid;
        gap: .4rem;
        grid-template-columns: auto 1fr;
    }

    .site-title.brand-wordmark {
        font-size: clamp(1.15rem, 6vw, 1.55rem);
        grid-column: 1 / -1;
        justify-self: start;
        order: -1;
    }

    .app-back-button {
        justify-self: start;
        min-height: 2rem;
        padding: .28rem .58rem;
    }

    .install-app-button {
        justify-self: end;
        min-height: 2rem;
        padding: .28rem .58rem;
    }

    .site-nav-menu {
        width: 100%;
    }

    .site-nav-menu > summary {
        min-height: 2.45rem;
        padding: .5rem .65rem;
    }

    .site-nav-menu nav {
        align-items: stretch;
        display: grid;
        gap: .42rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: .5rem;
        width: 100%;
    }

    .site-nav-menu nav a,
    .site-nav-menu nav button,
    .site-nav-menu .logout-form button {
        min-height: 2.55rem;
        padding: .55rem .45rem;
        width: 100%;
    }

    .site-nav-menu .logout-form {
        display: contents;
    }

    .farm-session-bar {
        gap: .35rem;
    }

    .farm-session-bar .userline {
        font-size: .78rem;
        white-space: normal;
    }

    .mobile-time-strip {
        display: none !important;
    }

    .floating-timer-action {
        bottom: calc(.9rem + env(safe-area-inset-bottom));
        display: block !important;
        left: auto;
        margin: 0;
        max-width: none;
        position: fixed;
        right: .8rem;
        width: auto;
        z-index: 70;
    }

    .floating-timer-action button {
        background: var(--ink);
        border: 1px solid rgba(255, 253, 247, .22);
        box-shadow: 0 10px 24px rgba(28, 28, 26, .28);
        color: var(--bg);
        min-height: 2.8rem;
        padding: .64rem .92rem;
    }
}

/* Notification setup should read like user choices, not system state. */
.notification-choice-panel {
    display: grid;
    gap: 1rem;
}

.notification-choice-grid {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.notification-choice-card {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-left: 4px solid var(--orange);
    border-radius: 8px;
    display: grid;
    gap: .55rem;
    padding: 1rem;
}

.notification-choice-card.enabled {
    border-left-color: var(--green);
}

.notification-choice-card.paused {
    border-left-color: var(--line);
}

.notification-choice-card h3,
.notification-choice-card p {
    margin: 0;
}

.notification-choice-card p {
    color: var(--muted);
    line-height: 1.35;
}

.notification-choice-card .push-setup-actions {
    display: grid;
    gap: .45rem;
}

.notification-choice-card [data-push-state] {
    color: var(--muted);
    font-size: .9rem;
    font-weight: 700;
}
/* Final shell corrections: readable brand, quieter install action, cleaner mobile menu. */
header .site-title.brand-wordmark a,
header .site-title.brand-wordmark a:visited {
    color: #FFFDF8 !important;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
}

header .brand-wordmark .brand-bracket {
    color: #E87535 !important;
}

.site-nav-menu nav .nav-install-action {
    background: rgba(255, 253, 248, .08);
    border: 1px dashed rgba(255, 253, 248, .32);
    color: #FFFDF8;
    font-size: .82rem;
    min-height: 2.45rem;
}

.site-nav-menu nav .nav-install-action:hover,
.site-nav-menu nav .nav-install-action:focus-visible {
    background: rgba(232, 117, 53, .16);
    border-color: rgba(232, 117, 53, .62);
}

@media (max-width: 720px) {
    header {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .app-header-top {
        grid-template-columns: 1fr;
        justify-items: start;
        width: 100%;
    }

    .site-nav-menu {
        box-sizing: border-box;
        margin-top: .55rem;
    }

    .site-nav-menu[open] {
        display: grid;
        gap: .45rem;
    }

    .site-nav-menu > summary {
        align-items: center;
        box-sizing: border-box;
        display: flex;
        justify-content: space-between;
        width: 100%;
    }

    .site-nav-menu > summary::after {
        content: "+";
        font-weight: 900;
    }

    .site-nav-menu[open] > summary::after {
        content: "-";
    }

    .site-nav-menu nav {
        box-sizing: border-box;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin: 0;
        padding: .55rem 0 0;
    }

    .site-nav-menu nav a,
    .site-nav-menu nav button,
    .site-nav-menu .logout-form button {
        align-items: center;
        box-sizing: border-box;
        display: flex;
        justify-content: center;
        line-height: 1.15;
        min-height: 2.75rem;
        padding: .58rem .48rem;
        width: 100%;
    }

    .site-nav-menu nav .nav-install-action {
        font-size: .78rem;
        opacity: .86;
    }
}
/* Header correction pass: readable wordmark, compact back, calmer open menu. */
body header .site-title.brand-wordmark,
body header .site-title.brand-wordmark a,
body header .site-title.brand-wordmark a:visited,
body header .site-title.brand-wordmark a span:not(.brand-bracket) {
    color: #FFFDF8 !important;
}

body header .site-title.brand-wordmark .brand-bracket {
    color: #E87535 !important;
}

body header .app-back-button {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #FFFDF8 !important;
    min-height: 1.8rem !important;
    padding: 0 !important;
    text-decoration: underline;
    text-underline-offset: .18em;
}

body header .app-back-button::before {
    content: "< ";
    color: #E87535;
    font-weight: 900;
}

@media (max-width: 720px) {
    body header .site-nav-menu[open] {
        background: rgba(255, 253, 248, .04);
        border: 1px solid rgba(255, 253, 248, .12);
        border-radius: 8px;
        padding: .45rem;
    }

    body header .site-nav-menu[open] nav {
        position: static !important;
        transform: none !important;
        width: 100% !important;
    }
}


/* Farm-module and install polish */
.module-toggle-grid .checkbox-field {
    min-height: 2.75rem;
}
.module-toggle-grid { align-items: stretch; }
.module-setting-card { align-items: center; background: var(--card); border: 1px solid var(--line-soft); border-radius: 8px; display: flex; gap: .45rem; justify-content: space-between; min-width: 0; padding: .35rem .4rem .35rem .65rem; }
.module-setting-card.is-enabled { border-left: 3px solid var(--green); }
.module-setting-card .checkbox-field { flex: 1 1 auto; min-width: 0; }
.module-setting-open { flex: 0 0 auto; font-size: .72rem; min-height: 2.15rem; padding: .32rem .55rem; text-align: center; }
@media (max-width: 520px) { .module-setting-card { align-items: stretch; flex-direction: column; }.module-setting-open { width: 100%; } }

.app-footer-tools {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: .55rem .75rem;
    justify-content: center;
    margin: 1.5rem auto calc(1rem + env(safe-area-inset-bottom));
    max-width: 1120px;
    padding: .65rem 1rem;
    width: min(1120px, calc(100% - 2rem));
}

.footer-install-action {
    background: transparent;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    color: var(--muted);
    font-size: .82rem;
    min-height: 2rem;
    padding: .32rem .72rem;
}

.footer-install-action:hover,
.footer-install-action:focus-visible {
    border-color: rgba(232, 117, 53, .6);
    color: var(--ink);
}

.app-footer-tools span {
    font-size: .82rem;
    font-weight: 700;
}

.install-choice-card .secondary-button {
    justify-self: start;
}

@media (max-width: 720px) {
    body > header {
        display: flex !important;
        flex-direction: column !important;
        gap: .6rem !important;
    }

    body header .app-header-top {
        order: 1;
        width: 100%;
    }

    body header .site-title.brand-wordmark {
        font-size: clamp(1.35rem, 7vw, 1.9rem) !important;
        line-height: 1.05;
        max-width: 100%;
        position: relative;
        z-index: 2;
    }

    body header .site-nav-menu {
        margin: 0 !important;
        order: 2;
        position: relative;
        width: 100% !important;
        z-index: 1;
    }

    body header .site-nav-menu[open] {
        background: rgba(255, 253, 248, .05);
        border: 1px solid rgba(255, 253, 248, .16);
        border-radius: 9px;
        padding: .45rem;
    }

    body header .site-nav-menu[open] nav {
        display: grid !important;
        gap: .42rem !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        padding: .5rem 0 0 !important;
        position: static !important;
        transform: none !important;
        width: 100% !important;
    }

    body header .site-nav-menu nav .nav-install-action {
        display: none !important;
    }

    .app-footer-tools {
        justify-content: flex-start;
        margin-top: 1rem;
        padding: .5rem .25rem calc(.75rem + env(safe-area-inset-bottom));
        width: calc(100% - 1rem);
    }

    .app-footer-tools span {
        font-size: .78rem;
        line-height: 1.25;
    }

    .pwa-status-pill {
        border-radius: 9px;
        bottom: calc(.7rem + env(safe-area-inset-bottom));
        font-size: .78rem;
        max-width: min(25rem, calc(100vw - 1.2rem));
        padding: .42rem .62rem;
        white-space: normal;
    }
}

/* Product spine: command center, review payoff, and public value chain */
.command-center-strip,
.decision-ready-grid,
.product-spine-flow {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.command-center-strip {
    margin: 0 auto 1rem;
    max-width: 1120px;
    width: min(1120px, calc(100% - 2rem));
}

.command-card,
.decision-ready-card,
.product-spine-flow article {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-left: 4px solid var(--blue);
    border-radius: 8px;
    color: var(--ink);
    display: grid;
    gap: .42rem;
    min-height: 0;
    padding: .85rem;
    text-decoration: none;
}

.command-card.priority,
.decision-ready-card.outcome {
    border-left-color: var(--orange);
}

.command-card.review {
    border-left-color: var(--green);
}

.command-card strong,
.decision-ready-card strong,
.product-spine-flow strong {
    display: block;
    font-size: 1.04rem;
    line-height: 1.15;
}

.command-card p,
.decision-ready-card span,
.product-spine-flow p {
    color: var(--muted);
    margin: 0;
}

.command-card a,
.decision-ready-card em {
    align-self: end;
    color: var(--ink);
    font-style: normal;
    font-weight: 900;
    text-decoration: underline;
    text-decoration-color: rgba(232, 117, 53, .45);
    text-underline-offset: .18em;
}

.decision-ready-section .section-heading {
    align-items: end;
}

.decision-ready-card:hover,
.decision-ready-card:focus-visible,
.command-card a:hover,
.command-card a:focus-visible {
    border-color: rgba(232, 117, 53, .6);
}

.product-spine-section {
    border-bottom: 1px solid var(--line-soft);
    padding-bottom: 1rem;
}

.product-spine-flow article {
    border-left-color: var(--orange);
}

@media (max-width: 720px) {
    .command-center-strip,
    .decision-ready-grid,
    .product-spine-flow {
        grid-template-columns: 1fr;
    }

    .command-center-strip {
        width: calc(100% - 1rem);
    }

    .command-card,
    .decision-ready-card,
    .product-spine-flow article {
        padding: .78rem;
    }

    .command-card p,
    .product-spine-flow p {
        font-size: .92rem;
        line-height: 1.32;
    }
}

/* Final selected-farm/mobile shell corrections */
body header .app-header-top {
    align-items: flex-start;
    display: grid !important;
    gap: .45rem;
    grid-template-columns: 1fr;
    justify-items: start;
}

body header .site-title.brand-wordmark {
    font-family: Bahnschrift, "IBM Plex Sans", "Inter Tight", "Segoe UI Variable Display", system-ui, sans-serif !important;
    font-size: clamp(1.6rem, 3vw, 2.15rem) !important;
    font-weight: 900 !important;
    letter-spacing: .01em !important;
    line-height: 1 !important;
    margin: 0 !important;
    order: 0;
}

body header .site-title.brand-wordmark a,
body header .site-title.brand-wordmark a:visited,
body header .site-title.brand-wordmark a span:not(.brand-bracket) {
    color: #FFFDF8 !important;
}

body header .site-title.brand-wordmark .brand-bracket {
    color: #E87535 !important;
    font-weight: 900 !important;
}

body header .app-back-button {
    color: rgba(255, 253, 248, .82) !important;
    font-size: .9rem !important;
    order: 1;
}

body header .site-nav-menu {
    width: 100%;
}

body header .site-nav-menu[open] {
    margin-top: .65rem;
}

body header .site-nav-menu nav a,
body header .site-nav-menu nav button {
    align-items: center !important;
    display: inline-flex !important;
    justify-content: center !important;
    line-height: 1.05 !important;
    min-height: 2.75rem;
    text-align: center;
}

@media (max-width: 720px) {
    body header .site-title.brand-wordmark {
        font-size: clamp(1.55rem, 7vw, 2rem) !important;
        max-width: 100%;
        overflow: visible !important;
        text-overflow: clip !important;
    }

    body header .site-nav-menu[open] {
        margin-top: .8rem;
        padding: .65rem;
    }

    body header .site-nav-menu nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .floating-timer-action {
        bottom: calc(.9rem + env(safe-area-inset-bottom)) !important;
        display: block !important;
        left: auto !important;
        margin: 0 !important;
        max-width: none !important;
        position: fixed !important;
        right: .85rem !important;
        width: auto !important;
        z-index: 55 !important;
    }

    .floating-timer-action button {
        background: var(--ink) !important;
        border: 1px solid rgba(255, 253, 247, .22) !important;
        border-radius: 999px !important;
        box-shadow: 0 10px 24px rgba(28, 28, 26, .28) !important;
        color: var(--bg) !important;
        min-height: 2.75rem !important;
        padding: .62rem .92rem !important;
        width: auto !important;
    }
}

.pwa-status-pill[hidden] {
    display: none !important;
}

.pwa-status-pill[data-mode="offline"] {
    background: #9B302C;
    color: #FFFDF8;
}

.preference-row.is-enabled {
    border-left: 4px solid var(--green);
}

.preference-row.is-disabled {
    border-left: 4px solid var(--line-soft);
    opacity: .82;
}

.preference-row .preference-state-label {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
}


/* Focused mobile shell fixes: keep brand first, farm controls below, one timer pill. */
@media (max-width: 720px) {
    body > header {
        display: flex !important;
        flex-direction: column !important;
    }

    body header .app-header-top {
        order: 0 !important;
    }

    body header .site-nav-menu {
        order: 1 !important;
    }

    body header .farm-session-bar {
        order: 2 !important;
        width: 100%;
    }

    .floating-timer-action {
        align-items: center !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        display: block !important;
        height: auto !important;
        padding: 0 !important;
        width: auto !important;
    }

    .floating-timer-action form {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .floating-timer-action button {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1 !important;
        max-width: 11rem !important;
    }
}

/* Mobile timer: one compact floating action, no nested card/pill chrome. */
@media (max-width: 720px) {
    body > .floating-timer-action {
        position: fixed !important;
        right: 0.85rem !important;
        bottom: calc(0.85rem + env(safe-area-inset-bottom)) !important;
        z-index: 90 !important;
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        outline: 0 !important;
    }

    body > .floating-timer-action::before,
    body > .floating-timer-action::after {
        content: none !important;
        display: none !important;
    }

    body > .floating-timer-action form {
        display: block !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    body > .floating-timer-action button {
        -webkit-appearance: none !important;
        appearance: none !important;
        box-sizing: border-box !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 2.6rem !important;
        margin: 0 !important;
        padding: 0.65rem 0.95rem !important;
        border: 1px solid rgba(255, 253, 248, 0.22) !important;
        border-radius: 999px !important;
        background: #181817 !important;
        color: #fffdf8 !important;
        box-shadow: 0 10px 24px rgba(24, 24, 23, 0.28) !important;
        font-size: 0.95rem !important;
        font-weight: 900 !important;
        line-height: 1 !important;
        text-align: center !important;
    }
}

/* Mobile timer final override: the control lives inside content, not as a direct body child. */
@media (max-width: 720px) {
    body .floating-timer-action {
        position: fixed !important;
        right: 0.85rem !important;
        bottom: calc(0.85rem + env(safe-area-inset-bottom)) !important;
        z-index: 120 !important;
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        outline: 0 !important;
    }

    body .floating-timer-action::before,
    body .floating-timer-action::after {
        content: none !important;
        display: none !important;
    }

    body .floating-timer-action form {
        display: block !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    body .floating-timer-action button {
        -webkit-appearance: none !important;
        appearance: none !important;
        box-sizing: border-box !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 2.6rem !important;
        margin: 0 !important;
        padding: 0.65rem 0.95rem !important;
        border: 1px solid rgba(255, 253, 248, 0.22) !important;
        border-radius: 999px !important;
        background: #181817 !important;
        color: #fffdf8 !important;
        box-shadow: 0 10px 24px rgba(24, 24, 23, 0.28) !important;
        font-size: 0.95rem !important;
        font-weight: 900 !important;
        line-height: 1 !important;
        text-align: center !important;
        white-space: nowrap !important;
    }
}

/* Field-ready card polish: calmer metrics and non-tower action buttons. */
.record-card .record-actions {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    white-space: normal;
}

.record-card .record-actions.compact-card-actions a,
.record-card .record-actions.compact-card-actions button,
.section-heading .compact-card-actions a,
td .compact-card-actions a {
    flex: 0 1 auto;
    min-height: 2.35rem;
    min-width: 6.25rem;
    padding: .48rem .75rem;
}

.compact-metrics {
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.compact-metrics span {
    background: #F7F3EA;
    border-color: #D7D1C5;
    box-shadow: none;
    min-width: 4.7rem;
    padding: .38rem .5rem;
}

.compact-metrics strong {
    color: #242420;
    font-size: .98rem;
}

.compact-metrics small {
    font-size: .62rem;
    letter-spacing: .04em;
}

.locked-farm-context {
    background: #FFFDF8;
    border: 1px solid #D7D1C5;
    border-left: 4px solid #E87535;
    border-radius: 6px;
    box-sizing: border-box;
    display: grid;
    gap: .12rem;
    padding: .62rem .72rem;
}

.locked-farm-context span,
.locked-farm-context small {
    color: #68645B;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.locked-farm-context small {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.35;
    text-transform: none;
}

html {
    background: #181817;
}

.primary-farm-setting {
    display: grid;
    gap: .35rem;
    margin: 0 0 1rem;
    padding: .85rem 1rem;
    background: var(--card, #fffdf8);
    border: 1px solid var(--border, #d7d1c5);
    border-left: 4px solid var(--orange, #e87535);
    border-radius: 8px;
}

.primary-farm-setting span {
    color: var(--muted, #68645b);
}

.primary-farm-setting button {
    justify-self: start;
    margin-top: .3rem;
}

@media (max-width: 720px) {
    .primary-farm-setting button {
        width: 100%;
    }
}

@media (max-width: 720px) {
    .record-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .record-card .record-actions.compact-card-actions a,
    .record-card .record-actions.compact-card-actions button,
    .section-heading .compact-card-actions a,
    td .compact-card-actions a {
        flex: 1 1 calc(50% - .35rem);
        min-width: 0;
    }

    .compact-metrics span {
        min-width: 4.25rem;
    }
}
.task-card-actions-compact {
    align-items: stretch;
    display: grid;
    gap: .35rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.task-card-actions-compact > a,
.task-card-actions-compact > details {
    min-width: 0;
}

.task-card-more {
    position: relative;
}

.task-card-more > summary {
    align-items: center;
    background: #EFE6D6;
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    font-size: .86rem;
    font-weight: 900;
    justify-content: center;
    line-height: 1.1;
    list-style: none;
    min-height: 2.35rem;
    padding: .42rem .58rem;
    text-align: center;
    white-space: nowrap;
    width: 100%;
}

.task-card-more > summary::-webkit-details-marker {
    display: none;
}

.task-card-more[open] > summary {
    background: #F6EDDC;
}

.task-card-more-panel {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(24, 23, 22, .14);
    display: grid;
    gap: .32rem;
    min-width: 10rem;
    padding: .45rem;
    position: absolute;
    right: 0;
    top: calc(100% + .35rem);
    z-index: 5;
}

.task-card-more-panel form {
    margin: 0;
}

.task-card-more-panel button {
    background: #FFFDF7;
    border: 1px solid var(--line-soft);
    border-radius: 5px;
    color: var(--ink);
    font-size: .8rem;
    font-weight: 900;
    padding: .34rem .46rem;
    width: 100%;
}

@media (max-width: 720px) {
    .task-card-actions-compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .task-card-more-panel {
        min-width: min(12rem, 72vw);
    }

    .task-mini-actions {
        align-items: stretch;
    }

    .task-mini-actions > a,
    .task-mini-actions > details {
        min-width: 0;
    }
}

@media (max-width: 380px) {
    .task-card-actions-compact,
    .task-mini-actions {
        grid-template-columns: 1fr;
    }

    .task-card-more-panel {
        left: 0;
        right: auto;
        width: min(12.5rem, 78vw);
    }
}

/* Inventory screen: compact mobile-first browse-and-act layout. */
.inventory-toolbar {
    padding-top: .2rem;
}

.inventory-filter-form {
    display: grid;
    gap: .55rem;
}

.inventory-search input {
    max-width: none;
    width: 100%;
}

.inventory-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.inventory-filter-chips .filter-chip {
    align-items: center;
    background: #F7F3EA;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    font-size: .78rem;
    font-weight: 900;
    justify-content: center;
    min-height: 2.2rem;
    padding: .3rem .7rem;
}

.inventory-filter-chips .filter-chip.is-active {
    background: var(--ink);
    color: var(--paper);
}

.inventory-actions {
    align-items: stretch;
}

.inventory-card .record-card-main,
.inventory-activity-card .record-card-main,
.inventory-use-card .record-card-main {
    gap: .15rem;
}

.inventory-location-note {
    color: var(--muted);
    font-size: .8rem;
}

.inventory-mobile-cards {
    display: grid;
    gap: .7rem;
}

.inventory-desktop-table {
    display: none;
}

.inventory-section-toggle > summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    font-weight: 900;
    justify-content: space-between;
    list-style: none;
    padding: .65rem .85rem;
}

.inventory-section-toggle > summary::-webkit-details-marker {
    display: none;
}

.inventory-section-toggle > summary::after {
    color: var(--muted);
    content: '+';
    font-size: 1.2rem;
    line-height: 1;
}

.inventory-section-toggle[open] > summary::after {
    content: '−';
}

.inventory-section-body {
    display: grid;
    gap: .85rem;
    padding: 0 .85rem .85rem;
}

@media (min-width: 721px) {
    .inventory-mobile-cards {
        display: none;
    }

    .inventory-desktop-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 720px) {
    .inventory-toolbar,
    .inventory-lots-section,
    .inventory-accordion,
    .secondary-section {
        margin-inline: 0;
    }

    .inventory-card .compact-metrics span {
        min-width: 4.1rem;
    }

    .inventory-section-toggle > summary {
        padding-inline: .65rem;
    }

    .inventory-section-body {
        padding-inline: .65rem;
    }
}

/* One timer control: the form is transparent, the button carries the surface. */
.floating-timer-action {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.floating-timer-action button {
    -webkit-appearance: none;
    appearance: none;
    background: var(--surface) !important;
    border: 1px solid rgba(255, 253, 248, .28) !important;
    border-radius: 999px !important;
    box-shadow: 0 8px 20px rgba(24, 24, 23, .22) !important;
    color: var(--panel) !important;
    display: inline-flex !important;
    line-height: 1 !important;
    min-height: 2.6rem;
    padding: .7rem 1rem !important;
}

.floating-timer-action {
    align-items: center;
    display: inline-flex;
    gap: .35rem;
}

.timer-live-status {
    color: var(--ink);
    font-size: .82rem;
    font-weight: 800;
    white-space: nowrap;
}

.timer-pending-action {
    background: var(--field) !important;
    border: 1px solid var(--border) !important;
    border-radius: 999px !important;
    box-shadow: 0 8px 20px rgba(24, 24, 23, .16) !important;
    color: var(--ink) !important;
    display: inline-flex !important;
    font-weight: 800;
    padding: .7rem 1rem !important;
    text-decoration: none;
}

/* Timer state is reversible: the compact pair prevents an accidental start
   from turning into an unwanted labor record. */
.floating-timer-cluster {
    align-items: center;
    display: flex !important;
    gap: .4rem;
}

.floating-timer-cluster form {
    margin: 0;
}

.floating-timer-cluster .timer-discard-button {
    background: var(--card) !important;
    border-color: var(--border) !important;
    color: var(--ink) !important;
}

.floating-timer-cluster .timer-pending-action {
    align-items: center;
    background: var(--ink) !important;
    border: 1px solid rgba(255, 253, 248, .22) !important;
    border-radius: 999px !important;
    box-shadow: 0 10px 24px rgba(24, 24, 23, .28) !important;
    color: var(--bg) !important;
    display: inline-flex !important;
    font-size: .95rem;
    font-weight: 900;
    justify-content: center;
    line-height: 1;
    min-height: 2.6rem;
    padding: .65rem .95rem;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.maintenance-check-list {
    display: grid;
    gap: .6rem;
}

.maintenance-check-row {
    align-items: center;
    background: var(--field);
    border: 1px solid var(--border);
    border-radius: 6px;
    display: flex;
    gap: .7rem;
    padding: .75rem;
}

.maintenance-check-row input {
    inline-size: 1.15rem;
    block-size: 1.15rem;
    flex: 0 0 auto;
}

.maintenance-check-row span {
    display: grid;
    gap: .12rem;
}

.maintenance-check-row small {
    color: var(--muted);
}

@media (max-width: 720px) {
    body .floating-timer-action.floating-timer-cluster {
        align-items: center !important;
        display: flex !important;
        gap: .35rem;
    }

    body .floating-timer-cluster form {
        display: block !important;
        width: auto !important;
    }

    body .floating-timer-cluster .timer-pending-action {
        min-height: 2.6rem !important;
        padding: .65rem .95rem !important;
    }
}
/* Public legal pages */
.legal-footer {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem auto 1rem;
    padding: 1rem;
    color: var(--muted, #68645b);
    font-size: .85rem;
}

.legal-page {
    max-width: 52rem;
    margin: 0 auto 3rem;
    padding: 1.25rem;
    background: var(--card, #fffdf8);
    border: 1px solid var(--border, #d7d1c5);
    border-radius: 8px;
}

.legal-page h3 { margin-top: 1.5rem; }
.legal-page p { line-height: 1.6; }

/* Home dashboard: one visual overview, one work plan, then module dashboards. */
.module-dashboard-section {
    margin-bottom: 1rem;
}

.module-dashboard-grid {
    display: grid;
    gap: .7rem;
    grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
}

.module-dashboard-card {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-left: 4px solid var(--orange);
    border-radius: 8px;
    color: var(--ink);
    display: grid;
    gap: .55rem;
    min-width: 0;
    padding: .85rem;
    text-decoration: none;
}

.module-dashboard-card.status-ok {
    border-left-color: var(--green);
}

.module-dashboard-card.status-setup {
    border-left-color: var(--blue);
}

.module-dashboard-heading {
    align-items: center;
    display: flex;
    gap: .65rem;
    justify-content: space-between;
}

.module-dashboard-heading > span:last-child {
    color: var(--muted);
    font-size: .75rem;
    font-weight: 900;
    text-align: right;
    text-transform: uppercase;
}

.module-dashboard-card > strong {
    font-size: 1.1rem;
    line-height: 1.15;
}

.module-dashboard-card > p {
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.35;
    margin: 0;
}

.module-dashboard-metrics {
    border-bottom: 1px solid var(--line-soft);
    border-top: 1px solid var(--line-soft);
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: .82rem;
    gap: .3rem .8rem;
    padding: .5rem 0;
}

.module-dashboard-metrics b {
    color: var(--ink);
}

.module-dashboard-actions {
    display: grid;
    gap: .4rem;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
}

.module-dashboard-actions a {
    align-items: center;
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    color: var(--ink);
    display: flex;
    font-size: .78rem;
    font-weight: 900;
    justify-content: center;
    min-height: 2.3rem;
    padding: .4rem .55rem;
    text-align: center;
    text-decoration: none;
}

.module-dashboard-actions .module-dashboard-primary,
.module-dashboard-actions .module-dashboard-primary:visited,
.module-dashboard-actions .module-dashboard-primary:hover,
.module-dashboard-actions .module-dashboard-primary:focus-visible {
    background: var(--surface);
    border-color: var(--surface);
    color: #FFFDF8 !important;
}

.dashboard-followup-strip {
    align-items: center;
    background: transparent;
    border-bottom: 1px solid var(--line-soft);
    border-top: 1px solid var(--line-soft);
    display: flex;
    gap: .8rem 1.25rem;
    justify-content: space-between;
    padding: .75rem 0;
}

.dashboard-followup-strip > div {
    display: grid;
    gap: .12rem;
}

.dashboard-followup-strip span {
    color: var(--muted);
    font-size: .86rem;
}

.dashboard-followup-strip nav {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.dashboard-followup-strip a {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    color: var(--ink);
    font-size: .82rem;
    font-weight: 900;
    min-height: 2.2rem;
    padding: .42rem .65rem;
    text-decoration: none;
}

.dashboard-tool-drawer {
    opacity: .88;
}

/* Map thumbnails must fit their own viewport at every screen width. */
.layout-thumbnail-link .farm-layout-thumb,
.layout-headline-card .farm-layout-svg {
    display: block;
    height: 100%;
    max-height: 100%;
    transform: none !important;
    width: 100%;
}

/* Weather summary stays compact; full forecast is deliberately on demand. */
.classic-weather-outlook {
    border-top: 1px solid var(--line-soft);
    margin-top: .7rem;
    padding-top: .6rem;
}

.classic-weather-outlook > summary {
    align-items: center;
    color: var(--blue);
    display: flex;
    font-size: .88rem;
    font-weight: 900;
    justify-content: space-between;
    list-style: none;
}

.classic-weather-outlook > summary::-webkit-details-marker {
    display: none;
}

.classic-weather-outlook > summary::after {
    content: "+";
    color: var(--muted);
}

.classic-weather-outlook[open] > summary::after {
    content: "-";
}

.classic-weather-days strong {
    color: var(--ink);
}

/* The work plan is the sole attention layer on the home page. */
.weather-work-plan {
    background: transparent;
    border: 0;
    border-top: 1px solid var(--line-soft);
    margin-top: .25rem;
    padding-top: .9rem;
}

.weather-plan-note {
    background: rgba(79, 102, 130, .08);
    border-left: 3px solid var(--blue);
    border-radius: 0 6px 6px 0;
    line-height: 1.35;
    padding: .55rem .65rem;
}

.farm-day-planner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.farm-day-planner > .planner-day {
    background: var(--card);
    overflow: hidden;
    padding: 0;
}

.farm-day-planner > .planner-day > summary {
    background: var(--surface);
    border-bottom: 3px solid var(--orange);
    color: #FFFDF8;
    padding: .65rem .75rem;
}

.farm-day-planner > .planner-day > summary strong,
.farm-day-planner > .planner-day > summary span {
    color: #FFFDF8 !important;
}

.farm-day-planner > .planner-day > summary span {
    opacity: .72;
}

.planner-day-guidance {
    margin: 0;
    padding: .65rem .75rem 0;
}

.planner-day-content {
    padding: .1rem .75rem .75rem;
}

.farm-day-planner .planner-group {
    border-top: 1px solid var(--line-soft);
    margin-top: .5rem;
    padding: .5rem 0 0;
}

.farm-day-planner .planner-group-collapsed {
    border-top: 0;
    padding-top: 0;
}

.farm-day-planner .planner-group > summary {
    align-items: center;
    background: var(--surface);
    border: 0;
    border-bottom: 2px solid var(--orange);
    border-radius: 6px;
    color: #FFFDF8;
    display: flex;
    gap: .65rem;
    justify-content: space-between;
    padding: .55rem .6rem;
}

.farm-day-planner .planner-group > summary strong,
.farm-day-planner .planner-group > summary span {
    color: #FFFDF8 !important;
}

.farm-day-planner .planner-group > summary strong {
    min-width: 0;
}

.record-form .form-field[hidden],
.advanced-fields .form-field[hidden],
.seed-use-row .form-field[hidden],
.receipt-line-fields .form-field[hidden] {
    display: none;
}

.farm-day-planner .planner-group > summary span {
    flex: 0 0 auto;
    font-size: .78rem;
    opacity: .78;
    white-space: nowrap;
}

.farm-day-planner .planner-group-collapsed > summary::after {
    color: var(--orange);
    content: "+";
    font-size: 1.1rem;
    font-weight: 900;
}

.farm-day-planner .planner-group-collapsed[open] > summary::after {
    content: "-";
}

.planner-move-actions,
.planner-task-actions,
.planner-unscheduled-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.planner-move-actions button,
.planner-task-actions button,
.planner-unscheduled-actions button,
.planner-finish-link {
    font-size: .72rem;
    min-height: 2.2rem;
    padding: .36rem .25rem;
}

.planner-finish-link {
    align-items: center;
    background: var(--surface);
    box-sizing: border-box;
    color: #FFFDF8 !important;
    display: flex;
    grid-column: auto;
    height: 2.2rem;
    justify-content: center;
    line-height: 1.1;
    padding: 0 .25rem;
    text-align: center;
    text-decoration: none;
}

.planner-unscheduled {
    background: var(--card);
    display: block;
    padding: 0;
}

.planner-unscheduled > summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: .7rem .75rem;
}

.planner-unscheduled > summary::-webkit-details-marker {
    display: none;
}

.planner-unscheduled > summary::after {
    color: var(--orange);
    content: "+";
    font-size: 1.1rem;
}

.planner-unscheduled[open] > summary::after {
    content: "-";
}

.planner-unscheduled > summary > span {
    display: grid;
    gap: .08rem;
}

.planner-unscheduled > summary small {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
}

.planner-unscheduled-content {
    padding: 0 .75rem .75rem;
}

@media (max-width: 720px) {
    .dashboard-technical-section {
        gap: .55rem;
    }

    .layout-thumbnail-link {
        height: clamp(155px, 42vw, 210px);
    }

    .layout-mini-key {
        display: none;
    }

    .weather-primary-metrics {
        gap: .45rem;
    }

    .forecast-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .forecast-strip > div {
        min-width: 0;
        padding: .55rem .35rem;
    }

    .forecast-strip strong {
        font-size: .9rem;
    }

    .forecast-strip span {
        font-size: .62rem;
        line-height: 1.15;
    }

    .classic-weather-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .classic-weather-days {
        gap: 0;
    }

    .classic-weather-days div {
        border-radius: 0;
        display: grid;
        gap: .08rem;
        grid-template-columns: minmax(7rem, .8fr) minmax(0, 1.4fr);
        padding: .55rem .15rem;
    }

    .classic-weather-days div + div {
        border-top: 1px solid var(--line-soft);
    }

    .farm-day-planner {
        grid-template-columns: 1fr;
    }

    .farm-day-planner > .planner-day:not([open]) {
        min-height: 0;
    }

    .planner-move-actions,
    .planner-task-actions,
    .planner-unscheduled-actions {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .planner-move-actions button,
    .planner-task-actions button,
    .planner-unscheduled-actions button,
    .planner-finish-link {
        font-size: .68rem;
        white-space: nowrap;
    }

    .module-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .module-dashboard-card {
        padding: .72rem;
    }

    .dashboard-followup-strip {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-followup-strip nav {
        width: 100%;
    }

    .dashboard-followup-strip a {
        flex: 1 1 auto;
        text-align: center;
    }
}

@media (max-width: 360px) {
    .planner-move-actions,
    .planner-task-actions,
    .planner-unscheduled-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Care cadence communicates evidence without making every missed day an alarm. */
.care-overview {
    display: grid;
    gap: .65rem;
}

.care-dashboard-graphic {
    align-items: center;
    display: grid;
    gap: 1rem;
    grid-template-columns: 9rem minmax(0, 1fr);
}

.care-status-ring {
    align-items: center;
    aspect-ratio: 1;
    background: conic-gradient(
        var(--green) 0 var(--care-current),
        #E0A344 var(--care-current) var(--care-due-stop),
        var(--red) var(--care-due-stop) 100%
    );
    border-radius: 50%;
    display: flex;
    justify-content: center;
    position: relative;
    width: 100%;
}

.care-status-ring::before {
    background: var(--card);
    border-radius: 50%;
    content: "";
    inset: 18%;
    position: absolute;
}

.care-status-ring span {
    display: grid;
    line-height: 1;
    position: relative;
    text-align: center;
    z-index: 1;
}

.care-status-ring strong {
    color: var(--ink);
    font-size: 2rem;
}

.care-status-ring small {
    color: var(--muted);
    font-size: .7rem;
    font-weight: 900;
    margin-top: .28rem;
    text-transform: uppercase;
}

.care-graphic-detail {
    display: grid;
    gap: .65rem;
    min-width: 0;
}

.care-status-track {
    background: var(--line-soft);
    border-radius: 999px;
    display: flex;
    height: .7rem;
    overflow: hidden;
}

.care-status-track i {
    display: block;
    flex: 0 0 var(--care-width);
}

.care-status-track .status-current {
    background: var(--green);
}

.care-status-track .status-due {
    background: #E0A344;
}

.care-status-track .status-attention {
    background: var(--red);
}

.care-status-summary {
    display: grid;
    gap: .55rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.care-status-count {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-left: 4px solid var(--muted);
    border-radius: 7px;
    display: grid;
    gap: .08rem;
    padding: .65rem .75rem;
}

.care-status-count strong {
    color: var(--ink);
    font-size: 1.3rem;
    line-height: 1;
}

.care-status-count span {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
}

.care-status-count.status-current,
.care-record-card.status-current {
    border-left-color: var(--green);
}

.care-status-count.status-due,
.care-record-card.status-due {
    border-left-color: var(--orange);
}

.care-status-count.status-attention,
.care-record-card.status-attention {
    border-left-color: var(--red);
}

.care-status-line {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.care-status-pill {
    border: 1px solid currentColor;
    border-radius: 999px;
    display: inline-flex;
    font-size: .7rem;
    font-weight: 900;
    line-height: 1;
    padding: .3rem .45rem;
    white-space: nowrap;
}

.care-status-pill.status-current {
    color: var(--green);
}

.care-status-pill.status-due {
    color: #8A5A18;
}

.care-status-pill.status-attention {
    color: var(--red);
}

@media (max-width: 520px) {
    .care-dashboard-graphic {
        grid-template-columns: 6.5rem minmax(0, 1fr);
    }

    .care-status-ring strong {
        font-size: 1.55rem;
    }

    .care-status-summary {
        gap: .4rem;
    }

    .care-status-count {
        padding: .55rem;
    }

    .care-status-count strong {
        font-size: 1.12rem;
    }
}

/* Trees: keep the first choice and routine capture compact on small screens. */
.tree-tracking-choice { display: grid; gap: .8rem; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 52rem; }
.tree-tracking-choice a { background: var(--paper, #fffdf8); border: 1px solid var(--line-soft); border-radius: 9px; color: inherit; display: grid; gap: .4rem; min-height: 8rem; padding: 1rem; text-decoration: none; }
.tree-tracking-choice a:hover, .tree-tracking-choice a:focus-visible { border-color: var(--green); box-shadow: 0 3px 12px rgba(24, 24, 23, .08); }
.tree-tracking-choice strong { color: var(--green); font-size: 1rem; }
.tree-tracking-choice span { color: var(--muted); font-size: .88rem; line-height: 1.35; }
.tree-site-list a { color: inherit; text-decoration: none; }
@media (display-mode: standalone) { .app-footer-tools[data-install-footer] { display: none !important; } }
@media (max-width: 620px) { .tree-tracking-choice { grid-template-columns: 1fr; } .tree-tracking-choice a { min-height: 0; } .tree-module-actions { gap: .45rem; } }

/* Module dashboards: let each domain show evidence before optional history. */
.module-dashboard {
    display: grid;
    gap: 1.2rem;
    margin: 1.2rem auto 2rem;
    max-width: 1120px;
}

.module-dashboard-title,
.section-heading,
.bee-hive-heading,
.bee-primary-attention,
.bee-weather-strip,
.bee-apiary-card > div,
.bee-apiary-card nav,
.bee-hive-card nav {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
}

.module-dashboard-title {
    align-items: flex-end;
    border-bottom: 1px solid var(--line-soft);
    padding-bottom: .9rem;
}

.module-dashboard-title h2,
.section-heading h3 {
    margin: 0;
}

.module-title-subtitle {
    color: var(--muted);
    display: block;
    font-size: .82rem;
    font-weight: 750;
    margin-top: .15rem;
}

.visually-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.module-dashboard-title .lede {
    margin-bottom: 0;
    max-width: 44rem;
}

.bees-dashboard-actions,
.bee-apiary-card nav,
.bee-hive-card nav {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.bees-dashboard-actions {
    justify-content: flex-end;
}

.bees-dashboard-actions a,
.bee-action-link,
.bee-action-button,
.bee-apiary-card nav a,
.bee-hive-card nav a,
.bee-insight-card a,
.bee-followup-list a {
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    color: var(--ink);
    font-size: .84rem;
    font-weight: 850;
    min-height: 2.35rem;
    padding: .48rem .65rem;
    text-decoration: none;
}

.bees-dashboard .bee-action-link,
.bees-dashboard .bee-action-button {
    align-items: center;
    background: var(--field);
    color: var(--ink) !important;
    display: inline-flex;
    justify-content: center;
    text-align: center;
}

.bees-dashboard .button-link {
    background: var(--charcoal) !important;
    border-color: var(--charcoal) !important;
    color: #FFFDF8 !important;
}

.bees-dashboard .bee-action-link:hover,
.bees-dashboard .bee-action-link:focus-visible,
.bees-dashboard .bee-action-button:hover,
.bees-dashboard .bee-action-button:focus-visible {
    background: var(--pollen);
    color: var(--ink) !important;
}

.bee-visual-overview {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-top: 4px solid var(--orange);
    border-radius: 8px;
    padding: .8rem;
}

.bee-command-center {
    display: grid;
    gap: .7rem;
}

.bee-overview-strip {
    align-items: stretch;
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: grid;
    gap: 0;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.35fr) 7.4rem;
    overflow: hidden;
}

.bee-overview-weather,
.bee-overview-good-for {
    align-items: center;
    border-right: 1px solid var(--line-soft);
    display: flex;
    gap: .65rem;
    min-width: 0;
    padding: .8rem;
}

.bee-overview-weather > div,
.bee-overview-good-for {
    display: grid;
    gap: .15rem;
}

.bee-overview-weather strong { font-size: 1.6rem; line-height: 1; }
.bee-overview-weather span:not(.bee-overview-icon),
.bee-overview-good-for span:not(.eyebrow) { color: var(--muted); font-size: .76rem; }
.bee-overview-good-for strong { font-size: .88rem; }
.bee-overview-icon {
    align-items: center;
    color: var(--orange);
    display: inline-flex;
    font-size: 2rem;
    justify-content: center;
    line-height: 1;
}

.bee-health-ring {
    align-items: center;
    background: conic-gradient(var(--green) var(--ring-progress), var(--border) 0);
    border-radius: 50%;
    display: grid;
    justify-items: center;
    margin: .65rem auto;
    min-height: 5.4rem;
    min-width: 5.4rem;
    padding: .45rem;
    position: relative;
    text-align: center;
}

.bee-health-ring::after {
    background: var(--card);
    border-radius: 50%;
    content: "";
    inset: .38rem;
    position: absolute;
}

.bee-health-ring strong,
.bee-health-ring span { position: relative; z-index: 1; }
.bee-health-ring strong { font-size: 1.35rem; line-height: 1; }
.bee-health-ring span { font-size: .58rem; font-weight: 850; line-height: 1.05; text-transform: uppercase; }

.bee-visual-overview-grid {
    display: grid;
    gap: .7rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.bee-command-metrics {
    display: grid;
    gap: .45rem;
    grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
    margin-bottom: .7rem;
}

.bee-command-metric {
    background: var(--field);
    border-left: 3px solid var(--steel);
    border-radius: 5px;
    display: grid;
    gap: .12rem;
    min-height: 5.1rem;
    padding: .45rem .55rem;
}

.bee-command-metric.tone-current { border-left-color: var(--green); }
.bee-command-metric.tone-due { border-left-color: var(--orange); }
.bee-command-metric.tone-attention { border-left-color: var(--red); }
.bee-kpi-mark { color: var(--muted); font-size: .72rem; font-weight: 950; }
.bee-command-metric strong { font-size: 1.15rem; line-height: 1; }
.bee-command-metric span { color: var(--muted); font-size: .68rem; font-weight: 850; text-transform: uppercase; }
.bee-command-metric small { color: var(--muted); font-size: .68rem; line-height: 1.15; }

.bee-status-strip {
    align-items: center;
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-left: 4px solid var(--green);
    border-radius: 7px;
    display: grid;
    gap: .65rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: .65rem .8rem;
}

.bee-status-strip.tone-due { border-left-color: var(--orange); }
.bee-status-strip.tone-attention { border-left-color: var(--red); }
.bee-status-icon {
    align-items: center;
    background: var(--green);
    border-radius: 50%;
    color: var(--card);
    display: inline-flex;
    font-size: 1rem;
    font-weight: 950;
    height: 1.8rem;
    justify-content: center;
    width: 1.8rem;
}
.tone-due .bee-status-icon { background: var(--orange); }
.tone-attention .bee-status-icon { background: var(--red); }
.bee-status-strip div { display: grid; gap: .12rem; min-width: 0; }
.bee-status-strip strong { font-size: .86rem; }
.bee-status-strip div span { color: var(--muted); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bee-status-strip > a { color: var(--ink); font-size: .75rem; font-weight: 900; text-decoration: none; }

.bee-visual-apiary {
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-radius: 7px;
    color: var(--ink);
    display: grid;
    gap: .55rem;
    padding: .75rem;
    text-decoration: none;
}

.bee-visual-apiary:hover,
.bee-visual-apiary:focus-visible {
    border-color: var(--orange);
    box-shadow: 0 0 0 2px rgba(232, 117, 53, .22);
}

.bee-visual-apiary-heading,
.bee-visual-apiary-foot {
    align-items: baseline;
    display: flex;
    gap: .5rem;
    justify-content: space-between;
}

.bee-visual-apiary-heading span,
.bee-visual-apiary-foot {
    color: var(--muted);
    font-size: .75rem;
    font-weight: 800;
}

.bee-visual-bars { display: grid; gap: .45rem; }

.bee-visual-bar-row {
    align-items: center;
    display: grid;
    gap: .45rem;
    grid-template-columns: 3.2rem minmax(4rem, 1fr) auto;
}

.bee-visual-bar-row > span {
    color: var(--muted);
    font-size: .7rem;
    font-weight: 850;
    text-transform: uppercase;
}

.bee-visual-bar-row > i {
    background: var(--border);
    border-radius: 999px;
    display: block;
    height: .65rem;
    overflow: hidden;
}

.bee-visual-bar-row > i b {
    background: var(--green);
    border-radius: inherit;
    display: block;
    height: 100%;
    width: var(--bar-width, 0%);
}

.bee-visual-bar-row > i b.bar-honey { background: var(--pollen); }
.bee-visual-bar-row > i b.bar-value { background: var(--steel); }

.bee-visual-bar-row > strong {
    font-size: .78rem;
    max-width: 8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bee-visual-apiary-foot { justify-content: flex-start; }
.bee-visual-apiary-foot .status-dot { margin-right: -.15rem; }

.module-dashboard-card[data-card-link] {
    cursor: pointer;
    position: relative;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.module-dashboard-card[data-card-link]:hover,
.module-dashboard-card[data-card-link]:focus-visible {
    border-color: var(--orange);
    box-shadow: 0 3px 0 var(--orange);
    transform: translateY(-1px);
}

.module-dashboard-card[data-card-link]:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.bees-dashboard-actions .button-link,
.bee-apiary-card .button-link,
.bee-hive-card .button-link,
.bee-primary-attention .button-link {
    background: var(--charcoal) !important;
    border-color: var(--charcoal) !important;
    color: #FFFDF8 !important;
}

.bees-dashboard-actions .button-link:visited,
.bees-dashboard-actions .button-link:hover,
.bees-dashboard-actions .button-link:focus-visible,
.bee-apiary-card .button-link:visited,
.bee-apiary-card .button-link:hover,
.bee-apiary-card .button-link:focus-visible,
.bee-hive-card .button-link:visited,
.bee-hive-card .button-link:hover,
.bee-hive-card .button-link:focus-visible,
.bee-primary-attention .button-link:visited,
.bee-primary-attention .button-link:hover,
.bee-primary-attention .button-link:focus-visible {
    background: var(--charcoal) !important;
    border-color: var(--charcoal) !important;
    color: #FFFDF8 !important;
}

.bees-empty-state {
    display: grid;
    gap: .55rem;
    padding: 1rem;
}

.bees-empty-state strong {
    color: var(--ink);
    font-size: 1.08rem;
}

.bee-dashboard-priority,
.bee-health-overview,
.bee-apiary-comparison,
.bee-insights,
.bee-dashboard-followups,
.bee-apiaries,
.bee-colonies {
    display: grid;
    gap: .7rem;
}

.bee-primary-attention,
.bee-weather-strip,
.bee-apiary-card,
.bee-hive-card,
.bee-insight-card,
.bee-followup-list a,
.bee-tools-drawer {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
}

.bee-primary-attention {
    border-left: 4px solid var(--orange);
    padding: .65rem .8rem;
}

.bee-primary-attention.tone-current { border-left-color: var(--green); }
.bee-primary-attention.tone-attention { border-left-color: var(--red); }

.bee-primary-attention > div,
.bee-apiary-card > div,
.bee-hive-heading > div {
    display: grid;
    gap: .18rem;
    min-width: 0;
}

.bee-primary-attention strong,
.bee-apiary-card strong,
.bee-hive-heading strong {
    font-size: 1.08rem;
}

.bee-primary-attention span,
.bee-primary-attention small,
.bee-apiary-card span,
.bee-hive-heading span,
.bee-apiary-card p,
.bee-hive-card p,
.bee-insight-card p,
.bee-weather-strip p {
    color: var(--muted);
    margin: 0;
}

.bee-primary-attention small {
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.25;
}

.bee-weather-strip {
    display: grid;
    gap: .6rem;
    grid-template-columns: minmax(130px, 1fr) minmax(260px, 1.4fr);
    padding: .85rem;
}

.bee-weather-strip h3 { margin: 0; }
.bee-weather-strip p { grid-column: 1 / -1; font-size: .84rem; }

.bee-weather-values,
.bee-insight-grid,
.bee-apiary-grid,
.bee-hive-list {
    display: grid;
    gap: .65rem;
}

.bee-weather-values {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bee-weather-values span,
.bee-care-total {
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    display: grid;
    gap: .12rem;
    min-width: 0;
    padding: .55rem .65rem;
}

.bee-weather-values b,
.bee-care-total strong {
    color: var(--ink);
    font-size: 1.12rem;
}

.bee-weather-values span,
.bee-care-total span {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.bee-care-graphic {
    align-items: stretch;
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: grid;
    grid-template-columns: minmax(8.5rem, .75fr) minmax(0, 2fr);
    overflow: hidden;
}

.bee-care-total {
    border: 0;
    border-radius: 0;
    border-right: 1px solid var(--line-soft);
    display: grid;
    align-content: center;
    min-height: 6rem;
    padding: .85rem 1rem;
}

.bee-care-total strong {
    font-size: clamp(1.7rem, 5vw, 2.35rem);
    line-height: 1;
}

.bee-care-breakdown {
    display: grid;
    gap: .7rem;
    padding: .85rem 1rem;
}

.bee-care-meter {
    background: var(--border);
    border-radius: 999px;
    display: flex;
    height: .85rem;
    overflow: hidden;
}

.bee-care-meter span { min-width: 0; }
.bee-care-meter .current { background: var(--green); }
.bee-care-meter .due { background: var(--orange); }
.bee-care-meter .attention { background: var(--red); }

.bee-care-legend {
    display: grid;
    gap: .5rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
}

.bee-care-legend div { min-width: 0; }
.bee-care-legend dt {
    color: var(--ink);
    font-size: 1.12rem;
    font-weight: 900;
    line-height: 1.1;
}
.bee-care-legend dd {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 850;
    line-height: 1.2;
    margin: .15rem 0 0;
    text-transform: uppercase;
}

.apiary-pulse-grid {
    display: grid;
    gap: .65rem;
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}

.apiary-pulse-card {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: grid;
    gap: .65rem;
    min-width: 0;
    padding: .7rem;
}

.apiary-pulse-heading {
    align-items: baseline;
    display: flex;
    gap: .5rem;
    justify-content: space-between;
}

.apiary-pulse-heading strong { font-size: 1rem; }
.apiary-pulse-heading span,
.apiary-hive-pulse small,
.apiary-signal-legend dd {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 850;
    text-transform: uppercase;
}

.apiary-hive-pulse-list {
    display: grid;
    gap: .35rem;
    grid-template-columns: repeat(auto-fit, minmax(4.6rem, 1fr));
}

.apiary-hive-pulse {
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-bottom: 3px solid var(--blue);
    color: var(--ink);
    display: grid;
    gap: .18rem;
    justify-items: center;
    min-width: 0;
    padding: .4rem .3rem;
    text-align: center;
    text-decoration: none;
}

.apiary-hive-pulse:hover { border-color: var(--ink); }
.apiary-hive-pulse.tone-current { border-bottom-color: var(--green); }
.apiary-hive-pulse.tone-due { border-bottom-color: var(--orange); }
.apiary-hive-pulse.tone-attention { border-bottom-color: var(--red); }
.apiary-hive-pulse.tone-neutral { border-bottom-color: var(--blue); }
.apiary-hive-pulse b { font-size: .78rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mini-hive-stack {
    align-content: end;
    display: grid;
    gap: .08rem;
    min-height: 1.6rem;
    width: 2.45rem;
}

.mini-hive-stack i {
    border: 1px solid rgba(24, 24, 23, .6);
    display: block;
    height: .3rem;
    width: 100%;
}

.mini-hive-stack .super { background: var(--pollen); height: .22rem; margin-inline: .13rem; width: calc(100% - .26rem); }
.mini-hive-stack .deep { background: var(--steel); }
.mini-hive-stack .empty { background: var(--border); border-style: dashed; height: 1rem; }

.apiary-signal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .65rem;
    margin: 0;
}

.apiary-signal-legend div { align-items: baseline; display: flex; gap: .22rem; }
.apiary-signal-legend dt { color: var(--ink); font-size: .9rem; font-weight: 900; }
.apiary-signal-legend dd { margin: 0; }
.apiary-signal-legend .tone-current dt { color: var(--green); }
.apiary-signal-legend .tone-due dt { color: var(--orange); }
.apiary-signal-legend .tone-attention dt { color: var(--red); }

.apiary-comparison-grid {
    display: grid;
    gap: .65rem;
    grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
}

.apiary-comparison-card {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-top: 3px solid var(--steel);
    border-radius: 8px;
    display: grid;
    gap: .55rem;
    padding: .75rem;
}

.apiary-comparison-heading {
    align-items: baseline;
    display: flex;
    gap: .5rem;
    justify-content: space-between;
}

.apiary-comparison-heading span,
.apiary-comparison-stats span {
    color: var(--muted);
    font-size: .75rem;
    font-weight: 800;
}

.apiary-status-bar {
    background: var(--border);
    border-radius: 999px;
    display: flex;
    height: .8rem;
    overflow: hidden;
}

.apiary-status-bar i { flex: var(--segment) 1 0; min-width: .2rem; }
.apiary-status-bar .tone-current { background: var(--green); }
.apiary-status-bar .tone-due { background: var(--orange); }
.apiary-status-bar .tone-attention { background: var(--red); }
.apiary-status-bar .tone-neutral { background: var(--steel); }

.apiary-comparison-stats {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .7rem;
}

.apiary-comparison-stats b {
    color: var(--ink);
    font-size: 1rem;
}

.bee-insight-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.bee-insight-card {
    border-top: 3px solid var(--line);
    display: grid;
    gap: .45rem;
    min-width: 0;
    padding: .8rem;
}

.bee-insight-card.tone-current { border-top-color: var(--green); }
.bee-insight-card.tone-due { border-top-color: var(--orange); }
.bee-insight-card.tone-attention { border-top-color: var(--red); }
.bee-insight-card > span {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 900;
    text-transform: uppercase;
}
.bee-insight-card > strong {
    font-size: clamp(1.1rem, 3.5vw, 1.22rem);
    line-height: 1.15;
    overflow-wrap: anywhere;
}
.bee-insight-card p { font-size: .78rem; line-height: 1.25; margin: 0; }
.bee-insight-card a { justify-self: start; }

.bee-followup-list { grid-template-columns: 1fr; }
.bee-followup-list a {
    border-left: 4px solid var(--orange);
    display: grid;
    gap: .2rem;
}
.bee-followup-list span { color: var(--muted); font-weight: 500; }

.bee-apiary-grid { grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); }
.bee-apiary-card,
.bee-hive-card {
    display: grid;
    gap: .65rem;
    min-width: 0;
    padding: .85rem;
}
.bee-apiary-card { border-top: 3px solid var(--pollen); }
.bee-apiary-card small,
.bee-hive-card small,
.bee-hive-findings { color: var(--muted); font-size: .84rem; }

.bee-hive-list { grid-template-columns: repeat(auto-fit, minmax(265px, 1fr)); }
.bee-hive-card.status-current { border-left: 4px solid var(--green); }
.bee-hive-card.status-due { border-left: 4px solid var(--orange); }
.bee-hive-card.status-attention { border-left: 4px solid var(--red); }
.bee-hive-visual {
    align-items: stretch;
    display: grid;
    gap: .75rem;
    grid-template-columns: minmax(8.25rem, .65fr) minmax(0, 1.35fr);
}

.hive-stack-graphic {
    align-content: end;
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-bottom: 4px solid var(--blue);
    border-radius: 6px;
    display: grid;
    gap: .5rem;
    justify-items: center;
    min-height: 9.1rem;
    padding: .65rem;
}

a.hive-stack-graphic {
    color: var(--ink);
    text-decoration: none;
}

a.hive-stack-graphic:hover { border-color: var(--ink); }

.hive-stack-graphic.status-current { border-bottom-color: var(--green); }
.hive-stack-graphic.status-due { border-bottom-color: var(--orange); }
.hive-stack-graphic.status-attention { border-bottom-color: var(--red); }

.hive-stack {
    align-content: end;
    display: grid;
    gap: .16rem;
    justify-items: center;
    min-height: 5.2rem;
    padding: .55rem .1rem .2rem;
    position: relative;
    width: 100%;
}

.hive-stack::before,
.hive-stack::after {
    background: var(--charcoal);
    content: "";
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
}

.hive-stack::before {
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    height: .75rem;
    top: 0;
    width: min(92%, 6.8rem);
}

.hive-stack::after {
    background: linear-gradient(to bottom, var(--charcoal) 0 48%, var(--orange) 48% 64%, var(--charcoal) 64%);
    border-radius: 1px;
    bottom: 0;
    height: .35rem;
    width: min(96%, 7rem);
}

.hive-layer {
    border: 1px solid rgba(24, 24, 23, .58);
    border-radius: 2px;
    box-shadow: inset 0 -.18rem rgba(24, 24, 23, .13), inset 0 0 0 1px rgba(255, 253, 248, .18);
    display: block;
    height: .78rem;
    width: min(100%, 6.25rem);
}

.hive-layer.super { background: var(--pollen); height: .58rem; width: min(88%, 5.5rem); }
.hive-layer.deep { background: var(--steel); }
.hive-stack-more { color: var(--muted); font-size: .72rem; font-weight: 900; }
.hive-stack-empty { color: var(--muted); font-size: .78rem; font-weight: 800; }
.hive-stack-caption { color: var(--muted); font-size: .7rem; font-weight: 850; text-align: center; }

.bee-hive-observations {
    display: grid;
    gap: .55rem;
    min-width: 0;
}

.bee-observation-list {
    display: grid;
    gap: .35rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.bee-observation-list div {
    background: var(--field);
    border-left: 3px solid var(--blue);
    display: grid;
    gap: .08rem;
    min-width: 0;
    padding: .36rem .45rem;
}

.bee-observation-list .tone-current { border-left-color: var(--green); }
.bee-observation-list .tone-due { border-left-color: var(--orange); }
.bee-observation-list .tone-attention { border-left-color: var(--red); }
.bee-observation-list dt,
.bee-observation-list dd { margin: 0; }
.bee-observation-list dt { color: var(--muted); font-size: .66rem; font-weight: 850; text-transform: uppercase; }
.bee-observation-list dd { color: var(--ink); font-size: .84rem; font-weight: 850; overflow-wrap: anywhere; }

.hive-accessory-list {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.hive-accessory-list li {
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    color: var(--muted);
    font-size: .71rem;
    font-weight: 800;
    padding: .2rem .45rem;
}

.bee-hive-performance {
    display: grid;
    gap: .45rem;
    grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
}

.bee-hive-metric {
    background: var(--field);
    border: 1px solid var(--line-soft);
    display: grid;
    gap: .18rem;
    min-width: 0;
    padding: .42rem .5rem;
}

.bee-hive-metric > span {
    color: var(--muted);
    font-size: .66rem;
    font-weight: 850;
    text-transform: uppercase;
}

.bee-hive-metric > strong { font-size: .96rem; overflow-wrap: anywhere; }
.bee-hive-metric small { color: var(--muted); font-size: .68rem; line-height: 1.25; }
.bee-hive-metric-bar {
    background: var(--border);
    border-radius: 999px;
    display: block;
    height: .35rem;
    overflow: hidden;
}
.bee-hive-metric-bar b { background: var(--green); display: block; height: 100%; width: var(--metric-width); }
.bee-hive-card nav {
    border-top: 1px solid var(--line-soft);
    display: grid;
    gap: .4rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: .65rem;
}

.bee-hive-card nav > a,
.hive-card-more > summary {
    align-items: center;
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    color: var(--ink);
    display: flex;
    font-weight: 850;
    justify-content: center;
    min-height: 2.5rem;
    padding: .38rem;
    text-align: center;
    text-decoration: none;
}

.bee-hive-card nav > a.button-link {
    background: var(--charcoal) !important;
    border-color: var(--charcoal) !important;
    color: #FFFDF8 !important;
}
.hive-card-more { grid-column: 1 / -1; position: relative; }
.hive-card-more > summary { cursor: pointer; list-style: none; }
.hive-card-more > summary::-webkit-details-marker { display: none; }
.hive-card-more > summary::after { color: var(--orange); content: "+"; margin-left: .4rem; }
.hive-card-more[open] > summary::after { content: "-"; }
.hive-card-more[open] > a {
    background: var(--card);
    border: 1px solid var(--line-soft);
    color: var(--ink);
    display: block;
    margin-top: .35rem;
    padding: .55rem;
    text-align: center;
    text-decoration: none;
}

.hive-build-page,
.hive-build-overview,
.hive-build-history {
    display: grid;
    gap: .85rem;
}

.hive-build-page { margin-top: 1rem; }
.hive-build-overview,
.hive-build-history {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: .9rem;
}

.hive-build-overview { align-items: stretch; grid-template-columns: minmax(9rem, .72fr) minmax(0, 1.25fr); }
.hive-build-overview h3 { margin: 0; }
.hive-build-stack { min-height: 10rem; }
.hive-build-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .8rem; }
.hive-build-actions > * { flex: 1 1 8rem; text-align: center; }
.hive-build-actions > a {
    align-items: center;
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    color: var(--ink) !important;
    display: inline-flex;
    font-weight: 850;
    justify-content: center;
    min-height: 2.8rem;
    padding: .55rem .75rem;
    text-decoration: none;
}
.hive-build-actions > a:hover,
.hive-build-actions > a:focus-visible { background: var(--pollen); }
.layout-hive-dot { fill: var(--orange); }
.layout-hive .layout-label { font-weight: 900; }
.hive-build-history .danger-link { color: var(--red) !important; margin-left: .45rem; }
.hive-build-history .activity-list { margin-top: .25rem; }

.bee-tools-drawer { padding: 0; }
.bee-tools-drawer > summary {
    cursor: pointer;
    font-weight: 900;
    list-style: none;
    padding: .8rem .9rem;
}
.bee-tools-drawer > summary::-webkit-details-marker { display: none; }
.bee-tools-drawer > summary::after { color: var(--orange); content: "+"; float: right; font-size: 1.15rem; }
.bee-tools-drawer[open] > summary::after { content: "-"; }
.bee-tools-drawer > .bees-dashboard-actions,
.bee-recent-records { border-top: 1px solid var(--line-soft); padding: .8rem .9rem; }
.bee-tools-drawer > .bees-dashboard-actions { justify-content: flex-start; }
.bee-recent-records { display: grid; gap: 1rem; }
.bee-recent-records h4 { margin: 0 0 .5rem; }

@media (max-width: 720px) {
    .module-dashboard { gap: 1rem; margin-top: .8rem; }
    .module-dashboard-title,
    .section-heading,
    .bee-primary-attention,
    .bee-hive-heading,
    .bee-apiary-card > div { align-items: flex-start; flex-direction: column; }
    .module-dashboard-title { gap: .75rem; }
    .bees-dashboard-actions { justify-content: flex-start; width: 100%; }
    .bees-dashboard-actions a { flex: 1 1 140px; text-align: center; }
    .bee-command-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bee-command-metric { min-width: 0; }
    .bee-overview-strip { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .bee-overview-weather { border-bottom: 1px solid var(--line-soft); }
    .bee-overview-good-for { border-bottom: 1px solid var(--line-soft); border-right: 0; }
    .bee-health-ring { grid-column: 1 / -1; }
    .bee-status-strip { align-items: start; grid-template-columns: auto minmax(0, 1fr); }
    .bee-status-strip > a { grid-column: 2; justify-self: start; }
    .bee-primary-attention > a { width: 100%; text-align: center; }
    .bee-weather-strip { grid-template-columns: 1fr; }
    .bee-care-graphic { grid-template-columns: 1fr; }
    .bee-care-total {
        border-bottom: 1px solid var(--line-soft);
        border-right: 0;
        min-height: 0;
    }
    .bee-hive-visual { grid-template-columns: 1fr; }
    .hive-stack-graphic {
        align-items: center;
        grid-template-columns: minmax(6rem, .8fr) minmax(0, 1fr);
        justify-items: stretch;
        min-height: 0;
    }
    .hive-stack { min-height: 3.4rem; }
    .hive-stack-caption { align-self: center; text-align: left; }
    .bee-hive-list,
    .bee-apiary-grid { grid-template-columns: 1fr; }
    .bee-apiary-card nav,
    .bee-hive-card nav { width: 100%; }
    .bee-apiary-card nav a,
    .bee-hive-card nav a { flex: 1 1 42%; text-align: center; }
    .bee-hive-card nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .bee-hive-card nav a { flex: initial; }
    .hive-build-overview { grid-template-columns: 1fr; }
    .hive-build-stack { min-height: 0; }
    .bee-recent-records .activity-row { align-items: start; grid-template-columns: 1fr; gap: .2rem; }
}

/* Bee command center: visual operational dashboard language. */
.bees-dashboard {
    gap: 1.25rem;
    max-width: 1180px;
}

.bee-module-header {
    align-items: end;
    border-bottom: 1px solid var(--line-soft);
    padding-bottom: 1rem;
}

.bee-module-header h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); }
.bee-module-header .module-title-subtitle { display: none; }

.bee-command-center,
.bee-hive-glance,
.bee-insights,
.bee-dashboard-followups,
.bee-apiaries,
.bee-colonies { gap: .85rem; }

.bee-command-center {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(24, 24, 23, .055);
    overflow: hidden;
}

.bee-command-center-heading {
    align-items: baseline;
    background: var(--charcoal);
    color: #FFFDF8;
    display: flex;
    gap: .65rem;
    justify-content: space-between;
    padding: .55rem .85rem;
}

.bee-command-center-heading .eyebrow { color: #E87535; margin: 0; }
.bee-command-center-heading h3 { color: #FFFDF8; font-size: .9rem; margin: 0; }

.bee-cockpit {
    display: grid;
    grid-template-columns: 1fr 1.25fr 7.7rem;
}

.bee-cockpit-weather,
.bee-cockpit-conditions {
    align-content: center;
    border-right: 1px solid var(--line-soft);
    display: grid;
    gap: .15rem;
    min-height: 7.2rem;
    padding: .85rem 1rem;
}

.bee-cockpit-weather { grid-template-columns: auto minmax(0, 1fr); }
.bee-cockpit-weather strong { font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1; }
.bee-cockpit-weather > span:not(.bee-weather-symbol),
.bee-cockpit-weather small { color: var(--muted); font-size: .72rem; }
.bee-cockpit-weather > span:not(.bee-weather-symbol),
.bee-cockpit-weather small { grid-column: 2; }

.bee-weather-symbol {
    align-self: center;
    background: #F3C44D;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(243, 196, 77, .15);
    grid-row: 1 / span 3;
    height: 1.35rem;
    margin: .25rem .9rem .25rem .25rem;
    position: relative;
    width: 1.35rem;
}

.bee-weather-symbol::after {
    background: #FFFDF8;
    border: 2px solid #D7D1C5;
    border-radius: 999px;
    content: "";
    height: .72rem;
    left: .6rem;
    position: absolute;
    top: .55rem;
    width: 1.2rem;
}

.bee-cockpit-conditions .eyebrow { margin: 0; }
.bee-cockpit-conditions strong { font-size: .96rem; }
.bee-cockpit-conditions > span:not(.eyebrow) { color: var(--muted); font-size: .74rem; }

.bee-cockpit .bee-health-ring {
    align-self: center;
    box-shadow: inset 0 0 0 1px rgba(24, 24, 23, .07);
    min-height: 5.75rem;
    min-width: 5.75rem;
}

.bee-cockpit-status {
    align-items: center;
    border-top: 1px solid var(--line-soft);
    display: grid;
    gap: .65rem;
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: .65rem 1rem;
}

.bee-cockpit-status > div { display: grid; gap: .1rem; min-width: 0; }
.bee-cockpit-status strong { font-size: .82rem; }
.bee-cockpit-status div span { color: var(--muted); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bee-cockpit-status > a {
    align-items: center;
    background: var(--charcoal);
    border-radius: 999px;
    color: #FFFDF8 !important;
    display: inline-flex;
    font-size: .74rem;
    font-weight: 900;
    justify-content: center;
    min-height: 2.05rem;
    padding: .35rem .8rem;
    text-decoration: none;
}

.bee-command-metrics {
    border-top: 1px solid var(--line-soft);
    gap: 0;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 0;
}

.bee-command-metric {
    background: transparent;
    border: 0;
    border-left: 1px solid var(--line-soft);
    border-radius: 0;
    min-height: 6.7rem;
    padding: .7rem .8rem;
    position: relative;
}

.bee-command-metric:first-child { border-left: 0; }
.bee-kpi-mark { color: var(--orange); font-size: .9rem; line-height: 1; }
.bee-command-metric strong { font-size: clamp(1.15rem, 2.8vw, 1.55rem); margin-top: .12rem; }
.bee-command-metric span { font-size: .63rem; }
.bee-command-metric small { font-size: .67rem; margin-top: auto; }
.bee-command-metric::after {
    background: currentColor;
    bottom: .55rem;
    content: "";
    height: 2px;
    left: .8rem;
    opacity: .16;
    position: absolute;
    right: .8rem;
}
.bee-command-metric.tone-current { color: var(--green); }
.bee-command-metric.tone-due { color: #B38415; }
.bee-command-metric.tone-attention { color: var(--red); }

.bee-hive-glance { display: grid; }
.bee-hive-glance-heading { align-items: end; }
.bee-hive-glance-heading h3 { font-size: 1.25rem; }

.bee-apiary-glance {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    box-shadow: 0 5px 18px rgba(24, 24, 23, .04);
    display: grid;
    gap: .7rem;
    overflow: hidden;
    padding: .85rem;
}

.bee-apiary-glance-heading {
    align-items: baseline;
    display: flex;
    justify-content: space-between;
}
.bee-apiary-glance-heading strong { font-size: 1.05rem; }
.bee-apiary-glance-heading span { color: var(--muted); font-size: .69rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }

.bee-hive-glance-strip {
    display: grid;
    gap: .55rem;
    grid-auto-columns: minmax(8.7rem, 1fr);
    grid-auto-flow: column;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: .1rem 0 .45rem;
    scroll-snap-type: x proximity;
}

.bee-hive-glance-card {
    background: #FFFDF8;
    border: 1px solid var(--line-soft);
    border-bottom: 4px solid var(--steel);
    border-radius: 8px;
    color: var(--ink);
    display: grid;
    gap: .26rem;
    min-height: 15.3rem;
    padding: .5rem;
    scroll-snap-align: start;
    text-decoration: none;
}
.bee-hive-glance-card.tone-current { border-bottom-color: var(--green); }
.bee-hive-glance-card.tone-due { border-bottom-color: var(--orange); }
.bee-hive-glance-card.tone-attention { border-bottom-color: var(--red); }
.bee-hive-glance-card:hover,
.bee-hive-glance-card:focus-visible { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(232, 117, 53, .15); }

.hive-glance-topline { align-items: center; display: flex; justify-content: space-between; }
.hive-glance-topline b {
    align-items: center;
    background: var(--green);
    border-radius: 50%;
    color: #FFFDF8;
    display: inline-flex;
    font-size: .64rem;
    height: 1.15rem;
    justify-content: center;
    width: 1.15rem;
}
.bee-hive-glance-card.tone-due .hive-glance-topline b { background: #C99C1E; }
.bee-hive-glance-card.tone-attention .hive-glance-topline b { background: var(--red); }
.hive-glance-topline i { background: var(--green); border-radius: 50%; height: .48rem; width: .48rem; }
.bee-hive-glance-card.tone-due .hive-glance-topline i { background: var(--orange); }
.bee-hive-glance-card.tone-attention .hive-glance-topline i { background: var(--red); }
.bee-hive-glance-card.tone-neutral .hive-glance-topline i { background: var(--border); }

.langstroth-hive {
    align-content: end;
    display: grid;
    gap: 2px;
    justify-items: center;
    min-height: 6.8rem;
    padding: .25rem .15rem 0;
}

.langstroth-hive i { display: block; }
.langstroth-cover {
    background: linear-gradient(145deg, #41423E, #1D1E1B 58%, #4B4C46);
    border: 1px solid #171815;
    clip-path: polygon(10% 100%, 2% 55%, 23% 0, 78% 0, 98% 55%, 90% 100%);
    height: .72rem;
    width: 4.9rem;
}
.langstroth-inner-cover { background: #3C3D39; border-radius: 1px; height: .18rem; width: 4.25rem; }
.langstroth-box {
    background: linear-gradient(90deg, #E9E5DB 0 9%, #FFFEFA 10% 82%, #D9D4C9 83% 100%);
    border: 1px solid #9D998F;
    border-radius: 1px;
    box-shadow: inset 0 -3px 0 rgba(58, 57, 52, .09);
    height: .83rem;
    position: relative;
    width: 4rem;
}
.langstroth-box::after { background: rgba(51, 51, 47, .35); border-radius: 999px; content: ""; height: 2px; left: 50%; position: absolute; top: 50%; transform: translate(-50%, -50%); width: 28%; }
.langstroth-box.super { background: linear-gradient(90deg, #C7982E 0 9%, #F0C857 10% 82%, #C5952A 83% 100%); }
.langstroth-box.deep { min-height: 1.02rem; }
.langstroth-box.unknown { background: repeating-linear-gradient(135deg, #E6E2D9, #E6E2D9 4px, #F8F5EE 4px, #F8F5EE 8px); }
.langstroth-feeder { background: linear-gradient(90deg, #697E9B, #A9B9CC, #617692); border: 1px solid #4C6079; height: .34rem; width: 4.16rem; }
.langstroth-excluder { background: repeating-linear-gradient(90deg, #8F8A7B 0 2px, transparent 2px 4px); border-bottom: 1px solid #7E796B; border-top: 1px solid #7E796B; height: .16rem; width: 4.12rem; }
.langstroth-entrance { background: #2D2E2A; border-radius: 0 0 2px 2px; height: .25rem; position: relative; width: 4.2rem; }
.langstroth-entrance.reduced::after { background: var(--orange); content: ""; height: 100%; left: 30%; position: absolute; width: 40%; }
.langstroth-bottom-board { background: linear-gradient(90deg, #31322E, #6C6B61, #31322E); border-radius: 1px 1px 3px 3px; height: .3rem; width: 4.55rem; }

.hive-glance-name { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hive-glance-state { color: var(--green); font-size: .64rem; font-weight: 900; text-transform: uppercase; }
.bee-hive-glance-card.tone-due .hive-glance-state { color: #9B7116; }
.bee-hive-glance-card.tone-attention .hive-glance-state { color: var(--red); }
.bee-hive-glance-card.tone-neutral .hive-glance-state { color: var(--muted); }
.hive-glance-facts { border-top: 1px solid var(--line-soft); display: grid; gap: .15rem; padding-top: .3rem; }
.hive-glance-facts span { color: var(--muted); font-size: .65rem; font-weight: 750; }
.bee-hive-glance-card small { color: var(--muted); font-size: .63rem; line-height: 1.22; margin-top: auto; }

.bee-apiary-glance-legend { display: flex; flex-wrap: wrap; gap: .45rem .75rem; }
.bee-apiary-glance-legend span { align-items: center; color: var(--muted); display: inline-flex; font-size: .66rem; font-weight: 800; gap: .25rem; }
.bee-apiary-glance-legend i { background: var(--border); border-radius: 50%; height: .45rem; width: .45rem; }
.bee-apiary-glance-legend i.tone-current { background: var(--green); }
.bee-apiary-glance-legend i.tone-due { background: var(--orange); }
.bee-apiary-glance-legend i.tone-attention { background: var(--red); }

.bee-insight-grid { grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr)); }
.bee-insight-card { border-top: 4px solid var(--steel); box-shadow: none; display: grid; gap: .35rem; min-height: 8rem; padding: .75rem; }
.bee-insight-card > span { color: var(--muted); font-size: .66rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.bee-insight-card strong { font-size: 1.3rem; line-height: 1.1; }
.bee-insight-card p { font-size: .74rem; line-height: 1.3; }
.bee-insight-card a { align-self: end; justify-self: start; min-height: 2rem; padding: .35rem .55rem; }

.bee-apiaries,
.bee-colonies { margin-top: .55rem; }
.bee-apiaries > .section-heading,
.bee-colonies > .section-heading { border-top: 1px solid var(--line-soft); padding-top: 1rem; }
.bee-hive-card { border-radius: 12px; box-shadow: 0 4px 15px rgba(24, 24, 23, .035); }
.hive-stack-graphic {
    align-items: center;
    background: linear-gradient(145deg, #F4EFE3, #FFFDF8);
    border-bottom-width: 4px;
    grid-template-columns: 6.4rem minmax(0, 1fr);
    min-height: 7rem;
}
.hive-detail-hive { min-height: 5.6rem; transform: scale(.86); transform-origin: center; }
.hive-stack-caption { color: var(--ink); font-size: .78rem; font-weight: 900; text-align: left; }

@media (max-width: 720px) {
    .bees-dashboard { gap: 1rem; }
    .bee-module-header { align-items: flex-start; padding-bottom: .8rem; }
    .bee-module-header h2 { font-size: 1.65rem; }
    .bee-quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bee-quick-actions a:last-child { grid-column: 1 / -1; }
    .bee-command-center-heading { padding: .52rem .7rem; }
    .bee-cockpit { grid-template-columns: 1fr 1fr; }
    .bee-cockpit-weather,
    .bee-cockpit-conditions { border-bottom: 1px solid var(--line-soft); border-right: 0; min-height: 6.15rem; padding: .7rem; }
    .bee-cockpit-weather { border-right: 1px solid var(--line-soft); }
    .bee-cockpit .bee-health-ring { grid-column: 1 / -1; margin: .55rem auto; min-height: 5rem; min-width: 5rem; }
    .bee-cockpit-status { padding: .55rem .7rem; }
    .bee-cockpit-status > a { font-size: .68rem; padding: .3rem .6rem; }
    .bee-command-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .bee-command-metric { min-height: 5.55rem; padding: .55rem; }
    .bee-command-metric:nth-child(4) { border-left: 0; }
    .bee-command-metric:nth-child(n + 4) { border-top: 1px solid var(--line-soft); }
    .bee-command-metric strong { font-size: 1.15rem; }
    .bee-command-metric small { display: none; }
    .bee-apiary-glance { margin-inline: 0; padding: .7rem; }
    .bee-hive-glance-strip { grid-auto-columns: minmax(8.2rem, 42vw); }
    .bee-hive-glance-card { min-height: 14.8rem; }
    .bee-hive-glance-heading { align-items: center; flex-direction: row; }
    .bee-insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bee-insight-card { min-height: 7rem; padding: .65rem; }
    .bee-insight-card strong { font-size: 1.1rem; }
    .bee-insight-card p { display: none; }
    .hive-stack-graphic { grid-template-columns: 5.8rem minmax(0, 1fr); }
}

/* Refinement pass: make the overview read as one instrument panel. */
.bee-command-center { box-shadow: 0 10px 28px rgba(24, 24, 23, .06); }
.bee-command-center-heading { padding-block: .45rem; }
.bee-command-center-heading h3 { font-size: .78rem; letter-spacing: .045em; text-transform: uppercase; }

.bee-cockpit {
    grid-template-areas:
        "weather conditions health"
        "status status health";
    grid-template-columns: minmax(8.5rem, .85fr) minmax(0, 1.35fr) 7.15rem;
}
.bee-cockpit-weather { grid-area: weather; min-height: 5.8rem; padding: .7rem .85rem; }
.bee-cockpit-conditions { grid-area: conditions; min-height: 5.8rem; padding: .7rem .85rem; }
.bee-cockpit .bee-health-ring {
    grid-area: health;
    margin: auto;
    min-height: 5.15rem;
    min-width: 5.15rem;
}
.bee-cockpit .bee-health-ring strong { font-size: 1.45rem; }
.bee-cockpit-status {
    border-top: 1px solid var(--line-soft);
    grid-area: status;
    grid-column: auto;
    padding: .55rem .85rem .65rem;
}
.bee-cockpit-status .bee-status-icon { height: 1.55rem; width: 1.55rem; }
.bee-cockpit-status > a { min-height: 1.85rem; }

.bee-command-metric {
    align-content: start;
    min-height: 5.2rem;
    padding: .5rem .7rem .45rem;
}
.bee-command-metric strong { font-size: clamp(1.1rem, 2.5vw, 1.4rem); line-height: 1.08; }
.bee-command-metric span { font-size: .6rem; }
.bee-command-metric small { font-size: .63rem; line-height: 1.1; }
.bee-command-metric::after { bottom: .38rem; left: .7rem; right: .7rem; }

.bee-kpi-mark {
    align-items: center;
    color: var(--steel);
    display: inline-flex;
    font-size: 0;
    height: 1rem;
    justify-content: center;
    margin-bottom: .16rem;
    position: relative;
    width: 1.15rem;
}
.bee-kpi-mark::before,
.bee-kpi-mark::after { content: ""; display: block; position: absolute; }
.metric-active .bee-kpi-mark::before { background: var(--pollen); border: 1px solid #8D6B18; border-radius: 45% 45% 35% 35%; height: .58rem; width: .68rem; }
.metric-active .bee-kpi-mark::after { border-bottom: 2px solid #6C5A25; border-top: 2px solid #6C5A25; height: .16rem; width: .8rem; }
.metric-attention .bee-kpi-mark::before { border: 2px solid currentColor; border-radius: 45% 45% 50% 50%; height: .68rem; transform: rotate(45deg); width: .68rem; }
.metric-attention .bee-kpi-mark::after { background: currentColor; border-radius: 50%; height: .13rem; top: .68rem; width: .13rem; }
.metric-harvest .bee-kpi-mark::before { background: linear-gradient(to bottom, transparent 0 19%, #F0C857 20% 78%, transparent 79%); border: 1px solid #92711B; border-radius: 2px 2px 4px 4px; height: .75rem; width: .56rem; }
.metric-harvest .bee-kpi-mark::after { border: 1px solid #92711B; border-bottom: 0; border-radius: 4px 4px 0 0; height: .16rem; top: .04rem; width: .34rem; }
.metric-labor .bee-kpi-mark::before { border: 2px solid currentColor; border-radius: 50%; height: .72rem; width: .72rem; }
.metric-labor .bee-kpi-mark::after { border-left: 1px solid currentColor; border-top: 1px solid currentColor; height: .24rem; left: .57rem; top: .31rem; width: .18rem; }
.metric-money .bee-kpi-mark::before { border: 2px solid var(--green); border-radius: 50%; height: .7rem; width: .7rem; }
.metric-money .bee-kpi-mark::after { color: var(--green); content: "$"; font-size: .58rem; font-weight: 950; }

.bee-hive-glance { gap: .6rem; }
.bee-apiary-glance { border-radius: 10px; gap: .55rem; padding: .7rem; }
.bee-hive-glance-strip { gap: .45rem; padding-bottom: .3rem; }
.bee-hive-glance-card { gap: .2rem; min-height: 14.5rem; padding: .42rem; }
.langstroth-hive { min-height: 7.35rem; padding-top: .1rem; }
.langstroth-cover {
    box-shadow: 3px 3px 0 rgba(27, 28, 25, .22);
    height: .78rem;
    transform: perspective(120px) rotateX(12deg);
    width: 5.05rem;
}
.langstroth-inner-cover { box-shadow: 2px 2px 0 rgba(27, 28, 25, .16); width: 4.36rem; }
.langstroth-box {
    box-shadow: 3px 2px 0 rgba(72, 69, 59, .16), inset 0 -3px 0 rgba(58, 57, 52, .09);
    transform: perspective(120px) rotateX(2deg);
    width: 4.08rem;
}
.langstroth-box.deep { min-height: 1.07rem; }
.langstroth-feeder,
.langstroth-excluder,
.langstroth-entrance { transform: perspective(120px) rotateX(2deg); }
.langstroth-bottom-board { box-shadow: 3px 2px 0 rgba(24, 24, 23, .18); width: 4.68rem; }
.hive-glance-name { font-size: .74rem; }
.hive-glance-state { font-size: .6rem; }
.hive-glance-facts { gap: .1rem; }
.bee-hive-glance-card small { display: none; }

.bee-hive-card { gap: .55rem; padding: .72rem; }
.bee-hive-heading { align-items: center; }
.bee-hive-heading strong { font-size: 1rem; }
.bee-hive-heading span { font-size: .76rem; }
.bee-hive-visual { gap: .55rem; grid-template-columns: minmax(7.4rem, .72fr) minmax(0, 1.28fr); }
.hive-stack-graphic { border-radius: 8px; min-height: 7.2rem; padding: .45rem; }
.hive-detail-hive { min-height: 6rem; transform: scale(.94); }
.hive-stack-caption { font-size: .7rem; line-height: 1.15; }
.bee-last-check { font-size: .77rem; line-height: 1.25; }
.bee-observation-list { gap: .3rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bee-observation-list div { border-left-width: 3px; padding: .34rem .4rem; }
.bee-observation-list dt { font-size: .58rem; }
.bee-observation-list dd { font-size: .78rem; }
.hive-accessory-list { gap: .25rem; }
.hive-accessory-list li { font-size: .66rem; padding: .25rem .4rem; }
.bee-hive-performance { gap: .3rem; }
.bee-hive-metric { padding: .34rem .4rem; }
.bee-hive-metric > span { font-size: .58rem; }
.bee-hive-metric > strong { font-size: .88rem; }
.bee-hive-card nav { gap: .32rem; padding-top: .5rem; }
.bee-hive-card nav > a,
.hive-card-more > summary { min-height: 2.15rem; }

@media (max-width: 720px) {
    .bee-cockpit {
        grid-template-areas:
            "weather conditions"
            "status status"
            "health health";
        grid-template-columns: 1fr 1fr;
    }
    .bee-cockpit-weather,
    .bee-cockpit-conditions { min-height: 5.1rem; }
    .bee-cockpit .bee-health-ring { margin: .45rem auto .6rem; }
    .bee-command-metric { min-height: 4.75rem; padding: .42rem .5rem; }
    .bee-command-metric small { display: none; }
    .bee-command-metric.metric-money small { display: block; }
    .bee-hive-glance-strip { grid-auto-columns: minmax(8.6rem, 46vw); }
    .bee-hive-glance-card { min-height: 14.8rem; }
    .langstroth-hive { min-height: 7.5rem; }
    .bee-hive-visual { grid-template-columns: minmax(7rem, .65fr) minmax(0, 1.35fr); }
}

/* Keep the operation count readable inside the compact overview ring. */
.bee-cockpit .bee-health-ring {
    aspect-ratio: 1;
    box-sizing: border-box;
    overflow: hidden;
    padding: .34rem;
}
.bee-cockpit .bee-health-ring span {
    font-size: .48rem;
    letter-spacing: .04em;
    line-height: 1;
    max-width: 3.35rem;
    overflow-wrap: normal;
}

/* The build caption gets its own stable column beside the hive drawing. */
.hive-stack-caption {
    align-content: center;
    color: var(--ink);
    display: grid;
    font-size: .78rem;
    font-weight: 900;
    gap: .08rem;
    justify-self: stretch;
    line-height: 1.1;
    min-width: 0;
    text-align: left;
}
.hive-stack-caption strong,
.hive-stack-caption > span { display: block; overflow-wrap: anywhere; }
.hive-stack-caption > span { color: var(--muted); font-size: .68rem; font-weight: 800; }
.hive-build-stack { grid-template-columns: minmax(8rem, 1fr); justify-items: center; }
.hive-build-stack .hive-build-hive { min-height: 8.4rem; transform: scale(1.05); transform-origin: center bottom; }
.hive-build-stack .hive-stack-caption { justify-self: center; text-align: center; }

/* Mobile hive cards need one stable visual row: never compress a build label into a character column. */
.bee-hive-card .hive-stack-caption strong,
.bee-hive-card .hive-stack-caption > span {
    overflow-wrap: normal;
    white-space: nowrap;
}

/* Treat build drawing and caption as one centered unit inside each hive card. */
.bee-hive-card .hive-stack-graphic { align-content: center; grid-template-rows: minmax(5.5rem, 1fr) auto; justify-items: center; }
.bee-hive-card .hive-detail-hive { align-self: center; justify-self: center; }
.bee-hive-card .hive-stack-caption { justify-self: center; text-align: center; width: 100%; }

/* Bees dashboard cockpit: dense at-a-glance operation status, not stacked report cards. */
.bees-dashboard .bee-module-header {
    align-items: center;
    padding-bottom: .7rem;
}
.bees-dashboard .bee-module-header h2 { font-size: clamp(1.5rem, 4vw, 2.05rem); }
.bees-dashboard .bee-quick-actions { gap: .4rem; }
.bees-dashboard .bee-quick-actions a { min-height: 2.3rem; padding-inline: .65rem; }

.bee-command-center {
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(24, 24, 23, .06);
    gap: 0;
}
.bee-command-center-heading {
    background: var(--card);
    border-bottom: 1px solid var(--line-soft);
    color: var(--muted);
    padding: .62rem .85rem .48rem;
}
.bee-command-center-heading .eyebrow { color: var(--muted); font-size: .62rem; letter-spacing: .06em; }
.bee-command-center-heading > span { color: var(--muted); font-size: .64rem; font-weight: 850; text-transform: uppercase; }

.bee-cockpit {
    grid-template-areas:
        "weather conditions health"
        "status status status";
    grid-template-columns: minmax(7.8rem, .85fr) minmax(0, 1.4fr) 6.8rem;
}
.bee-cockpit-weather,
.bee-cockpit-conditions { min-height: 6.2rem; padding: .7rem .85rem; }
.bee-cockpit-weather { grid-area: weather; }
.bee-cockpit-conditions { grid-area: conditions; }
.bee-cockpit-weather strong { font-size: clamp(1.35rem, 4vw, 1.85rem); }
.bee-cockpit-conditions .eyebrow { color: var(--muted); font-size: .58rem; letter-spacing: .05em; }
.bee-cockpit-conditions strong { font-size: .86rem; line-height: 1.15; }
.bee-cockpit-conditions > span:not(.eyebrow) { font-size: .68rem; line-height: 1.2; }
.bee-cockpit .bee-health-ring {
    grid-area: health;
    margin: auto;
    min-height: 5.35rem;
    min-width: 5.35rem;
    padding: .28rem;
}
.bee-cockpit .bee-health-ring::after { inset: .34rem; }
.bee-cockpit .bee-health-ring strong { font-size: 1.55rem; }
.bee-cockpit .bee-health-ring span { color: var(--muted); font-size: .49rem; max-width: 3.75rem; }
.bee-cockpit-status {
    background: linear-gradient(90deg, rgba(62, 100, 67, .075), transparent 58%);
    border-top: 1px solid var(--line-soft);
    gap: .5rem;
    grid-area: status;
    grid-column: auto;
    grid-template-columns: 1.8rem minmax(0, 1fr) auto;
    min-height: 3.6rem;
    padding: .5rem .85rem;
}
.bee-cockpit-status .bee-status-icon { box-shadow: none; font-size: .64rem; height: 1.6rem; width: 1.6rem; }
.bee-cockpit-status strong { color: var(--muted); font-size: .59rem; letter-spacing: .05em; text-transform: uppercase; }
.bee-cockpit-status div span { color: var(--ink); font-size: .8rem; font-weight: 850; }
.bee-cockpit-status > a { background: transparent; border: 1px solid var(--line); color: var(--ink) !important; min-height: 1.9rem; padding: .3rem .55rem; }

.bee-command-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.bee-command-metric { min-height: 5.25rem; padding: .52rem .58rem .44rem; }
.bee-command-metric strong { color: var(--ink); font-size: clamp(1rem, 3.1vw, 1.35rem); }
.bee-command-metric span { color: var(--muted); font-size: .57rem; letter-spacing: .01em; }
.bee-command-metric small { color: currentColor; font-size: .58rem; font-weight: 850; opacity: .82; }
.bee-command-metric::after { border-radius: 99px; bottom: .35rem; height: 2px; left: .58rem; right: .58rem; }

.bee-hive-glance { gap: .45rem; margin-top: .95rem; }
.bee-hive-glance-heading { border-top: 0; padding-top: 0; }
.bee-hive-glance-heading h3 { font-size: 1.03rem; }
.bee-apiary-glance { background: linear-gradient(145deg, #FFFDF8, #FBF8F0); border-radius: 14px; padding: .7rem; }
.bee-apiary-glance-heading { padding-inline: .1rem; }
.bee-hive-glance-strip { gap: .42rem; grid-auto-columns: minmax(8rem, 1fr); }
.bee-hive-glance-card { background: rgba(255, 253, 248, .8); border-radius: 10px; min-height: 14rem; padding: .4rem; }
.langstroth-hive { min-height: 7.05rem; }
.hive-glance-state { border-radius: 999px; justify-self: start; padding: .13rem .34rem; }
.bee-hive-glance-card.tone-current .hive-glance-state { background: rgba(62, 100, 67, .1); }
.bee-hive-glance-card.tone-due .hive-glance-state { background: rgba(232, 117, 53, .1); }
.bee-hive-glance-card.tone-attention .hive-glance-state { background: rgba(155, 48, 44, .1); }
.hive-glance-facts { min-height: 2.1rem; }

@media (max-width: 720px) {
    .bees-dashboard .bee-module-header { align-items: stretch; }
    .bees-dashboard .bee-quick-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
    .bees-dashboard .bee-quick-actions a { font-size: .74rem; min-width: 0; }
    .bee-cockpit { grid-template-columns: minmax(6.7rem, .82fr) minmax(0, 1.12fr) 5.55rem; }
    .bee-cockpit-weather,
    .bee-cockpit-conditions { min-height: 5.45rem; padding: .55rem; }
    .bee-weather-symbol { margin-right: .6rem; transform: scale(.82); transform-origin: center; }
    .bee-cockpit-conditions strong { font-size: .75rem; }
    .bee-cockpit-conditions > span:not(.eyebrow) { font-size: .62rem; }
    .bee-cockpit .bee-health-ring { min-height: 4.7rem; min-width: 4.7rem; }
    .bee-cockpit .bee-health-ring strong { font-size: 1.35rem; }
    .bee-cockpit-status { grid-template-columns: 1.55rem minmax(0, 1fr) auto; padding: .46rem .55rem; }
    .bee-cockpit-status > a { font-size: .62rem; padding-inline: .42rem; }
    .bee-command-metric { min-height: 4.7rem; padding: .42rem; }
    .bee-command-metric small { display: none; }
    .bee-command-metric.metric-money small,
    .bee-command-metric.metric-attention small { display: block; }
    .bee-kpi-mark { transform: scale(.88); transform-origin: left top; }
    .bee-hive-glance-strip { grid-auto-columns: minmax(4.9rem, 1fr); }
    .bee-hive-glance-card { min-height: 12.8rem; padding: .34rem; }
    .langstroth-hive { min-height: 6.2rem; transform: scale(.78); transform-origin: center bottom; }
    .hive-glance-name { font-size: .63rem; }
    .hive-glance-state { font-size: .51rem; padding: .1rem .22rem; }
    .hive-glance-facts { display: none; }
    .bee-apiary-glance-legend { gap: .25rem .45rem; }
    .bee-apiary-glance-legend span { font-size: .56rem; }
}

/* Optional module-card visual slot. Bees use it first; other domains can supply their own pulse later. */
.module-bee-pulse {
    align-items: center;
    background: linear-gradient(135deg, rgba(240, 203, 78, .16), rgba(255, 253, 248, .35));
    border: 1px solid var(--line-soft);
    border-radius: 7px;
    display: grid;
    gap: .55rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-width: 0;
    padding: .48rem .55rem;
}

.module-bee-pulse-summary,
.module-bee-pulse-state {
    display: grid;
    line-height: 1;
}

.module-bee-pulse-summary b {
    color: var(--ink);
    font-size: 1.35rem;
}

.module-bee-pulse-summary span,
.module-bee-pulse-state,
.module-bee-pulse-state span {
    color: var(--muted);
    font-size: .62rem;
    font-weight: 850;
    text-transform: uppercase;
}

.module-bee-pulse-state {
    gap: .15rem;
    justify-items: end;
    text-align: right;
    white-space: nowrap;
}

.module-bee-pulse-state b { color: var(--green); }
.module-bee-pulse-state span { color: var(--orange); }

.module-bee-pulse-hives {
    align-items: end;
    display: flex;
    gap: .28rem;
    justify-content: center;
    min-width: 0;
}

.module-bee-pulse-hive {
    align-items: center;
    border-bottom: 3px solid var(--green);
    display: grid;
    gap: 1px;
    grid-template-rows: repeat(3, .26rem);
    justify-items: center;
    padding: .16rem .12rem .18rem;
    position: relative;
    width: 1.35rem;
}

.module-bee-pulse-hive::before {
    border-bottom: .35rem solid var(--charcoal);
    border-left: .38rem solid transparent;
    border-right: .38rem solid transparent;
    content: "";
    height: 0;
    position: absolute;
    top: -.18rem;
    width: .62rem;
}

.module-bee-pulse-hive b {
    background: #fffdf8;
    border: 1px solid rgba(24, 24, 23, .32);
    display: block;
    height: 100%;
    width: 100%;
}

.module-bee-pulse-hive.status-due { border-bottom-color: var(--orange); }
.module-bee-pulse-hive.status-attention { border-bottom-color: var(--red); }
.module-bee-pulse-hive.status-due b { background: rgba(240, 203, 78, .72); }
.module-bee-pulse-hive.status-attention b { background: rgba(155, 48, 44, .3); }
.module-bee-pulse-hives em { color: var(--muted); font-size: .7rem; font-style: normal; font-weight: 900; }

.module-poultry-pulse {
    align-items: center;
    background: linear-gradient(135deg, rgba(79, 102, 130, .11), rgba(255, 253, 248, .35));
    border: 1px solid var(--line-soft);
    border-radius: 7px;
    display: grid;
    gap: .55rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-width: 0;
    padding: .48rem .55rem;
}
.module-poultry-pulse-summary,
.module-poultry-pulse-state { display: grid; line-height: 1; }
.module-poultry-pulse-summary b { color: var(--ink); font-size: 1.35rem; }
.module-poultry-pulse-summary span,
.module-poultry-pulse-state,
.module-poultry-pulse-state span { color: var(--muted); font-size: .62rem; font-weight: 850; text-transform: uppercase; }
.module-poultry-pulse-state { gap: .15rem; justify-items: end; text-align: right; white-space: nowrap; }
.module-poultry-pulse-state b { color: var(--steel); }
.module-poultry-pulse-state span { color: var(--orange); }
.module-poultry-pulse-flocks { align-items: end; display: flex; gap: .32rem; justify-content: center; min-width: 0; }
.module-poultry-pulse-flock { background: var(--card); border: 2px solid var(--green); border-radius: 50% 50% 46% 46%; display: block; height: 1.18rem; position: relative; width: .88rem; }
.module-poultry-pulse-flock::after { background: var(--green); border-radius: 50%; content: ""; height: .2rem; position: absolute; right: -.12rem; top: .16rem; width: .2rem; }
.module-poultry-pulse-flock.status-due { border-color: var(--orange); }
.module-poultry-pulse-flock.status-due::after { background: var(--orange); }
.module-poultry-pulse-flock.status-attention { border-color: var(--red); }
.module-poultry-pulse-flock.status-attention::after { background: var(--red); }

/* Trees & Orchard: restrained seasonal visual used in the module and home tile. */
.module-tree-pulse { align-items: center; background: linear-gradient(135deg, #f5f0df, #fffdf8); border: 1px solid var(--line-soft); border-radius: 8px; display: grid; gap: .5rem; grid-template-columns: 2.6rem auto minmax(0, 1fr); padding: .45rem .55rem; }
.module-tree-pulse-art, .tree-command-art, .tree-card-visual { position: relative; }
.module-tree-pulse-art { height: 2.45rem; width: 2.35rem; }
.module-tree-pulse-art i, .tree-command-art i, .tree-card-visual i { background: #4c7d4d; border-radius: 55% 45% 48% 52%; box-shadow: .55rem .15rem 0 #669763, -.45rem .25rem 0 #6d9d62; display: block; height: 1.15rem; left: .55rem; position: absolute; top: .15rem; width: 1.25rem; }
.module-tree-pulse-art b, .tree-command-art b, .tree-card-visual b { background: #7b5233; border-radius: 2px; bottom: .3rem; display: block; height: 1.25rem; left: 1.05rem; position: absolute; width: .3rem; }
.module-tree-pulse-art em, .tree-command-art em, .tree-card-visual em { background: #a97b4a; border-radius: 50%; bottom: .08rem; display: block; height: .35rem; left: .35rem; position: absolute; width: 1.8rem; }
.module-tree-pulse-summary { display: grid; gap: .04rem; line-height: 1; }
.module-tree-pulse-summary b { font-size: 1.35rem; }.module-tree-pulse-summary span, .module-tree-pulse-state span { color: var(--muted); font-size: .62rem; font-weight: 850; text-transform: uppercase; }
.module-tree-pulse-state { display: grid; gap: .1rem; justify-items: end; min-width: 0; text-align: right; }.module-tree-pulse-state b { color: var(--green); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Trees & Orchard module. The visual moves only as a quiet sign of a living record. */
.tree-module-page { margin-inline: auto; max-width: 1120px; padding: 1.15rem clamp(.9rem, 3vw, 2rem) 2rem; }
.tree-module-header, .tree-detail-hero { align-items: end; display: flex; gap: 1rem; justify-content: space-between; margin-bottom: 1rem; }.tree-module-header > div:first-child { min-width: 0; }.tree-module-header h2, .tree-detail-hero h2 { margin: .1rem 0 .3rem; }.tree-module-header p:last-child { color: var(--muted); margin: 0; max-width: 42rem; }
.tree-module-actions { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: flex-end; }.tree-module-actions .button-link { min-height: 2.4rem; text-align: center; }
.tree-getting-started { align-items: start; background: var(--card); border: 1px solid var(--line-soft); border-left: 4px solid #5c8a54; border-radius: 8px; display: grid; gap: 1rem; grid-template-columns: minmax(0, .9fr) minmax(15rem, 1.1fr); margin-bottom: 1.35rem; padding: .9rem 1rem; }.tree-getting-started p, .tree-getting-started h3 { margin: 0; }.tree-getting-started h3 { font-size: 1.2rem; margin: .1rem 0 .25rem; }.tree-getting-started div > p:last-child { color: var(--muted); font-size: .82rem; line-height: 1.4; }.tree-getting-started ol { display: grid; gap: .3rem; list-style: none; margin: 0; padding: 0; }.tree-getting-started li { align-items: center; display: grid; gap: .55rem; grid-template-columns: 1.45rem minmax(0, 1fr); min-height: 2rem; }.tree-getting-started li > span { align-items: center; background: #f5f0df; border: 1px solid var(--line-soft); border-radius: 50%; display: inline-flex; font-size: .72rem; font-weight: 900; height: 1.45rem; justify-content: center; width: 1.45rem; }.tree-getting-started li.is-complete > span { background: var(--green); border-color: var(--green); color: #fff; }.tree-getting-started a { color: var(--ink); font-size: .86rem; font-weight: 850; text-decoration: none; }.tree-getting-started a:hover, .tree-getting-started a:focus-visible { color: var(--green); text-decoration: underline; }
.tree-command { align-items: center; background: var(--card); border: 1px solid var(--line-soft); border-top: 3px solid #5c8a54; border-radius: 8px; display: grid; gap: .7rem; grid-template-columns: 4.3rem minmax(6rem, .75fr) minmax(10rem, 1.4fr) minmax(6rem, .65fr); margin-bottom: 1.35rem; overflow: hidden; padding: .65rem .8rem; }.tree-command > div:not(.tree-command-art) { display: grid; gap: .12rem; min-width: 0; }.tree-command strong { font-size: 1.8rem; line-height: 1; }.tree-command span:not(.eyebrow) { color: var(--muted); font-size: .72rem; font-weight: 800; }.tree-command-status { border-left: 1px solid var(--line-soft); padding-left: .8rem; }.tree-command-status b { color: var(--green); }.tree-command-status.is-due b { color: var(--orange); }.tree-command-harvest { border-left: 1px solid var(--line-soft); padding-left: .8rem; }.tree-command-harvest b { color: #9b6d20; font-size: 1.1rem; }
.tree-command-art { height: 3.35rem; width: 3.5rem; }.tree-command-art i { animation: tree-canopy 4s ease-in-out infinite; height: 1.75rem; left: .85rem; top: .35rem; width: 1.8rem; }.tree-command-art b { bottom: .35rem; height: 1.75rem; left: 1.62rem; width: .38rem; }.tree-command-art em { bottom: .1rem; left: .35rem; width: 2.8rem; }
.tree-section { margin-top: 1.5rem; }.tree-section-heading { align-items: end; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; margin-bottom: .7rem; padding-bottom: .6rem; }.tree-section-heading p, .tree-section-heading h3 { margin: 0; }.tree-section-heading h3 { font-size: 1.25rem; }
.tree-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }.tree-card { background: var(--card); border: 1px solid var(--line-soft); border-left: 4px solid var(--green); border-radius: 8px; overflow: hidden; }.tree-card.status-due { border-left-color: var(--orange); }.tree-card.status-attention { border-left-color: var(--red); }.tree-card-main { align-items: center; color: var(--ink); display: grid; gap: .7rem; grid-template-columns: 4.3rem minmax(0, 1fr) auto; padding: .72rem .75rem .55rem; text-decoration: none; }.tree-card-main:hover { background: #fffdf8; }.tree-card-visual { background: #f6f1df; border-radius: 50%; height: 4rem; overflow: hidden; width: 4rem; }.tree-card-visual i { height: 1.5rem; left: 1.25rem; top: .62rem; width: 1.62rem; }.tree-card-visual b { bottom: .65rem; height: 1.75rem; left: 1.87rem; }.tree-card-visual em { bottom: .43rem; left: .55rem; width: 2.9rem; }.tree-kind-nut i { background: #527c54; box-shadow: .55rem .2rem 0 #71925f, -.45rem .18rem 0 #789c66; }.tree-kind-nut::after { background: #a17745; border-radius: 50%; content: ''; height: .45rem; left: 2.35rem; position: absolute; top: 2.12rem; width: .45rem; }.tree-kind-woodland i { background: #466f48; box-shadow: .6rem .2rem 0 #5f8857, -.55rem .2rem 0 #66945c; height: 1.85rem; top: .38rem; }.tree-card-copy { min-width: 0; }.tree-kind { color: var(--muted); display: block; font-size: .62rem; font-weight: 850; text-transform: uppercase; }.tree-card h4 { font-size: 1.08rem; margin: .08rem 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.tree-card p, .tree-meta { color: var(--muted); display: block; font-size: .76rem; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.tree-card-arrow { color: var(--orange); font-size: 1.65rem; }.tree-card-foot { align-items: center; border-top: 1px solid var(--line-soft); color: var(--muted); display: flex; font-size: .7rem; font-weight: 800; gap: .5rem; justify-content: space-between; padding: .48rem .75rem; }.tree-site-list { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }.tree-site-list > div { background: var(--card); border: 1px solid var(--line-soft); border-radius: 8px; display: grid; gap: .12rem; padding: .7rem .8rem; }.tree-site-list span { color: var(--muted); font-size: .76rem; }.tree-site-list b { color: var(--green); font-size: .76rem; }
.tree-detail-hero { align-items: center; background: var(--card); border: 1px solid var(--line-soft); border-top: 3px solid #5c8a54; border-radius: 8px; padding: .9rem; }.tree-detail-hero > .tree-card-visual { flex: 0 0 auto; height: 5.3rem; width: 5.3rem; }.tree-detail-hero > .tree-card-visual i { left: 1.7rem; top: .9rem; }.tree-detail-hero > .tree-card-visual b { left: 2.55rem; }.tree-detail-grid { display: grid; gap: .8rem; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1rem; }.tree-detail-grid article { background: var(--card); border: 1px solid var(--line-soft); border-radius: 8px; padding: .8rem; }.tree-detail-grid .eyebrow { margin: 0 0 .5rem; }.tree-detail-grid dl { display: grid; gap: .35rem; grid-template-columns: auto 1fr; margin: 0; }.tree-detail-grid dt { color: var(--muted); font-size: .75rem; }.tree-detail-grid dd { margin: 0; }.tree-detail-row { border-top: 1px solid var(--line-soft); display: grid; gap: .12rem; padding: .45rem 0; }.tree-detail-row span { color: var(--muted); font-size: .75rem; }
@keyframes tree-canopy { 0%, 100% { transform: rotate(-2deg) translateY(0); } 50% { transform: rotate(2deg) translateY(-1px); } } @media (prefers-reduced-motion: reduce) { .tree-command-art i { animation: none; } }
@media (max-width: 680px) { .tree-module-header, .tree-detail-hero { align-items: stretch; flex-direction: column; }.tree-module-actions { justify-content: stretch; }.tree-module-actions .button-link { flex: 1 1 9rem; }.tree-getting-started { grid-template-columns: 1fr; }.tree-command { grid-template-columns: 3.5rem minmax(0, 1fr); }.tree-command-status, .tree-command-harvest { border-left: 0; border-top: 1px solid var(--line-soft); grid-column: 1 / -1; padding: .5rem 0 0; }.tree-command-art { transform: scale(.86); transform-origin: center; }.tree-detail-grid { grid-template-columns: 1fr; } }
.module-poultry-pulse-flocks em { color: var(--muted); font-size: .7rem; font-style: normal; font-weight: 900; }

/* Livestock uses the shared pulse pattern with herd markers rather than animal clip art. */
.module-livestock-pulse { align-items: center; background: linear-gradient(135deg, rgba(62, 100, 67, .13), rgba(255, 253, 248, .35)); border: 1px solid var(--line-soft); border-radius: 7px; display: grid; gap: .55rem; grid-template-columns: auto minmax(0, 1fr) auto; min-width: 0; padding: .48rem .55rem; }
.module-livestock-pulse-summary, .module-livestock-pulse-state { display: grid; line-height: 1; }
.module-livestock-pulse-summary b { color: var(--ink); font-size: 1.35rem; }
.module-livestock-pulse-summary span, .module-livestock-pulse-state, .module-livestock-pulse-state span { color: var(--muted); font-size: .62rem; font-weight: 850; text-transform: uppercase; }
.module-livestock-pulse-state { gap: .15rem; justify-items: end; text-align: right; white-space: nowrap; }
.module-livestock-pulse-state b { color: var(--green); }
.module-livestock-pulse-state span { color: var(--orange); }
.module-livestock-pulse-groups { align-items: end; display: flex; gap: .32rem; justify-content: center; min-width: 0; }
.module-livestock-pulse-group { border: 2px solid var(--green); border-radius: 50% 50% 38% 38%; display: block; height: 1.15rem; position: relative; width: 1rem; }
.module-livestock-pulse-group::before { border: 2px solid currentColor; border-bottom: 0; border-radius: 50% 50% 0 0; color: var(--green); content: ""; height: .38rem; left: .15rem; position: absolute; top: -.35rem; width: .64rem; }
.module-livestock-pulse-group b { background: var(--green); border-radius: 50%; height: .2rem; position: absolute; right: .16rem; top: .28rem; width: .2rem; }
.module-livestock-pulse-group.status-due { border-color: var(--orange); }
.module-livestock-pulse-group.status-due::before { color: var(--orange); }
.module-livestock-pulse-group.status-due b { background: var(--orange); }
.module-livestock-pulse-group.status-attention { border-color: var(--red); }
.module-livestock-pulse-group.status-attention::before { color: var(--red); }
.module-livestock-pulse-group.status-attention b { background: var(--red); }
.module-livestock-pulse-groups em { color: var(--muted); font-size: .7rem; font-style: normal; font-weight: 900; }

.module-crop-pulse { align-items: center; background: linear-gradient(135deg, rgba(62, 100, 67, .12), rgba(255, 253, 248, .35)); border: 1px solid var(--line-soft); border-radius: 7px; display: grid; gap: .55rem; grid-template-columns: 2.15rem minmax(0, 1fr) auto; min-width: 0; padding: .48rem .55rem; }
.module-crop-pulse-rows { align-content: center; display: grid; gap: .18rem; }
.module-crop-pulse-rows i { border-top: 3px solid var(--green); display: block; transform: skewX(-24deg); width: 1.55rem; }
.module-crop-pulse-rows i:nth-child(2) { opacity: .76; width: 1.2rem; }
.module-crop-pulse-rows i:nth-child(3) { opacity: .48; width: .85rem; }
.module-crop-pulse-values { display: flex; flex-wrap: wrap; gap: .18rem .5rem; }
.module-crop-pulse-values span,
.module-crop-pulse-stock { color: var(--muted); font-size: .64rem; font-weight: 850; text-transform: uppercase; }
.module-crop-pulse-values b,
.module-crop-pulse-stock b { color: var(--ink); font-size: .86rem; }
.module-crop-pulse-values .has-harvest b { color: var(--green); }
.module-crop-pulse-values .has-stage b { color: var(--green); }
.module-crop-pulse-stock { display: grid; justify-items: end; text-align: right; white-space: nowrap; }

/* Crop operations is a seasonal workspace, not an expanded record export. */
.crop-dashboard-header { align-items: end; border-bottom: 1px solid var(--line-soft); display: flex; gap: 1rem; justify-content: space-between; margin: 0 0 .8rem; padding: 0 0 .9rem; }
.crop-dashboard-header h2 { margin: .12rem 0; }
.crop-dashboard-header p:last-child { color: var(--muted); margin: 0; }
.crop-quick-actions { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: flex-end; }
.crop-quick-actions a { align-items: center; background: var(--field); border: 1px solid var(--line-soft); border-radius: 6px; color: var(--ink); display: inline-flex; font-weight: 850; justify-content: center; min-height: 2.55rem; padding: .45rem .7rem; text-decoration: none; }
.crop-quick-actions .button-link { background: var(--charcoal); color: #FFFDF8; }
.crop-view-nav { border-bottom: 1px solid var(--line-soft); display: flex; gap: .2rem; margin: 0 0 1rem; overflow-x: auto; padding: 0 0 .55rem; scrollbar-width: thin; }
.crop-view-nav a { border-radius: 999px; color: var(--muted); flex: 0 0 auto; font-size: .78rem; font-weight: 900; padding: .42rem .7rem; text-decoration: none; }
.crop-view-nav a[aria-current="page"] { background: var(--charcoal); color: #FFFDF8; }

.crop-operations { background: var(--card); border: 1px solid var(--line-soft); border-top: 3px solid var(--green); border-radius: 10px; box-shadow: 0 8px 24px rgba(24, 24, 23, .045); margin: 0 0 1.1rem; overflow: hidden; }
.crop-operations > header { align-items: baseline; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; padding: .62rem .85rem; }
.crop-operations > header p { margin: 0; }
.crop-operations > header h3 { font-size: 1rem; margin: .08rem 0 0; }
.crop-inline-action {
    align-items: center;
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    color: var(--ink) !important;
    display: inline-flex;
    font-size: .76rem;
    font-weight: 900;
    justify-content: center;
    min-height: 2rem;
    padding: .35rem .58rem;
    text-decoration: none;
    white-space: nowrap;
}
.crop-operations-main { display: grid; grid-template-columns: minmax(9rem, .92fr) minmax(0, 1.45fr) minmax(7.35rem, .72fr); }
.crop-weather-read, .crop-season-read, .crop-care-read { align-content: center; display: grid; gap: .14rem; min-height: 6.7rem; padding: .72rem .85rem; }
.crop-weather-read, .crop-season-read { border-right: 1px solid var(--line-soft); }
.crop-weather-read { grid-template-columns: 2rem minmax(0, 1fr); }
.crop-weather-mark { background: #F3C44D; border-radius: 50%; box-shadow: 0 0 0 5px rgba(243, 196, 77, .16); grid-row: 1 / span 3; height: 1.28rem; margin: .28rem .55rem .2rem .15rem; position: relative; width: 1.28rem; }
.crop-weather-mark::after { background: #FFFDF8; border: 2px solid #D7D1C5; border-radius: 999px; content: ""; height: .62rem; left: .48rem; position: absolute; top: .52rem; width: 1.05rem; }
.crop-weather-read strong { font-size: 1.55rem; line-height: 1; }
.crop-weather-read > span:not(.crop-weather-mark), .crop-weather-read small { grid-column: 2; }
.crop-weather-read > span:not(.crop-weather-mark), .crop-weather-read small, .crop-season-read > span:not(.eyebrow), .crop-care-read span, .crop-care-read small { color: var(--muted); font-size: .7rem; }
.crop-season-read { min-width: 0; }
.crop-season-read strong { font-size: .96rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crop-stage-distribution { display: flex; flex-wrap: wrap; gap: .24rem .45rem; }
.crop-stage-distribution span { color: var(--muted); font-size: .65rem; white-space: nowrap; }
.crop-stage-distribution b { color: var(--green); }
.crop-care-read { justify-items: center; text-align: center; }
.crop-care-read strong { color: var(--green); font-size: 1.7rem; line-height: 1; }
.crop-care-read.tone-due strong, .crop-care-read.tone-due small { color: var(--orange); }
.crop-care-read span { font-weight: 900; text-transform: uppercase; }
.crop-care-read small { font-weight: 800; }
.crop-priority { align-items: center; border-top: 1px solid var(--line-soft); color: var(--ink); display: grid; gap: .65rem; grid-template-columns: 1.7rem minmax(0, 1fr) auto; padding: .6rem .85rem; text-decoration: none; }
.crop-priority i { align-items: center; background: var(--orange); border-radius: 50%; color: #FFFDF8; display: inline-flex; font-style: normal; font-weight: 900; height: 1.45rem; justify-content: center; width: 1.45rem; }
.crop-priority span { display: grid; min-width: 0; }
.crop-priority small { color: var(--muted); font-size: .62rem; font-weight: 900; text-transform: uppercase; }
.crop-priority strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crop-priority b { color: var(--steel); font-size: .75rem; white-space: nowrap; }
.crop-priority b em { color: var(--orange); font-size: 1.2rem; font-style: normal; }
.crop-metric-rail { border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: repeat(auto-fit, minmax(7.3rem, 1fr)); }
.crop-metric { display: grid; gap: .08rem; min-height: 4.6rem; padding: .55rem .7rem; position: relative; }
.crop-metric + .crop-metric { border-left: 1px solid var(--line-soft); }
.crop-metric i { color: var(--orange); font-size: .78rem; font-style: normal; }
.crop-metric strong { font-size: 1.08rem; line-height: 1.1; }
.crop-metric span, .crop-metric small { color: var(--muted); font-size: .62rem; font-weight: 850; text-transform: uppercase; }
.crop-metric small { color: var(--muted); font-size: .61rem; font-weight: 700; text-transform: none; }
.crop-metric.tone-due strong { color: var(--orange); }

.crop-planting-glance { display: grid; gap: .72rem; margin: 1.15rem 0; }
.crop-planting-glance .section-heading { align-items: end; margin: 0; }
.crop-planting-glance .section-heading p { margin: 0; }
.crop-planting-glance .section-heading h3 { margin: .1rem 0 0; }
.crop-planting-grid { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.crop-planting-card { background: var(--card); border: 1px solid var(--line-soft); border-bottom: 4px solid var(--steel); border-radius: 9px; display: grid; gap: .5rem; min-width: 0; padding: .75rem; }
.crop-planting-card.status-current { border-bottom-color: var(--green); }
.crop-planting-card.status-due { border-bottom-color: var(--orange); }
.crop-planting-card-topline { align-items: center; display: flex; gap: .4rem; justify-content: space-between; }
.crop-planting-card-topline span { color: var(--muted); font-size: .7rem; font-weight: 850; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crop-planting-card-topline b { background: var(--field); border-radius: 999px; color: var(--green); font-size: .64rem; padding: .25rem .45rem; white-space: nowrap; }
.crop-stage-visual { align-items: center; display: flex; gap: .22rem; min-height: .85rem; }
.crop-stage-visual i { background: var(--line-soft); border-radius: 999px; flex: 1 1 auto; height: .32rem; position: relative; }
.crop-stage-visual i.complete { background: var(--green); }
.crop-stage-visual i.current { background: var(--pollen); box-shadow: 0 0 0 3px rgba(243, 196, 77, .18); }
.crop-stage-visual i.current::after { background: var(--orange); border-radius: 50%; content: ""; height: .52rem; position: absolute; right: -.08rem; top: -.1rem; width: .52rem; }
.crop-planting-card h4 { display: grid; font-size: 1.16rem; gap: .04rem; margin: 0; }
.crop-planting-card h4 span { color: var(--muted); font-size: .78rem; font-weight: 700; }
.crop-planting-source, .crop-last-read { color: var(--muted); font-size: .77rem; margin: 0; }
.crop-planting-source small { color: var(--steel); font-size: .65rem; font-weight: 900; text-transform: uppercase; }
.crop-planting-card-meta { align-items: center; display: flex; gap: .45rem; justify-content: space-between; }
.crop-planting-card-meta > span:last-child { color: var(--muted); font-size: .72rem; font-weight: 850; }
.crop-planting-card nav { border-top: 1px solid var(--line-soft); display: flex; gap: .45rem; margin-top: auto; padding-top: .55rem; }
.crop-planting-card nav a { align-items: center; background: var(--field); border: 1px solid var(--line-soft); border-radius: 6px; color: var(--ink); display: inline-flex; flex: 1 1 0; font-size: .75rem; font-weight: 900; justify-content: center; min-height: 2.3rem; padding: .35rem .45rem; text-align: center; text-decoration: none; }
.crop-planting-card nav a:first-child { background: var(--charcoal); color: #FFFDF8; }
.crop-season-detail-grid { display: grid; gap: .7rem; grid-template-columns: minmax(0, 1.35fr) minmax(13rem, .65fr); margin: 1rem 0; }
.crop-recent-activity, .crop-season-signal { background: var(--card); border: 1px solid var(--line-soft); border-radius: 8px; display: grid; overflow: hidden; }
.crop-recent-activity header { align-items: center; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; padding: .55rem .7rem; }
.crop-recent-activity header p, .crop-season-signal p { margin: 0; }
.crop-recent-activity header a:not(.crop-inline-action) { color: var(--steel); font-size: .74rem; font-weight: 900; text-decoration: none; }
.crop-recent-activity > a { align-items: center; color: var(--ink); display: grid; gap: .5rem; grid-template-columns: 4.6rem minmax(0, 1fr) auto; padding: .48rem .7rem; text-decoration: none; }
.crop-recent-activity > a + a { border-top: 1px solid var(--line-soft); }
.crop-recent-activity > a span, .crop-recent-activity > a small { color: var(--muted); font-size: .68rem; }
.crop-recent-activity > a strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crop-season-signal { align-content: start; gap: .3rem; padding: .7rem; }
.crop-season-signal strong { font-size: 1.15rem; }
.crop-season-signal span { color: var(--muted); font-size: .76rem; }
.crop-season-signal a { margin-top: .3rem; }
.merge-area-summary { background: var(--field); border: 1px solid var(--line-soft); border-radius: 8px; display: grid; gap: .28rem; margin: 0 0 1rem; padding: .75rem; }
.merge-area-summary strong { font-size: 1.05rem; }
.merge-area-summary span, .merge-area-summary p { color: var(--muted); font-size: .84rem; margin: 0; }

.crop-dashboard-tools { background: var(--card); border: 1px solid var(--line-soft); border-radius: 8px; margin: 1.1rem 0; }
.crop-dashboard-tools > summary, .crop-filter-drawer > summary { cursor: pointer; font-weight: 900; list-style: none; padding: .7rem .8rem; }
.crop-dashboard-tools > summary::-webkit-details-marker, .crop-filter-drawer > summary::-webkit-details-marker { display: none; }
.crop-dashboard-tools > summary::after, .crop-filter-drawer > summary::after { color: var(--orange); content: "+"; float: right; font-size: 1.1rem; }
.crop-dashboard-tools[open] > summary::after, .crop-filter-drawer[open] > summary::after { content: "−"; }
.crop-dashboard-tools > div { border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; gap: .42rem; padding: .7rem .8rem; }
.crop-dashboard-tools a { background: var(--field); border: 1px solid var(--line-soft); border-radius: 999px; color: var(--ink); font-size: .72rem; font-weight: 850; padding: .36rem .55rem; text-decoration: none; }

.crop-records-view { display: grid; gap: .85rem; }
.crop-records-heading { align-items: end; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; padding: .1rem 0 .75rem; }
.crop-records-heading p { margin: 0; }
.crop-records-heading h3 { margin: .1rem 0 0; }
.crop-records-heading .button-link { background: var(--charcoal); border-radius: 6px; color: #FFFDF8; font-weight: 900; padding: .55rem .72rem; text-decoration: none; }
.crop-filter-drawer { background: var(--card); border: 1px solid var(--line-soft); border-radius: 8px; }
.crop-filter-drawer .filters { border: 0; margin: 0; padding: .75rem; }
.crop-filter-drawer .filters h3 { display: none; }
.crop-filter-drawer .filters > div:last-child { align-items: center; display: flex; gap: .6rem; margin-top: .65rem; }
.crop-filter-drawer .filters button { min-height: 2.4rem; }
.crop-filter-drawer .filters a { color: var(--steel); font-weight: 900; }
.crop-filter-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.crop-filter-chips span { background: rgba(79, 102, 130, .1); border-radius: 999px; color: var(--steel); font-size: .72rem; font-weight: 850; padding: .32rem .52rem; }
.crop-record-list { display: grid; gap: .55rem; }
.crop-record-row { align-items: center; background: var(--card); border: 1px solid var(--line-soft); border-left: 3px solid var(--steel); border-radius: 8px; display: grid; gap: .65rem; grid-template-columns: minmax(0, 1fr) auto auto; min-width: 0; padding: .68rem .75rem; }
.crop-record-row.status-current { border-left-color: var(--green); }
.crop-record-row.status-due, .crop-record-row.status-attention { border-left-color: var(--orange); }
.crop-record-row > div:first-child { display: grid; gap: .1rem; min-width: 0; }
.crop-record-row span, .crop-record-row small { color: var(--muted); font-size: .7rem; }
.crop-record-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crop-record-row > div:nth-child(2) { display: grid; gap: .12rem; justify-items: end; text-align: right; }
.crop-record-row > div:nth-child(2) b { font-size: .78rem; white-space: nowrap; }
.crop-record-row nav { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; }
.crop-record-row nav a, .crop-record-row nav button { background: var(--field); border: 1px solid var(--line-soft); border-radius: 5px; color: var(--ink); font: inherit; font-size: .7rem; font-weight: 900; padding: .4rem .5rem; text-decoration: none; }
.crop-record-row nav form { margin: 0; }

@media (max-width: 720px) {
    .crop-dashboard-header { align-items: stretch; flex-direction: column; }
    .crop-quick-actions { justify-content: stretch; }
    .crop-quick-actions a { flex: 1 1 28%; }
    .crop-operations-main { grid-template-columns: minmax(0, 1fr) 6.9rem; }
    .crop-weather-read { border-bottom: 1px solid var(--line-soft); }
    .crop-season-read { border-bottom: 1px solid var(--line-soft); border-right: 0; }
    .crop-care-read { border-left: 1px solid var(--line-soft); grid-column: 2; grid-row: 1 / span 2; }
    .crop-season-read strong { white-space: normal; }
    .crop-priority { grid-template-columns: 1.55rem minmax(0, 1fr); }
    .crop-priority b { grid-column: 1 / -1; padding-left: 2.2rem; }
    .crop-metric-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .crop-metric:nth-child(odd) { border-left: 0; }
    .crop-metric:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
    .crop-planting-grid { grid-auto-columns: minmax(15rem, 84vw); grid-auto-flow: column; grid-template-columns: none; overflow-x: auto; padding: .1rem 0 .55rem; scroll-snap-type: x proximity; }
    .crop-planting-card { scroll-snap-align: start; }
    .crop-season-detail-grid { grid-template-columns: 1fr; }
    .crop-records-heading { align-items: flex-start; flex-direction: column; gap: .55rem; }
    .crop-record-row { align-items: start; grid-template-columns: minmax(0, 1fr) auto; }
    .crop-record-row nav { grid-column: 1 / -1; justify-content: stretch; width: 100%; }
    .crop-record-row nav a, .crop-record-row nav button { flex: 1 1 0; text-align: center; }
    .crop-record-row > div:nth-child(2) { align-self: start; }
}

@media (min-width: 900px) {
    .crop-operations { margin-top: .2rem; }
    .crop-planting-grid { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
    .crop-record-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .crop-record-row { grid-template-columns: minmax(0, 1fr) auto; }
    .crop-record-row nav { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Crops use the same compact dashboard language, with rows instead of animal-state symbols. */
.crop-command-center { background: var(--card); border: 1px solid var(--line-soft); border-top: 3px solid var(--green); border-radius: 8px; box-shadow: 0 10px 28px rgba(24, 24, 23, .05); margin: 1rem 0; overflow: hidden; }
.crop-command-heading { align-items: center; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; padding: .6rem .8rem; }
.crop-command-heading .eyebrow { margin: 0; }
.crop-command-heading h3 { font-size: 1rem; margin: .08rem 0 0; }
.crop-command-heading a { color: var(--ink); font-size: .76rem; font-weight: 900; text-decoration: none; }
.crop-cockpit { align-items: stretch; display: grid; grid-template-columns: minmax(7.5rem, .78fr) minmax(0, 1.5fr) minmax(5rem, .55fr); }
.crop-cockpit-total,
.crop-cockpit-care { align-content: center; display: grid; gap: .12rem; padding: .7rem; }
.crop-cockpit-total { border-right: 1px solid var(--line-soft); grid-template-columns: auto 1fr; }
.crop-cockpit-total strong { align-self: end; font-size: 1.65rem; line-height: 1; }
.crop-cockpit-total > span:last-child { align-self: start; color: var(--muted); font-size: .66rem; font-weight: 850; grid-column: 2; text-transform: uppercase; }
.crop-cockpit-mark { align-content: center; display: grid; gap: .22rem; grid-row: 1 / span 2; padding-right: .45rem; }
.crop-cockpit-mark i { border-top: 3px solid var(--green); display: block; transform: skewX(-24deg); width: 1.2rem; }
.crop-cockpit-mark i:nth-child(2) { opacity: .72; width: .95rem; }
.crop-cockpit-mark i:nth-child(3) { opacity: .44; width: .72rem; }
.crop-cockpit-plantings { align-items: center; display: flex; gap: .4rem; min-width: 0; overflow: hidden; padding: .6rem; }
.crop-cockpit-plantings > span { align-content: center; border-left: 3px solid var(--green); display: grid; gap: .12rem; min-width: 0; padding-left: .35rem; }
.crop-cockpit-plantings > span.status-due { border-left-color: var(--orange); }
.crop-cockpit-plantings > span.status-attention { border-left-color: var(--red); }
.crop-cockpit-plantings b { font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crop-cockpit-plantings small { color: var(--muted); font-size: .62rem; white-space: nowrap; }

/* Crop dashboard refinement: operating information first, administration second. */
.crop-dashboard-header {
    align-items: center;
    gap: 1.25rem;
    margin-bottom: .65rem;
}

.crop-dashboard-header > div { min-width: 0; }
.crop-dashboard-header h2 { font-size: clamp(1.65rem, 3vw, 2.2rem); line-height: 1.05; }
.crop-dashboard-header p:last-child { font-size: .92rem; max-width: 38rem; }
.crop-quick-actions { align-items: center; flex: 0 0 auto; }
.crop-quick-actions a { gap: .35rem; min-height: 2.35rem; padding: .4rem .62rem; white-space: nowrap; }
.crop-quick-actions a > span { color: var(--orange); font-size: .88rem; font-weight: 900; }
.crop-quick-actions .button-link > span { color: #FFFDF8; }
.crop-quick-actions .button-link,
.crop-quick-actions .button-link:visited,
.crop-records-heading .button-link,
.crop-records-heading .button-link:visited,
.crop-view-nav a[aria-current="page"],
.crop-view-nav a[aria-current="page"]:visited { color: #FFFDF8; }
.crop-quick-actions .button-link:hover,
.crop-quick-actions .button-link:focus-visible,
.crop-records-heading .button-link:hover,
.crop-records-heading .button-link:focus-visible,
.crop-view-nav a[aria-current="page"]:hover,
.crop-view-nav a[aria-current="page"]:focus-visible { color: #FFFDF8; }

.crop-view-nav {
    -webkit-overflow-scrolling: touch;
    gap: .3rem;
    margin-bottom: 1.15rem;
    padding-bottom: .45rem;
}

.crop-view-nav a {
    border: 1px solid transparent;
    min-height: 2.15rem;
    padding: .4rem .66rem;
}

.crop-view-nav a:hover,
.crop-view-nav a:focus-visible { background: rgba(79, 102, 130, .1); color: var(--ink); }
.crop-view-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--orange); }

.crop-operations { border-top-width: 4px; border-radius: 12px; box-shadow: 0 10px 28px rgba(24, 24, 23, .055); }
.crop-operations > header { align-items: center; padding: .68rem .9rem; }
.crop-operations > header h3 { font-size: 1.12rem; }
.crop-operations-main { grid-template-columns: minmax(10rem, .8fr) minmax(13rem, 1.25fr) minmax(8.25rem, .65fr); }
.crop-weather-read,
.crop-season-read,
.crop-care-read { min-height: 6.15rem; padding: .75rem .9rem; }
.crop-weather-read strong { font-size: 1.65rem; }
.crop-season-read strong { font-size: 1.02rem; white-space: normal; }
.crop-care-read { justify-items: start; text-align: left; }
.crop-care-read strong { font-size: 1.45rem; }
.crop-care-read span { font-size: .67rem; }
.crop-care-read small { line-height: 1.25; }
.crop-priority { background: rgba(79, 102, 130, .045); grid-template-columns: 1.8rem minmax(0, 1fr) auto; min-height: 3.55rem; }
.crop-priority:hover { background: rgba(79, 102, 130, .09); }
.crop-priority strong { font-size: .9rem; }
.crop-priority b { align-items: center; display: inline-flex; gap: .15rem; }
.crop-metric-rail { background: rgba(247, 243, 234, .54); grid-template-columns: repeat(auto-fit, minmax(8.2rem, 1fr)); }
.crop-metric { align-content: center; gap: .12rem; min-height: 4.35rem; padding: .55rem .78rem; }
.crop-metric strong { font-size: 1.15rem; }
.crop-metric span { font-size: .62rem; }
.crop-metric small { line-height: 1.18; }

.crop-planting-glance { gap: .55rem; margin: 1.2rem 0; }
.crop-planting-glance .section-heading { align-items: center; border-bottom: 1px solid var(--line-soft); padding-bottom: .48rem; }
.crop-planting-glance .section-heading h3 { font-size: 1.18rem; }
.crop-planting-glance .section-heading p { color: var(--muted); font-size: .68rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.crop-planting-grid { gap: .8rem; }
.crop-planting-card { border-bottom-width: 3px; border-radius: 10px; gap: .48rem; min-height: 15.5rem; padding: .85rem; }
.crop-planting-card-topline { min-width: 0; }
.crop-planting-card-topline span { max-width: 62%; }
.crop-planting-card-topline b { font-size: .63rem; }
.crop-stage-visual { gap: .26rem; margin: .05rem 0 .15rem; }
.crop-stage-visual i { height: .36rem; }
.crop-planting-card h4 { font-size: 1.22rem; }
.crop-planting-card h4 span { font-size: .8rem; }
.crop-planting-source { align-items: baseline; display: flex; flex-wrap: wrap; gap: .15rem .38rem; line-height: 1.28; overflow: visible; white-space: normal; }
.crop-planting-source > span { color: var(--muted); font-size: .64rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.crop-planting-source small { white-space: nowrap; }
.crop-planting-card-meta { border-top: 1px solid var(--line-soft); margin-top: .05rem; padding-top: .48rem; }
.crop-planting-card-meta > span:last-child { white-space: nowrap; }
.crop-planting-card nav { margin-top: .15rem; }

.crop-season-detail-grid { align-items: start; gap: .8rem; }
.crop-season-signal { border-left: 3px solid var(--green); min-height: 0; }
.crop-season-signal:has(strong) { padding: .78rem; }
.crop-season-signal strong { font-size: 1.1rem; }
.crop-dashboard-tools { border-radius: 10px; margin: 1rem 0 .75rem; }
.crop-dashboard-tools > summary { min-height: 2.8rem; padding: .78rem .85rem; }
.crop-dashboard-tools a { border-radius: 6px; min-height: 2rem; padding: .36rem .52rem; }

@media (max-width: 720px) {
    /* The site-wide mobile nav rule makes generic nav links full width. Crop tabs are a compact scroller. */
    .crop-view-nav { flex-wrap: nowrap; margin-inline: 0; overflow-x: auto; width: 100%; }
    .crop-view-nav a { flex: 0 0 auto; width: auto; }

    .crop-dashboard-header { align-items: stretch; gap: .7rem; padding-bottom: .7rem; }
    .crop-dashboard-header p:last-child { font-size: .86rem; }
    .crop-quick-actions { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: .4rem; }
    .crop-quick-actions a { font-size: .74rem; min-width: 0; padding-inline: .35rem; }
    .crop-quick-actions a > span { display: none; }

    .crop-operations > header { padding: .62rem .75rem; }
    .crop-operations-main { grid-template-columns: minmax(0, 1fr) minmax(7.7rem, .68fr); }
    .crop-weather-read,
    .crop-season-read,
    .crop-care-read { min-height: 5.5rem; padding: .65rem .72rem; }
    .crop-weather-read { grid-template-columns: 1.75rem minmax(0, 1fr); }
    .crop-weather-mark { margin-right: .35rem; transform: scale(.86); transform-origin: left center; }
    .crop-weather-read strong { font-size: 1.45rem; }
    .crop-season-read { grid-column: 1 / -1; border-right: 0; }
    .crop-season-read strong { font-size: .96rem; }
    .crop-stage-distribution { gap: .18rem .35rem; }
    .crop-stage-distribution span { font-size: .6rem; }
    .crop-care-read { border-left: 1px solid var(--line-soft); grid-column: 2; grid-row: 1; }
    .crop-care-read strong { font-size: 1.28rem; }
    .crop-care-read small { display: none; }
    .crop-priority { gap: .5rem; grid-template-columns: 1.55rem minmax(0, 1fr); min-height: 0; padding: .62rem .75rem; }
    .crop-priority strong { display: -webkit-box; overflow: hidden; text-overflow: clip; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
    .crop-priority b { grid-column: 2; justify-self: start; }

    .crop-metric-rail { display: flex; gap: 0; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; }
    .crop-metric { flex: 0 0 min(42vw, 10rem); min-height: 4.5rem; scroll-snap-align: start; }
    .crop-metric + .crop-metric { border-left: 1px solid var(--line-soft); }
    .crop-metric:nth-child(n + 3) { border-top: 0; }

    .crop-planting-grid { grid-auto-columns: unset; grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); overflow: visible; padding-bottom: 0; }
    .crop-planting-card { min-height: 0; }
    .crop-planting-card-topline span { max-width: 58%; }
    .crop-planting-card nav a { min-height: 2.45rem; }
    .crop-season-detail-grid { margin-top: .8rem; }
    .crop-recent-activity > a { grid-template-columns: 3.9rem minmax(0, 1fr) auto; }
    .crop-season-signal { padding: .72rem; }
    .crop-dashboard-tools > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .crop-dashboard-tools a { align-items: center; display: flex; justify-content: center; text-align: center; }
}

@media (min-width: 900px) {
    .crop-dashboard-header { min-height: 5.3rem; }
    .crop-operations-main { grid-template-columns: minmax(13rem, .8fr) minmax(18rem, 1.3fr) minmax(9.5rem, .65fr); }
    .crop-metric-rail { grid-template-columns: repeat(auto-fit, minmax(9.4rem, 1fr)); }
    .crop-planting-grid { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
    .crop-planting-card { min-height: 16.2rem; }
}
.crop-cockpit-plantings i { background: var(--green); border-radius: 50%; height: .38rem; width: .38rem; }
.crop-cockpit-plantings .status-due i { background: var(--orange); }
.crop-cockpit-plantings .status-attention i { background: var(--red); }
.crop-cockpit-care { border-left: 1px solid var(--line-soft); justify-items: center; text-align: center; }
.crop-cockpit-care b { color: var(--green); font-size: 1.5rem; line-height: 1; }
.crop-cockpit-care span { color: var(--muted); font-size: .62rem; font-weight: 850; text-transform: uppercase; }
.crop-cockpit-care small { color: var(--orange); font-size: .62rem; font-weight: 850; }
.crop-command-metrics { border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); }
.crop-command-metrics > div { display: grid; gap: .12rem; min-height: 3.4rem; padding: .5rem .7rem; }
.crop-command-metrics > div + div { border-left: 1px solid var(--line-soft); }
.crop-command-metrics b { font-size: 1rem; }
.crop-command-metrics span { color: var(--muted); font-size: .62rem; font-weight: 850; text-transform: uppercase; }
.crop-command-metrics .tone-due b { color: var(--orange); }

/* Poultry uses the shared dashboard language without borrowing Bee metaphors. */
.poultry-command-center { background: var(--card); border: 1px solid var(--line-soft); border-top: 3px solid var(--steel); border-radius: 8px; box-shadow: 0 10px 28px rgba(24, 24, 23, .05); margin: 1rem 0; overflow: hidden; }
.poultry-command-heading { align-items: center; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; padding: .6rem .8rem; }
.poultry-command-heading .eyebrow { margin: 0; }
.poultry-command-heading h3 { font-size: 1rem; margin: .08rem 0 0; }
.poultry-command-heading a { color: var(--ink); font-size: .76rem; font-weight: 900; text-decoration: none; }
.poultry-cockpit { align-items: stretch; display: grid; grid-template-columns: minmax(6.75rem, .72fr) minmax(0, 1.5fr) minmax(5rem, .55fr); }
.poultry-cockpit-total,
.poultry-cockpit-care { align-content: center; display: grid; gap: .12rem; padding: .7rem; }
.poultry-cockpit-total { border-right: 1px solid var(--line-soft); grid-template-columns: auto 1fr; }
.poultry-cockpit-total strong { align-self: end; font-size: 1.65rem; line-height: 1; }
.poultry-cockpit-total > span:last-child { align-self: start; color: var(--muted); font-size: .66rem; font-weight: 850; grid-column: 2; text-transform: uppercase; }
.poultry-cockpit-mark { align-content: end; display: grid; gap: 2px; grid-row: 1 / span 2; padding: .3rem .35rem .12rem 0; }
.poultry-cockpit-mark i { background: var(--pollen); border: 1px solid rgba(24, 24, 23, .35); border-radius: 50% 50% 45% 45%; display: block; height: .42rem; width: .32rem; }
.poultry-cockpit-flocks { align-items: center; display: flex; gap: .4rem; min-width: 0; overflow: hidden; padding: .6rem; }
.poultry-cockpit-flocks > span { align-content: center; border-left: 3px solid var(--green); display: grid; gap: .12rem; min-width: 0; padding-left: .35rem; }
.poultry-cockpit-flocks > span.status-due { border-left-color: var(--orange); }
.poultry-cockpit-flocks > span.status-attention { border-left-color: var(--red); }
.poultry-cockpit-flocks b { font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poultry-cockpit-flocks small { color: var(--muted); font-size: .62rem; white-space: nowrap; }
.poultry-cockpit-flocks i { background: var(--green); border-radius: 50%; height: .38rem; width: .38rem; }
.poultry-cockpit-flocks .status-due i { background: var(--orange); }
.poultry-cockpit-flocks .status-attention i { background: var(--red); }
.poultry-cockpit-care { border-left: 1px solid var(--line-soft); justify-items: center; text-align: center; }
.poultry-cockpit-care b { color: var(--green); font-size: 1.5rem; line-height: 1; }
.poultry-cockpit-care span { color: var(--muted); font-size: .62rem; font-weight: 850; text-transform: uppercase; }
.poultry-cockpit-care small { color: var(--orange); font-size: .62rem; font-weight: 850; }
.poultry-command-metrics { border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: repeat(auto-fit, minmax(6.75rem, 1fr)); }
.poultry-command-metrics > div { display: grid; gap: .12rem; min-height: 3.4rem; padding: .5rem .7rem; }
.poultry-command-metrics > div + div { border-left: 1px solid var(--line-soft); }
.poultry-command-metrics b { font-size: 1rem; }
.poultry-command-metrics span { color: var(--muted); font-size: .62rem; font-weight: 850; text-transform: uppercase; }
.poultry-command-metrics .tone-due b { color: var(--orange); }

/* Livestock command center: shared density and progressive group status language. */
.livestock-command-center { background: var(--card); border: 1px solid var(--line-soft); border-top: 3px solid var(--green); border-radius: 8px; box-shadow: 0 10px 28px rgba(24, 24, 23, .05); margin: 1rem 0; overflow: hidden; }
.livestock-command-heading { align-items: center; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; padding: .6rem .8rem; }
.livestock-command-heading .eyebrow { margin: 0; }
.livestock-command-heading h3 { font-size: 1rem; margin: .08rem 0 0; }
.livestock-command-heading a { color: var(--ink); font-size: .76rem; font-weight: 900; text-decoration: none; }
.livestock-cockpit { align-items: stretch; display: grid; grid-template-columns: minmax(6.75rem, .72fr) minmax(0, 1.5fr) minmax(5rem, .55fr); }
.livestock-cockpit-total, .livestock-cockpit-care { align-content: center; display: grid; gap: .12rem; padding: .7rem; }
.livestock-cockpit-total { border-right: 1px solid var(--line-soft); grid-template-columns: auto 1fr; }
.livestock-cockpit-total strong { align-self: end; font-size: 1.65rem; line-height: 1; }
.livestock-cockpit-total > span:last-child { align-self: start; color: var(--muted); font-size: .66rem; font-weight: 850; grid-column: 2; text-transform: uppercase; }
.livestock-cockpit-mark { align-content: end; display: grid; gap: 2px; grid-row: 1 / span 2; padding: .3rem .35rem .12rem 0; }
.livestock-cockpit-mark i { background: var(--green); border-radius: 50% 50% 42% 42%; display: block; height: .42rem; width: .38rem; }
.livestock-cockpit-groups { align-items: center; display: flex; gap: .4rem; min-width: 0; overflow: hidden; padding: .6rem; }
.livestock-cockpit-groups > span { align-content: center; border-left: 3px solid var(--green); display: grid; gap: .12rem; min-width: 0; padding-left: .35rem; }
.livestock-cockpit-groups > span.status-due { border-left-color: var(--orange); }
.livestock-cockpit-groups > span.status-attention { border-left-color: var(--red); }
.livestock-cockpit-groups b { font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.livestock-cockpit-groups small { color: var(--muted); font-size: .62rem; white-space: nowrap; }
.livestock-cockpit-groups i { background: var(--green); border-radius: 50%; height: .38rem; width: .38rem; }
.livestock-cockpit-groups .status-due i { background: var(--orange); }
.livestock-cockpit-groups .status-attention i { background: var(--red); }
.livestock-cockpit-care { border-left: 1px solid var(--line-soft); justify-items: center; text-align: center; }
.livestock-cockpit-care b { color: var(--green); font-size: 1.5rem; line-height: 1; }
.livestock-cockpit-care span { color: var(--muted); font-size: .62rem; font-weight: 850; text-transform: uppercase; }
.livestock-cockpit-care small { color: var(--orange); font-size: .62rem; font-weight: 850; }
.livestock-command-metrics { border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: repeat(auto-fit, minmax(6.75rem, 1fr)); }
.livestock-command-metrics > div { display: grid; gap: .12rem; min-height: 3.4rem; padding: .5rem .7rem; }
.livestock-command-metrics > div + div { border-left: 1px solid var(--line-soft); }
.livestock-command-metrics b { font-size: 1rem; }
.livestock-command-metrics span { color: var(--muted); font-size: .62rem; font-weight: 850; text-transform: uppercase; }
.livestock-command-metrics .tone-due b { color: var(--orange); }

@media (max-width: 720px) {
    .bee-hive-card .bee-hive-visual { grid-template-columns: 1fr; }
    .bee-hive-card .hive-stack-graphic {
        align-items: center;
        grid-template-columns: minmax(7.25rem, .88fr) minmax(0, 1.12fr);
        grid-template-rows: 1fr;
        justify-items: stretch;
        min-height: 6.55rem;
    }
    .bee-hive-card .hive-detail-hive {
        min-height: 5.25rem;
        transform: scale(.84);
        transform-origin: center;
    }
    .bee-hive-card .hive-stack-caption {
        align-self: center;
        justify-self: stretch;
        text-align: left;
    }
    .poultry-cockpit { grid-template-columns: minmax(6rem, .75fr) minmax(0, 1.25fr) minmax(4.5rem, .55fr); }
    .poultry-cockpit-total,
    .poultry-cockpit-care { padding: .55rem; }
    .poultry-cockpit-flocks { gap: .3rem; padding: .5rem; }
    .poultry-cockpit-flocks > span { max-width: 5.5rem; }
    .poultry-cockpit-flocks > span:nth-child(n + 4) { display: none; }
    .poultry-command-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .poultry-command-metrics > div:nth-child(odd) { border-left: 0; }
    .poultry-command-metrics > div:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
    .livestock-cockpit { grid-template-columns: minmax(6rem, .75fr) minmax(0, 1.25fr) minmax(4.5rem, .55fr); }
    .livestock-cockpit-total, .livestock-cockpit-care { padding: .55rem; }
    .livestock-cockpit-groups { gap: .3rem; padding: .5rem; }
    .livestock-cockpit-groups > span { max-width: 5.5rem; }
    .livestock-cockpit-groups > span:nth-child(n + 4) { display: none; }
    .livestock-command-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .livestock-command-metrics > div:nth-child(odd) { border-left: 0; }
    .livestock-command-metrics > div:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
    .crop-cockpit { grid-template-columns: minmax(6.5rem, .8fr) minmax(0, 1.2fr) minmax(4.5rem, .55fr); }
    .crop-cockpit-total,
    .crop-cockpit-care { padding: .55rem; }
    .crop-cockpit-plantings { gap: .3rem; padding: .5rem; }
    .crop-cockpit-plantings > span { max-width: 5.5rem; }
    .crop-cockpit-plantings > span:nth-child(n + 4) { display: none; }
    .crop-command-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .crop-command-metrics > div:nth-child(odd) { border-left: 0; }
    .crop-command-metrics > div:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
}

/* Final mobile tuning for the Bee command center: preserve scanability over fitting every hive on one line. */
@media (max-width: 720px) {
    .bee-cockpit {
        grid-template-columns: minmax(6.5rem, .86fr) minmax(0, 1.1fr) 5.9rem;
    }

    .bee-cockpit-status {
        grid-template-columns: 1.7rem minmax(0, 1fr);
        min-height: 0;
        padding: .58rem .65rem;
    }

    .bee-cockpit-status strong { display: none; }
    .bee-cockpit-status div span {
        display: block;
        font-size: .82rem;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .bee-cockpit-status > a {
        grid-column: 1 / -1;
        justify-self: stretch;
        margin-top: .08rem;
        padding: .42rem .55rem;
        text-align: center;
        white-space: nowrap;
    }

    .bee-hive-glance-strip {
        gap: .55rem;
        grid-auto-columns: minmax(7.3rem, 34vw);
        padding-bottom: .55rem;
    }

    .bee-hive-glance-card {
        gap: .34rem;
        min-height: 14.2rem;
        padding: .48rem;
    }

    .bee-hive-glance-card .langstroth-hive {
        min-height: 6.8rem;
        transform: scale(.9);
        transform-origin: center bottom;
    }

    .hive-glance-name { font-size: .7rem; }
    .hive-glance-state { font-size: .57rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    .dashboard-technical-section .weather-sky-mark {
        flex-basis: 4.15rem;
        transform: scale(1.15);
        transform-origin: right center;
    }
}

/* Desktop recovery: the compact Bee components need room to breathe once they leave
   the phone layout. Keep the visual language, but use predictable grid tracks so
   labels, hive drawings, and weather details never compete for the same pixels. */
@media (min-width: 721px) {
    .dashboard-technical-section {
        align-items: start;
    }

    .dashboard-technical-section .weather-card,
    .dashboard-technical-section .weather-card-header,
    .dashboard-technical-section .weather-body,
    .weather-primary-metrics > div,
    .forecast-strip > div {
        min-width: 0;
    }

    .dashboard-technical-section .weather-sky-mark {
        flex-basis: 3.85rem;
        flex-shrink: 0;
        margin-right: .15rem;
    }

    .weather-primary-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .forecast-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .bee-command-center,
    .bee-command-center-heading,
    .bee-cockpit,
    .bee-command-metrics,
    .bee-apiary-glance,
    .bee-hive-glance-strip,
    .bee-hive-card,
    .bee-hive-visual {
        min-width: 0;
    }

    .bee-cockpit {
        grid-template-columns: minmax(10rem, .9fr) minmax(14rem, 1.45fr) 7.4rem;
    }

    .bee-cockpit-weather,
    .bee-cockpit-conditions {
        min-width: 0;
    }

    .bee-cockpit-conditions strong,
    .bee-cockpit-conditions > span:not(.eyebrow),
    .bee-cockpit-status div span {
        overflow-wrap: anywhere;
    }

    .bee-cockpit-status {
        grid-template-columns: 1.8rem minmax(0, 1fr) auto;
    }

    .bee-cockpit-status div span {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    .bee-cockpit-status > a {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .bee-command-metrics {
        grid-template-columns: repeat(auto-fit, minmax(8.4rem, 1fr));
    }

    .bee-command-metric {
        min-width: 0;
    }

    .bee-command-metric strong,
    .bee-command-metric span,
    .bee-command-metric small {
        overflow-wrap: anywhere;
    }

    .bee-hive-glance-strip {
        grid-auto-columns: auto;
        grid-auto-flow: row;
        grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
        overflow: visible;
        padding-bottom: .2rem;
    }

    .bee-hive-glance-card {
        min-height: 15.25rem;
        min-width: 0;
    }

    .bee-hive-glance-card .langstroth-hive {
        transform: none;
    }

    .hive-glance-name,
    .hive-glance-state,
    .hive-glance-facts span {
        min-width: 0;
    }

    .bee-hive-list {
        grid-template-columns: repeat(auto-fit, minmax(21rem, 1fr));
    }

    .bee-hive-visual {
        align-items: stretch;
        grid-template-columns: minmax(10.75rem, .84fr) minmax(0, 1.16fr);
    }

    .bee-hive-card .hive-stack-graphic {
        align-content: center;
        grid-template-columns: 1fr;
        grid-template-rows: minmax(7.15rem, 1fr) auto;
        justify-items: center;
        min-height: 9.15rem;
    }

    .bee-hive-card .hive-detail-hive {
        min-height: 6.65rem;
        transform: none;
    }

    .bee-hive-card .hive-stack-caption {
        align-self: end;
        display: grid;
        gap: .08rem;
        justify-self: stretch;
        text-align: center;
    }

    .bee-hive-card .hive-stack-caption strong,
    .bee-hive-card .hive-stack-caption > span {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bee-observation-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bee-observation-list dd,
    .bee-hive-metric > strong,
    .hive-accessory-list li {
        overflow-wrap: anywhere;
    }
}

/* Final Bee dashboard breakpoints: keep the same information model, while
   giving phone, tablet, and desktop compositions clear grid ownership. */
@media (max-width: 720px) {
    .bee-cockpit {
        grid-template-areas:
            "weather health"
            "conditions health"
            "status status";
        grid-template-columns: minmax(0, 1fr) 6.15rem;
    }

    .bee-cockpit-health {
        min-height: 7.15rem;
    }

    .bee-cockpit-status {
        grid-template-columns: 1.75rem minmax(0, 1fr);
    }

    .bee-command-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .bee-hive-glance-strip {
        grid-auto-columns: minmax(9rem, 43vw);
        grid-auto-flow: column;
        overflow-x: auto;
        padding-bottom: .55rem;
    }

    .bee-hive-glance-card {
        min-height: 14.75rem;
    }
}

@media (min-width: 721px) {
    .bee-hive-card nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .bee-hive-card nav .hive-card-more {
        grid-column: auto;
    }
}

@media (min-width: 1050px) {
    .bee-cockpit {
        grid-template-areas: "weather conditions health status";
        grid-template-columns: minmax(9.5rem, .9fr) minmax(13rem, 1.25fr) 7.35rem minmax(13rem, 1.1fr);
    }

    .bee-cockpit-status {
        border-left: 1px solid var(--border);
        border-top: 0;
        grid-template-columns: 1.85rem minmax(0, 1fr);
        min-height: 0;
    }

    .bee-cockpit-status > a {
        grid-column: 1 / -1;
    }

    .bee-command-metrics {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* Last in the cascade on purpose: the command panel no longer keeps priority
   inside its operating-condition grid. */
.bee-cockpit {
    grid-template-areas: "weather conditions health";
    grid-template-columns: minmax(9.5rem, .92fr) minmax(0, 1.55fr) 7.25rem;
}

.bee-cockpit-weather,
.bee-cockpit-conditions { min-height: 5.35rem; }

@media (max-width: 720px) {
    .bee-cockpit {
        grid-template-areas:
            "weather health"
            "conditions health";
        grid-template-columns: minmax(0, 1fr) 6.3rem;
    }

    .bee-cockpit-weather,
    .bee-cockpit-conditions { min-height: 3.45rem; padding: .48rem .65rem; }

    .bee-cockpit .bee-health-ring { margin: auto; min-height: 5.35rem; min-width: 5.35rem; }
    .bee-command-priority { grid-template-columns: 1.7rem minmax(0, 1fr) auto; padding: .48rem .65rem; }
    .bee-command-priority > small { display: none; }
    .bee-command-metrics {
        display: grid;
        grid-auto-columns: minmax(6.55rem, 31vw);
        grid-auto-flow: column;
        grid-template-columns: none;
        overflow-x: auto;
    }

    .bee-command-metric { border-left: 1px solid var(--line-soft); scroll-snap-align: start; }
    .bee-hive-glance-strip { grid-auto-columns: minmax(9.35rem, 44vw); }
    .bee-hive-visual { grid-template-columns: 1fr; }
    .bee-hive-card .hive-stack-graphic { grid-template-columns: minmax(7.8rem, .9fr) minmax(0, 1.1fr); min-height: 7rem; }
}

@media (min-width: 1050px) {
    .bee-cockpit { grid-template-columns: minmax(11rem, .9fr) minmax(16rem, 1.35fr) 7.9rem; }
}

/* Keep the physical hive as the visual anchor in both card sizes. */
.bee-hive-glance-card {
    grid-template-rows: auto minmax(6.75rem, 1fr) auto auto minmax(1.55rem, auto);
}

.hive-glance-name {
    display: -webkit-box;
    line-height: 1.15;
    min-height: 2.3em;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.hive-glance-facts { min-height: 2.3rem; }
.hive-glance-facts span { align-items: center; display: inline-flex; gap: .25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hive-glance-facts i { background: var(--steel); border-radius: 50%; display: inline-block; flex: 0 0 auto; height: .42rem; width: .42rem; }
.hive-glance-facts .signal-queen i { background: var(--pollen); }
.hive-glance-facts .signal-brood i { background: var(--green); }
.hive-glance-facts .signal-mites i { background: var(--orange); }
.hive-glance-facts .signal-check i { background: var(--muted); }

.bee-hive-card { gap: .75rem; padding: .85rem; }
.bee-hive-visual { align-items: stretch; gap: .75rem; grid-template-columns: minmax(9.2rem, .8fr) minmax(0, 1.2fr); }
.hive-stack-graphic { background: linear-gradient(155deg, #F1EBDB, #FFFDF8 68%); min-height: 8rem; }
.hive-detail-hive { min-height: 6.45rem; transform: scale(.98); }
.bee-hive-observations { align-content: center; gap: .45rem; }
.bee-last-check { border-bottom: 1px solid var(--line-soft); margin: 0; padding-bottom: .45rem; }

.bee-observation-list { grid-template-columns: repeat(auto-fit, minmax(5.8rem, 1fr)); row-gap: .2rem; }
.bee-observation-list div { background: transparent; border-bottom: 1px solid var(--line-soft); border-left: 0; border-top: 2px solid var(--steel); padding: .28rem .08rem .34rem; }
.bee-observation-list .tone-current { border-top-color: var(--green); }
.bee-observation-list .tone-due { border-top-color: var(--orange); }
.bee-observation-list .tone-attention { border-top-color: var(--red); }

.bee-hive-performance { border-top: 1px solid var(--line-soft); gap: 0; grid-template-columns: repeat(auto-fit, minmax(5.8rem, 1fr)); }
.bee-hive-metric { background: transparent; border: 0; border-left: 1px solid var(--line-soft); padding: .42rem .5rem; }
.bee-hive-metric:first-child { border-left: 0; }

@media (max-width: 720px) {
    .bee-hive-visual { grid-template-columns: 1fr; }
    .bee-hive-card .hive-stack-graphic { grid-template-columns: minmax(7.8rem, .9fr) minmax(0, 1.1fr); min-height: 7rem; }
    .bee-hive-card .hive-detail-hive { min-height: 5.75rem; transform: scale(.9); }
    .bee-observation-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Final Crop records cascade: keep non-Overview tabs in the command-center family. */
.crop-tab-workspace { display: grid; gap: .9rem; width: 100%; }
.crop-tab-header { align-items: center; background: var(--card); border: 1px solid var(--line-soft); border-left: 4px solid var(--orange); border-radius: 8px; display: flex; gap: 1rem; justify-content: space-between; padding: .85rem 1rem; }
.crop-tab-header > div { display: grid; gap: .12rem; min-width: 0; }
.crop-tab-header .eyebrow { margin: 0; }
.crop-tab-header h3 { color: var(--ink); font-size: 1.22rem; margin: 0; }
.crop-tab-header span { color: var(--muted); font-size: .88rem; }
.crop-tab-primary { flex: 0 0 auto; }
.crop-tab-metrics { display: flex; flex-wrap: wrap; gap: .55rem; }
.crop-tab-metrics span { background: var(--paper-deep); border: 1px solid var(--line-soft); border-radius: 6px; color: var(--muted); font-size: .83rem; padding: .42rem .6rem; }
.crop-tab-metrics b { color: var(--ink); font-size: 1rem; margin-right: .12rem; }
.crop-planting-workspace-grid, .crop-seed-lot-grid, .crop-area-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.crop-tab-workspace .crop-record-list { gap: .8rem; }
.crop-tab-workspace .crop-record-row { background: var(--card); border: 1px solid var(--line-soft); border-left: 3px solid var(--steel); border-radius: 8px; box-shadow: none; min-width: 0; padding: .85rem .95rem; }
.crop-tab-workspace .crop-record-row.status-due { border-left-color: var(--orange); }
.crop-tab-workspace .crop-record-row.status-attention { border-left-color: var(--red); }
.crop-tab-workspace .crop-record-row > div { gap: .18rem; min-width: 0; }
.crop-tab-workspace .crop-record-row > div > span { color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.crop-tab-workspace .crop-record-row strong { color: var(--ink); font-size: 1.04rem; line-height: 1.22; }
.crop-tab-workspace .crop-record-row small { color: var(--muted); line-height: 1.35; }
.crop-tab-workspace .crop-record-row nav { align-items: center; display: flex; flex-wrap: wrap; gap: .45rem; }
.crop-tab-workspace .crop-record-row nav a, .crop-tab-workspace .crop-record-row nav button { background: var(--card); border: 1px solid var(--line); border-radius: 6px; color: var(--ink); font-weight: 700; min-height: 2.25rem; padding: .42rem .65rem; text-decoration: none; }
.crop-tab-workspace .crop-record-row nav a:first-child { background: var(--charcoal); border-color: var(--charcoal); color: #fff !important; }
.crop-output-list .crop-record-row { align-items: center; display: grid; grid-template-columns: 6.25rem minmax(0, 1fr) auto auto; }
.crop-output-list .crop-record-row > div:last-of-type { align-items: end; }
.crop-seed-lot-grid .crop-record-row, .crop-area-grid .crop-record-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.crop-seed-lot-grid .crop-record-row nav, .crop-area-grid .crop-record-row nav { grid-column: 1 / -1; margin-top: .35rem; }
.crop-history-feed .crop-record-row { align-items: start; border-left-color: var(--blue); display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.crop-history-feed .crop-record-row nav { grid-column: 1 / -1; }
.crop-filter-drawer { background: var(--paper-deep); border: 1px solid var(--line-soft); border-radius: 8px; }
.crop-filter-drawer summary { color: var(--ink); font-weight: 700; padding: .7rem .85rem; }
.crop-filter-drawer .filters { padding: 0 .85rem .85rem; }
.crop-filter-chips { align-items: center; display: flex; flex-wrap: wrap; gap: .42rem; }
.crop-filter-chips a { color: var(--steel); font-size: .85rem; font-weight: 700; }
@media (max-width: 720px) {
    .crop-tab-header { align-items: flex-start; flex-direction: column; padding: .8rem; }
    .crop-tab-primary { align-self: stretch; text-align: center; }
    .crop-tab-metrics { gap: .4rem; }
    .crop-tab-metrics span { flex: 1 1 7rem; }
    .crop-output-list .crop-record-row, .crop-seed-lot-grid .crop-record-row, .crop-area-grid .crop-record-row, .crop-history-feed .crop-record-row { display: grid; grid-template-columns: minmax(0, 1fr); }
    .crop-output-list .crop-record-row > div:last-of-type { align-items: start; }
    .crop-tab-workspace .crop-record-row nav { margin-top: .18rem; width: 100%; }
    .crop-tab-workspace .crop-record-row nav a, .crop-tab-workspace .crop-record-row nav button { flex: 1 1 8rem; text-align: center; }
}

/* Crop operations: keep every seasonal metric visible and tappable. */
.crop-metric-rail { grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); overflow: visible; }
.crop-metric { color: var(--ink); text-decoration: none; transition: background .16s ease, transform .16s ease; }
.crop-metric:hover, .crop-metric:focus-visible { background: rgba(79, 102, 130, .08); color: var(--ink); text-decoration: none; }
.crop-metric:active { transform: translateY(1px); }
.crop-tab-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
.crop-tab-secondary { min-height: 2.45rem; }
@media (max-width: 720px) {
    .crop-metric-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
    .crop-metric { min-width: 0; }
    .crop-metric:nth-child(odd) { border-left: 0; }
    .crop-metric:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
    .crop-tab-actions { align-items: stretch; justify-content: stretch; width: 100%; }
.crop-tab-actions > * { flex: 1 1 10rem; text-align: center; }
}

/* Overview plantings: the card is the details affordance, while its action remains explicit. */
.crop-planting-card { position: relative; }
.crop-planting-card > * { position: relative; z-index: 2; }
.crop-planting-card > .crop-planting-card-hit { inset: 0; position: absolute; z-index: 1; }
.crop-planting-card-hit:focus-visible { border-radius: inherit; box-shadow: 0 0 0 3px var(--orange); outline: none; }
.crop-planting-card > .crop-planting-card-hit:hover { background: rgba(79, 102, 130, .025); }
.crop-planting-card nav a { position: relative; z-index: 3; }

/* Overview lifecycle mirrors the planting detail's labeled bar track. */
.crop-card-lifecycle { display: grid; gap: .18rem; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); margin-top: .45rem; }
.crop-card-lifecycle > span { color: var(--muted); display: grid; font-size: clamp(.46rem, 1.9vw, .57rem); font-weight: 750; gap: .18rem; line-height: 1.1; min-width: 0; text-align: center; }
.crop-card-lifecycle i { background: var(--line-soft); border-radius: 999px; display: block; height: .28rem; }
.crop-card-lifecycle b { font: inherit; hyphens:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.crop-card-lifecycle .is-complete { color: var(--green); }
.crop-card-lifecycle .is-complete i { background: var(--green); }
.crop-card-lifecycle .is-current { color: var(--ink); font-weight: 900; }
.crop-card-lifecycle .is-current i { background: var(--orange); box-shadow: 0 0 0 3px rgba(224, 104, 47, .13); }

/* Crops overview refinement: keep the existing operational composition, but
   give it the tighter rhythm and calmer hierarchy used by Bees. */
.crop-module-shell .crop-dashboard-header {
    align-items: center;
    gap: .85rem;
    padding-bottom: .55rem;
}

.crop-module-shell .crop-dashboard-header h2 { margin-bottom: .12rem; }

.crop-module-shell .crop-quick-actions {
    align-items: stretch;
    gap: .45rem;
}

.crop-module-shell .crop-quick-actions a {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    line-height: 1.15;
    min-height: 2.5rem;
    padding: .42rem .68rem;
    text-align: center;
}

.crop-module-shell .crop-quick-actions a:not(.button-link) {
    background: var(--card);
    border-color: var(--line-soft);
}

.crop-module-shell .crop-quick-actions a:not(.button-link):hover,
.crop-module-shell .crop-quick-actions a:not(.button-link):focus-visible {
    background: var(--field);
}

.crop-module-shell .crop-view-nav { margin-bottom: .85rem; }

.crop-module-shell .crop-operations {
    border-top-width: 3px;
    box-shadow: 0 5px 16px rgba(24, 24, 23, .045);
    margin-bottom: .95rem;
}

.crop-module-shell .crop-operations > header { padding: .55rem .8rem .48rem; }
.crop-module-shell .crop-operations > header h3 { font-size: 1.05rem; }

.crop-module-shell .crop-weather-read,
.crop-module-shell .crop-season-read,
.crop-module-shell .crop-care-read {
    min-height: 5.55rem;
    padding: .62rem .78rem;
}

.crop-module-shell .crop-weather-read strong { font-size: 1.5rem; }
.crop-module-shell .crop-season-read strong { font-size: .96rem; }
.crop-module-shell .crop-care-read strong { font-size: 1.3rem; }

.crop-module-shell .crop-priority {
    min-height: 3.15rem;
    padding: .52rem .78rem;
}

.crop-module-shell .crop-metric { min-height: 4rem; padding: .45rem .68rem; }
.crop-module-shell .crop-metric strong { font-size: 1.08rem; }

.crop-module-shell .crop-planting-glance { margin: .95rem 0; }
.crop-module-shell .crop-planting-grid { gap: .68rem; }

.crop-module-shell .crop-planting-card {
    border-bottom-width: 3px;
    gap: .36rem;
    min-height: 0;
    padding: .72rem;
}

.crop-module-shell .crop-planting-card-topline { min-height: 1.55rem; }
.crop-module-shell .crop-planting-card-topline b {
    background: rgba(62, 100, 67, .1);
    color: var(--green);
    padding: .22rem .4rem;
}

.crop-module-shell .crop-planting-card.status-due .crop-planting-card-topline b {
    background: rgba(232, 117, 53, .12);
    color: #8A5A18;
}

.crop-module-shell .crop-planting-card.status-attention .crop-planting-card-topline b {
    background: rgba(155, 48, 44, .1);
    color: var(--red);
}

.crop-module-shell .crop-planting-card .crop-planting-visual .crop-visual {
    height: 5.65rem;
    width: 5.65rem;
}

.crop-module-shell .crop-planting-card h4 { font-size: 1.17rem; }
.crop-module-shell .crop-planting-card h4 span { font-size: .78rem; }
.crop-module-shell .crop-planting-source { margin: .08rem 0; }
.crop-module-shell .crop-planting-card-meta { padding-top: .4rem; }

.crop-module-shell .crop-planting-card nav {
    border-top: 0;
    margin-top: .18rem;
    padding-top: .08rem;
}

.crop-module-shell .crop-planting-card nav a {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--surface);
    border-radius: 7px;
    color: #FFFDF8;
    display: inline-flex;
    font-size: .76rem;
    justify-content: center;
    min-height: 2.35rem;
    padding: .38rem .58rem;
    text-align: center;
    text-decoration: none;
}

.crop-module-shell .crop-planting-card nav a:hover,
.crop-module-shell .crop-planting-card nav a:focus-visible {
    background: var(--charcoal);
    color: #FFFDF8;
    outline: none;
}

.crop-module-shell .crop-planting-card.status-due nav a,
.crop-module-shell .crop-planting-card.status-attention nav a {
    background: var(--surface);
}

.crop-module-shell .crop-planting-card .care-status-pill.status-current {
    background: rgba(62, 100, 67, .1);
    color: var(--green);
}

.crop-module-shell .crop-planting-card .care-status-pill.status-due {
    background: rgba(232, 117, 53, .12);
    color: #8A5A18;
}

.crop-module-shell .crop-planting-card .care-status-pill.status-attention {
    background: rgba(155, 48, 44, .1);
    color: var(--red);
}

@media (max-width: 720px) {
    .crop-module-shell .crop-dashboard-header { gap: .58rem; }
    .crop-module-shell .crop-quick-actions { gap: .35rem; }
    .crop-module-shell .crop-quick-actions a { min-height: 2.4rem; padding-inline: .38rem; }
    .crop-module-shell .crop-planting-card { padding: .68rem; }
    .crop-module-shell .crop-planting-card .crop-planting-visual .crop-visual { height: 5.35rem; width: 5.35rem; }
}

@media (min-width: 900px) {
    .crop-module-shell .crop-planting-grid { grid-template-columns: repeat(auto-fit, minmax(17.25rem, 1fr)); }
}

/* Harvest capture keeps the field pull small and lets post-harvest results wait. */
.advanced-fields-hint { margin: .55rem 0 .8rem; }
.detail-history-row .care-status-pill { display: inline-flex; margin-right: .35rem; vertical-align: middle; }
.detail-history-row .secondary-button--compact { vertical-align: middle; }

/* Hive inspections use focused, stackable sections rather than sending a
   partially completed check into a second form. */
.inspection-modules {
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    display: grid;
    gap: .8rem;
    margin: .35rem 0;
    padding: .9rem;
}
.inspection-modules-heading h3,
.inspection-module-panel h4 { margin: 0; }
.inspection-modules-heading .helptext { margin: .25rem 0 0; }
.inspection-module-controls {
    display: grid;
    gap: .45rem;
    grid-auto-rows: 2.8rem;
    grid-template-columns: repeat(auto-fit, minmax(7.2rem, 1fr));
    order: 2;
}
.inspection-module-button {
    align-items: center;
    background: var(--panel);
    color: var(--ink) !important;
    display: inline-flex;
    justify-content: center;
    min-height: 2.7rem;
    overflow: hidden;
    padding-inline: .55rem;
    text-decoration: none;
    white-space: nowrap;
    width: 100%;
}
.inspection-module-button:hover,
.inspection-module-button:focus-visible {
    background: var(--paper-deep);
    color: var(--ink) !important;
}
.inspection-module-button.is-selected {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper) !important;
}
.inspection-module-panels { display: grid; gap: .7rem; order: 1; }
.inspection-module-panel {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-left: 4px solid var(--orange);
    border-radius: 8px;
    display: grid;
    gap: .7rem;
    padding: .8rem;
}
.inspection-module-panel[hidden] { display: none; }
.inspection-module-panel > header {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
}
.text-button {
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    min-height: 2.2rem;
    padding: .25rem .1rem;
    text-decoration: none;
}
.text-button:hover,
.text-button:focus-visible { color: var(--ink); text-decoration: underline; }
.inspection-build-check {
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    display: grid;
    gap: .65rem;
    margin: .25rem 0;
    padding: .85rem;
}
.inspection-build-heading h3 { margin: .08rem 0; }
.inspection-build-heading .eyebrow { margin: 0; }
.inspection-build-heading .helptext { margin: .2rem 0 0; }
.inspection-hive-build {
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: grid;
    gap: .7rem;
    grid-template-columns: minmax(7rem, .78fr) minmax(0, 1.22fr);
    padding: .55rem;
}
.inspection-hive-build .inspection-hive-stack { margin: 0; min-height: 6.3rem; }
.inspection-hive-build .inspection-hive-stack .hive-stack-caption { display: none; }
.inspection-build-summary { align-content: center; display: grid; gap: .2rem; min-width: 0; }
.inspection-build-summary .eyebrow { margin: 0; }
.inspection-build-summary > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inspection-build-counts { align-items: center; display: flex; flex-wrap: wrap; gap: .32rem; }
.inspection-build-counts b { background: var(--paper-deep); border-radius: 999px; font-size: .76rem; line-height: 1; padding: .35rem .45rem; white-space: nowrap; }
.inspection-build-summary .hint { font-size: .78rem; line-height: 1.25; margin: .05rem 0 0; }
.inspection-build-open { justify-self: start; margin-top: .2rem; min-height: 2.25rem; padding-inline: .65rem; }
.inspection-build-empty { margin: 0; }
@media (max-width: 520px) {
    .inspection-module-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inspection-module-button { font-size: .8rem; min-width: 0; padding-inline: .5rem; }
    .inspection-hive-build { grid-template-columns: minmax(6.7rem, .76fr) minmax(0, 1.24fr); }
}

/* The command center needs every operational metric on-screen during a quick
   phone check. Older dashboard styling made this row a scroll rail. */
@media (max-width: 720px) {
    .bees-dashboard .bee-quick-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-items: stretch;
    }
    .bees-dashboard .bee-quick-actions a {
        align-items: center;
        display: flex;
        justify-content: center;
        line-height: 1.15;
        min-height: 2.7rem;
        text-align: center;
        white-space: normal;
    }
    .bees-dashboard .bee-quick-actions a:first-child { grid-column: 1 / -1; }
    .bee-command-metrics {
        grid-auto-columns: unset;
        grid-auto-flow: row;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
        overscroll-behavior-inline: auto;
        scroll-snap-type: none;
    }
    .bee-command-metric {
        border-left: 1px solid var(--line-soft);
        min-height: 4.7rem;
        scroll-snap-align: none;
    }
    .bee-command-metric:nth-child(odd) { border-left: 0; }
    .bee-command-metric:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
}

/* Bees operations polish: keep the command panel balanced when optional
   metrics are absent, and use quiet status accents instead of alarm colors. */
.bees-dashboard .bee-quick-actions {
    align-items: stretch;
    gap: .5rem;
}

.bees-dashboard .bee-quick-actions a {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    line-height: 1.15;
    min-height: 2.55rem;
    text-align: center;
}

.bees-dashboard .bee-quick-actions .button-link {
    box-shadow: 0 2px 0 rgba(24, 24, 23, .12);
}

.bees-dashboard .bee-quick-actions .bee-action-button {
    background: var(--card);
}

.bees-dashboard .bee-quick-actions .bee-action-button:hover,
.bees-dashboard .bee-quick-actions .bee-action-button:focus-visible {
    background: var(--field);
}

.bees-dashboard .bee-command-metrics {
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
}

.bees-dashboard .bee-command-metric {
    min-width: 0;
}

.bees-dashboard .bee-command-metric.tone-current { border-left-color: var(--green); }
.bees-dashboard .bee-command-metric.tone-due { border-left-color: #B38415; }
.bees-dashboard .bee-command-metric.tone-attention { border-left-color: var(--red); }

/* Recency is a watch signal, not a failure state. Action recommendations
   remain amber while a genuinely overdue or explicit concern stays red. */
.bees-dashboard .bee-hive-card.status-due { border-left-color: var(--blue); }
.bees-dashboard .hive-stack-graphic.status-due { border-bottom-color: var(--blue); }
.bees-dashboard .bee-hive-card.status-attention { border-left-color: var(--red); }
.bees-dashboard .hive-stack-graphic.status-attention { border-bottom-color: var(--red); }
.bees-dashboard .hive-action-inspect.status-current { border-color: rgba(62, 100, 67, .55) !important; }
.bees-dashboard .hive-action-inspect.status-due { border-color: rgba(79, 102, 130, .7) !important; }
.bees-dashboard .hive-action-inspect.status-attention { border-color: rgba(155, 48, 44, .72) !important; }
.bees-dashboard .bee-hive-glance-card.care-due:not(.tone-attention) { border-bottom-color: var(--blue); }
.bees-dashboard .bee-hive-glance-card.care-due:not(.tone-attention) .hive-glance-topline i { background: var(--blue); }

@media (max-width: 720px) {
    .bees-dashboard .bee-command-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bees-dashboard .bee-command-metric {
        min-height: 4.7rem;
    }
}

/* Shared home dashboard polish: data-led, compact, and intentionally quieter
   than a marketing mockup. These rules sit last so the real responsive layouts
   retain their component-specific geometry. */
.module-dashboard-section .section-heading { margin-bottom: .7rem; }
.module-dashboard-card {
    border-left-width: 3px;
    box-shadow: 0 2px 10px rgba(24, 24, 23, .045);
    gap: .62rem;
    padding: .92rem;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.module-dashboard-card:hover,
.module-dashboard-card:focus-within { box-shadow: 0 7px 18px rgba(24, 24, 23, .09); transform: translateY(-1px); }
.module-dashboard-heading { gap: .5rem; }
.module-dashboard-heading .tag { margin: 0; }
.module-dashboard-heading > span:last-child {
    background: rgba(79, 102, 130, .09);
    border-radius: 999px;
    color: var(--steel);
    font-size: .65rem;
    letter-spacing: .045em;
    padding: .26rem .42rem;
    text-transform: uppercase;
}
.module-dashboard-card.status-ok .module-dashboard-heading > span:last-child { background: rgba(62, 100, 67, .1); color: var(--green); }
.module-dashboard-card.status-attention .module-dashboard-heading > span:last-child { background: rgba(155, 48, 44, .1); color: var(--red); }
.module-dashboard-card > strong { letter-spacing: 0; }
.module-dashboard-metrics {
    background: rgba(243, 236, 217, .52);
    border: 1px solid rgba(215, 209, 197, .8);
    border-radius: 7px;
    display: grid;
    gap: 0;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    padding: 0;
}
.module-dashboard-metrics span { align-items: baseline; color: var(--muted); display: flex; font-size: .7rem; font-weight: 780; gap: .25rem; line-height: 1.15; min-width: 0; padding: .45rem .5rem; }
.module-dashboard-metrics span + span { border-left: 1px solid rgba(215, 209, 197, .9); }
.module-dashboard-metrics b { font-size: 1rem; line-height: 1; white-space: nowrap; }
.module-dashboard-actions { display: block; }
.module-dashboard-actions .module-dashboard-primary,
.module-dashboard-actions .module-dashboard-primary:visited {
    align-items: center;
    background: var(--surface);
    border-color: var(--surface);
    border-radius: 7px;
    color: #fffdf8 !important;
    display: flex;
    font-size: .8rem;
    justify-content: center;
    min-height: 2.45rem;
    padding: .45rem .7rem;
    text-align: center;
    text-decoration: none;
}
.module-dashboard-actions .module-dashboard-primary:hover,
.module-dashboard-actions .module-dashboard-primary:focus-visible { background: var(--charcoal); border-color: var(--charcoal); box-shadow: 0 2px 0 rgba(24, 24, 23, .16); color: #fffdf8 !important; outline: none; }
.dashboard-technical-section.headline-grid { gap: .8rem; }
.dashboard-technical-section .layout-headline-card,
.dashboard-technical-section .weather-card { box-shadow: 0 2px 10px rgba(24, 24, 23, .04); }
@media (min-width: 900px) { .module-dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) {
    .module-dashboard-metrics span { font-size: .66rem; padding: .42rem; }
    .module-dashboard-metrics b { font-size: .92rem; }
    .module-dashboard-card:hover { transform: none; }
}

/* Home dashboard support cards: financials, equipment, and inventory each
   summarize a different job, while sharing the same compact card language. */
.module-dashboard-card:has(.module-financial-summary) {
    border-left-color: var(--blue);
}
.module-dashboard-card:has(.module-financial-summary) .module-dashboard-heading > span:last-child {
    color: var(--blue);
}
.module-financial-summary {
    align-items: stretch;
    background: rgba(243, 236, 217, .46);
    border: 1px solid rgba(215, 209, 197, .78);
    border-radius: 8px;
    display: grid;
    gap: .55rem;
    grid-template-columns: minmax(6.4rem, .82fr) minmax(0, 1.4fr);
    padding: .65rem .7rem;
}
.module-financial-net {
    align-content: center;
    border-right: 1px solid rgba(215, 209, 197, .9);
    display: grid;
    gap: .12rem;
    min-width: 0;
    padding-right: .65rem;
}
.module-financial-net span,
.module-financial-labor {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 780;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.module-financial-net b {
    color: var(--ink);
    font-size: clamp(1.1rem, 4vw, 1.45rem);
    line-height: 1.05;
    overflow-wrap: anywhere;
}
.module-financial-bars { display: grid; gap: .42rem; min-width: 0; }
.module-financial-bars > div { display: grid; gap: .2rem; min-width: 0; }
.module-financial-bars span { align-items: baseline; display: flex; gap: .35rem; justify-content: space-between; min-width: 0; }
.module-financial-bars b,
.module-financial-bars strong { font-size: .7rem; line-height: 1.1; }
.module-financial-bars b { color: var(--muted); font-weight: 780; }
.module-financial-bars strong { color: var(--ink); overflow-wrap: anywhere; text-align: right; }
.module-financial-bars i {
    background: var(--blue);
    border-radius: 999px;
    display: block;
    height: .32rem;
    min-width: .32rem;
}
.module-financial-bars i.is-income { background: var(--green); }
.module-financial-bars i.is-expense { background: var(--orange); }
.module-financial-labor { grid-column: 1 / -1; letter-spacing: .02em; text-transform: none; }
.module-dashboard-card:has(.module-financial-summary) .module-dashboard-metrics { display: none; }
.module-dashboard-card:has(.module-financial-summary) .module-dashboard-actions,
.module-dashboard-card:has(.module-financial-summary) .module-dashboard-actions .module-dashboard-primary { width: 100%; }
.module-dashboard-card:has(.module-financial-summary) .module-dashboard-actions .module-dashboard-primary::before { content: ''; }
.module-dashboard-actions .module-dashboard-secondary,
.module-dashboard-actions .module-dashboard-secondary:visited {
    align-items: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--ink) !important;
    display: flex;
    font-size: .76rem;
    font-weight: 820;
    justify-content: center;
    min-height: 2.25rem;
    padding: .4rem .65rem;
    text-align: center;
    text-decoration: none;
}
.module-dashboard-actions .module-dashboard-secondary:hover,
.module-dashboard-actions .module-dashboard-secondary:focus-visible {
    background: var(--field);
    border-color: var(--ink);
    color: var(--ink) !important;
    outline: none;
}
.module-dashboard-card:has(.module-dashboard-secondary) .module-dashboard-actions { display: grid; gap: .4rem; grid-template-columns: minmax(0, 1.45fr) minmax(0, .9fr); }
.module-dashboard-card[data-card-url$="/inventory/"] { border-left-color: var(--green); }
.module-dashboard-card[data-card-url$="/inventory/"] .module-dashboard-heading > span:last-child { color: var(--green); }
@media (max-width: 520px) {
    .module-financial-summary { grid-template-columns: minmax(5.7rem, .8fr) minmax(0, 1.5fr); padding: .58rem; }
    .module-financial-net { padding-right: .5rem; }
    .module-financial-net b { font-size: 1.12rem; }
}

/* Planting detail polish: keep the read-only record calm, contained, and
   consistent with the shared YFS button and status language. */
.planting-detail-page .planting-detail-actions {
    gap: .5rem;
    min-width: 10.5rem;
}

.planting-detail-page .planting-detail-actions .primary-button,
.planting-detail-page .planting-detail-actions .secondary-button {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    font-size: .84rem;
    font-weight: 850;
    justify-content: center;
    min-height: 2.75rem;
    padding: .5rem .75rem;
    text-align: center;
    text-decoration: none;
    width: 100%;
}

.planting-detail-page .planting-detail-actions .secondary-button,
.planting-detail-page .planting-detail-actions .secondary-button:visited,
.planting-detail-page .planting-detail-section .secondary-button,
.planting-detail-page .planting-detail-section .secondary-button:visited,
.planting-detail-page .planting-detail-footer-actions .secondary-button,
.planting-detail-page .planting-detail-footer-actions .secondary-button:visited {
    background: var(--field);
    border: 1px solid var(--line);
    color: var(--ink) !important;
}

.planting-detail-page .planting-detail-actions .secondary-button:hover,
.planting-detail-page .planting-detail-actions .secondary-button:focus-visible,
.planting-detail-page .planting-detail-section .secondary-button:hover,
.planting-detail-page .planting-detail-section .secondary-button:focus-visible,
.planting-detail-page .planting-detail-footer-actions .secondary-button:hover,
.planting-detail-page .planting-detail-footer-actions .secondary-button:focus-visible {
    background: var(--paper-deep);
    border-color: var(--steel);
    color: var(--ink) !important;
}

.planting-detail-page .detail-section-heading .secondary-button {
    flex: 0 0 auto;
    min-height: 2.25rem;
    padding: .35rem .65rem;
}

.planting-detail-page .detail-lifecycle-step i {
    background: #E8E3D9;
    border: 1px solid #D5CFC3;
}

.planting-detail-page .detail-lifecycle-step.is-complete i {
    background: var(--green);
    border-color: var(--green);
}

.planting-detail-page .detail-lifecycle-step.is-current i {
    background: var(--orange);
    border-color: var(--orange);
}

.planting-detail-page .detail-lifecycle-step.is-future i {
    background: #E8E3D9;
    border-color: #D5CFC3;
    box-shadow: none;
}

.planting-detail-page .planting-detail-section {
    padding: .9rem;
}

.planting-detail-page .detail-section-heading {
    margin-bottom: .65rem;
    padding-bottom: .55rem;
}

.planting-detail-page .planting-detail-footer-actions {
    align-items: stretch;
    display: grid;
    gap: .6rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.planting-detail-page .planting-detail-footer-actions .secondary-button {
    min-height: 2.55rem;
    padding: .45rem .7rem;
}

.planting-detail-page .planting-detail-footer-actions .danger-link,
.planting-detail-page .planting-detail-footer-actions .danger-link:visited {
    background: var(--red);
    border: 1px solid var(--red);
    color: #FFFDF8 !important;
    font-weight: 850;
}

.planting-detail-page .planting-detail-footer-actions .danger-link:hover,
.planting-detail-page .planting-detail-footer-actions .danger-link:focus-visible {
    background: #7F2825;
    border-color: #7F2825;
    color: #FFFDF8 !important;
}

.planting-detail-page .detail-section-heading a,
.planting-detail-page .lifecycle-guidance a,
.planting-detail-page .detail-empty-state a,
.planting-detail-page .detail-history-row a {
    text-decoration: none;
}

.planting-detail-page .detail-scale-context {
    align-items: center;
    background: var(--paper-deep);
    border: 1px solid var(--line-soft);
    border-left: 3px solid var(--steel);
    border-radius: 8px;
    display: grid;
    gap: .15rem .55rem;
    grid-template-columns: minmax(0, 1fr) auto;
    margin: .7rem 0 0;
    padding: .6rem .7rem;
}

.planting-detail-page .detail-scale-context span {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.planting-detail-page .detail-scale-context strong {
    color: var(--ink);
    font-size: .9rem;
    grid-column: 1;
}

.planting-detail-page .detail-scale-context .secondary-button {
    grid-column: 2;
    grid-row: 1 / span 2;
}

/* Individual seed stock grows on demand; empty editor slots should never add noise. */
.seed-lot-unit-card > header {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    margin-bottom: .35rem;
}

.seed-lot-unit-card > header h3 { margin: 0; }

.seed-lot-unit-remove {
    align-items: center;
    color: var(--muted);
    display: inline-flex;
    font-size: .86rem;
    gap: .35rem;
}

.seed-lot-unit-actions {
    align-items: center;
    flex-wrap: wrap;
}

.seed-lot-unit-actions .secondary-button,
.seed-lot-unit-actions .button-link {
    text-decoration: none;
}

.seed-lot-unit-actions #add-seed-lot-unit {
    border-color: var(--orange);
}

.seed-lot-consolidate-form {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: .75rem;
}

/* Keep crop-module controls on the same rounded, touch-friendly system. */
.crop-module-shell button,
.crop-module-shell .button-link,
.crop-module-shell .secondary-button,
.crop-module-shell .crop-record-action,
.crop-module-shell .crop-inline-action {
    border-radius: 8px;
    min-height: 2.65rem;
}

.crop-module-shell .crop-record-row nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.record-form button,
.record-form .button-link,
.record-form .secondary-button,
.form-heading-actions .secondary-button {
    border-radius: 8px;
    min-height: 2.65rem;
}

/* A planting detail can combine links, form controls, and sensor actions. Keep
   every actionable element on the same YFS control shape regardless of source. */
.planting-detail-page a.secondary-button,
.planting-detail-page a.button-link,
.planting-detail-page button,
.planting-detail-page .detail-section-heading > a,
.planting-detail-page .detail-empty-state > a {
    border-radius: 8px !important;
}

/* Seed stock is inventory with provenance, not a compressed generic record row. */
.crop-seed-lot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crop-seed-lot-grid .crop-record-row--seed {
    align-items: start;
    grid-template-columns: 3.5rem minmax(0, 1fr) auto;
    min-height: 0;
}

.crop-seed-lot-grid .crop-record-row--seed .crop-record-visual {
    align-self: center;
    min-height: 4.1rem;
    width: 3.5rem;
}

.crop-seed-lot-identity {
    display: grid;
    gap: .24rem;
    min-width: 0;
}

.crop-seed-lot-identity strong,
.crop-seed-lot-identity small {
    overflow-wrap: anywhere;
}

.crop-seed-lot-identity strong {
    font-size: 1.05rem;
    line-height: 1.2;
}

.crop-seed-lot-identity small {
    font-size: .82rem;
}

.crop-seed-lot-quantity {
    align-self: center;
    background: var(--paper-deep);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    padding: .48rem .58rem;
    text-align: right;
}

.crop-seed-lot-grid .crop-record-row--seed nav {
    grid-column: 2 / -1;
    margin-top: .15rem;
}

.crop-seed-lot-grid .crop-record-row--seed nav form { margin: 0; }

@media (max-width: 1040px) {
    .crop-seed-lot-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
    .planting-detail-page .planting-detail-actions {
        gap: .4rem;
    }

    .planting-detail-page .planting-detail-actions .primary-button,
    .planting-detail-page .planting-detail-actions .secondary-button {
        min-height: 2.6rem;
    }

    .planting-detail-page .detail-lifecycle-track {
        gap: .42rem .3rem;
    }

    .crop-seed-lot-grid .crop-record-row--seed {
        grid-template-columns: 3.2rem minmax(0, 1fr);
    }

    .crop-seed-lot-grid .crop-record-row--seed .crop-record-visual {
        min-height: 3.5rem;
        width: 3.2rem;
    }

    .crop-seed-lot-quantity {
        grid-column: 2;
        justify-self: start;
        text-align: left;
    }

    .crop-seed-lot-grid .crop-record-row--seed nav {
        grid-column: 1 / -1;
        width: 100%;
    }

    .crop-seed-lot-grid .crop-record-row--seed nav > * { flex: 1 1 8rem; }
}

@media (max-width: 420px) {
    .planting-detail-page .planting-detail-footer-actions {
        grid-template-columns: 1fr;
    }
}

/* Final sensor workspace overrides (kept after shared module styles). */
.sensor-page { box-sizing: border-box; max-width: 1120px; min-width: 0; width: 100%; }
.sensor-page *, .sensor-page *::before, .sensor-page *::after { box-sizing: border-box; min-width: 0; }
.sensor-page-heading, .sensor-scale-header { align-items: center; background: var(--card); border: 1px solid var(--line-soft); border-radius: 12px; box-shadow: 0 7px 20px rgba(24,24,23,.04); padding: 1rem 1.15rem; }
.sensor-scale-header { border-left: 5px solid var(--orange); }
.sensor-scale-header h2, .sensor-page-heading h2 { color: var(--ink); font-size: clamp(1.35rem, 2.2vw, 1.85rem); line-height: 1.08; }
.sensor-assignment span { color: var(--ink); font-weight: 800; }
.sensor-operation-panel { border-left: 5px solid var(--green); box-shadow: 0 10px 26px rgba(24,24,23,.05); padding: 1.1rem 1.15rem; }
.sensor-operation-panel.is-disconnected { border-left-color: var(--steel); }
.sensor-operation-panel.is-needs-attention { border-left-color: var(--orange); }
.sensor-status-grid { border: 0; gap: .55rem; grid-template-columns: minmax(14rem,1.45fr) repeat(3,minmax(8rem,1fr)); }
.sensor-status-grid article, .sensor-status-grid article + article { background: var(--paper-deep); border: 1px solid var(--line-soft); border-radius: 8px; min-height: 4.6rem; padding: .72rem .78rem; }
.sensor-status-grid .sensor-primary-reading { background: var(--surface); border-color: var(--surface); grid-row: span 2; min-height: 9.8rem; }
.sensor-status-grid .sensor-primary-reading span, .sensor-status-grid .sensor-primary-reading small { color: rgba(255,255,255,.74); }
.sensor-status-grid .sensor-primary-reading strong { color: #fff; font-size: clamp(2.15rem,5vw,3.65rem); letter-spacing: -.045em; line-height: 1; margin-top: auto; }
.sensor-status-grid strong { font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.sensor-status-grid small { color: var(--muted); display: block; font-size: .73rem; line-height: 1.25; }
.sensor-workspace-actions { align-items: center; border-top: 1px solid var(--line-soft); display: flex; gap: 1rem; justify-content: space-between; margin-top: .85rem; padding-top: .9rem; }
.sensor-workspace-actions h3 { color: var(--ink); font-size: 1.05rem; margin: 0; }
.sensor-workspace-actions p:not(.eyebrow) { color: var(--muted); font-size: .82rem; margin: .16rem 0 0; }
.sensor-primary-actions .primary-button { box-shadow: 0 3px 0 rgba(24,24,23,.16); }
.sensor-utility-action { border-style: dashed !important; }
.sensor-live-message { background: var(--paper-deep); border-radius: 6px; margin-bottom: 0; padding: .55rem .7rem; }
.sensor-section-heading { align-items: center; display: flex; justify-content: space-between; margin-bottom: .8rem; }
.sensor-section-heading h3 { color: var(--ink); font-size: 1.15rem; margin: 0; }
.sensor-section-note { color: var(--muted); font-size: .74rem; font-weight: 800; }
.sensor-configuration-section { padding: 1rem 1.15rem; }
.sensor-configuration-grid { display: grid; gap: .7rem; grid-template-columns: repeat(2,minmax(0,1fr)); }
.sensor-configuration-card { background: var(--paper-deep); border: 1px solid var(--line-soft); border-radius: 8px; padding: .8rem; }
.sensor-configuration-card .sensor-panel-heading { margin-bottom: .5rem; }
.sensor-maintenance-section, .sensor-advanced-section, .sensor-technical-details { overflow: hidden; }
.sensor-maintenance-section > summary, .sensor-technical-details > summary, .sensor-advanced-section > summary { align-items: center; background: var(--paper-deep); border: 0; border-radius: 7px; display: flex; justify-content: space-between; min-height: 3rem; padding: .55rem .7rem; text-align: left; }
.sensor-maintenance-section > summary > span:first-child, .sensor-technical-details > summary > span:first-child { display: grid; gap: .1rem; }
.sensor-maintenance-section summary small, .sensor-technical-details summary small { color: var(--muted); font-size: .73rem; font-weight: 600; }
.sensor-maintenance-section summary > span:last-child, .sensor-technical-details summary > span:last-child { color: var(--orange); font-size: 1.25rem; }
.sensor-firmware-notice { align-items: center; grid-template-columns: auto minmax(0,1fr) auto; }
.sensor-compact-empty { background: var(--paper-deep); border-style: dashed; color: var(--muted); font-size: .86rem; }
.sensor-technical-details .sensor-raw-section { border: 0; border-radius: 0; padding: .8rem 0 0; }
.sensor-technical-details .sensor-raw-section .sensor-panel-heading { display: none; }
.sensor-technical-details .table-wrap { max-width: 100%; overflow-x: auto; }
.sensor-technical-details table { font-variant-numeric: tabular-nums; min-width: 38rem; }
.sensor-technical-details th, .sensor-technical-details td { white-space: nowrap; }
.sensor-device-card { border-left-width: 5px; box-shadow: 0 5px 16px rgba(24,24,23,.035); grid-template-columns: minmax(0,1fr) minmax(9rem,auto) auto auto; }
.sensor-device-state { align-items: start; display: grid; gap: .08rem; }
.sensor-device-state strong { color: var(--green); font-size: .78rem; }
.sensor-device-state small { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.sensor-status-dot { background: var(--green); border-radius: 50%; height: .52rem; width: .52rem; }
.sensor-status-dot.is-idle { background: var(--muted); }
.equipment-settings-entry { background: var(--card); border-left: 5px solid var(--steel); box-shadow: 0 6px 18px rgba(24,24,23,.04); padding: 1rem 1.15rem; }
.equipment-settings-entry .section-heading { align-items: center; display: grid; gap: 1rem; grid-template-columns: minmax(0,1fr) auto; }
.equipment-settings-entry h3 { color: var(--ink); margin: 0; }
.equipment-settings-entry p:not(.eyebrow) { color: var(--muted); max-width: 42rem; }
.equipment-entry-action { background: var(--surface); border-color: var(--surface); color: var(--paper) !important; font-weight: 850; padding-inline: 1rem; }
.equipment-entry-action:hover, .equipment-entry-action:focus-visible { background: #34342f; border-color: #34342f; color: var(--paper) !important; }
.sensor-page ~ .legal-footer a { color: var(--ink); font-weight: 750; text-decoration-color: var(--line); }
.sensor-page ~ .legal-footer a:hover, .sensor-page ~ .legal-footer a:focus-visible { color: var(--orange); }
@media (max-width: 900px) {
    .sensor-status-grid { grid-template-columns: minmax(13rem,1.3fr) repeat(2,minmax(8rem,1fr)); }
    .sensor-device-card { grid-template-columns: minmax(0,1fr) minmax(9rem,auto) auto; }
    .sensor-device-actions { grid-column: 1 / -1; justify-self: end; }
}
@media (max-width: 720px) {
    .sensor-page { gap: .7rem; padding-inline: .65rem; }
    .sensor-page-heading, .sensor-scale-header { align-items: stretch; padding: .85rem; }
    .sensor-header-actions, .sensor-connect-panel { align-items: stretch; width: 100%; }
    .sensor-connect-panel .primary-button { width: 100%; }
    .sensor-status-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .sensor-status-grid .sensor-primary-reading { grid-column: 1 / -1; grid-row: auto; min-height: 8.2rem; }
    .sensor-workspace-actions { align-items: stretch; display: grid; gap: .7rem; }
    .sensor-primary-actions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
    .sensor-primary-actions .primary-button { grid-column: 1 / -1; }
    .sensor-primary-actions > * { min-width: 0; width: 100%; }
    .sensor-configuration-grid { grid-template-columns: 1fr; }
    .sensor-firmware-notice { grid-template-columns: 1fr; }
    .sensor-device-card { grid-template-columns: minmax(0,1fr) auto; padding: .85rem; }
    .sensor-device-state { grid-column: 2; grid-row: 1; }
    .sensor-device-meta { grid-column: 1 / -1; width: 100%; }
    .sensor-device-meta div { border-left: 0; padding-left: 0; }
    .sensor-device-actions { grid-column: 1 / -1; grid-template-columns: minmax(0,1fr) minmax(0,.75fr); min-width: 0; width: 100%; }
    .sensor-page ~ .legal-footer { flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
    .equipment-settings-entry .section-heading { grid-template-columns: 1fr; }
}

/* Shared module design foundation.
   Modules keep their own operational visuals, but their page shell, hierarchy,
   controls, and status language should not drift. */
:root {
    --yfs-radius-control: 8px;
    --yfs-radius-panel: 10px;
    --yfs-control-height: 2.65rem;
    --yfs-page-gutter: clamp(.8rem, 2.5vw, 2rem);
    --yfs-module-gap: clamp(.8rem, 2vw, 1.35rem);
    --yfs-focus-ring: 3px solid rgba(79, 102, 130, .78);
}

.yfs-module-shell {
    box-sizing: border-box;
    margin-inline: auto;
    max-width: 1120px;
    min-width: 0;
    width: min(1120px, calc(100% - (var(--yfs-page-gutter) * 2)));
}

.yfs-module-shell *,
.yfs-module-shell *::before,
.yfs-module-shell *::after {
    min-width: 0;
}

.yfs-module-header {
    align-items: flex-end;
    border-bottom: 1px solid var(--line-soft);
    display: flex;
    gap: var(--yfs-module-gap);
    justify-content: space-between;
    margin-bottom: 1.1rem;
    padding: .15rem 0 .85rem;
}

.yfs-module-header > :first-child { min-width: 0; }

.yfs-module-header h2 {
    color: var(--ink);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    letter-spacing: 0;
    line-height: 1.08;
    margin: .12rem 0 0;
}

.yfs-module-header .eyebrow {
    margin: 0 0 .15rem;
}

.yfs-module-actions {
    align-items: stretch;
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    justify-content: flex-end;
}

.yfs-module-actions > a,
.yfs-module-actions > button {
    align-items: center;
    border-radius: var(--yfs-radius-control);
    display: inline-flex;
    justify-content: center;
    min-height: var(--yfs-control-height);
    padding: .52rem .82rem;
    text-align: center;
    text-decoration: none;
}

.yfs-module-actions > a:focus-visible,
.yfs-module-actions > button:focus-visible,
.yfs-module-shell a:focus-visible,
.yfs-module-shell button:focus-visible {
    outline: var(--yfs-focus-ring);
    outline-offset: 2px;
}

.yfs-section-heading {
    align-items: end;
    border-bottom: 1px solid var(--line-soft);
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    margin: 0 0 .75rem;
    padding: 0 0 .65rem;
}

.yfs-section-heading h3 {
    border: 0;
    color: var(--ink);
    font-size: 1.15rem;
    letter-spacing: 0;
    margin: .1rem 0 0;
    padding: 0;
    text-transform: none;
}

.yfs-status-chip {
    align-items: center;
    border: 1px solid currentColor;
    border-radius: 999px;
    display: inline-flex;
    font-size: .76rem;
    font-weight: 850;
    gap: .3rem;
    line-height: 1.1;
    padding: .34rem .55rem;
    white-space: nowrap;
}

.yfs-status-chip.status-current { background: #F4F8F0; color: var(--green); }
.yfs-status-chip.status-due { background: #FFF8E9; color: #946A1F; }
.yfs-status-chip.status-watch { background: #F0F4F8; color: var(--steel); }
.yfs-status-chip.status-attention { background: #FCF0ED; color: var(--danger); }

@media (max-width: 720px) {
    .yfs-module-shell { width: calc(100% - 1rem); }
    .yfs-module-header { align-items: stretch; flex-direction: column; gap: .7rem; }
    .yfs-module-actions { justify-content: stretch; }
    .yfs-module-actions > a,
    .yfs-module-actions > button { flex: 1 1 9.5rem; }
    .yfs-section-heading { align-items: flex-start; }
}

/* Final home composition override: this lives after legacy dashboard rules. */
body > header { padding-block: .7rem; }
body header .app-header-top { align-items: center; display: flex !important; gap: .7rem; justify-content: space-between; }
body header .site-title.brand-wordmark { font-size: clamp(1.35rem, 2.8vw, 1.8rem) !important; }
body header .site-nav-menu { margin: 0; width: auto; }
body header .site-nav-menu > summary { min-height: 2.4rem; padding: .5rem .7rem; }
body header .site-nav-menu[open] { margin-top: .45rem; width: min(100%, 42rem); }
body header .site-nav-menu nav { align-items: start; display: grid; gap: .55rem; grid-template-columns: minmax(0, 1fr); }
.site-nav-group { display: grid; gap: .38rem; }
.site-nav-primary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.site-nav-operations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.site-nav-admin { border-top: 1px solid rgba(255,253,248,.18); grid-template-columns: repeat(3, minmax(0,1fr)); padding-top: .55rem; }
body header .site-nav-menu nav a,
body header .site-nav-menu nav button,
body header .site-nav-menu .logout-form button { border-radius: 7px; min-height: 2.5rem; padding: .46rem .55rem; }
.site-nav-primary a:first-child { background: var(--paper) !important; color: var(--ink) !important; }
.site-nav-account { color: rgba(255,253,248,.72); font-size: .73rem; grid-column: 1 / -1; overflow-wrap: anywhere; padding: .15rem .15rem 0; }
.site-nav-admin .logout-form { margin: 0; }
body header .farm-session-bar { align-items: center; border-top: 1px solid rgba(255,253,248,.14); gap: .45rem; margin-top: .15rem; padding-top: .45rem; }
body header .farm-session-bar form { gap: .3rem; }
body header .farm-session-bar label { font-size: .64rem; }
body header .farm-session-bar select { min-height: 2rem; }
body header .farm-session-bar .userline,
body header .farm-session-bar > a { display: none; }

.mobile-home-title { align-items: end; display: flex; gap: 1rem; justify-content: space-between; margin-bottom: .7rem; }
.mobile-home-title h2 { font-size: clamp(1.35rem,3.5vw,2rem); }
.mobile-home-title .eyebrow { margin: 0 0 .05rem; }
.dashboard-view-switcher { display: inline-grid; gap: .3rem; grid-template-columns: repeat(3,minmax(0,1fr)); width: min(21rem,58%); }
.dashboard-view-switcher a { align-items: center; border-radius: 7px; display: inline-flex; font-size: .78rem; justify-content: center; min-height: 2.25rem; padding: .35rem .45rem; text-decoration: none; }

.dashboard-technical-section.dashboard-weather-first { margin-bottom: .75rem; max-width: 1120px; }
.dashboard-weather-first .weather-card { border-left-width: 4px; padding: .75rem .85rem; }
.dashboard-weather-first .weather-card-header { margin-bottom: .4rem; }
.dashboard-weather-first .weather-body { gap: .45rem; }
.dashboard-weather-first .weather-location-note { font-size: .72rem; margin: .15rem 0 0; }
.dashboard-weather-first .forecast-strip { gap: .28rem; }
.dashboard-weather-first .forecast-strip > div { min-height: 0; padding: .32rem; }
.dashboard-weather-first .classic-weather-outlook { margin-top: .42rem; }

.module-dashboard-section { margin-bottom: .75rem; }
.module-dashboard-section .section-heading { align-items: center; margin-bottom: .5rem; }
.module-dashboard-section .section-heading h3 { font-size: 1.05rem; }
.module-dashboard-grid { gap: .6rem; }
.module-dashboard-card { gap: .42rem; padding: .72rem .78rem; }
.module-dashboard-heading { gap: .45rem; }
.module-dashboard-heading .tag { font-size: .61rem; padding: .2rem .34rem; }
.module-dashboard-heading > span:last-child { font-size: .67rem; }
.module-dashboard-card > strong { font-size: 1.03rem; }
.module-dashboard-card > p { -webkit-box-orient: vertical; -webkit-line-clamp: 2; display: -webkit-box; font-size: .78rem; line-height: 1.25; overflow: hidden; }
.module-dashboard-metrics { font-size: .75rem; gap: .24rem .6rem; padding: .38rem 0; }
.module-dashboard-metrics span { padding: .1rem 0; }
.module-dashboard-actions { display: flex; gap: .42rem; grid-template-columns: none; }
.module-dashboard-actions .module-dashboard-primary,
.module-dashboard-actions .module-dashboard-secondary { flex: 0 1 auto; min-height: 2.25rem; padding-inline: .72rem; width: auto; }
.module-dashboard-actions .module-dashboard-primary { min-width: 8.4rem; }
.module-dashboard-card:has(.module-dashboard-secondary) .module-dashboard-actions { display: flex; grid-template-columns: none; }
.module-dashboard-card:has(.module-dashboard-secondary) .module-dashboard-actions .module-dashboard-primary { width: auto; }
.module-dashboard-card.status-ok { border-left-width: 3px; }
.module-dashboard-card.status-attention { border-left-width: 4px; }
.module-bee-pulse,
.module-crop-command,
.module-tree-pulse,
.module-poultry-pulse,
.module-livestock-pulse { min-height: 0; }

.dashboard-layout-preview { margin-top: .25rem; }
.dashboard-layout-preview .layout-headline-card { padding: .72rem .78rem; }
.dashboard-layout-preview .section-heading { align-items: center; margin-bottom: .45rem; }
.dashboard-layout-preview .section-heading h3 { font-size: 1rem; }
.dashboard-layout-preview .section-heading .eyebrow { margin: 0 0 .08rem; }
.dashboard-layout-preview .layout-thumbnail-link { height: clamp(92px,17vw,142px); }
.dashboard-layout-preview .farm-layout-thumb { transform: scale(1.05); }
.dashboard-layout-preview .layout-mini-key { font-size: .66rem; gap: .3rem .55rem; margin-top: .42rem; }
.dashboard-layout-preview .layout-open-action { min-height: 2.15rem; padding: .38rem .6rem; }
.dashboard-followup-strip { border: 1px solid var(--line-soft); border-radius: 9px; gap: .6rem; padding: .65rem .75rem; }
.dashboard-followup-strip strong { font-size: .95rem; }
.dashboard-followup-strip span { font-size: .75rem; }
.dashboard-followup-strip nav { gap: .35rem; }
.dashboard-followup-strip a { border-radius: 7px; font-size: .76rem; min-height: 2.15rem; padding: .35rem .55rem; }
.offline-capture-panel { margin-top: .25rem; }
.offline-capture-panel > summary { min-height: 2.6rem; padding: .5rem .65rem; }
.offline-capture-panel > summary strong { font-size: .74rem; }
.legal-footer { margin-top: 1rem; padding: .7rem 1rem; }
.legal-footer a { color: var(--ink); font-weight: 750; text-decoration-color: var(--line); text-underline-offset: .16em; }
.legal-footer a:hover,
.legal-footer a:focus-visible { color: var(--orange); text-decoration-color: currentColor; }

@media (min-width: 721px) {
    .dashboard-weather-first,
    .dashboard-layout-preview { width: calc(100% - 2rem); }
    .module-dashboard-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .dashboard-layout-preview .layout-thumbnail-link { height: 145px; }
}

@media (max-width: 720px) {
    body { padding-bottom: calc(4rem + env(safe-area-inset-bottom)); }
    body > header { gap: .35rem; padding: calc(.5rem + env(safe-area-inset-top)) .7rem .5rem; }
    body header .app-header-top { width: 100%; }
    body header .site-title.brand-wordmark { font-size: clamp(1.28rem,6vw,1.7rem) !important; }
    body header .site-nav-menu { width: auto; }
    body header .site-nav-menu > summary { min-height: 2.25rem; padding: .4rem .58rem; }
    body header .site-nav-menu[open] { margin-top: .35rem; width: 100%; }
    body header .site-nav-menu nav { gap: .42rem; }
    .site-nav-primary,
    .site-nav-operations,
    .site-nav-admin { grid-template-columns: repeat(2,minmax(0,1fr)); }
    body header .site-nav-menu nav a,
    body header .site-nav-menu nav button,
    body header .site-nav-menu .logout-form button { font-size: .79rem; min-height: 2.5rem; }
    body header .farm-session-bar { display: flex; margin-top: 0; padding-top: .35rem; }
    body header .farm-session-bar form { flex: 1 1 auto; }
    body header .farm-session-bar select { max-width: none; width: 100%; }
    .mobile-home-title { align-items: start; margin: .1rem auto .55rem; }
    .mobile-home-title h2 { font-size: clamp(1.25rem,6vw,1.6rem); }
    .dashboard-view-switcher { flex: 0 0 auto; width: min(54%,13.5rem); }
    .dashboard-view-switcher a { font-size: .7rem; min-height: 2.15rem; padding: .32rem; }
    .dashboard-weather-first .weather-card { padding: .68rem .72rem; }
    .dashboard-weather-first .weather-sky-mark { transform: scale(.92); transform-origin: right center; }
    .dashboard-weather-first .forecast-strip { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .dashboard-weather-first .forecast-strip > div { font-size: .64rem; }
    .dashboard-weather-first .forecast-strip strong { font-size: .82rem; }
    .module-dashboard-card { padding: .68rem .7rem; }
    .module-dashboard-card > p { display: none; }
    .module-dashboard-actions .module-dashboard-primary { min-width: 0; }
    .module-dashboard-actions .module-dashboard-primary,
    .module-dashboard-actions .module-dashboard-secondary { flex: 1 1 0; }
    .dashboard-layout-preview .layout-thumbnail-link { height: 94px; }
    .dashboard-layout-preview .layout-mini-key { display: none; }
    .dashboard-followup-strip { align-items: stretch; display: grid; }
    .dashboard-followup-strip nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .dashboard-followup-strip a { text-align: center; }
    body .floating-timer-action { bottom: calc(.55rem + env(safe-area-inset-bottom)) !important; right: .55rem !important; z-index: 120; }
    body .floating-timer-action button { font-size: .78rem !important; min-height: 2.35rem !important; padding: .5rem .72rem !important; }
}

/* Final home-dashboard refinement override. */
.bee-harvest-form input[type="datetime-local"] { box-sizing: border-box; max-width: 100%; min-width: 0; width: 100%; }
.bee-harvest-form .form-field:has(input[type="datetime-local"]) { min-width: 0; overflow: hidden; }
.bee-harvest-form .two-field-grid { min-width: 0; }
.bee-harvest-form .two-field-grid > * { min-width: 0; }
.apiary-inspection-timer-status { align-items: center; display: inline-flex; min-height: 2.3rem; }
body > header { padding-block: .48rem; }
body header .app-header-top { gap: .5rem; }
body header .site-title.brand-wordmark { font-size: clamp(1.28rem, 2.5vw, 1.65rem) !important; }
body header .site-nav-menu > summary { min-height: 2.2rem; padding: .4rem .62rem; }
body header .site-nav-menu[open] { margin-top: .3rem; }
body header .site-nav-menu nav { gap: .6rem; }
.site-nav-group { gap: .28rem; }
.site-nav-group-label { color: rgba(255,253,248,.65); display: block; font-size: .62rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.site-nav-primary, .site-nav-operations, .site-nav-admin { display: flex; flex-wrap: wrap; grid-template-columns: none; }
.site-nav-primary .site-nav-group-label, .site-nav-operations .site-nav-group-label, .site-nav-admin .site-nav-group-label { flex-basis: 100%; }
body header .site-nav-menu nav a, body header .site-nav-menu nav button, body header .site-nav-menu .logout-form button { flex: 0 1 auto; min-height: 2.18rem; padding: .34rem .52rem; }
.site-nav-admin { border-top-color: rgba(255,253,248,.14); padding-top: .42rem; }
.site-nav-account { max-width: min(100%, 26rem); overflow: hidden; padding: .1rem 0; text-overflow: ellipsis; white-space: nowrap; }
body header .farm-session-bar { margin-top: .05rem; padding-top: .3rem; }
body header .farm-session-bar label { display: none; }
body header .farm-session-bar select { min-height: 1.9rem; }
.mobile-home-title { margin-bottom: .38rem; }
.mobile-home-title h2 { line-height: 1.08; }
.dashboard-view-switcher { display: none !important; }
.dashboard-technical-section.dashboard-weather-first { margin-bottom: .58rem; }
.dashboard-weather-first .weather-card, .dashboard-weather-first .weather-card.warn { border-left-color: var(--line-soft) !important; border-left-width: 1px; padding: .62rem .72rem; }
.dashboard-weather-first .weather-card-header { margin-bottom: .25rem; }
.dashboard-weather-first .weather-body { gap: .28rem; }
.dashboard-weather-first .weather-primary-metrics { gap: .5rem; }
.dashboard-weather-first .forecast-strip { gap: .2rem; }
.dashboard-weather-first .forecast-strip > div { padding: .26rem .3rem; }
.dashboard-weather-first .classic-weather-outlook { margin-top: .28rem; }
.module-dashboard-section { margin-top: .1rem; }
.module-dashboard-section > .section-heading { display: none; }
.module-dashboard-grid { gap: .52rem; }
.module-dashboard-card { gap: .34rem; padding: .66rem .7rem; }
.module-dashboard-card > strong { line-height: 1.12; }
.module-dashboard-card > p { margin: 0; }
.module-dashboard-heading { margin-bottom: .02rem; }
.module-dashboard-metrics { border-top-color: var(--line-soft); padding: .3rem 0; }
.module-dashboard-actions { margin-top: .04rem; }
.module-crop-command { align-items: center; gap: .28rem .5rem; grid-template-columns: minmax(4.5rem, 7.25rem) auto minmax(0,1fr); }
.module-crop-command-visuals { align-items: center; display: flex; grid-row: span 2; isolation: isolate; min-width: 4.5rem; padding: .06rem .15rem; }
.module-crop-command-visual { align-items: center; background: #f6f0df; border: 1px solid #e4d8bc; border-radius: 50%; display: grid; height: 3.65rem; justify-content: center; margin-left: -.72rem; overflow: hidden; position: relative; width: 3.65rem; }
.module-crop-command-visual:first-child { margin-left: 0; z-index: 4; }
.module-crop-command-visual:nth-child(2) { z-index: 3; }.module-crop-command-visual:nth-child(3) { z-index: 2; }.module-crop-command-visual:nth-child(4) { z-index: 1; }
.module-crop-command-visual .crop-visual { height: 3.4rem; margin: 0; width: 3.4rem; }
.module-crop-command-read { align-self: end; }.module-crop-command-read b { font-size: 1.35rem; }
.module-crop-command-state { align-self: end; border-top: 0; display: grid; gap: .08rem; grid-column: auto; padding: 0; }
.module-crop-command-state b { font-size: .82rem; }.module-crop-command-state span { font-size: .72rem; text-transform: capitalize; }
.module-crop-command-priority { border-top: 1px solid var(--line-soft); font-size: .78rem; margin-top: .12rem; padding-top: .35rem; }
.module-tree-pulse { gap: .4rem; grid-template-columns: 2.35rem auto minmax(0,1fr); padding: .38rem .48rem; }
.module-tree-pulse-art { transform: scale(.9); transform-origin: center; }.module-tree-pulse-state { gap: .04rem; }
.dashboard-layout-preview { margin-top: .45rem; }.dashboard-layout-preview .layout-headline-card { padding: .62rem .7rem .7rem; }
.dashboard-layout-preview .section-heading { align-items: center; display: flex; justify-content: space-between; margin-bottom: .5rem; }
.dashboard-layout-preview .section-heading h3 { font-size: .98rem; line-height: 1.1; }
.dashboard-layout-preview .layout-thumbnail-link { height: clamp(185px, 53vw, 260px); }.dashboard-layout-preview .farm-layout-thumb { transform: scale(1.08); }
.dashboard-layout-preview .layout-mini-key { margin-top: .34rem; }
.dashboard-followup-strip { margin-top: .55rem; padding: .55rem .65rem; }.dashboard-followup-strip > div { gap: .05rem; }.dashboard-followup-strip span { line-height: 1.25; }
.offline-capture-panel { margin-top: .35rem; }.offline-capture-panel > summary { min-height: 2.35rem; }.legal-footer { margin-top: .58rem; padding-bottom: calc(.7rem + env(safe-area-inset-bottom)); }
.bee-hive-card.status-current, .hive-stack-graphic.status-current, .module-bee-pulse-hive.status-current { --bee-status: var(--green); }
.bee-hive-card.status-watch, .hive-stack-graphic.status-watch, .module-bee-pulse-hive.status-watch { --bee-status: var(--steel); }
.bee-hive-card.status-due, .hive-stack-graphic.status-due, .module-bee-pulse-hive.status-due { --bee-status: #b68227; }
.bee-hive-card.status-attention, .hive-stack-graphic.status-attention, .module-bee-pulse-hive.status-attention { --bee-status: var(--red); }
.bee-hive-card.status-current, .bee-hive-card.status-watch, .bee-hive-card.status-due, .bee-hive-card.status-attention { border-left-color: var(--bee-status); }
.care-status-pill.status-current, .care-status-pill.status-watch, .care-status-pill.status-due, .care-status-pill.status-attention { border-color: color-mix(in srgb, var(--bee-status) 42%, white); color: var(--bee-status); }
.module-bee-pulse-hive.status-watch { border-bottom-color: var(--steel); }.module-bee-pulse-hive.status-watch b { background: rgba(85,111,133,.24); }
@media (max-width: 720px) {
    body > header { padding: calc(.38rem + env(safe-area-inset-top)) .65rem .42rem; }
    body header .site-nav-menu[open] { width: 100%; }
    .site-nav-primary, .site-nav-operations, .site-nav-admin { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .site-nav-group-label, .site-nav-primary .site-nav-group-label, .site-nav-operations .site-nav-group-label, .site-nav-admin .site-nav-group-label, .site-nav-account { grid-column: 1 / -1; }
    body header .site-nav-menu nav a, body header .site-nav-menu nav button, body header .site-nav-menu .logout-form button { min-height: 2.35rem; text-align: left; width: 100%; }
    .site-nav-admin .logout-form { display: block; }.mobile-home-title { margin: .08rem auto .35rem; }
    .dashboard-weather-first .weather-card { padding: .58rem .64rem; }.dashboard-weather-first .forecast-strip { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .module-crop-command { grid-template-columns: 4.2rem auto minmax(0,1fr); }.module-crop-command-visuals { min-width: 4.2rem; }
    .module-crop-command-visual { height: 3.35rem; margin-left: -1.05rem; width: 3.35rem; }.module-crop-command-visual:nth-child(n+3) { display: none; }.module-crop-command-visual .crop-visual { height: 3.1rem; width: 3.1rem; }
    .module-crop-command-state b { font-size: .77rem; }.module-crop-command-state span { font-size: .68rem; }
    .dashboard-layout-preview .layout-thumbnail-link { height: clamp(190px, 58vw, 245px); }
    body .floating-timer-action { bottom: calc(.4rem + env(safe-area-inset-bottom)) !important; right: .4rem !important; }
    body .floating-timer-action button { font-size: .74rem !important; min-height: 2.15rem !important; padding: .42rem .62rem !important; }
}
