/* Peptx AI — shared app shell: top bar, bottom tab bar, hub sheets. */

/* Self-contained World C tokens, scoped to the shell so a host page's own
   :root variables (e.g. the dark cards deck) can never recolor the shell. */
.px-top,.px-menu,.px-tabs,.px-scrim,.px-sheet{
  --ink:#16211d;--body-c:#4b5148;--muted:#686d62;--faint:#726b5c;
  --accent:#0f9e86;--accent-strong:#0c8571;--accent-ink:#027b67;--accent-tint:rgba(15,158,134,.10);
  --line:#ece5d6;--line-strong:#e6dfd0;--card:#fdfbf6;--surface:#faf7f0;--bone:#f3efe6;
  --shadow-pop:0 18px 50px rgba(30,35,28,.18);
  --font-display:'Fraunces',Georgia,'Times New Roman',serif;
  --font-ui:'Satoshi',system-ui,-apple-system,'Segoe UI',sans-serif;
}

body.px-light{padding-top:58px}
@media(max-width:859px){body.px-light{padding-bottom:88px}}

/* ---------- top bar ---------- */
.px-top{position:fixed;top:0;left:0;right:0;z-index:600;
  display:flex;align-items:center;justify-content:space-between;
  height:58px;padding:0 16px;box-sizing:border-box;
  background:rgba(243,239,230,.86);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line)}
