:root{
  --zd-bg:#FBF6EC;
  --zd-bg-soft:#FFF9EF;
  --zd-sidebar:#D8EBE8;
  --zd-sidebar-strong:#C8DFDB;
  --zd-surface:#FFFDF8;
  --zd-raised:#F8F3E8;
  --zd-ink:#172A32;
  --zd-muted:#62717A;
  --zd-soft-text:#7A6D62;
  --zd-line:#A9B9BA;
  --zd-shadow:7px 7px 0 rgba(23,42,50,.16);
  --zd-shadow-soft:0 18px 48px rgba(23,42,50,.10);
  --zd-ochre:#B58A3C;
  --zd-ochre-soft:#F1D99C;
  --zd-teal:#4F858D;
  --zd-teal-dark:#1F5660;
  --zd-teal-soft:#D8EBE8;
  --zd-moss:#5F8068;
  --zd-moss-soft:#DCE8D7;
  --zd-plum:#7C5278;
  --zd-plum-soft:#E4D8E5;
  --zd-sidebar-w:252px;
  --zd-gap:42px;
  --coral:#4F858D;
}


:root[data-theme="dark"]{
  color-scheme:dark;
  --zd-bg:#111D1C;
  --zd-bg-soft:#1B2A28;
  --zd-sidebar:#183E3A;
  --zd-sidebar-strong:#122D2A;
  --zd-surface:#20302E;
  --zd-raised:#172522;
  --zd-ink:#F7EFE2;
  --zd-muted:#B8C8C4;
  --zd-soft-text:#CFBFA9;
  --zd-line:#4F6863;
  --zd-shadow:7px 7px 0 rgba(0,0,0,.28);
  --zd-shadow-soft:0 20px 54px rgba(0,0,0,.28);
  --zd-ochre:#E1B760;
  --zd-ochre-soft:#493A22;
  --zd-teal:#75AEB1;
  --zd-teal-dark:#A8D6D4;
  --zd-teal-soft:#203F3D;
  --zd-moss:#94B68E;
  --zd-moss-soft:#253B2F;
  --zd-plum:#D2A8CF;
  --zd-plum-soft:#3B2B3E;
  --coral:#75AEB1;
}
*{box-sizing:border-box}
html{
  min-width:320px;
  background:var(--zd-bg);
  scroll-behavior:smooth;
}
body.zd-body{
  min-width:320px;
  min-height:100vh;
  margin:0;
  color:var(--zd-ink);
  background:
    radial-gradient(circle at 90% 6%, rgba(241,217,156,.34), transparent 27%),
    radial-gradient(circle at 72% 68%, rgba(216,235,232,.42), transparent 30%),
    var(--zd-bg);
  font:15px/1.55 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
a{color:inherit}
button,input{font:inherit}
.zd-skip{
  position:fixed;
  left:18px;
  top:-80px;
  z-index:999;
  padding:11px 14px;
  border-radius:12px;
  background:var(--zd-ink);
  color:#fff;
}
.zd-skip:focus{top:18px}
.zd-shell{
  min-height:100vh;
  position:relative;
}
.zd-sidebar{
  position:absolute;
  top:12px;
  left:12px;
  width:var(--zd-sidebar-w);
  display:flex;
  flex-direction:column;
  padding:18px 14px;
  border:1.5px solid var(--zd-line);
  border-radius:26px;
  background:linear-gradient(180deg,var(--zd-sidebar),var(--zd-sidebar-strong));
  box-shadow:var(--zd-shadow);
  overflow:visible;
}
.zd-brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding:0 8px 14px;
  border-bottom:1.5px solid color-mix(in srgb,var(--zd-line) 75%,transparent);
  text-decoration:none;
}
.zd-logo{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  flex:0 0 42px;
  border-radius:13px;
  background:var(--zd-teal-dark);
  color:#fff;
  font:750 21px/1 Fraunces,Georgia,serif;
}
.zd-brand-text strong{
  display:block;
  font:750 22px/.95 Fraunces,Georgia,serif;
  letter-spacing:-.03em;
}
.zd-brand-text small{
  display:block;
  margin-top:4px;
  font-size:9px;
  font-weight:950;
  letter-spacing:.18em;
  text-transform:uppercase;
}
.zd-menu{
  display:grid;
  gap:8px;
  margin-top:16px;
}
.zd-menu a,
.zd-account-menu summary{
  display:flex;
  min-height:44px;
  align-items:center;
  gap:10px;
  padding:7px 9px;
  border:1.5px solid transparent;
  border-radius:13px;
  color:var(--zd-ink);
  text-decoration:none;
  font-weight:950;
  cursor:pointer;
}
.zd-menu a i,
.zd-account-menu summary i{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  flex:0 0 30px;
  border:1.5px solid var(--zd-line);
  border-radius:10px;
  background:rgba(255,255,255,.36);
  font-style:normal;
  font-weight:900;
}
.zd-menu a span,
.zd-account-menu summary span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.zd-menu a b{
  margin-left:auto;
  padding:4px 7px;
  border-radius:999px;
  background:var(--zd-surface);
  color:var(--zd-muted);
  font-size:10px;
  line-height:1;
}
.zd-menu a.active{
  border-color:var(--zd-ochre);
  background:var(--zd-ochre-soft);
  box-shadow:4px 4px 0 rgba(23,42,50,.15);
}
.zd-menu a.active i{
  border-color:var(--zd-ochre);
  background:var(--zd-ochre);
  color:#fff;
}
.zd-menu a:hover,
.zd-account-menu summary:hover{
  background:rgba(255,253,248,.64);
}
.zd-account-menu summary{
  list-style:none;
}
.zd-account-menu summary::-webkit-details-marker{display:none}
.zd-account-links{
  display:grid;
  gap:4px;
  padding:5px 0 3px 38px;
}
.zd-account-links a{
  min-height:30px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:4px 8px;
  border-radius:11px;
  text-decoration:none;
  font-size:12px;
  font-weight:900;
}
.zd-account-links a:hover{
  background:rgba(255,253,248,.68);
}
.zd-account-links i{
  width:22px;
  height:22px;
  display:grid;
  place-items:center;
  flex:0 0 22px;
  border:1px solid color-mix(in srgb,var(--zd-line) 75%,transparent);
  border-radius:8px;
  background:var(--zd-surface);
  font-style:normal;
  font-size:11px;
}
.zd-sidebar-tools{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px;
  margin-top:10px;
  padding-top:10px;
  border-top:1.5px solid color-mix(in srgb,var(--zd-line) 75%,transparent);
}
.zd-sidebar-tools a,
.zd-sidebar-tools button{
  min-width:0;
  min-height:42px;
  display:grid;
  place-items:center;
  padding:5px;
  border:1.5px solid color-mix(in srgb,var(--zd-line) 75%,transparent);
  border-radius:12px;
  background:rgba(255,253,248,.64);
  color:var(--zd-ink);
  text-decoration:none;
  cursor:pointer;
}
.zd-sidebar-tools span{
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:var(--zd-surface);
  font-size:12px;
  line-height:1;
}
.zd-sidebar-tools b{
  display:none;
}
.zd-member-card{
  min-height:52px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:9px;
  margin-top:10px;
  padding:8px;
  border:1.5px solid color-mix(in srgb,var(--zd-line) 72%,transparent);
  border-radius:16px;
  background:rgba(255,253,248,.72);
  text-decoration:none;
}
.zd-avatar,
.zd-profile-dot{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:var(--zd-moss-soft);
  color:var(--zd-ink);
  font-weight:950;
}
.zd-member-card strong,
.zd-member-card small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.zd-member-card small{
  color:var(--zd-muted);
  font-size:12px;
}
.zd-member-card em{
  color:var(--zd-muted);
  font-style:normal;
}
.zd-main{
  min-height:100vh;
  margin-left:calc(var(--zd-sidebar-w) + var(--zd-gap));
  padding:32px 32px 64px 0;
}
.zd-topbar{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:24px;
  align-items:center;
  margin-bottom:28px;
}
.zd-kicker{
  margin:0 0 10px;
  color:var(--zd-ochre);
  font-size:12px;
  font-weight:950;
  letter-spacing:.18em;
  text-transform:uppercase;
}
.zd-topbar h1{
  max-width:760px;
  margin:0;
  font:650 clamp(42px,4.8vw,62px)/.96 Fraunces,Georgia,serif;
  letter-spacing:-.055em;
}
.zd-topbar p:not(.zd-kicker){
  max-width:560px;
  margin:10px 0 0;
  color:var(--zd-muted);
  font-size:17px;
}
.zd-actions{
  display:flex;
  align-items:center;
  gap:10px;
}
.zd-search{
  width:min(360px,34vw);
  height:48px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 12px;
  border:1.5px solid var(--zd-line);
  border-radius:999px;
  background:rgba(255,253,248,.92);
  box-shadow:var(--zd-shadow-soft);
}
.zd-search label{
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
}
.zd-search::before{
  content:"⌕";
  color:var(--zd-muted);
}
.zd-search input{
  min-width:0;
  flex:1;
  border:0;
  outline:0;
  background:transparent;
  color:var(--zd-ink);
}
.zd-search kbd{
  padding:4px 8px;
  border-radius:8px;
  background:var(--zd-raised);
  color:var(--zd-muted);
  font-size:12px;
}
.zd-icon-btn,
.zd-profile-dot{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  flex:0 0 48px;
  border:1.5px solid var(--zd-line);
  border-radius:50%;
  background:var(--zd-surface);
  color:var(--zd-ink);
  text-decoration:none;
  cursor:pointer;
  box-shadow:var(--zd-shadow-soft);
}
.zd-notification{
  position:relative;
}
.zd-notification::after{
  content:"";
  position:absolute;
  top:8px;
  right:8px;
  width:8px;
  height:8px;
  border:2px solid var(--zd-surface);
  border-radius:50%;
  background:var(--zd-ochre);
}

.zd-mobile-header,
.zd-mobile-nav{
  display:none;
}
@media(max-width:1180px) and (min-width:901px){
  :root{
    --zd-sidebar-w:236px;
    --zd-gap:28px;
  }
  .zd-main{
    padding-right:22px;
  }
  .zd-topbar{
    grid-template-columns:1fr;
  }
  .zd-actions{
    justify-content:flex-start;
  }
  .zd-search{
    width:min(420px,100%);
  }
}
@media(max-width:900px){
  .zd-sidebar{
    display:none;
  }
  .zd-mobile-header{
    position:sticky;
    top:0;
    z-index:40;
    display:flex;
    align-items:center;
    gap:10px;
    min-height:66px;
    padding:10px 12px;
    border-bottom:1.5px solid var(--zd-line);
    background:color-mix(in srgb,var(--zd-bg) 94%,transparent);
    backdrop-filter:blur(10px);
  }
  .zd-mobile-brand{
    text-decoration:none;
  }
  .zd-mobile-header div{
    flex:1;
    min-width:0;
    line-height:1.15;
  }
  .zd-mobile-header small{
    display:block;
    color:var(--zd-muted);
  }
  .zd-main{
    margin-left:0;
    padding:18px 14px 108px;
  }
  .zd-topbar{
    display:block;
  }
  .zd-actions{
    display:none;
  }
  .zd-topbar h1{
    font-size:clamp(34px,10vw,44px);
  }
  .zd-mobile-nav{
    position:fixed;
    left:10px;
    right:10px;
    bottom:10px;
    z-index:50;
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:4px;
    padding:7px;
    padding-bottom:calc(7px + env(safe-area-inset-bottom));
    border:1.5px solid var(--zd-line);
    border-radius:20px;
    background:var(--zd-surface);
    box-shadow:var(--zd-shadow-soft);
  }
  .zd-mobile-nav a{
    min-height:52px;
    display:grid;
    place-items:center;
    gap:2px;
    padding:6px 3px;
    border-radius:12px;
    color:var(--zd-muted);
    text-decoration:none;
    font-size:10.5px;
    font-weight:900;
  }
  .zd-mobile-nav a.active{
    color:var(--zd-ochre);
    background:color-mix(in srgb,var(--zd-ochre-soft) 58%,white);
  }
  .zd-mobile-nav i{
    font-style:normal;
    font-size:17px;
  }
}


