/*
  Beatlibrary's look, carried over from the old producer app: one grey ramp with a faint violet cast, dark, flat
  surfaces, hairlines, Geist. The chrome stays greyscale. Colour is kept for what a song's state means: green for
  accepted, amber for something the producer has to fix, red for a field that was filled in wrong.
*/
@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: oklch(0.141 0.004 285.83);
  --panel: oklch(0.175 0.004 286);
  --raised: oklch(0.225 0.005 286);
  --hairline: oklch(0.245 0.005 286);
  --border: oklch(0.29 0.006 286);
  --input: oklch(0.34 0.006 286);
  --text: oklch(0.92 0.0053 286.32);
  --strong: oklch(0.985 0.0013 286.84);
  --muted: oklch(0.705 0.012 286.07);
  --ready: oklch(0.78 0.17 152);
  --attention: oklch(0.84 0.15 82);
  --wrong: oklch(0.72 0.17 22);
  --out: cubic-bezier(0.22, 1, 0.36, 1);
  --swap: cubic-bezier(0.2, 0, 0, 1);
  --gutter: clamp(20px, 3vw, 40px);
  /* a surface that floats: a hairline ring and two soft shadows instead of a hard border */
  --float: 0 0 0 1px var(--border), 0 2px 6px rgb(0 0 0 / 22%), 0 18px 48px rgb(0 0 0 / 42%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  font: 15px/1.55 "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: -0.01em;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-color: var(--border) transparent;
}
body {
  margin: 0;
  min-height: 100dvh;
}
h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
h1 {
  font-size: clamp(28px, 2.6vw, 34px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.045em;
  color: var(--strong);
  text-wrap: balance;
}
h2 {
  font-size: 15px;
  font-weight: 500;
  color: var(--strong);
}
p {
  text-wrap: pretty;
}
::selection {
  background: color-mix(in oklch, var(--text) 18%, transparent);
}
:where(a, button, input, select, [tabindex]):focus-visible {
  outline: 2px solid color-mix(in oklch, var(--text) 70%, transparent);
  outline-offset: 2px;
}
.muted {
  color: var(--muted);
}

/* --- the header ------------------------------------------------------------------------------------------- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding-inline: var(--gutter);
  background: color-mix(in oklch, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 40px; /* on a phone only the mark shows: still a 40px touch */
  min-height: 40px;
  border-radius: 8px;
  color: var(--strong);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.025em;
}
.brand img {
  border-radius: 6px;
  outline: 1px solid rgb(255 255 255 / 10%);
  outline-offset: -1px;
}
.top-note {
  color: var(--muted);
  font-size: 13px;
}

/* the producer's picture: their initial on a tint that is always the same for the same email */
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background:
    repeating-linear-gradient(135deg, rgb(255 255 255 / 8%) 0 3px, transparent 3px 9px),
    linear-gradient(135deg, var(--tint-a, var(--raised)), var(--tint-b, var(--border)));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 12%);
  color: var(--strong);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  text-shadow: 0 1px 2px rgb(0 0 0 / 35%);
}
.avatar.large {
  width: 40px;
  height: 40px;
  font-size: 16px;
}
.avatar-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-right: -4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  transition:
    background-color 0.16s,
    scale 0.16s;
}
.avatar-button:hover,
.avatar-button:has(+ .menu:popover-open) {
  background: var(--raised);
}
.avatar-button:active {
  scale: 0.96;
}
.menu {
  position: fixed;
  inset: 60px calc(var(--gutter) - 4px) auto auto;
  width: 264px;
  margin: 0;
  padding: 6px;
  border: 0;
  border-radius: 14px;
  background: var(--raised);
  box-shadow: var(--float);
  color: var(--text);
  opacity: 0;
  scale: 0.96;
  transform-origin: top right;
  transition:
    opacity 0.14s ease-in,
    scale 0.14s ease-in,
    overlay 0.14s allow-discrete,
    display 0.14s allow-discrete;
}
.menu:popover-open {
  opacity: 1;
  scale: 1;
  transition-duration: 0.2s;
  transition-timing-function: var(--out);
}
@starting-style {
  .menu:popover-open {
    opacity: 0;
    scale: 0.96;
  }
}
.menu-who {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  padding: 10px 10px 14px;
  border-bottom: 1px solid var(--border);
}
.menu-id {
  display: grid;
  min-width: 0;
}
.menu-name,
.menu-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-name {
  color: var(--strong);
  font-size: 14px;
  font-weight: 500;
}
.menu-email {
  color: var(--muted);
  font-size: 12px;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s;
}
.menu-item .icon {
  color: var(--muted);
}
.menu-item:hover {
  background: color-mix(in oklch, var(--raised), var(--text) 9%);
}

