:root {
  --ink: #16171a;
  --ink-soft: #5c6069;
  --ink-faint: #8b909a;
  --paper: #f7f7f8;
  --card: #ffffff;
  --line: #e3e4e8;
  --accent: #3b5bdb;
  --accent-ink: #ffffff;
  --danger: #c92a2a;
  --warn-bg: #fff4e0;
  --warn-ink: #8a5300;
  --todo-bg: #fdecec;
  --todo-ink: #a52323;
  --done-bg: #e6f4ea;
  --done-ink: #1e6b3a;
  --star: #f0a020;
  --wip-bg: #eceef2;
  --wip-ink: #5c6069;
  --accent-wash: #eaeefb;
  --well: #eceef2;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(16 17 26 / 6%), 0 6px 20px rgb(16 17 26 / 5%);
  --sans: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

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

[x-cloak] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
}

h1,
h2,
p,
ul,
li {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

code {
  font-family: var(--mono);
  font-size: 0.85em;
}

.icon {
  width: 1.05em;
  height: 1.05em;
  flex: none;
}

.spins.htmx-request > .icon,
form.htmx-request .spins[type="submit"] > .icon {
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: spin 700ms linear infinite;
}

.spins.htmx-request > .icon > *,
form.htmx-request .spins[type="submit"] > .icon > * {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.shell {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  min-height: 100vh;
}

.shell:not(:has(.rail)) {
  grid-template-columns: minmax(0, 1fr);
}

.rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100vh;
  padding: 12px 8px;
  background: var(--card);
  border-right: 1px solid var(--line);
}

.rail__mark {
  display: grid;
  justify-items: center;
  padding: 8px 0 16px;
  color: var(--ink);
}

.rail__stage {
  display: grid;
  gap: 3px;
  justify-items: center;
  padding: 8px 0;
  border-radius: 10px;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
}

.rail__stage:hover {
  background: var(--paper);
  color: var(--ink);
}

.rail__stage--active {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
}

.rail__stage .icon {
  width: 20px;
  height: 20px;
}

.signout {
  position: fixed;
  bottom: 10px;
  left: 0;
  z-index: 2;
  width: 72px;
}

.signout__button {
  display: grid;
  justify-items: center;
  width: 100%;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--ink-faint);
  font: inherit;
  cursor: pointer;
}

.signout span {
  display: none;
}

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

.signin {
  display: grid;
  gap: 20px;
  max-width: 340px;
  margin: 14vh auto 0;
}

.signin__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 600;
}

.signin__form {
  display: grid;
  gap: 14px;
}

.signin__error {
  color: var(--todo-ink);
  font-size: 13px;
}

.main {
  padding: 24px;
}

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

.queue__title {
  font-size: 22px;
  font-weight: 600;
}

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

.tabs {
  display: flex;
  gap: 24px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: inset 0 -1px 0 var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs__tab {
  position: relative;
  padding: 10px 0 11px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

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

.tabs__tab:has(.tabs__radio:checked) {
  box-shadow: inset 0 -2px 0 var(--accent);
  color: var(--ink);
}

.tabs__tab:has(.tabs__radio:focus-visible) {
  outline: 2px solid rgb(59 91 219 / 25%);
}

.filters__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.filters__chips {
  flex: 1;
  min-width: 0;
}

.filters__chips:not(:has(.chips)) {
  display: none;
}

.order {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 13px;
  white-space: nowrap;
}

.order__select {
  padding: 6px 2px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  field-sizing: content;
  cursor: pointer;
}

.order__select:focus-visible {
  outline: 2px solid rgb(59 91 219 / 25%);
}

.filters__open {
  min-height: 36px;
}

.filters__count {
  min-width: 20px;
  padding: 1px 6px;
  background: var(--accent);
  border-radius: 999px;
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  height: 30px;
  padding: 0 10px 0 12px;
  background: var(--accent-wash);
  border-radius: 999px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.chip__remove {
  font-size: 16px;
  line-height: 1;
  opacity: 0.65;
}

.chip:hover .chip__remove {
  opacity: 1;
}

.chips__clear {
  padding: 0 6px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  max-width: 1680px;
}

.card {
  --box: 0.8;

  position: relative;
  container-type: inline-size;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card__frame {
  --ratio: var(--box);

  position: relative;
  display: block;
}

.card__image {
  display: block;
  width: 100%;
  aspect-ratio: var(--box);
  object-fit: contain;
  background: #1d1f24;
}

.card__body {
  display: grid;
  gap: 4px;
  padding: 10px 12px 12px;
}

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

.card__stamp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 12px;
}

.card__found {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.card__found .icon {
  width: 12px;
  height: 12px;
}

.card__creator {
  font-weight: 500;
}

.card__meta {
  color: var(--ink-faint);
  font-size: 13px;
}

.card__note {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 2px;
  padding-left: 8px;
  border-left: 2px solid var(--ink-faint);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.4;
}

.card__pins {
  position: absolute;
  inset: 0;
  width: min(100%, calc(var(--ratio) / var(--box) * 100%));
  height: min(100%, calc(var(--box) / var(--ratio) * 100%));
  margin: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.card:hover .card__pins,
.card:focus-within .card__pins {
  opacity: 1;
}

.card__pins .pin {
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
}

.card__pins .pin--rejected {
  border-width: 3.5px;
  box-shadow:
    0 0 0 1.5px #fff,
    0 2px 6px rgb(16 17 26 / 35%);
}

.pager {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.pager__pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.pager__page {
  min-width: 32px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 13px;
  text-align: center;
  text-decoration: none;
}

a.pager__page:hover {
  border-color: var(--line);
  background: var(--card);
  color: var(--ink);
}

.pager__page--current {
  border-color: var(--line);
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
}

.pager__step {
  padding: 5px 8px;
}

.pager__gap {
  color: var(--ink-faint);
  font-size: 13px;
}

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

.pager__total {
  color: var(--ink-faint);
  font-size: 12px;
}

.field--inline {
  grid-auto-flow: column;
  align-items: center;
  gap: 8px;
}

.empty {
  padding: 48px 0;
  color: var(--ink-soft);
  text-align: center;
}

.empty--tight {
  padding: 12px 0;
  text-align: left;
}

.editor {
  display: grid;
  grid-template-columns: minmax(auto, 1fr) minmax(0, auto) 380px minmax(
      auto,
      1fr
    );
  gap: 16px 20px;
  align-items: start;
}

.editor__back {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  justify-self: start;
  color: var(--ink-faint);
  font-size: 13px;
  text-decoration: none;
}

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

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 12px;
}

.stage__text {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  min-width: 0;
  padding: 16px;
  background: var(--well);
  border-radius: var(--radius);
}

.stage__tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  gap: 12px;
  max-width: 100%;
  padding: 16px;
  background: var(--well);
  border-radius: var(--radius);
}

.stage__tools .segmented {
  justify-self: center;
}

.retouch {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: 520px;
  max-width: 100%;
}

.retouch__actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.retouch__prompt > summary {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  list-style: none;
}

.retouch__prompt > summary::-webkit-details-marker {
  display: none;
}

.retouch__prompt > summary:hover {
  color: var(--accent);
}

.retouch__prompt[open] > summary > .icon {
  transform: rotate(90deg);
}

.retouch__prompt > .field__input {
  display: block;
  width: 100%;
  margin-top: 8px;
}

.compare {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: 100%;
}

.compare--split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.compare__shot {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 6px;
}

.compare__label {
  color: var(--ink-soft);
  font-size: 13px;
}

.compare__verb {
  display: none;
  color: var(--accent);
  font-weight: 600;
}

.pick:hover ~ .compare__label .compare__noun,
.pick:focus-visible ~ .compare__label .compare__noun {
  display: none;
}

.pick:hover ~ .compare__label .compare__verb,
.pick:focus-visible ~ .compare__label .compare__verb {
  display: inline;
}

.compare__image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 180px);
  width: auto;
  border-radius: var(--radius);
}

.pick {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  border-radius: var(--radius);
  outline: 2px solid transparent;
  outline-offset: 3px;
  line-height: 0;
  cursor: pointer;
  transition: outline-color 120ms ease;
}

.pick:hover,
.pick:focus-visible {
  outline-color: var(--accent);
}

.pick .stage__image {
  cursor: pointer;
}

.stage__frame {
  position: relative;
  display: inline-block;
  justify-self: center;
  width: fit-content;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  line-height: 0;
}

.stage__image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 180px);
  width: auto;
  height: auto;
  cursor: crosshair;
}

