/* The publisher app (/publish): a left menu, a dashboard first (Nathan 2026-10-27). Builds on site.css + try.css. */
.pb-gate { min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 48px 16px; }
.pb-gate-title { font-size: clamp(24px, 3vw, 32px); margin: 8px 0 10px; }
.pb-narrow { width: 100%; max-width: 560px; }
.pb-load-err:empty { display: none; }
.pb-load-err { text-align: center; padding: 0 16px; }

.pb-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: calc(100vh - 69px); }
.pb-side { position: sticky; top: 69px; align-self: start; height: calc(100vh - 69px); display: flex; flex-direction: column;
  gap: 18px; padding: 22px 14px; border-right: 1px solid var(--line); background: var(--bg-2); }
.pb-site { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; padding: 0 10px; min-width: 0; }
.pb-site-name { font: 700 17px/1.3 var(--font-head); overflow-wrap: anywhere; min-width: 0; }
.pb-nav { display: flex; flex-direction: column; gap: 2px; }
.pb-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 500; font-size: 15px; text-decoration: none; }
.pb-nav a:hover { background: var(--surface); color: var(--text); }
.pb-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--text); box-shadow: inset 3px 0 0 var(--accent-bright); }
.pb-nav svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
.pb-who { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted);
  display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.pb-who .tp-link { align-self: flex-start; font-size: 13px; }

.pb-main { min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 64px; }
.pb-pane { max-width: 1180px; }
.pb-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; margin-bottom: 22px; }
.pb-head h1 { font-size: clamp(26px, 3vw, 34px); margin: 0 0 4px; }
.pb-head-sub { margin: 0; }

.pb-seg { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg-2); }
.pb-seg button { border: 0; background: none; color: var(--text-2); font: 600 14px var(--font-body); padding: 7px 16px;
  border-radius: 999px; cursor: pointer; }
.pb-seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }

.pb-kpis { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.pb-kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pb-kpi { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 16px 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); color: var(--text); font: inherit; cursor: pointer; min-width: 0; }
.pb-kpi:hover { border-color: var(--line-2); }
.pb-kpi[aria-pressed="true"] { border-color: var(--accent-bright); box-shadow: 0 0 0 1px var(--accent-bright) inset; }
.pb-kpi-static { cursor: default; }
.pb-kpi-label { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.pb-kpi-num { font: 800 30px/1.15 var(--font-head); font-variant-numeric: tabular-nums; }
.pb-kpi-note { font-size: 13px; color: var(--muted); min-height: 1.3em; }

.pb-chart-card .tp-head { margin-bottom: 4px; }
.pb-chart { position: relative; }
.pb-chart svg { display: block; width: 100%; height: 240px; overflow: visible; }
.pb-chart .grid { stroke: var(--line); stroke-width: 1; }
.pb-chart .axis-label { fill: var(--muted); font: 500 11.5px var(--font-body); }
.pb-chart .bar { fill: var(--accent-bright); }
.pb-chart .hit { fill: transparent; cursor: default; }
.pb-chart .hit:hover + .bar, .pb-chart .bar.on { fill: #6fb1ff; }
.pb-tip { position: absolute; pointer-events: none; transform: translate(-50%, -100%); margin-top: -8px; white-space: nowrap;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 6px 10px;
  font-size: 13px; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.pb-tip b { display: block; font-size: 14px; }
.pb-chart-empty { padding: 60px 0; text-align: center; }

.pb-two { display: grid; gap: 0 18px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.pb-two-wide { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.pb-more { margin-left: auto; font-size: 14px; }
.pb-row-num { margin-left: auto; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pb-row-num span { display: block; font-size: 13px; color: var(--muted); }
.pb-stats-line { display: block; font-size: 13px; color: var(--accent-bright); margin-top: 2px; }
.pb-narrow-card { max-width: 720px; }
.pb-danger-zone { border-color: #3a2226; }
.pb-danger-zone p { margin-top: 0; }

@media (max-width: 1100px) { .pb-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .pb-shell { grid-template-columns: minmax(0, 1fr); }
  .pb-side { position: sticky; top: 69px; z-index: 5; height: auto; flex-direction: row; align-items: center; gap: 10px;
    padding: 8px 16px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .pb-site, .pb-who { display: none; }
  .pb-nav { flex-direction: row; gap: 4px; }
  .pb-nav a { white-space: nowrap; padding: 8px 12px; font-size: 14px; }
  .pb-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent-bright); }
  .pb-nav svg { display: none; }
  .pb-two, .pb-two-wide, .pb-kpis-3 { grid-template-columns: minmax(0, 1fr); }
  .pb-main { padding-top: 20px; }
}
@media (max-width: 480px) { .pb-kpi-num { font-size: 24px; } .pb-chart svg { height: 200px; } }
.pb-acts { display: flex; gap: 14px; flex: none; }