/* Phase 3 — sticky collapsible desktop menu + refined mobile shell */
@media(min-width:901px){
  .zd-sidebar{
    position:sticky;
    top:12px;
    align-self:start;
    max-height:calc(100vh - 24px);
    overflow:visible;
  }
  .zd-shell{
    display:grid;
    grid-template-columns:calc(var(--zd-sidebar-w) + var(--zd-gap)) minmax(0, 1fr);
    align-items:start;
  }
  .zd-sidebar{
    grid-column:1;
    margin-left:12px;
  }
  .zd-main{
    grid-column:2;
    margin-left:0;
    padding-left:0;
  }
  .zd-collapse{
    min-height:40px;
    display:flex;
    align-items:center;
    gap:10px;
    margin-top:10px;
    padding:7px 9px;
    border:1.5px solid color-mix(in srgb,var(--zd-line) 76%,transparent);
    border-radius:13px;
    background:rgba(255,253,248,.68);
    color:var(--zd-ink);
    cursor:pointer;
    font-weight:950;
  }
  .zd-collapse i{
    width:30px;
    height:30px;
    display:grid;
    place-items:center;
    flex:0 0 30px;
    border:1.5px solid var(--zd-line);
    border-radius:10px;
    background:var(--zd-surface);
    font-style:normal;
  }
  .zd-collapse span{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .zd-collapse:hover{
    background:var(--zd-ochre-soft);
  }

  .zd-shell.is-collapsed{
    grid-template-columns:118px minmax(0, 1fr);
  }
  .zd-shell.is-collapsed .zd-sidebar{
    width:86px;
    padding:16px 10px;
  }
  .zd-shell.is-collapsed .zd-brand{
    justify-content:center;
    padding-left:0;
    padding-right:0;
  }
  .zd-shell.is-collapsed .zd-brand-text,
  .zd-shell.is-collapsed .zd-menu a span,
  .zd-shell.is-collapsed .zd-menu a b,
  .zd-shell.is-collapsed .zd-account-menu summary span,
  .zd-shell.is-collapsed .zd-account-links,
  .zd-shell.is-collapsed .zd-sidebar-tools b,
  .zd-shell.is-collapsed .zd-member-card span:not(.zd-avatar),
  .zd-shell.is-collapsed .zd-member-card em,
  .zd-shell.is-collapsed .zd-collapse span{
    display:none;
  }
  .zd-shell.is-collapsed .zd-logo{
    width:44px;
    height:44px;
    flex-basis:44px;
  }
  .zd-shell.is-collapsed .zd-menu a,
  .zd-shell.is-collapsed .zd-account-menu summary,
  .zd-shell.is-collapsed .zd-collapse{
    justify-content:center;
    padding-left:6px;
    padding-right:6px;
  }
  .zd-shell.is-collapsed .zd-sidebar-tools{
    grid-template-columns:1fr;
  }
  .zd-shell.is-collapsed .zd-member-card{
    grid-template-columns:1fr;
    justify-items:center;
  }
}

.zd-mobile-drawer{
  position:fixed;
  inset:0;
  z-index:80;
  display:grid;
  place-items:end center;
  padding:14px;
  background:rgba(23,42,50,.28);
  backdrop-filter:blur(6px);
}
.zd-mobile-drawer[hidden]{
  display:none;
}
.zd-mobile-drawer-card{
  width:min(440px, 100%);
  padding:16px;
  border:1.5px solid var(--zd-line);
  border-radius:24px;
  background:var(--zd-surface);
  box-shadow:var(--zd-shadow);
}
.zd-mobile-drawer-head{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr) auto;
  align-items:center;
  gap:10px;
  padding-bottom:12px;
  border-bottom:1.5px solid color-mix(in srgb,var(--zd-line) 70%,transparent);
}
.zd-mobile-drawer-head strong,
.zd-mobile-drawer-head small{
  display:block;
}
.zd-mobile-drawer-head small{
  color:var(--zd-muted);
}
.zd-mobile-drawer-head button{
  width:38px;
  height:38px;
  border:1.5px solid var(--zd-line);
  border-radius:12px;
  background:var(--zd-raised);
  color:var(--zd-ink);
  font-size:22px;
}
.zd-mobile-drawer nav{
  display:grid;
  gap:8px;
  padding-top:12px;
}
.zd-mobile-drawer nav a{
  min-height:46px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 10px;
  border:1.5px solid var(--zd-line);
  border-radius:14px;
  background:var(--zd-bg-soft);
  text-decoration:none;
  font-weight:900;
}
.zd-mobile-drawer nav i{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:var(--zd-surface);
  font-style:normal;
}

@media(max-width:900px){
  .zd-mobile-header{
    box-shadow:0 12px 26px rgba(23,42,50,.06);
  }
  .zd-mobile-header .zd-icon-btn{
    width:42px;
    height:42px;
    flex:0 0 42px;
    box-shadow:none;
  }
  .zd-mobile-header strong{
    display:block;
    max-width:180px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .zd-main{
    padding-top:16px;
  }
  .zd-topbar{
    margin-bottom:18px;
  }
  .zd-topbar p:not(.zd-kicker){
    font-size:14px;
  }
}
@media(max-width:390px){
  .zd-main{
    padding-left:10px;
    padding-right:10px;
  }
  .zd-mobile-nav{
    left:8px;
    right:8px;
  }
  .zd-mobile-nav span{
    font-size:10px;
  }
}

/* Phase 3C — sidebar/menu rebuilt cleanly
   Goal: readable menu, sticky, collapsible, no internal menu scrollbar, no overflow at normal zoom. */
@media(min-width:901px){
  :root{
    --zd-sidebar-w:278px;
    --zd-sidebar-collapsed-w:96px;
    --zd-gap:34px;
  }

  .zd-shell{
    display:grid;
    grid-template-columns:calc(var(--zd-sidebar-w) + var(--zd-gap)) minmax(0, 1fr);
    align-items:start;
    min-height:100vh;
    overflow-x:hidden;
  }

  .zd-sidebar{
    position:sticky;
    top:16px;
    grid-column:1;
    width:var(--zd-sidebar-w);
    min-height:0;
    max-height:none;
    height:auto;
    margin-left:16px;
    padding:18px 14px 16px;
    border-radius:28px;
    overflow:visible;
    align-self:start;
  }

  .zd-main{
    grid-column:2;
    margin-left:0;
    padding:34px 34px 72px 0;
  }

  .zd-brand{
    gap:12px;
    padding:0 8px 16px;
  }

  .zd-logo{
    width:46px;
    height:46px;
    flex-basis:46px;
    border-radius:14px;
    font-size:22px;
  }

  .zd-brand-text strong{
    font-size:24px;
    line-height:.95;
  }

  .zd-brand-text small{
    font-size:9.5px;
    letter-spacing:.18em;
  }

  .zd-menu{
    margin-top:14px;
    gap:9px;
    overflow:visible;
    max-height:none;
  }

  .zd-menu a,
  .zd-account-menu summary{
    min-height:50px;
    gap:11px;
    padding:8px 10px;
    border-radius:15px;
    font-size:16px;
    line-height:1.1;
  }

  .zd-menu a i,
  .zd-account-menu summary i{
    width:34px;
    height:34px;
    flex-basis:34px;
    border-radius:11px;
    font-size:14px;
  }

  .zd-menu a b{
    max-width:72px;
    padding:4px 8px;
    font-size:10px;
  }

  .zd-account-links{
    gap:5px;
    padding:7px 0 3px 45px;
  }

  .zd-account-links a{
    min-height:34px;
    padding:5px 9px;
    border-radius:12px;
    font-size:13px;
  }

  .zd-account-links i{
    width:24px;
    height:24px;
    flex-basis:24px;
    border-radius:8px;
  }

  .zd-sidebar-tools{
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:8px;
    margin-top:14px;
    padding-top:14px;
  }

  .zd-sidebar-tools a,
  .zd-sidebar-tools button{
    min-height:48px;
    padding:6px;
    border-radius:14px;
  }

  .zd-sidebar-tools span{
    width:28px;
    height:28px;
    border-radius:10px;
    font-size:12px;
  }

  .zd-member-card{
    min-height:60px;
    margin-top:14px;
    padding:10px;
    border-radius:17px;
  }

  .zd-avatar{
    width:38px;
    height:38px;
    font-size:14px;
  }

  .zd-member-card strong{
    font-size:15px;
  }

  .zd-member-card small{
    font-size:12px;
  }

  .zd-collapse{
    min-height:46px;
    width:100%;
    margin-top:12px;
    padding:8px 10px;
    border-radius:15px;
    font-size:15px;
  }

  .zd-collapse i{
    width:32px;
    height:32px;
    flex-basis:32px;
    border-radius:10px;
  }

  .zd-shell.is-collapsed{
    grid-template-columns:calc(var(--zd-sidebar-collapsed-w) + 26px) minmax(0, 1fr);
  }

  .zd-shell.is-collapsed .zd-sidebar{
    width:var(--zd-sidebar-collapsed-w);
    margin-left:14px;
    padding:16px 11px;
  }

  .zd-shell.is-collapsed .zd-brand{
    justify-content:center;
    padding-left:0;
    padding-right:0;
  }

  .zd-shell.is-collapsed .zd-brand-text,
  .zd-shell.is-collapsed .zd-menu a span,
  .zd-shell.is-collapsed .zd-menu a b,
  .zd-shell.is-collapsed .zd-account-menu summary span,
  .zd-shell.is-collapsed .zd-account-links,
  .zd-shell.is-collapsed .zd-sidebar-tools b,
  .zd-shell.is-collapsed .zd-member-card span:not(.zd-avatar),
  .zd-shell.is-collapsed .zd-member-card em,
  .zd-shell.is-collapsed .zd-collapse span{
    display:none;
  }

  .zd-shell.is-collapsed .zd-menu a,
  .zd-shell.is-collapsed .zd-account-menu summary,
  .zd-shell.is-collapsed .zd-collapse{
    justify-content:center;
    padding-left:7px;
    padding-right:7px;
  }

  .zd-shell.is-collapsed .zd-menu a i,
  .zd-shell.is-collapsed .zd-account-menu summary i,
  .zd-shell.is-collapsed .zd-collapse i{
    margin:0;
  }

  .zd-shell.is-collapsed .zd-sidebar-tools{
    grid-template-columns:1fr;
  }

  .zd-shell.is-collapsed .zd-member-card{
    grid-template-columns:1fr;
    justify-items:center;
  }

  .zd-shell.is-collapsed .zd-logo{
    width:46px;
    height:46px;
    flex-basis:46px;
  }
}

/* Moderate laptop: keep menu readable, reduce width slightly but do not shrink text too much. */
@media(min-width:901px) and (max-width:1180px){
  :root{
    --zd-sidebar-w:260px;
    --zd-gap:28px;
  }

  .zd-sidebar{
    margin-left:12px;
  }

  .zd-main{
    padding-right:24px;
  }

  .zd-menu a,
  .zd-account-menu summary{
    min-height:48px;
    font-size:15px;
  }

}

/* Short-height screens: compact only enough to stay contained; keep labels readable. */
@media(min-width:901px) and (max-height:760px){
  .zd-sidebar{
    top:10px;
    padding:13px 12px 12px;
    border-radius:24px;
  }

  .zd-brand{
    padding-bottom:10px;
  }

  .zd-logo{
    width:40px;
    height:40px;
    flex-basis:40px;
    font-size:20px;
  }

  .zd-brand-text strong{
    font-size:21px;
  }

  .zd-menu{
    margin-top:10px;
    gap:6px;
  }

  .zd-menu a,
  .zd-account-menu summary{
    min-height:42px;
    padding:6px 8px;
    font-size:14px;
  }

  .zd-menu a i,
  .zd-account-menu summary i{
    width:30px;
    height:30px;
    flex-basis:30px;
  }

  .zd-account-links{
    padding-left:40px;
  }

  .zd-account-links a{
    min-height:29px;
    font-size:12px;
  }

  .zd-sidebar-tools{
    margin-top:9px;
    padding-top:9px;
    gap:6px;
  }

  .zd-sidebar-tools a,
  .zd-sidebar-tools button{
    min-height:40px;
  }

  .zd-member-card{
    min-height:50px;
    margin-top:9px;
    padding:8px;
  }

  .zd-avatar{
    width:34px;
    height:34px;
  }

  .zd-collapse{
    min-height:39px;
    margin-top:9px;
    padding:6px 8px;
  }

  .zd-collapse i{
    width:28px;
    height:28px;
    flex-basis:28px;
  }
}

/* Extremely short/zoomed views: the page can scroll, but the menu card still contains itself. */
@media(min-width:901px) and (max-height:650px){
  .zd-sidebar{
    position:relative;
    top:auto;
    margin-top:10px;
  }
}


/* Phase 4 — main content rebuilt from scratch; menu preserved */
@media(min-width:901px){
  :root{
    --zd-gap:58px;
  }

  .zd-main{
    padding:36px 36px 76px 0;
  }

  .zd-topbar{
    margin-bottom:30px;
  }

  .zd-topbar h1{
    max-width:680px;
  }
}

.zd-continue-card{
  position:relative;
  overflow:hidden;
  min-height:310px;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(280px,34%);
  gap:28px;
  align-items:center;
  padding:36px;
  border:1.5px solid var(--zd-line);
  border-radius:30px;
  background:
    radial-gradient(circle at 88% 26%, rgba(181,138,60,.22), transparent 18%),
    linear-gradient(135deg, rgba(255,253,248,.96), rgba(255,243,209,.86));
  box-shadow:var(--zd-shadow);
}

.zd-continue-copy{
  min-width:0;
  max-width:760px;
}

.zd-continue-pill{
  width:max-content;
  max-width:100%;
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:18px;
  padding:8px 13px 8px 8px;
  border:1.5px solid var(--zd-line);
  border-radius:999px;
  background:rgba(255,253,248,.84);
}

.zd-continue-pill span{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  flex:0 0 34px;
  border-radius:50%;
  background:var(--zd-teal-soft);
  color:var(--zd-teal-dark);
  font-weight:950;
}

.zd-continue-pill strong{
  font-weight:950;
}

.zd-continue-pill small{
  color:var(--zd-muted);
  font-weight:850;
}

.zd-continue-card h2{
  max-width:760px;
  margin:0;
  font:650 clamp(42px,4.8vw,64px)/.94 Fraunces,Georgia,serif;
  letter-spacing:-.06em;
}

.zd-continue-card p:not(.zd-kicker){
  max-width:620px;
  margin:16px 0 0;
  color:var(--zd-muted);
  font-size:16px;
}

.zd-primary-action{
  width:max-content;
  max-width:100%;
  min-height:48px;
  display:inline-flex;
  align-items:center;
  gap:10px;
  margin-top:22px;
  padding:12px 18px;
  border:1.5px solid var(--zd-ink);
  border-radius:999px;
  background:var(--zd-ink);
  color:#fff;
  text-decoration:none;
  font-weight:950;
  box-shadow:4px 4px 0 rgba(23,42,50,.16);
}

.zd-primary-action i{
  font-style:normal;
}

.zd-continue-visual{
  position:relative;
  min-height:240px;
}

.zd-visual-orb{
  position:absolute;
  right:10%;
  top:18%;
  width:110px;
  height:110px;
  border-radius:50%;
  background:var(--zd-ochre);
  box-shadow:0 18px 50px rgba(181,138,60,.24);
}

.zd-mini-step{
  position:absolute;
  min-width:150px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:11px 13px;
  border:1.5px solid var(--zd-line);
  border-radius:16px;
  background:var(--zd-surface);
  box-shadow:var(--zd-shadow-soft);
  font-weight:950;
}

.zd-mini-step b{
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  flex:0 0 28px;
  border-radius:50%;
  background:var(--zd-ochre-soft);
}

.step-a{right:20%; top:0}
.step-b{right:0; bottom:20%}
.step-c{left:8%; bottom:0}

.zd-apps-area{
  display:grid;
  gap:26px;
  margin-top:34px;
}

.zd-app-section{
  padding:28px;
  border:1.5px solid var(--zd-line);
  border-radius:28px;
  background:rgba(255,253,248,.72);
  box-shadow:var(--zd-shadow-soft);
}

.zd-section-head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

.zd-section-head h2{
  margin:0;
  font:650 34px/.98 Fraunces,Georgia,serif;
  letter-spacing:-.04em;
}

.zd-section-head span{
  padding:7px 11px;
  border:1.5px solid var(--zd-line);
  border-radius:999px;
  background:var(--zd-surface);
  color:var(--zd-muted);
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}

.zd-app-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:16px;
}

