/* Posterizer. One world: a broadcast rundown. Navy studio field, rundown paper, tally orange for "on air next". */

@font-face {
  font-family: "Archivo";
  src: url("/static/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --ink: #0f2a3d;
  --ink-2: #17384f;
  --ink-3: #214a66;
  --ink-line: rgb(246 243 234 / 0.18);
  --on-ink: #f6f3ea;
  --on-ink-2: #b9c8d1;

  --paper: #f6f3ea;
  --paper-2: #ebe7da;
  --paper-line: rgb(15 42 61 / 0.18);
  --on-paper-2: #40566a;

  --air: #ff5a1f;
  --air-deep: #c93f0c;
  --aired: #9bd3c7;
  --aired-deep: #17665a;
  --fail: #b3261e;
  --fail-on-ink: #ffa697;

  --c1: #ffd23f;
  --c2: #9bd3c7;
  --c3: #ff9db0;
  --c4: #8ec5ff;
  --c5: #c8b6ff;
  --c6: #c4e86b;

  --radius: 4px;
  --wrap: 76rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --snap: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --focus: var(--ink);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--ink-3) var(--paper-2);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  margin: 0;
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-stretch: 100%;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  caret-color: var(--air-deep);
  font-variant-numeric: tabular-nums;
}

::selection {
  background: var(--air);
  color: var(--ink);
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd,
figure {
  margin: 0;
}
ol,
ul {
  padding: 0;
  list-style: none;
}

.sr-only,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10;
  padding: 0.6rem 0.9rem;
  background: var(--paper);
  color: var(--ink);
}

/* ---------------------------------------------------------------- labels */

.chip,
.state,
.board-tag,
.t,
.cell-time,
.clock-label,
.run-day,
.preview-label,
.creator-label,
legend,
.count {
  font-stretch: 78%;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  font-size: 0.78rem;
  line-height: 1.2;
}

.chip {
  display: inline-block;
  padding: 0.22rem 0.42rem 0.18rem;
  border-radius: 2px;
  color: var(--ink);
  background: var(--c1);
  white-space: nowrap;
}
.chip.c2 { background: var(--c2); }
.chip.c3 { background: var(--c3); }
.chip.c4 { background: var(--c4); }
.chip.c5 { background: var(--c5); }
.chip.c6 { background: var(--c6); }

