/* The workspace. Colours, type, spacing, corners, shadows and the shared components (buttons,
   fields, panels, tables, tabs, dialogs, status labels, empty states, stat tiles) come from
   /brand/theme.css; this file lays out the workspace pages. */
:root {
  color-scheme: dark;
  font-family: var(--sp-font);
  color: var(--sp-text);
  background: var(--sp-bg);
  font-size: var(--sp-type-md);
  line-height: var(--sp-leading);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}
/* Element defaults sit in the base layer, under the shared components in theme.css. */
@layer sp-base {
  * {
    box-sizing: border-box;
  }
  body {
    margin: 0;
    min-width: 280px;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  a:hover {
    text-decoration: none;
  }
  img {
    max-width: 100%;
    display: block;
  }
  button,
  input,
  textarea,
  select {
    font: inherit;
  }
  button,
  select,
  summary {
    cursor: pointer;
  }
  button {
    color: inherit;
  }
  button:disabled {
    opacity: 0.55;
    cursor: wait;
  }
  h1,
  h2,
  h3,
  p {
    margin: 0;
  }
  h1 {
    font-size: clamp(1.6rem, 2.5vw, 2.05rem);
    line-height: 1.16;
  }
  h2 {
    font-size: 1.22rem;
    line-height: 1.35;
  }
  h3 {
    font-size: 1.04rem;
    letter-spacing: -0.025em;
    font-weight: 650;
  }
  small {
    font-size: 0.78rem;
    color: var(--muted);
  }
}
.ui-icon {
  width: 18px;
  height: 18px;
  flex: none;
  vertical-align: middle;
}
.back .ui-icon {
  width: 15px;
  height: 15px;
}
.actions,
.spread,
.tagline {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.spread {
  justify-content: space-between;
}
.tagline {
  gap: 5px;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--sp-muted);
  margin-bottom: 18px;
}
.back:hover,
.panel a:not(.button):hover,
td a:hover {
  color: var(--sp-text);
}
.workspace {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 230px;
  border-right: 1px solid var(--sp-line-subtle);
  background: var(--sp-bg-deep);
  display: flex;
  flex-direction: column;
  padding: 22px 13px 12px;
  z-index: 12;
  overflow-y: auto;
}
/* The logo sits on a cream tile, as on the public site. */
.brand,
.mobilebar > a,
.auth-logo {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 7px 10px;
  border-radius: 12px;
  background: var(--sp-cream);
}
.mobilebar > a,
.auth-logo {
  align-self: center;
}
:is(.brand, .mobilebar) .sp-logo {
  width: 116px;
  height: auto;
}
.sidebar > .brand {
  margin: 0 10px 14px;
}
.sidebar > .button {
  margin: 4px 4px 12px;
}
.account-kind {
  padding: 0 11px 16px;
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--sp-muted);
}
.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 37px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: var(--sp-radius-sm);
  color: var(--sp-text);
  font-size: 0.87rem;
  font-weight: 570;
  line-height: 1.4;
  margin: 2px 0;
}
.side-link .ui-icon {
  width: 16px;
  height: 16px;
  color: var(--sp-muted);
}
.side-link:hover {
  background: var(--sp-raised);
}
.side-link.current {
  background: var(--sp-selected);
  border-color: var(--sp-selected-line);
}
.side-link.current .ui-icon {
  color: var(--sp-link);
}
.account-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 20px 1px 4px;
}
.account-foot > div {
  flex: 1;
  min-width: 0;
}
.account-foot strong,
.account-foot small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-foot strong {
  font-size: 0.81rem;
}
.account-foot small {
  font-size: 0.7rem;
}
.account-foot .icon-btn {
  width: 30px;
  min-height: 30px;
  background: transparent;
  border: 0;
}
.app-main {
  margin-left: 230px;
  width: calc(100% - 230px);
  max-width: 1480px;
  padding: clamp(24px, 3vw, 46px);
  min-width: 0;
}
.mobilebar {
  display: none;
}
.publisher-tabs {
  margin-bottom: 22px;
}
.publisher-tabs span {
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}
.publisher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 16px;
}
.publisher-grid .publisher-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  overflow-wrap: anywhere;
}
.publisher-card header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.publisher-card > .actions { margin-top: auto; }
.publisher-brief {
  width: 100%;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.publisher-brief h3, .publisher-brief summary { font-size: .88rem; font-weight: 650; }
.publisher-brief p { margin: 4px 0; color: var(--sp-muted); }
.publisher-brief a { display: inline-block; color: var(--blue); font-size: .85rem; }
.publisher-brief .ui-icon { width: 13px; height: 13px; }
.publisher-address { color: var(--muted); font-size: .86rem; user-select: all; }
.publisher-message { white-space: pre-wrap; }
.searchbox.publisher-search { max-width: 420px; margin-bottom: 16px; }
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-heading p,
.brief-head p,
.public-title p,
.game-entry p {
  color: var(--sp-muted);
  margin-top: 6px;
}
.app-main > .page-heading h1 {
  font-size: clamp(32px, 3.3vw, 48px);
}
/* Panels and stat tiles are shared components (theme.css); these two share their look. */
.game-entry,
.campaign-form fieldset {
  border: 1px solid var(--sp-line-subtle);
  background: var(--sp-surface);
  border-radius: var(--sp-radius-lg);
}
.panel {
  margin-bottom: 18px;
}
.panel-heading h2 {
  font-size: var(--sp-type-2xl);
  /* With two buttons, both sit at the right instead of one floating in the middle. */
  margin-right: auto;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.panel > p,
.list-item p {
  color: var(--sp-muted);
}
.panel > p + .button,
.panel > h3,
.panel > p + p {
  margin-top: 15px;
}
.panel > .empty {
  min-height: 110px;
}
.large-empty {
  min-height: 285px;
  display: grid;
  place-items: center;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.cover {
  width: 100%;
  aspect-ratio: 460/215;
  object-fit: cover;
  background: var(--sp-raised);
}
.art-fallback,
.game-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--sp-surface), var(--sp-selected));
  color: var(--sp-muted);
}
.art-fallback .ui-icon,
.game-placeholder .ui-icon {
  width: 40px;
  height: 40px;
}
.discovery {
  display: grid;
  gap: 12px;
}
.discovery-card {
  display: flex;
  overflow: hidden;
  border-radius: var(--sp-radius-md);
  background: var(--sp-raised);
  border: 1px solid var(--sp-line);
  min-width: 0;
}
.art-link {
  width: clamp(145px, 28%, 290px);
  flex: none;
  align-self: stretch;
}
.art-link > .cover {
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.discover-body {
  padding: 12px 16px;
  flex: 1;
  min-width: 0;
}
.discover-body > .spread {
  gap: 4px;
}
.discover-body a > strong {
  font-weight: 650;
}
.discover-meta,
.sample-meta,
.budget-line {
  font-size: 0.78rem;
  color: var(--sp-muted);
}
.discover-meta span {
  color: var(--sp-line-strong);
  margin: 0 3px;
}
.sample-meta,
.budget-line {
  margin-top: 10px;
}
.discover-body > .spread:last-child {
  margin-top: 5px;
}
.discovery.grid {
  grid-template-columns: repeat(auto-fill, minmax(min(235px, 100%), 1fr));
}
.discovery.grid .discovery-card {
  display: block;
}
.discovery.grid .art-link {
  display: block;
  width: 100%;
}
.discovery.grid .art-link > .cover {
  height: auto;
  aspect-ratio: 460/215;
}
progress {
  display: block;
  width: 100%;
  height: 7px;
  appearance: none;
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  background: var(--sp-field);
  margin: 7px 0 10px;
  color: var(--sp-accent);
}
progress::-webkit-progress-bar {
  background: var(--sp-field);
}
progress::-webkit-progress-value {
  background: var(--sp-accent);
  border-radius: 20px;
}
progress::-moz-progress-bar {
  background: var(--sp-accent);
}
.catalog-controls {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.searchbox {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--sp-field);
  border: 1px solid var(--sp-line-strong);
  border-radius: var(--sp-radius-md);
  padding: 0 10px;
  flex: 1;
  min-width: 170px;
  color: var(--sp-muted);
}
.searchbox input {
  min-height: 38px;
  border: 0;
  background: transparent;
  padding: 8px 0;
  width: 100%;
}
.brief-head {
  display: flex;
  align-items: center;
  gap: 23px;
  margin-bottom: 24px;
}
.brief-head > .cover {
  width: 29%;
  max-width: 330px;
  border-radius: 12px;
}
.brief-head h1 {
  margin: 8px 0;
}
.brief-head .actions {
  margin-top: 12px;
}
.brief-columns {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 16px;
}
.prose {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
dl {
  margin: 0 0 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  font-size: 0.88rem;
}
dt {
  color: var(--sp-muted);
}
dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
.info {
  border: 1px solid var(--sp-line) !important;
  color: var(--sp-text) !important;
  background: var(--sp-raised);
  padding: 12px 15px;
  border-radius: var(--sp-radius-md);
  margin: 0 0 18px;
  font-size: 0.87rem;
}
.table-scroll {
  overflow-x: auto;
}
/* Tables are a shared component (theme.css). */
td small {
  display: block;
  max-width: 280px;
}
td .ui-icon {
  width: 12px;
  height: 12px;
}
.campaign-form {
  max-width: 1120px;
}
.campaign-form fieldset {
  padding: 17px 22px 22px;
  margin: 0 0 23px;
  min-width: 0;
}
.campaign-form legend {
  padding: 0 7px;
  font-size: 1.12rem;
  font-weight: 650;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
/* Fields, buttons and dialogs are shared components (theme.css). */
.form-error {
  font-size: 0.84rem;
  margin: 10px 0;
}
.form-error:empty {
  display: none;
}
.campaign-form [hidden] {
  display: none;
}
.booking-shortlist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 16px;
}
.booking-match, .booking-agreement {
  min-width: 0;
  padding: clamp(14px, 2vw, 24px);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-block: 12px;
}
.booking-match .split {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.booking-agreement dl, .booking-match dl {
  grid-template-columns: minmax(9em, 35%) minmax(0, 1fr);
  margin-block: 16px;
}
.booking-agreement dd, .booking-match dd {
  text-align: start;
}
.booking-agreement small, .booking-match dt, .booking-agreement dt {
  color: var(--muted);
}
.booking-agreement .actions, .booking-match .actions {
  margin-block-start: 14px;
}
.report-big {
  font-size: 1.35rem;
  font-weight: 650;
  margin: 12px 0;
}
.report-big span {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--sp-muted);
}
.report-chart {
  width: 100%;
  height: 165px;
  display: block;
}
.chart-axis {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--sp-muted);
  font-size: 0.72rem;
}
.chart-data {
  font-size: 0.82rem;
  margin-top: 15px;
}
.chart-data summary {
  color: var(--sp-muted);
}
.importer {
  width: min(720px, calc(100vw - 25px));
}
.import-body > p {
  font-size: 0.85rem;
  color: var(--sp-muted);
  margin-bottom: 15px;
}
.import-body [hidden] {
  display: none !important;
}
.import-body .field {
  margin-bottom: 13px;
}
.import-body .table-scroll {
  max-height: 260px;
  overflow: auto;
}
.import-body #import-preview > p {
  margin: 10px 0;
}
.ui-dialog .field,
.ui-dialog .check-field,
.ui-dialog form > p {
  margin-bottom: 13px;
}
.game-entry {
  padding: 0;
  overflow: hidden;
}
.game-entry > img,
.game-placeholder {
  width: 100%;
  aspect-ratio: 460/215;
  object-fit: cover;
}
.game-entry > div:not(.game-placeholder) {
  padding: 15px;
}
.game-entry .button {
  margin-top: 12px;
}
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.bars {
  display: grid;
  gap: 14px;
}
.bars .spread,
.bars small {
  font-size: 0.82rem;
}
.list-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--sp-line-subtle);
}
.list-item:last-child {
  border-bottom: 0;
}
#notice {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 30;
  max-width: min(440px, 88vw);
  background: var(--sp-cream);
  color: var(--sp-ink);
  border-radius: var(--sp-radius-md);
  padding: 11px 15px;
  box-shadow: var(--sp-shadow-md);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.15s,
    transform 0.15s;
  pointer-events: none;
  font-size: 0.86rem;
  font-weight: 580;
}
#notice.show {
  opacity: 1;
  transform: none;
}
.loading {
  min-height: 80vh;
  display: grid;
  place-items: center;
  color: var(--sp-muted);
}
.workspace-loading {
  width: min(960px, calc(100vw - 32px));
}
.auth {
  display: flex;
  min-height: 100vh;
  background: var(--sp-bg);
}
.auth-column {
  width: 40%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: radial-gradient(ellipse at 50% 0, #46223b, transparent 65%), var(--sp-bg);
}
.auth-box {
  width: 100%;
  max-width: 448px;
  text-align: center;
}
.auth-logo {
  margin-bottom: 25px;
}
.auth-logo .sp-logo {
  width: 150px;
  height: auto;
}
.auth h1 {
  font-size: clamp(33px, 3.5vw, 52px);
  line-height: 1.09;
}
.auth-sub {
  color: var(--sp-muted);
  font-size: 1rem;
  margin: 12px 0 26px;
}
.role-options {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.role-card {
  min-height: 84px;
  border: 1px solid var(--sp-line);
  background: var(--sp-surface);
  color: var(--sp-text);
  display: flex;
  align-items: center;
  text-align: left;
  gap: 15px;
  border-radius: var(--sp-radius-lg);
  padding: 16px;
  transition:
    background 0.16s,
    border-color 0.16s,
    transform 0.16s;
}
.role-card:hover {
  transform: scale(1.016);
  border-color: var(--sp-line-hover);
  background: var(--sp-raised);
}
.role-card > .ui-icon {
  margin-left: auto;
  color: var(--sp-muted);
  width: 17px;
}
.role-icon {
  background: #523140;
  border: 1px solid #714454;
  color: #ffbd9d;
  border-radius: 9px;
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  flex: none;
}
.studio .role-icon {
  background: #47324d;
  border-color: #654766;
  color: #e8c6ec;
}
.role-icon svg {
  width: 24px;
  height: 24px;
}
.role-card strong,
.role-card small {
  display: block;
}
.role-card strong {
  font-size: 1rem;
  font-weight: 660;
}
.role-card small {
  color: var(--sp-muted);
  margin-top: 3px;
  font-size: 0.85rem;
  line-height: 1.5;
}
.auth .back {
  margin: 26px 0 0;
  color: var(--sp-muted);
}
.auth-art {
  width: 60%;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}
.auth-brand {
  display: grid;
  place-items: center;
  padding: 48px clamp(32px, 6vw, 96px);
  background:
    radial-gradient(circle at 80% 15%, rgba(255, 102, 44, .35), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(255, 185, 152, .25), transparent 40%),
    #50102f;
  color: #fff5e6;
}
.auth-brand__inner { max-width: 30rem; }
.auth-brand__mascot { width: 116px; height: auto; margin-bottom: 22px; transform: rotate(-6deg); filter: drop-shadow(0 8px 0 rgba(0, 0, 0, .2)); }
.auth-brand h2 { margin: 0; color: #fff5e6; font-size: clamp(34px, 3.4vw, 50px); line-height: 1.05; }
.auth-brand ul { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.auth-brand li { position: relative; padding-left: 34px; font-size: 1.05rem; font-weight: 600; color: #ffe9d6; }
.auth-brand li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .15em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ff662c url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23341427' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.auth-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-form .button {
  margin-top: 5px;
}
.auth-switch {
  color: var(--sp-muted);
  font-size: 0.83rem;
  margin-top: 18px;
}
.auth-switch a {
  text-decoration: underline;
  color: var(--sp-link);
}
.public-main {
  max-width: 1750px;
  padding: 80px clamp(24px, 7vw, 96px);
  margin: auto;
  min-height: 66vh;
}
.public-title {
  margin: 0 0 40px;
}
.public-title h1 {
  font-size: clamp(36px, 4vw, 44px);
  font-weight: 700;
}
.public-title p { font-size: clamp(16px, 1.5vw, 18px); font-weight: 600; }
.public-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px 16px;
}
.public-card {
  min-width: 0;
  display: block;
  padding-bottom: 10px;
  border-radius: 7px;
  background: var(--sp-raised);
}
.card-art {
  position: relative;
  overflow: hidden;
  border-radius: 7px;
}
.card-art .cover {
  transition: transform 0.3s;
}
.card-art > span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -45%);
  color: var(--sp-ink);
  background: var(--sp-cream);
  border-radius: 22px;
  padding: 8px 13px;
  font-size: 0.8rem;
  font-weight: bold;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
}
.public-card:hover .cover,
.public-card:focus-visible .cover {
  transform: scale(1.035);
  filter: brightness(0.8);
}
.public-card:hover .card-art > span,
.public-card:focus-visible .card-art > span {
  opacity: 1;
}
/* Titles get two lines before they are cut short; the deal and the tags wrap. */
.public-card > strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  margin: 9px 10px 4px;
  font-size: 0.94rem;
  line-height: 1.3;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.public-card .deal {
  display: block;
  margin: 0 10px 8px;
  color: var(--sp-muted);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
}
.public-card .tagline {
  flex-wrap: wrap;
  margin: 0 10px;
}
.public-card .tag {
  white-space: normal;
  overflow-wrap: anywhere;
}
.public-cta {
  margin: 40px 0 0;
  text-align: center;
}
.public-detail {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.65fr);
  gap: 25px;
}
.public-summary > .cover,
.gallery > img,
.thumbs img {
  border-radius: 9px;
}
.public-summary {
  background: var(--sp-raised);
}
.public-summary h1 {
  margin: 14px 0 6px;
}
.public-summary p {
  color: var(--sp-muted);
  margin: 6px 0 12px;
}
.public-summary .actions {
  margin-top: 18px;
}
.gallery > img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--sp-raised);
}
.thumbs {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  margin-top: 8px;
  padding-bottom: 7px;
}
.thumbs button {
  border: 0;
  background: transparent;
  padding: 0;
  flex: 0 0 100px;
}
.thumbs img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.thumbs button[aria-pressed="true"] img {
  border: 2px solid currentColor;
}
@media (min-width: 1500px) {
  .app-main {
    margin-right: auto;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 200px;
  }
  .app-main {
    margin-left: 200px;
    width: calc(100% - 200px);
    padding: 25px;
  }
  .auth-column {
    width: 45%;
  }
  .auth-art {
    width: 55%;
  }
  .brief-columns {
    grid-template-columns: 1.3fr 1fr;
  }
}
@media (max-width: 850px) {
  .auth-art {
    display: none;
  }
  .auth-column {
    width: 100%;
    align-items: flex-start;
    padding: clamp(65px, 15vh, 140px) 19px 40px;
  }
  .public-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .public-detail {
    grid-template-columns: minmax(0, 1fr);
  }
  .public-summary > .cover {
    max-width: 450px;
  }
  .brief-columns {
    display: block;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .workspace {
    display: block;
  }
  .mobilebar {
    height: 56px;
    background: var(--sp-bg-deep);
    border-bottom: 1px solid var(--sp-line-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    position: sticky;
    top: 0;
    z-index: 13;
  }
  .mobilebar img {
    width: 80px;
    height: 28px;
  }
  .mobilebar .icon-btn,
  .mobilebar .menu-toggle {
    border-color: transparent;
    background: transparent;
  }
  .side-link {
    min-height: var(--sp-touch);
  }
  .sidebar {
    display: none;
    top: 56px;
    width: min(290px, 90vw);
    box-shadow: var(--sp-shadow-md);
    padding-top: 14px;
  }
  .sidebar.open {
    display: flex;
  }
  .sidebar > .brand {
    display: none;
  }
  .account-foot {
    margin-top: 16px;
  }
  .app-main {
    width: 100%;
    margin: 0;
    padding: 22px 15px 40px;
  }
  .discovery.rows .art-link {
    width: 28%;
    min-width: 82px;
  }
  .discover-body {
    padding: 10px;
  }
  .brief-head {
    align-items: flex-start;
    gap: 13px;
  }
  .brief-head > .cover {
    width: 30%;
  }
  .public-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 11px;
  }
  .public-main {
    padding-top: 22px;
  }
  .public-title {
    margin: 6px 0 20px;
  }
  .panel,
  .stat,
  .campaign-form fieldset {
    padding: 15px;
  }
  .stats {
    gap: 8px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .page-heading {
    margin-bottom: 17px;
  }
  .panel-heading {
    margin-bottom: 12px;
  }
}
@media (max-width: 420px) {
  .public-grid .tag {
    font-size: 0.59rem;
    padding: 3px 5px;
  }
  .brief-head {
    flex-direction: column;
  }
  .brief-head > .cover {
    width: 100%;
    max-width: 280px;
  }
  /* On phones the search box gets its own row, so its placeholder isn't cut short. */
  .catalog-controls .searchbox {
    flex-basis: 100%;
  }
  .catalog-controls select {
    flex: 1 1 40%;
    min-width: 0;
  }
  .discover-meta,
  .sample-meta {
    font-size: 0.7rem;
  }
  .panel .discovery-card {
    flex-direction: column;
  }
  .panel .discovery.rows .art-link {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* The page column holds the account banner above each workspace page. */
.app-column { margin-left: 230px; width: calc(100% - 230px); min-width: 0; }
.app-column > .app-main { margin-left: 0; width: auto; }
@media (max-width: 1100px) { .app-column { margin-left: 200px; width: calc(100% - 200px); } }
@media (max-width: 700px) { .app-column { margin-left: 0; width: 100%; } }
.account-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px clamp(15px, 3vw, 46px); background: #ffd9c4; color: var(--sp-ink); }
.account-banner[hidden] { display: none; }
.account-banner p { margin: 0; }
.account-banner .button { min-height: 36px; color: var(--sp-ink); background: var(--sp-cream); border-color: var(--sp-plum); }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 18px; align-items: start; }
.account-form { display: grid; gap: 12px; }
.account-form .button { justify-self: start; }
.account-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.account-status.ok { color: var(--sp-good); }
.account-foot .icon-btn { flex: none; }

/* Newsletter pages and the local inbox */
.public-main.narrow {
  max-width: 860px;
}
.muted {
  color: var(--muted, #667085);
}
.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.email-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  margin: 0;
}

/* Image upload fields */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.image-field .image-preview {
  display: block;
  max-width: min(320px, 100%);
  max-height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin: 6px 0;
}
.image-field .image-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.image-field label.button:focus-within {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Section tabs under the top bar. The top bar, the account menu and the tabs' look are shared
   components (theme.css), so the team pages and the slim bars on other pages match. */
.section-tabs {
  overflow-x: auto;
  padding: 0 clamp(15px, 3vw, 46px);
  scrollbar-width: thin;
}
.count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: auto;
  border-radius: var(--sp-radius-pill);
  background: var(--sp-accent);
  color: var(--sp-on-accent);
  font-size: 0.72rem;
  font-weight: 750;
}
.section-tabs .count-badge {
  margin-left: 2px;
}

/* Home: getting started checklist and Inbox list */
.checklist { display: grid; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.checklist li { display: flex; align-items: center; gap: 12px; }
.checklist .check { display: inline-grid; place-items: center; width: 24px; height: 24px; flex: none; border: 2px solid var(--border); border-radius: 50%; font-size: 0.8rem; font-weight: 800; }
.checklist li.done { color: var(--muted); }
.checklist li.done .check { background: var(--sp-good); border-color: var(--sp-good); color: var(--sp-good-bg); }
.checklist a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.inbox-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.inbox-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "kind status" "who status" "what status"; gap: 2px 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; }
.inbox-list a:hover, .inbox-list a:focus-visible { background: var(--raised); }
.inbox-kind { grid-area: kind; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.inbox-list strong { grid-area: who; }
.inbox-list .muted { grid-area: what; }
.inbox-list .pill { grid-area: status; align-self: center; }

/* Phones: tables read as cards, each value labelled with its column (see responsive-tables.js). */
@media (max-width: 700px) {
  .table-scroll { overflow-x: visible; }
  table[data-cards] > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table[data-cards], table[data-cards] > tbody, table[data-cards] > tbody > tr, table[data-cards] > tbody > tr > td { display: block; width: 100%; }
  table[data-cards] > tbody > tr { margin: 0 0 10px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--sub); }
  table[data-cards] > tbody > tr > td { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); align-items: start; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); text-align: left; }
  table[data-cards] > tbody > tr > td:last-child { border-bottom: 0; }
  table[data-cards] > tbody > tr > td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 0.74rem; font-weight: 650; }
  table[data-cards] > tbody > tr > td:not([data-label]) { display: block; }
  /* A long name on a button (the campaign in My key library) wraps instead of running out of the card. */
  table[data-cards] > tbody > tr > td .button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
}