.stage__hint {
  color: var(--ink-soft);
  font-size: 14px;
}

.stage__point {
  display: block;
  text-align: center;
}

.stage__peek {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  background: rgb(255 255 255 / 85%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink-soft);
  cursor: pointer;
}

.stage__peek span {
  display: flex;
}

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

.stage__peek ~ .stage__expand {
  right: 44px;
}

.stage__frame--bare .pin:not(.pin--pending),
.viewer__frame--bare .pin {
  opacity: 0;
}

.viewer {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  background: var(--ink);
  border: 0;
  color: #fff;
}

.viewer[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.viewer__bar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
}

.viewer__title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer__zoom {
  display: flex;
  padding: 2px;
  background: rgb(255 255 255 / 9%);
  border-radius: 9px;
}

.viewer__option {
  padding: 5px 11px;
  background: none;
  border: 0;
  border-radius: 7px;
  color: #c7c9d1;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.viewer__option:hover {
  color: #fff;
}

.viewer__option[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
}

.viewer__option:disabled {
  opacity: 0.4;
  cursor: default;
}

.viewer__step {
  display: grid;
  place-items: center;
  padding: 5px 7px;
}

.viewer__button {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  background: none;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 8px;
  color: #c7c9d1;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.viewer__button:hover {
  border-color: rgb(255 255 255 / 30%);
  color: #fff;
}

.viewer__button span {
  display: flex;
}

.viewer__close {
  justify-content: center;
  width: 30px;
  padding: 0;
  font-size: 20px;
}

.viewer__view {
  display: flex;
  overflow: hidden;
  padding: 0 16px 16px;
  cursor: zoom-in;
}

.viewer__view--zoomed {
  overflow: auto;
  padding: 0;
  cursor: grab;
  user-select: none;
}

.viewer__view--zoomed:active {
  cursor: grabbing;
}

.viewer__frame {
  position: relative;
  flex: none;
  margin: auto;
  line-height: 0;
}

.viewer__image {
  display: block;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 70px);
}

.viewer__view--zoomed .viewer__image {
  max-width: none;
  max-height: none;
}

.viewer .pin {
  pointer-events: none;
}

.pin {
  position: absolute;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  background: var(--accent);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgb(16 17 26 / 35%);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  transition: opacity 120ms ease;
}

.pin--pending {
  background: var(--danger);
}

.pin--ghost {
  padding: 0;
  background: rgb(22 23 26 / 30%);
  border: 2px dashed #fff;
  box-shadow: 0 1px 4px rgb(16 17 26 / 40%);
  cursor: pointer;
}

.pin--ghost:hover,
.pin--ghost:focus-visible {
  background: rgb(22 23 26 / 55%);
  z-index: 2;
}

button.pin {
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

button.pin:not(.pin--ghost):hover,
button.pin:not(.pin--ghost):focus-visible {
  z-index: 2;
  transform: scale(1.15);
}

.stage__box {
  position: absolute;
  border: 2px dashed #fff;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgb(16 17 26 / 25%);
  pointer-events: none;
}

.stage__frame--bare .stage__box {
  opacity: 0;
}

.pin--rejected {
  background: #fff;
  border-color: var(--danger);
  color: var(--danger);
}

.pin--approved {
  background: var(--done-ink);
}

.pin--approved::after {
  content: "";
  width: 3px;
  height: 6px;
  margin-top: -1px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.pin:hover,
.pin--lit {
  z-index: 2;
}

.pin--noted::after {
  content: "";
  position: absolute;
  top: -4px;
  right: -4px;
  width: 9px;
  height: 9px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--accent);
}

.pin__note {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  display: grid;
  gap: 2px;
  width: max-content;
  max-width: 220px;
  padding: 8px 10px;
  background: var(--ink);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  white-space: pre-wrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%);
  transition:
    opacity 120ms ease,
    visibility 120ms;
}

.pin__note b {
  font-weight: 600;
}

.pin:hover .pin__note,
.pin--lit .pin__note {
  opacity: 1;
  visibility: visible;
}

.pin__note--east {
  left: -4px;
  transform: none;
}

.pin__note--west {
  right: -4px;
  left: auto;
  transform: none;
}

.pin__note--north {
  top: auto;
  bottom: calc(100% + 8px);
}

.pin--dim {
  opacity: 0.15;
}

.stage__video {
  cursor: default;
  background: #000;
}

.stage__hint--error {
  color: var(--danger);
  font-weight: 500;
}

.card__video {
  position: relative;
  width: 100%;
  background: #1d1f24;
  color: #fff;
}

.card__glyph {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: rgb(0 0 0 / 55%);
  border-radius: 6px;
  color: #fff;
}

.cutter {
  display: grid;
  gap: 8px;
}

.cutter__file {
  display: none;
}

