/* Profile: the signed-in user's own page. Same pattern as Saved and Studio.
   Spec: docs/superpowers/specs/2026-10-16-profile-page-redesign-design.md
   Buttons never use lime (section-navigation.spec.js "no lime buttons"). */
html body #page-profile.page{--pf-up:var(--lime);--pf-bg:#08080d;--pf-raised:#111117;--pf-line:rgba(255,255,255,.09);--pf-dim:rgba(240,238,246,.48);--pf-text:#f0eef6;background:var(--pf-bg)!important;color:var(--pf-text);min-height:100vh;margin-top:0!important;padding-top:60px!important}
html body.theme-light #page-profile.page{--pf-up:#3f7d00;--pf-bg:#f8f8fb;--pf-raised:#ffffff;--pf-line:rgba(0,0,0,.09);--pf-dim:rgba(17,17,24,.55);--pf-text:#111118}
#page-profile .pf-shell{width:min(1320px,100%);margin:0 auto;padding:58px var(--page-gutter,40px) 96px;box-sizing:border-box}

/* Header */
#page-profile .pf-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:28px;padding-bottom:34px;border-bottom:1px solid var(--pf-line)}
#page-profile .pf-who{display:flex;align-items:flex-end;gap:22px;min-width:0}
#page-profile .pf-avi{flex:none;width:72px;height:72px;min-height:0;padding:0;border-radius:50%;border:1px solid var(--pf-line);background:var(--pf-raised);color:var(--pf-text);font-size:22px;font-weight:800;display:flex;align-items:center;justify-content:center;overflow:hidden;cursor:pointer}
#page-profile .pf-avi img{width:100%;height:100%;object-fit:cover}
#page-profile .pf-id{min-width:0}
#page-profile .pf-kicker{display:block;margin-bottom:11px;color:var(--pf-up);font-size:10px;font-weight:800;letter-spacing:.18em;text-transform:uppercase}
#page-profile .pf-name{margin:0;color:var(--pf-text);font-size:clamp(40px,5vw,72px);font-weight:850;letter-spacing:-.06em;line-height:.95;overflow-wrap:anywhere}
#page-profile .pf-meta{margin-top:12px;color:var(--pf-dim);font-size:14px;overflow-wrap:anywhere}
#page-profile .pf-bio{margin-top:6px;color:var(--pf-dim);font-size:14px;max-width:560px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#page-profile .pf-acts{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
#page-profile .pf-btn{display:inline-flex;align-items:center;justify-content:center;height:40px;min-height:0;padding:0 18px;border-radius:10px;border:1px solid var(--border2,rgba(255,255,255,.16));background:transparent;color:var(--pf-text);font:inherit;font-size:13.5px;font-weight:750;cursor:pointer;white-space:nowrap}
#page-profile .pf-btn[hidden]{display:none}
#page-profile .pf-btn-primary{background:var(--btn-primary-bg,#fff);color:var(--btn-primary-fg,#08080d);border-color:var(--btn-primary-bg,#fff)}
#page-profile .pf-btn-primary:hover{background:var(--btn-primary-hover,#e9e9ee)}

/* Tabs */
#page-profile .pf-tabs{display:inline-flex;gap:6px;margin:28px 0 32px;padding:4px;border:1px solid var(--pf-line);border-radius:12px;background:var(--pf-raised)}
#page-profile .pf-tab{height:36px;min-height:0;padding:0 14px;border:0;border-radius:8px;background:transparent;color:var(--pf-dim);font:inherit;font-size:12.5px;font-weight:650;cursor:pointer;white-space:nowrap}
#page-profile .pf-tab:hover{color:var(--pf-text)}
#page-profile .pf-tab.active{background:color-mix(in srgb,var(--pf-up) 12%,transparent);color:var(--pf-up)}
#page-profile .pf-panel{display:none}
#page-profile .pf-panel.active{display:block}

/* Overview */
#page-profile .pf-studio{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 0;margin-bottom:28px;border-top:1px solid var(--pf-line);border-bottom:1px solid var(--pf-line)}
#page-profile .pf-studio[hidden]{display:none}
#page-profile .pf-studio-txt b{font-size:15px;font-weight:800;color:var(--pf-text);margin-right:10px}
#page-profile .pf-studio-txt span{font-size:13px;color:var(--pf-dim)}
#page-profile .pf-link{background:none;border:0;padding:6px 0;min-height:0;color:var(--pf-dim);font:inherit;font-size:13px;font-weight:650;cursor:pointer;white-space:nowrap}
#page-profile .pf-link:hover{color:var(--pf-text)}
#page-profile .pf-block{margin-bottom:40px}
#page-profile .pf-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:16px}
#page-profile .pf-head h2{margin:0;font-size:22px;font-weight:800;letter-spacing:-.03em;color:var(--pf-text)}
#page-profile .pf-nums{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:40px}
#page-profile .pf-num{padding:4px 28px;border-left:1px solid var(--pf-line)}
#page-profile .pf-num:first-child{padding-left:0;border-left:0}
#page-profile .pf-num-v{font-size:40px;font-weight:750;letter-spacing:-.05em;line-height:1;color:var(--pf-text)}
#page-profile .pf-num-k{margin-top:8px;text-transform:uppercase;letter-spacing:.12em;font-size:11px;font-weight:600;color:var(--pf-dim)}
#page-profile .pf-rows{display:flex;flex-direction:column;margin-bottom:40px;border-top:1px solid var(--pf-line)}
#page-profile .pf-row{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;min-height:56px;padding:12px 0;border:0;border-bottom:1px solid var(--pf-line);background:transparent;color:var(--pf-text);font:inherit;font-size:15px;font-weight:650;text-align:left;cursor:pointer}
#page-profile .pf-row:hover .pf-row-t{text-decoration:underline}
#page-profile .pf-row-t small{display:block;margin-top:3px;font-size:12.5px;font-weight:500;color:var(--pf-dim)}
#page-profile .pf-row-end{flex:none;font-size:13px;font-weight:600;color:var(--pf-dim)}
#page-profile .pf-row-danger{color:#ff6b6b}
body.theme-light #page-profile .pf-row-danger{color:#c62828}