.zd-app-card{
  min-width:0;
  display:flex;
  flex-direction:column;
  min-height:210px;
  padding:18px;
  border:1.5px solid var(--zd-line);
  border-radius:22px;
  background:var(--zd-surface);
  box-shadow:4px 4px 0 rgba(23,42,50,.08);
}

.zd-app-card-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px;
}

.zd-app-icon{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:var(--zd-teal-soft);
  color:var(--zd-teal-dark);
  font-weight:950;
}

.zd-app-pill{
  padding:5px 9px;
  border-radius:999px;
  background:var(--zd-raised);
  color:var(--zd-muted);
  font-size:11px;
  font-weight:900;
}

.zd-app-card h3{
  margin:0;
  font-size:19px;
  line-height:1.12;
}

.zd-app-card p{
  margin:9px 0 18px;
  color:var(--zd-muted);
  font-size:14px;
}

.zd-app-card a{
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:auto;
  padding:10px 13px;
  border:1.5px solid var(--zd-line);
  border-radius:14px;
  background:var(--zd-bg-soft);
  text-decoration:none;
  font-weight:950;
}

.zd-app-card a i{
  font-style:normal;
}

.zd-app-card.is-locked{
  opacity:.82;
}

.zd-app-card.is-locked .zd-app-icon{
  background:var(--zd-raised);
  color:var(--zd-muted);
}

.zd-app-card.is-locked a{
  background:var(--zd-ochre-soft);
}

.zd-app-card.tone-ochre .zd-app-icon{background:var(--zd-ochre-soft); color:var(--zd-ochre)}
.zd-app-card.tone-moss .zd-app-icon{background:var(--zd-moss-soft); color:var(--zd-moss)}
.zd-app-card.tone-plum .zd-app-icon{background:var(--zd-plum-soft); color:var(--zd-plum)}
.zd-app-card.tone-mauve .zd-app-icon{background:var(--zd-plum-soft); color:var(--zd-plum)}

@media(max-width:1180px) and (min-width:901px){
  :root{
    --zd-gap:42px;
  }

  .zd-continue-card{
    grid-template-columns:1fr;
  }

  .zd-continue-visual{
    display:none;
  }
}

@media(max-width:900px){
  .zd-continue-card{
    grid-template-columns:1fr;
    min-height:0;
    padding:22px;
    border-radius:24px;
  }

  .zd-continue-card h2{
    font-size:clamp(34px,10vw,44px);
  }

  .zd-continue-pill{
    width:100%;
    border-radius:18px;
  }

  .zd-continue-pill small{
    display:none;
  }

  .zd-continue-visual{
    display:none;
  }

  .zd-apps-area{
    gap:20px;
    margin-top:22px;
  }

  .zd-app-section{
    padding:18px;
    border-radius:22px;
  }

  .zd-section-head{
    align-items:start;
  }

  .zd-section-head h2{
    font-size:28px;
  }

  .zd-app-grid{
    grid-template-columns:1fr;
  }

  .zd-app-card{
    min-height:0;
  }
}


/* Phase 4B — make desktop menu truly sticky/fixed while page scrolls
   The previous grid/sticky combination can fail depending on parent layout.
   This keeps the menu visible while the main dashboard scrolls. */
@media(min-width:901px){
  .zd-shell{
    display:block !important;
    min-height:100vh !important;
    overflow:visible !important;
  }

  .zd-sidebar{
    position:fixed !important;
    top:16px !important;
    left:16px !important;
    z-index:60 !important;
    margin-left:0 !important;
    max-height:calc(100vh - 32px) !important;
    overflow:visible !important;
  }

  .zd-main{
    margin-left:calc(var(--zd-sidebar-w) + var(--zd-gap) + 16px) !important;
    padding-left:0 !important;
  }

  .zd-shell.is-collapsed .zd-main{
    margin-left:calc(var(--zd-sidebar-collapsed-w) + 44px) !important;
  }

  .zd-shell.is-collapsed .zd-sidebar{
    left:14px !important;
  }
}

/* On extremely short desktop screens, let the full page scroll but keep menu at top. */
@media(min-width:901px) and (max-height:650px){
  .zd-sidebar{
    position:fixed !important;
    top:10px !important;
    left:10px !important;
    max-height:none !important;
  }

  .zd-main{
    margin-left:calc(var(--zd-sidebar-w) + var(--zd-gap) + 10px) !important;
  }

  .zd-shell.is-collapsed .zd-main{
    margin-left:calc(var(--zd-sidebar-collapsed-w) + 36px) !important;
  }
}

@media(max-width:900px){
  .zd-sidebar{
    position:static !important;
  }
}