.px-brand{display:flex;align-items:baseline;gap:7px;text-decoration:none;user-select:none}
.px-brand .p{font-family:var(--font-display);font-weight:500;font-size:23px;letter-spacing:-.5px;color:var(--ink)}
.px-brand .ai{font-family:var(--font-display);font-weight:600;font-size:11px;letter-spacing:2.5px;color:var(--accent);transform:translateY(-2px)}
.px-topr{display:flex;align-items:center;gap:8px}
.px-tbtn{width:40px;height:40px;border-radius:11px;background:var(--card);border:1px solid var(--line-strong);
  display:flex;align-items:center;justify-content:center;color:#6b7168;cursor:pointer;padding:0}
.px-tbtn:hover{border-color:var(--muted)}
.px-tbtn svg{width:17px;height:17px}

/* desktop inline nav */
.px-navlinks{display:none;align-items:center;gap:4px}
@media(min-width:860px){
  .px-navlinks{display:flex}
  .px-navlink{font-family:var(--font-ui);font-size:13.5px;font-weight:600;color:var(--body-c);
    text-decoration:none;padding:8px 13px;border-radius:10px;cursor:pointer;background:none;border:0}
  .px-navlink:hover{background:var(--accent-tint);color:var(--ink)}
  .px-navlink.act{color:var(--accent-ink);background:none;position:relative}
  .px-navlink.act::after{content:"";position:absolute;left:13px;right:13px;bottom:3px;
    height:2px;border-radius:2px;background:var(--accent)}
  .px-navlink--ask{background:var(--accent-strong);color:#fff;font-weight:700}
  .px-navlink--ask:hover{background:var(--accent-strong);color:#fff}
}

/* dropdown menu */
.px-menu{position:fixed;top:60px;right:14px;z-index:640;min-width:190px;
  background:var(--card);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow-pop);
  padding:7px;display:none}
.px-menu.on{display:block}
.px-menu a{display:block;font-family:var(--font-ui);font-size:13.5px;font-weight:600;color:var(--body-c);
  text-decoration:none;padding:10px 13px;border-radius:10px}
.px-menu a:hover{background:var(--accent-tint);color:var(--ink)}
.px-menu .sep{height:1px;background:var(--line);margin:6px 8px}

/* ---------- bottom tab bar (mobile) ---------- */
.px-tabs{position:fixed;left:0;right:0;bottom:0;z-index:600;
  display:flex;align-items:flex-end;justify-content:space-around;
  padding:9px 8px calc(10px + env(safe-area-inset-bottom));
  background:rgba(251,249,244,.92);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  border-top:1px solid var(--line)}
@media(min-width:860px){.px-tabs{display:none}}
.px-tab{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px;flex:1;
  min-height:48px;                      /* was 39px, under the 44px touch minimum */
  font-family:var(--font-ui);font-size:10.5px;font-weight:600;color:var(--muted);
  background:none;border:0;padding:4px 0 0;cursor:pointer;text-decoration:none}
.px-tab svg{width:21px;height:21px}
.px-tab.act{color:var(--accent-ink)}
.px-tab--ask{position:relative;top:-15px;color:var(--body-c)}
.px-tab--ask .ic{width:46px;height:46px;border-radius:16px;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(160deg,#0c8571,#096a59);color:#fff;
  box-shadow:0 8px 18px rgba(15,158,134,.4)}
.px-tab--ask .ic svg{width:23px;height:23px}

/* ---------- bottom sheets ---------- */
.px-scrim{position:fixed;inset:0;z-index:660;background:rgba(22,33,29,.34);
  opacity:0;pointer-events:none;transition:opacity .22s}
.px-scrim.on{opacity:1;pointer-events:auto}
.px-sheet{position:fixed;left:0;right:0;bottom:0;z-index:670;
  margin-inline:auto;max-width:560px;
  background:var(--card);border-top:1px solid var(--line);
  border-radius:22px 22px 0 0;box-shadow:0 -14px 40px rgba(30,35,28,.22);
  padding:10px 14px calc(16px + env(safe-area-inset-bottom));
  transform:translateY(118%);transition:transform .26s cubic-bezier(.3,.8,.3,1)}
.px-sheet.on{transform:translateY(0)}
/* on a wide screen it becomes a floating panel rather than a full-bleed drawer */
@media(min-width:720px){
  .px-sheet{bottom:26px;border-radius:22px;border:1px solid var(--line);
    padding-bottom:16px;box-shadow:0 24px 60px rgba(30,35,28,.28)}
  .px-sheet .px-grab{display:none}
}
.px-grab{width:38px;height:4px;border-radius:4px;background:var(--line-strong);margin:2px auto 12px}
.px-shead{font-family:var(--font-ui);font-size:11px;letter-spacing:1.6px;text-transform:uppercase;
  color:var(--faint);font-weight:700;margin:0 6px 10px}
.px-row{display:flex;align-items:center;gap:12px;padding:11px 10px;border-radius:14px;
  background:var(--surface);border:1px solid var(--line);margin-bottom:8px;
  text-decoration:none;cursor:pointer}
.px-row:hover{border-color:var(--accent)}
.px-rowic{width:32px;height:32px;border-radius:10px;background:var(--accent-tint);
  border:1px solid rgba(15,158,134,.22);display:flex;align-items:center;justify-content:center;
  color:var(--accent-strong);flex:0 0 auto}
.px-rowic svg{width:17px;height:17px}
.px-rowt{flex:1}
.px-rowt .rt{font-family:var(--font-ui);font-size:14px;font-weight:700;color:var(--ink)}
.px-rowt .rs{font-family:var(--font-ui);font-size:11.5px;color:var(--muted);margin-top:1px}
.px-chev{color:var(--faint)}


/* ---------- dark surfaces (the compound deck) ----------
   The deck is deliberately dark. Without this the light bar butts straight onto
   near-black content and reads as a broken page rather than one screen. */
body[data-shell="dark"] .px-top{background:rgba(12,15,20,.84);border-bottom-color:rgba(255,255,255,.10)}
body[data-shell="dark"] .px-brand .p{color:#f3efe6}
body[data-shell="dark"] .px-brand .ai{color:#19bda1}
body[data-shell="dark"] .px-navlink{color:#c2c8c1}
body[data-shell="dark"] .px-navlink:hover{background:rgba(255,255,255,.09);color:#fff}
body[data-shell="dark"] .px-navlink.act{color:#19bda1}
body[data-shell="dark"] .px-navlink.act::after{background:#19bda1}
body[data-shell="dark"] .px-tbtn{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.15);color:#c2c8c1}
body[data-shell="dark"] .px-tbtn:hover{border-color:rgba(255,255,255,.3)}
body[data-shell="dark"] .px-tabs{background:rgba(12,15,20,.92);border-top-color:rgba(255,255,255,.10)}
body[data-shell="dark"] .px-tab{color:#8d958d}
body[data-shell="dark"] .px-tab.act{color:#19bda1}
