/* Snelsky HQ v0.3: dark and cinematic, matching snelsky.com */
*,*::before,*::after{box-sizing:border-box}
:root{
  box-sizing:border-box;
  padding-top:env(safe-area-inset-top,0px);
  padding-bottom:env(safe-area-inset-bottom,0px);
  --bg:#1C1916; --card:#272626; --raised:#312F2D; --thumb:#34312E;
  --line:#3A3634; --line-strong:#4B4643;
  --text:#FAFAF8; --text-2:#E4DED8; --muted:#B5AEA7; --muted-2:#A39C95;
  --orange:#FF4F15; --on-orange:#1C1916;
  --display:"Plus Jakarta Sans",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  --body:"Figtree",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  --nav-h:68px; --rail:232px;
  color-scheme:dark;
}
html{background:var(--bg);scroll-padding-top:env(safe-area-inset-top,0px);-webkit-text-size-adjust:100%;text-size-adjust:100%}
html.locked,html.locked body{overflow:hidden}
body{margin:0;background:var(--bg);color:var(--text);font-family:var(--body);font-size:16px;line-height:1.45;-webkit-font-smoothing:antialiased;font-variant-numeric:tabular-nums}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
a{color:var(--text)}
:focus-visible{outline:2px solid var(--orange);outline-offset:2px}
main:focus{outline:none}
img{max-width:100%;display:block}
[hidden]{display:none !important}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.boot{padding:40px 24px;color:var(--muted)}

/* marks */
.mark{display:inline-flex;align-items:center;gap:8px;font-family:var(--display);font-weight:800;font-size:20px;letter-spacing:-.02em;line-height:1;white-space:nowrap}
.mark .rec{width:10px;height:10px;border-radius:50%;background:var(--orange);flex:none}
.mark .hq{font-family:var(--body);font-weight:600;font-size:12px;letter-spacing:0;color:var(--muted);padding:2px 8px;border:1px solid var(--line-strong);border-radius:999px}
.studio{font-family:var(--display);font-weight:800;font-size:18px;letter-spacing:-.02em;line-height:1;color:var(--text)}
.studio sup{color:var(--orange);font-size:.72em;margin-left:1px;vertical-align:.6em;line-height:0}

/* top bar */
.topbar{position:sticky;top:env(safe-area-inset-top,0px);z-index:20;display:flex;align-items:center;justify-content:space-between;gap:12px;height:64px;padding:0 20px;background:var(--bg)}
.top-actions{display:flex;align-items:center;gap:10px}
.avatar{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;border:1px solid var(--line);background:var(--card);color:var(--text);font-weight:700;font-size:14px}

/* page */
main{max-width:600px;margin:0 auto;padding:12px 20px calc(var(--nav-h) + env(safe-area-inset-bottom,0px) + 40px)}
.stack{display:flex;flex-direction:column;gap:34px}
.hello p{margin:0}
.eyebrow{font-size:14px;color:var(--muted)}
.title-xl{margin:6px 0 0;font-family:var(--display);font-weight:800;font-size:clamp(34px,9vw,44px);line-height:1.02;letter-spacing:-.03em}
.title-xl em{font-style:italic;color:var(--orange)}
.lede{margin:10px 0 0;font-size:16px;color:var(--text-2);max-width:52ch}
.section{display:flex;flex-direction:column;gap:12px}
.section-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.h2{margin:0;font-family:var(--display);font-weight:700;font-size:19px;letter-spacing:-.01em}
.h2 + .count,.section-head .count{font-size:13px;font-weight:700;color:var(--muted)}
.link{font-size:14px;font-weight:600;color:var(--text);text-underline-offset:3px;background:none;border:0;padding:0;text-decoration:underline}
.new{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:700;color:var(--orange)}
.new::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--orange)}
.muted{color:var(--muted)}
.small{font-size:13px}
.hint{font-size:13px;line-height:1.45;color:var(--muted-2);margin:0}
.hot{color:var(--orange);font-weight:700}

/* cards and rows */
.card{background:var(--card);border-radius:16px;overflow:hidden}
.card-pad{padding:18px;display:flex;flex-direction:column;gap:16px}
.rows{display:flex;flex-direction:column}
.row{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;padding:16px;background:none;border:0;border-top:1px solid var(--line);text-align:left;color:inherit;text-decoration:none}
.rows > .row:first-child{border-top:0}
button.row:hover,a.row:hover{background:var(--raised)}
.row-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.row-title{font-weight:600;font-size:16px;overflow-wrap:anywhere}
.row-sub{font-size:14px;color:var(--muted)}
.row-side{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:6px;font-size:14px;color:var(--text-2);text-align:right;max-width:46%}
.empty{margin:0;padding:18px;border-radius:16px;background:var(--card);color:var(--muted)}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 18px;border-radius:12px;border:1.5px solid var(--line-strong);background:transparent;color:var(--text);font-weight:700;font-size:15px;text-decoration:none;white-space:nowrap}
.btn:hover{border-color:var(--text)}
.btn.primary{background:var(--orange);border-color:var(--orange);color:var(--on-orange)}
.btn.light{background:var(--text);border-color:var(--text);color:var(--bg)}
.btn.outline{border-color:var(--text)}
.btn.danger{color:var(--orange);border-color:var(--orange)}
.btn.small{min-height:44px;padding:0 14px;font-size:14px;border-radius:10px}
.btn.wide{width:100%}
.btn.dashed{border-style:dashed}
.btn[disabled]{opacity:.5;cursor:default}
.actions{display:flex;flex-wrap:wrap;gap:10px}
.actions.end{justify-content:flex-end}

/* chips and segmented */
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{min-height:44px;padding:0 16px;border-radius:999px;border:1.5px solid var(--line-strong);background:transparent;color:var(--text);font-size:14px;font-weight:600}
.chip[aria-pressed="true"]{background:var(--text);border-color:var(--text);color:var(--bg);font-weight:700}
.seg{display:inline-flex;gap:4px;padding:4px;border-radius:999px;background:var(--card)}
.seg button{min-height:40px;padding:0 16px;border:0;border-radius:999px;background:transparent;color:var(--text-2);font-size:14px;font-weight:600}
.seg button[aria-pressed="true"]{background:var(--text);color:var(--bg);font-weight:700}

/* status pills */
.pill{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:999px;border:1.5px solid var(--line-strong);font-size:13px;font-weight:700;color:var(--text-2);white-space:nowrap}
.pill.edit{border-color:var(--text);color:var(--text)}
.pill.review,.pill.behind,.pill.over,.pill.new{border-color:var(--orange);color:var(--orange)}
.pill.review::before,.pill.behind::before,.pill.over::before,.pill.new::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--orange)}
.pill.approved{background:var(--raised);border-color:var(--raised);color:var(--text)}
.pill.delivered,.pill.done{background:var(--line);border-color:var(--line);color:var(--text-2)}

/* film strip: one frame per unit in the plan */
.strip{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.fr{width:30px;height:20px;border-radius:4px;border:1.5px solid var(--line-strong);background:var(--thumb)}
.fr.delivered{background:var(--orange);border-color:var(--orange)}
.fr.progress{border-color:var(--orange);background:repeating-linear-gradient(135deg,var(--orange) 0 2px,transparent 2px 6px)}
.fr.banked{background:transparent;border-style:dashed;border-color:var(--muted)}
.fr.over{background:transparent;border-style:dashed;border-color:var(--orange)}
.strip .div{width:1px;height:22px;background:var(--line-strong);margin:0 3px}
.strip.sm .fr{width:22px;height:15px;border-radius:3px}
.legend{display:flex;flex-wrap:wrap;gap:8px 16px;font-size:12px;color:var(--muted)}
.legend span{display:inline-flex;align-items:center;gap:6px}
.legend .fr{width:14px;height:10px;border-radius:2px}
.line-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.line-name{font-weight:600;font-size:16px}
.line-note{font-size:14px;color:var(--muted);text-align:right}
.line-note.strong{color:var(--text);font-weight:600}
.usage-line{display:flex;flex-direction:column;gap:10px}
.divider{height:1px;background:var(--line)}

/* progress track */
.track{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
.track i{height:4px;border-radius:2px;background:var(--line)}
.track i.done{background:var(--muted)}
.track i.now{background:var(--orange)}

/* thumbnails */
.thumb{position:relative;display:flex;align-items:center;justify-content:center;background:var(--thumb);overflow:hidden}
.thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.thumb .play{position:relative;width:56px;height:56px}
.thumb .dur{position:absolute;right:10px;bottom:10px;padding:3px 8px;border-radius:6px;background:var(--bg);font-size:12px;font-weight:600}
.thumb.wide{aspect-ratio:16/9}
.thumb.tall{aspect-ratio:9/16;border-radius:12px}
.thumb.tall .play{width:30px;height:30px}
.thumb.tall .dur{left:8px;right:auto;bottom:8px;font-size:11px;padding:2px 6px;border-radius:5px}
.thumb.mini{width:72px;flex:none;aspect-ratio:16/9;border-radius:6px}
.thumb.mini .play{display:none}

/* review card */
.review-body{display:flex;flex-direction:column;gap:14px;padding:16px 16px 18px}
.review-body h3{margin:0;font-family:var(--display);font-weight:700;font-size:18px;letter-spacing:-.01em}

/* coming up */
.datebig{display:flex;flex-direction:column;align-items:center;min-width:56px}
.datebig b{font-family:var(--display);font-weight:800;font-size:44px;line-height:.95;letter-spacing:-.03em}
.datebig span{margin-top:6px;font-size:13px;font-weight:600;color:var(--muted)}
.shoot-card{display:flex;gap:18px;align-items:flex-start;width:100%;padding:18px;border:0;background:var(--card);border-radius:16px;text-align:left;color:inherit}
.shoot-card:hover{background:var(--raised)}

/* library */
.lib-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.tile{display:flex;flex-direction:column;gap:8px;text-decoration:none;color:var(--text)}
.tile .t{font-size:14px;font-weight:600;line-height:1.3}
.tile .s{font-size:12px;color:var(--muted)}
.tile.wide .thumb{border-radius:14px}
.tile.wide .t{font-size:16px;font-weight:700}
.search{position:relative}
.search svg{position:absolute;left:14px;top:15px}
.search input{width:100%;min-height:50px;padding:12px 14px 12px 44px;border-radius:12px;border:1px solid var(--line);background:var(--card);color:var(--text);font-size:16px}

/* plan */
.dl{margin:0}
.dl > div{display:flex;justify-content:space-between;gap:12px;padding:16px;border-top:1px solid var(--line)}
.dl > div:first-child{border-top:0}
.dl dt{font-weight:600}
.dl dd{margin:0;color:var(--text-2);text-align:right}

/* bottom nav (clients, and the team on phones) */
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:30;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;background:var(--bg);border-top:1px solid var(--line);padding:6px 12px calc(14px + env(safe-area-inset-bottom,0px))}
.tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:56px;border:0;background:none;color:var(--muted-2);font-size:12px;font-weight:600;text-decoration:none}
.tab svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tab .dot{width:5px;height:5px;border-radius:50%}
.tab[aria-current="page"]{color:var(--text);font-weight:700}
.tab[aria-current="page"] .dot{background:var(--orange)}
.rail-mark,.rail-foot{display:none}
body:not([data-mode="team"]):not([data-mode="portal"]) .tabbar{display:none}