/* Phase 5 — app card and access-state polish */
.zd-app-card{
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.zd-app-card.is-open:hover{
  transform:translateY(-2px);
  box-shadow:6px 6px 0 rgba(23,42,50,.10);
}
.zd-app-card.is-locked{
  background:linear-gradient(180deg, rgba(255,253,248,.74), rgba(248,243,232,.82));
  border-style:dashed;
  opacity:1;
}
.zd-app-pill.is-available{
  background:var(--zd-teal-soft);
  color:var(--zd-teal-dark);
}
.zd-app-pill.is-locked{
  background:var(--zd-ochre-soft);
  color:#6C501D;
}
.zd-lock-note{
  margin:-6px 0 14px !important;
  padding:9px 10px;
  border:1px solid color-mix(in srgb,var(--zd-ochre) 55%,transparent);
  border-radius:12px;
  background:color-mix(in srgb,var(--zd-ochre-soft) 58%,white);
  color:#6C501D !important;
  font-size:12px !important;
  font-weight:850;
}
.zd-app-card a{
  transition:background .16s ease, transform .16s ease;
}
.zd-app-card a:hover{
  background:var(--zd-ochre-soft);
  transform:translateY(-1px);
}
.zd-app-card.is-locked a{
  border-color:var(--zd-ochre);
  background:var(--zd-ochre-soft);
  color:var(--zd-ink);
}
.zd-app-card[data-access="free"] .zd-app-pill{
  background:var(--zd-moss-soft);
  color:var(--zd-moss);
}
.zd-section-head{
  padding-bottom:2px;
}
.zd-app-card h3{
  letter-spacing:-.02em;
}
.zd-app-card p{
  line-height:1.45;
}
@media(max-width:900px){
  .zd-app-card{
    border-radius:20px;
    padding:16px;
  }
  .zd-app-card-top{
    margin-bottom:12px;
  }
  .zd-lock-note{
    font-size:12px !important;
  }
}


/* Phase 6 — mobile dashboard optimization
   Mobile is treated as its own experience: compact header, calmer hero, safer touch targets,
   no horizontal overflow, usable bottom nav, and a proper account drawer. */
html,
body.zd-body{
  overflow-x:hidden;
}

.zd-mobile-nav button{
  font:inherit;
}

.zd-mobile-drawer-quick{
  display:grid;
  gap:8px;
  margin-top:12px;
  padding-top:12px;
  border-top:1.5px solid color-mix(in srgb,var(--zd-line) 70%,transparent);
}

.zd-mobile-drawer-quick p{
  margin:0 0 2px;
  color:var(--zd-ochre);
  font-size:11px;
  font-weight:950;
  letter-spacing:.16em;
  text-transform:uppercase;
}

.zd-mobile-drawer-quick a{
  min-height:46px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 10px;
  border:1.5px solid var(--zd-line);
  border-radius:14px;
  background:var(--zd-bg-soft);
  text-decoration:none;
  font-weight:900;
}

.zd-mobile-drawer-quick i{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  flex:0 0 30px;
  border-radius:10px;
  background:var(--zd-surface);
  font-style:normal;
  font-size:11px;
}

body.zd-drawer-open{
  overflow:hidden;
}

@media(max-width:900px){
  body.zd-body{
    min-height:100svh;
    background:
      radial-gradient(circle at 108% -4%, rgba(241,217,156,.42), transparent 30%),
      radial-gradient(circle at -10% 34%, rgba(216,235,232,.46), transparent 34%),
      var(--zd-bg);
  }

  .zd-shell{
    width:100%;
    min-height:100svh;
  }

  .zd-mobile-header{
    min-height:64px;
    padding:9px max(12px, env(safe-area-inset-right)) 9px max(12px, env(safe-area-inset-left));
    gap:8px;
    border-bottom:1.5px solid color-mix(in srgb,var(--zd-line) 78%,transparent);
    background:color-mix(in srgb,var(--zd-bg) 88%,white);
    box-shadow:0 12px 28px rgba(23,42,50,.07);
  }

  .zd-mobile-header .zd-logo{
    width:42px;
    height:42px;
    flex-basis:42px;
    border-radius:14px;
  }

  .zd-mobile-header strong{
    max-width:none;
    color:var(--zd-ink);
    font:750 19px/.98 Fraunces,Georgia,serif;
    letter-spacing:-.03em;
  }

  .zd-mobile-header small{
    margin-top:3px;
    font-size:12px;
    font-weight:850;
  }

  .zd-mobile-header .zd-icon-btn{
    width:42px;
    height:42px;
    flex:0 0 42px;
    border-radius:14px;
    background:rgba(255,253,248,.82);
  }

  .zd-main{
    width:100%;
    max-width:820px;
    margin:0 auto;
    padding:16px 14px calc(104px + env(safe-area-inset-bottom));
  }

  .zd-topbar{
    display:block;
    margin:0 0 16px;
    padding:18px;
    border:1.5px solid color-mix(in srgb,var(--zd-line) 82%,transparent);
    border-radius:24px;
    background:rgba(255,253,248,.70);
    box-shadow:0 16px 42px rgba(23,42,50,.08);
  }

  .zd-kicker{
    margin-bottom:8px;
    font-size:10.5px;
    letter-spacing:.15em;
  }

  .zd-topbar h1{
    max-width:100%;
    font-size:clamp(31px,8.4vw,42px);
    line-height:.98;
    letter-spacing:-.052em;
  }

  .zd-topbar p:not(.zd-kicker){
    max-width:32rem;
    margin-top:9px;
    font-size:14px;
    line-height:1.45;
  }

  .zd-actions{
    display:none;
  }

  .zd-continue-card{
    min-height:0;
    display:block;
    padding:18px;
    border-radius:24px;
    background:
      radial-gradient(circle at 100% 10%, rgba(181,138,60,.16), transparent 26%),
      linear-gradient(145deg, rgba(255,253,248,.96), rgba(255,246,224,.90));
    box-shadow:5px 5px 0 rgba(23,42,50,.11);
  }

  .zd-continue-copy{
    max-width:none;
  }

  .zd-continue-pill{
    width:100%;
    display:grid;
    grid-template-columns:34px minmax(0,1fr);
    align-items:center;
    gap:10px;
    margin-bottom:14px;
    padding:8px 10px 8px 8px;
    border-radius:18px;
  }

  .zd-continue-pill span{
    width:34px;
    height:34px;
  }

  .zd-continue-pill strong{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:14px;
  }

  .zd-continue-pill small{
    display:none;
  }

  .zd-continue-card h2{
    max-width:100%;
    font-size:clamp(29px,8vw,38px);
    line-height:.98;
    letter-spacing:-.055em;
  }

  .zd-continue-card p:not(.zd-kicker){
    margin-top:10px;
    font-size:14px;
    line-height:1.45;
  }

  .zd-primary-action{
    width:100%;
    min-height:48px;
    justify-content:space-between;
    margin-top:16px;
    border-radius:16px;
    padding:12px 14px;
  }

  .zd-continue-visual{
    display:none;
  }

  .zd-apps-area{
    gap:16px;
    margin-top:18px;
  }

  .zd-app-section{
    padding:16px;
    border-radius:24px;
    background:rgba(255,253,248,.62);
    overflow:hidden;
  }

  .zd-section-head{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:end;
    gap:10px;
    margin-bottom:14px;
  }

  .zd-section-head h2{
    font-size:clamp(25px,6.4vw,32px);
    line-height:1;
  }

  .zd-section-head span{
    padding:6px 9px;
    font-size:11px;
  }

  .zd-app-grid{
    grid-template-columns:1fr;
    gap:12px;
  }

  .zd-app-card{
    min-height:0;
    padding:15px;
    border-radius:20px;
    box-shadow:4px 4px 0 rgba(23,42,50,.08);
  }

  .zd-app-card-top{
    margin-bottom:12px;
  }

  .zd-app-icon{
    width:40px;
    height:40px;
    flex:0 0 40px;
    border-radius:13px;
  }

  .zd-app-pill{
    max-width:46%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    text-align:center;
  }

  .zd-app-card h3{
    font-size:18px;
    line-height:1.14;
  }

  .zd-app-card p{
    margin:8px 0 14px;
    font-size:13.5px;
    line-height:1.45;
  }

  .zd-lock-note{
    margin:-4px 0 12px !important;
    padding:8px 9px;
    font-size:11.5px !important;
  }

  .zd-app-card a{
    min-height:46px;
    border-radius:14px;
    padding:11px 12px;
  }

  .zd-mobile-nav{
    left:max(10px, env(safe-area-inset-left));
    right:max(10px, env(safe-area-inset-right));
    bottom:max(10px, env(safe-area-inset-bottom));
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:3px;
    padding:6px;
    border-radius:22px;
    background:rgba(255,253,248,.94);
    backdrop-filter:blur(14px);
    box-shadow:0 20px 46px rgba(23,42,50,.16);
  }

  .zd-mobile-nav a,
  .zd-mobile-nav button{
    min-width:0;
    min-height:56px;
    display:grid;
    place-items:center;
    gap:2px;
    padding:6px 2px;
    border:0;
    border-radius:15px;
    background:transparent;
    color:var(--zd-muted);
    text-decoration:none;
    cursor:pointer;
    font-size:10.5px;
    font-weight:950;
    line-height:1.1;
  }

  .zd-mobile-nav a.active{
    color:#6C501D;
    background:color-mix(in srgb,var(--zd-ochre-soft) 70%,white);
  }

  .zd-mobile-nav i{
    font-style:normal;
    font-size:17px;
    line-height:1;
  }

  .zd-mobile-nav span{
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .zd-mobile-drawer{
    padding:12px;
    align-items:end;
    background:rgba(23,42,50,.34);
  }

  .zd-mobile-drawer-card{
    width:min(460px,100%);
    max-height:calc(100svh - 24px);
    overflow:auto;
    -webkit-overflow-scrolling:touch;
    padding:16px;
    border-radius:26px 26px 22px 22px;
    background:var(--zd-surface);
  }

  .zd-mobile-drawer-head{
    gap:11px;
    padding-bottom:13px;
  }

  .zd-mobile-drawer-head button{
    width:44px;
    height:44px;
    border-radius:14px;
    cursor:pointer;
  }

  .zd-mobile-drawer nav a,
  .zd-mobile-drawer-quick a{
    min-height:48px;
    border-radius:15px;
  }
}

@media(min-width:641px) and (max-width:900px){
  .zd-main{
    padding:22px 22px calc(112px + env(safe-area-inset-bottom));
  }

  .zd-topbar,
  .zd-continue-card,
  .zd-app-section{
    border-radius:28px;
  }

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

  .zd-app-card{
    min-height:196px;
  }
}

@media(max-width:430px){
  .zd-mobile-header{
    padding-left:10px;
    padding-right:10px;
  }

  .zd-mobile-header strong{
    font-size:18px;
  }

  .zd-mobile-header .zd-icon-btn{
    width:40px;
    height:40px;
    flex-basis:40px;
  }

  .zd-main{
    padding-left:12px;
    padding-right:12px;
  }

  .zd-topbar,
  .zd-continue-card,
  .zd-app-section{
    border-radius:22px;
  }

  .zd-section-head{
    align-items:start;
  }

  .zd-section-head span{
    transform:translateY(1px);
  }
}

@media(max-width:390px){
  .zd-mobile-header{
    gap:6px;
  }

  .zd-mobile-header .zd-logo{
    width:38px;
    height:38px;
    flex-basis:38px;
  }

  .zd-mobile-header .zd-icon-btn{
    width:38px;
    height:38px;
    flex-basis:38px;
    border-radius:13px;
  }

  .zd-main{
    padding-left:10px;
    padding-right:10px;
  }

  .zd-topbar,
  .zd-continue-card,
  .zd-app-section{
    padding:15px;
  }

  .zd-topbar h1{
    font-size:30px;
  }

  .zd-continue-card h2{
    font-size:28px;
  }

  .zd-section-head{
    grid-template-columns:1fr;
  }

  .zd-section-head span{
    justify-self:start;
  }

  .zd-mobile-nav{
    left:8px;
    right:8px;
    gap:2px;
    padding:5px;
  }

  .zd-mobile-nav a,
  .zd-mobile-nav button{
    min-height:53px;
    font-size:9.8px;
  }

  .zd-mobile-nav i{
    font-size:16px;
  }
}


/* Phase 7 — real chat widget integration
   The dashboard includes portal/includes/chat-widget.php once. These rules only make the
   existing floating chat control match the calm dashboard palette and keep it clear of
   the mobile bottom navigation. */
body.zd-body .chat-btn{
  border:1.5px solid rgba(255,253,248,.78);
  background:linear-gradient(135deg,var(--zd-teal-dark),var(--zd-teal)) !important;
  color:#fff;
  box-shadow:0 18px 36px rgba(23,42,50,.18), 4px 4px 0 rgba(23,42,50,.14) !important;
}

body.zd-body .chat-btn:hover{
  transform:translateY(-2px) scale(1.02);
  box-shadow:0 22px 42px rgba(23,42,50,.22), 4px 4px 0 rgba(23,42,50,.14) !important;
}

body.zd-body .chat-btn:focus-visible{
  outline:3px solid rgba(79,133,141,.34);
  outline-offset:4px;
}

@media(max-width:900px){
  body.zd-body .chat-widget{
    right:14px !important;
    bottom:calc(94px + env(safe-area-inset-bottom)) !important;
    transition:opacity .18s ease, visibility .18s ease, transform .18s ease;
  }

  body.zd-body .chat-panel{
    bottom:64px !important;
    max-height:min(62vh,520px) !important;
  }

  /* Phase 9C — hide the real support chat while the mobile account drawer is open.
     The drawer uses the body.zd-drawer-open class, so this avoids touching or duplicating
     chat-widget.js and prevents the floating chat button from overlapping the menu. */
  body.zd-body.zd-drawer-open #chatWidgetRoot,
  body.zd-body.zd-drawer-open .chat-widget,
  html.zd-mobile-drawer-open #chatWidgetRoot,
  html.zd-mobile-drawer-open .chat-widget,
  body.zd-body .chat-widget.is-dashboard-drawer-hidden{
    display:none !important;
    opacity:0 !important;
    visibility:hidden !important;
    pointer-events:none !important;
    transform:translateY(12px) scale(.94) !important;
  }
}

@media(max-width:390px){
  body.zd-body .chat-widget{
    right:10px !important;
  }

  body.zd-body .chat-btn{
    width:50px;
    height:50px;
  }
}

/* Phase 7B — mobile search + section discovery
   Mobile gets its own find/jump strip instead of inheriting the desktop topbar actions. */
.zd-mobile-discovery{
  display:none;
}

.zd-search-status{
  margin:0 0 -8px;
  padding:12px 14px;
  border:1.5px solid var(--zd-line);
  border-radius:16px;
  background:rgba(255,253,248,.78);
  color:var(--zd-muted);
  font-size:13px;
  font-weight:850;
}

.zd-app-section{
  scroll-margin-top:26px;
}

@media(max-width:900px){
  .zd-mobile-discovery{
    position:sticky;
    top:64px;
    z-index:35;
    display:grid;
    gap:9px;
    margin:-4px 0 16px;
    padding:8px 0 10px;
    background:linear-gradient(180deg, color-mix(in srgb,var(--zd-bg) 92%,white), color-mix(in srgb,var(--zd-bg) 78%,transparent));
    backdrop-filter:blur(12px);
  }

  .zd-mobile-search{
    min-height:48px;
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center;
    gap:9px;
    padding:0 10px 0 13px;
    border:1.5px solid var(--zd-line);
    border-radius:18px;
    background:rgba(255,253,248,.94);
    box-shadow:0 12px 30px rgba(23,42,50,.08);
  }

  .zd-mobile-search label{
    position:absolute;
    width:1px;
    height:1px;
    overflow:hidden;
    clip:rect(0 0 0 0);
  }

  .zd-mobile-search span{
    color:var(--zd-muted);
    font-size:17px;
    line-height:1;
  }

  .zd-mobile-search input{
    min-width:0;
    width:100%;
    border:0;
    outline:0;
    background:transparent;
    color:var(--zd-ink);
    font-size:15px;
    font-weight:750;
  }

  .zd-mobile-search input::placeholder{
    color:color-mix(in srgb,var(--zd-muted) 72%,transparent);
    font-weight:700;
  }

  .zd-mobile-search button{
    width:32px;
    height:32px;
    display:grid;
    place-items:center;
    border:1.5px solid color-mix(in srgb,var(--zd-line) 78%,transparent);
    border-radius:11px;
    background:var(--zd-raised);
    color:var(--zd-ink);
    cursor:pointer;
    font-size:19px;
    line-height:1;
  }

  .zd-mobile-section-jumps{
    display:flex;
    gap:8px;
    max-width:100%;
    overflow-x:auto;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    padding:0 1px 2px;
  }

  .zd-mobile-section-jumps::-webkit-scrollbar{
    display:none;
  }

  .zd-mobile-section-jumps a{
    min-height:44px;
    display:flex;
    align-items:center;
    gap:8px;
    flex:0 0 auto;
    padding:8px 10px;
    border:1.5px solid var(--zd-line);
    border-radius:16px;
    background:rgba(255,253,248,.90);
    color:var(--zd-ink);
    text-decoration:none;
    box-shadow:3px 3px 0 rgba(23,42,50,.07);
  }

  .zd-mobile-section-jumps strong{
    font-size:12.5px;
    line-height:1;
    font-weight:950;
    white-space:nowrap;
  }

  .zd-mobile-section-jumps small{
    min-width:24px;
    height:24px;
    display:grid;
    place-items:center;
    border-radius:999px;
    background:var(--zd-ochre-soft);
    color:#6C501D;
    font-size:11px;
    font-weight:950;
  }

  .zd-mobile-section-jumps a:focus-visible,
  .zd-mobile-search input:focus-visible,
  .zd-mobile-search button:focus-visible{
    outline:3px solid rgba(79,133,141,.28);
    outline-offset:3px;
  }

  .zd-search-status{
    margin:0 0 -4px;
    padding:11px 12px;
    border-radius:16px;
    background:rgba(255,253,248,.80);
    font-size:12.5px;
  }

  .zd-app-section{
    scroll-margin-top:166px;
  }
}

@media(max-width:430px){
  .zd-mobile-discovery{
    top:62px;
  }

  .zd-mobile-search{
    min-height:46px;
    border-radius:17px;
  }

  .zd-mobile-section-jumps a{
    min-height:42px;
    padding:8px 9px;
  }

  .zd-mobile-section-jumps strong{
    font-size:12px;
  }
}

@media(max-width:390px){
  .zd-mobile-discovery{
    margin-bottom:14px;
  }

  .zd-mobile-section-jumps{
    gap:7px;
  }
}


/* Phase 8 — light/dark mode polish
   The dashboard remains warm and premium in light mode. Dark mode uses the same calm
   teal/ochre system without harsh reds or high-contrast black panels. */
:root[data-theme="dark"] body.zd-body{
  background:
    radial-gradient(circle at 92% 4%, rgba(225,183,96,.14), transparent 30%),
    radial-gradient(circle at 70% 72%, rgba(117,174,177,.16), transparent 32%),
    var(--zd-bg);
}

:root[data-theme="dark"] .zd-sidebar{
  background:linear-gradient(180deg,var(--zd-sidebar),var(--zd-sidebar-strong));
  box-shadow:var(--zd-shadow);
}

:root[data-theme="dark"] .zd-brand,
:root[data-theme="dark"] .zd-sidebar-tools,
:root[data-theme="dark"] .zd-mobile-drawer-head,
:root[data-theme="dark"] .zd-mobile-drawer-quick{
  border-color:color-mix(in srgb,var(--zd-line) 78%,transparent);
}

:root[data-theme="dark"] .zd-logo{
  background:#E9D9B8;
  color:#122D2A;
}

:root[data-theme="dark"] .zd-menu a,
:root[data-theme="dark"] .zd-account-menu summary,
:root[data-theme="dark"] .zd-collapse,
:root[data-theme="dark"] .zd-sidebar-tools a,
:root[data-theme="dark"] .zd-sidebar-tools button,
:root[data-theme="dark"] .zd-member-card,
:root[data-theme="dark"] .zd-account-links a:hover,
:root[data-theme="dark"] .zd-mobile-header .zd-icon-btn{
  color:var(--zd-ink);
}

:root[data-theme="dark"] .zd-menu a i,
:root[data-theme="dark"] .zd-account-menu summary i,
:root[data-theme="dark"] .zd-collapse i,
:root[data-theme="dark"] .zd-account-links i,
:root[data-theme="dark"] .zd-sidebar-tools span,
:root[data-theme="dark"] .zd-mobile-drawer nav i,
:root[data-theme="dark"] .zd-mobile-drawer-quick i{
  background:color-mix(in srgb,var(--zd-surface) 86%,black);
  border-color:var(--zd-line);
  color:var(--zd-ink);
}

:root[data-theme="dark"] .zd-menu a:hover,
:root[data-theme="dark"] .zd-account-menu summary:hover,
:root[data-theme="dark"] .zd-account-links a:hover,
:root[data-theme="dark"] .zd-sidebar-tools a,
:root[data-theme="dark"] .zd-sidebar-tools button,
:root[data-theme="dark"] .zd-member-card,
:root[data-theme="dark"] .zd-collapse{
  background:color-mix(in srgb,var(--zd-surface) 72%,transparent);
}

:root[data-theme="dark"] .zd-menu a.active{
  background:linear-gradient(135deg, color-mix(in srgb,var(--zd-ochre-soft) 88%,black), color-mix(in srgb,var(--zd-sidebar) 60%,black));
  border-color:var(--zd-ochre);
  box-shadow:4px 4px 0 rgba(0,0,0,.22);
}

:root[data-theme="dark"] .zd-menu a.active i{
  background:var(--zd-ochre);
  color:#1A211C;
}

:root[data-theme="dark"] .zd-menu a b,
:root[data-theme="dark"] .zd-section-head span,
:root[data-theme="dark"] .zd-app-pill,
:root[data-theme="dark"] .zd-search kbd{
  background:color-mix(in srgb,var(--zd-raised) 84%,black);
  color:var(--zd-muted);
}

:root[data-theme="dark"] .zd-topbar,
:root[data-theme="dark"] .zd-search,
:root[data-theme="dark"] .zd-icon-btn,
:root[data-theme="dark"] .zd-profile-dot,
:root[data-theme="dark"] .zd-continue-card,
:root[data-theme="dark"] .zd-app-section,
:root[data-theme="dark"] .zd-app-card,
:root[data-theme="dark"] .zd-mobile-drawer-card,
:root[data-theme="dark"] .zd-mobile-drawer nav a,
:root[data-theme="dark"] .zd-mobile-drawer-quick a,
:root[data-theme="dark"] .zd-search-status,
:root[data-theme="dark"] .zd-mobile-search,
:root[data-theme="dark"] .zd-mobile-section-jumps a,
:root[data-theme="dark"] .zd-mobile-nav{
  border-color:var(--zd-line);
  background:color-mix(in srgb,var(--zd-surface) 86%,transparent);
  color:var(--zd-ink);
}

:root[data-theme="dark"] .zd-continue-card{
  background:
    radial-gradient(circle at 88% 26%, rgba(225,183,96,.13), transparent 20%),
    linear-gradient(135deg, color-mix(in srgb,var(--zd-surface) 96%,black), color-mix(in srgb,var(--zd-raised) 88%,black));
}

:root[data-theme="dark"] .zd-app-section,
:root[data-theme="dark"] .zd-topbar{
  background:color-mix(in srgb,var(--zd-surface) 80%,transparent);
}

:root[data-theme="dark"] .zd-mobile-header{
  background:color-mix(in srgb,var(--zd-bg) 88%,black);
  border-color:var(--zd-line);
  box-shadow:0 16px 34px rgba(0,0,0,.24);
}

:root[data-theme="dark"] .zd-mobile-discovery{
  background:linear-gradient(180deg, color-mix(in srgb,var(--zd-bg) 94%,black), color-mix(in srgb,var(--zd-bg) 72%,transparent));
}

:root[data-theme="dark"] .zd-mobile-nav{
  background:color-mix(in srgb,var(--zd-surface) 92%,black);
  box-shadow:0 22px 48px rgba(0,0,0,.36);
}

:root[data-theme="dark"] .zd-mobile-nav a,
:root[data-theme="dark"] .zd-mobile-nav button{
  color:var(--zd-muted);
}

:root[data-theme="dark"] .zd-mobile-nav a.active{
  color:#F4D28A;
  background:color-mix(in srgb,var(--zd-ochre-soft) 78%,black);
}

:root[data-theme="dark"] .zd-primary-action{
  background:#F0DFC2;
  color:#14211F;
  border-color:#F0DFC2;
  box-shadow:4px 4px 0 rgba(0,0,0,.24);
}

:root[data-theme="dark"] .zd-app-card a{
  background:color-mix(in srgb,var(--zd-raised) 86%,black);
  color:var(--zd-ink);
}

:root[data-theme="dark"] .zd-app-card a:hover,
:root[data-theme="dark"] .zd-collapse:hover{
  background:color-mix(in srgb,var(--zd-ochre-soft) 72%,black);
}

:root[data-theme="dark"] .zd-app-card.is-locked{
  background:linear-gradient(180deg, color-mix(in srgb,var(--zd-surface) 72%,transparent), color-mix(in srgb,var(--zd-raised) 86%,black));
  border-style:dashed;
}

:root[data-theme="dark"] .zd-app-card.is-locked a,
:root[data-theme="dark"] .zd-lock-note,
:root[data-theme="dark"] .zd-app-pill.is-locked,
:root[data-theme="dark"] .zd-mobile-section-jumps small{
  background:color-mix(in srgb,var(--zd-ochre-soft) 86%,black);
  color:#F4D28A !important;
  border-color:color-mix(in srgb,var(--zd-ochre) 58%,transparent);
}

:root[data-theme="dark"] .zd-app-pill.is-available{
  background:var(--zd-teal-soft);
  color:#BEE9E6;
}

:root[data-theme="dark"] .zd-app-card[data-access="free"] .zd-app-pill{
  background:var(--zd-moss-soft);
  color:#C2E4BC;
}

:root[data-theme="dark"] .zd-app-card.tone-ochre .zd-app-icon,
:root[data-theme="dark"] .zd-mini-step b{
  background:var(--zd-ochre-soft);
  color:#F4D28A;
}

:root[data-theme="dark"] .zd-app-card.tone-moss .zd-app-icon,
:root[data-theme="dark"] .zd-avatar,
:root[data-theme="dark"] .zd-profile-dot{
  background:var(--zd-moss-soft);
  color:#DDF2D9;
}

:root[data-theme="dark"] .zd-app-card.tone-plum .zd-app-icon,
:root[data-theme="dark"] .zd-app-card.tone-mauve .zd-app-icon{
  background:var(--zd-plum-soft);
  color:#F2CBEF;
}

:root[data-theme="dark"] .zd-app-icon,
:root[data-theme="dark"] .zd-continue-pill span{
  background:var(--zd-teal-soft);
  color:#BEE9E6;
}

:root[data-theme="dark"] .zd-continue-pill,
:root[data-theme="dark"] .zd-mini-step{
  background:color-mix(in srgb,var(--zd-surface) 92%,black);
  border-color:var(--zd-line);
}

:root[data-theme="dark"] .zd-visual-orb{
  background:var(--zd-ochre);
  box-shadow:0 18px 58px rgba(225,183,96,.16);
}

:root[data-theme="dark"] input::placeholder{
  color:color-mix(in srgb,var(--zd-muted) 68%,transparent);
}

:root[data-theme="dark"] .zd-mobile-drawer{
  background:rgba(0,0,0,.48);
}

:root[data-theme="dark"] body.zd-body .chat-btn{
  border-color:color-mix(in srgb,var(--zd-line) 80%,transparent);
  background:linear-gradient(135deg,#244E4B,#386D6C) !important;
  color:#F7EFE2;
  box-shadow:0 18px 38px rgba(0,0,0,.38), 4px 4px 0 rgba(0,0,0,.22) !important;
}

:root[data-theme="dark"] .zd-kicker,
:root[data-theme="dark"] .zd-mobile-drawer-quick p{
  color:#E8BE69;
}

:root[data-theme="dark"] .zd-notification::after{
  border-color:var(--zd-surface);
}

@media(max-width:900px){
  :root[data-theme="dark"] body.zd-body{
    background:
      radial-gradient(circle at 108% -4%, rgba(225,183,96,.16), transparent 32%),
      radial-gradient(circle at -10% 34%, rgba(117,174,177,.16), transparent 36%),
      var(--zd-bg);
  }

  :root[data-theme="dark"] .zd-continue-card{
    background:
      radial-gradient(circle at 100% 10%, rgba(225,183,96,.12), transparent 28%),
      linear-gradient(145deg, color-mix(in srgb,var(--zd-surface) 94%,black), color-mix(in srgb,var(--zd-raised) 90%,black));
    box-shadow:5px 5px 0 rgba(0,0,0,.24);
  }
}

@media(prefers-reduced-motion: reduce){
  *,
  *::before,
  *::after{
    scroll-behavior:auto !important;
    transition-duration:.01ms !important;
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
  }
}

/* Phase 8B — dashboard layout correction
   Removes the oversized welcome hero, adds plan/tier status to the top bar,
   and moves app search directly above the app sections. */
.zd-plan-topbar{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:18px;
  align-items:center;
  margin-bottom:24px;
  padding:18px 20px;
  border:1.5px solid var(--zd-line);
  border-radius:24px;
  background:rgba(255,253,248,.72);
  box-shadow:var(--zd-shadow-soft);
}

.zd-plan-copy{
  min-width:0;
}

.zd-plan-row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
}

.zd-plan-topbar h1{
  margin:0;
  font:650 clamp(24px,2.6vw,34px)/1 Fraunces,Georgia,serif;
  letter-spacing:-.04em;
}

.zd-plan-topbar p:not(.zd-kicker){
  max-width:820px;
  margin:8px 0 0;
  color:var(--zd-muted);
  font-size:14px;
  line-height:1.45;
}

.zd-plan-badge,
.zd-plan-next{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:7px 11px;
  border:1.5px solid var(--zd-line);
  border-radius:999px;
  background:var(--zd-raised);
  color:var(--zd-ink);
  font-size:12px;
  font-weight:950;
  white-space:nowrap;
}

.zd-plan-badge{
  background:var(--zd-ochre-soft);
}

.zd-plan-next{
  color:var(--zd-muted);
}

.zd-plan-cta{
  min-height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:11px 15px;
  border:1.5px solid var(--zd-ink);
  border-radius:999px;
  background:var(--zd-ink);
  color:#fff;
  text-decoration:none;
  font-size:13px;
  font-weight:950;
  white-space:nowrap;
  box-shadow:4px 4px 0 rgba(23,42,50,.13);
}

.zd-plan-cta:hover{
  transform:translateY(-1px);
}

/* Phase 8C — section jump chips are mobile-only. Desktop keeps search above the app sections without the three jump chips. */
.zd-dashboard-discovery{
  display:grid;
  grid-template-columns:minmax(180px,280px) minmax(320px,640px);
  gap:14px;
  align-items:center;
  margin:24px 0 18px;
  padding:16px;
  border:1.5px solid var(--zd-line);
  border-radius:24px;
  background:rgba(255,253,248,.78);
  box-shadow:var(--zd-shadow-soft);
}

.zd-discovery-copy{
  min-width:0;
}

.zd-discovery-copy .zd-kicker{
  margin-bottom:4px;
}

.zd-discovery-copy p:not(.zd-kicker){
  margin:0;
  color:var(--zd-muted);
  font-size:13px;
  line-height:1.35;
}

.zd-app-search{
  width:100%;
  min-width:0;
  background:rgba(255,253,248,.95);
}

.zd-search button[data-dashboard-search-clear]{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:50%;
  background:var(--zd-raised);
  color:var(--zd-muted);
  cursor:pointer;
  font-size:18px;
  line-height:1;
}

.zd-search button[data-dashboard-search-clear]:hover{
  color:var(--zd-ink);
}

.zd-section-jumps{
  min-width:0;
  display:none;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
}

.zd-section-jumps a{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:9px 11px;
  border:1.5px solid var(--zd-line);
  border-radius:15px;
  background:var(--zd-surface);
  color:var(--zd-ink);
  text-decoration:none;
  font-weight:950;
}

.zd-section-jumps a:hover{
  transform:translateY(-1px);
  box-shadow:4px 4px 0 rgba(23,42,50,.10);
}

.zd-section-jumps small{
  min-width:24px;
  height:24px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:var(--zd-ochre-soft);
  color:var(--zd-muted);
  font-size:12px;
}

.zd-apps-area{
  margin-top:0;
}

.zd-app-section{
  scroll-margin-top:28px;
}

@media(max-width:1180px) and (min-width:901px){
  .zd-plan-topbar{
    grid-template-columns:1fr;
  }

  .zd-plan-topbar .zd-actions{
    justify-content:flex-start;
  }

  .zd-dashboard-discovery{
    grid-template-columns:1fr;
  }

  .zd-section-jumps{
    justify-content:flex-start;
  }
}

@media(max-width:900px){
  .zd-plan-topbar{
    margin:0 0 14px;
    padding:13px;
    border-radius:20px;
  }

  .zd-plan-topbar .zd-kicker{
    margin-bottom:7px;
  }

  .zd-plan-topbar h1{
    font-size:24px;
  }

  .zd-plan-row{
    gap:8px;
  }

  .zd-plan-badge,
  .zd-plan-next{
    min-height:30px;
    padding:6px 9px;
    font-size:11.5px;
  }

  .zd-plan-topbar p:not(.zd-kicker){
    font-size:13px;
  }

  .zd-plan-topbar .zd-actions{
    display:flex;
    width:100%;
    margin-top:12px;
  }

  .zd-plan-topbar .zd-icon-btn,
  .zd-plan-topbar .zd-profile-dot{
    display:none;
  }

  .zd-plan-cta{
    width:100%;
    min-height:44px;
    border-radius:16px;
  }

  .zd-dashboard-discovery{
    position:sticky;
    top:66px;
    z-index:35;
    grid-template-columns:1fr;
    gap:10px;
    margin:18px 0 14px;
    padding:10px;
    border-radius:20px;
    background:color-mix(in srgb,var(--zd-bg) 88%,white);
    backdrop-filter:blur(12px);
  }

  .zd-discovery-copy{
    display:none;
  }

  .zd-app-search{
    height:48px;
    border-radius:17px;
    box-shadow:0 12px 30px rgba(23,42,50,.08);
  }

  .zd-app-search kbd{
    display:none;
  }

  .zd-section-jumps{
    display:flex;
    flex-wrap:nowrap;
    justify-content:flex-start;
    overflow-x:auto;
    padding-bottom:2px;
    scrollbar-width:none;
  }

  .zd-section-jumps::-webkit-scrollbar{
    display:none;
  }

  .zd-section-jumps a{
    flex:0 0 auto;
    min-height:38px;
    padding:8px 10px;
    border-radius:14px;
    font-size:13px;
  }

  .zd-app-section{
    scroll-margin-top:170px;
  }
}

@media(max-width:430px){
  .zd-plan-row{
    display:grid;
    grid-template-columns:1fr;
  }

  .zd-plan-badge,
  .zd-plan-next{
    width:max-content;
    max-width:100%;
  }

  .zd-dashboard-discovery{
    margin-top:16px;
  }
}

:root[data-theme="dark"] .zd-plan-topbar,
:root[data-theme="dark"] .zd-dashboard-discovery,
:root[data-theme="dark"] .zd-section-jumps a,
:root[data-theme="dark"] .zd-app-search{
  border-color:var(--zd-line);
  background:color-mix(in srgb,var(--zd-surface) 86%,transparent);
  color:var(--zd-ink);
}

:root[data-theme="dark"] .zd-plan-badge{
  background:color-mix(in srgb,var(--zd-ochre-soft) 76%,black);
}

:root[data-theme="dark"] .zd-plan-next,
:root[data-theme="dark"] .zd-search button[data-dashboard-search-clear],
:root[data-theme="dark"] .zd-section-jumps small{
  background:color-mix(in srgb,var(--zd-raised) 84%,black);
  color:var(--zd-muted);
}

:root[data-theme="dark"] .zd-plan-cta{
  background:var(--zd-ochre);
  border-color:var(--zd-ochre);
  color:#1A211C;
  box-shadow:4px 4px 0 rgba(0,0,0,.22);
}

@media(max-width:900px){
  :root[data-theme="dark"] .zd-dashboard-discovery{
    background:linear-gradient(180deg, color-mix(in srgb,var(--zd-bg) 94%,black), color-mix(in srgb,var(--zd-bg) 82%,transparent));
  }
}

/* Phase 9 — final responsive polish
   Final pass for desktop zoom, tablet/mobile spacing, bottom-nav clearance,
   sticky sidebar safety, and horizontal overflow prevention. */
.zd-shell,
.zd-main,
.zd-topbar,
.zd-plan-topbar,
.zd-dashboard-discovery,
.zd-continue-card,
.zd-apps-area,
.zd-app-section,
.zd-app-grid,
.zd-app-card{
  min-width:0;
}

.zd-plan-row,
.zd-actions,
.zd-discovery-copy,
.zd-search,
.zd-app-card-top{
  min-width:0;
}

.zd-plan-badge,
.zd-plan-next,
.zd-plan-cta,
.zd-app-pill,
.zd-primary-action{
  max-width:100%;
}

.zd-search input,
.zd-mobile-search input{
  min-width:0;
}

.zd-app-grid{
  grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));
}

