/* ============================================================================
   SITE NAVIGATION  —  css/nav.css   (markup: inc/site-nav.php, behaviour: js/nav.js)

   Guest header + mega menus, mobile sheet, guest tab bar, the command
   palette (guests + members) and the member top-bar actions.

   Self-contained on purpose: no Tailwind, own tokens, every selector under a
   .tpn / .tp- prefix. Two global rules fight us and are beaten here by
   specificity, never !important where avoidable:
     - css/main.css   button:hover,button:focus{ background:#ff3131 }
     - Elementor kit  .elementor-kit-N button:hover{ background:#fff }
   ========================================================================= */

:root{
  --tpn-h:72px;
  --tpn-bg:rgba(11,8,8,.74);
  --tpn-bg-solid:rgba(11,8,8,.93);
  --tpn-panel:#130F0F;
  --tpn-surf:#1A1414;
  --tpn-surf-2:#231B1B;
  --tpn-line:rgba(255,255,255,.075);
  --tpn-line-2:rgba(255,255,255,.12);
  --tpn-tx:#F6F0EE;
  --tpn-tx-2:#BCADAA;
  --tpn-tx-3:#8C7D7A;
  --tpn-red:#FF3131;
  --tpn-gold:#FBBF24;
  --tpn-font:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --tpn-serif:"Playfair Display",Georgia,serif;
  --tpn-mono:"JetBrains Mono",ui-monospace,monospace;
  --tpn-ease:cubic-bezier(.16,1,.3,1);
}

.tpn-ic{ width:18px; height:18px; flex:none; display:block; }
html.tpn-lock, html.tpn-lock body{ overflow:hidden !important; }

