/* The studio side: a console blue masthead that names where you are, over a paper workspace. */

.masthead {
  background: var(--console);
  color: var(--ink);
}

.masthead__inner {
  max-width: calc(var(--column) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.masthead__inner > :last-child:not(.stages) {
  padding-bottom: 36px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font: 600 1.3rem / 1 var(--display);
  letter-spacing: -0.005em;
  text-decoration: none;
}

/* Centres the lowercase letters, not the line, on the mark's bars. */
.brand__name {
  transform: translateY(-0.125em);
}

.brand__mark {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.brand__mark rect:nth-child(3) {
  fill: var(--signal);
}

.topbar__nav {
  display: flex;
  gap: 4px;
}

.topbar__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border-radius: var(--radius-small);
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.topbar__link:hover {
  color: var(--ink);
}

.topbar__link[aria-current] {
  color: var(--ink);
}

.topbar__link[aria-current]::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 4px;
  left: 10px;
  height: 2px;
  border-radius: 1px;
  background: var(--signal);
}

/* The studio menu: account and settings live here as Convey grows. */
.studio-menu {
  position: relative;
  margin-left: auto;
}

.studio-menu__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 8px 0 4px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.925rem;
  list-style: none;
  cursor: pointer;
}

.studio-menu__toggle::-webkit-details-marker {
  display: none;
}

.studio-menu__toggle:hover, .studio-menu[open] .studio-menu__toggle {
  background: rgb(255 255 255 / 0.07);
  color: var(--ink);
}

.studio-menu__toggle .icon {
  width: 16px;
  height: 16px;
}

.studio-menu__avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--signal);
  color: var(--console-deep);
  font: 600 0.95rem / 1 var(--display);
}

.studio-menu__panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 220px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #163b62;
  box-shadow: 0 18px 40px rgb(2 10 22 / 0.4);
}

.studio-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font-size: 0.925rem;
  text-align: left;
  text-decoration: none;
}

.studio-menu__item:hover {
  background: rgb(255 255 255 / 0.08);
}

.studio-menu__state {
  color: var(--ink-faint);
  font-size: 0.85rem;
}

.studio-menu__form {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

@media (max-width: 640px) {
  .topbar {
    gap: 12px;
  }

  .studio-menu__name {
    display: none;
  }
}

.masthead__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  padding-top: 28px;
}