.zd-app-card p,
.zd-lock-note,
.zd-plan-topbar p,
.zd-discovery-copy p{
  overflow-wrap:anywhere;
}

@media(min-width:901px){
  :root{
    --zd-desktop-right-pad:clamp(20px,2.35vw,40px);
  }

  body.zd-body{
    overflow-x:hidden;
  }

  .zd-sidebar{
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
  }

  .zd-main{
    width:auto;
    max-width:calc(100vw - (var(--zd-sidebar-w) + var(--zd-gap) + 16px));
    padding-right:var(--zd-desktop-right-pad) !important;
  }

  .zd-shell.is-collapsed .zd-main{
    max-width:calc(100vw - (var(--zd-sidebar-collapsed-w) + 44px));
  }

  .zd-plan-topbar,
  .zd-dashboard-discovery,
  .zd-continue-card,
  .zd-app-section{
    width:100%;
    max-width:100%;
  }

  .zd-plan-topbar .zd-actions{
    flex-wrap:nowrap;
  }

  .zd-continue-card{
    min-height:clamp(246px,24vw,310px);
  }

  .zd-continue-card h2{
    font-size:clamp(38px,4.2vw,60px);
  }
}

@media(min-width:901px) and (max-width:1180px){
  :root{
    --zd-desktop-right-pad:22px;
  }

  .zd-dashboard-discovery{
    grid-template-columns:1fr;
  }

  .zd-app-search{
    width:100%;
  }

  .zd-continue-card{
    min-height:0;
    padding:30px;
  }

  .zd-continue-card h2{
    font-size:clamp(34px,4vw,48px);
  }

  .zd-continue-card p:not(.zd-kicker){
    max-width:46rem;
  }
}

