: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;
}

.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);
}

.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) {
    .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;
}

/* 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; }
@media (prefers-reduced-motion: no-preference) { .weather-sun { animation: weather-sun-glow 5s ease-in-out infinite; } .weather-sky-mark.rain-likely .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;
}

.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;
    }
}

/* 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));
    }
}

/* 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-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;
}

.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;
}
/* 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;
}

.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;
    }
}

/* 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); }
.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-stock { display: grid; justify-items: end; text-align: right; white-space: nowrap; }

/* 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-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));
    }
}
