/* The free split sheet (round 6, 2026-10-24): a form on screen, a clean sheet on paper. */
.sheet {
  display: grid;
  gap: 32px;
  padding: clamp(20px, 3vw, 36px);
  border: 2px solid var(--ink);
  border-radius: 24px;
  background: var(--surface);
}
.sheet-head {
  display: none;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}
.sheet-kicker {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.sheet-made {
  font: 500 11px var(--mono);
  color: var(--muted);
}
.sheet-sec {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.sheet-sec legend,
.sheet-sec h2 {
  margin-bottom: 4px;
  padding: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.sheet-sec .opt {
  margin-left: 6px;
  font: 500 12px var(--mono);
  color: var(--muted);
}
.sheet-help {
  max-width: 72ch;
  font-size: 15px;
  color: var(--muted);
}
.song-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
.f-wide {
  grid-column: 1 / -1;
}
.f {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.f > span {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.f input,
.f select,
.f textarea {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  font: 400 16px var(--sans);
}
.f textarea {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
}
.f input:focus-visible,
.f select:focus-visible,
.f textarea:focus-visible {
  outline-offset: 1px;
  border-color: var(--accent);
}
.w-head,
.w-row {
  display: grid;
  grid-template-columns:
    minmax(0, 2fr) minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 1.6fr)
    84px 36px;
  gap: 8px;
  align-items: end;
}
.w-head span {
  font: 500 11px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.w-rows {
  display: grid;
  gap: 8px;
}
.w-row .f > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.share {
  position: relative;
}
.share input {
  padding-right: 26px;
  text-align: right;
}
.share::after {
  content: '%';
  position: absolute;
  right: 11px;
  bottom: 21px;
  transform: translateY(50%);
  line-height: 1;
  color: var(--muted);
}
.rm {
  width: 36px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
}
.rm:hover:not(:disabled) {
  background: var(--tint);
  color: var(--ink);
}
.rm:disabled {
  opacity: 0.3;
  cursor: default;
}
.w-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.w-total {
  font-weight: 600;
}
.w-total.ok {
  color: var(--ok);
}
.w-total.off {
  color: var(--accent);
}
.sign-rows {
  display: grid;
  gap: 26px;
}
.sign-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr) minmax(0, 1fr);
  gap: 16px;
  align-items: end;
}
.sign-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.sign-row .line {
  position: relative;
  height: 40px;
  border-bottom: 1.5px solid var(--ink);
}
.sign-row .line small {
  position: absolute;
  left: 0;
  bottom: -20px;
  font: 500 11px var(--mono);
  color: var(--muted);
}
.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.clear-ask {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}
.clear-ask[hidden] {
  display: none;
}
.sheet-saved {
  margin-left: auto;
  font-size: 14px;
  color: var(--muted);
}
.ss-notes {
  margin-top: 56px;
}
@media (max-width: 760px) {
  .w-head {
    display: none;
  }
  .w-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
  }
  .w-row .f > span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }
  .w-row .c-name {
    grid-column: 1 / -1;
  }
  .w-row .rm {
    justify-self: end;
  }
  .sign-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .sign-row .sign-name {
    grid-column: 1 / -1;
  }
}
@media (max-width: 520px) {
  .song-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* On paper: just the sheet, with lines to write on */
@media print {
  @page {
    margin: 14mm;
  }
  body {
    background: #fff;
    font-size: 12px;
  }
  .skip,
  .topbar,
  .foot,
  .ss-intro,
  .ss-notes,
  .ss-cta,
  .sheet-actions,
  .w-foot .btn,
  .rm,
  .sheet-help,
  .sheet-sec .opt {
    display: none !important;
  }
  .sub,
  .wrap {
    max-width: none;
    padding: 0;
  }
  .sheet {
    gap: 20px;
    padding: 0;
    border: 0;
    border-radius: 0;
  }
  .sheet-head {
    display: flex;
  }
  .sheet-sec legend,
  .sheet-sec h2 {
    font-size: 15px;
  }
  .f input,
  .f select,
  .f textarea {
    height: 26px;
    padding: 0 2px;
    border: 0;
    border-bottom: 1px solid #999;
    border-radius: 0;
    background: none;
    font-size: 12px;
    -webkit-appearance: none;
    appearance: none;
  }
  .f textarea {
    height: auto;
    resize: none;
  }
  .w-head {
    display: grid !important;
  }
  .w-head,
  .w-row {
    grid-template-columns:
      minmax(0, 2fr) minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.6fr)
      60px;
    padding: 0;
    border: 0;
  }
  .w-head span:last-child {
    display: none;
  }
  .w-row .f > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .w-row .c-name {
    grid-column: auto;
  }
  .share::after {
    bottom: 13px;
    right: 2px;
  }
  /* An unchosen PRO prints blank, and the date without its calendar button */
  .f select:has(option[value='']:checked) {
    color: transparent;
  }
  .f input::-webkit-calendar-picker-indicator {
    display: none;
  }
  .share input {
    padding-right: 14px;
  }
  .sign-row {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr) minmax(0, 1fr);
  }
  .sign-row .sign-name {
    grid-column: auto;
  }
  .sign {
    break-inside: avoid;
  }
}