.handle {
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* A status is always a shape plus a word, never colour alone. */
.state {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  white-space: nowrap;
}
.state::before {
  content: "";
  width: 0.7em;
  height: 0.7em;
  flex: none;
  border-radius: 50%;
  border: 2px solid currentColor;
}
.s-processing::before { border-style: dashed; }
.s-inbox { color: var(--ink-3); }
.s-inbox::before { border-radius: 1px; }
.s-published { color: var(--aired-deep); }
.s-published::before { background: currentColor; }
.s-failed { color: var(--fail); }
.s-failed::before {
  border-radius: 0;
  border-width: 0;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 2.75rem;
  padding: 0.6rem 1.15rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-stretch: 82%;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.1;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background-color var(--snap), color var(--snap), border-color var(--snap), transform var(--snap);
}
.btn:active {
  transform: translateY(1px);
}
.btn[disabled],
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
}
.btn-air {
  background: var(--air);
  color: var(--ink);
}
.btn-air:hover:not([disabled]) {
  background: #ff7a48;
}
.btn-ink {
  background: var(--ink);
  color: var(--on-ink);
}
.btn-ink:hover:not([disabled]) {
  background: var(--ink-3);
}
.btn-line {
  border-color: currentColor;
  color: inherit;
}
.btn-line:hover {
  background: rgb(246 243 234 / 0.12);
}
.btn-quiet {
  color: inherit;
  border-color: var(--ink-line);
}
.btn-quiet:hover {
  border-color: currentColor;
}
.btn-small {
  min-height: 2.25rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-color: var(--paper-line);
}
.btn-small:hover:not(.btn-ink):not(.btn-air) {
  border-color: var(--ink);
}
.btn-small.btn-ink,
.btn-small.btn-air {
  border-color: transparent;
}
.btn-danger {
  color: var(--fail);
  border-color: rgb(179 38 30 / 0.4);
}
.btn-danger:hover {
  border-color: var(--fail);
  background: rgb(179 38 30 / 0.07);
}
.btn-wide {
  width: 100%;
}
.inline {
  display: inline;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* ------------------------------------------------------------------- bar */

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1.75rem;
  row-gap: 0.35rem;
  padding: 0.9rem var(--gutter);
  border-bottom: 1px solid var(--paper-line);
}
.mark,
.foot-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-stretch: 68%;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
}
.tally {
  width: 0.62em;
  height: 0.62em;
  border-radius: 50%;
  background: var(--air);
}
/* The light only blinks on the studio field; in the app and footer it is a steady mark. */
.v-studio .bar .tally {
  animation: tally 2.6s ease-in-out infinite;
}
@keyframes tally {
  50% { opacity: 0.35; }
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.4rem;
}
.nav a {
  font-weight: 550;
  font-size: 0.98rem;
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover {
  border-bottom-color: currentColor;
}
.nav a[aria-current="page"] {
  border-bottom-color: var(--air);
}
.nav-legal a {
  font-weight: 450;
}
.bar-end {
  margin-left: auto;
}

.v-studio .bar,
.v-app .bar {
  background: var(--ink);
  color: var(--on-ink);
  border-bottom-color: var(--ink-line);
}
.v-studio,
.v-studio .bar,
.v-app .bar {
  --focus: var(--c1);
}
.v-studio main,
.v-app main,
.v-paper main,
.foot {
  --focus: var(--ink);
}

/* --------------------------------------------------------------- studio */

.studio {
  --focus: var(--c1);
  background: var(--ink);
  color: var(--on-ink);
  padding: clamp(2rem, 4vw, 3.25rem) var(--gutter) 0;
  overflow: hidden;
  scrollbar-color: var(--ink-3) var(--ink);
}
.lede {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  column-gap: clamp(2rem, 4vw, 4rem);
  align-items: end;
  max-width: calc(var(--wrap) + 8rem);
  margin: 0 auto;
}
.lede h1 {
  grid-row: 1 / span 3;
}
.lede .standfirst {
  margin-top: 0;
}
.lede h1 {
  max-width: 15ch;
  font-stretch: 62%;
  font-weight: 800;
  font-size: clamp(3rem, 8.6vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  text-wrap: balance;
}
.standfirst {
  max-width: 56ch;
  margin-top: 1.5rem;
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.45;
}
.studio .standfirst {
  color: var(--on-ink);
}
.fine {
  max-width: 60ch;
  margin-top: 1.1rem;
  font-size: 0.92rem;
  color: var(--on-paper-2);
}
.studio .fine,
.close .fine {
  color: var(--on-ink-2);
}

/* The board is the hero: it spans the field and runs off its bottom edge. */
.board {
  max-width: calc(var(--wrap) + 8rem);
  margin: clamp(2.25rem, 4vw, 3.25rem) auto 0;
}
.board-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.5rem 1.5rem;
  padding-bottom: 0.9rem;
}
.board-tag {
  color: var(--c1);
}
.board-hint {
  max-width: 62ch;
  font-size: 0.95rem;
  color: var(--on-ink-2);
}
.clock {
  display: grid;
  justify-items: end;
  font-stretch: 62%;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 0.9;
}
.clock-label {
  margin-top: 0.3rem;
  color: var(--on-ink-2);
}

.grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(11rem, 14rem) repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--on-ink);
}
.times,
.row {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
}
.times .t {
  padding: 0.55rem 0.75rem;
  border-left: 1px solid var(--ink-line);
  color: var(--on-ink);
  font-size: 0.95rem;
}
.row {
  border-top: 1px solid var(--ink-line);
}
.ident {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 0.5rem;
  padding: 0.9rem 0.9rem 0.9rem 0;
}
.cell {
  position: relative;
  min-height: 8.25rem;
  padding: 0.4rem;
  border-left: 1px solid var(--ink-line);
}
.cell-time {
  display: none;
}
.cell.is-target {
  background: rgb(246 243 234 / 0.07);
}
.item {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 0.3rem;
  height: 100%;
  padding: 0.6rem 0.65rem 0.7rem;
  border-radius: var(--radius);
  background: var(--ink-2);
  color: var(--on-ink);
  cursor: grab;
  user-select: none;
  transition: background-color var(--snap), color var(--snap), opacity var(--snap);
}
.item:hover {
  background: var(--ink-3);
}
.item.is-dragging {
  z-index: 3;
  cursor: grabbing;
  background: var(--ink-3);
  box-shadow: 0 14px 28px -10px rgb(0 0 0 / 0.55);
}
.item-state {
  font-stretch: 78%;
  font-weight: 650;
  font-size: 0.72rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--on-ink-2);
}
.item-title {
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.2;
  text-wrap: balance;
}
.item-meta {
  font-size: 0.82rem;
  color: var(--on-ink-2);
}
.item-move {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.25rem;
  opacity: 0;
  transition: opacity var(--snap);
}
.item:hover .item-move,
.item:focus-within .item-move,
.item:focus .item-move {
  opacity: 1;
}
.item-move button {
  padding: 0.2rem 0.45rem;
  border: 1px solid currentColor;
  border-radius: 2px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-stretch: 78%;
  font-weight: 650;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}