/* In-page navigation: the current page dims and a bar runs along the top while the next one loads. */
#root.is-navigating .app-main {
  opacity: 0.55;
  transition: opacity 0.15s ease 0.1s;
}
#root.is-navigating::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  z-index: 50;
  background: linear-gradient(90deg, transparent, var(--sp-accent), transparent);
  background-size: 50% 100%;
  animation: loading-bar 1s linear infinite;
}
@keyframes loading-bar {
  from { background-position: -50% 0; }
  to { background-position: 150% 0; }
}
@media (prefers-reduced-motion: reduce) {
  #root.is-navigating::before { animation: none; background: var(--sp-accent); }
}

/* Error messages stay until dismissed. */
#notice.error {
  background: #ffd9c4;
  color: var(--sp-ink);
  border-color: var(--sp-accent);
}
#notice .notice-close {
  margin-left: 10px;
  padding: 4px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

/* Find campaigns: what a creator needs to do before joining. */
.catalog-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 18px; padding: 14px 16px; border: 1px solid var(--sp-wait-line); border-radius: var(--sp-radius-sm); background: var(--sp-wait-bg); }
.catalog-note p { margin: 0; flex: 1 1 320px; color: var(--sp-text); }

/* One campaign's tabs sit under its title. */
.campaign-tabs { margin: 4px 0 22px; padding: 0; }

/* Under "Claim another key" on a campaign brief. */
.claim-note { flex-basis: 100%; color: var(--sp-muted, var(--muted)); }

/* Tabs that scroll sideways on narrow screens: the current tab is brought into view
   (revealTabs in platform.js), and a fade on the right edge shows there is more. */
.section-tabs { position: relative; }
.section-tabs.scrolls { mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }

/* A creator's key on the campaign page. */
.your-key h2 { font-size: 1rem; margin: 0 0 8px; }
.your-key .key-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 6px; }
.your-key code { font-size: 1rem; padding: 4px 8px; border-radius: var(--sp-radius-md); background: var(--sp-field); overflow-wrap: anywhere; }

/* A panel's description never sits flush on the empty state or table under it. */
.panel > p + :is(.empty, .table-scroll, .table-wrap) { margin-top: 15px; }

/* Long links in application facts wrap instead of overflowing. */
.facts dd { overflow-wrap: anywhere; }

/* A button hidden with the hidden attribute stays hidden (.button sets its own display). */
.button[hidden] { display: none; }