.masthead__heading {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.masthead__title {
  font-size: clamp(2.25rem, 5.5vw, 3.25rem);
  font-weight: 500;
  line-height: 1.02;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.masthead__summary {
  color: var(--ink-soft);
  font-size: 1rem;
}

.masthead__owed {
  margin-right: 4px;
  color: var(--money);
  font-size: 1.3rem;
}

/* Above the title, whose tall glyphs reach up into the crumb's hit area. */
.crumb {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  justify-self: start;
  margin-left: -4px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-decoration: none;
}

.crumb:hover {
  color: var(--ink);
}

.crumb .icon {
  width: 18px;
  height: 18px;
}

/* The workspace */

.page {
  max-width: calc(var(--column) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 28px var(--gutter) 80px;
}

.flash {
  margin-bottom: 20px;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-small);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  font-size: 0.95rem;
}

.sheet {
  display: grid;
  gap: 20px;
  max-width: 560px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.sheet + .sheet {
  margin-top: 20px;
}

.sheet__lede {
  color: var(--ink-soft);
}

.sheet__heading {
  font-size: 1.05rem;
  font-weight: 600;
}

.sheet--danger {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  border-style: dashed;
  background: none;
  box-shadow: none;
}

.sheet--danger p {
  font-size: 0.925rem;
}

.project-form {
  display: grid;
  gap: 18px;
}

.project-form__actions {
  display: flex;
  gap: 8px;
  padding-top: 4px;
}

@media (max-width: 640px) {
  .sheet {
    padding: 20px 18px;
  }
}

/* Signing in and creating an account, on console blue */

.auth {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 28px;
  min-height: calc(100dvh - 40px);
  padding: 40px var(--gutter);
}

.auth__brand {
  font-size: 1.75rem;
}

.auth__brand .brand__mark {
  width: 34px;
  height: 34px;
}

.auth__card {
  --ink: #14263b;
  --ink-soft: #55667b;
  --ink-faint: #8796a8;
  --line: #dbe2eb;
  --line-strong: #c4cfdc;
  --surface: #fff;
  --accent: #2860e6;
  --accent-strong: #1c4dc4;
  --on-accent: #fff;
  --danger: #b93226;
  --danger-soft: #fbe9e7;
  --sunken: #e4e9f0;
  --canvas: #eef2f7;

  display: grid;
  gap: 20px;
  width: min(100%, 400px);
  padding: 32px;
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: 0 30px 80px rgb(2 10 22 / 0.45);
  color: var(--ink);
  color-scheme: light;
}

.auth__title {
  font-size: 1.75rem;
}

.room .auth__card .input {
  background-color: var(--surface);
}

.auth__intro {
  margin-top: -12px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.auth__form {
  display: grid;
  gap: 16px;
}

.auth__form .button {
  margin-top: 4px;
}

.auth__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
  color: var(--ink-soft);
  font-size: 0.925rem;
}

.auth__links a {
  color: var(--ink);
}

@media (max-width: 480px) {
  .auth__card {
    padding: 24px 20px;
  }
}

/* Projects, grouped by whose move it is */

.boards {
  display: grid;
  gap: 36px;
}

.board {
  display: grid;
  gap: 10px;
}

.board__heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font: 500 1.3rem / 1.2 var(--display);
  letter-spacing: 0.01em;
}

.board__count {
  color: var(--ink-faint);
  font: 500 0.95rem / 1 var(--font);
}

.jobs {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: clip;
}

.jobs li + li {
  border-top: 1px solid var(--line);
}

.job {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) 9.5em;
  align-items: center;
  gap: 8px 28px;
  min-height: 84px;
  padding: 16px 24px;
  color: inherit;
  text-decoration: none;
  transition: background-color 120ms;
}

.job:hover {
  background: color-mix(in srgb, var(--accent-soft) 55%, transparent);
}

.job__name {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.job__title {
  overflow: hidden;
  font-size: 1.075rem;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job__artist {
  overflow: hidden;
  color: color-mix(in srgb, var(--ink) 70%, var(--ink-soft));
  font-size: 0.975rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job__progress {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.job__move {
  overflow: hidden;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job__stage {
  margin-right: 6px;
  color: var(--ink-soft);
}

.job__money {
  display: grid;
  justify-items: end;
  text-align: right;
}

.job__amount {
  color: var(--ink-soft);
  font-size: 1.025rem;
  font-weight: 600;
}

.job__amount[data-due] {
  color: var(--money-ink);
}

.job__money-note {
  color: var(--ink-faint);
  font-size: 0.825rem;
}

.board[data-who="done"] .job__title {
  color: var(--ink-soft);
}

/* Three steps of a job as meter segments: lit when done, signal while current, amber when money is owed. */
.meter {
  display: grid;
  grid-template-columns: repeat(3, 34px);
  gap: 4px;
}

.meter__step {
  height: 5px;
  border-radius: 3px;
  background: var(--sunken);
}

.meter__step[data-state="done"] { background: var(--console); }
.meter__step[data-state="current"] { background: var(--accent); }
.meter__step[data-state="outstanding"] { background: var(--money); }
.meter__step[data-state="skipped"] { background: repeating-linear-gradient(90deg, var(--line-strong) 0 4px, transparent 4px 7px); }

@media (max-width: 720px) {
  .job {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 16px;
    padding: 16px 18px;
  }

  .job__progress {
    grid-column: 1 / -1;
    grid-row: 2;
  }

}

.empty {
  display: grid;
  justify-items: center;
  gap: 14px;
  max-width: 520px;
  margin: 24px auto 0;
  padding: 48px 28px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-large);
  text-align: center;
}

.empty__mark .brand__mark {
  width: 44px;
  height: 44px;
  fill: var(--console);
}

.empty__mark .brand__mark rect:nth-child(3) {
  fill: var(--accent);
}

.empty__title {
  font-size: 1.85rem;
}

.empty__text {
  margin-bottom: 8px;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* A project: its name, the client's link, and its three steps as tabs into the page below */

.project__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
  padding-top: 24px;
}

.project__heading {
  display: grid;
  gap: 6px;
  min-width: 0;
}

/* The artist is the client: secondary to the title, but not a footnote. */
.project__byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin-top: 6px;
}

.project__artist {
  color: color-mix(in srgb, var(--ink) 82%, var(--ink-soft));
  font-size: 1.3rem;
  font-weight: 500;
}

.project__edit {
  min-height: 32px;
  border: 1px solid var(--line-strong);
  font-size: 0.875rem;
}

.project__edit .icon {
  width: 15px;
  height: 15px;
}

.share-link {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 4px 4px 4px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--sunken);
}

.share-link__label {
  flex: none;
  color: var(--ink-faint);
  font-size: 0.825rem;
}

.share-link__url {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 0.925rem;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-link__actions {
  display: flex;
  flex: none;
}

.project__link {
  flex: 0 1 400px;
}

@media (max-width: 640px) {
  .project__link {
    flex: 1 1 100%;
  }

  .share-link__label {
    display: none;
  }

  .share-link .button--quiet {
    padding-inline: 0.5em;
  }
}

.stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 32px;
}

.stage {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px 16px;
  border-radius: 14px 14px 0 0;
  background: none;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 120ms;
}

.stage:hover {
  color: var(--ink);
}

/* The open step is cut from the same paper as the page beneath it. */
.stage[aria-current] {
  --ink: #14263b;
  --ink-soft: #55667b;
  background: #eef2f7;
  color: var(--ink);
}

.stage__marker {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 600;
}

.stage[aria-current] .stage__marker {
  border-color: #c4cfdc;
}

.stage__marker .icon {
  width: 16px;
  height: 16px;
}

.stage[data-state="current"] .stage__marker {
  border-color: var(--signal);
  background: var(--signal);
  color: var(--console-deep);
}

.stage[aria-current][data-state="current"] .stage__marker {
  border-color: #2860e6;
  background: #2860e6;
  color: #fff;
}

.stage[data-state="done"] .stage__marker {
  border-color: transparent;
  background: rgb(111 211 160 / 0.2);
  color: #6fd3a0;
}

.stage[aria-current][data-state="done"] .stage__marker {
  background: #e0f2e9;
  color: #1d8659;
}

.stage[data-state="outstanding"] .stage__marker {
  border-color: var(--money);
  background: var(--money);
  color: var(--console-deep);
}

.stage[data-state="skipped"] .stage__marker {
  border-style: dashed;
}

.stage__text {
  display: grid;
  min-width: 0;
}

.stage__name {
  font: 500 1.15rem / 1.25 var(--display);
  letter-spacing: 0.01em;
}

.stage__status {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage[data-state="outstanding"] .stage__status {
  color: var(--money);
}

.stage[aria-current][data-state="outstanding"] .stage__status {
  color: #8a5800;
}

@media (max-width: 640px) {
  .stages {
    gap: 4px;
    margin-top: 24px;
  }

  .stage {
    flex-direction: column;
    gap: 6px;
    padding: 12px 4px 12px;
    text-align: center;
  }

  .stage__marker {
    width: 26px;
    height: 26px;
  }

  .stage__name {
    font-size: 1rem;
  }

  .stage__status {
    font-size: 0.75rem;
  }
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.stage-body {
  display: grid;
  gap: 20px;
}

/* Mixes: what the client has, the tracks and every version of them, and where new files go */

.sharing {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding: 18px 20px 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.sharing[data-state="unshared"], .sharing[data-state="changed"] {
  position: sticky;
  top: 10px;
  z-index: 5;
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: inset 4px 0 0 var(--accent), var(--shadow-raised);
}

.sharing[data-state="unreadable"] {
  border-color: var(--danger);
  box-shadow: inset 4px 0 0 var(--danger);
}

.sharing__text {
  display: grid;
  flex: 1 1 280px;
  gap: 6px;
}

.sharing__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 500 1.35rem / 1.2 var(--display);
  letter-spacing: 0.005em;
}

.sharing[data-state="live"] .sharing__title::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 4px var(--good-soft);
}

.sharing__detail {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.sharing[data-state="changed"] .sharing__detail, .sharing[data-state="unshared"] .sharing__detail {
  color: var(--ink);
}

.sharing__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sharing__settings {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.925rem;
}

.sharing__note {
  color: var(--ink-faint);
  font-size: 0.85rem;
}

.sharing__actions > .button:not(.button--quiet):not(.button--secondary) {
  min-width: 180px;
}

@media (max-width: 640px) {
  .sharing {
    padding: 16px;
  }

  /* Pinned, this card is a third of a phone screen, and it sits over the rows it is scrolled
     past — taking their taps, down to flipping a client-facing setting by mistake. It only
     pins where there is room for it. */
  .sharing[data-state="unshared"], .sharing[data-state="changed"] {
    position: relative;
  }

  .sharing__actions {
    flex: 1 1 100%;
  }

  .sharing__actions > .button:not(.button--quiet) {
    flex: 1;
  }
}

/* Sending: the bar that says what the client will get, and sends it */
.client-player__update {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-top: 4px;
  padding: 14px 14px 14px 20px;
  border-radius: 14px;
  background: var(--console);
  color: #eef2f7;
}

.client-player__changes {
  flex: 1 1 240px;
  font-size: 0.95rem;
}

.client-player__changes strong {
  font-weight: 600;
}

.client-player__changes .amount {
  color: var(--money);
  font-size: 1.1rem;
}

.client-player__publish .button {
  min-width: 200px;
  background: var(--signal);
  color: var(--console-deep);
}

.client-player__publish .button:hover {
  background: #8db2ff;
}

.client-player__publish .button:disabled {
  background: rgb(255 255 255 / 0.12);
  color: rgb(238 242 247 / 0.5);
}

@media (max-width: 640px) {
  .client-player__publish, .client-player__publish .button {
    width: 100%;
  }
}

.dropzone {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 56px 24px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-large);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  text-align: center;
  cursor: pointer;
  transition: border-color 120ms, background-color 120ms;
}

.dropzone:hover, .dropzone[data-active] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone:has(:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.dropzone__text {
  display: grid;
  gap: 2px;
}

.dropzone strong {
  font: 500 1.6rem / 1.2 var(--display);
  letter-spacing: 0.01em;
}

.dropzone__icon {
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  padding: 10px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.dropzone__hint {
  max-width: 46ch;
  margin-top: 8px;
  color: var(--ink-faint);
  font-size: 0.875rem;
  text-wrap: pretty;
}

/* Same bargain as .mixes__hint: a touch screen is told about the tap, not the drag it can't do. */
.dropzone__tap {
  display: none;
}

@media (hover: none) {
  .dropzone__drag {
    display: none;
  }

  .dropzone__tap {
    display: inline;
  }
}

/* What a drop left behind, rather than letting a file disappear without a word. Shaped like
   the other blocks in a stage column, tinted the way .stage-alert is; amber would say money. */
.upload-notice {
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  border-radius: var(--radius-large);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.925rem;
  text-wrap: pretty;
}

/* The track list: one quiet row per track, opened when there's work to do on it */

.mixes {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: clip;
}

.mixes__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 16px 16px 14px 22px;
  border-bottom: 1px solid var(--line);
}

.mixes__title {
  font: 500 1.35rem / 1.2 var(--display);
  letter-spacing: 0.005em;
}

.mixes__adding {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mixes__hint {
  color: var(--ink-faint);
  font-size: 0.875rem;
}

/* Nothing to drag files from on a touch screen. */
@media (hover: none) {
  .mixes__hint {
    display: none;
  }
}

/* Several files dragged over the window cover the whole list, since they go wherever their names say. */
.mixes__drop {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: none;
  padding: 8px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(2px);
  pointer-events: none;
}

.mixes[data-dropping] .mixes__drop {
  display: flex;
}

/* The message stays in view however long the list is. */
.mixes__drop > .mixes__drop-message {
  flex: 1;
}

.mixes__drop-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border: 2px dashed var(--accent);
  border-radius: calc(var(--radius-large) - 4px);
  background: color-mix(in srgb, var(--accent-soft) 85%, transparent);
  color: var(--ink-soft);
  font-size: 0.925rem;
  text-align: center;
}

.mixes__drop-text {
  position: sticky;
  top: 30vh;
  bottom: 30vh;
  display: grid;
  justify-items: center;
  gap: 6px;
  max-width: 34ch;
}

.mixes__drop-text .icon {
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
  color: var(--accent);
}

.mixes__drop-text strong {
  color: var(--accent-strong);
  font: 500 1.5rem / 1.2 var(--display);
}

/* A file dragged over the window can be dropped anywhere. */
.mixes__add[data-active] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* The pill hangs off the list rather than off the button, because the header dims while a file
   is in the air — and a faded element is a stacking context, which washed the pill out to 25%
   and dropped it behind the pinned share card. Several files get the overlay instead. */
.mixes:not([data-dropping]):has(.mixes__add[data-active])::after {
  content: "Drop to add mixes";
  position: fixed;
  bottom: calc(24px + var(--safe-bottom));
  left: 50%;
  z-index: 40;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--console);
  box-shadow: var(--shadow-raised);
  color: #fff;
  font-size: 0.95rem;
  pointer-events: none;
  transform: translateX(-50%);
}

.producer-tracks:not(:has(li)) {
  display: none;
}

.ptrack {
  background: var(--surface);
}

.ptrack + .ptrack {
  border-top: 1px solid var(--line);
}

.ptrack[data-changed] {
  box-shadow: inset 3px 0 0 var(--accent);
}

.ptrack.sortable-ghost {
  opacity: 0.4;
}

.ptrack__row {
  position: relative;
  display: grid;
  /* The player column has a fixed width, so a drop slot spans the same space on every row, the new-track row included. */
  --play-width: calc(30px + 1.6rem + 2.5rem + 16px);
  grid-template-columns: 22px 26px minmax(0, 1fr) minmax(0, 1.25fr) var(--play-width) 36px;
  grid-template-areas: "handle position title now play toggle";
  align-items: center;
  gap: 0 10px;
  min-height: 60px;
  padding: 8px 12px 8px 6px;
}

.ptrack__handle {
  display: grid;
  grid-area: handle;
  place-items: center;
  height: 40px;
  color: var(--line-strong);
  cursor: grab;
  touch-action: none;
}

.ptrack:hover .ptrack__handle {
  color: var(--ink-faint);
}

.ptrack__position {
  grid-area: position;
  color: var(--ink-faint);
  font-weight: 600;
  text-align: center;
}

.ptrack__title-form {
  grid-area: title;
  min-width: 0;
}

.ptrack__title {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  resize: none;
  field-sizing: content;
}

.ptrack__title:hover:not(:disabled) {
  border-color: var(--line);
}

.ptrack__title:focus {
  border-color: var(--accent);
  outline: none;
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.ptrack[data-removed] .ptrack__title {
  color: var(--ink-faint);
  text-decoration: line-through;
}

.ptrack__now {
  display: flex;
  grid-area: now;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-right: 18px;
  min-width: 0;
  font-size: 0.9rem;
}

/* The newest version, ready to play: the button, which version it is and how long it runs. */
.ptrack__play {
  display: grid;
  grid-area: play;
  grid-template-columns: 30px 1.6rem 2.5rem;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.ptrack__version {
  flex: none;
  color: var(--ink-soft);
  font-weight: 600;
}

.ptrack__state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  color: var(--ink-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ptrack__state[data-state="draft"] {
  color: var(--accent-strong);
  font-weight: 600;
}

.ptrack__state[data-state="failed"] {
  color: var(--danger);
  font-weight: 600;
}

.ptrack__restore {
  display: inline;
  flex: none;
}

.ptrack__badge {
  display: inline-flex;
  text-decoration: none;
  flex: none;
  align-items: center;
  gap: 4px;
  padding: 3px 10px 3px 8px;
  border: 0;
  border-radius: 999px;
  background: var(--comment);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.ptrack__badge .icon {
  width: 1.1em;
  height: 1.1em;
}

.ptrack__badge:hover {
  background: var(--comment-strong);
}

.ptrack__length {
  color: var(--ink-faint);
  font-size: 0.875rem;
}

.ptrack__toggle {
  display: grid;
  grid-area: toggle;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-faint);
}

.ptrack__toggle:hover {
  background: var(--canvas);
  color: var(--ink);
}

.ptrack__toggle .icon {
  transition: transform 160ms;
}

.ptrack[data-open] .ptrack__toggle .icon {
  transform: rotate(180deg);
}

/* Opened: every version on one side, what the client said on the other. */
.ptrack__detail {
  display: none;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 16px 24px;
  padding: 2px 18px 16px 62px;
}

.ptrack[data-open] .ptrack__detail {
  display: grid;
}

.ptrack__history {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.ptrack__footer {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  margin-top: -6px;
}

.versions {
  display: grid;
  justify-self: stretch;
  gap: 2px;
}

.pversion {
  display: grid;
  grid-template-columns: 26px 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 10px;
  padding: 6px 10px 6px 4px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.pversion[data-state="draft"] {
  background: var(--accent-soft);
}

.pversion__number {
  color: var(--ink-soft);
  font-weight: 600;
  text-align: center;
}

.pversion__body {
  display: grid;
  min-width: 0;
}

.pversion__name {
  min-width: 0;
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pversion__meta {
  color: var(--ink-faint);
  font-size: 0.8rem;
}

.pversion__meta .spinner {
  margin-right: 4px;
  vertical-align: -2px;
}

.pversion__failed {
  color: var(--danger);
  font-weight: 600;
}

.pversion__status {
  font-weight: 600;
  white-space: nowrap;
}

.pversion[data-state="draft"] .pversion__status {
  color: var(--accent-strong);
}

.pversion__aside {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  font-size: 0.85rem;
}

.pversion__comments {
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--ink-faint);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.pversion__comments .icon {
  width: 15px;
  height: 15px;
  color: var(--ink-faint);
}

.pversion__comments:hover {
  background: var(--canvas);
  color: var(--ink);
}

.pversion__comments[data-unread] {
  background: var(--comment-soft);
  color: var(--comment-strong);
  font-weight: 600;
}

.pversion__comments[data-unread] .icon {
  color: var(--comment);
}

.pversion__comments[data-unread]:hover {
  background: color-mix(in srgb, var(--comment) 16%, var(--surface));
}

.pversion__play {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--console);
  color: #fff;
  transition: background-color 120ms;
}

.pversion__play:hover {
  background: var(--accent);
}

.pversion__play--idle {
  background: var(--sunken);
}

.pversion__play .icon {
  width: 14px;
  height: 14px;
}

.pversion__play .icon--pause, .pversion__play[data-playing] .icon--play {
  display: none;
}

.pversion__play[data-playing] .icon--pause {
  display: block;
}

.pversion__play[data-playing] {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.pversion[data-movable] {
  cursor: grab;
}

.pversion__move {
  cursor: grab;
  touch-action: none;
  white-space: nowrap;
}

.pversion__move .icon {
  width: 12px;
  height: 12px;
  margin-right: 2px;
  vertical-align: -1px;
}

:root[data-dragging], :root[data-dragging] * {
  cursor: grabbing !important;
  user-select: none;
  -webkit-user-select: none;
}

.move-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  max-width: 280px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--console);
  box-shadow: var(--shadow-raised);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  overflow: hidden;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pversion__move-cancel, .pversion[data-picked] .pversion__move-pick {
  display: none;
}

.pversion[data-picked] .pversion__move-cancel {
  display: inline;
}

.pversion[data-picked] {
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
  background: var(--surface);
}

/* Where a file can go while one is being moved or dragged in: laid over the row it would join. */
.slot {
  display: none;
  grid-column: 4 / -1;
  grid-row: 1;
  z-index: 1;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  margin: -2px 0;
  padding: 0 14px;
  border: 1.5px dashed var(--accent);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
}

.mixes[data-moving] .slot {
  display: flex;
}

.slot__number {
  font-weight: 600;
}

.mixes[data-moving] .slot:is(:hover, :focus-visible, [data-over]) {
  border-style: solid;
  background: var(--accent);
  color: #fff;
}

/* Everything that dims during a move fades there and back. */
.masthead, .stage-body > *, .ptrack, .ptrack__handle, .pversion, .ptrack__footer, .ptrack__upload {
  transition: opacity 160ms ease-out;
}

/* While a file is being moved, only it and the places it can go stay lit. */
body:has(.mixes[data-moving]) :is(.masthead, .stage-body > :not(.mixes, .sharing)),
.mixes[data-moving] .ptrack:not(:has(.slot, [data-picked])),
.mixes[data-moving] :is(.mixes__header, .ptrack__handle, .pversion:not([data-picked]), .ptrack__footer, .ptrack__upload) {
  opacity: 0.25;
  pointer-events: none;
}

.mixes[data-moving] .ptrack[data-changed] {
  box-shadow: none;
}

/* The share card may be pinned over the places to drop, so it's washed out rather than see-through. */
body:has(.mixes[data-moving]) .sharing {
  pointer-events: none;
}

.sharing::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: color-mix(in srgb, var(--canvas) 75%, transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease-out;
}

body:has(.mixes[data-moving]) .sharing::after {
  opacity: 1;
}

/* The row for a new track opens when there's a file that could become one. */
.new-track {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 180ms cubic-bezier(0.2, 0, 0, 1), visibility 180ms;
}

.mixes:is([data-moving="revision"], [data-moving="file"]) .new-track {
  grid-template-rows: 1fr;
  visibility: visible;
}

.new-track__clip {
  min-height: 0;
  overflow: hidden;
}

.ptrack--new {
  border-top: 1px solid var(--line);
}

.ptrack__new-title {
  grid-area: title;
  padding: 8px 9px;
  color: var(--ink-soft);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .masthead, .stage-body > *, .ptrack, .ptrack__handle, .pversion, .ptrack__footer, .ptrack__upload, .sharing::after, .new-track, .ptrack__toggle .icon {
    transition: none;
  }
}

/* What the client said about a track, until the producer marks it read */
.pill {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--canvas);
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 600;
}

.pill--paid {
  background: var(--good-soft);
  color: var(--good);
}

.upload-progress {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
}

.upload-progress progress {
  width: 120px;
  height: 6px;
  appearance: none;
  border: 0;
  border-radius: 3px;
  background: var(--sunken);
  overflow: hidden;
}

.upload-progress progress::-webkit-progress-bar {
  background: var(--sunken);
}

.upload-progress progress::-webkit-progress-value {
  background: var(--accent);
  transition: width 200ms;
}

.upload-progress progress::-moz-progress-bar {
  background: var(--accent);
}

.upload-progress[data-state="failed"], .upload-progress[data-state="interrupted"] {
  color: var(--danger);
}

@media (max-width: 760px) {
  .ptrack__row {
    grid-template-columns: 22px minmax(0, 1fr) auto 36px;
    grid-template-areas: "handle title play toggle" "handle now now now";
    gap: 0 8px;
    padding: 8px 8px 10px 4px;
  }

  .ptrack__position {
    display: none;
  }

  .ptrack__now {
    justify-content: flex-start;
    padding: 2px 0 0 9px;
  }

  .ptrack__now:not(:has(*)) {
    display: none;
  }


  .slot {
    grid-column: 2 / -1;
    grid-row: 2;
    min-height: 40px;
  }

  .ptrack__detail {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 12px 14px 30px;
  }

  /* Not shared yet / Move / Discard don't fit on one line beside the version number, and the
     list clips what hangs off its edge, so Discard read "Disca". */
  .pversion__aside {
    grid-column: 3 / -1;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 2px 14px;
    margin-top: 4px;
  }

  .pversion__comments {
    justify-self: start;
    margin-left: -10px;
  }

  .ptrack--new .ptrack__row {
    grid-template-areas: "handle title title toggle" "handle now now now";
  }

  .ptrack--new .slot {
    grid-row: 2;
  }
}

/* A fingertip is blunter than a pointer. Every control in the list keeps the size it is drawn
   at and grows the area that answers a tap, so nothing shifts on a desktop. */
@media (pointer: coarse) {
  /* The handle spans both rows of a track, so it can take the whole left edge. It can't get
     much wider than that without taking taps from the title field beside it. */
  .ptrack__handle {
    position: relative;
    align-self: stretch;
    height: auto;
    min-height: 44px;
  }

  .ptrack__handle::after {
    content: "";
    position: absolute;
    inset: 0 -7px 0 -4px;
  }

  .ptrack__toggle, .ptrack__badge, .pversion__play {
    position: relative;
  }

  .ptrack__toggle::after {
    content: "";
    position: absolute;
    inset: -4px;
  }

  .ptrack__badge::after {
    content: "";
    position: absolute;
    inset: -9px 0;
  }

  .pversion__play::after {
    content: "";
    position: absolute;
    inset: -7px;
  }

  /* Move, Cancel move, Discard, Restore and Retry are a line of text each. Giving them a row
     to sit in is the one place the list does grow, and the phone has the room for it. */
  :is(.ptrack__now, .pversion__aside) .link-button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .slot, .mixes__add, .ptrack__upload {
    min-height: 44px;
  }
}

/* Panels: booking, final files and payment */

.panel {
  display: grid;
  gap: 14px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.panel__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}

.panel__heading {
  font: 500 1.35rem / 1.2 var(--display);
  letter-spacing: 0.005em;
}

.panel__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.panel__status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}

.panel__status[data-state="due"] { color: var(--money-ink); font-weight: 600; }
.panel__status[data-state="due"]::before { background: var(--money); }
.panel__status[data-state="done"] { color: var(--good); font-weight: 600; }
.panel__status[data-state="done"]::before { background: var(--good); }

.panel__hint {
  margin-top: -6px;
  color: var(--ink-soft);
  font-size: 0.925rem;
}

.panel__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.925rem;
}

.panel__link {
  font-size: 0.925rem;
  font-weight: 600;
  text-decoration: none;
}

.panel__link:hover {
  text-decoration: underline;
}

.ledger {
  display: grid;
}

.ledger__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 4px 16px;
  min-height: 56px;
  padding: 8px 0;
}

.ledger__row + .ledger__row {
  border-top: 1px solid var(--line);
}

.ledger--figures .ledger__row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.ledger__figure {
  text-align: right;
}

.ledger__note--danger {
  color: var(--danger);
}

.ledger__row > .numeric,
.ledger__figure > .numeric {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Lists of amounts in body type, so display type is kept for headline figures. */
.ledger--plain .ledger__figure > .numeric {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

/* Hangs off the row above, which it depends on. */
.ledger__row--nested {
  position: relative;
  padding-left: 28px;
}

.ledger__row + .ledger__row--nested {
  border-top: 0;
}

.ledger__row--nested::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 50%;
  left: 10px;
  width: 10px;
  border-bottom: 1.5px solid var(--ink-faint);
  border-left: 1.5px solid var(--ink-faint);
  border-bottom-left-radius: 4px;
}

.ledger__row--nested:has(+ .ledger__row--nested)::after {
  content: "";
  position: absolute;
  top: 50%;
  bottom: 0;
  left: 10px;
  border-left: 1.5px solid var(--ink-faint);
}

/* What Stripe charges at a glance: each fee once, with the ways to pay that cost it. */
.fee-summary {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px 24px;
  margin: 0;
}

.fee-summary__row {
  display: contents;
}

.fee-summary dt {
  font-variant-numeric: tabular-nums;
}

.fee-summary dd {
  margin: 0;
}

.fee-summary__note {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
}

.fee-summary__row[data-costly] dt {
  color: var(--danger);
}

.fee-summary__methods {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fee-summary__methods li {
  padding: 1px 9px;
  border-radius: var(--radius-small);
  background: var(--sunken);
  font-size: 0.875rem;
}

@media (max-width: 640px) {
  .fee-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .fee-summary dd {
    margin-bottom: 8px;
  }
}

/* While Stripe makes a change, the row being changed spins and the rest steps back. */
/* A fixed width, so the column label above lines up with the fees, not the switches. */
.payment-method__switch {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 62px;
}

.payment-method__busy {
  color: var(--accent);
  visibility: hidden;
}

[data-busy] .payment-method__busy {
  visibility: visible;
}

.panel[aria-busy] {
  cursor: progress;
}

.panel[aria-busy] .ledger__row:not([data-busy]) {
  opacity: 0.45;
  transition: opacity 150ms;
}

/* Column labels, quieter than the rows they label. */
.ledger__head {
  min-height: 0;
  padding: 0 0 8px;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.ledger__row--total {
  font-weight: 600;
}

.ledger__row--total > .numeric {
  font-size: 1.5rem;
}

.ledger__note {
  display: block;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 400;
}

.ledger__due {
  color: var(--money-ink);
}

.ledger__actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  min-width: 6em;
}

.ledger__actions .button:not(.button--quiet) {
  min-height: 36px;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .panel {
    padding: 18px 16px;
  }

  .ledger__row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .ledger__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    min-width: 0;
  }

  .ledger__actions:empty {
    display: none;
  }
}

.dropzone--compact {
  grid-template-columns: auto minmax(0, 1fr);
  justify-items: start;
  align-items: center;
  column-gap: 14px;
  padding: 16px 20px;
  text-align: left;
}

.dropzone--compact .dropzone__icon {
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 9px;
}

.dropzone--compact strong {
  font: 600 1rem / 1.3 var(--font);
}

.file-list {
  display: grid;
}

.file-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 36px;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 4px 0;
}

.file-row + .file-row {
  border-top: 1px solid var(--line);
}

.file-row__kind {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--canvas);
  color: var(--ink-soft);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.file-row__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 500;
}

.file-row__meta {
  font-size: 0.85rem;
  white-space: nowrap;
}

/* The mixes the client has, sent along as final files */
.final-mixes {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--canvas);
}

.final-mixes__toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  font-size: 0.95rem;
  font-weight: 500;
}

.final-mixes__note {
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 400;
}

.final-mixes .file-list {
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.final-mixes .file-row + .file-row {
  border-top-color: color-mix(in srgb, var(--line) 70%, transparent);
}

.file-row--mix {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 44px;
  padding-right: 4px;
}

.file-row__pick,
.pick {
  min-width: 0;
}

.pick {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  cursor: pointer;
}

.pick input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.file-row--mix:has(input[type="checkbox"]:not(:checked)) .file-row__name {
  color: var(--ink-faint);
  text-decoration: line-through;
}

/* What's next on a step, and the deposit when it's still owed */

.next-step, .stage-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 16px 18px 16px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--surface);
  color: var(--ink-soft);
  text-decoration: none;
  transition: border-color 120ms;
}

.next-step:hover, .stage-alert:hover {
  border-color: var(--line-strong);
}

.next-step__action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-weight: 600;
}