.item-move button[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.item[data-status="aired"] {
  background: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink-line);
  cursor: default;
}
.item[data-status="aired"] .item-state {
  color: var(--aired);
}
.item[data-status="aired"] .item-title,
.item[data-status="aired"] .item-meta {
  color: var(--on-ink-2);
}
.item[data-status="aired"] .item-move {
  display: none;
}
.item[data-status="next"] {
  --focus: var(--ink);
  background: var(--air);
  color: var(--ink);
}
.item[data-status="next"] .item-state,
.item[data-status="next"] .item-meta {
  color: var(--ink);
}

.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--air);
  pointer-events: none;
  opacity: 0;
}
.playhead.is-on {
  opacity: 1;
}
.playhead.is-live {
  transition: left 900ms cubic-bezier(0.16, 1, 0.3, 1);
}
.playhead::before {
  content: "";
  position: absolute;
  top: -5px;
  left: -5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--air);
}

/* ---------------------------------------------------------------- sheets */

.sheet,
.close,
.read,
.work {
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.sheet {
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding-top: clamp(3.5rem, 7vw, 6rem);
}
.sheet:last-of-type {
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
}
.sheet h2,
.close h2 {
  max-width: 22ch;
  font-stretch: 68%;
  font-weight: 780;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  line-height: 0.98;
  text-transform: uppercase;
  text-wrap: balance;
}
.sheet p,
.sheet li,
.sheet dd {
  max-width: 62ch;
}
.sheet > h2 + * {
  margin-top: 2rem;
}

.cues {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1.5px solid var(--ink);
}
.cues li {
  padding: 1.1rem 1.25rem 0 0;
}
.cues li + li {
  padding-left: 1.25rem;
  border-left: 1px solid var(--paper-line);
}
.cue-n {
  display: block;
  font-stretch: 62%;
  font-weight: 800;
  font-size: 3.4rem;
  line-height: 0.9;
  color: var(--air-deep);
}
.cues h3 {
  margin-top: 0.9rem;
  font-stretch: 78%;
  font-weight: 720;
  font-size: 1.3rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.cues p {
  margin-top: 0.5rem;
  font-size: 1rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.split h2 + p,
.split p + p {
  margin-top: 1.1rem;
}
.pair,
.plain,
.limits {
  border-top: 1.5px solid var(--ink);
}
.pair > div,
.plain li,
.limits li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--paper-line);
}
.pair dt {
  margin-bottom: 0.4rem;
}
.limits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 2.5rem;
}
.limits li {
  border-bottom: 0;
}
.limits strong {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.close {
  --focus: var(--c1);
  background: var(--ink);
  color: var(--on-ink);
  padding-top: clamp(3.5rem, 7vw, 6rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
}
.close > * {
  max-width: var(--wrap);
  margin-left: auto;
  margin-right: auto;
}
.close h2 {
  max-width: var(--wrap);
  font-size: clamp(2.6rem, 6.5vw, 5rem);
}
.close p {
  margin-top: 1rem;
  font-size: 1.15rem;
}

/* ------------------------------------------------------------------ read */

.read {
  max-width: calc(44rem + 2 * var(--gutter));
  margin: 0 auto;
  padding-top: clamp(3rem, 7vw, 6rem);
  padding-bottom: clamp(4rem, 8vw, 7rem);
}
.read h1 {
  font-stretch: 64%;
  font-weight: 800;
  font-size: clamp(2.6rem, 6.5vw, 4.5rem);
  line-height: 0.94;
  text-transform: uppercase;
  text-wrap: balance;
}
.read .standfirst {
  color: var(--on-paper-2);
}
.read h2 {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1.5px solid var(--ink);
  font-stretch: 78%;
  font-weight: 720;
  font-size: 1.55rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.015em;
}
.read h3 {
  margin-top: 1.6rem;
  font-weight: 700;
  font-size: 1.05rem;
}
.read p,
.read ul,
.read dl {
  margin-top: 0.9rem;
}
.read ul {
  padding-left: 1.2rem;
  list-style: square;
}
.read li + li {
  margin-top: 0.4rem;
}
.read li::marker {
  color: var(--air-deep);
}
.states > div {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--paper-line);
}
.faq > div {
  padding: 1.4rem 0;
  border-top: 1px solid var(--paper-line);
}
.faq > div:first-child {
  margin-top: 2.5rem;
  border-top: 1.5px solid var(--ink);
}
.faq dt {
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.3;
}
.faq dd {
  margin-top: 0.5rem;
}
.read .actions {
  margin-top: 3rem;
}

/* ------------------------------------------------------------------ foot */

.foot {
  margin-top: auto;
  display: grid;
  gap: 0.9rem;
  padding: 2.5rem var(--gutter) 3rem;
  border-top: 1px solid var(--paper-line);
  background: var(--paper-2);
  font-size: 0.95rem;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
}
.foot .fine {
  margin-top: 0;
}

.flash {
  margin: 0;
  padding: 0.85rem var(--gutter);
  font-weight: 600;
  border-bottom: 1px solid var(--paper-line);
}
.flash-ok {
  background: #dcefe9;
  color: #0e4a41;
}
.flash-error {
  background: #f9dedb;
  color: #7a1712;
}

/* ------------------------------------------------------------------- app */

.v-app {
  background: #fbfaf5;
}
.work {
  max-width: calc(72rem + 2 * var(--gutter));
  margin: 0 auto;
  padding-top: 2.25rem;
  padding-bottom: 5rem;
}
.work-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.work h1 {
  font-stretch: 66%;
  font-weight: 800;
  font-size: 2.6rem;
  line-height: 1;
  text-transform: uppercase;
}
.work-note {
  max-width: 68ch;
  margin-top: 0.75rem;
}
.hint,
small {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--on-paper-2);
  text-transform: none;
  letter-spacing: 0;
  font-stretch: 100%;
}

