/* Farm modules lead the dashboard and navigation at launch. */
.module-dashboard-section > .section-heading { display:flex; }
.module-dashboard-section > .section-heading p { margin:.12rem 0 0; }

/* Links are controls in YFS, not a separate blue brand accent. Keep status
   blue available for weather/data indicators, but never use it for text links. */
.quiet-link,
.quiet-link:visited { color:var(--ink) !important; text-decoration-color:var(--orange); text-decoration-line:underline; text-underline-offset:.16em; }
.quiet-link:hover,
.quiet-link:focus-visible { color:var(--orange) !important; }

/* Remove the browser-like blue text-link treatment everywhere. YFS links use
   ink as their default and orange only for interaction; blue remains available
   for non-link data/status indicators. */
body a:not(.button-link):not(.primary-button):not(.secondary-button):not(.danger-button):not(.module-dashboard-primary):not(.module-dashboard-secondary):not(.crop-view-tab):not(.task-primary-action) { color:var(--ink) !important; }
body a:not(.button-link):not(.primary-button):not(.secondary-button):not(.danger-button):not(.module-dashboard-primary):not(.module-dashboard-secondary):not(.crop-view-tab):not(.task-primary-action):hover,
body a:not(.button-link):not(.primary-button):not(.secondary-button):not(.danger-button):not(.module-dashboard-primary):not(.module-dashboard-secondary):not(.crop-view-tab):not(.task-primary-action):focus-visible { color:var(--orange) !important; }
body header a { color:var(--paper) !important; }
body header a:hover,
body header a:focus-visible { color:var(--orange) !important; }

/* The generic link rule above is intentionally broad for legacy content. Crop
   module tabs and the shared back control are dark-surface controls, though,
   so they must retain their explicit high-contrast foregrounds. */
.crop-module-shell .crop-view-nav a[aria-current="page"],
.crop-module-shell .crop-view-nav a[aria-current="page"]:visited,
.crop-module-shell .crop-view-nav-more.is-current summary {
    color: #fffdf8 !important;
}

.crop-module-shell .crop-view-nav a,
.crop-module-shell .crop-view-nav-more summary {
    line-height: 1.1;
}

body header .app-back-button,
body header .app-back-button:visited {
    align-items: center;
    background: #fffdf8 !important;
    border: 1px solid #fffdf8 !important;
    border-radius: 7px !important;
    color: #181817 !important;
    display: inline-flex;
    font-size: .82rem;
    font-weight: 850;
    gap: .28rem;
    min-height: 2.1rem !important;
    padding: .32rem .55rem !important;
    text-decoration: none;
}

body header .app-back-button:hover,
body header .app-back-button:focus-visible {
    background: #f3eadb !important;
    border-color: #e87535 !important;
    color: #181817 !important;
}

body header .app-back-button::before {
    content: none !important;
}

body header .app-back-button > span {
    color: var(--orange);
    font-size: 1.3rem;
    font-weight: 900;
    line-height: .8;
}

/* This stylesheet is loaded last. Keep the area-history control light and
   readable instead of letting the older dark-first-action rule win. */
.crop-module-shell .crop-area-grid .crop-record-row nav a:first-child,
.crop-module-shell .crop-area-grid .crop-record-row nav a:first-child:visited {
    background: #edf4ea !important;
    border-color: #6c865f !important;
    color: #213123 !important;
}
.crop-module-shell .crop-area-grid .crop-record-row nav a:first-child:hover,
.crop-module-shell .crop-area-grid .crop-record-row nav a:first-child:focus-visible {
    background: #e1eddc !important;
    border-color: var(--orange) !important;
    color: #181817 !important;
}

.crop-water-volume {
    background: var(--field);
    border: 1px solid var(--line-soft);
    border-radius: 7px;
    margin-top: .55rem;
    padding: .45rem .55rem;
}
.crop-water-volume > summary { color: var(--ink); cursor: pointer; font-weight: 800; }
.crop-water-volume .form-field { margin-top: .55rem; }

/* First-record activation is a temporary orientation aid, not a task queue.
   Each enabled area gets only its next meaningful record, and disappears once
   real history exists. */
.dashboard-activation-panel {
    border-bottom: 1px solid var(--line-soft);
    border-top: 1px solid var(--line-soft);
    display: grid;
    gap: .85rem;
    padding: .9rem 0;
}