.next-step__arrow {
  transform: rotate(180deg);
}

.stage-alert {
  border-color: color-mix(in srgb, var(--money) 60%, transparent);
  background: var(--money-soft);
  color: var(--ink);
}

.aside {
  color: var(--ink-soft);
  font-size: 0.925rem;
  text-align: center;
}

/* Booking: the terms, then what to do about the deposit */

.terms, .booking {
  gap: 22px;
  padding: 28px;
}

.terms__header, .booking__text {
  display: grid;
  gap: 6px;
}

.terms__title, .booking__title {
  font: 500 1.75rem / 1.15 var(--display);
  letter-spacing: 0.005em;
}

.booking__title .amount, .terms__title .amount {
  color: var(--money-ink);
}

.terms__form {
  display: grid;
  gap: 22px;
  max-width: 460px;
}

.terms fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.terms legend {
  margin-bottom: 6px;
  padding: 0;
}

.money-input {
  display: grid;
  grid-template-columns: 7.25em minmax(0, 1fr);
}

.money-input .select {
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  background-color: var(--canvas);
  color: var(--ink-soft);
  font-size: 0.925rem;
}

.money-input .input {
  min-height: 56px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font: 500 1.75rem / 1 var(--display);
  letter-spacing: 0.01em;
}

.money-input .input::placeholder {
  color: var(--line-strong);
}

