:root{
  --navy:#071b31;
  --navy2:#0d2948;
  --red:#cd202d;
  --red2:#e12633;
  --ink:#10233c;
  --muted:#66758a;
  --line:#dde4ec;
  --soft:#f4f7fa;
  --white:#fff;
  --green:#24b56b;
  --shadow:0 10px 28px rgba(5,24,45,.12);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  color:var(--ink);
  background:#eef3f7;
  overflow-x:hidden;
}
a{color:inherit}
button,a{ -webkit-tap-highlight-color:transparent}
.site{
  min-height:100%;
  background:linear-gradient(180deg,#06192e 0,#071c34 370px,#eef3f7 370px);
}
.header{
  padding:18px 26px 16px;
  color:white;
}
.header-grid{
  max-width:1600px;
  margin:0 auto;
  display:grid;
  grid-template-columns:190px minmax(340px,1fr) auto auto;
  gap:22px;
  align-items:center;
}
.sivdio-logo img{width:172px;height:auto;display:block}
.kicker{
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:12px;
  opacity:.72;
  margin-bottom:5px;
}
.project-title{font-size:30px;line-height:1.08;font-weight:800;margin:0}
.project-sub{
  margin-top:9px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  font-size:14px;
  color:#dce7f3;
}
.status-dot{width:9px;height:9px;border-radius:50%;background:var(--green);display:inline-block;margin-right:7px}
.partner{
  min-width:180px;
  min-height:86px;
  padding-left:19px;
  border-left:1px solid rgba(255,255,255,.18);
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.partner-label{
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:10px;
  line-height:14px;
  color:#9cb0c4;
  margin:0 0 7px;
}
.partner-logo{
  height:58px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
}
.partner-logo img{
  max-width:150px;
  max-height:52px;
  width:auto;
  height:auto;
  object-fit:contain;
  display:block;
}
.partner.owner .partner-logo img{max-height:54px}
.partner.contractor .partner-logo img{max-height:54px;max-width:160px}
.page-grid{
  max-width:1600px;
  margin:0 auto;
  display:grid;
  grid-template-columns:116px minmax(0,1fr);
  gap:18px;
  padding:0 20px 26px;
}
.sidebar{
  background:linear-gradient(180deg,#0b2747,#06182c);
  border-radius:16px;
  padding:12px 10px;
  box-shadow:var(--shadow);
  position:sticky;
  top:12px;
  align-self:start;
  z-index:5;
}
.nav-item{
  width:100%;
  min-height:78px;
  border:0;
  border-radius:12px;
  background:transparent;
  color:#dce7f3;
  text-decoration:none;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:7px;
  padding:8px 6px;
  font-size:11.5px;
  font-weight:600;
  line-height:1.15;
  text-align:center;
  white-space:nowrap;
  cursor:pointer;
}
.nav-item svg{width:27px;height:27px;flex:0 0 auto}
.nav-item:hover,.nav-item:focus-visible{background:rgba(255,255,255,.08);outline:none}
.nav-item.active{background:linear-gradient(180deg,var(--red2),#bd1421);color:#fff;min-height:84px}
.main{min-width:0}
.hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 350px;
  gap:16px;
  align-items:start;
}
.panel{
  background:var(--white);
  border:1px solid rgba(15,45,75,.08);
  border-radius:16px;
  box-shadow:var(--shadow);
  min-width:0;
}
.viewer-panel{overflow:hidden}
.panel-title{
  padding:15px 18px;
  font-weight:800;
  letter-spacing:.02em;
  font-size:18px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
.panel-title small{font-weight:500;color:var(--muted);font-size:12px}
.viewer-shell{
  background:#001222;
  position:relative;
  aspect-ratio:16/9;
  min-height:410px;
}
.viewer-shell iframe{
  display:block;
  border:0;
  width:100%;
  height:100%;
  background:#001222;
}
.viewer-note{
  padding:11px 16px;
  background:#f8fafc;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:11.5px;
  line-height:1.5;
}
.side-stack{display:grid;gap:16px}
.info-card,.weather-card{padding:16px 17px}
.card-heading{
  display:flex;align-items:center;gap:9px;
  margin:0 0 12px;
  font-size:16px;font-weight:800;
}
.card-heading .icon{
  width:32px;height:32px;border-radius:9px;
  display:grid;place-items:center;
  background:#fff1f2;color:var(--red);
}
.info-row{
  padding:9px 0;
  border-bottom:1px solid var(--line);
  display:grid;
  grid-template-columns:115px minmax(0,1fr);
  gap:12px;
  font-size:12px;
}
.info-row:last-child{border-bottom:0;padding-bottom:0}
.info-row .label{color:var(--muted)}
.info-row .value{font-weight:700}
.badge{
  display:inline-flex;align-items:center;
  padding:4px 9px;border-radius:999px;
  background:#e8f8ef;color:#198a50;
  font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.05em
}
.date-split{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.weather-state{
  min-height:142px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.weather-main{display:flex;align-items:center;gap:15px;margin-bottom:12px}
.weather-symbol{font-size:38px}
.weather-temp{font-size:34px;font-weight:800;line-height:1}
.weather-condition{font-size:12px;color:var(--muted);margin-top:4px}
.weather-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px;font-size:11px}
.weather-meta div{background:#f6f8fb;border:1px solid var(--line);border-radius:9px;padding:8px}
.weather-meta span{display:block;color:var(--muted);margin-bottom:2px}
.weather-foot{margin-top:10px;font-size:10px;color:#8592a2;display:flex;justify-content:space-between;gap:8px}
.weather-error{color:#6b7788;font-size:12px;line-height:1.5}
.quick{margin-top:16px}
.quick-title{
  color:var(--ink);
  font-size:13px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  margin:0 0 10px 2px;
  padding-left:10px;
  border-left:4px solid var(--red);
}
.actions{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
}
.action{
  border:1px solid #d6dee8;
  background:white;
  border-radius:16px;
  min-height:118px;
  padding:16px;
  text-decoration:none;
  display:flex;
  gap:11px;
  align-items:flex-start;
  box-shadow:0 5px 18px rgba(5,24,45,.06);
  cursor:pointer;
  color:var(--ink);
}
button.action{font:inherit;text-align:left;width:100%}
.action:hover,.action:focus-visible{
  transform:translateY(-1px);
  border-color:#c8d4e0;
  outline:none;
}
.action-icon{
  flex:0 0 58px;width:58px;height:58px;border-radius:15px;
  background:#eef3f8;display:grid;place-items:center;color:var(--navy2);
  font-size:24px;font-weight:900;line-height:1
}
.action strong{display:block;font-size:14px;line-height:1.3;margin:2px 0 6px}
.action p{margin:0;font-size:11.5px;color:var(--muted);line-height:1.45}
.action.red .action-icon{background:#fff0f1;color:var(--red)}
.action.green .action-icon{background:#eaf8ee;color:#3b9a5e}
.action.blue .action-icon{background:#eaf3ff;color:#3276c8}
.footer{
  max-width:1600px;
  margin:18px auto 0;
  background:#ffffff;
  border:1px solid rgba(15,45,75,.08);
  border-radius:16px;
  box-shadow:0 8px 24px rgba(5,24,45,.06);
  color:#526273;
  padding:16px 18px 18px;
  display:flex;
  justify-content:space-between;
  gap:22px;
  flex-wrap:wrap;
  font-size:12px;
  line-height:1.65;
}
.footer strong{color:#17304d}
.mobile-nav{display:none}

/* -----------------------------------------------------------
   V1.7 RESPONSIVE ARCHITECTURE
   Desktop >= 1200
   Tablet 768–1199
   Mobile <= 767
----------------------------------------------------------- */

/* Tablet / compact desktop */
@media (max-width:1199px){
  .site{
    background:linear-gradient(180deg,#06192e 0,#071c34 430px,#eef3f7 430px);
  }

  .header{
    padding:16px 18px 14px;
  }

  .header-grid{
    grid-template-columns:150px minmax(0,1fr) 130px 130px;
    gap:16px;
    align-items:center;
  }

  .sivdio-logo img{width:138px}

  .project-title{
    font-size:26px;
  }

  .project-sub{
    font-size:12.5px;
    gap:9px;
  }

  .partner{
    min-width:0;
    min-height:72px;
    padding-left:14px;
  }

  .partner-label{
    font-size:9px;
    margin-bottom:5px;
  }

  .partner-logo{
    height:46px;
  }

  .partner-logo img{
    max-width:112px;
    max-height:42px;
  }

  .partner.contractor .partner-logo img{
    max-width:116px;
    max-height:43px;
  }

  /* Move navigation from vertical sidebar to a deliberate horizontal toolbar */
  .page-grid{
    grid-template-columns:1fr;
    padding:0 14px 20px;
    gap:10px;
  }

  .sidebar{
    display:none;
  }

  .mobile-nav{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:6px;
    background:#0a2849;
    padding:7px;
    border-radius:13px;
    margin-bottom:2px;
    box-shadow:0 8px 22px rgba(5,24,45,.10);
  }

  .mobile-nav a{
    min-height:46px;
    border-radius:9px;
    text-decoration:none;
    color:#dce7f3;
    font-size:11px;
    font-weight:700;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    padding:6px 8px;
    line-height:1.15;
  }

  .mobile-nav a.active{
    background:var(--red);
    color:#fff;
  }

  /* Tablet layout: viewer first, project data immediately below */
  .hero-grid{
    grid-template-columns:1fr;
    gap:12px;
  }

  .side-stack{
    grid-template-columns:1fr 1fr;
    gap:12px;
  }

  .viewer-shell{
    min-height:0;
    aspect-ratio:16/9;
  }

  .panel-title{
    padding:13px 15px;
  }

  .actions{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .footer{
    margin:14px 14px 0;
  }
}

/* Tablet portrait / small tablet */
@media (max-width:899px){
  .site{
    background:linear-gradient(180deg,#06192e 0,#071c34 480px,#eef3f7 480px);
  }

  .header{
    padding:14px 14px 12px;
  }

  .header-grid{
    grid-template-columns:120px minmax(0,1fr);
    gap:11px 14px;
  }

  .sivdio-logo img{
    width:116px;
  }

  .kicker{
    font-size:10px;
  }

  .project-title{
    font-size:23px;
  }

  .project-sub{
    font-size:11.5px;
    gap:8px;
  }

  /* Project Owner / Main Contractor become an aligned two-column identity strip */
  .partner{
    border-left:0;
    border-top:1px solid rgba(255,255,255,.14);
    padding:9px 0 0;
    min-height:64px;
    display:grid;
    grid-template-columns:92px 1fr;
    gap:8px;
    align-items:center;
  }

  .partner.owner{
    grid-column:1/2;
  }

  .partner.contractor{
    grid-column:2/3;
  }

  .partner-label{
    margin:0;
    font-size:8.5px;
    line-height:1.25;
  }

  .partner-logo{
    height:40px;
    justify-content:flex-start;
  }

  .partner-logo img{
    max-height:37px;
    max-width:95px;
  }

  .partner.contractor .partner-logo img{
    max-height:38px;
    max-width:100px;
  }

  .page-grid{
    padding:0 10px 18px;
  }

  .mobile-nav{
    grid-template-columns:repeat(5,minmax(0,1fr));
  }

  .mobile-nav a{
    font-size:10.5px;
    padding:6px 4px;
  }

  .viewer-shell{
    aspect-ratio:16/10;
  }

  .side-stack{
    grid-template-columns:1fr 1fr;
  }

  .actions{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .footer{
    margin:12px 10px 0;
  }
}

/* Mobile */
@media (max-width:767px){
  .site{
    background:linear-gradient(180deg,#06192e 0,#071c34 520px,#eef3f7 520px);
  }

  .header{
    padding:14px 12px 10px;
  }

  .header-grid{
    grid-template-columns:1fr;
    gap:8px;
  }

  .sivdio-logo{
    display:block;
  }

  .sivdio-logo img{
    width:130px;
  }

  .kicker{
    margin-top:4px;
    font-size:10px;
  }

  .project-title{
    font-size:24px;
  }

  .project-sub{
    margin-top:8px;
    font-size:11.5px;
    line-height:1.45;
    gap:7px;
  }

  /* Put owner and contractor side-by-side instead of stacking vertically */
  .partner{
    display:grid !important;
    grid-template-columns:88px 1fr;
    align-items:center;
    min-height:56px;
    padding:7px 0 0;
    border-left:0;
    border-top:1px solid rgba(255,255,255,.14);
  }

  .partner.owner{
    grid-column:auto;
  }

  .partner.contractor{
    grid-column:auto;
  }

  .partner-label{
    min-width:0;
    font-size:8.5px;
    line-height:1.2;
    margin:0;
  }

  .partner-logo{
    height:38px;
  }

  .partner-logo img{
    max-width:98px;
    max-height:36px;
  }

  .partner.contractor .partner-logo img{
    max-width:102px;
    max-height:37px;
  }

  .page-grid{
    padding:0 8px 16px;
  }

  /* 6-column mobile grid:
     first 3 items span 2 columns, final 2 span 3 columns.
     This avoids the awkward single Support row. */
  .mobile-nav{
    grid-template-columns:repeat(6,1fr);
    gap:5px;
    padding:6px;
  }

  .mobile-nav a{
    min-height:43px;
    font-size:10px;
    padding:5px 3px;
  }

  .mobile-nav a:nth-child(1),
  .mobile-nav a:nth-child(2),
  .mobile-nav a:nth-child(3){
    grid-column:span 2;
  }

  .mobile-nav a:nth-child(4),
  .mobile-nav a:nth-child(5){
    grid-column:span 3;
  }

  .panel{
    border-radius:12px;
  }

  /* Simplify viewer header on narrow screens */
  .panel-title{
    display:block;
    padding:11px 12px;
    font-size:16px;
    line-height:1.2;
  }

  .panel-title small{
    display:none;
  }

  /* A 4:3 viewer is materially more usable than the former tall 4:5 crop */
  .viewer-shell{
    aspect-ratio:4/3;
    min-height:0;
  }

  .viewer-note{
    padding:9px 11px;
    font-size:10px;
    line-height:1.4;
  }

  .side-stack{
    grid-template-columns:1fr;
    gap:10px;
  }

  .info-card,.weather-card{
    padding:14px;
  }

  .info-row{
    grid-template-columns:105px minmax(0,1fr);
    gap:8px;
    font-size:11.5px;
  }

  .date-split{
    grid-template-columns:1fr 1fr;
  }

  .quick{
    margin-top:12px;
  }

  .actions{
    grid-template-columns:1fr 1fr;
    gap:8px;
  }

  .action{
    min-height:104px;
    padding:11px;
    border-radius:13px;
  }

  .action-icon{
    flex:0 0 48px;
    width:48px;
    height:48px;
  }

  .action-icon svg{
    width:27px;
    height:27px;
  }

  .action strong{
    font-size:12.5px;
  }

  .action p{
    font-size:10.5px;
  }

  .footer{
    margin:12px 8px 0;
    padding:11px 12px 12px;
  }

  .footer-brand{
    display:block;
  }

  .footer-brand strong,
  .footer-brand span{
    display:block;
  }

  .footer-brand span{
    margin-top:3px;
  }
}

/* Very narrow phones */
@media (max-width:420px){
  .header{
    padding-left:10px;
    padding-right:10px;
  }

  .project-title{
    font-size:23px;
  }

  .project-sub span:nth-child(2),
  .project-sub span:nth-child(4){
    opacity:.5;
  }

  .partner{
    grid-template-columns:92px 1fr;
  }

  .mobile-nav a{
    font-size:9.8px;
  }

  .actions{
    grid-template-columns:1fr;
  }

  .action{
    min-height:88px;
  }

  .action p{
    display:block;
  }
}

/* ===========================================================
   V1.8 MOBILE UX REDESIGN
   Phone view behaves as an app-like project interface.
   Tablet and desktop rules above remain intact.
=========================================================== */
@media (max-width:639px){

  body{
    padding-bottom:72px;
  }

  .site{
    background:linear-gradient(180deg,#06192e 0,#071c34 330px,#eef3f7 330px);
  }

  /* Compact co-branded project header */
  .header{
    padding:10px 10px 8px;
  }

  .header-grid{
    grid-template-columns:88px minmax(0,1fr);
    gap:7px 10px;
    align-items:center;
  }

  .sivdio-logo{
    grid-column:1/2;
    grid-row:1/2;
    align-self:start;
    padding-top:2px;
  }

  .sivdio-logo img{
    width:82px;
  }

  .header-grid > div:nth-child(2){
    grid-column:2/3;
    grid-row:1/2;
    min-width:0;
  }

  .kicker{
    margin:0 0 3px;
    font-size:8px;
    letter-spacing:.07em;
    white-space:nowrap;
  }

  .project-title{
    font-size:19px;
    line-height:1.12;
  }

  .project-sub{
    margin-top:5px;
    font-size:9.5px;
    line-height:1.35;
    gap:5px;
    align-items:center;
  }

  /* Hide project type on phone; the page title already identifies the service */
  .project-sub span:nth-child(4),
  .project-sub span:nth-child(5){
    display:none;
  }

  /* Owner and contractor as a compact identity strip */
  .partner{
    min-height:48px;
    padding:6px 0 0;
    border-top:1px solid rgba(255,255,255,.12);
    display:grid !important;
    grid-template-columns:auto 1fr;
    gap:6px;
  }

  .partner.owner{
    grid-column:1/2;
    grid-row:2/3;
  }

  .partner.contractor{
    grid-column:2/3;
    grid-row:2/3;
    border-left:1px solid rgba(255,255,255,.12);
    padding-left:10px;
  }

  .partner-label{
    font-size:7.5px;
    letter-spacing:.06em;
    line-height:1.15;
    min-width:0;
  }

  .partner-logo{
    height:31px;
  }

  .partner-logo img{
    max-height:29px;
    max-width:72px;
  }

  .partner.contractor .partner-logo img{
    max-height:30px;
    max-width:78px;
  }

  .page-grid{
    padding:0 7px 14px;
    gap:8px;
  }

  /* Navigation moves to a persistent bottom bar */
  .mobile-nav{
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    z-index:100;
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:0;
    margin:0;
    padding:5px 6px calc(5px + env(safe-area-inset-bottom));
    border-radius:15px 15px 0 0;
    background:#08233f;
    box-shadow:0 -7px 22px rgba(5,24,45,.22);
  }

  .mobile-nav a,
  .mobile-nav a:nth-child(1),
  .mobile-nav a:nth-child(2),
  .mobile-nav a:nth-child(3),
  .mobile-nav a:nth-child(4),
  .mobile-nav a:nth-child(5){
    grid-column:auto;
    min-height:50px;
    border-radius:9px;
    padding:4px 2px;
    font-size:8.5px;
    font-weight:700;
    line-height:1;
    display:flex;
    flex-direction:column;
    gap:3px;
    align-items:center;
    justify-content:center;
  }

  .mobile-nav a svg{
    width:20px;
    height:20px;
    flex:0 0 auto;
  }

  .mobile-nav a span{
    display:block;
  }

  .mobile-nav a.active{
    background:var(--red);
  }

  /* Viewer is the first major content users see */
  .hero-grid{
    gap:9px;
  }

  .viewer-panel{
    order:1;
  }

  /* Avoid duplicate header: embedded viewer may already display the project name */
  .viewer-panel .panel-title{
    display:none;
  }

  .viewer-shell{
    aspect-ratio:16/10;
    border-radius:11px 11px 0 0;
    overflow:hidden;
  }

  .viewer-note{
    display:none;
  }

  .side-stack{
    order:2;
    gap:8px;
  }

  .info-card,
  .weather-card{
    padding:12px;
  }

  .card-heading{
    margin-bottom:8px;
    font-size:14px;
  }

  .card-heading .icon{
    width:28px;
    height:28px;
  }

  .info-row{
    padding:7px 0;
    grid-template-columns:92px minmax(0,1fr);
    gap:7px;
    font-size:10.5px;
  }

  .date-split{
    gap:5px;
  }

  .weather-state{
    min-height:92px;
  }

  .weather-state.is-pending{
    min-height:72px;
  }

  /* Outputs remain compact and touch-friendly */
  .quick{
    margin-top:9px;
  }

  .quick-title{
    font-size:11px;
    margin-bottom:7px;
  }

  .actions{
    grid-template-columns:1fr 1fr;
    gap:7px;
  }

  .action{
    min-height:92px;
    padding:10px;
    gap:8px;
  }

  .action-icon{
    flex:0 0 42px;
    width:42px;
    height:42px;
    border-radius:11px;
  }

  .action-icon svg{
    width:24px;
    height:24px;
  }

  .action strong{
    font-size:11.5px;
    margin-bottom:3px;
  }

  .action p{
    font-size:9.5px;
    line-height:1.35;
  }

  .footer{
    margin:10px 7px 0;
  }
}

@media (max-width:420px){
  .actions{
    grid-template-columns:1fr 1fr;
  }

  .action{
    min-height:86px;
  }

  .action p{
    display:none;
  }
}

/* ===========================================================
   V1.9 TABLET HEADER + NAVIGATION REFINEMENT
   Applies to compact tablets and iPad portrait.
=========================================================== */
@media (min-width:640px) and (max-width:899px){

  .site{
    background:linear-gradient(180deg,#06192e 0,#071c34 390px,#eef3f7 390px);
  }

  .header{
    padding:14px 14px 10px;
  }

  .header-grid{
    grid-template-columns:138px minmax(0,1fr) 118px 118px;
    gap:12px;
    align-items:center;
  }

  .sivdio-logo{
    grid-column:auto;
    grid-row:auto;
    align-self:center;
    padding-top:0;
  }

  .sivdio-logo img{
    width:126px;
  }

  .header-grid > div:nth-child(2){
    grid-column:auto;
    grid-row:auto;
    min-width:0;
  }

  .kicker{
    font-size:9px;
    margin-bottom:3px;
    white-space:nowrap;
  }

  .project-title{
    font-size:22px;
    line-height:1.08;
    white-space:nowrap;
  }

  .project-sub{
    margin-top:5px;
    font-size:10.5px;
    gap:6px;
    line-height:1.25;
    flex-wrap:nowrap;
    white-space:nowrap;
  }

  .partner{
    display:flex !important;
    flex-direction:column;
    justify-content:center;
    align-items:flex-start;
    min-height:64px;
    padding:0 0 0 12px;
    border-top:0;
    border-left:1px solid rgba(255,255,255,.14);
  }

  .partner.owner,
  .partner.contractor{
    grid-column:auto;
    grid-row:auto;
  }

  .partner-label{
    min-width:0;
    font-size:8px;
    letter-spacing:.07em;
    line-height:1.1;
    margin:0 0 5px;
  }

  .partner-logo{
    height:36px;
    display:flex;
    align-items:center;
  }

  .partner-logo img{
    max-height:34px;
    max-width:92px;
  }

  .partner.contractor .partner-logo img{
    max-height:35px;
    max-width:96px;
  }

  .page-grid{
    grid-template-columns:1fr;
    padding:0 10px 18px;
    gap:9px;
  }

  .sidebar{
    display:none;
  }

  /* Tablet navigation: restrained tabs, not oversized app icons */
  .mobile-nav{
    position:static;
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:5px;
    margin:0 0 3px;
    padding:6px;
    border-radius:12px;
    background:#0a2849;
    box-shadow:0 7px 18px rgba(5,24,45,.10);
  }

  .mobile-nav a,
  .mobile-nav a:nth-child(1),
  .mobile-nav a:nth-child(2),
  .mobile-nav a:nth-child(3),
  .mobile-nav a:nth-child(4),
  .mobile-nav a:nth-child(5){
    grid-column:auto;
    min-height:42px;
    padding:5px 6px;
    border-radius:8px;
    font-size:10px;
    line-height:1.1;
    font-weight:700;
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:center;
    gap:5px;
  }

  .mobile-nav a svg{
    width:16px;
    height:16px;
    flex:0 0 auto;
  }

  .mobile-nav a span{
    display:block;
  }

  .mobile-nav a.active{
    background:var(--red);
    color:#fff;
  }

  .hero-grid{
    grid-template-columns:1fr;
    gap:10px;
  }

  .viewer-panel{
    order:1;
  }

  .viewer-panel .panel-title{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:11px 12px;
    font-size:14px;
  }

  .viewer-panel .panel-title small{
    display:block;
    font-size:9px;
    white-space:nowrap;
  }

  .viewer-shell{
    aspect-ratio:16/9;
    min-height:0;
  }

  .viewer-note{
    display:block;
    padding:8px 10px;
    font-size:9px;
    line-height:1.35;
  }

  .side-stack{
    grid-template-columns:1fr 1fr;
    gap:10px;
  }

  .info-card,
  .weather-card{
    padding:12px;
  }

  .card-heading{
    font-size:14px;
  }

  .info-row{
    grid-template-columns:92px minmax(0,1fr);
    gap:7px;
    font-size:10px;
    padding:7px 0;
  }

  .actions{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
  }

  .action{
    min-height:96px;
    padding:11px;
  }

  .action-icon{
    flex:0 0 44px;
    width:44px;
    height:44px;
  }

  .action-icon svg{
    width:25px;
    height:25px;
  }

  .footer{
    margin:12px 10px 0;
  }
}

/* ===========================================================
   V1.10 RESPONSIVE HEADER SIMPLIFICATION
   Desktop keeps both logos.
   Tablet + mobile show only the main contractor logo.
=========================================================== */

/* All non-desktop tablet widths */
@media (max-width:1199px){

  /* Hide project owner block on tablet/mobile */
  .partner.owner{
    display:none !important;
  }

  /* Keep only the main contractor block visible and well-balanced */
  .partner.contractor{
    display:flex !important;
    flex-direction:column;
    justify-content:center;
    align-items:flex-start;
  }
}

/* Tablet landscape / medium tablet */
@media (min-width:900px) and (max-width:1199px){
  .header{
    padding:16px 18px 14px;
  }

  .header-grid{
    grid-template-columns:145px minmax(0,1fr) 150px;
    gap:18px;
    align-items:center;
  }

  .sivdio-logo img{
    width:134px;
  }

  .project-title{
    font-size:25px;
    line-height:1.08;
  }

  .project-sub{
    margin-top:7px;
    font-size:12px;
    gap:8px;
    flex-wrap:wrap;
  }

  .partner.contractor{
    min-height:76px;
    padding-left:16px;
    border-left:1px solid rgba(255,255,255,.14);
  }

  .partner.contractor .partner-label{
    font-size:9px;
    margin-bottom:6px;
    letter-spacing:.07em;
  }

  .partner.contractor .partner-logo{
    height:44px;
  }

  .partner.contractor .partner-logo img{
    max-height:40px;
    max-width:110px;
  }

  .mobile-nav{
    margin-top:4px;
  }
}

/* Tablet portrait / compact tablet */
@media (min-width:640px) and (max-width:899px){
  .header{
    padding:15px 14px 12px;
  }

  .header-grid{
    grid-template-columns:132px minmax(0,1fr) 116px;
    gap:14px;
    align-items:center;
  }

  .sivdio-logo img{
    width:122px;
  }

  .kicker{
    font-size:8.8px;
    margin-bottom:4px;
  }

  .project-title{
    font-size:22px;
    line-height:1.1;
    white-space:normal;
  }

  .project-sub{
    margin-top:6px;
    font-size:10.5px;
    gap:6px;
    flex-wrap:wrap;
    white-space:normal;
  }

  .partner.contractor{
    min-height:66px;
    padding:0 0 0 14px;
    border-left:1px solid rgba(255,255,255,.14);
  }

  .partner.contractor .partner-label{
    font-size:8px;
    letter-spacing:.07em;
    margin:0 0 5px;
    line-height:1.15;
  }

  .partner.contractor .partner-logo{
    height:34px;
  }

  .partner.contractor .partner-logo img{
    max-height:32px;
    max-width:92px;
  }

  .mobile-nav{
    margin-top:4px;
  }
}

/* Phone */
@media (max-width:639px){
  body{
    padding-bottom:72px;
  }

  .site{
    background:linear-gradient(180deg,#06192e 0,#071c34 305px,#eef3f7 305px);
  }

  .header{
    padding:11px 10px 10px;
  }

  .header-grid{
    grid-template-columns:84px minmax(0,1fr);
    gap:8px 10px;
    align-items:start;
  }

  .sivdio-logo{
    grid-column:1/2;
    grid-row:1/2;
    align-self:start;
    padding-top:2px;
  }

  .sivdio-logo img{
    width:80px;
  }

  .header-grid > div:nth-child(2){
    grid-column:2/3;
    grid-row:1/2;
    min-width:0;
  }

  .kicker{
    margin:0 0 3px;
    font-size:8px;
    letter-spacing:.07em;
    white-space:nowrap;
  }

  .project-title{
    font-size:18px;
    line-height:1.12;
  }

  .project-sub{
    margin-top:5px;
    font-size:9.3px;
    line-height:1.35;
    gap:5px;
    align-items:center;
    flex-wrap:wrap;
  }

  /* show only status + viewpoint on phone */
  .project-sub span:nth-child(4),
  .project-sub span:nth-child(5){
    display:none;
  }

  /* The sole visible header identity on phone: main contractor */
  .partner.contractor{
    grid-column:1/3;
    grid-row:2/3;
    margin-top:2px;
    min-height:44px;
    padding:7px 0 0;
    border-top:1px solid rgba(255,255,255,.12);
    border-left:0;
    display:flex !important;
    flex-direction:row;
    align-items:center;
    justify-content:flex-start;
    gap:9px;
  }

  .partner.contractor .partner-label{
    font-size:7.5px;
    letter-spacing:.07em;
    line-height:1.15;
    margin:0;
    min-width:92px;
  }

  .partner.contractor .partner-logo{
    height:28px;
    justify-content:flex-start;
  }

  .partner.contractor .partner-logo img{
    max-height:27px;
    max-width:78px;
  }

  /* ensure viewer starts with breathing room below simplified header */
  .page-grid{
    padding:0 7px 14px;
    gap:9px;
  }

  .hero-grid{
    gap:9px;
  }
}

/* Very narrow phones */
@media (max-width:420px){
  .project-title{
    font-size:17px;
  }

  .partner.contractor .partner-label{
    min-width:86px;
  }

  .partner.contractor .partner-logo img{
    max-width:74px;
  }
}

/* ===========================================================
   V1.11 TABLET LANDSCAPE NAVIGATION REFINEMENT
   iPad Mini / tablet landscape: compact icon + text navigation.
=========================================================== */
@media (min-width:900px) and (max-width:1199px){

  .mobile-nav{
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:5px;
    padding:6px;
    border-radius:12px;
    min-height:0;
  }

  .mobile-nav a,
  .mobile-nav a:nth-child(1),
  .mobile-nav a:nth-child(2),
  .mobile-nav a:nth-child(3),
  .mobile-nav a:nth-child(4),
  .mobile-nav a:nth-child(5){
    grid-column:auto;
    min-height:44px;
    padding:6px 8px;
    border-radius:8px;
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:center;
    gap:6px;
    font-size:10.5px;
    font-weight:700;
    line-height:1.1;
  }

  .mobile-nav a svg{
    width:17px !important;
    height:17px !important;
    max-width:17px;
    max-height:17px;
    flex:0 0 17px;
    display:block;
  }

  .mobile-nav a span{
    display:block;
    white-space:nowrap;
  }

  .mobile-nav a.active{
    min-height:44px;
    background:var(--red);
  }
}

/* ===========================================================
   V1.12 MOBILE CONTRACTOR ROW ADJUSTMENT
   Mobile header contractor identity uses logo-first layout.
=========================================================== */
@media (max-width:639px){
  .partner.contractor{
    display:flex !important;
    flex-direction:row;
    align-items:center;
    justify-content:flex-start;
    gap:12px;
    margin-top:3px;
    min-height:48px;
    padding:8px 0 2px;
  }

  .partner.contractor .partner-logo{
    order:1;
    height:30px;
    flex:0 0 auto;
    justify-content:flex-start;
  }

  .partner.contractor .partner-logo img{
    max-height:30px;
    max-width:82px;
  }

  .partner.contractor .partner-label{
    order:2;
    min-width:0;
    margin:0;
    font-size:8px;
    letter-spacing:.08em;
    line-height:1.2;
    color:rgba(255,255,255,.78);
  }
}

@media (max-width:420px){
  .partner.contractor{
    gap:10px;
  }

  .partner.contractor .partner-logo img{
    max-width:78px;
  }

  .partner.contractor .partner-label{
    font-size:7.8px;
  }
}

/* ===========================================================
   V1.13 FINAL MOBILE POLISH
   Reserved space for fixed navigation + contractor-row balance.
=========================================================== */
@media (max-width:639px){

  /* Ensure all content can scroll fully above the fixed bottom nav. */
  body{
    padding-bottom:calc(96px + env(safe-area-inset-bottom));
  }

  .site{
    padding-bottom:14px;
  }

  /* Slightly more deliberate contractor identity spacing. */
  .partner.contractor{
    gap:13px;
    min-height:52px;
    padding:9px 0 3px;
  }

  .partner.contractor .partner-logo{
    height:34px;
  }

  .partner.contractor .partner-logo img{
    max-height:34px;
    max-width:88px;
  }

  .partner.contractor .partner-label{
    font-size:8.5px;
    letter-spacing:.085em;
    color:rgba(255,255,255,.82);
  }

  /* Give the last content block enough breathing room before fixed navigation. */
  .footer{
    margin-bottom:18px;
  }

  .quick{
    padding-bottom:8px;
  }

  /* Keep bottom navigation comfortably inside iPhone safe area. */
  .mobile-nav{
    padding-bottom:calc(6px + env(safe-area-inset-bottom));
  }
}

@media (max-width:420px){
  body{
    padding-bottom:calc(98px + env(safe-area-inset-bottom));
  }

  .partner.contractor{
    gap:11px;
  }

  .partner.contractor .partner-logo img{
    max-width:82px;
    max-height:32px;
  }

  .partner.contractor .partner-label{
    font-size:8.1px;
  }
}


/* V1.14 Weather activation compliance + presentation */
.weather-disclaimer{
  margin-top:10px;
  padding-top:9px;
  border-top:1px solid var(--line);
  color:#718196;
  font-size:9.5px;
  line-height:1.45;
}

.weather-foot{
  align-items:center;
}

@media(max-width:767px){
  .weather-disclaimer{
    font-size:9px;
    line-height:1.4;
    margin-top:8px;
    padding-top:8px;
  }
}


/* V1.15 Information and icon refinement */
.info-row .label{line-height:1.3}
@media(max-width:767px){
  .info-row{grid-template-columns:118px minmax(0,1fr)}
}

/* ===========================================================
   V1.16.1 CONTROLLED RESPONSIVE PATCH
   Tablet portrait / compact tablet only.
   Preserve all V1.16 styling and functionality.
   Content priority: Timelapse Viewer first, Project Information
   + Site Weather second.
=========================================================== */
@media (min-width:640px) and (max-width:899px){
  .viewer-panel{
    order:1;
  }

  .side-stack{
    order:2;
  }
}



/* V1.16.1 Demo Portal Replacement */
button.action{
  font-family:inherit;
  text-align:left;
}
button.nav-item{
  font-family:inherit;
  text-align:center;
}
.demo-public-notice{
  max-width:1460px;
  margin:14px auto 0;
  padding:11px 18px;
  border:1px solid #d7e0e9;
  border-radius:12px;
  background:#fff8f8;
  color:#5f2c32;
  font-size:12px;
  line-height:1.5;
}
.demo-public-notice strong{color:#cd202d}
.demo-toast{
  position:fixed;
  left:50%;
  bottom:28px;
  transform:translate(-50%,18px);
  z-index:9999;
  max-width:min(560px,calc(100vw - 32px));
  padding:12px 16px;
  border-radius:10px;
  background:#071b31;
  color:white;
  box-shadow:0 12px 30px rgba(0,0,0,.25);
  opacity:0;
  pointer-events:none;
  transition:.2s ease;
  font-size:13px;
  font-weight:700;
}
.demo-toast.show{
  opacity:1;
  transform:translate(-50%,0);
}
@media(max-width:639px){
  .demo-public-notice{
    margin:12px 10px 0;
    padding:10px 12px;
  }
  .demo-toast{
    bottom:calc(86px + env(safe-area-inset-bottom));
  }
}


/* RevA cosmetic consistency */
.sidebar button.nav-item{
  font-size:11.5px;
  font-weight:600;
  line-height:1.15;
  white-space:nowrap;
}

/* =========================================================
   ADE V0.3 — project-specific state only.
   Core geometry and responsive architecture remain V1.16.1.
========================================================= */
.status-dot.pre-deployment{background:#e4ad22}
.badge.pre-deployment{background:#fff4d8;color:#9a6b00}
.muted-value{color:#8a97a7;font-weight:700!important}
.partner.contractor .partner-logo img{max-width:178px}
.viewer-pending{
  position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;
  text-align:center;padding:28px;color:#fff;
  background:radial-gradient(circle at 78% 28%,rgba(36,114,167,.18),transparent 34%),linear-gradient(135deg,#08213a,#052a48 55%,#061b31);
}
.viewer-pending-icon{width:78px;height:78px;border-radius:18px;border:1px solid rgba(255,255,255,.24);display:grid;place-items:center;margin-bottom:18px;background:rgba(255,255,255,.04)}
.viewer-pending-icon span{width:30px;height:30px;border-radius:50%;border:4px solid #fff;box-shadow:0 0 0 3px rgba(255,255,255,.18)}
.viewer-pending h2{margin:0 0 10px;font-size:26px;line-height:1.18}
.viewer-pending p{margin:0;color:#d7e3ef;font-size:14px;line-height:1.55;max-width:620px}
.pending-chip{display:inline-flex;margin-top:18px;padding:7px 11px;border:1px solid rgba(228,173,34,.72);border-radius:999px;color:#ffd66c;font-size:10.5px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;background:rgba(228,173,34,.09)}
.pending-label{display:block;margin-top:6px;color:#c48c12;font-size:9.5px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.weather-disclaimer{border-top:1px solid var(--line);padding-top:10px;margin-top:10px;font-size:9.8px;line-height:1.4;color:#6e7d8e}
.demo-toast{position:fixed;right:18px;bottom:18px;z-index:50;max-width:360px;background:#071b31;color:#fff;padding:12px 14px;border-radius:10px;box-shadow:0 10px 28px rgba(5,24,45,.25);font-size:12px;line-height:1.4;opacity:0;transform:translateY(8px);pointer-events:none;transition:.18s ease}
.demo-toast.show{opacity:1;transform:translateY(0)}
@media(max-width:767px){.viewer-pending{padding:18px}.viewer-pending-icon{width:58px;height:58px;border-radius:14px;margin-bottom:12px}.viewer-pending-icon span{width:23px;height:23px;border-width:3px}.viewer-pending h2{font-size:19px}.viewer-pending p{font-size:11.5px}.pending-chip{font-size:9px;margin-top:12px}.partner.contractor .partner-logo img{max-width:118px}}

/* ==========================================================
   ADE V0.5.1 — CO-BRAND CONTRAST + RESPONSIVE QA PATCH
   - Preserve supplied corporate logo artwork.
   - Provide neutral light plates for reliable contrast.
   - Restore Varia-aligned navigation icon treatment.
   - Apply controlled sizing across desktop/tablet/mobile.
========================================================== */

/* Corporate logo plates: no recolouring or logo modification. */
.partner-logo{
  width:166px;
  height:58px;
  padding:8px 12px;
  border-radius:8px;
  background:#fff;
  border:1px solid rgba(215,224,233,.95);
  box-shadow:0 2px 8px rgba(0,0,0,.10);
  justify-content:center;
  overflow:hidden;
}
.partner-logo img{
  max-width:100%;
  max-height:100%;
}
.partner.owner .partner-logo img,
.partner.contractor .partner-logo img{
  max-width:100%;
  max-height:100%;
}

/* Tablet / compact desktop: keep the sole visible contractor mark legible. */
@media (min-width:900px) and (max-width:1199px){
  .partner.contractor .partner-logo{
    width:128px;
    height:46px;
    padding:7px 9px;
    border-radius:7px;
  }
}

/* Tablet portrait / compact tablet */
@media (min-width:640px) and (max-width:899px){
  .partner.contractor .partner-logo{
    width:104px;
    height:40px;
    padding:6px 8px;
    border-radius:7px;
  }

  /* Match Varia toolbar density: icons remain visible, labels stay readable. */
  .mobile-nav a svg{
    display:block;
    width:16px;
    height:16px;
    flex:0 0 16px;
  }
}

/* Phone: compact logo plate, fixed nav remains clear of content. */
@media (max-width:639px){
  .partner.contractor{
    min-height:54px;
  }
  .partner.contractor .partner-logo{
    width:112px;
    height:38px;
    padding:6px 8px;
    border-radius:7px;
    flex:0 0 112px;
  }
  .partner.contractor .partner-logo img{
    width:100%;
    height:auto;
    max-width:100%;
    max-height:100%;
  }
  .mobile-nav a svg{
    display:block;
    width:19px;
    height:19px;
    flex:0 0 19px;
  }
}

@media (max-width:420px){
  .partner.contractor .partner-logo{
    width:104px;
    height:36px;
    padding:6px 7px;
    flex-basis:104px;
  }
}
