/* Cattle Command presentation. Shared semantic styles; native domain controls. */
:root,html[data-theme=light]{
 --fj-bg:#edf2ee;--fj-panel:#fff;--fj-raised:#fff;--fj-ink:#20352e;--fj-muted:#5d7168;--fj-line:#d9e2dc;--fj-green:#1d5945;--fj-brown:#173e35;--fj-hover:#eaf0eb;
 --app-background:var(--fj-bg);--brand-primary:#173e35;--brand-hover:#28584a;--brand-soft:#e3ece6;--gold-accent:#c9a35b;--earth-accent:#92673a;
 --ff-action:#173e35;--ff-on-action:#fff;--ff-good:#21613f;--cc-focus:#916c2d;--ux-focus:#916c2d;
 --chart-green:#2e7055;--chart-gold:#a98237;--chart-blue:#607f91;--chart-palette-1:#2e7055;--chart-palette-2:#a98237;--chart-palette-3:#839c7e;--chart-track:#e6eee8;--chart-text:var(--fj-ink);--chart-muted:var(--fj-muted);--chart-grid:var(--fj-line);
 --studio-rail:#173e35;--studio-rail-ink:#edf4ee;--studio-gold:#e1bf7b;--studio-shadow:0 6px 24px #173e3506;--radius:14px;
}
html[data-theme=dark]{--fj-bg:#14251f;--fj-panel:#1c3028;--fj-raised:#253c32;--fj-ink:#edf4ee;--fj-muted:#b0c3b7;--fj-line:#3b5144;--fj-green:#9bc7aa;--fj-brown:#d9bc7d;--fj-hover:#2c4436;--brand-primary:#d9bc7d;--brand-hover:#ebd09b;--brand-soft:#354d3c;--ff-action:#d9bc7d;--ff-on-action:#18291f;--ff-good:#a4d2b3;--chart-green:#9bc7aa;--chart-gold:#d9bc7d;--chart-blue:#abc9db;--chart-track:#334b3c;--studio-shadow:none;--cc-focus:#e1bf7b;--ux-focus:#e1bf7b}
html,body{font-size:14px;line-height:1.55}
#app .shell{background:var(--fj-bg);font-family:FieldInter,Arial,sans-serif}
#app .shell :is(h1,h2),html :is(.modal,.ab-dialog,.domain-dialog) :is(h1,h2){font-family:FieldInter,Arial,sans-serif;font-weight:650;letter-spacing:-.035em}
#app .shell :is(.page-heading,.workspace-heading) h1{font-family:FieldInter,Arial,sans-serif;font-size:40px;line-height:1.12;font-weight:700;letter-spacing:-.04em}
#app .shell h2{font-size:19px;line-height:1.35}
#app .shell h3{font-family:FieldInter,Arial,sans-serif;font-size:15px;font-weight:600;line-height:1.4;letter-spacing:-.015em}
#app :is(.page-heading,.workspace-heading){align-items:center;gap:20px;margin:0 0 22px;padding:0;min-height:60px}
#app :is(.page-heading,.workspace-heading) p{font-size:13px;line-height:1.6;max-width:75ch;margin:7px 0 0}
#app .content{max-width:1400px;margin:0 auto;padding:26px 32px 70px}
#app .main{margin-left:240px;width:calc(100% - 240px);padding-top:0;min-height:calc(100dvh - 80px);background:none}
/* Persistent navigation is a single floating working surface. */
#app .topbar{position:relative;inset:auto;margin:0 24px 0 264px;width:calc(100% - 288px);height:80px;min-height:80px;padding:0 8px;border:0;border-bottom:1px solid var(--fj-line);background:transparent;border-radius:0;gap:16px}
#app .sidebar{position:fixed;inset:16px auto 16px 16px;width:216px;height:calc(100dvh - 32px);padding:26px 12px 16px;gap:26px;border-radius:18px;background:var(--studio-rail);color:var(--studio-rail-ink);box-shadow:0 8px 32px #143a2b15;overflow-y:auto;scrollbar-width:thin}
#app .sidebar .brand{min-height:52px;padding:0 7px 16px;border:0;border-radius:0;box-shadow:none;background:transparent;backdrop-filter:none}
#app .sidebar .brand::before,#app .sidebar .brand::after{display:none}
#app .sidebar .cc-logo{width:176px;max-height:50px;filter:brightness(0) invert(1)}
#app .sidebar nav{gap:3px;flex:1}
#app .sidebar .nav-item{min-height:44px;gap:13px;padding:10px 14px;border-radius:10px;font-size:13px;color:#d5e2d8;font-weight:450}
#app .sidebar .nav-item i{flex-basis:20px}
#app .sidebar .nav-item .cc-icon{width:19px;height:19px;opacity:.85}
#app .sidebar .nav-item:hover{background:#ffffff10;color:#fff}
#app .sidebar .nav-item.active{background:#e1bf7b;color:#173e35;font-weight:650;box-shadow:0 3px 12px #0000000c}
#app .sidebar .nav-item.active .cc-icon{opacity:1}
#app .sidebar .nav-item[data-page=work]{margin-top:0}
#app .sidebar .nav-item[data-page=team]{margin-top:14px}
#app .nav-more-menu{margin-top:auto;padding-top:12px}
#app .nav-more-popover{left:242px;bottom:22px;border-radius:14px;padding:8px;box-shadow:0 12px 48px #173e3529}
#app .fj-ranch-name{gap:3px;min-width:0;max-width:340px;padding:0;text-transform:none;letter-spacing:0;font-size:15px;font-weight:650}
#app .fj-ranch-name .fj-header-date{color:var(--fj-muted);font-size:11px;line-height:1.5}
#app .fj-header-end{gap:10px;margin-left:auto;flex:0 0 auto}
#app .topbar .header-search{order:0;display:flex;width:44px;min-width:44px;max-width:none;height:44px;min-height:44px;margin:0;padding:0;justify-content:center;border:1px solid var(--fj-line);border-radius:12px;background:var(--fj-panel);color:var(--fj-ink)}
#app .topbar .header-search :is(span,kbd){display:none}
#app .topbar .ambient-header-actions{display:contents}
#app .topbar .ambient-ranch-button{order:4;width:44px;height:44px;min-width:44px;min-height:44px;flex:0 0 44px;border-radius:50%;border:1px solid var(--fj-line);background:var(--fj-panel);color:var(--fj-ink);font-weight:650}
#app .topbar .record-launch{order:1;display:flex;min-width:86px;min-height:44px;padding:10px 14px;border-radius:12px;background:var(--ff-action);color:var(--ff-on-action);font-size:16px;gap:4px}
#app .topbar .record-launch span{font-size:13px}
#app .topbar #ranch-weather{order:2;margin-right:2px}
/* Controls and record surfaces share a consistent, tactile hierarchy. */
#app :is(.panel,.analytics-card,.domain-card){border:1px solid var(--fj-line);border-radius:16px;background:var(--fj-panel);box-shadow:none;padding:22px}
#app .panel .panel{border:1px solid var(--fj-line);border-radius:12px;box-shadow:none}
#app :is(.button,.text-button,.icon-button),html :is(.modal,.domain-dialog,.ab-dialog) :is(.button,.text-button,.icon-button){font-family:FieldInter,Arial,sans-serif;font-size:13px;font-weight:550;border-radius:10px;min-height:44px;box-shadow:none;letter-spacing:0}
#app .button,html .modal .button{padding:11px 16px}
#app .button.button-primary,html :is(.modal,.domain-dialog,.ab-dialog) .button.button-primary{background:var(--ff-action);color:var(--ff-on-action);border:1px solid transparent}
#app .button-secondary{background:var(--fj-panel);color:var(--fj-ink);border:1px solid var(--fj-line)}
#app .button-primary:hover{filter:brightness(1.12)}
#app :is(input:not([type=checkbox]):not([type=radio]),select,textarea),html .modal :is(input:not([type=checkbox]):not([type=radio]),select,textarea){min-height:44px;border:1px solid var(--fj-line);background-color:var(--fj-raised);border-radius:10px;color:var(--fj-ink);font-size:13px}
#app :is(label,.small-copy){line-height:1.55}
#app .text-button{color:var(--fj-green)}
#app .status{border-radius:6px;padding:4px 8px;font-size:11px;line-height:1.3;text-transform:none;letter-spacing:0}
#app .status-active{background:var(--brand-soft);color:var(--fj-green)}
:is(button,a,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid var(--cc-focus);outline-offset:3px}
#app .filter-chip,#app .analytics-tab{min-height:44px;text-transform:none;letter-spacing:0}
#app :is(.cattle-class-tabs,.fj-home-tabs){gap:4px;border:0;overflow:auto;padding:4px;background:var(--brand-soft);border-radius:12px}
#app .cattle-class-tabs .filter-chip,#app .fj-home-tabs>button{border:0;border-radius:9px;background:transparent;color:var(--fj-muted);padding:11px 15px;min-height:44px;font-size:12px;white-space:nowrap}
#app .cattle-class-tabs .filter-chip.active,#app .fj-home-tabs>button.active{background:var(--fj-raised);color:var(--fj-ink);box-shadow:0 2px 5px #173e3508;font-weight:650}
#app .cattle-panel{padding:0;border-radius:16px}
#app .cattle-tools{padding:18px;gap:10px}
#app .cattle-tools .searchbox{min-height:46px;border:1px solid var(--fj-line);border-radius:10px;background:var(--fj-raised)}
#app .cattle-tools .searchbox input{border:0;background:transparent}
#app .cattle-panel tbody tr.cattle-animal{min-height:64px}
#app .cattle-compact tbody tr{height:64px}
#app .cattle-compact :is(th,td){padding:10px 16px}
#app .cattle-panel .cattle-tag{font-size:14px;font-weight:650}
#app .cattle-panel .animal-cell img{width:40px;height:36px;object-fit:contain;border-radius:9px;background:var(--fj-hover);padding:3px}
#app .cattle-compact .fj-home-identity{display:flex;flex-direction:row;align-items:center;gap:8px;flex-wrap:wrap}
#app .cattle-panel .cattle-age,#app .cattle-panel .cattle-last-work{font-size:12px}
#app .cattle-panel:not(.cattle-compact) .card-data-label{display:inline;margin:0 5px 0 0;text-transform:none;letter-spacing:0;font-size:11px;font-weight:450}
#app .cattle-panel:not(.cattle-compact) :is(.cattle-membership,.cattle-last-work)[data-empty=true]{display:none}
#app .table-wrap{border-color:var(--fj-line)}
#app :is(th,.fj-home-roster th){color:var(--fj-muted);font-size:11px;font-weight:550;text-transform:none;letter-spacing:0;background:var(--fj-hover)}
#app .cattle-compact tbody tr:hover,#app .fj-home-roster tbody tr:hover{background:var(--fj-hover)}
#app .selection-bar,#app #selection-bar .context-actions{border-radius:14px;background:var(--fj-raised);border:1px solid var(--fj-line);box-shadow:0 8px 32px #173e3520;padding:12px}
/* A single ranch panorama anchors Home; daily work is kept below it. */
#app .workspace-home.fj-home{padding-top:0}
#app .fj-home .workspace-heading{min-height:44px;margin-bottom:18px}
#app .studio-ranch-panorama{position:relative;min-height:128px;display:flex;align-items:center;padding:26px 30px;margin-bottom:22px;overflow:hidden;border-radius:16px;background:#173e35;color:#fff}
#app .studio-ranch-panorama>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 54%;filter:saturate(.78)}
#app .studio-ranch-panorama::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#113c32f5 0%,#153e35d9 34%,#173e3525 72%)}
#app .studio-herd-snapshot{position:relative;z-index:1;max-width:70%;display:grid;gap:6px}
#app .studio-herd-count{display:flex;align-items:baseline;flex-wrap:wrap;gap:12px;line-height:1.1;color:#fff;font-family:FieldInter,Arial,sans-serif}
#app .studio-herd-count strong{font-family:inherit;font-size:64px;font-weight:700;letter-spacing:-.04em}
#app .studio-herd-count span{font-family:inherit;font-size:30px;font-weight:700;letter-spacing:-.04em}
#app .studio-herd-snapshot>p{margin:0;color:#deebe1;font-size:12px;line-height:1.5}
#app .studio-herd-snapshot>.text-button{justify-self:start;display:flex;align-items:center;gap:8px;margin-top:7px;padding:0;color:#f1d49d;font-size:12px;min-height:36px}
#app .studio-herd-snapshot>.text-button svg{width:16px;height:16px}
#app .fj-home-daily-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;grid-template-areas:"herd support" "insights support" "recent support";gap:20px;align-items:start}
#app .fj-home-daily-grid>.fj-herd-panel{grid-area:herd;padding:20px;min-width:0}
#app .fj-home-daily-grid>.fj-home-support{grid-area:support;display:flex;flex-direction:column;gap:20px;min-width:0}
#app .fj-home-daily-grid>.fj-optional-insights{grid-area:insights;margin:0;min-width:0;padding:20px}
#app .fj-home-daily-grid>.recent-activity-disclosure{grid-area:recent;margin:0;min-width:0;padding:14px 20px}
#app .fj-home .panel-head{margin:0 0 16px;align-items:center;gap:12px}
#app .fj-home .panel-head h2{font-size:19px;margin:0}
#app .fj-home-tabs{margin:0 0 18px;display:flex}
#app .fj-home-tabs>button{gap:6px;flex:0 0 auto}
#app .fj-home-tools{margin:0 0 16px;gap:12px;display:flex;align-items:center}
#app .fj-home-tools .header-search{display:flex;align-items:center;gap:9px;flex:1;min-width:0;min-height:44px;padding:9px 12px;border:1px solid var(--fj-line);border-radius:10px;background:var(--fj-raised);color:var(--fj-muted);text-align:left}
#app .fj-home-tools .header-search span{display:block;font-size:12px}
#app .fj-home-roster{border:0;border-top:1px solid var(--fj-line);border-radius:0;overflow:auto}
#app .fj-home-roster :is(th,td){padding:10px 10px;font-size:12px}
#app .fj-home-roster tr,#app .fj-home-roster td{height:60px;min-height:0}
#app .fj-home-roster th{height:38px;font-size:10px;padding-top:8px;padding-bottom:8px}
#app .fj-home-roster .fj-home-identity .text-button{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:2px;min-height:44px;font-size:13px;font-weight:650}
#app .fj-home-roster .animal-cell img{width:38px;height:32px;padding:3px;background:var(--fj-hover);border-radius:8px;object-fit:contain}
#app .fj-home-roster .fj-home-selection{width:30px;padding-left:8px!important}
#app .fj-home-roster .fj-home-status-item{display:inline-flex;gap:5px}
#app .fj-home-roster .status{font-size:10px;padding:3px 6px}
#app .fj-home-roster .fj-home-status-item+.fj-home-status-item{margin-top:5px}
#app .fj-roster-footer{margin-top:12px;gap:10px;display:flex;align-items:center;justify-content:space-between}
#app .fj-roster-footer small{font-size:11px}
#app .fj-roster-footer>.text-button{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
#app .fj-home-roster .text-button small{font-size:12px;font-weight:450;color:var(--fj-muted)}
#app .fj-home-support>.panel{padding:20px}
#app .fj-home .fj-task-row{border-bottom:1px solid var(--fj-line);padding:8px 0;gap:8px}
#app .fj-home .fj-task-check{position:relative;min-width:44px;min-height:44px;flex:0 0 44px;border:0;border-radius:8px;background:transparent;color:var(--fj-green)}
#app .fj-home .fj-task-check::before{content:"";position:absolute;left:12px;top:12px;width:20px;height:20px;border:1px solid var(--fj-muted);border-radius:5px;transform:none;display:block!important}
#app .fj-home .fj-task-check .cc-icon{width:14px;height:14px;position:relative;z-index:2}
#app .fj-home .workspace-calendar-item{padding:0;min-height:54px;background:transparent}
#app .fj-home .workspace-calendar-item b{font-size:12px;font-weight:550;line-height:1.5}
#app .fj-home .workspace-calendar-item small{font-size:12px;margin-top:5px}
#app .fj-home .workspace-calendar-item>.cc-icon{display:none}
#app .fj-home .workspace-locations .workspace-location-list{display:grid;gap:0}
#app .fj-home .workspace-location{min-height:44px;padding:8px 0;border-bottom:1px solid var(--fj-line);background:transparent}
#app .fj-home .workspace-location>span{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%}
#app .fj-home .workspace-location b{font-size:12px;font-weight:500}
#app .fj-home .workspace-location small{font-size:12px;white-space:nowrap}
#app .fj-home-map{height:158px;border-radius:10px;margin-bottom:10px}
#app .recent-activity-disclosure>summary{min-height:44px;font-size:13px;gap:10px;flex-wrap:wrap}
#app .recent-activity-disclosure>summary small{font-size:10px}
#app .fj-optional-insights>.panel-head{display:none}
#app .fj-optional-insights .insights-header h2{font-size:19px}
#app .fj-optional-insights .insights-chart-card{background:transparent;border:0;box-shadow:none;padding:12px 0}
#app .fj-optional-insights .analytics-metrics{display:flex;gap:36px;margin:16px 0;padding:0;border:0;flex-wrap:wrap}
#app .fj-optional-insights .analytics-metric{padding:0;border:0;background:none;min-width:90px}
#app .fj-optional-insights .analytics-metric b{font-family:FieldInter,Arial,sans-serif;font-size:25px;letter-spacing:-.04em}
#app .fj-optional-insights .cc-chart-donut{max-width:180px}
#app .fj-optional-insights .insights-slide .cc-chart-plot{max-height:220px;min-height:180px}
/* Module refinements, shared with the same forms and saved records. */
#app .cc-breeding-overview>.cc-pregnancy-chart{align-self:start}
#app :is(.stat-strip,.work-summary,.fj-feed-totals,.analytics-metrics){border-radius:14px;background:var(--fj-panel);border-color:var(--fj-line)}
#app :is(.stat-strip,.work-summary,.fj-feed-totals,.analytics-metrics) :is(b,strong){font-family:FieldInter,Arial,sans-serif;font-weight:600;letter-spacing:-.04em}
#app .work-summary,#app .stat-strip{padding:24px}
#app .work-filter-panel{padding:22px;border-radius:16px}
#app .fj-work-chart-body dd{font-family:FieldInter,Arial,sans-serif;font-weight:600}

#app .fj-group-cattle{border-radius:16px;padding:24px}

#app .pasture-map{border-radius:18px;overflow:hidden;border:1px solid var(--fj-line)}
#app .pasture-overview .pasture-cards{background:var(--fj-panel);border:1px solid var(--fj-line);border-radius:13px;box-shadow:0 6px 20px #173e3515}
#app .pasture-map .overview-map-tools button{min-height:44px;border-radius:10px;font-size:12px}
#app .calendar-panel{padding:22px;border-radius:16px}
#app .calendar-toolbar h2{font-size:22px}
#app .calendar-day{background:var(--fj-panel);border-color:var(--fj-line)}
#app .calendar-day.today{background:var(--brand-soft)}
#app .calendar-event{border-radius:6px}
#app .fj-settings-categories button{border-radius:10px;min-height:48px}
#app .fj-settings-categories button.active{background:var(--brand-soft);color:var(--fj-ink)}
#app .fj-settings-content>.settings-section{padding:26px;border-radius:16px}
#app .fj-settings-content h2{font-size:22px}
#app .fj-feature-row{min-height:86px;border-color:var(--fj-line)}
#app .report-card{border-radius:14px}
html .modal{background:var(--fj-raised);border:1px solid var(--fj-line);border-radius:20px;box-shadow:0 24px 100px #071e2045;padding:26px}
html .modal-head h2{font-family:FieldInter,Arial,sans-serif;font-size:24px;font-weight:600;letter-spacing:-.025em}
html .modal-head .icon-button{min-width:44px;min-height:44px;background:var(--fj-hover);border-radius:50%}
html .modal :is(label,legend){font-size:13px}

/* Keep monetary direction and other domain-specific semantic color rules intact. */
@media(min-width:761px) and (max-width:1190px){
 #app .sidebar{width:190px}#app .main{margin-left:214px;width:calc(100% - 214px)}#app .topbar{margin-left:238px;width:calc(100% - 262px)}
 #app .content{padding:26px 24px 64px}#app .fj-home-daily-grid{grid-template-columns:minmax(0,1fr) 260px;gap:18px}
 #app .fj-home-daily-grid>.fj-herd-panel{padding:18px}#app .fj-home-tools{flex-wrap:wrap}#app .fj-home-tools .header-search{flex-basis:100%}
 #app .fj-ranch-name{max-width:250px}#app .topbar #ranch-weather{display:none}
  /* The 190px sidebar has room for labels; older top-nav rules hid them here. */
  #app .sidebar .nav-item{width:auto;padding:10px 12px;gap:11px;justify-content:flex-start}#app .sidebar .nav-item span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #app .fj-home-roster .fj-home-type{display:none}#app .fj-home-roster :is(th,td){padding-left:6px;padding-right:6px}
 #app .studio-ranch-panorama{padding:24px;min-height:128px}
}
@media(min-width:761px) and (max-width:960px){#app .fj-home-daily-grid{grid-template-columns:minmax(0,1fr);grid-template-areas:"herd" "support" "insights" "recent"}#app .fj-home-daily-grid>.fj-home-support{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}#app .fj-home-support>.workspace-recent{grid-column:1/-1}#app .topbar .record-launch{min-width:44px;width:44px;padding:0;justify-content:center}#app .topbar .record-launch span{display:none}#app .fj-ranch-name{font-size:13px;max-width:210px}}
@media(max-width:760px){
 #app .sidebar{display:none}#app .topbar{position:relative;margin:0 16px;width:calc(100% - 32px);height:78px;min-height:78px;padding:0;border-bottom:1px solid var(--fj-line);gap:10px}
 #app .fj-mobile-brand{display:flex;flex:0 0 42px;max-width:42px;width:42px;overflow:hidden}#app .fj-mobile-brand .cc-logo{width:42px;height:42px;object-fit:contain}
 #app .fj-ranch-name{font-size:12px;max-width:none;flex:1;min-height:44px;gap:1px}#app .fj-ranch-name>span{max-width:100%;white-space:normal;line-height:1.4}
 #app .fj-ranch-name .fj-header-date{font-size:9px;line-height:1.5}#app .fj-header-end{gap:6px;margin:0}
 #app .topbar .header-search{display:flex;width:44px;min-width:44px;height:44px;min-height:44px;border:0;background:transparent}#app .topbar .record-launch,#app .topbar #ranch-weather{display:none}
 #app .topbar .ambient-ranch-button{width:38px;height:44px;min-width:38px;min-height:44px;flex-basis:38px;border-radius:11px;font-size:12px}
 #app .main{margin:0;width:100%;min-height:calc(100dvh - 78px)}#app .content{padding:24px 16px 110px;max-width:100%}
 #app :is(.page-heading,.workspace-heading){gap:12px;align-items:flex-start;min-height:0;margin-bottom:20px;flex-wrap:wrap}
 #app .shell :is(.page-heading,.workspace-heading) h1{font-size:32px;line-height:1.12}#app :is(.page-heading,.workspace-heading) p{font-size:12px}
 #app .heading-actions{gap:8px;flex-wrap:wrap;max-width:100%}#app .heading-actions .button{min-height:44px;padding:10px 13px;font-size:12px}
 #app :is(.panel,.analytics-card,.domain-card){border-radius:14px;padding:18px}#app .cattle-panel{padding:0}#app .cattle-tools{padding:14px}
 #app .cattle-class-tabs .filter-chip{padding:11px 13px;font-size:12px}#app .cattle-class-tabs{gap:0}
 #app .cattle-panel tbody tr.cattle-animal{padding:16px 10px;min-height:104px;gap:5px 8px}
 #app .cattle-panel .cattle-tag{min-height:36px}#app .cattle-panel .cattle-identity{padding:0}#app .cattle-panel .cattle-status{padding:0}
 #app .cattle-panel .cattle-status .status{max-width:70px;font-size:10px}#app .cattle-panel .cattle-row-record{min-width:44px;min-height:44px}
 #app .studio-ranch-panorama{min-height:112px;border-radius:14px;padding:20px;margin-bottom:18px}#app .studio-ranch-panorama>img{object-position:60% center}
 #app .studio-ranch-panorama::after{background:linear-gradient(90deg,#113c32ee,#153e3570 72%,#153e3533)}
 #app .studio-herd-snapshot{max-width:90%;gap:5px}#app .studio-herd-count{gap:8px}#app .studio-herd-count strong{font-size:52px}#app .studio-herd-count span{font-size:26px}#app .studio-herd-snapshot>p{font-size:11px;max-width:29ch}
 #app .fj-home-daily-grid{grid-template-columns:minmax(0,1fr);grid-template-areas:"herd" "support" "insights" "recent";gap:18px}#app .fj-home-daily-grid>.fj-home-support{display:flex;gap:18px}
 #app .fj-home-daily-grid>.fj-herd-panel{padding:16px}#app .fj-home-tools{gap:8px;flex-wrap:wrap}#app .fj-home-tools .header-search{flex-basis:100%}#app .fj-home-tools .button{width:auto}
 #app .fj-home-tabs{gap:0;margin-bottom:14px}#app .fj-home-tabs>button{font-size:11px;padding:10px 12px;min-height:44px}
 #app .fj-home-roster{border:0;border-radius:0;overflow:visible}#app .fj-home-roster table,#app .fj-home-roster tbody{display:block;width:100%}#app .fj-home-roster thead{display:none}
 #app .fj-home-roster tbody tr{display:grid;grid-template-columns:26px minmax(0,1fr) minmax(0,.8fr) 36px;gap:4px 7px;height:auto;min-height:78px;padding:12px 0;border-bottom:1px solid var(--fj-line)}
 #app .fj-home-roster td{height:auto;min-height:0;padding:0;border:0;background:transparent;min-width:0;font-size:11px}
 #app .fj-home-roster .fj-home-selection{grid-column:1;grid-row:1/3;align-self:center;width:auto;padding:0!important}#app .fj-home-selection .select-hit{min-width:34px;min-height:44px;margin-left:-4px}
 #app .fj-home-roster .fj-home-id{grid-column:2;grid-row:1/3;align-self:center;display:block}#app .fj-home-roster .fj-home-pasture{grid-column:3;grid-row:1/3;align-self:center;display:block;font-size:10px;line-height:1.6;color:var(--fj-muted)}
 #app .fj-home-roster .fj-home-open{grid-column:4;grid-row:1/3;align-self:center;display:block}#app .fj-home-roster .fj-home-type,#app .fj-home-roster .fj-home-status{display:none}
 #app .fj-home-roster .animal-cell{gap:6px}#app .fj-home-roster .animal-cell img{width:30px;height:29px;flex:0 0 30px}#app .fj-home-roster .fj-home-identity .text-button{font-size:12px;overflow-wrap:anywhere;min-height:44px}#app .fj-home-identity small{font-size:10px}
 #app .fj-home-roster .icon-button{min-width:36px;width:36px;min-height:44px}#app .fj-home-pasture-label{display:none}#app .fj-roster-footer{gap:4px;flex-wrap:wrap}#app .fj-roster-footer .text-button{font-size:11px}
 #app .fj-home-support>.panel{padding:18px}#app .fj-home-support .fj-today{grid-area:auto}#app .fj-home-support .workspace-locations{grid-area:auto}#app .fj-home-support .workspace-recent{grid-area:auto}
 #app .fj-optional-insights{padding:18px!important}#app .fj-optional-insights .analytics-metrics{gap:18px}#app .fj-optional-insights .analytics-metric b{font-size:22px}
 #app .fj-home-map{height:190px}#app .fj-home .panel-head h2{font-size:18px}
 #app .fj-settings-content>.settings-section{padding:18px}#app .fj-settings-content h2{font-size:21px}
 #app .pasture-map .overview-map-tools button{min-height:44px;font-size:11px;padding:8px}#app .calendar-panel{padding:12px}#app .calendar-toolbar h2{font-size:19px}
 #app .bottom-nav{position:fixed;inset:auto 12px max(10px,env(safe-area-inset-bottom));min-height:66px;border:1px solid #ffffff23;border-radius:18px;background:#173e35ed;padding:6px;backdrop-filter:blur(18px);box-shadow:0 8px 32px #102c3529;color:#edf4ee}
 #app .bottom-nav button{color:#d4e2d9;font-size:10px;min-height:50px;border-radius:12px;gap:4px}#app .bottom-nav button.active{background:#ffffff14;color:#fff}
 #app .bottom-nav button i svg{width:21px;height:21px}#app .bottom-nav .mobile-quick-add{flex:0 0 50px;margin:0 4px;background:var(--studio-gold);color:#173e35;border-radius:12px}
 #app #selection-bar:not(:empty){bottom:92px}html .modal{width:calc(100% - 24px);max-height:calc(100dvh - 32px);padding:20px;border-radius:18px}html .modal-head h2{font-size:24px}
 .toast{bottom:96px!important}
}
@media(max-width:359px){#app .content{padding-left:12px;padding-right:12px}#app .topbar{margin:0 12px;width:calc(100% - 24px);gap:6px}#app .fj-mobile-brand{flex-basis:32px;max-width:32px}#app .fj-ranch-name{font-size:11px}#app .fj-ranch-name .fj-header-date{font-size:8px}#app .topbar .ambient-ranch-button{min-width:32px;width:32px;flex-basis:32px}#app .shell :is(.page-heading,.workspace-heading) h1{font-size:30px}#app .studio-ranch-panorama{padding:20px}#app .studio-herd-count span{font-size:24px}#app .fj-home-daily-grid>.fj-herd-panel{padding:14px}#app .fj-home-roster tbody tr{grid-template-columns:22px minmax(0,1fr) minmax(0,.7fr) 30px;gap:4px}#app .fj-home-roster .icon-button{min-width:30px;width:30px}#app .fj-home-roster .animal-cell img{display:none}}
/* Final composition pass after reviewing real desktop and phone screenshots. */
#app .fj-home .panel-head>.text-button{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;padding:0;min-height:44px;flex:0 0 auto}
#app .fj-home .panel-head>.text-button .cc-icon{width:15px;height:15px}
#app .fj-home .fj-home-tabs{border-radius:12px;padding:4px;background:var(--brand-soft);gap:3px;border:0}
#app .fj-home .fj-home-tabs>button{border:0;border-radius:9px;padding:9px 11px;min-height:40px}
#app .fj-home .fj-home-tabs>button.active{background:var(--fj-raised);box-shadow:0 2px 5px #173e3510;color:var(--fj-ink)}
#app .fj-home .fj-home-tabs>button.active::after{display:none}
#app .fj-home-roster thead tr{height:40px}
#app .fj-home-roster td.fj-home-status{display:table-cell;vertical-align:middle}
#app .fj-home-roster .fj-home-status-item{border:0;padding:0}
#app .fj-home-roster .fj-home-status-item+.fj-home-status-item{margin-left:4px;margin-top:0}
#app .cattle-view-toggle .button[aria-pressed=true]{background:var(--brand-soft);color:var(--fj-ink);border-color:var(--fj-line);font-weight:650}
@media(max-width:760px){
 #app .fj-mobile-brand .cc-logo{width:42px;height:42px;max-width:42px;filter:none;object-fit:contain}
 html[data-theme=dark] #app .fj-mobile-brand .cc-logo{filter:brightness(0) invert(1)}
 #app .bottom-nav button.active,#app .bottom-nav button.active :is(span,i){color:#fff}
 #app .bottom-nav .mobile-quick-add,#app .bottom-nav .mobile-quick-add :is(span,i){color:#173e35}
 #app .bottom-nav .mobile-quick-add i{display:flex;align-items:center;justify-content:center;background:transparent;width:22px;height:22px;border-radius:0;box-shadow:none}
 #app .fj-home .panel-head{min-height:30px;margin-bottom:12px}
 #app .fj-home-tools{flex-wrap:nowrap;gap:8px}
 #app .fj-home-tools .header-search{flex:1;min-width:0;flex-basis:0;padding:8px 10px}
 #app .fj-home-tools .header-search span{font-size:11px;line-height:1.5}
 #app .fj-home-tools .button{flex:0 0 auto;width:auto;font-size:11px;padding:9px 10px}
 #app .fj-home .fj-home-roster td.fj-home-status{display:none!important}
 #app .fj-home-roster .fj-home-id .animal-cell{display:flex;align-items:center}
 #app .fj-home-roster .fj-home-id .fj-home-identity{display:flex;flex-direction:column;align-items:flex-start;min-width:0;gap:0}
 #app .fj-home-roster .fj-home-id .fj-home-identity small{margin-top:0;white-space:normal}
 #app .fj-home .fj-home-pasture-label{display:none}
 #app .fj-home .fj-home-tabs>button{padding:8px 10px;min-height:44px}
 #app .fj-home .workspace-heading{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:10px;text-align:left}
 #app .fj-home .workspace-heading>div:first-child{min-width:0;flex:1;text-align:left}
 #app .fj-home .workspace-heading h1{white-space:nowrap;text-align:left}
 #app .fj-home .workspace-heading p{text-align:left}
 #app .fj-home .workspace-heading .heading-actions{width:auto;flex:0 0 auto;margin:0}
 #app .fj-home .workspace-heading .workspace-primary{width:auto;font-size:12px;padding:10px;gap:4px}
 #app .fj-home .workspace-heading .workspace-primary .cc-icon{width:17px;height:17px}
 #app .fj-home-daily-grid>.recent-activity-disclosure{padding:12px 16px}
 #app .fj-home-roster tbody tr{min-height:70px;padding:10px 0}
 #app .fj-home-roster .text-button{min-height:44px}

}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
/* Saved-on-this-phone (static/outbox.js): quiet notice inside a form, plain review list. */
.outbox-offer{display:grid;gap:12px;margin:0 0 16px;padding:14px 16px;border-radius:12px;background:var(--brand-soft,var(--fj-hover));color:var(--fj-ink)}
.outbox-offer p{margin:0;line-height:1.45}
.outbox-offer .button{justify-self:start;min-height:44px}
.outbox-list{list-style:none;margin:12px 0 0;padding:0}
.outbox-list li{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px 16px;padding:14px 0;border-top:1px solid var(--fj-line)}
.outbox-list li>div:first-child{display:grid;gap:2px;min-width:0}
.outbox-list small{color:var(--fj-muted)}
.outbox-error{margin:4px 0 0;color:var(--cc-danger)}
.outbox-actions{display:flex;flex-wrap:wrap;gap:4px 14px;align-items:center}
.outbox-actions .text-button{min-height:44px}
/* Connection/saved-entry banner: sit inside the content column, clear of the floating sidebar. */
#app main>.offline-banner{margin:8px 24px 0;padding:10px 16px;border:1px solid var(--fj-line);border-radius:12px;background:var(--fj-raised);color:var(--fj-ink);line-height:1.45}
#app main>.offline-banner .text-button{min-height:32px;font-weight:650}
@media(max-width:760px){#app main>.offline-banner{margin:8px 16px 0}}
/* Selects keep a visible chevron; a later background shorthand had erased it, so lists looked like text boxes. */
html select:not([multiple]):not([size]):not([hidden]){appearance:none;-webkit-appearance:none;padding-right:36px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235f6f62' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-position:right 12px center;background-repeat:no-repeat;background-size:16px 16px}
html[data-theme=dark] select:not([multiple]):not([size]):not([hidden]){background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23c7d3c9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")}
/* Period pickers open like the other filters, so they show the same chevron. */
#app .period-filter>summary{justify-content:space-between}
#app .period-filter>summary::after{content:"";display:block!important;flex:0 0 16px;width:16px;height:16px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235f6f62' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/16px no-repeat;transition:transform .15s ease}
#app .period-filter[open]>summary::after{content:"";transform:rotate(180deg)}
html[data-theme=dark] #app .period-filter>summary::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23c7d3c9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")}

/* App redesign 1: one phone layout for the cattle list (List view).
 * Replaces the stacked 160px blocks from older themes with a two-line row:
 * [select] tag + name ............ breeding  [⋯]
 *          breed · class · pasture   due date
 */
@media (max-width:760px){
 #app .cattle-panel.cattle-compact tbody tr.cattle-animal{display:grid;grid-template-columns:36px minmax(0,max-content) minmax(0,1fr) auto 40px;grid-template-rows:auto auto;align-items:center;gap:2px 8px;min-height:0;height:auto;margin:0;padding:10px 2px;border:0;border-bottom:1px solid var(--fj-line);border-radius:0;background:transparent;box-shadow:none}
 #app .cattle-panel.cattle-compact tbody tr.cattle-animal>td{display:block;position:static;width:auto;min-width:0;max-width:none;margin:0;padding:0;border:0;font-size:13px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;grid-area:auto}
 #app .cattle-panel.cattle-compact tbody tr.cattle-animal>td::before{content:none;display:none}
 #app .cattle-panel.cattle-compact tbody tr.cattle-animal>td.cattle-selection{grid-column:1;grid-row:1/3;align-self:center;overflow:visible}
 #app .cattle-panel.cattle-compact tbody tr.cattle-animal>td.cattle-selection .select-hit{display:grid;place-items:center;width:36px;height:44px}
 #app .cattle-panel.cattle-compact tbody tr.cattle-animal>td.cattle-identity{grid-column:2/4;grid-row:1;overflow:hidden;min-height:0;height:auto}
 #app .cattle-panel.cattle-compact tbody tr.cattle-animal :is(.animal-cell,.fj-home-identity,.cattle-tag){min-height:0;height:auto}
 #app .cattle-panel.cattle-compact tbody tr.cattle-animal .animal-cell{display:flex;align-items:center;gap:10px;min-width:0}
 #app .cattle-panel.cattle-compact tbody tr.cattle-animal .animal-cell>:not(.fj-home-identity){display:none}
 #app .cattle-panel.cattle-compact tbody tr.cattle-animal .fj-home-identity{display:flex;flex-wrap:nowrap;align-items:baseline;gap:6px;min-width:0;overflow:hidden}
 #app .cattle-panel.cattle-compact tbody tr.cattle-animal .cattle-tag{flex:0 0 auto;min-height:0;padding:0;font-size:15px;font-weight:700;letter-spacing:.01em;white-space:nowrap}
 #app .cattle-panel.cattle-compact tbody tr.cattle-animal .fj-home-identity small{display:inline;flex:0 1 auto;min-width:0;width:auto;margin:0;font-size:13px;color:var(--fj-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #app .cattle-panel.cattle-compact tbody tr.cattle-animal>td.cattle-classification{grid-column:2;grid-row:2;max-width:11em;color:var(--fj-muted);font-size:12.5px}
 #app .cattle-panel.cattle-compact tbody tr.cattle-animal>td.cattle-location{grid-column:3;grid-row:2;color:var(--fj-muted);font-size:12.5px}
 #app .cattle-panel.cattle-compact tbody tr.cattle-animal>td.cattle-location::before{content:"· ";display:inline;position:static}
 #app .cattle-panel.cattle-compact tbody tr.cattle-animal>td:is(.cattle-membership,.cattle-age,.cattle-last-work){display:none}
 #app .cattle-panel.cattle-compact tbody tr.cattle-animal>td.cattle-status{grid-column:4;grid-row:1/3;display:flex;flex-direction:column;align-items:flex-end;gap:2px;text-align:right;overflow:visible}
 #app .cattle-panel.cattle-compact tbody tr.cattle-animal>td.cattle-status .status{margin:0;padding:2px 8px;font-size:11.5px;white-space:nowrap}
 #app .cattle-panel.cattle-compact tbody tr.cattle-animal>td.cattle-status .cattle-due{display:block;font-size:11.5px;color:var(--fj-muted);white-space:nowrap}
 #app .cattle-panel.cattle-compact tbody tr.cattle-animal>td.cattle-row-controls{grid-column:5;grid-row:1/3;display:flex;justify-content:flex-end;overflow:visible}
 #app .cattle-panel.cattle-compact tbody tr.cattle-animal>td.cattle-row-controls .cattle-row-record{display:grid;place-items:center;width:40px;height:44px;min-height:44px;padding:0}
 #app .cattle-panel.cattle-compact tbody tr.cattle-animal:has(input:checked){background:#eef4e8}
 #app .cattle-panel.cattle-compact tbody tr.cattle-group-heading{display:block;padding:14px 2px 6px;border:0}
 #app .cattle-panel.cattle-compact tbody tr.cattle-group-heading>th{display:block;padding:0;font-size:13px}
}
@media (max-width:359px){
 #app .cattle-panel.cattle-compact tbody tr.cattle-animal>td.cattle-status .cattle-due{display:none}
}

/* App redesign 2: collapsed sections share one look.
 * A closed section is a compact row (title, optional count, chevron), not a tall empty card.
 * Opening reveals the content with a short fade. */
#app :is(details.panel,details.settings-section):not([open]){padding-top:0!important;padding-bottom:0!important;min-height:0}
#app :is(details.panel,details.settings-section)>summary{display:flex;align-items:center;gap:10px;min-height:60px;margin:0;padding-block:0;font-size:16px;font-weight:650;line-height:1.3;letter-spacing:-.01em;color:var(--fj-ink);cursor:pointer;list-style:none}
#app :is(details.panel,details.settings-section)>summary::-webkit-details-marker{display:none}
#app :is(details.panel,details.settings-section)>summary :is(h2,h3){margin:0;font-size:16px;font-weight:650;letter-spacing:-.01em}
#app :is(details.panel,details.settings-section)>summary small{font-size:13px;font-weight:500;color:var(--fj-muted)}
#app details.settings-section{padding-inline:24px}
#app details.settings-section>summary{font-size:17px}
#app :is(details.panel,details.settings-section)>summary:hover{color:var(--brand-primary)}
#app details[open]>:not(summary){animation:cc-reveal .32s cubic-bezier(.22,1,.36,1) both}
@keyframes cc-reveal{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){#app details[open]>:not(summary){animation:none}}
/* Ranked bar charts (e.g. Where the money goes) start at the card's left edge, not floating centered. */
#app .cc-chart .cc-chart-ranking{margin-inline:0}
#app .cc-chart .cc-chart-ranking>svg.cc-chart-bars{max-width:720px;margin-inline:0}

/* App redesign 3: Home notices (trial welcome, use without signal) are compact strips,
 * so the herd shows first on a phone. */
#app .home-notice{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto 36px;align-items:center;gap:10px 16px;margin:0 0 16px;padding:14px 12px 14px 20px;border-radius:14px}
#app .home-notice h2{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0;font-size:16px;font-weight:700;letter-spacing:-.015em;line-height:1.3}
#app .home-notice h2 .plan-badge{margin:0}
#app .home-notice-body>p{margin:4px 0 0;font-size:14px;line-height:1.5;color:var(--fj-muted)}
#app .home-notice .home-notice-action{min-height:44px;white-space:nowrap}
#app .home-notice .plan-welcome-close{position:static;grid-column:3;grid-row:1;justify-self:end;align-self:start;display:grid;place-items:center;width:36px;height:36px;margin:0;padding:0;border:0;border-radius:50%;background:transparent;color:var(--fj-muted);font-size:20px;line-height:1;cursor:pointer}
#app .home-notice .plan-welcome-close:hover{background:var(--fj-hover);color:var(--fj-ink)}
#app .home-notice:not(:has(.home-notice-action)){grid-template-columns:minmax(0,1fr) 36px}
#app .home-notice:not(:has(.home-notice-action)) .plan-welcome-close{grid-column:2}
#app .home-notice-more{margin-top:6px}
#app .home-notice-more>summary{display:inline-flex;align-items:center;min-height:36px;color:var(--brand-primary);font-size:14px;font-weight:650;cursor:pointer;list-style:none;text-decoration:underline;text-decoration-color:var(--gold-accent);text-decoration-thickness:2px;text-underline-offset:4px}
#app .home-notice-more>summary::-webkit-details-marker{display:none}
#app .home-notice-more ul{margin:6px 0 4px;padding-left:18px;font-size:14px;line-height:1.6}
#app .home-notice-more p{margin:4px 0 0;font-size:13px}
@media (max-width:760px){
 #app .home-notice{grid-template-columns:minmax(0,1fr) 36px;padding:12px 8px 14px 16px}
 #app .home-notice .home-notice-action{grid-column:1/-1;grid-row:2;justify-self:start}
 #app .home-notice .plan-welcome-close{grid-column:2}
}

/* App redesign 4: routine costs read as money going out, not as an alarm.
 * Earth red-brown (6.6:1 on white) matches the cost bars; gains stay green. */
:root,html[data-theme=light]{--money-negative:#9a4b2c}

/* App redesign 5: readable-type floor (raise only; finance cells fixed at the source in money.css). Every label, date, table heading and status measured
 * under 12px on the app pages is raised to 12px (phone nav labels to 11px, from 8px). */
html body #app .bottom-nav button>span{font-size:11px;line-height:1.2;letter-spacing:0}
html body #app :is(.fj-header-date,.fj-ranch-name .fj-header-date){font-size:12px}
html body #app :is(.fj-home-roster,.cattle-panel,.fj-herd-panel) th:not(.sr-only){font-size:12px}
html body #app .fj-home-roster td.fj-home-pasture{font-size:12px}
html body #app :is(.fj-home-roster,.cattle-panel,.finance-transactions) thead th{letter-spacing:.02em}
html body #app :is(.cattle-status,.fj-home-status-item) :is(.status,small),html body #app .status.cattle-breeding{font-size:12px}
html body #app :is(.money-scope-note,.money-scope-note .cc-money-value){font-size:12px}
html body #app :is(.workspace-recent time,.workspace-recent :not(summary)>small,.fj-task-row small,.fj-roster-footer small,.workspace-location-list small){font-size:12px}
html body #app :is(.cc-calendar-legend span,.calendar-weekdays span,.fj-pasture-list-labels span){font-size:12px}
html body #app :is(.weather-details span,.weather-details a,.weather-day span){font-size:12px}
html body #app :is(.period-filter>summary,.herd-filters>summary){font-size:13px}
@media (min-width:761px){html body #app .analytics-metric span{font-size:12px}}
html body #app .plan-badge{font-size:11px}
@media (max-width:760px){
 html body #app .bottom-nav button>span{font-size:11px}
 html body #app .cattle-panel.cattle-compact tbody tr.cattle-animal>td.cattle-status :is(.status,.cattle-due){font-size:12px}
}

/* App redesign 6: record filter bars (Work & Health, Feed) sit on one row on wider screens,
 * with the period chooser at the end instead of on its own line. */
@media (min-width:1000px){
 #app .record-filter-form{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px 16px;padding:14px 16px}
 #app .record-filter-form>.record-filter-bar{flex:1 1 560px}
 #app .record-filter-form>.record-date-filter{flex:0 0 auto;margin:0}
 #app .record-filter-form>.record-date-filter[open]{flex-basis:100%}
 #app .record-filter-form>.record-date-filter>summary{min-height:44px;padding:0 14px;border:1px solid var(--fj-line);border-radius:8px;background:var(--fj-raised);color:var(--fj-ink);font-size:13px;font-weight:600}
 #app .record-filter-form>:is(p,.form-error){flex-basis:100%;margin:0}
}

/* App redesign 7: Breeding cow list on phones is two tight lines per cow.
 * Tap targets stay 44px tall; they overlap the row padding instead of adding height. */
@media (max-width:600px){
 #app .cc-breeding-cow{gap:0 12px;padding:10px 0}
 #app .cc-breeding-cow>.text-button:first-child{display:flex;align-items:baseline;gap:6px;min-height:44px;margin:-10px 0 -8px;padding:10px 0 8px}
 #app .cc-breeding-cow>.text-button:first-child small{display:inline;margin:0;font-size:12px}
 #app .cc-breeding-cow-status{align-self:center;font-size:13px}
 #app .cc-breeding-cow-due{align-self:center;font-size:12px}
 #app .cc-breeding-cow>.text-button:last-child{min-height:44px;margin:-10px 0 -12px;padding:0;font-size:13px}
}

/* App redesign 8: the full animal profile matches the rest of the app.
 * Bigger photo and clear identity, actions sized to their content, tabs with the
 * app's underline, flat overview stats (the tab already says "Overview"), and one
 * consistent row style for every section. */
#app .full-animal-profile .animal-profile-summary{display:grid;grid-template-columns:132px minmax(0,1fr);align-items:center;gap:20px;margin:0 0 20px;padding:0;border:0;background:none}
#app .full-animal-profile .animal-profile-portrait{display:grid;gap:6px;margin:0}
#app .full-animal-profile .animal-profile-portrait img.animal-avatar.large{display:block;width:132px;height:99px;object-fit:cover;border-radius:14px;border:1px solid var(--fj-line)}
#app .full-animal-profile .animal-profile-portrait small{font-size:12px;color:var(--fj-muted);text-align:center}
#app .full-animal-profile .profile-compact-identity{display:grid;gap:6px;min-width:0}
#app .full-animal-profile .profile-classification{margin:0;font-size:20px;font-weight:720;letter-spacing:-.02em;color:var(--fj-ink)}
#app .full-animal-profile .profile-current-location{margin:0;font-size:14px;color:var(--fj-muted)}
#app .full-animal-profile .profile-current-status{display:flex;flex-wrap:wrap;gap:8px}
#app .full-animal-profile .profile-current-status .status{margin:0;font-size:12px;padding:3px 10px}
#app .full-animal-profile .animal-id-net{display:flex;align-items:baseline;gap:8px;margin:2px 0 0;font-size:13px}
#app .full-animal-profile .animal-id-net small{font-size:13px;color:var(--fj-muted)}
#app .full-animal-profile .animal-id-net b{font-size:15px;font-weight:700}
#app .full-animal-profile .profile-actions{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 20px}
#app .full-animal-profile .profile-actions>.button-primary{flex:0 1 auto;min-width:200px}
#app .full-animal-profile .profile-navigation{display:flex;gap:4px;margin:0 0 4px;overflow-x:auto;border-bottom:1px solid var(--fj-line);scrollbar-width:none}
#app .full-animal-profile .profile-navigation::-webkit-scrollbar{display:none}
#app .full-animal-profile .profile-navigation>button{position:relative;flex:0 0 auto;min-height:44px;margin:0;padding:0 14px;border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--fj-muted);font-size:14px;font-weight:600}
#app .full-animal-profile .profile-navigation>button::after{content:"";position:absolute;left:10px;right:10px;bottom:0;height:2px;border-radius:2px;background:var(--brand-primary);transform:scaleX(0);transition:transform .25s cubic-bezier(.22,1,.36,1)}
#app .full-animal-profile .profile-navigation>button:is([aria-pressed=true],[aria-selected=true],[aria-current=page],.active){color:var(--fj-ink)}
#app .full-animal-profile .profile-navigation>button:is([aria-pressed=true],[aria-selected=true],[aria-current=page],.active)::after{transform:none}
#app .full-animal-profile .profile-tab-panel{padding-top:8px}
#app .full-animal-profile .animal-profile-overview{margin:0 0 4px;padding:16px 0;border:0;border-radius:0;background:none;box-shadow:none}
#app .full-animal-profile .animal-profile-overview>h3{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
#app .full-animal-profile .animal-profile-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:0;border:1px solid var(--fj-line);border-radius:14px;background:var(--fj-panel);overflow:hidden}
#app .full-animal-profile .profile-stat{display:grid;align-content:start;gap:4px;margin:0;padding:16px 18px;border:0;border-left:1px solid var(--fj-line);border-radius:0;background:none;box-shadow:none;min-height:0}
#app .full-animal-profile .profile-stat:first-child{border-left:0}
#app .full-animal-profile .profile-stat small{font-size:12px;font-weight:600;color:var(--fj-muted)}
#app .full-animal-profile .profile-stat b{font-size:22px;font-weight:720;letter-spacing:-.02em;color:var(--fj-ink)}
#app .full-animal-profile .profile-stat span{font-size:12px;color:var(--fj-muted)}
#app .full-animal-profile :is(details.profile-section,details.profile-about,details.profile-history,section.profile-section){margin:0;padding:0;border:0;border-top:1px solid var(--fj-line);border-radius:0;background:none;box-shadow:none}
#app .full-animal-profile .profile-tab-panel>:is(details,section):first-child{border-top:0}
#app .full-animal-profile :is(details.profile-section,details.profile-about,details.profile-history)>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;margin:0;padding:0;border:0;background:none;box-shadow:none;font-size:16px;font-weight:650;color:var(--fj-ink);cursor:pointer;list-style:none}
#app .full-animal-profile :is(details.profile-section,details.profile-about,details.profile-history)>summary::-webkit-details-marker{display:none}
#app .full-animal-profile :is(details.profile-section,details.profile-about,details.profile-history)[open]{padding-bottom:16px}
#app .full-animal-profile section.profile-section>h3{margin:16px 0 8px;font-size:16px;font-weight:650}
#app .full-animal-profile :is(.profile-section,.profile-about,.profile-history) p{margin:6px 0;font-size:14px;line-height:1.55}
#app .full-animal-profile .animal-profile-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:0 24px;margin:0}
#app .full-animal-profile .animal-profile-facts .detail-cell{display:grid;gap:2px;padding:10px 0;border:0;border-bottom:1px solid var(--fj-line);border-radius:0;background:none}
#app .full-animal-profile .animal-profile-facts .detail-cell small{font-size:12px;font-weight:600;color:var(--fj-muted)}
#app .full-animal-profile .animal-profile-facts .detail-cell b{font-size:15px;font-weight:600}
#app .full-animal-profile .profile-history .history-item{display:grid;grid-template-columns:28px minmax(0,1fr);gap:12px;align-items:start;padding:10px 0;border-top:1px solid var(--fj-line)}
#app .full-animal-profile .profile-history .history-item b{display:block;font-size:14px;font-weight:650}
#app .full-animal-profile .profile-history .history-item small{display:block;font-size:13px;color:var(--fj-muted);line-height:1.45}
#app .full-animal-profile .profile-history .record-dot{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--brand-soft,#e3ece6);color:var(--brand-primary);font-size:13px}
#app .full-animal-profile .profile-history details.record-month{border-top:1px solid var(--fj-line)}
#app .full-animal-profile .profile-history details.record-month>summary{display:flex;align-items:center;justify-content:space-between;min-height:48px;font-size:14px;font-weight:650;cursor:pointer}
#app .full-animal-profile .profile-history details.record-month>summary small{font-size:13px;font-weight:500;color:var(--fj-muted)}
#app .full-animal-profile .profile-history .period-filter{margin:0 0 8px}
#app .full-animal-profile .feature-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px;margin:4px 0 12px}
#app .full-animal-profile .feature-metrics>div{display:grid;gap:2px}
#app .full-animal-profile .feature-metrics small{font-size:12px;font-weight:600;color:var(--fj-muted)}
#app .full-animal-profile .animal-return{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px 24px}
#app .full-animal-profile .animal-return small{font-size:12px;color:var(--fj-muted)}
#app .full-animal-profile .animal-return>div{display:grid;gap:4px}
@media (max-width:600px){
 #app .full-animal-profile .animal-profile-summary{grid-template-columns:96px minmax(0,1fr);gap:14px}
 #app .full-animal-profile .animal-profile-portrait img.animal-avatar.large{width:96px;height:72px;border-radius:12px}
 #app .full-animal-profile .profile-classification{font-size:18px}
 #app .full-animal-profile .profile-actions>.button-primary{flex:1 1 auto;min-width:0}
 #app .full-animal-profile .profile-navigation>button{padding:0 10px;font-size:13px}
 #app .full-animal-profile .profile-stat{border-left:0;border-top:1px solid var(--fj-line)}
 #app .full-animal-profile .profile-stat:first-child{border-top:0}
 #app .full-animal-profile .animal-profile-stats{grid-template-columns:1fr 1fr}
 #app .full-animal-profile .animal-profile-stats .profile-stat:nth-child(2){border-left:1px solid var(--fj-line);border-top:0}
}
/* Profile tabs: underline drawn as an inset shadow so the scroll container can't clip it. */
#app .full-animal-profile .profile-navigation>button::after{content:none}
#app .full-animal-profile .profile-navigation>button{transition:box-shadow .25s ease,color .2s ease}
#app .full-animal-profile .profile-navigation>button:is([aria-pressed=true],[aria-selected=true],[aria-current=page],.active){box-shadow:inset 0 -2px 0 var(--brand-primary)}
/* Inside dialogs the generic collapsible arrow must not stack on the period chooser's own arrow. */
html #app .modal .period-filter>summary::after{position:static;inset:auto;margin:0;border:0;transform:none}
html #app .modal .period-filter[open]>summary::after{transform:rotate(180deg)}