/* Activity, Following and empty states (Saved's empty state) */
#page-profile .pf-list-item{display:flex;align-items:center;gap:14px;padding:14px 0;border-bottom:1px solid var(--pf-line)}
#page-profile .pf-list-icon{flex:none;width:36px;height:36px;border-radius:10px;border:1px solid var(--pf-line);display:grid;place-items:center;color:var(--pf-dim)}
#page-profile .pf-list-icon svg{width:16px;height:16px}
#page-profile .pf-list-text{font-size:14px;color:var(--pf-text);min-width:0;overflow-wrap:anywhere}
#page-profile .pf-list-time{font-size:12px;color:var(--pf-dim);margin-top:2px}
#page-profile .pf-creators{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:18px}
#page-profile .pf-creator{display:flex;flex-direction:column;align-items:center;gap:8px;padding:8px 4px;background:none;border:0;color:var(--pf-text);font:inherit;cursor:pointer;min-width:0}
#page-profile .pf-creator-avi{width:56px;height:56px;border-radius:50%;border:1px solid var(--pf-line);background:var(--pf-raised);display:grid;place-items:center;font-weight:800;font-size:16px}
#page-profile .pf-creator b{font-size:13px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#page-profile .pf-creator span{font-size:12px;color:var(--pf-dim)}
#page-profile .pf-empty{padding:90px 20px;text-align:center}
#page-profile .pf-empty-icon{display:grid;place-items:center;width:58px;height:58px;margin:0 auto 18px;border:1px solid var(--pf-line);border-radius:18px;background:var(--pf-raised);color:var(--pf-up)}
#page-profile .pf-empty-icon svg{width:22px;height:22px}
#page-profile .pf-empty h2{margin:0 0 8px;color:var(--pf-text);font-size:25px}
#page-profile .pf-empty p{margin:0 auto 24px;max-width:390px;color:var(--pf-dim);font-size:14px;line-height:1.6}
#page-profile .comp-badges-wrap{display:flex;flex-wrap:wrap;gap:8px}
/* Older site rules pad rows and lists; this page lines everything up with the header. */
html body #page-profile #dash-cw-row{padding:0 0 8px!important;margin:0!important}
html body #page-profile .pf-rows,html body #page-profile .pf-nums{padding-left:0!important;padding-right:0!important;margin-left:0!important;margin-right:0!important}

@media (max-width:899px){
  html body #page-profile.page{padding-top:56px!important}
  /* Phones: Studio's tighter top, so the name and Continue watching sit on the first screen. */
  #page-profile .pf-shell{padding:28px var(--page-gutter,16px) 112px}
  #page-profile .pf-hero{flex-direction:column;align-items:stretch;gap:18px;padding-bottom:24px}
  #page-profile .pf-who{align-items:center;gap:14px}
  #page-profile .pf-avi{width:56px;height:56px;font-size:18px}
  #page-profile .pf-name{font-size:40px}
  #page-profile .pf-meta{margin-top:8px;font-size:13px}
  /* Older phone rules make #prof-actions a 2-column grid; keep one row here. */
  html body #page-profile #prof-actions{display:flex!important;justify-content:flex-start;flex-wrap:nowrap;gap:8px;overflow:hidden}
  /* Buttons size to their labels so "Become a creator" never spills out. */
  #page-profile .pf-acts .pf-btn{flex:1 1 auto;min-width:0;padding:0 10px;height:38px}
  #page-profile .pf-tabs{display:flex;width:100%;gap:2px;margin:22px 0 24px;box-sizing:border-box}
  #page-profile .pf-tab{flex:1 1 0;min-width:0;padding:0 6px}
  #page-profile .pf-nums{grid-template-columns:1fr 1fr;row-gap:22px}
  #page-profile .pf-num{padding:2px 0 2px 16px}
  #page-profile .pf-num:nth-child(odd){padding-left:0;border-left:0}
  #page-profile .pf-num-v{font-size:30px}
  #page-profile .pf-studio{flex-wrap:wrap}
}
@media (max-width:380px){
  #page-profile .pf-acts .pf-btn{padding:0 8px;font-size:12.5px}
}