.money-input :focus {
  position: relative;
}

.choices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius);
  background: var(--sunken);
}

.choice {
  position: relative;
  display: grid;
}

.choice input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.choice span {
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 7px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 600;
}

.choice input:checked + span {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgb(13 36 64 / 0.14);
}

.choice input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.terms__preview {
  display: grid;
  gap: 4px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--canvas);
}

.terms__preview-heading {
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 600;
}

.terms__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.terms__actions .button:not(.button--quiet) {
  min-width: 140px;
}

/* Who pays what, and when */

.plan__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.plan__row + .plan__row {
  border-top: 1px solid var(--line);
}

.plan__marker {
  display: grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
}

.plan__marker:empty::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}

.plan__marker .icon {
  width: 14px;
  height: 14px;
}

.plan__row[data-state="due"] .plan__marker::before {
  background: var(--money);
  box-shadow: 0 0 0 4px var(--money-soft);
}

.plan__row[data-state="paid"] .plan__marker {
  background: var(--good);
}

.plan__what {
  display: grid;
  flex: 1;
  min-width: 0;
}

.plan__when {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.plan__amount {
  font: 500 1.35rem / 1 var(--display);
  letter-spacing: 0.01em;
}

.plan__row[data-state="due"] .plan__amount {
  color: var(--money-ink);
}

.plan__row[data-state="later"] .plan__amount {
  color: var(--ink-soft);
}

.plan__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0 2px 34px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-weight: 600;
}

