button,input,select,textarea{font:inherit}button{touch-action:manipulation}
.settingsSync{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:18px;padding:18px 20px;background:#fff;border:1px solid #d9dde2}.settingsSync small{color:#1687ff;letter-spacing:1.4px}.settingsSync h3{margin-top:5px;font-size:17px}.settingsSync>span{display:flex;align-items:center;gap:8px;color:#59606a;font-size:11px}.settingsSync i{width:8px;height:8px;border-radius:50%;background:#8a929d}.settingsSync[data-state="loading"] i{background:#d99b28}.settingsSync[data-state="ok"] i{background:#22a06b}.settingsSync[data-state="error"] i{background:#c74444}.settingsSync[data-state="pending"] i{background:#1687ff}.settingsSync .syncApply{margin-left:6px;padding:7px 9px}
@media(max-width:900px){main{padding:25px 22px 92px}header{gap:18px}.headerButtons{flex-wrap:wrap;justify-content:flex-end}.toolbar{gap:12px;flex-wrap:wrap}.toolbar label{width:min(100%,310px)}.modal{width:min(480px,calc(100vw - 30px));max-height:88vh;overflow:auto}.teamPanel{width:min(860px,100vw)}}
@media(max-width:640px){body{display:block;overflow-x:hidden}aside{inset:auto 0 0 0;width:100%;height:68px;padding:0 8px;z-index:70;display:block;border-top:1px solid #343a45}aside .logo,aside .profile{display:none}aside nav{height:100%;display:grid;grid-template-columns:repeat(5,1fr);align-items:stretch}aside nav button{min-width:0;min-height:44px;padding:8px 2px;border:0;border-right:1px solid #303640;text-align:center;font-size:16px}aside nav button:last-child{border-right:0}aside nav button span{display:block;margin:4px 0 0;font-size:8px;overflow:hidden;text-overflow:ellipsis}main{margin-left:0;width:100%;padding:22px 14px 92px}header{align-items:flex-start;flex-direction:column;margin-bottom:23px}h1{font-size:34px;line-height:1.05}.headerButtons{width:100%;justify-content:flex-start}.headerButtons button{flex:1;min-height:44px}.quickNav{overflow-x:auto;grid-template-columns:repeat(4,minmax(62px,1fr))}.grid,.dgrid,.teamLayout,.teamPageGrid,.planningBody,.milestoneEdit{grid-template-columns:1fr!important}.detail{padding:20px 15px}.dhead{gap:12px;flex-direction:column}.dhead h2{font-size:28px}.toolbar{align-items:stretch;flex-direction:column}.toolbar label{width:100%}.toolbar>div{overflow-x:auto;white-space:nowrap}.welcome{overflow:auto;place-items:start center;padding:68px 0 95px}.welcomeInner{width:92vw}.welcomeInner>p{font-size:20px;margin-bottom:28px!important}.welcomeChoices{grid-template-columns:1fr}.welcomeChoices button{min-height:112px;padding:19px 18px}.authGate{align-items:flex-start!important;padding:55px 14px 90px!important;overflow:auto}.authBox{width:100%!important;max-width:430px;padding:25px 20px!important}.tutorialScreen{padding:20px 14px 90px!important}.tutorialHead{align-items:flex-start!important;flex-direction:column;gap:16px}.tutorialGrid{grid-template-columns:1fr!important}.teamPanel{padding:22px 15px 88px}.teamHead h2{font-size:30px}.peopleList{max-height:230px}.pieToolbar{align-items:stretch;flex-direction:column}.pieToolbar select,.pieSearch{width:100%;min-width:0}.pieStage{min-height:430px}.pieChart{transform:scale(.62);margin:-70px auto}.pieInfo{margin-top:-95px}.clientConstellation{grid-template-columns:repeat(2,minmax(0,1fr));padding:30px 5px;gap:24px 10px}.calendar{grid-template-columns:repeat(7,118px)}.modalbg{padding:15px}.modal footer{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}.modal footer button{min-height:44px}table{min-width:680px}.crossTable{min-width:900px}.view.active{overflow-x:auto}.settingsSync{align-items:flex-start;flex-direction:column}.toast{right:10px;bottom:122px;max-width:calc(100vw - 20px)}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* Branding, calendar quick-add and responsive refinements */
.logo{white-space:nowrap}.logoW{color:#1687ff}.logoRest{color:#fff}
.day[data-calendar-date]{cursor:pointer}.day[data-calendar-date]:hover{background:#eef6ff}.day[data-calendar-date]:hover .dayhead:after{content:"＋";margin-left:auto;color:#1687ff;font-weight:700}
#quickDeadlineModal .modal>p{color:#1687ff;font-size:10px;letter-spacing:1.5px;font-weight:700;margin:0 0 7px}
@media (max-width:1000px) and (min-width:641px){
  aside{width:82px;padding:28px 14px}
  aside .logo{font-size:27px;text-align:center}
  aside .logoRest{display:none}
  main{margin-left:82px;width:calc(100% - 82px);min-width:0}
  nav button span{display:none}
  nav button{text-align:center}
  .profile b{display:block;max-width:54px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px}
}
@media(max-width:640px){
  html,body{width:100%;max-width:100%;overflow-x:hidden}
  main{min-width:0;overflow:hidden}
  header,.view,.view.active{width:100%;max-width:100%;min-width:0}
  .view.active{overflow-x:hidden}
  .quickNav,.servicesSubNav,.annualReportScroll,.crossMatrix,.reportPlanningGrid,.tableWrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  table:not(.crossTable){display:block;max-width:100%;overflow-x:auto}
  .calendar{display:grid;grid-template-columns:1fr;overflow:visible}
  .calendar .weekday,.calendar .day.outside{display:none}
  .calendar .day{min-height:70px;border-right:0;padding:8px}
  .calendar .dayhead{text-align:left;display:flex;align-items:center;padding:4px 6px}
  .calendarEventButton{padding:10px}
  .calbar{align-items:flex-start;flex-wrap:wrap;gap:8px}
  .servicesHubIntro,.reportsFoundationHead,.historyHead{padding:20px 16px}
  .reportsFoundationHead,.teamPageToolbar{align-items:flex-start;flex-direction:column}
  .modalbg{align-items:flex-start;overflow:auto}
  .modal{margin:18px 0 90px}
  .tutorialShortcut{top:8px}
}
/* PDF export */
.pdfExport{position:relative}.pdfExportMain{white-space:nowrap}.pdfExportMenu{display:none;position:absolute;right:0;top:calc(100% + 8px);z-index:65;width:260px;background:#fff;border-top:4px solid #1687ff;box-shadow:0 14px 42px #11172230}.pdfExport.open .pdfExportMenu{display:grid}.pdfExportMenu button{display:grid;gap:5px;padding:14px 16px;border:0;border-bottom:1px solid #e0e4e8;background:#fff;text-align:left;color:#121722;cursor:pointer}.pdfExportMenu button:last-child{border-bottom:0}.pdfExportMenu button:hover{background:#eef6ff}.pdfExportMenu b{font-size:11px}.pdfExportMenu small{color:#697181;font-size:9px;line-height:1.4}
@media(max-width:640px){.pdfExport{flex:1}.pdfExportMain{width:100%}.pdfExportMenu{position:fixed;left:14px;right:14px;top:auto;bottom:82px;width:auto}}

/* Mobile layout hardening: these rules intentionally override later legacy styles. */
@media(max-width:640px){
  html,body{width:100%!important;max-width:100%!important;overflow-x:hidden!important}
  body{display:block!important}
  aside{position:fixed!important;inset:auto 0 0 0!important;width:100%!important;height:66px!important;padding:0 6px!important;z-index:900!important}
  aside .logo,aside .profile{display:none!important}
  aside nav{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;height:100%!important}
  aside nav button{min-width:0!important;padding:7px 2px!important;text-align:center!important;border:0!important;border-right:1px solid #303640!important;font-size:15px!important}
  aside nav button span{display:block!important;margin:4px 0 0!important;font-size:7px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  main{margin:0!important;width:100%!important;max-width:100%!important;min-width:0!important;padding:72px 12px 88px!important;overflow:hidden!important}
  header{display:flex!important;width:100%!important;max-width:100%!important;flex-direction:column!important;align-items:stretch!important;gap:18px!important;margin-bottom:22px!important}
  header>div:first-child{min-width:0!important}
  h1,#title{font-size:32px!important;line-height:1.08!important;letter-spacing:-1.2px!important;overflow-wrap:anywhere!important}
  header small{font-size:11px!important;line-height:1.5!important}
  .headerButtons{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;gap:8px!important}
  .headerButtons>*,.headerButtons button{width:100%!important;min-width:0!important;min-height:44px!important;white-space:normal!important}
  .quickNav{display:grid!important;grid-template-columns:repeat(5,minmax(64px,1fr))!important;width:100%!important;max-width:100%!important;overflow-x:auto!important}
  .quickNav button{min-width:64px!important;padding:12px 7px!important;font-size:0!important;text-align:center!important}
  .quickNav button span{font-size:12px!important;margin:0!important}
  .whiteSpaceTools{display:flex!important;flex-direction:column!important;align-items:stretch!important;width:100%!important;gap:10px!important}
  .whiteAdd{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;gap:8px!important}
  .whiteAdd button{width:100%!important;min-width:0!important;white-space:normal!important;min-height:48px!important}
  .modeSwitch{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important}
  .modeSwitch button{min-width:0!important;width:100%!important;padding:12px 8px!important}
  .matrixHelp{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:8px!important}
  .crossMatrix{display:block!important;width:100%!important;max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
  .crossTable{min-width:max-content!important;width:max-content!important}
  .crossTable th{min-width:108px!important;max-width:108px!important;padding:11px 8px!important}
  .crossTable th:first-child{left:0!important;min-width:142px!important;max-width:142px!important}
  .crossTable td:first-child{left:0!important;min-width:142px!important;max-width:142px!important;padding:10px 7px!important}
  .clientNameCell{display:grid!important;grid-template-columns:30px minmax(0,1fr) 34px!important;gap:7px!important;align-items:center!important}
  .clientNameCell .avatar{width:30px!important;height:30px!important;margin:0!important}
  .clientNameCell b{font-size:12px!important;overflow-wrap:anywhere!important}
  .matrixCellWrap{min-width:108px!important}
  .matrixCell{min-height:56px!important;font-size:10px!important;white-space:normal!important}
  .matrixLegend{display:flex!important;flex-wrap:wrap!important;gap:8px 12px!important;padding:10px!important;min-width:0!important;font-size:9px!important}
  .matrixLegend span{max-width:100%!important}
  .welcome{inset:0!important;width:100%!important;max-width:100%!important;padding:72px 14px 88px!important;overflow-x:hidden!important;overflow-y:auto!important;place-items:start center!important}
  .welcomeInner{width:100%!important;max-width:430px!important;min-width:0!important}
  .welcomeInner>p{font-size:18px!important;margin:28px 0!important;overflow-wrap:anywhere!important}
  .welcomeChoices{display:grid!important;grid-template-columns:1fr!important;width:100%!important;max-width:100%!important}
  .welcomeChoices button{width:100%!important;min-width:0!important;min-height:104px!important;padding:18px!important;border-right:0!important;border-bottom:1px solid #ffffff44!important}
  .welcomeChoices b{font-size:18px!important}
  .welcomeChoices span{margin-bottom:13px!important}
  .welcomeChoices small{font-size:10px!important}
  .view,.view.active{width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:hidden!important}
  .modal{width:calc(100vw - 24px)!important;max-width:calc(100vw - 24px)!important;margin:12px auto 86px!important;padding:22px 17px!important}
  .modal h2{font-size:28px!important}
}

/* High-fidelity PDF capture surface */
.pdfCaptureRoot{position:fixed;left:-100000px;top:0;z-index:-1;box-sizing:border-box;padding:0 36px 44px;background:#f4f6f8;color:#111722;font-family:inherit}.pdfCaptureRoot *{box-sizing:border-box}.pdfCaptureBrand{height:104px;margin:0 -36px 30px;padding:22px 36px;display:grid;grid-template-columns:210px 1fr auto;align-items:center;gap:28px;background:#121722;border-bottom:5px solid #1687ff;color:#fff}.pdfCaptureLogo{font-size:17px;font-weight:800;letter-spacing:3px}.pdfCaptureLogo b{color:#1687ff;font-size:28px}.pdfCaptureBrand strong{display:block;font-size:24px;line-height:1.2}.pdfCaptureBrand small{display:block;margin-top:7px;color:#b8c3d6;font-size:11px}.pdfCaptureBrand>span{padding:8px 12px;border:1px solid #526071;color:#cbd5e5;font-size:10px;text-transform:uppercase;letter-spacing:1px}.pdfCaptureContent>header{margin-bottom:22px}.pdfCaptureContent>.view{display:block!important;opacity:1!important;transform:none!important;animation:none!important;min-height:0}.pdfCaptureContent button,.pdfCaptureContent input,.pdfCaptureContent select,.pdfCaptureContent textarea{pointer-events:none}.pdfCaptureContent table{page-break-inside:auto}.pdfCaptureContent tr,.pdfCaptureContent .project,.pdfCaptureContent .activityRow,.pdfCaptureContent .teamPagePerson{break-inside:avoid}.pdfCaptureContent .quickNav,.pdfCaptureContent .servicesSubNav{display:none!important}