.dashboard-activation-heading {
    align-items: start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.dashboard-activation-heading h3 { margin: .1rem 0; }
.dashboard-activation-heading p { color: var(--muted); margin: 0; max-width: 44rem; }

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

.dashboard-activation-step {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 9px;
    display: grid;
    gap: .42rem;
    padding: .75rem;
}

.dashboard-activation-step > strong { color: var(--ink); font-size: 1rem; }
.dashboard-activation-step > p { color: var(--muted); font-size: .84rem; line-height: 1.35; margin: 0; }
.dashboard-activation-step > div { align-items: center; display: flex; flex-wrap: wrap; gap: .65rem; margin-top: .2rem; }
.dashboard-activation-step .button-link { min-height: 2.15rem; }

@media (max-width: 620px) {
    .dashboard-activation-heading { align-items: start; flex-direction: column; gap: .4rem; }
    .dashboard-activation-grid { grid-template-columns: 1fr; }
}

/* Needs Attention has one direct next step.  Keep that action visibly a
   button instead of letting the generic link rule reduce it to loose text. */
.task-card-actions-compact > .task-primary-action,
.task-card-actions-compact > .task-primary-action:visited {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--surface);
    border-radius: 6px;
    color: #fffdf8 !important;
    display: inline-flex;
    justify-content: center;
    min-height: 2.35rem;
    padding: .42rem .58rem;
    text-align: center;
    text-decoration: none;
}

.task-card-actions-compact > .task-primary-action:hover,
.task-card-actions-compact > .task-primary-action:focus-visible {
    background: var(--charcoal);
    border-color: var(--charcoal);
    color: #fffdf8 !important;
}

/* Weather is infrastructure, but its condition and risk state still need a
   quick visual read. The shared stylesheet deliberately makes it compact; the
   home dashboard restores this small amount of meaningful visual hierarchy. */
