/* Paid Publishing workspace. Nate Herk / AI Automation Society reference,
   adapted for daily administration rather than a marketing scroll page. */
:root {
  color-scheme: dark;
  --pp-canvas: #050506;
  --pp-surface: #0b0c0e;
  --pp-raised: #121316;
  --pp-ink: #f4f5f7;
  --pp-muted: #a6a8ae;
  --pp-line: rgba(244,245,247,.09);
  --pp-line-strong: rgba(244,245,247,.19);
  --pp-control-line: #62666f;
  --pp-accent: #37bdf8;
  --pp-font: Montserrat, system-ui, -apple-system, sans-serif;
  --pp-radius: 22px;
  --pp-ease: cubic-bezier(.22,1,.36,1);
  --bg: var(--pp-canvas);
  --card: var(--pp-surface);
  --card-solid: var(--pp-surface);
  --raised: var(--pp-raised);
  --border: var(--pp-line);
  --border2: var(--pp-line-strong);
  --hairline: var(--pp-line);
  --text: var(--pp-ink);
  --muted: var(--pp-muted);
  --blue: var(--pp-accent);
  --primary: var(--pp-accent);
}
html { background: var(--pp-canvas); scroll-padding-top: 120px; }
body, body.tracker-view {
  background: var(--pp-canvas);
  color: var(--pp-ink);
  font: 400 16px/1.65 var(--pp-font);
  letter-spacing: -.015em;
  min-width: 320px;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: var(--pp-font); }