.plan__total .numeric {
  font: 500 1.35rem / 1 var(--display);
  color: var(--ink);
}

.send-link {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 6px 6px 6px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--canvas);
}

.send-link__url {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.925rem;
}

.booking--done {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.booking__check, .complete__icon {
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 50%;
  background: var(--good-soft);
  color: var(--good);
}

@media (max-width: 640px) {
  .terms, .booking {
    padding: 22px 18px;
  }

  .send-link {
    flex-wrap: wrap;
    padding: 12px;
  }

  .send-link__url {
    flex-basis: 100%;
    padding-bottom: 8px;
  }

  .send-link .button {
    flex: 1;
  }

  .booking--done {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .booking__next {
    grid-column: 1 / -1;
  }
}

.complete {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: inset 4px 0 0 var(--good), var(--shadow-card);
}

.complete__title {
  font: 500 1.35rem / 1.2 var(--display);
}

/* Settings pages: card payments */
.settings-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--good-soft);
  color: var(--good);
  font-weight: 600;
}

.sheet__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.stripe-dashboard,
.stripe-overview,
.stripe-overview__alerts {
  display: grid;
  gap: 20px;
}

.stripe-overview__alerts {
  gap: 8px;
}

.stripe-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--caution-soft);
  color: var(--caution);
  font-weight: 600;
}

