/* ===== Design tokens ===== */
:root{
  --bg:#f5f3ee; --surface:#ffffff; --surface-2:#faf8f4; --line:#e7e2d8; --line-2:#efebe3;
  --text:#1d2a24; --text-2:#56645c; --text-3:#8a958e;
  --brand:#1f5f45; --brand-2:#2e7d5b; --brand-soft:#e3f0e8; --brand-ink:#ffffff;
  --water:#2f80ed; --water-soft:#e6f0fd;
  --warn:#c77c02; --warn-soft:#fdf2dc;
  --danger:#c2412d; --danger-soft:#fbe7e3;
  --ok:#2e8b57; --ok-soft:#e2f3e9;
  --violet:#7b5cd6; --violet-soft:#efeafd;
  --sand:#b7864b; --sand-soft:#f6ecdf;
  --radius:16px; --radius-sm:10px;
  --shadow-sm:0 1px 2px rgba(29,42,36,.06),0 1px 1px rgba(29,42,36,.04);
  --shadow:0 6px 24px -8px rgba(29,42,36,.18),0 2px 6px rgba(29,42,36,.05);
  --shadow-lg:0 24px 60px -12px rgba(29,42,36,.35);
  --font:"Inter",ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
@media (prefers-color-scheme:dark){
  :root{
    --bg:#0f1512; --surface:#161e1a; --surface-2:#1b2520; --line:#26332c; --line-2:#202b25;
    --text:#e8efe9; --text-2:#a9b7ae; --text-3:#76857c;
    --brand:#4fbf8b; --brand-2:#6fd3a2; --brand-soft:#1d3329; --brand-ink:#08130e;
    --water:#5aa2ff; --water-soft:#172838; --warn:#f0b23b; --warn-soft:#2e2412;
    --danger:#ff7a66; --danger-soft:#331c18; --ok:#58c98b; --ok-soft:#173024;
    --violet:#a78bfa; --violet-soft:#241d38; --sand:#d9a567; --sand-soft:#2d2417;
    --shadow:0 8px 28px -10px rgba(0,0,0,.6); --shadow-lg:0 24px 60px -12px rgba(0,0,0,.7);
  }
}

/* ===== Base ===== */
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:var(--font);background:var(--bg);color:var(--text);font-size:15px;line-height:1.5;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit;color:inherit}
img{display:block;max-width:100%}
h1,h2,h3{margin:0;line-height:1.2;letter-spacing:-.01em}
h1{font-size:1.9rem;font-weight:750}
h2{font-size:1.15rem;font-weight:700}
h3{font-size:1rem;font-weight:650}
.container{max-width:1240px;margin:0 auto;padding:24px 20px 80px;outline:none}
.muted{color:var(--text-2)} .faint{color:var(--text-3)}
.small{font-size:.85rem} .tiny{font-size:.75rem}
.row{display:flex;align-items:center;gap:10px}
.spacer{flex:1}
[hidden]{display:none!important}
:focus-visible{outline:3px solid color-mix(in srgb,var(--brand) 45%,transparent);outline-offset:2px;border-radius:8px}

/* ===== Top bar ===== */
.topbar{position:sticky;top:0;z-index:30;background:color-mix(in srgb,var(--bg) 82%,transparent);backdrop-filter:saturate(1.4) blur(12px);border-bottom:1px solid var(--line)}
.topbar-inner{max-width:1240px;margin:0 auto;padding:12px 20px;display:flex;align-items:center;gap:18px}
.brand{display:flex;align-items:center;gap:8px;font-size:1.1rem;font-weight:600;letter-spacing:-.01em}
.brand b{color:var(--brand);font-weight:800}
.brand-mark{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--brand-soft);font-size:1.1rem}
.nav{display:flex;gap:4px}
.nav a{padding:8px 12px;border-radius:10px;color:var(--text-2);font-weight:550}
.nav a:hover{background:var(--surface);color:var(--text)}
.nav a.active{background:var(--surface);color:var(--text);box-shadow:var(--shadow-sm)}
.search{flex:1;max-width:420px;margin-left:auto;display:flex;align-items:center;gap:8px;padding:0 10px;height:40px;border-radius:12px;background:var(--surface);border:1px solid var(--line);transition:border-color .15s,box-shadow .15s}
.search:focus-within{border-color:var(--brand);box-shadow:0 0 0 4px var(--brand-soft)}
.search svg{width:18px;height:18px;fill:var(--text-3);flex:none}
.search input{flex:1;border:0;background:transparent;outline:none;min-width:0}
.search kbd{font:600 .7rem var(--font);color:var(--text-3);border:1px solid var(--line);border-radius:6px;padding:1px 6px}

/* ===== Buttons ===== */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 16px;border-radius:12px;border:1px solid var(--line);background:var(--surface);font-weight:600;cursor:pointer;white-space:nowrap;transition:transform .08s,background .15s,border-color .15s,box-shadow .15s;box-shadow:var(--shadow-sm)}
.btn:hover{border-color:color-mix(in srgb,var(--text) 18%,var(--line))}
.btn:active{transform:translateY(1px)}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn-primary{background:var(--brand);border-color:var(--brand);color:var(--brand-ink)}
.btn-primary:hover{background:var(--brand-2);border-color:var(--brand-2)}
.btn-water{background:var(--water-soft);border-color:transparent;color:var(--water)}
.btn-water:hover{border-color:var(--water)}
.btn-feed{background:var(--violet-soft);border-color:transparent;color:var(--violet)}
.btn-feed:hover{border-color:var(--violet)}
.btn-ghost{background:transparent;border-color:transparent;box-shadow:none;color:var(--text-2)}
.btn-ghost:hover{background:var(--surface-2);color:var(--text)}
.btn-sm{height:32px;padding:0 12px;border-radius:10px;font-size:.85rem}
.btn-icon{width:36px;height:36px;padding:0;border-radius:10px}
.btn-danger{color:var(--danger)}

/* ===== Cards / pills ===== */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-sm)}
.card-pad{padding:20px}
.card-head{display:flex;align-items:center;gap:10px;padding:16px 20px;border-bottom:1px solid var(--line-2)}
.card-body{padding:16px 20px}
.pill{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;border-radius:999px;font-size:.78rem;font-weight:650;background:var(--surface-2);color:var(--text-2);border:1px solid var(--line-2);white-space:nowrap}
.pill.water{background:var(--water-soft);color:var(--water);border-color:transparent}
.pill.warn{background:var(--warn-soft);color:var(--warn);border-color:transparent}
.pill.danger{background:var(--danger-soft);color:var(--danger);border-color:transparent}
.pill.ok{background:var(--ok-soft);color:var(--ok);border-color:transparent}
.pill.brand{background:var(--brand-soft);color:var(--brand);border-color:transparent}
.dot{width:8px;height:8px;border-radius:50%;background:currentColor;flex:none}

/* ===== Page header ===== */
.page-head{display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap;margin-bottom:20px}
.page-head .sub{color:var(--text-2);margin-top:4px}
.segmented{display:inline-flex;padding:3px;background:var(--surface);border:1px solid var(--line);border-radius:12px;gap:2px}
.segmented button{border:0;background:transparent;padding:6px 12px;border-radius:9px;font-weight:600;font-size:.85rem;color:var(--text-2);cursor:pointer}
.segmented button[aria-pressed="true"]{background:var(--brand-soft);color:var(--brand)}
.segmented .count{opacity:.7;margin-left:4px;font-weight:500}
.select{height:38px;border-radius:12px;border:1px solid var(--line);background:var(--surface);padding:0 10px;font-weight:550}

/* ===== KPI ===== */
.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px}
.kpi{padding:18px;display:flex;gap:14px;align-items:center}
.kpi-icon{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;font-size:1.25rem;flex:none}
.kpi-value{font-size:1.6rem;font-weight:750;line-height:1}
.kpi-label{color:var(--text-2);font-size:.85rem;margin-top:4px}

/* ===== Plant grid & card ===== */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(215px,1fr));gap:16px}
.plant-card{position:relative;display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;cursor:pointer;box-shadow:var(--shadow-sm);transition:transform .18s ease,box-shadow .18s ease,border-color .18s}
.plant-card:hover{transform:translateY(-3px);box-shadow:var(--shadow);border-color:color-mix(in srgb,var(--brand) 25%,var(--line))}
.pc-media{position:relative;aspect-ratio:4/3;background:var(--surface-2);overflow:hidden}
.pc-media img{width:100%;height:100%;object-fit:cover;transition:transform .4s ease}
.plant-card:hover .pc-media img{transform:scale(1.04)}
.pc-badges{position:absolute;left:10px;top:10px;right:10px;display:flex;gap:6px;justify-content:space-between}
.pc-badges .pill{backdrop-filter:blur(8px);box-shadow:var(--shadow-sm)}
.pc-body{padding:12px 14px 4px;flex:1}
.pc-name{font-weight:700;font-size:1rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pc-sci{font-style:italic;color:var(--text-2);font-size:.85rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:1.2em}
.pc-meta{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center;margin-top:8px;color:var(--text-3);font-size:.78rem}
.pc-meta>*{white-space:nowrap}
.pc-actions{display:flex;gap:8px;padding:10px 14px 14px}
.pc-actions .btn{flex:1}
.placeholder{width:100%;height:100%;display:grid;place-items:center;font-size:3rem;background:
  radial-gradient(circle at 30% 20%,color-mix(in srgb,var(--brand) 18%,transparent),transparent 60%),
  radial-gradient(circle at 80% 90%,color-mix(in srgb,var(--sand) 22%,transparent),transparent 55%),var(--surface-2)}
.placeholder span{filter:saturate(.9);opacity:.85}

/* ===== Dashboard ===== */
.dash-cols{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:18px;margin-bottom:26px}
.list{list-style:none;margin:0;padding:6px}
.list-item{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:12px;cursor:pointer}
.list-item:hover{background:var(--surface-2)}
.avatar{width:44px;height:44px;border-radius:12px;overflow:hidden;flex:none;background:var(--surface-2)}
.avatar img,.avatar .placeholder{width:100%;height:100%;object-fit:cover;font-size:1.3rem}
.li-main{flex:1;min-width:0}
.li-title{font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.empty{padding:28px 20px;text-align:center;color:var(--text-2)}
.empty .big{font-size:2rem;margin-bottom:6px}
.section-title{display:flex;align-items:center;gap:10px;margin:0 0 12px}

/* ===== Plant page ===== */
.crumbs{display:flex;gap:8px;align-items:center;color:var(--text-2);font-size:.9rem;margin-bottom:14px}
.crumbs a:hover{color:var(--text)}
.hero{display:grid;grid-template-columns:minmax(260px,380px) 1fr;overflow:hidden}
.hero-media{position:relative;min-height:260px;background:var(--surface-2);cursor:zoom-in}
.hero-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.hero-media .placeholder{position:absolute;inset:0;font-size:5rem;cursor:default}
.hero-media .count{position:absolute;right:12px;bottom:12px}
.hero-body{padding:26px 28px;display:flex;flex-direction:column;gap:12px}
.eyebrow{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.code{font:600 .78rem ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--text-2);background:var(--surface-2);border:1px solid var(--line-2);padding:3px 8px;border-radius:8px}
.hero h1{font-size:2.1rem}
.sci{font-style:italic;color:var(--text-2);margin-top:-6px}
.facts{display:flex;flex-wrap:wrap;gap:8px 18px;color:var(--text-2);font-size:.9rem}
.facts span b{color:var(--text);font-weight:600}
.hero-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:auto;padding-top:6px}
.file-btn input{display:none}

.stats{display:grid;grid-template-columns:1.3fr 1fr 1fr 1fr;gap:14px;margin:18px 0}
.stat{padding:18px;display:flex;gap:14px;align-items:center;min-height:104px}
.stat-label{color:var(--text-2);font-size:.8rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em}
.stat-value{font-size:1.25rem;font-weight:750;margin-top:2px}
.stat-sub{color:var(--text-3);font-size:.82rem}
.stat-icon{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;font-size:1.3rem;flex:none}
.ring{position:relative;width:74px;height:74px;flex:none}
.ring svg{transform:rotate(-90deg)}
.ring .ring-label{position:absolute;inset:0;display:grid;place-items:center;text-align:center;line-height:1.05}
.ring .ring-label b{font-size:1.15rem}
.ring .ring-label span{display:block;font-size:.65rem;color:var(--text-3);font-weight:600}

.plant-layout>*,.hero>*,.stats>*,.dash-cols>*{min-width:0}
.plant-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:18px;align-items:start}
.side-col{display:flex;flex-direction:column;gap:18px}
.main-col{display:flex;flex-direction:column;gap:18px}

.photo-strip{display:flex;gap:10px;overflow-x:auto;padding:16px 20px;scroll-snap-type:x mandatory}
.photo-strip>button,.photo-strip>label{flex:none;width:120px;height:120px;border-radius:12px;overflow:hidden;border:1px solid var(--line);padding:0;cursor:zoom-in;scroll-snap-align:start;background:var(--surface-2)}
.photo-strip img{width:100%;height:100%;object-fit:cover;transition:transform .3s}
.photo-strip button:hover img{transform:scale(1.06)}
.photo-add{display:grid!important;place-items:center;cursor:pointer!important;border-style:dashed!important;color:var(--text-2);font-weight:600;font-size:.85rem;text-align:center}
.photo-add input{display:none}

/* Timeline */
.filters{display:flex;gap:6px;flex-wrap:wrap;padding:12px 20px;border-bottom:1px solid var(--line-2)}
.chip-filter{border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:5px 12px;font-size:.82rem;font-weight:600;color:var(--text-2);cursor:pointer}
.chip-filter[aria-pressed="true"]{background:var(--text);color:var(--surface);border-color:var(--text)}
.timeline{padding:8px 20px 20px}
.tl-day{margin-top:14px}
.tl-day-label{position:sticky;top:70px;z-index:1;display:inline-block;font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3);background:var(--surface);padding:4px 0}
.tl-items{position:relative;margin-left:18px;border-left:2px solid var(--line-2);padding-left:22px}
.tl-item{position:relative;padding:10px 0}
.tl-node{position:absolute;left:-40px;top:10px;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font-size:1rem;background:var(--surface);border:2px solid var(--line);box-shadow:0 0 0 4px var(--surface)}
.tl-card{background:var(--surface-2);border:1px solid var(--line-2);border-radius:14px;padding:12px 14px}
.tl-card:hover .tl-del{opacity:1}
.tl-head{display:flex;align-items:center;gap:8px}
.tl-time{color:var(--text-3);font-size:.8rem;margin-left:auto}
.tl-entries{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.tl-entry{display:inline-flex;align-items:center;gap:6px;background:var(--surface);border:1px solid var(--line-2);border-radius:999px;padding:4px 6px 4px 10px;font-size:.85rem;font-weight:600}
.tl-entry .v{font-weight:500;color:var(--text-2)}
.tl-del{opacity:0;border:0;background:transparent;color:var(--text-3);cursor:pointer;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;font-size:.8rem;transition:opacity .15s}
.tl-del:hover{background:var(--danger-soft);color:var(--danger)}
.tl-note{margin-top:8px;color:var(--text-2);font-size:.9rem;white-space:pre-wrap}
.tl-photo{margin-top:8px;width:180px;height:130px;border-radius:10px;overflow:hidden;cursor:zoom-in;border:0;padding:0}
.tl-photo img{width:100%;height:100%;object-fit:cover}
@media (hover:none){.tl-del{opacity:1}}

/* Watering card */
.heatmap{display:grid;grid-template-rows:repeat(7,1fr);grid-auto-flow:column;grid-auto-columns:1fr;gap:3px;margin-top:10px}
.heatmap i{aspect-ratio:1;border-radius:3px;background:var(--line-2)}
.heatmap i.on{background:var(--water)}
.heatmap i.today{outline:2px solid var(--text-3);outline-offset:-1px}
.heatmap i.future{background:transparent}
.legend{display:flex;justify-content:space-between;color:var(--text-3);font-size:.72rem;margin-top:6px}
.interval-edit{display:flex;gap:8px;align-items:center;margin-top:12px;padding:10px 12px;background:var(--surface-2);border-radius:12px}
.interval-edit input{width:64px;height:32px;border-radius:8px;border:1px solid var(--line);background:var(--surface);padding:0 8px;text-align:center;font-weight:700}
.chart{width:100%;height:auto;margin-top:8px;overflow:visible}
.chart text{fill:var(--text-3);font-size:10px}
.kv{display:grid;grid-template-columns:auto 1fr;gap:8px 16px;margin:0;font-size:.9rem}
.kv dt{color:var(--text-3)} .kv dd{margin:0;font-weight:550;text-align:right;word-break:break-word}

/* ===== Forms ===== */
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.field{display:flex;flex-direction:column;gap:6px}
.field.full{grid-column:1/-1}
.field label{font-size:.82rem;font-weight:650;color:var(--text-2)}
.input{height:42px;border-radius:12px;border:1px solid var(--line);background:var(--surface);padding:0 12px;outline:none;transition:border-color .15s,box-shadow .15s;width:100%}
textarea.input{height:auto;min-height:88px;padding:10px 12px;resize:vertical}
.input:focus{border-color:var(--brand);box-shadow:0 0 0 4px var(--brand-soft)}
.hint{font-size:.78rem;color:var(--text-3)}
.form-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:18px}

/* ===== Quick-log sheet ===== */
.sheet-backdrop{position:fixed;inset:0;z-index:50;background:rgba(15,21,18,.45);backdrop-filter:blur(2px);display:flex;justify-content:flex-end;animation:fade .18s ease}
.sheet{width:min(520px,100%);height:100%;background:var(--surface);box-shadow:var(--shadow-lg);display:flex;flex-direction:column;animation:slide-in .24s cubic-bezier(.2,.8,.2,1)}
.sheet-head{display:flex;align-items:center;gap:12px;padding:18px 20px;border-bottom:1px solid var(--line-2)}
.sheet-body{flex:1;overflow-y:auto;padding:6px 20px 20px}
.sheet-foot{display:flex;align-items:center;gap:12px;padding:14px 20px calc(14px + env(safe-area-inset-bottom));border-top:1px solid var(--line-2);background:var(--surface)}
.q-section{padding:16px 0;border-bottom:1px dashed var(--line)}
.q-section:last-child{border-bottom:0}
.q-title{display:flex;align-items:center;gap:8px;font-size:.78rem;font-weight:750;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3);margin-bottom:10px}
.q-title .hint{text-transform:none;letter-spacing:0;font-weight:500}
.choices{display:flex;flex-wrap:wrap;gap:8px}
.choice{--c:var(--brand);--c-soft:var(--brand-soft);position:relative;display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 14px 0 12px;border-radius:12px;border:1.5px solid var(--line);background:var(--surface);font-weight:600;font-size:.9rem;cursor:pointer;user-select:none;transition:border-color .15s,background .15s,transform .08s}
.choice:hover{border-color:color-mix(in srgb,var(--c) 45%,var(--line))}
.choice:active{transform:scale(.97)}
.choice .ico{font-size:1.05rem}
.choice .tick{width:18px;height:18px;border-radius:6px;border:1.5px solid var(--line);display:grid;place-items:center;font-size:.7rem;color:transparent;transition:all .15s;margin-left:2px}
.choices.single .tick{border-radius:50%}
.choice[aria-pressed="true"]{border-color:var(--c);background:var(--c-soft);color:color-mix(in srgb,var(--c) 70%,var(--text))}
.choice[aria-pressed="true"] .tick{background:var(--c);border-color:var(--c);color:#fff}
.choice.big{flex:1 1 calc(50% - 8px);min-height:52px;justify-content:flex-start}
.c-water{--c:var(--water);--c-soft:var(--water-soft)} .c-violet{--c:var(--violet);--c-soft:var(--violet-soft)} .c-brand{--c:var(--brand);--c-soft:var(--brand-soft)}
.c-sand{--c:var(--sand);--c-soft:var(--sand-soft)} .c-warn{--c:var(--warn);--c-soft:var(--warn-soft)}
.c-danger{--c:var(--danger);--c-soft:var(--danger-soft)} .c-ok{--c:var(--ok);--c-soft:var(--ok-soft)}
.measure{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.measure .input-unit{position:relative}
.measure .input-unit span{position:absolute;right:12px;top:50%;transform:translateY(-50%);color:var(--text-3);font-size:.85rem;pointer-events:none}
.summary{font-size:.85rem;color:var(--text-2)}
.summary b{color:var(--text)}

/* ===== Lightbox ===== */
.lightbox{position:fixed;inset:0;z-index:70;background:rgba(8,12,10,.92);display:flex;align-items:center;justify-content:center;animation:fade .15s ease}
.lightbox figure{margin:0;max-width:90vw;max-height:88vh;display:flex;flex-direction:column;align-items:center;gap:10px}
.lightbox img{max-width:90vw;max-height:80vh;border-radius:12px;box-shadow:var(--shadow-lg);object-fit:contain}
.lightbox figcaption{color:#cfd8d2;font-size:.9rem}
.lb-btn{position:absolute;border:0;background:rgba(255,255,255,.1);color:#fff;width:48px;height:48px;border-radius:50%;font-size:1.6rem;cursor:pointer;display:grid;place-items:center}
.lb-btn:hover{background:rgba(255,255,255,.2)}
.lb-close{top:18px;right:18px;font-size:1.1rem}
.lb-prev{left:18px} .lb-next{right:18px}

/* ===== Toasts ===== */
.toasts{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:80;display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none}
.toast{pointer-events:auto;display:flex;align-items:center;gap:14px;background:#17231d;color:#eef5f0;padding:12px 14px 12px 16px;border-radius:14px;box-shadow:var(--shadow-lg);font-weight:550;animation:toast-in .22s cubic-bezier(.2,.8,.2,1)}
.toast.error{background:#4a1d16}
.toast button{border:0;background:rgba(255,255,255,.12);color:#fff;font-weight:700;padding:6px 10px;border-radius:8px;cursor:pointer}
.toast.leaving{animation:toast-out .2s ease forwards}

/* ===== Skeleton ===== */
.skeleton{background:linear-gradient(90deg,var(--line-2) 25%,var(--surface-2) 50%,var(--line-2) 75%);background-size:200% 100%;animation:shimmer 1.2s infinite;border-radius:12px}

@keyframes fade{from{opacity:0}}
@keyframes slide-in{from{transform:translateX(40px);opacity:0}}
@keyframes toast-in{from{transform:translateY(12px);opacity:0}}
@keyframes toast-out{to{transform:translateY(12px);opacity:0}}
@keyframes shimmer{to{background-position:-200% 0}}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* ===== Responsive ===== */
@media (max-width:1020px){
  .plant-layout{grid-template-columns:1fr}
  .side-col{position:static}
  .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dash-cols{grid-template-columns:1fr}
}
@media (max-width:720px){
  .container{padding:16px 14px 80px}
  .topbar-inner{padding:10px 14px;gap:10px;flex-wrap:wrap}
  .search{order:3;flex-basis:100%;max-width:none;margin-left:0}
  .topbar .btn-primary{margin-left:auto}
  .stats{grid-template-columns:1fr}
  .stat{min-height:0}
  .brand span:not(.brand-mark),.hide-sm,.search kbd{display:none}
  .nav a{padding:8px 10px}
  .hero{grid-template-columns:1fr}
  .hero-media{min-height:220px}
  .hero-body{padding:18px}
  .hero h1{font-size:1.6rem}
  .form-grid{grid-template-columns:1fr}
  .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .pc-actions .btn span.lbl{display:none}
  .sheet-backdrop{align-items:flex-end}
  .sheet{width:100%;max-width:100vw;min-width:0;height:92vh;border-radius:20px 20px 0 0;animation:sheet-up .26s cubic-bezier(.2,.8,.2,1)}
  .lb-prev,.lb-next{bottom:24px;top:auto}
}
@keyframes sheet-up{from{transform:translateY(40px);opacity:0}}

/* ===================================================================
   AI assistant
   =================================================================== */
:root{--ai-1:#7b5cd6;--ai-2:#2e7d5b;--ai-grad:linear-gradient(135deg,var(--ai-1),var(--ai-2));--ai-soft:color-mix(in srgb,var(--violet-soft) 70%,var(--brand-soft))}
@media (prefers-color-scheme:dark){:root{--ai-1:#a78bfa;--ai-2:#4fbf8b}}
.btn-ai{background:var(--ai-grad);border:0;color:#fff;box-shadow:0 4px 14px -6px color-mix(in srgb,var(--ai-1) 70%,transparent)}
.btn-ai:hover{filter:brightness(1.08);border:0}
.ai-spark{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:11px;background:var(--ai-grad);color:#fff;font-size:1rem;flex:none;box-shadow:0 4px 12px -4px color-mix(in srgb,var(--ai-1) 60%,transparent)}
.ai-spark.sm{width:26px;height:26px;border-radius:8px;font-size:.8rem}
.ai-eyebrow{font-size:.72rem;font-weight:750;letter-spacing:.07em;text-transform:uppercase;background:var(--ai-grad);-webkit-background-clip:text;background-clip:text;color:transparent}
.ai-head{display:flex;align-items:center;gap:12px}
.ai-head h2{margin-top:2px;font-size:1.15rem}
.ai-badge{display:inline-grid;place-items:center;margin-left:2px;font-size:.7rem;filter:saturate(1.2)}
.ai-dot{position:absolute;top:6px;right:6px;width:22px;height:22px;border-radius:7px;display:grid;place-items:center;font-size:.7rem;background:var(--ai-grad);box-shadow:var(--shadow-sm)}
.photo-strip>button{position:relative}
.pill.ai-pill{background:var(--ai-soft);color:var(--violet);border-color:transparent}
.pill.sand{background:var(--sand-soft);color:var(--sand);border-color:transparent}
.pill.violet{background:var(--violet-soft);color:var(--violet);border-color:transparent}
.ok-text{color:var(--ok);font-weight:600}
.spinner{width:14px;height:14px;border-radius:50%;border:2px solid currentColor;border-right-color:transparent;display:inline-block;animation:spin .7s linear infinite;vertical-align:-2px}
@keyframes spin{to{transform:rotate(360deg)}}

/* thinking dots + shimmer */
.ai-thinking{display:inline-flex;gap:5px;padding:4px 0}
.ai-thinking span{width:7px;height:7px;border-radius:50%;background:var(--ai-1);opacity:.35;animation:think 1.2s infinite}
.ai-thinking span:nth-child(2){animation-delay:.15s;background:color-mix(in srgb,var(--ai-1),var(--ai-2))}
.ai-thinking span:nth-child(3){animation-delay:.3s;background:var(--ai-2)}
@keyframes think{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-4px)}}
.shimmer-line{height:11px;margin:10px 0;border-radius:6px;background:linear-gradient(90deg,var(--line-2) 25%,var(--ai-soft) 50%,var(--line-2) 75%);background-size:200% 100%;animation:shimmer 1.3s infinite}

/* dashboard hero */
.ai-hero{position:relative;display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:0;margin-bottom:20px;border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow-sm);isolation:isolate}
.ai-hero::before{content:"";position:absolute;inset:0;padding:1.5px;border-radius:inherit;background:var(--ai-grad);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none;opacity:.55}
.ai-hero::after{content:"";position:absolute;inset:0;border-radius:inherit;background:radial-gradient(600px 180px at 0% 0%,color-mix(in srgb,var(--ai-1) 9%,transparent),transparent 70%),radial-gradient(500px 200px at 100% 100%,color-mix(in srgb,var(--ai-2) 8%,transparent),transparent 70%);z-index:-1}
.ai-brief{padding:20px 22px;border-right:1px solid var(--line-2);min-width:0}
.ai-quick{padding:20px 22px;display:flex;flex-direction:column;gap:10px;min-width:0}
.ai-summary{margin:12px 0;color:var(--text-2);line-height:1.55}
.ai-prios{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.ai-prio{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:12px;border:1px solid var(--line-2);background:color-mix(in srgb,var(--surface) 85%,transparent);cursor:pointer;transition:background .15s,border-color .15s}
.ai-prio:hover{border-color:var(--line);background:var(--surface-2)}
.ai-prio .avatar{width:36px;height:36px;border-radius:10px}
.ai-prio .li-title{display:flex;align-items:center;gap:8px;white-space:normal}
.ai-prio .pill{height:22px;font-size:.72rem}
.ai-prio-n{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;font-size:.75rem;font-weight:750;background:var(--ai-soft);color:var(--violet);flex:none}
.ai-prio.done{opacity:.6}
.ai-prio.done .li-title{text-decoration:line-through;text-decoration-color:var(--text-3)}
.ai-prio.done .ai-prio-n{background:var(--ok-soft);color:var(--ok)}
.ai-tip{display:flex;gap:10px;margin-top:12px;padding:10px 12px;border-radius:12px;background:var(--warn-soft);color:color-mix(in srgb,var(--warn) 60%,var(--text));font-size:.88rem}
.ai-meta{margin-top:10px;font-size:.75rem;color:var(--text-3)}
.ai-input{display:flex;align-items:flex-start;gap:6px;border:1.5px solid var(--line);border-radius:14px;background:var(--surface);padding:6px 6px 6px 12px;transition:border-color .15s,box-shadow .15s}
.ai-input:focus-within{border-color:color-mix(in srgb,var(--ai-1) 60%,var(--line));box-shadow:0 0 0 4px color-mix(in srgb,var(--ai-1) 14%,transparent)}
.ai-input textarea,.ai-input input{flex:1;min-width:0;border:0;outline:0;background:transparent;resize:none;padding:6px 0;line-height:1.45;color:var(--text)}
.ai-input .ai-spark.sm{margin-top:4px}
.ai-mic.rec{background:var(--danger-soft);color:var(--danger);animation:pulse 1.2s infinite}
@keyframes pulse{50%{box-shadow:0 0 0 6px color-mix(in srgb,var(--danger) 18%,transparent)}}
.ai-quick-foot{flex-wrap:wrap}
.ai-review{display:flex;flex-direction:column;gap:8px;animation:fade .2s ease}
.ai-review-card{border:1px solid var(--line-2);border-radius:14px;padding:10px 12px;background:var(--surface-2);display:flex;flex-direction:column;gap:8px}
.avatar.sm{width:28px;height:28px;border-radius:8px}
.ai-entries{display:flex;flex-wrap:wrap;gap:6px}
.ai-entry{display:inline-flex;align-items:center;gap:6px;border:1.5px solid var(--line);background:var(--surface);border-radius:10px;padding:5px 10px;font-size:.84rem;font-weight:600;cursor:pointer;color:var(--text)}
.ai-entry .tick{width:16px;height:16px;border-radius:5px;border:1.5px solid var(--line);display:grid;place-items:center;font-size:.62rem;color:transparent}
.ai-entry[aria-pressed="true"]{border-color:var(--ai-1);background:var(--ai-soft)}
.ai-entry[aria-pressed="true"] .tick{background:var(--ai-1);border-color:var(--ai-1);color:#fff}
.ai-entry[aria-pressed="false"]{opacity:.55;text-decoration:line-through}
.ai-entry.static{cursor:default;background:var(--surface);border-color:var(--line-2)}
.ai-warn{font-size:.85rem;padding:8px 12px;border-radius:10px;background:var(--warn-soft);color:color-mix(in srgb,var(--warn) 65%,var(--text))}
.ai-review-foot{padding-top:2px}

/* plant AI panel */
.ai-panel{overflow:hidden;animation:fade .2s ease;border-color:color-mix(in srgb,var(--ai-1) 35%,var(--line))}
.ai-panel .card-head{background:linear-gradient(90deg,color-mix(in srgb,var(--ai-1) 7%,transparent),transparent)}
.ai-panel-top{display:flex;gap:18px;padding:18px 20px;align-items:flex-start}
.ai-photo{position:relative;flex:none;width:150px;height:150px;border-radius:14px;overflow:hidden;border:1px solid var(--line);padding:0;background:var(--surface-2);cursor:zoom-in}
.ai-photo img{width:100%;height:100%;object-fit:cover}
.ai-photo.scanning::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent,color-mix(in srgb,var(--ai-1) 35%,transparent) 48%,color-mix(in srgb,#fff 70%,var(--ai-1)) 50%,transparent 52%);background-size:100% 220%;animation:scan 1.6s linear infinite}
@keyframes scan{from{background-position:0 100%}to{background-position:0 -120%}}
.ai-panel-top .ai-summary{margin:0 0 12px;color:var(--text);font-size:1rem}
.ai-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.ai-metric{border:1px solid var(--line-2);background:var(--surface-2);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:4px;min-width:0}
.ai-metric .k{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3)}
.ai-metric .v{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.conf{display:inline-block;width:64px;height:6px;border-radius:99px;background:var(--line-2);overflow:hidden;vertical-align:middle}
.conf i{display:block;height:100%;border-radius:inherit;background:var(--ai-grad)}
.conf.lo i{background:var(--warn)}
.conf-num{font-size:.72rem;color:var(--text-3);margin-left:6px;font-variant-numeric:tabular-nums}
.ai-metric .conf{width:100%}
.ai-metric .conf-num{margin:0}
.ai-signs{display:flex;flex-direction:column;gap:6px;padding:0 20px 14px}
.ai-sign{display:flex;align-items:center;gap:12px;padding:8px 12px;border-radius:12px;border:1px solid var(--line-2)}
.ai-sign .ico{font-size:1.2rem}
.ai-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:0 20px 14px}
.ai-block{border:1px solid var(--line-2);border-radius:14px;padding:14px 16px;background:var(--surface-2)}
.ai-block h3{margin:0 0 8px;font-size:.9rem}
.ai-species{font-size:1.05rem;font-weight:650;margin-bottom:4px}
.ai-list{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:4px;font-size:.9rem}
.ai-list li::marker{color:var(--ok)}
.ai-list.warn li::marker{color:var(--warn)}
.ai-foot{display:flex;align-items:center;gap:12px;padding:14px 20px;border-top:1px solid var(--line-2);flex-wrap:wrap}

/* quick-log sheet */
.ai-sheetbar{margin:14px 0 4px}
.ai-sheetbar .ai-input{align-items:center;padding:5px 5px 5px 6px}
.ai-photo-bar{display:flex;align-items:center;gap:10px;margin-top:8px}
.ai-photo-bar .small{flex:1;min-width:0}
.ai-picked{position:relative;box-shadow:0 0 0 2px color-mix(in srgb,var(--ai-1) 45%,transparent)}
.choice.ai-picked::after{content:"✨";position:absolute;top:-8px;right:-6px;font-size:.7rem;background:var(--surface);border-radius:50%;width:18px;height:18px;display:grid;place-items:center;box-shadow:var(--shadow-sm)}
.ai-flash{animation:ai-flash .9s ease}
@keyframes ai-flash{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--ai-1) 60%,transparent)}100%{box-shadow:0 0 0 10px transparent}}

/* lightbox analyse */
.lb-ai{margin-top:4px}
body:not(.ai-on) .lb-ai{display:none}

/* chat */
.ai-fab{position:fixed;right:22px;bottom:22px;z-index:60;display:flex;align-items:center;gap:10px;height:52px;padding:0 20px 0 9px;border:0;border-radius:999px;background:var(--surface);color:var(--text);font-weight:700;cursor:pointer;box-shadow:var(--shadow-lg),0 0 0 1.5px color-mix(in srgb,var(--ai-1) 40%,transparent);transition:transform .15s,box-shadow .15s}
.ai-fab:hover{transform:translateY(-2px)}
body.chat-open .ai-fab{display:none}
.ai-chat{position:fixed;right:22px;bottom:22px;z-index:65;width:min(420px,calc(100vw - 32px));height:min(640px,calc(100vh - 110px));display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow-lg);overflow:hidden;animation:chat-in .22s cubic-bezier(.2,.8,.2,1)}
@keyframes chat-in{from{transform:translateY(16px) scale(.98);opacity:0}}
.ai-chat-head{display:flex;align-items:center;gap:10px;padding:14px 12px 14px 16px;border-bottom:1px solid var(--line-2);background:linear-gradient(90deg,color-mix(in srgb,var(--ai-1) 8%,transparent),color-mix(in srgb,var(--ai-2) 6%,transparent))}
.ai-chat-context:not(:empty){padding:8px 16px 0}
.ai-chat-head .li-main{min-width:0}
.ai-chat-sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ai-chat-sub:not(.faint){color:var(--text-2);font-weight:600}
.ai-chat-head [aria-pressed=true]#ai-chat-history{background:color-mix(in srgb,var(--ai-1) 14%,transparent)}
.ai-chat.show-history .ai-chat-context{display:none}
.ai-chat.show-history .ai-chat-body{padding:0;gap:0}
.chat-hist{display:flex;flex-direction:column;min-height:100%}
.chat-hist-bar{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:6px;padding:10px 12px;background:var(--surface);border-bottom:1px solid var(--line-2)}
.chat-hist-bar .input{flex:1;min-width:0;height:34px;padding:6px 10px;font-size:.88rem}
.chat-hist-bar .btn{flex:none}
.chat-hist-list{display:flex;flex-direction:column;padding:4px 8px 12px}
.chat-hist-group{font-size:.7rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text-3);padding:12px 8px 4px}
.chat-hist-item{display:flex;align-items:center;gap:2px;border-radius:12px;padding-right:4px}
.chat-hist-item:hover,.chat-hist-item:focus-within{background:var(--surface-2)}
.chat-hist-item.current{background:color-mix(in srgb,var(--ai-1) 9%,transparent)}
.chat-hist-item .btn-icon{flex:none;width:30px;height:30px;opacity:.55}
.chat-hist-item:hover .btn-icon,.chat-hist-item:focus-within .btn-icon{opacity:1}
.chat-hist-open{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;text-align:left;background:none;border:0;padding:9px 8px;color:inherit;font:inherit;cursor:pointer;border-radius:12px}
.chat-hist-title{font-weight:600;font-size:.92rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-hist-meta{font-size:.74rem;color:var(--text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-hist-meta b{color:var(--ai-1);font-weight:600}
.chat-hist-input{flex:1;min-width:0;margin:5px 4px;height:34px;padding:6px 10px}
.chat-hist-item.editing .btn-icon{display:none}
.chat-hist-empty{padding:32px 16px;text-align:center;color:var(--text-3);font-size:.9rem}
@media (hover:none){.chat-hist-item .btn-icon{opacity:.8}}
.ai-chat-body{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:14px;scroll-behavior:smooth}
.msg{display:flex;gap:8px;align-items:flex-start;max-width:100%}
.msg.user{justify-content:flex-end}
.msg .bubble{padding:10px 14px;border-radius:16px;line-height:1.5;font-size:.93rem;overflow-wrap:anywhere}
.msg.user .bubble{background:var(--brand);color:var(--brand-ink);border-bottom-right-radius:6px;max-width:85%;white-space:pre-wrap}
.msg.bot .bubble{background:var(--surface-2);border:1px solid var(--line-2);border-top-left-radius:6px}
.msg.bot.error .bubble{background:var(--danger-soft);border-color:transparent}
.msg.bot .li-main{display:flex;flex-direction:column;gap:8px}
.bubble p{margin:0 0 6px}.bubble p:last-child{margin:0}
.bubble ul,.bubble ol{margin:4px 0 6px;padding-left:20px}
.bubble li{margin:2px 0}.bubble li.nested{margin-left:16px}
.bubble code{background:var(--line-2);padding:1px 5px;border-radius:5px;font-size:.85em}
.msg-tools{font-size:.72rem;color:var(--text-3);padding-left:4px}
.chat-empty{text-align:center;padding:26px 10px 6px}
.chat-empty .big{font-size:2.4rem}
.chat-empty h3{margin:6px 0 4px}
.chat-suggest{display:flex;flex-wrap:wrap;gap:6px;justify-content:center}
.chat-suggest .chip-filter{text-align:left}
.chat-suggest .chip-filter:hover{border-color:var(--ai-1);color:var(--text)}
.proposal{border:1.5px solid color-mix(in srgb,var(--ai-1) 35%,var(--line));border-radius:14px;padding:10px 12px;display:flex;flex-direction:column;gap:8px;background:var(--surface)}
.proposal.saved{border-color:color-mix(in srgb,var(--ok) 45%,var(--line))}
.proposal.dismissed{opacity:.55}
.proposal a{color:var(--brand);font-weight:600;text-decoration:none}
.ai-chat-foot{display:flex;align-items:flex-end;gap:6px;padding:10px 10px calc(10px + env(safe-area-inset-bottom));border-top:1px solid var(--line-2)}
.ai-chat-foot textarea{flex:1;min-width:0;border:1.5px solid var(--line);border-radius:14px;padding:10px 12px;resize:none;background:var(--surface-2);color:var(--text);line-height:1.4;max-height:140px;outline:0}
.ai-chat-foot textarea:focus{border-color:color-mix(in srgb,var(--ai-1) 60%,var(--line))}
.ai-chat-foot .btn-icon{width:40px;height:40px;flex:none}

@media (max-width:1020px){
  .ai-hero{grid-template-columns:1fr}
  .ai-brief{border-right:0;border-bottom:1px solid var(--line-2)}
}
@media (max-width:720px){
  .ai-panel-top{flex-direction:column}
  .ai-photo{width:100%;height:200px}
  .ai-grid,.ai-metrics{grid-template-columns:1fr}
  .ai-fab{right:14px;bottom:14px;height:48px;padding:0 8px}
  .ai-fab .lbl{display:none}
  .ai-chat{inset:0;width:100%;height:100%;border-radius:0;border:0}
  .ai-brief,.ai-quick{padding:16px}
}
body:has(#sheet-root .sheet-backdrop) .ai-fab{display:none}
.ai-grid>.ai-block:only-child{grid-column:1/-1}
.ai-quick-foot .small{flex:1 1 220px}

/* ===================================================================
   Groups & lineage
   =================================================================== */
.warn-text{color:var(--warn)}
.group-chip{display:inline-flex;align-items:center;gap:4px;padding:1px 8px;border-radius:999px;background:var(--sand-soft);color:var(--sand);font-weight:650}
.group-card{position:relative;display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;cursor:pointer;box-shadow:var(--shadow-sm);transition:transform .18s ease,box-shadow .18s ease,border-color .18s}
.group-card:hover{transform:translateY(-3px);box-shadow:var(--shadow);border-color:color-mix(in srgb,var(--sand) 35%,var(--line))}
.gc-media{position:relative;aspect-ratio:4/3;background:var(--surface-2)}
.gc-media .pc-badges{position:absolute;left:10px;top:10px;display:flex;gap:6px}
.collage{display:grid;width:100%;height:100%;gap:2px;background:var(--line-2)}
.collage.n1{grid-template-columns:1fr}
.collage.n2{grid-template-columns:1fr 1fr}
.collage.n3{grid-template-columns:2fr 1fr;grid-template-rows:1fr 1fr}
.collage.n3>:first-child{grid-row:1/3}
.collage.n4{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}
.collage>img,.collage>.placeholder{width:100%;height:100%;object-fit:cover;min-height:0}
.gc-avatars{display:flex;align-items:center;margin-top:10px;padding-left:6px}
.avatar.xs{width:26px;height:26px;border-radius:50%;margin-left:-6px;border:2px solid var(--surface);display:inline-block}
.gc-avatars .more{margin-left:6px;font-size:.78rem;color:var(--text-3);font-weight:650}
.group-hero{display:grid;grid-template-columns:minmax(0,340px) minmax(0,1fr);overflow:hidden;margin-bottom:22px}
.gh-media{min-height:230px;background:var(--surface-2)}
.group-hero .hero-body{padding:24px 28px;display:flex;flex-direction:column;gap:12px}
.group-hero h1{margin:0}
.pc-remove{position:absolute;bottom:10px;right:10px;z-index:2;width:30px;height:30px;border-radius:50%;border:0;background:rgba(15,21,18,.55);color:#fff;cursor:pointer;opacity:0;transition:opacity .15s}
.plant-card:hover .pc-remove,.pc-remove:focus-visible{opacity:1}
@media (hover:none){.pc-remove{opacity:1}}
.add-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:220px;border:2px dashed var(--line);border-radius:var(--radius);background:transparent;color:var(--text-2);font-weight:650;cursor:pointer}
.add-tile span{font-size:1.8rem}
.add-tile:hover{border-color:var(--brand);color:var(--brand)}
.group-strip{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px;margin-bottom:26px}
.group-row{display:flex;align-items:center;gap:12px;padding:12px 14px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);cursor:pointer;box-shadow:var(--shadow-sm)}
.group-row:hover{border-color:color-mix(in srgb,var(--sand) 40%,var(--line))}
.group-row .avatar{width:48px;height:48px}
.member-list{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.member-row{display:flex;align-items:center;gap:12px;padding:8px 12px;border:1.5px solid var(--line);border-radius:12px;cursor:pointer;transition:border-color .15s,background .15s}
.member-row input{position:absolute;opacity:0;pointer-events:none}
.member-row .check{width:22px;height:22px;border-radius:7px;border:1.5px solid var(--line);display:grid;place-items:center;font-size:.75rem;color:transparent;flex:none}
.member-row:has(input:checked){border-color:var(--brand);background:var(--brand-soft)}
.member-row:has(input:checked) .check{background:var(--brand);border-color:var(--brand);color:#fff}
.member-row:has(input:focus-visible){outline:3px solid color-mix(in srgb,var(--brand) 45%,transparent)}
.member-row .li-main{display:flex;flex-direction:column}
.group-members-strip{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0 2px}
.gm{display:inline-flex;align-items:center;gap:6px;padding:3px 10px 3px 3px;border-radius:999px;background:var(--surface-2);border:1px solid var(--line-2);font-size:.82rem;font-weight:600}
.gm .avatar.sm{width:24px;height:24px;border-radius:50%}
.mini-list{display:flex;flex-direction:column;gap:4px}
.mini-plant{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:10px;color:inherit;text-decoration:none}
.mini-plant:hover{background:var(--surface-2)}
.mini-plant .li-main{display:flex;flex-direction:column}
.lineage .lin-label{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3);margin:12px 0 4px}
.lineage .lin-label:first-child{margin-top:0}
.linklike{border:0;background:none;padding:0;color:var(--brand);font-weight:650;cursor:pointer}
.add-form{display:flex;flex-direction:column;gap:16px;max-width:820px}
.form-h{font-size:1.05rem;margin:0 0 14px}
.form-p{margin:-8px 0 12px}
.new-group-row{display:grid;grid-template-columns:1fr 180px;gap:10px;margin-top:12px}
.mother-box{margin-top:16px;padding:14px;border-radius:14px;background:var(--ok-soft);border:1px solid color-mix(in srgb,var(--ok) 25%,transparent);display:flex;flex-direction:column;gap:8px}
.mother-box .q-title{margin:0}
.mother-pick{display:flex;align-items:center;gap:8px;background:var(--surface);border-radius:12px;padding:4px 8px 4px 4px;border:1px solid var(--line)}
.mother-pick .mini-plant{flex:1}
.combo-list{display:flex;flex-direction:column;gap:2px;max-height:260px;overflow-y:auto;margin-top:6px;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:4px}
.combo-item{display:flex;align-items:center;gap:10px;padding:8px;border:0;background:transparent;border-radius:9px;text-align:left;cursor:pointer;color:inherit}
.combo-item:hover,.combo-item:focus-visible{background:var(--surface-2)}
.combo-item .li-main{display:flex;flex-direction:column}
.sticky-actions{position:sticky;bottom:0;z-index:5;padding:14px 16px;margin:0;background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:blur(8px);border-top:1px solid var(--line);display:flex;align-items:center;gap:10px}
@media (max-width:720px){
  .group-hero{grid-template-columns:1fr}
  .new-group-row{grid-template-columns:1fr}
  .group-strip{grid-template-columns:1fr}
}

/* ===================================================================
   Sunlight
   =================================================================== */
.sun-chip{display:inline-flex;align-items:center;gap:3px;padding:1px 8px;border-radius:999px;background:var(--warn-soft);color:var(--warn);font-weight:650;white-space:nowrap}
.sun-fields{display:flex;flex-direction:column;gap:14px}
.sf-label{display:flex;align-items:baseline;gap:8px;font-size:.82rem;font-weight:650;color:var(--text-2);margin-bottom:8px}
.sf-hours{margin-left:auto;color:var(--warn);font-size:.95rem}
.sf-hours i{font-style:normal;font-weight:500;color:var(--text-3);font-size:.78rem}
.sun-choices{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
.sun-choices[data-sun="period"]{grid-template-columns:repeat(4,minmax(0,1fr))}
.sun-opt{min-height:52px;align-items:center}
.so-text{display:flex;flex-direction:column;line-height:1.15;text-align:left}
.so-text small{font-weight:500;color:var(--text-3);font-size:.72rem}
.sf-range{display:flex;align-items:center;gap:10px;font-size:.78rem;color:var(--text-3)}
.sf-range input[type=range]{flex:1;accent-color:var(--warn);height:28px}
.sf-range input[data-set="false"]{opacity:.45}
.sf-inherit{margin:0;padding:10px 12px;border-radius:10px;background:var(--surface-2)}
.sun-details{margin-top:16px;border:1px solid var(--line);border-radius:14px;padding:0 14px;background:color-mix(in srgb,var(--warn-soft) 35%,var(--surface))}
.sun-details summary{display:flex;align-items:center;gap:10px;padding:12px 0;cursor:pointer;font-weight:650;list-style:none}
.sun-details summary::-webkit-details-marker{display:none}
.sun-details summary::after{content:'▾';margin-left:auto;color:var(--text-3);transition:transform .2s}
.sun-details[open] summary::after{transform:rotate(180deg)}
.sun-details[open]{padding-bottom:14px}
.sun-summary{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.sun-big{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;font-size:1.6rem;background:var(--warn-soft)}
.sun-day{margin:4px 0 14px}
.sd-track{position:relative;height:14px;border-radius:999px;background:linear-gradient(90deg,#2b3a55 0%,#e9edf3 12%,#eef1f5 88%,#2b3a55 100%);overflow:hidden;border:1px solid var(--line-2)}
.sd-sun{position:absolute;top:0;bottom:0;border-radius:999px;background:linear-gradient(90deg,#ffd166,#f9a03f);box-shadow:0 0 12px rgba(249,160,63,.6)}
.sd-scale{display:flex;justify-content:space-between;font-size:.68rem;color:var(--text-3);margin-top:4px}
.sheet-narrow{max-width:560px}
.input-sm{height:36px;padding:0 10px;font-size:.88rem}
.sun-table{display:flex;flex-direction:column;gap:6px}
.st-row{display:grid;grid-template-columns:minmax(160px,1.6fr) minmax(130px,1fr) 110px minmax(120px,1fr) 36px;gap:10px;align-items:center;padding:6px 8px;border-radius:12px;transition:background .15s}
.st-row:not(.st-head):hover{background:var(--surface-2)}
.st-row.dirty{background:var(--warn-soft)}
.st-head{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3);padding-bottom:0}
.st-plant{display:flex;align-items:center;gap:10px;color:inherit;text-decoration:none;min-width:0}
.st-plant .li-main{display:flex;flex-direction:column;min-width:0}
.st-plant .li-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.st-actions{margin-top:12px;align-items:center}
.sun-table-card{margin-top:22px}
@media (max-width:720px){
  .st-head{display:none}
  .st-row{grid-template-columns:1fr 1fr 36px;padding:10px 8px;border-bottom:1px solid var(--line-2);border-radius:0}
  .st-plant{grid-column:1/3;grid-row:1}
  .st-reset{grid-row:1;grid-column:3}
  .st-row [data-f="sun_exposure"]{grid-row:2;grid-column:1}
  .st-row [data-f="sun_hours"]{grid-row:2;grid-column:2/4}
  .st-row [data-f="sun_period"]{grid-row:3;grid-column:1/-1}
  .sun-table-card .card-head{flex-wrap:wrap}
  .sun-table-card .card-head>.small{display:none}
  .sun-choices[data-sun="period"]{grid-template-columns:repeat(2,minmax(0,1fr))}
}
.sun-choices[data-sun="exposure"]{grid-template-columns:repeat(auto-fill,minmax(185px,1fr))}
.sun-choices[data-sun="period"] .choice{padding:0 10px;justify-content:center;white-space:nowrap}
.sun-choices[data-sun="period"] .tick{display:none}
.sun-choices .so-text span{white-space:nowrap}

/* ===================================================================
   Watering queue collapse (all sizes)
   =================================================================== */
.q-list.collapsed .q-item:nth-child(n+6){display:none}
.q-more{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:12px;border:0;border-top:1px solid var(--line-2);background:transparent;color:var(--brand);font-weight:650;cursor:pointer}
.q-more:hover{background:var(--surface-2)}

/* ===================================================================
   Mobile tab bar
   =================================================================== */
.tabbar{display:none}
@media (max-width:720px){
  .tabbar{position:fixed;left:0;right:0;bottom:0;z-index:45;display:grid;grid-template-columns:repeat(5,1fr);align-items:end;
    padding:6px 6px calc(6px + env(safe-area-inset-bottom));background:color-mix(in srgb,var(--surface) 90%,transparent);
    backdrop-filter:saturate(1.4) blur(14px);border-top:1px solid var(--line);box-shadow:0 -6px 20px rgba(20,30,25,.06)}
  .tabbar>a,.tabbar>button{display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 0 4px;border:0;background:none;color:var(--text-3);
    font:600 .68rem var(--font);text-decoration:none;border-radius:12px;cursor:pointer;-webkit-tap-highlight-color:transparent}
  .tabbar .ti{font-size:1.25rem;line-height:1;filter:grayscale(.9);opacity:.75;transition:transform .15s,filter .15s,opacity .15s}
  .tabbar a.active{color:var(--brand)}
  .tabbar a.active .ti{filter:none;opacity:1;transform:translateY(-1px) scale(1.08)}
  .tabbar .tab-add{justify-self:center;width:52px;height:52px;margin-bottom:4px;padding:0;justify-content:center;border-radius:18px;
    background:var(--brand);color:#fff;font-size:1.6rem;font-weight:500;box-shadow:0 6px 16px color-mix(in srgb,var(--brand) 40%,transparent)}
  .tabbar .tab-add.active{color:#fff;outline:3px solid var(--brand-soft)}
  .tabbar .tab-ai .ti{filter:none;opacity:1}
  .tabbar .tab-ai{color:var(--violet)}
  body:not(:has(#ai-chat)) .tab-ai{visibility:hidden}

  /* header: brand + search on one row, nav moves to the tab bar */
  .topbar-inner{flex-wrap:nowrap;padding:10px 14px}
  .topbar .nav,.topbar .btn-primary{display:none}
  .search{order:0;flex:1;flex-basis:auto;height:40px}
  .ai-fab{display:none}
  .container{padding:14px 14px calc(96px + env(safe-area-inset-bottom))}
  .toasts{bottom:calc(84px + env(safe-area-inset-bottom));width:calc(100% - 28px)}
  .toast{max-width:100%}
  .sticky-actions{bottom:calc(64px + env(safe-area-inset-bottom));margin:0 -14px;border-radius:0;padding:12px 14px}
  #add-summary{display:none}
  .sticky-actions .btn{flex:1}

  /* page headings */
  h1{font-size:1.65rem}
  .page-head{margin-bottom:14px;gap:10px}
  .page-head>.btn{margin-left:auto}
  .section-title h2{font-size:1.1rem}
  .card-head{padding:14px 16px}

  /* dashboard */
  .kpis{gap:10px;margin-bottom:16px}
  .kpi{padding:12px;gap:10px}
  .kpi-icon{width:38px;height:38px;font-size:1.05rem}
  .kpi-value{font-size:1.35rem}
  .kpi-label{font-size:.78rem}
  .q-item{display:grid;grid-template-columns:44px minmax(0,1fr) auto;grid-template-areas:"av main btn" "av pill btn";column-gap:12px;row-gap:4px;padding:10px 12px}
  .q-item>.avatar{grid-area:av;align-self:center}
  .q-item>.li-main{grid-area:main}
  .q-item>.pill{grid-area:pill;justify-self:start;height:22px;font-size:.72rem}
  .q-item>.btn{grid-area:btn;align-self:center}
  .q-item .small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

  /* AI briefing priorities */
  .ai-prio{display:grid;grid-template-columns:22px 36px minmax(0,1fr);column-gap:10px;row-gap:8px;align-items:start;padding:10px}
  .ai-prio>.ai-prio-n{margin-top:7px}
  .ai-prio .li-title{flex-wrap:wrap;row-gap:4px}
  .ai-prio>.btn,.ai-prio>.pill{grid-column:3;justify-self:start}

  /* dashboard group rows */
  .group-row{display:grid;grid-template-columns:48px minmax(0,1fr) auto;grid-template-areas:"av main btn" "av pill btn";column-gap:12px;row-gap:4px;padding:10px 12px}
  .group-row>.avatar{grid-area:av}
  .group-row>.li-main{grid-area:main}
  .group-row>.pill{grid-area:pill;justify-self:start;height:22px;font-size:.72rem}
  .group-row>.btn{grid-area:btn;width:44px;height:44px;padding:0}
  .group-row .small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

  /* plant & group cards (2 columns) */
  .grid{gap:10px}
  .pc-badges{gap:4px;left:8px;right:8px;top:8px}
  .pc-badges .pill{height:22px;padding:0 7px;font-size:.68rem;gap:4px;min-width:0;overflow:hidden;text-overflow:ellipsis}
  .pc-badges .pill:nth-child(2){font-size:0;gap:0;width:22px;padding:0;justify-content:center}
  .pc-badges .pill:nth-child(2) .dot{margin:0}
  .pc-body{padding:10px 12px 2px}
  .pc-name{font-size:.95rem;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
  .pc-sci{font-size:.78rem}
  .pc-meta{gap:5px 8px;font-size:.72rem}
  .pc-meta .code{font-size:.66rem;padding:1px 6px}
  .pc-meta .group-chip{max-width:100%;overflow:hidden;text-overflow:ellipsis}
  .pc-actions{padding:8px 10px 10px;gap:6px}
  .pc-actions .btn{height:36px}
  .group-card .li-title,.group-card h3{white-space:normal}

  /* plant / group hero */
  .hero-media,.gh-media{min-height:200px;max-height:240px}
  .hero-body,.group-hero .hero-body{padding:16px}
  .facts{gap:6px 14px;font-size:.85rem}
  .hero-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .hero-actions>.btn{justify-content:center;width:100%;min-width:0}
  .hero-actions>.btn-primary:first-child{grid-column:1/-1}
  .group-hero .hero-actions>.btn-water{grid-column:auto}

  /* plant stats: compact 2x2 */
  .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}
  .stat{padding:12px;gap:10px;align-items:flex-start;flex-direction:column}
  .stat-icon{width:36px;height:36px;font-size:1.05rem;border-radius:11px}
  .stat-label{font-size:.68rem}
  .stat-value{font-size:1.05rem}
  .stat-sub{font-size:.75rem}
  .ring{width:56px;height:56px}
  .ring svg{width:56px;height:56px}
  .ring .ring-label b{font-size:.95rem}
  .ring .ring-label span{font-size:.55rem}

  /* timeline filters: one scrollable row */
  .filters{flex-wrap:nowrap;overflow-x:auto;padding:10px 16px;scrollbar-width:none;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity}
  .filters::-webkit-scrollbar{display:none}
  .filters>*{flex:none;scroll-snap-align:start}
  .tl-items{margin-left:12px;padding-left:18px}
  .photo-strip{padding:12px 16px}
  .photo-strip>button,.photo-strip>label{width:96px;height:96px}

  /* sheets */
  .sheet-head{padding:14px 16px}
  .sheet-body{padding:4px 16px 16px}
  .sheet-foot{padding:12px 16px calc(12px + env(safe-area-inset-bottom))}
  .sheet-foot .summary{display:none}
  .choice{min-height:44px}
}
@media (max-width:360px){
  .grid{grid-template-columns:1fr}
}
@media (max-width:1020px){
  /* single column: show care info before the long timeline */
  .plant-layout{display:flex;flex-direction:column;align-items:stretch;gap:14px}
  .plant-layout section{min-width:0;width:100%}
  .plant-layout>.main-col,.plant-layout>.side-col{display:contents}
  #ai-panel{order:0}.sec-followups{order:1}.sec-water{order:2}#care-plan{order:3}#wx-plant{order:4}
  .sec-growth{order:5}.sec-changes{order:6}
}
@media (max-width:720px){
  .hero .hero-actions>.btn:last-child:nth-child(even){grid-column:1/-1}
  .plant-layout{gap:12px}
}
@media (max-width:720px){
  .sheet .choices.single[data-single="moisture"]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
  .sheet .choices.single[data-single="health"]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .sheet .choices.single .choice{min-width:0}
}

/* collapsible dashboard cards + More button */
.fold-btn{display:grid;place-items:center;width:32px;height:32px;margin-left:6px;border:1px solid var(--line-2);border-radius:999px;background:var(--surface);color:var(--muted);cursor:pointer;transition:background .15s,transform .2s}
.fold-btn:hover{background:var(--surface-2);color:var(--ink)}
.fold-btn span{display:block;transition:transform .2s ease}
.fold-card.folded .fold-btn span{transform:rotate(-90deg)}
.fold-card.folded .fold-body{display:none}
.fold-card.folded .fold-head{border-bottom:0}
.q-more .q-more-n{display:inline-block;padding:1px 8px;border-radius:999px;background:var(--brand-soft, var(--surface-2));font-size:.8rem}
.q-more .q-chev{display:inline-block;transition:transform .2s ease}
.q-more[aria-expanded="true"] .q-chev{transform:rotate(180deg)}
.dash-cols{align-items:start}

/* =================================================================== features: settings, bin, doctor, identify */
.icon-link{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;font-size:1.1rem;flex:none;transition:background .15s}
.icon-link:hover,.icon-link.active{background:var(--surface);box-shadow:var(--shadow-sm)}
.btn-doctor{background:linear-gradient(135deg,#e0f2ea,#e6eefc);border-color:transparent;color:var(--brand)}
.btn-doctor:hover{border-color:var(--brand)}
.btn-danger-solid{background:var(--danger);border-color:transparent;color:#fff}
.btn-danger-solid:disabled{opacity:.45;cursor:not-allowed}
.btn:disabled{opacity:.55;cursor:not-allowed}
.danger-text{color:var(--danger)}
.callout{display:flex;flex-direction:column;gap:6px;padding:12px 14px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line-2);font-size:.88rem;color:var(--text-2);margin-top:14px}
.callout.warn{background:var(--warn-soft);border-color:transparent;color:color-mix(in srgb,var(--warn) 75%,var(--text))}
.callout code{font-size:.8rem;background:rgba(0,0,0,.06);padding:1px 5px;border-radius:5px}
.card-foot{display:flex;align-items:center;gap:10px;padding:10px 14px;border-top:1px solid var(--line-2)}
.bar{display:block;height:6px;border-radius:99px;background:var(--line-2);overflow:hidden}
.bar>span{display:block;height:100%;border-radius:inherit;background:var(--brand);transition:width .5s ease}

/* settings */
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start;margin-bottom:18px}
.settings-body{display:flex;flex-direction:column}
.set-row{padding:14px 0;border-top:1px dashed var(--line-2);transition:opacity .2s}
.set-row:first-of-type{border-top:0;padding-top:0}
.set-row.dim{opacity:.45}
.set-label{font-weight:650;font-size:.9rem;margin-bottom:10px;display:flex;align-items:center;gap:8px}
.set-label b{margin-left:auto;color:var(--water)}
.mode-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
.mode-opt{min-height:56px}
.month-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;margin-bottom:10px}
.month{height:38px;border-radius:10px;border:1.5px solid var(--line);background:var(--surface);font-weight:600;font-size:.82rem;color:var(--text-2);cursor:pointer;position:relative;transition:all .15s}
.month.on{background:var(--water-soft);border-color:var(--water);color:var(--water)}
.month.on::before{content:'❄';position:absolute;top:1px;right:4px;font-size:.6rem}
.month.now{box-shadow:0 0 0 2px var(--brand-soft)}
.month.now::after{content:'';position:absolute;bottom:3px;left:50%;width:4px;height:4px;margin-left:-2px;border-radius:50%;background:var(--brand)}
.hemi .choice{min-height:36px;font-size:.82rem}
#factor{accent-color:var(--water)}
.factor-example{margin-top:6px}
.switch-row{display:flex;align-items:center;gap:14px;padding:12px 14px;border:1px solid var(--line-2);border-radius:14px;background:var(--surface-2);cursor:pointer}
.switch-row.compact{margin-top:12px;padding:8px 14px}
.switch-row .li-main{display:flex;flex-direction:column;gap:2px}
.switch-row .li-title{white-space:normal}
.switch{position:relative;width:46px;height:28px;flex:none}
.switch input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer;z-index:1}
.switch span{position:absolute;inset:0;border-radius:99px;background:var(--line);transition:background .2s}
.switch span::after{content:'';position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .2s cubic-bezier(.3,.7,.4,1.2)}
.switch input:checked+span{background:var(--ok)}
.switch input:checked+span::after{transform:translateX(18px)}
.switch input:focus-visible+span{outline:2px solid var(--brand);outline-offset:2px}
.switch input:disabled+span{opacity:.5}
.digest-peek{margin-top:14px;padding:12px 14px;border-radius:14px;border:1px dashed var(--line)}
.peek-row{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.notify-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.bin-link{display:flex;align-items:center;gap:14px;padding:16px 20px;color:inherit;text-decoration:none;transition:border-color .15s}
.bin-link:hover{border-color:var(--danger)}
.bin-link .li-main{display:flex;flex-direction:column;gap:2px}

/* season */
.season-pill{font-size:.8rem}
.season-note{display:flex;align-items:center;gap:8px;margin-top:8px;padding:8px 10px;border-radius:10px;background:var(--water-soft);color:var(--water)}
.season-note span{flex:1}
.season-note a{font-weight:650;color:inherit}
.season-banner{display:flex;align-items:center;gap:14px;padding:14px 18px;margin-bottom:18px;border-radius:var(--radius);color:#23507f;text-decoration:none;
  background:linear-gradient(120deg,#e7f1fc,#f1f6fd 60%,#eaf3f9);border:1px solid #d5e4f5}
.season-banner .li-main{display:flex;flex-direction:column;gap:2px}
.sb-ico{font-size:1.6rem}
@media (prefers-color-scheme:dark){.season-banner{background:var(--water-soft);border-color:transparent;color:var(--water)}}

/* bin */
.bin-stats{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.bin-stat{--c:var(--text-2);--c-soft:var(--surface);display:flex;flex-direction:column;align-items:flex-start;min-width:92px;padding:10px 14px;border-radius:14px;border:1.5px solid var(--line);background:var(--surface);cursor:pointer;text-align:left;transition:all .15s}
.bin-stat b{font-size:1.15rem}
.bin-stat span{font-size:.78rem;color:var(--text-2)}
.bin-stat.on{border-color:var(--c);background:var(--c-soft)}
.t-danger{--c:var(--danger);--c-soft:var(--danger-soft)} .t-ok{--c:var(--ok);--c-soft:var(--ok-soft)} .t-violet{--c:var(--violet);--c-soft:var(--violet-soft)}
.t-water{--c:var(--water);--c-soft:var(--water-soft)} .t-warn{--c:var(--warn);--c-soft:var(--warn-soft)} .t-sand{--c:var(--sand);--c-soft:var(--sand-soft)}
.bin-list{display:flex;flex-direction:column;gap:10px}
.bin-row{display:flex;align-items:center;gap:14px;padding:14px 16px}
.bin-row .li-main{display:flex;flex-direction:column;gap:3px}
.bin-row .li-title{color:inherit;text-decoration:none}
.avatar.lg{width:64px;height:64px;border-radius:14px;position:relative;overflow:visible}
.avatar.lg img,.avatar.lg .placeholder{border-radius:14px;filter:grayscale(.55)}
.bin-badge{position:absolute;right:-6px;bottom:-6px;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:var(--surface);box-shadow:var(--shadow-sm);font-size:.85rem}
.bin-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:2px}
.bin-note{font-size:.86rem;color:var(--text-2);font-style:italic;margin-top:2px}
.bin-actions{display:flex;gap:6px;flex:none}
.archived-banner{--c:var(--danger);--c-soft:var(--danger-soft);display:flex;align-items:center;gap:14px;padding:12px 16px;margin-bottom:14px;border-radius:14px;background:var(--c-soft);border:1px solid color-mix(in srgb,var(--c) 30%,transparent)}
.archived-banner .li-main{display:flex;flex-direction:column;gap:2px}
.ab-ico{font-size:1.6rem}
.hero.is-archived .hero-media img{filter:grayscale(.6)}
#view:has(.archived-banner) :is([data-action="log"],[data-action="quick-water"],.interval-edit,.photo-add,[data-action="edit-sun"],.tl-del,[data-action="edit-details"]){display:none!important}
.reason-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.reason-opt{min-height:56px}

/* follow-ups */
.follow-card{margin-bottom:0}
.dash-follow{margin-bottom:18px}
.follow-card .card-body{display:flex;flex-direction:column;gap:2px;padding:8px 14px}
.follow-row{display:flex;align-items:center;gap:12px;padding:8px 4px;border-radius:10px;transition:opacity .25s,transform .25s}
.follow-row+.follow-row{border-top:1px solid var(--line-2)}
.follow-row .li-main{display:flex;flex-direction:column;gap:1px}
.follow-row .li-title{color:inherit;text-decoration:none}
.follow-row.due .fr-ico{background:var(--danger-soft)}
.fr-ico{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:var(--violet-soft);flex:none}
.follow-row.done-anim{opacity:0;transform:translateX(12px)}
.sec-followups:empty{display:none}

/* doctor */
.doc-avatar{display:grid;place-items:center;font-size:1.4rem;background:linear-gradient(135deg,#e0f2ea,#e6eefc)}
.doc-photos{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 6px;scrollbar-width:thin}
.doc-ph{position:relative;flex:none;width:84px;height:84px;border-radius:14px;border:2px solid var(--line);background:var(--surface-2);overflow:hidden;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:0;color:var(--text-2);transition:border-color .15s,transform .1s}
.doc-ph img{width:100%;height:100%;object-fit:cover}
.doc-ph span:first-child{font-size:1.4rem}
.doc-ph small{font-size:.7rem;font-weight:600}
.doc-ph.add{border-style:dashed}
.doc-ph.on{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft)}
.doc-ph .tick{position:absolute;top:5px;right:5px;width:20px;height:20px;border-radius:50%;background:var(--brand);color:#fff;font-size:.7rem;display:none;place-items:center}
.doc-ph.on .tick{display:grid}
.doc-loading{display:flex;flex-direction:column;align-items:center;gap:10px;padding:48px 10px;text-align:center}
.doc-scan{position:relative;width:180px;height:180px;border-radius:20px;overflow:hidden;box-shadow:var(--shadow-lg)}
.doc-scan.sm{width:72px;height:72px;border-radius:14px}
.doc-scan img{width:100%;height:100%;object-fit:cover}
.scan-line{position:absolute;left:0;right:0;height:40%;background:linear-gradient(180deg,transparent,rgba(46,125,91,.45),transparent);animation:scan 1.6s ease-in-out infinite}
@keyframes scan{0%{top:-40%}100%{top:100%}}
.doc-pulse{font-size:3rem;animation:pulse 1.2s ease-in-out infinite}
@keyframes pulse{50%{transform:scale(1.12)}}
.urgency{--c:var(--ok);--c-soft:var(--ok-soft);display:flex;gap:12px;padding:14px 16px;margin-top:12px;border-radius:14px;background:var(--c-soft);border:1px solid color-mix(in srgb,var(--c) 30%,transparent)}
.urgency .li-main{display:flex;flex-direction:column;gap:4px}
.urgency b{color:var(--c)}
.urgency span:not(.u-ico){font-size:.9rem;line-height:1.45}
.u-ico{font-size:1.4rem}
.conds{display:flex;flex-direction:column;gap:10px}
.cond{padding:12px 14px;border-radius:14px;border:1px solid var(--line-2);background:var(--surface-2);display:flex;flex-direction:column;gap:6px}
.cond.top{border-color:color-mix(in srgb,var(--brand) 35%,var(--line));background:var(--surface)}
.cond-head{display:flex;align-items:center;gap:8px}
.cond-ico{font-size:1.1rem}
.cond-pct{font-weight:700;font-size:.85rem;color:var(--brand)}
.plan{margin:0;padding:0;list-style:none;counter-reset:step;display:flex;flex-direction:column;gap:8px}
.plan li{counter-increment:step;display:grid;grid-template-columns:28px auto 1fr;align-items:start;gap:8px;font-size:.9rem;line-height:1.4}
.plan li::before{content:counter(step);width:24px;height:24px;border-radius:50%;background:var(--brand);color:#fff;display:grid;place-items:center;font-size:.75rem;font-weight:700}
.plan .pill{height:22px;font-size:.7rem}
.avoid,.checks{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px;font-size:.9rem}
.adj{display:flex;flex-direction:column;gap:6px;font-size:.9rem}
.adj div{display:flex;gap:10px;padding:10px 12px;border-radius:12px;background:var(--surface-2)}
.save-box{padding:14px;border-radius:16px;background:var(--surface-2);border:1px solid var(--line-2);margin-top:16px}
.save-opts{flex-direction:column;align-items:stretch}
.save-opts .choice{justify-content:flex-start;min-height:46px}
.inline-num{width:52px;height:28px;margin:0 4px;padding:0 6px;border-radius:8px;border:1px solid var(--line);background:var(--surface);font:inherit;text-align:center}

/* identify */
.id-card{background:linear-gradient(135deg,color-mix(in srgb,var(--violet-soft) 60%,var(--surface)),color-mix(in srgb,var(--brand-soft) 60%,var(--surface)));border-color:color-mix(in srgb,var(--violet) 25%,var(--line))}
.id-head{display:flex;align-items:center;gap:14px}
.id-head .li-main{display:flex;flex-direction:column;gap:2px}
.id-ico{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;background:var(--ai-grad);color:#fff;font-size:1.2rem;flex:none}
.id-loading{display:flex;align-items:center;gap:14px;margin-top:14px}
.id-body{display:flex;gap:14px;margin-top:14px;align-items:flex-start}
.id-thumb{width:96px;height:96px;border-radius:14px;object-fit:cover;flex:none;box-shadow:var(--shadow-sm)}
.id-cands{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px}
.id-cand{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:14px;border:1.5px solid var(--line);background:var(--surface);cursor:pointer;text-align:left;font:inherit;color:inherit;transition:border-color .15s}
.id-cand .li-main{display:flex;flex-direction:column;gap:1px}
.id-cand[aria-pressed="true"]{border-color:var(--violet);box-shadow:0 0 0 3px var(--violet-soft)}
.id-conf{display:flex;flex-direction:column;align-items:flex-end;gap:3px;width:64px;flex:none}
.id-conf .bar{width:100%}
.id-conf .bar>span{background:var(--violet)}
.id-conf small{font-weight:700;color:var(--violet)}
.id-care{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.id-actions{display:flex;align-items:center;gap:10px;margin-top:14px}
.ai-filled{border-color:var(--violet)!important;box-shadow:0 0 0 3px var(--violet-soft)!important;transition:box-shadow .3s}

@media (max-width:1020px){ .settings-grid{grid-template-columns:1fr} }
@media (max-width:720px){
  .mode-choices{grid-template-columns:1fr}
  .month-grid{grid-template-columns:repeat(4,minmax(0,1fr))}


  .reason-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .reason-opt .so-text small{display:none}
  .id-head{flex-wrap:wrap}
  .id-head .btn{width:100%}
  .id-body{flex-direction:column}
  .id-thumb{width:100%;height:160px}
  .plan li{grid-template-columns:28px 1fr}
  .plan li .pill{grid-column:2;justify-self:start}
  .plan li>span:last-child{grid-column:2}
  .topbar .icon-link{width:36px;height:36px}
  .archived-banner{flex-wrap:wrap}
}

/* ===================================================================
   Grower rules / commercial profile
   =================================================================== */
.reason-opt:disabled{opacity:.5;cursor:not-allowed}
.gx-mlink{display:none}
:is(.gx-tile,.gx-banner,.gx-badge,.gx-advice).t-ok,:is(.gx-kpi,.gx-dstat).ok{--t:var(--ok);--ts:var(--ok-soft)}
:is(.gx-tile,.gx-banner,.gx-badge,.gx-advice).t-warn,:is(.gx-kpi,.gx-dstat).warn{--t:var(--warn);--ts:var(--warn-soft)}
:is(.gx-tile,.gx-banner,.gx-badge,.gx-advice).t-danger,:is(.gx-kpi,.gx-dstat).danger{--t:var(--danger);--ts:var(--danger-soft)}
:is(.gx-tile,.gx-banner,.gx-badge,.gx-advice).t-water,:is(.gx-kpi,.gx-dstat).water{--t:var(--water);--ts:var(--water-soft)}
:is(.gx-tile,.gx-banner,.gx-badge,.gx-advice).t-violet,:is(.gx-kpi,.gx-dstat).violet{--t:var(--violet);--ts:var(--violet-soft)}
:is(.gx-tile,.gx-banner,.gx-badge,.gx-advice).t-sand,:is(.gx-kpi,.gx-dstat).sand{--t:var(--sand);--ts:var(--sand-soft)}
:is(.gx-tile,.gx-banner,.gx-badge,.gx-advice):is(.t-brand,.t-leaf),:is(.gx-kpi,.gx-dstat).leaf{--t:var(--brand);--ts:var(--brand-soft)}
.gx-k{display:block;font-size:.7rem;font-weight:750;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3)}
.gx-no{color:var(--danger)} .gx-yes{color:var(--ok)} .gx-warn{color:var(--warn)}
.gx-eta{display:inline-block;font-weight:650;color:var(--warn)}
.gx-plink{font-weight:600;text-decoration:underline;text-decoration-color:var(--line)}
.gx-state{font-weight:650}
.pill.gx-state:not(.ok):not(.warn):not(.water):not(.violet):not(.sand):not(.brand){color:var(--text-3)}
.gx-badge{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 8px;border-radius:999px;font-size:.72rem;font-weight:700;background:var(--ts);color:var(--t);white-space:nowrap}

/* plant page card */
.gx-card{overflow:hidden}
.gx-body{display:flex;flex-direction:column;gap:16px}
.gx-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.gx-tile{--t:var(--text-2);--ts:var(--surface-2);display:flex;gap:10px;align-items:flex-start;padding:12px;border-radius:14px;background:var(--surface-2);border:1px solid var(--line-2);min-width:0}
.gx-tile .li-main{display:flex;flex-direction:column;gap:1px;min-width:0}
.gx-tile b{font-size:.98rem}
.gx-tile-ico{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:var(--surface);border:1px solid var(--line-2);flex:none;font-size:1.05rem}
.gx-tile-state{background:var(--ts);border-color:transparent}
.gx-tile-state b{color:var(--t)}
.gx-tile-state .tiny{color:color-mix(in srgb,var(--t) 70%,var(--text-2))}
.gx-auto{display:inline-block;margin-left:4px;padding:0 5px;border-radius:5px;background:var(--brand-soft);color:var(--brand);letter-spacing:.02em;text-transform:none;font-weight:700}
.gx-protect{border-radius:16px;padding:14px 16px;background:linear-gradient(135deg,var(--violet-soft),color-mix(in srgb,var(--violet-soft) 40%,var(--surface)));border:1px solid color-mix(in srgb,var(--violet) 25%,transparent)}
.gx-protect-head{display:flex;align-items:center;gap:12px}
.gx-protect-head .li-main{display:flex;flex-direction:column;min-width:0}
.gx-protect-head b{color:var(--violet);letter-spacing:.06em;font-size:.85rem}
.gx-lock{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:var(--violet);font-size:1.1rem;box-shadow:0 6px 16px -6px var(--violet);flex:none}
.gx-protect-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 14px;margin:12px 0 0}
.gx-protect-grid div{min-width:0}
.gx-protect-grid dt{font-size:.72rem;color:var(--text-3);font-weight:650}
.gx-protect-grid dd{margin:0;font-size:.82rem;letter-spacing:.03em}
.gx-life ol{list-style:none;display:flex;margin:8px 0 0;padding:0;overflow-x:auto;scrollbar-width:none}
.gx-life li{flex:1 0 auto;min-width:72px;position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;font-size:.72rem;font-weight:600;color:var(--text-3);text-align:center}
.gx-life li::before{content:'';position:absolute;top:6px;left:-50%;width:100%;height:2px;background:var(--line)}
.gx-life li:first-child::before{display:none}
.gx-life .dot{position:relative;z-index:1;width:14px;height:14px;border-radius:50%;background:var(--surface);border:2px solid var(--line)}
.gx-life li.done{color:var(--text-2)}
.gx-life li.done::before,.gx-life li.current::before{background:var(--brand)}
.gx-life li.done .dot{background:var(--brand);border-color:var(--brand)}
.gx-life li.current{color:var(--brand);font-weight:750}
.gx-life li.current .dot{background:var(--surface);border:4px solid var(--brand);box-shadow:0 0 0 4px var(--brand-soft)}
.gx-banner{display:flex;align-items:center;gap:12px;padding:10px 14px;border-radius:12px;background:var(--ts);color:var(--t)}
.gx-banner>span:first-child{font-size:1.3rem}
.gx-banner .li-main{display:flex;flex-direction:column}
.gx-banner .small{color:color-mix(in srgb,var(--t) 60%,var(--text-2))}
.gx-cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.gx-block{border:1px solid var(--line-2);border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:10px;min-width:0}
.gx-block-head{display:flex;align-items:center;gap:8px}
.gx-block-head h3{font-size:.95rem}
.gx-checks{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
.gx-check{display:flex;gap:10px;padding:7px 8px;border-radius:10px}
.gx-check.bad{background:color-mix(in srgb,var(--danger-soft) 60%,transparent)}
.gx-check.unk{background:var(--surface-2)}
.gx-check .li-main{min-width:0;flex:1}
.gx-ci{width:22px;height:22px;border-radius:7px;display:grid;place-items:center;font-size:.72rem;font-weight:800;flex:none;margin-top:1px}
.gx-check.ok .gx-ci{background:var(--ok-soft);color:var(--ok)}
.gx-check.bad .gx-ci{background:var(--danger);color:#fff}
.gx-check.unk .gx-ci{background:var(--line);color:var(--text-2)}
.gx-check-top{display:flex;gap:8px;align-items:baseline;font-size:.88rem}
.gx-actual{font-weight:650;color:var(--text-2);white-space:nowrap}
.gx-check.bad .gx-actual{color:var(--danger)}
.gx-action{color:var(--warn);font-weight:600}
.gx-expect{font-size:.85rem;padding:8px 10px;border-radius:10px;background:var(--warn-soft);color:color-mix(in srgb,var(--warn) 80%,var(--text))}
.gx-money{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.gx-money>div{background:var(--surface-2);border-radius:10px;padding:8px 10px;min-width:0}
.gx-money b{font-size:1.08rem;font-variant-numeric:tabular-nums}
.gx-floor{font-size:.86rem;padding:8px 10px;border-radius:10px;background:var(--brand-soft);color:var(--brand)}
.gx-det{border-top:1px dashed var(--line);padding-top:8px}
.gx-det>summary{cursor:pointer;font-weight:650;font-size:.86rem;color:var(--text-2);display:flex;align-items:center;gap:8px;list-style:none}
.gx-det>summary::-webkit-details-marker{display:none}
.gx-det>summary::after{content:'▾';margin-left:auto;transition:transform .15s}
.gx-det[open]>summary::after{transform:rotate(180deg)}
.gx-table{width:100%;border-collapse:collapse;margin-top:8px;font-size:.85rem}
.gx-table td,.gx-table th{padding:5px 4px;border-bottom:1px solid var(--line-2);text-align:left}
.gx-table th{font-size:.72rem;color:var(--text-3);font-weight:700;text-transform:uppercase;letter-spacing:.05em}
.gx-table .num,.num{text-align:right;font-variant-numeric:tabular-nums}
.gx-table tr.total td{font-weight:750;border-bottom:2px solid var(--line)}
.gx-ladder tr.low td{color:var(--text-3)}
.gx-ladder tr.t-current td{background:var(--brand-soft)}
.gx-mstats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.gx-mstats>div{display:flex;flex-direction:column;padding:10px;border-radius:10px;background:var(--violet-soft);min-width:0}
.gx-mstats b{font-size:1.15rem;color:var(--violet)}
.gx-mstats span{font-size:.75rem;font-weight:650;color:var(--text-2)}
.gx-mstats em{font-style:normal;font-size:.7rem;color:var(--text-3)}
.gx-mrow{display:flex;flex-direction:column;gap:6px}
.gx-minis{display:flex;flex-wrap:wrap;gap:6px}
.gx-mini{display:inline-flex;align-items:center;gap:8px;padding:4px 10px 4px 4px;border-radius:999px;border:1px solid var(--line-2);background:var(--surface-2);font-size:.84rem;font-weight:600;max-width:100%;align-self:flex-start}
.gx-mini .avatar.sm{width:26px;height:26px;border-radius:50%}
.gx-mini:hover{border-color:var(--line)}
.gx-chain-list{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:6px}
.gx-chip{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:999px;background:var(--surface-2);border:1px solid var(--line-2);font-size:.8rem;font-weight:600}
a.gx-chip:hover{border-color:var(--brand);color:var(--brand)}
.gx-chip-own{background:var(--sand-soft);color:var(--sand);border-color:transparent}
.gx-arrow{color:var(--text-3)}
.gx-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding-top:14px;border-top:1px solid var(--line-2)}
.gx-locked-btn{color:var(--violet);border-color:color-mix(in srgb,var(--violet) 35%,var(--line));background:var(--violet-soft)}
.gx-logs{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column}
.gx-log{display:flex;gap:10px;padding:9px 4px;border-bottom:1px solid var(--line-2)}
.gx-log:last-child{border-bottom:0}
.gx-log .li-main{min-width:0;display:flex;flex-direction:column;gap:2px}
.gx-log-ico{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;background:var(--surface-2);border:1px solid var(--line-2);flex:none;font-size:.9rem}
.gx-log-msg{font-size:.88rem;font-weight:550;overflow-wrap:anywhere}
.gx-log-note{font-size:.82rem;color:var(--text-2);font-style:italic}
.gx-hist>summary .pill{height:20px;font-size:.7rem}

/* sheets */
@media (min-width:721px){.sheet.gx-sheet.wide{width:min(720px,100%)}}
.gx-fgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.gx-sheet.wide .gx-fgrid{grid-template-columns:repeat(3,minmax(0,1fr))}
.gx-fgrid .field{min-width:0}
.gx-input{position:relative;display:flex;align-items:center}
.gx-input .input{width:100%}
.gx-affix{position:absolute;left:12px;color:var(--text-3);font-weight:650;pointer-events:none;font-size:.9rem}
.gx-affix.r{left:auto;right:12px}
.gx-input:has(.gx-affix:not(.r)) .input{padding-left:28px}
.gx-input:has(.gx-affix.r) .input{padding-right:48px}
.gx-input.big .input{height:52px;font-size:1.4rem;font-weight:750}
.gx-input.big .gx-affix{font-size:1.2rem}
.gx-inh{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gx-months .month-grid{margin-top:10px}
.gx-roles{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.gx-sheet.wide .gx-roles{grid-template-columns:repeat(3,minmax(0,1fr))}
.gx-role{min-height:56px;text-align:left}
.gx-role .so-text{display:flex;flex-direction:column;line-height:1.2;min-width:0}
.gx-role .so-text small{font-weight:500;color:var(--text-3);font-size:.72rem}
.gx-seg{display:flex;width:100%}
.gx-seg button{flex:1;padding:6px 8px}
.gx-sheet.wide .gx-span2{grid-column:span 2}
.gx-plan-more{display:block;width:100%;padding:10px;border:0;border-top:1px solid var(--line-2);background:transparent;font-weight:650;color:var(--brand);cursor:pointer}
.gx-plan.collapsed .gx-plan-row:nth-child(n+6){display:none}
.gx-exc-head{padding:18px 0 4px}
.gx-preview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:12px;border-radius:14px;background:var(--brand-soft);margin-top:10px;position:sticky;top:0;z-index:2;box-shadow:0 6px 12px -10px rgba(0,0,0,.3)}
.gx-preview.bad{background:var(--danger-soft)}
.gx-preview b{font-variant-numeric:tabular-nums}
.gx-preview-note{grid-column:1/-1;color:var(--text-2)}
.gx-approve{margin-top:16px;padding:14px;border-radius:14px;border:1.5px solid var(--danger);background:var(--danger-soft);animation:fade .2s}
.gx-approve-head{display:flex;gap:8px;align-items:center;margin-bottom:6px;color:var(--danger)}
.gx-approve .input{background:var(--surface)}
.gx-issues{margin:6px 0 10px;padding-left:4px;list-style:none;font-size:.86rem;display:flex;flex-direction:column;gap:3px}
.gx-sale-state{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:14px 0 4px}
.gx-price-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.gx-readout{display:flex;flex-wrap:wrap;gap:6px 16px;margin-top:12px;padding:10px 12px;border-radius:12px;background:var(--surface-2);font-size:.88rem}
.gx-readout.good{background:var(--ok-soft)} .gx-readout.bad{background:var(--danger-soft)}
.gx-readout-warn{flex-basis:100%;color:var(--danger);font-weight:650}
.gx-lock-alert{display:flex;gap:12px;align-items:flex-start;margin-top:16px;padding:14px;border-radius:14px;background:var(--violet-soft);color:var(--violet)}
.gx-lock-alert .small{color:var(--text-2)}
.gx-lock-ico{font-size:1.4rem}
.gx-lock-big{text-align:center;padding:30px 10px}
.gx-lock-big p{font-size:1.02rem;font-weight:600;line-height:1.5;margin:16px 0}
.gx-lock-ring{width:84px;height:84px;margin:0 auto;border-radius:50%;display:grid;place-items:center;font-size:2.2rem;background:var(--violet-soft);box-shadow:0 0 0 10px color-mix(in srgb,var(--violet-soft) 50%,transparent);animation:gx-shake .5s}
@keyframes gx-shake{20%{transform:rotate(-12deg)}40%{transform:rotate(10deg)}60%{transform:rotate(-6deg)}80%{transform:rotate(3deg)}}
.gx-picked{max-height:240px;overflow:auto;margin:12px 0 0}

/* grower pages */
.gx-tabs a{display:inline-flex;align-items:center;padding:7px 14px;border-radius:9px;font-weight:600;font-size:.88rem;color:var(--text-2)}
.gx-tabs a[aria-pressed="true"]{background:var(--brand-soft);color:var(--brand)}
.gx-kpis{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px;margin-bottom:14px}
.gx-kpi{--t:var(--text);--ts:var(--surface-2);display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:14px;cursor:pointer;text-align:left;border:1px solid var(--line);transition:transform .12s,border-color .15s,box-shadow .15s;min-width:0}
.gx-kpi:hover{transform:translateY(-2px);box-shadow:var(--shadow)}
.gx-kpi[aria-pressed="true"]{border-color:var(--t);box-shadow:0 0 0 3px var(--ts)}
.gx-kpi-ico{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:var(--ts);margin-bottom:6px}
.gx-kpi-val{font-size:1.6rem;font-weight:780;line-height:1.1;color:var(--t)}
.gx-kpi-lbl{font-size:.8rem;font-weight:650;color:var(--text-2)}
.gx-kpi-sub{font-size:.72rem;color:var(--text-3)}
.gx-values{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:18px}
.gx-value{display:flex;flex-direction:column;gap:2px;padding:14px 16px;text-align:left;min-width:0}
.gx-value b{font-size:1.45rem;font-weight:780;font-variant-numeric:tabular-nums}
.gx-value.good b{color:var(--ok)}
.gx-value.alert{background:var(--danger-soft);border-color:transparent;cursor:pointer;color:var(--danger)}
.gx-value.alert .gx-k{color:var(--danger)}
.gx-grid2{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:18px;margin-bottom:18px;align-items:start}
.gx-bar{display:grid;grid-template-columns:130px minmax(0,1fr) 34px;align-items:center;gap:10px;margin:8px 0;font-size:.86rem}
.gx-bar .tiny{grid-column:2/-1;margin-top:-6px}
.gx-bar-track{height:10px;border-radius:99px;background:var(--line-2);overflow:hidden}
.gx-bar-track i{display:block;height:100%;border-radius:99px;min-width:2px}
.gx-bar b{text-align:right}
i.ok{background:var(--ok)} i.warn{background:var(--warn)} i.leaf{background:var(--brand-2)} i.danger{background:var(--danger)} i.water{background:var(--water)}
.gx-next .li-title{font-size:.9rem}
.gx-plan{display:flex;flex-direction:column}
.gx-plan-row{padding:14px 20px;border-bottom:1px solid var(--line-2);display:flex;flex-direction:column;gap:8px}
.gx-plan-row:last-child{border-bottom:0}
.gx-plan-top{display:flex;align-items:center;gap:10px}
.gx-plan-top b{font-style:italic}
.gx-avs{display:flex}
.gx-avs a+a{margin-left:-8px}
.gx-avs .avatar.sm{width:28px;height:28px;border-radius:50%;border:2px solid var(--surface)}
.gx-plan-stats{display:flex;flex-wrap:wrap;gap:4px 14px;color:var(--text-2)}
.gx-stack{display:flex;height:8px;border-radius:99px;overflow:hidden;background:var(--line-2);gap:2px}
.gx-stack i{display:block;height:100%}
.gx-advice{--t:var(--text-2);--ts:var(--surface-2);font-size:.84rem;padding:7px 10px;border-radius:10px;background:var(--ts);color:color-mix(in srgb,var(--t) 80%,var(--text))}
.gx-inv{margin-bottom:18px;scroll-margin-top:80px}
.gx-inv .card-head{flex-wrap:wrap}
.gx-search input{height:36px;border-radius:10px;border:1px solid var(--line);background:var(--surface);padding:0 12px;width:220px;outline:none}
.gx-search input:focus{border-color:var(--brand)}
.gx-row{display:grid;grid-template-columns:34px minmax(200px,2fr) 130px 110px 90px 80px minmax(160px,2fr);align-items:center;gap:10px;padding:8px 16px;border-bottom:1px solid var(--line-2);font-size:.88rem}
.gx-row:hover{background:var(--surface-2)}
.gx-row.sel{background:color-mix(in srgb,var(--brand-soft) 70%,transparent)}
.gx-row-head{font-size:.7rem;font-weight:750;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3);background:var(--surface-2);position:sticky;top:64px;z-index:1}
.gx-row-head:hover{background:var(--surface-2)}
.gx-cb{display:grid;place-items:center;cursor:pointer}
.gx-cb input{width:18px;height:18px;accent-color:var(--brand);cursor:pointer}
.gx-row-plant{display:flex;align-items:center;gap:10px;min-width:0}
.gx-row-plant .li-main{display:flex;flex-direction:column;min-width:0}
.gx-row-plant .li-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gx-row-plant .tiny{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gx-row-plant:hover .li-title{color:var(--brand)}
.gx-row-price,.gx-row-profit{display:flex;flex-direction:column;align-items:flex-end;line-height:1.2}
.gx-row-why{color:var(--text-2);line-height:1.35}
.gx-bulkbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 16px;background:var(--brand-soft);border-bottom:1px solid var(--line-2);position:sticky;top:64px;z-index:3;animation:fade .15s}
.gx-bulkbar .select{height:34px;font-size:.85rem}
.gx-mother-btn{background:var(--violet);color:#fff;border-color:transparent}
.gx-sales b{font-variant-numeric:tabular-nums}

.gx-hier{display:flex;align-items:stretch;flex-wrap:wrap;gap:8px;padding:16px;margin-bottom:18px}
.gx-hier-step{flex:1 1 130px;display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:12px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line-2)}
.gx-hier-step .pill{height:20px;font-size:.7rem;margin-top:4px}
.gx-hier-ico{font-size:1.3rem}
.gx-hier-arrow{align-self:center;color:var(--text-3);font-weight:700}
.gx-hier-note{flex-basis:100%;margin:6px 0 0}
.gx-hier-note a{color:var(--brand);font-weight:600}
.gx-global{margin-bottom:22px}
.gx-rchips{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.gx-rchip{display:inline-block;padding:3px 9px;border-radius:8px;background:var(--surface-2);border:1px solid var(--line-2);font-size:.76rem;font-weight:600;color:var(--text-2)}
.gx-rchip.more{background:transparent}
.gx-strats{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;margin-bottom:22px}
.gx-strat{display:flex;flex-direction:column;gap:8px;padding:14px;text-align:left;cursor:pointer;transition:transform .12s,box-shadow .15s}
.gx-strat:hover{transform:translateY(-2px);box-shadow:var(--shadow)}
.gx-strat .li-main{display:flex;flex-direction:column;min-width:0}
.gx-strat-ico{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:var(--surface-2);font-size:1.1rem;flex:none}
.gx-rlist{list-style:none;margin:0;padding:0}
.gx-rrow{display:flex;align-items:center;gap:12px;padding:12px 18px;border-bottom:1px solid var(--line-2);cursor:pointer}
.gx-rrow:last-child{border-bottom:0}
.gx-rrow:hover{background:var(--surface-2)}
.gx-rrow .li-main{flex:1;min-width:0}
.gx-scope{flex:none;width:92px;font-size:.74rem;font-weight:700;padding:4px 8px;border-radius:8px;text-align:center}
.gx-scope.genus{background:var(--violet-soft);color:var(--violet)} .gx-scope.species{background:var(--brand-soft);color:var(--brand)}
.gx-day{padding:6px 20px 10px}
.gx-day-head{position:sticky;top:64px;background:var(--surface);padding:10px 0 4px;font-size:.78rem;font-weight:750;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3);z-index:1}

.gx-dash{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:14px 16px;margin-bottom:20px}
.gx-dash-title{display:flex;align-items:center;gap:12px;min-width:0;flex:1 1 220px}
.gx-dash-title .li-main{display:flex;flex-direction:column;min-width:0}
.gx-dstats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;flex:2 1 360px}
.gx-dstat{--t:var(--text);--ts:var(--surface-2);display:flex;align-items:center;gap:6px;padding:8px 10px;border-radius:12px;background:var(--ts);color:var(--t);min-width:0}
.gx-dstat b{font-size:1.15rem}
.gx-dstat .tiny{color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gx-dash-alert{flex-basis:100%;font-size:.84rem;font-weight:600;color:var(--danger)}
@container (max-width:900px){
  .gx-dstat{display:grid;grid-template-columns:auto 1fr;column-gap:6px;row-gap:0}
  .gx-dstat .tiny{grid-column:1/-1}
}

@media (max-width:1180px){
  .gx-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
  .gx-row{grid-template-columns:34px minmax(180px,2fr) 130px 90px 80px minmax(140px,1.6fr)}
  .gx-row-age{display:none}
  .gx-row-head span:nth-child(4){display:none}
}
@media (max-width:1020px){
  .gx-grid2{grid-template-columns:minmax(0,1fr)}
  .gx-values{grid-template-columns:repeat(2,minmax(0,1fr))}
  .gx-cols{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:720px){
  .gx-mlink{display:grid}
  .gx-tabs{width:100%}
  .gx-tabs a{flex:1;justify-content:center;padding:7px 6px;font-size:.82rem}
  .gx-kpis{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .gx-kpi{padding:10px}
  .gx-kpi-ico{width:26px;height:26px;font-size:.85rem;margin-bottom:2px}
  .gx-kpi-val{font-size:1.3rem}
  .gx-kpis>:last-child{grid-column:span 3}
  .gx-kpi-lbl{font-size:.72rem}
  .gx-kpi-sub{display:none}
  .gx-values{gap:8px}
  .gx-value{padding:12px}
  .gx-value b{font-size:1.2rem}
  .gx-value .small{font-size:.74rem}
  .gx-bar{grid-template-columns:100px minmax(0,1fr) 28px}
  .gx-plan-row{padding:12px 14px}
  .gx-inv .card-head{padding:12px 14px}
  .gx-search{flex-basis:100%;order:3}
  .gx-search input{width:100%}
  .gx-inv .filters{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding:10px 14px}
  .gx-inv .chip-filter{flex:none}
  .gx-row-head{display:none}
  .gx-row{grid-template-columns:28px minmax(0,1fr) auto;grid-template-areas:"cb plant price" "cb state profit" "cb why why";gap:6px 10px;padding:12px 14px}
  .gx-row .gx-cb{grid-area:cb;align-self:start;margin-top:8px}
  .gx-row-plant{grid-area:plant}
  .gx-row-state{grid-area:state}
  .gx-row-price{grid-area:price}
  .gx-row-profit{grid-area:profit;flex-direction:row;gap:6px;align-items:baseline}
  .gx-row-why{grid-area:why;font-size:.8rem}
  .gx-bulkbar{top:60px;padding:10px 14px}
  .gx-bulkbar .select{flex:1 1 140px}
  .gx-hier{padding:12px;gap:6px}
  .gx-hier-step{flex:1 1 40%;padding:10px}
  .gx-hier-arrow{display:none}
  .gx-rrow{flex-wrap:wrap;padding:12px 14px}
  .gx-rrow .li-main{flex-basis:100%;order:3}
  .gx-day{padding:4px 14px 8px}
  .gx-day-head,.gx-row-head{top:60px}
  .gx-tiles{grid-template-columns:1fr}
  .gx-protect-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .gx-money{grid-template-columns:repeat(2,minmax(0,1fr))}
  .gx-mstats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .gx-actions .btn{flex:1 1 auto}
  .gx-actions .spacer{display:none}
  .gx-fgrid,.gx-sheet.wide .gx-fgrid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .gx-roles,.gx-sheet.wide .gx-roles{grid-template-columns:1fr}
  .gx-preview{grid-template-columns:repeat(4,minmax(0,1fr));padding:10px;gap:6px;font-size:.85rem}
  .gx-dstats{grid-template-columns:repeat(4,minmax(0,1fr));flex-basis:100%}
  .gx-dstat{flex-direction:column;gap:0;padding:8px 4px;text-align:center}
}
.pill.leaf{background:var(--brand-soft);color:var(--brand);border-color:transparent}

/* ---------- Grower: sales, checkout, price list ---------- */
.gx-tabs{max-width:100%;overflow-x:auto;scrollbar-width:none}
.gx-tabs a{white-space:nowrap;flex:none}
.gx-grid2.even{grid-template-columns:repeat(2,minmax(0,1fr))}
.callout.violet{background:var(--violet-soft);border-color:transparent;color:var(--violet)}
.gx-alert-row{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;padding:12px 16px;margin-bottom:14px;border-radius:14px;background:var(--water-soft);color:var(--water);font-size:.9rem}
.gx-alert-row .small{color:var(--text-2)}
.gx-period{display:flex;align-items:center;gap:8px;margin-bottom:14px;flex-wrap:wrap}
.gx-delta{display:inline-block;margin-left:6px;padding:2px 7px;border-radius:99px;font-size:.72rem;font-weight:750;vertical-align:middle}
.gx-delta.up{background:var(--ok-soft);color:var(--ok)} .gx-delta.down{background:var(--danger-soft);color:var(--danger)}
.gx-chart{width:100%;height:auto;display:block;overflow:visible}
.gx-chart .gx-grid{stroke:var(--line-2);stroke-width:1}
.gx-chart .gx-ax{font-size:11px;fill:var(--text-3);font-family:inherit}
.gx-chart .gx-cnt{font-weight:700;fill:var(--text-2)}
.gx-chart .gx-rev{fill:color-mix(in srgb,var(--brand) 26%,transparent)}
.gx-chart .gx-prof{fill:var(--brand)}
.gx-chart .gx-bar-g.cur .gx-rev{fill:color-mix(in srgb,var(--sand) 38%,transparent)}
.gx-chart .gx-bar-g.cur .gx-prof{fill:var(--sand)}
.gx-chart .gx-bar-g:hover .gx-rev{fill:color-mix(in srgb,var(--brand) 40%,transparent)}
.gx-legend{display:flex;align-items:center;gap:6px;font-size:.78rem;color:var(--text-2)}
.gx-legend i{display:inline-block;width:12px;height:12px;border-radius:3px;margin-left:8px}
.gx-legend i.gx-rev{background:color-mix(in srgb,var(--brand) 26%,transparent)} .gx-legend i.gx-prof{background:var(--brand)}
.gx-shares{display:flex;flex-direction:column;gap:14px}
.gx-share-top{display:flex;align-items:center;gap:8px;margin-bottom:5px;font-size:.9rem}
.gx-share .gx-bar-track{height:8px}
.gx-share .tiny{margin-top:4px}
.gx-rank{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:var(--surface-2);font-size:.78rem;font-weight:750;color:var(--text-2);flex:none}
.gx-custs li:first-child .gx-rank{background:var(--sand-soft);color:var(--sand)}
.gx-custs .list-item{cursor:pointer}
.gx-repeat{color:var(--ok);font-weight:650}
.gx-resv .list-item{gap:10px}
.gx-resv .list-item.stale{background:color-mix(in srgb,var(--danger-soft) 55%,transparent)}
.gx-srow{display:grid;grid-template-columns:100px minmax(180px,2fr) minmax(140px,1.5fr) 90px 90px;align-items:center;gap:10px;padding:8px 16px;border-bottom:1px solid var(--line-2);color:inherit;text-decoration:none;font-size:.88rem}
a.gx-srow:hover{background:var(--surface-2)}
.gx-srow .num{display:flex;flex-direction:column;align-items:flex-end;text-align:right}
.gx-srow .gx-row-plant{display:flex;align-items:center;gap:10px;min-width:0}
.gx-srow .li-main{display:flex;flex-direction:column;min-width:0}
.gx-srow .li-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gx-sfoot{display:flex;align-items:center;gap:10px;padding:12px 16px}
/* checkout */
.gx-co-items{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.gx-co-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto 110px auto;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--line-2);border-radius:12px;background:var(--surface)}
.gx-co-row .li-main{display:flex;flex-direction:column;min-width:0}
.gx-co-row .li-title{color:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gx-co-row .input{height:38px;font-weight:700}
.gx-co-row.low{border-color:color-mix(in srgb,var(--danger) 40%,transparent);background:color-mix(in srgb,var(--danger-soft) 45%,var(--surface))}
.gx-co-row.low .input{color:var(--danger)}
.gx-co-sum{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:14px 0 4px;padding:12px 14px;border-radius:14px;background:var(--surface-2)}
.gx-co-sum b{display:block;font-size:1.2rem;font-variant-numeric:tabular-nums}
.gx-co-sum .gx-yes b{color:var(--ok)} .gx-co-sum .gx-no b{color:var(--danger)}
.gx-co-warn{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:.82rem;color:var(--warn);font-weight:600;padding:4px 2px}
.gx-channels{display:flex;flex-wrap:wrap;gap:6px}
/* price list */
.gx-cat-bar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:10px 14px;margin-bottom:14px}
.gx-cat-bar .gx-seg{width:auto}
.gx-soon{display:flex;align-items:center;gap:8px;margin:0}
.gx-cat-print-head{display:none}
.gx-cat-summary{margin:0 2px 12px}
.gx-cat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}
.gx-cat-card{padding:14px 16px;display:flex;flex-direction:column;gap:10px;break-inside:avoid}
.gx-cat-card.soon{background:var(--surface-2);box-shadow:none}
.gx-cat-top{display:flex;align-items:center;gap:12px}
.gx-cat-top .li-main{display:flex;flex-direction:column;min-width:0;flex:1}
.gx-cat-top h3{margin:0;font-size:1rem;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gx-cat-avs{display:flex}
.gx-cat-avs .avatar{border:2px solid var(--surface)}
.gx-cat-avs .avatar+.avatar{margin-left:-14px}
.gx-cat-price{display:flex;flex-direction:column;align-items:flex-end;text-align:right}
.gx-cat-price b{font-size:1.25rem;color:var(--brand);white-space:nowrap}
.gx-cat-facts{display:flex;flex-wrap:wrap;gap:6px}
.gx-cat-facts span{padding:3px 9px;border-radius:99px;background:var(--surface-2);font-size:.8rem;color:var(--text-2)}
.gx-cat-card.soon .gx-cat-facts span{background:var(--surface)}
.gx-cat-facts .gx-cat-soon{background:var(--warn-soft);color:var(--warn)}
@media (max-width:1020px){
  .gx-grid2.even{grid-template-columns:minmax(0,1fr)}
  .gx-srow{grid-template-columns:90px minmax(0,2fr) 80px 80px}
  .gx-srow>:nth-child(3){display:none}
}
@media (max-width:720px){
  .gx-srow{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"plant price" "date profit";gap:4px 10px;padding:10px 14px}
  .gx-srow.gx-row-head{display:none}
  .gx-srow>:nth-child(1){grid-area:date;color:var(--text-3);font-size:.78rem}
  .gx-srow>:nth-child(2){grid-area:plant}
  .gx-srow>:nth-child(4){grid-area:price}
  .gx-srow>:nth-child(5){grid-area:profit;flex-direction:row;gap:6px;align-items:baseline;justify-content:flex-end}
  .gx-co-row{grid-template-columns:auto minmax(0,1fr) 96px auto;grid-template-areas:"av main price del" "av state price del"}
  .gx-co-row>.avatar{grid-area:av}
  .gx-co-row>.li-main{grid-area:main}
  .gx-co-row>.pill{grid-area:state;justify-self:start}
  .gx-co-row>.gx-input{grid-area:price}
  .gx-co-row>button{grid-area:del}
  .gx-co-sum{grid-template-columns:repeat(2,minmax(0,1fr))}
  .gx-cat-grid{grid-template-columns:minmax(0,1fr)}
  .gx-cat-bar .spacer{display:none}
  .gx-period .btn{margin-left:auto}
  .gx-tabs a{flex:none}
}
@media print{
  .topbar,.tabbar,.ai-fab,.ai-chat,.page-head,.gx-cat-bar,#toasts,.gx-cat-summary{display:none!important}
  body,main,#view{background:#fff!important;padding:0!important;margin:0!important}
  .gx-cat-print-head{display:block;margin-bottom:14px}
  .gx-cat-print-head h1{margin:0 0 4px;font-size:1.5rem}
  .gx-cat-grid{grid-template-columns:repeat(2,1fr);gap:8px}
  .gx-cat-card{box-shadow:none;border:1px solid #ccc}
}
.gx-cat-bar .gx-seg button{white-space:nowrap;display:inline-flex;align-items:center;gap:4px;flex-direction:row}
@media (max-width:720px){
  .gx-period{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
  .gx-period .chip-filter{flex:none}
  .gx-chart .gx-ax{font-size:10px}
}
@media print{.gx-cat-grid{padding:0 2px}}

/* ===== AI care plan (plant page) ===== */
.cp-card{position:relative;overflow:hidden;isolation:isolate}
.cp-card::before{content:"";position:absolute;inset:0;padding:1.5px;border-radius:inherit;background:var(--ai-grad);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none;opacity:.45}
.cp-card::after{content:"";position:absolute;inset:0;z-index:-1;background:radial-gradient(520px 160px at 0% 0%,color-mix(in srgb,var(--ai-1) 8%,transparent),transparent 70%),radial-gradient(420px 180px at 100% 100%,color-mix(in srgb,var(--ai-2) 7%,transparent),transparent 70%)}
.cp-head{gap:12px}
.cp-title h2{margin-top:1px}
.cp-body{display:flex;flex-direction:column;gap:16px}
.linkish{background:none;border:0;padding:0;color:var(--violet);font-weight:650;cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.cp-intro p{margin:0 0 12px;color:var(--text-2)}
.cp-covers{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:16px}
.cp-covers span{font-size:.8rem;padding:5px 10px;border-radius:999px;background:var(--surface-2);border:1px solid var(--line-2);color:var(--text-2)}
.cp-opts{display:flex;flex-direction:column;gap:10px}
.cp-label{font-size:.75rem;font-weight:750;letter-spacing:.06em;text-transform:uppercase;color:var(--text-3)}
.cp-goals{display:flex;flex-wrap:wrap;gap:8px}
.cp-goal{display:inline-flex;align-items:center;gap:6px;padding:8px 13px;border-radius:999px;border:1px solid var(--line);background:var(--surface);cursor:pointer;font-size:.88rem;font-weight:600;color:var(--text-2);transition:all .15s}
.cp-goal:hover{border-color:color-mix(in srgb,var(--ai-1) 45%,var(--line))}
.cp-goal[aria-checked=true]{background:var(--ai-soft);border-color:color-mix(in srgb,var(--ai-1) 55%,transparent);color:var(--violet);box-shadow:0 0 0 3px color-mix(in srgb,var(--ai-1) 12%,transparent)}
.cp-opt-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.cp-note{flex:1 1 280px}
.cp-toggle{display:inline-flex;align-items:center;gap:6px;font-size:.88rem;color:var(--text-2);cursor:pointer;white-space:nowrap}
.cp-toggle input{accent-color:var(--ai-1);width:16px;height:16px}
.cp-regen{padding:14px;border-radius:14px;background:var(--surface-2);border:1px dashed color-mix(in srgb,var(--ai-1) 35%,var(--line))}
.cp-stale{font-size:.88rem;padding:10px 14px;border-radius:12px;background:var(--warn-soft);color:var(--warn)}
.cp-summary p{margin:0;font-size:1rem;line-height:1.55}
.cp-meta{display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:8px;font-size:.8rem;color:var(--text-3);align-items:center}
.cp-conf{display:inline-flex;align-items:center;gap:6px}
.cp-conf i{width:46px;height:6px;border-radius:9px;background:var(--line-2);position:relative;overflow:hidden}
.cp-conf i::after{content:"";position:absolute;inset:0;width:var(--v);background:var(--ai-grad);border-radius:inherit}
.cp-applied{color:var(--ok);font-weight:650}
.cp-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.cp-key{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:16px;border-radius:16px;border:1px solid var(--line-2)}
.cp-key.water{background:linear-gradient(160deg,var(--water-soft),var(--surface) 75%)}
.cp-key.sun{background:linear-gradient(160deg,var(--warn-soft),var(--surface) 75%)}
.cp-key-top{display:flex;align-items:center;gap:8px}
.cp-ico{width:30px;height:30px;border-radius:10px;display:grid;place-items:center;background:var(--surface);box-shadow:var(--shadow-sm)}
.cp-k-label{font-size:.75rem;font-weight:750;letter-spacing:.05em;text-transform:uppercase;color:var(--text-3)}
.cp-big{font-size:1.45rem;font-weight:780;letter-spacing:-.01em;line-height:1.15}
.cp-sub{font-size:.85rem;color:var(--text-2)}
.cp-hint{font-size:.78rem;color:var(--text-3)}
.cp-key .btn{margin-top:4px}
.cp-verdict{display:inline-flex;align-items:center;gap:4px;font-size:.78rem;font-weight:650;padding:3px 9px;border-radius:999px}
.cp-verdict.ok{background:var(--ok-soft);color:var(--ok)}
.cp-verdict.warn{background:var(--warn-soft);color:var(--warn)}
.cp-verdict.muted{background:var(--surface-2);color:var(--text-3)}
.cp-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.cp-tile{padding:12px 14px;border-radius:14px;background:var(--surface-2);border:1px solid var(--line-2);min-width:0}
.cp-tile-h{display:flex;align-items:center;gap:6px;font-size:.72rem;font-weight:750;letter-spacing:.05em;text-transform:uppercase;color:var(--text-3)}
.cp-tile-v{font-weight:700;margin-top:4px;line-height:1.3;overflow-wrap:anywhere}
.cp-tile-s{font-size:.8rem;color:var(--text-2);margin-top:2px}
.cp-tile-m{font-size:.76rem;color:var(--text-3);margin-top:6px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.cp-tag{display:inline-block;font-size:.74rem;font-weight:700;padding:2px 8px;border-radius:999px;white-space:nowrap}
.cp-tag.ok{background:var(--ok-soft);color:var(--ok)} .cp-tag.warn{background:var(--warn-soft);color:var(--warn)}
.cp-tag.danger{background:var(--danger-soft);color:var(--danger)} .cp-tag.water{background:var(--water-soft);color:var(--water)}
.cp-sec-h{display:flex;align-items:center;gap:8px;font-weight:700;margin-bottom:8px}
.cp-cal{display:flex;flex-direction:column;gap:5px;padding:12px;border-radius:14px;border:1px solid var(--line-2);background:var(--surface)}
.cp-cal-row{display:grid;grid-template-columns:110px repeat(12,minmax(0,1fr));gap:4px;align-items:center}
.cp-cal-head span{text-align:center;font-size:.72rem;font-weight:700;color:var(--text-3)}
.cp-cal-head span.cur{color:var(--violet)}
.cp-cal-l{font-size:.82rem;font-weight:600;white-space:nowrap}
.cp-cell{height:16px;border-radius:5px;background:var(--line-2)}
.cp-cell.cur{box-shadow:0 0 0 2px color-mix(in srgb,var(--ai-1) 50%,transparent)}
.cp-cell.on.dorm{background:color-mix(in srgb,var(--water) 55%,var(--surface))}
.cp-cell.on.feed{background:color-mix(in srgb,var(--ok) 60%,var(--surface))}
.cp-cell.on.prop{background:color-mix(in srgb,var(--violet) 55%,var(--surface))}
.cp-pests{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.cp-pest{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border-radius:12px;background:var(--surface-2)}
.cp-dot{width:9px;height:9px;border-radius:50%;margin-top:6px;flex:none}
.cp-dot.danger{background:var(--danger)} .cp-dot.warn{background:var(--warn)} .cp-dot.ok{background:var(--ok)}
.cp-actions{display:flex;flex-direction:column;gap:6px}
.cp-act{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:12px;border:1px solid var(--line-2);background:var(--surface);cursor:pointer;transition:border-color .15s,background .15s}
.cp-act:hover{border-color:color-mix(in srgb,var(--ai-1) 35%,var(--line))}
.cp-act:has(input:checked){background:color-mix(in srgb,var(--ai-soft) 55%,var(--surface));border-color:color-mix(in srgb,var(--ai-1) 35%,var(--line))}
.cp-act.done{opacity:.65;cursor:default}
.cp-act input{width:18px;height:18px;accent-color:var(--ai-1);flex:none}
.cp-act-ico{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;background:var(--surface-2);flex:none}
.cp-act-main{display:flex;flex-direction:column;min-width:0;flex:1}
.cp-act-t{font-weight:650}
.cp-act-side{display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex:none}
.cp-due{font-size:.8rem;font-weight:650;color:var(--text-2);white-space:nowrap}
.cp-warn{display:flex;flex-direction:column;gap:4px;padding:10px 14px;border-radius:12px;background:var(--warn-soft);color:var(--warn);font-size:.88rem}
.cp-details{border-top:1px dashed var(--line);padding-top:12px}
.cp-details summary{cursor:pointer;font-weight:650;list-style:none;display:flex;gap:8px;align-items:baseline}
.cp-details summary::before{content:"▸";color:var(--text-3);transition:transform .15s}
.cp-details[open] summary::before{transform:rotate(90deg)}
.cp-details dl{display:grid;grid-template-columns:170px 1fr;gap:8px 14px;margin:12px 0 0;font-size:.9rem}
.cp-details dt{font-weight:650;color:var(--text-2)} .cp-details dd{margin:0}
.cp-foot{flex-wrap:wrap}
.cp-loading{display:flex;flex-direction:column;gap:10px}
.cp-steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.cp-steps li{font-size:.9rem;color:var(--text-3);display:flex;gap:8px;align-items:center;transition:color .3s}
.cp-steps li::before{content:"○";width:16px;text-align:center}
.cp-steps li.on{color:var(--text)} .cp-steps li.on::before{content:"✓";color:var(--ok);font-weight:800}
.cp-steps li.on:last-of-type::before,.cp-steps li.on:has(+ li:not(.on))::before{content:"◌";color:var(--violet);animation:spin 1s linear infinite;display:inline-block}
@media (max-width:1020px){.cp-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:720px){
  .cp-grid,.cp-pests{grid-template-columns:minmax(0,1fr)}
  .cp-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cp-cal-row{grid-template-columns:78px repeat(12,minmax(0,1fr));gap:3px}
  .cp-cal-l{font-size:.72rem}
  .cp-details dl{grid-template-columns:minmax(0,1fr)} .cp-details dd{margin-bottom:6px}
  .cp-act{align-items:flex-start} .cp-act-side{flex-direction:column}
  .cp-big{font-size:1.25rem}
  .cp-opt-row .btn-ai{width:100%}
}
.cp-card{scroll-margin-top:84px}
@media (max-width:720px){
  .cp-act{flex-wrap:wrap}
  .cp-act-main{flex:1 1 calc(100% - 80px)}
  .cp-act-side{flex-direction:row;align-items:center;margin-left:72px;gap:8px}
}

/* ---------- Location & environment ---------- */
.env-details{background:color-mix(in srgb,var(--water-soft) 30%,var(--surface))}
.env-fields{display:flex;flex-direction:column;gap:16px;padding:4px 0 16px}
.env-row{display:flex;flex-direction:column;gap:8px;min-width:0}
.env-label{font-size:.8rem;font-weight:650;color:var(--text-2);display:flex;flex-wrap:wrap;align-items:baseline;gap:8px}
.env-inh{font-weight:500;color:var(--violet);font-size:.75rem}
.env-help{font-size:.75rem;color:var(--text-3)}
.env-grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.env-opts{display:flex;flex-wrap:wrap;gap:8px}
.env-settings{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
.env-opt{display:flex;align-items:center;gap:8px;padding:8px 12px;border:1.5px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text);font:inherit;font-size:.85rem;cursor:pointer;text-align:left;transition:border-color .15s,background .15s,transform .1s;min-width:0}
.env-opt:hover{border-color:color-mix(in srgb,var(--brand) 45%,var(--line))}
.env-opt:active{transform:scale(.97)}
.env-opt[aria-pressed="true"]{border-color:var(--brand);background:var(--brand-soft);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 15%,transparent)}
.env-opt .eo-ico{font-size:1.15rem;line-height:1}
.env-opt .eo-t{display:flex;flex-direction:column;min-width:0}
.env-opt .eo-t span{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.env-opt small{color:var(--text-3);font-size:.7rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.env-inline .env-opt{padding:7px 11px;border-radius:999px}
.env-compass{display:grid;grid-template-columns:repeat(3,52px);grid-template-rows:repeat(3,44px);gap:5px}
.env-dir{flex-direction:column;justify-content:center;gap:0;padding:2px;border-radius:10px}
.env-dir b{font-size:.72rem}
.env-dir i{font-style:normal;color:var(--text-3);font-size:.8rem;line-height:1}
.env-dir[aria-pressed="true"] i{color:var(--brand-ink)}
.env-sun{display:grid;place-items:center;font-size:1.3rem;color:var(--warn)}
.env-temp{display:flex;align-items:center;gap:8px;max-width:160px}
.env-temp span{color:var(--text-2);font-weight:600}
.env-sum{display:flex;align-items:center;gap:12px}
.env-big{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;font-size:1.5rem;background:var(--water-soft);flex:none}
.env-from{font-size:.68rem;font-weight:600;color:var(--violet);background:var(--violet-soft);border-radius:6px;padding:1px 6px;margin-left:4px;white-space:nowrap}
.env-list{margin:12px 0 0;display:flex;flex-direction:column}
.env-list>div{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-top:1px dashed var(--line);font-size:.85rem}
.env-list dt{color:var(--text-2);white-space:nowrap}
.env-list dd{margin:0;text-align:right;font-weight:600;min-width:0;overflow-wrap:anywhere}
.env-risk{margin-top:12px;padding:10px 12px;border-radius:12px;background:var(--warn-soft);color:var(--warn);font-size:.82rem;display:flex;flex-direction:column;gap:3px}
.env-risk.high{background:var(--danger-soft);color:var(--danger)}
.env-chip{white-space:nowrap}
.env-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.env-tags span{font-size:.78rem;padding:4px 10px;border-radius:999px;background:var(--water-soft);color:var(--text)}
.gc-env{margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.env-dash{margin-bottom:20px}
.env-dist{display:flex;flex-wrap:wrap;gap:8px}
.env-dist-i{position:relative;display:flex;align-items:center;gap:10px;padding:8px 12px;border:1px solid var(--line);border-radius:12px;color:var(--text);text-decoration:none;font-size:.85rem;overflow:hidden;background:var(--surface)}
.env-dist-i::before{content:'';position:absolute;inset:auto 0 0 0;height:3px;width:var(--w,0);background:var(--water)}
.env-dist-i:hover{border-color:var(--brand)}
.env-dist-i b{font-variant-numeric:tabular-nums}
.env-dist-i.unknown{border-style:dashed;color:var(--text-2)}
.env-winter{margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
.env-winter-h{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:4px}
.env-risk-list .list-item{cursor:pointer}
#loc{max-width:220px}
@media (max-width:640px){
  .env-grid2{grid-template-columns:1fr}
  .env-settings{grid-template-columns:repeat(2,minmax(0,1fr))}
  .page-head #loc{max-width:none;flex:1 1 45%}
}

/* ---------- Custom cost items (packaging, fees) ---------- */
.gx-chans{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding:2px 0 10px;margin-bottom:2px}
.gx-chans::-webkit-scrollbar{display:none}
.gx-chan{flex:none;border:1px solid var(--line);background:var(--surface);color:var(--text-2);border-radius:999px;padding:5px 11px;font:inherit;font-size:.78rem;font-weight:600;cursor:pointer;white-space:nowrap;transition:background .15s,border-color .15s}
.gx-chan:hover{border-color:var(--brand)}
.gx-chan[aria-pressed="true"]{background:var(--brand);border-color:var(--brand);color:#fff}
.gx-usual{color:var(--warn);font-size:.72rem}
.gx-chan[aria-pressed="true"] .gx-usual{color:#fde68a}
.gx-chan-pick{flex-wrap:wrap;overflow:visible;margin-top:10px}
.gx-costs .gx-cat td{padding-top:12px;font-weight:700;font-size:.76rem;text-transform:uppercase;letter-spacing:.05em;color:var(--text-2);border-bottom:1px solid var(--line)}
.gx-costs .gx-cat .num{text-transform:none;letter-spacing:0;font-size:.82rem}
.gx-costs .gx-citem td:first-child{padding-left:10px}
.gx-cico{margin-right:6px}
.gx-basis{font-size:.68rem;font-weight:650;color:var(--violet);background:var(--violet-soft);border-radius:6px;padding:1px 6px;margin-left:4px;white-space:nowrap}
.gx-unused{margin-top:8px;line-height:1.6}
.gx-unused span{opacity:.8}
.gx-costlink{margin-top:8px}
.gx-costs-card{margin-bottom:18px}
.gx-cost-cat+.gx-cost-cat{margin-top:14px}
.gx-cost-cat-h{font-size:.74rem;font-weight:750;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3);margin-bottom:6px}
.gx-cost-list{list-style:none;margin:0;padding:0;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.gx-cost-row{display:flex;align-items:center;gap:12px;padding:10px 14px;cursor:pointer;background:var(--surface);transition:background .15s}
.gx-cost-row+.gx-cost-row{border-top:1px solid var(--line)}
.gx-cost-row:hover{background:var(--surface-2)}
.gx-cost-row.off{opacity:.55}
.gx-cost-ico,.gx-cost-av{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;font-size:1.25rem;background:var(--sand-soft);flex:none}
.gx-cost-amt{font-variant-numeric:tabular-nums;white-space:nowrap}
.gx-icons{display:flex;flex-wrap:wrap;gap:6px}
.gx-icon{width:40px;height:40px;border-radius:12px;border:1.5px solid var(--line);background:var(--surface);font-size:1.2rem;cursor:pointer}
.gx-icon[aria-pressed="true"]{border-color:var(--brand);background:var(--brand-soft)}
.gx-seg-wrap{flex-wrap:wrap}
.gx-spend-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px}
.gx-spend-h{display:flex;justify-content:space-between;font-weight:650}
.gx-spend-bar{height:6px;border-radius:6px;background:var(--surface-2);margin:8px 0;overflow:hidden}
.gx-spend-bar i{display:block;height:100%;background:var(--sand)}
.gx-spend ul{list-style:none;margin:0;padding:0;font-size:.84rem}
.gx-spend li{display:flex;justify-content:space-between;padding:4px 0;border-top:1px dashed var(--line);color:var(--text-2)}
.gx-spend{margin-top:18px}
.gx-costs td.tiny{max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:640px){.gx-costs td.tiny{max-width:90px}}

/* ===== Weather (Open-Meteo) ===== */
#wx-dash:empty,#wx-plant:empty,#wx-group:empty,#wx-grower:empty{display:none}
#wx-dash{margin-bottom:18px}
#wx-group{margin:18px 0 0}
#wx-plant{margin-bottom:18px}
#wx-grower{margin:0 0 16px}
.wx-card .fold-body{padding:14px 20px 18px}
.wx-top{display:flex;align-items:center;gap:14px;margin-bottom:12px}
.wx-top-r{margin-left:auto;display:flex;align-items:center;gap:4px}
.wx-now{display:flex;align-items:center;gap:14px;flex-wrap:wrap;min-width:0}
.wx-now-i{font-size:2.6rem;line-height:1}
.wx-now-t{display:flex;flex-direction:column;line-height:1.15}
.wx-now-t b{font-size:2rem;font-weight:750;letter-spacing:-.02em}
.wx-now-m{display:flex;flex-wrap:wrap;gap:4px 14px;color:var(--text-2)}
.wx-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.wx-day{display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 2px 6px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line-2);min-width:0}
.wx-day.today{background:var(--brand-soft);border-color:color-mix(in srgb,var(--brand) 30%,transparent)}
.wx-dn{font-size:.72rem;font-weight:700;color:var(--text-2);text-transform:uppercase;letter-spacing:.04em}
.wx-di{font-size:1.45rem;line-height:1.2}
.wx-dt{display:flex;gap:5px;font-size:.82rem;align-items:baseline}
.wx-dt b{font-weight:700}.wx-dt span{color:var(--text-3)}
.wx-dt .hot{color:var(--danger)}.wx-dt .cold{color:var(--water);font-weight:650}.wx-dt .frost{color:#fff;background:var(--water);border-radius:6px;padding:0 4px;font-weight:700}
.wx-rain{width:60%;height:18px;display:flex;align-items:flex-end;margin-top:2px}
.wx-rain i{display:block;width:100%;height:var(--h);min-height:0;border-radius:3px 3px 0 0;background:linear-gradient(var(--water),color-mix(in srgb,var(--water) 60%,transparent))}
.wx-rmm{font-size:.68rem;color:var(--water);font-weight:650;min-height:1em;white-space:nowrap}
.wx-sun{font-size:.66rem;color:var(--sand);white-space:nowrap}
.wx-past{margin-top:10px}
.wx-alerts{display:flex;flex-direction:column;gap:6px;margin-top:12px}
.wx-alert{display:flex;gap:10px;align-items:flex-start;padding:9px 12px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line-2)}
.wx-alert .li-main{display:flex;flex-direction:column;gap:1px;min-width:0}
.wx-alert .small{color:var(--text-2)}
.wx-alert.danger{background:var(--danger-soft);border-color:color-mix(in srgb,var(--danger) 25%,transparent)}
.wx-alert.danger b{color:var(--danger)}
.wx-alert.warn{background:var(--warn-soft);border-color:color-mix(in srgb,var(--warn) 25%,transparent)}
.wx-alert.water{background:var(--water-soft);border-color:color-mix(in srgb,var(--water) 20%,transparent)}
.wx-ai{font-size:1.2rem;line-height:1.3}
.wx-impact{margin-top:14px;border-top:1px solid var(--line-2);padding-top:10px}
.wx-impact-h{margin-bottom:4px;font-weight:650;text-transform:uppercase;letter-spacing:.05em;font-size:.72rem}
.wx-imp{border-radius:12px}
.wx-imp summary{display:flex;align-items:center;gap:12px;padding:8px 6px;cursor:pointer;list-style:none;border-radius:12px}
.wx-imp summary::-webkit-details-marker{display:none}
.wx-imp summary:hover{background:var(--surface-2)}
.wx-imp summary .li-main{display:flex;flex-direction:column;min-width:0}
.wx-imp[open] summary .faint{transform:rotate(90deg)}
.wx-imp summary .faint{transition:transform .15s}
.wx-ii{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:var(--surface-2);flex:none}
.wx-imp.danger .wx-ii{background:var(--danger-soft)}.wx-imp.warn .wx-ii{background:var(--warn-soft)}.wx-imp.water .wx-ii{background:var(--water-soft)}
.wx-chips{display:flex;flex-wrap:wrap;gap:6px;padding:4px 6px 10px 52px}
.wx-chip{display:inline-flex;align-items:center;gap:6px;padding:3px 10px 3px 3px;border-radius:999px;border:1px solid var(--line);background:var(--surface);font-size:.8rem;font-weight:600}
.wx-chip:hover{border-color:var(--brand)}
.avatar.xs{width:22px;height:22px;border-radius:50%}
.avatar.xs .placeholder{font-size:.7rem}
.wx-ok{margin-top:12px;color:var(--ok);font-weight:600}
.wx-cta-card{display:flex;align-items:center;gap:14px;padding:14px 18px;margin-bottom:18px;border-style:dashed;color:inherit}
.wx-cta-card:hover{border-color:var(--water)}
.wx-cta-card .li-main{display:flex;flex-direction:column;gap:2px}
.wx-cta-card.sm{margin-bottom:18px;padding:12px 14px}
.wx-cta-i{font-size:1.8rem}
.wx-qh{display:inline-block;margin-left:4px;font-weight:600}
.wx-qh.water{color:var(--water)}.wx-qh.cold{color:var(--water)}.wx-qh.warm{color:var(--warn)}
.wx-spot .card-body{display:flex;flex-direction:column;gap:12px}
.wx-spot .wx-days{gap:4px}
.wx-spot .wx-day{padding:6px 1px 4px}
.wx-spot .wx-di{font-size:1.15rem}
.wx-spot .wx-dt{font-size:.74rem;gap:3px}
.wx-spot .wx-sun{display:none}
.wx-spot .wx-alerts{margin-top:0}
.wx-spot-kind{display:flex;align-items:center;gap:10px}
.wx-spot-kind .li-main{display:flex;flex-direction:column;min-width:0}
.wx-spot-kind a{color:var(--brand);font-weight:600}
.wx-spot-i{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:var(--surface-2);font-size:1.2rem;flex:none}
.wx-facts{display:flex;flex-wrap:wrap;gap:4px 14px;color:var(--text-2)}
.wx-water{display:flex;flex-direction:column;gap:4px;padding:10px 12px;border-radius:12px;background:var(--water-soft);color:var(--text)}
.wx-light{padding:0 2px}
.wx-indoor{padding:10px 12px;border-radius:12px;background:var(--surface-2)}
.wx-members{display:flex;flex-direction:column;gap:4px}
.wx-member{display:flex;gap:8px;align-items:baseline;padding:4px 0;border-top:1px solid var(--line-2)}
.wx-member b{font-weight:650}
.water-text{color:var(--water)}
.wx-note{background:var(--water-soft)}
.wx-note a{color:var(--water);font-weight:600}
.wx-settings{margin-bottom:18px}
.wx-loc{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:14px;background:var(--surface-2);border:1px solid var(--line-2);margin-bottom:12px}
.wx-loc .li-main{display:flex;flex-direction:column;min-width:0}
.wx-loc-i{font-size:1.4rem}
.wx-loc-now{margin-left:auto;font-size:1.05rem;white-space:nowrap}
.wx-search{display:flex;gap:8px;flex-wrap:wrap}
.wx-search .gx-input{flex:1 1 260px}
.wx-results{display:flex;flex-direction:column;gap:4px;margin-top:8px}
.wx-results:empty{display:none}
.wx-res{display:flex;align-items:center;gap:10px;padding:9px 12px;border:1px solid var(--line-2);border-radius:12px;background:var(--surface);text-align:left;cursor:pointer}
.wx-res:hover{border-color:var(--brand);background:var(--brand-soft)}
.wx-res .li-main{display:flex;flex-direction:column}
.wx-grower{display:flex;flex-direction:column;gap:6px}
@media (max-width:640px){
  .wx-card .fold-body{padding:12px 14px 14px}
  .wx-now-i{font-size:2.1rem}.wx-now-t b{font-size:1.6rem}
  .wx-now-m{gap:2px 10px;font-size:.78rem}
  .wx-top{align-items:flex-start}
  .wx-days{gap:3px}
  .wx-day{padding:6px 0 4px;border-radius:10px}
  .wx-di{font-size:1.15rem}
  .wx-dt{flex-direction:column;align-items:center;gap:0;font-size:.74rem}
  .wx-sun{display:none}
  .wx-rmm{font-size:.6rem}
  .wx-chips{padding-left:6px}
  .wx-cta-card{flex-wrap:wrap}
}
.wx-spot .wx-dt{flex-direction:column;align-items:center;gap:0}
.wx-spot .wx-dn{font-size:.6rem;letter-spacing:.02em}
.wx-days .wx-rain{height:12px}
.wx-search .gx-input .input{padding-left:38px}
#wx-group{margin:18px 0 22px}
.wx-upd{white-space:nowrap}
@media (max-width:640px){.wx-upd{display:none}}

/* ===== Propagation lifecycle ===== */
.pp-ava{display:grid;place-items:center;font-size:1.2rem;background:var(--brand-soft)}
.avatar.sm.pp-ava{font-size:.95rem}
.avatar.lg.pp-ava{font-size:2rem}
.pp-hero .avatar.lg img{filter:none}
.pp-top{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:16px;margin-bottom:16px;align-items:start}
.pp-lines{margin:0 0 12px;padding-left:18px;display:grid;gap:4px;font-size:.92rem}
.pp-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:6px}
.pp-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:5px 12px;font-size:.82rem;cursor:pointer;color:var(--text-2)}
.pp-chip b{color:var(--text)}
.pp-chip.ok{background:var(--ok-soft);border-color:transparent}.pp-chip.warn{background:var(--warn-soft);border-color:transparent}.pp-chip.danger{background:var(--danger-soft);border-color:transparent}
.pp-chip:disabled{opacity:.45;cursor:default}
.pp-att{margin-top:8px}.pp-att .list-item{align-items:flex-start}
.pp-issue{color:var(--warn);margin-top:2px}
.pp-issue .faint{color:var(--text-3)}
.pp-k{font-size:.72rem;font-weight:750;letter-spacing:.07em;text-transform:uppercase;color:var(--text-3);margin:14px 0 6px}
.pp-nextc .pp-k:first-child{margin-top:0}
.pp-next .list-item{align-items:center}
.pp-next.collapsed .list-item:nth-child(n+6){display:none}
.pp-due{font-weight:650;color:var(--text-2)}
.pp-due.now{color:var(--warn)}.pp-due.late{color:var(--danger)}
.pp-mfilter{margin:-8px 0 14px;font-size:.9rem;color:var(--text-2)}
.pp-mfilter a{color:var(--brand);margin-left:8px;font-weight:600}
.pp-list-card .card-head{flex-wrap:wrap}
.pp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:12px;padding:16px 20px}
.pp-grid>.empty{grid-column:1/-1;padding:24px;text-align:center}
.pp-card{border:1px solid var(--line);border-radius:14px;padding:14px;background:var(--surface);cursor:pointer;display:flex;flex-direction:column;gap:9px;transition:box-shadow .15s,border-color .15s;border-left:4px solid var(--line)}
.pp-card:hover,.pp-card:focus-visible{box-shadow:var(--shadow);outline:none}
.pp-card.h-on_track{border-left-color:var(--ok)}.pp-card.h-attention{border-left-color:var(--warn)}.pp-card.h-failed{border-left-color:var(--danger)}.pp-card.h-done{border-left-color:var(--brand)}
.pp-card-top{display:flex;gap:10px;align-items:flex-start}
.pp-card-top .pill{height:22px;font-size:.72rem}
.pp-card-name{color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pp-card-stage{font-size:.86rem}
.pp-card-foot{display:flex;align-items:center;gap:8px}
.pp-card-act{display:flex;align-items:center;gap:8px;justify-content:space-between;border-top:1px dashed var(--line);padding-top:9px}
.pp-mini{display:flex;gap:3px}
.pp-mini i{flex:1;height:6px;border-radius:3px;background:var(--line)}
.pp-mini i.done{background:var(--brand-2)}.pp-mini i.skipped{background:var(--text-3);opacity:.5}
.pp-mini i.active{background:var(--warn);box-shadow:0 0 0 2px var(--warn-soft)}
/* journey */
.pp-hero{padding:18px 20px;margin-bottom:16px}
.pp-hero-top{display:flex;gap:14px;align-items:flex-start}
.pp-hero-top h1{font-size:1.6rem;margin:2px 0}
.pp-hero-name{color:var(--text-2)}
.pp-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px;margin-top:16px}
.pp-facts.sm{margin:0 0 12px}
.pp-fact{display:flex;flex-direction:column;background:var(--surface-2);border:1px solid var(--line-2);border-radius:12px;padding:8px 12px;min-width:0}
.pp-fact span{font-size:.7rem;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3);font-weight:700}
.pp-fact b{font-size:.98rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pp-fact i{font-style:normal;font-size:.78rem;color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
a.pp-fact:hover{border-color:var(--brand)}
.pp-notes{margin:12px 0 0}
.pp-hero-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:14px;align-items:center}
.pp-hero-actions label.btn{cursor:pointer}
.btn.danger{color:var(--danger)}
.btn-lg{height:46px;padding:0 20px;font-size:1rem}
.pp-issues{display:grid;gap:8px;margin-bottom:12px}
.pp-issue-row{display:flex;gap:12px;align-items:center;background:var(--warn-soft);border:1px solid color-mix(in srgb,var(--warn) 30%,transparent);border-radius:14px;padding:12px 14px}
.pp-info{background:var(--water-soft);border-radius:12px;padding:10px 14px;margin-bottom:12px;font-size:.9rem}
.pp-cols{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:16px;align-items:start}
.pp-main,.pp-side{display:grid;gap:16px;min-width:0}
.pp-nextc{border:2px solid var(--brand-soft)}
.pp-nextc.warn{border-color:color-mix(in srgb,var(--warn) 45%,transparent)}
.pp-nextc.done{border-color:var(--brand)}
.pp-next-main{display:flex;gap:14px;align-items:center}
.pp-next-main h2{font-size:1.3rem}
.pp-next-ico{width:54px;height:54px;border-radius:16px;background:var(--brand-soft);display:grid;place-items:center;font-size:1.7rem;flex:none}
.pp-next-pills{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0 4px}
.pp-hint{background:var(--surface-2);border-radius:10px;padding:8px 12px;margin:10px 0}
.pp-next-btns{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;align-items:center}
.pp-steps{list-style:none;margin:0;padding:16px 20px 8px}
.pp-step{display:grid;grid-template-columns:30px minmax(0,1fr);gap:12px;position:relative;padding-bottom:18px}
.pp-step:not(:last-child)::before{content:"";position:absolute;left:14px;top:30px;bottom:0;width:2px;background:var(--line)}
.pp-step.done:not(:last-child)::before{background:var(--brand-2)}
.pp-dot{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:.85rem;background:var(--surface-2);border:2px solid var(--line);color:var(--text-3);z-index:1}
.pp-step.done .pp-dot{background:var(--brand-2);border-color:var(--brand-2);color:#fff}
.pp-step.active .pp-dot{background:var(--warn-soft);border-color:var(--warn);color:var(--warn);box-shadow:0 0 0 4px color-mix(in srgb,var(--warn) 18%,transparent)}
.pp-step.skipped .pp-dot{opacity:.6}
.pp-step.pending .pp-step-title{color:var(--text-2)}
.pp-step.milestone .pp-dot{border-style:double;border-width:4px}
.pp-step-title{display:flex;flex-wrap:wrap;gap:6px;align-items:center;min-height:30px}
.pp-step-title .pill{height:22px;font-size:.72rem}
.pp-step-when{color:var(--text-2)}
.pp-step-notes{margin-top:4px;font-style:italic;color:var(--text-2)}
.pp-dchips{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
.pp-dchip{font-size:.75rem;background:var(--surface-2);border:1px solid var(--line-2);border-radius:999px;padding:1px 8px}
.pp-insp{margin-top:6px;font-size:.85rem}
.pp-insp summary{cursor:pointer;color:var(--brand);font-weight:600}
.pp-insp-one{border-left:2px solid var(--line);padding:4px 0 4px 10px;margin:6px 0}
.pp-insp-res{display:flex;flex-wrap:wrap;gap:4px;margin-top:3px}
.pp-insp-res .pill{height:22px;font-size:.72rem}
.pp-thumbs{display:flex;gap:6px;margin-top:6px;flex-wrap:wrap}
.pp-thumb{width:64px;height:64px;border-radius:10px;overflow:hidden;border:1px solid var(--line);padding:0;cursor:zoom-in;background:var(--surface-2)}
.pp-thumb img,.pp-thumb .placeholder{width:100%;height:100%;object-fit:cover}
.pp-ugrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:6px;padding:14px 16px}
.pp-unit{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:8px 10px;border-radius:10px;border:1px solid var(--line);background:var(--surface-2);cursor:pointer;text-align:left;font-size:.75rem;min-width:0}
.pp-unit span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;color:var(--text-2)}
.pp-unit.r-ok{background:var(--ok-soft);border-color:transparent}.pp-unit.r-wait{background:var(--warn-soft);border-color:transparent}
.pp-unit.s-failed{background:var(--danger-soft);border-color:transparent;opacity:.75}.pp-unit.s-failed b{text-decoration:line-through}
.pp-unit.s-promoted{background:var(--brand-soft);border-color:transparent}
.pp-promote-row{display:flex;gap:10px;align-items:center;justify-content:space-between;border-top:1px solid var(--line-2)}
.pp-events{list-style:none;margin:0;padding:8px 16px}
.pp-events.collapsed .pp-ev:nth-child(n+9){display:none}
.pp-ev{display:flex;gap:10px;padding:8px 0;border-bottom:1px solid var(--line-2)}
.pp-ev:last-child{border-bottom:0}
.pp-ev-ico{width:26px;text-align:center;flex:none}
.pp-plant .pp-born{display:block;background:var(--brand-soft);color:var(--brand);border-radius:10px;padding:8px 12px;margin-bottom:10px;font-size:.88rem}
.pp-pstats{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:.85rem;color:var(--text-2);margin-bottom:6px}
.pp-pstats b{color:var(--text)}
.pp-plist{margin:0 -12px}
/* sheets */
.pp-sheet .q-title{display:flex;align-items:center;gap:6px}
.pp-row2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.pp-err{background:var(--danger-soft);color:var(--danger);border-radius:10px;padding:8px 12px;font-size:.88rem;margin-top:8px}
.pp-lock{background:var(--violet-soft);color:var(--violet);border-radius:10px;padding:10px 12px;font-size:.88rem;margin-top:8px}
.pp-chain{display:flex;flex-wrap:wrap;gap:4px;align-items:center;margin-top:8px}
.pp-chain .tiny{width:100%;margin-top:2px}
.pp-link{font-size:.76rem;background:var(--surface-2);border:1px solid var(--line-2);border-radius:999px;padding:2px 8px;white-space:nowrap}
.pp-arrow{color:var(--text-3);font-size:.75rem}
.pp-callout{background:var(--surface-2);border-radius:12px;padding:10px 14px;margin:8px 0;font-size:.9rem}
.pp-callout.water{background:var(--water-soft)}
.pp-urows{display:grid;gap:6px}
.pp-urow{display:grid;grid-template-columns:44px auto minmax(0,1fr);gap:10px;align-items:center;padding:8px 10px;border:1px solid var(--line-2);border-radius:12px;background:var(--surface-2)}
.pp-urow[data-out="FAIL"]{background:var(--danger-soft)}
.pp-outs{display:flex;gap:4px;flex-wrap:wrap}
.pp-out{position:relative;cursor:pointer}
.pp-out input{position:absolute;opacity:0;pointer-events:none}
.pp-out span{display:inline-block;padding:5px 10px;border-radius:999px;border:1px solid var(--line);font-size:.8rem;font-weight:600;background:var(--surface)}
.pp-out.ok input:checked+span{background:var(--ok);border-color:var(--ok);color:#fff}
.pp-out.warn input:checked+span{background:var(--warn);border-color:var(--warn);color:#fff}
.pp-out.danger input:checked+span{background:var(--danger);border-color:var(--danger);color:#fff}
.pp-out input:focus-visible+span{outline:2px solid var(--brand)}
.pp-meas{display:flex;gap:6px;flex-wrap:wrap;align-items:end}
.pp-meas label{display:flex;flex-direction:column;width:92px}
.pp-meas .input{height:34px;padding:0 8px}
.pp-meas .pp-cause{width:auto;height:34px}
.pp-pick{display:flex;flex-wrap:wrap;gap:6px}
.pp-pick-one{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:999px;padding:4px 10px;cursor:pointer;font-size:.85rem}
.pp-pick-one i{font-style:normal}.pp-pick-one i.ok{color:var(--ok)}.pp-pick-one i.warn{color:var(--warn)}
/* recipes */
.pp-lead{margin:-6px 0 16px;max-width:760px}
.pp-rsec{margin-bottom:22px}
.pp-rh{margin:0 0 10px;font-size:1.05rem}
.pp-rgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}
.pp-recipe{display:flex;flex-direction:column}
.pp-recipe .card-body{flex:1}
.pp-rstages{list-style:none;margin:0;padding:0;display:grid;gap:5px}
.pp-rstages li{display:flex;gap:8px;align-items:flex-start;font-size:.86rem}
.pp-rstages .li-main{display:flex;flex-wrap:wrap;gap:0 8px;align-items:baseline}
.pp-ri{width:22px;text-align:center;flex:none}
.pp-rbtns{display:flex;gap:6px;padding:10px 16px;border-top:1px solid var(--line-2);flex-wrap:wrap}
.pp-se{border:1px solid var(--line);border-radius:12px;padding:10px;margin-bottom:8px;display:grid;gap:8px;background:var(--surface-2)}
.pp-se-head{display:flex;gap:6px;align-items:center}
.pp-se-head .input[name=name]{flex:1;min-width:0}
.pp-se-icon{width:52px;text-align:center;padding:0 4px}
.pp-se-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.pp-se-grid label{display:flex;flex-direction:column;min-width:0}
.pp-se-checks{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.pp-se-checks .input{width:120px}
.pp-se-flags{display:flex;flex-wrap:wrap;gap:12px}
.pp-tog{display:inline-flex;gap:6px;align-items:center;font-size:.85rem;cursor:pointer}
/* insights */
.pp-ifilters{display:flex;flex-wrap:wrap;gap:10px;align-items:end;margin-bottom:16px}
.pp-ifilters label{display:flex;flex-direction:column;font-size:.75rem;color:var(--text-3);font-weight:700;text-transform:uppercase;letter-spacing:.05em;gap:4px}
.pp-ifilters .select{min-width:140px}
.pp-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin-bottom:16px}
.pp-kpi{padding:14px 16px;display:flex;flex-direction:column;gap:2px}
.pp-kpi-ico{font-size:1.3rem}.pp-kpi b{font-size:1.6rem}.pp-kpi span{font-weight:650}.pp-kpi i{font-style:normal;font-size:.78rem;color:var(--text-3)}
.pp-igrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,520px),1fr));gap:16px;margin-bottom:16px}
.pp-tscroll{overflow-x:auto}
.pp-itable table{width:100%;border-collapse:collapse;font-size:.85rem}
.pp-itable th{text-align:left;font-size:.7rem;text-transform:uppercase;letter-spacing:.05em;color:var(--text-3);padding:8px 12px;border-bottom:1px solid var(--line-2);white-space:nowrap}
.pp-itable td{padding:8px 12px;border-bottom:1px solid var(--line-2);white-space:nowrap}
.pp-itable td a{color:var(--brand);font-weight:600}
.pp-bar{display:inline-block;width:60px;height:6px;border-radius:3px;background:var(--line);vertical-align:middle;overflow:hidden}
.pp-bar i{display:block;height:100%;background:var(--ok)}
.pp-asks{display:flex;flex-wrap:wrap;gap:6px}
@media (max-width:900px){
  .pp-top,.pp-cols{grid-template-columns:1fr}
}
@media (max-width:720px){
  .pp-grid{grid-template-columns:1fr;padding:12px}
  .pp-hero{padding:14px}
  .pp-hero-top h1{font-size:1.3rem}
  .pp-hero-top .avatar.lg{width:52px;height:52px}
  .pp-facts{grid-template-columns:1fr 1fr}
  .pp-hero-actions .spacer{display:none}
  .pp-row2,.pp-se-grid{grid-template-columns:1fr 1fr}
  .pp-urow{grid-template-columns:36px minmax(0,1fr)}
  .pp-urow .pp-meas{grid-column:1/-1}
  .pp-next-btns .btn-lg{flex:1}
  .pp-steps{padding:14px 14px 6px}
  .pp-due-row .btn{padding:0 10px}
  .pp-ugrid{grid-template-columns:repeat(auto-fill,minmax(76px,1fr))}
  .pp-promote-row{flex-direction:column;align-items:stretch}
}
@media (max-width:420px){.pp-row2{grid-template-columns:1fr}}
.pp-scout .card-head,.pp-nextc .card-head{flex-wrap:wrap;row-gap:4px}
.pp-top>*{min-width:0}
@media (max-width:720px){
  .search{min-width:0}
  .search input{width:100%}
  .topbar-inner{gap:6px}
  .topbar .icon-link{width:34px;height:34px}
}
.pp-grid{grid-template-columns:repeat(auto-fill,minmax(min(270px,100%),1fr))}
.pp-grid>*{min-width:0}
.pp-list-card .card-head{flex-wrap:wrap;row-gap:8px}
@media (max-width:720px){
  .pp-grid{padding:12px 14px}
  .pp-list-card .gx-search{flex:1 1 100%}
}
@media (max-width:720px){
  .pp-hero .pp-hero-top{flex-wrap:wrap;gap:4px 10px}
  .pp-hero .pp-hero-top .avatar.lg{display:none}
  .pp-hero .pp-hero-top>.pill{order:-1}
  .pp-hero .pp-hero-top .li-main{flex:1 1 100%}
  .pp-hero .pp-hero-top h1{font-size:1.35rem;white-space:nowrap}
  .pp-sheet .sheet-foot{gap:8px}
  .pp-sheet .sheet-foot .btn{min-width:0;padding-left:12px;padding-right:12px}
  .pp-sheet .sheet-foot .btn-ghost{padding-left:6px;padding-right:6px}
}
/* propagation undo */
.pp-reopen{margin-left:6px;border:1px solid var(--line);background:var(--surface);color:var(--text-2);border-radius:999px;padding:2px 9px;font-size:.72rem;font-weight:600;cursor:pointer;vertical-align:middle;white-space:nowrap}
.pp-reopen:hover{border-color:var(--brand);color:var(--brand)}
.pp-ev .pp-reopen{align-self:center;flex:none}
.pp-undo-list{list-style:none;margin:10px 0 14px;padding:0;display:grid;gap:6px}
.pp-undo-row{display:flex;gap:10px;align-items:center;border:1px solid var(--line);border-radius:12px;padding:10px 12px;cursor:pointer;background:var(--surface)}
.pp-undo-row .li-main{display:flex;flex-direction:column;gap:2px;min-width:0}
.pp-undo-row.on{border-color:var(--warn);background:var(--warn-soft)}
.pp-undo-row.on b{text-decoration:line-through;text-decoration-color:color-mix(in srgb,var(--warn) 70%,transparent)}
.wx-rule{display:flex;gap:10px;align-items:flex-start;margin-top:10px;padding:10px 12px;border-radius:12px;background:var(--surface-2,var(--bg));border:1px solid var(--line-2);color:var(--text-2);line-height:1.45}
.wx-rule.warn{border-color:var(--warn);background:var(--warn-soft)}
.wx-rule-i{flex:none;font-size:1.05rem}
.wx-rule a{white-space:nowrap}

/* ===================================================================
   Plant page sections (tabs)
   =================================================================== */
.ptabs{position:sticky;top:var(--topbar-h,65px);z-index:20;display:flex;gap:4px;margin:0 0 18px;padding:5px;overflow-x:auto;scrollbar-width:none;
  background:color-mix(in srgb,var(--surface) 92%,transparent);backdrop-filter:saturate(1.4) blur(12px);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow-sm)}
.ptabs::-webkit-scrollbar{display:none}
.ptabs button{flex:1 0 auto;display:inline-flex;align-items:center;justify-content:center;gap:7px;height:38px;padding:0 14px;border:0;border-radius:10px;background:transparent;
  color:var(--text-2);font:650 .88rem var(--font);cursor:pointer;white-space:nowrap;transition:background .15s,color .15s}
.ptabs button:hover{background:var(--surface-2);color:var(--text)}
.ptabs button[aria-selected="true"]{background:var(--brand);color:#fff;box-shadow:0 4px 12px -6px var(--brand)}
.ptab-n{font-size:.72rem;font-weight:700;padding:1px 7px;border-radius:999px;background:var(--surface-2);color:var(--text-2)}
.ptabs button[aria-selected="true"] .ptab-n{background:rgba(255,255,255,.22);color:#fff}
.pane[hidden]{display:none!important}
.pane{animation:pane-in .18s ease}
@keyframes pane-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.pane-narrow{max-width:760px}
.stat-link{cursor:pointer;transition:border-color .15s,transform .08s}
.stat-link:hover{border-color:var(--brand)}
@media (max-width:720px){
  .ptabs{top:var(--topbar-h,61px);margin:0 -14px 14px;border-radius:0;border-left:0;border-right:0;padding:6px 10px}
  .ptabs button{flex:none;height:36px;padding:0 12px;font-size:.84rem}
}

/* ===================================================================
   Dashboard: "to do" column + "around your nursery" column
   =================================================================== */
.dash-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:20px;align-items:start;margin-bottom:26px}
.dash-tabs{display:none}
.dash-stack{display:flex;flex-direction:column;gap:18px;min-width:0}
.dash-stack>:empty{display:none}
.dash-stack>div>*{margin-bottom:0!important}
.dash-stack>div>*+*{margin-top:18px}
.dash-label{font:700 .74rem var(--font);letter-spacing:.08em;text-transform:uppercase;color:var(--text-3);margin:0 2px -6px}
.dash-side .gx-dash{gap:10px}
.dash-side .gx-dstats{grid-template-columns:repeat(2,minmax(0,1fr));flex-basis:100%}
.kpi-link{color:inherit;text-decoration:none;transition:border-color .15s,transform .08s}
.kpi-link:hover{border-color:var(--brand);transform:translateY(-1px)}
@media (max-width:1020px){
  .dash-grid{grid-template-columns:1fr}
  /* phones/tablets: one column at a time, switched by the Today / Nursery tabs */
  .dash-label{display:none}
  .dash-tabs{display:flex;margin:0 0 14px;width:100%}
  .dash-tabs button{flex:1;padding:9px 12px;font-size:.9rem}
  .dash-grid[data-tab="today"]>.dash-side,.dash-grid[data-tab="nursery"]>.dash-main{display:none}
}

/* ===================================================================
   Mobile navigation: More sheet + floating AI button
   =================================================================== */
.more-sheet .sheet-body{padding-top:0}
@media (max-width:720px){.sheet.more-sheet{height:auto;max-height:92vh;padding-bottom:env(safe-area-inset-bottom)}}
.more-group{font:700 .72rem var(--font);letter-spacing:.08em;text-transform:uppercase;color:var(--text-3);margin:14px 4px 6px}
.more-item{display:flex;align-items:center;gap:12px;width:100%;padding:10px 10px;border:0;border-radius:14px;background:none;color:var(--text);text-decoration:none;text-align:left;cursor:pointer;font:inherit}
.more-item:hover,.more-item.active{background:var(--surface-2)}
.more-item.active b{color:var(--brand)}
.more-item .li-main{display:flex;flex-direction:column}
.more-i{flex:none;width:40px;height:40px;border-radius:12px;display:grid;place-items:center;font-size:1.2rem;background:var(--surface-2);border:1px solid var(--line-2)}
.tab-more{color:var(--text-3)}
@media (max-width:720px){
  .tabbar .tab-more.active{color:var(--brand)}
  .tabbar .tab-more.active .ti{filter:none;opacity:1}
  .top-settings{display:none}
  .ai-fab{display:flex;right:14px;bottom:calc(78px + env(safe-area-inset-bottom));width:48px;height:48px;padding:0;justify-content:center}
  .ai-fab .lbl{display:none}
  body:has(.sticky-actions) .ai-fab,body.chat-open .ai-fab,body:has(#sheet-root .sheet-backdrop) .ai-fab{display:none}
}

/* ---------- Material sales: cuttings, pads, seeds sold as-is ---------- */
.gx-mat{margin-top:14px;padding:12px 14px;border:1px dashed var(--line);border-radius:14px;background:var(--surface-2)}
.gx-mat-head{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.gx-mat-head .li-main{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1 1 220px}
.gx-mat-sum{display:flex;gap:6px 16px;flex-wrap:wrap;margin-top:10px}
.gx-mat-list{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:2px}
.gx-mat-row{display:flex;align-items:center;gap:10px;padding:6px 4px;border-top:1px solid var(--line)}
.gx-mat-row:first-child{border-top:0}
.gx-mat-row .li-main{min-width:0;flex:1}
.gx-mat-row .num{display:flex;flex-direction:column;align-items:flex-end;white-space:nowrap}
.gx-mat-ico{font-size:1.25rem;width:28px;text-align:center}
.pp-sales .gx-mat-list{padding:0 14px 10px}
.gx-mat-chips{display:flex;flex-wrap:wrap;gap:6px}
.gx-mat-qty{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.gx-stepper{display:flex;gap:6px;align-items:center}
.gx-stepper .input{text-align:center;min-width:0}
.gx-mat-units{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.gx-mat-quote .gx-det{margin-top:8px}
.gx-mat-lines{list-style:none;margin:6px 0;padding:0}
.gx-mat-lines li{display:flex;justify-content:space-between;gap:10px;padding:3px 0;border-bottom:1px dotted var(--line);font-size:.86rem}
.pp-unit.s-sold{background:var(--sand-soft, #f5ecd9);border-color:transparent}
.gx-srow-mat .avatar{outline:2px dashed var(--line);outline-offset:-2px}
@media (max-width:520px){.gx-mat-qty{grid-template-columns:1fr}}
.gx-mat-row .li-title{white-space:normal;overflow:visible;text-overflow:clip}
.gx-mat-packsec .q-title{display:flex;align-items:center;gap:6px}
.gx-mat-pack{display:flex;flex-direction:column;gap:4px}
.gx-mat-opt{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:10px;border:1px solid var(--line);opacity:.7}
.gx-mat-opt.on{opacity:1;background:var(--surface-2)}
.gx-mat-opt .li-main{display:flex;flex-direction:column;min-width:0;flex:1}
.gx-mat-opt-ico{width:24px;text-align:center}
.gx-stepper.sm{gap:4px}.gx-mat-n{min-width:22px;text-align:center}
.gx-mat-extras{display:flex;flex-direction:column;gap:6px;margin-top:6px}
.gx-mat-x{display:grid;grid-template-columns:auto 1fr 110px auto;gap:6px;align-items:center}
.gx-mat-x-tag{font-size:.75rem;font-weight:650;padding:3px 8px;border-radius:999px;white-space:nowrap;background:var(--danger-soft)}
.gx-mat-x-tag.charge{background:var(--ok-soft)}
.gx-mat-add{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
@media (max-width:520px){.gx-mat-x{grid-template-columns:1fr 100px auto}.gx-mat-x-tag{grid-column:1/-1;justify-self:start}}

/* ---------- Selling profiles & section presets */
.gx-prof-card{margin-bottom:18px}
.gx-sps{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px}
.gx-sp{display:flex;flex-direction:column;gap:8px;text-align:left;font:inherit;color:inherit;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:12px 14px;cursor:pointer;transition:border-color .15s,box-shadow .15s,transform .15s}
.gx-sp:hover{border-color:var(--brand);box-shadow:0 6px 18px rgba(0,0,0,.06);transform:translateY(-1px)}
.gx-sp.off{opacity:.6}
.gx-sp-head{display:flex;align-items:center;gap:10px}
.gx-sp-head .li-main{display:flex;flex-direction:column;min-width:0}
.gx-sp-ico{width:38px;height:38px;flex:none;border-radius:12px;background:var(--brand-soft,rgba(46,125,50,.1));display:grid;place-items:center;font-size:1.25rem}
.gx-sp-cost{margin-left:auto;font-weight:750;font-size:.82rem;white-space:nowrap;background:var(--surface-2,rgba(0,0,0,.04));border-radius:999px;padding:3px 9px}
.gx-sp-secs{list-style:none;margin:0;padding:8px 0 0;border-top:1px dashed var(--line);display:grid;gap:3px}
.gx-sp-secs li{display:flex;justify-content:space-between;gap:10px;font-size:.8rem;color:var(--text-2)}
.gx-sp-secs li b{font-weight:650;color:var(--text);text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gx-cost-cat-h{display:flex;align-items:center;gap:6px}
.gx-cost-cat-h .btn{text-transform:none;letter-spacing:0;font-size:.78rem}
.gx-cost-empty{padding:8px 2px}
.gx-cps{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:8px}
.gx-cps-k{text-transform:uppercase;letter-spacing:.06em;font-weight:700;margin-right:2px}
.gx-cp{font:inherit;font-size:.8rem;font-weight:650;border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:999px;padding:5px 11px;cursor:pointer;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gx-cp:hover{border-color:var(--brand)}
.gx-cp.add{border-style:dashed;color:var(--brand)}
.gx-cp[disabled]{opacity:.5;cursor:not-allowed}
.gx-sp-sec .gx-chans{flex-wrap:wrap}
.gx-sp-what{margin-top:6px}
.gx-via-profiles{flex-wrap:wrap}
.gx-via-p{font-weight:650}
.gx-via-more{margin-top:6px}
.gx-via-more summary{cursor:pointer;color:var(--text-3)}
.gx-via-more .gx-channels{margin-top:6px}
.gx-sub-title{margin:16px 0 8px}
@media (max-width:640px){.gx-sps{grid-template-columns:1fr}.gx-cp .tiny{display:none}}
.gx-sp-head .li-main{flex:1}
#gx-sp-form .gx-chans{flex-wrap:wrap;overflow:visible}

/* ---------- Season profiles */
.sp-card-wrap{margin-top:18px}
.sp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px}
.sp-card{display:flex;flex-direction:column;gap:8px;text-align:left;font:inherit;color:inherit;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:12px 14px;cursor:pointer;transition:border-color .15s,box-shadow .15s,transform .15s}
.sp-card:hover{border-color:var(--brand);box-shadow:0 6px 18px rgba(0,0,0,.06);transform:translateY(-1px)}
.sp-card.off{opacity:.6}
.sp-top{display:flex;align-items:center;gap:10px}
.sp-top .li-main{flex:1;display:flex;flex-direction:column;min-width:0}
.sp-ico{width:38px;height:38px;flex:none;border-radius:12px;background:var(--water-soft);display:grid;place-items:center;font-size:1.25rem}
.sp-strip{display:grid;grid-template-columns:repeat(12,1fr);gap:3px}
.sp-strip i{font-style:normal;font-size:.62rem;font-weight:700;text-align:center;padding:3px 0;border-radius:5px;background:var(--surface-2,rgba(0,0,0,.04));color:var(--text-3);position:relative}
.sp-strip i.on{background:var(--water-soft);color:var(--water)}
.sp-strip i.now{box-shadow:inset 0 0 0 1.5px var(--brand)}
.sp-to{color:var(--text-2);line-height:1.5}
.sp-av{display:grid;place-items:center;font-size:1.4rem;background:var(--water-soft)}
.sp-icons{display:flex;flex-wrap:wrap;gap:6px}
.sp-icon{width:40px;height:40px;border-radius:12px;border:1.5px solid var(--line);background:var(--surface);font-size:1.2rem;cursor:pointer}
.sp-icon[aria-pressed="true"]{border-color:var(--brand);background:var(--brand-soft)}
.sp-sub{font-size:.8rem;font-weight:700;color:var(--text-2);margin:12px 0 6px}
.sp-tags{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:6px}
.sp-tag{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:999px;padding:4px 6px 4px 11px;font-size:.8rem;font-weight:600;background:var(--surface)}
.sp-tag button{border:0;background:var(--surface-2,rgba(0,0,0,.05));border-radius:50%;width:20px;height:20px;cursor:pointer;font-size:.7rem;color:var(--text-2)}
.sp-add{display:flex;gap:8px}
.sp-add .input{flex:1;min-width:0}
.sp-groups{display:flex;flex-wrap:wrap;gap:6px}
.sp-follow{line-height:1.8;max-height:220px;overflow:auto}
.sp-plant-row{margin-top:6px;align-items:center}
.sp-plant-row .linkish{font:inherit;font-weight:650;background:none;border:0;padding:0;color:var(--brand);cursor:pointer;text-align:right}
@media (max-width:640px){.sp-grid{grid-template-columns:1fr}}
.sp-state{display:flex;align-items:center;gap:6px}
#sp-pick{flex-direction:column;flex-wrap:nowrap}
#sp-pick .choice{display:flex;width:100%;min-height:52px;padding:6px 14px 6px 12px;text-align:left}
#sp-pick .so-text{display:flex;flex-direction:column;min-width:0}
#sp-pick .so-text small{font-weight:500;color:var(--text-3)}

/* ---------- Grower redesign: header, tabs, hero, to-dos, pipeline */
:is(.gx-todo-row,.gx-stage,.gx-flowbar i,.gx-stack i,.gx-plan-legend i).t-ok{--t:var(--ok);--ts:var(--ok-soft)}
:is(.gx-todo-row,.gx-stage,.gx-flowbar i,.gx-stack i,.gx-plan-legend i).t-warn{--t:var(--warn);--ts:var(--warn-soft)}
:is(.gx-todo-row,.gx-stage,.gx-flowbar i,.gx-stack i,.gx-plan-legend i).t-danger{--t:var(--danger);--ts:var(--danger-soft)}
:is(.gx-todo-row,.gx-stage,.gx-flowbar i,.gx-stack i,.gx-plan-legend i).t-water{--t:var(--water);--ts:var(--water-soft)}
:is(.gx-todo-row,.gx-stage,.gx-flowbar i,.gx-stack i,.gx-plan-legend i).t-violet{--t:var(--violet);--ts:var(--violet-soft)}
:is(.gx-todo-row,.gx-stage,.gx-flowbar i,.gx-stack i,.gx-plan-legend i).t-sand{--t:var(--sand);--ts:var(--sand-soft)}
:is(.gx-todo-row,.gx-stage,.gx-flowbar i,.gx-stack i,.gx-plan-legend i).t-brand{--t:var(--brand-2);--ts:var(--brand-soft)}

.gx-head{align-items:flex-end;margin-bottom:10px}
.gx-head .li-main{min-width:0}
.gx-head-actions{display:flex;gap:8px;flex-wrap:wrap}
.gx-tabs{display:flex;gap:2px;padding:0;margin:0 0 22px;background:none;border:0;border-bottom:1px solid var(--line);border-radius:0;overflow-x:auto;scrollbar-width:none;max-width:100%}
.gx-tabs::-webkit-scrollbar{display:none}
.gx-tabs a,.gx-tabs .gx-tab{position:relative;flex:none;display:inline-flex;align-items:center;gap:7px;padding:10px 14px 12px;border-radius:10px 10px 0 0;font-weight:650;font-size:.92rem;color:var(--text-2);white-space:nowrap;background:none;transition:color .15s,background .15s}
.gx-tabs a:hover{color:var(--text);background:color-mix(in srgb,var(--text) 4%,transparent)}
.gx-tabs a[aria-current="page"]{color:var(--brand);background:none}
.gx-tabs a[aria-current="page"]::after{content:"";position:absolute;left:10px;right:10px;bottom:-1px;height:3px;border-radius:3px 3px 0 0;background:var(--brand)}

.gx-top{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:18px;margin-bottom:18px;align-items:stretch}
.gx-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);overflow:hidden;padding:0}
.gx-hero-main{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:22px 24px;color:#fff;background:radial-gradient(120% 90% at 100% 0%,rgba(255,255,255,.14),transparent 60%),linear-gradient(150deg,#1f5f45,#2e7d5b 70%,#3b8f68);overflow:hidden}
.gx-hero-main::after{content:"🌵";position:absolute;right:-10px;bottom:-22px;font-size:7rem;opacity:.12;transform:rotate(-12deg);pointer-events:none}
.gx-hero-k{font-size:.74rem;font-weight:750;letter-spacing:.08em;text-transform:uppercase;opacity:.8}
.gx-hero-num{font-size:2.5rem;font-weight:820;line-height:1.05;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.gx-hero-sub{font-size:.88rem;opacity:.92}
.gx-delta{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:99px;background:rgba(255,255,255,.16);font-size:.8rem;font-weight:700}
.gx-delta span{font-weight:500;opacity:.85}
.gx-delta.down{background:rgba(255,120,100,.25)}
.gx-hero-link{margin-top:auto;padding-top:10px;font-weight:650;font-size:.88rem;opacity:.9;position:relative;z-index:1}
.gx-hero-link:hover{opacity:1;text-decoration:underline}
.gx-hero-stats{display:grid;grid-template-columns:1fr 1fr}
.gx-hstat{display:flex;flex-direction:column;justify-content:center;gap:2px;padding:16px 18px;border:0;background:none;text-align:left;min-width:0;color:inherit;font:inherit}
button.gx-hstat{cursor:pointer;transition:background .15s}
button.gx-hstat:hover{background:var(--surface-2)}
.gx-hstat:nth-child(n+3){border-top:1px solid var(--line-2)}
.gx-hstat:nth-child(even){border-left:1px solid var(--line-2)}
.gx-hstat-l{font-size:.78rem;font-weight:650;color:var(--text-2)}
.gx-hstat b{font-size:1.4rem;font-weight:790;font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.gx-hstat .tiny{color:var(--text-3)}

.gx-todo{display:flex;flex-direction:column}
.gx-todo-list{list-style:none;margin:0;padding:6px 10px 10px}
.gx-todo-row{display:flex;align-items:center;gap:12px;padding:10px}
.gx-todo-row+.gx-todo-row{border-top:1px solid var(--line-2)}
.gx-todo-ico{width:36px;height:36px;flex:none;border-radius:11px;display:grid;place-items:center;background:var(--ts)}
.gx-todo-row .li-main{display:flex;flex-direction:column;min-width:0;flex:1}
.gx-todo-row b{font-size:.9rem;font-weight:680}
.gx-todo-row .tiny{color:var(--text-3);line-height:1.35}
.gx-todo-row .btn{flex:none}
.gx-clear{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:4px;padding:22px}
.gx-clear>span:first-child{font-size:2rem}

.gx-flow{margin-bottom:18px}
.gx-stages{display:flex;align-items:stretch;gap:6px;padding:16px 20px 14px}
.gx-stage{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:1px;padding:12px 14px;border-radius:14px;border:1.5px solid transparent;background:var(--ts);color:inherit;font:inherit;text-align:left;cursor:pointer;transition:transform .12s,box-shadow .15s,border-color .15s}
.gx-stage:hover{transform:translateY(-2px);box-shadow:var(--shadow-sm)}
.gx-stage[aria-pressed="true"]{border-color:var(--t);box-shadow:0 0 0 3px color-mix(in srgb,var(--t) 18%,transparent)}
.gx-stage b{font-size:1.65rem;font-weight:800;line-height:1.1;color:var(--t);font-variant-numeric:tabular-nums}
.gx-stage-l{font-weight:650;font-size:.84rem}
.gx-arrow{align-self:center;color:var(--text-3);font-size:1.3rem;font-weight:300}
.gx-flowbar{display:flex;gap:3px;height:8px;margin:0 20px;border-radius:99px;overflow:hidden;background:var(--line-2)}
.gx-flowbar i,.gx-stack i[class*="t-"]{display:block;background:var(--t)}
.gx-flow-foot{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:12px 20px 16px}

.gx-coming .gx-bar{width:100%;border:0;background:none;color:inherit;font:inherit;text-align:left;padding:4px 6px;margin:4px -6px;border-radius:8px;cursor:pointer;width:calc(100% + 12px)}
.gx-coming .gx-bar:hover{background:var(--surface-2)}
.gx-plan-legend{display:flex;flex-wrap:wrap;gap:4px 14px;padding:12px 20px 2px;color:var(--text-2)}
.gx-plan-legend i{display:inline-block;width:10px;height:10px;border-radius:3px;background:var(--t);margin-right:6px;vertical-align:-1px}
.gx-plan-name{font-style:italic;font-size:.98rem}
.gx-plan-rev{display:flex;align-items:baseline;gap:5px;font-variant-numeric:tabular-nums}
.gx-plan-rev b{font-style:normal}
.gx-plan-adv{display:flex;flex-wrap:wrap;gap:6px}
.gx-plan-adv .gx-advice{font-size:.76rem;padding:3px 10px;border-radius:10px;line-height:1.5}

.gx-search:has(>span){position:relative;display:flex;align-items:center}
.gx-search>span{position:absolute;left:11px;font-size:.8rem;opacity:.6;pointer-events:none}
.gx-search:has(>span) input{padding-left:32px;width:260px}

.gx-quick-q input{width:100%;height:44px;font-size:1rem}
.gx-quick-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.gx-quick-row{width:100%;display:flex;align-items:center;gap:10px;padding:8px 12px;border:1.5px solid var(--line);border-radius:12px;background:var(--surface);color:inherit;font:inherit;text-align:left;cursor:pointer;transition:border-color .15s,background .15s}
.gx-quick-row:hover{border-color:color-mix(in srgb,var(--brand) 45%,var(--line))}
.gx-quick-row[aria-pressed="true"]{border-color:var(--brand);background:var(--brand-soft)}
.gx-quick-tick{width:20px;height:20px;flex:none;border-radius:6px;border:1.5px solid var(--line);display:grid;place-items:center;font-size:.7rem;color:transparent}
.gx-quick-tick:empty{display:none}
.gx-quick-row[aria-pressed="true"] .gx-quick-tick{background:var(--brand);border-color:var(--brand);color:#fff}
.gx-quick-row .li-main{display:flex;flex-direction:column;min-width:0;flex:1}
.gx-quick-row .li-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:650}
.gx-quick-row .num{min-width:44px;text-align:right}

@media (max-width:1020px){
  .gx-top{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:720px){
  .gx-head{margin-bottom:6px}
  .gx-head-actions{width:100%}
  .gx-head-actions .btn{flex:1;justify-content:center}
  .gx-tabs{margin:0 -14px 16px;padding:0 8px}
  .gx-tabs a,.gx-tabs .gx-tab{flex:none;padding:10px 11px 12px;font-size:.86rem}
  .gx-hero{grid-template-columns:minmax(0,1fr)}
  .gx-hero-main{padding:18px 18px 16px}
  .gx-hero-num{font-size:2.1rem}
  .gx-hstat{padding:12px 14px}
  .gx-hstat b{font-size:1.15rem}
  .gx-stages{overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;padding:14px}
  .gx-stages::-webkit-scrollbar{display:none}
  .gx-stage{flex:0 0 104px;scroll-snap-align:start;padding:10px 12px}
  .gx-stage b{font-size:1.35rem}
  .gx-arrow{display:none}
  .gx-flowbar{margin:0 14px}
  .gx-flow-foot{padding:12px 14px 14px}
  .gx-flow .card-head .small{display:none}
  .gx-plan-legend{padding:10px 14px 0}
  .gx-search:has(>span){flex-basis:100%;order:3}
  .gx-search:has(>span) input{width:100%}
  .gx-quick-row .pill{display:none}
}
:is(.gx-flowbar,.gx-stack,.gx-plan-legend) i.t-brand{background:color-mix(in srgb,var(--brand-2) 38%,var(--line))}
.gx-jump{position:sticky;top:var(--topbar-h,65px);z-index:6;display:flex;gap:6px;margin:-8px 0 18px;padding:8px 0;overflow-x:auto;scrollbar-width:none;background:color-mix(in srgb,var(--bg) 90%,transparent);backdrop-filter:blur(10px)}
.gx-jump::-webkit-scrollbar{display:none}
.gx-jump a{flex:none;display:inline-flex;gap:6px;align-items:center;padding:7px 13px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font-weight:650;font-size:.84rem;color:var(--text-2);transition:border-color .15s,color .15s}
.gx-jump a:hover{border-color:var(--brand);color:var(--brand)}
#gx-global,#gx-profiles,#gx-costs,#gx-strats,#gx-specific{scroll-margin-top:130px}
.gx-log-batch details summary{list-style:none;display:flex;align-items:center;gap:10px;cursor:pointer}
.gx-log-batch details summary::-webkit-details-marker{display:none}
.gx-batch-more{color:var(--brand);font-weight:650}
.gx-log-batch details[open] .gx-batch-more{visibility:hidden}
.gx-batch-items{margin:4px 0 8px;padding-left:4px;border-left:2px solid var(--line-2);max-height:420px;overflow:auto}
@media (max-width:720px){
  .gx-tabs{-webkit-mask-image:linear-gradient(to right,#000 86%,transparent);mask-image:linear-gradient(to right,#000 86%,transparent)}
  .gx-coming .card-head .small{display:none}
  .gx-jump{margin:-4px -14px 14px;padding:8px 14px}
}
@media (max-width:720px){
  .gx-hier{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;padding:12px}
  .gx-hier-step{padding:8px 4px;align-items:center;text-align:center;gap:0}
  .gx-hier-step b{font-size:.74rem}
  .gx-hier-step .tiny{display:none}
  .gx-hier-step .pill{margin-top:2px}
  .gx-hier-note{grid-column:1/-1}
}
.gx-log-more{display:block;width:100%;margin-top:6px}

/* ---------- Plant page redesign */
.plant-hero .hero-body{gap:14px}
.plant-hero .eyebrow .code{font-size:.72rem}
.ph-title h1{font-size:2.15rem;letter-spacing:-.02em}
.ph-title .sci{margin-top:2px}
.ph-notes{margin:0;padding:10px 14px;border-radius:12px;background:var(--surface-2);color:var(--text-2);font-size:.9rem;border-left:3px solid var(--line)}
.ph-facts{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin:0}
.ph-fact{display:flex;flex-direction:column;gap:1px;min-width:0;padding:8px 12px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line-2);font:inherit;color:inherit;text-align:left}
.ph-fact dt{font-size:.7rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--text-3);white-space:nowrap}
.ph-fact dd{margin:0;font-size:.9rem;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ph-fact.is-link{cursor:pointer;transition:border-color .15s,background .15s}
.ph-fact.is-link:hover{border-color:var(--brand);background:var(--brand-soft)}
.ph-fact.is-link dd{color:var(--brand)}
.ph-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:auto;padding-top:4px}
.ph-main,.ph-ai{display:flex;flex-wrap:wrap;gap:8px}
.ph-ai{margin-left:auto}
.ph-main .btn{gap:7px}
.ph-i{font-size:1rem;line-height:1}

.plant-stats{grid-template-columns:1.35fr 1fr 1fr 1fr}
.plant-stats .stat{font:inherit;color:inherit;text-align:left;width:100%;border:1px solid var(--line)}
.plant-stats .stat-link:hover{transform:translateY(-2px);box-shadow:var(--shadow)}
.plant-stats .stat>div:last-child{min-width:0}
.plant-stats .stat-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.ptabs-id{display:none;align-items:center;gap:8px;flex:none;max-width:220px;padding:0 12px 0 6px;margin-right:4px;border-right:1px solid var(--line-2)}
.ptabs-id b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.88rem}
.ptabs-id .avatar.sm{width:28px;height:28px;border-radius:8px}
.ptabs-water{display:none;flex:none;width:38px;height:38px;border:0;border-radius:10px;background:var(--water-soft);cursor:pointer;margin-left:4px}
.ptabs-water:hover{box-shadow:inset 0 0 0 1.5px var(--water)}
.ptabs.stuck{box-shadow:var(--shadow)}
@media (min-width:1021px){
  .ptabs.stuck .ptabs-id{display:inline-flex}
  .ptabs.stuck .ptabs-water{display:inline-block}
}

.kv-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px;margin:0}
.kv-grid>div{padding:10px 14px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line-2);min-width:0}
.kv-grid dt{font-size:.72rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--text-3)}
.kv-grid dd{margin:2px 0 0;font-weight:650;word-break:break-word}
.kv-grid .empty dd{color:var(--text-3);font-weight:500}
[data-pane="details"].pane-narrow{max-width:none}

@media (max-width:1020px){
  .plant-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ph-ai{margin-left:0}
}
@media (max-width:720px){
  .ph-title h1{font-size:1.6rem}
  .ph-facts{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .ph-fact{padding:7px 10px}
  .ph-fact dd{font-size:.85rem}
  .plant-hero .ph-actions{display:flex;flex-direction:column;align-items:stretch;gap:8px}
  .ph-main{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
  .plant-hero .ph-main>.btn{flex-direction:column;height:auto;min-height:62px;padding:8px 4px;gap:4px;font-size:.72rem;line-height:1.15;text-align:center;justify-content:center;white-space:normal;width:auto;grid-column:auto}
  .ph-main .ph-i{font-size:1.2rem}
  .ph-ai{display:grid;grid-template-columns:1fr 1fr;gap:6px}
  .ph-ai .btn{justify-content:center}
  .plant-stats .stat{flex-direction:column;align-items:flex-start}
  .plant-stats .stat-value{font-size:1rem}
  .kv-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .kv-grid>div{padding:8px 10px}
}
.ptabs .ptabs-water{display:none;flex:none;padding:0;justify-content:center}
@media (min-width:1021px){.ptabs.stuck .ptabs-water{display:inline-flex}}
@media (max-width:720px){
  .plant-stats .stat{flex-direction:row;align-items:center;padding:12px 10px;gap:8px;min-height:84px}
  .plant-stats .ring{transform:scale(.6);margin:-15px -13px;flex:none}
  .plant-stats .stat-icon{width:34px;height:34px}
  .plant-stats .stat-sub{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
}
.sp-plant-row{align-items:flex-start}
.sp-plant-row .linkish{display:flex;flex-direction:column;align-items:flex-end;text-align:right;max-width:70%;text-decoration:none}
.sp-plant-row .sp-pl-name{text-decoration:underline;text-underline-offset:2px}
.plant-layout.is-archived{grid-template-columns:minmax(0,380px) minmax(0,1fr)}
.plant-layout.is-archived .side-col{grid-column:1;grid-row:1}
.plant-layout.is-archived .main-col{grid-column:2;grid-row:1}
@media (max-width:900px){.plant-layout.is-archived{grid-template-columns:minmax(0,1fr)}.plant-layout.is-archived .main-col{grid-column:1;grid-row:2}}

/* ---------- Ask CactusOS: interactive action cards ---------- */
@media (min-width:721px){.ai-chat{width:min(470px,calc(100vw - 32px));height:min(720px,calc(100vh - 110px))}}
.chat-quick{display:flex;flex-wrap:wrap;gap:6px}
.chat-quick .chip-filter{border-color:color-mix(in srgb,var(--ai-1) 40%,var(--line));color:var(--text);font-weight:600}
.chat-quick .chip-filter:hover{background:color-mix(in srgb,var(--ai-1) 10%,var(--surface))}
.acard{border:1.5px solid color-mix(in srgb,var(--ai-1) 35%,var(--line));border-radius:16px;background:var(--surface);padding:12px;display:flex;flex-direction:column;gap:10px;box-shadow:0 1px 0 rgba(0,0,0,.02)}
.acard.done{border-color:color-mix(in srgb,var(--ok) 50%,var(--line));background:color-mix(in srgb,var(--ok) 5%,var(--surface))}
.acard.cancelled,.acard.undone{opacity:.7;border-style:dashed}
.acard.blocked{border-color:color-mix(in srgb,var(--warn) 50%,var(--line))}
.ac-head{display:flex;align-items:flex-start;gap:10px}
.ac-icon{width:34px;height:34px;flex:none;border-radius:10px;display:grid;place-items:center;font-size:1.1rem;background:color-mix(in srgb,var(--ai-1) 12%,var(--surface-2))}
.ac-title{font-weight:700;line-height:1.25}
.ac-sub{font-size:.8rem;color:var(--muted);margin-top:2px}
.ac-sub a{color:var(--brand);font-weight:600;text-decoration:none}
.ac-count{font-size:.72rem;font-weight:700;color:var(--muted);background:var(--surface-2);border-radius:99px;padding:2px 8px;flex:none}
.ac-steps{display:flex;gap:4px}
.ac-steps i{flex:1;height:3px;border-radius:3px;background:var(--line)}
.ac-steps i.on{background:color-mix(in srgb,var(--ai-1) 55%,var(--line))}
.ac-steps i.cur{background:var(--ai-1)}
.ac-facts{margin:0;padding:0 0 0 2px;list-style:none;font-size:.82rem;color:var(--muted);display:flex;flex-direction:column;gap:2px}
.ac-facts li::before{content:"• ";color:var(--text-3)}
.ac-step-t{font-weight:700;font-size:.9rem}
.ac-fields{display:flex;flex-direction:column;gap:12px}
.ac-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.ac-label{font-size:.78rem;font-weight:600;color:var(--muted)}
.ac-label.row{display:flex;align-items:center}
.ac-hint{font-size:.76rem;color:var(--text-3);line-height:1.35}
.ac-field input[type=text],.ac-field input[type=search],.ac-field input[type=date],.ac-field input[type=number],.ac-field select,.ac-field textarea{width:100%;min-width:0;border:1.5px solid var(--line);border-radius:10px;padding:8px 10px;background:var(--surface-2);color:var(--text);font:inherit;font-size:.9rem}
.ac-field :is(input,select,textarea):focus{outline:0;border-color:color-mix(in srgb,var(--ai-1) 60%,var(--line))}
.ac-chips{display:flex;flex-wrap:wrap;gap:6px}
.ac-chip{display:inline-flex;align-items:center;gap:6px;border:1.5px solid var(--line);background:var(--surface);color:var(--text);border-radius:99px;padding:6px 12px;font:inherit;font-size:.85rem;font-weight:600;cursor:pointer;min-height:36px}
.ac-chip:hover:not(:disabled){border-color:color-mix(in srgb,var(--ai-1) 50%,var(--line))}
.ac-chip[aria-checked=true]{background:color-mix(in srgb,var(--ai-1) 14%,var(--surface));border-color:var(--ai-1);color:var(--text)}
.ac-chip:disabled{opacity:.45;cursor:not-allowed;text-decoration:line-through}
.ac-money{display:flex;align-items:center;border:1.5px solid var(--line);border-radius:10px;background:var(--surface-2);padding-left:10px}
.ac-money span{color:var(--muted);font-weight:600}
.ac-money input{border:0!important;background:transparent!important}
.ac-money:focus-within{border-color:color-mix(in srgb,var(--ai-1) 60%,var(--line))}
.ac-stepper{display:flex;align-items:center;gap:6px}
.ac-stepper input{text-align:center;max-width:110px}
.ac-stepper .btn-icon{width:36px;height:36px}
.ac-toggle{display:flex;align-items:center;gap:8px;font-size:.9rem;font-weight:600;cursor:pointer}
.ac-toggle input{width:18px;height:18px;accent-color:var(--ai-1)}
.ac-filter{width:100%;margin:2px 0 6px}
.ac-list{display:flex;flex-direction:column;gap:4px;max-height:280px;overflow-y:auto;padding-right:2px}
.ac-row{display:flex;align-items:flex-start;gap:10px;padding:8px 10px;border-radius:10px;border:1px solid var(--line-2);background:var(--surface-2);cursor:pointer}
.ac-row input{margin-top:3px;width:17px;height:17px;flex:none;accent-color:var(--ai-1)}
.ac-row .li-main{display:flex;flex-direction:column;min-width:0}
.ac-row-t{font-weight:600;font-size:.88rem;overflow-wrap:anywhere}
.ac-row-s{font-size:.75rem;color:var(--muted)}
.ac-row-h{font-size:.74rem;color:var(--water, #2b7bd6)}
.ac-row.t-danger{border-left:3px solid var(--danger)}
.ac-row.t-warn{border-left:3px solid var(--warn)}
.ac-row:has(input:not(:checked)){opacity:.6}
.ac-list.compact{display:grid;grid-template-columns:repeat(auto-fill,minmax(78px,1fr));max-height:none;overflow:visible}
.ac-list.compact .ac-row{padding:7px 8px;align-items:center;gap:6px}
.ac-list.compact .ac-row input{margin-top:0}
.ac-list.compact .ac-row-t{white-space:nowrap}
.ac-summary{font-size:.88rem}
.ac-lines{margin:0;display:flex;flex-direction:column;border:1px solid var(--line-2);border-radius:12px;overflow:hidden}
.ac-lines>div{display:flex;gap:10px;padding:7px 10px;font-size:.84rem;border-top:1px solid var(--line-2)}
.ac-lines>div:first-child{border-top:0}
.ac-lines dt{color:var(--muted);flex:0 0 38%;min-width:0;overflow-wrap:anywhere}
.ac-lines dd{margin:0;flex:1;min-width:0;text-align:right;font-weight:600;overflow-wrap:anywhere}
.ac-lines .muted{background:var(--surface-2)}
.ac-lines .muted dd{font-weight:500;color:var(--muted)}
.ac-lines .strong{background:color-mix(in srgb,var(--ai-1) 7%,var(--surface))}
.ac-lines .strong dd{font-weight:800}
.ac-lines .t-danger dd{color:var(--danger)}
.ac-warn{display:flex;flex-direction:column;gap:4px;font-size:.8rem;background:var(--warn-soft);border-radius:10px;padding:8px 10px}
.ac-error{font-size:.82rem;color:var(--danger);background:var(--danger-soft);border-radius:10px;padding:8px 10px}
.ac-blocked{font-size:.86rem;background:var(--warn-soft);border-radius:10px;padding:10px 12px}
.ac-done{font-weight:600;font-size:.9rem}
.ac-loading{display:flex;align-items:center;gap:8px;font-size:.85rem;color:var(--muted);padding:6px 0}
.ac-foot{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.ac-foot .spacer{flex:1}

/* ===================================================================
   Design pass v2: lists, toolbars, dashboard, bin, add, propagation
   =================================================================== */
/* toolbars under page heads */
.toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:-6px 0 18px}
.toolbar .select{width:auto;min-width:0}
.view-toggle button{font-size:1rem;line-height:1;padding:6px 10px}
.page-head .view-toggle{align-self:center}

/* plant cards: shorter media so more plants fit */
.pc-media{aspect-ratio:16/10}

/* plant list view */
.plant-list{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow-sm)}
.plant-row{display:grid;grid-template-columns:44px minmax(0,1.6fr) minmax(0,1.3fr) 110px auto;align-items:center;gap:14px;padding:10px 16px;border-top:1px solid var(--line-2);cursor:pointer;transition:background .12s}
.plant-row:first-child{border-top:0}
.plant-row:hover{background:var(--surface-2)}
.plant-row:focus-visible{outline:2px solid var(--brand);outline-offset:-2px}
.pr-main{min-width:0}
.pr-name{display:flex;align-items:center;gap:8px;min-width:0}
.pr-title{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pr-name .code{font-size:.7rem;padding:1px 6px}
.pr-sub{display:flex;align-items:center;gap:6px 10px;flex-wrap:wrap;margin-top:3px;font-size:.78rem;color:var(--text-3);min-width:0}
.pr-sub i{color:var(--text-2)}
.pr-sub>*{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.pr-status{display:flex;gap:6px;flex-wrap:wrap;align-items:center;min-width:0}
.pr-status .pill{height:24px;font-size:.74rem}
.pr-last{text-align:right;white-space:nowrap}
.pr-actions{display:flex;gap:6px}
.pr-actions .btn{width:36px;height:36px;padding:0;justify-content:center}

@media (max-width:1020px){
  .plant-row{grid-template-columns:44px minmax(0,1fr) auto auto}
  .pr-last{display:none}
}
@media (max-width:720px){
  .toolbar{flex-wrap:nowrap;overflow-x:auto;margin:-4px -14px 14px;padding:0 14px 2px;scrollbar-width:none}
  .toolbar::-webkit-scrollbar{display:none}
  .toolbar>*{flex:none}
  .toolbar .spacer{display:none}
  .page-head>.view-toggle{margin-left:0}
  .plant-list{margin:0 -14px;border-radius:0;border-left:0;border-right:0}
  .plant-row{grid-template-columns:44px minmax(0,1fr) auto;grid-template-areas:"av main act" "av status act";column-gap:12px;row-gap:5px;padding:10px 14px}
  .plant-row>.avatar{grid-area:av;align-self:center}
  .plant-row>.pr-main{grid-area:main}
  .plant-row>.pr-status{grid-area:status;flex-wrap:nowrap;overflow:hidden}
  .plant-row>.pr-actions{grid-area:act;align-self:center}
  .pr-status .pill{height:22px;font-size:.7rem;padding:0 7px}
  .pr-sub{flex-wrap:nowrap;overflow:hidden}
  .pr-actions .btn{width:40px;height:40px}
  .pr-actions .btn:not(.btn-water){display:none}
}
.toolbar .select{height:40px;padding-top:0;padding-bottom:0;font-size:.88rem;font-weight:600}
.toolbar .segmented{height:40px;align-items:stretch}
@media (max-width:720px){.toolbar .select{height:38px;width:max-content;max-width:70vw}.toolbar .segmented{height:38px}.toolbar .segmented button{padding:4px 10px}}
.toolbar #loc{flex:none}

/* dashboard v2 */
.kpi .li-main{min-width:0}
.kpi-sub{font-size:.74rem;color:var(--text-3);margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kpi-water .kpi-sub{color:var(--water);font-weight:650}
.kpi-warn .kpi-sub{color:var(--warn);font-weight:650}
.page-head .btn-water{align-self:center}
@media (max-width:720px){
  .kpi-sub{display:none}
  .group-strip{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding-inline:14px;margin:0 -14px 22px;padding:2px 14px 6px;gap:10px;scrollbar-width:none}
  .group-strip::-webkit-scrollbar{display:none}
  .group-strip>.group-row{flex:0 0 min(300px,82vw);scroll-snap-align:start;background:var(--surface);border:1px solid var(--line);border-radius:14px}
}
/* topbar on tablets: never overflow */
.search{min-width:0}
.search input{min-width:0;width:100%}
@media (min-width:721px) and (max-width:1100px){
  .topbar-inner{gap:10px}
  .brand>span:not(.brand-mark){display:none}
  .nav a{padding:8px 9px}
  .search kbd{display:none}
  .topbar .btn-primary .hide-sm{display:none}
  .topbar .btn-primary{width:40px;padding:0;justify-content:center}
}

/* bin v2: dense list grouped by month */
.bin-search{margin-left:0;max-width:300px;flex:1 1 220px;height:40px}
.bin-search input{border:0;background:transparent;outline:0;font:inherit;color:var(--text)}
.bin-month{display:flex;justify-content:space-between;align-items:baseline;margin:18px 4px 8px;font:700 .76rem var(--font);letter-spacing:.07em;text-transform:uppercase;color:var(--text-2)}
.bin-month:first-child{margin-top:0}
.bin-list{gap:0}
.bin-row{display:grid;grid-template-columns:44px minmax(0,1fr) auto auto;align-items:center;gap:14px;padding:10px 16px;border-top:1px solid var(--line-2);cursor:pointer;transition:background .12s}
.bin-row:first-child{border-top:0}
.bin-row:hover{background:var(--surface-2)}
.bin-row .avatar{filter:grayscale(.5)}
.bin-row .bin-meta{margin:0;flex-wrap:nowrap}
.bin-row .bin-note{font-size:.78rem;margin:0}
.bin-actions{display:flex;gap:6px;align-items:center}
.list-more{display:flex;justify-content:center;margin-top:14px}
@media (max-width:720px){
  .bin-search{flex:0 0 220px}
  .bin-row{grid-template-columns:44px minmax(0,1fr) auto;grid-template-areas:"av main act" "av meta act";column-gap:12px;row-gap:5px;padding:10px 14px}
  .bin-row>.avatar{grid-area:av}
  .bin-row>.pr-main{grid-area:main}
  .bin-row>.bin-meta{grid-area:meta}
  .bin-row>.bin-actions{grid-area:act}
  .bin-row .bin-meta .pill{height:22px;font-size:.7rem}
  .bin-row .bin-actions .btn{height:38px;min-width:38px}
}
.pr-title{flex:0 1 auto;min-width:0}
.pr-name .code{flex:0 1000 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* add plant v2: form + live preview */
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.add-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:24px;align-items:start}
.add-layout .add-form{max-width:none}
.add-aside{position:sticky;top:88px;display:flex;flex-direction:column;gap:10px}
.add-preview{overflow:hidden}
.ap-media{aspect-ratio:4/3;background:var(--surface-2)}
.ap-media img,.ap-media .placeholder{width:100%;height:100%;object-fit:cover}
.ap-body{padding:14px 16px 16px}
.ap-name{font-size:1.2rem;font-weight:750;margin-top:4px;overflow-wrap:anywhere}
.ap-sci{font-style:italic;color:var(--text-2);font-size:.9rem;min-height:1.2em}
.ap-facts{list-style:none;margin:12px 0 0;padding:12px 0 0;border-top:1px solid var(--line-2);display:flex;flex-direction:column;gap:8px;font-size:.86rem;color:var(--text-2)}
.ap-facts li{display:flex;gap:10px;align-items:flex-start}
.ap-facts li>span:first-child{width:20px;text-align:center;flex:none}
.ap-tip{margin:0 4px}
.label-like{font-size:.82rem;font-weight:650;color:var(--text-2)}
@media (max-width:1020px){.add-layout{grid-template-columns:1fr}.add-aside{display:none}}

/* propagation v2 */
@media (max-width:720px){
  .page-head>.btn-primary[data-action="pp-start"]{width:100%;justify-content:center}
  .pp-facts{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding-inline:14px;margin:14px -14px 0;padding:0 14px 4px;scrollbar-width:none}
  .pp-facts::-webkit-scrollbar{display:none}
  .pp-facts>.pp-fact{flex:0 0 44%;scroll-snap-align:start}
  .pp-hero-actions{flex-wrap:nowrap;overflow-x:auto;margin:12px -14px 0;padding:0 14px 4px;scrollbar-width:none;-webkit-mask-image:linear-gradient(to right,#000 88%,transparent);mask-image:linear-gradient(to right,#000 88%,transparent)}
  .pp-hero-actions::-webkit-scrollbar{display:none}
  .pp-hero-actions>*{flex:none}
}

/* groups v2: horizontal cards on phones */
.gc-media{aspect-ratio:16/10}
@media (max-width:720px){
  .grid:has(>.group-card){grid-template-columns:1fr}
  .group-card{display:grid;grid-template-columns:108px minmax(0,1fr);grid-template-rows:1fr auto}
  .group-card>.gc-media{grid-row:1/3;aspect-ratio:auto;min-height:100%}
  .group-card>.gc-media .pc-badges{left:6px;right:auto;top:auto;bottom:6px}
  .group-card>.pc-body{padding:10px 12px 0}
  .group-card>.pc-actions{padding:8px 12px 10px}
  .group-card .pc-actions .btn span.lbl{display:inline}
  .group-card .gc-avatars{display:none}
  .group-card .gc-env{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}

/* ---------- Change journal ---------- */
.tl-src{font-size:.8rem;opacity:.8}
.tl-changes{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:4px}
.tl-changes li{display:grid;grid-template-columns:minmax(80px,auto) 1fr 20px;align-items:center;gap:8px;background:var(--surface);border:1px solid var(--line-2);border-radius:10px;padding:6px 6px 6px 10px;font-size:.88rem}
.tl-changes .k{font-weight:600;color:var(--text-2)}
.tl-changes .fromto{min-width:0;overflow-wrap:anywhere}
.tl-changes .from{color:var(--text-3);text-decoration:line-through;text-decoration-color:color-mix(in srgb,var(--text-3) 50%,transparent)}
.tl-changes .arrow{color:var(--violet,var(--brand))}
.tl-changes .to{color:var(--text)}
.tl-changes li:hover .tl-del{opacity:1}

.chg-panel{margin-top:12px;background:var(--surface-2);border:1px solid var(--line);border-radius:14px;padding:12px;animation:chg-in .18s ease}
@keyframes chg-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.chg-head{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.chg-head .small{margin-left:auto}
.chg-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.chg-f{display:flex;flex-direction:column;gap:4px;font-size:.8rem;font-weight:600;color:var(--text-2);min-width:0}
.chg-f.wide{grid-column:1/-1}
.chg-f .input{width:100%;min-width:0}
.chg-f .input-unit{position:relative}
.chg-f .input-unit span{position:absolute;right:12px;top:50%;transform:translateY(-50%);color:var(--text-3);font-weight:500;pointer-events:none}
.chg-now{margin-top:8px}
.chg-leave{display:flex;align-items:center;gap:8px;margin-top:10px;font-size:.88rem;cursor:pointer}
.chg-leave input{width:18px;height:18px;accent-color:var(--brand)}
@media (max-width:340px){.chg-grid{grid-template-columns:1fr}}

.chg-card{display:flex;flex-direction:column;gap:10px}
.chg-facts{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.chg-facts>div{display:flex;flex-direction:column;gap:2px;background:var(--surface-2);border:1px solid var(--line-2);border-radius:12px;padding:8px 10px;min-width:0}
.chg-facts b{font-size:.9rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chg-insight{display:flex;gap:8px;align-items:flex-start;font-size:.86rem;line-height:1.4;background:var(--brand-soft);border-radius:12px;padding:8px 10px}
.chg-insight.is-watch{background:var(--warn-soft);color:var(--text)}
.chg-sub{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3);margin-top:4px}
.chg-impact{display:flex;flex-direction:column;gap:2px;font-size:.86rem;border-left:3px solid var(--violet-soft,var(--line));padding-left:10px}
.chg-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.chg-list li{display:grid;grid-template-columns:54px 1fr;gap:8px;font-size:.86rem;align-items:baseline}
.chg-all{align-self:flex-start;padding-left:0}
.sec-changes .card-head .btn{white-space:nowrap}

/* ---------- Propagation v3: scout hero, next actions, journey cards, pipeline ---------- */
.pp-eyebrow{font-size:.72rem;font-weight:750;letter-spacing:.08em;text-transform:uppercase;color:var(--brand-2)}
.pp-scout-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:22px;padding:20px 22px;margin-bottom:16px;
  background:linear-gradient(135deg,color-mix(in srgb,var(--brand-soft) 70%,var(--surface)) 0%,var(--surface) 60%);border-color:color-mix(in srgb,var(--brand-2) 18%,var(--line))}
.pp-scout-hero.is-need{background:linear-gradient(135deg,color-mix(in srgb,var(--warn-soft) 80%,var(--surface)) 0%,var(--surface) 60%);border-color:color-mix(in srgb,var(--warn) 22%,var(--line))}
.pp-scout-hero.is-need .pp-eyebrow{color:var(--warn)}
.pp-sh-main{min-width:0;display:flex;flex-direction:column}
.pp-sh-title{font-size:1.55rem;line-height:1.2;margin:6px 0 4px;letter-spacing:-.01em}
.pp-sh-sub{color:var(--text-2);font-size:.9rem;margin-bottom:14px}
.pp-hbar{display:flex;gap:3px;height:10px;border-radius:999px;overflow:hidden;background:var(--line-2)}
.pp-hbar i{min-width:6px;transition:flex .3s}
.pp-hbar .t-on_track,.pp-lg.t-on_track i,.pp-hdot.t-on_track{background:var(--ok)}
.pp-hbar .t-attention,.pp-lg.t-attention i,.pp-hdot.t-attention{background:#e0a100}
.pp-hbar .t-waiting,.pp-lg.t-waiting i,.pp-hdot.t-waiting{background:#c9c3b6}
.pp-lg.t-failed i,.pp-hdot.t-failed{background:var(--danger)}
.pp-hdot.t-done{background:var(--brand)}
.pp-legend{display:flex;flex-wrap:wrap;gap:2px 12px;margin-top:10px}
.pp-lg{display:inline-flex;align-items:center;gap:6px;border:0;background:none;padding:3px 0;font:inherit;font-size:.84rem;color:var(--text-2);cursor:pointer;border-radius:6px}
.pp-lg i{width:10px;height:10px;border-radius:3px;display:inline-block}
.pp-lg b{color:var(--text);font-variant-numeric:tabular-nums}
.pp-lg:hover:not(:disabled){color:var(--text);text-decoration:underline;text-underline-offset:3px}
.pp-lg:disabled{opacity:.45;cursor:default}
.pp-signals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-content:center}
.pp-sig{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:10px;align-items:center;text-align:left;
  background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:10px 12px;font:inherit;color:var(--text);cursor:pointer;min-width:0;transition:border-color .15s,box-shadow .15s,transform .15s}
.pp-sig:hover:not(:disabled){box-shadow:var(--shadow);transform:translateY(-1px)}
.pp-sig-ico{grid-row:1/3;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:var(--surface-2);font-size:1.05rem}
.pp-sig b{font-size:1.25rem;line-height:1.1;font-variant-numeric:tabular-nums}
.pp-sig-lbl{font-size:.76rem;color:var(--text-2);line-height:1.25;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.pp-sig.t-warn{border-color:color-mix(in srgb,var(--warn) 35%,var(--line))}.pp-sig.t-warn .pp-sig-ico{background:var(--warn-soft)}.pp-sig.t-warn b{color:var(--warn)}
.pp-sig.t-danger{border-color:color-mix(in srgb,var(--danger) 35%,var(--line))}.pp-sig.t-danger .pp-sig-ico{background:var(--danger-soft)}.pp-sig.t-danger b{color:var(--danger)}
.pp-sig.t-n .pp-sig-ico{background:var(--line-2)}
.pp-sig.zero{opacity:.55;cursor:default;background:transparent}
.pp-sig.zero b{color:var(--text-3)}

.pp-top{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}
.pp-top .card-body{padding:6px 14px 12px}
.pp-next2,.pp-attn{list-style:none;margin:0;padding:0}
.pp-next2.collapsed .is-more,.pp-attn.collapsed .is-more{display:none}
.pp-grp{display:flex;align-items:center;gap:8px;font-size:.72rem;font-weight:750;letter-spacing:.06em;text-transform:uppercase;color:var(--text-3);padding:12px 6px 4px}
.pp-grp b{font-size:.7rem;background:var(--line-2);color:var(--text-2);border-radius:999px;padding:1px 7px}
.pp-grp.t-late{color:var(--danger)}.pp-grp.t-late b{background:var(--danger-soft);color:var(--danger)}
.pp-grp.t-today{color:var(--warn)}.pp-grp.t-today b{background:var(--warn-soft);color:var(--warn)}
.pp-row,.pp-att-row{display:flex;align-items:center;gap:12px;padding:9px 6px;border-radius:12px;cursor:pointer;transition:background .12s}
.pp-row:hover,.pp-att-row:hover{background:var(--surface-2)}
.pp-row+.pp-row{border-top:1px solid var(--line-2)}
.pp-row-t{font-weight:650;font-size:.93rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pp-row-s{display:flex;gap:6px;align-items:baseline;font-size:.78rem;color:var(--text-2);min-width:0;white-space:nowrap}
.pp-row-s .pp-row-n{overflow:hidden;text-overflow:ellipsis;min-width:0}
.pp-row-s .code,.pp-row-t .code{font-size:.7rem}
.pp-row-r{display:flex;align-items:center;gap:8px;flex:none}
.pp-dp{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:999px;font-size:.74rem;font-weight:650;background:var(--line-2);color:var(--text-2);white-space:nowrap}
.pp-dp.now{background:var(--warn-soft);color:var(--warn)}
.pp-dp.late{background:var(--danger-soft);color:var(--danger)}
.pp-att-row{align-items:flex-start}
.pp-att-row+.pp-att-row{border-top:1px solid var(--line-2)}
.pp-att-row .li-chev{align-self:center}
.pp-att-row .pp-row-t .pp-row-n{margin-right:4px}
.pp-att-issue{font-size:.8rem;margin-top:3px;padding:5px 9px;border-radius:8px;background:var(--warn-soft);color:var(--text);display:flex;flex-direction:column;gap:1px}
.pp-att-issue b{color:var(--warn);font-size:.8rem}
.pp-att-issue span{color:var(--text-2);font-size:.76rem}
.pp-calm{padding:14px 8px;color:var(--text-2);font-size:.9rem}

/* journeys list */
.pp-list-card .card-head{gap:10px}
.pp-viewtog{flex:none}
.pp-viewtog button{white-space:nowrap}
.pp-filters{padding-top:4px}
.pp-sigf{background:var(--warn-soft)!important;border-color:transparent!important;color:var(--text)!important}
.pp-grid{grid-template-columns:repeat(auto-fill,minmax(min(300px,100%),1fr));gap:14px}
.pp-card,.pp-card.h-on_track,.pp-card.h-attention,.pp-card.h-failed,.pp-card.h-done{border-left:1px solid var(--line)}
.pp-card{padding:14px 14px 12px;gap:10px;position:relative;overflow:hidden;border-radius:16px}
.pp-card::before{content:"";position:absolute;inset:0 0 auto 0;height:3px;background:var(--line)}
.pp-card.h-on_track::before{background:var(--ok)}.pp-card.h-attention::before{background:#e0a100}.pp-card.h-failed::before{background:var(--danger)}.pp-card.h-done::before{background:var(--brand)}
.pp-card.h-attention{background:linear-gradient(180deg,color-mix(in srgb,var(--warn-soft) 55%,var(--surface)),var(--surface) 90px)}
.pp-card:hover,.pp-card:focus-visible{transform:translateY(-1px);border-color:color-mix(in srgb,var(--brand-2) 30%,var(--line))}
.pp-card-top{align-items:center}
.pp-card-top .avatar.sm{width:40px;height:40px;border-radius:12px}
.pp-card-name{font-weight:700;color:var(--text);font-size:.96rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pp-card-code{font-size:.74rem;color:var(--text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pp-card-code .code{font-size:.7rem}
.pp-card-top .pill{flex:none;white-space:nowrap}
.pp-card-stage{display:flex;align-items:center;gap:10px;background:var(--surface-2);border:1px solid var(--line-2);border-radius:12px;padding:8px 10px;font-size:.9rem}
.pp-stage-ico{width:30px;height:30px;border-radius:9px;background:var(--surface);display:grid;place-items:center;flex:none;box-shadow:var(--shadow-sm)}
.pp-alive{flex:none;font-size:.78rem;font-weight:650;background:var(--brand-soft);color:var(--brand);border-radius:999px;padding:3px 9px;font-variant-numeric:tabular-nums}
.pp-alive.has-loss{background:var(--warn-soft);color:var(--warn)}
.pp-meter-track{position:relative;height:8px;border-radius:999px;background:var(--line-2)}
.pp-meter-win{position:absolute;top:0;bottom:0;border-radius:999px;background:color-mix(in srgb,var(--ok) 35%,transparent)}
.pp-meter.t-late .pp-meter-win{background:color-mix(in srgb,var(--danger) 25%,transparent)}
.pp-meter-now{position:absolute;top:50%;width:12px;height:12px;margin-left:-6px;margin-top:-6px;border-radius:50%;background:var(--surface);border:3px solid var(--ok);box-shadow:var(--shadow-sm)}
.pp-meter.t-early .pp-meter-now{border-color:var(--text-3)}
.pp-meter.t-late .pp-meter-now{border-color:var(--danger)}
.pp-meter-lbl{display:flex;justify-content:space-between;gap:8px;font-size:.74rem;color:var(--text-3);margin-top:5px}
.pp-meter-lbl span:first-child{font-weight:700;color:var(--text-2)}
.pp-meter.t-late .pp-meter-lbl span:last-child{color:var(--danger);font-weight:650}
.pp-meter.t-in .pp-meter-lbl span:last-child{color:var(--ok)}
.pp-card-issue{font-size:.8rem;font-weight:600;color:var(--warn);background:var(--warn-soft);border-radius:9px;padding:6px 9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pp-card-meta{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:.76rem;color:var(--text-3);min-height:0}
.pp-card-meta:empty{display:none}
.pp-card-meta span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.pp-card-act{border-top:1px solid var(--line-2);border-top-style:solid;padding-top:10px;margin-top:auto}
.pp-card-act .li-main{display:flex;flex-direction:column;align-items:flex-start;gap:3px}
.pp-act-l{font-size:.84rem;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.pp-card-act.is-wait .pp-act-l{color:var(--text-2);font-weight:550}
.pp-empty{display:flex;flex-direction:column;align-items:center;gap:4px;padding:36px 16px;text-align:center}
.pp-empty-ico{font-size:1.8rem;margin-bottom:4px}

/* pipeline */
.pp-pipe{display:flex;gap:12px;overflow-x:auto;padding:14px 20px 18px;scroll-snap-type:x proximity;scroll-padding-inline:20px}
.pp-col{flex:0 0 250px;background:var(--surface-2);border:1px solid var(--line-2);border-radius:16px;display:flex;flex-direction:column;scroll-snap-align:start;max-height:640px}
.pp-col.is-end{opacity:.85}
.pp-col header{display:flex;align-items:center;gap:7px;padding:11px 12px;border-bottom:1px solid var(--line-2);font-size:.9rem}
.pp-col header b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pp-col-n{margin-left:auto;font-size:.74rem;font-weight:700;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:1px 8px}
.pp-col-w{font-size:.72rem;font-weight:650;color:var(--warn)}
.pp-col-body{display:flex;flex-direction:column;gap:8px;padding:10px;overflow-y:auto}
.pp-pc{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:9px 11px;cursor:pointer;display:flex;flex-direction:column;gap:3px;transition:box-shadow .15s}
.pp-pc:hover,.pp-pc:focus-visible{box-shadow:var(--shadow);outline:none}
.pp-pc.h-attention{border-color:color-mix(in srgb,var(--warn) 40%,var(--line))}
.pp-pc-top{display:flex;align-items:center;gap:7px;font-size:.88rem;min-width:0}
.pp-pc-top b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pp-hdot{width:9px;height:9px;border-radius:50%;flex:none;background:#c9c3b6}
.pp-pc-act{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-top:4px;padding-top:6px;border-top:1px dashed var(--line-2)}
.pp-pc-act .tiny{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* dashboard scout */
.pp-dash .card-body{padding-top:8px}
.pp-dash-sum{display:flex;flex-direction:column;gap:2px;margin-bottom:12px}
.pp-dash-h{font-size:1.15rem;font-weight:750;letter-spacing:-.01em}
.pp-dash.is-need .pp-dash-h{color:var(--warn)}
.pp-dash .pp-legend{margin-bottom:4px}
.pp-dash-sig{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.pp-schip{display:inline-flex;align-items:center;gap:5px;border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:4px 10px;font:inherit;font-size:.78rem;color:var(--text-2);cursor:pointer}
.pp-schip b{color:var(--text)}
.pp-schip.t-warn{background:var(--warn-soft);border-color:transparent}.pp-schip.t-warn b{color:var(--warn)}
.pp-schip.t-danger{background:var(--danger-soft);border-color:transparent}.pp-schip.t-danger b{color:var(--danger)}
.pp-schip:hover{filter:brightness(.97)}
.pp-dash .pp-k{margin-top:16px;margin-bottom:0}
.pp-dash .pp-grp{padding-top:8px}

/* journey detail polish */
.pp-hero{background:linear-gradient(135deg,color-mix(in srgb,var(--brand-soft) 60%,var(--surface)) 0%,var(--surface) 55%)}
.pp-hero-prog{display:flex;align-items:center;gap:10px;margin-top:14px}
.pp-hero-prog .pp-mini{flex:1}
.pp-hero-prog .pp-mini i{height:8px;border-radius:4px}
.pp-hero-prog span{font-size:.8rem;color:var(--text-2);white-space:nowrap;font-weight:600}
.pp-unit.r-none span{color:var(--text-3)}

@media (max-width:1020px){
  .pp-scout-hero{grid-template-columns:1fr;gap:16px}
  .pp-top{grid-template-columns:1fr}
}
@media (max-width:720px){
  .pp-scout-hero{padding:16px 14px;margin-left:0;margin-right:0}
  .pp-sh-title{font-size:1.3rem}
  .pp-signals{display:flex;overflow-x:auto;margin:0 -14px;padding:0 14px 2px;scroll-snap-type:x mandatory;scroll-padding-inline:14px;scrollbar-width:none}
  .pp-signals::-webkit-scrollbar{display:none}
  .pp-sig{flex:0 0 46%;scroll-snap-align:start}
  .pp-top .card-body{padding:4px 10px 10px}
  .pp-row{flex-wrap:wrap;row-gap:6px}
  .pp-row .li-main{flex:1 1 calc(100% - 52px)}
  .pp-row-r{width:100%;justify-content:space-between;padding-left:52px}
  .pp-list-card .card-head .gx-search{order:3;flex:1 1 100%}
  .pp-filters{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
  .pp-filters::-webkit-scrollbar{display:none}
  .pp-filters .chip-filter{flex:none}
  .pp-grid{padding:12px 12px 14px;gap:10px}
  .pp-pipe{padding:12px 12px 14px;scroll-snap-type:x mandatory;scroll-padding-inline:12px}
  .pp-col{flex-basis:78%}
  .pp-card-meta{display:none}
  .pp-dash-sig{flex-wrap:nowrap;overflow-x:auto;margin:10px -14px 0;padding:0 14px 2px;scroll-padding-inline:14px;scrollbar-width:none;-webkit-mask-image:linear-gradient(to right,#000 88%,transparent);mask-image:linear-gradient(to right,#000 88%,transparent)}
  .pp-dash-sig::-webkit-scrollbar{display:none}
  .pp-schip{flex:none}
}
.pp-pc>.tiny{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ================================================================ AI analysis card (answers backed by numbers) */
.anl { margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 12px 12px 10px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; max-width: 100%; box-shadow: var(--shadow-sm); }
.anl > * { min-width: 0; }
.anl-head { display: flex; gap: 10px; align-items: flex-start; }
.anl-ico { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 10px;
  background: var(--brand-soft); font-size: 16px; }
.anl-title { font-weight: 650; line-height: 1.25; }
.anl-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; overflow-wrap: anywhere; }
.anl-hl { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.anl-hl li { position: relative; padding-left: 14px; font-size: 13px; line-height: 1.4; color: var(--text); }
.anl-hl li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.anl-chart { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px; min-width: 0; }
.anl-clabel { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); margin-bottom: 6px; font-weight: 600; }
/* horizontal bars */
.anl-bars, .anl-cmp { display: grid; gap: 6px; }
.anl-bar { display: grid; grid-template-columns: minmax(64px, 34%) 1fr auto; gap: 8px; align-items: center; font-size: 12px; }
.anl-bl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.anl-bt { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; min-width: 30px; }
.anl-bf { display: block; height: 100%; border-radius: 99px; background: var(--brand); transition: width .4s ease; }
.anl-bv { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; min-width: 44px; text-align: right; }
.anl-bar.neg .anl-bf { background: var(--danger); }
.anl-bar.small .anl-bf, .anl-col.small .anl-cf { opacity: .5; }
.anl-bf.before { background: var(--text-3); }
.anl-bf.after { background: var(--brand); }
.anl sup { font-size: .7em; }
.anl-bl sup, .anl-cl sup, .anl td sup { color: var(--warn); margin-left: 1px; }
/* columns */
.anl-cols-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; }
.anl-cols { display: flex; gap: 6px; align-items: stretch; min-height: 150px; }
.anl-col { flex: 1 0 34px; max-width: 64px; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 34px; }
.anl-cv { font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-2); }
.anl-ct { flex: 1; width: 100%; max-width: 30px; display: flex; align-items: flex-end; background: var(--line); border-radius: 6px 6px 3px 3px; overflow: hidden; min-height: 90px; }
.anl-cf { display: block; width: 100%; background: var(--brand); border-radius: 6px 6px 0 0; transition: height .4s ease; }
.anl-col.neg .anl-cf { background: var(--danger); }
.anl-cl { font-size: 10px; color: var(--text-3); text-align: center; line-height: 1.15; max-width: 64px; overflow-wrap: anywhere; }
/* before / after */
.anl-cmp { gap: 10px; }
.anl-cmp-item { display: grid; gap: 4px; }
.anl-cmp-h { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
/* table */
.anl-table summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--brand); padding: 2px 0; list-style: none; }
.anl-table summary::-webkit-details-marker { display: none; }
.anl-table summary::before { content: "▸ "; display: inline-block; transition: transform .15s; }
.anl-table[open] summary::before { transform: rotate(90deg); }
.anl-scroll { overflow-x: auto; margin-top: 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.anl table { border-collapse: collapse; width: 100%; font-size: 12px; font-variant-numeric: tabular-nums; }
.anl th, .anl td { padding: 6px 8px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.anl th { background: var(--surface-2); font-weight: 600; color: var(--text-2); position: sticky; top: 0; }
.anl th:first-child, .anl td:first-child { position: sticky; left: 0; background: var(--surface); max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.anl th:first-child { background: var(--surface-2); }
.anl .num { text-align: right; }
.anl tbody tr.small td { color: var(--text-3); }
.anl tfoot td { font-weight: 700; border-bottom: 0; background: var(--surface-2); }
.anl tfoot td:first-child { background: var(--surface-2); }
.anl-cav { margin: 0; padding: 0 0 0 16px; font-size: 11.5px; color: var(--text-3); display: grid; gap: 2px; }
.anl-foot { font-size: 11px; color: var(--text-3); border-top: 1px dashed var(--line); padding-top: 8px; }
.msg.bot .li-main { min-width: 0; }

/* ============================================================ Health Center */
.t-muted{--c:var(--text-3);--c-soft:var(--surface-2)}
.hc-bar{display:flex;gap:3px;height:12px;border-radius:999px;overflow:hidden;background:var(--line-2)}
.hc-bar i{min-width:6px;background:var(--c);transition:flex .3s}
.hc-hero .card-body{display:grid;gap:16px}
.hc-tiles{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px}
.hc-tile{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:12px;border-radius:14px;border:1px solid var(--line);background:var(--surface);cursor:pointer;text-align:left;color:var(--text);transition:transform .15s,border-color .15s,background .15s}
.hc-tile:not(:disabled):hover{border-color:var(--c);background:var(--c-soft);transform:translateY(-1px)}
.hc-tile:disabled{opacity:.5;cursor:default}
.hc-tile b{font-size:1.5rem;line-height:1.1;color:var(--c)}
.hc-tile span:last-child{font-size:.78rem;color:var(--text-2);font-weight:600}
.hc-tile-ico{font-size:1rem}
.hc-kpis{margin-top:16px}
.hc-st{background:var(--c-soft);color:var(--c);border-color:transparent}
.hc-dot{display:inline-block;width:10px;height:10px;border-radius:50%;background:var(--c);margin-right:6px;vertical-align:middle}
.hc-badge{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--danger);color:#fff;font-size:.7rem;font-weight:700;margin-left:4px}
.hc-alerts{margin-bottom:18px}
.hc-alert-list{list-style:none;margin:0;padding:0 16px 8px;display:flex;flex-direction:column}
.hc-alert{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.hc-alert:last-child{border-bottom:0}
.hc-alert-ico{width:34px;height:34px;flex:none;display:grid;place-items:center;border-radius:10px;background:var(--surface-2)}
.hc-alert.lv-high .hc-alert-ico{background:var(--danger-soft)} .hc-alert.lv-medium .hc-alert-ico{background:var(--warn-soft)} .hc-alert.lv-info .hc-alert-ico{background:var(--water-soft)}
.hc-alert.lv-high .li-title{color:var(--danger)}
.hc-tabs{display:flex;gap:4px;margin:18px 0 14px;padding:4px;border-radius:12px;background:var(--surface-2);overflow-x:auto;scrollbar-width:none}
.hc-tabs a{white-space:nowrap}
.hc-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:14px}
.hc-toolbar p{margin:0}
.hc-chips{display:flex;gap:6px;flex-wrap:wrap}
.hc-search{max-width:260px;margin-left:auto}
.hc-note{margin:0 0 12px}
.hc-case-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:12px}
.hc-case{display:flex;gap:14px;padding:14px;align-items:flex-start;color:var(--text);border-left:4px solid var(--line);transition:transform .15s,box-shadow .15s}
.hc-case:hover{transform:translateY(-1px);box-shadow:var(--shadow-2,0 6px 20px rgba(0,0,0,.08))}
.hc-case.sev-moderate{border-left-color:var(--warn)} .hc-case.sev-high,.hc-case.sev-critical{border-left-color:var(--danger)} .hc-case.sev-low{border-left-color:var(--ok)}
.hc-case .avatar{width:56px;height:56px;border-radius:12px;flex:none;overflow:hidden}
.hc-ava{display:grid;place-items:center;font-size:1.6rem;background:var(--surface-2)}
.hc-case-top{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-bottom:4px}
.hc-code{font-family:ui-monospace,monospace;font-size:.78rem;font-weight:700;color:var(--text-3)}
.hc-case-foot{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:8px}
.hc-dots{display:inline-flex;gap:4px;align-items:center}
.hc-dots i{width:10px;height:10px;border-radius:50%;background:var(--line-2)}
.hc-dots .p-better{background:var(--ok)} .hc-dots .p-same{background:var(--sand)} .hc-dots .p-worse{background:var(--danger)}
.hc-plist{list-style:none;margin:0;padding:4px 16px}
.hc-prow{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.hc-prow:last-child{border-bottom:0}
.hc-prow a.li-main{color:var(--text);min-width:0}
.hc-reason{color:var(--warn);display:block}
.hc-review{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px}
.hc-rv{overflow:hidden}
.hc-rv-img{aspect-ratio:4/3;background:var(--surface-2)} .hc-rv-img img{width:100%;height:100%;object-fit:cover}
.hc-rv .card-body{display:flex;flex-direction:column;gap:6px}
.hc-rv p{margin:0}
.hc-rv-act{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.hc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.hc-wide{grid-column:1/-1}
.hc-bars{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.hc-bars li{display:grid;grid-template-columns:minmax(0,38%) minmax(40px,1fr) auto auto;gap:10px;align-items:center;font-size:.86rem}
.hc-bl{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hc-bt{height:8px;border-radius:999px;background:var(--surface-2);overflow:hidden}
.hc-bt i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,var(--brand),var(--ok))}
.hc-table{width:100%;border-collapse:collapse;font-size:.86rem}
.hc-table th{text-align:left;font-size:.74rem;text-transform:uppercase;letter-spacing:.03em;color:var(--text-3);padding:6px 8px;border-bottom:1px solid var(--line)}
.hc-table td{padding:8px;border-bottom:1px solid var(--line)}
.hc-table tr:last-child td{border-bottom:0}
.hc-mini{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.hc-mini li{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.hc-tpls{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}
.hc-tpl.off{opacity:.6}
.hc-tpl-ico{font-size:1.3rem}
.hc-steps{margin:8px 0 0;padding-left:20px;color:var(--text-2)}
.hc-inline{display:flex;gap:8px;margin-top:10px}
.hc-inline .input{flex:1;min-width:0}
.hc-inline .input[name$="_icon"]{flex:0 0 64px;text-align:center}
#hc-settings .q-title{margin-top:18px}
#hc-settings .q-title:first-child{margin-top:0}
/* case page */
.hc-chero{display:grid;grid-template-columns:180px 1fr;gap:20px;padding:16px;border-top:4px solid var(--line);align-items:center}
.hc-chero.sev-moderate{border-top-color:var(--warn)} .hc-chero.sev-high,.hc-chero.sev-critical{border-top-color:var(--danger)} .hc-chero.sev-low{border-top-color:var(--ok)}
.hc-chero-img{aspect-ratio:1;border-radius:14px;overflow:hidden;background:var(--surface-2);display:grid;place-items:center;font-size:3.5rem}
.hc-chero-img img{width:100%;height:100%;object-fit:cover}
.hc-title{font-size:1.6rem;margin:4px 0}
.hc-meta{display:flex;flex-wrap:wrap;gap:8px 16px;margin-top:10px;color:var(--text-2);align-items:center}
.hc-due{color:var(--danger);font-weight:700}
.hc-banner{display:flex;gap:12px;align-items:center;padding:12px 16px;border-radius:14px;margin:14px 0;font-size:1.2rem}
.hc-banner.violet{background:var(--violet-soft);color:var(--violet)}
.hc-banner .li-main{font-size:.92rem;color:var(--text)}
.hc-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:14px 0}
.hc-more{position:relative}
.hc-more summary{list-style:none;cursor:pointer}
.hc-more summary::-webkit-details-marker{display:none}
.hc-more-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:30;min-width:240px;padding:6px;display:flex;flex-direction:column;box-shadow:0 12px 32px rgba(0,0,0,.16)}
.hc-more-menu button{all:unset;padding:9px 12px;border-radius:8px;cursor:pointer;font-size:.9rem}
.hc-more-menu button:hover{background:var(--surface-2)}
.hc-more-menu .danger{color:var(--danger)}
.hc-recov{margin-bottom:16px;border-left:4px solid var(--line-2)}
.hc-recov.ready{border-left-color:var(--ok);background:color-mix(in srgb,var(--ok-soft) 50%,var(--surface))}
.hc-recov.worse{border-left-color:var(--danger)}
.hc-recov .card-body{display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.hc-recov .hc-dots i{width:14px;height:14px}
.hc-layout .main-col,.hc-layout .side-col{display:flex;flex-direction:column;gap:16px}
.hc-prog{height:6px;border-radius:999px;background:var(--surface-2);overflow:hidden;margin-bottom:10px}
.hc-prog i{display:block;height:100%;background:var(--ok)}
.hc-check{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
.hc-check label{display:flex;gap:10px;align-items:flex-start;padding:6px 4px;border-radius:8px;cursor:pointer}
.hc-check label:hover{background:var(--surface-2)}
.hc-check input{margin-top:3px;width:18px;height:18px;accent-color:var(--ok)}
.hc-check input:checked+span{text-decoration:line-through;color:var(--text-3)}
.hc-tl{list-style:none;margin:0;padding:8px 16px 14px;position:relative}
.hc-ev{display:flex;gap:12px;padding:10px 0;position:relative}
.hc-ev:not(:last-child)::before{content:"";position:absolute;left:16px;top:44px;bottom:-4px;width:2px;background:var(--line)}
.hc-ev-ico{width:34px;height:34px;flex:none;border-radius:50%;display:grid;place-items:center;background:var(--c-soft,var(--surface-2));font-size:.95rem}
.hc-ev-top{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.hc-ev-ph{width:120px;aspect-ratio:1;border-radius:10px;overflow:hidden;margin-top:6px} .hc-ev-ph img{width:100%;height:100%;object-fit:cover}
.hc-cmp{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:6px;max-width:320px}
.hc-cmp img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:10px}
.hc-changes{margin:6px 0 0;padding-left:18px}
.pre{white-space:pre-wrap}
.hc-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px}
.hc-photos figure{margin:0}
.hc-photos button{all:unset;display:block;width:100%;aspect-ratio:1;border-radius:10px;overflow:hidden;cursor:pointer;background:var(--surface-2)}
.hc-photos img{width:100%;height:100%;object-fit:cover;transition:transform .2s}
.hc-photos button:hover img{transform:scale(1.04)}
.hc-causes{list-style:none;margin:0 0 6px;padding:0;display:flex;flex-direction:column;gap:8px}
.hc-causes li{display:flex;gap:8px;align-items:center;padding:8px 10px;border-radius:10px;background:var(--surface-2)}
.hc-causes li.c-confirmed{background:var(--danger-soft)} .hc-causes li.c-likely{background:var(--warn-soft)}
.hc-causes li.c-rejected span:first-child{text-decoration:line-through;color:var(--text-3)}
.hc-cause-sel{width:auto;flex:none;padding:4px 8px;font-size:.8rem;height:auto}
.hc-facts{list-style:none;margin:0 0 10px;padding:0;display:flex;flex-direction:column;gap:6px;font-size:.88rem}
.hc-wx{display:flex;gap:3px;padding:8px 0 4px;margin-top:4px}
.hc-wx>div{flex:1;display:flex;flex-direction:column;gap:3px;min-width:0}
.hc-wx-t{position:relative;height:58px;border-radius:4px;background:var(--surface-2)}
.hc-wx-t i{position:absolute;left:20%;right:20%;border-radius:4px;background:linear-gradient(var(--warn),var(--water))}
.hc-wx-r{height:14px;display:flex;align-items:flex-start;justify-content:center}
.hc-wx-r i{width:60%;border-radius:2px;background:var(--water)}
.hc-wx-leg{display:flex;justify-content:space-between;gap:8px;margin-bottom:8px}
.hc-wx-key{display:inline-block;width:8px;height:8px;border-radius:2px;background:var(--water);vertical-align:middle}
.hc-rel-h{margin:10px 0 4px;font-weight:700}
/* plant tab */
.hc-pstat{border-left:5px solid var(--c);margin-bottom:14px}
.hc-pstat .card-body{display:flex;flex-direction:column;gap:12px}
.hc-pstat-top{display:flex;gap:14px;align-items:flex-start}
.hc-big{font-size:2rem;line-height:1}
.hc-pstat-l{font-size:1.3rem;font-weight:750;color:var(--c)}
.hc-reasons{margin:4px 0 0;padding-left:18px;color:var(--text-2)}
.hc-trend{display:flex;gap:3px}
.hc-trend i{flex:1;height:10px;border-radius:3px;background:var(--c)}
.hc-pact{display:flex;flex-wrap:wrap;gap:8px}
#hc-plant>.hc-case-list,#hc-plant>.card,#hc-plant>.hc-banner{margin-bottom:14px}
.hc-profile{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.hc-pf{display:flex;gap:10px;padding:12px;border-radius:12px;background:var(--surface-2);border-left:3px solid var(--line-2)}
.hc-pf.t-good{border-left-color:var(--ok)} .hc-pf.t-watch{border-left-color:var(--warn)} .hc-pf.t-bad{border-left-color:var(--danger)} .hc-pf.t-info{border-left-color:var(--water)}
.hc-pf.t-bad b{color:var(--danger)}
.hc-pf-ico{font-size:1.2rem}
/* dashboard */
.hc-dash .card-body{display:flex;flex-direction:column;gap:10px}
.hc-dash-row{display:flex;flex-wrap:wrap;gap:6px 14px}
.hc-dash-row a{color:var(--text-2)} .hc-dash-row a:hover{color:var(--text)}
.hc-dash .hc-alert-list{padding:0}
/* sheets */
.hc-sheet .sheet-body{display:flex;flex-direction:column;gap:14px}
.hc-sheet .q-section{margin:0}
.hc-sheet .field>span,#hc-settings .field>span{font-size:.82rem;font-weight:650;color:var(--text-2)}
.hc-sheet .form-grid{margin:0}
.hc-seg{flex-wrap:wrap}
.hc-seg button small{display:block;font-size:.7rem;font-weight:500;opacity:.75}
.hc-err{margin-top:10px;padding:10px 12px;border-radius:10px;background:var(--danger-soft);color:var(--danger);font-size:.88rem}
.hc-rec{color:var(--danger)}
.hc-qhint{display:block}
.hc-scan-top{display:flex;gap:14px;margin-bottom:12px}
.hc-scan-top img{width:120px;height:120px;object-fit:cover;border-radius:12px;flex:none}
.hc-scan-top p{margin:0 0 6px}
@media (max-width:1020px){
  .hc-tiles{grid-template-columns:repeat(4,minmax(0,1fr))}
  .hc-profile{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:720px){
  .hc-tiles{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
  .hc-tile{padding:8px;border-radius:12px}
  .hc-tile b{font-size:1.15rem}
  .hc-tile span:last-child{font-size:.68rem;line-height:1.2}
  .hc-tile-ico{font-size:.85rem}
  .hc-hero .card-body{padding:14px}
  .hc-grid{grid-template-columns:minmax(0,1fr)}
  .hc-case-list,.hc-review,.hc-tpls{grid-template-columns:1fr}
  .hc-search{max-width:none;margin-left:0;width:100%}
  .hc-chips{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;width:100%;padding-bottom:2px}
  .hc-chips .chip-filter{white-space:nowrap}
  .hc-tabs{margin-left:-4px;margin-right:-4px}
  .hc-tabs a{flex:none !important;padding:7px 12px !important}
  .hc-chero{grid-template-columns:84px 1fr;gap:12px;padding:12px}
  .hc-chero-img{font-size:2.2rem}
  .hc-title{font-size:1.2rem}
  .hc-actions .btn{flex:1 1 auto}
  .hc-actions .spacer{display:none}
  .hc-more{flex:1 1 auto} .hc-more summary{width:100%;justify-content:center}
  .hc-more-menu{left:0;right:auto}
  .hc-profile{grid-template-columns:1fr 1fr}
  .hc-prow{flex-wrap:wrap}
  .hc-prow a.li-main{flex:1 1 100%}
  .hc-bars li{grid-template-columns:minmax(0,40%) minmax(40px,1fr) auto auto}
  .hc-scan-top img{width:84px;height:84px}
  .hc-ev-top .spacer{display:none}
  .hc-ev-top>.small.faint{flex-basis:100%;order:-1}
}

.hc-tscroll{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:0 -4px}
@media (max-width:720px){.hc-table th,.hc-table td{padding:6px 5px}.hc-table th{font-size:.68rem;letter-spacing:0}}

/* ---------- Health Center: command center layout v2 */
.hc-ov{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:0;overflow:hidden}
.hc-ov-main{padding:20px 22px;display:flex;flex-direction:column;gap:16px;min-width:0}
.hc-ov-side{padding:16px 16px 14px;border-left:1px solid var(--line);background:var(--surface-2);display:flex;flex-direction:column;gap:6px}
.hc-ov-h{font-size:.74rem;font-weight:750;letter-spacing:.06em;text-transform:uppercase;color:var(--text-3);padding:2px 6px 4px}
.hc-ov-score{display:flex;align-items:center;gap:16px}
.hc-ring{--p:0;--ring:var(--ok);width:76px;height:76px;flex:none;border-radius:50%;display:grid;place-items:center;
  background:conic-gradient(var(--ring) calc(var(--p)*1%),var(--line-2) 0)}
.hc-ring::before{content:"";grid-area:1/1;width:60px;height:60px;border-radius:50%;background:var(--surface)}
.hc-ring b{grid-area:1/1;position:relative;font-size:1.05rem;font-weight:800;color:var(--text)}
.hc-ov-title{font-size:1.25rem;font-weight:800;letter-spacing:-.01em;line-height:1.2}
.hc-ov-txt .small{margin-top:3px}
.hc-need{color:var(--danger);font-weight:700}
.hc-ov .hc-bar{height:10px}
.hc-legend{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:4px 10px}
.hc-leg{display:flex;align-items:center;gap:8px;padding:6px 8px;border:0;border-radius:9px;background:none;color:var(--text-2);font:inherit;font-size:.86rem;cursor:pointer;text-align:left;transition:background .15s}
.hc-leg i{width:10px;height:10px;border-radius:3px;background:var(--c);flex:none}
.hc-leg span{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hc-leg b{color:var(--text);font-variant-numeric:tabular-nums}
.hc-leg:not(:disabled):hover{background:var(--c-soft)}
.hc-leg:disabled{opacity:.45;cursor:default}
.hc-stat{display:flex;align-items:center;gap:12px;padding:9px 10px;border-radius:12px;color:var(--text);transition:background .15s}
.hc-stat:hover{background:var(--surface)}
.hc-stat-ico{width:34px;height:34px;flex:none;display:grid;place-items:center;border-radius:10px;background:var(--c-soft);font-size:1rem}
.hc-stat.t-muted .hc-stat-ico{background:var(--line-2)}
.hc-stat-l{flex:1;min-width:0;font-weight:650;font-size:.9rem;display:flex;flex-direction:column}
.hc-stat-l small{font-weight:600;font-size:.75rem;color:var(--danger)}
.hc-stat b{font-size:1.3rem;font-weight:800;color:var(--c);font-variant-numeric:tabular-nums}
.hc-stat.t-muted b{color:var(--text-3)}
.hc-stat-go{color:var(--text-3);font-size:1.2rem;line-height:1}
.hc-ov+.hc-tabs{margin-top:22px}

.hc-cc{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:18px;align-items:start}
.hc-cc>.hc-aside{grid-column:2;grid-row:1;position:sticky;top:76px}
.hc-cc>.hc-mainc{grid-column:1;grid-row:1;min-width:0}
.hc-cc .hc-case-list{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
.hc-aside .hc-alerts{margin:0}
.hc-aside .hc-alert-list{padding:0 14px 6px}
.hc-aside .hc-alert{gap:10px;align-items:flex-start;flex-wrap:wrap;padding:11px 0}
.hc-aside .hc-alert .li-main{flex:1 1 180px;min-width:0}
.hc-aside .hc-alert .li-title{font-size:.88rem;line-height:1.3}
.hc-aside .hc-alert .btn{margin-left:44px}
.hc-aside .hc-alert-ico{width:32px;height:32px}
.hc-more{display:block;width:100%;padding:10px;border:0;border-top:1px solid var(--line);background:none;color:var(--accent,var(--ok));font:inherit;font-weight:650;font-size:.86rem;cursor:pointer}
.hc-more:hover{background:var(--surface-2)}
.hc-allgood .card-body{display:flex;flex-direction:column;gap:4px}

@media (max-width:1020px){
  .hc-ov{grid-template-columns:1fr}
  .hc-ov-side{border-left:0;border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
  .hc-ov-h{grid-column:1/-1}
  .hc-cc{grid-template-columns:1fr}
  .hc-cc>.hc-aside,.hc-cc>.hc-mainc{grid-column:1;grid-row:auto;position:static}
}
@media (max-width:720px){
  .hc-ov-main{padding:16px;gap:12px}
  .hc-ring{width:62px;height:62px}.hc-ring::before{width:48px;height:48px}.hc-ring b{font-size:.92rem}
  .hc-ov-title{font-size:1.05rem}
  .hc-legend{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 6px}
  .hc-leg{padding:5px 6px;font-size:.8rem}
  .hc-ov-side{padding:10px}
  .hc-stat{flex-direction:row;gap:8px;padding:8px}
  .hc-stat-ico{width:30px;height:30px;font-size:.9rem}
  .hc-stat-l{font-size:.78rem;line-height:1.2}
  .hc-stat-l small{font-size:.68rem}
  .hc-stat b{font-size:1.1rem}
  .hc-stat-go{display:none}
  .hc-aside .hc-alert .btn{margin-left:42px}
}
.hc-legend{display:flex;flex-wrap:wrap;gap:4px 6px}
.hc-leg{padding:5px 10px 5px 8px;border:1px solid var(--line);border-radius:999px;background:var(--surface)}
.hc-leg span{flex:none}
.hc-leg b{margin-left:2px}
.hc-ov-main{justify-content:center}
.hc-cc .hc-toolbar{flex-wrap:nowrap}
.hc-cc .hc-chips{flex:1 1 auto;min-width:0;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
.hc-cc .hc-chips>*{flex:none}
.hc-cc .hc-search{flex:0 0 210px;width:210px}
.hc-aside .hc-alert{flex-wrap:nowrap;align-items:center}
.hc-aside .hc-alert .li-main{flex:1 1 auto}
.hc-aside .hc-alert .li-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:normal}
.hc-aside .hc-alert .btn{margin-left:0;flex:none;padding:5px 10px;font-size:.78rem}
@media (max-width:720px){
  .hc-legend{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
  .hc-leg{border-radius:9px}
  .hc-leg span{flex:1}
  .hc-cc .hc-toolbar{flex-wrap:wrap}
  .hc-cc .hc-chips{flex-basis:100%}
  .hc-cc .hc-search{flex:1 1 100%;width:100%}
  .hc-aside .hc-alert .btn{margin-left:0}
}
.hc-pgroups{display:flex;flex-direction:column;gap:14px}
.hc-pgroup{overflow:hidden}
.hc-pghead{display:flex;align-items:center;gap:10px;padding:13px 18px;border-bottom:1px solid var(--line);list-style:none;cursor:default}
.hc-pghead h3{margin:0;font-size:.98rem;font-weight:750}
.hc-pghead::-webkit-details-marker{display:none}
details.hc-pgroup>summary{cursor:pointer;border-bottom:0}
details.hc-pgroup[open]>summary{border-bottom:1px solid var(--line)}
details.hc-pgroup>summary:hover{background:var(--surface-2)}
details.hc-pgroup[open] .hc-pg-more{font-size:0}
details.hc-pgroup[open] .hc-pg-more::after{content:"Hide";font-size:.8rem}
.hc-pg-more::after{content:" ▾"}
details.hc-pgroup[open] .hc-pg-more::after{content:"Hide ▴"}
.hc-gdot{width:10px;height:10px;border-radius:3px;background:var(--c);flex:none}
.hc-pgroup .hc-prow>.pill{display:none}
.hc-mini li:has(.hc-sig-del){display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.hc-sig-del{margin-left:auto;color:var(--text-3);padding:2px 8px}
.hc-sig-del:hover{color:var(--danger);background:var(--danger-soft)}
.hc-sig-note{margin-top:10px}

/* ---------- Health case: checklist v2 */
.hc-cl .hc-prog{margin-bottom:14px}
.hc-next{border:1px solid color-mix(in srgb,var(--ok) 35%,var(--line));background:color-mix(in srgb,var(--ok-soft) 70%,var(--surface));border-radius:14px;padding:14px 16px;margin-bottom:12px}
.hc-next-l{font-size:.7rem;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:var(--ok)}
.hc-next-t{font-weight:750;font-size:1rem;margin:3px 0 2px}
.hc-next-a{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.hc-cl .hc-check li{display:flex;align-items:center;gap:6px;border-radius:9px}
.hc-cl .hc-check li:hover{background:var(--surface-2)}
.hc-cl .hc-check label{flex:1;min-width:0;background:none!important}
.hc-cl .hc-check label>span{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.hc-auto{font-size:.7rem;font-weight:700;color:var(--violet,#7c5cff);background:var(--violet-soft);padding:1px 7px;border-radius:999px}
.hc-step-btns{display:flex;gap:2px;opacity:0;transition:opacity .15s}
.hc-check li:hover .hc-step-btns,.hc-check li:focus-within .hc-step-btns{opacity:1}
@media (hover:none){.hc-step-btns{opacity:1}}
.hc-done{margin-top:12px;border-top:1px solid var(--line);padding-top:8px}
.hc-done summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:8px;font-weight:650;font-size:.88rem;color:var(--text-2);padding:6px 4px}
.hc-done summary::-webkit-details-marker{display:none}
.hc-done summary::after{content:"▾";margin-left:auto;color:var(--text-3);transition:transform .15s}
.hc-done[open] summary::after{transform:rotate(180deg)}
.hc-done .hc-check li{padding:6px 4px;gap:10px}
.hc-tick{width:22px;height:22px;flex:none;border-radius:50%;display:grid;place-items:center;font-size:.75rem;font-weight:800;background:var(--ok-soft);color:var(--ok)}
.is-skip .hc-tick{background:var(--surface-2);color:var(--text-3)}
.hc-done .li-main{display:flex;flex-direction:column}
.hc-step-t{color:var(--text-2);font-size:.9rem}
.is-skip .hc-step-t{text-decoration:line-through;color:var(--text-3)}

/* ---------- Health case: timeline v2 */
.hc-tl-f{display:flex;gap:6px;padding:12px 16px 4px;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none}
.hc-tl-f>*{flex:none}
#hc-tl-body{padding:6px 16px 14px}
.hc-tl-day{margin-top:10px}
.hc-tl-dh{display:flex;align-items:baseline;gap:10px;position:sticky;top:64px;z-index:1;background:var(--surface);padding:6px 0;border-bottom:1px dashed var(--line)}
.hc-tl-dh b{font-size:.86rem}
.hc-tl-dh span{margin-left:auto;font-variant-numeric:tabular-nums}
#hc-tl-body .hc-tl{padding:4px 0 0}
.hc-ev.k-check .li-main,.hc-ev.k-intervention .li-main,.hc-ev.k-ai_compare .li-main{background:var(--surface-2);border-radius:12px;padding:8px 12px;border-left:3px solid var(--c,var(--line))}
.hc-ev.pg-better .li-main{border-left-color:var(--ok)} .hc-ev.pg-worse .li-main{border-left-color:var(--danger)} .hc-ev.pg-same .li-main{border-left-color:var(--text-3)}
.hc-ev-min{padding:4px 0;align-items:center;font-size:.84rem;color:var(--text-2)}
.hc-ev-min .hc-ev-ico{width:34px;height:22px;background:none;font-size:.8rem;opacity:.75}
.hc-ev-min .li-main{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hc-ev-min:not(:last-child)::before{top:24px}
.hc-tl-up{display:flex;align-items:center;gap:12px;padding:10px 12px;margin-top:8px;border:1.5px dashed var(--line);border-radius:14px}
.hc-tl-up.due{border-color:var(--warn);background:var(--warn-soft)}
.hc-tl-up .hc-ev-ico{background:var(--water-soft)}
@media (max-width:720px){
  .hc-tl-f{padding:10px 12px 2px}
  #hc-tl-body{padding:4px 12px 12px}
  .hc-tl-dh{top:56px}
  .hc-ev-top>.small.faint{flex-basis:auto;order:0;margin-left:auto}
  .hc-tl-up{flex-wrap:wrap}.hc-tl-up .btn{margin-left:46px}
}

.hc-tl-up .li-main{flex:1 1 160px;min-width:0}

/* ---------- Group page (plant-page style) */
.gp-hero .gp-media{cursor:default;overflow:hidden}
.gp-hero .gp-media .collage{position:absolute;inset:0}
.gp-hero .gp-media .collage .placeholder{display:grid;place-items:center;font-size:4rem}
.gp-sub{font-style:normal}
.gp-av{display:grid;place-items:center;background:var(--surface-2);font-size:1rem}
.ptab-n.warn{background:var(--warn-soft);color:var(--warn)}
.gp-sec{margin-top:0}
.gp-wlist,.gp-hlist{list-style:none;margin:14px 0 0;padding:0;display:flex;flex-direction:column;gap:6px}
.gp-wlist li,.gp-hlist li{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line-2);min-width:0}
.gp-wplant{display:flex;align-items:center;gap:10px;flex:1;min-width:0;color:inherit;text-decoration:none}
.gp-wplant .li-main{display:flex;flex-direction:column;min-width:0}
.gp-wplant .li-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gp-wplant .small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gp-wplant:hover .li-title{color:var(--brand)}
.gp-wlist .pill,.gp-hlist .pill{flex:none;white-space:nowrap}
.gp-wlist .btn-icon{flex:none;width:32px;height:32px;padding:0}
.gp-hbar{display:flex;height:12px;border-radius:99px;overflow:hidden;gap:2px;background:var(--line-2)}
.gp-hbar span{background:var(--c,var(--ok))}
.gp-hleg{display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:10px;font-size:.85rem;color:var(--text-2)}
.gp-hlist li{border-left:3px solid var(--c,var(--line))}
.gp-hcases{display:flex;gap:4px;flex-wrap:wrap;flex:none}
.gp-hcases .pill{text-decoration:none}
@media (max-width:720px){
  .gp-hero .ph-main{grid-template-columns:repeat(4,minmax(0,1fr))}
  .gp-hero .ph-ai{display:flex}
  .gp-hero .ph-ai .btn{flex:1}
  .gp-hlist li{flex-wrap:wrap}
  .gp-hlist .gp-wplant{flex-basis:100%}
  .gp-hcases{margin-left:42px}
  .gp-hlist li>.pill{margin-left:auto}
}
.gp-hero .gp-media .collage>.placeholder{position:static;font-size:3rem}
.gp-hero .gp-media .collage.n1>.placeholder{font-size:5rem}
@media (max-width:1020px){.gp-water{order:-1}}

/* ---------- Group tab bar (sticky, with identity + quick actions when stuck) */
.gtabs{position:sticky;top:var(--topbar-h,65px);z-index:20;display:flex;align-items:center;gap:6px;margin:0 0 18px;padding:5px;
  background:color-mix(in srgb,var(--surface) 90%,transparent);backdrop-filter:saturate(1.4) blur(14px);-webkit-backdrop-filter:saturate(1.4) blur(14px);
  border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow-sm);transition:box-shadow .2s,border-color .2s}
.gt-list{display:flex;gap:4px;flex:1;min-width:0;overflow-x:auto;scrollbar-width:none}
.gt-list::-webkit-scrollbar{display:none}
.gt-list button{position:relative;flex:1 0 auto;display:inline-flex;align-items:center;justify-content:center;gap:7px;height:40px;padding:0 14px;border:0;border-radius:11px;
  background:transparent;color:var(--text-2);font:650 .88rem var(--font);cursor:pointer;white-space:nowrap;transition:background .15s,color .15s,height .2s}
.gt-list button:hover{background:var(--surface-2);color:var(--text)}
.gt-list button[aria-selected="true"]{background:var(--brand);color:#fff;box-shadow:0 4px 12px -6px var(--brand)}
.gt-list button[aria-selected="true"] .ptab-n{background:rgba(255,255,255,.22);color:#fff}
.gt-list button:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.gt-i{line-height:1}
.gt-s{display:none}
.gt-id,.gt-acts{display:none}
.gt-id{align-items:center;gap:10px;flex:none;max-width:250px;padding:2px 14px 2px 2px;border:0;border-right:1px solid var(--line-2);border-radius:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}
.gt-av{position:relative;flex:none;width:36px;height:36px;border-radius:10px;overflow:hidden;background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line-2)}
.gt-av .collage{position:absolute;inset:0;gap:1px}
.gt-av .collage>.placeholder{position:static;display:grid;place-items:center;font-size:.55rem}
.gt-av .collage.n1>.placeholder{font-size:1.1rem}
.gt-idt{display:flex;flex-direction:column;min-width:0;line-height:1.2}
.gt-idt b{font-size:.9rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gt-idt small{font-size:.74rem;color:var(--text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gt-id:hover b{color:var(--brand)}
.gt-acts{gap:6px;flex:none;padding-left:10px;border-left:1px solid var(--line-2)}
.gt-acts .btn{height:34px}
@media (max-width:1439px){.gt-acts .gt-al{display:none}.gt-acts .btn{width:34px;padding:0;justify-content:center}}
.gtabs.stuck{box-shadow:var(--shadow);border-color:color-mix(in srgb,var(--line) 60%,transparent)}
@keyframes gt-in{from{opacity:0;transform:translateX(-6px)}to{opacity:1;transform:none}}
@media (min-width:1021px){
  .gtabs.stuck .gt-id,.gtabs.stuck .gt-acts{display:flex;animation:gt-in .2s ease}
  .gtabs.stuck .gt-list{justify-content:center}
  .gtabs.stuck .gt-list button{flex:0 1 auto;height:36px;padding:0 13px}
}
/* phones & tablets: once scrolled past the hero, the bar shows the photo + name (and quick actions) above the tabs */
@media (max-width:1020px){
  .gtabs.stuck{flex-wrap:wrap;row-gap:4px;margin-bottom:-32px}
  .gtabs.stuck .gt-id{display:flex;flex:1 1 0;min-width:0;max-width:none;padding:0 4px;border-right:0;gap:9px;animation:gt-in .2s ease}
  .gtabs.stuck .gt-av{width:32px;height:32px;border-radius:9px}
  .gtabs.stuck .gt-acts{display:flex;padding-left:0;border-left:0;animation:gt-in .2s ease}
  .gtabs.stuck .gt-acts .btn{height:32px;width:32px}
  .gtabs.stuck .gt-list{flex:1 0 100%;order:3}
}
@media (max-width:720px){
  .gtabs{top:var(--topbar-h,61px);margin:0 -14px 14px;padding:6px 8px;border-radius:0;border-left:0;border-right:0}
  .gt-list{gap:2px;overflow:visible}
  .gt-list button{flex:1 1 0;min-width:0;flex-direction:column;gap:3px;height:auto;padding:7px 2px 6px;font-size:.7rem;font-weight:650;border-radius:12px}
  .gt-i{font-size:1.2rem;transition:transform .15s}
  .gt-l{display:none}
  .gt-s{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis}
  .gt-list button[aria-selected="true"]{background:var(--brand-soft);color:var(--brand);box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--brand) 35%,transparent)}
  .gt-list button[aria-selected="true"] .gt-i{transform:scale(1.08)}
  .gt-list .ptab-n,.gt-list button[aria-selected="true"] .ptab-n{position:absolute;top:3px;left:calc(50% + 7px);min-width:17px;padding:0 5px;font-size:.62rem;line-height:16px;text-align:center;background:var(--brand);color:#fff;box-shadow:0 0 0 2px var(--surface)}
  .gt-list .ptab-n.warn{background:var(--warn);color:#fff}
  .gtabs.stuck{padding:4px 8px}
  .gtabs.stuck .gt-list button{padding:5px 2px 4px}
  .plant-hero .ph-main{grid-template-columns:repeat(3,minmax(0,1fr))}
  .gtabs.stuck .gt-i{font-size:1.05rem}
}

/* ---------- Selling profile on a plant + custom costs */
.gx-pp-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:8px}
.gx-pp-opt{display:flex;align-items:center;gap:10px;text-align:left;padding:10px 12px;border:1.5px solid var(--line);border-radius:12px;background:var(--surface);color:inherit;cursor:pointer;font:inherit;min-width:0;transition:border-color .15s,background .15s}
.gx-pp-opt:hover{border-color:var(--brand-2)}
.gx-pp-opt[aria-pressed="true"]{border-color:var(--brand-2);background:color-mix(in srgb,var(--brand-2) 10%,var(--surface));box-shadow:0 0 0 3px color-mix(in srgb,var(--brand-2) 15%,transparent)}
.gx-pp-opt .li-main{display:flex;flex-direction:column;min-width:0}
.gx-pp-opt small{color:var(--text-3);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gx-pp-ico{font-size:20px;width:28px;text-align:center;flex:none}
.gx-pp-box{margin-top:10px;padding:10px 12px;border-radius:12px;background:var(--surface-2);border:1px dashed var(--line)}
.gx-pp-secs{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.gx-pp-sec{display:inline-flex;flex-direction:column;gap:1px;padding:5px 10px;border-radius:10px;background:var(--surface);border:1px solid var(--line);font-size:12px;min-width:0}
.gx-pp-sec i{font-style:normal;color:var(--text-3);font-size:11px}
.gx-pp-sec b{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:180px}
.gx-pp-sec.auto b{color:var(--text-3);font-weight:500}
.gx-pp-sec.none{opacity:.6}.gx-pp-sec.none b{text-decoration:line-through}
.gx-xrow{display:grid;grid-template-columns:minmax(0,1.6fr) 110px 120px 140px 36px;gap:6px;align-items:center;margin-bottom:8px}
.gx-xrow .input{min-width:0}
.gx-pline{margin:4px 0 12px;padding:10px 12px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line)}
.gx-pline-h{display:flex;align-items:center;gap:10px}
.gx-pline-h .li-main{display:flex;flex-direction:column;flex:1;min-width:0}
.gx-pline-ico{font-size:22px;width:32px;text-align:center}
.gx-pline .gx-k{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--text-3)}
.gx-cost-builtin .gx-cost-row{cursor:pointer}
@media (max-width:720px){
  .gx-xrow{grid-template-columns:1fr 1fr 36px;padding:8px;border:1px solid var(--line);border-radius:10px}
  .gx-xrow [data-x="label"]{grid-column:1/3}
  .gx-xrow [data-xdel]{grid-row:1;grid-column:3}
  .gx-xrow [data-x="category"]{grid-column:1/-1}
  .gx-xrow .gx-input{grid-column:1/2}
  .gx-xrow [data-x="basis"]{grid-column:2/-1}
  .gx-pp-list{grid-template-columns:1fr 1fr}
  .gx-pp .q-title .hint,.gx-xcosts .q-title .hint{display:block;margin-top:2px}
}

/* ---------- cost sections & profiles (rules page + pickers) */
.gx-secs{display:grid;gap:14px}
.gx-sec{border:1px solid var(--line);border-radius:18px;background:var(--surface-2,rgba(0,0,0,.02));padding:12px;display:flex;flex-direction:column;gap:10px;min-width:0}
.gx-sec-h{display:flex;align-items:center;gap:10px}
.gx-sec-h .li-main{display:flex;flex-direction:column;min-width:0;flex:1}
.gx-sec-h b{font-size:1rem}
.gx-sec-ico{width:40px;height:40px;flex:none;border-radius:12px;background:var(--surface);border:1px solid var(--line);display:grid;place-items:center;font-size:1.3rem}
.gx-sec.add{flex-direction:row;align-items:center;border-style:dashed;background:transparent;cursor:pointer;font:inherit;color:inherit;text-align:left}
.gx-sec.add:hover{border-color:var(--brand)}
.gx-sec.add .li-main{display:flex;flex-direction:column}
.gx-pcards{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:8px}
.gx-pcard{display:flex;align-items:flex-start;gap:10px;text-align:left;font:inherit;color:inherit;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:10px 12px;cursor:pointer;min-width:0;transition:border-color .15s,box-shadow .15s,transform .15s}
.gx-pcard:hover{border-color:var(--brand);box-shadow:0 6px 18px rgba(0,0,0,.06);transform:translateY(-1px)}
.gx-pcard .li-main{display:flex;flex-direction:column;gap:1px;min-width:0;flex:1}
.gx-pcard-ico{width:32px;height:32px;flex:none;border-radius:10px;background:var(--brand-soft,rgba(46,125,50,.1));display:grid;place-items:center;font-size:1.05rem}
.gx-pcard-line{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.gx-pcard-use{color:var(--brand);font-weight:600}
.gx-pcard-use.faint{color:var(--text-3);font-weight:400}
.gx-pcard-cost{flex:none;font-weight:750;font-size:.8rem;white-space:nowrap;background:var(--surface-2,rgba(0,0,0,.04));border-radius:999px;padding:3px 9px}
.gx-pcard.add{border-style:dashed;background:transparent;align-items:center}
.gx-pcard.add .gx-pcard-ico{background:transparent;border:1px dashed var(--line);color:var(--brand);font-weight:700}
.gx-sec-items{border-top:1px dashed var(--line);padding-top:6px}
.gx-sec-items>summary{display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none;font-size:.85rem;font-weight:600;padding:4px 2px}
.gx-sec-items>summary::-webkit-details-marker{display:none}
.gx-sec-items[open]>summary .tiny{display:none}
.gx-sec-items .gx-cost-list{margin:6px 0}
.gx-sec-add{margin-top:4px}
/* one-profile-per-section picker */
.gx-picks{display:flex;flex-direction:column;gap:10px}
.gx-pick{border:1px solid var(--line);border-radius:14px;padding:10px 12px;background:var(--surface)}
.gx-pick-h{display:flex;align-items:center;gap:8px;margin-bottom:8px;font-size:.9rem}
.gx-pick-ico{font-size:1.1rem}
.gx-pick-opts{display:flex;flex-wrap:wrap;gap:6px}
.gx-popt{display:inline-flex;align-items:center;gap:5px;font:inherit;font-size:.82rem;color:inherit;background:var(--surface-2,rgba(0,0,0,.03));border:1px solid var(--line);border-radius:999px;padding:6px 11px;cursor:pointer;max-width:100%}
.gx-popt small{color:var(--text-3);font-size:.72rem;margin-left:2px}
.gx-popt:hover{border-color:var(--brand)}
.gx-popt[aria-pressed="true"]{background:var(--brand);border-color:var(--brand);color:#fff}
.gx-popt[aria-pressed="true"] small{color:rgba(255,255,255,.8)}
.gx-popt.inh{font-style:normal;color:var(--text-2)}
.gx-popt.inh[aria-pressed="true"]{background:var(--brand-soft,rgba(46,125,50,.12));color:var(--text);border-color:var(--brand)}
.gx-popt.none[aria-pressed="true"]{background:var(--text-3);border-color:var(--text-3)}
.gx-pp-sec.own{border-color:var(--brand)}
.gx-pp-sec.own i::after{content:" ✍️"}
.gx-pp-sec.none b,.gx-pp-sec.auto b{color:var(--text-3);font-weight:500}
@media (max-width:640px){.gx-pcards{grid-template-columns:1fr}.gx-sec{padding:10px}.gx-popt{font-size:.8rem;padding:6px 10px}}
.gx-pcard .gx-pcard-cost{align-self:flex-start;margin:3px 0 2px;font-size:.74rem;padding:2px 8px;background:var(--brand-soft,rgba(46,125,50,.1));color:var(--brand)}
#gx-cp-form .gx-chans{flex-wrap:wrap;overflow:visible}
/* plant econ: profiles in use, per section */
#gx-econ .gx-pline{padding:10px 12px}
#gx-econ .gx-pline-h{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:6px}
.gx-psecs{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:6px}
.gx-psec{display:flex;flex-direction:column;gap:1px;padding:7px 10px;border-radius:10px;background:var(--surface);border:1px solid var(--line);min-width:0}
.gx-psec-k{font-size:11px;color:var(--text-3)}
.gx-psec b{font-size:.84rem;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gx-psec .tiny:empty{display:none}
.gx-psec.none b,.gx-psec.auto b{color:var(--text-3);font-weight:500}
.gx-psec.own{border-color:var(--brand);box-shadow:inset 3px 0 0 var(--brand)}
.gx-cat-prof{margin-left:8px;font-weight:500;font-size:.78rem;color:var(--text-2);background:var(--surface-2,rgba(0,0,0,.04));border-radius:999px;padding:1px 8px}
@media (max-width:640px){.gx-psecs{grid-template-columns:1fr 1fr}}

/* ---------- profile editor: each item gets its price in the profile */
.gx-cp-item{flex-wrap:wrap}
.gx-cp-item .li-main{min-width:120px}
.gx-cp-price{width:180px;flex:none}
.gx-cp-price{gap:6px}
.gx-cp-price .input{padding-right:10px;text-align:right;font-variant-numeric:tabular-nums;min-width:0}
.gx-cp-price .gx-affix.r{position:static;flex:none;min-width:46px;right:auto}
.gx-cp-item:not(.on) .gx-cp-price .input{color:var(--muted)}
.gx-cost-basis{font-size:12px;color:var(--muted);white-space:nowrap;padding:2px 8px;border-radius:999px;background:var(--surface-2)}
.gx-warn-t{color:var(--warn,#b7791f)}
@media (max-width:520px){
  .gx-cp-item .li-main{flex-basis:calc(100% - 40px)}
  .gx-cp-price{margin-left:34px;flex:1}
}
.gx-cp-price .input::-webkit-inner-spin-button,.gx-cp-price .input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.gx-cp-price .input{-moz-appearance:textfield}

/* ---------- Grower → Rules: two views (selling rules / costs & profiles) */
.gx-rv-bar{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 16px}
.gx-rv-tab{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:14px;border:1px solid var(--line);background:var(--surface);text-align:left;cursor:pointer;color:var(--text);transition:border-color .15s,box-shadow .15s,background .15s}
.gx-rv-tab:hover{border-color:var(--brand)}
.gx-rv-tab[aria-selected="true"]{border-color:var(--brand);background:var(--brand-soft);box-shadow:inset 0 0 0 1px var(--brand)}
.gx-rv-tab .li-main{display:flex;flex-direction:column;min-width:0}
.gx-rv-tab b{font-size:.98rem}
.gx-rv-ico{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:var(--surface-2);font-size:1.2rem;flex:none}
.gx-rv-tab[aria-selected="true"] .gx-rv-ico{background:var(--surface)}

.gx-chainbar{display:flex;align-items:center;flex-wrap:wrap;gap:6px;padding:10px 14px;margin-bottom:16px}
.gx-chainbar-step{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:99px;background:var(--surface-2);border:1px solid var(--line-2);font-size:.84rem;color:var(--text)}
a.gx-chainbar-step:hover{border-color:var(--brand);color:var(--brand)}
.gx-chainbar-step .pill{height:18px;font-size:.68rem;padding:0 6px}
.gx-chainbar-arrow{color:var(--text-3);font-weight:700}
.gx-chainbar-note{margin-left:auto}
.gx-chainbar-note a{color:var(--brand);font-weight:600}

.gx-defaults{margin-bottom:22px}
.gx-dgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px}
.gx-dpanel{padding:12px 14px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line-2);min-width:0}
.gx-dpanel-h{display:flex;align-items:center;gap:6px;font-weight:700;font-size:.82rem;margin-bottom:8px;color:var(--text)}
.gx-dpanel-h a{margin-left:auto;color:var(--brand);font-weight:600}
.gx-dpanel dl{margin:0;display:flex;flex-direction:column;gap:5px}
.gx-dpanel dl div{display:flex;justify-content:space-between;gap:10px;font-size:.82rem}
.gx-dpanel dt{color:var(--text-2)}
.gx-dpanel dd{margin:0;font-weight:650;text-align:right;font-variant-numeric:tabular-nums}
.gx-dpanel-costs{grid-column:span 2}
.gx-dpicks{list-style:none;margin:0 0 8px;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:6px}
.gx-dpicks li{display:flex;flex-direction:column;padding:6px 9px;border-radius:9px;background:var(--surface);border:1px solid var(--line-2);font-size:.78rem;color:var(--text-2)}
.gx-dpicks li b{color:var(--text-3);font-weight:600}
.gx-dpicks li.on b{color:var(--text);font-weight:700}
.gx-dprod{display:flex;justify-content:space-between;gap:8px;padding-top:8px;border-top:1px dashed var(--line);margin-bottom:2px}

.gx-facts{display:flex;flex-wrap:wrap;gap:5px}
.gx-fact{display:inline-flex;gap:5px;align-items:baseline;padding:3px 8px;border-radius:8px;background:var(--surface-2);border:1px solid var(--line-2);font-size:.74rem;color:var(--text-2);max-width:100%}
.gx-fact b{color:var(--text);font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gx-fact.more{background:transparent;font-weight:650}
.gx-strat{gap:10px}
.gx-strat-h{display:flex;gap:10px;align-items:flex-start}
.gx-strat-f{display:flex;justify-content:space-between;margin-top:auto;padding-top:8px;border-top:1px solid var(--line-2);font-weight:650}
.gx-strat .gx-fact{background:var(--surface)}

.gx-spec-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:12px 18px;border-bottom:1px solid var(--line-2)}
.gx-spec-q{flex:1 1 220px;max-width:360px}
.gx-rrow.child{padding-left:42px;background:color-mix(in srgb,var(--surface-2) 45%,transparent);position:relative}
.gx-rrow.child::before{content:'';position:absolute;left:26px;top:0;bottom:50%;width:10px;border-left:2px solid var(--line);border-bottom:2px solid var(--line);border-bottom-left-radius:6px}
.gx-rparent{padding:8px 18px 2px}
.gx-rempty{padding:18px}
.gx-sec{scroll-margin-top:120px}
#gx-global,#gx-strats,#gx-specific{scroll-margin-top:90px}

@media (max-width:720px){
  .gx-rv-bar{gap:8px}
  .gx-rv-tab{padding:10px;gap:8px;flex-direction:column;align-items:flex-start}
  .gx-rv-ico{width:32px;height:32px;font-size:1rem}
  .gx-rv-tab b{font-size:.88rem}
  .gx-chainbar{padding:8px 10px;gap:4px}
  .gx-chainbar-step{padding:4px 8px;font-size:.76rem}
  .gx-chainbar-note{margin-left:0;flex-basis:100%}
  .gx-dpanel-costs{grid-column:auto}
  .gx-dgrid{grid-template-columns:1fr}
  .gx-spec-tools{padding:10px 14px}
  .gx-spec-q{max-width:none}
  .gx-rrow.child{padding-left:30px}
  .gx-rrow.child::before{left:14px}
}
.gx-spec-tools .segmented{flex:none;width:auto}
.gx-dunset{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:10px}
@media (max-width:720px){ .gx-spec-tools .segmented{width:100%} }
.gx-dgrid{grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}
.gx-dpanel-costs{grid-column:1/-1}
.gx-dpicks{grid-template-columns:repeat(auto-fill,minmax(170px,1fr))}
.gx-scope-ico{display:none;margin-right:5px;font-style:normal}
@media (max-width:720px){
  .gx-hide-sm{display:none}
  .gx-defaults .card-head h2{font-size:1.05rem}
  .gx-chainbar{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
  .gx-chainbar::-webkit-scrollbar{display:none}
  .gx-chainbar-step{flex:none}
  .gx-chainbar-note{display:none}
  .gx-dpicks{grid-template-columns:1fr 1fr}
  .gx-rrow{flex-wrap:nowrap;align-items:flex-start;gap:8px}
  .gx-rrow .li-main{flex:1;flex-basis:auto;order:0}
  .gx-rrow .gx-scope{display:none}
  .gx-scope-ico{display:inline}
  .gx-rrow > .pill{flex:none;order:1}
  .gx-rrow > .faint{order:2;align-self:center}
}
.gx-spec-tools .segmented button{white-space:nowrap}
@media (max-width:720px){
  .gx-defaults .card-head h2{white-space:nowrap}
  .gx-defaults .card-head{gap:8px}
  .gx-rrow > .faint{display:none}
  .gx-rrow .gx-fact:nth-child(n+4):not(.more){display:none}
}

/* ===================================================================
   Dashboard: customizable board (order, width, height per card; masonry packing)
   =================================================================== */
.dash-board{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));grid-auto-rows:4px;column-gap:18px;align-items:start;margin-bottom:26px}
.dash-cell{grid-column:span 6;min-width:0;container-type:inline-size;position:relative}
.dash-cell[hidden]{display:none}
.dash-cell[data-size="S"]{grid-column:span 4}
.dash-cell[data-size="M"]{grid-column:span 6}
.dash-cell[data-size="L"]{grid-column:span 8}
.dash-cell[data-size="F"]{grid-column:1/-1}
.dash-cell-body>*,.dash-cell-body>*>*{margin-bottom:0!important}
.dash-cell-body>div>*+*{margin-top:18px}
.dash-cell-body .section-title{margin-top:0}
.dash-cell[data-h="short"] .dash-cell-body{max-height:340px;overflow:auto;border-radius:var(--radius);overscroll-behavior:contain}
.dash-cell[data-h="tall"] .dash-cell-body{max-height:620px;overflow:auto;border-radius:var(--radius);overscroll-behavior:contain}
.dash-cell-empty{display:none}
.dash-cell.is-empty .dash-cell-body{display:none}
.dash-board:not(.editing) .dash-cell.is-empty{display:none}
.dash-board .group-strip{grid-template-columns:repeat(auto-fill,minmax(320px,1fr))}
.dash-groups .empty{padding:18px;border:1px dashed var(--line);border-radius:var(--radius)}

/* narrow cards adapt to their own width */
@container (max-width:680px){
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ai-hero{grid-template-columns:1fr}
}
@container (max-width:560px){
  .gx-dash{gap:10px}
  .gx-dstats{grid-template-columns:repeat(2,minmax(0,1fr));flex-basis:100%}
}

/* edit mode */
.dash-custom-btn[aria-pressed="true"]{background:var(--brand-soft);color:var(--brand)}
.dash-editbar{position:sticky;top:calc(var(--topbar-h,65px) + 6px);z-index:8;display:flex;flex-direction:column;gap:8px;padding:10px 14px;margin-bottom:16px;border:1px solid var(--brand);box-shadow:var(--shadow)}
.dash-editbar-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.dash-editbar .select{width:auto}
.dash-hidden .chip-filter{font-size:.8rem}
.dash-board.editing .dash-cell{outline:2px dashed color-mix(in srgb,var(--brand) 45%,transparent);outline-offset:4px;border-radius:var(--radius)}
.dash-board.editing .dash-cell-body{pointer-events:none;user-select:none;opacity:.85}
.dash-board.editing .dash-cell.is-empty .dash-cell-empty{display:block;padding:18px;border-radius:var(--radius);background:var(--surface-2);text-align:center}
.dash-cell-bar:empty{display:none}
.dash-cell-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:6px 8px;margin-bottom:8px;border-radius:12px;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow-sm)}
.dash-grip{cursor:grab;font-size:1.1rem;color:var(--text-3);padding:0 2px;user-select:none}
.dash-cell.dragging{opacity:.45}
.dash-cell-name{font-size:.86rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.dash-seg button{padding:4px 9px;font-size:.76rem;min-height:0}
.dash-moves{display:inline-flex;gap:2px}

@media (max-width:1020px){
  .dash-cell[data-size="S"],.dash-cell[data-size="M"]{grid-column:span 6}
  .dash-cell[data-size="L"]{grid-column:1/-1}
}
@media (max-width:720px){
  .dash-board{grid-template-columns:minmax(0,1fr);column-gap:0}
  .dash-cell[data-size]{grid-column:1/-1}
  .dash-board.editing .dash-cell{outline-offset:2px}
  .dash-cell-bar .dash-seg[aria-label="Width"]{display:none}
  .dash-editbar{top:calc(var(--topbar-h,58px) + 4px)}
}
.dash-cell.drop-before::before,.dash-cell.drop-after::after{content:"";position:absolute;left:0;right:0;height:4px;border-radius:4px;background:var(--brand);z-index:3;pointer-events:none}
.dash-cell.drop-before::before{top:-11px}
.dash-cell.drop-after::after{bottom:-11px}

/* Care plan: analysis findings, history numbers, species profile */
.cp-findings{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.cp-find{display:grid;grid-template-columns:10px minmax(0,1fr) auto;gap:10px;align-items:baseline;padding:9px 12px;border-radius:12px;background:var(--surface-2);font-size:.9rem}
.cp-find-dot{width:8px;height:8px;border-radius:50%;background:var(--warn);transform:translateY(-1px)}
.cp-find.ok .cp-find-dot{background:var(--ok)} .cp-find.danger .cp-find-dot{background:var(--danger)}
.cp-find.danger{background:var(--danger-soft)}
.cp-basis{display:inline-flex;align-items:center;gap:4px;font-size:.72rem;font-weight:600;color:var(--text-3);white-space:nowrap;padding:2px 8px;border-radius:999px;background:var(--surface);border:1px solid var(--line)}
.cp-act-main .cp-basis{align-self:flex-start;margin-top:3px}
.cp-fit{display:flex;gap:10px;align-items:flex-start;margin-top:8px;padding:10px 12px;border-radius:12px;border:1px dashed var(--line)}
.cp-fit-ico{font-size:1.2rem;line-height:1.2}
.cp-hstats{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin-top:12px}
.cp-hstat{display:flex;flex-direction:column;gap:2px;padding:10px 12px;border-radius:12px;background:var(--surface-2);min-width:0}
.cp-hstat-l{font-size:.76rem;color:var(--text-3)}
.cp-hstat b{font-size:1.05rem}
.cp-hl{margin:12px 0 0;padding-left:18px;display:flex;flex-direction:column;gap:4px;font-size:.88rem}
.cp-past{margin-top:10px}
.cp-research dl{margin-top:10px}
.cp-rlists{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;margin-top:12px}
.cp-rlist{padding:10px 12px;border-radius:12px;background:var(--surface-2);font-size:.86rem}
.cp-rlist ul{margin:6px 0 0;padding-left:18px;display:flex;flex-direction:column;gap:3px}
@media (max-width:720px){
  .cp-find{grid-template-columns:10px minmax(0,1fr)}
  .cp-find .cp-basis{grid-column:2;justify-self:start}
  .cp-hstats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cp-details summary{flex-wrap:wrap;row-gap:2px}
  .cp-details summary>.faint{flex-basis:100%;padding-left:18px}
}

/* purchase price field (add plant / details) */
.price-field .input-unit{position:relative}
.price-field .input-unit .input{padding-right:34px}
.price-field .input-unit span{position:absolute;right:12px;top:50%;transform:translateY(-50%);color:var(--text-3);font-weight:600;pointer-events:none}
.price-field .input:disabled{opacity:.7;cursor:not-allowed}
.price-field .hint{display:block;margin-top:4px;font-size:.78rem;color:var(--text-3)}
.price-field input[type=number]{-moz-appearance:textfield;appearance:textfield}
.price-field input[type=number]::-webkit-inner-spin-button,.price-field input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
/* secondary value under a bar label (e.g. journeys of a mother plant) */
.anl-bn { display: block; font-size: 10.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; }

/* edit plant */
.ph-title-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.ph-edit{gap:6px;color:var(--text-2)}
.ph-edit span{font-size:.85rem}
@media (max-width:720px){.ph-edit span{display:none}}
.link-btn{background:none;border:0;padding:0;font:inherit;color:var(--brand);font-weight:600;cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.link-btn:hover{color:var(--text)}
.pe-sheet .q-title{margin-bottom:10px}
.pe-sheet .choices{gap:8px}
.pe-sheet .field[hidden]{display:none}
#pe-dirty{color:var(--warn)}
.kv-sec+.kv-sec{margin-top:16px;padding-top:14px;border-top:1px dashed var(--line)}
.kv-h{display:flex;align-items:center;justify-content:space-between;font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--text-3);margin-bottom:8px}
.kv-h .link-btn{text-transform:none;letter-spacing:0;font-size:.82rem}
.kv-notes{margin:0;white-space:pre-wrap;color:var(--text-2)}

/* ================= Weather v2: themed "now" hero, adaptive forecast, stat tiles ================= */
.wx-card,.wx-spot{container-type:inline-size}
.wx-card .fold-body{padding:12px 16px 16px;display:flex;flex-direction:column;gap:14px}
.wx-sec-h{font-size:.7rem;font-weight:750;text-transform:uppercase;letter-spacing:.07em;color:var(--text-3);margin:2px 2px -6px}
/* hero */
.wx-hero{position:relative;isolation:isolate;border-radius:18px;padding:14px 16px 14px;color:#fff;overflow:hidden;
  background:linear-gradient(140deg,#4d8fdb,#86c0f2);box-shadow:0 8px 24px -14px rgba(20,40,80,.55),inset 0 1px 0 rgba(255,255,255,.25)}
.wx-hero::before{content:"";position:absolute;z-index:-1;right:-60px;top:-70px;width:220px;height:220px;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.4),transparent 68%)}
.wx-hero::after{content:"";position:absolute;z-index:-1;left:-40px;bottom:-90px;width:200px;height:160px;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.14),transparent 70%)}
:is(.wx-hero,.wx-spot-kind).t-clear{background:linear-gradient(140deg,#f29a35 0%,#f6c463 42%,#62aef0 100%)}
:is(.wx-hero,.wx-spot-kind).t-partly{background:linear-gradient(140deg,#4f95e2 0%,#8fc3f2 62%,#f2cf7f 100%)}
:is(.wx-hero,.wx-spot-kind).t-cloudy{background:linear-gradient(140deg,#6f8197 0%,#a3b2c4 100%)}
:is(.wx-hero,.wx-spot-kind).t-rain{background:linear-gradient(140deg,#35567f 0%,#6487b0 100%)}
:is(.wx-hero,.wx-spot-kind).t-storm{background:linear-gradient(140deg,#262c3f 0%,#525d79 100%)}
:is(.wx-hero,.wx-spot-kind).t-fog{background:linear-gradient(140deg,#8b959f 0%,#c3cad0 100%)}
:is(.wx-hero,.wx-spot-kind).t-snow{background:linear-gradient(140deg,#8fb0d6 0%,#d7e6f6 100%)}
:is(.wx-hero,.wx-spot-kind).t-night{background:linear-gradient(140deg,#151f3d 0%,#2f4373 70%,#4a5f93 100%)}
.t-cloudy.t-night:is(.wx-hero,.wx-spot-kind){background:linear-gradient(140deg,#1f2738 0%,#465269 100%)}
.wx-hero-top{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.8rem}
.wx-place{font-weight:700;letter-spacing:.01em;text-shadow:0 1px 2px rgba(0,0,0,.15);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wx-hero-upd{display:flex;align-items:center;gap:6px;flex:none}
.wx-hero .wx-upd{color:rgba(255,255,255,.85)!important;opacity:1}
.wx-refresh{width:26px;height:26px;border-radius:50%;border:0;background:rgba(255,255,255,.2);color:#fff;font-size:.9rem;cursor:pointer;display:grid;place-items:center;transition:background .15s,transform .3s}
.wx-refresh:hover{background:rgba(255,255,255,.35);transform:rotate(90deg)}
.wx-hero-main{display:flex;align-items:center;gap:12px;margin:8px 0 12px}
.wx-hero-i{font-size:3.4rem;line-height:1;filter:drop-shadow(0 4px 8px rgba(0,0,0,.18))}
.wx-hero-t{display:flex;flex-direction:column;min-width:0}
.wx-hero-t b{font-size:3rem;font-weight:700;letter-spacing:-.04em;line-height:.95;text-shadow:0 2px 6px rgba(0,0,0,.12)}
.wx-hero-l{font-weight:650;font-size:.95rem;margin-top:4px}
.wx-hero-hl{font-size:.78rem;opacity:.88}
.wx-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.wx-m{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:6px;align-items:center;padding:7px 9px;border-radius:12px;
  background:rgba(255,255,255,.17);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);border:1px solid rgba(255,255,255,.18);min-width:0}
.wx-m>span{grid-row:span 2;font-size:1rem}
.wx-m b{font-size:.9rem;font-weight:750;white-space:nowrap}
.wx-m small{font-size:.66rem;opacity:.85;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.t-snow,.t-fog{color:#1d2b3c}.t-snow .wx-upd,.t-fog .wx-upd{color:rgba(20,30,45,.7)!important}.t-snow .wx-refresh,.t-fog .wx-refresh{color:#1d2b3c}
@container (max-width:440px){.wx-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.wx-hero-t b{font-size:2.6rem}.wx-hero-i{font-size:2.9rem}}

/* forecast: list rows (narrow) */
.wx-days{display:flex;flex-direction:column;gap:0;padding:2px 12px;border-radius:16px;background:var(--surface-2);border:1px solid var(--line-2)}
.wx-day{display:grid;grid-template-columns:44px 26px minmax(34px,auto) 30px minmax(40px,1fr) 30px;align-items:center;gap:8px;padding:8px 0;
  border:0;border-bottom:1px solid var(--line-2);border-radius:0;background:none;min-width:0}
.wx-day:last-child{border-bottom:0}
.wx-day.today{background:none;border-color:var(--line-2)}
.wx-dn{font-size:.82rem;font-weight:700;color:var(--text);text-transform:none;letter-spacing:0}
.wx-day.today .wx-dn{color:var(--brand)}
.wx-di{font-size:1.25rem;line-height:1;text-align:center}
.wx-dp{display:flex;flex-direction:column;line-height:1.1;font-size:.68rem;color:var(--water);min-width:0}
.wx-dp b{font-weight:750;font-size:.72rem;white-space:nowrap}
.wx-dp span{opacity:.8}
.wx-lo,.wx-hi{font-size:.84rem;font-variant-numeric:tabular-nums}
.wx-lo{text-align:right;color:var(--text-3);font-weight:600}
.wx-hi{font-weight:750}
.wx-hi.hot{color:var(--danger)}
.wx-lo.cold{color:var(--water)}
.wx-lo.frost{color:#fff;background:var(--water);border-radius:6px;padding:0 4px;text-align:center}
.wx-range{position:relative;height:6px;border-radius:99px;background:color-mix(in srgb,var(--text-3) 18%,transparent);margin:0;width:auto;display:block}
.wx-range i{position:absolute;top:0;bottom:0;left:var(--l);right:var(--r);min-width:6px;border-radius:99px;background:linear-gradient(90deg,var(--a),var(--b))}
.wx-day .wx-sun{display:none}
/* forecast: tiles (wide) */
@container (min-width:560px){
  .wx-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;padding:0;background:none;border:0}
  .wx-day{display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 4px 9px;border:1px solid var(--line-2);border-radius:16px;background:var(--surface-2)}
  .wx-day:last-child{border-bottom:1px solid var(--line-2)}
  .wx-day.today{background:var(--brand-soft);border-color:color-mix(in srgb,var(--brand) 35%,transparent)}
  .wx-dn{font-size:.7rem;text-transform:uppercase;letter-spacing:.06em;color:var(--text-2);order:1}
  .wx-di{font-size:1.6rem;order:2;margin:2px 0}
  .wx-hi{order:3}
  .wx-range{order:4;width:6px;height:42px}
  .wx-range i{left:0;right:0;top:var(--r);bottom:var(--l);min-height:6px;min-width:0;background:linear-gradient(0deg,var(--a),var(--b))}
  .wx-lo{order:5;text-align:center}
  .wx-dp{order:6;align-items:center;min-height:1.6em}
  .wx-day .wx-sun{display:block;order:7;font-size:.66rem;color:var(--sand)}
}
/* stat tiles */
.wx-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(138px,1fr));gap:8px}
.wx-stat{display:flex;gap:10px;align-items:center;padding:9px 11px;border-radius:14px;background:var(--surface-2);border:1px solid var(--line-2);min-width:0}
.wx-stat>span:last-child{display:flex;flex-direction:column;min-width:0}
.wx-stat b{font-size:.95rem;font-weight:750;line-height:1.15}
.wx-stat small{font-size:.7rem;color:var(--text-3);line-height:1.2}
.wx-stat-i{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;flex:none;background:var(--surface);font-size:1rem}
.wx-stat.water .wx-stat-i{background:var(--water-soft)}.wx-stat.sand .wx-stat-i{background:var(--sand-soft)}
.wx-stat.sun .wx-stat-i{background:var(--warn-soft)}.wx-stat.dry .wx-stat-i{background:var(--violet-soft)}
.wx-stat.warn{background:var(--warn-soft);border-color:color-mix(in srgb,var(--warn) 25%,transparent)}
.wx-stat.danger{background:var(--danger-soft);border-color:color-mix(in srgb,var(--danger) 25%,transparent)}
.wx-stat.danger b{color:var(--danger)}
/* alerts, impact, ok */
.wx-alerts{margin-top:0;gap:8px}
.wx-alert{border-left-width:4px;padding:10px 12px}
.wx-alert.danger{border-left-color:var(--danger)}.wx-alert.warn{border-left-color:var(--warn)}.wx-alert.water{border-left-color:var(--water)}
.wx-impact{margin-top:0;border-top:0;padding-top:0;display:flex;flex-direction:column;gap:4px}
.wx-impact .wx-sec-h{margin-bottom:2px}
.wx-imp{border:1px solid var(--line-2);background:var(--surface)}
.wx-ok{margin-top:0;padding:10px 12px;border-radius:14px;background:var(--ok-soft);color:var(--ok);font-weight:650;font-size:.86rem}
/* spot card */
.wx-spot .card-body{gap:14px}
.wx-spot-kind{padding:12px 14px;border-radius:16px;color:#fff;background:linear-gradient(140deg,#4d8fdb,#86c0f2);box-shadow:inset 0 1px 0 rgba(255,255,255,.2)}
.wx-spot-kind .tiny.faint{color:rgba(255,255,255,.85)!important;opacity:1}
.wx-spot-kind b{text-shadow:0 1px 2px rgba(0,0,0,.15)}
.wx-spot-kind a{color:#fff;text-decoration:underline}
.wx-spot-kind.t-snow,.wx-spot-kind.t-fog{color:#1d2b3c}.wx-spot-kind.t-snow .tiny.faint,.wx-spot-kind.t-fog .tiny.faint{color:rgba(20,30,45,.7)!important}
.wx-spot-i{background:rgba(255,255,255,.22);border:1px solid rgba(255,255,255,.25)}
.wx-spot .wx-days{gap:0}
.wx-spot .wx-day{padding:8px 0}
.wx-spot .wx-di{font-size:1.25rem}
.wx-spot .wx-dt{font-size:inherit}
@container (min-width:560px){.wx-spot .wx-days{gap:8px}.wx-spot .wx-day{padding:10px 4px 9px}.wx-spot .wx-di{font-size:1.5rem}}
.wx-rule{border-radius:14px}
.wx-water{border-radius:14px;border:1px solid color-mix(in srgb,var(--water) 20%,transparent)}
.wx-indoor{border-radius:14px}

/* ===================== Propagation, deeper: mother fatigue, plans, experiments ===================== */
.gx-tabs{overflow-x:auto;scrollbar-width:none;max-width:100%}.gx-tabs::-webkit-scrollbar{display:none}
.pp-fat{display:flex;flex-direction:column;gap:8px}
.pp-fat-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pp-fmeter-bar{position:relative;height:8px;border-radius:99px;background:var(--surface-2);border:1px solid var(--line-2);overflow:hidden}
.pp-fmeter-bar i{position:absolute;inset:0 auto 0 0;border-radius:99px;background:var(--ok)}
.pp-fmeter.t-busy .pp-fmeter-bar i{background:var(--warn)}.pp-fmeter.t-tired .pp-fmeter-bar i{background:var(--danger)}
.pp-fmeter .tiny{margin-top:4px;color:var(--text-2)}
.pp-fat-why{margin:0;padding-left:18px;font-size:.82rem;color:var(--text-2)}
.pp-fat-adv{font-size:.84rem;padding:8px 10px;border-radius:10px;background:var(--surface-2);border:1px solid var(--line-2)}
.pp-fat.t-tired .pp-fat-adv{background:var(--danger-soft);border-color:transparent}
.pp-fat.t-busy .pp-fat-adv{background:var(--warn-soft);border-color:transparent}
.pp-mload{margin-bottom:12px;padding-bottom:12px;border-bottom:1px dashed var(--line)}
.pp-fatigue{margin-top:10px}
.pp-fat-row{display:flex;gap:10px;padding:10px 12px;border-radius:12px;background:var(--warn-soft);border:1px solid color-mix(in srgb,var(--warn) 30%,transparent)}
.pp-fat-row.t-tired{background:var(--danger-soft);border-color:color-mix(in srgb,var(--danger) 30%,transparent)}
.pp-fat-ico{font-size:1.4rem;line-height:1}
.pp-mkpis{display:grid;grid-template-columns:repeat(3,minmax(110px,1fr)) minmax(260px,2fr);gap:12px;margin-bottom:16px}
.pp-kpi.t-danger b{color:var(--danger)}.pp-kpi.t-warn b{color:var(--warn)}.pp-kpi.t-ok b{color:var(--ok)}
.pp-mset{flex-direction:row!important;align-items:center;gap:10px!important}.pp-mset .small{font-weight:500!important}
.pp-mgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}
.pp-mcard{padding:14px;display:flex;flex-direction:column;gap:10px;border-top:4px solid var(--ok)}
.pp-mcard.t-busy{border-top-color:var(--warn)}.pp-mcard.t-tired{border-top-color:var(--danger)}
.pp-mcard-top a{color:inherit;text-decoration:none}
.pp-mcard-act{display:flex;align-items:center;gap:8px;margin-top:auto}
.pp-mhist ul{margin:6px 0 0;padding-left:18px}
.pp-foot{margin-top:14px}
@media (max-width:760px){.pp-mkpis{grid-template-columns:repeat(3,1fr)}.pp-mset{grid-column:1/-1}}

.pp-plan-cols{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:16px;align-items:start}
@media (max-width:980px){.pp-plan-cols{grid-template-columns:1fr}}
.pp-plan-q{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:1.05rem;font-weight:650;margin-bottom:14px}
.pp-plan-q .input{height:42px}.pp-in-n{width:90px}.pp-in-s{flex:1;min-width:180px}.pp-in-d{width:160px}
.pp-plan-go{display:flex;align-items:center;gap:12px;margin-top:12px}
.pp-chk{display:flex;align-items:center;gap:8px}
.pp-est{border-top:1px solid var(--line);padding:16px;display:flex;flex-direction:column;gap:12px}
.pp-est-head{padding:14px 16px;border-radius:14px;background:linear-gradient(135deg,var(--brand-soft),var(--surface-2))}
.pp-est-head.late{background:linear-gradient(135deg,var(--danger-soft),var(--surface-2))}
.pp-est-head h2{margin:4px 0 0;font-size:1.12rem;line-height:1.35}
.pp-est-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.pp-est-kpis>div,.pp-plan-facts>div{display:flex;flex-direction:column;padding:10px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line-2);min-width:0}
.pp-est-kpis span,.pp-plan-facts span{font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;color:var(--text-3);font-weight:700}
.pp-est-kpis b,.pp-plan-facts b{font-size:1.25rem}.pp-est-kpis i,.pp-plan-facts i{font-style:normal;font-size:.75rem;color:var(--text-3)}
@media (max-width:560px){.pp-est-kpis{grid-template-columns:repeat(2,1fr)}}
.pp-est-warn{padding:9px 12px;border-radius:10px;font-size:.86rem;background:var(--warn-soft)}.pp-est-warn.t-danger{background:var(--danger-soft)}
.pp-est-steps{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px;font-size:.92rem}
.pp-est-steps li::marker{font-weight:800;color:var(--brand)}
.pp-est-m{width:100%;border-collapse:collapse;font-size:.86rem}.pp-est-m td,.pp-est-m th{padding:6px 8px;border-bottom:1px solid var(--line-2);text-align:left}
.pp-est-m tr.is-take td{background:var(--brand-soft)}
.pp-months{display:grid;grid-template-columns:repeat(12,1fr);gap:4px;height:70px;align-items:end}
.pp-month{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;gap:2px}
.pp-month i{width:100%;border-radius:4px 4px 0 0;background:var(--brand-2);opacity:.85}.pp-month.none i{background:var(--line)}
.pp-month b{font-size:.68rem;color:var(--text-3)}
.pp-est-how{margin:6px 0 0;padding-left:18px;display:flex;flex-direction:column;gap:4px}
.pp-est-save{display:flex;gap:8px;border-top:1px solid var(--line)}.pp-est-save .input{flex:1}
.pp-h2{font-size:1rem;margin:0 0 10px}
.pp-plan-list{display:flex;flex-direction:column;gap:12px}
.pp-plan{padding:14px;display:flex;flex-direction:column;gap:10px;border-left:4px solid var(--line)}
.pp-plan.t-late{border-left-color:var(--danger)}.pp-plan.t-due_soon,.pp-plan.t-in_progress{border-left-color:var(--warn)}.pp-plan.t-started{border-left-color:var(--ok)}
.pp-plan-top{display:flex;align-items:center;gap:10px}
.pp-plan-facts{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.pp-plan-bar{height:8px;border-radius:99px;background:var(--surface-2);overflow:hidden;border:1px solid var(--line-2)}.pp-plan-bar i{display:block;height:100%;background:var(--brand-2)}
.pp-plan-js{display:flex;flex-wrap:wrap;gap:6px}
.pp-plan-act{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.pp-plan-old summary{cursor:pointer;margin:6px 0}.pp-plan-old .pp-plan{margin-top:10px;opacity:.8}

.pp-ab-box{margin:4px 0 14px;padding:10px 12px;border:1px dashed var(--line);border-radius:12px;background:var(--surface-2)}
.pp-ab-box summary{cursor:pointer}
.pp-ab-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.pp-ab-grid label{display:flex;flex-direction:column;gap:4px}
@media (max-width:620px){.pp-ab-grid{grid-template-columns:1fr}}
.pp-abk{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:6px;font-size:.7rem;font-weight:800;color:#fff;background:#6c5ce7;vertical-align:middle}
.pp-abk.k-b{background:#e17055}
.pp-arms{display:flex;flex-direction:column;gap:10px}
.pp-arm{padding:10px 12px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line-2)}
.pp-arm.win{border-color:var(--ok);box-shadow:0 0 0 2px var(--ok-soft)}
.pp-arm-h{display:flex;align-items:center;gap:8px}.pp-arm-r{font-size:1.15rem}
.pp-arm-bar{display:flex;height:8px;border-radius:99px;overflow:hidden;background:var(--line-2);margin:6px 0 4px}
.pp-arm-bar .ok{background:var(--ok)}.pp-arm-bar .fail{background:var(--danger)}
.pp-verdict{display:flex;gap:10px;margin-top:12px;padding:10px 12px;border-radius:12px;background:var(--surface-2)}
.pp-verdict>span{font-size:1.4rem;line-height:1}
.pp-verdict.v-clear{background:var(--ok-soft)}.pp-verdict.v-lean{background:var(--warn-soft)}
.pp-exp-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(380px,1fr));gap:14px}
@media (max-width:520px){.pp-exp-list{grid-template-columns:1fr}}
.pp-exp-batches{list-style:none;margin:12px 0 0;padding:0;display:flex;flex-direction:column;gap:6px}
.pp-exp-batches li{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:2px 8px;font-size:.88rem;padding-top:8px;border-top:1px solid var(--line-2)}
.pp-exp-batches li a{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pp-exp-batches li .pill{grid-column:2;grid-row:1}
.pp-exp-batches li .tiny{grid-column:1/-1}
.pp-exp-empty{text-align:center;max-width:640px;margin:0 auto}.pp-exp-ill{font-size:2.2rem;margin-bottom:6px}

/* ===================== Weekly review ===================== */
.rv-hero{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.rv-mood{font-size:2rem;line-height:1}
.rv-score{--p:50;width:52px;height:52px;border-radius:50%;display:grid;place-items:center;flex:none;
  background:conic-gradient(var(--brand-2) calc(var(--p)*1%),var(--line-2) 0)}
.rv-score span{width:40px;height:40px;border-radius:50%;background:var(--surface);display:grid;place-items:center;font-weight:800;font-size:.9rem}
.rv-kpis{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-bottom:12px}
.rv-kpis.full{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
.rv-kpi{display:flex;flex-direction:column;padding:8px 10px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line-2);min-width:0}
.rv-kpi-l{font-size:.74rem;color:var(--text-3);font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rv-kpi b{font-size:1.15rem}.rv-kpi i{font-style:normal;font-size:.74rem;color:var(--text-3)}
.rv-kpi.t-ok i{color:var(--ok)}.rv-kpi.t-bad i{color:var(--danger)}
.rv-cols{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@container (max-width:440px){.rv-cols{grid-template-columns:1fr}}
@media (max-width:560px){.rv-cols{grid-template-columns:1fr}}
.rv-block{padding:10px 12px;border-radius:12px;border-left:4px solid var(--line);background:var(--surface-2);margin-bottom:10px}
.rv-block.good{border-left-color:var(--ok)}.rv-block.fix{border-left-color:var(--danger)}.rv-block.focus{border-left-color:var(--water,#1d5fa8)}
.rv-bt{font-weight:750;font-size:.88rem;margin-bottom:6px}
.rv-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.rv-list li>a,.rv-list li>span{display:flex;gap:8px;font-size:.88rem;color:var(--text);text-decoration:none;line-height:1.35}
.rv-list li>a:hover{color:var(--brand)}
.rv-ico{flex:none;width:20px;text-align:center}
.rv-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:4px}
.rv-banner{display:flex;align-items:center;gap:14px;padding:16px 18px;border-radius:16px;color:#fff;margin-bottom:14px;
  background:linear-gradient(135deg,#1f5f45,#2e7d5b)}
.rv-banner.m-mixed{background:linear-gradient(135deg,#8a6d1f,#c49a2c)}.rv-banner.m-rough{background:linear-gradient(135deg,#7a3326,#b4533e)}
.rv-banner.m-great{background:linear-gradient(135deg,#1f5f45,#3aa374)}
.rv-banner h2{margin:2px 0;font-size:1.35rem;color:#fff}.rv-banner .small{opacity:.9}
.rv-summary{padding:12px 14px;border-radius:14px;background:var(--brand-soft);margin-bottom:14px}
.rv-summary p{margin:6px 0 4px;line-height:1.5}
.rv-k{font-size:.72rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--brand)}
.rv-wx{margin:-4px 0 12px}
.rv-set{margin-top:16px}

/* ===================== Voice log ===================== */
.top-voice{display:none;border:0;background:none;cursor:pointer;font-size:1.05rem}
body.ai-on .top-voice{display:inline-grid}
.vx-sheet{max-width:520px}
.vx-body{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center}
.vx-orb{position:relative;width:110px;height:110px;border-radius:50%;border:0;cursor:pointer;margin:8px 0;display:grid;place-items:center;
  background:radial-gradient(circle at 35% 30%,#7be0b0,#2e7d5b 70%);box-shadow:0 10px 30px color-mix(in srgb,var(--brand) 35%,transparent)}
.vx-mic{font-size:2.4rem;position:relative;z-index:1}
.vx-ring{position:absolute;inset:0;border-radius:50%;border:2px solid var(--brand-2);opacity:0}
.vx-orb.on{background:radial-gradient(circle at 35% 30%,#ff9d8a,#c2412d 70%);box-shadow:0 10px 30px color-mix(in srgb,var(--danger) 40%,transparent)}
.vx-orb.on .vx-ring{animation:vx-pulse 1.6s ease-out infinite;border-color:var(--danger)}
.vx-orb.on .vx-ring.r2{animation-delay:.8s}
@keyframes vx-pulse{0%{transform:scale(1);opacity:.7}100%{transform:scale(1.7);opacity:0}}
@media (prefers-reduced-motion:reduce){.vx-orb.on .vx-ring{animation:none;opacity:.5}}
.vx-state{font-weight:650}
.vx-text{width:100%;min-height:96px;text-align:left;font-size:1rem;line-height:1.45}
.vx-tips{max-width:420px}

/* ===================== Pest & disease library ===================== */
.hl-hero{display:flex;align-items:center;gap:14px;padding:16px 18px;margin-bottom:12px;
  background:linear-gradient(120deg,var(--violet-soft),var(--surface) 70%);border:1px solid var(--line)}
.hl-hero-ico{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;font-size:1.6rem;background:var(--surface);box-shadow:var(--shadow-sm);flex:none}
.hl-hero-t{font-weight:700;font-size:1.05rem}
.hl-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px;margin-bottom:14px}
.hl-card{display:flex;flex-direction:column;text-align:left;padding:0;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);
  overflow:hidden;cursor:pointer;color:inherit;font:inherit;transition:transform .15s,box-shadow .15s,border-color .15s}
.hl-card:hover{transform:translateY(-2px);box-shadow:var(--shadow);border-color:var(--line-2)}
.hl-card:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.hl-cover{height:86px;display:grid;place-items:center;overflow:hidden;background:var(--surface-2)}
.hl-cover img{width:100%;height:100%;object-fit:cover}
.hl-card.k-pest .hl-cover{background:linear-gradient(135deg,var(--danger-soft),var(--surface-2))}
.hl-card.k-disease .hl-cover{background:linear-gradient(135deg,var(--violet-soft),var(--surface-2))}
.hl-card.k-abiotic .hl-cover{background:linear-gradient(135deg,var(--sand-soft),var(--surface-2))}
.hl-emoji{font-size:2.4rem;filter:drop-shadow(0 3px 6px rgba(0,0,0,.12))}
.hl-body{padding:12px 14px 14px;display:flex;flex-direction:column;gap:6px;flex:1}
.hl-name{font-weight:700}
.hl-tags{display:flex;flex-wrap:wrap;gap:4px}
.hl-look{margin:0;font-size:.85rem;color:var(--text-2);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hl-stats{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:.82rem;color:var(--text-2);margin-top:auto;padding-top:6px;border-top:1px dashed var(--line)}
.hl-card.seen .hl-stats b{color:var(--brand)}
.hl-d{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:18px}
.hl-sec{margin-bottom:12px}
.hl-sec h4{margin:0 0 4px;font-size:.88rem}
.hl-sec p{margin:0;color:var(--text-2)}
.hl-list{margin:0;padding-left:18px;color:var(--text-2)}
.hl-list.hl-chips{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.hl-list.hl-chips li{padding:3px 10px;border-radius:999px;background:var(--surface-2);font-size:.84rem}
.hl-steps{margin:0;padding-left:20px;display:grid;gap:3px;color:var(--text-2)}
.hl-steps li::marker{color:var(--brand);font-weight:700}
.hl-warn{padding:10px 12px;border-radius:var(--radius-sm);background:var(--danger-soft);color:var(--text);margin-bottom:12px;font-size:.9rem}
.hl-d-side{background:var(--surface-2);border-radius:var(--radius);padding:14px;display:flex;flex-direction:column;gap:8px;min-width:0}
.hl-mine-h{font-weight:700;font-size:.8rem;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3)}
.hl-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.hl-kpis div{background:var(--surface);border-radius:10px;padding:8px 4px;text-align:center;display:flex;flex-direction:column}
.hl-kpis b{font-size:1.1rem}
.hl-kpis span{font-size:.72rem;color:var(--text-3)}
.hl-sub{font-weight:650;font-size:.82rem;margin-top:6px;color:var(--text-2)}
.hl-photos{display:flex;gap:6px;overflow-x:auto;padding-bottom:2px}
.hl-photos a{flex:none;width:64px;height:64px;border-radius:10px;overflow:hidden}
.hl-photos img{width:100%;height:100%;object-fit:cover}
.hl-cases{list-style:none;margin:0;padding:0;display:grid;gap:4px}
.hl-cases a{display:flex;align-items:center;gap:8px;padding:6px;border-radius:10px;color:inherit;text-decoration:none;background:var(--surface)}
.hl-cases a:hover{background:var(--brand-soft)}
.hl-c-ico{width:34px;height:34px;border-radius:8px;overflow:hidden;display:grid;place-items:center;background:var(--surface-2);flex:none}
.hl-c-ico img{width:100%;height:100%;object-fit:cover}
.hl-cases .li-main{display:flex;flex-direction:column;min-width:0}
.hl-empty{display:flex;gap:10px;align-items:flex-start;padding:10px;border-radius:10px;background:var(--surface)}
.hl-empty span{font-size:1.4rem}
.hl-cmp-in{display:grid;grid-template-columns:220px 1fr;gap:14px;margin-bottom:12px}
.hl-cmp-side{display:flex;flex-direction:column;gap:8px;min-width:0}
.hl-cmp-in>*{min-width:0}
.hl-cmp-side .select{width:100%;min-width:0}
.hl-scanning{display:flex;flex-direction:column;gap:8px;padding:14px;border-radius:var(--radius);background:var(--violet-soft);font-weight:600}
.hl-scan-bar{height:4px;border-radius:4px;background:linear-gradient(90deg,transparent,var(--violet),transparent);background-size:200% 100%;animation:hl-scan 1.2s linear infinite}
@keyframes hl-scan{0%{background-position:100% 0}100%{background-position:-100% 0}}
@media (prefers-reduced-motion:reduce){.hl-scan-bar{animation:none;background:var(--violet)}}
.hl-res{display:flex;flex-direction:column;gap:10px}
.hl-res-h{display:flex;align-items:center;gap:8px;font-weight:700;flex-wrap:wrap}
.hl-sum{margin:0;color:var(--text-2)}
.hl-match{border:1px solid var(--line);border-radius:var(--radius);padding:12px 14px;background:var(--surface);display:flex;flex-direction:column;gap:8px}
.hl-match.top{border-color:color-mix(in srgb,var(--brand) 45%,var(--line));box-shadow:0 0 0 3px var(--brand-soft)}
.hl-match-h{display:flex;align-items:center;gap:10px}
.hl-match-ico{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;font-size:1.3rem;background:var(--surface-2);flex:none}
.hl-why{margin:0;font-size:.9rem}
.hl-match-g{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.hl-match-g .hl-stats{border-top:0;padding-top:0;margin:2px 0 4px}
.hl-sim{list-style:none;margin:4px 0 0;padding:0;display:grid;gap:2px;font-size:.85rem}
.hl-match-a{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}
.hl-next{padding:10px 12px;border-radius:var(--radius-sm);background:var(--water-soft);font-size:.9rem}
@media (max-width:720px){
  .hl-hero{flex-wrap:wrap}
  .hl-hero .btn{width:100%}
  .hl-grid{grid-template-columns:1fr 1fr;gap:8px}
  .hl-cover{height:64px}
  .hl-body{padding:10px}
  .hl-look{display:none}
  .hl-d,.hl-cmp-in,.hl-match-g{grid-template-columns:1fr}
  .hl-kpis{grid-template-columns:repeat(2,1fr)}
}
.hl-cases .li-main{flex:1}
.hl-cases .li-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hl-cases .pill{flex:none}
@media (max-width:720px){#hl-entry .sheet-foot .btn-ghost{display:none}#hl-entry .sheet-foot .btn{flex:1}}
.pp-ab-split{margin-top:8px;padding:6px 10px;border-radius:8px;background:var(--surface-2)}
.pp-ab-split.warn{background:var(--warn-soft)}

/* ---------- A/B timing: a step split per variant ---------- */
.pp-arms{margin:10px 0 4px;padding:10px;border-radius:14px;background:var(--surface-2);border:1px solid var(--line);display:flex;flex-direction:column;gap:8px}
.pp-arms-h{font-size:.88rem}
.pp-arm{display:flex;align-items:center;gap:10px;padding:10px;border-radius:12px;background:var(--surface);border:1.5px solid var(--line)}
.pp-arm .pp-abk{width:26px;height:26px;font-size:.85rem;border-radius:8px;flex:none}
.pp-arm.is-due{border-color:var(--water);box-shadow:0 0 0 3px var(--water-soft)}
.pp-arm.is-wait{border-style:dashed}
.pp-arm.is-done{opacity:.7}
.pp-arm-t{line-height:1.25}
.pp-arm-r{display:flex;flex-direction:column;align-items:flex-end;gap:6px;flex:none}
.pp-dp.done{background:var(--ok-soft);color:var(--ok)}
.pp-arm-legend{display:flex;flex-wrap:wrap;gap:6px 14px;padding:0 16px 8px}
.pp-arm-legend span{display:inline-flex;align-items:center;gap:6px}
.pp-arm-legend .l-due{color:var(--water);font-weight:650}.pp-arm-legend .l-wait{color:var(--text-3)}.pp-arm-legend .l-done{color:var(--ok)}
.pp-unit.arm-due{border:2px solid var(--water);background:var(--water-soft)}
.pp-unit.arm-wait{border-style:dashed}
.pp-ab-tm{display:grid;grid-template-columns:2fr 1fr 1fr;gap:8px;margin-top:8px}.pp-ab-tm label{display:flex;flex-direction:column;gap:4px}
.pp-ab-tm-hint{margin-top:4px}.warn-t{color:var(--warn)}
.pp-ab-timing{margin-bottom:10px;padding:8px 10px;border-radius:10px;background:var(--surface-2);display:flex;flex-wrap:wrap;align-items:center;gap:6px}
@media (max-width:620px){
  .pp-ab-tm{grid-template-columns:1fr 1fr}.pp-ab-tm label:first-child{grid-column:1/-1}
  .pp-arm{flex-wrap:wrap}.pp-arm-r{flex-direction:row;align-items:center;width:100%;justify-content:space-between}
}

/* ===== Nursery Calendar ===== */
.k-care{--k:var(--water);--ks:var(--water-soft)}
.k-propagation{--k:var(--ok);--ks:var(--ok-soft)}
.k-health{--k:var(--violet);--ks:var(--violet-soft)}
.k-business{--k:var(--sand);--ks:var(--sand-soft)}
.k-tasks{--k:var(--brand);--ks:var(--brand-soft)}
.k-weather{--k:var(--warn);--ks:var(--warn-soft)}
.cal-head{margin-bottom:12px}
.cal-od-txt{color:var(--danger)}
.cal-tabs{margin-bottom:12px;flex-wrap:wrap}
.cal-filters{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:16px}
.cal-chip{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--text-2);font-size:.83rem;font-weight:650;text-decoration:none;white-space:nowrap;transition:background .15s,border-color .15s}
.cal-chip b{min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--ks,var(--surface-2));color:var(--k,var(--text-2));display:inline-grid;place-items:center;font-size:.72rem}
.cal-chip:hover{border-color:var(--k,var(--brand))}
.cal-chip.on{background:var(--ks,var(--brand-soft));color:var(--k,var(--brand));border-color:var(--k,var(--brand))}
.cal-chip.on b{background:var(--surface);}
/* today */
.cal-today{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:start}
.cal-today>.cal-banner{grid-column:1/-1}
.cal-today-main,.cal-today-side{display:flex;flex-direction:column;gap:14px;min-width:0}
@media (min-width:1100px){
  .cal-today{grid-template-columns:minmax(0,1fr) 360px}
  .cal-today-side{position:sticky;top:84px}
}
@media (min-width:1500px){.cal-today{grid-template-columns:minmax(0,1fr) 400px}}
.cal-today-side .cal-next{justify-content:flex-start}
.cal-glance{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px 16px 10px;box-shadow:var(--shadow-sm)}
.cal-glance h3{margin:0 0 8px;font-size:.78rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text-3)}
.cal-gl-row{display:grid;grid-template-columns:24px 92px minmax(0,1fr) 28px 52px;align-items:center;gap:8px;padding:7px 6px;margin:0 -6px;border-radius:10px;color:var(--text);text-decoration:none}
.cal-gl-row:hover{background:var(--surface-2)}
.cal-gl-i{text-align:center}
.cal-gl-l{font-size:.88rem;font-weight:600}
.cal-gl-bar{position:relative;height:8px;border-radius:99px;background:var(--line-2);overflow:hidden}
.cal-gl-bar i{position:absolute;left:0;top:0;bottom:0;border-radius:99px;background:var(--k,var(--brand));opacity:.85}
.cal-gl-bar i.od{background:var(--danger);opacity:1}
.cal-gl-row b{text-align:right;font-variant-numeric:tabular-nums}
.cal-gl-od{font-size:.74rem;font-weight:600;color:var(--danger)}
.cal-gl-row.k-care{--k:#3b8fd9}.cal-gl-row.k-propagation{--k:#3f9a63}.cal-gl-row.k-health{--k:var(--violet)}
.cal-gl-row.k-business{--k:#c98a2c}.cal-gl-row.k-tasks{--k:#2f6e57}.cal-gl-row.k-weather{--k:#d9932b}
.cal-banner{display:flex;align-items:center;gap:16px;padding:16px 20px;border-radius:var(--radius);background:linear-gradient(135deg,var(--brand-soft),var(--surface) 70%);border:1px solid var(--line)}
.cal-date{display:flex;flex-direction:column;align-items:center;min-width:76px;padding:8px 10px;border-radius:14px;background:var(--surface);box-shadow:var(--shadow-sm);line-height:1.1}
.cal-date .cal-dow{font-size:.7rem;text-transform:uppercase;letter-spacing:.06em;color:var(--danger);font-weight:700}
.cal-date b{font-size:1.9rem;font-weight:800}
.cal-date span:last-child{font-size:.7rem;color:var(--text-3)}
.cal-big{font-size:1.15rem;font-weight:750}
.cal-sec{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:4px 0 6px;box-shadow:var(--shadow-sm)}
.cal-sec>h3,.cal-sec>summary{display:flex;align-items:center;gap:8px;margin:0;padding:12px 16px 6px;font-size:.78rem;text-transform:uppercase;letter-spacing:.06em;color:var(--k,var(--text-2));font-weight:750;cursor:default}
.cal-sec>summary{cursor:pointer;list-style:none}
.cal-sec>summary::-webkit-details-marker{display:none}
.cal-sec>h3 .faint,.cal-sec>summary .faint{margin-left:auto;font-weight:600}
.cal-sec.cal-overdue{border-color:color-mix(in srgb,var(--danger) 40%,var(--line));background:linear-gradient(var(--danger-soft),var(--surface) 60px)}
.cal-sec.cal-overdue>h3{color:var(--danger)}
.cal-list{list-style:none;margin:0;padding:0}
.cal-row{display:flex;align-items:center;gap:12px;padding:10px 16px;border-top:1px solid var(--line-2);cursor:pointer;position:relative}
.cal-list .cal-row:first-child{border-top:0}
.cal-row:hover{background:var(--surface-2)}
.cal-row:focus-visible{outline:2px solid var(--brand);outline-offset:-2px}
.cal-row::before{content:"";position:absolute;left:0;top:10px;bottom:10px;width:3px;border-radius:3px;background:var(--k);opacity:.8}
.cal-row.od::before{background:var(--danger)}
.cal-ico{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;background:var(--ks,var(--surface-2));font-size:1.1rem;flex:none}
.cal-ico.lg{width:44px;height:44px;font-size:1.35rem;border-radius:13px}
.cal-t{font-weight:650;line-height:1.3;overflow-wrap:anywhere}
.cal-s{color:var(--text-2);margin-top:2px;line-height:1.35}
.cal-adj{margin-top:4px;padding:4px 8px;border-radius:8px;background:var(--water-soft);color:var(--water);font-weight:600;display:inline-block}
.cal-st{display:inline-block;font-size:.7rem;font-weight:700;padding:1px 7px;border-radius:999px;background:var(--surface-2);color:var(--text-3);vertical-align:2px}
.cal-st.ok{background:var(--ok-soft);color:var(--ok)}
.cal-st.bad{background:var(--danger-soft);color:var(--danger)}
.cal-row.s-done .cal-t,.cal-row.s-skipped .cal-t,.cal-row.s-missed .cal-t{color:var(--text-3)}
.cal-row.s-done .cal-ico,.cal-row.s-skipped .cal-ico,.cal-row.s-missed .cal-ico{filter:grayscale(.8);opacity:.6}
.cal-row.s-projected .cal-ico{background:transparent;border:1.5px dashed var(--k)}
.cal-row.s-info .cal-ico{background:var(--surface-2)}
.cal-cl{font-size:.75rem;font-weight:700;color:var(--text-3);white-space:nowrap}
.cal-cl.full{color:var(--ok)}
.cal-quick{display:flex;gap:4px;flex:none}
.cal-done-btn{border-color:var(--ok);color:var(--ok)}
.cal-done-btn:hover{background:var(--ok-soft)}
.cal-allbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 16px;border-radius:var(--radius);background:var(--surface);border:1px dashed var(--line)}
.cal-allbar .small{flex:1;min-width:200px}
.cal-next{display:flex;justify-content:center}
.cal-wx{display:inline-flex;align-items:baseline;gap:4px;font-size:.8rem;color:var(--text-2);white-space:nowrap}
.cal-wx b{color:var(--text);font-weight:700}
.cal-wx i{font-style:normal;color:var(--text-3)}
.cal-wx em{font-style:normal;color:var(--water);font-weight:650}
.cal-wx.big{font-size:1rem;padding:8px 12px;border-radius:12px;background:var(--surface);box-shadow:var(--shadow-sm)}
.cal-wx.big:empty{display:none}
/* week */
.cal-nav{display:flex;align-items:center;gap:6px;margin-bottom:12px}
.cal-nav>b{font-size:1.05rem;min-width:170px;text-align:center}
.cal-odbar{display:block;padding:10px 14px;margin-bottom:12px;border-radius:12px;background:var(--danger-soft);color:var(--danger);font-weight:650;text-decoration:none}
.cal-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
.cal-day{background:var(--surface);border:1px solid var(--line);border-radius:14px;min-height:220px;display:flex;flex-direction:column;overflow:hidden}
.cal-day.today{border-color:var(--brand);box-shadow:0 0 0 2px var(--brand-soft)}
.cal-day.past{opacity:.8}
.cal-day-h{display:flex;align-items:baseline;gap:6px;padding:8px 10px;border-bottom:1px solid var(--line-2);background:var(--surface-2);flex-wrap:wrap}
.cal-day-h>span{font-size:.72rem;text-transform:uppercase;font-weight:700;color:var(--text-3);letter-spacing:.05em}
.cal-day-h>b{font-size:1.15rem}
.cal-day.today .cal-day-h{background:var(--brand-soft)}
.cal-day.today .cal-day-h>b{color:var(--brand)}
.cal-day-h .cal-wx{margin-left:auto;font-size:.72rem}
.cal-day-b{display:flex;flex-direction:column;gap:4px;padding:6px}
.cal-none{color:var(--text-3);text-align:center;padding:10px 0}
.cal-ev{display:flex;align-items:center;gap:5px;width:100%;text-align:left;border:0;border-left:3px solid var(--k);background:var(--ks);color:var(--text);border-radius:7px;padding:5px 6px;font-size:.76rem;line-height:1.25;cursor:pointer;font:inherit;font-size:.76rem}
.cal-ev:hover{filter:brightness(.97)}
.cal-ev-t{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.cal-ev.s-done,.cal-ev.s-skipped,.cal-ev.s-missed{opacity:.55;text-decoration:line-through}
.cal-ev.s-projected{background:transparent;border:1px dashed var(--k);border-left-width:3px;border-left-style:solid}
.cal-ev.s-info{background:var(--surface-2)}
.cal-ev.od{border-left-color:var(--danger);background:var(--danger-soft);color:var(--danger);font-weight:650}
/* month */
.cal-month{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.cal-mh{font-size:.72rem;font-weight:700;color:var(--text-3);text-transform:uppercase;text-align:center;padding:4px 0;letter-spacing:.05em}
.cal-cell{display:flex;flex-direction:column;gap:3px;min-height:112px;padding:6px;border-radius:10px;border:1px solid var(--line);background:var(--surface);text-align:left;cursor:pointer;font:inherit;color:inherit;overflow:hidden}
.cal-cell:hover{border-color:var(--brand)}
.cal-cell.out{background:var(--surface-2);opacity:.6}
.cal-cell.past .cal-cell-h b{color:var(--text-3)}
.cal-cell.today{border-color:var(--brand);box-shadow:0 0 0 2px var(--brand-soft)}
.cal-cell.today .cal-cell-h b{background:var(--brand);color:var(--brand-ink);border-radius:999px;padding:0 7px}
.cal-cell-h{display:flex;align-items:center;justify-content:space-between;font-size:.85rem}
.cal-cell-wx{font-size:.85rem}
.cal-cell-evs{display:flex;flex-direction:column;gap:2px;min-width:0}
.cal-ev.mini{padding:2px 4px;font-size:.68rem;border-left-width:2px;cursor:inherit}
.cal-ev.mini .cal-ev-t{-webkit-line-clamp:1;white-space:nowrap;display:block}
.cal-more{font-size:.68rem;color:var(--text-3);font-weight:650;padding-left:4px}
.cal-dots{display:none;gap:3px;margin-top:auto;flex-wrap:wrap}
.cal-dots i,.cal-legend i{width:7px;height:7px;border-radius:50%;background:var(--k);display:inline-block}
.cal-legend{display:flex;gap:14px;flex-wrap:wrap;margin-top:12px;color:var(--text-2)}
.cal-legend span{display:inline-flex;align-items:center;gap:6px}
/* sheets */
.cal-sheet .sheet-head .cal-wx.big{box-shadow:none;background:var(--surface-2)}
.cal-sub{font-size:.78rem;font-weight:700;color:var(--danger);text-transform:uppercase;margin:12px 0 4px}
.cal-sheet .cal-row{padding:10px 4px}
.cal-sheet .cal-row::before{display:none}
.cal-stbar{margin:14px 0 4px;padding:8px 12px;border-radius:10px;background:var(--surface-2);font-weight:650;color:var(--text-2)}
.cal-stbar.s-done{background:var(--ok-soft);color:var(--ok)}
.cal-stbar.s-missed{background:var(--danger-soft);color:var(--danger)}
.cal-stbar.s-projected{background:var(--brand-soft);color:var(--brand)}
.cal-sheet .cal-adj{display:block;margin-top:12px}
.cal-facts{margin:14px 0;display:grid;gap:8px}
.cal-facts>div{display:grid;grid-template-columns:96px 1fr;gap:10px}
.cal-facts dt{font-size:.78rem;color:var(--text-3);font-weight:650;padding-top:2px}
.cal-facts dd{margin:0}
.cal-act{margin:16px 0}
.cal-hc{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.cal-hc .btn{justify-content:center;height:48px}
.cal-snz{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.cal-date-in{width:auto;height:34px}
.cal-check{list-style:none;margin:0;padding:0;display:grid;gap:4px}
.cal-check label{display:flex;gap:10px;align-items:center;padding:8px 10px;border-radius:10px;background:var(--surface-2);cursor:pointer}
.cal-check input{width:18px;height:18px;accent-color:var(--brand)}
.cal-check input:checked+span{text-decoration:line-through;color:var(--text-3)}
.btn-block{width:100%;justify-content:center}
/* recurring */
.cal-explain{padding:10px 14px;border-radius:12px;background:var(--surface);border:1px solid var(--line);margin-bottom:16px;line-height:1.5}
.cal-rules{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:12px;margin-bottom:20px}
.cal-rule{padding:16px;display:flex;flex-direction:column;gap:10px}
.cal-rule.paused{opacity:.65}
.cal-rule-h{display:flex;gap:12px;align-items:center}
.cal-rule-meta{display:flex;gap:6px;flex-wrap:wrap}
.cal-rule-meta a.pill{text-decoration:none}
.cal-rule-next{display:flex;gap:5px;align-items:center;flex-wrap:wrap}
.cal-nd{font-size:.75rem;font-weight:650;padding:2px 8px;border-radius:999px;background:var(--brand-soft);color:var(--brand)}
.cal-rule-f{display:flex;align-items:center;gap:6px;flex-wrap:wrap;border-top:1px solid var(--line-2);padding-top:10px;margin-top:auto}
.cal-stats{color:var(--text-2)}
.cal-tpls{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px}
.cal-tpl{display:flex;gap:12px;align-items:center;text-align:left;padding:12px 14px;border-radius:14px;border:1px solid var(--line);background:var(--surface);cursor:pointer;font:inherit;color:inherit;transition:border-color .15s,transform .15s}
.cal-tpl:hover{border-color:var(--brand);transform:translateY(-1px)}
.cal-tpl .li-main{display:flex;flex-direction:column;gap:2px}
.cal-tpl-i{font-size:1.5rem;width:44px;height:44px;border-radius:12px;background:var(--surface-2);display:grid;place-items:center;flex:none}
.cal-ed-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}
.cal-ed-grid.three{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
.cal-ed .cal-ed-grid:first-child{grid-template-columns:80px 1fr 1fr 1fr}
.cal-ed-ico input{text-align:center;font-size:1.2rem}
.cal-ed .q-section{margin-top:18px}
.cal-ed .gx-seg{margin:6px 0 10px}
.cal-ed-k{margin-top:4px}
.cal-wd{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px}
.cal-wd-b input{position:absolute;opacity:0;pointer-events:none}
.cal-wd-b span{display:inline-grid;place-items:center;width:46px;height:38px;border-radius:10px;border:1px solid var(--line);font-weight:650;cursor:pointer;background:var(--surface)}
.cal-wd-b input:checked+span{background:var(--brand);color:var(--brand-ink);border-color:var(--brand)}
.cal-wd-b input:focus-visible+span{box-shadow:0 0 0 3px var(--brand-soft)}
.cal-inline{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:6px 0}
.cal-inline .input{width:auto}
.input.sm{width:84px!important}
.cal-plants{max-height:220px;overflow:auto;margin-top:8px;border:1px solid var(--line-2);border-radius:10px;padding:4px}
.cal-pl{display:flex;gap:8px;align-items:center;padding:6px 8px;border-radius:8px;cursor:pointer}
.cal-pl:hover{background:var(--surface-2)}
.cal-pl .faint{margin-left:auto}
.cal-logas{margin-top:12px}
.cal-pv{margin-top:18px}
.cal-pv-ok{padding:12px 14px;border-radius:12px;background:var(--brand-soft);display:grid;gap:6px}
.cal-pv-ok .cal-nd{background:var(--surface)}
.cal-pv-err{padding:12px 14px;border-radius:12px;background:var(--warn-soft);color:var(--warn);font-weight:600}
.btn.danger{color:var(--danger)}
/* dashboard widget */
.cal-dash .card-head .cal-wx{font-size:.85rem}
.cal-dash-k{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px}
.cal-dash-k .cal-chip{height:28px;font-size:.78rem}
.cal-list.compact .cal-row{padding:8px 4px}
.cal-list.compact .cal-row::before{display:none}
.cal-list.compact .cal-ico{width:30px;height:30px;font-size:.95rem}
.cal-dash-f{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}
@media (max-width:1020px){
  .cal-week{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media (max-width:720px){
  .cal-head .btn-primary{width:100%;justify-content:center}
  .cal-filters{flex-wrap:nowrap;overflow-x:auto;margin:0 -16px 14px;padding:0 16px 2px;scrollbar-width:none}
  .cal-filters::-webkit-scrollbar{display:none}
  .cal-banner{padding:12px 14px;gap:12px;flex-wrap:wrap}
  .cal-banner .cal-wx.big{margin-left:auto}
  .cal-row{padding:10px 12px;gap:10px;flex-wrap:wrap}
  .cal-row .li-main{flex:1 1 calc(100% - 50px)}
  .cal-quick{margin-left:46px}
  .cal-quick .btn span{display:inline}
  .cal-row .cal-cl{order:3}
  .cal-week{grid-template-columns:1fr;gap:6px}
  .cal-day{min-height:0;flex-direction:row}
  .cal-day-h{flex-direction:column;align-items:center;justify-content:flex-start;gap:0;min-width:64px;border-bottom:0;border-right:1px solid var(--line-2)}
  .cal-day-h .cal-wx{margin:4px 0 0;flex-direction:column;align-items:center;gap:0}
  .cal-day-b{flex:1;min-width:0}
  .cal-none{text-align:left;padding:6px}
  .cal-month{gap:2px}
  .cal-cell{min-height:58px;padding:4px;border-radius:8px;align-items:center}
  .cal-cell-h{flex-direction:column;gap:0;font-size:.8rem}
  .cal-cell-wx{font-size:.7rem}
  .cal-cell-evs,.cal-cell>.cal-ev{display:none}
  .cal-dots{display:flex;justify-content:center}
  .cal-ed-grid{grid-template-columns:1fr 1fr}
  .cal-ed .cal-ed-grid:first-child{grid-template-columns:64px 1fr}
  .cal-ed .cal-ed-grid:first-child .cal-ed-title{grid-column:2}
  .cal-rules{grid-template-columns:1fr}
  .cal-nav>b{min-width:0;flex:1}
}
.cal-ed [hidden],.cal-sheet [hidden]{display:none!important}
@media (max-width:720px){
  .cal-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
  .cal-tabs .gx-tab{flex:1 0 auto;text-align:center;padding:6px 10px}
}

/* ---------- Plant photo gallery ---------- */
.hero-media button.count{border:0;cursor:pointer;font:inherit}
.pg-card{overflow:hidden}
.pg-card .card-head .file-btn{position:relative;overflow:hidden}
.pg-card .card-head .file-btn input,.pg-drop input{position:absolute;inset:0;opacity:0;cursor:pointer}
.pg-drop{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;margin:16px 20px 20px;padding:42px 20px;border:2px dashed var(--line);border-radius:16px;background:var(--surface-2);cursor:pointer;transition:border-color .2s,background .2s}
.pg-drop .big{font-size:2.2rem}
.pg-drop.is-ro{cursor:default}
.pg-drop.is-over,.pg-dropzone.is-over{border-color:var(--brand);background:var(--brand-soft)}
.pg-compare{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:16px 20px 4px;max-width:820px}
.pg-cmp{position:relative;padding:0;border:0;border-radius:14px;overflow:hidden;aspect-ratio:4/3;background:var(--surface-2);cursor:zoom-in}
.pg-cmp img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .3s}
.pg-cmp:hover img{transform:scale(1.03)}
.pg-cmp-l{position:absolute;left:10px;bottom:10px;padding:4px 10px;border-radius:999px;background:rgba(0,0,0,.6);color:#fff;font-size:.78rem;backdrop-filter:blur(4px)}
.pg-cmp-mid{position:absolute;left:50%;top:calc(50% + 6px);transform:translate(-50%,-50%);pointer-events:none}
.pg-cmp-mid span{display:inline-block;padding:5px 12px;border-radius:999px;background:var(--surface);color:var(--text);font-size:.78rem;font-weight:700;box-shadow:var(--shadow-sm);border:1px solid var(--line);white-space:nowrap}
.pg-body{padding:6px 20px 20px;border:2px dashed transparent;border-radius:0 0 var(--radius) var(--radius);transition:border-color .2s,background .2s}
.pg-month h3:empty{display:none}
.pg-month h3{font-size:.8rem;text-transform:uppercase;letter-spacing:.06em;color:var(--text-2);margin:16px 0 10px}
.pg-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px}
.pg-item{position:relative;margin:0;border-radius:14px;overflow:hidden;border:1px solid var(--line);background:var(--surface)}
.pg-img{display:block;width:100%;aspect-ratio:1;padding:0;border:0;background:var(--surface-2);cursor:zoom-in;overflow:hidden}
.pg-img img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .3s}
.pg-item:hover .pg-img img{transform:scale(1.05)}
.pg-badges{position:absolute;left:8px;top:8px;display:flex;gap:4px;pointer-events:none}
.pg-badge{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:rgba(255,255,255,.9);font-size:.8rem;box-shadow:0 1px 4px rgba(0,0,0,.15)}
.pg-tools{position:absolute;right:8px;top:8px;display:flex;gap:4px;opacity:0;transition:opacity .2s}
.pg-item:hover .pg-tools,.pg-item:focus-within .pg-tools{opacity:1}
.pg-tool{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;border:0;background:rgba(255,255,255,.92);cursor:pointer;font-size:.85rem;box-shadow:0 1px 4px rgba(0,0,0,.15)}
.pg-tool:hover{background:#fff}
.pg-item figcaption{display:flex;flex-direction:column;gap:2px;padding:8px 10px;min-height:20px}
.pg-cap{font-size:.84rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pg-cap:empty{display:none}
.pg-date{font-size:.75rem;color:var(--text-3,var(--text-2))}
@media (prefers-color-scheme:dark){.pg-badge,.pg-tool{background:rgba(30,34,30,.9)}}
@media (hover:none){.pg-tools{opacity:1}}
@media (max-width:720px){
  .pg-compare{padding:12px 14px 2px;gap:8px}
  .pg-body{padding:4px 14px 14px}
  .pg-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .pg-drop{margin:12px 14px 16px}
}
.pg-title{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;min-width:0}
@media (max-width:720px){.pg-title{flex-direction:column;align-items:flex-start;gap:0}}

/* ---------- AI briefing: collapsible ---------- */
.ai-head-toggle{all:unset;cursor:pointer;flex:1;min-width:0;border-radius:8px}
.ai-head-toggle:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
.ai-collapse span{display:inline-block;font-size:1.1rem;line-height:1;transition:transform .2s}
.ai-hero.is-collapsed .ai-collapse span{transform:rotate(180deg)}
.ai-strip{display:none}
.ai-hero.is-collapsed .ai-prios,.ai-hero.is-collapsed .ai-tip,.ai-hero.is-collapsed .ai-meta{display:none}
.ai-hero.is-collapsed .ai-summary{margin:8px 0 10px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ai-hero.is-collapsed .ai-strip{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.ai-hero.is-collapsed .ai-brief,.ai-hero.is-collapsed .ai-quick{padding-top:14px;padding-bottom:14px}
.ai-strip-n{font-size:.82rem;color:var(--text-2);margin-right:2px}
.ai-strip-n b{color:var(--text)}
.ai-chip{display:inline-flex;align-items:center;gap:6px;max-width:200px;padding:3px 10px 3px 3px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--text);font:inherit;font-size:.8rem;cursor:pointer}
.ai-chip:hover{border-color:color-mix(in srgb,var(--ai-1) 50%,var(--line))}
.ai-chip .avatar{width:22px;height:22px;border-radius:50%;flex:none}
.ai-chip-l{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.ai-chip-more{padding:3px 10px;color:var(--text-2)}
.ai-hero.is-collapsed .ai-quick textarea{min-height:0}
@media (max-width:720px){
  .ai-hero.is-collapsed .ai-quick{display:none}
  .ai-hero.is-collapsed .ai-brief{border-bottom:0}
  .ai-chip{max-width:150px}
}

/* ---------- shared photo field (photoField() in app.js) ---------- */
.phf{position:relative;min-width:0;border:2px dashed var(--line);border-radius:16px;background:var(--surface-2);transition:border-color .15s,background .15s,box-shadow .15s}
.phf[hidden]{display:none}
.phf:hover,.phf:focus-within,.phf.is-over{border-color:var(--brand);background:var(--brand-soft)}
.phf.is-over{box-shadow:0 0 0 4px var(--brand-soft)}
.phf-zone,.field .phf-zone{display:flex;align-items:center;gap:14px;padding:14px;cursor:pointer;min-width:0;margin:0;font-size:inherit;font-weight:400;color:var(--text)}
.phf-input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;bottom:0;left:50%}
.phf-media{position:relative;flex:none;width:64px;height:64px;border-radius:14px;overflow:hidden;display:grid;place-items:center;
  background:linear-gradient(135deg,var(--surface),var(--brand-soft));box-shadow:var(--shadow-sm);transition:width .2s,height .2s}
.phf-ico{font-size:1.6rem;line-height:1}
.phf-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.phf-text{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.phf-title{display:flex;align-items:center;gap:8px;min-width:0}
.phf-title b{font-size:.95rem;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.phf-tag{flex:none;font-size:.66rem;font-weight:700;letter-spacing:.03em;text-transform:uppercase;padding:2px 7px;border-radius:99px;
  background:var(--surface);color:var(--text-3,var(--text-2));border:1px solid var(--line)}
.phf-tag.req{background:var(--violet-soft,var(--brand-soft));color:var(--violet,var(--brand));border-color:transparent}
.phf-sub{font-size:.82rem;color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.phf-cta{display:flex;align-items:center;gap:10px;margin-top:4px;flex-wrap:wrap}
.phf-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:99px;background:var(--brand);color:var(--brand-ink);
  font-size:.8rem;font-weight:600;box-shadow:var(--shadow-sm)}
.phf-hint{font-size:.76rem;color:var(--text-2);opacity:.85}
.phf-actions{display:none;gap:6px;position:absolute;right:12px;top:50%;transform:translateY(-50%)}
.phf-act{border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:99px;padding:6px 11px;font:inherit;
  font-size:.78rem;font-weight:600;cursor:pointer;white-space:nowrap}
.phf-act:hover{border-color:var(--brand)}
.phf-act.danger{color:var(--danger)}
.phf-act.danger:hover{border-color:var(--danger);background:var(--danger-soft)}
.phf-act:focus-visible,.phf:has(.phf-input:focus-visible){outline:2px solid var(--brand);outline-offset:2px}
/* filled */
.phf.has-file{border-style:solid;border-color:var(--brand);background:var(--surface)}
.phf.has-file .phf-media{width:84px;height:84px}
.phf.has-file .phf-ico,.phf.has-file .phf-cta{display:none}
.phf.has-file .phf-zone{padding-right:200px}
.phf.has-file .phf-actions{display:flex}
.phf.has-file .phf-tag{display:none}
.phf.has-file .phf-title b::before{content:"✓ ";color:var(--brand)}
/* large (compare / scan) */
.phf-lg .phf-zone{flex-direction:column;justify-content:center;text-align:center;min-height:220px;padding:22px}
.phf-lg .phf-media{width:72px;height:72px;border-radius:20px}
.phf-lg .phf-text{align-items:center}
.phf-lg .phf-title{justify-content:center}
.phf-lg .phf-cta{justify-content:center}
.phf-lg.has-file .phf-zone{padding:0;min-height:260px}
.phf-lg.has-file .phf-media{position:absolute;inset:0;width:auto;height:auto;border-radius:14px;box-shadow:none}
.phf-lg.has-file .phf-text{position:absolute;left:0;right:0;bottom:0;padding:34px 14px 12px;border-radius:0 0 14px 14px;
  background:linear-gradient(transparent,rgba(0,0,0,.65));align-items:flex-start;text-align:left}
.phf-lg.has-file .phf-title b,.phf-lg.has-file .phf-sub{color:#fff}
.phf-lg.has-file .phf-title b::before{color:#9fe3c0}
.phf-lg.has-file .phf-actions{top:12px;right:12px;transform:none}
.phf-lg.has-file .phf-act{background:rgba(255,255,255,.92);color:#1d2520;border-color:transparent}
.phf-lg.has-file .phf-act.danger{color:#c2412d}
.phf-lg .phf-title{flex-wrap:wrap}
.phf-lg .phf-title b{white-space:normal;text-align:center}
.phf.phf-lg.has-file .phf-media{position:absolute;inset:0;width:auto;height:auto;border-radius:14px;box-shadow:none}
.phf.phf-lg.has-file .phf-zone{padding:0;min-height:260px}
.phf.phf-lg.has-file .phf-actions{top:12px;right:12px;bottom:auto;left:auto;transform:none}
.phf.phf-lg.has-file .phf-act{flex:none}
.q-section textarea+.phf{margin-top:10px}
.field.hc-photo>.phf{width:100%}
@media (hover:none){.phf-hint{display:none}}
@media (max-width:560px){
  .phf .phf-zone{gap:12px;padding:12px}
  .phf-media{width:56px;height:56px}
  .phf.has-file .phf-zone{padding-right:12px;padding-bottom:56px}
  .phf.has-file .phf-media{width:72px;height:72px}
  .phf.has-file .phf-actions{top:auto;bottom:12px;left:12px;right:12px;transform:none}
  .phf.has-file .phf-act{flex:1}
  .phf-lg .phf-zone{min-height:180px}
  .phf.phf-lg.has-file .phf-zone{min-height:220px}
}

@media (min-width:1100px){.cal-today-side .cal-allbar{flex-direction:column;align-items:stretch}.cal-today-side .cal-allbar .small{min-width:0}.cal-today-side .cal-allbar .btn{justify-content:center}}

/* ---------- confirmation dialog (askConfirm) ---------- */
.cdlg{border:0;padding:0;margin:auto;width:min(440px,calc(100vw - 32px));border-radius:22px;background:var(--surface);color:var(--text);
  box-shadow:0 24px 60px rgba(15,25,20,.28),0 2px 6px rgba(15,25,20,.12);animation:cdlg-in .18s cubic-bezier(.2,.9,.3,1.2)}
.cdlg::backdrop{background:rgba(12,20,16,.42);backdrop-filter:blur(3px);animation:cdlg-fade .18s ease}
.cdlg.out{animation:cdlg-out .15s ease forwards}
.cdlg-in{display:flex;flex-direction:column;align-items:center;text-align:center;padding:26px 24px 20px;gap:8px}
.cdlg-ico{width:56px;height:56px;border-radius:18px;display:grid;place-items:center;font-size:1.6rem;margin-bottom:4px;
  background:var(--brand-soft);color:var(--brand);font-weight:700}
.cdlg.t-danger .cdlg-ico{background:var(--danger-soft);color:var(--danger)}
.cdlg.t-warn .cdlg-ico{background:var(--warn-soft,#fdf1dc);color:var(--warn,#b7791f)}
.cdlg h2{margin:0;font-size:1.15rem;font-weight:750;line-height:1.3;letter-spacing:-.01em}
.cdlg-msg{margin:0;color:var(--text-2);font-size:.92rem;line-height:1.5;white-space:pre-line}
.cdlg-list{list-style:none;margin:6px 0 0;padding:6px;width:100%;text-align:left;border:1px solid var(--line);border-radius:14px;
  background:var(--surface-2);max-height:200px;overflow:auto}
.cdlg-list li{padding:7px 10px;font-size:.88rem;border-radius:9px;display:flex;gap:8px}
.cdlg-list li::before{content:"•";color:var(--text-3)}
.cdlg.t-primary .cdlg-list li::before{content:"✓";color:var(--brand);font-weight:700}
.cdlg-list li+li{border-top:1px solid var(--line-2)}
.cdlg-list li.more{color:var(--text-3);font-style:italic}
.cdlg-list li.more::before{content:none}
.cdlg-list.rich li{align-items:center;gap:10px;padding:8px 10px}
.cdlg .cdlg-list.rich li::before{content:none}
.cdlg-li-ico{flex:none;width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:var(--surface);border:1px solid var(--line-2);font-size:1rem}
.cdlg-li-main{display:flex;flex-direction:column;min-width:0;gap:1px}
.cdlg-li-main b{font-size:.88rem;font-weight:600;color:var(--text);line-height:1.3}
.cdlg-li-main span{font-size:.78rem;color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cdlg-list.rich{max-height:280px}
.cdlg-note{margin:4px 0 0;font-size:.8rem;color:var(--text-3)}
.cdlg-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%;margin-top:14px}
.cdlg-actions .btn{justify-content:center;min-height:44px;font-size:.95rem}
.cdlg .btn-danger-solid:hover{filter:brightness(1.07)}
@keyframes cdlg-in{from{opacity:0;transform:translateY(8px) scale(.96)}to{opacity:1;transform:none}}
@keyframes cdlg-out{to{opacity:0;transform:scale(.97)}}
@keyframes cdlg-fade{from{opacity:0}}
@media (max-width:560px){
  .cdlg{margin:auto auto 12px;width:calc(100vw - 20px);border-radius:22px}
  .cdlg-actions{grid-template-columns:1fr;gap:8px}
  .cdlg-actions .btn-ghost{order:2}
}
@media (prefers-reduced-motion:reduce){.cdlg,.cdlg::backdrop,.cdlg.out{animation:none}}

/* ---------- Settings → Your data (export / import) ---------- */
.dx-card{margin-top:16px}
.dx-body{display:grid;grid-template-columns:1fr 1fr;gap:28px}
.dx-col{display:flex;flex-direction:column;gap:14px;min-width:0}
.dx-import{border-left:1px solid var(--line);padding-left:28px}
.dx-step{display:flex;gap:12px;align-items:flex-start}
.dx-step h3{margin:0 0 2px;font-size:1rem}
.dx-step p{margin:0;line-height:1.45}
.dx-ico{flex:none;width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:var(--brand-soft);font-size:1.1rem}
.dx-ico.ok{color:var(--brand);font-weight:800}
.dx-stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(128px,1fr));gap:8px}
.dx-stat{display:grid;grid-template-columns:auto 1fr;column-gap:8px;align-items:center;padding:9px 11px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}
.dx-stat span{grid-row:span 2;font-size:1.05rem}
.dx-stat b{font-size:1rem;line-height:1.1;font-variant-numeric:tabular-nums}
.dx-stat small{font-size:.72rem;color:var(--text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dx-opt{display:flex;gap:10px;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:12px;cursor:pointer}
.dx-opt input{width:18px;height:18px;accent-color:var(--brand)}
.dx-opt span{display:flex;flex-direction:column}
.dx-opt small{color:var(--text-3);font-size:.78rem}
.dx-go{align-self:flex-start;min-height:42px}
.dx-fine{margin:0;line-height:1.5}
.dx-fine code,.dx-drop code{font-size:.85em}
.dx-drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center;min-height:170px;padding:20px;
  border:2px dashed var(--line);border-radius:16px;background:var(--surface-2);cursor:pointer;transition:border-color .15s,background .15s}
.dx-drop:hover,.dx-drop.over{border-color:var(--brand);background:var(--brand-soft)}
.dx-drop:focus-within{outline:2px solid var(--brand);outline-offset:2px}
.dx-drop-ico{font-size:1.8rem;margin-bottom:4px}
.dx-err{padding:10px 12px;border-radius:12px;background:var(--danger-soft);color:var(--danger);font-size:.88rem}
.dx-prog{height:8px;border-radius:99px;background:var(--surface-2);border:1px solid var(--line);overflow:hidden}
.dx-prog span{display:block;height:100%;background:var(--brand);transition:width .2s}
.dx-cmp{width:100%;border-collapse:collapse;font-size:.88rem}
.dx-cmp th{font-size:.72rem;text-transform:uppercase;letter-spacing:.05em;color:var(--text-3);font-weight:700;text-align:right;padding:0 8px 6px}
.dx-cmp td{padding:7px 8px;border-top:1px solid var(--line-2);text-align:right;font-variant-numeric:tabular-nums}
.dx-cmp td:first-child,.dx-cmp th:first-child{text-align:left;padding-left:0}
.dx-cmp td:last-child{font-weight:700}
.dx-cmp td.down{color:var(--danger)}
.dx-cmp td.up{color:var(--brand)}
.dx-warn{display:flex;gap:8px;padding:10px 12px;border-radius:12px;background:var(--warn-soft);font-size:.86rem;line-height:1.45}
.dx-actions{display:flex;gap:10px;justify-content:flex-end}
.dx-safety{border-top:1px solid var(--line);padding:14px 18px 16px;display:flex;flex-direction:column;gap:8px}
.dx-safety-h{display:flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline}
.dx-sb{display:flex;align-items:center;gap:8px;padding:9px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}
.dx-sb .li-main{flex:1;min-width:0;display:flex;flex-direction:column}
@media (max-width:820px){
  .dx-body{grid-template-columns:1fr;gap:22px}
  .dx-import{border-left:0;padding-left:0;border-top:1px solid var(--line);padding-top:20px}
  .dx-go{align-self:stretch}
  .dx-actions .btn{flex:1}
}

/* ---------- 🧬 Family tree (plant Propagation tab) + family leaderboard (Mothers) ---------- */
.ft-card{margin-bottom:18px}
.ft-path{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:.86rem;margin-bottom:12px;color:var(--text-2)}
.ft-path a{color:var(--text-2)}
.ft-path .pill{margin-left:auto;height:22px}
.ft-scroll{overflow-x:auto;padding:6px 2px 14px;margin:0 -4px;scrollbar-width:thin}
.ft-scroll:focus-visible{outline:2px solid var(--brand);outline-offset:2px;border-radius:12px}
.ft,.ft ul{list-style:none;margin:0;padding:0;display:flex;justify-content:center;position:relative}
.ft{width:max-content;min-width:100%}
.ft ul{padding-top:22px}
.ft ul::before{content:"";position:absolute;top:0;left:50%;height:22px;border-left:2px solid var(--line)}
.ft li{position:relative;display:flex;flex-direction:column;align-items:center;padding:22px 6px 0}
.ft li::before,.ft li::after{content:"";position:absolute;top:0;right:50%;width:50%;height:22px;border-top:2px solid var(--line)}
.ft li::after{right:auto;left:50%;border-left:2px solid var(--line)}
.ft li:only-child{padding-top:0}
.ft li:only-child::before,.ft li:only-child::after{display:none}
.ft li:first-child::before,.ft li:last-child::after{border:0 none}
.ft li:last-child::before{border-right:2px solid var(--line);border-radius:0 10px 0 0}
.ft li:first-child::after{border-radius:10px 0 0 0}
.ft>li{padding-top:0}
.ft>li::before,.ft>li::after{display:none}
.ft-node{position:relative;width:156px;padding:10px 10px 9px;border:1px solid var(--line);border-radius:14px;background:var(--surface);
  box-shadow:var(--shadow-sm);display:flex;flex-direction:column;gap:6px;transition:border-color .15s,transform .15s}
.ft-node,.ft-more{position:relative;z-index:1}
.ft li::before,.ft li::after,.ft ul::before{z-index:0}
.ft-node:hover{border-color:var(--brand);transform:translateY(-1px)}
.ft-node.is-me{border:2px solid var(--brand);box-shadow:0 0 0 4px var(--brand-soft)}
.ft-node.is-best:not(.is-me){border-color:#d9a400}
.ft-node.s-lost,.ft-node.s-gone{opacity:.62}
.ft-node.s-lost .ft-name{text-decoration:line-through}
.ft-me{position:absolute;top:-10px;left:50%;transform:translateX(-50%);font-size:.66rem;font-weight:750;text-transform:uppercase;letter-spacing:.04em;
  background:var(--brand);color:#fff;padding:2px 8px;border-radius:99px;white-space:nowrap}
.ft-me.best{background:#d9a400}
.ft-main{display:flex;gap:8px;align-items:center;color:inherit;text-decoration:none;min-width:0}
.ft-ava{flex:none;width:34px;height:34px;border-radius:10px;overflow:hidden;display:grid;place-items:center;background:var(--brand-soft);font-size:1.05rem}
.ft-ava img{width:100%;height:100%;object-fit:cover}
.ft-txt{display:flex;flex-direction:column;min-width:0}
.ft-name{font-weight:650;font-size:.84rem;line-height:1.2;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.ft-code{font-size:.7rem;color:var(--text-3);font-family:var(--mono,ui-monospace,monospace)}
.ft-tags{display:flex;flex-wrap:wrap;gap:4px 8px;font-size:.72rem;color:var(--text-2);align-items:center}
.ft-st{display:inline-flex;align-items:center;gap:4px;font-weight:650}
.ft-st.ok{color:var(--ok)}.ft-st.sold{color:var(--violet)}.ft-st.danger{color:var(--danger)}.ft-st.warn{color:var(--warn)}.ft-st.muted{color:var(--text-3)}
.ft-dot{width:7px;height:7px;border-radius:50%;display:inline-block;background:currentColor}
.ft-dot.ok{color:var(--ok)}.ft-dot.sold{color:var(--violet)}.ft-dot.danger{color:var(--danger)}.ft-dot.warn{color:var(--warn)}.ft-dot.muted{color:var(--text-3)}
.ft-sick{color:var(--danger);font-weight:700}
.ft-born{color:var(--text-3);text-decoration:none}
.ft-born:hover{color:var(--brand)}
.ft-js{display:flex;flex-wrap:wrap;gap:4px}
.ft-j{font-size:.7rem;padding:2px 7px;border-radius:99px;border:1px dashed var(--brand);color:var(--brand);text-decoration:none;white-space:nowrap;background:var(--brand-soft)}
.ft-more{border:1px dashed var(--line);background:var(--surface-2);color:var(--text-2);border-radius:12px;padding:10px 14px;font-weight:650;font-size:.82rem;cursor:pointer;white-space:nowrap}
.ft-more:hover{border-color:var(--brand);color:var(--brand)}
.ft-legend{display:flex;flex-wrap:wrap;gap:6px 14px;justify-content:center;margin-top:4px}
.ft-legend span{display:inline-flex;align-items:center;gap:5px}
.ft-stats{border-top:1px solid var(--line);padding:14px 20px 16px}
.ft-stats-h{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-bottom:12px}
.ft-stats-h .segmented{margin-left:auto}
.ft-stats-h .segmented button{padding:4px 10px;font-size:.8rem}
.ft-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.ft-kpi{display:flex;flex-direction:column;gap:1px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);min-width:0}
.ft-kpi-i{font-size:1rem;margin-bottom:2px}
.ft-kpi b{font-size:1.2rem;line-height:1.15;font-variant-numeric:tabular-nums}
.ft-kpi-l{font-size:.74rem;font-weight:650;color:var(--text-2)}
.ft-kpi small{font-size:.7rem;color:var(--text-3);line-height:1.3}
.ft-kpi.t-ok b{color:var(--ok)}.ft-kpi.t-warn b{color:var(--warn)}.ft-kpi.t-danger b{color:var(--danger)}
.ft-lines{border-top:1px solid var(--line);padding:12px 20px}
.ft-lines summary{cursor:pointer;display:flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline}
.ft-lines[open] summary{margin-bottom:10px}
.ft-how{border-top:1px solid var(--line);padding:10px 20px 12px}
.ft-how summary{cursor:pointer;color:var(--text-2)}
.ft-how ul{margin:8px 0 0;padding-left:18px;line-height:1.5}
.ft-tscroll{overflow-x:auto}
.ft-table{width:100%;border-collapse:collapse;font-size:.85rem}
.ft-table th{font-size:.7rem;text-transform:uppercase;letter-spacing:.05em;color:var(--text-3);text-align:right;padding:6px 8px;white-space:nowrap;font-weight:700}
.ft-table td{padding:8px;border-top:1px solid var(--line-2);text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.ft-table th:first-child,.ft-table td:first-child{text-align:left;padding-left:0;white-space:normal;min-width:150px}
.ft-table tr.is-best td{background:rgba(217,164,0,.07)}
.ft-table tr.is-me td:first-child a{font-weight:750}
.ft-table td.t-ok,.ft-table .t-ok{color:var(--ok)}.ft-table td.t-warn{color:var(--warn)}.ft-table td.t-danger{color:var(--danger)}
.ft-score{display:inline-flex;align-items:center;gap:6px;min-width:84px;justify-content:flex-end}
.ft-score i{display:block;height:6px;width:46px;border-radius:99px;background:var(--line-2);overflow:hidden}
.ft-score u{display:block;height:100%;background:currentColor;border-radius:99px}
.ft-score.t-ok{color:var(--ok)}.ft-score.t-warn{color:var(--warn)}.ft-score.t-danger{color:var(--danger)}
.ft-score b{color:var(--text);min-width:22px;text-align:right}
.ft-score sup{color:var(--text-3)}
.ft-fam{margin-top:18px}
.ft-sort{display:inline-flex;align-items:center;gap:8px}
.ft-sort select{width:auto}
.ft-fam-kpis{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-bottom:12px}
.ft-fam-kpis div{display:flex;flex-direction:column;padding:10px 12px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line)}
.ft-fam-kpis b{font-size:1.15rem;font-variant-numeric:tabular-nums}
.ft-fam-kpis span{font-size:.74rem;color:var(--text-3)}
.ft-best{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:14px;margin-bottom:12px;text-decoration:none;color:inherit;
  background:linear-gradient(90deg,rgba(217,164,0,.14),rgba(217,164,0,.03));border:1px solid rgba(217,164,0,.35)}
.ft-best-i{font-size:1.5rem}
.ft-best .li-main{display:flex;flex-direction:column;flex:1;min-width:0}
@media (max-width:1100px){.ft-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:640px){
  .ft-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ft-fam-kpis{grid-template-columns:repeat(3,1fr)}
  .ft-stats,.ft-lines,.ft-how{padding-left:14px;padding-right:14px}
  .ft-stats-h .segmented{margin-left:0}
  /* indented tree on phones */
  .ft,.ft ul{display:block;width:auto;min-width:0}
  .ft ul{padding:0 0 0 22px;margin-left:16px}
  .ft ul::before{display:none}
  .ft li{display:block;padding:10px 0 0}
  .ft li::before,.ft li::after{display:none}
  .ft ul>li:nth-child(n)::before{display:block;content:"";position:absolute;left:-22px;top:0;bottom:0;width:0;height:auto;
    border:0;border-left:2px solid var(--line);border-radius:0}
  .ft ul>li:nth-child(n):last-child::before{bottom:auto;height:30px;border-radius:0 0 0 10px}
  .ft ul>li:nth-child(n)::after{display:block;content:"";position:absolute;left:-22px;top:30px;width:22px;height:0;
    border:0;border-top:2px solid var(--line);border-radius:0;background:none}
  .ft-node{width:auto}
  .ft-me{left:auto;right:10px;transform:none}
  .ft-scroll{overflow:visible;padding:4px 0 10px;margin:0}
}
.pp-kids{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.pp-kids .pill{text-decoration:none}

/* Ask CactusOS docked on the right (wide screens) */
.ai-chat-resize{display:none}
@media (max-width:1023px){.ai-dock-btn{display:none}}
@media (min-width:1024px){
  body.chat-docked{padding-right:var(--chat-w,400px)}
  body.chat-docked .ai-chat{right:0;top:0;bottom:0;left:auto;z-index:40;width:var(--chat-w,400px);height:auto;border-radius:0;border:0;
    border-left:1px solid var(--line);box-shadow:none;animation:chat-dock-in .2s ease}
  body.chat-docked .ai-chat-head{min-height:65px}
  body.chat-docked .ai-chat-resize{display:block;position:absolute;top:0;left:0;bottom:0;width:8px;cursor:col-resize;z-index:2}
  body.chat-docked .ai-chat-resize::after{content:"";position:absolute;top:50%;left:2px;width:4px;height:40px;margin-top:-20px;border-radius:4px;background:var(--line);opacity:0;transition:opacity .15s}
  body.chat-docked .ai-chat-resize:hover::after,body.chat-docked .ai-chat-resize:focus-visible::after,body.chat-resizing .ai-chat-resize::after{opacity:1;background:var(--ai-1)}
  body.chat-resizing{cursor:col-resize;user-select:none}
  body.chat-docked .toasts{left:calc(50% - var(--chat-w,400px) / 2)}
}
@keyframes chat-dock-in{from{transform:translateX(24px);opacity:0}}
@media print{body.chat-docked{padding-right:0}}
/* topbar adapts to its own width (e.g. when Ask CactusOS is docked): the least used sections move into "More ▾"
   so the search box always keeps a usable width */
.topbar{container-type:inline-size;container-name:topbar}
.nav{align-items:center;flex:none}
.nav>a{white-space:nowrap}
@media (min-width:1101px){.topbar-inner{gap:14px}.nav>a,.nav-more summary{padding:8px 10px}}
.nav>a[data-p="4"]{display:none}
.nav-more{position:relative}
.nav-more summary{list-style:none;display:flex;align-items:center;gap:4px;padding:8px 12px;border-radius:10px;color:var(--text-2);font-weight:550;cursor:pointer;white-space:nowrap;user-select:none}
.nav-more summary::-webkit-details-marker{display:none}
.nav-more summary:hover,.nav-more[open] summary{background:var(--surface);color:var(--text)}
.nav-more summary span{font-size:.7em;transition:transform .15s}
.nav-more[open] summary span{transform:rotate(180deg)}
.nm-pop{position:absolute;top:calc(100% + 8px);left:0;z-index:60;display:flex;flex-direction:column;min-width:200px;padding:6px;background:var(--surface);
  border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow-lg);animation:gs-in .12s ease}
.nav .nm-pop a{display:none;align-items:center;gap:10px;padding:9px 12px;border-radius:10px;color:var(--text);box-shadow:none;background:none}
.nav .nm-pop a:hover{background:var(--surface-2)}
.nav .nm-pop a.active{background:var(--brand-soft);color:var(--brand)}
.nav .nm-pop a[data-p="4"]{display:flex}
.nav-more:has(a.active[data-p="4"]) summary{background:var(--surface);color:var(--text);box-shadow:var(--shadow-sm)}
@media (min-width:721px){
  @container topbar (max-width:1100px){
    .topbar-inner{gap:10px}
    .brand>span:not(.brand-mark){display:none}
    .nav a,.nav-more summary{padding:8px 9px}
    .search kbd{display:none}
    .topbar .btn-primary .hide-sm{display:none}
    .topbar .btn-primary{width:40px;padding:0;justify-content:center}
    .nav>a[data-p="3"]{display:none}
    .nav .nm-pop a[data-p="3"]{display:flex}
    .nav-more:has(a.active[data-p="3"]) summary{background:var(--surface);color:var(--text);box-shadow:var(--shadow-sm)}
  }
  @container topbar (max-width:820px){
    .nav>a[data-p="2"]{display:none}
    .nav .nm-pop a[data-p="2"]{display:flex}
    .nav-more:has(a.active[data-p="2"]) summary{background:var(--surface);color:var(--text);box-shadow:var(--shadow-sm)}
  }
}
.search{min-width:160px}
@media (max-width:720px){.search{min-width:0}}

/* global search dropdown */
.topbar .search{position:relative}
.gs-pop{position:absolute;top:calc(100% + 8px);left:0;right:0;min-width:min(440px,calc(100vw - 28px));max-height:min(70vh,560px);overflow-y:auto;z-index:90;
  background:var(--surface);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow-lg);padding:6px;animation:gs-in .12s ease}
@keyframes gs-in{from{opacity:0;transform:translateY(-4px)}}
.gs-h{font-size:.68rem;font-weight:750;letter-spacing:.06em;text-transform:uppercase;color:var(--text-3);padding:10px 10px 4px}
.gs-item{display:flex;align-items:center;gap:10px;padding:7px 10px;border-radius:11px;color:var(--text);text-decoration:none;min-width:0}
.gs-item:hover,.gs-item[aria-selected="true"]{background:var(--brand-soft)}
.gs-item[aria-selected="true"]{box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--brand) 45%,transparent)}
.gs-ico{flex:none;width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:var(--surface-2);font-size:1.05rem;overflow:hidden}
.gs-ico .avatar{width:34px;height:34px;border-radius:10px;overflow:hidden;display:block}
.gs-ico .avatar img,.gs-ico .avatar .placeholder{width:100%;height:100%;object-fit:cover;display:grid;place-items:center}
.gs-txt{display:flex;flex-direction:column;min-width:0;flex:1}
.gs-txt b{font-weight:650;font-size:.9rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gs-txt small{font-size:.75rem;color:var(--text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gs-pop mark{background:color-mix(in srgb,var(--warn) 28%,transparent);color:inherit;border-radius:3px;padding:0 1px}
.gs-tag{flex:none;font-size:.7rem;font-weight:650;padding:2px 8px;border-radius:99px;background:var(--surface-2);color:var(--text-2)}
.gs-tag.ok{background:var(--ok-soft);color:var(--ok)}.gs-tag.warn{background:var(--warn-soft);color:var(--warn)}.gs-tag.water{background:var(--water-soft,var(--brand-soft));color:var(--water,var(--brand))}
.gs-empty{padding:18px 12px;text-align:center;color:var(--text-2);display:flex;flex-direction:column;gap:4px}
.gs-empty small{color:var(--text-3)}
@media (max-width:720px){.gs-pop{position:fixed;left:10px;right:10px;top:calc(var(--topbar-h,61px) + 4px);min-width:0;max-height:calc(100vh - var(--topbar-h,61px) - 100px)}}

/* plants page filter */
.toolbar .search.plant-filter{order:0;flex:0 1 260px;max-width:300px;min-width:160px;margin-left:0;height:38px}
@media (max-width:720px){.toolbar .search.plant-filter{flex:0 0 190px;min-width:0}}

/* Ask CactusOS: compact follow-up suggestions */
.ai-sugg{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.ai-sugg span{font-size:.9em}
.chat-suggest{max-width:420px;margin:0 auto}
.chat-next{display:flex;flex-wrap:wrap;gap:6px;padding-left:34px;margin-top:-4px}
.chat-next .ai-sugg{font-size:.78rem;padding:4px 10px;min-height:0;height:28px;flex:none}
.chat-next .ai-sugg:hover{border-color:var(--ai-1);color:var(--text)}
.chat-next .ai-sugg.more{color:var(--text-3);border-style:dashed}

/* ---------- Settings → Locations ---------- */
.lc-card-wrap{margin-top:18px;scroll-margin-top:calc(var(--topbar-h,64px) + 12px)}
.lc-sub{font-size:.8rem;font-weight:700;color:var(--text-2);margin:14px 0 8px;text-transform:uppercase;letter-spacing:.04em}
.lc-sub:first-of-type{margin-top:4px}
.lc-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:10px}
.lc-tile{display:flex;align-items:flex-start;gap:10px;text-align:left;font:inherit;color:inherit;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:10px 12px;cursor:pointer;transition:border-color .15s,box-shadow .15s,transform .15s;min-width:0}
.lc-tile:hover{border-color:var(--brand);box-shadow:0 6px 18px rgba(0,0,0,.06);transform:translateY(-1px)}
.lc-tile.off{opacity:.55}
.lc-tile .li-main{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.lc-tile b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lc-ico{width:36px;height:36px;flex:none;border-radius:11px;background:var(--brand-soft);display:grid;place-items:center;font-size:1.2rem}
.lc-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;margin-top:3px}
.lc-tag{font-size:.68rem;font-weight:650;border-radius:999px;padding:1px 7px;background:var(--surface-2,rgba(0,0,0,.05));color:var(--text-2);white-space:nowrap}
.lc-tag.mine{background:var(--brand-soft);color:var(--brand)}
.lc-empty{border:1.5px dashed var(--line);border-radius:14px;padding:14px;text-align:center}
.lc-av{display:grid;place-items:center;font-size:1.4rem;background:var(--brand-soft)}
.lc-emoji{width:76px;height:40px;text-align:center;font-size:1.05rem}
.lc-fixed{border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:var(--surface-2,rgba(0,0,0,.03))}
.lc-usage{margin-top:12px;padding:10px 12px;border-radius:12px;background:var(--surface-2,rgba(0,0,0,.03))}
.env-manage{margin-left:auto;font-size:.75rem;font-weight:600;color:var(--brand);text-decoration:none}
.env-manage:hover{text-decoration:underline}
@media (max-width:720px){.lc-grid{grid-template-columns:1fr 1fr}.lc-tile{flex-direction:column;gap:6px}.lc-tile b{white-space:normal}}
@media (max-width:380px){.lc-grid{grid-template-columns:1fr}.lc-tile{flex-direction:row}}
.lc-defs-line{color:var(--text-2);margin-top:4px;line-height:1.45}
.lc-defs{border:1px solid var(--line);border-radius:14px;padding:12px;background:var(--surface-2,rgba(0,0,0,.02))}
.env-from.location{color:var(--brand);background:var(--brand-soft)}
.env-from.template{color:var(--warn,#b26a00);background:var(--warn-soft,rgba(255,170,0,.14))}
.tp-ico,.tp-av{background:var(--brand-soft)}
.tp-av{display:grid;place-items:center;font-size:1.4rem}
.tp-facts{display:flex;flex-wrap:wrap;gap:4px 6px}
.tp-facts span{background:var(--surface-2,rgba(0,0,0,.04));border-radius:999px;padding:2px 9px;font-size:.76rem;color:var(--text-2)}
/* plant values that don't follow the location's defaults */
.env-differs{margin-top:12px;padding:10px 12px;border-radius:12px;background:var(--warn-soft);border:1px solid color-mix(in srgb,var(--warn) 25%,transparent)}
.env-differs-h{font-size:.86rem;margin-bottom:6px;color:color-mix(in srgb,var(--warn) 55%,var(--text))}
.env-differs ul{list-style:none;margin:0 0 8px;padding:0;display:grid;gap:4px}
.env-differs li{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;font-size:.84rem}
.env-differs li>span:first-child{color:var(--text-2);min-width:110px}
.env-differs li .faint{font-size:.76rem}
.env-differs-a{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}
.env-follow{margin:0 0 12px;padding:9px 12px;border-radius:12px;background:var(--brand-soft);font-size:.84rem;line-height:1.45}

/* ── Signed-out: landing page (#/) and sign-in (#login / #signup) ── */
html.logged-out body>*:not(#landing):not(#toasts){display:none !important}
html.logged-out body{overflow:auto}
html.logged-out{scroll-behavior:smooth}
#landing{min-height:100vh;min-height:100dvh;background:radial-gradient(1100px 560px at 70% -8%,var(--brand-soft),transparent 70%),var(--bg)}
/* sign-in card */
#landing.lp-auth{display:grid;place-items:center;padding:32px 20px}
.ld{position:relative;width:100%;max-width:360px;display:flex;flex-direction:column;align-items:center;gap:24px}
.ld-back{align-self:flex-start;color:var(--text-2);font-size:.88rem;font-weight:600;text-decoration:none}
.ld-back:hover{color:var(--brand)}
.ld-brand{text-align:center}
.ld-mark{display:inline-grid;place-items:center;width:64px;height:64px;border-radius:20px;font-size:2rem;text-decoration:none;
  background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow-sm);margin-bottom:14px}
.ld-brand h1{margin:0;font-size:1.9rem;letter-spacing:-.03em;font-weight:700;color:var(--text)}
.ld-brand h1 b,.lp-logo b{color:var(--brand);font-weight:800}
.ld-brand p{margin:6px 0 0;color:var(--text-2);font-size:.95rem}
.ld-form{width:100%;display:flex;flex-direction:column;gap:14px;padding:26px 24px 22px;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.ld-form h2{margin:0 0 2px;font-size:1.08rem;font-weight:700;color:var(--text)}
.ld-f{display:flex;flex-direction:column;gap:6px}
.ld-f>span{font-size:.82rem;font-weight:650;color:var(--text-2)}
.ld-f small{color:var(--text-3);font-size:.76rem}
.ld-f .input{width:100%}
.ld-err{margin:0;padding:9px 12px;border-radius:var(--radius-sm);background:var(--danger-soft);color:var(--danger);font-size:.85rem}
.ld-err[hidden]{display:none}
.ld-go{width:100%;height:44px;margin-top:4px}
.ld-switch{margin:2px 0 0;text-align:center;font-size:.86rem;color:var(--text-2)}
.ld-link{font-weight:650;color:var(--brand);text-decoration:none}
.ld-link:hover{text-decoration:underline}
.ld-foot{margin:0;color:var(--text-3);font-size:.78rem;text-align:center}
/* landing page */
.lp{--lp-w:1160px}
.lp a{text-decoration:none}
.lp-nav{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:24px;max-width:var(--lp-w);margin:0 auto;padding:14px 24px;
  background:color-mix(in srgb,var(--bg) 78%,transparent);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
.lp-logo{display:flex;align-items:center;gap:8px;font-size:1.15rem;font-weight:700;letter-spacing:-.02em;color:var(--text)}
.lp-logo>span:first-child{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--brand-soft);font-size:1.1rem}
.lp-links{display:flex;gap:4px;margin-left:12px}
.lp-links a{padding:7px 12px;border-radius:999px;color:var(--text-2);font-weight:600;font-size:.9rem}
.lp-links a:hover{color:var(--text);background:var(--surface)}
.lp-cta-s{display:flex;gap:8px;margin-left:auto}
.lp-hero{display:grid;grid-template-columns:1.05fr 1fr;gap:56px;align-items:center;max-width:var(--lp-w);margin:0 auto;padding:64px 24px 72px}
.lp-eyebrow{display:inline-block;padding:5px 12px;border-radius:999px;background:var(--brand-soft);color:var(--brand);font-weight:700;font-size:.78rem;letter-spacing:.02em}
.lp-copy h1{margin:18px 0 0;font-size:clamp(2.3rem,5vw,3.6rem);line-height:1.04;letter-spacing:-.04em;font-weight:780;color:var(--text)}
.lp-copy h1 em{font-style:normal;color:var(--brand)}
.lp-copy>p{margin:20px 0 0;max-width:34em;font-size:1.08rem;line-height:1.6;color:var(--text-2)}
.lp-ctas{display:flex;flex-wrap:wrap;gap:10px;margin-top:28px}
.lp-big{height:50px;padding:0 24px;font-size:1rem;border-radius:12px}
.lp-ticks{display:flex;flex-wrap:wrap;gap:6px 18px;margin:22px 0 0;padding:0;list-style:none;color:var(--text-3);font-size:.86rem}
.lp-ticks li::before{content:'✓';margin-right:6px;color:var(--brand);font-weight:800}
.lp-visual{position:relative;padding:0 0 120px 0}
.lp-shot{background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow-lg);overflow:hidden;transform:rotate(-1deg)}
.lp-shot-bar{display:flex;align-items:center;gap:6px;padding:10px 14px;border-bottom:1px solid var(--line);background:var(--surface-2)}
.lp-shot-bar i{width:9px;height:9px;border-radius:50%;background:var(--line)}
.lp-shot-bar span{margin-left:10px;font-size:.72rem;color:var(--text-3)}
.lp-shot-body{padding:16px;display:flex;flex-direction:column;gap:12px}
.lp-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.lp-kpis div{padding:10px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line-2)}
.lp-kpis b{display:block;font-size:1.1rem;letter-spacing:-.02em;color:var(--text)}
.lp-kpis span{font-size:.7rem;color:var(--text-3)}
.lp-kpis .w b{color:var(--water)}.lp-kpis .k b{color:#8b5cf6}.lp-kpis .m b{color:var(--brand)}
.lp-brief{display:flex;gap:10px;padding:12px;border-radius:12px;background:linear-gradient(135deg,color-mix(in srgb,#8b5cf6 12%,var(--surface)),var(--brand-soft));border:1px solid var(--line-2)}
.lp-brief b{display:block;font-size:.88rem;color:var(--text)}
.lp-brief small{font-size:.76rem;color:var(--text-2)}
.lp-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.lp-list li{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:10px;border:1px solid var(--line-2)}
.lp-ic{display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:var(--brand-soft);flex:none}
.lp-n{flex:1;min-width:0;display:flex;flex-direction:column}
.lp-n b{font-size:.82rem;font-weight:650;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lp-n small{font-size:.7rem;color:var(--text-3)}
.lp-pill{flex:none;padding:3px 9px;border-radius:999px;font-size:.7rem;font-weight:700}
.lp-pill.water{background:var(--water-soft);color:var(--water)}.lp-pill.ok{background:var(--ok-soft);color:var(--ok)}
.lp-pill.brand{background:var(--brand-soft);color:var(--brand)}.lp-pill.warn{background:var(--warn-soft);color:var(--warn)}
.lp-tree{position:absolute;left:-24px;bottom:0;width:210px;padding:12px 14px;border-radius:14px;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow);transform:rotate(1.5deg)}
.lp-tree-t{font-size:.72rem;font-weight:700;color:var(--text-2)}
.lp-tree-m{margin:8px auto 0;width:max-content;padding:4px 10px;border-radius:8px;background:var(--brand);color:var(--brand-ink);font-size:.76rem;font-weight:700;position:relative}
.lp-tree-m::after{content:'';position:absolute;left:50%;top:100%;height:10px;border-left:2px solid var(--line)}
.lp-tree-k{display:flex;justify-content:space-between;margin-top:10px;padding-top:8px;border-top:2px solid var(--line)}
.lp-tree-k span{padding:3px 7px;border-radius:7px;background:var(--surface-2);border:1px solid var(--line);font-size:.68rem;font-weight:650;color:var(--text)}
.lp-tree-s{margin-top:8px;font-size:.7rem;color:var(--text-3)}.lp-tree-s b{color:var(--brand)}
.lp-sec{max-width:var(--lp-w);margin:0 auto;padding:72px 24px;scroll-margin-top:60px}
.lp-head{text-align:center;max-width:620px;margin:0 auto 40px}
.lp-head h2,.lp-private h2,.lp-final h2{margin:14px 0 0;font-size:clamp(1.6rem,3vw,2.2rem);letter-spacing:-.03em;font-weight:760;color:var(--text)}
.lp-head p{margin:10px 0 0;color:var(--text-2);font-size:1.02rem}
.lp-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.lp-feat{padding:22px;border-radius:var(--radius);background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow-sm);transition:transform .18s,box-shadow .18s}
.lp-feat:hover{transform:translateY(-3px);box-shadow:var(--shadow)}
.lp-fi{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:var(--brand-soft);font-size:1.3rem}
.lp-feat h3{margin:14px 0 6px;font-size:1rem;font-weight:700;color:var(--text)}
.lp-feat p{margin:0;font-size:.88rem;line-height:1.55;color:var(--text-2)}
.lp-steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:20px;counter-reset:s}
.lp-steps li{position:relative;padding:26px 24px;border-radius:var(--radius);background:var(--surface);border:1px solid var(--line)}
.lp-steps li>span{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--brand);color:var(--brand-ink);font-weight:800}
.lp-steps h3{margin:14px 0 6px;font-size:1.05rem;color:var(--text)}
.lp-steps p{margin:0;color:var(--text-2);font-size:.92rem;line-height:1.55}
.lp-private{display:flex;align-items:center;gap:28px;margin:24px auto;max-width:calc(var(--lp-w) - 48px);padding:40px;border-radius:24px;
  background:linear-gradient(135deg,var(--brand-soft),var(--surface));border:1px solid var(--line)}
.lp-pv-ic{flex:none;display:grid;place-items:center;width:72px;height:72px;border-radius:20px;background:var(--surface);border:1px solid var(--line);font-size:2rem;box-shadow:var(--shadow-sm)}
.lp-private h2{margin:0}
.lp-private p{margin:8px 0 0;color:var(--text-2);max-width:46em;line-height:1.6}
.lp-final{text-align:center;padding:88px 24px 72px}
.lp-final .lp-ctas{justify-content:center}
.lp-foot{display:flex;justify-content:space-between;gap:12px;max-width:var(--lp-w);margin:0 auto;padding:22px 24px 30px;border-top:1px solid var(--line);color:var(--text-3);font-size:.84rem}
@media (max-width:980px){
  .lp-hero{grid-template-columns:1fr;gap:44px;padding-top:40px}
  .lp-visual{max-width:560px;margin:0 auto;width:100%;padding-left:28px}
  .lp-grid{grid-template-columns:repeat(2,1fr)}
  .lp-links{display:none}
}
@media (max-width:640px){
  .lp-nav{padding:12px 16px;gap:10px}
  .lp-cta-s .btn{padding:8px 12px;font-size:.88rem}
  .lp-hero{padding:28px 18px 48px}
  .lp-visual{padding:0}
  .lp-tree{display:none}
  .lp-shot{transform:none}
  .lp-kpis{grid-template-columns:repeat(2,1fr)}
  .lp-ctas .lp-big{flex:1;justify-content:center;text-align:center}
  .lp-sec{padding:52px 18px}
  .lp-grid,.lp-steps{grid-template-columns:1fr}
  .lp-grid{gap:10px}
  .lp-feat{display:grid;grid-template-columns:44px 1fr;column-gap:14px;padding:16px}
  .lp-feat .lp-fi{grid-row:span 2}
  .lp-feat h3{margin:2px 0 4px}
  .lp-private{flex-direction:column;align-items:flex-start;padding:28px 22px;margin:12px 18px}
  .lp-foot{flex-direction:column;align-items:center}
}
.acct-card{display:flex;align-items:center;gap:12px;padding:14px 16px;margin-bottom:18px}
.acct-av{flex:none;display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:var(--brand);color:var(--brand-ink);font-weight:750;font-size:1.05rem}
.acct-card .li-main{flex:1;min-width:0}
@media (max-width:560px){.acct-card{flex-wrap:wrap}.acct-card .btn{flex:1}}

/* ---------- Ask CactusOS rich answers (ai.js md: chips, tags, sections, callouts, tables) ---------- */
.msg.bot .li-main{flex:1;min-width:0}
.msg.bot .bubble.answer{background:var(--surface);border:1px solid var(--line);border-radius:6px 16px 16px 16px;padding:12px 14px;box-shadow:0 1px 2px rgb(0 0 0 / .04)}
.answer .t-danger{--tc:var(--danger);--ts:var(--danger-soft)} .answer .t-warn{--tc:var(--warn);--ts:var(--warn-soft)}
.answer .t-ok{--tc:var(--ok);--ts:var(--ok-soft)} .answer .t-sand{--tc:var(--sand);--ts:var(--sand-soft)}
.answer .t-water{--tc:var(--water);--ts:var(--water-soft)} .answer .t-violet{--tc:var(--violet);--ts:var(--violet-soft)}
.answer .t-brand{--tc:var(--brand);--ts:var(--brand-soft)} .answer .t-muted{--tc:var(--text-3);--ts:var(--surface-2)}
.ans-lead{font-size:.95rem;font-weight:500;color:var(--text);line-height:1.55}
.ans-sec{margin-top:12px;padding-top:10px;border-top:1px solid var(--line-2)}
.ans-h{display:flex;align-items:center;gap:7px;margin:0 0 4px;font-size:.74rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--text-2)}
.ans-h-ico{font-size:.95rem;letter-spacing:0;width:24px;height:24px;display:grid;place-items:center;border-radius:8px;background:var(--surface-2)}
.bubble .ans-list{list-style:none;margin:0;padding:0}
.bubble .ans-list>li{position:relative;margin:0;padding:6px 0 6px 16px;line-height:1.6;border-bottom:1px dashed var(--line-2)}
.bubble .ans-list>li:last-child{border-bottom:0}
.bubble ul.ans-list>li::before{content:"";position:absolute;left:3px;top:1.05em;width:6px;height:6px;border-radius:50%;background:color-mix(in srgb,var(--ai-1) 55%,var(--line))}
.bubble ol.ans-list{counter-reset:ans}
.bubble ol.ans-list>li{counter-increment:ans;padding-left:24px}
.bubble ol.ans-list>li::before{content:counter(ans);position:absolute;left:0;top:.62em;width:17px;height:17px;border-radius:50%;display:grid;place-items:center;font-size:.66rem;font-weight:700;background:var(--surface-2);color:var(--text-2)}
.bubble .ans-list>li.nested{margin-left:16px;border-bottom:0;padding-top:2px}
.ref{display:inline-flex;align-items:center;gap:5px;max-width:100%;padding:1px 9px 1px 2px;margin:1px 0;border-radius:999px;border:1px solid var(--line);background:var(--surface-2);color:var(--text);font-weight:600;font-size:.86em;line-height:1.55;text-decoration:none;vertical-align:baseline;transition:border-color .15s,background .15s}
.ref:hover,.ref:focus-visible{border-color:var(--brand);background:var(--brand-soft);outline:0}
.ref img,.ref .ref-ico{flex:none;width:19px;height:19px;border-radius:50%;object-fit:cover}
.ref .ref-ico{display:grid;place-items:center;font-size:.7rem;background:var(--brand-soft)}
.ref-l{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ref-dot{flex:none;width:7px;height:7px;border-radius:50%;background:var(--tc,var(--text-3));box-shadow:0 0 0 2px var(--ts,transparent)}
.ref-case,.ref-prop{border-color:color-mix(in srgb,var(--tc,var(--line)) 40%,var(--line))}
.ref-case .ref-ico,.ref-prop .ref-ico{background:var(--ts,var(--surface))}
.ref-case .ref-l,.ref-prop .ref-l{font-variant-numeric:tabular-nums}
.ref-group .ref-ico{background:var(--sand-soft)}
.ref.archived{opacity:.65;text-decoration:line-through}
.atag{display:inline-block;margin:0 2px;padding:0 7px;border-radius:999px;font-size:.7rem;font-weight:700;line-height:1.6;white-space:nowrap;vertical-align:1px;background:var(--ts);color:var(--tc)}
.ans-callout{margin-top:12px;padding:9px 12px;border-radius:12px;font-size:.88rem;line-height:1.5;background:var(--warn-soft);border:1px solid color-mix(in srgb,var(--warn) 25%,transparent)}
.ans-callout.c-tip{background:color-mix(in srgb,var(--ai-1) 9%,var(--surface));border-color:color-mix(in srgb,var(--ai-1) 25%,transparent)}
.ans-callout.c-info{background:var(--water-soft);border-color:color-mix(in srgb,var(--water) 22%,transparent)}
.ans-table{margin:8px 0 2px;overflow-x:auto;border:1px solid var(--line-2);border-radius:10px}
.ans-table table{width:100%;border-collapse:collapse;font-size:.83rem;font-variant-numeric:tabular-nums}
.ans-table th{text-align:left;font-size:.68rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--text-3);background:var(--surface-2);padding:7px 9px;white-space:nowrap}
.ans-table td{padding:6px 9px;border-top:1px solid var(--line-2);vertical-align:top}
.msg-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 2px;margin-top:-2px}
.msg-foot .msg-tools{padding:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.msg-act{flex:none;border:0;background:none;color:var(--text-3);cursor:pointer;font-size:.9rem;width:26px;height:24px;border-radius:7px;opacity:.6}
.msg-act:hover,.msg-act:focus-visible{opacity:1;background:var(--surface-2);color:var(--text)}
.chat-next .ai-sugg.fup{max-width:100%;overflow:hidden;text-overflow:ellipsis;background:color-mix(in srgb,var(--ai-1) 8%,var(--surface));border-color:color-mix(in srgb,var(--ai-1) 30%,var(--line));color:var(--text)}
.chat-next .ai-sugg.fup span{color:var(--ai-1)}
.gx-mat-acts{display:flex;gap:2px;flex-shrink:0}
@media (max-width:560px){.gx-mat-acts{flex-direction:column}}
.gx-mat-chips .chip-filter[disabled]{opacity:1;cursor:default}
.gx-stepper .btn[disabled]{opacity:.35}

/* ---------- Plant page v2: hero vitals, menus, overview, sales sections */
.pv-hero .hero-body{gap:12px}
.ph-sub{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:8px;font-size:.86rem;color:var(--text-2)}
.ph-sub a{color:var(--brand);font-weight:600}
.pv-vitals{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.pv-vital{--t:var(--text-2);--ts:var(--surface-2);display:flex;align-items:flex-start;gap:10px;min-width:0;padding:10px 12px;border:1px solid var(--line-2);border-radius:14px;
  background:var(--surface-2);color:inherit;font:inherit;text-align:left;cursor:pointer;transition:border-color .15s,transform .15s,box-shadow .15s}
.pv-vital:hover{border-color:var(--t);transform:translateY(-1px);box-shadow:var(--shadow-sm)}
.pv-vi{flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--ts);font-size:1.05rem}
.pv-vt{display:flex;flex-direction:column;min-width:0;line-height:1.25}
.pv-vl{font-size:.68rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--text-3)}
.pv-vt b{font-size:.98rem;color:var(--t);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pv-vs{font-size:.76rem;color:var(--text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.t-danger{--t:var(--danger);--ts:var(--danger-soft)} .t-warn{--t:var(--warn);--ts:var(--warn-soft)} .t-water{--t:var(--water);--ts:var(--water-soft)}
.t-ok{--t:var(--ok);--ts:var(--ok-soft)} .t-sand{--t:var(--sand);--ts:var(--sand-soft)} .t-brand{--t:var(--brand);--ts:var(--brand-soft)}
.t-violet{--t:var(--violet);--ts:var(--violet-soft)} .t-info{--t:var(--water);--ts:var(--water-soft)} .t-muted,.t-{--t:var(--text-2);--ts:var(--surface)}
.pv-vital.t-muted b,.pv-vital.t- b{color:var(--text)}

.pmenu{position:relative;display:inline-flex}
.pmenu-list{display:none;position:absolute;top:calc(100% + 6px);left:0;z-index:40;min-width:260px;max-width:min(320px,calc(100vw - 24px));padding:6px;
  background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow-lg)}
.pmenu.open .pmenu-list{display:block;animation:gt-in .15s ease}
.pmenu-list.left{left:auto;right:0}
.pmenu-list.up{top:auto;bottom:calc(100% + 6px)}
.pmenu-list hr{border:0;border-top:1px solid var(--line-2);margin:5px 6px}
.pmenu-item{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border:0;border-radius:10px;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}
.pmenu-item:hover,.pmenu-item:focus-visible{background:var(--surface-2)}
.pmenu-item .li-main{display:flex;flex-direction:column;min-width:0;line-height:1.25}
.pmenu-item b{font-size:.9rem;font-weight:620}
.pmenu-i{flex:none;width:30px;height:30px;display:grid;place-items:center;border-radius:9px;background:var(--surface-2);font-size:1rem}
.pmenu-item.danger b{color:var(--danger)}
.pmenu-item.danger .pmenu-i{background:var(--danger-soft)}
.pmenu>.btn[aria-expanded="true"]{box-shadow:inset 0 0 0 1.5px var(--brand)}
.btn-ai{background:var(--violet-soft);color:var(--violet);border-color:transparent}
.btn-ai:hover{background:color-mix(in srgb,var(--violet) 18%,var(--surface))}

.pv-attn-card[hidden]{display:none}
.pv-attn{list-style:none;margin:0;padding:4px 12px 12px;display:flex;flex-direction:column;gap:6px}
.pv-attn-row{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:12px;background:var(--ts);border-left:3px solid var(--t)}
.pv-attn-i{flex:none;font-size:1.2rem;width:26px;text-align:center}
.pv-attn-txt{display:flex;flex-direction:column;min-width:0;flex:1;border:0;background:none;padding:0;color:inherit;font:inherit;text-align:left;cursor:pointer;line-height:1.3}
div.pv-attn-txt{cursor:default}
.pv-attn-txt b{font-size:.92rem}
.pv-attn-txt .small{color:var(--text-2)}
.pv-attn-row .btn{flex:none}
.pv-allgood{display:flex;align-items:center;gap:12px;padding:14px 18px}
.pv-allgood>span{font-size:1.4rem}
.pv-allgood .li-main{display:flex;flex-direction:column}

.pv-glance{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:18px}
.pv-tile{display:flex;flex-direction:column;gap:2px;min-width:0;padding:12px 14px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);
  color:inherit;font:inherit;text-align:left;cursor:pointer;box-shadow:var(--shadow-sm);transition:border-color .15s,transform .15s,box-shadow .15s}
.pv-tile:hover{border-color:var(--brand);transform:translateY(-1px);box-shadow:var(--shadow)}
.pv-tile-h{display:flex;align-items:center;gap:6px;font-size:.72rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--text-3)}
.pv-tile b{font-size:1rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pv-tile .small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pv-thumbs{display:flex;gap:4px;margin-top:6px}
.pv-thumbs img{width:34px;height:34px;object-fit:cover;border-radius:8px}

.pv-rlist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.pv-rlist li{display:flex;align-items:center;gap:10px;padding:8px 0;border-top:1px solid var(--line-2)}
.pv-rlist li:first-child{border-top:0;padding-top:0}
.pv-rlist .li-main{display:flex;flex-direction:column;min-width:0;flex:1;line-height:1.3}
.pv-rlist .li-main b{font-size:.88rem}
.pv-rlist .li-main .small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pv-ri{flex:none;width:30px;height:30px;display:grid;place-items:center;border-radius:9px;background:var(--surface-2)}

.pv-seg{display:inline-flex;gap:4px;padding:4px;margin-bottom:14px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line-2)}
.pv-seg button{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 14px;border:0;border-radius:9px;background:none;color:var(--text-2);font:650 .86rem var(--font);cursor:pointer}
.pv-seg button[aria-selected="true"]{background:var(--surface);color:var(--text);box-shadow:var(--shadow-sm)}

.gx-status{padding:14px 16px;border-radius:14px;background:var(--ts);border:1px solid color-mix(in srgb,var(--t) 25%,transparent);display:flex;flex-direction:column;gap:12px}
.gx-status.t-muted,.gx-status.t-{background:var(--surface-2);border-color:var(--line-2)}
.gx-status.t-leaf{--t:var(--ok);--ts:var(--ok-soft)}
.gx-status-top{display:flex;align-items:center;gap:12px}
.gx-status-i{flex:none;width:44px;height:44px;display:grid;place-items:center;border-radius:12px;background:var(--surface);font-size:1.4rem}
.gx-status-top .li-main{display:flex;flex-direction:column;min-width:0;line-height:1.3}
.gx-status-top b{font-size:1.15rem;color:var(--t)}
.gx-status.t-muted .gx-status-top b{color:var(--text)}
.gx-status-tags{display:flex;flex-wrap:wrap;gap:6px}
.gx-status-tags>span{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:999px;background:var(--surface);font-size:.8rem;font-weight:600;color:var(--text-2)}
.gx-status .gx-money>div{background:var(--surface)}
.gx-status .gx-actions{margin:0}

.psecs{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.psec+.psec{border-top:1px solid var(--line)}
.psec>summary{display:flex;align-items:center;gap:12px;padding:12px 14px;cursor:pointer;list-style:none;transition:background .15s}
.psec>summary::-webkit-details-marker{display:none}
.psec>summary:hover{background:var(--surface-2)}
.psec>summary .li-main{display:flex;flex-direction:column;min-width:0;flex:1;line-height:1.3}
.psec>summary .small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.psec-i{flex:none;width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:var(--surface-2);font-size:1.05rem}
.psec-chev{flex:none;width:8px;height:8px;margin:0 4px;border-right:2px solid var(--text-3);border-bottom:2px solid var(--text-3);transform:rotate(-45deg);transition:transform .2s}
.psec[open]>summary .psec-chev{transform:rotate(45deg)}
.psec[open]>summary{background:var(--surface-2)}
.psec-body{padding:12px 14px 16px;display:flex;flex-direction:column;gap:12px}
.psec-body>.gx-block{border:0;padding:0;background:none;margin:0}
.psec-body>.gx-block>.gx-block-head{display:none}

@media (max-width:1020px){
  .pv-vitals{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pv-glance{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:720px){
  .ph-sub{font-size:.8rem;gap:2px 10px}
  .pv-vitals{gap:6px}
  .pv-vital{padding:8px 10px;gap:8px}
  .pv-vi{width:28px;height:28px;font-size:.9rem}
  .pv-vt b{font-size:.88rem}
  .pv-hero .ph-main{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr)}
  .pv-hero .ph-main>.pmenu{display:flex}
  .pv-hero .ph-main>.pmenu>.btn{flex:1;flex-direction:column;height:auto;min-height:62px;padding:8px 4px;gap:4px;font-size:.72rem;line-height:1.15;justify-content:center}
  .pv-hero .ph-main>.pmenu>.btn .ph-i{font-size:1.2rem}
  .pmenu-list{position:fixed;z-index:80;left:0!important;right:0!important;top:auto!important;bottom:0!important;max-width:none;min-width:0;padding:8px 10px calc(14px + env(safe-area-inset-bottom));
    border-radius:20px 20px 0 0;border-bottom:0;max-height:80vh;overflow:auto}
  .pmenu-list::before{content:"";display:block;width:40px;height:4px;margin:2px auto 8px;border-radius:4px;background:var(--line)}
  .pmenu.open::before{content:"";position:fixed;inset:0;z-index:79;background:rgba(0,0,0,.35);animation:fade .15s ease}
  .pmenu-item{padding:10px}
  .pv-glance{gap:8px}
  .pv-tile{padding:10px 12px}
  .pv-attn{padding:2px 10px 10px}
  .pv-attn-row{flex-wrap:wrap;gap:8px 10px;padding:9px 10px}
  .pv-attn-row .btn{margin-left:36px}
  .gx-status{padding:12px}
  .psec>summary{padding:11px 12px;gap:10px}
  .psec>summary .pill{display:none}
}
.pv-hero{margin-bottom:16px}
@media (max-width:1020px){
  /* single column plant tabs: the thing you act on first, explanations after */
  #pv-attn{order:0}#ai-panel{order:1}.pv-glance{order:3}.sec-growth{order:4}.pv-recent{order:5}.sec-followups{order:2}
  [data-pane="care"] .sec-water{order:1}[data-pane="care"] #care-plan{order:2}[data-pane="care"] #wx-plant{order:3}
  [data-pane="care"] #env-card{order:4}[data-pane="care"] #sun-card{order:5}[data-pane="care"] .sec-group{order:6}[data-pane="care"] .sec-changes{order:7}
  .pv-glance{margin-bottom:0}
}
/* the header menus must not be clipped by the card: let it overflow and round the photo instead */
.pv-hero{overflow:visible;position:relative}
.pv-hero:has(.pmenu.open){z-index:25}
.pv-hero .hero-media{border-radius:var(--radius) 0 0 var(--radius);overflow:hidden}
@media (max-width:720px){.pv-hero .hero-media{border-radius:var(--radius) var(--radius) 0 0}}
@media (max-width:720px){.pv-hero:has(.pmenu.open){z-index:auto}}
.ai-cta{display:flex;align-items:center;gap:12px;padding:12px 14px}
.ai-cta .li-main{display:flex;flex-direction:column;min-width:0;flex:1;line-height:1.3}
.ai-cta .ai-spark{font-size:1.3rem}
.ai-newer{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 18px 4px;padding:8px 12px;border-radius:12px;background:var(--violet-soft);color:var(--text-2)}
.ai-newer span{flex:1;min-width:200px}
@media (max-width:720px){.ai-cta{flex-wrap:wrap}.ai-cta .btn-sm{margin-left:auto}}

/* ── Admin console (html.admin-mode: the admin account has no nursery) ── */
html.admin-mode body>*:not(#admin):not(#toasts):not(dialog){display:none !important}
html.admin-mode body{overflow:auto;background:var(--bg)}
#admin{min-height:100vh;min-height:100dvh;--adm-c:var(--brand)}
.adm-top{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:16px;padding:10px max(20px,calc((100vw - 1240px)/2));
  background:color-mix(in srgb,var(--bg) 82%,transparent);backdrop-filter:blur(14px);border-bottom:1px solid var(--line)}
.adm-brand{display:flex;align-items:center;gap:8px;font-size:1.08rem;white-space:nowrap}
.adm-brand em{font-style:normal;color:var(--brand)}
.adm-badge{font-size:.68rem;font-weight:750;letter-spacing:.06em;text-transform:uppercase;padding:3px 8px;border-radius:999px;background:var(--text);color:var(--bg)}
.adm-tabs{display:flex;gap:4px;padding:4px;border-radius:14px;background:var(--line-2);margin:0 auto}
.adm-tabs button{display:flex;align-items:center;gap:7px;height:36px;padding:0 14px;border:0;border-radius:10px;background:none;font:inherit;font-weight:620;color:var(--text-2);cursor:pointer;white-space:nowrap}
.adm-tabs button:hover{color:var(--text)}
.adm-tabs button[aria-selected=true]{background:var(--surface);color:var(--text);box-shadow:var(--shadow-sm)}
.adm-me{display:flex;align-items:center;gap:8px}
.adm-icon{display:inline-grid;place-items:center;min-width:36px;height:36px;padding:0 8px;border-radius:10px;border:1px solid var(--line);background:var(--surface);color:var(--text-2);font:inherit;font-size:1.05rem;cursor:pointer;list-style:none}
.adm-icon:hover{color:var(--text);border-color:color-mix(in srgb,var(--brand) 30%,var(--line))}
.adm-menu{position:relative}
.adm-menu>summary{list-style:none;cursor:pointer}
.adm-menu>summary::-webkit-details-marker{display:none}
.adm-me .adm-menu>summary{height:36px;display:flex;align-items:center;padding:0 12px;border-radius:10px;border:1px solid var(--line);background:var(--surface);font-weight:620;font-size:.9rem}
.adm-menu-list{position:absolute;right:0;top:calc(100% + 6px);z-index:30;min-width:210px;display:flex;flex-direction:column;padding:6px;border-radius:14px;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow-lg)}
.adm-menu-list button{display:flex;align-items:center;gap:8px;padding:10px 12px;border:0;border-radius:9px;background:none;font:inherit;font-size:.9rem;text-align:left;color:var(--text);cursor:pointer}
.adm-menu-list button:hover:not(:disabled){background:var(--surface-2)}
.adm-menu-list button:disabled{opacity:.45;cursor:default}
.adm-menu-list button.danger{color:var(--danger)}
.adm-main{max-width:1240px;margin:0 auto;padding:24px 20px 64px;display:flex;flex-direction:column;gap:18px}
.adm-head h1{margin:0;font-size:1.6rem;letter-spacing:-.02em}
.adm-head p{margin:4px 0 0;color:var(--text-2);font-size:.9rem}
.adm-head-row{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap}
.adm-loading,.adm-error{padding:60px 0;text-align:center;color:var(--text-2)}
.adm-empty{margin:8px 0;color:var(--text-3);font-size:.88rem}
.adm-err{color:var(--danger);font-weight:600}
.adm-link{font-size:.84rem;font-weight:650;color:var(--brand);text-decoration:none;white-space:nowrap}
.adm-alert{display:flex;align-items:center;gap:14px;padding:14px 16px;border-radius:16px;background:var(--warn-soft);border:1px solid color-mix(in srgb,var(--warn) 35%,transparent);font-size:.92rem}
.adm-alert>span{font-size:1.4rem}
.adm-alert>div{flex:1}
/* KPIs */
.adm-kpis{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px}
.adm-kpi{--k:var(--text-2);--ks:var(--surface-2);display:flex;gap:12px;align-items:flex-start;padding:16px;border-radius:16px;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow-sm)}
.adm-kpi.t-ok{--k:var(--ok);--ks:var(--ok-soft)}.adm-kpi.t-water{--k:var(--water);--ks:var(--water-soft)}
.adm-kpi.t-warn{--k:var(--warn);--ks:var(--warn-soft)}.adm-kpi.t-danger{--k:var(--danger);--ks:var(--danger-soft)}
.adm-kpi.t-violet{--k:var(--violet);--ks:var(--violet-soft)}.adm-kpi.t-sand{--k:var(--sand);--ks:var(--sand-soft)}
.adm-kpi-ico{flex:none;display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--ks);font-size:1.15rem;color:var(--k);font-weight:700}
.adm-kpi-v{font-size:1.45rem;font-weight:750;letter-spacing:-.02em;line-height:1.15;font-variant-numeric:tabular-nums}
.adm-kpi-l{font-size:.82rem;font-weight:650;color:var(--text-2)}
.adm-kpi-s{margin-top:4px;font-size:.78rem;color:var(--text-3);line-height:1.4}
/* cards & charts */
.adm-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(360px,1fr));gap:14px}
.adm-card{padding:16px 18px;border-radius:18px;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow-sm);min-width:0}
.adm-card>header{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:12px}
.adm-card h2{margin:0;font-size:.98rem}
.adm-card h2 small{font-weight:500;color:var(--text-3);font-size:.78rem;margin-left:4px}
.adm-chart{--c:var(--brand)}
.adm-chart.t-water{--c:var(--water)}.adm-chart.t-violet{--c:var(--violet)}.adm-chart.t-sand{--c:var(--sand)}
.adm-chart svg{display:block;overflow:visible}
.adm-chart rect{fill:var(--c);opacity:.85;transition:opacity .15s}
.adm-chart rect:hover{opacity:1}
.adm-chart .axis{stroke:var(--line);stroke-width:1;vector-effect:non-scaling-stroke}
.adm-chart-x{display:flex;justify-content:space-between;margin-top:6px;font-size:.74rem;color:var(--text-3)}
.adm-hbars{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}
.adm-hb-top{display:flex;justify-content:space-between;gap:10px;font-size:.88rem}
.adm-hb-top span{color:var(--text-2);font-variant-numeric:tabular-nums;white-space:nowrap}
.adm-hb-track{height:6px;margin-top:5px;border-radius:99px;background:var(--line-2);overflow:hidden}
.adm-hb-track i{display:block;height:100%;border-radius:inherit;background:var(--brand)}
.adm-hb-sub{margin-top:4px;font-size:.76rem;color:var(--text-3)}
.adm-dl{display:grid;grid-template-columns:auto 1fr;gap:7px 16px;margin:0;font-size:.88rem}
.adm-dl dt{color:var(--text-2)}.adm-dl dd{margin:0;text-align:right;font-weight:600}
/* users */
.adm-toolbar{display:flex;gap:10px}
.adm-toolbar .input{max-width:320px}
.adm-toolbar .btn{margin-left:auto}
.adm-users{display:grid;grid-template-columns:repeat(auto-fill,minmax(420px,1fr));gap:14px}
.adm-user{padding:16px 18px;border-radius:18px;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow-sm)}
.adm-user.is-off{opacity:.7;background:var(--surface-2)}
.adm-u-head{display:flex;align-items:flex-start;gap:12px}
.adm-avatar{flex:none;display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:var(--brand-soft);color:var(--brand);font-weight:750;font-size:1.1rem}
.adm-u-name{flex:1;min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.adm-u-name b{font-size:1.02rem}
.adm-u-sub{flex-basis:100%;font-size:.8rem;color:var(--text-3)}
.adm-tag{font-size:.7rem;font-weight:650;padding:2px 8px;border-radius:999px;background:var(--surface-2);border:1px solid var(--line-2);color:var(--text-2)}
.adm-tag.t-danger{background:var(--danger-soft);color:var(--danger);border-color:transparent}
.adm-tag.t-ok{background:var(--ok-soft);color:var(--ok);border-color:transparent}
.adm-u-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px 12px;margin:14px 0 0;padding-top:12px;border-top:1px solid var(--line-2)}
.adm-u-stats dt{font-size:.72rem;color:var(--text-3);font-weight:600}
.adm-u-stats dd{margin:2px 0 0;font-weight:700;font-variant-numeric:tabular-nums;font-size:.95rem}
.adm-u-stats small{font-weight:500;color:var(--text-3);font-size:.72rem}
/* AI */
.adm-seg{display:flex;gap:3px;padding:3px;border-radius:12px;background:var(--line-2)}
.adm-seg button{height:32px;padding:0 12px;border:0;border-radius:9px;background:none;font:inherit;font-size:.86rem;font-weight:620;color:var(--text-2);cursor:pointer}
.adm-seg button[aria-pressed=true]{background:var(--surface);color:var(--text);box-shadow:var(--shadow-sm)}
.adm-table-wrap{overflow-x:auto;margin:0 -18px;padding:0 18px}
.adm-table{width:100%;border-collapse:collapse;font-size:.86rem}
.adm-table th{text-align:left;font-size:.74rem;font-weight:650;color:var(--text-3);padding:6px 10px;border-bottom:1px solid var(--line)}
.adm-table td{padding:9px 10px;border-bottom:1px solid var(--line-2);vertical-align:top;white-space:nowrap}
.adm-table .r{text-align:right;font-variant-numeric:tabular-nums}
.adm-table .mono{font:500 .78rem ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--text-2)}
.adm-table tr.is-err td{background:var(--danger-soft)}
.adm-table .adm-err{font-size:.76rem;white-space:normal;max-width:320px}
/* dialogs */
.adm-dlg .cdlg-in{align-items:stretch}
.adm-dlg .cdlg-ico{align-self:center}
.adm-dlg .cdlg-in>h2,.adm-dlg .cdlg-msg{text-align:center}
.adm-f{text-align:left;display:flex;flex-direction:column;gap:5px;margin-top:12px;font-size:.84rem;font-weight:620;color:var(--text-2)}
.adm-f-err{margin:10px 0 0;color:var(--danger);font-size:.86rem;font-weight:600}
.adm-dlg code{font-size:.82rem}
@media (max-width:760px){
  .adm-top{flex-wrap:wrap;gap:10px;padding:10px 14px}
  .adm-tabs{order:3;flex-basis:100%;margin:0}
  .adm-tabs button{flex:1;justify-content:center;padding:0 8px;font-size:.88rem}
  .adm-me{margin-left:auto}
  .adm-main{padding:18px 14px 48px;gap:14px}
  .adm-head h1{font-size:1.35rem}
  .adm-kpis{grid-template-columns:1fr 1fr;gap:10px}
  .adm-kpi{flex-direction:column;gap:8px;padding:12px}
  .adm-kpi-ico{width:34px;height:34px;font-size:1rem}
  .adm-kpi-v{font-size:1.2rem}
  .adm-grid,.adm-users{grid-template-columns:1fr}
  .adm-u-stats{grid-template-columns:1fr 1fr}
  .adm-alert{flex-wrap:wrap}
  .adm-alert .btn{width:100%}
  .adm-toolbar .input{max-width:none}
}
/* ---- admin console: extended views (engagement, operations, security, content, user profile) ---- */
.adm-tabs{overflow-x:auto;scrollbar-width:none;max-width:100%}
.adm-tabs::-webkit-scrollbar{display:none}
@media (max-width:1240px){
  .adm-top{flex-wrap:wrap}
  .adm-tabs{order:3;flex-basis:100%;margin:0}
  .adm-me{margin-left:auto}
}
.adm-detail{display:flex;flex-direction:column;gap:18px}
.adm-ulink{color:inherit;font-weight:650;text-decoration:none;border-bottom:1px dashed color-mix(in srgb,var(--brand) 55%,transparent)}
.adm-ulink:hover{color:var(--brand)}
.adm-hint{color:var(--text-3);font-size:.8rem;font-weight:500}
.adm-note{margin:-6px 0 0;font-size:.82rem;color:var(--text-3)}
.adm-warn-t{color:var(--warn);font-weight:650}
.adm-danger-t{color:var(--danger)!important}
.adm-wrap{white-space:normal;word-break:break-word;display:inline-block;max-width:420px}
.adm-sub{margin:16px 0 6px;font-size:.78rem;text-transform:uppercase;letter-spacing:.05em;color:var(--text-3)}
.adm-card>.adm-sub:first-child,.adm-card>header+.adm-sub{margin-top:0}
.adm-tag.t-violet{background:var(--violet-soft);color:var(--violet);border-color:transparent}
.adm-tag.t-warn{background:var(--warn-soft);color:var(--warn);border-color:transparent}
.adm-card-warn{border-color:color-mix(in srgb,var(--danger) 35%,var(--line));background:color-mix(in srgb,var(--danger-soft) 45%,var(--surface))}
.adm-f-hint{font-weight:500;color:var(--text-3);font-size:.76rem}
.adm-head-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.adm-head-tools .adm-menu>summary.btn{display:inline-flex;align-items:center}
.adm-menu-wide{min-width:280px}
.adm-mi{display:flex;flex-direction:column;gap:2px;padding:10px 12px;border-radius:9px;color:var(--text);text-decoration:none;font-size:.9rem}
.adm-mi:hover{background:var(--surface-2)}
.adm-mi small{color:var(--text-3);font-size:.78rem}
/* charts: stacked series, legends, tones */
.adm-chart rect.s1{fill:var(--c2,var(--warn))}
.adm-chart.t-danger{--c:var(--danger);--c2:var(--warn)}
.adm-chart.t-okfail{--c:var(--ok);--c2:var(--danger)}
.adm-chart.t-sand{--c2:var(--violet)}
.adm-legend{display:flex;gap:14px;margin:-4px 0 8px;font-size:.76rem;color:var(--text-2)}
.adm-legend span{display:flex;align-items:center;gap:6px}
.adm-legend i{width:10px;height:10px;border-radius:3px;background:var(--c)}
.adm-legend i.s1{background:var(--c2,var(--warn))}
.adm-hbars.t-water .adm-hb-track i{background:var(--water)}
.adm-hbars.t-violet .adm-hb-track i{background:var(--violet)}
.adm-hbars.t-sand .adm-hb-track i{background:var(--sand)}
.adm-hbars.t-warn .adm-hb-track i{background:var(--warn)}
.adm-hbars.t-ok .adm-hb-track i{background:var(--ok)}
.adm-meter{height:6px;margin-top:6px;border-radius:99px;background:var(--line-2);overflow:hidden}
.adm-meter i{display:block;height:100%;border-radius:inherit;background:var(--violet)}
.adm-meter.t-warn i{background:var(--warn)}.adm-meter.t-danger i{background:var(--danger)}
.adm-cell-bar{position:relative;display:inline-flex;align-items:center;min-width:110px;height:22px;padding:0 8px;border-radius:7px;background:var(--line-2);font-weight:650;font-variant-numeric:tabular-nums;overflow:hidden;isolation:isolate}
.adm-cell-bar i{position:absolute;inset:0 auto 0 0;z-index:-1;background:color-mix(in srgb,var(--water) 30%,transparent)}
.adm-cell-bar.t-ok i{background:color-mix(in srgb,var(--ok) 30%,transparent)}
.adm-table tr.is-dim td{color:var(--text-3)}
/* overview alerts */
.adm-alerts{padding:14px 16px;border-radius:18px;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow-sm)}
.adm-alerts h2{display:flex;align-items:center;gap:8px;margin:0 0 10px;font-size:.98rem}
.adm-count{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:99px;background:var(--danger);color:#fff;font-size:.74rem}
.adm-alerts ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.adm-alerts li{--a:var(--water);--as:var(--water-soft);display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:13px;background:var(--as);border-left:4px solid var(--a)}
.adm-alerts li.t-danger{--a:var(--danger);--as:var(--danger-soft)}
.adm-alerts li.t-warn{--a:var(--warn);--as:var(--warn-soft)}
.adm-alerts li>div{flex:1;min-width:0}
.adm-alerts li p{margin:2px 0 0;font-size:.82rem;color:var(--text-2)}
.adm-al-ico{font-size:1.25rem}
.adm-alerts .btn{flex:none;text-decoration:none}
.adm-allgood{display:flex;align-items:center;gap:12px;padding:12px 16px;border-radius:16px;background:var(--ok-soft);border:1px solid color-mix(in srgb,var(--ok) 30%,transparent)}
.adm-allgood span{font-size:1.3rem}
.adm-allgood p{margin:2px 0 0;font-size:.84rem;color:var(--text-2)}
/* users list */
.adm-user{cursor:pointer;transition:border-color .15s,box-shadow .15s}
.adm-user:hover{border-color:color-mix(in srgb,var(--brand) 35%,var(--line));box-shadow:var(--shadow)}
.adm-u-open{font-size:1.02rem;font-weight:700;color:var(--text);text-decoration:none}
.adm-u-open:hover{color:var(--brand)}
.adm-u-more{display:inline-block;margin-top:12px;font-size:.82rem;font-weight:650;color:var(--brand);text-decoration:none}
/* sign-up & invitations */
.adm-modes{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.adm-modes button{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:10px;align-items:center;text-align:left;padding:12px 14px;border-radius:14px;border:1.5px solid var(--line);background:var(--surface);font:inherit;color:var(--text);cursor:pointer}
.adm-modes button span{grid-row:span 2;font-size:1.3rem}
.adm-modes button small{color:var(--text-3);font-size:.78rem}
.adm-modes button:hover{border-color:color-mix(in srgb,var(--brand) 40%,var(--line))}
.adm-modes button[aria-checked=true]{border-color:var(--brand);background:var(--brand-soft);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 15%,transparent)}
.adm-inv-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0 8px;flex-wrap:wrap}
.adm-inv-head p{margin:0;font-size:.88rem;display:flex;flex-direction:column;gap:2px}
.adm-invites{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.adm-invites li{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line-2)}
.adm-invites li.is-off{opacity:.6}
.adm-inv-main{flex:1;min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.adm-inv-main code{font:700 .92rem ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.04em}
.adm-inv-sub{flex-basis:100%;font-size:.78rem;color:var(--text-3)}
.adm-inv-act{display:flex;gap:6px;flex:none}
/* AI limits */
.adm-limits{display:flex;flex-direction:column;gap:10px}
.adm-lim-use{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.adm-lim-use>div{padding:10px 12px;border-radius:12px;background:var(--surface-2)}
.adm-lim-use span{display:block;font-size:.76rem;color:var(--text-3);font-weight:600}
.adm-lim-use b{font-variant-numeric:tabular-nums}
.adm-lim-fields{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap}
.adm-lim-fields .adm-f{flex:1 1 130px;margin:0}
.adm-lim-fields .btn{flex:none}
.adm-limits .adm-hint{margin:0}
.adm-near{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}
/* user profile */
.adm-back{align-self:flex-start;font-size:.88rem;font-weight:650;color:var(--text-2);text-decoration:none}
.adm-back:hover{color:var(--brand)}
.adm-profile{display:flex;align-items:center;gap:16px;padding:18px;border-radius:20px;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow-sm)}
.adm-profile.is-off{background:var(--surface-2)}
.adm-avatar-lg{width:60px;height:60px;border-radius:18px;font-size:1.6rem}
.adm-p-main{flex:1;min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.adm-p-main h1{margin:0 6px 0 0;font-size:1.5rem;letter-spacing:-.02em}
.adm-p-main p{flex-basis:100%;margin:2px 0 0;font-size:.84rem;color:var(--text-2)}
.adm-p-act{display:flex;align-items:center;gap:8px;flex:none}
.adm-timeline{list-style:none;margin:0;padding:0;max-height:520px;overflow-y:auto}
.adm-timeline li{display:flex;align-items:flex-start;gap:12px;padding:9px 2px;border-bottom:1px solid var(--line-2);font-size:.88rem}
.adm-timeline li:last-child{border-bottom:0}
.adm-timeline li>div{flex:1;min-width:0;display:flex;flex-direction:column}
.adm-timeline li span:not(.adm-tl-ico){font-size:.78rem;color:var(--text-3)}
.adm-timeline time{flex:none;font-size:.78rem;color:var(--text-3)}
.adm-tl-ico{flex:none;display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:var(--surface-2)}
/* operations: errors & traces */
.adm-errors{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.adm-errors details{border-radius:12px;border:1px solid var(--line-2);background:var(--surface-2)}
.adm-errors summary{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 12px;cursor:pointer;font-size:.86rem}
.adm-err-msg{flex-basis:100%;color:var(--danger);font-weight:600;word-break:break-word}
.adm-trace{margin:0;padding:12px;max-height:340px;overflow:auto;border-top:1px solid var(--line-2);font:500 .74rem/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre;color:var(--text-2)}
/* security */
.adm-locked{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.adm-locked li{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:12px;background:var(--surface)}
.adm-locked li>div{flex:1;display:flex;flex-direction:column}
@media (max-width:760px){
  .adm-tabs{justify-content:flex-start}
  .adm-tabs button{flex:none}
  .adm-modes{grid-template-columns:1fr}
  .adm-invites li{flex-direction:column;align-items:stretch}
  .adm-inv-act .btn{flex:1}
  .adm-profile{flex-wrap:wrap}
  .adm-p-act{width:100%}
  .adm-p-act .btn{flex:1}
  .adm-lim-use{grid-template-columns:1fr}
  .adm-alerts li{flex-wrap:wrap}
  .adm-alerts .btn{width:100%;justify-content:center}
  .adm-head-tools{width:100%}
  .adm-wrap{max-width:240px}
}
.ld-code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.06em;text-transform:uppercase}
.adm-grid-2{grid-template-columns:repeat(auto-fit,minmax(360px,1fr))}
.ai-logged{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;font-weight:600;color:var(--ok, #2f8a4f);background:color-mix(in srgb, var(--ok, #2f8a4f) 12%, transparent)}
/* Cover photo: badge in the gallery + picker in the edit sheet */
.pg-badge.pg-cover{width:auto;padding:0 9px;border-radius:999px;font-weight:600;font-size:.72rem;color:#7a5b00;background:#fff4cc}
.pe-covers{display:flex;gap:10px;overflow-x:auto;padding:4px 2px 8px;scroll-snap-type:x proximity}
.pe-cover-opt,.pe-cover-add{position:relative;flex:0 0 auto;width:92px;height:92px;border-radius:14px;overflow:hidden;scroll-snap-align:start;cursor:pointer}
.pe-cover-opt{padding:0;border:2px solid var(--line-2);background:var(--surface-2,#f4f4f0)}
.pe-cover-opt img{width:100%;height:100%;object-fit:cover;display:block}
.pe-cover-opt[aria-pressed="true"]{border-color:var(--brand);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 25%,transparent)}
.pe-cover-tick{position:absolute;right:6px;top:6px;display:none;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--brand);color:#fff;font-size:.75rem;font-weight:700}
.pe-cover-opt[aria-pressed="true"] .pe-cover-tick{display:grid}
.pe-cover-now,.pe-cover-new{position:absolute;left:6px;bottom:6px;padding:1px 7px;border-radius:999px;font-size:.66rem;font-weight:600;background:rgba(0,0,0,.6);color:#fff}
.pe-cover-new{background:var(--brand)}
.pe-cover-add{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:2px dashed var(--line);color:var(--muted);text-align:center}
.pe-cover-add:hover{border-color:var(--brand);color:var(--brand)}
.pe-cover-add .big{font-size:1.4rem}
@media (prefers-color-scheme:dark){.pg-badge.pg-cover{background:#4a3b0a;color:#ffe08a}}
/* Plant page: "AI for this plant" hub */
.ai-hub{overflow:hidden;border-color:color-mix(in srgb,var(--ai-1) 35%,var(--line))}
.ai-hub-head{background:linear-gradient(90deg,color-mix(in srgb,var(--ai-1) 8%,transparent),transparent)}
.ai-hub-head h2{margin:0}
.ai-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:14px 16px 16px}
.ai-tool{display:flex;flex-direction:column;gap:8px;min-width:0;padding:12px 14px;border:1px solid var(--line-2);border-radius:14px;background:var(--surface-2)}
.ai-tool.t-warn{border-color:color-mix(in srgb,var(--warn) 40%,var(--line-2))}
.ai-tool.t-danger{border-color:color-mix(in srgb,var(--danger) 45%,var(--line-2))}
.ai-tool-top{display:flex;align-items:center;gap:10px}
.ai-tool-top .li-main{display:flex;flex-direction:column;min-width:0;line-height:1.25}
.ai-tool-ico{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:10px;font-size:1.05rem;background:color-mix(in srgb,var(--ai-1) 12%,var(--surface))}
.ai-tool-status{color:var(--text-2);flex:1;min-height:1.3em}
.ai-tool-act{display:flex;gap:6px;flex-wrap:wrap}
.ai-tool-act:empty{display:none}
.ai-qs{display:flex;flex-wrap:wrap;gap:6px}
.ai-q{border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:999px;padding:4px 10px;font-size:.78rem;cursor:pointer}
.ai-q:hover{border-color:var(--ai-1);color:var(--ai-1)}
.ai-dots{display:inline-flex;gap:3px;vertical-align:middle;margin-right:4px}
.ai-dots span{width:5px;height:5px;border-radius:50%;background:var(--ai-1);animation:aidot 1s infinite alternate}
.ai-dots span:nth-child(2){animation-delay:.2s}.ai-dots span:nth-child(3){animation-delay:.4s}
@keyframes aidot{from{opacity:.25}to{opacity:1}}
.ai-check-box{border-top:1px solid var(--line-2)}
.ai-check-box .ai-panel{border:0;animation:fade .2s ease}
.ai-check-head{display:flex;align-items:center;gap:10px;padding:12px 16px 0}
.ai-check-head h3{margin:0;font-size:1rem}
.ai-check-box .ai-newer{margin:10px 16px 0}
.ai-check-box .ai-panel-top{padding:14px 16px}
.ai-check-box .ai-signs,.ai-check-box .ai-grid{padding-left:16px;padding-right:16px}
.ai-check-box .ai-foot{padding:12px 16px}
@media (max-width:720px){.ai-tools{grid-template-columns:1fr;padding:12px}.ai-tool{padding:10px 12px}}

/* Mobile: no auto-zoom on focus (iOS zooms any field < 16px) and size overlays to the visible viewport */
@media (max-width:720px),(pointer:coarse){
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea,[contenteditable=true]{font-size:16px!important}
}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
@media (max-width:720px){
  .sheet{height:92dvh;max-height:calc(100dvh - env(safe-area-inset-top))}
  .sheet.more-sheet{height:auto;max-height:92dvh}
  .ai-chat{height:100dvh}
  .gs-pop{max-height:calc(100dvh - var(--topbar-h,61px) - 100px)}
  .pmenu-list{max-height:80dvh}
  .sheet-body{scroll-padding-bottom:96px}
}

/* Season profile examples */
.sp-ex{cursor:default}
.sp-ex:hover{transform:none}
.sp-ex.added{opacity:.75}
.sp-ex-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto}
.sp-from{background:var(--brand-soft);color:var(--text);border-radius:12px;padding:9px 12px;margin:6px 0 4px}
.card-head .btn + .btn{margin-left:6px}

/* Plant names: autocomplete, genus/species readout, AI name check, bulk review */
.nm-host{position:relative}
.nm-pop{position:absolute;left:0;right:0;top:100%;z-index:30;display:flex;flex-direction:column;gap:2px;max-height:280px;overflow-y:auto;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:4px;box-shadow:var(--shadow-lg)}
.nm-opt{display:flex;align-items:center;gap:8px;padding:8px 10px;border:0;background:transparent;border-radius:9px;text-align:left;cursor:pointer;color:inherit;font:inherit}
.nm-opt .li-main{display:flex;flex-direction:column;min-width:0;flex:1}
.nm-opt:hover,.nm-opt.on{background:var(--surface-2)}
.nm-read{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;min-height:20px;font-size:.82rem}
.nm-read:empty{display:none}
.nm-chips{display:flex;flex-wrap:wrap;align-items:center;gap:5px}
.nm-chip{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:999px;background:var(--brand-soft);color:var(--text);font-size:.76rem;font-weight:650}
.nm-hint{flex-basis:100%;color:var(--text-2)}
.nm-ai-btn{font-size:.8rem}
.nm-ai-card{margin-top:8px;border:1px solid color-mix(in srgb,var(--ai-1,#8b5cf6) 40%,var(--line));border-radius:12px;padding:10px 12px;background:var(--surface)}
.nm-ai-card.low{border-color:var(--warn,#d97706)}
.nm-ai-h{display:flex;align-items:center;gap:8px;font-weight:700;margin-bottom:6px;flex-wrap:wrap}
.nm-ai-foot{display:flex;align-items:center;gap:8px;margin-top:10px;flex-wrap:wrap}
.nm-diff{display:grid;grid-template-columns:110px minmax(0,1fr) auto minmax(0,1fr);gap:6px;align-items:baseline;font-size:.84rem;padding:2px 0}
.nm-k{color:var(--text-3);font-size:.76rem;font-weight:650}
.nm-old{color:var(--text-3);text-decoration:line-through;text-decoration-color:color-mix(in srgb,var(--text-3) 50%,transparent);overflow-wrap:anywhere}
.nm-new{overflow-wrap:anywhere}
.nm-arr{color:var(--text-3)}
.nm-sum{display:flex;flex-wrap:wrap;gap:6px}
.nm-card{margin-top:18px}
.nm-list{display:flex;flex-direction:column;gap:8px}
.nm-row{display:flex;gap:12px;align-items:flex-start;border:1px solid var(--line);border-radius:14px;padding:10px 12px;cursor:pointer;background:var(--surface)}
.nm-row.on{border-color:var(--brand);background:color-mix(in srgb,var(--brand-soft) 45%,var(--surface))}
.nm-row.low:not(.on){border-style:dashed}
.nm-row input{margin-top:3px;width:18px;height:18px;accent-color:var(--brand);flex:none}
.nm-row .li-main{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.nm-row-h{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.nm-unres{margin-top:14px;border:1px dashed var(--line);border-radius:14px;padding:10px 12px;display:flex;flex-direction:column;gap:6px}
.nm-unres-h{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.nm-miss{margin:2px 0 8px;padding:7px 10px;border-radius:10px;background:var(--sand-soft,var(--surface-2));color:var(--text-2)}
@media (max-width:640px){.nm-diff{grid-template-columns:80px minmax(0,1fr) auto minmax(0,1fr)}}

/* ---------------------------------------------------------------- knowledge base */
.kb-intro{display:flex;gap:12px;align-items:flex-start;padding:14px 16px}
.kb-intro p{margin:0}
.kb-intro-ico{font-size:1.4rem;line-height:1}
.kb-st{display:inline-flex;align-items:center;font-size:.72rem;font-weight:700;padding:2px 8px;border-radius:999px;white-space:nowrap;background:var(--surface-2);color:var(--text-2)}
.kb-st.ok{background:var(--ok-soft);color:var(--ok)}
.kb-st.warn{background:var(--warn-soft);color:var(--warn)}
.kb-st.danger{background:var(--danger-soft);color:var(--danger)}
.kb-tools{display:flex;gap:10px;align-items:center;margin:14px 0 12px}
.kb-tools .input{flex:1;min-width:0}
.kb-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:12px;align-items:start}
.kb-gcard{padding:0;overflow:hidden}
.kb-gcard,.kb-ghead,.kb-sp a{text-align:left}
.kb-ghead{display:flex;align-items:center;gap:10px;padding:12px 14px;color:inherit;text-decoration:none}
.kb-ghead:hover{background:var(--surface-2)}
.kb-ghead .li-main{display:flex;flex-direction:column;min-width:0;flex:1}
.kb-gico{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:var(--brand-soft);font-size:1.1rem;flex:none}
.kb-n{min-width:28px;text-align:center;font-weight:800;font-size:.82rem;padding:2px 8px;border-radius:999px;background:var(--brand-soft);color:var(--brand)}
.kb-go{color:var(--text-2)}
.kb-sp{list-style:none;margin:0;padding:0 0 6px;border-top:1px solid var(--line)}
.kb-sp a{display:flex;align-items:center;gap:8px;padding:7px 14px 7px 60px;color:inherit;text-decoration:none;font-size:.9rem}
.kb-sp a:hover{background:var(--surface-2)}
.kb-sp a i{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kb-hero{display:flex;gap:14px;align-items:center;padding:16px;flex-wrap:wrap}
.kb-hero-ico{width:56px;height:56px;border-radius:16px;display:grid;place-items:center;font-size:1.8rem;background:var(--brand-soft);flex:none}
.kb-hero .li-main{flex:1;min-width:200px}
.kb-title{margin:2px 0 4px;font-size:1.5rem}
.kb-rank{text-transform:uppercase;letter-spacing:.06em;font-weight:700}
.kb-state{margin-top:8px;display:inline-block;padding:4px 10px;border-radius:10px;background:var(--surface-2);color:var(--text-2)}
.kb-state.ok{background:var(--ok-soft);color:var(--ok)}
.kb-state.wait{background:var(--warn-soft);color:var(--warn)}
.kb-state.bad{background:var(--danger-soft);color:var(--danger)}
.kb-hero-act{display:flex;gap:8px;flex-wrap:wrap}
.kb-inh{margin:8px 4px 0}
.kb-sec-h{display:flex;align-items:center;gap:10px;justify-content:space-between;margin-bottom:8px}
.kb-sec-h h2{font-size:1rem;margin:0}
.kb-topics{display:grid;grid-template-columns:repeat(auto-fill,minmax(360px,1fr));gap:12px;margin-top:12px;align-items:start}
.kb-topic{padding:14px 16px}
.kb-wait{padding:16px;display:flex;flex-direction:column;gap:10px;grid-column:1/-1}
.kb-e{padding:10px 0;border-top:1px solid var(--line)}
.kb-sec-h+.kb-e{border-top:0;padding-top:2px}
.kb-e.inh{padding-left:10px;border-left:3px solid var(--line)}
.kb-e-top{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:4px}
.kb-e-meta{margin-top:6px}
.kb-why{margin-top:6px;padding:6px 10px;border-radius:10px;background:var(--warn-soft);color:var(--text-2)}
.kb-txt{white-space:pre-line;line-height:1.45;overflow-wrap:anywhere}
.kb-topics~.card{margin-top:12px}
.kb-pad,.kb-hist{padding:14px 16px}
.kb-chips{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
.kb-chips a.chip-filter{text-decoration:none}
.kb-hist summary{cursor:pointer;list-style:none;display:flex;gap:8px;align-items:center}
.kb-hist[open] summary{margin-bottom:6px}
.kb-hist .kb-e.old{opacity:.8}
.kb-plink{display:flex;align-items:center;gap:10px;margin-top:10px;padding:9px 12px;border-radius:12px;background:var(--brand-soft);color:inherit;text-decoration:none}
.kb-plink .li-main{display:flex;flex-direction:column;flex:1;min-width:0}
.kb-plink:hover{filter:brightness(.97)}
@media (max-width:720px){
  .kb-topics,.kb-grid{grid-template-columns:1fr}
  .kb-hero-act{width:100%}
  .kb-hero-act .btn{flex:1}
  .kb-title{font-size:1.3rem}
  .kb-intro{padding:12px}
}

/* knowledge base: topics grouped into readable cards */
.kb-toc{display:flex;gap:6px;overflow-x:auto;margin:14px 0 4px;padding:2px 0 6px;scrollbar-width:none}
.kb-toc::-webkit-scrollbar{display:none}
.kb-toc-b{flex:none;border:1px solid var(--line);background:var(--surface);color:var(--text-2);font:inherit;font-size:.82rem;font-weight:600;padding:5px 11px;border-radius:999px;cursor:pointer;white-space:nowrap}
.kb-toc-b:hover{border-color:var(--tc);color:var(--tc);background:var(--tc-soft)}
.kb-group{margin-top:18px}
.kb-group-h{display:flex;align-items:center;gap:8px;font-size:.78rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--text-2);margin:0 2px 10px}
.kb-group-h::after{content:"";flex:1;height:1px;background:var(--line)}
.kb-tgrid{columns:3 300px;column-gap:12px}
.kb-tc{break-inside:avoid;margin:0 0 12px;display:flex;flex-direction:column;gap:8px;padding:14px 16px 12px;border-radius:16px;background:var(--surface);border:1px solid var(--line);border-top:3px solid var(--tc);box-shadow:var(--shadow-sm,0 1px 2px rgba(0,0,0,.04));scroll-margin:90px}
.kb-tc.flash{animation:kbFlash 1.2s ease}
@keyframes kbFlash{0%,40%{box-shadow:0 0 0 3px var(--tc-soft)}100%{box-shadow:none}}
.kb-tc-h{display:flex;align-items:center;gap:10px}
.kb-tc-h h3{margin:0;font-size:1rem;flex:1;min-width:0}
.kb-tc-ico{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:var(--tc-soft);font-size:1.05rem;flex:none}
.kb-tc-tag{font-size:.7rem;font-weight:700;padding:2px 8px;border-radius:999px;background:var(--surface-2);color:var(--text-2);white-space:nowrap}
.kb-tc-tag.fix{background:var(--warn-soft);color:var(--warn)}
.kb-tc-body{line-height:1.5;font-size:.93rem;overflow-wrap:anywhere}
.kb-tc-body p{margin:0 0 6px}
.kb-tc-body p:last-child{margin-bottom:0}
.kb-ul{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:5px}
.kb-ul li{position:relative;padding-left:16px}
.kb-ul li::before{content:"";position:absolute;left:3px;top:.62em;width:6px;height:6px;border-radius:50%;background:var(--tc)}
.kb-dl{display:grid;grid-template-columns:max-content 1fr;gap:4px 12px;margin:0 0 6px}
.kb-dl:last-child{margin-bottom:0}
.kb-dl dt{font-size:.78rem;font-weight:700;color:var(--text-2);padding-top:2px}
.kb-dl dd{margin:0}
.kb-pests{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:8px}
.kb-pests .tiny{margin-right:2px}
.kb-tc-meta{margin-top:auto}
.kb-tc .kb-why{margin-top:0}
.kb-gen{border-top:1px dashed var(--line);padding-top:8px}
.kb-gen summary{cursor:pointer;font-size:.82rem;font-weight:600;color:var(--text-2);list-style:none;display:flex;align-items:center;gap:6px}
.kb-gen summary::-webkit-details-marker{display:none}
.kb-gen summary::after{content:"›";margin-left:auto;transition:transform .2s}
.kb-gen[open] summary::after{transform:rotate(90deg)}
.kb-gen[open] summary{margin-bottom:8px}
.kb-gen .kb-tc-body{font-size:.88rem;color:var(--text-2)}
.tone-water{--tc:var(--water);--tc-soft:var(--water-soft)}
.tone-sun{--tc:#e0a210;--tc-soft:color-mix(in srgb,#e0a210 16%,transparent)}
.tone-violet{--tc:var(--violet);--tc-soft:var(--violet-soft)}
.tone-cold{--tc:#3c8fd9;--tc-soft:color-mix(in srgb,#3c8fd9 15%,transparent)}
.tone-sand{--tc:var(--sand);--tc-soft:var(--sand-soft)}
.tone-ok{--tc:var(--ok);--tc-soft:var(--ok-soft)}
.tone-pink{--tc:#e46aa6;--tc-soft:color-mix(in srgb,#e46aa6 15%,transparent)}
.tone-danger{--tc:var(--danger);--tc-soft:var(--danger-soft)}
.tone-brand{--tc:var(--brand);--tc-soft:var(--brand-soft)}
.kb-group~.card{margin-top:12px}
@media (max-width:720px){
  .kb-tgrid{columns:1}
  .kb-tc{padding:12px 14px 10px}
  .kb-dl{grid-template-columns:1fr;gap:0}
  .kb-dl dd{margin-bottom:6px}
}

/* knowledge base: structured care data, common names, plant vs species */
.kb-aka{display:flex;flex-wrap:wrap;gap:6px;margin:2px 0 6px}
.kb-aka span{font-size:.8rem;font-weight:600;padding:2px 10px;border-radius:999px;background:var(--surface-2);color:var(--text-2)}
.kb-aka span:first-child{background:var(--brand-soft);color:var(--brand)}
.kb-spn{flex:1;min-width:0;display:flex;flex-direction:column}
.kb-spn i{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kb-spn .tiny{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kb-glance{padding:14px 16px;margin-top:12px}
.kb-glance .kb-sec-h{flex-wrap:wrap}
.kb-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px}
.kb-tile{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border-radius:12px;background:var(--surface-2)}
.kb-tile .li-main{display:flex;flex-direction:column;min-width:0}
.kb-tile b{font-size:.98rem}
.kb-tile-ico{font-size:1.25rem;line-height:1.2}
.kb-inh-mark{font-size:.75rem}
.kb-meters{display:flex;flex-wrap:wrap;gap:14px;margin-top:12px}
.kb-meter{display:inline-flex;align-items:center;gap:3px;font-size:.8rem;color:var(--text-2)}
.kb-meter i{width:16px;height:6px;border-radius:3px;background:var(--line-2)}
.kb-meter>span{margin-left:6px}
.kb-meter.lv-low i:nth-child(1){background:var(--ok)}
.kb-meter.lv-medium i:nth-child(-n+2){background:var(--warn)}
.kb-meter.lv-high i{background:var(--danger)}
.kb-year{margin-top:14px;display:flex;flex-direction:column;gap:3px;overflow-x:auto}
.kb-yr{display:grid;grid-template-columns:86px repeat(12,minmax(18px,1fr));gap:3px;align-items:center}
.kb-yr>span{color:var(--text-2);white-space:nowrap}
.kb-yr i{font-style:normal;height:14px;border-radius:4px;background:var(--surface-2)}
.kb-yr.head i{height:auto;background:none;text-align:center;font-size:.62rem;font-weight:700;color:var(--text-3)}
.kb-yr.head i.now{color:var(--brand)}
.kb-yr i.now{box-shadow:inset 0 0 0 1.5px var(--brand)}
.kb-yr i.on.rest{background:var(--water)}
.kb-yr i.on.grow{background:var(--ok)}
.kb-yr i.on.feed{background:var(--violet)}
.kb-yr i.on.flower{background:#e46aa6}
.kb-yr i.on.prop{background:var(--sand,#c9934f)}
.kb-chips2{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.kb-chip{font-size:.8rem;padding:3px 10px;border-radius:999px;background:var(--surface-2);color:var(--text-2)}
.kb-chip.bad{background:var(--danger-soft);color:var(--danger)}
.kb-fit-list{display:flex;flex-direction:column}
.kb-fit-row{display:flex;gap:10px;align-items:flex-start;padding:10px 0;border-top:1px solid var(--line)}
.kb-fit-row:first-child{border-top:0;padding-top:2px}
.kb-fit-row .li-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.kb-fit-row .btn{align-self:flex-start;margin-top:6px}
.kb-fit-ico{font-size:1.15rem;line-height:1.3;width:24px;text-align:center}
.kb-fit-top{display:flex;align-items:center;gap:8px;justify-content:space-between}
.kb-fit-st{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;font-size:.72rem;font-weight:800;background:var(--surface-2);color:var(--text-2);flex:none}
.kb-fit-st.ok{background:var(--ok-soft);color:var(--ok)}
.kb-fit-st.warn{background:var(--warn-soft);color:var(--warn)}
.kb-fit-tip{color:var(--warn);font-weight:600}
.sp-kb-toggle{display:flex;gap:8px;align-items:flex-start;margin:0 0 12px;padding:10px 12px;border-radius:12px;background:var(--brand-soft);cursor:pointer}
.sp-kb-toggle input{margin-top:3px}
@media (max-width:720px){
  .kb-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
  .kb-tile{padding:9px 10px;gap:8px}
  .kb-yr{grid-template-columns:70px repeat(12,minmax(14px,1fr))}
}

/* quick care "when?" dialog */
.wd-opts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;margin-top:8px}
.wd-opt{position:relative;display:block;cursor:pointer}
.wd-opt input{position:absolute;opacity:0;pointer-events:none}
.wd-opt span{display:flex;align-items:center;justify-content:center;min-height:44px;padding:8px 10px;border:1.5px solid var(--line);border-radius:12px;font-weight:650;font-size:.92rem;background:var(--surface);transition:border-color .15s,background .15s}
.wd-opt:hover span{border-color:var(--brand-2,var(--brand))}
.wd-opt input:checked+span{border-color:var(--brand);background:var(--brand-soft);color:var(--brand)}
.wd-opt input:focus-visible+span{outline:2px solid var(--brand);outline-offset:2px}
.wd-date{width:100%;margin-top:4px;font-size:16px}
.btn-water-solid{background:var(--water);border-color:var(--water);color:#fff}
.btn-feed-solid{background:var(--violet);border-color:var(--violet);color:#fff}
.btn-water-solid:hover,.btn-feed-solid:hover{filter:brightness(1.07)}

/* Settings → AI usage & quota */
.aiu-card .card-body{display:flex;flex-direction:column;gap:16px}
.aiu-alert{padding:10px 14px;border-radius:12px;background:var(--danger-soft);color:var(--danger);font-weight:600;font-size:.9rem}
.aiu-meters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.aiu-m{display:flex;flex-direction:column;gap:6px;padding:14px 16px;border-radius:14px;background:var(--surface-2);border:1px solid var(--line-2);min-width:0}
.aiu-m-top{display:flex;align-items:center;gap:8px;justify-content:space-between;flex-wrap:wrap}
.aiu-m-t{font-size:.78rem;font-weight:700;letter-spacing:.03em;text-transform:uppercase;color:var(--text-3)}
.aiu-m-v{font-size:1.05rem}.aiu-m-v b{font-size:1.6rem;font-weight:750;letter-spacing:-.02em}
.aiu-pill{font-size:.72rem;font-weight:700;padding:2px 9px;border-radius:99px;background:var(--surface);color:var(--text-2);white-space:nowrap}
.aiu-pill.ok{background:var(--ok-soft);color:var(--ok)}.aiu-pill.warn{background:var(--warn-soft);color:var(--warn)}.aiu-pill.danger{background:var(--danger-soft);color:var(--danger)}
.aiu-bar{height:8px;border-radius:99px;background:color-mix(in srgb,var(--line) 70%,transparent);overflow:hidden}
.aiu-bar span{display:block;height:100%;border-radius:inherit;background:var(--ai-grad,var(--brand));transition:width .4s ease}
.aiu-m.warn .aiu-bar span{background:var(--warn)}.aiu-m.danger .aiu-bar span{background:var(--danger)}
.aiu-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px}
.aiu-h{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:8px;font-size:.9rem}
.aiu-chart{display:flex;align-items:flex-end;gap:3px;height:110px;padding:6px 0;border-bottom:1px solid var(--line)}
.aiu-col{flex:1;height:100%;display:flex;align-items:flex-end;border-radius:4px}
.aiu-col:hover{background:var(--surface-2)}
.aiu-col i{display:block;width:100%;border-radius:4px 4px 1px 1px;background:color-mix(in srgb,var(--violet) 75%,transparent)}
.aiu-axis{display:flex;justify-content:space-between;margin-top:4px}
.aiu-feats{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.aiu-feats li{display:flex;align-items:center;gap:10px}
.aiu-fi{flex:none;width:30px;height:30px;display:grid;place-items:center;border-radius:9px;background:var(--surface-2)}
.aiu-fn{display:block;font-size:.86rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.aiu-fb{display:block;height:5px;margin-top:3px;border-radius:99px;background:var(--surface-2);overflow:hidden}
.aiu-fb i{display:block;height:100%;background:var(--violet);border-radius:inherit}
.aiu-fv{flex:none;display:flex;flex-direction:column;align-items:flex-end;min-width:56px;font-size:.88rem}
.aiu-recent summary{cursor:pointer;padding:4px 0}
.aiu-recent ul{list-style:none;margin:8px 0 0;padding:0}
.aiu-recent li{display:flex;align-items:center;gap:10px;padding:7px 2px;border-top:1px solid var(--line-2);font-size:.86rem}
.aiu-recent li .li-main{min-width:0;flex:1}
.aiu-note{margin:0}
@media (max-width:720px){.aiu-meters,.aiu-grid{grid-template-columns:1fr}.aiu-chart{height:80px}.aiu-m{padding:12px 14px}}
