/* =====================================================================
   Rashal Project Tracker — stylesheet
   =====================================================================
   Moved verbatim from the prototype (Final PM Rashal Site.html, the
   <style> block at lines 19–1480). Not reformatted and not reorganised,
   so the rebuilt screens render identically to the original.

   Three themes live on :root[data-theme] — light (default), dark
   ("Field") and sun ("Sunlight"). Two @media print blocks at the end
   drive the printable reports.
   ===================================================================== */

  :root{
    --bg:#EFEDE6; --surface:#FFFFFF; --surface-2:#FAF9F5;
    --ink:#22201C; --ink-soft:#6B675C; --ink-faint:#96917F;
    --green:#138563; --green-deep:#0E6B50; --green-bright:#1FCB8F; --green-soft:#DDF0E8;
    --completed:#0B6E52; --completed-soft:#D9EFE7;
    --ember:#FC490D; --ember-soft:#FDE2D6;
    --amber:#C98A00; --amber-soft:#FBEBC0;
    --verify:#8A5E86; --verify-soft:#F0E6EF;
    --red:#8C2A1B; --red-soft:#F3DAD3;
    --chart-completed:#2F8F6F; --chart-progress:var(--amber); --chart-blocked:#E2530F; --chart-neutral:#C9BFA0;
    --gray:#A9A594; --gray-soft:#E9E7E0;
    --border:#E2DED4; --border-strong:#C9C4B6;
    --glass:rgba(250,249,245,0.82); --glass-solid:rgba(255,255,255,0.94);
    --blueprint:rgba(19,133,99,0.05);
    --radius-sm:7px; --radius:11px; --radius-lg:16px; --radius-full:999px;
    --shadow-xs:0 1px 2px rgba(34,32,28,0.05);
    --shadow-sm:0 1px 2px rgba(34,32,28,0.05), 0 1px 3px rgba(34,32,28,0.04);
    --shadow-md:0 2px 4px rgba(34,32,28,0.04), 0 8px 20px rgba(34,32,28,0.08);
    --shadow-lg:0 4px 8px rgba(34,32,28,0.05), 0 24px 48px rgba(34,32,28,0.14);
    --ring:0 0 0 3px rgba(19,133,99,0.18);
    --ease:cubic-bezier(.22,.61,.36,1);
    --nav-w:236px;
    --font-display:'Oswald',sans-serif; --font-body:'Inter',sans-serif; --font-mono:'IBM Plex Mono',monospace;
  }
  /* ---- Field Mode (dark) ---- */
  :root[data-theme="dark"]{
    --bg:#111317; --surface:#1B1E24; --surface-2:#22262E;
    --ink:#ECEAE3; --ink-soft:#AEACA3; --ink-faint:#7C7A72;
    --green:#2BAE86; --green-deep:#1F9E78; --green-bright:#37D8A0; --green-soft:#173A31;
    --completed:#2BAE86; --completed-soft:#153229;
    --ember:#FF6A3D; --ember-soft:#3A2117;
    --amber:#E0A93B; --amber-soft:#3A2F13;
    --verify:#C79AC2; --verify-soft:#33283A;
    --red:#E06A57; --red-soft:#3A1F19;
    --gray:#6E6C64; --gray-soft:#2A2E36;
    --border:#2E333B; --border-strong:#3E444E;
    --glass:rgba(20,22,26,0.78); --glass-solid:rgba(24,27,32,0.94);
    --blueprint:rgba(43,174,134,0.07);
    --shadow-xs:0 1px 2px rgba(0,0,0,0.4);
    --shadow-sm:0 1px 3px rgba(0,0,0,0.45);
    --shadow-md:0 2px 4px rgba(0,0,0,0.4), 0 8px 22px rgba(0,0,0,0.5);
    --shadow-lg:0 4px 8px rgba(0,0,0,0.4), 0 24px 50px rgba(0,0,0,0.6);
    --ring:0 0 0 3px rgba(43,174,134,0.28);
  }
  /* ---- Sunlight Mode (max contrast for outdoors) ---- */
  :root[data-theme="sun"]{
    --bg:#FFFFFF; --surface:#FFFFFF; --surface-2:#F2F1EC;
    --ink:#000000; --ink-soft:#33322D; --ink-faint:#5A584F;
    --green:#0B6E52; --green-deep:#08543E;
    --amber:#9A6A00; --red:#7A1E10;
    --verify:#6E3E6A; --verify-soft:#EFE2ED;
    --border:#8E8A7E; --border-strong:#5F5C52;
    --glass:rgba(255,255,255,0.96); --glass-solid:rgba(255,255,255,0.98);
  }
  :root[data-theme="dark"] body{ -webkit-font-smoothing:antialiased; }
  *{box-sizing:border-box;}
  html{scroll-behavior:smooth;}
  body{margin:0; background:var(--bg); color:var(--ink); font-family:var(--font-body); font-size:14px; line-height:1.5; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;}
  h1,h2,h3{font-family:var(--font-display); font-weight:500; letter-spacing:-0.1px; margin:0;}
  button{font-family:var(--font-body); cursor:pointer;}
  select, input, textarea{font-family:var(--font-body); transition:border-color .15s var(--ease), box-shadow .15s var(--ease);}
  select:focus, input:focus, textarea:focus{outline:none; border-color:var(--green); box-shadow:var(--ring);}
  :focus-visible{outline:none; box-shadow:var(--ring); border-radius:6px;}
  ::selection{background:var(--green-soft); color:var(--green-deep);}
  .mono{font-family:var(--font-mono);}
  .app{max-width:none; margin:0; padding-bottom:0;}

  /* ---- app shell: nav rail + main column ---- */
  .shell{display:flex; align-items:stretch; min-height:100vh;}
  .main-col{flex:1; min-width:0; display:flex; flex-direction:column; padding-bottom:60px;}
  .main-inner{max-width:1160px; width:100%; margin:0 auto;}

  .nav-rail{width:var(--nav-w); flex-shrink:0; background:var(--surface); border-right:1px solid var(--border); display:flex; flex-direction:column; position:sticky; top:0; height:100vh; z-index:30;}
  .nav-brand{display:flex; align-items:center; gap:10px; padding:18px 18px 14px;}
  .nav-brand img{height:38px; width:auto; display:block;}
  .nav-brand .brand-sub{font-size:9.5px; color:var(--ink-faint); text-transform:uppercase; letter-spacing:1.4px; line-height:1.25;}
  .nav-cmd{margin:2px 14px 8px; display:flex; align-items:center; gap:8px; padding:8px 11px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface-2); color:var(--ink-soft); font-size:12.5px; cursor:pointer; transition:border-color .15s var(--ease), background-color .15s var(--ease);}
  .nav-cmd svg{width:15px; height:15px; flex-shrink:0;}
  .nav-cmd:hover{border-color:var(--border-strong); background:#fff;}
  .nav-cmd .kbd{margin-left:auto; font-family:var(--font-mono); font-size:10px; color:var(--ink-faint); border:1px solid var(--border); border-radius:5px; padding:1px 5px; background:#fff;}
  .nav-scroll{flex:1; overflow-y:auto; padding:4px 12px 12px;}
  .nav-group-label{font-size:10px; text-transform:uppercase; letter-spacing:1px; color:var(--ink-faint); padding:14px 10px 6px;}
  .nav-item{display:flex; align-items:center; gap:11px; padding:8px 10px; border-radius:var(--radius-sm); font-size:13.5px; color:var(--ink-soft); cursor:pointer; position:relative; transition:background-color .13s var(--ease), color .13s var(--ease);}
  .nav-item svg{width:17px; height:17px; flex-shrink:0; stroke-width:1.9;}
  .nav-item .nav-count{margin-left:auto; font-size:11px; font-family:var(--font-mono); color:var(--ink-faint); background:var(--gray-soft); border-radius:var(--radius-full); padding:1px 7px;}
  .nav-item:hover{background:var(--surface-2); color:var(--ink);}
  .nav-item.active{background:linear-gradient(135deg, var(--green-bright) 0%, var(--green) 55%, var(--green-deep) 100%); color:#fff; font-weight:600; box-shadow:0 2px 10px rgba(19,133,99,0.32), inset 0 1px 0 rgba(255,255,255,0.18);}
  .nav-item.active .nav-count{background:rgba(255,255,255,0.22); color:#fff;}
  .nav-item.active::before{display:none;}
  .nav-foot{padding:12px 16px; border-top:1px solid var(--border); display:flex; align-items:center; gap:10px;}
  .nav-foot .avatar{margin-left:0; width:30px; height:30px; font-size:11px;}
  .nav-foot-name{font-size:12.5px; font-weight:500; line-height:1.2;}
  .nav-foot-role{font-size:10.5px; color:var(--ink-faint); text-transform:capitalize;}
  .nav-foot-menu{margin-left:auto; border:1px solid var(--border); background:var(--surface); color:var(--ink-soft); padding:6px 10px; border-radius:var(--radius-sm); display:flex; align-items:center; gap:5px; font-size:12px; font-weight:600; cursor:pointer;}
  .nav-foot-menu:hover{border-color:var(--red); color:var(--red);}
  .nav-foot-menu svg{width:14px; height:14px;}
  .nav-foot-menu:hover{color:var(--ink); background:var(--surface-2);}

  .topbar{display:flex; align-items:center; justify-content:space-between; gap:16px; padding:0 28px; height:60px; border-bottom:1px solid var(--border); position:sticky; top:0; background:var(--glass); backdrop-filter:saturate(1.4) blur(10px); -webkit-backdrop-filter:saturate(1.4) blur(10px); z-index:20;}
  .page-head{display:flex; flex-direction:column; min-width:0;}
  .page-title{font-family:var(--font-display); font-size:19px; font-weight:500; line-height:1.1; letter-spacing:-0.2px;}
  .page-sub{font-size:11.5px; color:var(--ink-faint); margin-top:1px;}
  .brand{display:flex; align-items:center; gap:12px;}
  .brand-logo{height:46px; width:auto; display:block;}
  .brand-sub{font-size:10.5px; color:var(--ink-soft); text-transform:uppercase; letter-spacing:1.6px; line-height:1.2; border-left:1px solid var(--border); padding-left:12px;}
  .topbar-controls{display:flex; align-items:center; gap:10px; flex-wrap:nowrap; justify-content:flex-end;}
  .topbar-search{display:none;}
  .topbar-search-btn{display:none; align-items:center; justify-content:center; width:38px; height:38px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface); color:var(--ink-soft); padding:0;}
  .topbar-search-btn svg{width:18px; height:18px;}
  .topbar-search-btn:hover{color:var(--ink); border-color:var(--border-strong);}
  .topbar-desktop-ctl{display:flex; align-items:center; gap:10px;}
  .topbar-menu-btn{display:none; align-items:center; justify-content:center; width:40px; height:40px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface); color:var(--ink); padding:0; flex-shrink:0;}
  .topbar-menu-btn:hover{background:var(--surface-2); border-color:var(--border-strong); color:var(--green-deep);}
  .topbar-menu-btn:active{background:var(--surface-2);}
  .floating-back{position:fixed; z-index:45; left:calc(var(--nav-w) + 22px); bottom:22px; display:inline-flex; align-items:center; gap:5px; height:40px; padding:0 16px 0 12px; border:1px solid var(--border); border-radius:var(--radius-full); background:var(--glass-solid); backdrop-filter:saturate(1.4) blur(10px); -webkit-backdrop-filter:saturate(1.4) blur(10px); color:var(--ink); font-family:var(--font-body); font-size:13px; font-weight:600; cursor:pointer; box-shadow:var(--shadow-md); transition:background-color .13s var(--ease), border-color .13s var(--ease), color .13s var(--ease), transform .12s var(--ease);}
  .floating-back svg{width:17px; height:17px;}
  .floating-back:hover{color:var(--green-deep); border-color:var(--green); transform:translateX(-2px);}
  .floating-back:active{transform:translateX(-1px) scale(0.97);}

  /* ===== Mobile slide-in drawer (the "More" side menu) ===== */
  .drawer-overlay{position:fixed; inset:0; z-index:60; background:rgba(34,32,28,0.42); backdrop-filter:blur(2px); -webkit-backdrop-filter:blur(2px); animation:fadeIn .34s var(--ease);}
  .drawer{position:fixed; top:0; left:0; bottom:0; z-index:61; width:min(300px,84vw); background:var(--surface); border-right:1px solid var(--border); box-shadow:var(--shadow-lg); display:flex; flex-direction:column; animation:drawerIn .46s cubic-bezier(0.22,1,0.36,1); padding-bottom:env(safe-area-inset-bottom);}
  @keyframes drawerIn{from{transform:translateX(-100%); opacity:0.5;} to{transform:translateX(0); opacity:1;}}
  .drawer-head{display:flex; align-items:center; justify-content:space-between; padding:16px 16px 10px;}
  .drawer-logo{height:34px; width:auto;}
  .drawer-close{width:38px; height:38px; border:none; background:var(--surface-2); border-radius:var(--radius-sm); color:var(--ink-soft); display:flex; align-items:center; justify-content:center;}
  .drawer-close:active{background:var(--gray-soft);}
  .drawer-search{display:flex; align-items:center; gap:9px; margin:2px 14px 8px; padding:11px 13px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface-2); color:var(--ink-soft); font-size:14px; width:calc(100% - 28px);}
  .drawer-search svg{width:17px; height:17px;}
  .drawer-nav{flex:1; overflow-y:auto; padding:4px 10px 8px;}
  .drawer-group-label{font-size:10px; text-transform:uppercase; letter-spacing:1px; color:var(--ink-faint); padding:12px 10px 5px;}
  .drawer-item{display:flex; align-items:center; gap:13px; width:100%; padding:13px 12px; border:none; background:transparent; border-radius:var(--radius-sm); font-size:15px; color:var(--ink-soft); text-align:left; cursor:pointer;}
  .drawer-item svg{width:20px; height:20px; flex-shrink:0; stroke-width:1.9;}
  .drawer-item:active{background:var(--surface-2);}
  .drawer-item.active{background:linear-gradient(135deg, var(--green-bright) 0%, var(--green) 55%, var(--green-deep) 100%); color:#fff; font-weight:600; box-shadow:0 2px 10px rgba(19,133,99,0.28);}
  .drawer-count{margin-left:auto; font-family:var(--font-mono); font-size:11px; color:var(--ink-faint); background:var(--gray-soft); border-radius:var(--radius-full); padding:1px 8px;}
  .drawer-item.active .drawer-count{background:rgba(255,255,255,0.24); color:#fff;}
  .drawer-controls{padding:10px 16px; border-top:1px solid var(--border);}
  .drawer-ctl-label{font-size:10px; text-transform:uppercase; letter-spacing:0.8px; color:var(--ink-faint); margin:8px 0 5px;}
  .drawer-toggle{display:flex; width:100%; border:1px solid var(--border); border-radius:var(--radius-sm); overflow:hidden;}
  .drawer-toggle button{flex:1; border:none; background:var(--surface); padding:9px 6px; font-size:12px; color:var(--ink-soft); border-right:1px solid var(--border);}
  .drawer-toggle button:last-child{border-right:none;}
  .drawer-toggle button.active{background:linear-gradient(135deg, var(--green-bright) 0%, var(--green) 55%, var(--green-deep) 100%); color:#fff;}
  .drawer-foot{display:flex; align-items:center; gap:10px; padding:12px 16px; border-top:1px solid var(--border);}
  .drawer-logout{display:flex; align-items:center; gap:6px; margin-left:auto; border:1px solid var(--border); background:var(--surface); color:var(--ink-soft); border-radius:var(--radius-sm); padding:8px 11px; font-size:12.5px;}
  .drawer-logout svg{width:15px; height:15px;}
  .drawer-logout:active{background:var(--surface-2);}
  .role-toggle{display:flex; border:1px solid var(--border); border-radius:var(--radius-sm); overflow:hidden; background:var(--surface);}
  .role-toggle button{border:none; background:transparent; padding:6px 13px; font-size:12px; color:var(--ink-soft); border-right:1px solid var(--border); transition:background-color .13s var(--ease), color .13s var(--ease);}
  .role-toggle button:last-child{border-right:none;}
  .role-toggle button:hover{color:var(--ink);}
  .role-toggle button.active{background:linear-gradient(135deg, var(--green-bright) 0%, var(--green) 55%, var(--green-deep) 100%); color:#fff; box-shadow:inset 0 1px 0 rgba(255,255,255,0.2);}
  .user-select{border:1px solid var(--border); border-radius:var(--radius-sm); padding:7px 12px; font-size:12px; background:var(--surface); color:var(--ink);}

  .tabs{display:none;}
  .content{padding:24px 28px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); box-shadow:var(--shadow-sm); margin:18px; min-height:64vh;}
  .view-anim{animation:viewIn .32s var(--ease) both;}
  @keyframes viewIn{from{opacity:0; transform:translateY(6px);} to{opacity:1; transform:none;}}

  .row-between{display:flex; align-items:center; justify-content:space-between;}
  .btn{border:1px solid var(--border); background:var(--surface); border-radius:var(--radius-sm); padding:8px 14px; font-size:13px; color:var(--ink); font-weight:500; transition:border-color .15s var(--ease), background-color .15s var(--ease), box-shadow .15s var(--ease), transform .08s var(--ease);}
  .btn:hover{border-color:var(--border-strong); box-shadow:var(--shadow-sm); background:var(--surface-2);}
  .btn:active{transform:translateY(1px);}
  .btn-primary{background:linear-gradient(135deg, var(--green-bright) 0%, var(--green) 55%, var(--green-deep) 100%); color:#fff; border:none; box-shadow:0 2px 6px rgba(19,133,99,0.28), inset 0 1px 0 rgba(255,255,255,0.18); position:relative; overflow:hidden;}
  .btn-primary::after{content:""; position:absolute; top:0; left:-60%; width:40%; height:100%; background:linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent); transform:skewX(-20deg); transition:left .5s var(--ease);}
  .btn-primary:hover::after{left:130%;}
  .btn-primary:hover{background:linear-gradient(135deg, var(--green) 0%, var(--green-deep) 60%, var(--green-deep) 100%); border:none; box-shadow:0 4px 10px rgba(19,133,99,0.34), inset 0 1px 0 rgba(255,255,255,0.18);}
  .btn-phase-tone{background:linear-gradient(160deg, color-mix(in srgb, var(--phase-tone-b) 20%, white) 0%, var(--surface) 68%); border:1px solid var(--phase-tone-b); color:var(--phase-tone-c); font-weight:600; box-shadow:0 1px 2px rgba(34,32,28,0.05), 0 4px 10px rgba(34,32,28,0.05);}
  .btn-phase-tone:hover{border-color:var(--phase-tone-c); box-shadow:0 2px 4px rgba(34,32,28,0.06), 0 6px 14px rgba(34,32,28,0.08);}
  .btn-ghost{border:none; background:transparent; color:var(--ink-soft); font-size:12px;}

  .grid-cards{display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:16px; margin-top:18px;}
  .card{border:1px solid var(--border); border-radius:var(--radius); padding:18px; background:linear-gradient(165deg, var(--surface) 0%, var(--surface-2) 100%); cursor:pointer; box-shadow:0 1px 2px rgba(34,32,28,0.06), 0 4px 10px rgba(34,32,28,0.05); transition:border-color .15s var(--ease), box-shadow .15s var(--ease), transform .12s var(--ease);}
  .card:hover{border-color:var(--border-strong); box-shadow:var(--shadow-md); transform:translateY(-2px);}
  .card:active{transform:translateY(0px) scale(0.995);}
  .badge{font-size:10px; padding:3px 9px; border-radius:var(--radius-full); font-weight:600; text-transform:uppercase; letter-spacing:0.4px; border:1px solid transparent; display:inline-flex; align-items:center; gap:5px;}
  .badge::before{content:""; width:5px; height:5px; border-radius:50%; background:currentColor;}
  .badge.completed{background:var(--completed-soft); color:var(--completed);}
  .badge.in_progress{background:var(--amber-soft); color:var(--amber);}
  .badge.blocked{background:var(--red-soft); color:var(--red);}
  .badge.not_started{background:var(--gray-soft); color:var(--ink-faint);}

  .priority-tag{font-size:10px; text-transform:uppercase; letter-spacing:0.4px; padding:2px 7px; border-radius:5px; font-weight:600;}
  .priority-tag.high{background:var(--ember-soft); color:var(--ember);}
  .priority-tag.medium{background:var(--amber-soft); color:var(--amber);}
  .priority-tag.low{background:var(--gray-soft); color:var(--ink-faint);}

  .project-name-block{display:flex; flex-direction:column;}
  .project-tags-row{display:flex; gap:6px; flex-wrap:wrap; margin-top:8px;}

  .insights-section{border:1px solid var(--border); border-radius:var(--radius); padding:18px; margin-top:20px; background:linear-gradient(165deg, var(--surface) 0%, var(--surface-2) 100%); box-shadow:0 1px 2px rgba(34,32,28,0.06), 0 4px 10px rgba(34,32,28,0.05);}
  .insights-section:first-of-type{margin-top:18px;}

  .lifecycle-tag{font-size:10px; text-transform:uppercase; letter-spacing:0.4px; padding:2px 7px; border-radius:5px; font-weight:600; border:1px solid currentColor;}
  .lifecycle-tag.active{color:var(--green); background:transparent;}
  .lifecycle-tag.upcoming{color:var(--ink-soft); background:transparent;}
  .lifecycle-tag.completed{color:var(--completed); background:transparent;}
  .lifecycle-edit-btn{border:none; background:transparent; color:var(--ink-soft); cursor:pointer; padding:2px; display:inline-flex; align-items:center;}
  .lifecycle-edit-btn[data-action="delete-task"]:hover, .lifecycle-edit-btn[data-action="delete-phase"]:hover{color:var(--red);}
  .lifecycle-edit-btn:hover{color:var(--green);}
  .lifecycle-edit-select{font-size:10.5px; border:1px solid var(--border); border-radius:5px; padding:2px 4px;}

  /* project phase meter: one segment per phase, coloured by status */
  .phase-meter{display:flex; align-items:stretch; gap:3px; margin:14px 0 10px; height:10px;}
  .phase-seg{flex:1 1 0; min-width:6px; border-radius:3px; background:var(--gray-soft); position:relative; overflow:hidden; transition:background-color .2s var(--ease);}
  .phase-seg.seg-completed{background:var(--completed);}
  .phase-seg.seg-in_progress{background:var(--amber);}
  .phase-seg.seg-blocked{background:var(--red);}
  .phase-seg.seg-not_started{background:var(--gray-soft); box-shadow:inset 0 0 0 1px var(--border);}
  .phase-seg.seg-in_progress::after{content:""; position:absolute; inset:0; background:linear-gradient(100deg, transparent 25%, rgba(255,255,255,0.55) 50%, transparent 75%); transform:translateX(-100%); animation:segShimmer 2.4s var(--ease) infinite;}
  @keyframes segShimmer{to{transform:translateX(100%);}}
  .phase-meter-frac{font-size:10px; color:var(--ink-faint); align-self:center; margin-left:5px; flex-shrink:0;}
  .dashed-tracker{width:100%; height:0; border-top:2px dashed var(--gray);}

  .avatars{display:flex;}
  .avatar{width:25px;height:25px;border-radius:50%; background:var(--ember-soft); color:var(--ember); font-size:10px; font-weight:600; display:flex; align-items:center; justify-content:center; border:2px solid var(--surface); margin-left:-7px; box-shadow:var(--shadow-xs); letter-spacing:0.2px; position:relative; transition:transform .15s var(--ease), box-shadow .15s var(--ease); z-index:1;}
  .avatar.presence::after{content:""; position:absolute; bottom:-1px; right:-1px; width:8px; height:8px; border-radius:50%; background:var(--green-bright); border:2px solid var(--surface); box-shadow:0 0 0 1px rgba(19,133,99,0.25);}
  .avatar.presence.away::after{background:var(--gray);}
  .member-chip:hover .avatar, .team-avatar-wrap:hover .avatar{transform:scale(1.08) translateY(-1px); box-shadow:var(--shadow-md); z-index:2;}
  .avatar:first-child{margin-left:0;}

  .member-chip{display:inline-flex; align-items:center; gap:6px; background:var(--gray-soft); border-radius:20px; padding:4px 10px 4px 4px; font-size:12.5px; margin:0 6px 6px 0;}
  .team-chips{display:flex; flex-wrap:wrap; gap:8px;}
  .bym-company{padding:0;}
  .report-project-body .bym-company + .bym-company{border-top:1px solid var(--border); margin-top:10px; padding-top:12px;}
  .bym-company-head{display:flex; align-items:center; gap:8px; padding:2px 0 0;}
  .bym-company-dot{width:7px; height:7px; border-radius:50%; background:var(--green); flex-shrink:0;}
  .bym-company-name{font-family:var(--font-display); font-size:15px; font-weight:600; letter-spacing:-0.2px; color:var(--ink); flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .bym-company-count{font-family:var(--font-mono); font-size:11px; font-weight:700; color:var(--ink-soft); background:var(--surface-2); border:1px solid var(--border); border-radius:var(--radius-full); padding:1px 8px; flex-shrink:0;}
  .bym-company-tasks{padding:6px 0 2px;}
  .mgtabs{display:flex; flex-wrap:wrap; gap:4px; padding:8px 0 2px; margin-left:-4px;}
  .mgtab{display:inline-flex; align-items:center; gap:5px; font-size:11.5px; font-weight:600; color:var(--ink-soft); background:transparent; border:1px solid transparent; border-radius:var(--radius-full); padding:4px 10px; cursor:pointer; transition:background-color .12s var(--ease), color .12s var(--ease), border-color .12s var(--ease);}
  .mgtab:hover{background:var(--surface-2); color:var(--ink);}
  .mgtab-n{font-family:var(--font-mono); font-size:10px; font-weight:700; background:var(--surface-2); color:var(--ink-soft); border-radius:var(--radius-full); padding:0 5px; min-width:16px; text-align:center;}
  /* Active tabs use the same soft-tint chip language as the site's status pills:
     in-progress = amber, blocked = ember, completed = green. "Need to verify" gets a
     distinct muted tone so it doesn't read the same as in-progress. */
  .mgtab.active{background:var(--gray-soft); color:var(--ink);}
  .mgtab.active .mgtab-n{background:var(--surface); color:var(--ink);}
  .mgtab-in_progress.active{background:var(--amber-soft); color:var(--amber);}
  .mgtab-in_progress.active .mgtab-n{background:var(--surface); color:var(--amber);}
  .mgtab-blocked.active{background:var(--ember-soft); color:var(--ember);}
  .mgtab-blocked.active .mgtab-n{background:var(--surface); color:var(--ember);}
  .mgtab-completed.active{background:var(--completed-soft); color:var(--completed);}
  .mgtab-completed.active .mgtab-n{background:var(--surface); color:var(--completed);}
  .mgtab-to_verify.active{background:var(--verify-soft); color:var(--verify);}
  .mgtab-to_verify.active .mgtab-n{background:var(--surface); color:var(--verify);}
  .mg-summary{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px;}
  .mg-chip{display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; color:var(--ink-soft); background:var(--surface-2); border:1px solid var(--border); border-radius:var(--radius-full); padding:5px 12px; cursor:pointer; transition:border-color .13s var(--ease), background-color .13s var(--ease), color .13s var(--ease), box-shadow .13s var(--ease);}
  .mg-chip:hover{border-color:var(--border-strong); color:var(--ink);}
  .mg-chip-num{font-family:var(--font-mono); font-weight:700; color:var(--ink);}
  .mg-chip.active{background:var(--ink); border-color:var(--ink); color:#fff; box-shadow:var(--shadow-sm);}
  .mg-chip.active .mg-chip-num{color:#fff;}
  .mg-chip-warn.active{background:var(--ember); border-color:var(--ember);}
  .mg-chip-done{background:var(--green-soft); border-color:transparent; color:var(--green-deep);}
  .mg-chip-done .mg-chip-num{color:var(--green-deep);}
  .mg-chip-done.active{background:var(--green-deep); border-color:var(--green-deep); color:#fff;}
  .mg-chip-done.active .mg-chip-num{color:#fff;}
  .mg-verified{margin-top:18px; border:1px solid var(--border); border-radius:var(--radius-lg); background:var(--surface); overflow:hidden;}
  .mg-verified-head{display:flex; align-items:center; gap:9px; padding:12px 16px; cursor:pointer; background:var(--green-soft); color:var(--green-deep); font-weight:700; font-family:var(--font-display); font-size:14px;}
  .mg-verified-head .caret{transition:transform .15s var(--ease); color:var(--green-deep);}
  .mg-verified-head .caret.collapsed{transform:rotate(-90deg);}
  .mg-verified-title{flex:1;}
  .mg-verified-count{font-family:var(--font-mono); font-size:12px; background:var(--surface); color:var(--green-deep); border-radius:var(--radius-full); padding:1px 9px;}
  .mg-verified .collapsible-body{padding:12px 16px 4px;}
  .mg-verified .insights-section:first-child .section-label{margin-top:0;}
  .cadence-chip{flex-shrink:0; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.4px; padding:2px 8px; border-radius:var(--radius-full);}
  .cadence-chip.cad-daily{background:var(--gray-soft); color:var(--ink-soft);}
  .cadence-chip.cad-weekly{background:var(--gray-soft); color:var(--ink-faint);}
  .td-cadence{border:1px solid var(--border); border-radius:6px; font-size:12px; padding:3px 6px; background:var(--surface); color:var(--ink);}
  .checkin{border:1px solid var(--border); border-radius:var(--radius); padding:14px 16px; margin-top:16px; background:var(--surface);}
  .checkin-team{margin-top:0; margin-bottom:16px; background:var(--surface-2);}
  .checkin-head{font-family:var(--font-display); font-size:15px; font-weight:600; color:var(--ink); margin-bottom:10px; display:flex; align-items:center; gap:8px; flex-wrap:wrap;}
  .checkin-done{font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.4px; color:var(--completed); display:inline-flex; align-items:center; gap:3px;}
  .checkin-daytag{font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; color:var(--ink-faint); background:var(--gray-soft); border-radius:var(--radius-full); padding:1px 8px;}
  .checkin-post{display:flex; gap:8px; margin-bottom:10px;}
  .checkin-post input{flex:1; min-width:0; border:1px solid var(--border); border-radius:8px; padding:9px 12px; font-size:13px; background:var(--surface); color:var(--ink);}
  .checkin-list{display:flex; flex-direction:column; gap:6px;}
  .checkin-item{font-size:13px; color:var(--ink); padding:6px 0; border-top:1px solid var(--border); line-height:1.4;}
  .checkin-date{font-family:var(--font-mono); font-size:10.5px; color:var(--ink-faint); margin-right:6px;}
  .checkin-empty{font-size:12.5px; color:var(--ink-faint);}
  .checkin-user{margin-bottom:12px;}
  .checkin-user-head{display:flex; align-items:center; gap:6px; font-weight:600; font-size:13px; color:var(--ink); margin-bottom:4px;}
  .checkin-user .checkin-item{border-top:none; padding:2px 0 2px 26px; color:var(--ink-soft);}
  .checkin-day{margin-top:8px;}
  .checkin-day:first-child{margin-top:0;}
  .checkin-day .checkin-daytag{display:inline-block; margin-bottom:5px;}
  .checkin-item.checkin-auto{display:flex; align-items:baseline; gap:7px; border-top:none; padding:3px 0;}
  .checkin-item.checkin-auto .checkin-auto-task{color:var(--ink); font-weight:500;}
  .checkin-proj{font-size:11px; color:var(--ink-faint); margin-left:auto; white-space:nowrap;}
  .report-wrap{margin-bottom:18px;}
  .report-head-row{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; flex-wrap:wrap;}
  .report-customize-btn{display:inline-flex; align-items:center; gap:6px; font-size:12.5px; padding:7px 13px; position:relative;}
  .report-customize-btn.active{border-color:var(--green); color:var(--green-deep); background:var(--green-soft);}
  .ro-badge-dot{width:7px; height:7px; border-radius:50%; background:var(--ember); display:inline-block; margin-left:2px;}
  .report-options{border:1px solid var(--border); border-radius:var(--radius-lg); background:var(--surface); box-shadow:var(--shadow-sm); padding:14px 16px 16px; margin-bottom:16px; animation:fadeIn .18s var(--ease);}
  .ro-hint{font-size:12px; color:var(--ink-faint); margin-bottom:12px;}
  .ro-field{display:flex; align-items:flex-start; gap:12px; padding:9px 0; border-top:1px solid var(--border);}
  .ro-field:first-of-type{border-top:none; padding-top:0;}
  .ro-label{font-size:11px; text-transform:uppercase; letter-spacing:0.6px; color:var(--ink-soft); font-weight:600; flex:0 0 86px; padding-top:6px;}
  .ro-period button{font-size:12px; padding:6px 14px;}
  .ro-chips{display:flex; flex-wrap:wrap; gap:6px; flex:1; min-width:0;}
  .ro-chip{display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:500; padding:5px 11px; border-radius:var(--radius-full); border:1px solid var(--border); background:var(--surface-2); color:var(--ink-soft); cursor:pointer; transition:background-color .12s var(--ease), color .12s var(--ease), border-color .12s var(--ease), opacity .12s var(--ease);}
  .ro-chip .ro-tick{display:inline-flex; align-items:center; width:11px;}
  .ro-chip:hover{border-color:var(--border-strong); color:var(--ink);}
  .ro-chip.on{background:var(--green-soft); border-color:var(--green); color:var(--green-deep);}
  .ro-reset{margin-top:12px; border:none; background:transparent; color:var(--ink-faint); font-size:11.5px; text-decoration:underline; text-underline-offset:2px; cursor:pointer;}
  .ro-reset:hover{color:var(--ink-soft);}
  .report-print-btn{display:inline-flex; align-items:center; gap:6px; font-size:12.5px; padding:7px 13px;}
  .report-project{margin-bottom:16px; border:1px solid var(--border); border-radius:var(--radius-lg); background:var(--surface); box-shadow:var(--shadow-sm); overflow:hidden;}
  .report-project-head{display:flex; align-items:stretch; background:var(--surface-2); border-bottom:1px solid var(--border);}
  .report-project-caret{border:none; background:transparent; cursor:pointer; padding:0 6px 0 12px; display:flex; align-items:center; color:var(--ink-soft); flex-shrink:0;}
  .report-project-caret:hover{color:var(--green-deep);}
  .report-project-caret .caret{transition:transform .15s var(--ease); font-size:12px;}
  .report-project-caret .caret.collapsed{transform:rotate(-90deg);}
  .report-project-open{flex:1; min-width:0; display:flex; align-items:center; gap:10px; padding:12px 16px 12px 4px; border:none; background:transparent; cursor:pointer; text-align:left; transition:background-color .13s var(--ease);}
  .report-project-dot{width:8px; height:8px; border-radius:50%; background:var(--green); flex-shrink:0;}
  .report-project-title{font-family:var(--font-display); font-size:16px; font-weight:700; color:var(--ink); flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .report-project-go{color:var(--ink-faint); display:inline-flex; align-items:center; flex-shrink:0; transition:color .13s var(--ease), transform .13s var(--ease);}
  .report-project-open:hover{background:var(--green-soft);}
  .report-project-open:hover .report-project-title{color:var(--green-deep);}
  .report-project-open:hover .report-project-go{color:var(--green-deep); transform:translateX(2px);}
  .report-project-open:focus-visible{outline:2px solid var(--green); outline-offset:-2px;}
  .report-project-body{padding:12px 16px 6px;}
  .report-project-body .phase-block:last-child{margin-bottom:6px;}
  .tt-project{margin-bottom:16px;}
  .tt-project:last-child{margin-bottom:0;}
  .tt-project-name{font-family:var(--font-display); font-size:15px; font-weight:700; color:var(--ink); padding-bottom:6px; border-bottom:2px solid var(--green); margin-bottom:10px;}
  .tt-company{border-left:2px solid var(--border); padding:2px 0 2px 12px; margin:0 0 10px 4px;}
  .tt-company-name{display:flex; align-items:center; gap:8px; font-size:11px; text-transform:uppercase; letter-spacing:0.5px; color:var(--green-deep); font-weight:700; margin-bottom:8px;}
  .tt-people-count{background:var(--green-soft); color:var(--green-deep); border-radius:var(--radius-full); padding:0 7px; font-size:10px;}
  .tt-sep{opacity:0.4;}
  .tt-task-name{flex:1; min-width:0;}
  .tt-cad{font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:0.4px; color:var(--ink-faint); background:var(--gray-soft); border-radius:var(--radius-full); padding:1px 6px; flex-shrink:0;}
  .tt-person{margin-bottom:10px; padding-left:2px;}
  .tt-person-head{display:flex; align-items:center; gap:6px; font-weight:600; font-size:13px; color:var(--ink); margin-bottom:4px;}
  .tt-tasks{padding-left:26px; display:flex; flex-direction:column; gap:3px;}
  .tt-task{font-size:12.5px; color:var(--ink); display:flex; align-items:center; gap:7px;}
  .tt-task.done{color:var(--ink-faint); text-decoration:line-through;}
  .tt-dot{width:7px; height:7px; border-radius:50%; flex-shrink:0; background:var(--gray);}
  .tt-dot.status-completed{background:var(--completed);}
  .tt-dot.status-in_progress{background:var(--amber);}
  .tt-dot.status-blocked{background:var(--red);}
  .tt-note{padding-left:26px; font-size:12.5px; color:var(--ink-soft); font-style:italic; margin-top:3px;}
  .member-chip.exec{border:1.5px solid var(--green-deep); background:var(--green-soft);}
  .member-chip.is-me{box-shadow:0 0 0 2px var(--ember); border-color:var(--ember);}
  .exec-tag{font-size:8.5px; font-weight:800; letter-spacing:0.5px; text-transform:uppercase; color:#fff; background:var(--green-deep); border-radius:var(--radius-full); padding:1px 6px; margin-left:5px;}
  .me-tag{font-size:8.5px; font-weight:800; letter-spacing:0.5px; text-transform:uppercase; color:#fff; background:var(--ember); border-radius:var(--radius-full); padding:1px 6px; margin-left:5px;}
  .task-assignees{display:flex; align-items:center; gap:5px; flex-wrap:wrap;}
  .assignee-chip{display:inline-flex; align-items:center; gap:4px; background:var(--gray-soft); border-radius:14px; padding:2px 6px 2px 3px; font-size:11px;}
  .actor-tag{display:inline-flex; align-items:center; gap:5px; background:var(--gray-soft); border-radius:14px; padding:2px 8px 2px 3px; font-size:12.5px; font-weight:600; color:var(--ink); vertical-align:middle;}
  .actor-tag .avatar{width:16px; height:16px; font-size:8px; margin-left:0;}
  .assignee-chip .remove-x{cursor:pointer; color:var(--ink-soft); font-size:10px;}
  .assignee-chip .remove-x:hover{color:var(--red);}
  .task-unassigned{font-size:11px; color:var(--ink-soft);}
  .member-chip .avatar{margin-left:0;}
  .member-chip .remove-x{cursor:pointer; color:var(--ink-soft); font-size:11px;}
  .member-chip .remove-x:hover{color:var(--red);}
  .add-person-row{display:flex; gap:8px; align-items:center; margin-top:4px;}
  .member-avatars-row{display:flex; align-items:center; gap:6px;}
  .add-person-btn{width:24px;height:24px;border-radius:50%; border:1px dashed var(--border-strong); background:transparent; font-size:14px; line-height:1; color:var(--ink-soft); cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0;}
  .add-person-btn:hover{border-color:var(--green); color:var(--green);}
  .member-add-select{font-size:11.5px; border:1px solid var(--border); border-radius:6px; padding:4px 6px; max-width:140px;}

  .activity-link{cursor:pointer;}
  .activity-link:hover .attention-task{text-decoration:underline; color:var(--green);}

  .phase-block{border:1px solid var(--border); border-radius:var(--radius); margin-bottom:12px; overflow:hidden; background:linear-gradient(165deg, var(--surface) 0%, var(--surface-2) 100%); box-shadow:0 1px 2px rgba(34,32,28,0.05), 0 3px 8px rgba(34,32,28,0.04); transition:box-shadow .15s var(--ease);}
  .phase-block:hover{box-shadow:0 2px 4px rgba(34,32,28,0.07), 0 6px 14px rgba(34,32,28,0.07);}
  .phase-head{display:flex; align-items:center; gap:10px; padding:12px 14px; background:var(--surface-2); cursor:pointer; transition:background-color .13s var(--ease);}
  .phase-head:hover{background:var(--gray-soft);}
  .phase-head-main{flex:1; min-width:0; display:flex; align-items:center; gap:10px; flex-wrap:wrap;}
  .phase-title{font-family:var(--font-display); font-size:15px; font-weight:600; letter-spacing:-0.2px; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%;}
  .phase-name-input{font-size:14px; font-weight:600; border:1px solid var(--border); border-radius:6px; padding:4px 8px; flex:1; min-width:0; background:var(--surface); color:var(--ink);}
  .phase-meta{display:inline-flex; align-items:center; gap:8px;}
  .phase-count{font-size:11px; color:var(--ink-faint);}
  .phase-pct{font-size:13px; font-weight:700; flex-shrink:0;}
  .phase-icon-btn{border:none; background:transparent; color:var(--ink-faint); padding:3px; border-radius:6px; display:inline-flex; cursor:pointer; flex-shrink:0;}
  .phase-icon-btn svg{width:15px; height:15px;}
  .phase-icon-btn:hover{color:var(--ink); background:var(--gray-soft);}
  .phase-bar{height:3px; background:var(--gray-soft);}
  .phase-bar-fill{height:100%; transition:width .4s var(--ease);}
  .phase-body{padding:6px 14px 12px;}
  .phase-empty{padding:14px 4px; font-size:12.5px; color:var(--ink-faint);}
  .company-bar{display:flex; flex-direction:column; gap:8px; padding:10px 0 12px; margin-bottom:6px; border-bottom:1px dashed var(--border);}
  .company-line{display:flex; align-items:center; gap:8px; flex-wrap:wrap;}
  .company-lbl{font-size:9.5px; text-transform:uppercase; letter-spacing:0.6px; color:var(--ink-faint); font-weight:700; min-width:48px;}
  .company-none{font-size:12px; color:var(--ink-faint);}
  .company-leader-select, .company-bar .member-add-select{border:1px solid var(--border); border-radius:6px; font-size:12px; padding:5px 8px; background:var(--surface); color:var(--ink);}
  .org-card{border:1px solid var(--border); border-radius:var(--radius); padding:12px 14px; margin-bottom:10px; background:var(--surface);}
  .org-head{display:flex; align-items:center; gap:8px; margin-bottom:10px;}
  .org-head .org-name{flex:1;}
  .org-name{font-family:var(--font-display); font-size:15px; font-weight:600; color:var(--ink);}
  .org-count{font-size:12px; color:var(--ink-faint); background:var(--gray-soft); border-radius:var(--radius-full); padding:1px 9px; font-weight:600;}
  .org-card .company-line{margin-bottom:8px;}
  .org-card .company-line:last-child{margin-bottom:0;}
  .org-add{display:flex; gap:8px; margin-top:10px;}
  .org-add-input{flex:1; min-width:0; border:1px dashed var(--border-strong); border-radius:8px; padding:9px 12px; font-size:13px; background:var(--surface); color:var(--ink);}
  .org-add-input:focus{border-style:solid; border-color:var(--green); outline:none;}
  .org-add-btn{flex-shrink:0; border:none; background:linear-gradient(135deg, var(--green-bright) 0%, var(--green) 55%, var(--green-deep) 100%); color:#fff; border-radius:var(--radius-sm); padding:9px 16px; font-size:12.5px; font-weight:600; cursor:pointer;}
  .org-add-btn:active{transform:translateY(1px);}

  .task-add{display:flex; align-items:center; gap:8px; margin-top:8px; padding:6px 8px; border:1px dashed var(--border-strong); border-radius:8px; background:var(--surface); transition:border-color .13s var(--ease);}
  .task-add:focus-within{border-color:var(--green); border-style:solid;}
  .task-add-plus{width:22px; height:22px; flex-shrink:0; border-radius:6px; background:var(--green-soft); color:var(--green-deep); font-size:17px; line-height:1; display:flex; align-items:center; justify-content:center; font-weight:600;}
  .task-add input{flex:1; min-width:0; border:none; background:transparent; font-size:13.5px; color:var(--ink); padding:4px 2px;}
  .task-add input:focus{outline:none; box-shadow:none;}
  .task-add-btn{flex-shrink:0; border:none; background:linear-gradient(135deg, var(--green-bright) 0%, var(--green) 55%, var(--green-deep) 100%); color:#fff; border-radius:var(--radius-sm); padding:7px 14px; font-size:12.5px; font-weight:600; cursor:pointer;}
  .task-add-date{flex-shrink:0; border:1px solid var(--border); border-radius:var(--radius-sm); padding:6px 8px; font-size:12px; font-family:var(--font-mono); background:var(--surface); color:var(--ink-soft);}
  .task-date-ctl{display:inline-flex; align-items:center; gap:4px; color:var(--ink-soft); cursor:pointer;}
  .task-date-ctl svg{flex-shrink:0; color:var(--ink-faint);}
  .task-date-input{border:1px solid var(--border); border-radius:6px; padding:3px 6px; font-size:11px; font-family:var(--font-mono); background:var(--surface); color:var(--ink); cursor:pointer;}
  .task-date-input:hover{border-color:var(--border-strong);}
  .task-add-btn:active{transform:translateY(1px);}
  .task-row{display:flex; align-items:center; gap:10px; padding:9px 6px 9px 10px; margin:0 -6px; border-top:1px solid var(--border); border-left:3px solid transparent; border-radius:6px; transition:background-color .12s var(--ease), border-color .12s var(--ease);}
  .task-row.status-blocked{border-left-color:var(--ember);}
  .task-row.status-in_progress{border-left-color:var(--amber);}
  .task-row.status-completed{border-left-color:var(--green);}
  .task-row.status-not_started{border-left-color:var(--border-strong);}
  .task-row:hover{background:var(--surface-2);}
  .task-row:first-child{border-top:none;}
  .task-name{flex:1; font-size:13.5px;}

  /* ===== Clean task item (project detail) ===== */
  .task-item{border-top:1px solid var(--border); padding:11px 8px 11px 10px; margin:0 -8px; border-left:3px solid transparent; border-radius:8px; transition:background-color .12s var(--ease);}
  .task-item:first-child{border-top:none;}
  .task-item:hover{background:var(--surface-2);}
  .task-item.status-blocked{border-left-color:var(--red);}
  .task-item.status-in_progress{border-left-color:var(--amber);}
  .task-item.status-completed{border-left-color:var(--green);}
  .task-item.status-not_started{border-left-color:var(--border-strong);}
  .task-item.awaiting-verify{border-left-color:var(--amber); background:linear-gradient(90deg, var(--amber-soft) 0%, transparent 40%);}
  /* swipe-to-verify */
  .swipe-track{position:relative; overflow:hidden; border-radius:var(--radius); margin-bottom:8px; touch-action:pan-y;}
  .swipe-action{position:absolute; inset:0; border-radius:var(--radius); background:linear-gradient(90deg, var(--green) 0%, var(--green-deep) 100%); display:flex; align-items:center; padding-left:20px; color:#fff; font-size:12.5px; font-weight:700; letter-spacing:0.3px;}
  .swipe-action-inner{display:inline-flex; align-items:center; gap:7px; opacity:0.9; transition:transform .12s var(--ease);}
  .swipe-track.will-verify .swipe-action-inner{transform:scale(1.08);}
  .swipe-fg{position:relative; background:var(--surface); border-radius:var(--radius); will-change:transform;}
  .swipe-fg .task-item{margin-bottom:0;}
  .swipe-hint{flex-shrink:0; display:inline-flex; align-items:center; gap:4px; font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.4px; color:var(--amber); background:var(--amber-soft); border-radius:var(--radius-full); padding:3px 9px; cursor:pointer; user-select:none;}
  .swipe-chevrons{display:inline-flex; animation:swipeNudge 1.5s var(--ease) infinite;}
  @keyframes swipeNudge{0%,100%{transform:translateX(0); opacity:0.55;} 50%{transform:translateX(3px); opacity:1;}}
  .task-verify-chip{flex-shrink:0; display:inline-flex; align-items:center; gap:3px; font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.4px; padding:3px 8px; border-radius:var(--radius-full); white-space:nowrap;}
  .task-verify-chip.verified{background:var(--completed-soft); color:var(--completed);}
  .task-verify-chip.pending{background:var(--amber-soft); color:var(--amber);}
  /* verified archive */
  .verified-archive{margin-top:6px; border-top:1px dashed var(--border); padding-top:8px;}
  .verified-toggle{display:flex; align-items:center; gap:6px; width:100%; background:transparent; border:none; cursor:pointer; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; color:var(--completed); padding:4px 2px;}
  .verified-toggle .caret{font-size:10px; transition:transform .18s var(--ease);}
  .verified-toggle .caret.collapsed{transform:rotate(-90deg);}
  .verified-count{background:var(--completed-soft); color:var(--completed); border-radius:var(--radius-full); padding:0 7px; font-size:10px;}

  @keyframes taskFlash{0%{background:var(--green-soft); box-shadow:inset 0 0 0 2px var(--green);} 100%{background:transparent; box-shadow:none;}}
  .task-item.flash{animation:taskFlash 2.4s var(--ease) both;}
  .task-item-main{display:flex; align-items:center; gap:11px;}
  .tim-break{display:none;}
  .task-item .task-name{flex:1; min-width:0; font-size:14px; font-weight:500; line-height:1.32; color:var(--ink); overflow-wrap:anywhere;}
  .task-item.is-done .task-name{text-decoration:line-through; color:var(--ink-faint);}
  .task-due-chip{flex-shrink:0; font-family:var(--font-mono); font-size:11px; font-weight:600; padding:3px 8px; border-radius:var(--radius-full); background:var(--gray-soft); color:var(--ink-soft); white-space:nowrap;}
  .task-due-chip.tone-overdue{background:var(--red-soft); color:var(--red);}
  .task-due-chip.tone-due-soon{background:var(--amber-soft); color:var(--amber);}
  .task-due-chip.tone-done{background:var(--completed-soft); color:var(--completed);}
  .task-status-pill{flex-shrink:0; border:1px solid var(--border); border-radius:var(--radius-full); font-size:11px; font-weight:600; padding:4px 24px 4px 11px; color:var(--ink-soft); cursor:pointer; appearance:none; -webkit-appearance:none; background-color:var(--surface-2); background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 24 24" fill="none" stroke="%236B675C" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>'); background-repeat:no-repeat; background-position:right 9px center;}
  .task-status-pill:hover{border-color:var(--border-strong);}
  .task-status-pill.status-completed{color:var(--completed); border-color:var(--completed-soft); background-color:var(--completed-soft);}
  .task-status-pill.status-in_progress{color:var(--amber); border-color:var(--amber-soft); background-color:var(--amber-soft);}
  .task-status-pill.status-blocked{color:var(--red); border-color:var(--red-soft); background-color:var(--red-soft);}
  .task-item-sub{display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-top:8px; padding-left:35px;}
  .task-item-sub:empty{display:none;}
  .task-notes-btn{display:inline-flex; align-items:center; gap:4px; border:none; background:transparent; color:var(--ink-faint); font-size:11.5px; font-weight:500; padding:0; cursor:pointer;}
  .task-notes-btn.has{color:var(--green-deep);}
  .task-notes-btn:hover{color:var(--green);}
  .task-del-btn{border:none; background:transparent; color:var(--ink-faint); padding:2px; border-radius:6px; display:inline-flex; cursor:pointer;}
  .task-del-btn svg{width:15px; height:15px;}
  .task-del-btn:hover{color:var(--red); background:var(--red-soft);}
  .task-money-btn{display:inline-flex; align-items:center; gap:4px; border:1px solid var(--border); background:var(--surface); color:var(--green-deep); font-size:11.5px; font-weight:600; padding:3px 9px; border-radius:var(--radius-full); cursor:pointer;}
  .task-money-btn:hover{border-color:var(--green); background:var(--green-soft);}
  .task-money-btn svg{width:13px; height:13px;}
  .td-actions{margin:2px 0 4px;}
  .td-actions .task-money-btn{font-size:12.5px; padding:6px 12px;}
  .task-check{width:22px; height:22px; border-radius:6px; border:1.5px solid var(--border-strong); background:var(--surface); flex-shrink:0; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; color:transparent; box-shadow:none; transition:border-color .15s var(--ease), background-color .15s var(--ease), box-shadow .15s var(--ease), transform .1s var(--ease);}
  .task-check:hover{border-color:var(--green); box-shadow:0 0 0 3px var(--green-soft);}
  .task-check:active{transform:scale(0.9);}
  .task-check.done{background:linear-gradient(135deg, var(--green-bright) 0%, var(--green-deep) 100%); border-color:var(--green-deep); color:#fff; box-shadow:0 1px 2px rgba(19,133,99,0.2);}
  .task-name.is-done{text-decoration:line-through; color:var(--ink-faint);}
  .status-select{border:1px solid var(--border); border-radius:6px; font-size:11.5px; padding:4px 6px; background:var(--surface);}
  .task-due{font-size:11px; color:var(--ink-soft); width:70px;}

  .inline-form{display:flex; flex-wrap:wrap; gap:8px; padding:12px; background:var(--gray-soft); border-radius:8px; margin-bottom:14px;}
  .inline-form input, .inline-form select{border:1px solid var(--border); border-radius:6px; padding:6px 8px; font-size:12.5px;}

  table.insights{width:100%; border-collapse:collapse; font-size:13px; margin-top:10px;}
  table.insights th{text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:0.5px; color:var(--ink-soft); padding:8px 10px; border-bottom:1px solid var(--border);}
  .workload-bar{display:flex; height:10px; border-radius:5px; overflow:hidden; background:var(--gray-soft); width:100%; box-shadow:inset 0 1px 3px rgba(34,32,28,0.14), inset 0 -1px 0 rgba(255,255,255,0.5), 0 1px 1px rgba(255,255,255,0.6);}
  .workload-bar div{height:100%;}
  table.insights td{padding:9px 10px; border-bottom:1px solid var(--border);}
  table.insights .ins-num{text-align:right; white-space:nowrap;}
  .ins-warn{color:var(--ember); font-weight:700;}
  .ins-co-name{font-weight:600; color:var(--ink);}
  .ins-co-meta{font-size:11px; color:var(--ink-faint); margin-top:1px;}
  .ins-bar{height:8px; border-radius:4px; background:var(--gray-soft); overflow:hidden;}
  .ins-bar-fill{height:100%; border-radius:4px;}
  .ins-bar-lbl{font-size:11px; margin-top:3px; font-weight:700;}
  .ins-highlights{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; margin:4px 0 18px;}
  .ins-hcard{border:1px solid var(--border); border-radius:var(--radius); padding:16px 18px; background:var(--surface); box-shadow:var(--shadow-sm); position:relative; overflow:hidden;}
  .ins-hcard::before{content:""; position:absolute; left:0; top:0; bottom:0; width:3px;}
  .ins-hcard-track::before{background:var(--completed);}
  .ins-hcard-work::before{background:var(--amber);}
  .ins-hcard-eyebrow{display:inline-flex; align-items:center; gap:7px; font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.7px; color:var(--ink-faint);}
  .ins-hcard-dot{width:8px; height:8px; border-radius:50%; flex-shrink:0;}
  .ins-hcard-name{font-family:var(--font-display); font-size:18px; font-weight:700; color:var(--ink); margin:9px 0 6px; line-height:1.15; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  .ins-hcard-metric{display:flex; align-items:baseline; gap:6px;}
  .ins-hcard-value{font-family:var(--font-display); font-size:24px; font-weight:700; color:var(--ink); line-height:1;}
  .ins-hcard-unit{font-size:12.5px; font-weight:600; color:var(--ink-soft);}
  .ins-hcard-sub{font-size:12px; color:var(--ink-soft); margin-top:8px;}
  .sched-tag{display:inline-block; font-size:11px; font-weight:600; padding:2px 9px; border-radius:var(--radius-full);}
  .sched-on{background:var(--completed-soft); color:var(--completed);}
  .sched-ahead{background:var(--green-soft); color:var(--green-deep);}
  .sched-behind{background:var(--ember-soft); color:var(--ember);}
  .sched-upcoming, .sched-none{background:var(--gray-soft); color:var(--ink-soft);}
  .pie-wrap{display:flex; flex-wrap:wrap; align-items:center; gap:22px;}
  .pie-chart{flex-shrink:0;}
  .pie-center-num{font-family:var(--font-display); font-size:22px; font-weight:700; fill:var(--ink);}
  .pie-center-lbl{font-size:9px; text-transform:uppercase; letter-spacing:0.6px; fill:var(--ink-faint); font-weight:600;}
  .pie-legend{flex:1; min-width:180px; display:flex; flex-direction:column; gap:9px;}
  .pie-legend-row{display:flex; align-items:center; gap:9px; font-size:13px;}
  .pie-legend-dot{width:11px; height:11px; border-radius:3px; flex-shrink:0;}
  .pie-legend-name{flex:1; min-width:0; color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .pie-legend-val{font-size:12px; color:var(--ink-soft); flex-shrink:0;}
  .pie-hit{cursor:pointer;}
  .pie-svg .pie-hit{transition:opacity .12s var(--ease);}
  .pie-svg .pie-hit:hover{opacity:0.82;}
  .pie-legend-row.pie-hit:hover{color:var(--ink);}
  #pie-tooltip{position:fixed; z-index:9999; pointer-events:none; opacity:0; transform:translateY(2px); transition:opacity .12s var(--ease); min-width:170px; background:var(--surface); border:1px solid var(--border-strong); border-radius:var(--radius); box-shadow:var(--shadow-lg); padding:11px 13px; font-family:var(--font-body);}
  #pie-tooltip.show{opacity:1; transform:translateY(0);}
  #pie-tooltip .pt-head{display:flex; align-items:center; gap:7px; font-family:var(--font-display); font-size:14px; font-weight:600; color:var(--ink); margin-bottom:8px;}
  #pie-tooltip .pt-swatch{width:11px; height:11px; border-radius:3px; flex-shrink:0;}
  #pie-tooltip .pt-row{display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--ink-soft); padding:2px 0;}
  #pie-tooltip .pt-dot{width:8px; height:8px; border-radius:50%; flex-shrink:0;}
  #pie-tooltip .pt-lbl{flex:1;}
  #pie-tooltip .pt-n{font-family:var(--font-mono); font-weight:700; color:var(--ink);}
  #pie-tooltip .pt-over .pt-lbl, #pie-tooltip .pt-over .pt-n{color:var(--red);}
  #pie-tooltip .pt-total{margin-top:7px; padding-top:7px; border-top:1px solid var(--border); font-size:11px; text-transform:uppercase; letter-spacing:0.5px; font-weight:700; color:var(--ink-faint);}

  .metric-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:14px; margin-top:14px;}
  .metric{background:linear-gradient(160deg, var(--surface-2) 0%, var(--surface) 65%); border:1px solid var(--border); border-radius:var(--radius); padding:15px 16px; box-shadow:var(--shadow-sm); transition:border-color .15s var(--ease), box-shadow .15s var(--ease), transform .12s var(--ease); position:relative; overflow:hidden;}
  .metric[data-action]:hover{border-color:var(--border-strong); box-shadow:var(--shadow-md); transform:translateY(-2px);}
  .metric[data-action]:active{transform:translateY(0px) scale(0.99);}
  .metric-label{font-size:10.5px; color:var(--ink-soft); text-transform:uppercase; letter-spacing:0.6px; font-weight:500;}
  .metric-value{font-family:var(--font-display); font-size:30px; line-height:1.05; margin-top:6px; letter-spacing:-0.5px;}
  .metric-value.danger{color:var(--red);}

  .metric-tone-green{background:linear-gradient(160deg, var(--green-soft) 0%, var(--surface) 68%); border-color:var(--green);}
  .metric-tone-green .metric-label{color:var(--green-deep);}
  .metric-tone-green .metric-value{color:var(--green-deep);}
  .metric-tone-ember{background:linear-gradient(160deg, var(--ember-soft) 0%, var(--surface) 68%); border-color:var(--ember);}
  .metric-tone-ember .metric-label{color:var(--ember);}
  .metric-tone-ember .metric-value{color:var(--ember);}
  .metric-tone-amber{background:linear-gradient(160deg, var(--amber-soft) 0%, var(--surface) 68%); border-color:var(--amber);}
  .metric-tone-amber .metric-label{color:var(--amber);}
  .metric-tone-amber .metric-value{color:var(--amber);}
  .metric-tone-neutral{background:linear-gradient(160deg, var(--gray-soft) 0%, var(--surface) 68%); border-color:var(--border-strong);}
  .metric-tone-neutral .metric-label{color:var(--ink-soft);}
  .metric-tone-neutral .metric-value{color:var(--ink);}

  .metric-hero{box-shadow:0 2px 4px rgba(19,133,99,0.08), 0 10px 26px rgba(19,133,99,0.14); grid-column:span 2;}
  .metric-hero .metric-label{font-weight:700; font-size:11.5px;}
  .metric-hero .metric-value{font-size:52px; letter-spacing:-1.5px; line-height:0.95; margin-top:8px;}
  @media (max-width:640px){ .metric-hero{grid-column:span 1;} .metric-hero .metric-value{font-size:38px;} }
  @media (max-width:640px){
    .exp-new-grid{grid-template-columns:1fr;}
    .exp-docs{grid-template-columns:1fr;}
    .exp-summary{flex-wrap:wrap;}
    .exp-stat{min-width:44%;}
    .ph-hero{padding:15px 16px; gap:16px;}
    .ph-hero-left, .ph-hero-right{min-width:0; flex-basis:100%;}
    .ph-big{font-size:40px;}
    .th-summary{gap:8px;}
    .act-filters{flex-direction:column;}
    .act-filters .act-filter{min-width:0; width:100%;}
    .act-clear-all{width:100%;}
    .company-line{gap:6px;}
    .company-lbl{min-width:100%;}
    .task-status-pill{padding:5px 22px 5px 10px;}
    .exp-proj-toggle{width:100%;}
    .exp-proj-btn{flex:1; text-align:center;}
  }

  .breadcrumb{font-size:12px; color:var(--ink-soft); margin:-24px -28px 18px; cursor:pointer; position:sticky; top:60px; background:var(--glass-solid); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); z-index:15; padding:11px 28px; display:flex; align-items:center; gap:6px; border-bottom:1px solid var(--border); border-radius:var(--radius-lg) var(--radius-lg) 0 0; transition:color .13s var(--ease);}
  .breadcrumb:hover{color:var(--green);}

  .detail-title-row{display:flex; align-items:center; gap:10px; margin:0 0 14px; flex-wrap:wrap;}
  .detail-project-title{font-family:var(--font-display); font-size:24px; font-weight:600; line-height:1.15; letter-spacing:-0.3px; color:var(--ink); min-width:0; overflow-wrap:anywhere;}
  .detail-title-row .lifecycle-edit-btn{flex-shrink:0;}
  .detail-title-input{font-family:var(--font-display); font-size:22px; font-weight:600; letter-spacing:-0.3px; color:var(--ink); border:1px solid var(--border); border-radius:var(--radius-sm); padding:6px 12px; flex:1; min-width:0; background:var(--surface);}
  .detail-title-btn{flex-shrink:0;}

  .section-label{font-size:11px; text-transform:uppercase; letter-spacing:0.7px; color:var(--ink-soft); font-weight:500; margin:26px 0 11px; padding:0 2px; display:flex; align-items:center; gap:9px;}
  .section-label::after{content:""; flex:1; height:1px; background:var(--border);}
  .section-label:first-child{margin-top:0;}

  .attention-list{border:1px solid var(--border); border-radius:var(--radius); overflow:hidden;}
  .attention-row{display:flex; align-items:center; gap:12px; padding:11px 14px; border-top:1px solid var(--border);}
  .attention-row:first-child{border-top:none;}
  .attention-dot{width:7px;height:7px;border-radius:50%; background:var(--red); flex-shrink:0;}
  .attention-task{font-size:13px; flex:1; min-width:0; overflow-wrap:anywhere;}
  .attention-meta{font-size:11.5px; color:var(--ink-soft); flex-shrink:0; white-space:nowrap;}

  .my-task-card{display:flex; align-items:center; gap:12px; padding:11px 14px; border-top:1px solid var(--border); background:var(--surface); transition:background-color .15s var(--ease), box-shadow .18s var(--ease); position:relative; animation:taskIn .32s var(--ease) both;}
  .my-task-card:first-child{border-top:none;}
  .my-task-card:hover{background:var(--surface-2); box-shadow:inset 3px 0 0 var(--green);}
  @keyframes taskIn{from{opacity:0; transform:translateY(5px);} to{opacity:1; transform:none;}}
  .my-task-check{width:21px; height:21px; border-radius:6px; border:1.5px solid var(--border-strong); background:var(--surface); flex-shrink:0; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:border-color .15s var(--ease), background-color .15s var(--ease), box-shadow .15s var(--ease), transform .1s var(--ease); color:transparent; padding:0; box-shadow:none;}
  .my-task-check:hover{border-color:var(--green); box-shadow:0 0 0 3px var(--green-soft);}
  .my-task-check:active{transform:scale(0.9);}
  .my-task-check.done{background:linear-gradient(135deg, var(--green-bright) 0%, var(--green-deep) 100%); border-color:var(--green-deep); border-width:1.5px; color:#fff; box-shadow:0 1px 2px rgba(19,133,99,0.2);}
  .my-task-card.is-done .my-task-name{text-decoration:line-through; color:var(--ink-faint);}
  .my-task-main{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; cursor:pointer;}
  .my-task-name{font-size:13px; font-weight:500; color:var(--ink);}
  .my-task-card:hover .my-task-name{color:var(--green-deep);}
  .my-task-meta{font-size:11px; color:var(--ink-faint);}
  .my-task-side{display:flex; align-items:center; gap:8px; flex-shrink:0;}
  .my-task-status-select{border:1px solid var(--border); border-radius:var(--radius-full); font-size:10.5px; font-weight:600; padding:3px 9px 3px 8px; background:var(--surface-2); cursor:pointer; color:var(--ink-soft); appearance:none; -webkit-appearance:none;}
  .my-task-status-select:hover{border-color:var(--border-strong);}
  .my-task-due-chip{font-size:10px; font-family:var(--font-mono); padding:2px 8px; border-radius:var(--radius-full); background:var(--gray-soft); color:var(--ink-soft); white-space:nowrap;}
  .my-task-due-chip.overdue{background:var(--red-soft); color:var(--red); animation:duePulse 1.8s ease-in-out infinite;}
  .my-task-due-chip.due-soon{background:var(--amber-soft); color:var(--amber);}
  @keyframes duePulse{0%,100%{box-shadow:0 0 0 0 rgba(140,42,27,0.28);} 50%{box-shadow:0 0 0 4px rgba(140,42,27,0);}}
  .my-task-dot{width:7px; height:7px; border-radius:50%; flex-shrink:0;}
  .my-task-dot.pulsing{animation:duePulse 1.8s ease-in-out infinite;}
  .attention-empty{padding:16px 14px; font-size:13px; color:var(--ink-soft);}
  .empty-row{display:flex; align-items:center; gap:11px; padding:16px 14px; color:var(--ink-soft); font-size:12.5px;}
  .empty-row-ico{width:28px; height:28px; border-radius:8px; background:var(--surface-2); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; color:var(--ink-faint); flex-shrink:0;}
  .empty-row-ico svg{width:14px; height:14px;}

  /* ===== Contractor triage view ===== */
  .focus-head{margin:-4px 0 16px;}
  .focus-hello{font-family:var(--font-display); font-size:23px; font-weight:600; letter-spacing:-0.3px; color:var(--ink); line-height:1.08;}
  .focus-date{font-size:12px; color:var(--ink-faint); margin-top:4px; font-family:var(--font-mono); text-transform:capitalize;}
  .focus-sep{opacity:0.45; margin:0 3px;}

  .triage-strip{display:flex; gap:8px; overflow-x:auto; padding:2px 2px 12px; margin:0 -2px 6px; scrollbar-width:none;}
  .triage-strip::-webkit-scrollbar{display:none;}
  .triage-pill{flex:0 0 auto; min-width:76px; display:flex; flex-direction:column; align-items:flex-start; gap:2px; padding:10px 14px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); cursor:pointer; position:relative; overflow:hidden; transition:border-color .15s var(--ease), box-shadow .15s var(--ease), transform .09s var(--ease), background-color .15s var(--ease);}
  .triage-pill::before{content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--lane, var(--gray));}
  .triage-pill.lane-all::before{background:var(--ink-soft);}
  .triage-pill:hover{border-color:var(--border-strong); box-shadow:var(--shadow-sm);}
  .triage-pill:active{transform:scale(0.97);}
  .triage-num{font-family:var(--font-display); font-size:23px; font-weight:600; line-height:1; color:var(--ink);}
  .triage-lbl{font-size:9.5px; text-transform:uppercase; letter-spacing:0.7px; color:var(--ink-faint); font-weight:700; white-space:nowrap;}
  .triage-pill.is-zero .triage-num{color:var(--ink-faint);}
  .triage-pill.active{border-color:var(--lane, var(--green)); background:var(--lane-soft, var(--green-soft)); box-shadow:0 3px 10px rgba(34,32,28,0.09);}
  .triage-pill.active .triage-lbl{color:var(--lane, var(--ink-soft));}
  .triage-pill.lane-all.active{border-color:var(--border-strong); background:var(--gray-soft);}
  .triage-pill.lane-all.active .triage-lbl{color:var(--ink-soft);}

  .tlane{margin-bottom:20px;}
  .tlane:last-child{margin-bottom:0;}
  .lane-head{display:flex; align-items:center; gap:10px; margin:0 0 10px; padding:0 2px 8px; border-bottom:1px solid var(--border);}
  .lane-head.lane-collapsible{cursor:pointer;}
  .lane-head .caret{color:var(--ink-faint); margin-right:0;}
  .lane-rail{width:16px; height:4px; border-radius:2px; flex-shrink:0;}
  .lane-title{font-family:var(--font-display); font-size:13px; font-weight:600; text-transform:uppercase; letter-spacing:0.9px; color:var(--ink);}
  .lane-count{font-family:var(--font-mono); font-size:11px; font-weight:600; padding:1px 9px; border-radius:var(--radius-full); margin-left:auto;}

  .tcard{display:flex; align-items:stretch; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); margin-bottom:8px; overflow:hidden; box-shadow:var(--shadow-xs); animation:taskIn .3s var(--ease) both; transition:box-shadow .16s var(--ease), transform .12s var(--ease), border-color .16s var(--ease);}
  .tcard:last-child{margin-bottom:0;}
  .tcard:hover{box-shadow:var(--shadow-md); transform:translateY(-1px); border-color:var(--border-strong);}
  .tcard.is-done{opacity:0.82;}
  .tcard-rail{width:4px; flex-shrink:0;}
  .tcard-main{flex:1; min-width:0; padding:11px 13px;}
  .tcard-top{display:flex; align-items:center; gap:11px;}
  .tcard-check{width:24px; height:24px; border-radius:6px; border:2px solid var(--border-strong); background:var(--surface); flex-shrink:0; cursor:pointer; display:flex; align-items:center; justify-content:center; color:transparent; padding:0; box-shadow:none; transition:border-color .15s var(--ease), background-color .15s var(--ease), box-shadow .15s var(--ease), transform .1s var(--ease);}
  .tcard-check:hover{border-color:var(--green); box-shadow:0 0 0 3px var(--green-soft);}
  .tcard-check:active{transform:scale(0.88);}
  .tcard-check.done{background:linear-gradient(135deg, var(--green-bright) 0%, var(--green-deep) 100%); border-color:var(--green-deep); color:#fff; box-shadow:0 1px 3px rgba(19,133,99,0.28);}
  .tcard-name{flex:1; min-width:0; font-size:14.5px; font-weight:600; line-height:1.32; color:var(--ink); cursor:pointer; overflow-wrap:anywhere;}
  .tcard.is-done .tcard-name{text-decoration:line-through; color:var(--ink-faint);}
  .tcard-name:hover{color:var(--green-deep);}
  .tcard-due{flex-shrink:0; font-family:var(--font-mono); font-size:11px; font-weight:600; padding:3px 9px; border-radius:var(--radius-full); background:var(--gray-soft); color:var(--ink-soft); white-space:nowrap;}
  .tcard-due.tone-overdue{background:var(--red-soft); color:var(--red);}
  .tcard-due.tone-due-soon{background:var(--amber-soft); color:var(--amber);}
  .tcard-due.tone-done{background:var(--completed-soft); color:var(--completed);}
  .lane-overdue .tcard-due.tone-overdue{animation:duePulse 2s ease-in-out infinite;}
  .tcard-sub{display:flex; align-items:center; gap:10px; margin-top:7px; padding-left:35px;}
  .tcard-project{flex:1; min-width:0; font-size:11.5px; color:var(--ink-faint); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .tcard-dot-sep{opacity:0.5; margin:0 1px;}
  .tcard-status{flex-shrink:0; border:1px solid var(--border); border-radius:var(--radius-full); font-size:11px; font-weight:600; padding:4px 24px 4px 11px; color:var(--ink-soft); cursor:pointer; appearance:none; -webkit-appearance:none; background-color:var(--surface-2); background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 24 24" fill="none" stroke="%236B675C" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>'); background-repeat:no-repeat; background-position:right 9px center;}
  .tcard-status:hover{border-color:var(--border-strong);}
  .tcard-status.status-completed{color:var(--completed); border-color:var(--completed-soft); background-color:var(--completed-soft);}
  .tcard-status.status-in_progress{color:var(--amber); border-color:var(--amber-soft); background-color:var(--amber-soft);}
  .tcard-status.status-blocked{color:var(--ember); border-color:var(--ember-soft); background-color:var(--ember-soft);}
  .tcard-col{flex:1; min-width:0;}
  .tcard-main{cursor:pointer;}
  .tcard-expand{flex-shrink:0; border:none; background:transparent; color:var(--ink-faint); padding:2px; display:inline-flex; align-items:center; gap:3px; cursor:pointer; position:relative;}
  .tcard-expand svg{transition:transform .18s var(--ease);}
  .tcard-expand.open svg{transform:rotate(180deg);}
  .tcard-badge{font-family:var(--font-mono); font-size:10px; font-weight:700; background:var(--green-soft); color:var(--green-deep); border-radius:var(--radius-full); padding:1px 6px;}
  .tcard-detail{border-top:1px dashed var(--border); margin-top:4px; padding:11px 13px 12px; animation:countPop .25s var(--ease) both;}
  .td-meta{display:flex; flex-direction:column; gap:6px; margin-bottom:10px;}
  .td-meta-row{display:flex; align-items:center; gap:10px; font-size:12.5px; color:var(--ink);}
  .td-label{font-size:10px; text-transform:uppercase; letter-spacing:0.6px; color:var(--ink-faint); font-weight:700; min-width:74px; flex-shrink:0;}
  .td-section-label{font-size:10px; text-transform:uppercase; letter-spacing:0.7px; color:var(--ink-faint); font-weight:700; margin:12px 0 7px; display:flex; align-items:center; gap:6px;}
  .td-section-label svg{width:12px; height:12px;}
  .td-notes .note-item{margin-bottom:6px;}
  .atts{display:flex; flex-direction:column; gap:6px;}
  .att-item{display:flex; align-items:center; gap:9px; padding:8px 10px; border:1px solid var(--border); border-radius:8px; background:var(--surface-2);}
  .att-ico{color:var(--red); flex-shrink:0; display:inline-flex;}
  .att-name{flex:1; min-width:0; font-size:13px; color:var(--green-deep); text-decoration:none; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .att-name:hover{text-decoration:underline;}
  .att-size{font-size:10.5px; color:var(--ink-faint); flex-shrink:0;}
  .att-del{border:none; background:transparent; color:var(--ink-faint); font-size:16px; line-height:1; cursor:pointer; padding:0 2px; flex-shrink:0;}
  .att-del:hover{color:var(--red);}
  .att-empty{font-size:12px; color:var(--ink-faint); padding:2px 0;}
  .att-upload{display:inline-flex; align-items:center; gap:7px; align-self:flex-start; padding:8px 13px; border:1px dashed var(--border-strong); border-radius:8px; font-size:12.5px; font-weight:600; color:var(--green-deep); cursor:pointer; background:var(--surface);}
  .att-upload:hover{border-color:var(--green); border-style:solid;}
  .att-upload svg{width:14px; height:14px;}
  .att-upload input{display:none;}

  .caught-up{display:flex; flex-direction:column; align-items:center; text-align:center; gap:14px; padding:52px 20px 40px;}
  .caught-up-ico{width:66px; height:66px; border-radius:var(--radius-full); background:var(--green-soft); color:var(--green-deep); display:flex; align-items:center; justify-content:center; box-shadow:0 4px 16px rgba(19,133,99,0.16);}
  .caught-up-msg{font-size:14.5px; color:var(--ink-soft); max-width:280px; line-height:1.5;}
  .tlane-empty{padding:28px; text-align:center; color:var(--ink-faint); font-size:13px;}

  /* ===== Task Health ===== */
  .th-summary{display:flex; gap:10px; margin-bottom:16px;}
  .th-stat{flex:1; background:var(--surface-2); border:1px solid var(--border); border-radius:var(--radius); padding:14px 16px;}
  .th-stat-num{font-family:var(--font-display); font-size:30px; font-weight:700; line-height:1;}
  .th-stat-lbl{font-size:10.5px; text-transform:uppercase; letter-spacing:0.6px; color:var(--ink-faint); font-weight:700; margin-top:5px;}

  /* ===== Activity tools ===== */
  .act-tools{display:flex; gap:9px; flex-wrap:wrap; margin-bottom:10px;}
  .act-search{flex:1; min-width:180px; display:flex; align-items:center; gap:8px; border:1px solid var(--border); border-radius:var(--radius-sm); padding:0 11px; background:var(--surface);}
  .act-search svg{color:var(--ink-faint); flex-shrink:0;}
  .act-search input{flex:1; border:none; background:transparent; padding:10px 0; font-size:13.5px; color:var(--ink);}
  .act-search input:focus{outline:none; box-shadow:none;}
  .act-search-clear{border:none; background:transparent; color:var(--ink-faint); font-size:17px; cursor:pointer; padding:0 2px;}
  .act-filter{border:1px solid var(--border); border-radius:var(--radius-sm); padding:9px 11px; font-size:13px; background:var(--surface); color:var(--ink); flex-shrink:0;}
  .act-filters{display:flex; gap:8px; flex-wrap:wrap; margin-bottom:10px;}
  .act-filters .act-filter{flex:1; min-width:120px;}
  .act-clear-all{border:1px solid var(--border); background:var(--surface-2); color:var(--ink-soft); border-radius:var(--radius-sm); padding:8px 14px; font-size:12.5px; font-weight:600; cursor:pointer; flex-shrink:0;}
  .act-clear-all:hover{border-color:var(--red); color:var(--red);}
  .act-count{font-size:11px; color:var(--ink-faint); text-transform:uppercase; letter-spacing:0.5px; font-weight:600; margin-bottom:8px;}
  .act-range{display:inline-flex; border:1px solid var(--border); border-radius:var(--radius-sm); overflow:hidden; flex-shrink:0;}
  .act-range button{border:none; background:var(--surface); color:var(--ink-soft); font-size:12.5px; font-weight:600; padding:9px 12px; cursor:pointer; border-left:1px solid var(--border);}
  .act-range button:first-child{border-left:none;}
  .act-range button.active{background:var(--ink); color:#fff;}
  .act-pulse-label{font-size:10.5px; text-transform:uppercase; letter-spacing:0.7px; color:var(--ink-faint); font-weight:700; margin:2px 0 7px;}
  .act-focus{display:flex; flex-wrap:wrap; gap:7px; margin-bottom:14px;}
  .act-focus-chip{display:inline-flex; align-items:center; gap:7px; font-size:12.5px; font-weight:600; color:var(--ink-soft); background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-full); padding:6px 13px; cursor:pointer; transition:border-color .12s var(--ease), background-color .12s var(--ease), color .12s var(--ease);}
  .act-focus-chip:hover{border-color:var(--border-strong); color:var(--ink);}
  .act-focus-dot{width:8px; height:8px; border-radius:50%; flex-shrink:0;}
  .act-focus-n{font-family:var(--font-mono); font-size:11px; font-weight:700; color:var(--ink); background:var(--surface-2); border-radius:var(--radius-full); padding:0 6px; min-width:18px; text-align:center;}
  .act-focus-chip.active{color:#fff; background:var(--fc, var(--ink)); border-color:var(--fc, var(--ink));}
  .act-focus-chip.active .act-focus-dot{background:rgba(255,255,255,0.9) !important;}
  .act-focus-chip.active .act-focus-n{background:rgba(255,255,255,0.22); color:#fff;}
  .act-focus-all.active{background:var(--ink); border-color:var(--ink);}
  .act-day{margin-bottom:14px;}
  .act-day-head{display:flex; align-items:center; gap:8px; font-family:var(--font-display); font-size:13px; font-weight:600; color:var(--ink); padding:0 2px 6px;}
  .act-day-n{font-family:var(--font-mono); font-size:10.5px; font-weight:700; color:var(--ink-faint); background:var(--surface-2); border:1px solid var(--border); border-radius:var(--radius-full); padding:0 7px;}
  .act-export-btn{display:inline-flex; align-items:center; gap:6px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface); color:var(--ink-soft); font-size:12.5px; font-weight:600; padding:9px 13px; cursor:pointer; flex-shrink:0; transition:border-color .12s var(--ease), color .12s var(--ease), background-color .12s var(--ease);}
  .act-export-btn:hover{border-color:var(--green); color:var(--green-deep);}
  .act-export-btn.active{background:var(--green-soft); border-color:transparent; color:var(--green-deep);}
  .act-export-panel{display:flex; flex-wrap:wrap; align-items:center; gap:16px; padding:14px 16px; margin-bottom:14px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface-2);}
  .act-export-row{display:flex; align-items:center; gap:9px;}
  .act-export-lbl{font-size:11px; text-transform:uppercase; letter-spacing:0.6px; font-weight:700; color:var(--ink-faint);}
  .act-seg{display:inline-flex; border:1px solid var(--border); border-radius:var(--radius-sm); overflow:hidden; background:var(--surface);}
  .act-seg button{border:none; background:transparent; color:var(--ink-soft); font-size:12.5px; font-weight:600; padding:7px 13px; cursor:pointer; border-left:1px solid var(--border);}
  .act-seg button:first-child{border-left:none;}
  .act-seg button.active{background:var(--green); color:#fff;}
  .act-export-go{display:inline-flex; align-items:center; gap:6px; margin-left:auto;}

  /* ===== Expenses ===== */
  .exp-rolebar{display:flex; align-items:center; gap:9px; padding:11px 14px; border:1px solid var(--border); border-radius:var(--radius); background:var(--green-soft); color:var(--green-deep); font-size:13px; font-weight:600; margin-bottom:14px;}
  .exp-role-ico{display:inline-flex;}
  .exp-role-ico svg{width:17px; height:17px;}
  .exp-summary{display:flex; gap:10px; flex-wrap:wrap; margin-bottom:16px;}
  .exp-stat{flex:1 1 120px; min-width:110px; background:var(--surface-2); border:1px solid var(--border); border-radius:var(--radius); padding:12px 14px;}
  .exp-stat-num{
  .exp-budget-stat.over{border-color:var(--red);}
  .exp-budget-sep{color:var(--ink-faint); font-weight:400;}
  .exp-budget-val{display:inline-flex; align-items:center; gap:4px; color:var(--ink);}
  .exp-budget-val.editable{cursor:pointer; border-bottom:1px dashed var(--border-strong);}
  .exp-budget-val.editable:hover{color:var(--green-deep); border-bottom-color:var(--green);}
  .exp-budget-pencil svg{width:11px; height:11px; opacity:0.6;}
  .exp-budget-input{width:120px; border:1px solid var(--green); border-radius:6px; padding:3px 6px; font-size:13px; font-family:var(--font-mono); background:var(--surface); color:var(--ink);}
  .exp-budget-bar{height:5px; border-radius:999px; background:var(--gray-soft); margin-top:8px; overflow:hidden;}
  .exp-budget-fill{height:100%; background:var(--green); border-radius:999px; transition:width .3s var(--ease);}
  .exp-budget-fill.over{background:var(--red);}
  .exp-over-tag{color:var(--red); font-weight:800; margin-left:4px;}font-family:var(--font-display); font-size:26px; font-weight:600; color:var(--ink); line-height:1;}
  .exp-stat-lbl{font-size:10px; text-transform:uppercase; letter-spacing:0.6px; color:var(--ink-faint); font-weight:700; margin-top:4px;}
  .exp-new{border:1px solid var(--border); border-radius:var(--radius-lg); padding:16px; background:linear-gradient(165deg, var(--surface) 0%, var(--surface-2) 100%);}
  .exp-new-title{font-family:var(--font-display); font-size:15px; font-weight:600; color:var(--ink); margin-bottom:12px;}
  .exp-new-grid{display:grid; grid-template-columns:1fr 1fr; gap:9px; margin-bottom:11px;}
  .exp-new-grid input, .exp-new-grid select{border:1px solid var(--border); border-radius:8px; padding:9px 11px; font-size:13.5px; background:var(--surface); color:var(--ink);}
  .exp-new-grid #exp-title{grid-column:1 / -1;}
  .exp-other-row{grid-column:1 / -1; display:flex; align-items:center; gap:8px;}
  .exp-other-row input{flex:1; min-width:0;}
  .req-mark{flex-shrink:0; width:18px; height:18px; border-radius:50%; background:var(--red); color:#fff; font-size:12px; font-weight:800; display:inline-flex; align-items:center; justify-content:center; line-height:1;}
  /* expense document buckets */
  .exp-docs{display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:10px;}
  .exp-doc-group{border:1px solid var(--border); border-radius:var(--radius); padding:10px 12px; background:var(--surface-2);}
  .exp-doc-head{font-size:10px; text-transform:uppercase; letter-spacing:0.6px; color:var(--ink-faint); font-weight:700; margin-bottom:8px;}
  .exp-doc-list{display:flex; flex-direction:column; gap:6px;}
  .exp-doc-item{display:flex; align-items:center; gap:6px;}
  .exp-doc-view{display:inline-flex; align-items:center; gap:6px; flex:1; min-width:0; font-size:12px; font-weight:600; color:var(--green-deep); text-decoration:none; background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:7px 10px;}
  .exp-doc-view:hover{border-color:var(--green); background:var(--green-soft);}
  .exp-doc-name{color:var(--ink-faint); font-weight:400; font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-left:auto; max-width:45%;}
  .exp-doc-del{flex-shrink:0; width:22px; height:22px; border:none; background:transparent; color:var(--ink-faint); font-size:16px; cursor:pointer; border-radius:6px;}
  .exp-doc-del:hover{color:var(--red); background:var(--red-soft);}
  .exp-doc-upload{display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; color:var(--ink-soft); background:var(--surface); border:1px dashed var(--border-strong); border-radius:8px; padding:7px 11px; cursor:pointer; align-self:flex-start;}
  .exp-doc-upload:hover{border-color:var(--green); color:var(--green-deep);}
  .exp-doc-upload.more{border-style:solid; border-color:var(--border);}
  .exp-doc-upload input{display:none;}
  .exp-doc-empty{font-size:11.5px; color:var(--ink-faint);}
  .exp-field-label{font-size:10px; text-transform:uppercase; letter-spacing:0.6px; color:var(--ink-faint); font-weight:700; margin:2px 0 7px;}
  .exp-proj-toggle{display:flex; gap:7px; flex-wrap:wrap; margin-bottom:12px;}
  .exp-proj-btn{border:1px solid var(--border); background:var(--surface); color:var(--ink-soft); border-radius:var(--radius-full); padding:7px 14px; font-size:13px; font-weight:600; cursor:pointer;}
  .exp-proj-btn.active{background:linear-gradient(135deg, var(--green-bright) 0%, var(--green) 55%, var(--green-deep) 100%); color:#fff; border-color:transparent;}
  .exp-tasktag{display:inline-block; background:var(--surface-2); border:1px solid var(--border); border-radius:var(--radius-full); padding:1px 8px; font-size:10.5px; color:var(--ink-soft); margin-left:4px;}

  .exp-new-grid #exp-note{grid-column:1 / -1;}
  .exp-submit{border:none; background:linear-gradient(135deg, var(--green-bright) 0%, var(--green) 55%, var(--green-deep) 100%); color:#fff; border-radius:var(--radius-sm); padding:10px 18px; font-size:13px; font-weight:600; cursor:pointer;}
  .exp-submit:active{transform:translateY(1px);}
  .exp-list{display:flex; flex-direction:column; gap:10px;}
  .exp-card{border:1px solid var(--border); border-left:4px solid var(--border-strong); border-radius:var(--radius); padding:14px 16px; background:var(--surface); box-shadow:var(--shadow-xs);}
  .exp-card.status-pending{border-left-color:var(--amber);}
  .exp-card.status-approved{border-left-color:var(--green);}
  .exp-card.status-rejected{border-left-color:var(--red);}
  .exp-card.status-paid{border-left-color:var(--completed); background:linear-gradient(135deg, var(--surface) 0%, var(--completed-soft) 220%);}
  .exp-top{display:flex; align-items:flex-start; justify-content:space-between; gap:12px;}
  .exp-title{font-size:15px; font-weight:600; color:var(--ink); line-height:1.3;}
  .exp-meta{font-size:11.5px; color:var(--ink-faint); margin-top:3px;}
  .exp-dot{opacity:0.5;}
  .exp-amount{font-size:17px; font-weight:700; color:var(--ink); white-space:nowrap; flex-shrink:0;}
  .exp-status-row{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:10px;}
  .exp-badge{font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; padding:3px 10px; border-radius:var(--radius-full);}
  .exp-badge.pending{background:var(--amber-soft); color:var(--amber);}
  .exp-badge.approved{background:var(--green-soft); color:var(--green-deep);}
  .exp-badge.rejected{background:var(--red-soft); color:var(--red);}
  .exp-badge.paid{background:var(--completed-soft); color:var(--completed);}
  .exp-trail{font-size:11.5px; color:var(--ink-soft);}
  .exp-note{font-size:13px; color:var(--ink-soft); margin-top:9px; padding:8px 11px; background:var(--surface-2); border-radius:8px;}
  .exp-atts{margin-top:11px;}
  .exp-actions{display:flex; gap:9px; flex-wrap:wrap; margin-top:13px;}
  .exp-btn{border:none; border-radius:var(--radius-sm); padding:9px 16px; font-size:13px; font-weight:600; cursor:pointer;}
  .exp-btn:active{transform:translateY(1px);}
  .exp-btn.approve{background:linear-gradient(135deg, var(--green-bright) 0%, var(--green) 55%, var(--green-deep) 100%); color:#fff;}
  .exp-btn.reject{background:var(--surface-2); color:var(--red); border:1px solid var(--red-soft);}
  .exp-btn.pay{background:linear-gradient(135deg, var(--green-bright) 0%, var(--green-deep) 100%); color:#fff;}

  /* ===== Pipeline title and rename row ===== */
  .pl-name-input{font-family:var(--font-display); font-size:20px; font-weight:700; color:var(--ink); border:1px solid var(--border-strong); border-radius:8px; padding:4px 10px; background:var(--surface); min-width:220px;}
  .pl-name-btn{padding:6px 12px; font-size:13px;}
  .pl-title-row{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:12px;}
  .pl-title{font-family:var(--font-display); font-size:22px; font-weight:700; letter-spacing:-0.4px; color:var(--ink); margin:0; line-height:1.1;}

  /* ===== Build schedule (redesigned timeline) ===== */
  .gs-summary{display:flex; gap:10px; margin-bottom:14px;}
  .gs-stat{flex:1; background:var(--surface-2); border:1px solid var(--border); border-radius:var(--radius); padding:12px 14px;}
  .gs-stat.danger{border-color:var(--red); background:var(--red-soft);}
  .gs-stat-num{font-family:var(--font-display); font-size:26px; font-weight:700; line-height:1; color:var(--ink);}
  .gs-stat.danger .gs-stat-num{color:var(--red);}
  .gs-stat-lbl{font-size:10px; text-transform:uppercase; letter-spacing:0.6px; color:var(--ink-faint); font-weight:700; margin-top:4px;}
  .gs-wrap{--gs-label-w:160px; border:1px solid var(--border); border-radius:var(--radius); overflow-x:auto; background:var(--surface);}
  .gs-header{display:flex; height:28px; background:var(--surface-2); border-bottom:1px solid var(--border); min-width:calc(var(--gs-label-w) + 420px);}
  .gs-corner{width:var(--gs-label-w); flex-shrink:0; border-right:1px solid var(--border); position:sticky; left:0; background:var(--surface-2); z-index:3;}
  .gs-month-track{position:relative; flex:1; min-width:420px;}
  .gs-month{position:absolute; top:8px; font-size:10px; color:var(--ink-faint); font-family:var(--font-mono); white-space:nowrap; border-left:1px solid var(--border); padding-left:5px; height:20px;}
  .gs-body{position:relative; min-width:calc(var(--gs-label-w) + 420px);}
  .gs-today{position:absolute; top:0; bottom:0; width:2px; background:var(--green); opacity:0.55; z-index:2; pointer-events:none;}
  .gs-proj-row{display:flex; align-items:center; justify-content:space-between; padding:9px 12px; background:var(--surface-2); font-family:var(--font-display); font-weight:600; font-size:13.5px; color:var(--ink); position:sticky; left:0; border-top:1px solid var(--border);}
  .gs-proj-count{font-size:11px; color:var(--ink-faint); background:var(--gray-soft); border-radius:var(--radius-full); padding:1px 9px; font-weight:600;}
  .gs-comp-row{padding:5px 12px 5px 22px; font-size:10px; text-transform:uppercase; letter-spacing:0.6px; color:var(--ink-faint); font-weight:700; position:sticky; left:0; background:var(--surface);}
  .gs-task-row{display:flex; align-items:center; min-height:30px; border-top:1px solid var(--border);}
  .gs-task-label{width:var(--gs-label-w); flex-shrink:0; padding:4px 10px 4px 22px; display:flex; align-items:center; gap:5px; border-right:1px solid var(--border); position:sticky; left:0; background:var(--surface); z-index:1;}
  .gs-task-name{font-size:12px; color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .gs-task-name.done{color:var(--ink-faint); text-decoration:line-through;}
  .gs-done-tick{color:var(--completed); display:inline-flex; flex-shrink:0;}
  .gs-track{flex:1; min-width:420px; position:relative; height:30px;}
  .gs-bar{position:absolute; top:7px; height:16px; border:1.5px solid; border-radius:5px; cursor:pointer; min-width:10px; overflow:hidden;}
  .gs-bar:hover{filter:brightness(0.97);}
  .gs-bar.overdue{box-shadow:0 0 0 1px var(--red);}
  .gs-bar-cap{position:absolute; left:0; top:0; bottom:0; width:4px;}

  /* ===== Predictive pipeline hero (dashboard) ===== */
  .ph-hero{display:flex; gap:22px; flex-wrap:wrap; align-items:stretch; padding:18px 20px; border:1px solid var(--border); border-radius:var(--radius-lg); background:linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%); box-shadow:var(--shadow-md); cursor:pointer; margin-bottom:16px; position:relative; overflow:hidden; transition:box-shadow .16s var(--ease), transform .14s var(--ease);}
  .ph-hero::before{content:""; position:absolute; inset:0; background-image:linear-gradient(var(--blueprint) 1px, transparent 1px), linear-gradient(90deg, var(--blueprint) 1px, transparent 1px); background-size:24px 24px; pointer-events:none;}
  .ph-hero:hover{border-color:var(--border-strong); box-shadow:var(--shadow-lg); transform:translateY(-2px);}
  .ph-hero:active{transform:translateY(0px) scale(0.997);}
  .ph-hero:focus-visible{outline:2px solid var(--green); outline-offset:2px;}
  .ph-hero.ph-static{cursor:default;}
  .ph-hero.ph-static:hover{box-shadow:var(--shadow-md); transform:none;}
  .ph-dot{opacity:0.45;}
  .ph-hero-left,.ph-hero-right{position:relative;}
  .ph-hero-left{flex:1.1; min-width:220px;}
  .ph-eyebrow{font-size:10.5px; text-transform:uppercase; letter-spacing:1.5px; color:var(--green-deep); font-weight:700;}
  .ph-big{font-family:var(--font-display); font-size:48px; font-weight:700; line-height:1; letter-spacing:-1.5px; color:var(--ink); margin:6px 0 3px;}
  .ph-unit{font-size:22px; color:var(--ink-faint); font-weight:500; letter-spacing:-0.5px;}
  .ph-sub{font-size:12px; color:var(--ink-soft);}
  .ph-progress{height:8px; border-radius:var(--radius-full); background:var(--gray-soft); margin-top:13px; overflow:hidden; box-shadow:inset 0 1px 2px rgba(0,0,0,0.12);}
  .ph-progress-fill{height:100%; border-radius:var(--radius-full); background:linear-gradient(90deg, var(--green-bright), var(--green-deep)); transition:width .6s var(--ease);}
  .ph-hero-right{flex:1; min-width:220px; display:flex; flex-direction:column; justify-content:flex-end; gap:12px;}
  .ph-spark{display:block; width:100%;}
  .ph-metrics{display:flex; gap:24px;}
  .ph-metric-label{font-size:10px; text-transform:uppercase; letter-spacing:0.7px; color:var(--ink-faint); font-weight:700;}
  .ph-metric-val{font-size:16px; color:var(--ink); font-weight:600; margin-top:2px;}
  .ph-eta-edit{display:inline-flex; align-items:center; gap:5px; cursor:pointer; border-bottom:1px dashed var(--border-strong);}
  .ph-eta-edit:hover{color:var(--green-deep); border-bottom-color:var(--green);}
  .ph-eta-pencil svg{width:11px; height:11px; opacity:0.6;}
  .ph-eta-input{margin-top:2px; border:1px solid var(--green); border-radius:6px; padding:4px 7px; font-size:13px; font-family:var(--font-mono); background:var(--surface); color:var(--ink);}

  /* ===== Pipeline build: chainage × layer matrix ===== */
  .pl-head{margin-bottom:14px;}
  .pl-jump{display:flex; align-items:center; gap:7px; overflow-x:auto; padding:2px 2px 12px; margin:0 -2px; scrollbar-width:none;}
  .pl-jump::-webkit-scrollbar{display:none;}
  .pl-jump-label{font-size:10px; text-transform:uppercase; letter-spacing:0.8px; color:var(--ink-faint); font-weight:700; flex-shrink:0; margin-right:2px;}
  .pl-jump-chip{flex-shrink:0; border:1px solid var(--border); background:var(--surface); color:var(--ink-soft); border-radius:var(--radius-full); padding:6px 12px; font-size:12.5px; font-weight:600; font-family:var(--font-mono); cursor:pointer; transition:border-color .13s var(--ease), background-color .13s var(--ease), color .13s var(--ease);}
  .pl-jump-chip:hover{border-color:var(--green); color:var(--ink);}
  .pl-jump-chip:active{transform:scale(0.95);}
  .pl-jump-chip.active{background:var(--green-soft); border-color:transparent; color:var(--green-deep);}
  .pl-jump-chip.front{color:var(--green-deep); border-color:var(--green); white-space:nowrap;}
  .pl-route{margin-bottom:16px; padding:14px 16px 10px; border:1px solid var(--border); border-radius:var(--radius-lg); background:linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%); background-image:linear-gradient(var(--blueprint) 1px, transparent 1px), linear-gradient(90deg, var(--blueprint) 1px, transparent 1px); background-size:100% 100%, 22px 22px, 22px 22px; box-shadow:var(--shadow-sm);}
  .pl-route-head{display:flex; align-items:baseline; justify-content:space-between; margin-bottom:12px;}
  .pl-route-title{font-family:var(--font-display); font-size:14px; font-weight:600; text-transform:uppercase; letter-spacing:1.2px; color:var(--ink);}
  .pl-route-reach{font-size:13px; color:var(--green-deep); font-weight:600;}
  .pl-route-track{position:relative; height:16px; border-radius:var(--radius-full); background:var(--gray-soft); box-shadow:inset 0 1px 3px rgba(0,0,0,0.12); overflow:visible; margin:0 4px;}
  .pl-route-tick{position:absolute; top:2px; bottom:2px; width:1px; background:rgba(34,32,28,0.10);}
  .pl-route-fill{position:absolute; left:0; top:0; bottom:0; border-radius:var(--radius-full); background:linear-gradient(90deg, var(--green-bright), var(--green)); opacity:0.45; transition:width .5s var(--ease);}
  .pl-route-laid{position:absolute; left:0; top:0; bottom:0; border-radius:var(--radius-full); background:linear-gradient(90deg, var(--green) 0%, var(--green-deep) 100%); box-shadow:0 1px 4px rgba(19,133,99,0.4); transition:width .5s var(--ease);}
  .pl-route-front{position:absolute; top:-4px; bottom:-4px; width:2px; background:var(--ink); transform:translateX(-1px); transition:left .5s var(--ease);}
  .pl-route-dot{position:absolute; top:-4px; left:50%; width:12px; height:12px; margin-left:-6px; border-radius:50%; background:var(--green-bright); border:2px solid var(--surface); box-shadow:0 0 0 3px rgba(31,203,143,0.35); animation:frontPulse 1.8s ease-in-out infinite;}
  @keyframes frontPulse{0%,100%{box-shadow:0 0 0 3px rgba(31,203,143,0.30);} 50%{box-shadow:0 0 0 7px rgba(31,203,143,0);}}
  .pl-route-scale{position:relative; height:16px; margin:7px 4px 0; font-size:10px; color:var(--ink-faint);}
  .pl-route-scale span{position:absolute; transform:translateX(-50%); white-space:nowrap;}
  .pl-route-scale span:first-child{transform:none;}
  .pl-route-scale span:last-child{transform:translateX(-100%);}
  @keyframes countPop{from{opacity:0; transform:translateY(4px);} to{opacity:1; transform:none;}}
  .countup{animation:countPop .4s var(--ease) both;}
  .pl-stats{display:flex; gap:10px; flex-wrap:wrap; margin-bottom:12px;}
  .pl-stat{flex:1 1 130px; min-width:120px; background:var(--surface-2); border:1px solid var(--border); border-radius:var(--radius); padding:11px 14px;}
  .pl-stat-label{font-size:10px; text-transform:uppercase; letter-spacing:0.7px; color:var(--ink-faint); font-weight:600;}
  .pl-stat-value{font-family:var(--font-display); font-size:24px; font-weight:600; color:var(--ink); line-height:1.05; margin-top:3px;}
  .pl-stat-value.mono{font-family:var(--font-mono); font-size:17px; font-weight:500;}
  .pl-stat-blocked{background:var(--red-soft); border-color:var(--red-soft);}
  .pl-stat-blocked .pl-stat-value{color:var(--red);}
  .pl-legend{display:flex; gap:14px; flex-wrap:wrap; font-size:11.5px; color:var(--ink-soft); margin-bottom:8px;}
  .pl-legend-item{display:flex; align-items:center; gap:6px;}
  .pl-legend-sw{width:13px; height:13px; border-radius:3px; flex-shrink:0;}
  .pl-hint{display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:11px; color:var(--ink-faint); margin-bottom:10px;}
  .pl-hint svg{width:15px; height:15px; color:var(--green);}
  .pl-hint-sep{opacity:0.5;}

  .pl-grid-scroll{overflow-x:auto; overflow-y:hidden; background:var(--surface); -webkit-overflow-scrolling:touch;}
  .pl-widget{border:2px solid #5A3A22; border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow-sm);}
  .pl-grass{height:26px; line-height:0; background:#5FA34A; border-bottom:2px solid #5A3A22;}
  .pl-grass svg{display:block;}
  .pl-grid{display:grid; width:max-content;}
  .pl-corner{position:sticky; left:0; z-index:4; background:var(--surface); border-right:2px solid var(--border-strong); border-bottom:1px solid var(--border); padding:6px 10px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.6px; color:var(--ink-faint); display:flex; align-items:center;}
  .pl-ruler{border-bottom:1px solid var(--border); border-right:1px solid var(--border); padding:5px 2px 6px; text-align:center; font-family:var(--font-mono); font-size:10px; color:var(--ink-faint); position:relative; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:2px;}
  .pl-ruler.km{color:var(--ink); font-weight:700; border-right-color:var(--border-strong);}
  .pl-rowlabel{position:sticky; left:0; z-index:2; background:var(--surface); border-right:2px solid var(--border-strong); border-bottom:1px solid var(--border); padding:0 10px; display:flex; align-items:center; gap:9px; min-height:40px;}
  .pl-step-num{width:19px; height:19px; flex-shrink:0; border-radius:5px; background:var(--gray-soft); color:var(--ink-soft); font-family:var(--font-mono); font-size:11px; font-weight:600; display:flex; align-items:center; justify-content:center;}
  .pl-layer-name{font-size:12.5px; font-weight:500; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0;}
  .pl-cell{min-height:40px; border-right:1px solid var(--border); border-bottom:1px solid var(--border); cursor:pointer; display:flex; align-items:center; justify-content:center; position:relative; overflow:hidden; transition:background-color .16s var(--ease);}
  .pl-cell:hover{filter:brightness(0.95); box-shadow:inset 0 0 0 2px rgba(34,32,28,0.12);}
  .pl-cell:active{transform:scale(0.94);}
  .pl-glyph{width:15px; height:15px; color:#fff;}
  /* cell fill is painted inline per material colour; status shows via solid / white-lined / faint.
     Blocked always overrides to a red wash + ring so it can't be missed. */
  .pl-cell.s-blocked{background:var(--red) !important; color:#fff; box-shadow:inset 0 0 0 2px #6e1f13;}
  .pl-swatch{width:11px; height:11px; border-radius:3px; flex-shrink:0; box-shadow:inset 0 0 0 1px rgba(34,32,28,0.12);}
  .pl-post{cursor:pointer;}
  /* markup-posts ruler: neutral light track, faint + to add, ticks for placed posts */
  .pl-post-ruler{background:var(--surface) !important; gap:2px;}
  .pl-post-ruler:hover{filter:none; box-shadow:inset 0 0 0 1px var(--border-strong);}
  .pl-post-none{cursor:default; background:var(--surface-2) !important;}
  .pl-post-none:hover{filter:none; box-shadow:none;}
  .pl-post-none:active{transform:none;}
  .pl-post-add{font-family:var(--font-body); font-size:16px; font-weight:400; line-height:1; color:var(--ink-faint); opacity:0.4; transition:opacity .13s var(--ease), color .13s var(--ease);}
  .pl-post-ruler:hover .pl-post-add{opacity:0.9; color:var(--pl-col, var(--green));}
  .pl-post-ticks{display:inline-flex; align-items:flex-end; gap:2px; height:16px;}
  .pl-post-ticks i{display:block; width:2px; height:15px; border-radius:1px; background:var(--pl-col, var(--green));}
  .pl-lg{width:14px; height:14px; border-radius:3px; flex-shrink:0; box-shadow:inset 0 0 0 1px rgba(34,32,28,0.12);}
  .pl-lg.solid{background:#8A9AA0;}
  .pl-lg.lined{background:repeating-linear-gradient(45deg, #8A9AA0 0 4px, #ffffff 4px 7px);}
  .pl-lg.faint{background:#DEDCD4;}
  .pl-lg.blocked{background:var(--red);}
  .pl-link-dot{position:absolute; top:3px; right:3px; width:5px; height:5px; border-radius:50%; background:#fff; box-shadow:0 0 0 1.5px var(--green-deep);}
  .pl-cell.pl-linked{cursor:default;}
  .pl-foot-label{min-height:34px; font-size:10px; text-transform:uppercase; letter-spacing:0.5px; color:var(--ink-faint); font-weight:600;}
  .pl-foot-cell{min-height:34px; border-right:1px solid var(--border); border-top:1px solid var(--border-strong); display:flex; align-items:flex-end; justify-content:center; padding:4px; background:var(--surface-2);}
  .pl-foot-bar{width:60%; min-height:2px; border-radius:2px 2px 0 0; transition:height .2s var(--ease), background-color .2s var(--ease);}

  .project-row-list{border:1px solid var(--border); border-radius:var(--radius); overflow:hidden;}
  .project-row{display:flex; align-items:center; gap:16px; padding:13px 16px; border-top:1px solid var(--border); cursor:pointer;}
  .project-row:first-child{border-top:none;}
  .project-row:hover{background:var(--gray-soft);}
  .project-row-name{font-size:13.5px; font-weight:500; width:170px; flex-shrink:0;}
  .project-row-route{flex:1;}
  .project-row-pct{font-family:var(--font-display); font-size:15px; width:44px; text-align:right; flex-shrink:0;}
  .project-row-meta{display:flex; flex-direction:column; gap:3px; width:130px; flex-shrink:0; font-size:11.5px;}
  .project-row-manager{color:var(--ink); font-weight:500;}
  .project-row-due{color:var(--ink-soft);}
  .project-row-header{cursor:default; padding:9px 16px; background:var(--surface-2); font-size:10.5px; font-weight:600; text-transform:uppercase; letter-spacing:0.6px; color:var(--ink-faint);}
  .project-row-header:hover{background:var(--surface-2);}

  .bottom-nav{display:none;}

  .gantt-legend{display:flex; flex-wrap:wrap; gap:16px; font-size:12px; color:var(--ink-soft); margin-bottom:14px; align-items:center;}
  .legend-dot{display:inline-block; width:9px; height:9px; border-radius:2px; margin-right:5px; vertical-align:middle;}
  .legend-line{display:inline-block; width:12px; height:2px; background:var(--ember); margin-right:5px; vertical-align:middle;}
  .gantt{border:1px solid var(--border); border-radius:var(--radius); overflow-x:auto; box-shadow:var(--shadow-sm);}
  .gantt-header{position:relative; border-bottom:1px solid var(--border); background:var(--gray-soft); min-width:600px; padding-top:6px; padding-bottom:6px; box-sizing:border-box; border-top:none;}
  .gantt-month{position:absolute; top:0; height:100%; display:flex; align-items:center; font-size:11px; font-weight:500; color:var(--ink-soft); border-left:1px solid var(--border); padding-left:6px;}
  .gantt-body{position:relative; padding:8px 0; min-width:600px;}
  .gantt-today-overlay{position:absolute; top:0; left:0; right:0; bottom:0; padding-top:0; padding-bottom:0; border-top:none; pointer-events:none; z-index:2;}
  .gantt-today-overlay .gantt-row-track{height:100%;}
  .gantt-today{position:absolute; top:0; bottom:0; width:2px; background:var(--ember);}
  .gantt-row{display:flex; align-items:center; gap:12px; padding:10px 14px; border-top:1px solid var(--border);}
  .gantt-row:first-child{border-top:none;}
  .gantt-row-label{width:230px; flex-shrink:0; font-size:12.5px; display:flex; align-items:center; gap:6px; overflow:hidden;}
  .gantt-row-label .gantt-name-text{overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0;}
  .gantt-row-label .priority-tag, .gantt-row-label .lifecycle-tag{flex-shrink:0;}
  .gantt-row-track{position:relative; flex:1; height:24px;}
  .gantt-row-pct{width:44px; flex-shrink:0; font-family:var(--font-display); font-size:13px; text-align:right;}
  .gantt-row-dates{width:82px; flex-shrink:0; font-size:10px; font-family:var(--font-mono); color:var(--ink-soft); line-height:1.5; text-align:right;}
  .gantt-bar-outline{position:absolute; top:2px; height:20px; border-radius:5px; box-sizing:border-box; min-width:26px; cursor:pointer; border:1.5px solid var(--border-strong); background:var(--surface); overflow:hidden; box-shadow:0 1px 3px rgba(34,32,28,0.10);}
  .gantt-bar-outline:hover{border-color:var(--green);}
  .gantt-bar-fill{position:absolute; top:0; left:0; bottom:0; border-radius:3.5px 0 0 3.5px; background-image:linear-gradient(180deg, rgba(255,255,255,0.42) 0%, rgba(255,255,255,0.06) 42%, rgba(0,0,0,0.08) 100%); box-shadow:inset 0 1px 0 rgba(255,255,255,0.3), inset 0 -1px 1px rgba(0,0,0,0.10);}
  .gantt-bar-upcoming{border:1.5px dashed var(--gray); background:transparent;}
  .crit-phase-label{padding:6px 14px 4px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.6px; color:var(--ink-soft); background:var(--surface-2); border-top:1px solid var(--border); position:sticky; left:0;}
  .crit-phase-label:first-child{border-top:none;}
  .crit-row{display:flex; align-items:flex-start; gap:12px; padding:6px 14px; border-top:1px solid var(--border); position:relative;}
  .crit-row-label{width:180px; flex-shrink:0; font-size:12px; font-weight:500; display:flex; align-items:center; gap:7px; padding-top:2px; position:sticky; left:14px; background:var(--surface); z-index:3; align-self:stretch;}
  .crit-row-label .crit-name-text{overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0;}
  .crit-row-pct{margin-left:auto; font-size:11px; font-weight:700; font-family:var(--font-mono); flex-shrink:0; padding-left:4px;}
  .crit-dot{width:9px; height:9px; border-radius:3px; flex-shrink:0;}
  .crit-row-track{position:relative; flex:1;}
  .crit-bar{position:absolute; border-radius:6px; height:24px; box-sizing:border-box; cursor:pointer; display:flex; align-items:center; overflow:hidden; box-shadow:0 1px 2px rgba(34,32,28,0.12); transition:transform .1s var(--ease); background:var(--contractor-color); z-index:2;}
  .crit-bar:hover{transform:translateY(-1px); box-shadow:0 2px 5px rgba(34,32,28,0.2); z-index:4;}
  .crit-bar-label{font-size:10.5px; font-weight:600; color:#fff; padding:0 7px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-shadow:0 1px 1px rgba(0,0,0,0.25); position:relative; z-index:1;}
  .crit-bar-label-outside{position:absolute; font-size:10.5px; font-weight:600; color:var(--ink); white-space:nowrap; height:24px; line-height:24px; margin-left:6px; z-index:2; pointer-events:none;}
  .crit-bar-completed{opacity:1;}
  .crit-bar-in_progress{opacity:0.92; background-image:repeating-linear-gradient(45deg, rgba(255,255,255,0.32) 0 5px, rgba(255,255,255,0) 5px 10px);}
  .crit-bar-blocked{opacity:0.45; box-shadow:0 0 0 2px var(--red), 0 1px 2px rgba(34,32,28,0.12); animation:crit-pulse 1.5s ease-in-out infinite;}
  .crit-bar-not_started{opacity:0.28;}
  .crit-step-badge{display:inline-flex; align-items:center; justify-content:center; width:15px; height:15px; border-radius:50%; background:rgba(255,255,255,0.9); color:var(--ink); font-size:9px; font-weight:800; margin-right:4px; flex-shrink:0; box-shadow:0 0 0 1px rgba(34,32,28,0.18);}
  .crit-legend-swatch{display:inline-block; width:14px; height:9px; border-radius:2px; margin-right:5px; vertical-align:middle;}
  .crit-overlay-wrap{position:absolute; top:0; left:0; right:0; pointer-events:none; z-index:1;}
  .crit-gridlines-wrap{position:absolute; top:0; left:206px; right:14px; pointer-events:none; z-index:0;}
  .crit-gridline{position:absolute; top:0; bottom:0; width:1px; background:rgba(34,32,28,0.07);}
  .crit-arrows-wrap{position:absolute; top:0; left:206px; right:14px; pointer-events:none;}
  .crit-path-gantt{--border:#e2e8f0; border-radius:var(--radius-lg);}
  .crit-path-gantt .gantt-body{overflow:visible;}
  @keyframes crit-pulse{0%,100%{box-shadow:0 0 0 2px var(--red), 0 1px 2px rgba(34,32,28,0.12);} 50%{box-shadow:0 0 0 4px rgba(196,74,58,0.35), 0 1px 2px rgba(34,32,28,0.12);}}
  .kpi-grid{display:grid; grid-template-columns:repeat(4, 1fr); gap:12px; margin:14px 0;}
  .kpi-card{background:var(--surface); border:1px solid #e2e8f0; border-radius:var(--radius); padding:14px 16px; box-shadow:var(--shadow-sm); display:flex; flex-direction:column; justify-content:space-between; gap:8px; min-height:88px;}
  .kpi-label{font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; color:var(--ink-soft);}
  .kpi-value{font-family:var(--font-display); font-size:22px; font-weight:600;}
  .kpi-ring-row{display:flex; align-items:center; gap:10px;}
  .kpi-ring-wrap{flex-shrink:0; line-height:0;}
  .kpi-pill{display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:700; padding:6px 12px; border-radius:var(--radius-full); align-self:flex-start;}
  .kpi-pill::before{content:""; width:6px; height:6px; border-radius:50%; background:currentColor;}
  @media (max-width:900px){ .kpi-grid{grid-template-columns:repeat(2, 1fr);} }
  .phase-card-grid{display:grid; grid-template-columns:repeat(2, 1fr); gap:12px; margin:0 0 14px;}
  .phase-card{background:var(--surface); border:1px solid #e2e8f0; border-radius:var(--radius); padding:14px 16px; box-shadow:var(--shadow-sm);}
  .phase-card-top{display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:9px;}
  .phase-card-title{font-size:12.5px; font-weight:700; color:var(--ink);}
  .phase-card-pct{font-family:var(--font-mono); font-size:13px; font-weight:700;}
  .phase-card-track{height:8px; border-radius:4px; background:var(--gray-soft); overflow:hidden;}
  .phase-card-fill{height:100%; border-radius:4px; transition:width .2s var(--ease);}
  .phase-card-meta{margin-top:8px; font-size:11px; color:var(--ink-soft);}
  @media (max-width:640px){ .phase-card-grid{grid-template-columns:1fr;} }
  .phase-contractor-list{margin-top:10px; padding-top:10px; border-top:1px solid var(--border); display:flex; flex-direction:column; gap:9px;}
  .phase-contractor-block{}
  .phase-contractor-head{display:flex; align-items:center; gap:6px; margin-bottom:4px; font-size:11.5px; font-weight:600; overflow:hidden;}
  .phase-contractor-pct{margin-left:auto; font-family:var(--font-mono); font-size:11px; font-weight:700; flex-shrink:0;}
  .subwidget-task{display:flex; align-items:center; gap:6px; font-size:11.5px; padding:5px 0; border-top:1px dashed var(--border); cursor:pointer;}
  .subwidget-task:first-child{border-top:none;}
  .subwidget-task:hover .subwidget-task-name{color:var(--green);}
  .subwidget-task-status-dot{width:7px; height:7px; border-radius:50%; flex-shrink:0;}
  .subwidget-task-name{flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0;}

  .cal-grid{display:grid; grid-template-columns:repeat(7,1fr); gap:1px; background:var(--border); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow-sm);}
  .cal-grid-header{margin-bottom:0; border-radius:var(--radius) var(--radius) 0 0;}
  .cal-grid + .cal-grid{border-radius:0 0 var(--radius) var(--radius); border-top:none;}
  .cal-weekday{background:var(--gray-soft); padding:8px; font-size:11px; text-align:center; color:var(--ink-soft); text-transform:uppercase; letter-spacing:0.4px;}
  .cal-cell{background:var(--surface); min-height:112px; padding:6px; position:relative; display:flex; flex-direction:column; gap:3px;}
  .cal-empty{background:var(--bg);}
  .cal-today{background:#F0F8F4;}
  .cal-daynum{font-size:12px; font-weight:500; margin-bottom:2px;}
  .cal-today .cal-daynum{color:var(--green); font-weight:700;}
  .cal-strips{display:flex; gap:2px; margin-bottom:2px;}
  .cal-strip{height:4px; flex:1; border-radius:2px; cursor:pointer; min-width:8px;}
  .cal-task-chip{font-size:10px; padding:2px 5px; border-left:3px solid; background:var(--gray-soft); border-radius:0 3px 3px 0; cursor:pointer; color:var(--ink); display:flex; align-items:center; gap:4px; overflow:hidden;}
  .cal-chip-avatar{width:11px; height:11px; border-radius:50%; font-size:6.5px; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; line-height:1;}
  .cal-chip-text{overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0;}
  .cal-legend{display:flex; flex-wrap:wrap; gap:14px; margin-top:14px; font-size:12px; color:var(--ink-soft);}
  .cal-legend-item{display:flex; align-items:center; gap:6px; cursor:pointer;}
  .cal-legend-swatch{width:10px; height:10px; border-radius:2px; flex-shrink:0;}
  .cal-more{font-size:9.5px; color:var(--ink-soft); padding-left:2px;}

  @media (max-width:640px){
    .gantt-row-label{width:110px;}
    .gantt-row-dates{display:none;}
    .cal-cell{min-height:60px; padding:4px; gap:2px;}
    .cal-weekday{padding:5px; font-size:9.5px;}
    .cal-strip{height:3px;}
    .cal-task-chip{font-size:8.5px; padding:1px 3px; gap:3px;}
    .cal-chip-avatar{width:9px; height:9px; font-size:5.5px;}
  }

  .caret{display:inline-block; transition:transform .12s ease; font-size:10px; margin-right:4px;}
  .caret-lg{font-size:16px; margin-right:7px;}
  .caret.collapsed{transform:rotate(-90deg);}
  .collapsible-body.collapsed{display:none;}

  .detail-stat-row{display:flex; gap:10px; flex-wrap:wrap; margin:14px 0;}
  .detail-stat-grid{display:grid; grid-template-columns:repeat(auto-fit, minmax(140px, 1fr)); gap:10px; margin:14px 0;}
  .detail-stat{background:var(--surface-2); border-radius:var(--radius-sm); padding:8px 13px; min-width:100px; box-shadow:inset 0 1px 2px rgba(34,32,28,0.04);}
  .detail-stat-label{font-size:9.5px; text-transform:uppercase; letter-spacing:0.5px; color:var(--ink-faint); font-weight:600;}
  .detail-stat-value{font-family:var(--font-display); font-size:16px; margin-top:2px; color:var(--ink);}
  .detail-stat-green{background:linear-gradient(160deg, var(--green-soft) 0%, var(--surface) 75%);}
  .detail-stat-green .detail-stat-label{color:var(--green-deep);}
  .detail-stat-green .detail-stat-value{color:var(--green-deep);}
  .detail-stat-amber{background:linear-gradient(160deg, var(--amber-soft) 0%, var(--surface) 75%);}
  .detail-stat-amber .detail-stat-label{color:var(--amber);}
  .detail-stat-amber .detail-stat-value{color:var(--amber);}
  .detail-stat-ember{background:linear-gradient(160deg, var(--ember-soft) 0%, var(--surface) 75%);}
  .detail-stat-ember .detail-stat-label{color:var(--ember);}
  .detail-stat-ember .detail-stat-value{color:var(--ember);}
  .detail-stat-neutral{background:linear-gradient(160deg, var(--gray-soft) 0%, var(--surface) 75%);}

  .project-menu-wrap{position:relative;}
  .project-menu-btn{border:1px solid var(--border); background:var(--surface); color:var(--ink-soft); border-radius:var(--radius-sm); width:26px; height:26px; display:flex; align-items:center; justify-content:center; cursor:pointer; transition:background-color .13s var(--ease), color .13s var(--ease);}
  .project-menu-btn:hover{background:var(--surface-2); color:var(--ink);}
  .project-menu-dropdown{position:absolute; top:calc(100% + 4px); right:0; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); box-shadow:var(--shadow-lg); min-width:160px; z-index:30; overflow:hidden; animation:popIn .15s var(--ease);}
  .project-menu-item{display:flex; align-items:center; gap:8px; width:100%; border:none; background:transparent; padding:9px 12px; font-size:12.5px; color:var(--ink); cursor:pointer; text-align:left;}
  .project-menu-item:hover{background:var(--surface-2);}
  .project-menu-item.danger{color:var(--red);}
  .project-menu-item.danger:hover{background:var(--red-soft);}

  .filter-bar{display:flex; flex-wrap:wrap; gap:8px; margin:14px 0 4px;}
  .filter-pills{display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:8px 0 4px;}
  .filter-pill{display:inline-flex; align-items:center; gap:6px; background:var(--green-soft); color:var(--green-deep); border-radius:var(--radius-full); padding:3px 6px 3px 10px; font-size:11.5px; font-weight:500;}
  .filter-pill .remove-x{cursor:pointer; opacity:0.7;}
  .filter-pill .remove-x:hover{opacity:1;}
  .filter-clear-all{font-size:11px; color:var(--ink-faint); cursor:pointer; text-decoration:underline; text-underline-offset:2px;}
  .filter-clear-all:hover{color:var(--ink-soft);}
  .filter-bar input, .filter-bar select{border:1px solid var(--border); border-radius:7px; padding:7px 10px; font-size:12.5px; background:var(--surface);}
  .filter-bar input{flex:1; min-width:160px;}

  .task-due.overdue{color:var(--red); font-weight:500;}
  .task-due.due-soon{color:var(--amber); font-weight:500;}

  .notes-toggle{font-size:11px; color:var(--ink-soft); cursor:pointer; text-decoration:underline; text-underline-offset:2px;}
  .notes-toggle:hover{color:var(--green);}
  .task-pl-chip{display:inline-flex; align-items:center; gap:4px; border:1px solid var(--border); background:var(--surface-2); color:var(--ink-soft); border-radius:var(--radius-full); padding:2px 9px 2px 7px; font-size:10.5px; font-weight:600; cursor:pointer;}
  .task-pl-chip svg{width:12px; height:12px; color:var(--green);}
  .task-pl-chip:hover{border-color:var(--green); color:var(--ink);}
  .task-pl-chip.linked{background:var(--green-soft); border-color:transparent; color:var(--green-deep);}
  .task-pl-edit{display:inline-flex; align-items:center; gap:5px; flex-wrap:wrap;}
  .task-pl-edit select{border:1px solid var(--border); border-radius:6px; font-size:11px; padding:3px 6px; background:var(--surface);}
  .task-pl-dash{color:var(--ink-faint); font-size:12px;}
  .task-pl-m{width:62px; border:1px solid var(--border); border-radius:6px; font-size:11px; padding:3px 6px; background:var(--surface); color:var(--ink);}
  .task-pl-unit{font-size:11px; color:var(--ink-faint); margin-left:-2px;}
  .pl-ruler.half{border-right-color:var(--border-strong);}
  .pl-ruler.half::after{content:""; position:absolute; bottom:0; left:50%; width:1px; height:4px; background:var(--ink-faint); opacity:0.5;}
  .task-pl-clear{border:1px solid var(--border); background:var(--surface); border-radius:6px; width:24px; height:24px; cursor:pointer; color:var(--ink-soft); font-size:14px; line-height:1;}
  .task-pl-clear:hover{border-color:var(--red); color:var(--red);}
  .task-pl-save{border:none; background:linear-gradient(135deg, var(--green-bright) 0%, var(--green) 55%, var(--green-deep) 100%); color:#fff; border-radius:6px; padding:4px 12px; font-size:11.5px; font-weight:600; cursor:pointer;}
  .task-pl-save:active{transform:translateY(1px);}

  [data-action]{cursor:pointer;}
  [data-action]:not(select):not(input):not(textarea):not(button):not(.btn):not(.card):not(.gantt-bar-outline):not(.cal-strip):not(.cal-task-chip):not(.lifecycle-edit-btn):not(.add-person-btn):not(.notes-toggle):not(.remove-x):not(.eye-toggle):not(.sidebar-reopen):not(tr):hover{
    background-color:rgba(34,32,28,0.045);
    border-radius:6px;
  }
  select[data-action]:hover, input[data-action]:hover{border-color:var(--ink-soft);}
  .cal-strip:hover{filter:brightness(0.85); transform:scaleY(1.4);}
  .cal-task-chip:hover{filter:brightness(0.94);}
  tr[data-action]:hover{background:var(--gray-soft);}

  .todo-sidebar{width:260px; flex-shrink:0; border-right:1px solid var(--border); padding:20px 18px; box-sizing:border-box; align-self:stretch; background:linear-gradient(165deg, var(--surface-2) 0%, var(--gray-soft) 100%); border-radius:var(--radius-lg) 0 0 var(--radius-lg);}
  .todo-sidebar-head{display:flex; align-items:center; justify-content:space-between;}
  .todo-sidebar-item{display:flex; align-items:center; gap:8px; background:var(--surface); border-radius:8px; padding:8px 10px; font-size:12.5px;}
  .sidebar-reopen{width:28px; align-self:stretch; flex-shrink:0; border:none; border-right:1px solid var(--border); background:var(--surface-2); color:var(--ink-soft); cursor:pointer; display:flex; align-items:center; justify-content:center; border-radius:var(--radius-lg) 0 0 var(--radius-lg);}
  .sidebar-reopen:hover{color:var(--green);}
  .notes-panel{background:var(--gray-soft); border-radius:7px; padding:8px 10px; margin:6px 0 0; width:100%;}
  .note-item{font-size:12px; padding:4px 0; border-top:1px solid var(--border);}
  .note-item:first-child{border-top:none;}
  .note-meta{color:var(--ink-soft); font-size:10.5px;}
  .note-add{display:flex; gap:6px; margin-top:6px;}
  .note-add input{flex:1; border:1px solid var(--border); border-radius:6px; padding:5px 8px; font-size:12px;}

  .velocity-chart{display:flex; align-items:flex-end; gap:5px; height:150px; padding-top:8px;}
  .velocity-bar-col{flex:1; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; gap:5px; min-width:0;}
  .bar-glaze{background-image:linear-gradient(180deg, rgba(255,255,255,0.65) 0%, rgba(255,255,255,0.08) 38%, rgba(0,0,0,0.16) 100%); box-shadow:inset 0 1px 0 rgba(255,255,255,0.45), inset 0 -2px 2px rgba(0,0,0,0.18); filter:brightness(1.06) saturate(1.08);}
  .velocity-bar{width:100%; max-width:24px; border-radius:4px 4px 2px 2px; background-color:var(--chart-completed); min-height:3px; transition:height .25s var(--ease), background-color .15s var(--ease); box-shadow:0 2px 5px rgba(47,143,111,0.30), inset 0 1px 0 rgba(255,255,255,0.35), inset 0 -1px 1px rgba(0,0,0,0.12);}
  .velocity-bar-col.is-current .velocity-bar{background-color:var(--green-bright); box-shadow:0 3px 7px rgba(31,203,143,0.4), inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -1px 1px rgba(0,0,0,0.12);}
  .velocity-count{font-size:10.5px; font-weight:700; color:var(--ink); font-family:var(--font-mono);}
  .velocity-count.zero{color:var(--ink-faint); font-weight:400;}
  .velocity-label{font-size:9px; color:var(--ink-faint); white-space:nowrap;}

  /* ---- login ---- */
  .login-wrap{min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; position:relative; background:
    radial-gradient(1100px 520px at 15% -10%, rgba(19,133,99,0.10), transparent 60%),
    radial-gradient(900px 480px at 105% 110%, rgba(252,73,13,0.08), transparent 55%), var(--bg);}
  .login-lang{position:absolute; top:20px; right:20px;}
  .login-card{width:100%; max-width:380px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:32px 30px; box-shadow:var(--shadow-lg); text-align:left;}
  .login-card img{display:block;}

  /* ---- confirm modal ---- */
  .confirm-overlay{position:fixed; inset:0; z-index:110; background:rgba(34,32,28,0.35); backdrop-filter:blur(3px); -webkit-backdrop-filter:blur(3px); display:flex; align-items:center; justify-content:center; padding:20px; animation:fadeIn .14s var(--ease);}
  .confirm-modal{width:min(380px,92vw); background:var(--surface); border-radius:var(--radius-lg); box-shadow:var(--shadow-lg); padding:24px; text-align:center; animation:popIn .18s var(--ease);}
  .confirm-modal-icon{width:42px; height:42px; border-radius:50%; background:var(--red-soft); color:var(--red); display:flex; align-items:center; justify-content:center; margin:0 auto 14px;}
  .confirm-modal-msg{font-size:13.5px; color:var(--ink); line-height:1.55; margin-bottom:20px;}
  .confirm-modal-actions{display:flex; gap:10px; justify-content:center;}
  .confirm-modal-actions .btn{min-width:88px;}

  /* ---- command palette ---- */
  .cmdk-overlay{position:fixed; inset:0; z-index:100; background:rgba(34,32,28,0.32); backdrop-filter:blur(3px); -webkit-backdrop-filter:blur(3px); display:flex; align-items:flex-start; justify-content:center; padding-top:12vh; animation:fadeIn .14s var(--ease);}
  @keyframes fadeIn{from{opacity:0;} to{opacity:1;}}
  .cmdk{width:min(560px,92vw); background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); box-shadow:var(--shadow-lg); overflow:hidden; animation:popIn .18s var(--ease);}
  @keyframes popIn{from{opacity:0; transform:translateY(-8px) scale(.98);} to{opacity:1; transform:none;}}
  .cmdk-input-wrap{display:flex; align-items:center; gap:10px; padding:15px 18px; border-bottom:1px solid var(--border);}
  .cmdk-input-wrap svg{width:18px; height:18px; color:var(--ink-faint); flex-shrink:0;}
  .cmdk-input{flex:1; border:none; outline:none; font-size:15.5px; background:transparent; color:var(--ink);}
  .cmdk-input::placeholder{color:var(--ink-faint);}
  .cmdk-list{max-height:min(420px,54vh); overflow-y:auto; padding:8px;}
  .cmdk-group{font-size:10px; text-transform:uppercase; letter-spacing:0.8px; color:var(--ink-faint); padding:10px 12px 5px;}
  .cmdk-item{display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:var(--radius-sm); cursor:pointer; font-size:13.5px; color:var(--ink); transition:background-color .1s var(--ease);}
  .cmdk-item:hover{background:var(--surface-2);}
  .cmdk-item .cmdk-ico{width:20px; height:20px; border-radius:6px; background:var(--surface-2); display:flex; align-items:center; justify-content:center; flex-shrink:0; color:var(--ink-soft); transition:transform .12s var(--ease);}
  .cmdk-item .cmdk-ico svg{width:13px; height:13px;}
  .cmdk-item.sel .cmdk-ico{transform:scale(1.08);}
  .cmdk-item .cmdk-meta{margin-left:auto; font-size:11px; color:var(--ink-faint);}
  .cmdk-item.sel{background:var(--green-soft);}
  .cmdk-item.sel .cmdk-ico{background:#fff; color:var(--green-deep);}
  .cmdk-ico.tone-project{background:var(--green-soft); color:var(--green-deep);}
  .cmdk-ico.tone-person{background:#E3ECFB; color:#2F5FBF;}
  .cmdk-ico.tone-task{background:var(--amber-soft); color:var(--amber);}
  .cmdk-ico.tone-note{background:var(--gray-soft); color:var(--ink-soft);}
  .cmdk-ico.tone-phase{background:#EFE6FA; color:#7A4FC9;}
  .cmdk-item.sel .cmdk-ico.tone-project, .cmdk-item.sel .cmdk-ico.tone-person, .cmdk-item.sel .cmdk-ico.tone-task, .cmdk-item.sel .cmdk-ico.tone-note, .cmdk-item.sel .cmdk-ico.tone-phase{background:#fff;}
  .cmdk-empty{padding:30px 16px; text-align:center; color:var(--ink-faint); font-size:13px; animation:emptyFadeIn .25s var(--ease) both;}
  .cmdk-foot{display:flex; gap:16px; padding:9px 16px; border-top:1px solid var(--border); font-size:10.5px; color:var(--ink-faint); background:var(--surface-2);}
  .cmdk-foot .kbd{font-family:var(--font-mono); border:1px solid var(--border); border-radius:4px; padding:0 4px; margin-right:4px; background:#fff;}

  /* ---- toasts ---- */
  .toast-wrap{position:fixed; bottom:24px; right:24px; z-index:120; display:flex; flex-direction:column; gap:10px; align-items:flex-end;}
  .toast{display:flex; align-items:center; gap:11px; color:#fff; padding:11px 15px; border-radius:var(--radius); font-size:13px; font-weight:500; max-width:340px; animation:toastIn .28s var(--ease);}
  .toast.success{background:linear-gradient(135deg, var(--green-bright) 0%, var(--green) 55%, var(--green-deep) 100%); box-shadow:0 2px 10px rgba(19,133,99,0.32), inset 0 1px 0 rgba(255,255,255,0.18), var(--shadow-lg);}
  .toast.warn{background:linear-gradient(135deg, #FF8F63 0%, var(--ember) 55%, #C93A0A 100%); box-shadow:0 2px 10px rgba(252,73,13,0.32), inset 0 1px 0 rgba(255,255,255,0.18), var(--shadow-lg);}
  .toast.info{background:linear-gradient(135deg, #D2CDBE 0%, var(--gray) 55%, #8B8776 100%); color:var(--ink); box-shadow:0 2px 10px rgba(34,32,28,0.18), inset 0 1px 0 rgba(255,255,255,0.25), var(--shadow-lg);}
  .toast.out{animation:toastOut .24s var(--ease) forwards;}
  .toast .toast-ico{width:18px; height:18px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; background:rgba(255,255,255,0.25); color:#fff;}
  .toast.info .toast-ico{background:rgba(34,32,28,0.12); color:var(--ink);}
  .toast .toast-ico svg{width:11px; height:11px; stroke-width:3;}
  @keyframes toastIn{from{opacity:0; transform:translateY(12px) scale(.96);} to{opacity:1; transform:none;}}
  @keyframes toastOut{to{opacity:0; transform:translateX(16px);}}

  /* ---- empty states ---- */
  .empty-state{text-align:center; padding:44px 20px; border:1px dashed var(--border-strong); border-radius:var(--radius-lg); background:var(--surface-2); animation:emptyFadeIn .35s var(--ease) both;}
  .empty-state .empty-ico{width:48px; height:48px; margin:0 auto 14px; border-radius:14px; background:linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; color:var(--ink-faint); box-shadow:var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.5); animation:emptyFloat 3.2s ease-in-out infinite;}
  .empty-state .empty-ico svg{width:22px; height:22px;}
  .empty-state .empty-title{font-family:var(--font-display); font-size:16px; margin-bottom:4px;}
  .empty-state .empty-sub{font-size:12.5px; color:var(--ink-soft); max-width:320px; margin:0 auto 14px;}
  @keyframes emptyFadeIn{from{opacity:0; transform:translateY(6px);} to{opacity:1; transform:none;}}
  @keyframes emptyFloat{0%,100%{transform:translateY(0);} 50%{transform:translateY(-4px);}}

  .empty-row{animation:emptyFadeIn .3s var(--ease) both;}
  .empty-row-ico{transition:transform .2s var(--ease);}
  .empty-row:hover .empty-row-ico{transform:scale(1.08) rotate(-4deg);}

  @media (prefers-reduced-motion: reduce){
    *{animation-duration:.001ms !important; transition-duration:.001ms !important; scroll-behavior:auto !important;}
  }

  @media print{
    .topbar, .tabs, .nav-rail, .bottom-nav, .btn, button, select, .inline-form, .filter-bar, .toast-wrap, .cmdk-overlay { display:none !important; }
    body{background:#fff;}
    .content{padding:0;}
    table.insights{page-break-inside:avoid;}
  }

  @media (max-width:900px){
    :root{--nav-w:0px;}
    .nav-rail{display:none;}
    .main-col{padding-bottom:64px;}
    .topbar-menu-btn{display:inline-flex;}
    .topbar-desktop-ctl{display:none;}
    .mobile-brand{display:none !important;}
    .page-head{display:flex !important;}
  }
  .mobile-brand{display:none;}

  @media (max-width:640px){
    body{padding-bottom:64px;}
    .floating-back{bottom:calc(64px + env(safe-area-inset-bottom) + 12px); left:14px; height:38px; padding:0 14px 0 11px;}
    /* activity log: keep long entries readable and the toolbar tidy */
    .attention-row{align-items:flex-start; gap:9px; padding:11px 12px;}
    .attention-dot{margin-top:6px;}
    .attention-meta{margin-left:auto;}
    .act-tools{gap:8px;}
    .act-search{flex:1 1 100%; min-width:0;}
    .act-range{flex:1 1 auto;}
    .act-range button{flex:1;}
    .act-export-btn{flex:1 1 auto; justify-content:center;}
    .topbar{padding:0 14px; gap:12px; height:56px;}
    .topbar-menu-btn{display:none;}
    .page-head{display:flex;}
    .page-sub{display:none;}
    .page-title{font-size:16px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
    .topbar-controls{gap:8px; font-size:12px; justify-content:flex-end;}
    .content{padding:16px; margin:10px; border-radius:var(--radius);}
    .content[style*="display:flex"]{flex-direction:column; padding:0 !important;}
    .todo-sidebar{width:100%; border-right:none; border-bottom:1px solid var(--border); border-radius:var(--radius) var(--radius) 0 0;}
    .sidebar-reopen{width:100%; height:32px; border-right:none; border-bottom:1px solid var(--border); border-radius:var(--radius) var(--radius) 0 0;}
    .breadcrumb{margin:-16px -16px 14px; padding:10px 16px; top:56px; border-radius:var(--radius) var(--radius) 0 0;}
    .tabs{display:none;}
    .brand-logo{height:32px;}
    .brand-sub{display:none;}
    .grid-cards{grid-template-columns:1fr;}
    .metric-grid{grid-template-columns:repeat(2,1fr);}
    .task-row{flex-wrap:wrap;}
    .task-name{width:100%; order:-1; margin-bottom:4px;}
    .project-row{flex-wrap:wrap; gap:8px;}
    .project-name-block{width:100%;}
    .project-row-pct{width:auto; text-align:left;}
    .project-row-meta{width:100%; flex-direction:row; gap:10px;}
    .inline-form{flex-direction:column; align-items:stretch;}
    .inline-form input, .inline-form select{width:100%;}

    .bottom-nav{
      display:flex; position:fixed; bottom:0; left:0; right:0; z-index:40;
      background:var(--glass-solid); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px);
      border-top:1px solid var(--border); overflow-x:auto;
      padding:7px 6px calc(7px + env(safe-area-inset-bottom));
    }
    .bottom-nav::-webkit-scrollbar{display:none;}
    .bottom-nav-item{flex:1 1 0; min-width:52px; text-align:center; font-size:10px; color:var(--ink-soft); padding:5px 2px 3px; border-radius:var(--radius-sm); border:none; background:transparent; display:flex; flex-direction:column; align-items:center; gap:2px; cursor:pointer;}
    .bottom-nav-icon{position:relative; display:flex; align-items:center; justify-content:center;}
    .bottom-nav-icon svg{width:21px; height:21px; stroke-width:1.9;}
    .bottom-nav-label{font-size:9.5px; line-height:1.1; letter-spacing:0.1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:60px;}
    .bottom-nav-badge{position:absolute; top:-5px; right:-9px; min-width:15px; height:15px; padding:0 4px; border-radius:var(--radius-full); background:var(--ember); color:#fff; font-size:9px; font-weight:700; font-family:var(--font-mono); display:flex; align-items:center; justify-content:center; box-shadow:0 0 0 2px rgba(255,255,255,0.94);}
    .bottom-nav-item.active{color:var(--green-deep); font-weight:600;}
    .bottom-nav-item.active .bottom-nav-icon{background:var(--green-soft); border-radius:var(--radius-full); padding:3px 10px; margin-bottom:1px;}
    /* prevent iOS auto-zoom on focus: form controls must be >=16px */
    select, input, textarea, .user-select, .detail-title-input{font-size:16px !important;}
    /* larger tap targets for icon buttons */
    .lifecycle-edit-btn, .project-menu-btn, .nav-foot-menu, .remove-x, .caret{min-width:34px; min-height:34px; display:inline-flex; align-items:center; justify-content:center;}
    .btn{padding:10px 14px;}
    /* project title scales down on small screens */
    .detail-project-title{font-size:20px;}
    .detail-title-row{gap:8px;}
    /* wide tables scroll instead of overflowing the card */
    table.insights{display:block; overflow-x:auto; white-space:nowrap; -webkit-overflow-scrolling:touch;}
    /* detail stats stack vertically so date text is never crushed */
    .detail-stat-row{flex-direction:column; gap:8px;}
    .detail-stat-grid{grid-template-columns:repeat(2, 1fr); gap:8px;}
    .detail-stat{flex:1 1 100%; width:100%; min-width:0; padding:11px 14px;}
    /* project detail header: let it breathe, keep the menu clear of the ring */
    .row-between{flex-wrap:wrap; gap:12px; row-gap:12px;}
    .project-menu-dropdown{z-index:70;}
    /* surface the search palette on mobile (sidebar is hidden) */
    .topbar-search-btn{display:inline-flex;}
    /* task rows: check + name together on top line, controls below */
    .task-row{align-items:flex-start;}
    .task-check{order:0; margin-top:1px;}
    .task-name{width:auto; flex:1; order:0; margin-bottom:0;}
    .status-select{order:1;}
    .task-due, .notes-toggle{order:2;}
    /* contractor triage view on phones */
    .focus-hello{font-size:21px;}
    .triage-pill{min-width:70px; padding:9px 12px;}
    .triage-num{font-size:21px;}
    .tcard-main{padding:12px 12px;}
    .tcard-name{font-size:15px;}
    .tcard-status{font-size:16px !important; padding:5px 26px 5px 12px; background-position:right 10px center;}
    .tcard-sub{padding-left:0; margin-top:9px; flex-wrap:wrap;}
    .mytasks-toggle{width:100%;}
    .mytasks-toggle button{flex:1;}
    /* task rows: title on the top line; date, chips + status pill always drop to the line below it */
    .task-item{padding:12px 10px;}
    .task-item-main{flex-wrap:wrap; gap:4px 9px;}
    .task-item-main .task-check{flex:0 0 auto;}
    .task-item-main .task-name{flex:1 1 auto; min-width:0; font-size:15px;}
    .tim-break{display:block; flex:0 0 100%; width:100%; height:0; margin:0; padding:0;}
    .task-item-main .task-status-pill, .task-item-main .task-due-chip,
    .task-item-main .cadence-chip, .task-item-main .task-verify-chip{margin-left:0;}
    .task-item-sub{padding-left:0; gap:10px 14px; margin-top:10px;}
    /* filters sit beneath their heading instead of alongside it */
    .ro-field{flex-direction:column; gap:7px; align-items:stretch;}
    .ro-label{flex:none; padding-top:0;}
    .ro-period{width:100%;}
    .ro-period button{flex:1;}
    .report-head-row{gap:8px;}
    .report-head-row .btn{flex:1;}
    /* managing company status tabs: let them scroll rather than crush */
    .mgtabs{flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; margin-left:0; padding-bottom:4px;}
    .mgtabs::-webkit-scrollbar{display:none;}
    .mgtab{flex:0 0 auto;}
  }
  @media print{
    body.printing-report .topbar, body.printing-report .app-sidebar, body.printing-report aside,
    body.printing-report .bottom-nav, body.printing-report .mytasks-toggle, body.printing-report .report-print-btn,
    body.printing-report .report-customize-btn, body.printing-report .report-options,
    body.printing-report .drawer, body.printing-report .toast, body.printing-report .fab{ display:none !important; }
    body.printing-report .phase-body.collapsed{ max-height:none !important; }
  }

/* =====================================================================
   Adjustments for the Blade rebuild
   =====================================================================
   Everything above this line is the prototype's stylesheet, unchanged.
   This block only adds what the rebuild needs:

     · the language toggle is now a link rather than a button, so it needs
       the same rules the button already had
     · the log-out control now sits inside a form, which broke its
       right-alignment in the nav footer
     · the auth screens carry classes instead of the inline styles the
       prototype used, so sizing is controlled here rather than in markup

   No colour, no layout and no component was redefined.
   ===================================================================== */

/* ---- the segmented toggle now holds links as well as buttons ---- */
.role-toggle a{
    border:none; background:transparent; padding:6px 13px; font-size:12px;
    color:var(--ink-soft); border-right:1px solid var(--border);
    text-decoration:none; display:inline-flex; align-items:center;
    transition:background-color .13s var(--ease), color .13s var(--ease);
}
.role-toggle a:last-child{border-right:none;}
.role-toggle a:hover{color:var(--ink);}
.role-toggle a.active{
    background:linear-gradient(135deg, var(--green-bright) 0%, var(--green) 55%, var(--green-deep) 100%);
    color:#fff; box-shadow:inset 0 1px 0 rgba(255,255,255,0.2);
}

/* ---- log-out is a form post, so the form takes the button's place ---- */
.nav-foot form{margin-left:auto; display:flex;}
.nav-foot form .nav-foot-menu{margin-left:0;}

/* ---- a card that is information, not a link ---- */
.card-static{cursor:default;}
.card-static:hover{transform:none; box-shadow:0 1px 2px rgba(34,32,28,0.06), 0 4px 10px rgba(34,32,28,0.05); border-color:var(--border);}
.card-static:active{transform:none;}

/* ---- sign-in, reset, claim and change-password screens ---- */
.login-wrap{min-height:100dvh; overflow-y:auto;}
.login-card{max-width:min(408px, 94vw); padding:36px 34px;}
.login-card .auth-logo{height:60px; width:auto; margin-bottom:18px;}
.login-card .auth-eyebrow{
    font-size:11px; font-weight:600; letter-spacing:2.6px; color:var(--green);
    text-transform:uppercase; margin-bottom:22px;
}
.auth-title{font-size:23px; line-height:1.25; margin:0 0 4px;}
.auth-hint{font-size:13.5px; color:var(--ink-soft); line-height:1.55; margin:0 0 22px;}

.auth-label{
    display:block; font-size:12.5px; font-weight:500; color:var(--ink-soft);
    margin-bottom:6px;
}
.auth-input{
    width:100%; border:1px solid var(--border); border-radius:var(--radius-sm);
    padding:11px 13px; font-size:15px; line-height:1.4; color:var(--ink);
    background:var(--surface); margin-bottom:16px;
}
.auth-input::placeholder{color:var(--ink-faint);}
.auth-error{font-size:12.5px; color:var(--red); margin:-10px 0 14px;}

.auth-alert{
    font-size:12.5px; line-height:1.5; padding:10px 13px;
    border-radius:var(--radius-sm); margin-bottom:16px;
    color:var(--green); background:var(--green-soft);
}
.auth-alert-error{color:var(--red); background:var(--red-soft);}

.auth-remember{
    display:flex; align-items:center; gap:8px; font-size:13px;
    color:var(--ink-soft); margin:2px 0 20px; cursor:pointer;
}
.auth-remember input{width:15px; height:15px; accent-color:var(--green); cursor:pointer;}

.auth-submit{width:100%; padding:12px; font-size:14.5px; font-weight:600;}
.auth-secondary{width:100%; padding:10px; font-size:13px; margin-top:10px;}

.auth-link{
    display:block; text-align:center; font-size:12.5px; margin:16px 0 0;
    color:var(--green); text-decoration:none;
}
.auth-link:hover{text-decoration:underline;}
.auth-footer{
    font-size:11.5px; color:var(--ink-faint); line-height:1.55;
    text-align:center; margin:18px 0 0;
}

@media (max-width: 480px){
    .login-wrap{padding:18px; align-items:flex-start; padding-top:8vh;}
    .login-card{padding:28px 22px;}
    .auth-title{font-size:21px;}
}

/* ---- the permission matrix ---- */
.grant-scope{
    border:1px solid var(--border); border-radius:6px; padding:5px 8px;
    font-size:12px; background:var(--surface); color:var(--ink); min-width:132px;
}
.grant-scope:disabled{opacity:0.6; cursor:not-allowed;}
.grant-save-bar{
    position:sticky; bottom:0; z-index:5; display:flex; align-items:center;
    justify-content:space-between; gap:16px; flex-wrap:wrap;
    margin-top:18px; padding:14px 18px;
    border:1px solid var(--border); border-radius:var(--radius);
    background:var(--glass); backdrop-filter:saturate(1.4) blur(10px);
    -webkit-backdrop-filter:saturate(1.4) blur(10px);
    box-shadow:var(--shadow-md);
}

/* ---- labelled form fields ----
   A date input ignores `placeholder` — the browser shows dd/mm/yyyy and
   nothing about what the date is for. These give every field a small
   label above it while keeping the prototype's inline row layout. */
.field-row{display:flex; flex-wrap:wrap; gap:10px; align-items:flex-end; margin:14px 0 4px;}
.field{display:flex; flex-direction:column; gap:4px; min-width:0;}
.field-grow{flex:1; min-width:160px;}
.field-label{
    font-size:10.5px; font-weight:600; letter-spacing:0.4px; text-transform:uppercase;
    color:var(--ink-faint); padding-left:2px;
}
.field-label .optional{font-weight:500; text-transform:none; letter-spacing:0; color:var(--ink-faint); opacity:0.75;}
.field input, .field select{
    border:1px solid var(--border); border-radius:7px; padding:7px 10px;
    font-size:12.5px; background:var(--surface); color:var(--ink); width:100%;
}
.field-actions{display:flex; align-items:flex-end; gap:8px;}
.field-hint{font-size:11px; color:var(--ink-faint); margin:6px 0 0;}

/* ---- the verified archive ----
   The prototype's collapsible archive, now a native <details>. */
.verified-archive > summary.verified-toggle{
    display:inline-flex; align-items:center; gap:7px; cursor:pointer;
    font-size:11px; font-weight:700; letter-spacing:0.4px; text-transform:uppercase;
    color:var(--completed); background:var(--completed-soft);
    border-radius:var(--radius-full); padding:4px 12px; list-style:none;
}
.verified-archive > summary.verified-toggle::-webkit-details-marker{display:none;}
.verified-archive .verified-count{font-family:var(--font-mono); font-weight:600; opacity:0.75;}

/* ---- links that are not link-shaped ----
   The prototype built every clickable thing from <div>s driven by
   JavaScript. They are real anchors now, so by default they arrive
   underlined and browser-blue — which is not what any of these are
   meant to look like.

   This was a list of class names, and the list kept being wrong: a row
   or a chip added later arrived underlined again, and the underline
   spread to every word inside it. So the rule is inverted. Inside the
   signed-in shell nothing is underlined unless it opts in, and the two
   places that genuinely want link styling say so below.

   Only descendants of #app, so the sign-in screens are untouched. */
#app a{text-decoration:none;}
#app a:hover{text-decoration:none;}

/* :where() carries no specificity, so this sets the default colour without
   beating the class rules that give particular links their own — an id
   selector would have overridden every one of them. */
:where(#app a){color:inherit;}

/* The exceptions: prose links that should look like links. */
#app a.is-link,
#app .prose a{
    color:var(--green-deep);
}
#app a.is-link:hover,
#app .prose a:hover{
    text-decoration:underline;
    text-underline-offset:2px;
}
#app a.att-name:hover,
#app a.exp-doc-view:hover{
    text-decoration:underline;
    text-underline-offset:2px;
}

.auth-link{text-decoration:none;}
.auth-link:hover{text-decoration:underline;}
.breadcrumb:hover{color:var(--green);}

/* ---- pipeline grid additions ---- */
.pl-notice{
    position:fixed; left:50%; bottom:26px; transform:translateX(-50%); z-index:200;
    background:var(--ink); color:var(--surface); font-size:12.5px; font-weight:500;
    padding:9px 16px; border-radius:var(--radius-full); box-shadow:var(--shadow-lg);
}
.pl-notice.warn{background:var(--red); color:#fff;}
.pl-readonly{cursor:default;}

/* ---- the project strip is per stage, and part-done stages part-fill ----
   The segment becomes the neutral track and the fill carries the colour,
   so "Construction, 9% done" no longer looks the same as "Construction,
   nearly finished". Only applied where a percentage exists; a complete or
   untouched stage keeps the prototype's solid segment exactly as it was. */
.phase-seg.has-fill{
    background:var(--gray-soft);
    box-shadow:inset 0 0 0 1px var(--border);
}
.phase-seg.has-fill::after{display:none;}   /* the shimmer would run over the track */
.phase-seg-fill{
    position:absolute; left:0; top:0; bottom:0;
    border-radius:3px 0 0 3px;
    transition:width .3s var(--ease);
}
.phase-seg-fill.seg-fill-in_progress{background:var(--amber);}
.phase-seg-fill.seg-fill-blocked{background:var(--red);}
.phase-seg-fill.seg-fill-not_started{background:var(--gray);}

/* =====================================================================
   Responsive: the screens added during the rebuild
   =====================================================================
   The prototype's own @media blocks cover everything it had. These cover
   what came after — the build schedule, the stage cards, the directory
   tables and the filter rows — so none of them force a sideways scroll
   of the whole page on a phone.
   ===================================================================== */

@media (max-width:900px){
    /* The schedule keeps its own horizontal scroll, but the label column
       must not eat half a narrow screen. */
    .gs-wrap{--gs-label-w:132px;}
}

@media (max-width:640px){
    .gs-wrap{--gs-label-w:104px;}
    .gs-header,
    .gs-body{min-width:calc(var(--gs-label-w) + 320px);}
    .gs-month-track,
    .gs-track{min-width:320px;}
    .gs-month{font-size:9px; padding-left:3px;}
    .gs-task-label{padding:4px 6px 4px 10px;}
    .gs-task-name{font-size:11px;}
    .gs-proj-row{font-size:12.5px; padding:8px 10px;}
    .gs-comp-row{padding:5px 10px 5px 14px; font-size:9px;}
    .gs-summary{flex-wrap:wrap; gap:8px;}
    .gs-stat{flex:1 1 calc(50% - 4px); min-width:0; padding:10px 12px;}
    .gs-stat-num{font-size:22px;}

    /* Forms: one field per line rather than four squeezed onto one. */
    .field-row{gap:8px;}
    .field-row > .field,
    .field-grow{flex:1 1 100%; min-width:0;}
    .field-actions{width:100%;}
    .field-actions .btn{flex:1;}

    /* Segmented toggles wrap instead of overflowing their row. */
    .role-toggle{flex-wrap:wrap; width:100%;}
    .role-toggle a,
    .role-toggle button{flex:1 1 auto; justify-content:center; text-align:center;}

    /* Stage cards: name, order and Save stack rather than collide. */
    .card .field-row{margin-top:0;}

    /* The directory and report tables scroll rather than overflow the
       card — table.insights already does; these are the wrappers. */
    .report-project-body,
    .insights-section{padding:12px;}

    /* Calendar chips are already tiny; keep the legend from wrapping into
       a wall of text. */
    .cal-legend{gap:8px; font-size:11px;}
}

@media (max-width:420px){
    .gs-wrap{--gs-label-w:88px;}
    .gs-stat{flex:1 1 100%;}
    .metric-grid{grid-template-columns:1fr;}
}

/* ---- stages fold, using the prototype's own phase block ----
   <details>/<summary> does the folding, so it works with JavaScript off
   and the caret follows [open] rather than a class somebody has to
   remember to toggle. The summary has to be told to be a flex row —
   its default display is list-item, which would break .phase-head. */
.stage-block > summary.phase-head{
    display:flex;
    flex-wrap:wrap;
    list-style:none;
    align-items:center;
}
.stage-block > summary.phase-head::-webkit-details-marker{display:none;}
.stage-block > summary.phase-head::marker{content:"";}
.stage-block > summary:focus-visible{outline:2px solid var(--green); outline-offset:-2px;}

.stage-block > summary .caret{
    color:var(--ink-faint);
    transition:transform .15s var(--ease);
    flex-shrink:0;
}
.stage-block:not([open]) > summary .caret{transform:rotate(-90deg);}

/* The progress bar sits on its own line inside the head, bleeding to the
   block edges, so it reads whether the stage is folded or open. */
.stage-block > summary .stage-bar{
    flex:1 0 100%;
    display:block;
    margin:10px -14px -12px;
}

.stage-block .phase-body{padding:12px 14px 14px;}
.stage-tools{
    display:flex; flex-wrap:wrap; align-items:flex-end; gap:10px;
    padding-bottom:12px; margin-bottom:6px;
    border-bottom:1px dashed var(--border);
}
.stage-tools form{margin:0;}

/* Expand all / collapse all */
.stage-bulk{
    display:inline-flex; gap:10px; align-items:center;
    margin-left:auto; font-size:11.5px; font-weight:500;
}
.stage-bulk button{
    border:none; background:transparent; padding:0; cursor:pointer;
    color:var(--ink-faint); font-size:11.5px;
}
.stage-bulk button:hover{color:var(--green-deep);}

@media (max-width:640px){
    .stage-block > summary.phase-head{padding:11px 12px; gap:8px;}
    .stage-block > summary .stage-bar{margin:9px -12px -11px;}
    .stage-block .phase-body{padding:11px 12px 12px;}
    .phase-title{font-size:14px; white-space:normal;}
    .phase-count{font-size:10.5px;}
    .stage-tools{gap:8px;}
    .stage-tools form{width:100%;}
}

/* ---- the phone's version of the sidebar footer ----
   Appearance, language and log out lived only in the nav rail, which is
   hidden below 900px. On a phone that left no way to change the theme,
   no way to switch language, and — worse — no way to sign out.

   A <details>, so it opens without JavaScript. Hidden on desktop, where
   the rail and the topbar controls already carry all three. */
.mctl{display:none; position:relative;}

.mctl > summary.mctl-btn{
    list-style:none; cursor:pointer; display:inline-flex; align-items:center;
    padding:0; border-radius:var(--radius-full);
}
.mctl > summary.mctl-btn::-webkit-details-marker{display:none;}
.mctl > summary.mctl-btn::marker{content:"";}
.mctl > summary:focus-visible{outline:2px solid var(--green); outline-offset:2px;}
.mctl > summary .avatar{
    width:32px; height:32px; font-size:12px;
    background:var(--green-soft); color:var(--green-deep); margin:0;
}

.mctl-panel{
    position:absolute; right:0; top:calc(100% + 8px); z-index:120;
    width:min(260px, calc(100vw - 28px));
    background:var(--surface); border:1px solid var(--border);
    border-radius:var(--radius); box-shadow:var(--shadow-lg);
    padding:14px;
}
.mctl-who{padding-bottom:10px; margin-bottom:10px; border-bottom:1px solid var(--border);}
.mctl-name{font-size:13.5px; font-weight:600; color:var(--ink);}
.mctl-role{font-size:11.5px; color:var(--ink-soft); margin-top:2px;}

/* The segmented toggles fill the panel rather than sitting at their
   natural width, which on a 260px panel looks like a mistake. */
.mctl-row{width:100%;}
.mctl-row button,
.mctl-row a{flex:1; justify-content:center; text-align:center;}

.mctl-out{
    width:100%; display:inline-flex; align-items:center; justify-content:center;
    gap:7px; color:var(--red); border-color:var(--red-soft);
}
.mctl-out:hover{border-color:var(--red);}
.mctl-out svg{width:15px; height:15px;}

@media (max-width:900px){
    .mctl{display:block;}
}

/* ---- the navigation gap between 640px and 900px ----
   The nav rail hides at 900px. The bottom bar only appeared at 640px.
   Between the two — tablets, and any phone held sideways — there was no
   navigation on the screen at all: no sidebar, no bottom bar, no way to
   leave the page you were on.

   The bottom bar now starts the moment the rail stops. The 640px block
   further up still refines it for small phones; this only fills the gap. */
@media (max-width:900px){
    .bottom-nav{
        display:flex; position:fixed; bottom:0; left:0; right:0; z-index:40;
        background:var(--glass-solid);
        backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px);
        border-top:1px solid var(--border); overflow-x:auto;
        padding:7px 6px calc(7px + env(safe-area-inset-bottom));
    }
    .bottom-nav::-webkit-scrollbar{display:none;}
    .bottom-nav-item{
        flex:1 1 0; min-width:56px; text-align:center; font-size:10.5px;
        color:var(--ink-soft); padding:5px 2px 3px; border-radius:var(--radius-sm);
        border:none; background:transparent; display:flex; flex-direction:column;
        align-items:center; gap:2px; cursor:pointer; text-decoration:none;
    }
    .bottom-nav-icon{position:relative; display:flex; align-items:center; justify-content:center;}
    .bottom-nav-icon svg{width:21px; height:21px; stroke-width:1.9;}
    .bottom-nav-label{
        font-size:10px; line-height:1.1; white-space:nowrap;
        overflow:hidden; text-overflow:ellipsis; max-width:72px;
    }
    .bottom-nav-item.active{color:var(--green-deep); font-weight:600;}
    .bottom-nav-item.active .bottom-nav-icon{
        background:var(--green-soft); border-radius:var(--radius-full);
        padding:3px 10px; margin-bottom:1px;
    }

    /* Room for it, so the bar never sits on top of the last row of content. */
    body{padding-bottom:68px;}
    .main-col{padding-bottom:68px;}
}
