/* Event Planner — additions on top of vistar.css. Same tokens, same restraint. */

.logo-prod{font-size:.78rem;font-weight:700;color:#ffe0cf;letter-spacing:.02em;
           padding:4px 10px;border:1px solid rgba(255,255,255,.35);border-radius:8px}
header .spacer{margin-left:auto}
.hdr-btn{font-family:inherit;font-size:.74rem;font-weight:700;padding:7px 14px;border-radius:999px;
         border:1px solid rgba(255,255,255,.5);background:transparent;color:#fff;cursor:pointer;white-space:nowrap}
.hdr-btn:hover{background:rgba(255,255,255,.14)}
.hdr-btn.solid{background:#fff;color:var(--orange);border-color:#fff}

.view{display:none}
.view.on{display:block;animation:fadeIn .25s ease}

/* ---------- campaign overview ----------
   A dense list, not a card wall. Planners scan these, they do not browse them. */
.ov-head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;
         flex-wrap:wrap;margin-bottom:12px}
.ov-sub{font-size:.8rem;color:var(--grey)}
.ov-meta{font-size:.7rem;color:#96a0ad;font-variant-numeric:tabular-nums}

.camp-list{border:1px solid var(--rule);border-radius:12px;overflow:hidden;background:var(--surface)}
.camp{display:grid;grid-template-columns:minmax(0,2.2fr) 1fr 1.4fr .9fr 26px;
      align-items:center;gap:14px;width:100%;padding:13px 16px;background:none;border:none;
      border-bottom:1px solid var(--rule);font-family:inherit;text-align:left;cursor:pointer;
      transition:background .12s}
.camp:last-of-type{border-bottom:none}
.camp:hover{background:rgba(228,85,5,.045)}
.camp .nm{display:block;font-size:.92rem;font-weight:700;letter-spacing:-.01em;line-height:1.3;
          overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.camp .adv{display:block;font-size:.7rem;color:var(--grey);margin-top:1px;overflow:hidden;
           text-overflow:ellipsis;white-space:nowrap}
.camp .mk{font-size:.6rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
          padding:3px 9px;border-radius:999px;background:rgba(2,32,77,.06);color:var(--grey);
          justify-self:start;white-space:nowrap}
.camp .dates{font-size:.76rem;color:var(--grey);font-variant-numeric:tabular-nums;white-space:nowrap}
.camp .amt{font-size:.84rem;font-weight:700;font-variant-numeric:tabular-nums;
           text-align:right;white-space:nowrap}
.camp .del{width:22px;height:22px;border:none;background:none;color:transparent;
           font-size:.78rem;cursor:pointer;line-height:1;padding:0}
.camp:hover .del{color:var(--grey)}
.camp .del:hover{color:var(--salmon)}
@media(max-width:760px){
  .camp{grid-template-columns:1fr 26px;gap:4px}
  .camp .mk,.camp .dates{justify-self:start;text-align:left}
  .camp .amt{text-align:left}
}

.camp-new{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;
          padding:13px;background:none;border:none;border-top:1px solid var(--rule);
          font-family:inherit;font-size:.8rem;font-weight:700;color:var(--grey);cursor:pointer}
.camp-new:hover{color:var(--orange);background:rgba(228,85,5,.04)}
.camp-empty{padding:34px 16px;text-align:center;color:var(--grey);font-size:.82rem}

/* ---------- forms ---------- */
.modal-bg{position:fixed;inset:0;background:rgba(2,32,77,.55);z-index:3000;display:none;
          align-items:flex-start;justify-content:center;padding:48px 16px;overflow-y:auto;backdrop-filter:blur(2px)}
.modal-bg.on{display:flex}
.modal{background:var(--surface);border-radius:18px;width:100%;max-width:560px;padding:26px 28px;
       box-shadow:0 26px 70px rgba(2,32,77,.4)}
.modal.wide{max-width:1020px;padding:0;overflow:hidden}
.modal h2{font-size:1.15rem;font-weight:700;letter-spacing:-.02em;margin-bottom:4px}
.modal .hint{font-size:.76rem;color:var(--grey);margin-bottom:18px}
.field{margin-bottom:14px}
.field label{display:block;font-size:.64rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;
             color:var(--grey);margin-bottom:5px}
.field input,.field select{font-family:inherit;font-size:.86rem;padding:9px 12px;border:1px solid var(--rule);
      border-radius:9px;background:var(--bg);color:var(--navy);width:100%}
.field input:focus,.field select:focus{outline:2px solid var(--orange);border-color:transparent}
.field.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.field.two>div{margin:0}
.modal-act{display:flex;gap:10px;justify-content:flex-end;margin-top:20px}
.btn{font-family:inherit;font-size:.78rem;font-weight:700;padding:9px 18px;border-radius:999px;cursor:pointer;
     border:1px solid var(--rule);background:var(--surface);color:var(--navy)}
.btn:hover{border-color:var(--grey)}
.btn.pri{background:var(--orange);border-color:var(--orange);color:#fff}
.btn.pri:hover{opacity:.88}
.btn.sm{font-size:.7rem;padding:6px 13px}
.err{color:var(--salmon);font-size:.74rem;font-weight:600;margin-top:8px;min-height:1em}

/* ---------- planner layout ---------- */
.plan-grid{display:grid;grid-template-columns:250px 1fr;gap:14px;align-items:start}
@media(max-width:960px){.plan-grid{grid-template-columns:1fr}}
.side{position:sticky;top:74px}
.side .panel{padding:14px 16px;margin-bottom:12px}
.side h3{font-size:.62rem;font-weight:700;letter-spacing:.11em;text-transform:uppercase;color:var(--grey);
         margin-bottom:9px}

/* category tree */
.cat{border-bottom:1px solid var(--rule)}
.cat:last-child{border-bottom:none}
.cat-h{display:flex;align-items:center;gap:8px;padding:8px 0;cursor:pointer;font-size:.84rem;font-weight:700}
.cat-h .n{margin-left:auto;font-size:.66rem;font-weight:700;color:var(--grey);font-variant-numeric:tabular-nums}
.cat-h .caret{font-size:.6rem;color:var(--grey);transition:transform .15s;width:9px}
.cat.open .cat-h .caret{transform:rotate(90deg)}
.cat-subs{display:none;padding:0 0 8px 24px}
.cat.open .cat-subs{display:block}
.cat-subs label{display:flex;align-items:center;gap:7px;padding:4px 0;font-size:.76rem;cursor:pointer;color:var(--grey)}
.cat-subs label .n{margin-left:auto;font-size:.66rem;font-variant-numeric:tabular-nums}
.cat-subs label:hover{color:var(--navy)}
input[type=checkbox]{accent-color:var(--orange);width:14px;height:14px;cursor:pointer;flex:none;margin:0}

.ownerlist{max-height:210px;overflow-y:auto;padding-right:4px}
.ownerlist label{display:flex;align-items:center;gap:7px;padding:4px 0;font-size:.76rem;cursor:pointer;color:var(--grey)}
.ownerlist label:hover{color:var(--navy)}
.ownerlist label .n{margin-left:auto;font-size:.66rem;font-variant-numeric:tabular-nums}
.mini{font-size:.66rem;color:var(--grey);font-weight:600;cursor:pointer;background:none;border:none;
      font-family:inherit;padding:0;text-decoration:underline;text-underline-offset:2px}
.mini:hover{color:var(--orange)}
.side-act{display:flex;gap:10px;margin-bottom:9px}

/* layer legend (kept for the event detail panel) */
.lyr{display:flex;align-items:center;gap:7px;font-size:.72rem;padding:3px 0;font-weight:600}
.lyr i{width:9px;height:9px;border-radius:50%;flex:none}
.lyr span{color:var(--grey);font-weight:500;font-size:.68rem;margin-left:auto}

/* ---------- the one explainer ---------- */
.explain{background:linear-gradient(180deg,#fff 0%,var(--peach) 100%);border:1px solid #f3cdb0;
         border-radius:16px;padding:18px 22px 20px;margin-bottom:14px;
         box-shadow:0 6px 20px rgba(228,85,5,.09)}
.explain-h{font-size:.62rem;font-weight:700;letter-spacing:.13em;text-transform:uppercase;
           color:#a03e12;margin-bottom:13px}
.explain-cols{display:grid;grid-template-columns:1fr 1fr;gap:22px}
@media(max-width:820px){.explain-cols{grid-template-columns:1fr;gap:16px}}
/* One type size throughout: the lead sentence is the same size as the rest of
   the paragraph, just bolder, so the two columns read as one block. */
.explain-c{display:flex;gap:12px}
.explain-c p{font-size:.82rem;line-height:1.65;color:#5b2607;margin:0}
.explain-c b{color:var(--navy);font-weight:700}
.explain-n{flex:none;width:24px;height:24px;border-radius:50%;background:var(--orange);color:#fff;
           font-size:.72rem;font-weight:700;display:flex;align-items:center;justify-content:center;
           margin-top:1px}
.explain-key{display:flex;gap:18px;flex-wrap:wrap;margin-top:14px;padding-top:13px;
             border-top:1px solid rgba(228,85,5,.18)}
.explain-key span{display:flex;align-items:center;gap:6px;font-size:.74rem;font-weight:600;color:#7a4526}
.explain-key i{width:9px;height:9px;border-radius:50%;display:inline-block}

/* ---------- playback ---------- */
.dp-mapwrap{position:relative}
.dp-mapwrap .lmap{height:560px}
.map-tools{position:absolute;right:12px;top:12px;z-index:500;display:flex;gap:6px}
.map-tools button{font-family:inherit;font-size:.68rem;font-weight:700;padding:6px 12px;border-radius:999px;
                  border:1px solid rgba(255,255,255,.22);background:rgba(7,29,61,.82);color:rgba(255,255,255,.85);
                  cursor:pointer;backdrop-filter:blur(6px);white-space:nowrap}
.map-tools button:hover{border-color:var(--peach);color:var(--peach)}
.dp-legend .dot.ring{background:transparent;border:2px solid #04c8b8;width:11px;height:11px}
/* the firing-screen halo, drawn under the solid dot */
.pulse-ring{animation:pulseRing 2.2s ease-out infinite}
@keyframes pulseRing{0%{opacity:.55;transform:scale(.7)}70%{opacity:0;transform:scale(1.5)}100%{opacity:0}}

/* pacing risk KPI */
.kpi.risk-low .big{color:var(--teal)}
.kpi.risk-mod .big{color:#c98a10}
.kpi.risk-high .big{color:var(--salmon)}
.kpi .riskbar{height:6px;border-radius:3px;background:#f0ede7;margin-top:10px;overflow:hidden;position:relative}
.kpi .riskbar i{display:block;height:100%;border-radius:3px;transition:width .25s ease}
.kpi.risk-low .riskbar i{background:var(--teal)}
.kpi.risk-mod .riskbar i{background:#e0a020}
.kpi.risk-high .riskbar i{background:var(--salmon)}
.pb{padding:12px 16px 14px;border-top:1px solid rgba(255,255,255,.1);background:#061a36}
.pb-top{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:9px}
.pb .clock{font-variant-numeric:tabular-nums;font-weight:700;font-size:.9rem;color:#fff;min-width:190px}
.pb .clock small{display:block;font-size:.64rem;font-weight:600;color:rgba(255,255,255,.5);letter-spacing:.06em;
                 text-transform:uppercase}
.pb .live{margin-left:auto;font-size:.7rem;color:rgba(255,255,255,.65);font-weight:600;
          font-variant-numeric:tabular-nums;text-align:right}
.pb .live b{color:#ff8b4d;font-size:1.02rem}
.pb input[type=range]{width:100%;accent-color:var(--orange);background:transparent}
.pb .speed{font-family:inherit;font-size:.68rem;font-weight:700;padding:4px 9px;border-radius:999px;
           border:1px solid rgba(255,255,255,.3);background:transparent;color:rgba(255,255,255,.8);cursor:pointer}
.pb .speed:hover{border-color:var(--peach);color:var(--peach)}
.daystrip{display:flex;gap:2px;margin-top:9px;height:26px;align-items:flex-end}
.daystrip div{flex:1;background:rgba(255,255,255,.13);border-radius:2px 2px 0 0;min-height:2px;
              transition:background .12s;cursor:pointer;position:relative}
.daystrip div.has{background:rgba(255,139,77,.55)}
.daystrip div.cur{background:#fff}
.pb-legend{display:flex;gap:14px;font-size:.66rem;color:rgba(255,255,255,.6);margin-top:9px;flex-wrap:wrap;
           align-items:center}
.pb-legend .dot{width:9px;height:9px;border-radius:50%;display:inline-block;margin-right:5px;vertical-align:-1px}

/* ---------- lists ---------- */
.tbl{width:100%;border-collapse:collapse;font-size:.78rem}
.tbl th{text-align:left;color:var(--grey);font-size:.6rem;text-transform:uppercase;letter-spacing:.08em;
        padding:7px 8px;border-bottom:1px solid var(--rule);white-space:nowrap;position:sticky;top:0;
        background:var(--surface);z-index:2}
.tbl td{padding:8px;border-bottom:1px solid #f2f0eb;vertical-align:top}
.tbl tr:last-child td{border-bottom:none}
.tbl th.num,.tbl td.num{text-align:right;font-variant-numeric:tabular-nums}
.tbl tbody tr.clk{cursor:pointer}
.tbl tbody tr.clk:hover{background:rgba(228,85,5,.05)}
.scroll-tbl{max-height:430px;overflow-y:auto}
.scroll-tbl::-webkit-scrollbar{width:7px}
.scroll-tbl::-webkit-scrollbar-thumb{background:#e0dcd4;border-radius:4px}
.ttl{font-weight:600;line-height:1.35}
.sub{color:var(--grey);font-size:.68rem;margin-top:1px}
.pill{display:inline-block;font-size:.6rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;
      padding:2px 7px;border-radius:999px;background:rgba(2,32,77,.06);color:var(--grey);white-space:nowrap}
.pill.sport{background:rgba(12,143,128,.12);color:#0c6f66}
.pill.music{background:rgba(228,85,5,.12);color:#a03e12}
.pill.festivals{background:rgba(239,107,81,.14);color:#b03c26}
.pill.culture{background:rgba(47,93,168,.12);color:#2f5da8}
.pill.business{background:rgba(2,32,77,.09);color:var(--navy)}
.lyrtag{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:3px}
.searchrow{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:10px}
.searchrow input,.searchrow select{font-family:inherit;font-size:.76rem;padding:6px 11px;border:1px solid var(--rule);
      border-radius:8px;background:var(--bg);color:var(--navy)}
.searchrow input{min-width:190px;flex:1}
.searchrow input:focus,.searchrow select:focus{outline:2px solid var(--orange);border-color:transparent}
.empty{padding:34px 12px;text-align:center;color:var(--grey);font-size:.8rem}

/* ---------- event detail modal ---------- */
.det-head{padding:20px 24px 16px;border-bottom:1px solid var(--rule);display:flex;align-items:flex-start;gap:14px}
.det-head h2{font-size:1.15rem;line-height:1.25}
.det-head .x{margin-left:auto;width:30px;height:30px;border-radius:50%;border:1px solid var(--rule);
             background:var(--surface);color:var(--grey);cursor:pointer;font-size:1rem;line-height:1;flex:none}
.det-head .x:hover{border-color:var(--salmon);color:var(--salmon)}
.det-body{display:grid;grid-template-columns:1.25fr 1fr;min-height:440px}
@media(max-width:820px){.det-body{grid-template-columns:1fr}}
#detMap{height:100%;min-height:440px;background:#071d3d}
.det-side{padding:18px 22px;border-left:1px solid var(--rule);max-height:520px;overflow-y:auto}
.det-kpi{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px}
.det-kpi div{background:var(--bg);border-radius:11px;padding:10px 12px}
.det-kpi .k{font-size:.58rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--grey)}
.det-kpi .v{font-size:1.15rem;font-weight:700;font-variant-numeric:tabular-nums;margin-top:2px}
.det-win{background:var(--peach);border-radius:11px;padding:10px 13px;font-size:.74rem;color:#5b2607;
         margin-bottom:14px;line-height:1.5}
.det-win b{color:var(--orange)}
.det-scr{font-size:.74rem}
.det-scr .r{display:flex;gap:9px;padding:6px 0;border-bottom:1px solid #f2f0eb;align-items:baseline}
.det-scr .r:last-child{border-bottom:none}
.det-scr .r .nm{flex:1;min-width:0;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.det-scr .r .ow{color:var(--grey);font-size:.66rem;white-space:nowrap}
.det-scr .r .km{font-variant-numeric:tabular-nums;color:var(--grey);font-size:.68rem;flex:none;width:46px;
                text-align:right}

/* ---------- share ---------- */
.share-card{background:linear-gradient(120deg,var(--navy) 0%,#0a3268 100%);border-radius:14px;
            padding:16px 18px;color:#fff;margin-bottom:18px;position:relative;overflow:hidden}
.share-card::before{content:"";position:absolute;width:240px;height:240px;border-radius:50%;
                    right:-90px;top:-150px;
                    background:radial-gradient(circle,rgba(228,85,5,.42) 0%,transparent 70%)}
.share-card>*{position:relative;z-index:1}
.sc-name{font-size:1.05rem;font-weight:700;letter-spacing:-.02em}
.sc-meta{font-size:.72rem;color:#a9bcd6;margin-top:3px}
.sc-stats{display:flex;gap:26px;margin-top:14px;padding-top:13px;
          border-top:1px solid rgba(255,255,255,.14)}
.sc-stats div{display:flex;flex-direction:column}
.sc-stats b{font-size:1.15rem;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.1}
.sc-stats span{font-size:.58rem;font-weight:700;letter-spacing:.11em;text-transform:uppercase;
               color:#8fa3c0;margin-top:2px}

.share-lbl{display:block;font-size:.6rem;font-weight:700;letter-spacing:.11em;
           text-transform:uppercase;color:var(--grey);margin-bottom:5px}
.share-row{display:flex;gap:8px}
input.share-url{flex:1;min-width:0;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
                font-size:.74rem;background:var(--bg);border:1px solid var(--rule);
                border-radius:9px;padding:10px 12px;color:var(--navy)}
input.share-url:focus{outline:2px solid var(--orange);border-color:transparent}
.share-note{font-size:.68rem;color:var(--grey);margin-top:7px}

.toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);background:var(--navy);color:#fff;
       font-size:.8rem;font-weight:600;padding:11px 20px;border-radius:999px;z-index:4000;
       box-shadow:0 12px 30px rgba(2,32,77,.35);opacity:0;pointer-events:none;transition:opacity .2s}
.toast.on{opacity:1}

/* ---------- footer bar: brand plus the two asks ---------- */
.site-foot{background:var(--navy);display:flex;align-items:center;justify-content:space-between;
           gap:18px;flex-wrap:wrap;padding:16px 28px;margin-top:26px}
.sf-brand{display:flex;align-items:center;gap:12px}
.sf-brand span{color:#8fa3c0;font-size:.62rem;font-weight:700;letter-spacing:.2em;
               text-transform:uppercase}
.sf-brand img{height:17px;display:block;opacity:.95}
.sf-actions{display:flex;gap:9px;flex-wrap:wrap}
.foot-btn{font-family:inherit;font-size:.74rem;font-weight:700;padding:8px 16px;border-radius:999px;
          border:1px solid rgba(255,255,255,.35);background:transparent;color:#fff;cursor:pointer;
          white-space:nowrap}
.foot-btn:hover{background:rgba(255,255,255,.12)}
.foot-btn.solid{background:var(--orange);border-color:var(--orange)}
.foot-btn.solid:hover{opacity:.9}
body.shared .sf-actions{display:none}

/* read-only share view */
body.shared .hide-shared{display:none!important}
.shared-badge{background:var(--peach);color:var(--orange);font-size:.62rem;font-weight:700;letter-spacing:.08em;
              padding:5px 11px;border-radius:999px;text-transform:uppercase}

.loading{padding:64px 12px;text-align:center;color:var(--grey);font-size:.85rem}
.loading .bar{width:180px;height:3px;background:var(--rule);border-radius:2px;margin:14px auto 0;overflow:hidden}
.loading .bar i{display:block;height:100%;width:40%;background:var(--orange);border-radius:2px;
                animation:slide 1.1s ease-in-out infinite}
@keyframes slide{0%{transform:translateX(-100%)}100%{transform:translateX(350%)}}

.leaflet-container{background:#071d3d}
.leaflet-popup-content-wrapper{border-radius:11px}
.leaflet-popup-content{font-family:var(--font);font-size:.76rem;margin:11px 13px;line-height:1.5}
.leaflet-popup-content b{color:var(--orange)}
.tbl td.nowrap{white-space:nowrap;font-variant-numeric:tabular-nums;font-weight:600}
.camp .row .v small{font-weight:600;color:var(--grey);font-size:.68rem}
.camp-grid{align-items:stretch}
.camp.new span{text-align:center}

/* dark-panel legend swatches (vistar.css only styles .map-legend .dot) */
.dp-legend{align-items:center}
.dp-legend .dot{width:9px;height:9px;border-radius:50%;display:inline-block;margin-right:5px;
                vertical-align:-1px;box-sizing:content-box}
.dp-legend .dot.ring{background:transparent;border:2px solid #04c8b8;width:8px;height:8px}

/* a shared plan has no sidebar, so do not leave a gutter where it was */
body.shared .plan-grid{grid-template-columns:1fr}
body.shared .side{display:none}

/* The two asks only make sense with a campaign open. */
body:not(.on-planner) .sf-actions{display:none}
/* Keep the footer at the bottom even when a page is short. `margin:0 auto` would
   otherwise shrink .wrap to its content width once the body becomes a flex box. */
body{min-height:100vh;display:flex;flex-direction:column}
body>.wrap{flex:1;width:100%}

/* ---------- message panel ---------- */
.modal.chat{max-width:520px;padding:0;overflow:hidden;display:flex;flex-direction:column;
            max-height:min(660px,86vh)}
.chat-head{display:flex;align-items:flex-start;gap:14px;padding:20px 22px 16px;
           border-bottom:1px solid var(--rule)}
.chat-head h2{font-size:1.08rem}
.chat-head .hint{margin:2px 0 0}
.chat-head .x{margin-left:auto;width:28px;height:28px;border-radius:50%;border:1px solid var(--rule);
              background:var(--surface);color:var(--grey);cursor:pointer;font-size:.9rem;
              line-height:1;flex:none}
.chat-head .x:hover{border-color:var(--salmon);color:var(--salmon)}

.chat-body{flex:1;overflow-y:auto;padding:18px 22px;background:var(--bg);
           display:flex;flex-direction:column;gap:11px}
.bub{max-width:86%;font-size:.82rem;line-height:1.55;padding:11px 14px;border-radius:14px}
.bub.them{background:var(--surface);border:1px solid var(--rule);border-bottom-left-radius:5px;
          align-self:flex-start;color:var(--navy)}
.bub.me{background:var(--orange);color:#fff;border-bottom-right-radius:5px;align-self:flex-end}
.bub.note{align-self:center;background:transparent;border:none;color:var(--grey);
          font-size:.72rem;text-align:center;max-width:100%;padding:2px}
.bub b{font-weight:700}
.chat-ctx{align-self:flex-start;max-width:86%;background:var(--navy);color:#fff;border-radius:14px;
          border-bottom-left-radius:5px;padding:12px 15px;font-size:.76rem;line-height:1.6}
.chat-ctx .t{font-weight:700;font-size:.86rem;margin-bottom:3px}
.chat-ctx .r{color:#a9bcd6;font-variant-numeric:tabular-nums}

.chat-input{display:flex;gap:9px;align-items:flex-end;padding:14px 18px;
            border-top:1px solid var(--rule);background:var(--surface)}
.chat-input textarea{flex:1;font-family:inherit;font-size:.84rem;padding:10px 12px;
                     border:1px solid var(--rule);border-radius:11px;background:var(--bg);
                     color:var(--navy);resize:none;line-height:1.5}
.chat-input textarea:focus{outline:2px solid var(--orange);border-color:transparent}
.chat-input .btn{flex:none}
.dp-legend .line{display:inline-block;width:14px;height:2px;background:#7fa6ff;margin-right:5px;
                 vertical-align:3px;border-radius:1px}

/* ---------- sign-in gate ---------- */
.auth-gate{display:none;position:fixed;inset:0;z-index:5000;background:var(--bg);
           align-items:center;justify-content:center;padding:24px;overflow-y:auto}
body.gated{overflow:hidden}
body.gated header,body.gated .strip,body.gated .wrap,body.gated .site-foot{display:none}
.gate-card{max-width:420px;width:100%;text-align:center}
.gate-logo{height:26px;margin-bottom:22px}
.gate-card h1{font-size:1.4rem;font-weight:700;letter-spacing:-.02em;margin-bottom:6px}
.gate-card p{font-size:.84rem;color:var(--grey);line-height:1.6;margin-bottom:22px}
.gate-card .btn{margin-top:6px}
#clerkSignIn{display:flex;justify-content:center}

/* ---------- people / admin ---------- */
.modal.wide-admin{max-width:660px;padding:0;overflow:hidden;display:flex;
                  flex-direction:column;max-height:min(680px,88vh)}
.admin-invite{display:flex;gap:8px;padding:16px 22px 10px;border-bottom:1px solid var(--rule)}
.admin-invite input{flex:1;font-family:inherit;font-size:.84rem;padding:9px 12px;
                    border:1px solid var(--rule);border-radius:9px;background:var(--bg);color:var(--navy)}
.admin-invite select{font-family:inherit;font-size:.82rem;padding:9px 10px;border:1px solid var(--rule);
                     border-radius:9px;background:var(--bg);color:var(--navy)}
.admin-invite input:focus,.admin-invite select:focus{outline:2px solid var(--orange);border-color:transparent}
.admin-body{flex:1;overflow-y:auto;padding:6px 22px 20px}
.admin-loading{padding:34px 0;text-align:center;color:var(--grey);font-size:.82rem}
.admin-tbl select{font-family:inherit;font-size:.76rem;padding:4px 8px;border:1px solid var(--rule);
                  border-radius:7px;background:var(--surface);color:var(--navy)}
.admin-tbl td{vertical-align:middle}

/* The KPI row is always exactly four cards, so pin it to four columns. The
   inherited auto-fit rule sizes tracks to a 168px minimum and leaves a phantom
   track at some widths, which made the row stop short of the content below it. */
.kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:900px){.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.kpis{grid-template-columns:1fr}}
.lg-count{font-weight:600;color:#96a0ad;letter-spacing:0;text-transform:none;margin-left:4px}
#leagueSearch{font-family:inherit;font-size:.76rem;padding:6px 10px;border:1px solid var(--rule);
              border-radius:8px;background:var(--bg);color:var(--navy);width:100%;margin-bottom:8px}
#leagueSearch:focus{outline:2px solid var(--orange);border-color:transparent}
#leagueList{max-height:190px}

/* competitions, nested under the sport they belong to */
.sub-wrap{border-left:2px solid var(--rule);margin:2px 0 6px 6px;padding-left:8px}
.lg-toggle{display:flex;align-items:center;gap:6px;font-family:inherit;font-size:.68rem;
           font-weight:700;color:var(--grey);background:none;border:none;padding:2px 0 2px 21px;
           cursor:pointer;letter-spacing:.02em}
.lg-toggle:hover{color:var(--orange)}
.lg-toggle .caret{font-size:.52rem;transition:transform .15s}
.sub-wrap.open .lg-toggle .caret{transform:rotate(90deg)}
.lg-list{display:none;max-height:180px;overflow-y:auto;padding:2px 0 4px 21px}
.sub-wrap.open .lg-list{display:block}
.lg-list label{display:flex;align-items:center;gap:6px;padding:3px 0;font-size:.72rem;
               cursor:pointer;color:var(--grey)}
.lg-list label:hover{color:var(--navy)}
.lg-list .n{margin-left:auto;font-size:.64rem;font-variant-numeric:tabular-nums}
.lg-more{font-size:.66rem;color:#a8b0ba;padding:4px 0}

/* Both list panels must line up even though their columns differ in width, so
   the heads carry only the title and the controls sit beside the search box. */
.g-32 .panel-head{min-height:34px;align-items:center;margin-bottom:10px;flex-wrap:nowrap}
.g-32 .panel-head h2{white-space:nowrap}
.searchrow .mini{flex:none;white-space:nowrap}

/* A grid item defaults to min-width:auto, so the map panel was being widened by
   its own legend row until it overhung the KPI cards above it. The legend gained
   a fifth, long entry ("Transportation corridor") which is when it started to
   show. Let the column be the width the grid says, and wrap the legend instead. */
.plan-grid>*{min-width:0}
.dp-legend{flex-wrap:wrap;row-gap:4px;max-width:calc(100% - 24px)}

/* Same min-width:auto trap one level down: the screen list carries long, mostly
   unbreakable names and addresses ("Residential|Apartment Buildings · 336-337
   Strand, London WC2B 4RD"), whose min-content width pushed its panel past the
   grid and out beyond the map above it. Cap the tracks and let the text wrap. */
.grid>*{min-width:0}
.tbl{table-layout:fixed;width:100%}
.tbl td,.tbl th{overflow-wrap:anywhere}
.tbl td.num,.tbl th.num,.tbl td.nowrap{overflow-wrap:normal}

/* table-layout:fixed splits columns evenly unless told otherwise, which let a
   long category pill ("Family & community") run under the date. Give each table
   real column widths and let the pill wrap rather than overhang. */
.evtbl{table-layout:fixed}
.evtbl col.c-event{width:auto}
.evtbl col.c-cat{width:116px}
.evtbl col.c-date{width:64px}
.evtbl col.c-att{width:92px}
.evtbl col.c-scr{width:58px}
.evtbl .pill{white-space:normal;display:inline-block;line-height:1.25}
.sctbl{table-layout:fixed}
.sctbl col.c-screen{width:auto}
.sctbl col.c-owner{width:96px}
.sctbl col.c-ev{width:52px}
/* location filter: regions, each expanding to the cities inside it */
#geoSearch{font-family:inherit;font-size:.76rem;padding:6px 10px;border:1px solid var(--rule);
           border-radius:8px;background:var(--bg);color:var(--navy);width:100%;margin-bottom:8px}
#geoSearch:focus{outline:2px solid var(--orange);border-color:transparent}
#geoList{max-height:250px}
.geo-r{border-bottom:1px solid var(--rule)}
.geo-r:last-child{border-bottom:none}
.geo-r>label{display:flex;align-items:center;gap:7px;padding:5px 0;font-size:.76rem;
             cursor:pointer;color:var(--grey)}
.geo-r>label:hover{color:var(--navy)}
.geo-r>label .n{margin-left:auto;font-size:.66rem;font-variant-numeric:tabular-nums}
.geo-r .lg-toggle{padding-left:21px}
.geo-r .lg-list{padding-left:21px;max-height:150px}
.geo-r.open .lg-list{display:block}
.geo-r.open .lg-toggle .caret{transform:rotate(90deg)}