/* --- buttons and fields ------------------------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--strong);
  color: var(--bg);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.16s,
    color 0.16s,
    scale 0.16s,
    opacity 0.16s;
}
.btn:hover {
  background: color-mix(in oklch, var(--strong) 86%, var(--bg));
}
.btn:active:not(:disabled) {
  scale: 0.96;
}
.btn:disabled {
  opacity: 0.55;
  cursor: default;
}
.btn.wide {
  width: 100%;
  min-height: 44px;
}
.btn.quiet {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn.quiet:hover {
  background: var(--raised);
}
.btn.ghost {
  background: transparent;
  color: var(--muted);
}
.btn.ghost:hover:not(:disabled) {
  background: var(--raised);
  color: var(--text);
}
.btn.small {
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
/* a small control still takes a 40px touch */
.btn.small::after,
.filters button::after {
  content: "";
  position: absolute;
  inset: -4px 0;
}
.btn[aria-busy="true"]::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: turn 0.7s linear infinite;
}

.stack {
  display: grid;
  gap: 20px;
}
.field {
  display: grid;
  gap: 8px;
}
.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
input:not([type="checkbox"]),
select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--input);
  border-radius: 8px;
  background: color-mix(in oklch, var(--bg), var(--text) 3%);
  color: var(--strong);
  font: inherit;
  transition:
    border-color 0.16s,
    box-shadow 0.16s;
}
input::placeholder {
  color: color-mix(in oklch, var(--muted) 62%, transparent);
}
input:not([type="checkbox"]):hover,
select:hover {
  border-color: color-mix(in oklch, var(--input), var(--text) 18%);
}
input:not([type="checkbox"]):focus-visible,
select:focus-visible {
  outline: none;
  border-color: color-mix(in oklch, var(--text) 70%, transparent);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--text) 14%, transparent);
}
input[aria-invalid="true"] {
  border-color: var(--wrong);
}
input[aria-invalid="true"]:focus-visible {
  border-color: var(--wrong);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--wrong) 22%, transparent);
}
input:-webkit-autofill {
  -webkit-text-fill-color: var(--strong);
  box-shadow: 0 0 0 100px var(--panel) inset;
  caret-color: var(--strong);
}
.error {
  color: var(--wrong);
  font-size: 13px;
}
#code {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.32em;
}
#code::placeholder {
  letter-spacing: 0.32em;
}
.select {
  position: relative;
}
.select select {
  appearance: none;
  padding-right: 40px;
}
.select svg {
  position: absolute;
  right: 14px;
  top: 50%;
  translate: 0 -50%;
  color: var(--muted);
  pointer-events: none;
}
.tick {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 14px;
  cursor: pointer;
}
.tick input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--strong);
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tile {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--raised);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 5%);
  color: var(--text);
}
.tile .icon {
  width: 22px;
  height: 22px;
}