@media(min-width:901px) and (max-width:1024px){
  :root{
    --zd-sidebar-w:248px;
    --zd-gap:34px;
    --zd-desktop-right-pad:18px;
  }

  .zd-sidebar{
    left:12px !important;
    width:var(--zd-sidebar-w);
  }

  .zd-main{
    margin-left:calc(var(--zd-sidebar-w) + var(--zd-gap) + 12px) !important;
    max-width:calc(100vw - (var(--zd-sidebar-w) + var(--zd-gap) + 12px));
  }

  .zd-shell.is-collapsed .zd-main{
    margin-left:calc(var(--zd-sidebar-collapsed-w) + 38px) !important;
    max-width:calc(100vw - (var(--zd-sidebar-collapsed-w) + 38px));
  }

  .zd-plan-topbar{
    padding:16px;
  }
}

@media(min-width:901px) and (max-height:760px){
  .zd-sidebar{
    top:10px !important;
    padding-top:12px !important;
    padding-bottom:12px !important;
  }

  .zd-menu a,
  .zd-account-menu summary{
    min-height:40px;
  }

  .zd-sidebar-tools a,
  .zd-sidebar-tools button{
    min-height:38px;
  }

  .zd-member-card{
    min-height:48px;
  }

  .zd-collapse{
    min-height:38px;
  }
}