.cutter__option {
  display: flex;
  gap: 0.5rem;
  align-items: start;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.frames {
  display: grid;
  gap: 8px;
}

.frame {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.frame__link {
  display: flex;
  flex: 1;
  gap: 10px;
  align-items: center;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.frame:has(> .frame__link:hover) {
  border-color: var(--accent);
}

.frame--here {
  border-color: var(--accent);
  background: var(--accent-wash);
}

.frame__thumb {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
}

.frame__text {
  min-width: 0;
  flex: 1;
}

.frame__at {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
}

.frame__meta {
  color: var(--ink-faint);
  font-size: 12px;
}

.caption {
  max-width: 640px;
}

.caption__text {
  max-height: 260px;
  overflow-y: auto;
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 14px;
  white-space: pre-wrap;
}

.transcript {
  max-height: 260px;
  overflow-y: auto;
}

.transcript__text {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.transcript__word {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-user-select: text;
  user-select: text;
}

.transcript__word:hover,
.transcript__word:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

.transcript__word--spoken {
  border-radius: 3px;
  background: var(--accent);
  color: var(--accent-ink);
}

.transcript__more {
  margin-top: 8px;
}

.transcript__more button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-faint);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.transcript__more button:hover {
  color: var(--accent);
  text-decoration: underline;
}

.panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel__head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.panel__title {
  font-size: 17px;
  font-weight: 600;
}

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

.panel__origin {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.panel__glyph {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-wash);
  color: var(--accent);
}

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

.panel__origin:hover {
  color: var(--accent);
}

.panel__origin:hover .panel__glyph {
  background: var(--accent);
  color: var(--accent-ink);
}

.panel__meta {
  color: var(--ink-faint);
  font-size: 13px;
}

.panel__meta a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: inherit;
  text-decoration: none;
}

.panel__meta a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.section__title {
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hotspots__head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.hotspots__head .section__title {
  margin-right: auto;
  margin-bottom: 0;
}

.hotspots__head .flag {
  gap: 8px;
}

.hotspots__head .flag__name {
  flex: none;
  color: var(--ink-soft);
  font-size: 12px;
}

.hotspots__head .flag:has(.flag__input:checked) .flag__name {
  color: var(--ink);
}

.hotspots__by {
  margin: -4px 0 8px;
  color: var(--ink-faint);
  font-size: 12px;
}

.hotspots__sent {
  margin-bottom: 8px;
}

.hotspots__form {
  margin-bottom: 12px;
}

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

.hotspot {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hotspot__open {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: none;
  cursor: pointer;
}

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

.hotspot:has(> .hotspot__open:hover) {
  border-color: var(--accent);
}

.hotspot a,
.hotspot button:not(.hotspot__open),
.hotspot textarea {
  position: relative;
}

.hotspot--unplaced {
  background: var(--todo-bg);
  border-color: #f3c9c9;
}

.hotspot--rejected {
  background: var(--todo-bg);
  border-color: #f3c9c9;
}

.hotspot--rejected .hotspot__index {
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--danger);
  color: var(--danger);
}

.hotspot--editing {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.hotspot__index {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  background: var(--accent);
  border-radius: 50%;
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 600;
}

.hotspot__text {
  min-width: 0;
  flex: 1;
}

.hotspot--suggested {
  background: var(--card);
  border-style: dashed;
}

.hotspot__actions .button,
.hotspots__head .button {
  transition:
    background 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    transform 60ms ease;
}

.hotspot__actions .button:hover,
.hotspots__head .button:hover {
  background: var(--accent-wash);
  border-color: var(--accent);
  color: var(--accent);
}

.hotspot__actions .button:active,
.hotspots__head .button:active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  transform: scale(0.94);
}

.hotspot__actions .button--danger:hover {
  background: var(--todo-bg);
  border-color: var(--danger);
  color: var(--danger);
}

.hotspot__actions .button--danger:active {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.hotspot__actions .button:focus-visible,
.hotspots__head .button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.picker__footer {
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 4px -16px -16px;
  padding: 12px 16px;
  background: var(--card);
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
}

.picker__cancel {
  margin-left: auto;
}

.picker__footer .button,
.record__actions .button {
  transition:
    background 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    transform 60ms ease;
}

.picker__footer .button:not(:disabled):active,
.record__actions .button:not(:disabled):active {
  transform: scale(0.97);
}

.picker__footer .button:focus-visible,
.record__actions .button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.picker__cancel:hover {
  background: var(--well);
  border-color: var(--ink-faint);
}

.picker__cancel:active {
  background: var(--line);
}

.picker__footer .button--danger:hover,
.record__actions .button--danger:not(:disabled):hover {
  background: var(--todo-bg);
  border-color: var(--danger);
}

.picker__footer .button--danger:active,
.record__actions .button--danger:not(:disabled):active {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.picker__footer .button--primary:not(:disabled):hover,
.record__actions .button--primary:not(:disabled):hover {
  background: color-mix(in srgb, var(--accent) 84%, black);
  border-color: color-mix(in srgb, var(--accent) 84%, black);
}

.picker__footer .button--primary:not(:disabled):active,
.record__actions .button--primary:not(:disabled):active {
  background: color-mix(in srgb, var(--accent) 70%, black);
  border-color: color-mix(in srgb, var(--accent) 70%, black);
}

.picker__label {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
}

.hotspot__index--suggested {
  box-sizing: border-box;
  background: transparent;
  border: 2px dashed var(--ink-faint);
}

.hotspot__name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hotspot__name a,
.hotspot__alt a {
  color: inherit;
  text-decoration: none;
}

.hotspot__name a:hover,
.hotspot__alt a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.hotspot__alt,
.hotspot__todo {
  color: var(--ink-soft);
  font-size: 13px;
}

.hotspot__alt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hotspot__todo {
  color: var(--todo-ink);
  font-weight: 500;
}

.hotspot__by {
  color: var(--ink-faint);
  font-size: 12px;
}

.hotspot__note,
.reelnote__text {
  padding-left: 8px;
  border-left: 2px solid var(--ink-faint);
  color: var(--ink-soft);
  font-size: 12px;
  white-space: pre-wrap;
}

.hotspot__sent {
  margin-top: 4px;
  padding-left: 8px;
  border-left: 2px solid var(--todo-ink);
  color: var(--todo-ink);
  font-size: 12px;
  white-space: pre-wrap;
}

.hotspot__sent b {
  font-weight: 600;
}

.reelnote {
  width: 100%;
}

.reelnote__read {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.reelnote__text {
  flex: 1;
  min-width: 0;
}

.reelnote__edit,
.reelnote__add {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-faint);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.reelnote__edit {
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: -2px;
}

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

.reelnote__edit:hover,
.reelnote__edit:focus-visible,
.reelnote__add:hover,
.reelnote__add:focus-visible {
  color: var(--accent);
}

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

.reelnote__actions {
  display: flex;
  gap: 6px;
}

.hotspot__verdict {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
  font-size: 12px;
}

.hotspot__verdict--done {
  color: var(--done-ink);
  font-weight: 500;
}

.hotspot__verdict .button {
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    transform 80ms ease;
}

.hotspot__verdict .button:hover {
  border-color: var(--ink-faint);
  background: var(--card);
}

.hotspot__verdict .button--return:hover {
  border-color: var(--danger);
  background: var(--todo-bg);
}

.hotspot__verdict .button:active {
  transform: translateY(1px);
}

.hotspot__verdict .button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

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

.hotspot__actions {
  display: flex;
  gap: 6px;
  flex: none;
}

.finder {
  display: flex;
  align-items: stretch;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.finder:focus-within {
  border-color: var(--accent);
  outline: 2px solid rgb(59 91 219 / 25%);
}

.finder__scope {
  flex: none;
  max-width: 45%;
  padding: 0 6px 0 10px;
  background: var(--paper);
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 7px 0 0 7px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  field-sizing: content;
  outline: none;
}

.finder__field {
  display: flex;
  flex: 1;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 0 10px;
  color: var(--ink-faint);
}

.finder__input {
  flex: 1;
  min-width: 0;
  padding: 7px 0;
  background: transparent;
  border: 0;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  outline: none;
}

.finder__found {
  margin-top: 8px;
}

.results {
  max-height: 260px;
  overflow-y: auto;
  background:
    linear-gradient(var(--card) 40%, transparent) top / 100% 28px no-repeat local,
    linear-gradient(transparent, var(--card) 60%) bottom / 100% 28px no-repeat local,
    radial-gradient(farthest-side at 50% 0, rgb(16 17 26 / 16%), transparent) top /
      100% 12px no-repeat scroll,
    radial-gradient(farthest-side at 50% 100%, rgb(16 17 26 / 16%), transparent)
      bottom / 100% 12px no-repeat scroll;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.results__empty {
  padding: 12px;
  color: var(--ink-faint);
  font-size: 13px;
}

.result {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 6px 8px 6px 10px;
  border-bottom: 1px solid var(--line);
}

.result:last-child {
  border-bottom: 0;
}

.result__zoom {
  display: block;
}

.result__zoom .peek__product,
.result__seen .peek__product,
.result__zoom .peek__name,
.result__seen .peek__name {
  width: 320px;
}

.result__zoom .peek__product,
.result__seen .peek__product {
  height: 320px;
}

.result__text {
  min-width: 0;
}

.result__name {
  display: block;
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result__name:hover {
  color: var(--accent);
  text-decoration: underline;
}

.result__meta {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--ink-faint);
  font-size: 12px;
}

.result__facts {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result__meta .badge {
  flex: none;
}

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

.result__actions .button {
  justify-content: flex-start;
  padding: 1px 8px;
  background: var(--paper);
  border-color: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  transition:
    background 120ms,
    border-color 120ms,
    color 120ms,
    transform 60ms;
}

.result__actions .button:hover {
  background: var(--accent-wash);
  border-color: var(--accent);
  color: var(--accent);
}

.result__actions .button:active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  transform: translateY(1px);
}

.picker__suggestions .suggest {
  margin-bottom: 12px;
}

.suggest__none {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.suggest__none .results__empty {
  padding: 0;
}

.suggest__label {
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 13px;
}

.result__thumb {
  display: block;
  width: 44px;
  height: 44px;
  flex: none;
  background: var(--wip-bg);
  border-radius: 6px;
  object-fit: cover;
}

span.result__thumb,
.result__thumb--gone {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23b4b9c4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='2' x2='22' y1='2' y2='22'/><path d='M10.41 10.41a2 2 0 1 1-2.83-2.83'/><line x1='13.5' x2='6' y1='13.5' y2='21'/><line x1='18' x2='21' y1='12' y2='15'/><path d='M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59'/><path d='M21 15V5a2 2 0 0 0-2-2H9'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px;
}

.result__open {
  position: relative;
  display: block;
  border-radius: 6px;
}

.result__open:hover .crop,
.result__open:focus-visible .crop {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.result__open:focus-visible {
  outline: none;
}

.result__count {
  position: absolute;
  top: 3px;
  left: 3px;
  padding: 0 4px;
  background: rgb(16 17 26 / 62%);
  border-radius: 4px;
  color: #fff;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 15px;
  pointer-events: none;
}

.result__step {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  padding: 0;
  background: var(--card);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgb(16 17 26 / 30%);
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  transition: opacity 120ms ease;
}

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

.result__step--prev {
  left: 3px;
}

.result__step--next {
  right: 3px;
}

.result__seen:hover .result__step,
.result__seen:has(:focus-visible) .result__step {
  opacity: 1;
}

.result__seen:hover .result__step[aria-disabled="true"],
.result__seen:has(:focus-visible) .result__step[aria-disabled="true"] {
  cursor: default;
  opacity: 0.35;
}

.result__step:not([aria-disabled="true"]):hover {
  color: var(--accent);
}

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

.result__adopt > .icon {
  display: none;
}

.result__adopt.htmx-request > .icon {
  display: block;
}

.result__where {
  border-bottom: 1px dotted currentcolor;
  color: inherit;
  text-decoration: none;
}

.result__where:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.picker__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.picker__head {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.picker__back {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  min-height: 32px;
  padding: 0 8px 0 0;
  background: none;
  border: 0;
  color: var(--ink-soft);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
}

.picker__back:hover {
  color: var(--accent);
}

.crop {
  --crop: 56px;

  position: relative;
  display: block;
  width: var(--crop);
  height: var(--crop);
  flex: none;
  overflow: hidden;
  background: var(--well);
  border-radius: 8px;
}

.crop__image {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(
    calc(var(--crop) / var(--bw)),
    calc(var(--crop) * var(--ratio, 0.8) / var(--bh))
  );
  max-width: none;
  transform: translate(calc(var(--cx) * -100%), calc(var(--cy) * -100%));
}

.result__seen {
  position: relative;
}

.result--seen {
  grid-template-columns: 64px minmax(0, 1fr) auto;
}

.result__seen .crop {
  --crop: 64px;

  border-radius: 6px;
}

.result__seen .result__thumb {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background-size: 12px;
  box-shadow: 0 0 0 2px var(--card);
}

.sheet {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  background: var(--card);
  border: 0;
  border-radius: 14px;
  box-shadow:
    0 2px 6px rgb(16 17 26 / 12%),
    0 24px 64px rgb(16 17 26 / 28%);
  color: var(--ink);
}

.sheet::backdrop {
  background: rgb(22 23 26 / 45%);
}

.sheet__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 48px);
}

.sheet__head {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.sheet__title {
  flex: 1;
  min-width: 0;
}

.sheet__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 18px 20px 20px;
  overflow-y: auto;
}

.sheet__name {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

.sheet__tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sheet__foot {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}

.sheet__all {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
}

.sheet__foot .sheet__all {
  margin-right: auto;
  font-size: 14px;
  font-weight: 500;
}

.sheet__check {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.sheet--filters {
  width: min(520px, calc(100vw - 32px));
}

.sheet__reset {
  margin-right: auto;
}

.sheet--filters .sheet__body {
  position: relative;
  gap: 22px;
  overscroll-behavior: contain;
}

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

.choice .sheet__name {
  display: block;
  padding: 0;
}

.choice > .field__input {
  width: 100%;
}

.choice--flags {
  display: grid;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.choice--flags .flag__name {
  font-size: 14px;
}

.choice--flags .flag__input:checked + .flag__switch {
  background: var(--accent);
}

.tile {
  position: relative;
  display: grid;
  gap: 2px;
  width: 124px;
  font-size: 12px;
}

.tile .crop {
  --crop: 124px;

  border-radius: var(--radius);
}

.tile__tick {
  position: absolute;
  top: 2px;
  left: 2px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
}

.tile__tick:hover {
  background: rgb(255 255 255 / 55%);
}

.tile__check {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.tile__pic {
  display: block;
  margin-bottom: 4px;
  border-radius: var(--radius);
}

.tile__pic:hover .crop {
  box-shadow: 0 0 0 2px var(--ink);
}


.tile:has(.tile__check:checked) .crop {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tile__post {
  overflow: hidden;
  font-family: var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.peek {
  position: fixed;
  z-index: 2;
  display: none;
  overflow: hidden;
  background: var(--well);
  border: 6px solid var(--card);
  border-radius: 14px;
  box-shadow:
    0 2px 6px rgb(16 17 26 / 12%),
    0 24px 64px rgb(16 17 26 / 28%);
  pointer-events: none;
}

.tile:hover .peek,
.tile:has(:focus-visible) .peek {
  display: block;
}

.result__seen:has(:focus-visible) .peek,
.result:has(:focus-visible) .result__zoom .peek {
  display: flex;
}

.peek__shot {
  display: block;
  background: var(--card);
}

.peek__frame {
  position: relative;
  display: block;
}

.peek__caption {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 6px 2px 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.35;
}

.peek__post {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11.5px;
}

.peek__image {
  display: block;
  max-width: 40vw;
  max-height: min(460px, calc(100vh - 48px));
}

.hotspot__seen {
  display: block;
  flex: none;
  border-radius: 6px;
}

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

.hotspot__seen:hover .peek,
.hotspot__seen:focus-visible .peek {
  display: flex;
}

.peek--compare {
  gap: 6px;
}

.peek--compare .crop {
  --crop: 240px;
}

.peek__product {
  display: block;
  width: 240px;
  height: 240px;
  background-color: var(--card);
  border-radius: 8px;
  object-fit: contain;
}

.peek__name {
  display: block;
  width: 240px;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.slot {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 8px;
  font-size: 13px;
}

.slot--filled {
  background: var(--done-bg);
  border-style: solid;
  border-color: #bfe3cb;
}

.slots__group {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.slot__lead {
  flex: none;
  margin: 0;
  accent-color: var(--accent);
}

.slot--muted {
  background: var(--paper);
  border-style: solid;
  border-color: var(--line);
}

.slot__host {
  flex: none;
  color: var(--ink-faint);
  font-size: 12px;
}

.slot__label {
  color: var(--ink-soft);
  font-weight: 600;
  text-transform: capitalize;
}

.slot__value {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot__value[href]:hover {
  color: var(--accent);
  text-decoration: underline;
}

.slot__clear {
  padding: 0 4px;
  background: none;
  border: 0;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.picker__note {
  color: var(--ink-faint);
  font-size: 12px;
}

.panel__next {
  margin: 0 -16px;
  padding: 20px 16px 0;
  border-top: 1px solid var(--line);
}

.detail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px 24px;
  align-items: start;
}

.detail__head {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.detail__title {
  font-size: 22px;
  font-weight: 600;
}

.record__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 24px;
  align-items: start;
}

.record {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.record__identity {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
}

.record__name {
  width: 100%;
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 600;
}

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

.record__url {
  min-width: 0;
  flex: 1;
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
}

.record__name:hover,
.record__url:hover {
  border-bottom-color: var(--line);
}

.record__name:focus,
.record__url:focus {
  border-bottom-color: var(--accent);
  outline: none;
}

.record__url:focus {
  color: var(--ink);
}

.record__open {
  display: flex;
  flex: none;
  color: var(--ink-faint);
}

.record__open:hover {
  color: var(--accent);
}

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

.money {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.money:focus-within {
  border-color: var(--accent);
}

.money__amount {
  width: 84px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-family: var(--mono);
  font-size: 14px;
  text-align: right;
}

.money__amount:focus {
  outline: none;
}

.money__amount--was {
  color: var(--ink-faint);
  text-decoration: line-through;
}

.money__arrow {
  color: var(--line);
}

.money:has(.money__amount--was) .money__arrow {
  color: var(--ink-faint);
}

.money__amount::placeholder {
  color: var(--line);
  font-size: 12px;
}

.money__currency {
  width: 48px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 14px;
}

.money__currency:focus {
  color: var(--ink);
  outline: none;
}

.money__off {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--done-bg);
  color: var(--done-ink);
  font-size: 11px;
  font-weight: 600;
}

.flags {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 0;
  border: 0;
}

.flags__title {
  margin-bottom: 4px;
  padding: 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
}

.flag {
  display: flex;
  gap: 12px;
  align-items: center;
  cursor: pointer;
}

.flag__name {
  min-width: 0;
  flex: 1;
  font-size: 13px;
}

.flag__test {
  color: var(--ink-faint);
  font-size: 12px;
}

.flag__test::before {
  content: "· ";
}

.flag__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.flag__switch {
  position: relative;
  flex: none;
  width: 30px;
  height: 18px;
  background: var(--line);
  border-radius: 999px;
  transition: background 120ms ease;
}

.flag__switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: var(--card);
  border-radius: 50%;
  transition: transform 120ms ease;
}

.flag__input:checked + .flag__switch::after {
  transform: translateX(12px);
}

.flag__input:checked + .flag__switch--soon {
  background: var(--warn-ink);
}

.flag__input:checked + .flag__switch--gone {
  background: var(--todo-ink);
}

.flag__input:checked + .flag__switch--found {
  background: var(--ink);
}

.flag__input:focus-visible + .flag__switch {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.record__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.record__source {
  overflow: hidden;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record__source a {
  color: inherit;
}

.record__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}


.facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  font-size: 12px;
}

.facts__key {
  color: var(--ink-faint);
}

.facts__value {
  margin: 0 0 10px;
  color: var(--ink);
  font-family: var(--mono);
}

.scrape__why {
  color: var(--todo-ink);
  font-family: var(--sans);
}

.facts__value--waiting {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
}

.facts__value--waiting::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
}

.uses {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  max-height: 274px;
  overflow-y: auto;
  font-family: var(--sans);
}

.uses__link {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 3px;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
}

.uses__link:hover,
.uses__link:focus-visible {
  background: var(--accent-wash);
}

.uses__thumb {
  width: 34px;
  height: 44px;
  flex: none;
  border-radius: 4px;
  background: var(--wip-bg);
  object-fit: cover;
}

.uses__text {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.uses__creator,
.uses__role {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.uses__role {
  color: var(--ink-faint);
  font-size: 11px;
}

.products {
  max-width: 900px;
  margin-inline: auto;
}

.paste {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-faint);
}

.paste:focus-within {
  border-color: var(--accent);
}

.paste__input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
}

.paste__input:focus {
  outline: none;
}

.paste__count {
  flex: none;
  font-size: 12px;
}

.scope {
  display: flex;
  gap: 6px;
  margin: 14px 0 10px;
}

.scope__chip {
  padding: 4px 11px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 12px;
  text-decoration: none;
}

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

.scope__chip--on {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
}

.scope__chip b {
  font-weight: 600;
}

.table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.table th {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
}

.table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover td {
  background: var(--paper);
}

.table th:nth-child(1) {
  width: 34px;
}

.table th:nth-child(2) {
  width: 46%;
}

.table th:nth-child(3) {
  width: 22%;
}

.table th:nth-child(4) {
  width: 14%;
}

.table th.table__mark,
.table td.table__mark {
  padding-right: 0;
  text-align: center;
}

.mark {
  position: relative;
  z-index: 1;
  display: inline-flex;
  place-items: center;
}

.mark--incomplete {
  color: var(--todo-ink);
}

.mark--incomplete .icon {
  width: 15px;
  height: 15px;
}

.mark--review::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
}

.table__value,
.table__when {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table tbody tr {
  position: relative;
}

.table__name a {
  color: inherit;
  text-decoration: none;
}

.table__name a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.table__name a:focus-visible {
  outline: none;
}

.table__name a:focus-visible::after {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.table tbody tr:hover .table__name a {
  color: var(--accent);
}

.table__value {
  font-family: var(--mono);
  font-size: 12px;
}

.table__missing {
  color: var(--todo-ink);
  font-family: var(--mono);
  font-size: 12px;
}

.table__reading {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 12px;
}

.table__when {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
}

.table__more {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 12px;
}

.offer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 12px;
}

.offer__hint {
  color: var(--ink-faint);
  font-size: 12px;
}

.ingest {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 12px;
}

.ingest__message {
  color: var(--todo-ink);
  font-size: 13px;
}

.ingest--failed .button {
  justify-self: start;
}

.ingest__hint {
  color: var(--ink-faint);
  font-size: 12px;
}

.field {
  display: grid;
  gap: 4px;
}

.field__label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
}

.field__hint {
  color: var(--ink-faint);
  font-weight: 400;
}

.field__input {
  padding: 7px 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  font: inherit;
  font-size: 14px;
}

textarea.field__input {
  resize: vertical;
}

.field__input--untouched {
  color: var(--ink-faint);
}

.segmented {
  display: flex;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.segmented__option {
  flex: 1;
  padding: 7px 12px;
  font-size: 14px;
  text-align: center;
  text-wrap: nowrap;
  cursor: pointer;
}

.segmented__option:has(.segmented__radio:checked) {
  background: var(--accent);
  color: var(--accent-ink);
}

.segmented__option:has(.segmented__radio:focus-visible) {
  outline: 2px solid rgb(59 91 219 / 25%);
  outline-offset: -2px;
}

.segmented__radio,
.tabs__radio {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.field__input:focus-visible {
  border-color: var(--accent);
  outline: 2px solid rgb(59 91 219 / 25%);
}

.button {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.button--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.button--danger {
  border-color: #f0c8c8;
  color: var(--danger);
}

.button--ghost {
  background: transparent;
}

.button--small {
  padding: 4px 8px;
  font-size: 13px;
}

.button--tiny {
  padding: 2px 8px;
  font-size: 12px;
}

.button--block {
  width: 100%;
}

.badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.badge--untagged {
  background: var(--warn-bg);
  color: var(--warn-ink);
}

.badge--unplaced,
.badge--failed {
  background: var(--todo-bg);
  color: var(--todo-ink);
}

.badge--reading {
  background: var(--line);
  color: var(--ink-soft);
}

.badge--placed {
  background: var(--done-bg);
  color: var(--done-ink);
}

.badge--expired {
  background: var(--warn-bg);
  color: var(--warn-ink);
}

.badge--wip {
  background: var(--wip-bg);
  color: var(--wip-ink);
}

.badge--changes {
  background: var(--todo-bg);
  color: var(--todo-ink);
}

.badge--review {
  background: var(--accent-wash);
  color: var(--accent);
}

.badge--discarded {
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-faint);
}

.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: grid;
  gap: 8px;
}

.toast {
  max-width: 320px;
  padding: 10px 14px;
  background: var(--ink);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: #fff;
  font-size: 14px;
}

.toast__undo {
  margin-left: 16px;
  padding: 0;
  background: none;
  border: 0;
  color: #b9c6ff;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

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

.toast--error {
  background: var(--danger);
}

.toast--leaving {
  pointer-events: none;
}

.failure {
  display: grid;
  gap: 12px;
  justify-items: start;
  max-width: 52ch;
  margin: 64px auto;
}

.failure__title {
  font-size: 22px;
  font-weight: 600;
}

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

.stepper {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  padding: 2px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.stepper__step {
  display: grid;
  place-items: center;
  width: 34px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
}

.stepper__step:enabled:hover,
.stepper__step:focus-visible {
  background: var(--well);
  color: var(--ink);
}

.stepper__step:focus-visible {
  outline: 2px solid rgb(59 91 219 / 25%);
  outline-offset: -2px;
}

.stepper__step:disabled {
  color: var(--line);
  cursor: not-allowed;
}

.stepper__at {
  min-width: 68px;
  text-align: center;
  font-family: var(--mono);
  font-size: 13px;
}

.notice {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.notice--discarded {
  background: var(--todo-bg);
  color: var(--todo-ink);
}

.button--return {
  border-color: #f0c8c8;
  background: transparent;
  color: var(--danger);
}

.card__discard {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  background: rgb(255 255 255 / 88%);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgb(16 17 26 / 20%);
  color: var(--danger);
  cursor: pointer;
  opacity: 0;
  transition: opacity 120ms ease;
}

.card:hover .card__discard,
.card__discard:focus-visible,
.card__discard.htmx-request {
  opacity: 1;
}

.card__priority {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  background: rgb(255 255 255 / 88%);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgb(16 17 26 / 20%);
  color: var(--ink-faint);
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 120ms ease,
    color 120ms ease,
    transform 120ms ease;
}

.card:hover .card__priority,
.card__priority:focus-visible,
.card__priority--on {
  opacity: 1;
}

.card__priority:hover,
.card__priority:focus-visible {
  color: var(--star);
  transform: scale(1.12);
}

.card__priority--on {
  color: var(--star);
}

.card__priority--on:hover,
.card__priority--on:focus-visible {
  color: var(--ink-faint);
}

.card__priority--on .icon {
  fill: currentcolor;
}

.card__priority--on:hover .icon {
  fill: none;
}

.card__timecode {
  position: absolute;
  top: calc(100cqw / var(--box) - 32px);
  right: 8px;
  z-index: 1;
  display: inline-flex;
  gap: 4px;
  align-items: center;
  height: 24px;
  padding: 0 8px 0 6px;
  border-radius: 6px;
  background: rgb(22 23 26 / 72%);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
}

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

.card__timecode:hover,
.card__timecode:focus-visible {
  background: var(--accent);
}

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

.panel__discard {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-faint);
  font-size: 18px;
  cursor: pointer;
}

.panel__discard:hover,
.panel__discard:focus-visible {
  color: var(--danger);
}

.panel__actions .card__priority {
  position: static;
  width: 26px;
  height: 26px;
  background: none;
  border: 0;
  box-shadow: none;
  font-size: 18px;
  opacity: 1;
}

.card__discard--live,
.card__discard--publish {
  opacity: 1;
  color: var(--done-ink);
}

.card__discard--publish {
  color: var(--ink-faint);
}

.card__discard--publish:hover {
  color: var(--accent);
}

.card__corner {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  display: flex;
  flex-direction: row-reverse;
  gap: 8px;
}

.card__corner > .card__discard {
  position: static;
}

.card__ready {
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0;
  background: rgb(255 255 255 / 88%);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgb(16 17 26 / 20%);
  color: var(--ink-faint);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 120ms ease,
    color 120ms ease,
    background-color 120ms ease;
}

.card:hover .card__ready,
.card__ready:focus-visible,
.card__ready.htmx-request,
.card__ready--on {
  opacity: 1;
}

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

.card__ready--on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.card__ready--on .icon {
  stroke-width: 2.4;
}

.card__ready--on:hover {
  background: color-mix(in srgb, var(--accent) 85%, var(--ink));
  color: var(--accent-ink);
}

.card__ready span,
.card__ready .icon + .icon {
  display: none;
}

.card__ready:not(.card__ready--sending):is(:hover, :focus-visible) {
  padding: 0 10px 0 8px;
}

.card__ready:not(.card__ready--sending):is(:hover, :focus-visible) span {
  display: inline;
}

.card__ready--sending,
.card__ready--sending:hover {
  background: var(--card);
  border-color: var(--danger);
  color: var(--danger);
}

.card__ready--sending .icon:first-child {
  display: none;
}

.card__ready--sending .icon + .icon {
  display: block;
  color: var(--danger);
}


.card__send {
  position: absolute;
  top: 46px;
  right: 8px;
  left: 8px;
  z-index: 2;
  display: grid;
  gap: 2px;
  padding: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgb(16 17 26 / 18%);
}

.range__months {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.range__month {
  flex: 1 1 210px;
}

.range__head {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  margin-bottom: 8px;
}

.range__title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
}

.range__turn {
  display: inline-flex;
  padding: 4px;
  background: none;
  border: 0;
  border-radius: 6px;
  color: var(--ink-soft);
  cursor: pointer;
}

.range__turn:hover {
  background: var(--paper);
  color: var(--ink);
}

.range__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}

.range__weekday {
  padding-bottom: 4px;
  color: var(--ink-faint);
  font-size: 11px;
  text-align: center;
}

.range__day {
  padding: 5px 0;
  background: none;
  border: 0;
  border-radius: 6px;
  color: inherit;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.range__day:hover {
  background: var(--paper);
}

.range__day--outside {
  color: var(--ink-faint);
}

.range__day.is-inside {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 0;
}

.range__day.is-end {
  background: var(--accent);
  color: var(--accent-ink);
}

.range__footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.range__hint {
  color: var(--ink-soft);
  font-size: 13px;
}

.hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 12px 20px;
  align-items: start;
}

.hero > .record__identity {
  grid-column: 2;
  grid-row: 1;
}

.hero > .hero__text {
  grid-column: 2;
  grid-row: 2;
}

.hero > .photos {
  grid-column: 1;
  grid-row: 1 / span 2;
}

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

.photos {
  display: grid;
  grid-template-columns: 56px 240px;
  gap: 8px 12px;
  align-items: start;
}

.photos__rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-content: start;
}

.photos__main {
  display: grid;
  gap: 6px;
  margin: 0;
}

.photos__field,
.photos__empty,
.photos__full {
  grid-column: 1 / -1;
}

.photos__empty {
  padding: 22px 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  text-align: center;
}

.photos__full,
.photos__refused {
  font-size: 12px;
}

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

.photos__refused {
  color: var(--todo-ink);
}

.photos__fetching {
  display: none;
  color: var(--accent);
  font-size: 12px;
}

.photos.htmx-request .photos__fetching {
  display: block;
}

.photos.htmx-request .photos__refused {
  display: none;
}

.photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--wip-bg);
  border-radius: 8px;
}

.photo--first {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.photos__rail > .photo[draggable] {
  cursor: grab;
}

.photos__rail > .photo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.photo--dragging {
  opacity: 0.4;
}

.photo--before {
  box-shadow: 0 -5px 0 -1px var(--accent);
}

.photo--after {
  box-shadow: 0 5px 0 -1px var(--accent);
}

.photo__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo__img--gone {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23b4b9c4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='2' x2='22' y1='2' y2='22'/><path d='M10.41 10.41a2 2 0 1 1-2.83-2.83'/><line x1='13.5' x2='6' y1='13.5' y2='21'/><line x1='18' x2='21' y1='12' y2='15'/><path d='M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59'/><path d='M21 15V5a2 2 0 0 0-2-2H9'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px;
  object-fit: none;
}

.photo__pick {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.photo__pick:hover .photo__img,
.photo__pick:focus-visible .photo__img {
  opacity: 0.8;
}

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

.photo__remove {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgb(22 23 26 / 68%);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.photo__remove .icon {
  width: 12px;
  height: 12px;
}

.photo__remove:hover,
.photo__remove:focus-visible {
  background: var(--danger);
}

.photo--add {
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
}

.photo--add:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.photo--fetching {
  display: none;
  place-items: center;
  color: var(--ink-faint);
  font-size: 10px;
  background: linear-gradient(
    100deg,
    var(--wip-bg) 30%,
    var(--card) 50%,
    var(--wip-bg) 70%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.photos.htmx-request .photo--fetching {
  display: grid;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

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

.home__filters {
  display: contents;
}

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

.home__totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.home__total {
  display: grid;
  gap: 2px;
  padding: 16px 20px;
  background: var(--card);
}

.home__label {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.home__figure {
  margin: 4px 0 0;
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.home__detail {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.home__ready {
  grid-column: 1 / -1;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 28px;
  align-items: center;
}

.home__ready .home__label,
.home__ready .home__figure {
  grid-column: 1;
}

.home__of {
  margin-left: 6px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.home__progress {
  display: grid;
  gap: 10px;
  grid-column: 2;
  grid-row: 1 / 3;
  margin: 0;
}

.home__progress .trend__key {
  margin: 0;
}

.progress {
  display: flex;
  height: 14px;
  overflow: hidden;
  background: var(--well);
  border-radius: 7px;
}

.progress i {
  height: 100%;
  background: var(--accent);
}

.progress i + i {
  background: var(--danger);
}

.home__gaps {
  display: grid;
  gap: 6px;
  grid-column: 3;
  grid-row: 1 / 3;
  margin: 0;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.home__gap {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 13px;
}

.home__gap b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.home__tabs {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  box-shadow: inset 0 -1px 0 var(--line);
  scrollbar-width: none;
}

.home__tab {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 10px 0 11px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

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

.home__tab[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--accent);
  color: var(--ink);
}

.home__badge {
  padding: 1px 8px;
  background: var(--well);
  border-radius: 999px;
  color: var(--ink);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.home__tab[aria-current="page"] .home__badge {
  background: var(--accent-wash);
  color: var(--accent);
}

.home__panel {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.home__summary {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 22px 24px;
  background: var(--card);
}

.home__count {
  display: grid;
  gap: 6px;
}

.home__count b {
  font-size: 48px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.home__count span {
  color: var(--ink-soft);
  font-size: 14px;
}

.home__parts {
  display: grid;
  gap: 8px;
}

.home__part {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.home__tally {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
}

.home__charts {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 1px;
}

.home__chart {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
  padding: 20px 22px;
  background: var(--card);
}

.home__heading {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.home__note {
  color: var(--ink-faint);
  font-weight: 500;
}

.home__heading h2 {
  font: inherit;
}

.home__heading:has(.periods) {
  align-items: center;
}

.periods {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  background: var(--well);
  border-radius: 7px;
}

.periods__option {
  padding: 2px 8px;
  border-radius: 5px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

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

.periods__option[aria-current] {
  background: var(--card);
  box-shadow: 0 1px 2px rgb(16 17 26 / 14%);
  color: var(--ink);
}

.trend__key {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: center;
  margin-top: -4px;
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 500;
}

.trend__mine {
  color: var(--ink);
  font-weight: 600;
}

.trend__found,
.trend__seen,
.trend__all,
.trend__marked,
.trend__unmarked,
.trend__missing,
.trend__blank {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--ink-soft);
}

.trend__found::before,
.trend__seen::before,
.trend__marked::before,
.trend__unmarked::before,
.trend__missing::before,
.trend__blank::before {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 2px;
  content: "";
}

.trend__seen::before {
  background: color-mix(in srgb, var(--accent) 26%, transparent);
}

.trend__unmarked::before {
  background: color-mix(in srgb, var(--accent) 26%, transparent);
}

.trend__missing::before {
  background: var(--danger);
}

.trend__blank::before {
  background: var(--well);
  box-shadow: inset 0 0 0 1px var(--line);
}

.trend__all::before {
  width: 12px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--ink-faint) 0 3px, transparent 3px 6px);
  content: "";
}

.trend__everyone {
  margin-left: auto;
  color: var(--ink-soft);
  text-decoration: none;
}

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

.home__empty {
  color: var(--ink-soft);
  font-size: 14px;
}

.home__people {
  display: grid;
  gap: 12px;
  margin: 4px 0 0;
  padding: 0;
  container-type: inline-size;
  list-style: none;
}

.home__person {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) minmax(60px, 110px) 40px 64px;
  gap: 12px;
  align-items: center;
  margin: -4px -6px;
  padding: 4px 6px;
  border-radius: 8px;
  color: inherit;
  font-size: 14px;
  text-decoration: none;
}

.home__person:hover {
  background: var(--paper);
}

.home__people:has(.home__person--focus) .home__person:not(.home__person--focus) {
  opacity: 0.5;
}

.home__person--focus .home__name {
  color: var(--accent);
}

.home__avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--well);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
}

.home__name {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home__bar {
  display: flex;
  height: 8px;
  overflow: hidden;
  background: var(--well);
  border-radius: 4px;
}

.home__bar i {
  height: 100%;
  background: var(--accent);
}

.home__bar i + i {
  background: color-mix(in srgb, var(--accent) 26%, transparent);
}

.home__found {
  color: var(--ink-faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

@container (width < 360px) {
  .home__person {
    grid-template-columns: 28px minmax(0, 1fr) 40px 64px;
  }

  .home__bar {
    display: none;
  }
}

.bars {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bars__bin {
  display: grid;
  gap: 6px;
}

.bars__track {
  position: relative;
  height: 150px;
  border-bottom: 1px solid var(--line);
}

.bars__bar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: calc(var(--share) * 0.85);
  overflow: hidden;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
}

.bars--split .bars__bar {
  background: color-mix(in srgb, var(--accent) 26%, transparent);
}

.bars__found {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--accent);
}

.bars__bin--flagged .bars__bar {
  background: var(--star);
}

.bars__value {
  position: absolute;
  right: 0;
  bottom: calc(var(--share) * 0.85 + 4px);
  left: 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: center;
}

.bars__label {
  color: var(--ink-soft);
  font-size: 12px;
  text-align: center;
}

.bars--pick {
  gap: 6px;
}

.bars--pick .bars__bin {
  position: relative;
  cursor: pointer;
}

.bars--pick .bars__track {
  height: 96px;
  border-radius: 3px 3px 0 0;
}

.bars--pick .bars__bar {
  background: color-mix(in srgb, var(--accent) 26%, transparent);
  transition: background 120ms ease;
}

.bars--pick:has(:checked) .bars__bar {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.bars--pick .bars__bin:hover .bars__bar {
  background: color-mix(in srgb, var(--accent) 45%, transparent);
}

.bars--pick .bars__bin:has(:checked) .bars__bar {
  background: var(--accent);
}

.bars--pick .bars__bin:has(:checked) .bars__label {
  color: var(--ink);
  font-weight: 600;
}

.bars--pick .bars__bin:has(:focus-visible) .bars__track {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.bars__check {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.bars__axis {
  color: var(--ink-faint);
  font-size: 12px;
  text-align: center;
}

.trend {
  display: block;
  width: 100%;
  height: 150px;
  overflow: visible;
}

.trend__bar {
  fill: var(--accent);
}

.trend__bar--seen {
  fill: color-mix(in srgb, var(--accent) 26%, transparent);
}

.trend__outline {
  fill: none;
  stroke: var(--ink-faint);
  stroke-dasharray: 3 3;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.trend__day {
  fill: transparent;
}

.trend__day:hover {
  fill: color-mix(in srgb, var(--ink) 6%, transparent);
}

.trend__ends {
  display: flex;
  justify-content: space-between;
  color: var(--ink-faint);
  font-size: 12px;
}

@media (width <= 1100px) {
  .home__totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (width <= 720px) {
  .shell {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
  }

  .rail {
    position: fixed;
    z-index: 30;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    flex-direction: row;
    align-items: center;
    height: auto;
    padding: 6px 8px;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .rail__mark {
    display: none;
  }

  .rail__stage {
    flex: 1;
  }

  .signout {
    position: absolute;
    top: 24px;
    right: 12px;
    bottom: auto;
    left: auto;
    width: auto;
    padding: 6px;
  }

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

  .queue__title {
    padding-right: 36px;
  }

  .picker__footer {
    bottom: 80px;
  }

  .main {
    padding-bottom: 80px;
  }
}

@media (width <= 560px) {
  .filters__chips {
    order: 3;
    flex-basis: 100%;
  }

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

  .home__ready {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 12px;
  }

  .home__progress,
  .home__gaps {
    grid-column: 1;
    grid-row: auto;
  }

  .home__gaps {
    padding: 12px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (width > 560px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (width <= 900px) {
  .editor {
    grid-template-columns: minmax(0, 1fr);
  }

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

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

  .home__charts {
    grid-auto-flow: row;
  }
}

@media (width > 900px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stage {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
  }

  .editor__back {
    position: sticky;
    top: 24px;
  }
}

@media (width > 1200px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .stage:has(.stage__text) {
    grid-template-columns: minmax(240px, 420px) minmax(0, auto);
    column-gap: 20px;
    justify-items: stretch;
    align-items: start;
  }

  .stage__text {
    order: -1;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    height: 0;
    min-height: 100%;
    overflow: hidden;
  }

  .stage__text > * {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    max-height: 45%;
  }

  .stage__fill {
    flex-shrink: 1;
    min-height: 0;
    max-height: none;
  }

  .stage__text .caption__text,
  .stage__text .transcript {
    min-height: 0;
  }

  .stage__fill .caption__text,
  .stage__fill .transcript {
    max-height: none;
  }

  .stage:has(.stage__text) > :not(.stage__text) {
    grid-column: 2;
  }

  .stage:has(.compare--split) {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .stage:has(.compare--split) > :not(.stage__text) {
    grid-column: auto;
  }

  .stage:has(.compare--split) .stage__text {
    order: 0;
    height: auto;
    min-height: 0;
    overflow: visible;
  }
}

@media (hover: hover) {
  .result__seen:hover .peek,
  .result__zoom:hover .peek {
    display: flex;
  }
}

@media (hover: none) {
  .card__discard,
  .card__priority,
  .card__ready {
    opacity: 1;
  }
}

@media (width <= 720px) {
  .table th:last-child,
  .table td:last-child {
    display: none;
  }

  .sheet--filters {
    width: 100%;
    max-width: none;
    max-height: 88vh;
    margin: auto 0 0;
    border-radius: 16px 16px 0 0;
  }

  .sheet--filters .sheet__form {
    max-height: 88vh;
  }

  .sheet--filters .sheet__head {
    position: relative;
    padding-top: 24px;
  }

  .sheet--filters .sheet__head::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    width: 36px;
    height: 4px;
    margin-left: -18px;
    background: var(--line);
    border-radius: 2px;
  }

  .sheet--filters .sheet__foot {
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }

  .sheet--filters .sheet__foot .button {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card__priority,
  .card__ready,
  .flag__switch,
  .flag__switch::after,
  .hotspot__actions .button,
  .hotspots__head .button,
  .picker__footer .button,
  .record__actions .button,
  .result__step {
    transition: none;
  }

  .photo--fetching {
    animation: none;
  }

  .card__priority:hover,
  .card__priority:focus-visible,
  .hotspot__actions .button:active,
  .hotspots__head .button:active,
  .picker__footer .button:not(:disabled):active,
  .record__actions .button:not(:disabled):active,
  button.pin:hover,
  button.pin:focus-visible {
    transform: none;
  }
}

@media (width <= 900px) {
  .record__layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (width <= 560px) {
  .record__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (width <= 1024px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }

  .hero > .record__identity,
  .hero > .hero__text,
  .hero > .photos {
    grid-column: auto;
    grid-row: auto;
  }
}