/* --- waiting: the shape of what is coming ---------------------------------------------------------------------- */
.sk {
  display: block;
  border-radius: 6px;
  background: var(--raised);
  box-shadow: none;
  animation: sk-pulse 1.5s ease-in-out infinite;
}
.avatar.sk {
  border-radius: 50%;
}
.sk-title {
  width: min(300px, 70%);
  height: 34px;
  border-radius: 8px;
}
.sk-text {
  width: min(520px, 100%);
  height: 12px;
  margin-top: 14px;
}
.sk-text.medium {
  width: min(260px, 70%);
}
.sk-text.short {
  width: min(140px, 40%);
}
.sk-box {
  min-height: 268px;
  border-radius: 16px;
}
.sk-lines {
  align-self: center;
}
.sk-lines .sk-text {
  margin-top: 20px;
}
.sk-ring {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.rows .sk-row {
  grid-template-columns: 28px minmax(0, 1fr);
  min-height: 69px;
}
.sk-row .sk-text {
  margin-top: 0;
}
.sk-row .sk-text + .sk-text {
  margin-top: 10px;
  opacity: 0.6;
}
.list-head .sk-text {
  margin-top: 0;
}
.doc .sk-text {
  width: 100%;
  margin-top: 16px;
}
.doc .sk-text:first-child {
  margin-top: 4px;
}
.doc .sk-text.medium {
  width: 64%;
}
.doc .sk-text.short {
  width: 32%;
  margin-top: 32px;
}

/* --- the page ----------------------------------------------------------------------------------------------- */
main {
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
  padding: clamp(32px, 6vh, 64px) var(--gutter) 140px;
}
.notice {
  display: flex;
  gap: 10px;
  align-items: baseline;
  max-width: 640px;
  margin: 0 auto 28px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--border);
  font-size: 14px;
  animation: rise 0.3s var(--out);
}
.notice::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--attention);
  translate: 0 -1px;
}
.lead {
  max-width: 56ch;
  margin-top: 10px;
  color: var(--muted);
}

/* arriving at a screen: its parts come in one after the other */
.arrive > :not(form),
.arrive > form > * {
  animation: rise 0.42s var(--out) both;
}
.arrive > :nth-child(2),
.arrive > form > :nth-child(2) {
  animation-delay: 70ms;
}
.arrive > :nth-child(3),
.arrive > form > :nth-child(3) {
  animation-delay: 140ms;
}
.arrive > :nth-child(n + 4),
.arrive > form > :nth-child(n + 4) {
  animation-delay: 210ms;
}

/* sign in, the producer name: one short column */
.narrow {
  max-width: 400px;
  margin-inline: auto;
  padding-top: clamp(16px, 6vh, 72px);
}
.narrow form {
  gap: 24px;
}
.narrow .after {
  display: grid;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 13px;
}
.after-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: -12px;
}
.narrow b {
  color: var(--text);
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* the two things to set up once, and which one this is */
.progress {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 12px;
}
.progress li {
  padding-bottom: 10px;
  border-bottom: 2px solid var(--hairline);
}
.progress .on {
  border-color: var(--strong);
  color: var(--strong);
}
.progress .done {
  border-color: var(--muted);
}

/* the agreement: a document to read, then sign */
.reading {
  max-width: 720px;
  margin-inline: auto;
}
.reading .progress {
  max-width: 400px;
}
.doc {
  max-height: min(40vh, 520px);
  overflow: auto;
  margin: 28px 0;
  padding: 24px 28px;
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--hairline);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.doc h3 {
  margin: 22px 0 6px;
  color: var(--strong);
  font-size: 14px;
  font-weight: 500;
}
.doc h3:first-child {
  margin-top: 0;
}
.doc p,
.doc ul {
  margin: 0 0 10px;
}
.doc ul {
  padding-left: 18px;
  list-style: disc;
}
.doc b {
  color: var(--text);
  font-weight: 500;
}
.sign {
  grid-template-columns: 1fr 1fr;
}
.sign > :not(.field) {
  grid-column: 1 / -1;
}
.sign .btn {
  justify-self: start;
  margin-top: 4px;
}

/* --- sending songs -------------------------------------------------------------------------------------------- */
.send {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: stretch;
  margin-top: 32px;
}
.drop {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  min-height: 268px;
  padding: 32px 24px;
  border: 1px dashed var(--input);
  border-radius: 16px;
  background: color-mix(in oklch, var(--panel), transparent 40%);
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.18s,
    background-color 0.18s;
}
.drop:hover {
  border-color: color-mix(in oklch, var(--input), var(--text) 30%);
  background: var(--panel);
}
.drop .tile {
  margin-bottom: 12px;
  transition: translate 0.25s var(--out);
}
.drop:hover .tile {
  translate: 0 -3px;
}
.drop-title {
  color: var(--strong);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.drop-sub {
  color: var(--muted);
  font-size: 14px;
}
.drop .btn {
  margin-top: 18px;
}

.anatomy {
  align-self: center;
}
.tree {
  margin-top: 14px;
  font-size: 14px;
}
.tree-root {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--strong);
  font-weight: 500;
}
.tree ul {
  margin: 4px 0 0 7px;
}
.tree li {
  position: relative;
  display: grid;
  grid-template-columns: 16px minmax(96px, 9.5em) minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 6px 0 6px 24px;
}
/* the branch to each file: a line down, and a tick across; the last one stops at its tick */
.tree li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-left: 1px solid var(--border);
}
.tree li:last-child::before {
  bottom: auto;
  height: 17px;
}
.tree li::after {
  content: "";
  position: absolute;
  left: 0;
  top: 17px;
  width: 15px;
  border-top: 1px solid var(--border);
}
.tree li .icon {
  align-self: center;
  color: var(--muted);
}
.tree .file {
  color: var(--text);
  white-space: nowrap;
}
.tree .note {
  color: var(--muted);
  font-size: 13px;
}
.tree .note b {
  color: var(--text);
  font-weight: 500;
}
/* something a producer must not miss, beside what goes in a zip */
.callout {
  display: flex;
  gap: 10px;
  align-items: baseline;
  max-width: 46ch;
  margin-top: 18px;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--border);
  font-size: 13.5px;
  color: var(--text);
}
.callout::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--attention);
  translate: 0 -1px;
}
.callout b {
  font-weight: 500;
  color: var(--strong);
}
.hint {
  max-width: 46ch;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}
