.site-header{position:relative;z-index:40}
.site-header .header-inner{position:relative;z-index:3}
.header-brand{display:flex;align-items:center;gap:2px;min-width:0}
.drawer-head{display:none}
.drawer-close{min-width:44px;min-height:44px;border-radius:4px}
.header-menu-backdrop{
  position:fixed;inset:0;z-index:1;margin:0;padding:0;border:0;
  background:rgba(31,35,40,.32);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  opacity:0;pointer-events:none;
  transition:opacity .22s ease;
}
.header-menu-backdrop.is-open{opacity:1;pointer-events:auto}
.header-menu-backdrop[hidden]{display:none!important}

.profile-trigger{
  gap:4px;min-width:48px;min-height:44px;cursor:pointer;flex:none;
}
.profile-trigger[aria-expanded="true"]{color:var(--accent-dark);background:var(--accent-soft)}
.profile-trigger[aria-expanded="true"] .profile-chevron{transform:rotate(180deg)}
.mobile-menu[aria-expanded="true"]{color:var(--accent-dark);background:var(--accent-soft)}

.header-sheet{
  position:absolute;top:calc(100% + 10px);z-index:4;
  width:min(300px,calc(100vw - 24px));
  max-height:min(82vh,720px);overflow:auto;
  padding:12px;
  border:1px solid rgba(230,232,236,.95);border-radius:18px;
  background:rgba(255,255,255,.98);
  box-shadow:
    0 1px 2px rgba(31,35,40,.04),
    0 12px 28px rgba(31,35,40,.10),
    0 28px 56px rgba(31,35,40,.12);
  opacity:0;transform:translateY(-10px) scale(.985);
  pointer-events:none;
  transition:opacity .2s ease,transform .2s cubic-bezier(.2,.8,.2,1);
}
.header-sheet::before{
  content:"";position:absolute;top:-6px;width:12px;height:12px;
  background:inherit;border-left:1px solid rgba(230,232,236,.95);
  border-top:1px solid rgba(230,232,236,.95);transform:rotate(45deg);
  box-shadow:-2px -2px 4px rgba(31,35,40,.03);
}
.mobile-nav::before{right:22px}
.profile-dropdown::before{right:18px}
.header-sheet.is-open{
  opacity:1;transform:none;pointer-events:auto;
}
.header-sheet[hidden]{display:none!important}
.mobile-nav{right:max(12px,calc((100% - 1280px) / 2));left:auto}
.profile-dropdown{right:max(12px,calc((100% - 1280px) / 2))}