@media(max-width:900px){
  html{
    scroll-padding-top:152px;
  }

  body.zd-body{
    overflow-x:hidden;
  }

  .zd-mobile-header{
    width:100%;
  }

  .zd-main{
    width:100%;
    max-width:820px;
    padding-bottom:calc(126px + env(safe-area-inset-bottom));
  }

  .zd-plan-topbar,
  .zd-dashboard-discovery,
  .zd-continue-card,
  .zd-app-section{
    width:100%;
    max-width:100%;
  }

  .zd-plan-topbar .zd-actions{
    gap:0;
  }

  .zd-plan-row{
    align-items:start;
  }

  .zd-plan-badge,
  .zd-plan-next{
    white-space:normal;
    line-height:1.2;
  }

  .zd-dashboard-discovery{
    width:100%;
    max-width:100%;
  }

  .zd-app-search{
    width:100%;
    min-width:0;
  }

  .zd-app-search::before{
    flex:0 0 auto;
  }

  .zd-app-card-top{
    align-items:flex-start;
  }

  .zd-app-pill{
    max-width:58%;
    white-space:normal;
    line-height:1.15;
  }

  .zd-app-card a,
  .zd-plan-cta,
  .zd-primary-action,
  .zd-mobile-drawer nav a,
  .zd-mobile-drawer-quick a{
    min-height:48px;
  }

  .zd-mobile-nav{
    max-width:820px;
    margin:0 auto;
  }

  body.zd-body .chat-widget{
    bottom:calc(112px + env(safe-area-inset-bottom)) !important;
  }
}

@media(min-width:641px) and (max-width:900px){
  .zd-dashboard-discovery{
    top:66px;
  }

  .zd-section-jumps a{
    min-height:42px;
  }

  .zd-app-section{
    scroll-margin-top:176px;
  }
}

@media(max-width:430px){
  html{
    scroll-padding-top:146px;
  }

  .zd-main{
    padding-bottom:calc(122px + env(safe-area-inset-bottom));
  }

  .zd-mobile-header div{
    min-width:0;
  }

  .zd-mobile-header small{
    max-width:140px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .zd-dashboard-discovery{
    top:62px;
  }

  .zd-app-search{
    padding-left:11px;
    padding-right:9px;
  }

  .zd-plan-topbar p:not(.zd-kicker),
  .zd-continue-card p:not(.zd-kicker),
  .zd-app-card p{
    font-size:13px;
  }

  .zd-mobile-nav a,
  .zd-mobile-nav button{
    min-height:54px;
  }

  body.zd-body .chat-widget{
    bottom:calc(106px + env(safe-area-inset-bottom)) !important;
  }
}

@media(max-width:390px){
  .zd-mobile-header small{
    max-width:118px;
  }

  .zd-plan-badge,
  .zd-plan-next{
    width:100%;
  }

  .zd-dashboard-discovery{
    padding:9px;
  }

  .zd-search button[data-dashboard-search-clear]{
    width:28px;
    height:28px;
    flex:0 0 28px;
  }

  .zd-section-jumps a{
    min-height:40px;
    padding-left:9px;
    padding-right:9px;
  }

  .zd-section-jumps small{
    min-width:22px;
    height:22px;
  }

  .zd-app-pill{
    max-width:62%;
  }
}

/* Phase 10B — collapsed desktop quick-actions flyout
   In collapsed mode the four quick buttons no longer stack vertically and stretch the menu.
   A single compact trigger opens the actions outward to the right. */
.zd-sidebar-tools-trigger{
  display:none;
}

@media(min-width:901px){
  .zd-sidebar-tools-wrap{
    position:relative;
  }

  .zd-shell.is-collapsed .zd-sidebar-tools-wrap{
    margin-top:10px;
    padding-top:10px;
    border-top:1.5px solid color-mix(in srgb,var(--zd-line) 75%,transparent);
  }

  .zd-shell.is-collapsed .zd-sidebar-tools-trigger{
    width:100%;
    min-height:46px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:7px;
    border:1.5px solid color-mix(in srgb,var(--zd-line) 76%,transparent);
    border-radius:14px;
    background:rgba(255,253,248,.68);
    color:var(--zd-ink);
    cursor:pointer;
    box-shadow:none;
  }

  .zd-shell.is-collapsed .zd-sidebar-tools-trigger span{
    width:30px;
    height:30px;
    display:grid;
    place-items:center;
    border:1.5px solid var(--zd-line);
    border-radius:10px;
    background:var(--zd-surface);
    font-size:13px;
    line-height:1;
  }

  .zd-shell.is-collapsed .zd-sidebar-tools-trigger b{
    display:none;
  }

  .zd-shell.is-collapsed .zd-sidebar-tools-trigger:hover,
  .zd-shell.is-collapsed.is-tools-open .zd-sidebar-tools-trigger{
    background:var(--zd-ochre-soft);
  }

  .zd-shell.is-collapsed .zd-sidebar-tools{
    display:none !important;
    position:absolute;
    left:calc(100% + 12px);
    top:10px;
    z-index:140;
    width:218px;
    grid-template-columns:1fr !important;
    gap:8px;
    margin:0 !important;
    padding:10px !important;
    border:1.5px solid color-mix(in srgb,var(--zd-line) 82%,transparent);
    border-radius:18px;
    background:linear-gradient(180deg,var(--zd-sidebar),var(--zd-sidebar-strong));
    box-shadow:0 22px 42px rgba(24,38,39,.18);
  }

  .zd-shell.is-collapsed.is-tools-open .zd-sidebar-tools{
    display:grid !important;
  }

  .zd-shell.is-collapsed .zd-sidebar-tools a,
  .zd-shell.is-collapsed .zd-sidebar-tools button{
    min-height:44px;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:10px;
    padding:7px 9px;
    border-radius:14px;
    text-align:left;
  }

  .zd-shell.is-collapsed .zd-sidebar-tools span{
    flex:0 0 28px;
    width:28px;
    height:28px;
    border-radius:10px;
  }

  .zd-shell.is-collapsed .zd-sidebar-tools b{
    min-width:0;
    display:block !important;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:13px;
    line-height:1.1;
  }
}

@media(max-width:900px){
  .zd-sidebar-tools-trigger{
    display:none !important;
  }
}


/* Phase 10C — navigation button behavior fix
   Support now routes to /portal/contact.php, and notification buttons use the real
   portal notification popup instead of linking to a missing notifications page. */
.zd-icon-btn.notif-bell-wrap,
.zd-sidebar-tools .notif-bell-wrap,
.zd-mobile-drawer-quick .notif-bell-wrap{
  position:relative;
  font-family:inherit;
}

.zd-icon-btn.notif-bell-wrap{
  cursor:pointer;
}

.zd-mobile-drawer-quick button.notif-bell-wrap{
  width:100%;
  min-height:50px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 12px;
  border:1.5px solid var(--zd-line);
  border-radius:14px;
  background:rgba(255,253,248,.64);
  color:var(--zd-ink);
  font-size:14px;
  font-weight:900;
  text-align:left;
  cursor:pointer;
}

.zd-mobile-drawer-quick button.notif-bell-wrap i{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border:1px solid rgba(31,48,55,.08);
  border-radius:10px;
  background:var(--zd-surface);
  font-style:normal;
  font-size:12px;
}

.notif-badge,
#notif-badge{
  position:absolute;
  top:-4px;
  right:-4px;
  min-width:17px;
  height:17px;
  padding:0 5px;
  border:2px solid var(--zd-surface);
  border-radius:999px;
  background:#b95f4b;
  color:#fff;
  display:none;
  font-size:9px;
  font-style:normal;
  font-weight:950;
  line-height:13px;
  text-align:center;
}

.notif-badge.visible,
#notif-badge.visible{
  display:block;
}

.notifications-panel.zd-notifications-panel{
  position:fixed;
  top:176px;
  right:24px;
  width:min(340px,calc(100vw - 32px));
  max-height:min(440px,calc(100vh - 200px));
  overflow:auto;
  display:none;
  z-index:260;
  padding:12px;
  border:1.5px solid var(--zd-line);
  border-radius:22px;
  background:var(--zd-surface);
  box-shadow:0 26px 54px rgba(23,42,50,.22), 5px 5px 0 rgba(23,42,50,.12);
  color:var(--zd-ink);
}

.notifications-panel.zd-notifications-panel.open{
  display:block;
}