::selection { background: rgba(55,189,248,.25); color: #fff; }
input, textarea { caret-color: var(--pp-accent); }
:focus-visible { outline: 2px solid var(--pp-accent); outline-offset: 4px; }
* { scrollbar-width: thin; scrollbar-color: #34363b var(--pp-surface); }
h1, h2, h3 { font-family: var(--pp-font); text-wrap: balance; }
h1 { font-weight: 500; letter-spacing: -.045em; }
h2, h3 { font-weight: 500; letter-spacing: -.025em; }
p { text-wrap: pretty; }
a { text-underline-offset: .22em; }
a:hover { color: #fff; }
.topbar, .tracker-view .topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  height: auto;
  min-height: 88px;
  padding: 18px clamp(24px,3.4vw,56px);
  gap: 28px;
  background: rgba(5,5,6,.97);
  border-bottom: 1px solid var(--pp-line);
  backdrop-filter: none;
}
.brand { gap: 18px; flex-shrink: 0; }
.brand b { font: 600 17px/1.1 var(--pp-font); letter-spacing: -.045em; }
.brand b span { font: 500 10px/1.2 var(--pp-font); letter-spacing: .19em; color: var(--pp-muted); margin-top: 6px; }
.brand-tag { font-size: 10px; line-height: 1.5; letter-spacing: .13em; color: #8d8f96; }
.toplinks { gap: 18px; align-items: center; font-size: 14px; line-height: 1.4; color: var(--pp-muted); }
.toplinks a, .toplinks button { white-space: nowrap; }
.toplinks > a[aria-current="page"] { color: var(--pp-ink); }
.toplinks .text-button { color: var(--pp-muted); font-size: 14px; }
.toplinks #sessionName, #settingsIdentity { font-size: 12px; color: #898c94; }
.workspace-nav { display: flex; align-items: center; gap: 4px; }
.workspace-nav a { padding: 11px 15px; border: 1px solid transparent; border-radius: 999px; color: var(--pp-muted); font-size: 14px; font-weight: 500; }
.workspace-nav a.active, .workspace-nav a[aria-current="page"] { background: rgba(244,245,247,.08); border-color: var(--pp-line); color: var(--pp-ink); box-shadow: none; }
.workspace-nav a:hover { background: rgba(244,245,247,.05); color: #fff; }
.workspace-nav #trackerCount { color: var(--pp-muted); font-size: 12px; margin-left: 4px; }
.shell { display: block; min-height: calc(100vh - 88px); }
main, .tracker-view main { margin: 0 auto; padding: clamp(32px,4vw,64px) clamp(24px,3.4vw,56px) 88px; max-width: 1440px; }
.tracker-view main { max-width: 1680px; }
.page-head { margin-bottom: 36px; gap: 24px; align-items: flex-end; }
.page-head h1 { font-size: clamp(32px,3.6vw,48px); line-height: 1.12; font-weight: 500; letter-spacing: -.045em; margin: 10px 0 14px; }
.eyebrow, .nav-label { color: var(--pp-muted); font-size: 11px; font-weight: 500; letter-spacing: .13em; }
.page-head .eyebrow { color: var(--pp-muted); }
.subhead { font-size: 16px; line-height: 1.65; max-width: 66ch; }
.button, .tracker-view .button, .access-page .button, .settings-page .button {
  min-height: 44px;
  padding: 11px 20px;
  border: 1px solid var(--pp-line-strong);
  border-radius: 999px;
  background: rgba(244,245,247,.035);
  color: var(--pp-ink);
  font: 500 14px/1.45 var(--pp-font);
  letter-spacing: -.015em;
  box-shadow: none;
  transition: background 160ms var(--pp-ease), border-color 160ms var(--pp-ease), transform 140ms var(--pp-ease);
}
.button.primary, .tracker-view .button.primary, .access-page .button.primary, .settings-page .button.primary {
  min-height: 48px;
  padding-inline: 26px;
  background: #e9e9eb;
  border-color: #e9e9eb;
  color: #0a0a0b;
  box-shadow: none;
}
.button.small { min-height: 36px; padding: 7px 14px; font-size: 13px; }
.button:disabled, button:disabled { opacity: .42; cursor: not-allowed; }
.button:active:not(:disabled) { transform: translateY(1px); }
.text-button { font-size: 14px; color: var(--pp-accent); }
input, select, textarea, .tracker-view input, .tracker-view select, .tracker-view textarea {
  min-height: 48px;
  border: 1px solid var(--pp-control-line);
  border-radius: 12px;
  background-color: #090a0c;
  color: var(--pp-ink);
  padding: 12px 14px;
  font: 400 16px/1.5 var(--pp-font);
  letter-spacing: -.015em;
  box-shadow: none;
}
input::placeholder, textarea::placeholder { color: #85888f; }
input[type="checkbox"], input[type="radio"] { min-height: 0; accent-color: var(--pp-accent); padding: 0; }
select {
  appearance: none;
  padding-right: 38px;
  background-image: linear-gradient(45deg,transparent 50%,#a6a8ae 50%),linear-gradient(135deg,#a6a8ae 50%,transparent 50%);
  background-position: calc(100% - 19px) 50%,calc(100% - 14px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
textarea { line-height: 1.7; min-height: 96px; }
.stats { gap: 0; margin-bottom: 32px; border-block: 1px solid var(--pp-line); }
.stat, .stat.primary { border: 0; border-radius: 0; background: none; padding: 26px 28px; box-shadow: none; }
.stat + .stat { border-left: 1px solid var(--pp-line); }
.stat-label { font-size: 12px; letter-spacing: .06em; line-height: 1.5; color: var(--pp-muted); }
.stat-value, .stat.primary .stat-value { font-size: 38px; line-height: 1.15; font-weight: 400; letter-spacing: -.05em; color: var(--pp-ink); }
.stat-foot { font-size: 12px; line-height: 1.6; margin-top: 12px; }
.surface, .tracker-view .surface { border: 1px solid var(--pp-line); border-radius: var(--pp-radius); background: var(--pp-surface); box-shadow: 0 16px 42px rgba(0,0,0,.12); }
.toolbar { padding: 20px 24px; border-color: var(--pp-line); gap: 16px; }
.search { width: 300px; font-size: 14px; }
.toolbar-label { font-size: 14px; font-weight: 500; }
.tab, .choice-tabs .button { min-height: 40px; padding: 9px 15px; font-size: 14px; border-radius: 999px; }
.tab.active { background: rgba(244,245,247,.08); border-color: var(--pp-line-strong); color: var(--pp-ink); }
th, .tracker-view th { background: #0d0e10; color: var(--pp-muted); font-size: 12px; font-weight: 500; letter-spacing: .06em; line-height: 1.5; padding: 17px 20px; border-color: var(--pp-line); }
td, .tracker-view td { padding: 20px; font-size: 14px; line-height: 1.55; border-color: var(--pp-line); }
.cell-sub, .cell-note, .table-foot, .tracker-view .table-foot { font-size: 12px; line-height: 1.6; color: var(--pp-muted); }
.name-link, .song-title, .tracker-view .song-title { font-size: 16px; font-weight: 500; color: var(--pp-ink); }
.avatar, .hero-avatar { background: var(--pp-raised); color: var(--pp-ink); border-color: var(--pp-line-strong); font-weight: 500; }
.pill { font-size: 12px; line-height: 1.4; padding: 6px 10px; border-radius: 999px; }
.pill.neutral { background: rgba(244,245,247,.04); color: var(--pp-muted); }
.money, .stat.primary .money, .tracker-view .money { color: var(--pp-ink); font-weight: 500; }
.share-input, .tracker-view .share-input { min-height: 38px; padding: 7px 10px; color: var(--pp-ink); font-size: 14px; }
.model-strip, .tracker-view .model-strip { background: none; border-color: var(--pp-line); border-radius: 14px; color: var(--pp-muted); font-size: 13px; line-height: 1.65; padding: 16px 20px; }
.back, .tracker-view .back { color: var(--pp-muted); font-size: 14px; }
.hint, .credit, .tracker-view .hint { font-size: 13px; line-height: 1.7; color: var(--pp-muted); }
.empty { padding: 76px 24px; }
.empty h2 { font-size: 28px; font-weight: 500; }
.empty p { font-size: 16px; max-width: 50ch; }
.loading { font-size: 16px; }
dialog, .tracker-view dialog { border-color: var(--pp-line-strong); border-radius: 28px; background: var(--pp-surface); box-shadow: 0 32px 100px rgba(0,0,0,.5); }
dialog::backdrop { background: rgba(0,0,0,.76); backdrop-filter: blur(3px); }
.modal-head, .modal-body { padding: 28px 32px; }
.modal-head h2 { font-size: 28px; font-weight: 500; letter-spacing: -.035em; }
.modal-head p, .modal-foot p { font-size: 14px; color: var(--pp-muted); }
.modal-foot { padding: 22px 32px; border-color: var(--pp-line); background: var(--pp-raised); }
.detail-card { border-color: var(--pp-line); background: transparent; border-radius: 16px; }
.detail-card h3 { font-size: 18px; font-weight: 500; }
.detail-card p { font-size: 14px; line-height: 1.7; }
.field, .check-label { font-size: 14px; line-height: 1.6; color: var(--pp-muted); }
.cols-menu[open] .cols-panel { background: var(--pp-raised); border-color: var(--pp-line-strong); border-radius: 16px; font-size: 14px; }
.notice { background: #17191d; border-color: var(--pp-line-strong); border-radius: 16px; font-size: 14px; line-height: 1.6; box-shadow: 0 16px 48px rgba(0,0,0,.35); }
.progress { background: var(--pp-surface); border-color: var(--pp-line-strong); border-radius: 14px; font-size: 14px; }
.tracker-view .artist-card { border-color: var(--pp-line); background: var(--pp-surface); border-radius: var(--pp-radius); margin-bottom: 24px; }
.tracker-view .pt-hero-top { min-height: 204px; padding: 36px; }
.tracker-view .pt-hero-name { font-family: var(--pp-font); font-size: 44px; font-weight: 500; line-height: 1.12; letter-spacing: -.045em; text-shadow: none; }
.tracker-view .pt-hero-role { color: var(--pp-muted); font-family: var(--pp-font); }
.tracker-view .pt-hero-bd { background: var(--pp-surface); }
.tracker-view .pt-hero-bd-img { opacity: .16; filter: blur(60px) saturate(.45); }
.tracker-view .pt-hero-bd-scrim { background: linear-gradient(90deg,#0b0c0e 5%,rgba(11,12,14,.7) 50%,#0b0c0e 95%); }
.tracker-view .pt-hero-strip { background: rgba(244,245,247,.025); border-color: var(--pp-line); min-height: 60px; height: auto; padding-block: 10px; font-size: 13px; }
.tracker-view .pt-hero-strip .button { font-size: 13px; color: var(--pp-muted); }
.tracker-view .artist-avatar, .tracker-view .artist-avatar-placeholder { width: 112px; height: 112px; flex-basis: 112px; box-shadow: none; }
.tracker-view .artist-avatar-placeholder { background: var(--pp-raised); color: var(--pp-ink); font-family: var(--pp-font); font-weight: 400; }
.tracker-view .stats-row .stat-value { font-family: var(--pp-font); font-weight: 400; }
@media (hover:hover) and (pointer:fine) {
  .button:hover:not(:disabled) { background: rgba(244,245,247,.09); border-color: rgba(244,245,247,.3); }
  .button.primary:hover:not(:disabled), .tracker-view .button.primary:hover:not(:disabled), .access-page .button.primary:hover:not(:disabled), .settings-page .button.primary:hover:not(:disabled) { background: #fff; border-color: #fff; color: #0a0a0b; }
  input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: rgba(244,245,247,.3); }
}
@media (max-width:1380px) {
  .topbar { gap: 18px; }
  .toplinks { gap: 12px; }
  .toplinks #sessionName, .brand-tag { display: none; }
  .workspace-nav a { padding-inline: 12px; }
}
@media (max-width:1080px) {
  .topbar, .tracker-view .topbar { flex-wrap: wrap; gap: 16px; padding-block: 18px; }
  .toplinks { flex-wrap: wrap; justify-content: flex-end; flex: 1; }
  .workspace-nav { flex-wrap: nowrap; }
  .tracker-view .pt-hero-top { flex-wrap: wrap; }
  .tracker-view .stats-row { width: 100%; margin-left: 0; }
}
@media (max-width:760px) {
  html { scroll-padding-top: 20px; }
  body, body.tracker-view { font-size: 16px; }
  .topbar, .tracker-view .topbar { position: relative; padding: 20px; gap: 20px; }
  .toplinks { width: 100%; flex-basis: 100%; justify-content: flex-start; gap: 14px 18px; font-size: 14px; }
  .toplinks .text-button { font-size: 14px; }
  .workspace-nav { flex-basis: 100%; width: 100%; order: -1; gap: 3px; }
  .workspace-nav a { padding: 10px 12px; font-size: 14px; }
  main, .tracker-view main { padding: 32px 20px 72px; }
  .page-head { align-items: flex-start; gap: 20px; margin-bottom: 28px; }
  .page-head h1 { font-size: 34px; }
  .subhead { font-size: 16px; }
  .stats { grid-template-columns: 1fr; }
  .stat, .stat.primary { padding: 22px 0; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--pp-line); }
  .stat-value { font-size: 36px; }
  .toolbar { padding: 18px; }
  .search { width: 100%; }
  .model-strip, .tracker-view .model-strip { padding: 16px; font-size: 13px; }
  .modal-head, .modal-body, .modal-foot { padding: 24px 20px; }
  .tracker-view .pt-hero-top { padding: 28px 24px; gap: 20px; }
  .tracker-view .pt-hero-name { font-size: 32px; }
  .tracker-view .artist-avatar, .tracker-view .artist-avatar-placeholder { width: 80px; height: 80px; flex-basis: 80px; }
  .tracker-view .pt-hero-strip { padding-inline: 20px; }
  .tracker-view .stats-row .stat-value { font-size: 28px; }
  .button { max-width: 100%; }
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Workspace sections stay prominent; less frequent tools share one disclosure. */
.workspace-more { position: relative; flex-shrink: 0; }
.workspace-more > summary {
  list-style: none; cursor: pointer; min-height: 44px; padding: 11px 18px;
  border: 1px solid var(--pp-line-strong); border-radius: 999px;
  font-size: 14px; line-height: 1.45; color: var(--pp-ink);
}
.workspace-more > summary::-webkit-details-marker { display: none; }
.workspace-more[open] > summary { background: var(--pp-raised); }
.workspace-more-panel {
  position: absolute; right: 0; top: calc(100% + 12px); z-index: 50;
  display: flex; flex-direction: column; align-items: stretch; gap: 4px;
  min-width: 220px; padding: 12px; border: 1px solid var(--pp-line-strong);
  border-radius: 18px; background: var(--pp-raised); box-shadow: 0 20px 60px #0008;
}
.workspace-more-panel > a, .workspace-more-panel > button {
  display: block; width: 100%; min-height: 44px; padding: 11px 14px;
  border-radius: 10px; color: var(--pp-ink); font-size: 14px; text-align: left;
}
.workspace-more-panel > a:hover, .workspace-more-panel > button:hover { background: #ffffff0c; text-decoration: none; }
.workspace-more-panel #sessionName { display: block; padding: 8px 14px 12px; color: var(--pp-muted); white-space: normal; }
.workspace-more-panel #modelButton { display: block; }
@media (max-width:760px) {
  .topbar:has(.workspace-more) { gap: 18px; }
  .toplinks:has(.workspace-more) { display: block; min-width: 0; }
  .topbar .workspace-nav { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; padding-bottom: 2px; }
  .topbar .workspace-nav a { flex: 0 0 auto; }
  .workspace-more { position: absolute; right: 20px; top: 20px; }
  .workspace-more-panel { max-width: calc(100vw - 40px); }
}
