/* JCCA Platform demo: Academy side. Every class is prefixed .pg-  (tokens come from theme.css) */

:root {
  --pg-green-t: #4ADE80; --pg-red-t: #F87171; --pg-amber-t: #FBBF24; --pg-blue-t: #60A5FA;
  --pg-spring: cubic-bezier(.22, 1, .36, 1);
  --pg-ease: cubic-bezier(.32, .72, 0, 1);
}
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) { --pg-green-t: #15803D; --pg-red-t: #B91C1C; --pg-amber-t: #B45309; --pg-blue-t: #1D4ED8; }
}
html[data-theme="light"] { --pg-green-t: #15803D; --pg-red-t: #B91C1C; --pg-amber-t: #B45309; --pg-blue-t: #1D4ED8; }

@keyframes pg-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pg-push { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: none; } }
@keyframes pg-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- layout basics ---------- */
.pg-wrap { display: flex; flex-direction: column; gap: 14px; min-width: 0; max-width: 100%; animation: pg-rise .42s var(--pg-spring) both; }
.pg-wrap *, .pg-sheet *, .pg-compose * { box-sizing: border-box; }
.pg-wrap .card, .pg-sheet .card { min-width: 0; }
.pg-small { font-size: 12.5px; line-height: 1.4; }
.pg-num, .pg-big, .pg-mono { font-variant-numeric: tabular-nums; }
.pg-mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 11.5px; }
.pg-big { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.1; letter-spacing: .02em; text-transform: uppercase; overflow-wrap: anywhere; }
.pg-wrap h2, .pg-wrap h3, .pg-sheet h4, .pg-h4 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .03em; margin: 0; }
.pg-h4 { font-size: 14px; font-weight: 800; margin: 14px 0 6px; color: var(--muted); }
.pg-wrap p { margin: 0; }
.pg-note { padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; }
.pg-two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.pg-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pg-kpis .kpi { min-width: 0; }
.pg-kpis .kpi-value { overflow-wrap: anywhere; }
.pg-kpi-sub { font-size: 12px; margin-top: 4px; line-height: 1.3; }
.pg-flush { padding: 0 !important; overflow: hidden; }
.pg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pg-actions .btn { min-height: 44px; }
.pg-actions .btn svg, .pg-sheet-actions .btn svg, .pg-copy svg, .btn.pg-upload svg { width: 18px; height: 18px; vertical-align: -4px; }
.pg-badges { flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pg-up { color: var(--pg-green-t); }
.pg-dn { color: var(--pg-red-t); }
.pg-ok { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--pg-green-t); }
.pg-bad { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--pg-red-t); }
.pg-late { color: var(--pg-red-t); font-weight: 600; }
.pg-danger { color: var(--pg-red-t) !important; }
.pg-danger-fill { background: var(--red) !important; color: #fff !important; border-color: var(--red) !important; }

/* filters, search, chips */
.pg-filters { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pg-search { width: 100%; min-height: 44px; }
.pg-chips { display: flex; gap: 8px; overflow-x: auto; max-width: 100%; padding-bottom: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pg-chips::-webkit-scrollbar { display: none; }
.pg-chips .chip { flex: none; min-height: 36px; white-space: nowrap; }
.pg-ld { min-width: 0; }

/* list rows we render ourselves */
.pg-li { width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; min-height: 56px; transition: background-color .2s ease; }
.pg-li:hover { background: var(--panel-2); }
.pg-li:active { transform: scale(.995); }
.pg-li-static { min-height: 56px; }
.pg-end { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.li-main { min-width: 0; }
.pg-tile { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 11px; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.pg-tile svg { width: 19px; height: 19px; }
.pg-tile-l { width: 48px; height: 48px; border-radius: 14px; }
.pg-t-red { color: var(--pg-red-t); background: color-mix(in srgb, var(--red) 12%, transparent); border-color: transparent; }
.pg-t-amber { color: var(--pg-amber-t); background: color-mix(in srgb, var(--amber) 14%, transparent); border-color: transparent; }

/* ---------- member detail ---------- */
.pg-detail { display: flex; flex-direction: column; gap: 14px; min-width: 0; animation: pg-rise .48s var(--pg-spring) both; }
.pg-prof { display: flex; gap: 14px; align-items: center; min-width: 0; }
.pg-prof-t { min-width: 0; }
.pg-prof h2 { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1.05; text-transform: uppercase; letter-spacing: .02em; margin: 0; overflow-wrap: anywhere; }
.pg-av-l { width: 60px !important; height: 60px !important; font-size: 20px !important; flex: none; }
.pg-off, .pg-warn { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; }
.pg-off { background: var(--panel-2); border: 1px solid var(--line); }
.pg-off b { display: block; }
.pg-off span { color: var(--muted); }
.pg-warn { background: color-mix(in srgb, var(--amber) 14%, transparent); color: var(--pg-amber-t); }
.pg-off svg, .pg-warn svg { flex: none; width: 20px; height: 20px; }
.pg-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0; }
.pg-dl dt { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.pg-dl dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }

/* 16-week strip */
.pg-strip { --n: 16; min-width: 0; }
.pg-cells, .pg-bands, .pg-dcols, .pg-dnums { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; }
.pg-cell { display: grid; place-items: center; height: 30px; border-radius: 6px; font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 0; }
.pg-cell.pg-att { background: var(--accent); color: var(--on-accent); }
.pg-cell.pg-miss { background: var(--red); color: #fff; }
.pg-cell.pg-book { background: transparent; box-shadow: inset 0 0 0 2px var(--accent); color: var(--text); }
.pg-cell.pg-up { background: var(--panel-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.pg-cell.pg-now { transform: scale(1.08); }
.pg-bands { margin-top: 6px; }
.pg-band { font-size: 10px; line-height: 1.2; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; border-top: 2px solid var(--line); padding-top: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.pg-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pg-legend .pg-cell { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

/* results bars */
.pg-res { display: flex; flex-direction: column; gap: 14px; }
.pg-res-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.pg-res-h b { font-family: var(--font-display); font-size: 20px; font-weight: 800; }
.pg-bar2 { position: relative; height: 26px; border-radius: 7px; background: var(--panel-2); margin-top: 4px; overflow: hidden; }
.pg-bar2 span { position: absolute; inset: 0 auto 0 0; border-radius: 7px; transition: width .78s var(--pg-ease); }
.pg-bar2 .pg-b0 { background: color-mix(in srgb, var(--muted) 35%, transparent); }
.pg-bar2 .pg-b1 { background: var(--accent); }
.pg-bar2 em { position: relative; z-index: 1; display: block; padding: 0 9px; line-height: 26px; font-style: normal; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.pg-bar2 .pg-b1 + em { color: var(--on-accent); }

/* charts */
.pg-chart { display: block; width: 100%; height: auto; max-width: 640px; }
.pg-chart .pg-grid { stroke: var(--line); stroke-width: 1; }
.pg-chart .pg-ax { fill: var(--muted); font-size: 10px; font-family: var(--font); }
.pg-chart .pg-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.pg-chart .pg-area { fill: var(--accent); opacity: .12; }
.pg-chart .pg-dot { fill: var(--panel); stroke: var(--accent); stroke-width: 2; }
.pg-dist { --n: 16; }
.pg-dcols { height: 130px; align-items: end; }
.pg-dcol { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; gap: 3px; }
.pg-dcol small { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pg-dcol span { display: block; width: 100%; max-width: 26px; border-radius: 4px 4px 2px 2px; background: var(--accent); min-height: 3px; transform-origin: bottom; animation: pg-grow .7s var(--pg-spring) both; }
@keyframes pg-grow { from { transform: scaleY(0); } to { transform: none; } }
.pg-dnums { margin-top: 4px; }
.pg-dnums small { text-align: center; font-size: 10px; color: var(--muted); }

/* ring */
.pg-ring { flex: none; }
.pg-ring-bg { fill: none; stroke: var(--line); stroke-width: 10; }
.pg-ring-fg { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 60px 60px; transition: stroke-dashoffset .9s var(--pg-ease); }
.pg-ring-n { fill: var(--text); font-family: var(--font-display); font-weight: 800; font-size: 28px; text-anchor: middle; }
.pg-ring-l { fill: var(--muted); font-size: 10px; letter-spacing: .1em; text-anchor: middle; }

/* ---------- programme settings ---------- */
.pg-ver-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pg-phases { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.pg-ph { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); min-width: 0; }
.pg-ph b { flex: 1; min-width: 0; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .03em; }
.pg-ph-i { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 13px; }
.pg-weeks { display: flex; flex-direction: column; gap: 10px; }
.pg-wk { display: grid; grid-template-columns: 32px minmax(0, 1fr) 44px; gap: 10px; align-items: start; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); min-width: 0; }
.pg-wk-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--panel-2); font-family: var(--font-display); font-weight: 800; font-size: 15px; flex: none; }
.pg-wk-f { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pg-wk-f .input { width: 100%; min-height: 44px; min-width: 0; }
.pg-wk-s { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pg-wk-s label { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.pg-wk-m { display: flex; flex-direction: column; gap: 6px; }
.pg-wk-m .btn { width: 44px; height: 44px; min-height: 44px; padding: 0; display: grid; place-items: center; }
.pg-wk-m .btn svg { width: 18px; height: 18px; }
.pg-wk-m .btn[disabled] { opacity: .3; }

/* ---------- vault ---------- */
.pg-vrow { display: flex; align-items: center; gap: 10px; min-height: 60px; }
.pg-vopen { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; min-height: 44px; }
.pg-pin { display: inline-flex; vertical-align: -2px; color: var(--muted); }
.pg-pin svg { width: 14px; height: 14px; }
.pg-copy { flex: none; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 420px) { .pg-copy span { display: none; } .pg-copy { width: 44px; justify-content: center; padding: 0; } }
.pg-vhead { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.pg-lbl { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.pg-lbl .input { text-transform: none; letter-spacing: 0; font-size: 16px; width: 100%; min-height: 44px; color: var(--text); }
.pg-sheet { display: flex; flex-direction: column; min-width: 0; }
.pg-sheet p { margin: 0 0 8px; }
.pg-sheet-actions { display: flex; gap: 8px; margin-top: 16px; }
.pg-sheet-actions .btn { flex: 1; min-height: 46px; }
.pg-sheet-actions.pg-3 { margin-top: 4px; }

/* ---------- events ---------- */
.pg-evs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.pg-ev { display: flex; gap: 14px; align-items: flex-start; }
.pg-ev h3 { font-size: 18px; font-weight: 800; }
.pg-ev-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pg-ev-date { flex: none; width: 58px; padding: 8px 0; border-radius: 12px; text-align: center; background: #0A0A0A; color: #F5F5F5; display: flex; flex-direction: column; line-height: 1; }
.pg-ev-date b { font-family: var(--font-display); font-weight: 800; font-size: 26px; color: var(--lime); margin: 3px 0; }
.pg-ev-date small { font-size: 10px; letter-spacing: .1em; color: #9A9A9A; }
.pg-ev-c { padding: 10px 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
.pg-evs-c { gap: 0; }
.pg-evs-c .pg-ev-c + .pg-ev-c { border-top: 1px solid var(--line) !important; }

/* ---------- member: banner, home, journey ---------- */
.pg-banner { position: relative; overflow: hidden; border-radius: var(--radius); padding: 22px 18px; color: #F5F5F5; min-height: 120px; display: flex; flex-direction: column; justify-content: flex-end;
  background:
    linear-gradient(100deg, rgba(10, 10, 10, .94) 30%, rgba(10, 10, 10, .55)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .10) 0 3px, transparent 3px 46px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 38px),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 54px),
    linear-gradient(160deg, #4a4a4a, #161616 70%); }
.pg-banner::after { content: ""; position: absolute; right: 16px; top: 16px; width: 52px; height: 52px; border-radius: 13px;
  background:
    linear-gradient(#0A0A0A, #0A0A0A) 12px calc(100% - 11px) / 7px 12px no-repeat,
    linear-gradient(#0A0A0A, #0A0A0A) 23px calc(100% - 11px) / 7px 20px no-repeat,
    linear-gradient(#0A0A0A, #0A0A0A) 34px calc(100% - 11px) / 7px 28px no-repeat,
    var(--lime); }
.pg-banner-t { position: relative; z-index: 1; font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1; text-transform: uppercase; letter-spacing: .03em; color: var(--lime); }
.pg-banner p { position: relative; z-index: 1; margin: 6px 0 0; color: #D4D4D4; font-size: 14px; }
.pg-next .pg-big { font-size: 26px; }
.pg-prog-b { display: flex; gap: 16px; align-items: center; }
.pg-prog-b .btn { margin-top: 10px; min-height: 40px; }
.pg-acts { display: flex; flex-direction: column; gap: 6px; }
.pg-act { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 10px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); color: inherit; font: inherit; cursor: pointer; min-height: 48px; transition: background-color .2s ease; }
.pg-box { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 7px; box-shadow: inset 0 0 0 2px var(--line); color: var(--on-accent); transition: background-color .25s ease, box-shadow .25s ease; }
.pg-box svg { width: 15px; height: 15px; opacity: 0; transform: scale(.5); transition: opacity .2s ease, transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.pg-act.done .pg-box { background: var(--accent); box-shadow: none; }
.pg-act.done .pg-box svg { opacity: 1; transform: none; }
.pg-act.done .pg-act-t b { text-decoration: line-through; color: var(--muted); }
.pg-act-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pg-act-t small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.pg-callbox { padding: 14px; border-radius: 12px; background: var(--panel-2); margin: 10px 0; }
.pg-wkhead { display: flex; gap: 12px; align-items: center; }
.pg-wkhead > div { flex: 1; min-width: 0; }
.pg-wk-n.pg-wk-att { background: var(--accent); color: var(--on-accent); }
.pg-wk-n.pg-wk-book { background: transparent; box-shadow: inset 0 0 0 2px var(--accent); }
.pg-wk-n.pg-wk-miss { background: var(--red); color: #fff; }
.pg-wk-n.pg-wk-up { color: var(--muted); }
.pg-jprog { margin-top: -4px; }
.pg-phase { display: flex; flex-direction: column; gap: 8px; }
.pg-phase-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pg-phase-h h2 { font-size: 20px; font-weight: 800; }

/* files, community */
.pg-lock { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; }
.pg-lock svg { width: 18px; height: 18px; flex: none; }
.pg-upload { min-height: 44px; align-self: flex-start; }
.pg-seg { display: flex; }
.pg-seg button { flex: 1; min-height: 40px; }
.pg-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 14px; padding: 20px; border-radius: 12px; border: 2px dashed var(--line); color: var(--muted); text-align: center; font-size: 13px; }
.pg-wa, .pg-opt { display: flex; flex-direction: column; gap: 12px; }
.pg-wa .btn { min-height: 46px; }
.pg-opt { flex-direction: row; align-items: center; justify-content: space-between; }
.pg-opt > div { min-width: 0; }
.pg-switch { position: relative; flex: none; width: 51px; height: 31px; border-radius: 999px; border: 0; background: var(--line); cursor: pointer; transition: background-color .25s ease; padding: 0; }
.pg-switch span { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .25); transition: transform .35s var(--pg-spring); }
.pg-switch.on { background: var(--accent); }
.pg-switch.on span { transform: translateX(20px); }
html[data-theme="light"] .pg-switch.on span { background: var(--lime); }

/* tools */
.pg-tabs { max-width: 480px; }
.pg-pipe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pg-pipe-s { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 10px; background: var(--panel-2); min-width: 0; }
.pg-pipe-s b { font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.pg-pipe-s small { color: var(--muted); font-size: 11.5px; line-height: 1.25; }
.pg-pipe-o { grid-column: 1 / -1; }
.pg-q .li-main { gap: 2px; }
.pg-qx { display: block; margin-top: 4px; font-size: 12px; line-height: 1.4; color: var(--muted); white-space: normal; }
.pg-qx b { color: var(--text); font-weight: 600; }
.pg-calc-in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.pg-calc-in .pg-lbl { margin-top: 10px; min-width: 0; }
.pg-calc-out { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 16px 0 10px; }
.pg-calc-r { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); }
.pg-calc-r b { font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.pg-calc-r small { width: 100%; color: var(--muted); font-size: 12px; margin-top: -4px; }
.pg-calc-hi { background: var(--accent); color: var(--on-accent); }
.pg-calc-hi .kpi-label, .pg-calc-hi small { color: var(--on-accent); opacity: .8; }
.pg-calc-gap { padding: 10px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600; margin-top: 10px; }

/* stage track (quote) */
.pg-trk { position: relative; margin: 16px 0 6px; }
.pg-trk-line { position: absolute; left: 7%; right: 7%; top: 11px; height: 3px; border-radius: 2px; background: var(--line); }
.pg-trk-line span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; transition: transform .78s var(--pg-ease); }
.pg-trk-n { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.pg-nd { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); text-align: center; min-width: 0; }
.pg-nd i { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: var(--panel); box-shadow: inset 0 0 0 2px var(--line); color: var(--on-accent); transition: background-color .35s ease, box-shadow .35s ease; }
.pg-nd i svg { width: 12px; height: 12px; opacity: 0; transform: scale(.5); transition: opacity .25s ease, transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.pg-nd small { font-size: 10px; line-height: 1.15; font-weight: 600; overflow-wrap: anywhere; }
.pg-nd.done i { background: var(--accent); box-shadow: none; }
.pg-nd.done i svg { opacity: 1; transform: none; }
.pg-nd.now i { box-shadow: inset 0 0 0 6px var(--accent), 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.pg-nd.done, .pg-nd.now { color: var(--text); }
.pg-qhead { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.pg-qhead > div { min-width: 0; }
.pg-qv { font-family: var(--font-display); font-size: 22px; font-weight: 800; flex: none; }
.pg-qbox { display: grid; gap: 8px; margin-top: 12px; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--amber) 12%, transparent); }
.pg-qbox p { margin: 2px 0 0; font-weight: 600; }

/* ---------- inbox ---------- */
.pg-inbox { gap: 0; }
.pg-ib-desk { display: grid; grid-template-columns: 210px 340px minmax(0, 1fr); height: calc(100dvh - 120px); min-height: 520px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.pg-ib-folders { display: flex; flex-direction: column; gap: 10px; padding: 14px 10px; background: var(--panel-2); border-right: 1px solid var(--line); min-height: 0; }
.pg-ib-compose { width: 100%; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.pg-ib-compose svg, .pg-ib-mhead .btn svg { width: 17px; height: 17px; }
.pg-ib-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; min-height: 0; }
.pg-ib-lh { margin: 14px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pg-fold { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; transition: background-color .2s ease; }
.pg-fold svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.pg-fold span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-fold b { font-weight: 600; color: var(--muted); }
.pg-fold:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.pg-fold.on { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.pg-fold.on svg, .pg-fold.on b { color: var(--on-accent); }
.pg-lsq { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--line); }
.pg-lb-lime { background: var(--lime); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.pg-lb-amber { background: var(--amber); }
.pg-lb-blue { background: var(--blue); }
.pg-ib-me { display: flex; align-items: center; gap: 10px; padding: 10px 6px 0; border-top: 1px solid var(--line); min-width: 0; }
.pg-ib-me > div { min-width: 0; display: flex; flex-direction: column; }
.pg-ib-me b, .pg-ib-me small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.pg-av36 { width: 36px !important; height: 36px !important; flex: none; font-size: 13px !important; }
.pg-ib-list { display: flex; flex-direction: column; gap: 10px; min-height: 0; min-width: 0; padding: 14px 12px 0; border-right: 1px solid var(--line); }
.pg-ib-lhead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 4px; }
.pg-ib-lhead h2 { font-size: 22px; font-weight: 800; }
.pg-ib-rows { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; flex: 1; padding-bottom: 12px; }
.pg-row { display: flex; gap: 11px; align-items: flex-start; width: 100%; padding: 11px 10px; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background-color .2s ease, opacity .3s ease, transform .3s ease; }
.pg-row:hover { background: var(--panel-2); }
.pg-row.on { background: var(--panel-2); box-shadow: inset 0 0 0 1.5px var(--accent); }
.pg-row.gone { opacity: 0; transform: translateX(56px); pointer-events: none; }
.pg-row-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pg-row-t { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.pg-row-t b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pg-row-t small { flex: none; color: var(--muted); }
.pg-row-s { display: flex; align-items: center; gap: 6px; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pg-row-p { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pg-row.unread .pg-row-t b, .pg-row.unread .pg-row-s { font-weight: 700; }
.pg-udot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.pg-row-tags { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 11px; color: var(--muted); }
.pg-row-tags:empty { display: none; }
.pg-row-tags svg { width: 13px; height: 13px; }
.pg-star-s { color: var(--amber); display: inline-flex; }
.pg-star-s svg { fill: currentColor; }
.pg-clip { display: inline-flex; }
.pg-ib-read { min-width: 0; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.pg-read-in { display: flex; flex-direction: column; min-height: 100%; animation: pg-rise .48s var(--pg-spring) both; }
.pg-tb { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel); }
.pg-ic { width: 44px; height: 44px; min-height: 44px; padding: 0 !important; display: inline-grid !important; place-items: center; flex: none; }
.pg-ic svg { width: 19px; height: 19px; }
.pg-sp { flex: 1; }
.pg-starb.on { color: var(--amber); }
.pg-starb.on svg { fill: currentColor; }
.pg-msg { padding: 18px 20px 8px; display: flex; flex-direction: column; gap: 12px; flex: 1; min-width: 0; }
.pg-msg-h { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1.1; text-transform: uppercase; letter-spacing: .02em; overflow-wrap: anywhere; }
.pg-lchip { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: var(--panel-2); font-size: 12px; font-weight: 600; }
.pg-ctx { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pg-ctx .btn { min-height: 36px; }
.pg-earlier { align-self: flex-start; border: 1px dashed var(--line); background: none; color: var(--muted); font: inherit; font-size: 12.5px; padding: 8px 12px; border-radius: 999px; cursor: pointer; min-height: 36px; }
.pg-earlier-l { display: flex; flex-direction: column; gap: 8px; }
.pg-thr { padding: 10px 12px; border-radius: 12px; background: var(--panel-2); font-size: 13.5px; }
.pg-thr p { margin: 4px 0 0; }
.pg-thr-me { border-left: 3px solid var(--accent); }
.pg-meta { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pg-meta > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pg-meta small.pg-mono { flex: none; text-align: right; }
.pg-body { font-size: 15px; line-height: 1.55; }
.pg-body p { margin: 0 0 10px; }
.pg-attach { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; max-width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: inherit; font: inherit; font-size: 13px; cursor: pointer; min-height: 40px; }
.pg-attach svg { width: 16px; height: 16px; flex: none; }
.pg-attach span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-qr { display: flex; gap: 8px; overflow-x: auto; padding: 8px 20px; scrollbar-width: none; }
.pg-qr::-webkit-scrollbar { display: none; }
.pg-qr .chip { flex: none; white-space: nowrap; min-height: 36px; }
.pg-rbar { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 10px 20px 14px; background: var(--panel); border-top: 1px solid var(--line); margin: 0; }
.pg-rbar .input { flex: 1; min-width: 0; min-height: 44px; font-size: 16px; border-radius: 999px; }
.pg-rbar .btn { border-radius: 50%; }
.pg-ib-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; flex: 1; color: var(--muted); }
.pg-ib-empty svg { width: 32px; height: 32px; }
.pg-lab-l { display: flex; flex-direction: column; gap: 4px; }
.pg-lab-l .pg-fold { min-height: 48px; }

/* inbox mobile */
.pg-ib-mob { gap: 12px; }
.pg-ib-mhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pg-ib-mhead .page-head { min-width: 0; }
.pg-ib-mhead .btn { flex: none; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.pg-ib-fchips .pg-fold { width: auto; flex: none; min-height: 38px; border-radius: 999px; border: 1px solid var(--line); padding: 0 12px; }
.pg-ib-fchips .pg-fold span { overflow: visible; }
.pg-ib-mob .pg-ib-list { padding: 0; border: 0; }
.pg-ib-mob .pg-ib-rows { overflow: visible; padding: 0; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.pg-ib-mob .pg-row { border-radius: 0; min-height: 64px; }
.pg-ib-mob .pg-row + .pg-row { border-top: 1px solid var(--line); }
.pg-ib-reading .pg-ib-read { overflow: visible; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.pg-ib-reading .pg-tb { top: 0; border-radius: var(--radius) var(--radius) 0 0; overflow-x: auto; }
.pg-ib-reading .pg-msg { padding: 16px; }
.pg-ib-reading .pg-qr { padding: 8px 16px; }
.pg-ib-reading .pg-rbar { padding: 10px 16px 12px; border-radius: 0 0 var(--radius) var(--radius); }
.pg-ib-reading .pg-msg-h { font-size: 22px; }
.pg-ib-reading .pg-meta { flex-wrap: wrap; }
.pg-push-in { animation: pg-push .42s var(--pg-spring) both; }

/* compose floating card (desktop) */
.pg-compose { position: fixed; right: 24px; bottom: 24px; z-index: 8000; width: 420px; max-width: calc(100vw - 32px); padding: 0 16px 16px; border-radius: 16px; background: var(--panel); color: var(--text); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0, 0, 0, .35); animation: pg-up .42s var(--pg-spring) both; font-family: var(--font); }
.pg-cmp-h { display: flex; justify-content: space-between; align-items: center; margin: 0 -16px; padding: 4px 8px 4px 16px; border-bottom: 1px solid var(--line); font-family: var(--font-display); text-transform: uppercase; letter-spacing: .03em; }
.pg-ta { resize: vertical; min-height: 110px; font: inherit; }
.pg-cmp-hint { margin: 8px 0 0; }

/* undo toast */
.pg-undo { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 92px); z-index: 9000; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); padding: 8px 8px 8px 16px; border-radius: 14px; background: #1C1C1C; color: #F5F5F5; border: 1px solid #333; box-shadow: 0 12px 30px rgba(0, 0, 0, .35); font-size: 14px; animation: pg-up .4s var(--pg-spring) both; transition: opacity .35s ease; }
.pg-undo button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--lime); color: #0A0A0A; font: inherit; font-weight: 700; cursor: pointer; }
.pg-undo-out { opacity: 0; }

/* ---------- fallbacks (only used when the shell helpers are missing) ---------- */
.pg-fb-toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 14px); transform: translateX(-50%); z-index: 9999; padding: 10px 16px; border-radius: 12px; background: #1C1C1C; color: #F5F5F5; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); animation: pg-rise .3s var(--pg-spring) both; }
.pg-fb-sheet { position: fixed; inset: 0; z-index: 9500; display: flex; align-items: flex-end; justify-content: center; }
.pg-fb-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.pg-fb-panel { position: relative; width: 100%; max-width: 560px; max-height: 88dvh; overflow-y: auto; padding: 0 16px calc(env(safe-area-inset-bottom, 0px) + 16px); border-radius: 20px 20px 0 0; background: var(--panel, #141414); color: var(--text, #F5F5F5); animation: pg-up .4s var(--pg-spring) both; }
.pg-fb-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 12px 0; background: inherit; font-family: var(--font-display); text-transform: uppercase; }
.pg-fb-ld { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.pg-fb-list .li { width: 100%; text-align: left; font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
.pg-fb-list .li.on { background: var(--panel-2); box-shadow: inset 0 0 0 1.5px var(--accent); }
.pg-fb-push { animation: pg-push .42s var(--pg-spring) both; }
.pg-back { min-height: 44px; margin-bottom: 8px; }

/* ---------- desktop ---------- */
@media (min-width: 1024px) {
  .pg-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pg-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-filters { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .pg-filters .pg-search { max-width: 340px; }
  .pg-phases { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pg-wk { grid-template-columns: 32px minmax(0, 1.4fr) 96px; align-items: center; }
  .pg-wk-f { flex-direction: row; align-items: end; }
  .pg-wk-f > .input { flex: 1.2; }
  .pg-wk-s { flex: 1; }
  .pg-wk-m { flex-direction: row; }
  .pg-evs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-evs-c { grid-template-columns: minmax(0, 1fr); }
  .pg-pipe { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .pg-pipe-o { grid-column: auto; }
  .pg-calc-in { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .pg-calc-out { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pg-fb-ld { grid-template-columns: 340px minmax(0, 1fr); }
  .pg-fb-sheet { align-items: center; }
  .pg-fb-panel { border-radius: 20px; }
  .pg-undo { bottom: 28px; }
  .pg-banner { padding: 28px 26px; min-height: 150px; }
  .pg-banner-t { font-size: 44px; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .pg-ib-desk { grid-template-columns: 180px 290px minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .pg-wrap, .pg-wrap *, .pg-sheet *, .pg-compose, .pg-undo, .pg-fb-panel, .pg-fb-push {
    animation-duration: .01ms !important; transition-duration: .01ms !important;
  }
}

/* =================== Gaffer (AI) badge, tile, tag =================== */
:root { --pg-r1: #C4FF0E; --pg-r2: #22C55E; --pg-r3: #86EFAC; }
@media (prefers-color-scheme: light) { html:not([data-theme="dark"]) { --pg-r1: #9BD000; --pg-r2: #16A34A; --pg-r3: #4ADE80; } }
html[data-theme="light"] { --pg-r1: #9BD000; --pg-r2: #16A34A; --pg-r3: #4ADE80; }
.pg-ai { display: inline-flex; align-items: center; height: 17px; padding: 0 6px; margin-left: 5px; border-radius: 999px; background: #0A0A0A; color: #C4FF0E; font: 700 10px/1 var(--font); letter-spacing: .06em; vertical-align: middle; box-shadow: inset 0 0 0 1px rgba(196, 255, 14, .35); text-transform: uppercase; }
html[data-theme="dark"] .pg-ai { background: #C4FF0E; color: #0A0A0A; box-shadow: none; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .pg-ai { background: #C4FF0E; color: #0A0A0A; box-shadow: none; } }
.pg-gf { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 7px; background: #C4FF0E; color: #0A0A0A; }
.pg-gf svg { width: 15px; height: 15px; }
.pg-by { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0 !important; font-size: 11.5px; color: var(--muted); }
.pg-by svg { width: 13px; height: 13px; }
.pg-link { border: 0; background: none; padding: 0; font: inherit; color: var(--text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pg-rise { animation: pg-rise .48s var(--pg-spring) both; }
.pg-caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: currentColor; animation: pg-blink 1s steps(1) infinite; }
@keyframes pg-blink { 50% { opacity: 0; } }

/* gliding segmented highlight */
.pg-gseg { position: relative; isolation: isolate; }
.pg-gseg .pg-glide { position: absolute; z-index: -1; top: 3px; bottom: 3px; left: 0; width: 0; border-radius: 9px; background: var(--accent); transition: transform .48s var(--pg-spring), width .48s var(--pg-spring); }
.pg-gseg button { position: relative; background: none !important; box-shadow: none !important; }
.pg-gseg button.on { color: var(--on-accent) !important; }

/* =================== assistant editor =================== */
.pg-as { display: flex; flex-direction: column; gap: 6px; min-width: 0; text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--text); }
.pg-as-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pg-as-brand { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; }
.pg-as-tones { position: relative; display: inline-flex; padding: 3px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--line); isolation: isolate; }
.pg-as-tones button { position: relative; z-index: 1; min-height: 30px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: color .25s ease; }
.pg-as-tones button.on { color: var(--on-accent); }
.pg-as-glide { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0; width: 0; border-radius: 8px; background: var(--accent); transition: transform .48s var(--pg-spring), width .48s var(--pg-spring); }
.pg-as-box { min-height: 46px; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); cursor: text; line-height: 1.5; overflow-wrap: anywhere; transition: border-color .2s ease, box-shadow .2s ease; }
.pg-as-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.pg-as-multi { min-height: 120px; }
.pg-as-text { outline: none; white-space: pre-wrap; caret-color: var(--text); }
.pg-as-text:empty::before { content: attr(data-ph); color: var(--muted); pointer-events: none; }
.pg-as-ghost { white-space: pre-wrap; color: var(--muted); opacity: .8; pointer-events: none; }
.pg-gw { display: inline-block; white-space: pre-wrap; animation: pg-gw .32s var(--pg-spring) both; }
@keyframes pg-gw { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.pg-as-flash { color: inherit; border-radius: 4px; animation: pg-flash-m 1.6s ease-out both; }
@keyframes pg-flash-m { 0% { background: #C4FF0E; color: #0A0A0A; } 100% { background: transparent; color: var(--text); } }
.pg-as-stats { display: flex; gap: 6px; color: var(--muted); font-size: 11px; }
.pg-as-compact .pg-as-stats { justify-content: flex-end; }
.pg-as-tip { margin-top: 8px !important; }
.pg-as-pill { position: fixed; z-index: 145; display: flex; align-items: center; gap: 4px; padding: 5px 5px 5px 12px; border-radius: 999px; background: #141414; color: #F5F5F5; border: 1px solid #2A2A2A; box-shadow: 0 12px 30px rgba(0, 0, 0, .35); font-size: 12.5px; font-family: var(--font); animation: pg-up .32s var(--pg-spring) both; white-space: nowrap; }
.pg-as-pill-i { display: inline-flex; align-items: center; gap: 4px; margin-right: 4px; color: #D4D4D4; }
.pg-as-pill-i svg { width: 14px; height: 14px; color: #C4FF0E; }
.pg-as-pill-i .pg-ai { background: #C4FF0E; color: #0A0A0A; box-shadow: none; }
.pg-as-pill button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: #F5F5F5; font: inherit; font-weight: 600; cursor: pointer; }
.pg-as-pill button[data-a="acc"] { background: #C4FF0E; color: #0A0A0A; }
.pg-as-pill kbd { padding: 1px 5px; border-radius: 5px; background: rgba(255, 255, 255, .12); font: 600 10.5px/1.4 ui-monospace, Menlo, monospace; }
.pg-as-pill button[data-a="acc"] kbd { background: rgba(0, 0, 0, .12); }
.pg-as-pill-m { left: 50% !important; transform: translateX(-50%); bottom: calc(var(--tabs-h, 58px) + var(--sab, env(safe-area-inset-bottom, 0px)) + 12px); padding: 6px 6px 6px 14px; animation: none; max-width: calc(100vw - 24px); }
.pg-as-pill-m kbd { display: none; }
.pg-as-pill-m button { min-height: 44px; padding: 0 16px; font-size: 14px; }
.pg-as-pill-m button[data-a="acc"] { min-width: 96px; justify-content: center; }
.pg-rbar { align-items: flex-end; }
.pg-rbar-as { flex: 1; min-width: 0; }
.pg-rbar-as .pg-as-box { border-radius: 18px; min-height: 44px; padding: 10px 14px; }
.pg-rbar-as .pg-as-tones button { min-height: 28px; padding: 0 8px; font-size: 12px; }
.pg-cmp-as .pg-as-multi { min-height: 110px; }
.pg-sums { display: flex; flex-direction: column; gap: 8px; }

/* equaliser */
.pg-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.pg-eq i { display: block; width: 3px; height: 100%; border-radius: 2px; background: var(--accent); transform-origin: bottom; animation: pg-eq .9s ease-in-out infinite; }
.pg-eq i:nth-child(2) { animation-delay: -.2s; }
.pg-eq i:nth-child(3) { animation-delay: -.45s; }
.pg-eq i:nth-child(4) { animation-delay: -.1s; }
.pg-eq i:nth-child(5) { animation-delay: -.6s; }
@keyframes pg-eq { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }

/* =================== Live Call Notes =================== */
.pg-cn-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pg-cn-mark { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: #0A0A0A; color: #C4FF0E; }
.pg-cn-mark svg { width: 20px; height: 20px; }
.pg-cn-tt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pg-cn-tt b { font-family: var(--font-display); font-weight: 800; font-size: 18px; text-transform: uppercase; letter-spacing: .02em; line-height: 1.15; overflow-wrap: anywhere; }
.pg-cn-tt small { display: inline-flex; align-items: center; flex-wrap: wrap; font-size: 12px; }
.pg-rec { display: none; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 999px; background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--pg-red-t); font-weight: 700; font-size: 12.5px; }
.pg-rec i, .pg-cn-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pg-pulse 1.4s ease-in-out infinite; }
@keyframes pg-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 55%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }
.pg-cn-pause { min-height: 40px; }
.pg-cn-chip { position: sticky; top: calc(var(--tb-h, 52px) + var(--sat, 0px) + 6px); z-index: 5; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 999px; background: #141414; color: #F5F5F5; font-size: 12.5px; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.pg-cn-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.pg-cn-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pg-cn-people { display: flex; flex-wrap: wrap; gap: 8px; }
.pg-person { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 4px; border-radius: 999px; background: var(--panel-2); font-size: 13px; font-weight: 600; transition: box-shadow .3s ease; }
.pg-person.on { box-shadow: 0 0 0 2px var(--accent); }
.pg-av28 { width: 28px !important; height: 28px !important; font-size: 11px !important; flex: none; }
.pg-av20 { width: 20px !important; height: 20px !important; font-size: 9px !important; flex: none; }
.pg-cn-tx { display: flex; flex-direction: column; gap: 12px; min-height: 160px; }
.pg-tl { display: flex; gap: 10px; animation: pg-rise .42s var(--pg-spring) both; }
.pg-tl > div { flex: 1; min-width: 0; }
.pg-tl-h { display: flex; gap: 8px; align-items: baseline; }
.pg-tl p { margin: 2px 0 0; line-height: 1.5; }
.pg-cn-foot { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.pg-cn-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pg-cn-sum { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.45; }
.pg-cn-wait { list-style: none; margin-left: -18px; }
.pg-act-new { animation: pg-slide .5s var(--pg-spring) both, pg-hl 1.4s ease-out both; }
@keyframes pg-slide { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes pg-hl { 0% { box-shadow: 0 0 0 2px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.pg-act-meta { gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.pg-due { padding: 2px 8px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 11px; font-weight: 600; color: var(--text); }
.pg-cn-fields { display: flex; flex-direction: column; gap: 8px; }
.pg-fld { display: grid; grid-template-columns: minmax(0, 1fr) 24px; gap: 2px 10px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); }
.pg-fld-k { grid-column: 1; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pg-fld-v { grid-column: 1; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.pg-fld-t { grid-column: 2; grid-row: 1 / 3; align-self: center; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line); color: var(--on-accent); }
.pg-fld-t svg { width: 13px; height: 13px; opacity: 0; transform: scale(.4); transition: opacity .2s ease, transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.pg-fld.found .pg-fld-t { background: var(--accent); box-shadow: none; }
.pg-fld.found .pg-fld-t svg { opacity: 1; transform: none; }
.pg-fld.found { animation: pg-hl 1.4s ease-out both; }
.pg-cn-end .btn { width: 100%; min-height: 48px; }
.pg-cn-paused .pg-eq i, .pg-cn-ended .pg-eq i { animation-play-state: paused; background: var(--muted); }
.pg-cn-paused .pg-rec, .pg-cn-ended .pg-rec { background: var(--panel-2); color: var(--muted); }
.pg-cn-paused .pg-rec i, .pg-cn-paused .pg-cn-chip i, .pg-cn-ended .pg-rec i, .pg-cn-ended .pg-cn-chip i { background: var(--muted); animation: none; }

/* =================== Ask Your Numbers =================== */
.pg-ask-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.pg-ask-chat { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding-bottom: 0 !important; overflow: hidden; }
.pg-ask-h { display: flex; align-items: center; gap: 10px; }
.pg-ask-h .pg-gf { width: 36px; height: 36px; border-radius: 11px; }
.pg-ask-h .pg-gf svg { width: 20px; height: 20px; }
.pg-ask-h > div { display: flex; flex-direction: column; min-width: 0; }
.pg-ask-h small { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.pg-live { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.pg-ask-log { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; min-height: 80px; }
.pg-bub { max-width: 92%; padding: 10px 13px; border-radius: 16px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.pg-bub-me { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 5px; }
.pg-bub-ai { align-self: flex-start; background: var(--panel-2); border-bottom-left-radius: 5px; }
.pg-bub-by { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.pg-bub-by .pg-gf { width: 20px; height: 20px; border-radius: 6px; }
.pg-bub-by .pg-gf svg { width: 12px; height: 12px; }
.pg-steps { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.pg-steps li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; opacity: .55; }
.pg-steps li.run, .pg-steps li.ok { opacity: 1; color: var(--text); }
.pg-st-i { display: grid; place-items: center; width: 20px; height: 20px; flex: none; }
.pg-st-i > svg { display: none; width: 14px; height: 14px; color: #fff; }
.pg-st-i .pg-eq { display: none; height: 12px; }
.pg-steps li.run .pg-eq { display: inline-flex; }
.pg-steps li.ok .pg-st-i { border-radius: 50%; background: var(--green); }
.pg-steps li.ok .pg-st-i > svg { display: block; animation: pg-pop .4s cubic-bezier(.34, 1.56, .64, 1) both; }
.pg-steps li.ok .pg-eq { display: none; }
@keyframes pg-pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.pg-ans { margin: 0; }
.pg-ask-sug { padding: 0 !important; }
.pg-ask-form { position: static; margin: 0 -16px; padding: 10px 16px 14px; }
.pg-ask-res { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pg-sqlc { border-radius: var(--radius); background: #0E0E0E; color: #E5E5E5; border: 1px solid #262626; overflow: hidden; }
.pg-sqlc-h { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-bottom: 1px solid #262626; font-size: 11px; font-weight: 700; letter-spacing: .1em; color: #9A9A9A; }
.pg-sqlc-h small { flex: 1; min-width: 0; letter-spacing: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-sql-copy { background: #1C1C1C !important; color: #F5F5F5 !important; border-color: #333 !important; min-height: 32px; }
.pg-sql { margin: 0; padding: 12px 14px; font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 120px; }
.pg-sq-k { color: #C4FF0E; font-weight: 600; }
.pg-sq-s { color: #4ADE80; }
.pg-sq-n { color: #FBBF24; }
.pg-ask-out .card-h { flex-wrap: wrap; gap: 8px; }
.pg-ask-seg { display: inline-flex; padding: 3px; }
.pg-ask-seg button { min-height: 32px; padding: 0 14px; }
.pg-bars { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 10px; height: 200px; align-items: end; margin-top: 6px; }
.pg-barc { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; gap: 5px; }
.pg-barc em { font-style: normal; font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.2; overflow-wrap: anywhere; }
.pg-barc small { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pg-bar-g { display: block; width: 100%; max-width: 56px; height: 0; min-height: 2px; border-radius: 8px 8px 3px 3px; background: color-mix(in srgb, var(--text) 22%, transparent); transition: height .9s var(--pg-spring); }
.pg-bar-g.top { background: var(--accent); }
.pg-vl { animation: pg-rise .5s var(--pg-spring) both; }
.pg-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: pg-drawin 1.2s var(--pg-ease) .1s forwards; }
@keyframes pg-drawin { to { stroke-dashoffset: 0; } }
.pg-dot-in { opacity: 0; animation: pg-fade .3s ease forwards; }
@keyframes pg-fade { to { opacity: 1; } }
.pg-ask-table { width: 100%; }

/* =================== My Numbers (spreadsheet) =================== */
.pg-ss { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pg-ss-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pg-ss-crumb { font-size: 14px; min-width: 0; }
.pg-ss-tools { display: inline-flex; gap: 2px; margin-left: auto; }
.pg-ss-tools .btn { min-width: 36px; min-height: 34px; }
.pg-ss-av { display: inline-flex; }
.pg-ss-av .avatar + .avatar { margin-left: -8px; box-shadow: 0 0 0 2px var(--panel); }
.pg-ss-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.pg-ss-card { min-width: 0; display: flex; flex-direction: column; }
.pg-fbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); min-width: 0; }
.pg-namebox { flex: none; min-width: 44px; padding: 4px 8px; border-radius: 7px; background: var(--panel-2); text-align: center; font-weight: 700; }
.pg-fx { display: inline-flex; color: var(--muted); }
.pg-fx svg { width: 16px; height: 16px; }
.pg-fval { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.pg-ss-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.pg-grid-ss { display: grid; grid-template-columns: 34px 140px repeat(4, minmax(100px, 1fr)); min-width: 580px; font-size: 13px; }
.pg-gh, .pg-gc { display: flex; align-items: center; min-height: 38px; padding: 0 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.pg-gh { justify-content: center; padding: 0; background: var(--panel-2); color: var(--muted); font-size: 11px; font-weight: 700; transition: background-color .2s ease, color .2s ease; }
.pg-gh.on { background: color-mix(in srgb, var(--accent) 22%, var(--panel-2)); color: var(--text); }
.pg-gc { position: relative; justify-content: flex-end; font-variant-numeric: tabular-nums; }
.pg-gc-h { justify-content: flex-end; font-weight: 700; color: var(--muted); background: var(--panel); }
.pg-gc-l { justify-content: flex-start; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-gc-b, .pg-gc-c { font-weight: 800; }
.pg-gc-c { background: color-mix(in srgb, var(--text) 3%, transparent); }
.pg-gc.sel { box-shadow: inset 0 0 0 2px var(--accent); z-index: 1; }
.pg-gc.sel::after { content: ""; position: absolute; right: -4px; bottom: -4px; width: 7px; height: 7px; background: var(--accent); border: 1.5px solid var(--panel); border-radius: 1px; }
.pg-gin { width: 100%; min-width: 0; height: 36px; border: 0; outline: 0; background: none; color: var(--text); text-align: right; font-size: 16px; padding: 0; }
@media (min-width: 1024px) { .pg-gin { font-size: 13px; } }
.pg-flash { animation: pg-cellflash .7s ease-out; }
@keyframes pg-cellflash { 0% { background: color-mix(in srgb, #C4FF0E 55%, transparent); } 100% { background: color-mix(in srgb, var(--text) 3%, transparent); } }
.pg-ss-tabs { display: flex; gap: 2px; padding: 6px 8px; border-top: 1px solid var(--line); background: var(--panel-2); overflow-x: auto; }
.pg-ss-tabs button { flex: none; min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.pg-ss-tabs button.on { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.pg-ss-fc { padding: 14px; }
.pg-ss-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pg-ss-big { font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1; }
.pg-pill-d { align-self: flex-start; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pg-ss-chart { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; height: 170px; align-items: end; margin: 10px 0 4px; }
.pg-ss-bc { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.pg-ss-bc span { display: block; width: 100%; max-width: 40px; min-height: 3px; border-radius: 6px 6px 2px 2px; background: color-mix(in srgb, var(--text) 22%, transparent); transition: height .8s var(--pg-spring), background-color .25s ease; }
.pg-ss-bc small { font-size: 10px; color: var(--muted); }
.pg-ss-bc em { font-style: normal; font-size: 10.5px; color: var(--muted); text-align: center; line-height: 1.15; overflow-wrap: anywhere; }
.pg-ss-bc.hl span { background: #C4FF0E; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); }
.pg-ss-bc.hl em { color: var(--text); font-weight: 700; }
.pg-ss-stats { margin-top: 6px; }
.pg-ss-ro { width: 100%; min-width: 420px; font-size: 13px; }
.pg-ss-ro td, .pg-ss-ro th { text-align: right; white-space: nowrap; }
.pg-ss-ro td:first-child, .pg-ss-ro th:first-child { text-align: left; }

/* =================== Home: activity rings =================== */
.pg-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pg-phase-l { padding: 0 4px; }
.pg-wstrip { position: relative; display: flex; gap: 4px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; isolation: isolate; }
.pg-wstrip::-webkit-scrollbar { display: none; }
.pg-wpill { position: absolute; z-index: -1; top: 4px; left: 0; width: 0; height: 52px; border-radius: 14px; background: #C4FF0E; transition: transform .5s var(--pg-spring), width .5s var(--pg-spring); }
.pg-wd { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 44px; height: 52px; border: 0; border-radius: 14px; background: none; color: var(--muted); font: inherit; cursor: pointer; transition: color .25s ease; }
.pg-wd small { font-size: 9.5px; letter-spacing: .08em; }
.pg-wd b { font-family: var(--font-display); font-size: 18px; font-weight: 800; line-height: 1; color: var(--text); }
.pg-wd i { position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.pg-wd.done i { background: var(--pg-r2); }
.pg-wd.now { box-shadow: inset 0 0 0 1.5px var(--line); }
.pg-wd.on, .pg-wd.on b { color: #0A0A0A; }
.pg-wd.on.done i { background: #0A0A0A; }
.pg-rings-b { display: flex; align-items: center; gap: 18px; margin: 6px 0 4px; }
.pg-rsvg { flex: none; transform: rotate(-90deg); }
.pg-rt, .pg-rf { fill: none; stroke-width: 11; stroke-linecap: round; }
.pg-rt { opacity: .16; }
.pg-rf { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s var(--pg-ease); }
.pg-rt.pg-r1, .pg-rf.pg-r1 { stroke: var(--pg-r1); }
.pg-rt.pg-r2, .pg-rf.pg-r2 { stroke: var(--pg-r2); }
.pg-rt.pg-r3, .pg-rf.pg-r3 { stroke: var(--pg-r3); }
.pg-rleg { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; flex: 1; }
.pg-rleg li { display: flex; align-items: baseline; gap: 8px; font-size: 13px; min-width: 0; }
.pg-rleg li > i { flex: none; width: 10px; height: 10px; border-radius: 3px; align-self: center; }
.pg-rleg i.pg-r1 { background: var(--pg-r1); }
.pg-rleg i.pg-r2 { background: var(--pg-r2); }
.pg-rleg i.pg-r3 { background: var(--pg-r3); }
.pg-rleg span { flex: 1; min-width: 0; color: var(--muted); }
.pg-rleg b { font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.pg-rleg small { color: var(--muted); font-size: 12px; }
.pg-wk-title { margin-top: 12px; }
.pg-wlist { display: flex; flex-direction: column; gap: 6px; }
.pg-wi { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; background: var(--panel-2); min-width: 0; }
.pg-wi .li-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pg-wi .li-main b { font-size: 13.5px; overflow-wrap: anywhere; }
.pg-wi .li-main small { font-size: 12px; }
.pg-wi-i { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; }
.pg-wi-i svg { width: 16px; height: 16px; }

@media (min-width: 1024px) {
  .pg-rec { display: inline-flex; }
  .pg-cn-chip { display: none; }
  .pg-cn-grid { grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); align-items: start; }
  .pg-cn-tx { max-height: 52vh; overflow-y: auto; }
  .pg-ask-grid { grid-template-columns: 380px minmax(0, 1fr); align-items: start; }
  .pg-ask-log { max-height: 46vh; }
  .pg-ss-main { grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); align-items: start; }
}
@media (max-width: 1023px) {
  .pg-ss-tools, .pg-ss-av { display: none !important; }
  .pg-wrap { padding-bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .pg-as *, .pg-as-pill, .pg-eq i, .pg-rec i, .pg-cn-chip i, .pg-draw, .pg-dot-in, .pg-wpill, .pg-rf, .pg-caret { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .pg-draw { stroke-dashoffset: 0; }
}
.pg-pin-s { display: inline-flex; color: var(--text); }
.pg-pin-s svg { width: 13px; height: 13px; }

/* =================== long-press context menu =================== */
.pg-vrow, .pg-li[data-act="file"], .pg-ld [data-id] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.pg-pressing { transform: scale(.965) !important; transition: transform .42s ease !important; }
.pg-cm-src { visibility: hidden; }
.pg-cm-layer { position: fixed; inset: 0; z-index: 160; }
.pg-cm-dim { position: absolute; inset: 0; background: rgba(0, 0, 0, .34); opacity: 0; transition: opacity .36s ease; }
.pg-cm-layer.on .pg-cm-dim { opacity: 1; }
.pg-cm-layer.off .pg-cm-dim { opacity: 0; transition-duration: .22s; }
.pg-cm-lift { position: fixed !important; z-index: 1; margin: 0 !important; box-sizing: border-box; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--panel); color: var(--text); overflow: hidden; pointer-events: none; transform: scale(1); box-shadow: 0 0 0 0 transparent; transition: transform .56s cubic-bezier(.34, 1.56, .64, 1), box-shadow .36s ease; list-style: none; }
.pg-cm-layer.on .pg-cm-lift { transform: scale(1.07); box-shadow: 0 16px 36px rgba(0, 0, 0, .3); }
.pg-cm-layer.off .pg-cm-lift { transform: scale(1); box-shadow: none; transition-duration: .22s; }
.pg-cm { position: fixed; z-index: 2; overflow: hidden; border-radius: 14px; background: color-mix(in srgb, var(--panel) 97%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px); box-shadow: 0 18px 48px rgba(0, 0, 0, .32), 0 0 0 1px var(--line); opacity: 0; transform: scale(.45); transition: transform .52s cubic-bezier(.34, 1.56, .64, 1), opacity .18s ease; font-family: var(--font); }
.pg-cm-layer.on .pg-cm { opacity: 1; transform: scale(1); }
.pg-cm-layer.off .pg-cm { opacity: 0; transform: scale(.8); transition-duration: .2s; }
.pg-cm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; padding: 0 14px; border: 0; background: none; color: var(--text); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.pg-cm-row + .pg-cm-row, .pg-cm-sec + .pg-cm-row { box-shadow: inset 0 1px 0 var(--line); }
.pg-cm-row svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.pg-cm-row:hover, .pg-cm-row:focus-visible { background: color-mix(in srgb, var(--text) 6%, transparent); outline: none; }
.pg-cm-row.danger, .pg-cm-row.danger svg { color: #FF3B30; }
.pg-cm-row.checked svg { color: var(--text); }
.pg-cm-sec { padding: 10px 14px 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); box-shadow: inset 0 6px 0 color-mix(in srgb, var(--text) 4%, transparent); }

/* =================== file preview + pinch zoom =================== */
.pg-pv { position: fixed; inset: 0; z-index: 155; display: flex; flex-direction: column; background: #1A1A1A; color: #F5F5F5; transform: translateX(100%); transition: transform .42s var(--pg-spring); font-family: var(--font); }
.pg-pv.on { transform: none; }
.pg-pv-h { flex: none; display: grid; grid-template-columns: 76px minmax(0, 1fr) 76px; align-items: center; padding: calc(env(safe-area-inset-top, 0px) + 6px) 8px 6px; min-height: 52px; background: rgba(10, 10, 10, .92); border-bottom: 1px solid #262626; }
.pg-pv-h b { text-align: center; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-pv-b { min-height: 44px; border: 0; background: none; color: #C4FF0E; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.pg-pv-b:last-child { text-align: right; }
.pg-pv-vp { position: relative; flex: 1; min-height: 0; overflow: hidden; display: grid; place-items: center; touch-action: none; cursor: grab; }
.pg-pv-c { width: min(92vw, 620px); will-change: transform; }
.pg-pv-hint { flex: none; margin: 0; padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 12px); text-align: center; font-size: 12px; color: #9A9A9A; }
.pg-a4 { aspect-ratio: 1 / 1.414; background: #FFFFFF; color: #0A0A0A; border-radius: 4px; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); padding: 7% 8%; display: flex; flex-direction: column; gap: 3.2%; overflow: hidden; font-family: var(--font); user-select: none; -webkit-user-select: none; }
.pg-a4-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 6px; background: #0A0A0A; color: #F5F5F5; }
.pg-a4-bar b { display: block; font-family: var(--font-display); font-weight: 800; letter-spacing: .06em; font-size: 15px; line-height: 1; color: #F5F5F5; }
.pg-a4-bar small { display: block; font-size: 8px; letter-spacing: .2em; color: #C4FF0E; margin-top: 2px; }
.pg-a4-mark { display: inline-flex; align-items: flex-end; gap: 2px; width: 26px; height: 26px; padding: 5px; border-radius: 6px; background: #C4FF0E; }
.pg-a4-mark i { display: block; width: 4px; background: #0A0A0A; border-radius: 1px; }
.pg-a4-mark i:nth-child(1) { height: 6px; } .pg-a4-mark i:nth-child(2) { height: 10px; } .pg-a4-mark i:nth-child(3) { height: 15px; }
.pg-a4 h2 { margin: 2% 0 0; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: .02em; font-size: clamp(16px, 4.4vw, 26px); line-height: 1.05; color: #0A0A0A; }
.pg-a4-sub { margin: 0; font-size: 11px; color: #5F6157; }
.pg-a4-lines { display: flex; flex-direction: column; gap: 7px; }
.pg-a4-lines i { display: block; height: 6px; border-radius: 3px; background: #E2E4DC; }
.pg-a4-t { width: 100%; border-collapse: collapse; font-size: 11px; }
.pg-a4-t td { padding: 7px 8px; border-bottom: 1px solid #E2E4DC; color: #0A0A0A; }
.pg-a4-t td:last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.pg-a4-t tr.h td { background: #F0F1EC; font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.pg-a4-foot { margin: auto 0 0; font-size: 9px; color: #5F6157; border-top: 1px solid #E2E4DC; padding-top: 8px; }

/* =================== Events card stack (mobile) =================== */
.pg-stack { position: relative; height: 380px; margin: 6px 4px 0; touch-action: pan-y; }
.pg-sc { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 18px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 14px 34px rgba(0, 0, 0, .18); overflow: hidden; transform-origin: 50% 85%; will-change: transform; -webkit-user-select: none; user-select: none; cursor: grab; }
.pg-sc[data-i="0"] { touch-action: none; }
.pg-stack.drag .pg-sc[data-i="0"] { cursor: grabbing; }
.pg-sc::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 110px; background: linear-gradient(160deg, #3a3a3a, #111 75%); opacity: .9; }
.pg-sc-in { position: relative; display: flex; flex-direction: column; gap: 8px; height: 100%; }
.pg-sc-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 34px; }
.pg-sc-top .badge { margin-top: 4px; }
.pg-sc h3 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1.05; text-transform: uppercase; letter-spacing: .02em; }
.pg-sc p { margin: 0; }
.pg-stamp { position: absolute; z-index: 3; top: 22px; padding: 4px 12px; border: 3px solid currentColor; border-radius: 10px; font-family: var(--font-display); font-weight: 800; font-size: 30px; letter-spacing: .06em; opacity: 0; pointer-events: none; }
.pg-stamp.go { left: 18px; color: #C4FF0E; background: rgba(10, 10, 10, .55); transform: rotate(-14deg); }
.pg-stamp.skip { right: 18px; color: #D4D4D4; background: rgba(10, 10, 10, .55); transform: rotate(14deg); }
.pg-rising .pg-sc { transition: transform .45s var(--pg-spring); }
.pg-stack-btns { display: flex; justify-content: center; gap: 28px; margin: 6px 0 4px; }
.pg-sb { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: 0 8px 22px rgba(0, 0, 0, .2); transition: transform 90ms ease-out; }
.pg-sb:active { transform: scale(.92); }
.pg-sb svg { width: 28px; height: 28px; }
.pg-sb.no { background: var(--panel); color: var(--muted); box-shadow: 0 8px 22px rgba(0, 0, 0, .2), inset 0 0 0 1px var(--line); }
.pg-sb.yes { background: #C4FF0E; color: #0A0A0A; }
.pg-stack-done { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 16px !important; }

/* programme reorder (mobile) + shell segmented */
.pg-ro .pg-wk-m { display: none; }
.pg-ro .pg-wk { grid-template-columns: 32px minmax(0, 1fr) 24px; width: 100%; }
.pg-hseg .pg-glide { display: none; }

@media (prefers-reduced-motion: reduce) {
  .pg-pressing { transform: none !important; }
  .pg-cm, .pg-cm-lift, .pg-cm-dim, .pg-pv, .pg-sc, .pg-rising .pg-sc { transition: none !important; }
}
.pg-noanim { animation: none !important; }