.zd-notifications-panel .notif-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
  padding:2px 2px 10px;
  border-bottom:1.5px solid var(--zd-line);
}

.zd-notifications-panel .notif-header strong{
  font-size:15px;
  font-weight:950;
}

.zd-notifications-panel .notif-header a{
  color:var(--zd-teal-dark);
  font-size:12px;
  font-weight:900;
  text-decoration:none;
}

.zd-notifications-panel .notif-empty{
  padding:18px 12px;
  color:var(--zd-muted);
  font-size:13px;
  font-weight:800;
  text-align:center;
}

.zd-notifications-panel .notif-item{
  display:block;
  margin:0 0 6px;
  padding:10px 11px;
  border:1px solid color-mix(in srgb,var(--zd-line) 68%,transparent);
  border-radius:14px;
  color:inherit;
  text-decoration:none;
  background:var(--zd-bg-soft);
}

.zd-notifications-panel .notif-item:hover{
  background:var(--zd-ochre-soft);
}

.zd-notifications-panel .notif-item.read{
  opacity:.62;
}

.zd-notifications-panel .notif-text{
  color:var(--zd-ink);
  font-size:13px;
  font-weight:900;
}

.zd-notifications-panel .notif-time{
  margin-top:3px;
  color:var(--zd-muted);
  font-size:11px;
  font-weight:800;
}

:root[data-theme="dark"] .zd-mobile-drawer-quick button.notif-bell-wrap,
:root[data-theme="dark"] .notifications-panel.zd-notifications-panel{
  background:var(--zd-surface);
  color:var(--zd-ink);
}

:root[data-theme="dark"] .notif-badge,
:root[data-theme="dark"] #notif-badge{
  border-color:var(--zd-surface);
}

@media(max-width:900px){
  .notifications-panel.zd-notifications-panel{
    top:76px;
    right:12px;
    left:12px;
    width:auto;
    max-height:min(440px,calc(100vh - 170px));
    z-index:250;
  }

  body.zd-body.zd-drawer-open .notifications-panel.zd-notifications-panel{
    display:none !important;
  }
}

/* Phase 11 — screenshot-matched premium sidebar polish
   This only changes the dashboard/sidebar visual system. It does not replace the page shell. */
.zd-sidebar svg,
.zd-mobile-drawer svg{
  width:18px;
  height:18px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:1.85;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.zd-menu a b{
  display:none !important;
}

@media(min-width:901px){
  :root{
    --zd-sidebar-w:264px;
    --zd-sidebar-collapsed-w:94px;
    --zd-gap:38px;
    --zd-sidebar:#BFE2DC;
    --zd-sidebar-strong:#B7DCD5;
  }

  .zd-shell{
    grid-template-columns:calc(var(--zd-sidebar-w) + var(--zd-gap)) minmax(0, 1fr) !important;
  }

  .zd-sidebar{
    width:var(--zd-sidebar-w) !important;
    min-height:calc(100vh - 32px);
    display:flex;
    flex-direction:column;
    top:16px !important;
    margin-left:10px !important;
    padding:14px 12px 12px !important;
    border:1.5px solid rgba(95,128,127,.50) !important;
    border-radius:24px !important;
    background:linear-gradient(180deg,#BFE5DF 0%,#B9DED8 100%) !important;
    box-shadow:3px 3px 0 rgba(33,69,71,.16), 0 18px 44px rgba(23,42,50,.10) !important;
    overflow:visible !important;
  }

  .zd-brand{
    gap:12px !important;
    padding:0 8px 13px !important;
    border-bottom:1.5px solid rgba(95,128,127,.28) !important;
  }

  .zd-logo{
    width:40px !important;
    height:40px !important;
    flex-basis:40px !important;
    border-radius:12px !important;
    border:1.5px solid rgba(95,128,127,.42) !important;
    background:#FBF9F1 !important;
    color:#172A32 !important;
    box-shadow:0 2px 0 rgba(23,42,50,.10) !important;
    font-size:20px !important;
  }

  .zd-brand-text strong{
    font:800 18px/1 Fraunces,Georgia,serif !important;
    letter-spacing:-.02em !important;
  }

  .zd-brand-text small{
    margin-top:2px !important;
    color:#4F6465 !important;
    font-size:9px !important;
    font-weight:950 !important;
    letter-spacing:.17em !important;
  }

  .zd-menu{
    margin-top:9px !important;
    gap:10px !important;
  }

  .zd-menu a,
  .zd-account-menu summary{
    min-height:46px !important;
    gap:12px !important;
    padding:6px 10px !important;
    border:1.5px solid transparent !important;
    border-radius:15px !important;
    background:transparent !important;
    box-shadow:none !important;
    color:#172A32 !important;
    font-size:16px !important;
    font-weight:850 !important;
    line-height:1.1 !important;
  }

  .zd-menu a i,
  .zd-account-menu summary i{
    width:34px !important;
    height:34px !important;
    flex-basis:34px !important;
    border:1.5px solid rgba(95,128,127,.34) !important;
    border-radius:12px !important;
    background:#F7FBF6 !important;
    color:#172A32 !important;
    box-shadow:0 1px 0 rgba(23,42,50,.07) !important;
  }

  .zd-menu a:nth-child(2) i{ background:#EAF5F8 !important; }
  .zd-menu a:nth-child(3) i{ background:#F0E5F1 !important; }
  .zd-menu a:nth-child(4) i{ background:#EEF7EA !important; }

  .zd-menu a.active{
    border-color:#D7AF53 !important;
    background:#F6E8B9 !important;
    box-shadow:none !important;
  }

  .zd-menu a.active i{
    border-color:#D7AF53 !important;
    background:#FFF9E5 !important;
    color:#172A32 !important;
  }

  .zd-menu a:hover,
  .zd-account-menu summary:hover{
    background:rgba(255,253,248,.50) !important;
  }

  .zd-sidebar-tools-wrap{
    margin-top:auto !important;
    position:relative !important;
  }

  .zd-sidebar-tools{
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:8px !important;
    margin-top:0 !important;
    padding-top:10px !important;
    border-top:1.5px solid rgba(95,128,127,.28) !important;
  }

  .zd-sidebar-tools a,
  .zd-sidebar-tools button{
    min-height:40px !important;
    padding:5px !important;
    border:1.5px solid rgba(95,128,127,.32) !important;
    border-radius:13px !important;
    background:#FBE7D8 !important;
    color:#42514C !important;
    box-shadow:none !important;
  }

  .zd-sidebar-tools > *:nth-child(2){ background:#E9DDF0 !important; }
  .zd-sidebar-tools > *:nth-child(3){ background:#DDEFF2 !important; }

  .zd-sidebar-tools span{
    width:24px !important;
    height:24px !important;
    background:transparent !important;
    color:#42514C !important;
    border:0 !important;
    border-radius:0 !important;
    font-size:17px !important;
  }

  .zd-sidebar-tools span svg{
    width:17px;
    height:17px;
  }

  .zd-member-card{
    min-height:52px !important;
    margin-top:8px !important;
    padding:7px 9px !important;
    border:1.5px solid rgba(95,128,127,.32) !important;
    border-radius:17px !important;
    background:rgba(245,252,246,.68) !important;
    box-shadow:0 2px 0 rgba(23,42,50,.07) !important;
    color:#172A32 !important;
  }

  .zd-member-card .zd-avatar{
    width:36px !important;
    height:36px !important;
    border:1.5px solid rgba(95,128,127,.34) !important;
    border-radius:13px !important;
    background:#FEFFF9 !important;
    color:#172A32 !important;
    box-shadow:0 1px 0 rgba(23,42,50,.06) !important;
  }

  .zd-member-card small{
    margin-bottom:0 !important;
    color:#66746E !important;
    font-size:9px !important;
    font-weight:950 !important;
    letter-spacing:.18em !important;
    line-height:1 !important;
    text-transform:uppercase !important;
  }

  .zd-member-card strong{
    margin-top:1px !important;
    color:#172A32 !important;
    font-size:17px !important;
    font-weight:900 !important;
    line-height:1.02 !important;
    letter-spacing:-.02em !important;
  }

  .zd-member-card em{
    color:#6A7774 !important;
    font-size:16px !important;
    font-weight:900 !important;
  }

  .zd-collapse{
    min-height:50px !important;
    width:100% !important;
    justify-content:center !important;
    gap:10px !important;
    margin-top:8px !important;
    padding:6px 10px !important;
    border:1.5px solid rgba(95,128,127,.42) !important;
    border-radius:18px !important;
    background:#FFFDF8 !important;
    color:#172A32 !important;
    box-shadow:0 0 0 5px rgba(255,253,248,.30), inset 0 0 0 1px rgba(255,255,255,.55) !important;
    font-size:16px !important;
    font-weight:900 !important;
  }

  .zd-collapse i{
    width:32px !important;
    height:32px !important;
    flex-basis:32px !important;
    border:1.5px solid rgba(95,128,127,.32) !important;
    border-radius:999px !important;
    background:#FFFDF8 !important;
    color:#6C7673 !important;
    box-shadow:none !important;
  }

  .zd-collapse:hover{
    background:#FFF8E7 !important;
  }

  .zd-shell.is-collapsed{
    grid-template-columns:calc(var(--zd-sidebar-collapsed-w) + 30px) minmax(0, 1fr) !important;
  }

  .zd-shell.is-collapsed .zd-sidebar{
    width:var(--zd-sidebar-collapsed-w) !important;
    min-height:calc(100vh - 32px);
    padding:14px 10px 12px !important;
  }

  .zd-shell.is-collapsed .zd-brand{
    justify-content:center !important;
    padding-left:0 !important;
    padding-right:0 !important;
  }

  .zd-shell.is-collapsed .zd-menu a,
  .zd-shell.is-collapsed .zd-account-menu summary,
  .zd-shell.is-collapsed .zd-collapse{
    justify-content:center !important;
    padding-left:6px !important;
    padding-right:6px !important;
  }

  .zd-shell.is-collapsed .zd-sidebar-tools{
    display:none !important;
  }

  .zd-shell.is-collapsed.is-tools-open .zd-sidebar-tools{
    display:grid !important;
    grid-template-columns:1fr !important;
  }
}

@media(min-width:901px) and (max-height:680px){
  .zd-sidebar{
    min-height:0 !important;
  }
  .zd-sidebar-tools-wrap{
    margin-top:22px !important;
  }
}

:root[data-theme="dark"] .zd-sidebar{
  background:linear-gradient(180deg,#173C38,#12322F) !important;
  border-color:rgba(158,188,181,.30) !important;
}
:root[data-theme="dark"] .zd-logo,
:root[data-theme="dark"] .zd-menu a i,
:root[data-theme="dark"] .zd-member-card .zd-avatar,
:root[data-theme="dark"] .zd-collapse i{
  background:#F4EAD2 !important;
  color:#162824 !important;
}
:root[data-theme="dark"] .zd-menu a,
:root[data-theme="dark"] .zd-member-card,
:root[data-theme="dark"] .zd-collapse{
  color:#F7EFE2 !important;
}
:root[data-theme="dark"] .zd-brand-text small,
:root[data-theme="dark"] .zd-member-card small,
:root[data-theme="dark"] .zd-member-card em{
  color:#B8C8C4 !important;
}
:root[data-theme="dark"] .zd-menu a.active{
  background:#4D3B20 !important;
  border-color:#E1B760 !important;
}
:root[data-theme="dark"] .zd-menu a.active i{
  border-color:#E1B760 !important;
  background:#F5D788 !important;
}
:root[data-theme="dark"] .zd-sidebar-tools a,
:root[data-theme="dark"] .zd-sidebar-tools button,
:root[data-theme="dark"] .zd-member-card,
:root[data-theme="dark"] .zd-collapse{
  background:rgba(244,234,210,.10) !important;
  border-color:rgba(184,200,196,.25) !important;
}