/* ================================================================ HEADER */
.tpn{
  position:fixed; top:0; left:0; right:0; z-index:50; height:var(--tpn-h);
  background:var(--tpn-bg);
  -webkit-backdrop-filter:saturate(1.5) blur(18px); backdrop-filter:saturate(1.5) blur(18px);
  border-bottom:1px solid var(--tpn-line);
  font-family:var(--tpn-font); color:var(--tpn-tx);
  transition:background .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.tpn.is-scrolled{ background:var(--tpn-bg-solid); border-bottom-color:var(--tpn-line-2); box-shadow:0 12px 32px -16px rgba(0,0,0,.85); }

.admin-bar .tpn{ top:32px; }

@media screen and (max-width:782px){ .admin-bar .tpn{ top:46px; } }

.tpn-bar{
  position:relative; max-width:1280px; height:100%; margin:0 auto; padding:0 24px;
  display:flex; align-items:center; gap:24px;
}

.tpn-brand{ display:flex; align-items:center; gap:9px; min-height:44px; flex:none; color:#fff; text-decoration:none; }

.tpn-mark{ color:var(--tpn-red); font-size:22px; line-height:1; transition:transform .3s var(--tpn-ease); }

.tpn-brand:hover .tpn-mark{ transform:rotate(-10deg) scale(1.08); }

.tpn-word{ font-size:19px; line-height:1; letter-spacing:-.02em; white-space:nowrap; }

.tpn-word b{ font-weight:700; color:#fff; }

.tpn-word span{ font-weight:300; color:#9ca3af; }

.tpn-menu{ flex:1; display:flex; justify-content:center; min-width:0; }

.tpn-list{ display:flex; align-items:center; gap:2px; margin:0; padding:0; list-style:none; }

.tpn-item{ position:relative; margin:0; }

.tpn-item.tpn-item--mega{ position:static; }

html body .tpn .tpn-trigger{
  position:relative; display:inline-flex; align-items:center; gap:6px; height:40px; padding:0 14px;
  border:0; border-radius:10px; background:transparent; color:rgba(246,240,238,.8);
  font:500 14.5px/1 var(--tpn-font); letter-spacing:-.005em; text-decoration:none; cursor:pointer;
  transition:color .15s ease, background .15s ease;
}

html body .tpn .tpn-trigger:focus{ background:transparent; color:rgba(246,240,238,.8); outline:none; }

html body .tpn .tpn-trigger:hover,
html body .tpn .tpn-item.is-open > .tpn-trigger{ background:rgba(255,255,255,.06); color:#fff; }

html body .tpn .tpn-trigger[aria-current]{ color:#fff; }

html body .tpn .tpn-trigger[aria-current]::after{
  content:""; position:absolute; left:50%; bottom:3px; width:4px; height:4px; margin-left:-2px;
  border-radius:50%; background:var(--tpn-red); box-shadow:0 0 8px rgba(255,49,49,.8);
}

.tpn-chev{ width:14px; height:14px; opacity:.65; transition:transform .22s var(--tpn-ease); }

.is-open > * > .tpn-chev,
html body .is-open > .tpn-trigger .tpn-chev{ transform:rotate(180deg); }

/* -------- panels -------- */
.tpn-panel{
  position:absolute; top:calc(100% + 16px); left:50%; z-index:2;
  transform:translate(-50%,6px); opacity:0; visibility:hidden; pointer-events:none;
  transition:opacity .18s ease, transform .22s var(--tpn-ease), visibility 0s linear .22s;
  background:var(--tpn-panel); border:1px solid var(--tpn-line-2); border-radius:18px; padding:10px;
  box-shadow:0 34px 90px -24px rgba(0,0,0,.95), 0 0 0 1px rgba(0,0,0,.35);
  color:var(--tpn-tx); font-family:var(--tpn-font); text-align:left;
}

/* hover bridge across the gap so the panel doesn't close mid-travel */
.tpn-panel::before{ content:""; position:absolute; left:0; right:0; top:-18px; height:18px; }

.tpn-item.is-open > .tpn-panel,
.tp-acct.is-open > .tpn-panel,
html:not(.tpn-js) .tpn-item:focus-within > .tpn-panel{
  opacity:1; visibility:visible; pointer-events:auto; transform:translate(-50%,0);
  transition:opacity .18s ease, transform .22s var(--tpn-ease), visibility 0s;
}

.tpn-panel--mega{ top:100%; width:min(1120px, calc(100vw - 32px)); }

.tpn-split{ display:grid; grid-template-columns:350px 260px; gap:8px; }

.tpn-col{ display:flex; flex-direction:column; gap:2px; min-width:0; }

.tpn-eyebrow{
  display:block; margin:8px 12px 8px; font:800 10px/1 var(--tpn-font);
  letter-spacing:.16em; text-transform:uppercase; color:var(--tpn-tx-3);
}

.tpn-link{
  display:flex; align-items:flex-start; gap:12px; padding:10px 12px; border-radius:12px;
  color:inherit; text-decoration:none; transition:background .15s ease;
}

.tpn-link:hover, .tpn-link:focus-visible{ background:rgba(255,255,255,.05); }

.tpn-link-ic{
  flex:none; width:36px; height:36px; display:grid; place-items:center; border-radius:10px;
  background:var(--tpn-surf); border:1px solid var(--tpn-line); color:#d9cfcd;
  transition:color .15s ease, border-color .15s ease, background .15s ease;
}

.tpn-link-ic .tpn-ic{ width:18px; height:18px; }

.tpn-link:hover .tpn-link-ic, .tpn-link:focus-visible .tpn-link-ic{
  color:var(--tpn-red); border-color:rgba(255,49,49,.45); background:rgba(255,49,49,.08);
}

.tpn-link-tx{ min-width:0; padding-top:1px; }

.tpn-link-t{ display:block; font:600 14px/1.25 var(--tpn-font); color:#fff; letter-spacing:-.005em; }

.tpn-link-d{ display:block; margin-top:3px; font:400 12.5px/1.4 var(--tpn-font); color:#9d8f8c; }

.tpn-aside, .tpn-feature{
  display:flex; flex-direction:column; gap:8px; padding:20px; border-radius:14px;
  color:inherit; text-decoration:none;
  background:radial-gradient(130% 120% at 100% 0%, rgba(255,49,49,.2), transparent 55%), #181212;
  border:1px solid var(--tpn-line); transition:border-color .2s ease, transform .2s var(--tpn-ease);
}

.tpn-aside:hover, .tpn-feature:hover{ border-color:rgba(255,49,49,.5); }

.tpn-aside .tpn-eyebrow, .tpn-feature .tpn-eyebrow{ margin:0; color:var(--tpn-red); }

.tpn-aside-t, .tpn-feature-t{ font:italic 900 21px/1.15 var(--tpn-serif); color:#fff; letter-spacing:-.01em; }

.tpn-aside-d, .tpn-feature-d{ font:400 13px/1.5 var(--tpn-font); color:var(--tpn-tx-2); }

.tpn-more{ display:inline-flex; align-items:center; gap:6px; margin-top:auto; padding-top:6px; font:700 12.5px/1 var(--tpn-font); color:var(--tpn-red); }

.tpn-more .tpn-ic{ width:14px; height:14px; transition:transform .2s var(--tpn-ease); }
a:hover > .tpn-more .tpn-ic{ transform:translateX(3px); }

/* mega */
.tpn-mega{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)) 270px; gap:4px; }

.tpn-col--feature{ gap:8px; padding-left:6px; }

.tpn-feature{ flex:1; padding:16px; }

.tpn-feature-art{
  position:relative; display:flex; align-items:flex-end; gap:3px; height:82px; padding:30px 10px 10px;
  margin-bottom:6px; border-radius:10px; background:#0c0909; border:1px solid var(--tpn-line);
}

.tpn-feature-art .k{ flex:1; height:42%; border-radius:2px; background:rgba(255,255,255,.08); }

.tpn-feature-art .k.on{ height:100%; background:var(--tpn-red); box-shadow:0 0 14px rgba(255,49,49,.5); }

.tpn-feature-art b{ position:absolute; top:9px; left:11px; font:800 13px/1 var(--tpn-mono); color:#fff; }

.tpn-feature-art em{ margin-left:6px; font-style:normal; color:var(--tpn-red); }

.tpn-all{
  display:flex; align-items:center; gap:10px; padding:12px 14px; border-radius:12px;
  background:rgba(255,255,255,.03); border:1px solid var(--tpn-line);
  font:600 13px/1.2 var(--tpn-font); color:#fff; text-decoration:none; transition:background .15s, border-color .15s;
}

.tpn-all:hover{ background:rgba(255,255,255,.06); border-color:var(--tpn-line-2); }

.tpn-all .tpn-ic{ width:16px; height:16px; color:var(--tpn-tx-2); }

.tpn-all .tpn-ic:last-child{ margin-left:auto; width:14px; height:14px; }

@media (max-width:1240px){
  .tpn-mega{ grid-template-columns:repeat(3, minmax(0,1fr)) 236px; }
  .tpn-mega .tpn-link-d{ display:none; }
  .tpn-mega .tpn-link{ align-items:center; padding:8px 10px; }
  .tpn-mega .tpn-link-ic{ width:32px; height:32px; }
}

/* -------- actions -------- */
.tpn-actions{ display:flex; align-items:center; gap:8px; flex:none; margin-left:auto; }

html body .tpn .tpn-search{
  display:inline-flex; align-items:center; gap:8px; height:38px; padding:0 7px 0 12px;
  border-radius:10px; border:1px solid var(--tpn-line-2); background:rgba(255,255,255,.04);
  color:var(--tpn-tx-2); font:500 13.5px/1 var(--tpn-font); cursor:pointer;
  transition:background .15s ease, color .15s ease, border-color .15s ease;
}

html body .tpn .tpn-search:focus{ background:rgba(255,255,255,.04); color:var(--tpn-tx-2); outline:none; }

html body .tpn .tpn-search:hover{ background:rgba(255,255,255,.08); color:#fff; border-color:rgba(255,255,255,.2); }

html body .tpn-search .tpn-ic{ width:16px; height:16px; }

html body .tpn-search-tx{ padding-right:18px; }

.tpn-kbd{
  display:inline-block; padding:3px 6px; border-radius:6px; border:1px solid var(--tpn-line-2); border-bottom-width:2px;
  background:rgba(0,0,0,.3); font:600 10.5px/1 var(--tpn-mono); color:var(--tpn-tx-3); white-space:nowrap;
}

.tpn .tpn-login{
  display:inline-flex; align-items:center; height:40px; padding:0 12px; border-radius:10px;
  font:600 14px/1 var(--tpn-font); color:rgba(246,240,238,.85); text-decoration:none; transition:color .15s, background .15s;
}

.tpn .tpn-login:hover{ color:#fff; background:rgba(255,255,255,.06); }

.tpn-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px; height:40px; padding:0 16px 0 18px;
  border-radius:999px; font:700 14px/1 var(--tpn-font); letter-spacing:-.005em; white-space:nowrap; text-decoration:none;
  transition:transform .18s var(--tpn-ease), box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

.tpn-btn .tpn-ic{ width:15px; height:15px; transition:transform .2s var(--tpn-ease); }

.tpn-btn:hover .tpn-ic{ transform:translateX(2px); }
a.tpn-btn--primary, a.tpn-btn--primary:hover, a.tpn-btn--primary:focus{ color:#fff; }

.tpn-btn--primary{
  background:var(--tpn-red); border:1px solid rgba(255,255,255,.12);
  box-shadow:0 8px 24px -10px rgba(255,49,49,.85), inset 0 1px 0 rgba(255,255,255,.22);
}

.tpn-btn--primary:hover{ background:#ff4747; transform:translateY(-1px); box-shadow:0 14px 32px -10px rgba(255,49,49,.95), inset 0 1px 0 rgba(255,255,255,.25); }

.tpn-btn--primary:active{ transform:translateY(0); }

.tpn-btn--ghost{ background:rgba(255,255,255,.06); border:1px solid var(--tpn-line-2); color:#fff; }
a.tpn-btn--ghost:hover{ background:rgba(255,255,255,.1); color:#fff; }

.tpn-btn--block{ width:100%; height:50px; font-size:15px; }

html body .tpn .tpn-burger,
html body .tpn-sheet .tpn-icon-btn{
  display:none; align-items:center; justify-content:center; width:42px; height:42px; padding:0;
  border-radius:12px; border:1px solid var(--tpn-line-2); background:rgba(255,255,255,.04); color:#fff; cursor:pointer;
}

html body .tpn-sheet .tpn-icon-btn{ display:inline-flex; }

html body .tpn .tpn-burger:hover,
html body .tpn .tpn-burger:focus,
html body .tpn-sheet .tpn-icon-btn:hover,
html body .tpn-sheet .tpn-icon-btn:focus{ background:rgba(255,255,255,.09); color:#fff; outline:none; }

html body .tpn-burger .tpn-ic,
html body .tpn-icon-btn .tpn-ic{ width:20px; height:20px; }

/* keyboard focus, everywhere in the nav system */
.tpn a:focus-visible, .tpn button:focus-visible,
.tpn-sheet a:focus-visible, .tpn-sheet button:focus-visible, .tpn-sheet summary:focus-visible,
.tpn-tabs a:focus-visible, .tpn-pal button:focus-visible,
.tp-top-actions a:focus-visible, .tp-top-actions button:focus-visible{
  outline:2px solid var(--tpn-red); outline-offset:2px;
}

/* -------- tablet / phone header -------- */
@media (max-width:1023px){
  :root{ --tpn-h:64px; }
  .tpn-bar{ padding:0 16px; gap:10px; }

.tpn-menu,
.tpn .tpn-login,
html body .tpn-search-tx,
.tpn .tpn-kbd{ display:none; }

html body .tpn .tpn-burger{ display:inline-flex; }

html body .tpn .tpn-search{ width:42px; height:42px; padding:0; justify-content:center; border-radius:12px; }

html body .tpn-search .tpn-ic{ width:19px; height:19px; }
  .tpn-btn{ height:40px; padding:0 14px; font-size:13.5px; }
  .tpn-word{ font-size:18px; }
}

/* the tab bar carries "Join free" on phones, so the header CTA yields */
@media (max-width:479px){
  .tpn-actions .tpn-btn--primary{ display:none; }
}

/* ================================================================ SHEET */
.tpn-sheet{
  position:fixed; inset:0; z-index:100000; display:flex; flex-direction:column;
  background:#0B0808; color:var(--tpn-tx); font-family:var(--tpn-font);
  transform:translateX(100%); transition:transform .34s var(--tpn-ease);
}

.tpn-sheet[hidden]{ display:none; }

.tpn-sheet.is-open{ transform:none; }

.tpn-sheet-top{
  flex:none; display:flex; align-items:center; justify-content:space-between;
  height:64px; padding:0 16px; border-bottom:1px solid var(--tpn-line);
}

.tpn-sheet-body{ flex:1; overflow-y:auto; overscroll-behavior:contain; padding:16px 16px 24px; -webkit-overflow-scrolling:touch; }

html body .tpn-sheet .tpn-sheet-search{
  display:flex; align-items:center; gap:10px; width:100%; height:50px; padding:0 16px; margin-bottom:8px;
  border-radius:14px; border:1px solid var(--tpn-line-2); background:var(--tpn-surf);
  color:var(--tpn-tx-3); font:500 15px/1 var(--tpn-font); text-align:left; cursor:pointer;
}

html body .tpn-sheet .tpn-sheet-search:hover,
html body .tpn-sheet .tpn-sheet-search:focus{ background:var(--tpn-surf-2); color:var(--tpn-tx-2); }

.tpn-acc{ border-bottom:1px solid var(--tpn-line); }

.tpn-acc > summary{
  display:flex; align-items:center; justify-content:space-between; padding:18px 4px; list-style:none; cursor:pointer;
  font:700 19px/1 var(--tpn-font); letter-spacing:-.015em; color:#fff;
}

.tpn-acc > summary::-webkit-details-marker{ display:none; }

.tpn-acc > summary .tpn-chev{ width:18px; height:18px; transition:transform .22s var(--tpn-ease); }

.tpn-acc[open] > summary .tpn-chev{ transform:rotate(180deg); }

.tpn-acc-body{ display:flex; flex-direction:column; gap:2px; padding:0 0 14px; }

.tpn-acc-body .tpn-link{ padding:10px 6px; }

.tpn-acc-body .tpn-eyebrow{ margin:14px 6px 6px; }

.tpn-acc-body .tpn-all{ margin-top:8px; }

.tpn-sheet-link{
  display:flex; align-items:center; gap:12px; padding:18px 4px; border-bottom:1px solid var(--tpn-line);
  font:700 19px/1 var(--tpn-font); letter-spacing:-.015em; color:#fff; text-decoration:none;
}

.tpn-sheet-link .tpn-ic{ width:20px; height:20px; color:var(--tpn-tx-3); }

.tpn-sheet-foot{
  flex:none; display:grid; grid-template-columns:1fr 1fr; gap:10px;
  padding:14px 16px calc(14px + env(safe-area-inset-bottom)); border-top:1px solid var(--tpn-line); background:#0B0808;
}

.tpn-sheet-foot > :only-child{ grid-column:1 / -1; }

/* ================================================================ GUEST TAB BAR */
.tpn-tabs{ display:none; }

@media (max-width:899px){
  .tpn-has-tabs .tpn-tabs{
    position:fixed; left:0; right:0; bottom:0; z-index:40;
    display:grid; grid-template-columns:repeat(5,1fr);
    padding:6px 6px calc(6px + env(safe-area-inset-bottom));
    background:rgba(11,8,8,.94); border-top:1px solid var(--tpn-line-2);
    -webkit-backdrop-filter:saturate(1.5) blur(16px); backdrop-filter:saturate(1.5) blur(16px);
    font-family:var(--tpn-font);
  }
  .tpn-tab{
    position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px;
    min-height:52px; border-radius:12px; color:var(--tpn-tx-3); text-decoration:none;
    font:600 10.5px/1.1 var(--tpn-font); letter-spacing:.01em; -webkit-tap-highlight-color:transparent;
    transition:color .15s ease;
  }
  .tpn-tab:hover{ color:var(--tpn-tx-2); }
  .tpn-tab .tpn-ic{ width:22px; height:22px; }
  .tpn-tab span{ max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .tpn-tab.is-on{ color:#fff; }
  .tpn-tab.is-on::before{
    content:""; position:absolute; top:-6px; left:30%; right:30%; height:2px;
    border-radius:0 0 2px 2px; background:var(--tpn-red);
  }
  .tpn-tab--cta{ color:#fff; gap:3px; }
  .tpn-tab--cta .tpn-ic{
    box-sizing:content-box; width:18px; height:18px; padding:2px 12px; margin-top:-2px; border-radius:999px;
    background:var(--tpn-red); color:#fff; box-shadow:0 6px 18px -6px rgba(255,49,49,.9);
  }
  body.tpn-has-tabs{ padding-bottom:calc(66px + env(safe-area-inset-bottom)) !important; }
}

/* ================================================================ PALETTE */
.tpn-pal{
  position:fixed; inset:0; z-index:100001; display:flex; justify-content:center; align-items:flex-start;
  padding:12vh 16px 16px; background:rgba(5,3,3,.62);
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
  font-family:var(--tpn-font); color:var(--tpn-tx); opacity:0; transition:opacity .16s ease;
}

.tpn-pal[hidden]{ display:none; }

.tpn-pal.is-open{ opacity:1; }

.tpn-pal-box{
  width:min(640px,100%); max-height:min(560px,76vh); display:flex; flex-direction:column; overflow:hidden;
  background:#141010; border:1px solid var(--tpn-line-2); border-radius:18px;
  box-shadow:0 40px 110px -24px rgba(0,0,0,.95);
  transform:translateY(10px) scale(.985); transition:transform .22s var(--tpn-ease);
}

.tpn-pal.is-open .tpn-pal-box{ transform:none; }

.tpn-pal-field{ flex:none; display:flex; align-items:center; gap:12px; height:60px; padding:0 12px 0 18px; border-bottom:1px solid var(--tpn-line); color:var(--tpn-tx-3); }

.tpn-pal-field .tpn-ic{ width:20px; height:20px; }

.tpn-pal input.tpn-pal-input{
  flex:1; min-width:0; height:100%; margin:0; padding:0;
  background:transparent !important; border:0 !important; border-radius:0 !important; box-shadow:none !important; outline:0 !important;
  color:#fff; font:500 17px/1.2 var(--tpn-font); letter-spacing:-.01em;
}

.tpn-pal input.tpn-pal-input::placeholder{ color:#6f6260; opacity:1; }

html body .tpn-pal .tpn-pal-esc,
html body .tpn-pal .tpn-pal-esc:hover,
html body .tpn-pal .tpn-pal-esc:focus{
  flex:none; padding:5px 8px; border-radius:7px; border:1px solid var(--tpn-line-2);
  background:rgba(255,255,255,.05); color:var(--tpn-tx-3); font:600 11px/1 var(--tpn-mono); cursor:pointer;
}

html body .tpn-pal .tpn-pal-esc:hover{ color:#fff; }

.tpn-pal-list{ flex:1; overflow-y:auto; overscroll-behavior:contain; padding:6px 8px 10px; }

.tpn-pal-group{ padding:12px 12px 6px; font:800 10px/1 var(--tpn-font); letter-spacing:.16em; text-transform:uppercase; color:var(--tpn-tx-3); }

.tpn-pal-opt{
  display:flex; align-items:center; gap:12px; padding:9px 12px; border-radius:11px;
  color:#e9dfdd; text-decoration:none; font:500 14.5px/1.3 var(--tpn-font); cursor:pointer; scroll-margin:8px;
}

.tpn-pal-ic{
  flex:none; width:32px; height:32px; display:grid; place-items:center; border-radius:9px;
  background:#1E1717; border:1px solid var(--tpn-line); color:var(--tpn-tx-2);
}

.tpn-pal-ic .tpn-ic{ width:16px; height:16px; }

.tpn-pal-t{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.tpn-pal-t mark{ background:none; color:var(--tpn-red); font-weight:700; }

.tpn-pal-meta{ flex:none; font:600 11px/1 var(--tpn-font); color:var(--tpn-tx-3); }

.tpn-pal-opt.is-active{ background:rgba(255,49,49,.12); color:#fff; }

.tpn-pal-opt.is-active .tpn-pal-ic{ color:var(--tpn-red); border-color:rgba(255,49,49,.45); }

.tpn-pal-opt.is-active .tpn-pal-meta{ color:var(--tpn-tx-2); }

.tpn-pal-note{ padding:22px 16px; text-align:center; font-size:13.5px; color:var(--tpn-tx-3); }

.tpn-pal-foot{
  flex:none; display:flex; gap:18px; padding:10px 18px; border-top:1px solid var(--tpn-line);
  font:500 11.5px/1 var(--tpn-font); color:var(--tpn-tx-3);
}

.tpn-pal-foot kbd{
  display:inline-block; min-width:18px; margin-right:4px; padding:2px 5px; border-radius:5px;
  border:1px solid var(--tpn-line-2); font:600 10.5px/1.2 var(--tpn-mono); color:var(--tpn-tx-2); text-align:center;
}

@media (max-width:640px){
  .tpn-pal{ padding:0; align-items:stretch; }
  .tpn-pal-box{ width:100%; max-height:none; height:100%; border:0; border-radius:0; }
  .tpn-pal-foot{ display:none; }
}

/* ================================================================ MEMBER TOP BAR
   Lives inside the app shell (.tp-app tokens are in scope). */
.tp-top-actions{ display:flex; align-items:center; gap:6px; flex:none; margin-left:auto; }

.tp-topnote + .tp-top-actions{ margin-left:4px; }

html body.tp-app .tp-top-btn{
  position:relative; width:38px; height:38px; display:grid; place-items:center; flex:none;
  border-radius:10px; border:1px solid transparent; background:none; color:var(--tx-2);
  transition:background .13s ease, color .13s ease, border-color .13s ease;
}

html body.tp-app .tp-top-btn:hover,
html body.tp-app .tp-top-btn:focus{ background:var(--surf-2); color:#fff; border-color:var(--line); }

html body .tp-top-btn .tpn-ic{ width:19px; height:19px; }

html body.tp-app .tp-top-btn--search{ display:none; }

.tp-top-ct{
  position:absolute; top:2px; right:1px; min-width:16px; height:16px; padding:0 4px;
  border-radius:999px; background:var(--red); color:#fff; box-shadow:0 0 0 2px var(--bg);
  font:800 9.5px/16px var(--tpn-font); text-align:center; font-variant-numeric:tabular-nums;
}

html body.tp-app .tp-gopro{
  display:inline-flex; align-items:center; gap:7px; height:34px; padding:0 13px; flex:none;
  border-radius:999px; border:1px solid rgba(251,191,36,.42);
  background:linear-gradient(135deg, rgba(251,191,36,.16), rgba(255,49,49,.1));
  color:var(--gold); font:700 12.5px/1 var(--tpn-font); white-space:nowrap;
  transition:background .15s ease, border-color .15s ease, transform .18s var(--tpn-ease);
}

html body.tp-app .tp-gopro:hover{ border-color:var(--gold); background:linear-gradient(135deg, rgba(251,191,36,.26), rgba(255,49,49,.16)); transform:translateY(-1px); }

html body .tp-gopro .tpn-ic{ width:15px; height:15px; }

.tp-acct{ position:relative; flex:none; }

html body.tp-app .tp-acct-btn,
html body.tp-app .tp-acct-btn:focus{
  display:flex; align-items:center; gap:4px; height:38px; padding:0 7px 0 3px;
  border-radius:999px; border:1px solid var(--line); background:var(--surf); color:var(--tx-2);
}

html body.tp-app .tp-acct-btn:hover,
html body .tp-acct.is-open > .tp-acct-btn{ border-color:var(--tx-3); background:var(--surf-2); color:#fff; }

html body .tp-acct-btn img{ width:30px; height:30px; border-radius:50%; object-fit:cover; display:block; }

html body .tp-acct-btn .tpn-chev{ width:14px; height:14px; }

html body .tp-acct.is-open .tp-acct-btn .tpn-chev{ transform:rotate(180deg); }

.tp-acct-menu.tpn-panel{ left:auto; right:0; top:calc(100% + 10px); width:264px; padding:8px; transform:translateY(6px); z-index:60; }

.tp-acct.is-open > .tp-acct-menu.tpn-panel{ transform:none; }

.tp-acct-head{ display:flex; align-items:center; gap:11px; padding:8px 8px 12px; margin-bottom:6px; border-bottom:1px solid var(--tpn-line); }

.tp-acct-head img{ width:38px; height:38px; border-radius:11px; object-fit:cover; flex:none; }

.tp-acct-head span{ min-width:0; }

.tp-acct-head b{ display:block; font:700 13.5px/1.25 var(--tpn-font); color:#fff; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.tp-acct-head em{ display:block; margin-top:3px; font:700 10px/1 var(--tpn-font); font-style:normal; letter-spacing:.08em; text-transform:uppercase; color:var(--tpn-gold); }

.tp-acct-menu a{
  display:flex; align-items:center; gap:11px; padding:9px 10px; border-radius:9px;
  font:500 13.5px/1.2 var(--tpn-font); color:var(--tpn-tx-2); text-decoration:none; transition:background .12s, color .12s;
}

.tp-acct-menu a:hover, .tp-acct-menu a:focus-visible{ background:rgba(255,255,255,.06); color:#fff; }

.tp-acct-menu a .tpn-ic{ width:17px; height:17px; opacity:.85; }

.tp-acct-menu a.tp-acct-out{ margin-top:6px; border-top:1px solid var(--tpn-line); border-radius:0 0 9px 9px; padding-top:12px; }

/* the desktop search field becomes a palette trigger */
.tp-search{ cursor:text; }

.tp-search .tpn-kbd{ flex:none; }

@media (max-width:900px){html body.tp-app .tp-top-btn--desk{ display:none; }

html body.tp-app .tp-top-btn--search{ display:grid; }

html body.tp-app .tp-gopro{ width:38px; height:38px; padding:0; justify-content:center; }

html body .tp-gopro span{ display:none; }

html body .tp-acct-btn .tpn-chev{ display:none; }

html body.tp-app .tp-acct-btn{ padding:0 3px; }
}

@media (max-width:560px){
  .tp-app .tp-topnote{ display:none; }
  /* the note is display:none here but still matches the + sibling rule above */
  html body.tp-app .tp-top-actions{ margin-left:auto; }
}

@media (prefers-reduced-motion:reduce){
  .tpn, .tpn *, .tpn-sheet, .tpn-pal, .tpn-pal-box, .tpn-panel{ transition:none !important; }
}