.hint + .hint {
  margin-top: 8px;
}

/* --- the list of songs ---------------------------------------------------------------------------------------- */
.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 47px;
  margin-top: 56px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 2px; /* wrapped onto a second line, each pill keeps its own 40px touch */
  margin-right: -6px;
}
.filters button {
  position: relative;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.16s,
    color 0.16s,
    scale 0.16s;
}
.filters button:hover {
  color: var(--text);
}
.filters button:active {
  scale: 0.96;
}
.filters button[aria-pressed="true"] {
  background: var(--raised);
  color: var(--strong);
}
.filters .n {
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

/* nothing sent yet: what to do, and what will happen */
.empty {
  display: grid;
  justify-items: center;
  padding: 56px 16px 24px;
  text-align: center;
}
.empty-title {
  margin-top: 18px;
  color: var(--strong);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.empty-sub {
  max-width: 40ch;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}
.path {
  display: flex;
  align-items: center;
  margin-top: 28px;
  color: var(--muted);
  font-size: 13px;
}
.path li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.path li + li::before {
  content: "";
  width: clamp(16px, 5vw, 44px);
  margin-inline: 12px 4px;
  border-top: 1px dashed var(--input);
}
.path .ring {
  width: 22px;
  height: 22px;
}
.path li[data-glyph="progress"] .arc {
  stroke-dasharray: 64 100;
}
.path li[data-glyph="still"] .arc {
  opacity: 1;
  stroke-dasharray: 24 100;
}
.path li[data-glyph="check"] {
  color: var(--text);
}

.rows li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  column-gap: 16px;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid var(--hairline);
}
.row-name {
  overflow-wrap: anywhere;
  color: var(--strong);
  font-weight: 500;
}
.row-detail {
  margin-top: 1px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
}
li[data-tone="attention"] .row-detail {
  max-width: 70ch;
  color: var(--text);
}
.row-side {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.row-status {
  transition: color 0.3s;
}
li[data-tone="sent"] .row-status {
  color: var(--text);
}
li[data-tone="ready"] .row-status {
  color: var(--ready);
}
li[data-tone="attention"] .row-status {
  color: var(--attention);
}

/* a song whose files can be looked at: its name is the button, and the whole row is the place to click */
.rows li.opens {
  position: relative;
}
.row-open {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.row-open::after {
  content: "";
  position: absolute;
  inset: 0 -12px;
  border-radius: 12px;
  transition: background-color 0.16s;
}
.row-open:hover::after {
  background: color-mix(in oklch, var(--text) 4%, transparent);
}
.row-open:focus-visible {
  outline: none;
}
.row-open:focus-visible::after {
  outline: 2px solid color-mix(in oklch, var(--text) 70%, transparent);
  outline-offset: -2px;
}
.row-go {
  display: none;
  color: var(--border);
  transition:
    color 0.16s,
    translate 0.16s var(--out);
}
.opens .row-go {
  display: block;
}
.opens:hover .row-go {
  color: var(--muted);
  translate: 2px 0;
}

/*
  The mark at the head of every row: one ring that says where the song is. It turns while we look inside or check,
  fills as the zip goes up, and closes into a tick the moment the song is submitted. The tick is plain until our team
  accepts the song: green is theirs to give.
*/
.ring {
  flex: none;
  width: 28px;
  height: 28px;
  overflow: visible;
  color: var(--muted);
  transition: color 0.3s;
}
.ring circle,
.ring path {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ring .track {
  stroke: var(--border);
  transition: stroke 0.3s;
}
.ring .arc {
  stroke: currentColor;
  stroke-dasharray: 0 100;
  opacity: 0;
  transform: rotate(-90deg);
  transform-box: fill-box;
  transform-origin: center;
  transition:
    stroke-dasharray 0.35s var(--out),
    opacity 0.2s;
}
/* the tick and the "!" swap in: small and soft, then sharp */
.ring .check,
.ring .bang {
  stroke: currentColor;
  opacity: 0;
  scale: 0.25;
  filter: blur(4px);
  transform-box: fill-box;
  transform-origin: center;
  transition:
    opacity 0.3s var(--swap),
    scale 0.3s var(--swap),
    filter 0.3s var(--swap);
}
.ring .check {
  stroke-dasharray: 1;
}
.ring .ripple {
  stroke: var(--mark, var(--ready));
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
[data-glyph="wait"] > .ring .track {
  stroke-dasharray: 2 4.91;
}
[data-glyph="spin"] > .ring .arc {
  opacity: 1;
  stroke-dasharray: 24 100;
  animation: ring-turn 0.9s linear infinite;
}
[data-glyph="progress"] > .ring {
  color: var(--strong);
}
[data-glyph="progress"] > .ring .arc {
  opacity: 1;
}
[data-glyph="check"] > .ring {
  color: var(--ready);
}
li[data-tone="sent"] {
  --mark: var(--text);
}
li[data-tone="sent"][data-glyph="check"] > .ring {
  color: var(--mark);
}
[data-glyph="check"] > .ring .arc {
  opacity: 1;
  stroke-dasharray: 100 100;
}
[data-glyph="check"] > .ring .check,
[data-glyph="bang"] > .ring .bang {
  opacity: 1;
  scale: 1;
  filter: blur(0);
}
[data-glyph="bang"] > .ring {
  color: var(--attention);
}
[data-glyph="bang"] > .ring .track {
  stroke: color-mix(in oklch, var(--attention) 45%, transparent);
}

/* submitted (or accepted), just now: the ring closes, the tick is drawn, the row glows once */
.fresh[data-glyph="check"] {
  animation: row-glow 1.8s ease-out;
}
.fresh[data-glyph="check"] > .ring {
  animation: ring-pop 0.55s var(--out);
}
.fresh[data-glyph="check"] > .ring .check {
  animation: tick-draw 0.4s 0.2s var(--out) both;
}
.fresh[data-glyph="check"] > .ring .ripple {
  animation: ring-ripple 0.8s 0.15s ease-out;
}
.rows li.enter {
  animation: rise 0.3s var(--out);
}

@keyframes turn {
  to {
    rotate: 360deg;
  }
}
@keyframes sk-pulse {
  50% {
    opacity: 0.45;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    translate: 0 10px;
    filter: blur(4px);
  }
}
@keyframes ring-turn {
  from {
    transform: rotate(-90deg);
  }
  to {
    transform: rotate(270deg);
  }
}
@keyframes tick-draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes ring-pop {
  0% {
    scale: 0.82;
  }
  55% {
    scale: 1.14;
  }
  100% {
    scale: 1;
  }
}
@keyframes ring-ripple {
  from {
    opacity: 0.55;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.9);
  }
}
@keyframes row-glow {
  from {
    background: color-mix(in oklch, var(--mark, var(--ready)) 9%, transparent);
  }
  to {
    background: transparent;
  }
}

/* --- while songs are going up: how far along, and "keep this page open" --------------------------------------- */
.dock {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 30;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 14px;
  align-items: center;
  width: min(420px, calc(100vw - 32px));
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--raised);
  box-shadow: var(--float);
  opacity: 0;
  visibility: hidden;
  translate: -50% 8px;
  transition:
    opacity 0.16s ease-in,
    translate 0.16s ease-in,
    visibility 0.16s;
}
.dock.open {
  opacity: 1;
  visibility: visible;
  translate: -50% 0;
  transition:
    opacity 0.28s var(--out),
    translate 0.28s var(--out),
    visibility 0.28s;
}
.dock-title {
  color: var(--strong);
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.dock-sub {
  color: var(--muted);
  font-size: 13px;
}

/* --- one song, opened: what reached us, file by file ---------------------------------------------------------- */
.sheet {
  position: fixed;
  inset: 12px 12px 12px auto;
  width: min(440px, calc(100vw - 24px));
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--float);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  translate: 16px 0;
  transition:
    opacity 0.16s ease-in,
    translate 0.16s ease-in,
    overlay 0.16s allow-discrete,
    display 0.16s allow-discrete;
}
.sheet[open] {
  opacity: 1;
  translate: 0 0;
  transition:
    opacity 0.28s var(--out),
    translate 0.28s var(--out),
    overlay 0.28s allow-discrete,
    display 0.28s allow-discrete;
}
.sheet::backdrop {
  background: rgb(0 0 0 / 0%);
  transition:
    background-color 0.2s,
    overlay 0.2s allow-discrete,
    display 0.2s allow-discrete;
}
.sheet[open]::backdrop {
  background: rgb(0 0 0 / 50%);
}
@starting-style {
  .sheet[open] {
    opacity: 0;
    translate: 16px 0;
  }
  .sheet[open]::backdrop {
    background: rgb(0 0 0 / 0%);
  }
}
.sheet-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 16px 14px 24px;
  background: var(--panel);
}
.sheet-head h2 {
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.sheet-status {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.sheet[data-tone="sent"] .sheet-status {
  color: var(--text);
}
.sheet[data-tone="ready"] .sheet-status {
  color: var(--ready);
}
.sheet[data-tone="attention"] .sheet-status {
  color: var(--attention);
}
.sheet-close {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  margin-top: -3px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition:
    background-color 0.16s,
    color 0.16s,
    scale 0.16s;
}
.sheet-close::after {
  content: "";
  position: absolute;
  inset: -4px;
}
.sheet-close:hover {
  background: var(--raised);
  color: var(--text);
}
.sheet-close:active {
  scale: 0.96;
}
.sheet-detail {
  padding: 0 24px 20px;
  color: var(--muted);
  font-size: 13px;
  border-bottom: 1px solid var(--hairline);
}
.sheet[data-tone="attention"] .sheet-detail {
  color: var(--text);
  font-size: 14px;
}
.sheet-body {
  padding: 4px 24px 28px;
}
.sheet-body h3 {
  display: flex;
  gap: 6px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.sheet-body h3 .n {
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}
.sheet-body ul {
  margin-top: 6px;
}
.sheet-body li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  column-gap: 12px;
  align-items: baseline;
  padding: 7px 0;
  font-size: 14px;
}
.sheet-body li .icon {
  align-self: center;
  color: var(--muted);
}
.sheet-file {
  overflow-wrap: anywhere;
  color: var(--text);
}
.sheet-file .dir {
  color: var(--muted);
}
.sheet-note {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sheet-say {
  margin-top: 22px;
  color: var(--muted);
  font-size: 14px;
}
.sheet-wait {
  padding-top: 10px;
}

/* --- the landing page: what the partnership is, what to send, what it pays ------------------------------------- */
a.btn {
  text-decoration: none;
}
.lp {
  --lp-gap: clamp(72px, 11vh, 120px);
}
.lp h2,
.lp h3 {
  color: var(--strong);
  font-weight: 500;
}
.lp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding-top: clamp(8px, 4vh, 48px);
}
.lp-hero h1 {
  font-size: clamp(36px, 4.6vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}
.lp-hero .lead {
  max-width: 46ch;
  margin-top: 20px;
  font-size: 16px;
}
.lp-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 32px;
}
.lp-actions .btn,
.lp-closing .btn {
  min-height: 44px;
  padding-inline: 22px;
}
.lp-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.16s;
}
.lp-more:hover {
  color: var(--strong);
}
.lp-more .icon {
  transition: translate 0.16s var(--out);
}
.lp-more:hover .icon {
  translate: 0 2px;
}
.lp-note,
.lp-small {
  color: var(--muted);
  font-size: 13px;
}
.lp-note {
  margin-top: 14px;
}
.lp-sure {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 36px;
  color: var(--text);
  font-size: 13px;
}
.lp-sure li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lp-sure .icon {
  color: var(--muted);
}
/* the list a producer will have, with one song on its way up */
.lp-demo {
  padding: 8px 22px 6px;
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--float);
}
.lp-demo-head {
  padding: 14px 4px 12px;
  border-bottom: 1px solid var(--hairline);
  color: var(--strong);
  font-weight: 500;
}
.lp-demo .rows li:last-child {
  border-bottom: 0;
}
.lp-deal {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px clamp(24px, 4vw, 56px);
  margin-top: var(--lp-gap);
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
}
.lp-deal h2 {
  font-size: 17px;
  letter-spacing: -0.02em;
}
.lp-deal p,
.lp-steps p,
.lp-qa p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}
.lp-section {
  margin-top: var(--lp-gap);
  scroll-margin-top: 96px;
}
.lp-title {
  max-width: 22ch;
  font-size: clamp(24px, 2.6vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.lp-sub {
  max-width: 52ch;
  margin-top: 10px;
  color: var(--muted);
}
.lp-how,
.lp-money,
.lp-questions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px clamp(32px, 6vw, 80px);
  align-items: start;
}
.lp-steps {
  display: grid;
  gap: 28px;
  margin-top: 36px;
}
.lp-steps li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.lp-steps h3,
.lp-rules h3,
.lp-zip h3 {
  font-size: 15px;
}
.lp-steps h3 {
  margin-top: 2px;
}
.lp-steps p {
  max-width: 48ch;
}
.lp-zip {
  align-self: center;
  padding: 26px 28px 22px;
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--hairline);
}
.lp-money {
  align-items: center;
}
.lp-calc {
  padding: 26px 28px;
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--hairline);
  font-variant-numeric: tabular-nums;
}
.lp-calc-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}
.lp-calc-top output {
  color: var(--strong);
  font-weight: 500;
}
.lp-calc input[type="range"] {
  --at: 0.1;
  display: block;
  width: 100%;
  height: 40px; /* the touch, not the track */
  min-height: 0;
  margin: 4px 0 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  appearance: none;
  background: none;
  cursor: pointer;
}
.lp-calc input[type="range"]:focus-visible {
  outline: 2px solid color-mix(in oklch, var(--text) 70%, transparent);
  outline-offset: 2px;
  box-shadow: none;
}
.lp-calc input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--strong) calc(var(--at) * 100%), var(--border) 0);
}
.lp-calc input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--border);
}
.lp-calc input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 2px;
  background: var(--strong);
}
.lp-calc input[type="range"]::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  margin-top: -8px;
  appearance: none;
  border-radius: 50%;
  background: var(--strong);
  box-shadow: 0 1px 4px rgb(0 0 0 / 45%);
  transition: scale 0.16s;
}
.lp-calc input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: var(--strong);
  box-shadow: 0 1px 4px rgb(0 0 0 / 45%);
}
.lp-calc input[type="range"]:active::-webkit-slider-thumb {
  scale: 1.12;
}
.lp-calc-total {
  margin-top: 18px;
  color: var(--strong);
  font-size: clamp(40px, 5vw, 52px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.05em;
}
.lp-calc dl {
  display: grid;
  gap: 8px;
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
}
.lp-calc dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.lp-calc dt {
  color: var(--muted);
}
.lp-calc dd {
  margin: 0;
  color: var(--text);
}
.lp-calc dd#calc-bonus {
  color: var(--muted);
  transition: color 0.2s;
}
.lp-calc dd#calc-bonus.reached {
  color: var(--ready);
}
.lp-calc-bar {
  height: 4px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--border);
}
.lp-calc-bar span {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--strong);
  transform-origin: left;
  scale: var(--share, 0) 1;
  transition: scale 0.2s var(--out);
}
.lp-calc .lp-small {
  margin-top: 16px;
}
.lp-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.lp-rules > div {
  padding: 24px 26px;
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--hairline);
}
.lp-rules ul {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  font-size: 14px;
}
.lp-rules li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}
.lp-rules .icon {
  align-self: center;
  color: var(--wrong);
}
.lp-rules [data-ok] .icon {
  color: var(--ready);
}
.lp-qa {
  border-top: 1px solid var(--hairline);
}
.lp-qa details {
  border-bottom: 1px solid var(--hairline);
}
.lp-qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 10px 0;
  color: var(--strong);
  font-weight: 500;
  list-style: none;
  cursor: pointer;
  transition: color 0.16s;
}
.lp-qa summary::-webkit-details-marker {
  display: none;
}
.lp-qa summary .icon {
  color: var(--muted);
  transition: rotate 0.2s var(--out);
}
.lp-qa details[open] summary .icon {
  rotate: 180deg;
}
.lp-qa details p {
  max-width: 56ch;
  margin-top: 0;
  padding-bottom: 20px;
}
.lp-closing {
  display: grid;
  justify-items: center;
  margin-top: var(--lp-gap);
  padding: clamp(48px, 9vh, 88px) 24px;
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--hairline);
  text-align: center;
}
.lp-closing h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.045em;
}
.lp-closing > p:first-of-type {
  max-width: 40ch;
  margin-top: 12px;
  color: var(--muted);
}
.lp-closing .btn {
  margin-top: 28px;
}
.lp-closing .lp-small {
  margin-top: 28px;
}
.lp-closing .lp-small a {
  color: var(--text);
  text-underline-offset: 3px;
}
@media (max-width: 820px) {
  .lp-hero,
  .lp-how,
  .lp-money,
  .lp-questions {
    grid-template-columns: minmax(0, 1fr);
  }
  .lp-deal,
  .lp-rules {
    grid-template-columns: minmax(0, 1fr);
  }
  .lp-title {
    max-width: none;
  }
}
@media (max-width: 560px) {
  .lp-demo,
  .lp-zip,
  .lp-calc,
  .lp-rules > div {
    padding-inline: 18px;
  }
  .lp-demo .row-side {
    justify-content: flex-start;
  }
}