.header-sheet-group{padding:2px 0 6px}
.header-sheet-group + .header-sheet-group,
.header-sheet-group + .header-sheet-signout,
.header-sheet-group + .header-sheet-cta,
.header-sheet-user + .header-sheet-group{
  border-top:1px solid var(--line);margin-top:6px;padding-top:10px;
}
.header-sheet-label{
  margin:0 12px 8px;font-size:10px;font-weight:700;letter-spacing:.14em;
  text-transform:uppercase;color:var(--muted);
}
.header-sheet-item{
  display:flex;align-items:center;gap:12px;width:100%;
  min-height:48px;padding:8px 10px;margin:0 0 2px;
  border:0;border-radius:14px;background:transparent;
  color:var(--ink);font:inherit;font-size:14px;font-weight:500;
  text-align:start;text-decoration:none;cursor:pointer;
}
.header-sheet-item:hover,
.header-sheet-item:focus-visible{background:var(--accent-soft);color:var(--accent-dark)}
.header-sheet-item:active{background:#F8D4CC}
.header-sheet-item.is-current,
.header-sheet-item[aria-current="page"]{
  background:var(--accent-soft);color:var(--accent-dark);
}
.header-sheet-item.is-current .header-sheet-title,
.header-sheet-item[aria-current="page"] .header-sheet-title{font-weight:650}
.header-sheet-icon{
  display:inline-flex;align-items:center;justify-content:center;
  width:36px;height:36px;border-radius:11px;flex:none;
  background:var(--surface);color:var(--ink);
  box-shadow:inset 0 0 0 1px rgba(230,232,236,.9);
}
.header-sheet-item:hover .header-sheet-icon,
.header-sheet-item:focus-visible .header-sheet-icon,
.header-sheet-item:active .header-sheet-icon,
.header-sheet-item.is-current .header-sheet-icon,
.header-sheet-item[aria-current="page"] .header-sheet-icon{
  background:#F8D4CC;color:var(--accent-dark);box-shadow:none;
}
.header-sheet-copy{flex:1;min-width:0;display:grid;gap:2px;align-content:center}
.header-sheet-title{display:flex;align-items:center;gap:8px;line-height:1.25}
.header-sheet-sub{
  display:block;font-size:12px;font-weight:400;line-height:1.35;color:var(--muted);
}
.header-sheet-item:hover .header-sheet-sub,
.header-sheet-item:focus-visible .header-sheet-sub,
.header-sheet-item.is-current .header-sheet-sub,
.header-sheet-item[aria-current="page"] .header-sheet-sub{color:#9b5a4d}
.header-sheet-chevron{flex:none;color:var(--muted);opacity:.7}
.header-sheet-item:hover .header-sheet-chevron,
.header-sheet-item.is-current .header-sheet-chevron{color:var(--accent-dark);opacity:1}
.header-sheet-badge{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:20px;height:20px;padding:0 6px;border-radius:999px;
  background:var(--accent);color:#fff;font-size:11px;font-weight:700;line-height:1;
}

.header-sheet-user{
  display:flex;align-items:center;gap:14px;
  padding:12px;margin:0 0 2px;border-radius:14px;
  background:linear-gradient(180deg,var(--accent-soft),#fff 70%);
  border:1px solid #F3C7BC;
}
.header-sheet-user .user-photo{width:48px;height:48px;border-radius:14px;flex:none}
.header-sheet-user-copy{min-width:0;display:grid;gap:3px}
.header-sheet-user-copy strong{
  font-size:15px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.header-sheet-user-email{
  font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.header-sheet-user-badges{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px;align-items:center}
.header-sheet-plan-badge{
  display:inline-flex;align-items:center;padding:3px 8px;border-radius:999px;
  background:#fff;border:1px solid var(--line);color:var(--ink);
  font-size:10px;font-weight:650;letter-spacing:.02em;
}
.header-sheet-user .founding-badge{margin-left:0}

.header-sheet-cta{padding:10px 4px 4px;display:grid;gap:8px}
.header-sheet-cta-stack{padding-top:12px}
.header-sheet-cta-button{
  width:100%;justify-content:center;min-height:48px;border-radius:14px;font-weight:600;
}
.header-sheet-cta-primary{box-shadow:0 8px 18px rgba(194,79,60,.18)}
.header-sheet-signout{margin:0;padding-top:8px;border-top:1px solid var(--line)}
.header-sheet-signout-button{color:#7a3b32}
.header-sheet-signout-button .header-sheet-icon{background:#f7e8e4;color:#7a3b32;box-shadow:none}
.header-sheet-signout-button .header-sheet-sub{color:#a56a60}
.header-sheet-signout-button:hover,
.header-sheet-signout-button:focus-visible{background:#f7e8e4;color:#5f2d27}

.profile-trigger:focus-visible,
.mobile-menu:focus-visible,
.header-sheet-item:focus-visible,
.header-sheet-cta-button:focus-visible{
  outline:2px solid var(--accent-dark);outline-offset:2px;
}

@media(max-width:1150px){
  .mobile-nav,.profile-dropdown{right:18px}
}
@media(max-width:700px){
  .header-menu-backdrop{z-index:4}
  .site-header .header-inner{z-index:5}
  .drawer-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 4px;padding:2px 4px 2px 12px}
  .drawer-head .header-sheet-label{margin:0}
  .header-sheet.mobile-nav,
  .header-sheet.profile-dropdown{
    position:fixed;top:0;bottom:0;z-index:6;
    width:min(320px,84vw);max-height:none;height:100dvh;
    margin:0;padding:8px 12px max(16px,env(safe-area-inset-bottom));
    border-radius:0 4px 4px 0;opacity:1;
    overflow:auto;overscroll-behavior:contain;
    box-shadow:8px 0 28px rgba(31,35,40,.14);
    transform:translateX(-105%);
    transition:transform .28s cubic-bezier(.2,.8,.2,1);
  }
  .header-sheet.mobile-nav{left:0;right:auto}
  .header-sheet.profile-dropdown{
    left:auto;right:0;border-radius:4px 0 0 4px;
    box-shadow:-8px 0 28px rgba(31,35,40,.14);
    transform:translateX(105%);
  }
  .header-sheet.mobile-nav.is-open,
  .header-sheet.profile-dropdown.is-open{transform:translateX(0)}
  .header-sheet::before{display:none}
  .header-sheet .header-sheet-item,
  .header-sheet .header-sheet-user,
  .header-sheet .header-sheet-icon,
  .header-sheet .header-sheet-cta-button{border-radius:4px}
}

@media(prefers-reduced-motion:reduce){
  .header-sheet,
  .header-sheet.mobile-nav,
  .header-sheet.profile-dropdown,
  .header-menu-backdrop{transition:none}
  .header-sheet,
  .header-sheet.mobile-nav,
  .header-sheet.profile-dropdown{transform:none}
}

.alerts-trigger{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;cursor:pointer;flex:none}
.alerts-trigger[aria-expanded=true]{background:var(--accent-soft);color:var(--accent-dark)}
.alerts-badge{position:absolute;right:0;top:0;padding:2px 4px;min-width:16px;border-radius:12px;color:white;background:var(--accent-dark);font:bold 10px/12px system-ui}
.alerts-panel[hidden],.alerts-badge[hidden],[data-alerts-mark-all][hidden]{display:none}
.alerts-panel{
  position:absolute;z-index:4;top:calc(100% + 10px);
  right:max(18px,calc((100% - 1280px) / 2 + 48px));
  width:380px;max-width:calc(100vw - 24px);
  background:#fff;border:1px solid rgba(31,35,40,.08);border-radius:18px;
  box-shadow:0 12px 40px rgba(31,35,40,.14),0 2px 8px rgba(31,35,40,.06);
  display:flex;flex-direction:column;max-height:min(78vh,680px);overflow:hidden;padding:6px 0 10px;
}
.alerts-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 6px}
.alerts-panel-head h2{margin:0;font-size:24px;font-weight:800;letter-spacing:-0.03em;line-height:1.15}
.alerts-tabs,.notif-tabs{display:flex;gap:8px;padding:6px 16px 12px}
.notif-tab{
  appearance:none;border:0;background:transparent;color:var(--ink);font:inherit;font-size:14px;font-weight:650;
  padding:8px 14px;border-radius:999px;cursor:pointer;text-decoration:none;
}
.notif-tab.is-active{background:var(--accent-soft);color:var(--accent-dark)}
.alerts-scroll{overflow:auto;flex:1;min-height:0;max-height:calc(8 * 84px);padding:0 4px}
.alerts-trigger[data-unread="true"]{color:var(--accent)}

.notif-menu{position:relative;flex:none}
.notif-menu-trigger{
  appearance:none;border:0;background:transparent;color:var(--ink);width:36px;height:36px;border-radius:50%;
  display:inline-grid;place-items:center;cursor:pointer;padding:0;
}
.notif-menu-trigger:hover,.notif-menu-trigger[aria-expanded=true]{background:var(--surface)}
.notif-menu-panel{
  position:absolute;right:0;top:calc(100% + 6px);z-index:5;min-width:210px;
  background:#fff;border:1px solid var(--line);border-radius:12px;
  box-shadow:0 12px 28px rgba(31,35,40,.14);padding:6px;display:grid;gap:2px;
}
.notif-menu-panel[hidden]{display:none!important}
.notif-menu-item{
  display:block;width:100%;border:0;background:transparent;color:var(--ink);font:inherit;font-size:14px;
  text-align:left;padding:10px 12px;border-radius:8px;cursor:pointer;text-decoration:none;
}
.notif-menu-item:hover{background:var(--surface)}
.notif-menu form{margin:0}

.notif-section{margin:0}
.notif-section-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:8px 14px 4px;
}
.notif-section-head-page{padding:0 0 10px}
.notif-section-label{margin:0;font-size:16px;font-weight:750;letter-spacing:-0.01em;color:var(--ink);text-transform:none}
.notif-section-see{font-size:14px;font-weight:650;color:var(--accent-dark);text-decoration:none}
.notif-section-see:hover{text-decoration:underline}

.notif-list{display:flex;flex-direction:column}
.notif-row{margin:0}
.notif-row-btn{
  display:grid;grid-template-columns:56px minmax(0,1fr) auto auto;gap:12px;align-items:center;
  width:100%;border:0;background:transparent;color:var(--ink);font:inherit;text-align:left;
  padding:10px 12px;border-radius:12px;cursor:pointer;
}
.notif-row.is-unread .notif-row-btn{background:linear-gradient(90deg,#FDF2EF,#fff 78%)}
.notif-row-btn:hover{background:var(--surface)}
.notif-row.is-unread .notif-row-btn:hover{background:linear-gradient(90deg,#FBE7E2,#F7F7F8 78%)}
.notif-avatar-wrap{position:relative;width:56px;height:56px;flex:none}
.notif-avatar-wrap .user-photo{width:56px;height:56px;border-radius:50%;object-fit:cover;display:block}
.notif-type-badge{
  position:absolute;right:-1px;bottom:-1px;width:24px;height:24px;border-radius:50%;
  display:grid;place-items:center;border:2px solid #fff;color:#fff;
}
.notif-type-follow{background:#2F6FED}
.notif-type-favourite,.notif-type-like{background:var(--accent-dark)}
.notif-type-comment{background:#1F7A4D}
.notif-type-post{background:#8A5A2B}
.notif-copy{min-width:0;display:grid;gap:4px}
.notif-text{font-size:14px;line-height:1.35;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.notif-text strong{font-weight:700}
.notif-time{font-size:12px;color:var(--muted)}
.notif-time.is-unread{color:var(--accent-dark);font-weight:650}
.notif-thumb-wrap{width:56px;height:56px;border-radius:10px;overflow:hidden;border:1px solid var(--line);background:var(--surface);flex:none}
.notif-thumb{width:100%;height:100%;object-fit:cover;display:block}
.notif-unread-dot{width:12px;height:12px;border-radius:50%;background:var(--accent);flex:none;margin-left:2px}
.notif-empty{padding:36px 22px;text-align:center;display:grid;gap:8px;justify-items:center;color:var(--muted)}
.notif-empty-icon{width:56px;height:56px;border-radius:50%;background:var(--accent-soft);color:var(--accent-dark);display:grid;place-items:center}
.notif-empty strong{color:var(--ink);font-size:16px}
.notif-empty p{margin:0;font-size:13px;max-width:28ch;line-height:1.45}

.notif-page{padding-top:28px;padding-bottom:48px;max-width:720px}
.notif-page-head{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:10px}
.notif-page-head h1{margin:0;font-size:34px;font-weight:800;letter-spacing:-0.03em}
.notif-page .notif-tabs{padding:0 0 18px}
.notif-group{margin:0 0 22px}
.notif-list-page{border:1px solid var(--line);border-radius:16px;overflow:hidden;background:#fff;padding:4px}
.notif-list-page .notif-row + .notif-row{border-top:0}
.notif-empty-page{margin-top:24px;border:1px solid var(--line);border-radius:16px;background:#fff}

@media(max-width:700px){
  .alerts-panel{
    position:fixed;top:78px;left:12px;right:12px;bottom:auto;width:auto;max-width:none;
    max-height:calc(100vh - 96px);max-height:calc(100dvh - 96px);border-radius:20px;
  }
  body:has(.demo-bar) .alerts-panel{top:104px;max-height:calc(100dvh - 122px)}
  .alerts-scroll{max-height:none}
  .notif-row-btn{grid-template-columns:56px minmax(0,1fr) auto;padding:12px}
  .notif-unread-dot{grid-column:3;grid-row:1}
  .notif-thumb-wrap{display:none}
}