.empty {
  margin-top: 2.5rem;
  padding: 2.5rem 0;
  border-top: 1.5px solid var(--ink);
}
.empty h2 {
  font-stretch: 78%;
  font-weight: 720;
  font-size: 1.5rem;
  text-transform: uppercase;
}
.empty p {
  max-width: 58ch;
  margin: 0.6rem 0 1.4rem;
}

.run {
  margin-top: 2.5rem;
}
.run-day {
  padding-bottom: 0.6rem;
  border-bottom: 1.5px solid var(--ink);
  font-size: 0.9rem;
}
.run-row {
  display: grid;
  grid-template-columns: 4.5rem minmax(9rem, 13rem) minmax(0, 1fr) minmax(11rem, 17rem) auto;
  gap: 1rem 1.25rem;
  align-items: start;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--paper-line);
}
.run-time {
  font-stretch: 64%;
  font-weight: 760;
  font-size: 1.9rem;
  line-height: 1;
}
.run-ch {
  display: grid;
  justify-items: start;
  gap: 0.35rem;
  font-size: 0.95rem;
}
.run-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
}
.thumb {
  display: block;
  width: 54px;
  height: 96px;
  object-fit: cover;
  border-radius: 3px;
  background: var(--ink);
}
.run-title {
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.run-meta,
.run-note,
.run-nums {
  margin-top: 0.3rem;
  font-size: 0.875rem;
  color: var(--on-paper-2);
}
.run-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.9rem;
  color: var(--ink);
  font-weight: 600;
}
.run-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  min-width: 9rem;
}
.run-past .run-time {
  color: var(--on-paper-2);
}

.pop {
  position: relative;
}
.pop > summary {
  list-style: none;
}
.pop > summary::-webkit-details-marker {
  display: none;
}
.pop-body {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding: 0.9rem;
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  background: var(--paper);
  text-align: left;
}
.run-actions .pop[open] {
  flex-basis: 100%;
}