/* team tables */
.table-wrap{overflow-x:auto;border-radius:18px;background:var(--card)}
.table{width:100%;min-width:640px;border-collapse:collapse;font-size:15px}
.table th{padding:14px 16px 10px;text-align:left;font-size:13px;font-weight:600;color:var(--muted)}
.table td{padding:12px 16px;border-top:1px solid var(--line);vertical-align:middle}
.table tr.click{cursor:pointer}
.table tr.click:hover td{background:var(--raised)}
.vid-cell{display:flex;align-items:center;gap:14px}
.allow-row{display:grid;grid-template-columns:minmax(200px,1.1fr) minmax(0,2.6fr) auto;align-items:center;gap:24px;width:100%;padding:18px 20px;border:0;border-top:1px solid var(--line);background:none;color:var(--text);font:inherit;text-align:left;text-decoration:none}
.allow-row:first-child{border-top:0}
.allow-row:hover{background:var(--raised)}
.allow-lines{display:flex;flex-wrap:wrap;gap:14px 34px}
.allow-lines > span{display:flex;flex-direction:column;gap:7px}
.people{display:inline-flex;gap:4px;flex-wrap:wrap}
.ini{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--text);color:var(--bg);font-size:11px;font-weight:700;flex:none}
.ini.lg{width:44px;height:44px;font-size:14px}
.week-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(190px,100%),1fr));gap:12px}
.day-card{display:flex;flex-direction:column;gap:10px;padding:16px;border-radius:16px;background:var(--card);border:0;text-align:left;color:inherit;width:100%}
.day-card:hover{background:var(--raised)}
.day-card b{font-family:var(--display);font-weight:800;font-size:28px;letter-spacing:-.02em}
.kind{font-size:12px;font-weight:700}
.kind.shoot{color:var(--orange)}
.cols{display:flex;flex-wrap:wrap;gap:24px;align-items:flex-start}
.cols > .main-col{flex:999 1 520px;min-width:0;display:flex;flex-direction:column;gap:28px}
.cols > .side-col{flex:1 1 300px;min-width:0;display:flex;flex-direction:column;gap:16px}
.two-up{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(440px,100%),1fr));gap:20px;align-items:start}
.check{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--line)}
.check:first-child{border-top:0}
.check input{width:20px;height:20px;accent-color:var(--orange);flex:none}
.check.done span{color:var(--muted);text-decoration:line-through}

/* sheets */
.scrim{position:fixed;inset:0;z-index:50;background:rgba(0,0,0,.6);display:flex;align-items:flex-end;justify-content:center}
.scrim[hidden]{display:none}
.sheet{width:100%;max-width:600px;max-height:calc(100% - env(safe-area-inset-top,0px) - 16px);overflow-y:auto;overscroll-behavior:contain;background:var(--bg);border:1px solid var(--line);border-bottom:0;border-radius:20px 20px 0 0;padding:10px 20px calc(28px + env(safe-area-inset-bottom,0px));animation:up .22s ease-out}
.sheet.still{animation:none}
@keyframes up{from{transform:translateY(28px);opacity:0}}
.grab{width:40px;height:4px;border-radius:2px;background:var(--line-strong);margin:4px auto 16px}
.sheet-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:18px}
.sheet-head h2{margin:0;font-family:var(--display);font-weight:800;font-size:26px;letter-spacing:-.02em;line-height:1.1;overflow-wrap:anywhere}
.sheet-head p{margin:6px 0 0;color:var(--muted);font-size:15px}
.x{flex:none;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;border:1px solid var(--line);background:var(--card);color:var(--text)}
.x svg{width:18px;height:18px;stroke:currentColor;stroke-width:2.2;fill:none;stroke-linecap:round}
.facts{display:grid;grid-template-columns:auto 1fr;gap:10px 18px;margin:0;font-size:15px}
.facts dt{color:var(--muted)}
.facts dd{margin:0;min-width:0;overflow-wrap:anywhere;white-space:pre-wrap}
.sheet .section{margin-top:24px}

/* forms */
.form{display:flex;flex-direction:column;gap:16px}
.field{display:flex;flex-direction:column;gap:8px}
.field > label,.field > .label,.legend-label{font-family:var(--display);font-weight:700;font-size:15px}
.form input:not([type=checkbox]):not([type=radio]),.form select,.form textarea{width:100%;min-height:50px;padding:12px 14px;border-radius:12px;border:1px solid var(--line);background:var(--card);color:var(--text);font-size:16px}
.form textarea{min-height:110px;resize:vertical;line-height:1.45}
.form [aria-invalid="true"]{border-color:var(--orange) !important}
.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
fieldset{margin:0;padding:0;border:0;display:flex;flex-direction:column;gap:10px}
legend{padding:0;margin-bottom:10px}
.option{display:flex;align-items:center;gap:14px;min-height:60px;padding:12px 16px;border-radius:14px;border:1.5px solid var(--line);background:var(--card);cursor:pointer}
.option:has(input:checked){border-color:var(--orange)}
.option input{width:20px;height:20px;margin:0;accent-color:var(--orange);flex:none}
.option b{display:block;font-size:16px}
.option span span{display:block;font-size:14px;color:var(--muted);font-weight:400}
.ticks{display:flex;flex-wrap:wrap;gap:8px}
.ticks label{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 14px;border-radius:999px;border:1.5px solid var(--line-strong);font-size:14px;font-weight:600;cursor:pointer}
.ticks label:has(input:checked){border-color:var(--text);background:var(--raised)}
.ticks input{width:18px;height:18px;margin:0;accent-color:var(--orange)}
.req{color:var(--orange)}
.note-box{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:14px;background:var(--card)}
.preview-thumb{display:flex;gap:12px;align-items:center}

/* toast */
.toast{position:fixed;left:50%;bottom:calc(var(--nav-h) + env(safe-area-inset-bottom,0px) + 18px);transform:translateX(-50%);z-index:60;max-width:calc(100% - 32px);padding:12px 16px;border-radius:12px;background:var(--text);color:var(--bg);font-size:14px;font-weight:700;opacity:0;pointer-events:none;transition:opacity .2s}
.toast.show{opacity:1}

/* sign in */
.auth{max-width:420px;margin:0 auto;padding:max(48px,10vh) 4px 48px;display:flex;flex-direction:column;gap:14px}
.auth h1{margin:28px 0 0;font-family:var(--display);font-weight:800;font-size:clamp(32px,8vw,40px);letter-spacing:-.03em;line-height:1.04}
.auth p{margin:0;color:var(--muted)}
.code-input{text-align:center;letter-spacing:.32em;font-size:24px !important;font-weight:700}
.auth .split{display:flex;justify-content:space-between;gap:12px}

/* desktop */
@media (min-width:900px){
  body[data-mode="team"] .topbar{display:none}
  body[data-mode="team"] .tabbar{top:0;right:auto;width:var(--rail);display:flex;flex-direction:column;align-items:stretch;gap:4px;padding:calc(env(safe-area-inset-top,0px) + 26px) 16px 24px;border-top:0;border-right:1px solid var(--line)}
  body[data-mode="team"] .rail-mark{display:flex;padding:0 12px 26px}
  body[data-mode="team"] .rail-foot{display:block;margin-top:auto}
  body[data-mode="team"] .tab{flex-direction:row;justify-content:space-between;min-height:46px;padding:0 12px;border-radius:10px;font-size:15px}
  body[data-mode="team"] .tab svg{display:none}
  body[data-mode="team"] .tab[aria-current="page"]{background:var(--card)}
  body[data-mode="team"] .tab:hover{background:var(--card);color:var(--text)}
  body[data-mode="team"] main{max-width:1180px;margin:0 0 0 var(--rail);padding:40px 48px 64px}
  body[data-mode="team"] .title-xl{font-size:52px}
  body[data-mode="portal"] .tabbar{left:50%;right:auto;width:600px;transform:translateX(-50%);border-left:1px solid var(--line);border-right:1px solid var(--line)}
  .scrim{align-items:center}
  .sheet{border-radius:20px;border-bottom:1px solid var(--line);max-height:calc(100% - 64px);padding-top:26px}
  .grab{display:none}
  body[data-mode="team"] .toast{bottom:28px;left:calc(50% + var(--rail) / 2)}
}
@media (max-width:520px){ .allow-row{grid-template-columns:1fr} }
@media (prefers-reduced-motion:reduce){ .sheet{animation:none} .toast{transition:none} }