.dashboard-weather-first .weather-card,
.dashboard-weather-first .weather-card.warn {
    background:linear-gradient(135deg,#f1f6ec 0%,#fffdf8 64%);
    border-left-color:var(--green) !important;
    border-left-width:4px;
}
.dashboard-weather-first .weather-card.warn {
    background:linear-gradient(135deg,#fff4e4 0%,#fffdf8 64%);
    border-left-color:var(--orange) !important;
}
.dashboard-weather-first .weather-sky-mark {
    background:linear-gradient(145deg,#e8f1f6,#f8edcf);
    border:1px solid rgba(85,111,133,.18);
    border-radius:999px;
    flex-basis:4rem;
    height:3.2rem;
    margin-left:auto;
    padding:.18rem;
    width:4rem;
}
.site-nav-tools { position:relative; }
.site-nav-tools > summary {
    align-items:center;
    border:1px solid rgba(255,253,248,.24);
    border-radius:7px;
    color:#fffdf8;
    cursor:pointer;
    display:flex;
    font-size:.78rem;
    font-weight:800;
    list-style:none;
    min-height:2.15rem;
    padding:.35rem .5rem;
}
.site-nav-tools > summary::-webkit-details-marker { display:none; }
.site-nav-tools > summary::after { content:'+'; margin-left:.4rem; }
.site-nav-tools[open] > summary::after { content:'−'; }

@media (min-width:721px) {
    body > header { align-items:center !important; display:grid !important; gap:.45rem 1rem !important; grid-template-columns:auto minmax(0,1fr) !important; }
    body header .app-header-top { grid-column:1; }
    body header .site-nav-menu { grid-column:2; margin:0 !important; min-width:0; width:100%; }
    body header .site-nav-menu > summary { display:none !important; }
    body header .site-nav-menu > nav { align-items:center !important; display:flex !important; gap:.4rem !important; justify-content:flex-end; padding:0 !important; }
    body header .site-nav-primary { display:flex !important; flex-wrap:wrap; gap:.28rem; justify-content:flex-end; }
    body header .site-nav-tools > .site-nav-more-content {
        background:var(--charcoal);
        border:1px solid rgba(255,253,248,.18);
        border-radius:9px;
        box-shadow:0 12px 30px rgba(0,0,0,.28);
        display:grid !important;
        gap:.65rem;
        grid-template-columns:repeat(2,minmax(10rem,1fr));
        padding:.7rem;
        position:absolute;
        right:0;
        top:calc(100% + .4rem);
        width:min(34rem,75vw);
        z-index:300;
    }
    body header .site-nav-more-content .site-nav-group { align-content:start; display:grid !important; gap:.28rem; grid-template-columns:1fr; }
    body header .site-nav-more-content .site-nav-admin { border:0; padding:0; }
    body header .site-nav-menu nav a,
    body header .site-nav-menu nav button,
    body header .site-nav-menu .logout-form button { min-height:2.15rem; padding:.35rem .5rem; white-space:nowrap; }
    body header .farm-session-bar { grid-column:1 / -1; width:100%; }
}

@media (max-width:720px) {
    body header .site-nav-menu[open] nav { display:grid !important; gap:.5rem !important; grid-template-columns:1fr !important; }
    body header .site-nav-primary { display:grid !important; gap:.35rem; grid-template-columns:repeat(2,minmax(0,1fr)) !important; width:100%; }
    body header .site-nav-tools { width:100%; }
    body header .site-nav-tools > summary { justify-content:space-between; width:100%; }
    body header .site-nav-tools > .site-nav-more-content {
        border-top:1px solid rgba(255,253,248,.15);
        display:grid !important;
        gap:.6rem;
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
        margin-top:.5rem;
        padding-top:.55rem;
    }
    body header .site-nav-more-content > .site-nav-group { align-content:start; display:grid !important; gap:.25rem; grid-template-columns:1fr !important; min-width:0; }
    body header .site-nav-more-content .site-nav-admin { border:0; padding:0; }
    body header .site-nav-menu nav a,
    body header .site-nav-menu nav button,
    body header .site-nav-menu .logout-form button { font-size:.75rem; justify-content:flex-start !important; min-height:2.15rem; padding:.38rem .45rem; text-align:left; }
    /* The main farm areas are the dashboard's primary choices. Keep every one
       in the normal reading flow instead of making a user discover them by
       sideways scrolling. */
    .module-dashboard-grid {
        display:grid !important;
        gap:.6rem;
        grid-template-columns:minmax(0,1fr);
        margin-inline:0;
        overflow:visible;
        padding:0;
        scroll-snap-type:none;
    }
    .module-dashboard-card { max-width:100%; min-width:0; scroll-snap-align:none; width:100%; }

    /* These are the same cards on public and authenticated dashboards. Let
       their content breathe instead of creating a separate mobile rendering. */
    .module-dashboard-card > p {
        display:-webkit-box !important;
        line-height:1.35;
        overflow:hidden;
        -webkit-box-orient:vertical;
        -webkit-line-clamp:2;
    }
    .module-dashboard-metrics.dashboard-stat-row {
        display:grid !important;
        grid-template-columns:minmax(0, .85fr) minmax(0, 1.35fr) minmax(0, 1.1fr) !important;
        overflow:visible;
    }
    .module-dashboard-metrics.dashboard-stat-row--crops {
        grid-template-columns:minmax(0, .75fr) minmax(0, 1.1fr) minmax(0, 1.45fr) !important;
    }
    .module-dashboard-metrics .dashboard-stat-cell {
        align-items:center;
        display:grid;
        grid-template-columns:minmax(0, 1fr);
        justify-items:center;
        min-width:0;
        padding:.5rem .72rem;
        text-align:center;
    }
    .module-dashboard-metrics .dashboard-stat-cell small {
        overflow-wrap:normal;
        white-space:normal;
        word-break:normal;
    }
    .module-dashboard-metrics .dashboard-stat-cell + .dashboard-stat-cell { border-left:1px solid rgba(215, 209, 197, .95) !important; }
    .module-dashboard-actions { align-items:stretch; flex-wrap:wrap; }
    .module-dashboard-actions a { flex:1 1 9rem; min-width:0; white-space:normal; }
    .dashboard-layout-header { align-items:flex-start; flex-wrap:wrap; }
    .dashboard-layout-preview .layout-open-action {
        flex:1 1 12rem;
        max-width:100%;
        overflow-wrap:normal;
        text-align:center;
        white-space:normal;
    }

}

/* Planner: compact decisions up front, with a true date-axis view alongside it. */
.planner-page-shell { display:grid; gap:1rem; }
.planner-page-actions, .planner-operation-actions, .planner-individual-actions { align-items:center; display:flex; flex-wrap:wrap; gap:.45rem; }
.planner-page-actions a { white-space:nowrap; }
.planner-view-switcher { background:#1d211d; border:1px solid #080a08; border-radius:9px; display:inline-flex; padding:.22rem; width:max-content; }
.planner-view-switcher a { border-radius:6px; color:#fffaf0; font-size:.82rem; font-weight:800; padding:.5rem .8rem; text-decoration:none; }
.planner-view-switcher a[aria-current="page"] { background:var(--orange); color:#171411; }
.planner-section-heading, .planner-catchup > header { align-items:end; display:flex; gap:1rem; justify-content:space-between; }
.planner-section-heading h3, .planner-catchup h3 { margin:.08rem 0 0; }
.planner-section-count, .planner-catchup > header > span { color:var(--muted); font-size:.75rem; font-weight:800; }
.planner-agenda, .planner-suggestions-panel, .planner-linear, .planner-catchup { background:var(--panel); border:1px solid var(--line-soft); border-radius:11px; display:grid; gap:.72rem; padding:.9rem; }
.planner-agenda-list, .planner-suggestion-list { display:grid; gap:.45rem; }
.planner-agenda-item { align-items:center; background:#fbf7ed; border:1px solid var(--line-soft); border-left:4px solid #989084; border-radius:8px; color:var(--ink); display:grid; gap:.12rem .75rem; grid-template-columns:minmax(7.5rem,.55fr) minmax(12rem,2fr) auto; padding:.62rem .72rem; text-decoration:none; }
.planner-agenda-item:hover, .planner-suggestion-main:hover { border-color:var(--orange); transform:translateY(-1px); }
.planner-agenda-item.tone-urgent { border-left-color:#a1362b; }
.planner-agenda-item.tone-now, .planner-agenda-item.tone-soon { border-left-color:var(--orange); }
.planner-agenda-item.tone-soft { border-left-color:#9b8a6c; }
.planner-agenda-meta, .planner-suggestion-date, .planner-suggestion-copy { display:grid; gap:.08rem; }
.planner-agenda-meta time { font-size:.73rem; font-weight:900; text-transform:uppercase; }
.planner-domain { color:#665f54; font-size:.65rem; font-weight:900; letter-spacing:.05em; text-transform:uppercase; }
.planner-agenda-item > strong, .planner-suggestion-copy > strong { font-size:.9rem; }
.planner-agenda-item > small, .planner-suggestion-copy > small { color:var(--muted); font-size:.73rem; line-height:1.35; }
.planner-item-open { color:#7a3d10; font-size:.72rem; font-weight:900; white-space:nowrap; }
.planner-page-shell .planner-catchup { background:#f6f0e4; border-color:#d8cdbc; color:var(--ink); gap:.55rem; padding:.72rem .8rem; }
.planner-page-shell .planner-catchup > header { align-items:start; border-bottom:1px solid #d8cdbc; color:var(--ink); gap:.6rem; padding-bottom:.45rem; }
.planner-page-shell .planner-catchup h3,
.planner-page-shell .planner-catchup .eyebrow,
.planner-page-shell .planner-catchup > header > span { color:var(--ink) !important; }
.planner-page-shell .planner-catchup-context { color:#625b50 !important; margin-top:.14rem; }
.planner-page-shell .planner-catchup > div { display:grid; gap:.32rem; }
.planner-page-shell .planner-catchup > div a { align-items:center; background:#fffaf0; border:1px solid #d8cdbc; border-radius:7px; color:var(--ink) !important; display:flex; gap:.55rem; justify-content:space-between; padding:.42rem .52rem; text-decoration:none; }
.planner-page-shell .planner-catchup > div a span { color:var(--ink); font-size:.7rem; }
.planner-page-shell .planner-catchup > div a small { color:#625b50 !important; }
.planner-page-shell .planner-catchup > div a > b { color:#5d3d25 !important; }
.planner-suggestion { background:#fbf7ed; border:1px solid var(--line-soft); border-radius:9px; overflow:hidden; }
.planner-suggestion-main { align-items:center; color:var(--ink); display:grid; gap:.8rem; grid-template-columns:6rem minmax(0,1fr) auto; padding:.7rem; text-decoration:none; transition:.15s ease; }
.planner-suggestion-date strong { font-family:var(--font-display); font-size:1.05rem; }
.planner-suggestion-date small { color:var(--muted); font-size:.68rem; }
.planner-operation-actions { border-top:1px solid var(--line-soft); padding:.48rem .7rem; }
.planner-operation-actions button { min-height:2rem; padding:.32rem .55rem; }
.planner-operation-actions .text-button { color:#70411f; }
.planner-individual-suggestions { border-top:1px solid var(--line-soft); padding:.5rem .7rem; }
.planner-individual-suggestions summary { color:#5d3d25; cursor:pointer; font-size:.75rem; font-weight:800; }
.planner-individual-suggestion { align-items:center; display:flex; gap:.7rem; justify-content:space-between; padding:.45rem 0; }
.planner-individual-suggestion > div:first-child { display:grid; }
.planner-individual-suggestion small { color:var(--muted); }
.planner-season-empty, .planner-quiet-empty { background:#eee7da; border-radius:8px; color:var(--muted); display:grid; gap:.2rem; margin:0; padding:.7rem; }
.planner-season-empty .primary-button { margin-top:.25rem; width:max-content; }

.planner-timeline-filters { align-items:end; background:#eee7da; border-radius:9px; display:grid; gap:.7rem; grid-template-columns:auto minmax(10rem,.7fr) minmax(18rem,1.4fr) auto; padding:.72rem; }
.planner-timeline-filters fieldset { border:0; margin:0; padding:0; }
.planner-timeline-filters legend, .planner-timeline-filters > label { color:#494137; display:grid; font-size:.69rem; font-weight:900; gap:.25rem; text-transform:uppercase; }
.planner-timeline-filters select { min-height:2.35rem; }
.planner-segmented-control { background:#1d211d; border:2px solid #1d211d; border-radius:7px; display:flex; overflow:hidden; }
.planner-segmented-control label { cursor:pointer; margin:0; }
.planner-segmented-control input { height:1px; opacity:0; position:absolute; width:1px; }
.planner-segmented-control span { color:#fffaf0; display:block; font-size:.75rem; font-weight:900; padding:.5rem .62rem; }
.planner-segmented-control input:checked + span { background:var(--orange); color:#171411; }
.planner-segmented-control input:focus-visible + span { outline:2px solid #fff; outline-offset:-3px; }
.planner-state-filters { display:flex; flex-wrap:wrap; gap:.35rem .7rem; }
.planner-state-filters label { color:var(--ink); font-size:.72rem; font-weight:700; text-transform:none; }
.planner-timeline-scroll { border:1px solid #cfc4b1; border-radius:9px; overflow-x:auto; overscroll-behavior-inline:contain; }
.planner-timeline-canvas { background:#fbf7ed; min-width:780px; }
.planner-timeline-canvas.scale-year { min-width:1120px; }
.planner-axis, .planner-lane { display:grid; grid-template-columns:9rem minmax(0,1fr); }
.planner-axis { background:#1d211d; color:#fffaf0; min-height:2.6rem; }
.planner-lane-label { align-items:center; border-right:1px solid rgba(127,111,89,.35); display:flex; font-size:.72rem; font-weight:900; margin:0; padding:.55rem .65rem; }
.planner-axis-track { position:relative; }
.planner-axis-track time { color:#fffaf0; font-size:.62rem; left:var(--left); position:absolute; top:.75rem; transform:translateX(-50%); white-space:nowrap; }
.planner-lane { border-top:1px solid #ded4c5; min-height:calc(var(--tracks) * 3.1rem + .5rem); }
.planner-lane-track { background-image:repeating-linear-gradient(to right,transparent 0,transparent calc(10% - 1px),rgba(94,80,60,.09) calc(10% - 1px),rgba(94,80,60,.09) 10%); position:relative; }
.planner-window { border:1px solid #74522f; border-radius:6px; color:#211c16; display:grid; gap:.02rem; left:var(--left); max-width:calc(100% - var(--left)); min-width:3.8rem; overflow:hidden; padding:.3rem .42rem; position:absolute; text-decoration:none; top:calc(.3rem + var(--track) * 3.1rem); width:var(--width); }
.planner-window strong { font-size:.67rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.planner-window small { font-size:.58rem; opacity:.72; }
.planner-window.state-planned { background:#f5a34a; }
.planner-window.state-suggested { background:#f6e2a6; border-style:dashed; }
.planner-window.state-completed { background:#b9cbb4; border-color:#53694f; }
.planner-window.state-anchor { background:#282d28; border-color:#101210; color:#fffaf0; }
.planner-year-key { display:flex; flex-wrap:wrap; gap:.8rem; margin:0; }
.planner-year-key span { align-items:center; display:flex; font-size:.68rem; font-weight:800; gap:.3rem; }
.planner-year-key span::before { background:currentColor; border:1px solid currentColor; border-radius:3px; content:""; height:.65rem; width:.9rem; }

@media (max-width:720px) {
    .planner-page-heading, .planner-section-heading, .planner-catchup > header { align-items:stretch; display:grid; gap:.35rem; }
    .planner-page-actions { display:grid; gap:.35rem; grid-template-columns:repeat(3,minmax(0,1fr)); width:100%; }
    .planner-page-actions a,
    .planner-page-actions a:first-child { font-size:.69rem; grid-column:auto; min-height:2.2rem; padding:.35rem .25rem; text-align:center; white-space:normal; }
    .planner-view-switcher { display:grid; grid-template-columns:1fr 1fr; width:100%; }
    .planner-view-switcher a { text-align:center; }
    .planner-page-shell .planner-agenda { gap:.5rem; padding:.72rem; }
    .planner-page-shell .planner-agenda-list { gap:.35rem; }
    .planner-page-shell .planner-agenda-item { align-items:center; gap:.2rem .55rem; grid-template-columns:minmax(0,1fr) auto; padding:.52rem .58rem; }
    .planner-page-shell .planner-agenda-meta { align-items:center; display:flex; flex-wrap:wrap; gap:.28rem; grid-column:1; grid-row:1; min-width:0; }
    .planner-page-shell .planner-agenda-meta time,
    .planner-page-shell .planner-agenda-meta .planner-domain { background:#eee7da; border:1px solid #d8cdbc; border-radius:999px; color:#625b50 !important; display:inline-flex; font-size:.64rem; font-weight:850; letter-spacing:.015em; line-height:1.15; margin:0; max-width:100%; padding:.2rem .38rem; text-transform:none; width:max-content; }
    .planner-page-shell .planner-agenda-item > strong { grid-column:1; grid-row:2; line-height:1.22; min-width:0; }
    .planner-page-shell .planner-agenda-item .planner-item-open { align-items:center; background:transparent; color:#5d3d25 !important; display:inline-flex; font-size:0; grid-column:2; grid-row:1 / span 2; min-height:2rem; padding:.15rem; }
    .planner-page-shell .planner-agenda-item .planner-item-open b { font-size:1rem; line-height:1; }
    .planner-agenda-item > small { display:none; }
    .planner-page-shell .planner-suggestions-panel { gap:.55rem; padding:.72rem; }
    .planner-page-shell .planner-suggestion-list { gap:.35rem; }
    .planner-page-shell .planner-suggestion { overflow:visible; padding:.45rem 0; }
    .planner-page-shell .planner-suggestion-main { align-items:start; display:grid; gap:.22rem; grid-template-columns:minmax(0,1fr); padding:.5rem .58rem .42rem; }
    .planner-page-shell .planner-suggestion-date { align-items:baseline; border:0; color:#625b50; display:flex; flex-wrap:wrap; gap:.24rem; min-height:0; padding:0; }
    .planner-page-shell .planner-suggestion-date strong,
    .planner-page-shell .planner-suggestion-date small { background:transparent; border:0; border-radius:0; color:#625b50 !important; display:inline; font-family:inherit; font-size:.66rem; font-weight:800; line-height:1.2; padding:0; }
    .planner-page-shell .planner-suggestion-date small::before { content:'Window '; font-weight:700; }
    .planner-page-shell .planner-suggestion-copy { gap:.14rem; padding:0; }
    .planner-page-shell .planner-suggestion-copy .planner-domain { background:transparent; border:0; border-radius:0; color:#476243 !important; display:inline; font-size:.64rem; justify-self:start; letter-spacing:.025em; margin:0; padding:0; text-transform:uppercase; width:auto; }
    .planner-page-shell .planner-suggestion-copy > strong { font-size:.94rem; line-height:1.22; }
    .planner-page-shell .planner-suggestion-copy > small:not(.planner-anchor-note) { font-size:.72rem; line-height:1.25; }
    .planner-page-shell .planner-anchor-note { border-left:0; color:#625b50 !important; font-size:.68rem !important; line-height:1.22; margin-top:.04rem !important; padding-left:0; }
    .planner-page-shell .planner-suggestion-main .planner-item-open { display:none; }
    .planner-page-shell .planner-operation-actions { align-items:center; border-top:0; display:flex; gap:.3rem; justify-content:flex-end; margin-top:0; padding:0 .58rem .48rem; }
    .planner-page-shell .planner-operation-actions > form { flex:0 0 auto; width:auto; }
    .planner-page-shell .planner-operation-actions button { font-size:.7rem; min-height:1.8rem; padding:.24rem .42rem; width:auto; }
    .planner-page-shell .planner-suggestion-options > summary { font-size:.7rem; padding:.26rem .42rem; }
    .planner-timeline-filters { align-items:stretch; grid-template-columns:1fr; }
    .planner-state-filters { display:grid; grid-template-columns:1fr 1fr; }
    .planner-timeline-canvas { min-width:700px; }
    .planner-timeline-canvas.scale-year { min-width:1020px; }
    .planner-axis, .planner-lane { grid-template-columns:7rem minmax(0,1fr); }
    .planner-lane-label { background:inherit; left:0; position:sticky; z-index:3; }
}

.pricing-usage-note { color:var(--muted); font-size:.82rem; margin-top:.8rem; }
.pricing-usage-note summary { cursor:pointer; font-weight:800; }
.pricing-usage-note p { margin:.45rem 0 0; max-width:62rem; }

/* Pro is a practical extension of the farm record, not a separate product.
   These small cues explain the benefit at the point it is encountered without
   turning ordinary work into an upgrade interruption. */
.pro-value-grid { display:grid; gap:.7rem; grid-template-columns:repeat(2,minmax(0,1fr)); }
.pro-value-item { background:linear-gradient(145deg,#fffdf8,#f8f1e3); border:1px solid var(--line-soft); border-left:3px solid var(--orange); border-radius:9px; padding:.82rem .9rem; }
.pro-value-item h4 { font-size:1rem; margin:.42rem 0 .22rem; }
.pro-value-item p { color:var(--muted); font-size:.88rem; line-height:1.42; margin:0; }
.pro-included-label { background:var(--charcoal); border-radius:999px; color:#fffdf8; display:inline-block; font-size:.68rem; font-weight:800; letter-spacing:.05em; line-height:1; padding:.34rem .48rem; text-transform:uppercase; vertical-align:middle; }
.pro-feature-heading { align-items:center; color:var(--muted); display:flex; flex-wrap:wrap; font-size:.8rem; gap:.38rem .55rem; justify-content:flex-end; }
.pro-feature-link { align-items:center; display:inline-flex; flex-wrap:wrap; gap:.35rem .48rem; line-height:1.3; max-width:20rem; text-decoration:none; }
.pro-feature-link:hover .tag, .pro-feature-link:focus-visible .tag { background:var(--orange); color:var(--ink); }
@media (max-width:720px) {
    .pro-value-grid { grid-template-columns:1fr; }
    .pro-feature-heading { align-items:flex-start; justify-content:flex-start; margin-top:.25rem; }
    .pro-feature-link { max-width:none; }
}

/* Dashboard refinement: let each module visual carry the repeated status,
   then reserve the smaller metric rail for information the visual cannot say. */
.module-dashboard-card { gap:.36rem; padding:.68rem .74rem; }
.module-dashboard-card > p { margin:0; }
.module-dashboard-card .module-dashboard-metrics { margin-top:.06rem; }
.module-dashboard-card .module-dashboard-actions { margin-top:.04rem; }
.module-dashboard-card:has(.module-bee-pulse),
.module-dashboard-card:has(.module-poultry-pulse),
.module-dashboard-card:has(.module-tree-pulse),
.module-dashboard-card:has(.module-livestock-pulse),
.module-dashboard-card:has(.dashboard-crop-snapshot) { gap:.32rem; }
.module-dashboard-card:has(.module-bee-pulse) .module-dashboard-actions,
.module-dashboard-card:has(.module-poultry-pulse) .module-dashboard-actions,
.module-dashboard-card:has(.module-tree-pulse) .module-dashboard-actions,
.module-dashboard-card:has(.module-livestock-pulse) .module-dashboard-actions,
.module-dashboard-card:has(.dashboard-crop-snapshot) .module-dashboard-actions { margin-top:.1rem; }

/* A resting timer becomes a small, thumb-friendly control on phones. Active
   and pending states retain their clear verb, while discard becomes an icon. */
@media (max-width:720px) {
    body .floating-timer-action { bottom:calc(.55rem + env(safe-area-inset-bottom)) !important; right:.55rem !important; }
    body .floating-timer-action:not(.floating-timer-cluster) button.timer-start-button {
        font-size:0 !important;
        min-height:2.7rem !important;
        padding:0 !important;
        width:2.7rem !important;
    }
    body .timer-start-button::before { content:'◷'; font-size:1.28rem; line-height:1; }
    body .floating-timer-cluster .timer-discard-button {
        font-size:0 !important;
        min-height:2.45rem !important;
        padding:0 !important;
        width:2.45rem !important;
    }
    body .floating-timer-cluster .timer-discard-button::before { content:'×'; font-size:1.25rem; line-height:1; }
    body .floating-timer-cluster .timer-stop-button,
    body .floating-timer-cluster .timer-pending-action { min-height:2.45rem !important; padding:.48rem .7rem !important; }
}

/* A dashboard briefing is deliberately shorter than the full task queue. */
.dashboard-attention-summary { border-left-color:var(--orange); }
.dashboard-attention-summary .section-heading { align-items:center; margin-bottom:.42rem; }
.dashboard-attention-list { gap:.36rem; }
.dashboard-attention-item { gap:.55rem; min-height:0; padding:.48rem .58rem; }
.dashboard-attention-item > div { gap:.12rem; }
.dashboard-attention-item strong { font-size:.86rem; }
.dashboard-attention-item small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-attention-item .secondary-button { min-height:2rem; padding:.3rem .48rem; white-space:nowrap; }
@media (max-width:720px) {
    .dashboard-attention-item { align-items:center; flex-direction:row; }
.dashboard-attention-item .secondary-button { flex:0 0 auto; width:auto; }
    .dashboard-attention-item small { font-size:.72rem; }
}

/* Poultry place setup keeps the shared farm-map relationship visible without
   making a first poultry record feel like a long infrastructure questionnaire. */
.poultry-place-heading { align-items:end; display:flex; gap:1rem; justify-content:space-between; margin:1rem auto; max-width:var(--page-max); width:calc(100% - 2rem); }
.poultry-place-heading h2 { margin:.12rem 0; }
.poultry-place-heading .lede { margin:.18rem 0 0; max-width:42rem; }
.poultry-setup-why { background:linear-gradient(135deg,#242c24,#181817); border-bottom:3px solid var(--orange); border-radius:10px; color:#fffdf8; display:grid; flex:0 1 26rem; gap:.25rem; padding:.78rem .9rem; }
.poultry-setup-why strong { color:#fffdf8; font-size:.86rem; }
.poultry-setup-why span { color:rgba(255,253,248,.82); font-size:.78rem; line-height:1.4; }
.poultry-place-form { gap:.72rem; }
.poultry-setup-section { background:var(--panel); border:1px solid var(--line-soft); border-radius:10px; display:grid; gap:.72rem; padding:.9rem; }
.poultry-setup-section-heading { align-items:start; display:flex; gap:.8rem; justify-content:space-between; }
.poultry-setup-section-heading h3 { font-size:1.05rem; margin:.08rem 0 0; }
.poultry-setup-section-heading p { margin:0; }
.poultry-setup-section-heading > span { color:var(--muted); font-size:.78rem; line-height:1.35; max-width:20rem; text-align:right; }
.poultry-setup-grid { display:grid; gap:.65rem .8rem; }
.poultry-setup-grid--basics { grid-template-columns:repeat(3,minmax(0,1fr)); }
.poultry-setup-grid--purpose { grid-template-columns:minmax(12rem,.8fr) minmax(0,1.7fr); }
.poultry-setup-grid--capacity { grid-template-columns:repeat(4,minmax(0,1fr)); }
.poultry-purpose-options > div { display:grid; gap:.35rem .5rem; grid-template-columns:repeat(3,minmax(0,1fr)); }
.poultry-purpose-options label, .poultry-location-mode label { align-items:center; background:#f8f1e3; border:1px solid var(--line-soft); border-radius:7px; display:flex; gap:.35rem; min-height:2.25rem; padding:.38rem .48rem; }
.poultry-purpose-options label:has(input:checked), .poultry-location-mode label:has(input:checked) { background:#fff7e8; border-color:var(--orange); box-shadow:inset 0 0 0 1px var(--orange); }
.poultry-location-mode > div { display:grid; gap:.5rem; grid-template-columns:repeat(3,minmax(0,1fr)); }
.poultry-location-choice { align-items:end; background:#fbf8f0; border-left:3px solid var(--orange); display:flex; flex-wrap:wrap; gap:.6rem; padding:.65rem .7rem; }
.poultry-location-choice .form-field { flex:1 1 20rem; }
.poultry-location-choice .secondary-button { flex:0 0 auto; }
.poultry-infrastructure-options { align-items:stretch; display:flex; flex-wrap:wrap; gap:.5rem; }
.poultry-infrastructure-options .form-field { background:#f8f1e3; border:1px solid var(--line-soft); border-radius:7px; padding:.42rem .55rem; }
.poultry-setup-details { margin:0; }
@media (max-width:720px) {
    .poultry-place-heading { align-items:stretch; flex-direction:column; }
    .poultry-setup-why { flex-basis:auto; }
    .poultry-setup-section-heading { display:grid; gap:.22rem; }
    .poultry-setup-section-heading > span { max-width:none; text-align:left; }
    .poultry-setup-grid--basics, .poultry-setup-grid--purpose, .poultry-setup-grid--capacity, .poultry-location-mode > div { grid-template-columns:1fr; }
    .poultry-purpose-options > div { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .poultry-location-choice { align-items:stretch; flex-direction:column; }
    .poultry-location-choice .secondary-button { text-align:center; }
}