/* forms */
.field,
.field-label {
  display: grid;
  gap: 0.4rem;
  font-weight: 600;
}
.field + .field,
.checks + .hint,
.field + .notice {
  margin-top: 1.1rem;
}
input[type="text"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.6rem 0.7rem;
  border: 1.5px solid rgb(15 42 61 / 0.62);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}
textarea {
  resize: vertical;
  line-height: 1.45;
}
input::placeholder,
textarea::placeholder {
  color: #5d7183;
}
input:hover,
select:hover,
textarea:hover {
  border-color: var(--ink);
}
input:disabled,
select:disabled {
  background: var(--paper-2);
  color: var(--on-paper-2);
  cursor: not-allowed;
}
input[type="checkbox"],
input[type="radio"] {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.15rem 0 0;
  accent-color: var(--ink);
  flex: none;
}
label:has(input:disabled) {
  color: #5d7183;
  cursor: not-allowed;
}
.count {
  justify-self: end;
  color: var(--on-paper-2);
  font-size: 0.72rem;
}
.counted {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.4rem;
}
.counted > .field {
  grid-column: 1 / -1;
}
.counted > .count {
  grid-row: 1;
  grid-column: 2;
  align-self: start;
}
.counted + .counted {
  margin-top: 1.1rem;
}

.notice {
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
  background: var(--paper-2);
  font-size: 0.95rem;
  font-weight: 500;
}
.notice-error {
  background: #f9dedb;
  color: #7a1712;
}

.compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
  margin-top: 1.5rem;
}
.block {
  margin: 0;
  padding: 1.5rem 0 2rem;
  border: 0;
  border-top: 1.5px solid var(--ink);
  min-width: 0;
}
legend {
  float: left;
  width: 100%;
  padding: 0;
  margin-bottom: 1.1rem;
  font-size: 0.92rem;
}
legend + * {
  clear: both;
}

.creator {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 1.1rem;
}
.avatar {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--ink-3);
}
.creator-label {
  color: var(--on-paper-2);
}
.creator-name {
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.2;
}
.creator-handle {
  font-size: 0.95rem;
  color: var(--on-paper-2);
}