/* --- dragging files over the window ---------------------------------------------------------------------------- */
.drop-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  padding: 16px;
  background: color-mix(in oklch, var(--bg) 82%, transparent);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.18s,
    visibility 0.18s;
}
.drop-layer.over {
  opacity: 1;
  visibility: visible;
}
.drop-layer > div {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  height: 100%;
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--text) 30%, transparent);
  text-align: center;
}
.drop-layer .tile {
  margin-bottom: 14px;
  translate: 0 6px;
  transition: translate 0.3s var(--out);
}
.drop-layer.over .tile {
  translate: 0;
}
.drop-layer-title {
  color: var(--strong);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

@media (max-width: 820px) {
  .send {
    grid-template-columns: minmax(0, 1fr);
  }
  .drop,
  .sk-box {
    min-height: 220px;
  }
}
@media (max-width: 560px) {
  .brand span,
  .top-note {
    display: none;
  }
  .sign {
    grid-template-columns: 1fr;
  }
  .doc {
    padding: 18px;
  }
  .list-head {
    flex-wrap: wrap;
  }
  .filters {
    margin-left: -12px;
  }
  .rows li {
    grid-template-columns: 28px minmax(0, 1fr);
    row-gap: 6px;
  }
  .row-side {
    grid-column: 2;
    justify-content: space-between;
  }
  .tree li {
    grid-template-columns: 16px minmax(0, 1fr);
  }
  .tree .note {
    grid-column: 2;
    margin-top: -6px;
  }
  .path li + li::before {
    margin-inline: 8px 0;
  }
  /* on a phone the panel comes up from the bottom */
  .sheet {
    inset: auto 0 0;
    width: 100%;
    max-height: 86dvh;
    border-radius: 16px 16px 0 0;
    translate: 0 16px;
  }
  .sheet-body li {
    grid-template-columns: 16px minmax(0, 1fr);
  }
  .sheet-note {
    grid-column: 2;
  }
}
@media (max-width: 560px) {
  @starting-style {
    .sheet[open] {
      translate: 0 16px;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-glyph="spin"] > .ring .arc {
    stroke-dasharray: 100 100;
    opacity: 0.45;
  }
}