/* compact date blocks inside list rows */
.row .datebig{min-width:44px}
.row .datebig b{font-size:26px}
.row .datebig span{margin-top:4px;font-size:12px}
.stack > .link{align-self:flex-start}
.card-pad .rows .row{padding:12px 0}
.card-pad .rows .row:first-child{border-top:0}
.btn.wide{white-space:normal;text-align:center;padding:12px 18px;line-height:1.3}
@media (max-width:520px){ .row > .thumb.mini{display:none} }

/* the logo */
.mark .logo{display:block;height:21px;width:auto;flex:none}
.rail-mark .mark .logo{height:19px}
.auth .mark .logo{height:28px}

/* pop-ups only ever move up and down */
.scrim{touch-action:pan-y pinch-zoom;overscroll-behavior:contain}
.sheet{overflow-x:hidden;touch-action:pan-y pinch-zoom;overscroll-behavior:contain}
.sheet .actions .btn{white-space:normal;text-align:center}
/* everything in a form shrinks to fit, even on small phones */
.two{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.field,.form fieldset,.option,.ticks label{min-width:0}
.form input:not([type=checkbox]):not([type=radio]),.form select,.form textarea{min-width:0;max-width:100%}
.form input::-webkit-date-and-time-value{text-align:left}
.option span,.preview-thumb span,.row-sub,.facts dt{overflow-wrap:anywhere}
/* iPhones won't shrink date and time boxes below their natural width unless told to */
@supports (-webkit-touch-callout:none){
  .form input[type=date],.form input[type=time],.form input[type=month]{-webkit-appearance:none;appearance:none;display:block}
}
/* safety net: nothing on the page itself can push it sideways */
#app{overflow-x:clip}
/* sign-in and setup screens carry their own large logo */
body:not([data-mode="team"]):not([data-mode="portal"]) .topbar{display:none}

/* ---------- v0.4: projects board ---------- */
.board-tools{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.board-tools .search{flex:1 1 280px}
.board-tools .select{flex:0 1 220px;width:auto}
.select{width:100%;min-height:50px;padding:12px 14px;border-radius:12px;border:1px solid var(--line);background:var(--card);color:var(--text);font-size:16px}
.board-group{display:flex;flex-direction:column;gap:12px}
.group-head{display:inline-flex;align-items:center;gap:10px;align-self:flex-start;min-height:44px;padding:0;border:0;background:none;color:var(--text);font-family:var(--display);font-weight:700;font-size:20px;letter-spacing:-.01em}
.group-head .count{font-family:var(--body);font-size:13px;font-weight:700;color:var(--muted)}
.chev{flex:none;transition:transform .15s ease}
.group-head[aria-expanded="true"] .chev,.expander[aria-expanded="true"] .chev{transform:rotate(90deg)}
.board{width:100%;min-width:1120px;border-collapse:collapse;font-size:14px}
.board th{padding:12px 12px 8px;text-align:left;font-size:12px;font-weight:600;color:var(--muted);white-space:nowrap}
.board td{padding:10px 12px;border-top:1px solid var(--line);vertical-align:middle;white-space:nowrap}
.board td.name{white-space:normal;min-width:240px}
.board tr.proj td{background:var(--card)}
.board tr.vid td{background:var(--bg)}
.board tr.vid td.name{padding-left:28px}
.board td.tog{width:44px;padding-right:0}
.expander{display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:8px;background:none;color:var(--text)}
.expander:hover{background:var(--raised)}
.cell-btn{padding:0;border:0;background:none;color:var(--text);font:inherit;font-weight:700;text-align:left;cursor:pointer}
.cell-btn:hover{text-decoration:underline;text-underline-offset:3px}
.board tr.vid .cell-btn{font-weight:500}
.prog-wrap{display:inline-flex;align-items:center;gap:8px}
.prog-wrap.lg{display:flex;width:100%}
progress.prog{-webkit-appearance:none;appearance:none;width:90px;height:6px;border:0;border-radius:3px;background:var(--line);overflow:hidden}
.prog-wrap.lg progress.prog{flex:1;height:8px}
progress.prog::-webkit-progress-bar{background:var(--line);border-radius:3px}
progress.prog::-webkit-progress-value{background:var(--orange);border-radius:3px}
progress.prog::-moz-progress-bar{background:var(--orange);border-radius:3px}
.pill.st-none{color:var(--muted-2)}
.pill.st-working{border-color:var(--text);color:var(--text)}
.pill.st-snelsky_review{border-color:var(--muted);color:var(--text-2)}
.pill.st-client_review,.pill.st-approved{border-color:var(--orange);color:var(--orange)}
.pill.st-on_hold{border-style:dashed;color:var(--text-2)}
.pill.st-stuck{background:var(--orange);border-color:var(--orange);color:var(--on-orange)}
.pill.st-done{background:var(--line);border-color:var(--line);color:var(--text-2)}
.pill.ver{border-color:var(--line-strong);color:var(--text-2);font-weight:600}
.row-side .pill + .pill{margin-top:2px}
.note-body{color:var(--text);font-size:15px;white-space:pre-wrap;overflow-wrap:anywhere}
[data-kind]{display:flex;flex-direction:column;gap:16px}
.sheet .legend-label{display:block;margin-bottom:10px}
.facts dd .pill{vertical-align:middle}

/* ---------- v0.4: the client portal on a computer ---------- */
.p-cols{display:flex;flex-direction:column;gap:34px}
.p-main,.p-side{display:contents}
.o1{order:1}.o2{order:2}.o3{order:3}.o4{order:4}.o5{order:5}
.lib-wide{display:flex;flex-direction:column;gap:16px}
@media (min-width:900px){
  .p-cols{flex-direction:row;align-items:flex-start;gap:36px}
  .p-main,.p-side{display:flex;flex-direction:column;gap:34px;min-width:0}
  .p-main{flex:1.6 1 0}
  .p-side{flex:1 1 0}
  .p-side .o3{order:0}
  .lib-wide{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:20px}
  .lib-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px}
  body[data-mode="portal"] .topbar{display:none}
  body[data-mode="portal"] .tabbar{top:0;left:0;right:auto;bottom:0;width:var(--rail);transform:none;display:flex;flex-direction:column;align-items:stretch;gap:4px;padding:calc(env(safe-area-inset-top,0px) + 26px) 16px 24px;border-top:0;border-left:0;border-right:1px solid var(--line)}
  body[data-mode="portal"] .rail-mark{display:flex;padding:0 12px 26px}
  body[data-mode="portal"] .tab{flex-direction:row;justify-content:space-between;min-height:46px;padding:0 12px;border-radius:10px;font-size:15px}
  body[data-mode="portal"] .tab svg{display:none}
  body[data-mode="portal"] .tab[aria-current="page"]{background:var(--card)}
  body[data-mode="portal"] .tab:hover{background:var(--card);color:var(--text)}
  body[data-mode="portal"] main{max-width:1180px;margin:0 0 0 var(--rail);padding:40px 48px 64px}
  body[data-mode="portal"] .title-xl{font-size:52px}
  body[data-mode="portal"] .toast{bottom:28px;left:calc(50% + var(--rail) / 2)}
}
/* keep the whole board on a laptop screen */
.board{min-width:980px}
.board th,.board td{padding-left:10px;padding-right:10px}
.board td.name{min-width:220px}
.board td:nth-child(3),.board td:nth-child(10){white-space:normal;max-width:150px}
progress.prog{width:60px}

/* ---------- v0.5: chat ---------- */
.badge{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:var(--orange);color:var(--on-orange);font-size:11px;font-weight:800;line-height:1}
.tab{position:relative}
.tab .badge{position:absolute;top:4px;left:calc(50% + 6px)}
@media (min-width:900px){ .tab .badge{position:static;margin-left:auto} }
.chat{display:flex;flex-direction:column;padding:0;overflow:hidden}
.chat-feed{display:flex;flex-direction:column;gap:14px;max-height:min(62vh,680px);min-height:220px;overflow-y:auto;overscroll-behavior:contain;padding:18px}
.chat-empty{margin:auto;text-align:center}
.chat-day{display:flex;align-items:center;gap:10px;margin:6px 0 0;color:var(--muted);font-size:12px;font-weight:700}
.chat-day::before,.chat-day::after{content:"";flex:1;height:1px;background:var(--line)}
.msg{display:flex;flex-direction:column;gap:6px;max-width:min(560px,88%);align-self:flex-start;padding:12px 14px;border-radius:14px;background:var(--raised);border:1px solid var(--line)}
.msg.mine{align-self:flex-end;background:var(--card);border-color:var(--line-strong)}
.msg.from-team:not(.mine){border-left:3px solid var(--orange)}
.msg-meta{margin:0;display:flex;flex-wrap:wrap;gap:4px 8px;align-items:baseline;font-size:12px;color:var(--muted)}
.msg-who{color:var(--text-2);font-weight:700;overflow-wrap:anywhere}
.msg-body{color:var(--text);font-size:15px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
.msg-body a{color:var(--orange);text-decoration:underline;text-underline-offset:2px}
.msg-files{display:flex;flex-wrap:wrap;gap:8px}
.msg-img{padding:0;border:0;background:none;border-radius:10px;overflow:hidden;cursor:pointer;max-width:260px}
.msg-img img{display:block;max-width:100%;max-height:220px;object-fit:cover;background:var(--line)}
.file-chip{display:inline-flex;align-items:center;gap:8px;max-width:100%;min-height:40px;padding:8px 12px;border-radius:10px;border:1px solid var(--line-strong);background:var(--bg);color:var(--text);font:inherit;font-size:14px;cursor:pointer}
.file-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:220px;font-weight:600}
.file-size{color:var(--muted);font-size:12px;flex:none}
.msg-del{align-self:flex-start;font-size:12px;color:var(--muted)}
.chat-compose{display:flex;flex-direction:column;gap:10px;padding:14px 18px 18px;border-top:1px solid var(--line);background:var(--card)}
.chat-compose textarea{width:100%;min-height:64px;max-height:220px;resize:vertical;padding:12px 14px;border-radius:12px;border:1px solid var(--line);background:var(--bg);color:var(--text);font:inherit;font-size:16px}
.compose-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.compose-actions .btn.primary{margin-left:auto}
.picked{display:flex;flex-wrap:wrap;gap:8px}
.x-small{display:grid;place-items:center;width:28px;height:28px;margin-right:-6px;border:0;border-radius:8px;background:none;color:var(--muted);font-size:18px;cursor:pointer}
.chat-head{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}
.chat-summary .lede{overflow-wrap:anywhere}
.row-side .badge{margin-left:6px}

/* ---------- v0.5: inline editing on the projects board ---------- */
.board{min-width:1080px}
.cell-select{-webkit-appearance:none;appearance:none;max-width:150px;min-height:32px;padding:5px 26px 5px 11px;border-radius:999px;border:1px solid var(--line-strong);background:var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23999' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center;color:var(--text);font:inherit;font-size:13px;font-weight:700;cursor:pointer}
.cell-select:hover,.cell-select:focus{border-color:var(--text)}
.cell-select.st-working{border-color:var(--text)}
.cell-select.st-client_review{border-color:var(--orange);color:var(--orange)}
.cell-select.st-stuck{background-color:var(--orange);border-color:var(--orange);color:var(--on-orange)}
.cell-select.st-done{background-color:var(--line);border-color:var(--line);color:var(--text-2)}
.cell-select.st-on_hold{border-style:dashed}
.cell-select.st-none{color:var(--muted-2)}
.cell-input{min-height:32px;max-width:150px;padding:5px 9px;border-radius:8px;border:1px solid transparent;background:transparent;color:var(--text);font:inherit;font-size:13px}
.cell-input:hover,.cell-input:focus{border-color:var(--line-strong);background:var(--bg)}
.cell-input.loc{width:120px}
.cell-input::placeholder{color:var(--muted-2)}

/* ---------- v0.5: requests you can reorder ---------- */
.req-list{list-style:none;margin:0;padding:0}
.row.req-item{align-items:flex-start;gap:10px;cursor:grab}
.row.req-item .actions{margin-top:8px}
.grip{flex:none;padding-top:3px;color:var(--muted-2);fill:currentColor}
.req-side{display:flex;flex-direction:column;align-items:flex-end;gap:8px;flex:none}
.req-move{display:flex;gap:4px}
.icon-btn{display:grid;place-items:center;width:36px;height:36px;border-radius:8px;border:1px solid var(--line);background:none;color:var(--text);font-size:16px;cursor:pointer}
.icon-btn:disabled{opacity:.35;cursor:default}
.row.req-item.dragging{opacity:.5}
.row.req-item.drop-before{box-shadow:inset 0 2px 0 var(--orange)}
.row.req-item.drop-after{box-shadow:inset 0 -2px 0 var(--orange)}

/* the board uses the full width, with compact inline controls */
@media (min-width:900px){ body[data-mode="team"][data-view="projects"] main{max-width:none} }
.board{min-width:1000px}
.board th,.board td{padding-left:6px;padding-right:6px}
.board td.name{min-width:164px}
.board td:nth-child(3){max-width:110px}
.cell-select{max-width:126px;padding:5px 22px 5px 9px;background-position:right 8px center}
.cell-select[data-inline="version"]{width:80px}
.cell-select[data-inline="editor_id"]{width:92px}
.cell-input[type="date"]{width:126px}
.cell-input.loc{width:100px}
progress.prog{width:44px}
.req-links{display:flex;gap:16px;margin-top:8px}
.req-links .link{font-size:13px;color:var(--text-2)}

/* ---------- v0.6: Hard Drive Locator ---------- */
.loc-table{width:100%;min-width:960px;border-collapse:collapse;font-size:14px}
.loc-table th{padding:10px 10px 8px;text-align:left;font-size:12px;font-weight:600;color:var(--muted);white-space:nowrap;border-bottom:1px solid var(--line)}
.loc-table td{padding:9px 10px;border-bottom:1px solid var(--line);vertical-align:middle;color:var(--text-2)}
.loc-table td.k-name{min-width:220px;color:var(--text);font-weight:600}
.loc-table td.k-size,.loc-table th.k-size{text-align:right;white-space:nowrap}
.loc-table td.k-text{min-width:96px;max-width:260px;overflow-wrap:break-word;word-break:normal}
.loc-table tfoot td.foot{white-space:nowrap}
.loc-table tbody tr.drive-row{cursor:pointer}
.loc-table tbody tr.drive-row:hover td,.loc-table tbody tr.drive-row:focus td{background:var(--raised)}
.loc-table tbody tr.drive-row:focus{outline:2px solid var(--orange);outline-offset:-2px}
.loc-table tfoot td{border-bottom:0;padding-top:12px;font-weight:700;color:var(--text)}
.loc-table .empty-cell{padding:28px 10px;text-align:center;color:var(--muted)}
.drive-chip{display:inline-flex;align-items:center;min-height:30px;padding:4px 10px;margin:2px 0;border-radius:999px;border:1px solid var(--line-strong);background:var(--bg);color:var(--text);font:inherit;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap}
.drive-chip:hover{border-color:var(--text)}
.drive-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:16px}
.drive-card{display:flex;flex-direction:column;gap:14px;padding:18px;border-radius:16px;background:var(--card);border:1px solid var(--line)}
.drive-card.lvl-full{border-color:#e5484d}
.drive-top{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.drive-top .h2{font-size:18px;overflow-wrap:anywhere}
.drive-bar{display:flex;align-items:center;gap:10px;margin:0;min-height:20px}
progress.fill{-webkit-appearance:none;appearance:none;flex:1;height:10px;border:0;border-radius:5px;background:var(--line);overflow:hidden}
progress.fill::-webkit-progress-bar{background:var(--line);border-radius:5px}
progress.fill.lvl-ok::-webkit-progress-value{background:#30a46c;border-radius:5px}
progress.fill.lvl-warn::-webkit-progress-value{background:#f5a524;border-radius:5px}
progress.fill.lvl-full::-webkit-progress-value{background:#e5484d;border-radius:5px}
progress.fill.lvl-ok::-moz-progress-bar{background:#30a46c}
progress.fill.lvl-warn::-moz-progress-bar{background:#f5a524}
progress.fill.lvl-full::-moz-progress-bar{background:#e5484d}
.drive-card .pct{font-weight:800;font-size:15px;min-width:44px;text-align:right}
.drive-card.lvl-ok .pct{color:#30a46c}.drive-card.lvl-warn .pct{color:#f5a524}.drive-card.lvl-full .pct{color:#e5484d}
.drive-nums{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.drive-nums .num{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--muted)}
.drive-nums .num b{font-size:15px;color:var(--text);line-height:38px}
.drive-nums .tb{display:flex;align-items:center;gap:4px;color:var(--text-2);font-size:13px}
.drive-nums input{width:100%;min-width:0;min-height:38px;padding:6px 8px;border-radius:8px;border:1px solid var(--line-strong);background:var(--bg);color:var(--text);font:inherit;font-size:15px}
.col-list{list-style:none;margin:0 0 6px;padding:0;display:flex;flex-direction:column;gap:8px}
.col-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;padding:10px;border-radius:12px;background:var(--bg);border:1px solid var(--line)}
.col-row .col-label{flex:1 1 160px;min-width:0;min-height:42px;padding:8px 12px;border-radius:10px;border:1px solid var(--line-strong);background:var(--card);color:var(--text);font:inherit;font-size:16px}
.col-kind{font-size:12px;color:var(--muted)}
.col-tools{display:flex;align-items:center;gap:6px;margin-left:auto}
@media (max-width:400px){ .tab span{font-size:10px} }
/* six tabs on the smallest phones: equal columns that can shrink, labels never cut */
.tabbar{grid-auto-columns:minmax(0,1fr)}
.tab{min-width:0}
.tab span{max-width:100%;white-space:nowrap}
@media (max-width:400px){ .tabbar{padding-left:2px;padding-right:2px} .tab span{font-size:10px;letter-spacing:-.01em} .tab svg{width:22px;height:22px} }
@media (max-width:400px){ .tabbar .tab{padding-left:0;padding-right:0} }

/* ---------- v0.7: brand guidelines ---------- */
.brand-link{display:flex;align-items:center;gap:14px;padding:20px 22px;border-radius:16px;background:var(--orange);color:var(--on-orange);text-decoration:none}
.brand-link .row-title{color:var(--on-orange);font-size:18px}
.brand-link .row-sub{color:var(--on-orange);opacity:.85}
.brand-link .arrow{margin-left:auto;font-size:24px;font-weight:700}
.brand-link:hover{filter:brightness(1.06)}
.brand-file .file-kind{flex:none;display:grid;place-items:center;width:46px;height:46px;border-radius:10px;background:var(--bg);border:1px solid var(--line-strong);color:var(--text-2);font-size:11px;font-weight:800;letter-spacing:.02em}
.brand-file .row-side{display:flex;align-items:center;gap:12px}
.drop-zone{display:flex;flex-direction:column;align-items:center;gap:8px;margin-top:14px;padding:26px 18px;border:2px dashed var(--line-strong);border-radius:16px;text-align:center}
.drop-zone .lede{margin:0}
.drop-zone .hint{margin:0 0 6px}
.drop-zone.over{border-color:var(--orange);background:rgba(255,78,21,.06)}
.brand-form{margin-bottom:14px}

/* ---------- v0.7: chat, Slack-style ---------- */
.cx{position:relative;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:18px;background:var(--card);overflow:hidden}
.cx-head{display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid var(--line)}
.cx-search{flex:1}
.cx-feed{display:flex;flex-direction:column;max-height:min(64vh,720px);min-height:260px;overflow-y:auto;overscroll-behavior:contain;padding:16px 0 14px;scroll-behavior:smooth}
.cx-feed.thread{max-height:none;min-height:0;padding:16px 0 10px;overflow:visible}
.cx-empty{margin:auto;padding:30px 20px;text-align:center}
.cx-day{display:flex;align-items:center;gap:10px;margin:14px 20px 6px;color:var(--muted);font-size:12px;font-weight:700}
.cx-day::before,.cx-day::after{content:"";flex:1;height:1px;background:var(--line)}
.cx-new{display:flex;align-items:center;gap:10px;margin:12px 20px 4px;color:var(--orange);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.cx-new::after{content:"";flex:1;height:1px;background:var(--orange)}
.cx-msg{position:relative;display:grid;grid-template-columns:40px minmax(0,1fr);column-gap:12px;padding:6px 20px 6px 16px;margin-top:6px}
.cx-msg.cont{margin-top:0;padding-top:1px;padding-bottom:3px}
.cx-msg:hover,.cx-msg:focus-within,.cx-msg.active{background:rgba(255,255,255,.035)}
.cx-msg.flash{animation:cxflash 1.8s ease}
@keyframes cxflash{0%,45%{background:rgba(255,78,21,.2)}100%{background:transparent}}
.cx-gutter{display:flex;justify-content:center;padding-top:3px}
.cx-av{display:inline-grid;place-items:center;flex:none;width:36px;height:36px;border-radius:10px;font-size:13px;font-weight:800;color:#16130f;letter-spacing:.02em}
.cx-av.sm{width:22px;height:22px;border-radius:6px;font-size:9px}
.cx-av.t0{background:#ff9466}.cx-av.t1{background:#7fcca5}.cx-av.t2{background:#93b4ff}.cx-av.t3{background:#ebbf62}.cx-av.t4{background:#c9a2f5}.cx-av.t5{background:#f398b8}
.cx-hover-time{visibility:hidden;font-size:11px;color:var(--muted);padding-top:3px;white-space:nowrap}
.cx-msg.cont:hover .cx-hover-time,.cx-msg.cont.active .cx-hover-time{visibility:visible}
.cx-meta{margin:0 0 1px;display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 8px}
.cx-name{font-weight:800;color:var(--text);font-size:15px}
.cx-meta time{font-size:12px;color:var(--muted)}
.cx-tag{font-size:10px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--orange);border:1px solid var(--orange);border-radius:5px;padding:0 5px}
.cx-text{color:var(--text);font-size:15px;line-height:1.5;overflow-wrap:anywhere}
.cx-text a{color:var(--orange);text-decoration:underline;text-underline-offset:2px}
.cx-text ul,.cx-text ol{margin:4px 0;padding-left:22px}
.cx-text strong{font-weight:800}
.cx-code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;padding:1px 5px;border-radius:5px;background:var(--bg);border:1px solid var(--line);color:#f5b047}
.cx-pre{margin:6px 0;padding:10px 12px;border-radius:9px;background:var(--bg);border:1px solid var(--line);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}
.cx-edited{font-size:12px;color:var(--muted)}
.cx-files{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
.cx-img{padding:0;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--bg);cursor:pointer;max-width:min(360px,100%)}
.cx-img img{display:block;max-width:100%;max-height:260px;min-width:90px;min-height:60px;object-fit:cover}
.cx-file{display:flex;align-items:center;gap:10px;max-width:100%;min-height:54px;padding:8px 16px 8px 8px;border-radius:12px;border:1px solid var(--line-strong);background:var(--bg);color:var(--text);font:inherit;cursor:pointer;text-align:left}
.cx-file:hover{border-color:var(--text-2)}
.cx-file-ico{display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:9px;background:var(--orange);color:var(--on-orange);font-size:10px;font-weight:800}
.cx-file-meta{display:flex;flex-direction:column;min-width:0}
.cx-file-name{font-weight:700;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:240px}
.cx-file-size{font-size:12px;color:var(--muted)}
.cx-preview{display:flex;gap:14px;margin-top:8px;max-width:540px;padding:10px 12px;border-left:3px solid var(--orange);border-radius:4px 10px 10px 4px;background:var(--bg);color:var(--text);text-decoration:none}
.cx-preview:hover{background:var(--raised)}
.cx-preview-text{display:flex;flex-direction:column;gap:3px;min-width:0}
.cx-preview-site{font-size:12px;color:var(--muted);font-weight:700}
.cx-preview-title{font-weight:800;font-size:14px}
.cx-preview-desc{font-size:13px;color:var(--text-2);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.cx-preview-img{width:128px;height:72px;object-fit:cover;border-radius:7px;flex:none;align-self:center}
.cx-reactions{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.cx-react{display:inline-flex;align-items:center;gap:5px;min-height:28px;padding:2px 9px;border-radius:999px;border:1px solid var(--line-strong);background:var(--bg);color:var(--text-2);font:inherit;font-size:13px;font-weight:700;cursor:pointer}
.cx-react:hover{border-color:var(--text-2)}
.cx-react .e{font-size:15px;line-height:1}
.cx-react.mine{border-color:var(--orange);background:rgba(255,78,21,.14);color:var(--text)}
.cx-react.add{opacity:0}
.cx-msg:hover .cx-react.add,.cx-msg.active .cx-react.add,.cx-react.add:focus-visible{opacity:1}
.cx-react svg,.cx-tool svg,.cx-fmt svg,.cx-send svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.cx-replies{display:inline-flex;align-items:center;gap:8px;margin-top:6px;padding:4px 10px 4px 4px;border-radius:9px;border:1px solid transparent;background:none;color:var(--text);font:inherit;font-size:13px;cursor:pointer}
.cx-replies:hover{border-color:var(--line-strong);background:var(--bg)}
.cx-reply-avatars{display:flex;gap:2px}
.cx-reply-count{font-weight:800;color:var(--orange)}
.cx-reply-last{color:var(--muted)}
.cx-tools{position:absolute;top:-14px;right:16px;display:none;align-items:center;gap:1px;padding:3px;border-radius:11px;border:1px solid var(--line-strong);background:var(--raised);box-shadow:0 8px 22px rgba(0,0,0,.4);z-index:3}
.cx-msg:hover .cx-tools,.cx-msg:focus-within .cx-tools,.cx-msg.active .cx-tools{display:flex}
.cx-tool{display:grid;place-items:center;min-width:32px;height:32px;padding:0 6px;border:0;border-radius:8px;background:none;color:var(--text-2);font:inherit;font-size:16px;cursor:pointer;white-space:nowrap}
.cx-tool:hover{background:var(--card);color:var(--text)}
.cx-tool.danger:hover{color:#e5484d}
.cx-jump{position:absolute;left:50%;transform:translateX(-50%);bottom:150px;z-index:4;padding:9px 16px;border-radius:999px;border:0;background:var(--orange);color:var(--on-orange);font:inherit;font-size:13px;font-weight:800;box-shadow:0 8px 22px rgba(0,0,0,.4);cursor:pointer}
.cx-compose{padding:10px 14px 14px;border-top:1px solid var(--line)}
.cx-box{border:1px solid var(--line-strong);border-radius:14px;background:var(--bg);transition:border-color .15s}
.cx-box:focus-within{border-color:var(--text-2)}
.cx-input{display:block;width:100%;min-height:46px;max-height:220px;padding:12px 14px 6px;border:0;background:transparent;color:var(--text);font:inherit;font-size:16px;line-height:1.45;resize:none;outline:none}
.cx-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:2px 6px 6px}
.cx-format,.cx-actions{display:flex;align-items:center;gap:1px}
.cx-fmt{display:grid;place-items:center;width:34px;height:34px;border:0;border-radius:8px;background:none;color:var(--muted);font:inherit;font-size:14px;cursor:pointer}
.cx-fmt:hover{background:var(--card);color:var(--text)}
.cx-fmt .mono{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;font-weight:700}
.cx-send{display:grid;place-items:center;width:42px;height:36px;margin-left:4px;border:0;border-radius:10px;background:var(--orange);color:var(--on-orange);cursor:pointer}
.cx-send:disabled{opacity:.5}
.cx .picked{display:flex;flex-wrap:wrap;gap:8px;padding:10px 10px 0}
.picked-item{display:inline-flex;align-items:center;gap:8px;max-width:100%;padding:6px 6px 6px 6px;border-radius:10px;border:1px solid var(--line-strong);background:var(--card)}
.picked-item img{width:40px;height:40px;object-fit:cover;border-radius:7px}
.picked-item .cx-file-ico{width:40px;height:40px}
.cx-drop-hint{display:none;position:absolute;inset:0;z-index:5;place-items:center;border:2px dashed var(--orange);border-radius:18px;background:rgba(20,18,16,.88);color:var(--text);font-weight:800;font-size:18px}
.cx.dropping .cx-drop-hint{display:grid}
.cx-edit .cx-input{border:1px solid var(--line-strong);border-radius:10px;background:var(--bg);padding:10px 12px}
.cx-edit-actions{display:flex;align-items:center;gap:8px;justify-content:flex-end;flex-wrap:wrap;margin-top:6px}
.cx-edit-actions .hint{margin-right:auto}
.cx-search-count{margin:4px 20px 8px;color:var(--muted);font-size:13px}
.cx-hit{display:flex;align-items:flex-start;gap:10px;width:100%;padding:10px 20px;border:0;background:none;color:var(--text);font:inherit;text-align:left;cursor:pointer}
.cx-hit:hover{background:rgba(255,255,255,.04)}
.cx-hit-main{display:flex;flex-direction:column;gap:2px;min-width:0}
.cx-hit-meta{font-size:12px;color:var(--muted)}
.cx-hit-meta b{color:var(--text)}
.cx-hit-text{font-size:14px;overflow-wrap:anywhere}
.cx-hit mark{background:rgba(255,78,21,.4);color:var(--text);border-radius:3px;padding:0 2px}
.cx-thread-count{margin:10px 16px 2px;color:var(--muted);font-size:12px;font-weight:700}
.cx-in-thread{border:0;border-radius:0;background:none;overflow:visible}
.cx-in-thread .cx-compose{padding:12px 0 0}
.cx-picker{position:fixed;left:8px;right:8px;bottom:8px;z-index:60;display:flex;flex-direction:column;max-height:360px;border-radius:16px;border:1px solid var(--line-strong);background:var(--raised);box-shadow:0 18px 44px rgba(0,0,0,.55)}
@media (min-width:641px){ .cx-picker{right:auto;bottom:auto;width:336px;height:360px} }
.cx-picker-head{display:flex;align-items:center;gap:8px;padding:10px;border-bottom:1px solid var(--line)}
.cx-picker-head input{flex:1;min-width:0;min-height:38px;padding:6px 10px;border-radius:9px;border:1px solid var(--line-strong);background:var(--bg);color:var(--text);font:inherit;font-size:15px}
.cx-picker-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(40px,1fr));gap:2px;padding:8px;overflow-y:auto}
.cx-pick{height:40px;border:0;border-radius:9px;background:none;font-size:22px;cursor:pointer}
.cx-pick:hover,.cx-pick:focus-visible{background:var(--card)}
.cx-inbox-row .cx-av{margin-right:2px}
@media (max-width:640px){
  .cx-msg{grid-template-columns:34px minmax(0,1fr);column-gap:10px;padding-left:10px;padding-right:12px}
  .cx-av{width:32px;height:32px;border-radius:9px}
  .cx-tools{right:8px}
  .cx-format .cx-fmt:nth-child(n+4){display:none}
  .cx-head{padding:10px}
}
.cx-replies{flex-wrap:wrap;row-gap:2px;text-align:left}
.cx-reply-count{white-space:nowrap}

/* ---------- v0.8: group colours and faint dividers ---------- */
.board-group{--g:#9aa0a6;--gf:rgba(154,160,166,.2)}
.board-group[data-group="pre"]{--g:#579bfc;--gf:rgba(87,155,252,.22)}
.board-group[data-group="filming"]{--g:#a25ddc;--gf:rgba(162,93,220,.22)}
.board-group[data-group="post"]{--g:#fdab3d;--gf:rgba(253,171,61,.22)}
.board-group[data-group="invoicing"]{--g:#e2445c;--gf:rgba(226,68,92,.22)}
.board-group[data-group="completed"]{--g:#00c875;--gf:rgba(0,200,117,.22)}
.board-group .group-head span:first-of-type{color:var(--g)}
.board-group .group-head .chev{color:var(--g)}
.board-group .table-wrap{border-left:4px solid var(--g)}
.board-group .board td{border-top-color:var(--gf)}
.loc-table td{border-bottom-color:rgba(255,78,21,.16)}

/* ---------- v0.8: empty cells you can fill in place ---------- */
.cell-input.empty{border:1px dashed var(--line-strong);background:transparent}
.cell-input.empty:hover,.cell-input.empty:focus{border-style:solid;border-color:var(--text-2);background:var(--bg)}
.cell-input.empty::-webkit-datetime-edit{color:var(--muted-2)}
.cell-input.link{width:112px}
.date-pair{display:inline-flex;gap:4px}
.date-pair .cell-input{width:122px}
.cell-text{padding:4px 6px;border:0;border-radius:6px;background:none;color:var(--text-2);font:inherit;font-size:13px;cursor:pointer;white-space:nowrap}
.cell-text:hover,.cell-text:focus{background:var(--bg);color:var(--text)}
.cell-add{-webkit-appearance:none;appearance:none;width:26px;height:26px;padding:0;margin-left:2px;border-radius:50%;border:1px dashed var(--line-strong);background:transparent;color:var(--muted);font:inherit;font-weight:800;text-align:center;text-align-last:center;cursor:pointer;vertical-align:middle}
.cell-add:hover,.cell-add:focus{border-color:var(--text-2);color:var(--text)}
.loc-table .cell-input{width:100%;min-width:92px}
.loc-table .cell-input.num{width:86px;min-width:0;text-align:right}
.loc-table .drive-select{max-width:180px}
.cell-name{padding:0;border:0;background:none;color:var(--text);font:inherit;font-weight:700;text-align:left;cursor:pointer}
.cell-name:hover,.cell-name:focus{text-decoration:underline;text-underline-offset:3px}
.cell-check{display:inline-flex;align-items:center;gap:6px;color:var(--text-2);font-size:13px;cursor:pointer}
.cell-check input{width:18px;height:18px;accent-color:var(--orange)}
.drive-warn{margin:0;font-size:12px;font-weight:700;color:#f5a524}

/* ---------- v0.8: the client page ---------- */
.ctabs{display:flex;gap:2px;overflow-x:auto;margin-bottom:16px;border-bottom:1px solid var(--line);scrollbar-width:none}
.ctabs::-webkit-scrollbar{display:none}
.ctab{flex:none;padding:10px 14px;border:0;border-bottom:2px solid transparent;background:none;color:var(--muted);font:inherit;font-size:14px;font-weight:700;white-space:nowrap;cursor:pointer}
.ctab:hover{color:var(--text)}
.ctab[aria-selected="true"]{color:var(--text);border-bottom-color:var(--orange)}
.ctab .count{font-size:12px;color:var(--orange)}
.feedback-line{display:block;margin-top:4px;font-size:13px;font-style:italic;color:#f5a524;overflow-wrap:anywhere}
.h3{margin:16px 0 8px;font-size:15px;font-weight:800;color:var(--text-2)}
.portal-link .link-box{display:flex;gap:8px;margin:10px 0}
.portal-link .link-url{flex:1;min-width:0;padding:8px 10px;border-radius:9px;border:1px solid var(--line-strong);background:var(--bg);color:var(--text-2);font:inherit;font-size:13px}
.link-veil{position:fixed;inset:0;z-index:100;display:grid;place-items:center;background:var(--bg)}
.link-veil-box{display:flex;flex-direction:column;align-items:center;gap:16px;padding:24px;text-align:center}
.link-veil-box svg.logo{width:190px;height:auto}
.review-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}

/* ---------- v0.8: Studio Plus ---------- */
.studio-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(440px,100%),1fr));gap:16px}
.studio-card{display:flex;flex-direction:column;gap:10px;padding:16px 18px}
.studio-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 10px}
.studio-head .cell-btn{font-size:17px}
.studio-pill{margin-left:auto}
.studio-table td{white-space:nowrap;vertical-align:middle}
.studio-table td:first-child{white-space:normal}

/* ---------- v0.8: a More menu on phones ---------- */
#nav .tab-more{display:none}
@media (max-width:899px){ #nav .tab.extra{display:none} #nav .tab-more{display:flex} }
.more-row{gap:12px}
.more-ico svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.studio-grid > *{min-width:0}
.studio-card .table-wrap{max-width:100%}
.studio-table{min-width:0;width:100%}
@media (max-width:640px){ .studio-table th:last-child,.studio-table td:last-child{display:none} .studio-table td,.studio-table th{padding-left:6px;padding-right:6px} }
.studio-grid{grid-template-columns:repeat(auto-fill,minmax(min(560px,100%),1fr))}
.studio-table .strip{flex-wrap:nowrap;min-width:max-content}
.studio-table td:last-child{width:1%}
.portal-link .link-box{flex-direction:column}
.portal-link .link-box .btn{align-self:flex-start}

/* ---------- v0.9: the Hub boards ---------- */
.hub-tabs{align-self:flex-start}
.hub .board-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.hub .board-tools .search{flex:1;min-width:min(220px,100%)}
.hub .board-tools .search input{width:100%;padding:11px 14px;border-radius:12px;border:1px solid var(--line-strong);background:var(--card);color:var(--text);font:inherit}
.hub-group-head{display:flex;align-items:center;gap:4px}
.group-sum{margin-left:8px;color:var(--text-2);font-size:14px;font-weight:700}
.icon-btn{display:inline-grid;place-items:center;width:30px;height:30px;padding:0;border:0;border-radius:8px;background:none;color:var(--muted);font:inherit;font-weight:800;cursor:pointer}
.icon-btn svg{width:18px;height:18px;fill:currentColor}
.icon-btn:hover,.icon-btn:focus{background:var(--bg);color:var(--text)}
.icon-btn[disabled]{opacity:.3;cursor:default}
.hub-table td{white-space:nowrap;vertical-align:middle}
.hub-table td.k-name{min-width:230px;white-space:normal}
.th-btn{padding:0;border:0;background:none;color:inherit;font:inherit;font-weight:700;text-align:left;white-space:nowrap;cursor:pointer}
.th-btn:hover,.th-btn:focus{color:var(--text);text-decoration:underline;text-underline-offset:3px}
.hub-name{display:inline-flex;align-items:center;gap:8px}
.cmt-count{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:var(--line);color:var(--text-2);font-size:11px;font-weight:800}
.money-cell{display:inline-flex;align-items:center;gap:3px;color:var(--muted)}
.money-cell .cell-input{width:86px;text-align:right}
.money-cell.empty .cell-input{border:1px dashed var(--line-strong);background:transparent}
.label-select{-webkit-appearance:none;appearance:none;min-width:132px;padding:7px 12px;border:0;border-radius:6px;background:var(--lc);color:var(--li,#fff);font:inherit;font-size:13px;font-weight:700;text-align:center;text-align-last:center;cursor:pointer}
.label-select.empty{border:1px dashed var(--line-strong);background:transparent;color:var(--muted)}
.label-select option{background:var(--card);color:var(--text)}
.person-cell{display:inline-flex;align-items:center;gap:6px}
.person-cell .cell-select{min-width:112px}
.link-cell{display:inline-flex;align-items:center;gap:4px;max-width:230px}
.cell-link{overflow:hidden;color:#6aa8ff;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}
.cell-link:hover{text-decoration:underline}
.cell-edit{padding:2px 5px;border:0;border-radius:5px;background:none;color:var(--muted);cursor:pointer}
.cell-edit:hover,.cell-edit:focus{background:var(--bg);color:var(--text)}
.files-btn{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border:1px solid var(--line-strong);border-radius:8px;background:transparent;color:var(--text-2);font:inherit;font-size:13px;font-weight:700;cursor:pointer}
.files-btn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.files-btn.empty{border-style:dashed;color:var(--muted)}
.files-btn.drag,.drop-zone.drag{border-color:var(--orange);background:rgba(255,78,21,.08)}
.cell-text.long{max-width:240px;overflow:hidden;text-overflow:ellipsis;text-align:left}
.cell-text.empty{padding:4px 12px;border:1px dashed var(--line-strong);color:var(--muted)}
.add-row td{padding:6px 10px}
.add-input{width:100%;max-width:380px;padding:8px 10px;border:1px dashed transparent;border-radius:8px;background:transparent;color:var(--text-2);font:inherit}
.add-input:hover,.add-input:focus{border-color:var(--line-strong);background:var(--bg);color:var(--text)}
.sum-row td{border-top:1px solid var(--line);color:var(--text-2);font-size:13px}
.drop-zone{display:block;margin-top:10px;padding:16px;border:1px dashed var(--line-strong);border-radius:12px;color:var(--muted);text-align:center;cursor:pointer}
.drop-zone u{color:var(--text-2)}
.cmt .cmt-body{font-weight:500;white-space:pre-wrap;overflow-wrap:anywhere}
.form .grid-2,.grid-2{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr));gap:0 14px}
.label-edit{display:flex;flex-direction:column;gap:8px}
.label-row{display:grid;grid-template-columns:22px minmax(0,1fr) 130px auto;align-items:center;gap:8px}
.label-row .swatch{width:20px;height:20px;border-radius:5px}
.label-row input[type="text"],.label-row select{min-width:0;padding:8px 10px;border:1px solid var(--line-strong);border-radius:8px;background:var(--bg);color:var(--text);font:inherit}
.chk{display:inline-flex;align-items:center;gap:6px;color:var(--text-2);font-size:13px}
@media (max-width:520px){ .label-row{grid-template-columns:22px minmax(0,1fr)} .label-row select,.label-row .chk{grid-column:2} }

/* ---------- v0.9: Holidays ---------- */
.hol-top{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr));gap:16px}
.hol-big{display:flex;align-items:baseline;gap:8px;margin:6px 0 10px}
.hol-big b{color:var(--text);font-size:44px;font-weight:900;line-height:1}
.hol-big span{color:var(--muted);font-weight:700}
.hol-nums{display:flex;flex-wrap:wrap;gap:6px 16px;color:var(--text-2);font-size:14px}
.hol-nums b{color:var(--text)}
.hol-nums .pend b{color:#fdab3d}
.row-btn{display:flex;flex:1;flex-direction:column;gap:2px;min-width:0;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}
.row-btn:hover .row-title,.row-btn:focus .row-title{text-decoration:underline;text-underline-offset:3px}
.kdot{display:inline-block;width:9px;height:9px;margin-right:6px;border-radius:50%}
.lpill{display:inline-block;padding:3px 10px;border-radius:999px;background:var(--line);color:var(--text-2);font-size:12px;font-weight:800;white-space:nowrap}
.lpill.approved{background:rgba(0,200,117,.18);color:#33d68f}
.lpill.pending{background:rgba(253,171,61,.18);color:#fdab3d}
.lpill.declined{background:rgba(226,68,92,.18);color:#ff6b81}
.lpill.cancelled{opacity:.7}
.wall .table-wrap{background:var(--card)}
.wallchart{min-width:100%;border-collapse:separate;border-spacing:0;font-size:12px}
.wallchart th,.wallchart td{padding:0;border-bottom:1px solid var(--line);text-align:center}
.wallchart thead th{min-width:30px;padding:7px 0;color:var(--muted);font-weight:700}
.wallchart thead th span{display:block;font-size:10px;opacity:.75}
.wallchart thead .bh{color:#fdab3d}
.wallchart thead .today{color:var(--orange)}
.wallchart .who{position:sticky;left:0;z-index:1;min-width:112px;padding:6px 12px 6px 12px;background:var(--card);text-align:left;white-space:nowrap}
.wallchart tbody .who{color:var(--text);font-weight:700}
.wallchart .who .ini{margin-right:6px;vertical-align:middle}
.wallchart td{height:38px}
.wallchart td.we,.wallchart td.bh{background:rgba(255,255,255,.04)}
.wallchart td.today{box-shadow:inset 1px 0 0 rgba(255,78,21,.5),inset -1px 0 0 rgba(255,78,21,.5)}
.lv{display:block;width:calc(100% - 4px);height:24px;margin:0 2px;padding:0;border:0;border-radius:6px;background:var(--lk);cursor:pointer}
.lv.pend{background:repeating-linear-gradient(135deg,var(--lk) 0 5px,transparent 5px 9px);box-shadow:inset 0 0 0 1px var(--lk)}
.lv.half-am{background:linear-gradient(90deg,var(--lk) 50%,transparent 50%);box-shadow:inset 0 0 0 1px var(--lk)}
.lv.half-pm{background:linear-gradient(90deg,transparent 50%,var(--lk) 50%);box-shadow:inset 0 0 0 1px var(--lk)}
.lv:focus-visible{outline:2px solid var(--text);outline-offset:1px}
.wall-key{display:flex;flex-wrap:wrap;gap:6px 16px;margin-top:10px;color:var(--text-2);font-size:13px}
.wall-key i{display:inline-block;width:12px;height:12px;margin-right:6px;border-radius:3px;vertical-align:-1px}
.wall-key .pend-key{background:repeating-linear-gradient(135deg,#00c875 0 3px,transparent 3px 6px);box-shadow:inset 0 0 0 1px #00c875}
.wall-key .bh-key{background:rgba(255,255,255,.14)}
.allow-table td{white-space:nowrap}
.allow-table .cell-input.num{width:80px}
.leave-count{min-height:1.4em;margin:0;color:var(--text-2);font-weight:600}
.leave-facts p{margin:0 0 8px}

/* ---------- v0.9: colours as classes (the security policy blocks inline styles) ---------- */
.pal-0{--g:#579bfc;--gf:rgba(87,155,252,.22);--lc:#579bfc;--li:#ffffff}
.pal-1{--g:#a25ddc;--gf:rgba(162,93,220,.22);--lc:#a25ddc;--li:#ffffff}
.pal-2{--g:#00c875;--gf:rgba(0,200,117,.22);--lc:#00c875;--li:#ffffff}
.pal-3{--g:#fdab3d;--gf:rgba(253,171,61,.22);--lc:#fdab3d;--li:#1d1d1f}
.pal-4{--g:#e2445c;--gf:rgba(226,68,92,.22);--lc:#e2445c;--li:#ffffff}
.pal-5{--g:#ff7a45;--gf:rgba(255,122,69,.22);--lc:#ff7a45;--li:#ffffff}
.pal-6{--g:#66ccff;--gf:rgba(102,204,255,.22);--lc:#66ccff;--li:#1d1d1f}
.pal-7{--g:#f2a7d6;--gf:rgba(242,167,214,.22);--lc:#f2a7d6;--li:#1d1d1f}
.pal-8{--g:#7f8592;--gf:rgba(127,133,146,.22);--lc:#7f8592;--li:#ffffff}
.pal-9{--g:#c4c4c4;--gf:rgba(196,196,196,.22);--lc:#c4c4c4;--li:#1d1d1f}
.pal-10{--g:#00a9a0;--gf:rgba(0,169,160,.22);--lc:#00a9a0;--li:#ffffff}
.pal-11{--g:#ffcb00;--gf:rgba(255,203,0,.22);--lc:#ffcb00;--li:#1d1d1f}
.pal-12{--g:#f0855c;--gf:rgba(240,133,92,.22);--lc:#f0855c;--li:#ffffff}
.pal-13{--g:#df6f79;--gf:rgba(223,111,121,.22);--lc:#df6f79;--li:#ffffff}
.pal-x{--g:#9aa0a6;--gf:rgba(154,160,166,.2);--lc:#9aa0a6;--li:#1d1d1f}
.label-select.empty{--lc:transparent}
.label-row .swatch{background:var(--lc,#9aa0a6)}
.k-holiday{--lk:#00c875}.k-birthday{--lk:#ff5ac4}.k-sick{--lk:#e2445c}.k-unpaid{--lk:#9aa0a6}.k-other{--lk:#579bfc}
.kdot{background:var(--lk,#9aa0a6)}
.wall-key i{background:var(--lk,#9aa0a6)}
.wall-key i.pend-key{background:repeating-linear-gradient(135deg,#00c875 0 3px,transparent 3px 6px)}
.wall-key i.bh-key{background:rgba(255,255,255,.14)}

/* Hub groups keep their own colour, whatever they're called; columns fit their contents */
.hub-group.pal-0{--g:#579bfc;--gf:rgba(87,155,252,.22)}
.hub-group.pal-1{--g:#a25ddc;--gf:rgba(162,93,220,.22)}
.hub-group.pal-2{--g:#00c875;--gf:rgba(0,200,117,.22)}
.hub-group.pal-3{--g:#fdab3d;--gf:rgba(253,171,61,.22)}
.hub-group.pal-4{--g:#e2445c;--gf:rgba(226,68,92,.22)}
.hub-group.pal-5{--g:#ff7a45;--gf:rgba(255,122,69,.22)}
.hub-group.pal-6{--g:#66ccff;--gf:rgba(102,204,255,.22)}
.hub-group.pal-7{--g:#f2a7d6;--gf:rgba(242,167,214,.22)}
.hub-group.pal-8{--g:#7f8592;--gf:rgba(127,133,146,.22)}
.hub-group.pal-9{--g:#c4c4c4;--gf:rgba(196,196,196,.22)}
.hub-group.pal-10{--g:#00a9a0;--gf:rgba(0,169,160,.22)}
.hub-group.pal-11{--g:#ffcb00;--gf:rgba(255,203,0,.22)}
.hub-group.pal-12{--g:#f0855c;--gf:rgba(240,133,92,.22)}
.hub-group.pal-13{--g:#df6f79;--gf:rgba(223,111,121,.22)}
.hub-group.pal-x{--g:#9aa0a6;--gf:rgba(154,160,166,.2)}
.hub-table{table-layout:auto;width:max-content;min-width:100%}
.hub-table th,.hub-table td{width:auto}
.hub-table.board{table-layout:auto !important;width:max-content !important;min-width:100%}
.hub-table.board th,.hub-table.board td{width:auto !important;min-width:0;max-width:none}
.hub-table.board td{padding-left:8px;padding-right:8px}

/* ---------- v1.0: three more colours ---------- */
.pal-14{--g:#c74ae0;--gf:rgba(199,74,224,.22);--lc:#c74ae0;--li:#ffffff}.hub-group.pal-14{--g:#c74ae0;--gf:rgba(199,74,224,.22)}
.pal-15{--g:#141414;--gf:rgba(20,20,20,.22);--lc:#141414;--li:#ffffff}.hub-group.pal-15{--g:#141414;--gf:rgba(20,20,20,.22)}
.pal-16{--g:#e8590c;--gf:rgba(232,89,12,.22);--lc:#e8590c;--li:#ffffff}.hub-group.pal-16{--g:#e8590c;--gf:rgba(232,89,12,.22)}

/* ---------- v1.0: calendars (planner and Schedule) ---------- */
.cal{overflow:hidden;border:1px solid var(--line);border-radius:16px;background:var(--card)}
.cal-head{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border-bottom:1px solid var(--line)}
.cal-head span{padding:8px 10px;color:var(--muted);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.cal-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
.cal-day{display:flex;flex-direction:column;gap:3px;min-width:0;min-height:112px;padding:6px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);cursor:default}
.cal-day:nth-child(7n){border-right:0}
.cal-day.out{background:rgba(255,255,255,.02)}
.cal-day.out .cal-date span{opacity:.45}
.cal-day.today .cal-date span{display:inline-grid;place-items:center;min-width:24px;height:24px;border-radius:12px;background:var(--orange);color:#fff}
.cal-day.drag{background:rgba(255,78,21,.1);box-shadow:inset 0 0 0 2px var(--orange)}
.cal-date{display:flex;align-items:center;gap:6px;min-height:24px;color:var(--text-2);font-size:13px;font-weight:800}
.cal-date small{overflow:hidden;color:#fdab3d;font-size:10px;font-weight:700;text-overflow:ellipsis;white-space:nowrap}
.cal-add{margin-left:auto;width:22px;height:22px;padding:0;border:0;border-radius:6px;background:none;color:var(--muted);font:inherit;font-weight:800;cursor:pointer;opacity:0}
.cal-day:hover .cal-add,.cal-add:focus,.week-col .cal-add{opacity:1}
.cal-add:hover{background:var(--bg);color:var(--text)}
.post-chip,.ev{display:flex;align-items:center;gap:5px;width:100%;min-width:0;padding:3px 6px;border:0;border-radius:6px;font:inherit;font-size:12px;text-align:left;cursor:pointer}
.post-chip{background:rgba(232,89,12,.16);color:var(--text)}
.post-chip.st-idea{background:transparent;box-shadow:inset 0 0 0 1px var(--line-strong)}
.post-chip.st-posted{opacity:.6}
.post-chip .pc,.ev{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.post-chip .pc{flex:1;min-width:0}
.post-chip .pn{flex:none;padding:0 5px;border-radius:8px;background:var(--line);color:var(--text-2);font-size:10px;font-weight:800}
.pf{display:inline-flex;flex:none;gap:2px}
.pf i{display:inline-grid;place-items:center;min-width:17px;height:15px;padding:0 2px;border-radius:4px;color:#fff;font-size:9px;font-style:normal;font-weight:900}
.pf .pf-linkedin{background:#0a66c2}
.pf .pf-instagram{background:linear-gradient(45deg,#f58529,#dd2a7b,#8134af)}
.ev{display:block;background:var(--lc);color:var(--li,#fff);font-weight:600}
.ev.pend{background:repeating-linear-gradient(135deg,var(--lc) 0 5px,transparent 5px 9px);box-shadow:inset 0 0 0 1px var(--lc);color:var(--text)}
.ev.pal-15,.type-chip.pal-15 i,.type-dot.pal-15{box-shadow:inset 0 0 0 1px rgba(255,255,255,.4)}
.ev-more{padding:2px 6px;border:0;background:none;color:var(--text-2);font:inherit;font-size:12px;font-weight:700;text-align:left;cursor:pointer}
.dots{display:none}
.type-dot{display:inline-block;flex:none;width:10px;height:10px;border-radius:50%;background:var(--lc,#9aa0a6)}
.type-dot.pend{background:transparent;box-shadow:inset 0 0 0 2px var(--lc)}

/* ---------- v1.0: the Social Media Planner ---------- */
.planner{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px;align-items:start}
.planner-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.planner-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:12px}
.planner-tools .btn.primary{margin-left:auto}
.planner-side{display:flex;flex-direction:column;gap:16px;position:sticky;top:12px}
.ideas,.lib{padding:14px;border:1px solid var(--line);border-radius:16px;background:var(--card)}
.ideas-list{display:flex;flex-direction:column;gap:4px}
.seg.small button{padding:6px 10px;font-size:12px}
.lib .drop-zone{margin:10px 0}
.lib-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.lib-tile{position:relative;display:flex;flex-direction:column;gap:3px;min-width:0;padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--bg);cursor:grab}
.lib-tile:active{cursor:grabbing}
.lib-ico{display:inline-grid;place-items:center;width:40px;height:30px;border-radius:7px;background:var(--line);color:var(--text);font-size:10px;font-weight:900}
.lib-ico.k-image{background:rgba(87,155,252,.25)}
.lib-ico.k-pdf{background:rgba(226,68,92,.25)}
.lib-ico.k-video{background:rgba(162,93,220,.25)}
.lib-name{overflow:hidden;font-size:12px;font-weight:700;text-overflow:ellipsis;white-space:nowrap}
.lib-meta{color:var(--muted);font-size:11px}
.lib-acts{position:absolute;top:6px;right:6px;display:flex;gap:2px}
.lib-acts .icon-btn{width:24px;height:24px}
.week-cols{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
.week-col{display:flex;flex-direction:column;gap:6px;min-width:0;min-height:220px;padding:8px;border:1px solid var(--line);border-radius:12px;background:var(--card)}
.week-col.today{box-shadow:inset 0 0 0 1px var(--orange)}
.week-col.drag{background:rgba(255,78,21,.1)}
.week-col-head{display:flex;align-items:center;gap:4px;color:var(--text-2);font-size:13px}
.week-col-head small{color:#fdab3d;font-size:10px}
.post-card{display:flex;flex-direction:column;gap:5px;width:100%;min-width:0;padding:9px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--text);font:inherit;text-align:left;cursor:pointer}
.post-card.st-idea{border-style:dashed}
.post-card-top{display:flex;align-items:center;justify-content:space-between;gap:6px}
.pstat{color:var(--muted);font-size:11px;font-weight:800}
.post-card-cap{display:-webkit-box;overflow:hidden;font-size:13px;-webkit-line-clamp:3;-webkit-box-orient:vertical}
.post-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(260px,100%),1fr));gap:10px}
.chk-chip{display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border:1px solid var(--line-strong);border-radius:999px;color:var(--text);font-size:14px;cursor:pointer}
.chk-chip input{width:16px;height:16px;accent-color:var(--orange)}
.cap-count{margin:-4px 0 0;color:var(--muted);font-size:12px}
.cap-count.hot{color:#ff6b81;font-weight:700}
fieldset.field{margin:0;padding:0;border:0}
fieldset.field legend{margin-bottom:6px;color:var(--text-2);font-size:14px;font-weight:700}

/* ---------- v1.0: the Schedule ---------- */
.sched-tools{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.sched-month{margin:0 0 0 4px}
.type-filters{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.type-chip{display:inline-flex;align-items:center;gap:7px;padding:6px 12px;border:1px solid var(--line-strong);border-radius:999px;background:transparent;color:var(--text);font:inherit;font-size:13px;font-weight:700;cursor:pointer}
.type-chip i{width:10px;height:10px;border-radius:50%;background:var(--lc)}
.type-chip[aria-pressed="false"]{color:var(--muted);text-decoration:line-through}
.type-chip[aria-pressed="false"] i{background:transparent;box-shadow:inset 0 0 0 2px var(--lc)}
.sched-body{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px;align-items:start}
.sched-cal .cal-day{cursor:pointer}
.sched-cal .cal-day:hover{background:rgba(255,255,255,.03)}
.sched-cal .cal-day.picked{box-shadow:inset 0 0 0 2px rgba(255,255,255,.35)}
.sched-side{display:flex;flex-direction:column;gap:10px;position:sticky;top:12px;padding:16px;border:1px solid var(--line);border-radius:16px;background:var(--card)}
.sched-side .row{gap:10px;align-items:center}
@media (max-width:1100px){ .planner,.sched-body{grid-template-columns:minmax(0,1fr)} .planner-side,.sched-side{position:static} .week-cols{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))} }
@media (max-width:700px){
  .cal-day{min-height:58px;padding:4px}
  .cal-head span{padding:6px 4px;font-size:10px}
  .cal-date small{display:none}
  .sched-cal .ev,.sched-cal .ev-more{display:none}
  .sched-cal .dots{display:flex;flex-wrap:wrap;gap:3px}
  .planner-cal .post-chip .pc,.planner-cal .post-chip .pn{display:none}
  .planner-cal .post-chip{padding:2px 3px}
  .cal-add{display:none}
  .lib-grid{grid-template-columns:1fr 1fr}
}

/* The planner gets the whole width of Snelsky Socials */
.cols.cols-wide{display:block}
.cols.cols-wide > .main-col{max-width:none;width:100%}