.drop {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin-top: 0.9rem;
  padding: 1.25rem;
  border: 1.5px dashed rgb(15 42 61 / 0.62);
  border-radius: var(--radius);
  transition: background-color var(--snap), border-color var(--snap);
}
.drop.is-over {
  border-color: var(--ink);
  background: var(--paper-2);
}
.drop input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.drop:has(input:focus-visible) .btn {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.drop-hint {
  color: var(--on-paper-2);
}
.slides {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}
.slides:empty {
  display: none;
}
.slide {
  position: relative;
  display: grid;
  gap: 0.3rem;
  width: 5.25rem;
}
.slide img,
.slide video,
.slide .slide-wait {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 3px;
  background: var(--paper-2);
}
.slide-wait {
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  color: var(--on-paper-2);
  animation: tally 1.4s ease-in-out infinite;
}
.slide-n {
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
  background: var(--ink);
  color: var(--on-ink);
  font-stretch: 78%;
  font-weight: 700;
  font-size: 0.72rem;
}
.slide-tools {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2px;
}
.slide-tools button {
  display: grid;
  place-items: center;
  min-height: 1.75rem;
  border: 1px solid var(--paper-line);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.slide-tools button:hover:not([disabled]) {
  border-color: var(--ink);
}
.slide-tools button[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.choice {
  display: grid;
  gap: 0.6rem;
}
.choice + .field {
  margin-top: 1.25rem;
}
.choice label,
.check-line,
.checks label,
.acct-form fieldset label,
.switch {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-weight: 500;
  cursor: pointer;
}
.choice strong,
.check-line strong {
  display: block;
  font-weight: 650;
}
.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}
.block .field + .field,
.block .field + div.field,
.block div.field + .field {
  margin-top: 1.5rem;
}
.switch span {
  font-weight: 650;
}
.switch + .hint {
  margin-top: 0.4rem;
  max-width: 60ch;
}
.disclose-body {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.9rem;
  padding-left: 1.75rem;
}
[hidden] {
  display: none !important;
}

.compose-side {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 1.5rem;
}
.preview-label {
  margin-bottom: 0.6rem;
}
.phone {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 15rem;
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 14px;
  background: var(--ink);
  color: var(--on-ink-2);
}
.phone img,
.phone video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.phone-empty {
  padding: 1.25rem;
  text-align: center;
  font-size: 0.9rem;
}
.preview-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
}
.preview-caption {
  max-width: 15rem;
  margin: 0.75rem auto 0;
  font-size: 0.875rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.preview-caption:empty {
  display: none;
}
.publish {
  display: grid;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1.5px solid var(--ink);
}
.consent {
  font-size: 0.95rem;
  font-weight: 500;
}

/* accounts */
.accts {
  margin-top: 1.75rem;
  border-top: 1.5px solid var(--ink);
}
.acct {
  display: grid;
  grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr) auto;
  gap: 1.5rem 2.5rem;
  align-items: start;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--paper-line);
}
/* what TikTok reports for an account's recent posts */
.recent {
  grid-column: 1 / -1;
  min-width: 0;
  overflow-x: auto;
}
.recent-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.recent-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.6rem;
}
.recent-table th,
.recent-table td {
  padding: 0.55rem 1rem 0.55rem 0;
  border-top: 1px solid var(--paper-line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}
.recent-table thead th {
  border-top: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.recent-table tbody th {
  font-weight: 600;
  white-space: normal;
  min-width: 14rem;
}
.recent-table .n {
  text-align: right;
  padding-right: 0;
  padding-left: 1rem;
}
.acct-id {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
}
.acct-id .btn,
.acct-id .notice {
  grid-column: 1 / -1;
  justify-self: start;
}
.acct-name {
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.3;
}
.acct-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1.5rem;
  align-items: end;
}
.acct-form fieldset {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin: 0;
  padding: 0;
  border: 0;
}
.acct-form legend {
  margin-bottom: 0.6rem;
}
.acct-form .field + .field {
  margin-top: 0;
}
.acct-form .btn {
  justify-self: start;
}
.danger {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1.5px solid var(--fail);
}
.danger h2 {
  font-stretch: 78%;
  font-weight: 720;
  font-size: 1.3rem;
  text-transform: uppercase;
}
.danger p {
  max-width: 62ch;
  margin: 0.5rem 0 1rem;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 60rem) {
  .lede {
    grid-template-columns: minmax(0, 1fr);
  }
  .lede h1 {
    grid-row: auto;
  }
  .lede .standfirst {
    margin-top: 1.5rem;
  }
  .cues {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 2rem;
  }
  .cues li:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }
  .split,
  .limits {
    grid-template-columns: minmax(0, 1fr);
  }
  .limits li {
    border-bottom: 1px solid var(--paper-line);
  }
  .compose {
    grid-template-columns: minmax(0, 1fr);
  }
  .compose-side {
    position: static;
  }
  .run-row {
    grid-template-columns: 4.5rem minmax(0, 1fr);
  }
  .run-row > :nth-child(n + 3) {
    grid-column: 2;
  }
  .run-actions {
    justify-content: flex-start;
  }
  .acct {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* On narrow screens each channel becomes its own running order, top to bottom. */
@media (max-width: 52rem) {
  .bar {
    column-gap: 1.1rem;
  }
  .bar-end {
    order: 2;
  }
  .bar .btn {
    min-height: 2.25rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
  }
  .nav {
    order: 3;
  }
  .nav-legal {
    order: 4;
  }
  .board-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .board-hint {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .grid {
    display: block;
  }
  .times,
  .playhead {
    display: none;
  }
  .row {
    display: block;
    padding-bottom: 0.75rem;
  }
  .ident {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    padding-right: 0;
  }
  .cell {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr);
    align-items: start;
    gap: 0.5rem;
    min-height: 2.6rem;
    padding: 0.3rem 0;
    border-left: 0;
    border-top: 1px solid var(--ink-line);
  }
  .cell-time {
    display: block;
    padding-top: 0.55rem;
    color: var(--on-ink-2);
  }
  .item-move {
    opacity: 1;
  }
  .acct-form {
    grid-template-columns: minmax(0, 1fr);
  }
  .states > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.3rem;
  }
}

@media (max-width: 34rem) {
  .cues {
    grid-template-columns: minmax(0, 1fr);
  }
  .cues li + li {
    padding-left: 0;
    border-left: 0;
  }
}

@media (pointer: coarse) {
  .item-move {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
