/* ============================================================================
   32-profile.css — /profile progress dashboard (takeover page)
   Scoped under #profile-page / .pf so nothing leaks into the rest of the site.
   Themed entirely through the design tokens in 00-base.css (dark + light).
   ========================================================================== */

/* ---- takeover: hide the homepage + other sections, keep header + footer ---- */
body.profile-mode > section:not(#profile-page),
body.profile-mode > #home { display:none !important; }
body.profile-mode > header { position:relative; z-index:50; }
body.profile-mode > #profile-page { position:relative; z-index:1; display:block; }
body.profile-mode > footer { display:block; }
/* the site's brand-green aurora clashes with the profile's indigo scheme — hide it
   here; the profile carries its own ambient wash for depth. */
body.profile-mode > .aurora { display:none; }

/* ---- a refined, restrained palette scoped to the profile ----
   Overriding the site's accent tokens HERE re-themes every gauge, chart, tile and
   badge away from the brand lime toward a premium indigo / sky / lilac scheme —
   the SVGs and the CSS both read var(--lime/--cyan/--violet), so this one block
   re-skins the whole page without touching the rest of the site (the header,
   which lives outside #profile-page, keeps the brand lime). */
#profile-page{
  --lime:   #7b7bff;   /* PRIMARY  — periwinkle indigo (replaces the green) */
  --cyan:   #4ac4ee;   /* SECONDARY — refined sky */
  --violet: #b98cf7;   /* TERTIARY — soft lilac */
  /* Ink on the primary accent. White here failed AA on every one of these
     accents (periwinkle #7b7bff + white = 3.43:1) — they are all light enough
     that near-black is the readable choice. The LIGHT theme keeps white
     because its indigo #5a5cf0 is deep enough (4.97:1) and dark ink is not. */
  --on-lime:#0b1020;
  --warm:   #f6b545;   /* amber — streaks, best band, premium */
  --pf-card-bg: color-mix(in oklab, var(--text) 3%, transparent);
  --pf-line:    color-mix(in oklab, var(--text) 9%, transparent);
  --pf-line-hi: color-mix(in oklab, var(--text) 15%, transparent);
  /* soft ambient wash behind the whole dashboard for depth */
  background:
    radial-gradient(46% 34% at 78% -2%, color-mix(in oklab, var(--lime) 10%, transparent), transparent 70%),
    radial-gradient(42% 30% at 12% 4%, color-mix(in oklab, var(--violet) 9%, transparent), transparent 72%);
}
:root[data-theme="light"] #profile-page{
  --lime:#5a5cf0; --cyan:#0ea5e9; --violet:#8b5cf6; --on-lime:#ffffff; --warm:#d97706;
  --pf-card-bg: color-mix(in oklab, #ffffff 74%, transparent);
  --pf-line:    color-mix(in oklab, #0f172a 10%, transparent);
  --pf-line-hi: color-mix(in oklab, #0f172a 18%, transparent);
}
/* the profile section carries the homepage `.block` class for layout; neutralise
   its inherited centered-heading + big top padding so our own rhythm wins. */
#profile-page.block{ padding: 0; }
#profile-page h2, #profile-page h3, #profile-page p{ text-align: left; }

/* Reveal handling — the dashboard must NEVER sit invisible. Content is always
   opacity:1 (this ID+!important beats the global `[data-reveal]{opacity:0}` and
   survives any throttled/paused transition). The entrance is a transform-only
   slide the scroll observer triggers via `.in` — with no fill mode, so after it
   finishes the element reverts to its base transform and the hover-tilt still
   works, and if animations are throttled the content is simply already in place. */
#profile-page [data-reveal]{ opacity:1 !important; }
#profile-page [data-reveal].in{ animation: pfRise .55s cubic-bezier(.2,.7,.2,1); }
@keyframes pfRise{ from{ transform: translateY(22px); } to{ transform: none; } }
@media (prefers-reduced-motion: reduce){ #profile-page [data-reveal].in{ animation:none; } }

.pf{ padding: 30px 0 90px; }
.pf-wrap{ max-width: 1120px; margin: 0 auto; padding: 0 22px; }

.pf-block{ margin-top: 42px; }
.pf-block-head{ margin: 0 0 18px; }
.pf-block-head h2{
  font-family:'Bricolage Grotesque','Native Emoji',sans-serif;
  font-size: clamp(17px, 1.8vw, 21px); font-weight: 800; letter-spacing:-.015em; margin:0;
  color: var(--text); display:flex; align-items:center; gap:11px;
}
.pf-block-head h2::before{
  content:''; width:4px; height:19px; border-radius:3px; flex:0 0 auto;
  background: linear-gradient(180deg, var(--lime), var(--cyan));
}
.pf-block-head p{ margin: 7px 0 0 15px; color: var(--muted); font-size: 13.5px; max-width: 64ch; line-height:1.5; }

.pf-card{
  background: linear-gradient(180deg, color-mix(in oklab, var(--text) 3.5%, transparent), transparent 150px), var(--pf-card-bg);
  border: 1px solid var(--pf-line);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(10px);
}

/* ========================= HERO ========================= */
.pf-hero{
  display:grid; grid-template-columns: 1fr 1.02fr; gap: 30px; align-items:center;
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in oklab, var(--violet) 20%, transparent), transparent 60%),
    radial-gradient(120% 140% at 100% 100%, color-mix(in oklab, var(--lime) 16%, transparent), transparent 55%),
    var(--pf-card-bg);
  border: 1px solid var(--pf-line);
  border-radius: 32px;
  padding: 44px;
  min-height: 372px;
  overflow:hidden; position:relative;
  box-shadow: var(--shadow-lg, 0 30px 72px -28px rgba(0,0,0,.82));
}
.pf-hero > *{ position:relative; z-index:1; }
.pf-hero-aura{
  position:absolute; inset:0; z-index:0; pointer-events:none;
  background:
    radial-gradient(46% 60% at 10% -8%, color-mix(in oklab, var(--violet) 26%, transparent), transparent 60%),
    radial-gradient(52% 74% at 106% 110%, color-mix(in oklab, var(--lime) 24%, transparent), transparent 62%),
    radial-gradient(40% 60% at 62% 30%, color-mix(in oklab, var(--cyan) 12%, transparent), transparent 72%);
  animation: pfHeroAura 11s ease-in-out infinite alternate;
}
@keyframes pfHeroAura{ from{ opacity:.62; transform: translateY(-6px) scale(1.01); } to{ opacity:1; transform: translateY(6px) scale(1.045); } }
.pf-id{ display:flex; gap: 22px; align-items:center; min-width:0; }
.pf-avatar{
  flex: 0 0 auto; width: 96px; height: 96px; border-radius: 26px;
  display:grid; place-items:center; font-weight: 800; font-size: 44px; color: var(--on-lime, #0a0b10);
  font-family:'Bricolage Grotesque','Native Emoji',sans-serif;
  background: linear-gradient(135deg, var(--lime), var(--cyan));
  box-shadow: 0 18px 42px -12px color-mix(in oklab, var(--lime) 66%, transparent), 0 0 0 6px color-mix(in oklab, var(--lime) 12%, transparent);
}
.pf-id-main{ min-width:0; }
.pf-name{
  font-family:'Bricolage Grotesque','Native Emoji',sans-serif;
  font-size: clamp(30px, 4vw, 48px); font-weight: 800; letter-spacing:-.035em;
  margin: 0 0 5px; color: var(--text); line-height:1.02;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.pf-id-sub{ display:flex; flex-wrap:wrap; align-items:center; gap:7px; color: var(--muted); font-size: 13.5px; }
.pf-id-sub b{ color: var(--text); }
.pf-handle{ color: var(--cyan); font-weight:600; }
.pf-dot{ opacity:.5; }
.pf-id-pills{ display:flex; flex-wrap:wrap; gap:9px; margin-top: 14px; }
.pf-plan-pill{
  display:inline-flex; align-items:center; gap:6px; font-size: 12.5px; font-weight:700;
  padding: 7px 13px; border-radius: 999px; border:1px solid var(--pf-line); text-decoration:none;
  background: var(--chip-bg, rgba(255,255,255,.04)); color: var(--text);
}
.pf-plan-pill b{ font-weight:800; }
.pf-plan-pill.is-prem{ border-color: color-mix(in oklab, var(--lime) 45%, transparent); background: color-mix(in oklab, var(--lime) 12%, transparent); }
.pf-plan-pill.is-prem.is-soon{ border-color: color-mix(in oklab, #f59e0b 55%, transparent); background: color-mix(in oklab, #f59e0b 14%, transparent); color:#f59e0b; }
.pf-plan-pill.is-prem.is-expired{ color:#ef4444; }
.pf-plan-pill.is-life{ border-color: color-mix(in oklab, var(--violet) 50%, transparent); background: color-mix(in oklab, var(--violet) 16%, transparent); }
.pf-plan-pill.is-free{ cursor:pointer; }
.pf-plan-pill.is-free:hover{ border-color: color-mix(in oklab, var(--lime) 50%, transparent); }
.pf-band-chip{
  display:inline-flex; align-items:center; font-size:12.5px; font-weight:700; padding:7px 13px; border-radius:999px;
  color: var(--bc, var(--lime)); border:1px solid color-mix(in oklab, var(--bc, var(--lime)) 40%, transparent);
  background: color-mix(in oklab, var(--bc, var(--lime)) 10%, transparent);
}

/* gauge — bold 280° band-scale arc, the hero's focal point */
.pf-gauge{ text-align:center; }
.pf-gauge-wrap{ position:relative; width: min(346px, 76vw); margin: 0 auto; aspect-ratio:1; }
.pf-gauge-aura{
  position:absolute; inset:7%; z-index:0; border-radius:50%; pointer-events:none;
  background: conic-gradient(from 0deg,
     transparent 0deg,
     color-mix(in oklab, var(--violet) 34%, transparent) 45deg,
     transparent 135deg,
     color-mix(in oklab, var(--cyan) 34%, transparent) 205deg,
     transparent 255deg,
     color-mix(in oklab, var(--lime) 42%, transparent) 325deg,
     transparent 360deg);
  filter: blur(22px); opacity:.75; animation: pfGaugeAura 16s linear infinite;
}
@keyframes pfGaugeAura{ to{ transform: rotate(360deg); } }
.pf-gauge-svg{ position:relative; z-index:1; width:100%; height:100%; display:block; overflow:visible; }
.pf-g-track{ fill:none; stroke: var(--pf-line); stroke-width: 18; stroke-linecap:round; }
.pf-g-fill{ fill:none; stroke:url(#pfGaugeGrad); stroke-width: 18; stroke-linecap:round;
  transition: stroke-dashoffset 1.35s cubic-bezier(.2,.7,.2,1);
  filter: drop-shadow(0 0 11px color-mix(in oklab, var(--lime) 55%, transparent)); }
.pf-g-tick{ stroke: color-mix(in oklab, var(--text) 22%, transparent); stroke-width: 2.5; stroke-linecap:round; }
.pf-g-tick.hi{ stroke: color-mix(in oklab, var(--lime) 72%, transparent); }
.pf-g-target{ stroke: var(--text); stroke-width: 3; stroke-linecap:round; }
.pf-g-target-lab{ fill: var(--muted); font-size: 12px; font-weight: 800; text-anchor: middle; dominant-baseline: middle; font-family:'Hanken Grotesk',sans-serif; }
.pf-g-dot{ fill: var(--lime); stroke: var(--bg-soft, #12141c); stroke-width: 3;
  filter: drop-shadow(0 0 8px var(--lime)); transform-box: fill-box; transform-origin: center; animation: pfGaugeDot 2.4s ease-in-out infinite; }
@keyframes pfGaugeDot{ 0%,100%{ transform: scale(1); } 50%{ transform: scale(1.22); } }
.pf-gauge-center{ position:absolute; inset:0; z-index:2; display:grid; place-content:center; text-align:center; padding-bottom: 9%; }
.pf-gauge-eyebrow{ font-size: 10.5px; letter-spacing:.18em; text-transform:uppercase; color: var(--muted); font-weight:800; margin-bottom:3px; }
.pf-gauge-num{
  font-family:'Bricolage Grotesque','Native Emoji',sans-serif; font-weight:800;
  font-size: clamp(54px, 10vw, 88px); line-height:.9; font-variant-numeric: tabular-nums;
  background: linear-gradient(125deg, var(--lime), var(--cyan) 68%, var(--violet));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.pf-gauge-descr{ font-size: 13.5px; font-weight:700; color: var(--text); margin-top: 4px; }
.pf-gauge-note{ margin-top: 18px; font-size: 15px; font-weight:700; color: var(--text); }
.pf-gauge-src{ margin-top: 5px; font-size: 12.5px; color: var(--muted); }

@media (prefers-reduced-motion: reduce){
  .pf-hero-aura, .pf-gauge-aura, .pf-g-dot{ animation:none; }
}

/* ========================= STAT TILES ========================= */
.pf-stats{ display:grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.pf-stat{
  background: var(--pf-card-bg); border:1px solid var(--pf-line); border-radius: 18px;
  padding: 18px 14px; text-align:center; position:relative; overflow:hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  transform-style: preserve-3d; will-change: transform;
}
.pf-stat::before{ content:''; position:absolute; inset:0; opacity:0; transition:opacity .2s ease;
  background: radial-gradient(120px 80px at var(--mx,50%) var(--my,0%), color-mix(in oklab, var(--lime) 16%, transparent), transparent 70%); }
.pf-stat:hover{ border-color: color-mix(in oklab, var(--lime) 40%, transparent); box-shadow: 0 16px 34px -20px rgba(0,0,0,.6); }
.pf-stat:hover::before{ opacity:1; }
.pf-stat-ic{ font-size: 22px; line-height:1; }
.pf-stat-val{
  font-family:'Bricolage Grotesque','Native Emoji',sans-serif; font-weight:800;
  font-size: clamp(22px, 3vw, 30px); color: var(--text); margin-top: 8px; font-variant-numeric: tabular-nums;
}
.pf-stat-lab{ font-size: 12.5px; color: var(--muted); margin-top: 2px; font-weight:600; }
.pf-stat-sub{ font-size: 11px; color: var(--muted); opacity:.8; margin-top: 3px; }
.pf-stat.is-streak .pf-stat-val{ color: #f59e0b; }
.pf-stat.is-best .pf-stat-val{ color: var(--warm); }
.pf-stat.is-link{ text-decoration:none; cursor:pointer; display:block; }
.pf-stat-go{ position:absolute; top:10px; right:12px; font-size:13px; color:var(--muted); opacity:0; transition:opacity .18s ease, transform .18s ease; }
.pf-stat.is-link:hover .pf-stat-go{ opacity:.85; transform: translate(1px,-1px); }

/* ========================= RECOMMENDED NEXT STEP ========================= */
.pf-next{
  display:flex; align-items:center; gap:18px; position:relative; overflow:hidden;
  background:
    radial-gradient(64% 130% at 0% 0%, color-mix(in oklab, var(--nt, var(--lime)) 16%, transparent), transparent 60%),
    var(--pf-card-bg);
  border:1px solid color-mix(in oklab, var(--nt, var(--lime)) 34%, var(--pf-line));
  border-radius: 20px; padding: 20px 22px;
}
.pf-next-ic{ font-size: 34px; flex:0 0 auto; line-height:1;
  filter: drop-shadow(0 5px 12px color-mix(in oklab, var(--nt, var(--lime)) 42%, transparent)); }
.pf-next-main{ flex:1; min-width:0; }
.pf-next-eyebrow{ font-size:10.5px; text-transform:uppercase; letter-spacing:.14em; font-weight:800; color: var(--nt, var(--lime)); }
.pf-next-title{ font-family:'Bricolage Grotesque','Native Emoji',sans-serif; font-weight:800; font-size:19px; color:var(--text); margin:3px 0 4px; letter-spacing:-.01em; }
.pf-next-text{ font-size:13.5px; color:var(--muted); line-height:1.45; max-width:66ch; }
.pf-next-cta{
  flex:0 0 auto; display:inline-flex; align-items:center; gap:7px; text-decoration:none; cursor:pointer;
  /* --nt-ink lets each accent pick readable ink; falls back to --on-lime. */
  background: var(--nt, var(--lime)); color: var(--nt-ink, var(--on-lime, #0a0b10)); border:none;
  font-weight:800; font-size:14px; padding:12px 18px; border-radius:13px; font-family:inherit; white-space:nowrap;
  box-shadow: 0 12px 26px -12px color-mix(in oklab, var(--nt, var(--lime)) 72%, transparent);
  transition: transform .15s ease, box-shadow .15s ease;
}
.pf-next-cta:hover{ transform: translateY(-2px); box-shadow: 0 16px 34px -12px color-mix(in oklab, var(--nt, var(--lime)) 82%, transparent); }
/* Cyan, amber and violet are light-luminance in BOTH themes, so they always
   take near-black ink. Lime alone flips with the theme, so it defers to
   --on-lime (dark ink on dark-theme periwinkle, white on light-theme indigo). */
.pf-next--start,.pf-next--gap{ --nt: var(--cyan);   --nt-ink:#04202c; }
.pf-next--focus{               --nt:#f59e0b;        --nt-ink:#2a1a02; }
.pf-next--climb,.pf-next--momentum{ --nt: var(--lime); }
.pf-next--win{                 --nt: var(--violet); --nt-ink:#1c0b33; }
@media (max-width: 640px){
  .pf-next{ flex-wrap:wrap; }
  .pf-next-cta{ width:100%; justify-content:center; }
}

/* ========================= TREND ========================= */
.pf-tr-area{ stroke:none; pointer-events:none; }
.pf-trend-card{ padding: 20px 18px 14px; }
.pf-trend-wrap{ width:100%; }
.pf-trend-svg{ width:100%; height:auto; display:block; }
.pf-tr-grid{ stroke: var(--pf-line); stroke-width:1; opacity:.55; }
.pf-tr-ylab, .pf-tr-xlab{ fill: var(--muted); font-size: 12px; font-family:'Hanken Grotesk',sans-serif; }
.pf-tr-target{ stroke: var(--lime); stroke-width: 1.6; stroke-dasharray: 6 5; opacity:.8; }
.pf-tr-tlab{ fill: var(--lime); font-size: 11px; font-weight:700; letter-spacing:.04em; }
.pf-tr-line{ fill:none; stroke-width: 3; stroke-linejoin:round; stroke-linecap:round; }
.pf-tr-line.is-read{ stroke: var(--lime); filter: drop-shadow(0 4px 8px color-mix(in oklab, var(--lime) 30%, transparent)); }
.pf-tr-line.is-listen{ stroke: var(--cyan); filter: drop-shadow(0 4px 8px color-mix(in oklab, var(--cyan) 30%, transparent)); }
.pf-tr-dot{ stroke: var(--bg-soft, #12141c); stroke-width: 2; }
.pf-tr-dot.is-read{ fill: var(--lime); }
.pf-tr-dot.is-listen{ fill: var(--cyan); }
.pf-tr-dot.is-last{ stroke-width: 3; }
.pf-legend{ display:flex; flex-wrap:wrap; gap: 16px; justify-content:center; margin-top: 6px; }
.pf-lg{ display:inline-flex; align-items:center; gap:7px; font-size: 12.5px; color: var(--muted); font-weight:600; }
.pf-lg i{ width:14px; height:4px; border-radius:2px; display:inline-block; }
.pf-lg.is-read i{ background: var(--lime); }
.pf-lg.is-listen i{ background: var(--cyan); }
.pf-lg.is-target i{ background: transparent; border-top:2px dashed var(--lime); height:0; width:16px; }

/* empty states */
.pf-empty{ text-align:center; padding: 34px 18px; }
.pf-empty-ic{ font-size: 40px; }
.pf-empty-t{ font-weight:800; font-size:18px; color:var(--text); margin-top: 8px; font-family:'Bricolage Grotesque',sans-serif; }
.pf-empty-d{ color: var(--muted); font-size:14px; max-width: 46ch; margin: 6px auto 0; }
.pf-empty-cta{ display:flex; gap:10px; justify-content:center; margin-top: 16px; flex-wrap:wrap; }

/* ========================= SKILLS ========================= */
.pf-skills{ display:grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pf-skill{
  background: var(--pf-card-bg); border:1px solid var(--pf-line); border-radius: 18px; padding: 18px;
  display:flex; flex-direction:column; gap: 10px; position:relative; overflow:hidden;
  transition: transform .18s ease, border-color .18s ease; transform-style:preserve-3d; will-change:transform;
}
.pf-skill::after{ content:''; position:absolute; left:0; top:0; height:3px; width:100%; background: var(--bc, var(--lime)); opacity:.85; }
.pf-skill.is-empty::after{ background: var(--pf-line); }
.pf-skill:hover{ border-color: color-mix(in oklab, var(--bc, var(--lime)) 45%, transparent); }
.pf-skill-top{ display:flex; align-items:center; gap:8px; }
.pf-skill-ic{ font-size: 18px; }
.pf-skill-title{ font-weight:700; color: var(--text); font-size: 15px; }
.pf-skill-est{ margin-left:auto; font-size:10px; text-transform:uppercase; letter-spacing:.06em; color: var(--violet);
  border:1px solid color-mix(in oklab, var(--violet) 45%, transparent); border-radius:999px; padding:2px 7px; font-weight:700; }
.pf-skill-band{ display:flex; align-items:baseline; gap:8px; }
.pf-skill-num{ font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size: 34px; color: var(--bc, var(--text)); font-variant-numeric:tabular-nums; line-height:1; }
.pf-skill-lab{ font-size: 12.5px; color: var(--muted); font-weight:600; }
.pf-skill-spark{ height: 34px; display:flex; align-items:center; }
.pf-spark{ width:100%; height:34px; }
.pf-spark.is-read{ color: var(--lime); }
.pf-spark.is-listen{ color: var(--cyan); }
.pf-spark-line{ fill:none; stroke: currentColor; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; vector-effect:non-scaling-stroke; }
.pf-spark-dot{ fill: currentColor; }
.pf-skill-nospark{ font-size:12px; color:var(--muted); opacity:.7; }
.pf-skill-foot{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.pf-skill-meta{ font-size: 12px; color: var(--muted); }
.pf-skill-delta{ font-size: 12px; font-weight:700; }
.pf-skill-delta.up{ color: var(--lime); }
.pf-skill-delta.down{ color: #ef4444; }
.pf-skill-delta.flat{ color: var(--muted); }
.pf-skill-empty{ font-size: 13px; color: var(--muted); flex:1; }
.pf-skill-cta{ margin-top: auto; font-size: 13px; font-weight:700; color: var(--bc, var(--lime)); text-decoration:none; align-self:flex-start; }
.pf-skill.is-empty .pf-skill-cta{ color: var(--cyan); }
.pf-skill-cta:hover{ text-decoration:underline; }

/* ========================= ACTIVITY / CALENDAR ========================= */
/* Streak rail + calendar, sized to their content and centred as a pair. The
   calendar's width now varies with how long the account has been practising,
   so a fixed `210px 1fr` split stranded it against a wall of dead space. */
.pf-activity{ display:grid; grid-template-columns: auto auto; justify-content:center; gap: 40px; align-items:center; }
.pf-activity-side{ width:208px; }
.pf-act-streak{ display:flex; align-items:baseline; gap:8px; margin-bottom: 14px; }
.pf-act-flame{ font-size: 26px; animation: pfFlicker 3.2s ease-in-out infinite; transform-origin:50% 90%; }
@keyframes pfFlicker{
  0%,100%{ transform:none;                filter:none; }
  35%    { transform:scale(1.07) rotate(-2deg); filter:brightness(1.12); }
  60%    { transform:scale(.98)  rotate(1.5deg); }
}
.pf-act-num{ font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size: 40px; color:#f59e0b; font-variant-numeric:tabular-nums; }
.pf-act-lab{ color: var(--muted); font-size: 13px; }
.pf-act-rows{ display:flex; flex-direction:column; gap:9px; }
.pf-act-row{ display:flex; justify-content:space-between; align-items:center; font-size:13.5px; color: var(--muted); border-bottom:1px dashed var(--pf-line); padding-bottom:8px; }
.pf-act-row b{ color: var(--text); font-weight:700; font-size:15px; }

.pf-activity-heat{ min-width:0; }
.pf-heat-head{ display:flex; align-items:baseline; gap:10px; margin-bottom:13px; flex-wrap:wrap; }
.pf-heat-head b{ font-size:13.5px; font-weight:700; color:var(--text); }
.pf-heat-head em{ font-style:normal; font-size:12px; color:var(--muted); opacity:.8; }
.pf-heat-head span{ margin-left:auto; font-size:12px; color:var(--muted); font-variant-numeric:tabular-nums; }

/* The calendar: one grid column per week, one row per weekday (Monday on top).
   Squares are a FIXED size rather than fluid — the number of columns varies per
   account, and stretching them to fill blew the squares up on short histories.
   --cols is set inline by pfHeatmap(). */
.pf-heat{ --gap:4px; --cell: var(--cell-lg, 22px); position:relative; min-width:0; }
/* Below 1040px pfHeatmap() already caps the window at 22 weeks; shrink the
   squares at the SAME breakpoint or the widest window overruns the card. */
@media (max-width: 1040px){ .pf-heat{ --cell:18px; } }
.pf-heat-scroll{ overflow-x:auto; overflow-y:hidden; padding:10px; margin:-10px; scrollbar-width:thin; }
.pf-heat-grid{
  display:grid;
  grid-template-columns: auto repeat(var(--cols,18), var(--cell));
  grid-template-rows: auto repeat(7, var(--cell));
  gap: var(--gap); column-gap: var(--gap);
  width:max-content;
}
.pf-heat-mon{
  font-size:11px; font-weight:700; letter-spacing:.02em;
  color:color-mix(in oklab, var(--text) 70%, transparent);
  justify-self:start; align-self:end; padding:0 0 3px 3px; white-space:nowrap; line-height:1.2;
  border-left:1px solid var(--pf-line);        /* a tick anchoring the label to its first week */
}
/* Weekday labels. All seven are drawn now, so they carry more of the reading
   than they used to — hence the extra weight and the step up from --muted,
   which at 10.5px on this surface was close to invisible. */
.pf-heat-grid > span:not(.pf-heat-mon){
  font-size:10.5px; font-weight:600; align-self:center; justify-self:end;
  color:color-mix(in oklab, var(--text) 62%, transparent);
  padding-right:7px; line-height:1; white-space:nowrap;
}

/* one square */
.pf-hc{
  width:var(--cell); height:var(--cell); border-radius:22%; display:block; position:relative;
  /* an empty day still has to read as a square — most users start with a nearly
     blank grid, and at 7% the lattice disappeared into the card */
  background: color-mix(in oklab, var(--text) 9%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--text) 9%, transparent);
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s ease, background-color .18s ease;
}
.pf-hc.lvl-1{ background: color-mix(in oklab, var(--lime) 45%, transparent); box-shadow:none; }
.pf-hc.lvl-2{ background: color-mix(in oklab, var(--lime) 63%, transparent); box-shadow:none; }
.pf-hc.lvl-3{ background: color-mix(in oklab, var(--lime) 81%, transparent); box-shadow:none; }
.pf-hc.lvl-4{ background: var(--lime); box-shadow: 0 0 8px color-mix(in oklab, var(--lime) 38%, transparent); }
.pf-hc.is-void{ background:none; box-shadow:none; }      /* days that haven't happened yet */

/* The two orientation markers, keyed in the legend below the grid. Today is
   almost always INSIDE the live streak, so the rings have to compose rather
   than override — amber hugging the square, the today ring outside it. */
.pf-hc.is-streak{ box-shadow: 0 0 0 1.5px color-mix(in oklab, var(--warm) 80%, transparent); }
.pf-hc.is-today{ box-shadow: 0 0 0 2px var(--text); }
.pf-hc.is-today.is-streak{ box-shadow: 0 0 0 1.5px var(--warm), 0 0 0 3.5px var(--text); }
/* the pulse rides a pseudo-element so it never fights those box-shadows */
.pf-hc.is-today::after{
  content:''; position:absolute; inset:-3px; border-radius:30%; pointer-events:none;
  box-shadow: 0 0 0 1.5px color-mix(in oklab, var(--text) 50%, transparent);
  animation: pfTodayPulse 2.8s ease-out infinite;
}
@keyframes pfTodayPulse{
  0%   { transform: scale(.82); opacity:0; }
  35%  { opacity:.85; }
  100% { transform: scale(1.35); opacity:0; }
}

/* hover — lift the square and let the tooltip do the talking */
.pf-heat-grid .pf-hc:not(.is-void):hover,
.pf-heat-grid .pf-hc.is-hot{ transform: scale(1.4); z-index:2; }
.pf-heat-grid .pf-hc.lvl-0:hover,
.pf-heat-grid .pf-hc.lvl-0.is-hot{ background: color-mix(in oklab, var(--text) 18%, transparent); }

/* entrance — a diagonal wave from the top-left corner, class-driven so the
   squares are never stranded at the (invisible) first frame */
.pf-heat.is-lit .pf-heat-grid .pf-hc{ animation: pfCellIn .5s cubic-bezier(.2,.9,.25,1) backwards; animation-delay: calc(var(--i,0) * 16ms); }
@keyframes pfCellIn{ from{ opacity:0; transform: scale(.25); } to{ opacity:1; transform:none; } }

/* floating tooltip — lives outside the scroller so it can overhang the top row */
.pf-heat-tip{
  position:absolute; z-index:6; pointer-events:none;
  transform: translate(-50%, -100%) translateY(-9px) scale(.94);
  opacity:0; transition: opacity .14s ease, transform .14s cubic-bezier(.2,.8,.2,1);
  background: var(--pf-tip-bg, #10142a); color:#fff;
  border:1px solid color-mix(in oklab, #fff 14%, transparent);
  border-radius:10px; padding:7px 11px; white-space:nowrap;
  box-shadow: 0 10px 26px rgba(0,0,0,.4);
  display:flex; flex-direction:column; gap:1px; line-height:1.25;
}
.pf-heat-tip b{ font-size:12.5px; font-weight:700; }
.pf-heat-tip span{ font-size:11px; opacity:.72; }
.pf-heat-tip::after{
  content:''; position:absolute; left:50%; bottom:-4px; width:8px; height:8px;
  transform:translateX(-50%) rotate(45deg);
  background:var(--pf-tip-bg, #10142a);
  border-right:1px solid color-mix(in oklab, #fff 14%, transparent);
  border-bottom:1px solid color-mix(in oklab, #fff 14%, transparent);
}
.pf-heat-tip.is-on{ opacity:1; transform: translate(-50%, -100%) translateY(-11px) scale(1); }
/* flipped under the square when the row sits too near the top to fit above */
.pf-heat-tip.is-below{ transform: translate(-50%, 0) translateY(9px) scale(.94); }
.pf-heat-tip.is-below.is-on{ transform: translate(-50%, 0) translateY(11px) scale(1); }
.pf-heat-tip.is-below::after{ bottom:auto; top:-4px; border:0;
  border-left:1px solid color-mix(in oklab, #fff 14%, transparent);
  border-top:1px solid color-mix(in oklab, #fff 14%, transparent); }
:root[data-theme="light"] #profile-page .pf-heat-tip{ --pf-tip-bg:#1b2137; }

/* legend */
.pf-heat-key{
  display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap;
  margin-top:14px; padding-top:12px; border-top:1px dashed var(--pf-line);
  font-size:11.5px; color:var(--muted);
}
.pf-heat-marks{ display:flex; align-items:center; gap:16px; }
.pf-heat-marks > span,
.pf-heat-scale{ display:flex; align-items:center; gap:6px; }
.pf-heat-key .pf-hc{ width:12px; height:12px; flex:none; animation:none; }   /* swatches keep a fixed size */
.pf-heat-key .pf-hc::after{ animation:none; opacity:.8; transform:none; }
.pf-heat-scale .pf-hc{ margin:0 -1px; }

/* ========================= VOCAB ========================= */
.pf-vocab{ display:grid; grid-template-columns: .8fr 1.2fr; gap: 24px; align-items:center; }
.pf-vocab-nums{ text-align:center; border-right:1px dashed var(--pf-line); padding-right:20px; }
.pf-vocab-big{ display:flex; flex-direction:column; }
.pf-vocab-big span{ font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size: 52px; color: var(--lime); font-variant-numeric:tabular-nums; line-height:1; }
.pf-vocab-big small{ color: var(--muted); font-size: 13px; margin-top:4px; }
.pf-vocab-split{ display:flex; justify-content:center; gap:18px; margin-top:16px; }
.pf-vocab-split div{ display:flex; flex-direction:column; }
.pf-vocab-split b{ font-size:19px; color:var(--text); font-weight:800; font-variant-numeric:tabular-nums; }
.pf-vocab-split span{ font-size:11px; color:var(--muted); }
.pf-mast-head{ display:flex; justify-content:space-between; align-items:center; font-weight:700; color:var(--text); font-size:14px; margin-bottom:10px; }
.pf-mast-count{ font-weight:600; color:var(--muted); font-size:12px; }
.pf-mast-bar{ display:flex; height: 16px; border-radius: 999px; overflow:hidden; gap:2px; background: var(--pf-line); }
.pf-mast-seg{ min-width:4px; }
.pf-mast-seg.is-strong{ background: var(--lime); }
.pf-mast-seg.is-medium{ background: var(--cyan); }
.pf-mast-seg.is-weak{ background: #f59e0b; }
.pf-mast-seg.is-fresh{ background: color-mix(in oklab, var(--violet) 60%, transparent); }
.pf-mast-legend{ display:flex; flex-wrap:wrap; gap:12px; margin-top:12px; }
.pf-mast-legend span{ display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--muted); }
.pf-mast-legend i{ width:10px; height:10px; border-radius:3px; }
.pf-mast-legend .is-strong i{ background:var(--lime); } .pf-mast-legend .is-medium i{ background:var(--cyan); }
.pf-mast-legend .is-weak i{ background:#f59e0b; } .pf-mast-legend .is-fresh i{ background: color-mix(in oklab, var(--violet) 60%, transparent); }
.pf-mast-empty{ font-size:13px; color:var(--muted); padding: 10px 0; }
.pf-vocab-cta{ display:flex; gap:10px; margin-top:16px; flex-wrap:wrap; }

/* ========================= GOALS ========================= */
.pf-goals-grid{ display:flex; flex-wrap:wrap; gap: 26px; align-items:flex-end; }
.pf-goal-field label{ display:block; font-size:12.5px; color:var(--muted); font-weight:700; margin-bottom:8px; text-transform:uppercase; letter-spacing:.04em; }
.pf-goal-pills{ display:flex; gap:7px; flex-wrap:wrap; border-radius:12px; }
.pf-goal-pills.pf-pulse{ animation: pfPulseWrap 1s ease 2; }
@keyframes pfPulseWrap{ 0%,100%{ box-shadow:0 0 0 0 transparent; } 45%{ box-shadow:0 0 0 5px color-mix(in oklab, var(--lime) 28%, transparent); } }
.pf-goal-pill{
  border:1px solid var(--pf-line); background: var(--chip-bg, rgba(255,255,255,.04)); color: var(--text);
  border-radius: 12px; padding: 9px 13px; font-weight:700; cursor:pointer; font-variant-numeric:tabular-nums;
  transition: all .15s ease; font-size:14px;
}
.pf-goal-pill:hover{ border-color: color-mix(in oklab, var(--lime) 45%, transparent); }
.pf-goal-pill.is-on{ background: var(--lime); color: var(--on-lime,#0a0b10); border-color: var(--lime); box-shadow: 0 8px 20px -8px color-mix(in oklab, var(--lime) 60%, transparent); }
.pf-goal-date{
  border:1px solid var(--pf-line); background: var(--input-bg, rgba(255,255,255,.04)); color: var(--text);
  border-radius: 12px; padding: 9px 12px; font-size:14px; font-family:inherit; color-scheme: dark;
}
:root[data-theme="light"] .pf-goal-date{ color-scheme: light; }
.pf-goal-date:focus{ outline:none; border-color: var(--lime); }
.pf-testday{ margin-left:auto; display:flex; align-items:center; gap:12px; background: color-mix(in oklab, var(--violet) 12%, transparent);
  border:1px solid color-mix(in oklab, var(--violet) 35%, transparent); border-radius:16px; padding: 12px 18px; }
.pf-testday-n{ font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size: 40px; color: var(--violet); line-height:1; font-variant-numeric:tabular-nums; }
.pf-testday-l{ font-size: 12.5px; color: var(--muted); line-height:1.3; }
.pf-testday-l b{ color: var(--text); }
.pf-testday.is-past{ background: color-mix(in oklab, #ef4444 10%, transparent); border-color: color-mix(in oklab, #ef4444 35%, transparent); }
.pf-nudge{ display:flex; align-items:center; gap:12px; margin-top:18px; text-decoration:none;
  background: color-mix(in oklab, var(--lime) 8%, transparent); border:1px solid color-mix(in oklab, var(--lime) 30%, transparent);
  border-radius: 14px; padding: 14px 16px; color: var(--text); font-size:13.5px; transition: border-color .15s ease, transform .15s ease; }
.pf-nudge:hover{ border-color: color-mix(in oklab, var(--lime) 55%, transparent); transform: translateY(-1px); }
.pf-nudge b{ color: var(--lime); }
.pf-nudge-ic{ font-size:20px; }
.pf-nudge-go{ margin-left:auto; font-size:18px; color: var(--lime); font-weight:800; }

/* ========================= RECORDS + BADGES ========================= */
.pf-records{ display:grid; grid-template-columns: repeat(4,1fr); gap:14px; margin-bottom:16px; }
.pf-rec{ background: var(--pf-card-bg); border:1px solid var(--pf-line); border-radius:16px; padding:18px 14px; text-align:center;
  transition: transform .18s ease, border-color .18s ease; transform-style:preserve-3d; }
.pf-rec:hover{ border-color: color-mix(in oklab, var(--lime) 40%, transparent); }
.pf-rec-ic{ font-size:22px; }
.pf-rec-v{ font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size:28px; color:var(--text); margin-top:6px; font-variant-numeric:tabular-nums; }
.pf-rec-l{ font-size:12px; color:var(--muted); margin-top:2px; }
.pf-badges{ display:grid; grid-template-columns: repeat(4,1fr); gap:12px; }
.pf-badge{ display:flex; align-items:center; gap:9px; padding:12px 14px; border-radius:14px; border:1px solid var(--pf-line); background: var(--pf-card-bg); position:relative; }
.pf-badge.is-off{ opacity:.5; filter:grayscale(.6); }
.pf-badge.is-on{ border-color: color-mix(in oklab, var(--lime) 40%, transparent); background: color-mix(in oklab, var(--lime) 8%, transparent); }
.pf-badge-ic{ font-size:20px; }
.pf-badge-t{ font-size:13px; font-weight:700; color:var(--text); }
.pf-badge-check{ margin-left:auto; color: var(--lime); font-weight:800; }
.pf-badge-lock{ margin-left:auto; font-size:12px; opacity:.7; }

/* ========================= ACCOUNT + SUPPORT ========================= */
.pf-account-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pf-acc-row{ display:flex; justify-content:space-between; align-items:center; gap:12px; padding: 11px 0; border-bottom:1px dashed var(--pf-line); font-size:14px; }
.pf-acc-row:last-of-type{ border-bottom:none; }
.pf-acc-k{ color: var(--muted); }
.pf-acc-v{ color: var(--text); font-weight:700; }
.pf-mono{ font-variant-numeric:tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight:600; }
.pf-acc-actions{ display:flex; flex-wrap:wrap; gap:10px; margin-top:16px; }
.pf-btn-danger{ border:1px solid color-mix(in oklab, #ef4444 45%, transparent); color:#ef4444; background:transparent; }
.pf-btn-danger:hover{ background: color-mix(in oklab, #ef4444 12%, transparent); }
.pf-support{ background:
    radial-gradient(120% 120% at 100% 0%, color-mix(in oklab, var(--cyan) 12%, transparent), transparent 60%), var(--pf-card-bg); }
.pf-support-ic{ font-size:30px; }
.pf-support h3{ font-family:'Bricolage Grotesque',sans-serif; font-size:19px; font-weight:800; margin:8px 0 6px; color:var(--text); }
.pf-support p{ color:var(--muted); font-size:14px; margin:0 0 16px; line-height:1.5; }
.pf-support-actions{ display:flex; gap:10px; flex-wrap:wrap; }
/* The owner is the fallback, so it is a quiet inline link in a sentence — not a
   button beside the primary one. As a second button it carried the same visual
   weight as the front desk, which is exactly how half the questions end up in
   the owner's inbox anyway. Underlined rather than coloured-only, so it is still
   obviously clickable without competing with the CTA above it. */
.pf-support-foot{ margin-top:14px; font-size:12px; color:var(--muted); opacity:.85; }

.pf-footnote{ margin-top: 30px; text-align:center; font-size: 12px; color: var(--muted); opacity:.8; }

/* ========================= SKELETON ========================= */
.pf-skel{ background: var(--pf-card-bg); border:1px solid var(--pf-line); border-radius: 20px; position:relative; overflow:hidden; }
.pf-skel::after{ content:''; position:absolute; inset:0; transform:translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--text) 6%, transparent), transparent); animation: pfShimmer 1.4s infinite; }
@keyframes pfShimmer{ to{ transform: translateX(100%); } }
.pf-skel-hero{ height: 190px; margin-bottom:16px; }
.pf-skel-row{ display:grid; grid-template-columns:repeat(6,1fr); gap:14px; margin-bottom:16px; }
.pf-skel-tile{ height: 110px; }
.pf-skel-block{ height: 220px; margin-bottom:16px; }

/* ========================= RESPONSIVE ========================= */
@media (max-width: 900px){
  .pf-hero{ grid-template-columns: 1fr; text-align:center; }
  .pf-id{ flex-direction:column; text-align:center; }
  .pf-id-sub, .pf-id-pills{ justify-content:center; }
  .pf-stats{ grid-template-columns: repeat(3,1fr); }
  .pf-skills{ grid-template-columns: repeat(2,1fr); }
  .pf-activity{ grid-template-columns: 1fr; justify-content:stretch; gap:24px; }
  .pf-activity-side{ width:auto; }
  .pf-vocab{ grid-template-columns: 1fr; }
  .pf-vocab-nums{ border-right:none; border-bottom:1px dashed var(--pf-line); padding-right:0; padding-bottom:18px; }
  .pf-records{ grid-template-columns: repeat(2,1fr); }
  .pf-badges{ grid-template-columns: repeat(2,1fr); }
  .pf-account-grid{ grid-template-columns: 1fr; }
  .pf-skel-row{ grid-template-columns:repeat(3,1fr); }
}
@media (max-width: 520px){
  .pf-wrap{ padding: 0 14px; }
  .pf-hero{ padding: 22px; }
  .pf-stats{ grid-template-columns: repeat(2,1fr); }
  .pf-skills{ grid-template-columns: 1fr; }
  .pf-goals-grid{ flex-direction:column; align-items:stretch; }
  .pf-testday{ margin-left:0; }
  .pf-name{ white-space:normal; }
  /* tighten so all 18 weeks still fit a phone without a horizontal scroll */
  .pf-heat{ --gap:3px; --cell:11px; }
  .pf-heat-grid > span:not(.pf-heat-mon){ font-size:9px; padding-right:4px; }
  .pf-heat-mon{ font-size:10px; }
  .pf-heat-head span{ margin-left:0; flex-basis:100%; }
  .pf-heat-key{ font-size:11px; gap:10px; }
  .pf-heat-marks{ gap:12px; }
}

@media (prefers-reduced-motion: reduce){
  .pf-gauge-arc{ transition:none; }
  .pf-skel::after{ animation:none; }
  .pf-act-flame{ animation:none; }
  .pf-hc.is-today::after{ animation:none; opacity:.8; transform:none; }
  .pf-heat.is-lit .pf-heat-grid .pf-hc{ animation:none; }
  .pf-hc, .pf-heat-tip{ transition:none; }
}

/* ========================= ESSAYS (from /writing/practice) ========================= */
.pf-essays{ display:grid; grid-template-columns: .8fr 1.2fr; gap: 24px; align-items:center; }
.pf-essays-nums{ text-align:center; border-right:1px dashed var(--pf-line); padding-right:20px; }
.pf-essays-big{ display:flex; flex-direction:column; }
.pf-essays-big span{ font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size:52px; color:var(--violet); font-variant-numeric:tabular-nums; line-height:1; }
.pf-essays-big small{ color:var(--muted); font-size:13px; margin-top:4px; }
.pf-essays-split{ display:flex; justify-content:center; gap:18px; margin-top:16px; flex-wrap:wrap; }
.pf-essays-split div{ display:flex; flex-direction:column; }
.pf-essays-split b{ font-size:19px; color:var(--text); font-weight:800; font-variant-numeric:tabular-nums; }
.pf-essays-split span{ font-size:11px; color:var(--muted); }
.pf-essays-list{ display:grid; gap:8px; }
.pf-essay-row{
  display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:center;
  padding:10px 14px; border-radius:14px; text-decoration:none; color:inherit;
  background:var(--chip-bg); border:1px solid var(--pf-line); transition:.16s;
}
.pf-essay-row:hover{ background:var(--chip-bg-hover); border-color:var(--card-border-hi); }
.pf-essay-task{ font-size:17px; }
.pf-essay-main{ min-width:0; }
.pf-essay-main b{ display:block; font-size:13.5px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pf-essay-main em{ display:block; font-style:normal; font-size:11px; color:var(--muted); margin-top:2px; }
.pf-essay-w{ font-size:14px; font-weight:800; font-variant-numeric:tabular-nums; white-space:nowrap; }
.pf-essay-w i{ font-style:normal; font-size:11px; font-weight:600; color:var(--muted); }
.pf-essay-w.is-hit{ color:var(--lime); }
.pf-essay-w.is-under{ color:#f59e0b; }
.pf-essays-cta{ justify-self:start; margin-top:4px; }
.pf-essays-empty{ display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.pf-essays-ic{ font-size:34px; }
.pf-essays-empty b{ font-size:15px; }
.pf-essays-empty p{ color:var(--muted); font-size:13px; margin-top:4px; max-width:46ch; line-height:1.6; }
.pf-essays-empty .btn{ margin-left:auto; }
@media (max-width: 760px){
  .pf-essays{ grid-template-columns:1fr; }
  .pf-essays-nums{ border-right:0; border-bottom:1px dashed var(--pf-line); padding:0 0 18px; }
  .pf-essays-empty .btn{ margin-left:0; }
}

/* Touch targets. This file loads after core/31-responsive-global.css, so the
   goal pills have to be enlarged here or the base rule below wins. */
@media (pointer:coarse), (max-width:900px){
  .pf-goal-pill{ min-height:42px; padding:10px 15px; }
}

/* ========================= BUY ME A COFFEE =========================
   The tip jar at the foot of the profile. The card face is a self-contained
   object with its OWN fixed palette (explicit rgba, never var(--text)): a
   permanently dark plate using theme text colours goes invisible in light
   theme. Everything OUTSIDE the plate uses the normal profile tokens. */
.pf-coffee{
  /* Amber ink is a TOKEN, not a literal, because the headline is set in it: the
     bright #fbbf24 that glows on the dark panel drops to ~2.1:1 on the light
     one, so light theme swaps in amber-700/800 further down. */
  --pf-coffee-ink:  #fcd34d;
  --pf-coffee-ink2: #fbbf24;
  position:relative; overflow:hidden; isolation:isolate;
  display:grid; align-items:center; gap: 24px 36px;
  grid-template-columns: minmax(0,1fr) minmax(0,340px);
  grid-template-areas: "copy plate" "act plate";
  padding: 32px 34px;
  background:
    radial-gradient(120% 150% at 100% 0%, color-mix(in oklab, #f59e0b 15%, transparent), transparent 60%),
    radial-gradient(90% 130% at 0% 100%, color-mix(in oklab, #f59e0b 9%, transparent), transparent 62%),
    var(--pf-card-bg);
  border-color: color-mix(in oklab, #f59e0b 26%, var(--pf-line));
}
:root[data-theme="light"] #profile-page .pf-coffee{
  --pf-coffee-ink:  #b45309;
  --pf-coffee-ink2: #92400e;
}
.pf-coffee-copy{ grid-area: copy; min-width:0; }
.pf-coffee-card{ grid-area: plate; }
.pf-coffee-act { grid-area: act;  min-width:0; }

/* slow amber bloom behind the content (z-index:-1 sits above the panel's own
   background but below its text, because .pf-coffee isolates) */
.pf-coffee-aura{
  position:absolute; z-index:-1; pointer-events:none;
  right:-6%; top:-42%; width:48%; aspect-ratio:1; border-radius:50%;
  background: radial-gradient(circle, rgba(245,158,11,.28), transparent 68%);
  filter: blur(28px);
  animation: pfCoffeeAura 11s ease-in-out infinite alternate;
}
@keyframes pfCoffeeAura{
  from{ transform: translate3d(0,0,0) scale(1); }
  to  { transform: translate3d(-16px,18px,0) scale(1.12); }
}

/* ---- the ask, said loudly ---- */
.pf-coffee-kicker{
  display:inline-flex; align-items:center; gap:8px;
  padding: 7px 14px; border-radius: 999px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  color: var(--pf-coffee-ink2);
  background: color-mix(in oklab, #f59e0b 13%, transparent);
  border: 1px solid color-mix(in oklab, #f59e0b 32%, transparent);
}
.pf-coffee-kicker i{ font-style:normal; font-family:'Native Emoji',sans-serif; font-size: 14px; line-height:1; }
.pf-coffee-title{
  font-family:'Bricolage Grotesque','Native Emoji',sans-serif;
  font-size: clamp(30px, 4.4vw, 42px); font-weight: 800;
  letter-spacing: -.025em; line-height: 1.02; margin: 14px 0 0;
  background: linear-gradient(100deg, var(--pf-coffee-ink) 0%, var(--pf-coffee-ink2) 52%, var(--pf-coffee-ink) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---- the card plate ---- */
.pf-coffee-card{
  position:relative; overflow:hidden; isolation:isolate;
  aspect-ratio: 1.586;                /* ISO/IEC 7810 ID-1, i.e. a real card */
  border-radius: 18px; padding: 18px;
  display:flex; flex-direction:column;
  background:
    radial-gradient(120% 130% at 8% 4%, #4a3418, transparent 58%),
    radial-gradient(110% 120% at 100% 100%, #2a1b0d, transparent 60%),
    linear-gradient(145deg, #3a2a17 0%, #1c140c 56%, #33240f 100%);
  border: 1px solid rgba(245,158,11,.34);
  box-shadow: 0 22px 46px -20px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.07);
  color: #f6e9d6;
  transition: transform .3s cubic-bezier(.2,.8,.25,1), box-shadow .3s;
}
.pf-coffee-card:hover{
  transform: translateY(-4px) rotate(-.5deg);
  box-shadow: 0 30px 58px -22px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.1);
}
/* Sheen sweep. Transform-only (no width/left animation) so it stays on the
   compositor, and it rests OFF the plate rather than being hidden by opacity —
   an opacity rest state flashes the whole plate on the first frame. */
.pf-coffee-sheen{
  position:absolute; inset:-40% -60%; z-index:2; pointer-events:none;
  background: linear-gradient(74deg, transparent 42%, rgba(255,235,190,.20) 50%, transparent 58%);
  transform: translateX(-58%);
  transition: transform 1.05s cubic-bezier(.22,.7,.3,1);
}
.pf-coffee-card:hover .pf-coffee-sheen{ transform: translateX(58%); }
.pf-coffee-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.pf-coffee-cup{ font-family:'Native Emoji',sans-serif; font-size: 22px; line-height:1; }
.pf-coffee-bank{
  font-size: 10.5px; font-weight:700; letter-spacing:.16em; text-transform:uppercase;
  color: rgba(246,233,214,.72); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width: 55%;
}
.pf-coffee-chip{
  width: 40px; height: 29px; border-radius: 7px; margin: auto 0 0;
  background: linear-gradient(135deg, #f2c879, #b98529 52%, #f0d79b);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.28);
  position:relative;
}
.pf-coffee-chip::after{                /* contact pads, drawn not imaged */
  content:''; position:absolute; inset:4px 5px;
  border:1px solid rgba(0,0,0,.30); border-radius:3px;
  background:
    linear-gradient(180deg, transparent 30%, rgba(0,0,0,.30) 30%, rgba(0,0,0,.30) 36%, transparent 36%,
                            transparent 64%, rgba(0,0,0,.30) 64%, rgba(0,0,0,.30) 70%, transparent 70%),
    linear-gradient(90deg,  transparent 32%, rgba(0,0,0,.30) 32%, rgba(0,0,0,.30) 38%, transparent 38%,
                            transparent 62%, rgba(0,0,0,.30) 62%, rgba(0,0,0,.30) 68%, transparent 68%);
}
.pf-coffee-num{
  margin-top: 12px;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
  font-size: clamp(15px, 2.4vw, 19px); font-weight: 600; letter-spacing:.055em;
  color:#fff; text-shadow: 0 1px 2px rgba(0,0,0,.5);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.pf-coffee-foot{
  margin-top: 10px; display:flex; align-items:flex-end; justify-content:space-between; gap:10px;
  font-size: 10.5px; letter-spacing:.13em; text-transform:uppercase; font-weight:700;
  color: rgba(246,233,214,.78); min-width:0;
}
.pf-coffee-foot > span:first-child{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pf-coffee-brand{ color: rgba(245,158,11,.9); flex:0 0 auto; }

/* ---- the pitch ---- */
.pf-coffee-lead{
  font-size: 15.5px; line-height: 1.62; color: var(--text);
  max-width: 52ch; margin: 13px 0 0; opacity: .92;
}
.pf-coffee-lead b{ color: var(--pf-coffee-ink2); font-weight: 800; }

/* ---- the button: the one thing in this block that must be unmissable ----
   Its palette is baked (fixed amber plate, near-black label) so it reads the
   same in both themes; only the panel around it changes. */
.pf-coffee-btn{
  position:relative; overflow:hidden; isolation:isolate;
  display:inline-flex; align-items:center; justify-content:center; gap: 11px;
  padding: 16px 30px; border:0; border-radius: 16px; cursor:pointer;
  font-family:'Hanken Grotesk','Native Emoji',sans-serif;
  font-size: 16.5px; font-weight: 800; letter-spacing: .2px; color: #2a1603;
  background: linear-gradient(135deg, #fde68a 0%, #fbbf24 46%, #f59e0b 100%);
  box-shadow: 0 18px 36px -18px rgba(245,158,11,.95), inset 0 1px 0 rgba(255,255,255,.6);
  transition: transform .28s cubic-bezier(.2,.9,.25,1.4), box-shadow .3s ease,
              filter .2s ease, background .3s ease;
}
.pf-coffee-btn-ico, .pf-coffee-btn-txt{ position:relative; z-index:1; }
.pf-coffee-btn-ico{ font-family:'Native Emoji',sans-serif; font-size: 19px; line-height:1; }
.pf-coffee-btn-sheen{
  position:absolute; inset:0; z-index:0; pointer-events:none;
  background: linear-gradient(105deg, transparent 36%, rgba(255,255,255,.85) 50%, transparent 64%);
  background-size: 250% 100%; background-position: -150% 0;
  transition: background-position .95s cubic-bezier(.3,.7,.25,1);
}
.pf-coffee-btn:hover{ transform: translateY(-3px); filter: brightness(1.04); box-shadow: 0 26px 46px -18px rgba(245,158,11,1), inset 0 1px 0 rgba(255,255,255,.7); }
.pf-coffee-btn:hover .pf-coffee-btn-sheen{ background-position: 250% 0; }
.pf-coffee-btn:active{ transform: translateY(-1px) scale(.985); }
.pf-coffee-btn:focus-visible{ outline: 2px solid var(--cyan); outline-offset: 3px; }
/* copied: the plate turns green and the cup becomes a tick (the emoji is real
   text, so it's collapsed rather than replaced) */
.pf-coffee-btn.is-copied{ background: linear-gradient(135deg, #86efac, #34d399); color: #052e1b; }
.pf-coffee-btn.is-copied .pf-coffee-btn-ico{ font-size: 0; }
.pf-coffee-btn.is-copied .pf-coffee-btn-ico::after{ content: '✓'; font-size: 19px; font-weight: 900; }

.pf-coffee-fine{ margin: 14px 0 0; font-size: 12.5px; line-height:1.6; color: var(--muted); max-width: 52ch; }
.pf-coffee-fine b{ color: var(--text); }

/* Below ~860px the two columns can't both hold their content, so the panel
   becomes one column and the plate slides between the pitch and the button —
   the ask, then what you're paying into, then the tap. */
@media (max-width: 860px){
  .pf-coffee{
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "plate" "act";
    gap: 22px; padding: 28px 24px;
  }
  .pf-coffee-card{ max-width: 340px; width: 100%; margin: 0 auto; }
  .pf-coffee-act{ text-align: center; }
  .pf-coffee-btn{ width: 100%; }
  .pf-coffee-lead, .pf-coffee-fine{ max-width: none; }
  .pf-coffee-fine{ margin-inline: auto; }
  .pf-coffee-aura{ width: 76%; right: -18%; top: -26%; }
}
@media (max-width: 480px){
  .pf-coffee{ padding: 24px 16px; gap: 20px; border-radius: 18px; }
  .pf-coffee-title{ font-size: clamp(27px, 8.6vw, 34px); margin-top: 12px; }
  .pf-coffee-kicker{ font-size: 10.5px; padding: 6px 12px; letter-spacing: .07em; }
  .pf-coffee-lead{ font-size: 14.5px; }
  .pf-coffee-btn{ padding: 15px 18px; font-size: 15.5px; border-radius: 15px; }
  .pf-coffee-card{ padding: 15px; border-radius: 15px; }
}
@media (prefers-reduced-motion: reduce){
  .pf-coffee-aura{ animation: none; }
  .pf-coffee-btn-sheen, .pf-coffee-sheen{ display: none; }
  .pf-coffee-btn, .pf-coffee-card{ transition: none; }
}