.stripe-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 24px;
}

.stripe-figures h2 {
  font-weight: 400;
}

.stripe-figures__amount {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.stripe-dashboard__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.stripe-dashboard__foot .stripe-badge {
  margin-left: auto;
}

/* Card networks and wallets ask for equal sizes and clear space around each mark. */
.payment-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.payment-marks img {
  display: block;
  width: auto;
  height: 24px;
}

.payment-brands {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.stripe-badge img {
  display: block;
  width: auto;
  height: 24px;
}

/* Convey's words sit on the paper; Stripe's form sits in its own frame. */
.stripe-setup {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

/* Stripe's form is long, so the guidance stays alongside it. */
.stripe-setup__guide {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 20px;
}

.stripe-setup__answer {
  display: grid;
  gap: 4px;
  padding-left: 12px;
  border-left: 2px solid var(--line-strong);
}

.stripe-setup__answer .sheet__heading {
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 400;
}

.stripe-setup__choice {
  font-weight: 600;
}

/* No overflow clipping here: Stripe's menus open beyond the form's edges. */
.stripe-frame {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.stripe-frame__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line-strong);
  border-radius: calc(var(--radius-large) - 1px) calc(var(--radius-large) - 1px) 0 0;
  background: var(--sunken);
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.stripe-onboarding {
  min-height: 120px;
  padding: 24px;
}

@media (max-width: 760px) {
  .stripe-setup {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .stripe-setup__guide {
    position: static;
  }

  .stripe-frame__bar {
    padding-inline: 16px;
  }

  .stripe-onboarding {
    padding: 16px;
  }
}

.page--bare {
  max-width: none;
  padding: 0;
}

.page--bare > .flash {
  max-width: 400px;
  margin: 24px auto -24px;
  border-left-color: var(--signal);
  background: rgb(255 255 255 / 0.08);
  box-shadow: none;
}
