/* browser/preview.css */
.map-preview {
  min-width: 0;
  width: 100%;
}
.preview-canvas {
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  background: #111;
}
.preview-controls {
  display: grid;
  grid-template-columns: 36px 36px minmax(60px, 1fr) auto 120px;
  gap: 10px;
  align-items: center;
  min-height: 56px;
}
.preview-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 6px;
  cursor: pointer;
}
.preview-controls svg {
  width: 18px;
  height: 18px;
}
.preview-controls input[type=range] {
  width: 100%;
  min-width: 0;
  margin: 0;
  accent-color: var(--accent, #d2df4f);
  cursor: pointer;
}
.preview-volume {
  display: flex;
  align-items: center;
  gap: 8px;
}
.preview-volume svg {
  flex-shrink: 0;
}
.preview-time {
  font: 12px ui-monospace, monospace;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.preview-status {
  min-height: 1.5em;
  margin: 2px 0 12px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.preview-clip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
}
.preview-clip[hidden] {
  display: none;
}
.preview-clip audio {
  height: 36px;
  max-width: 100%;
}
@media (max-width: 600px) {
  .preview-controls {
    grid-template-columns: 32px 32px minmax(40px, 1fr) auto;
    gap: 8px;
  }
  .preview-volume {
    grid-column: 3 / 5;
    justify-self: end;
    width: 110px;
    padding-bottom: 10px;
  }
  .preview-icon {
    width: 32px;
    height: 32px;
  }
}

/* browser/review.css */
@font-face {
  font-family: Monocraft;
  src: url(/assets/Monocraft.ttf) format("truetype");
  font-display: swap;
}
:root {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #17161a;
  background: #f5f3ec;
  font-synthesis: none;
  --ink:#17161a;
  --paper:#f5f3ec;
  --green:#257a44;
  --lime:#b8e57b;
  --yellow:#f5d547;
  --error:#a12435;
}
* {
  box-sizing: border-box;
  letter-spacing: 0;
}
body {
  margin: 0;
  min-width: 300px;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
  border-radius: 0;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
  background: transparent;
  min-height: 44px;
  padding: 10px 14px;
  font-weight: 650;
}
button:disabled {
  cursor: wait;
  opacity: .55;
}
button:hover:not(:disabled) {
  background: var(--yellow);
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
a:hover {
  color: var(--green);
}
:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 4px;
}
svg {
  width: 20px;
  height: 20px;
  flex: none;
  vertical-align: middle;
  pointer-events: none;
}
.site-header {
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 4px solid var(--ink);
}
.wordmark {
  font-family: Monocraft, monospace;
  font-size: 26px;
  text-decoration: none;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.brand-divider {
  color: var(--green);
}
.brand-section,
.network-link {
  font-family: Monocraft, monospace;
  font-size: 11px;
}
.network-link {
  text-decoration: none;
  white-space: nowrap;
}
main {
  max-width: 1328px;
  margin: 0 auto;
  padding: 28px 32px 64px;
}
.review-app {
  max-width: 1800px;
  padding-top: 22px;
}
.initial-state {
  padding: 60px 0;
}
.eyebrow {
  font-family: Monocraft, monospace;
  font-size: 11px;
  line-height: 1.6;
  text-transform: uppercase;
  margin: 0 0 12px;
}
h1 {
  font-size: 26px;
  line-height: 1.3;
  margin: 0 0 16px;
  font-weight: 750;
  max-width: 920px;
  overflow-wrap: anywhere;
}
h2 {
  font-size: 21px;
  margin: 0 0 18px;
  line-height: 1.3;
}
h3 {
  font-size: 17px;
  line-height: 1.35;
  margin: 0;
}
p {
  line-height: 1.5;
}
.toolbar,
.heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.heading-row {
  margin-bottom: 12px;
}
.progress-block {
  display: flex;
  align-items: center;
  gap: 12px;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
progress {
  appearance: none;
  width: 160px;
  height: 8px;
  border: 0;
  background: #d4d5cb;
}
progress::-webkit-progress-bar {
  background: #d4d5cb;
}
progress::-webkit-progress-value {
  background: var(--green);
}
progress::-moz-progress-bar {
  background: var(--green);
}
.trial-heading {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 0 0 22px;
  margin-bottom: 22px;
  border-bottom: 4px solid var(--ink);
}
.query-target {
  display: flex;
  gap: 8px;
  flex: none;
  align-self: stretch;
}
.query-tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  min-width: 108px;
}
.query-tile > span {
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.query-tile strong {
  font-family: Monocraft, monospace;
  font-size: 30px;
  white-space: nowrap;
  font-weight: 400;
}
.query-tile small {
  font-family: system-ui, sans-serif;
  font-size: 15px;
  font-weight: 650;
}
.slot {
  background: var(--lime);
}
.target {
  background: var(--yellow);
}
.decision-heading {
  flex: 1;
  min-width: 0;
}
.decision-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.stage-steps {
  display: flex;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
}
.stage-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
}
.stage-steps [aria-current=step] {
  background: var(--ink);
  color: var(--paper);
  font-weight: 650;
}
.decision-heading h1 {
  font-size: 24px;
  margin: 0 0 6px;
  max-width: none;
}
.decision-basis {
  font-size: 14px;
  margin: 0;
  max-width: 880px;
}
.review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px 28px;
  align-items: start;
}
.review-layout.with-context {
  grid-template-columns: minmax(0, 1fr) minmax(350px, 400px);
}
.candidate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  min-width: 0;
}
.candidate {
  min-width: 0;
  border-bottom: 4px solid var(--ink);
  padding-bottom: 14px;
}
.candidate-media {
  width: 100%;
  height: 76px;
  display: block;
  object-fit: cover;
  background: #dde5db;
}
.candidate-main {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  padding-top: 12px;
}
.candidate-letter {
  font-family: Monocraft, monospace;
  font-size: 28px;
  line-height: 44px;
  text-align: center;
  background: var(--ink);
  color: var(--paper);
  height: 44px;
}
.candidate[data-active=true] .candidate-letter {
  background: var(--green);
}
.map-title {
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.3;
  margin: 0 0 5px;
}
.map-detail {
  font-size: 13px;
  margin: 0;
  overflow-wrap: anywhere;
}
.map-stats {
  display: flex;
  gap: 10px 18px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.map-stats div {
  min-width: 50px;
}
.map-stats dt {
  font-size: 11px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.map-stats dd {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  margin: 0;
  font-weight: 650;
}
.candidate-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.candidate-actions a {
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.preview-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: var(--ink);
  color: var(--paper);
}
.preview-button:hover:not(:disabled),
.preview-button[aria-pressed=true] {
  background: var(--green);
  color: white;
}
.workbench {
  grid-column: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(270px, 1fr);
  align-items: start;
  gap: 24px;
  min-width: 0;
}
.preview-region {
  min-width: 0;
}
.preview-region h2 {
  font-size: 16px;
  margin-bottom: 12px;
}
.preview-empty {
  aspect-ratio: 16/9;
  background: #17161a;
  color: #e6e6e1;
  display: grid;
  place-items: center;
  font-size: 14px;
}
.rating-form {
  padding: 0;
  min-width: 0;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 16px;
  min-width: 0;
}
legend {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}
.choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 12px;
  background: #e6e8df;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.choice:has(input:checked) {
  background: var(--lime);
}
.choice:last-child {
  grid-column: 1/-1;
}
input[type=radio],
input[type=checkbox] {
  accent-color: var(--green);
  width: 17px;
  height: 17px;
  flex: none;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 18px;
  min-width: 0;
}
.field input:not([type=checkbox]),
.field textarea,
.field select {
  width: 100%;
  border: 2px solid var(--ink);
  background: #fff;
  padding: 10px 12px;
  min-height: 44px;
  font-weight: 400;
  min-width: 0;
}
textarea {
  resize: vertical;
  min-height: 76px;
}
.optional {
  font-weight: 400;
  font-size: 12px;
}
.primary {
  background: var(--ink);
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.primary:hover:not(:disabled) {
  background: var(--green);
  color: white;
}
.submit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.save-status {
  font-size: 12px;
  min-height: 20px;
}
.save-status[data-error=true] {
  color: var(--error);
}
.reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.reasons label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}
.context-section {
  grid-column: 2;
  grid-row: 1/3;
  min-width: 0;
  position: sticky;
  top: 18px;
  border-top: 4px solid var(--green);
  padding-top: 14px;
}
.context-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.context-heading h2 {
  font-size: 20px;
  margin: 0;
}
.context-count {
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}
.context-phase {
  font-size: 12px;
  margin: 6px 0 14px;
  font-weight: 600;
}
.context-section .table-wrap {
  max-height: calc(100svh - 240px);
  overflow: auto;
  scrollbar-gutter: stable;
}
.context-section th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.context-section td {
  padding: 9px 6px;
  font-size: 12px;
}
.context-section th {
  padding: 10px 6px;
}
.context-section .icon-button {
  width: 36px;
  height: 40px;
  padding: 8px;
}
.context-section [data-preview][aria-pressed=true] {
  background: var(--lime);
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
  padding: 12px 10px;
  background: var(--ink);
  color: var(--paper);
}
td {
  padding: 12px 10px;
  vertical-align: middle;
  border-bottom: 2px solid #d4d5cb;
}
td:first-child {
  font-weight: 650;
}
.context-title {
  overflow-wrap: anywhere;
}
.context-title small {
  display: block;
  font-size: 11px;
  margin-top: 3px;
  font-weight: 400;
}
.context-title a {
  text-decoration: none;
}
.icon-button {
  width: 44px;
  height: 44px;
  padding: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nowrap {
  white-space: nowrap;
}
.complete {
  max-width: 720px;
  padding: 70px 0;
}
.complete h1 {
  font-family: Monocraft, monospace;
  font-size: 30px;
}
.complete p {
  font-size: 16px;
}
#notice {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 720px;
  margin: 0 auto;
  background: var(--ink);
  color: white;
  padding: 14px 18px;
  z-index: 50;
  font-size: 14px;
  box-shadow: 0 4px 0 var(--error);
  overflow-wrap: anywhere;
}
.admin-heading {
  margin-bottom: 30px;
}
.admin-heading h1 {
  font-family: Monocraft, monospace;
  font-size: 28px;
  margin: 0;
}
.admin-grid {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(0, 3fr);
  gap: 32px;
}
.admin-sidebar {
  border-right: 4px solid var(--ink);
  padding-right: 24px;
}
.batch-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}
.batch-list button {
  display: block;
  text-align: left;
  width: 100%;
  overflow-wrap: anywhere;
  border-bottom: 2px solid var(--ink);
  font-weight: 500;
}
.batch-list button[aria-current=true] {
  background: var(--lime);
}
.admin-section {
  margin-bottom: 32px;
  padding-top: 20px;
  border-top: 4px solid var(--ink);
}
.admin-section h2 {
  font-size: 19px;
}
.admin-summary {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.stat strong {
  font-family: Monocraft, monospace;
  font-size: 28px;
  display: block;
  margin-bottom: 6px;
}
.stat span {
  font-size: 12px;
}
.inline-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.inline-form .field {
  flex: 1;
  min-width: 140px;
}
.inline-form button {
  margin-bottom: 18px;
}
.admin-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.download-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
}
.invite-result {
  background: var(--lime);
  padding: 18px;
  margin-bottom: 24px;
  overflow-wrap: anywhere;
}
.invite-result .field {
  margin: 8px 0;
}
.invite-result input {
  font-family: ui-monospace, monospace;
  font-size: 12px;
}
.empty {
  padding: 28px 0;
  line-height: 1.6;
}
.checkline {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 13px;
  margin: 0 0 16px;
}
.danger {
  color: var(--error);
}
.import-summary {
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.stage-enter .decision-heading {
  animation: stage-enter 220ms ease-out;
}
.stage-enter .stage-steps [aria-current=step] {
  animation: stage-stamp 400ms ease-out;
}
@keyframes stage-enter {
  from {
    opacity: .35;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes stage-stamp {
  from {
    background: var(--green);
    transform: translateX(8px);
  }
  to {
    background: var(--ink);
    transform: translateX(0);
  }
}
[hidden] {
  display: none !important;
}
@media (max-width: 1300px) {
  .review-layout.with-context {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
  .with-context .workbench {
    grid-template-columns: 1fr;
  }
  .trial-heading {
    align-items: flex-start;
  }
  .decision-topline {
    gap: 6px;
  }
  .query-tile {
    padding: 14px;
  }
  .decision-heading h1 {
    font-size: 22px;
  }
  .context-section .table-wrap {
    max-height: calc(100svh - 120px);
  }
}
@media (max-width: 1000px) {
  .trial-heading {
    flex-wrap: wrap;
    gap: 18px;
  }
  .query-target {
    align-self: auto;
  }
  .decision-heading {
    flex-basis: 100%;
  }
  .review-layout.with-context {
    grid-template-columns: minmax(0, 1fr);
  }
  .context-section {
    position: static;
    grid-column: 1;
    grid-row: auto;
  }
  .context-section .table-wrap {
    max-height: 310px;
  }
  .with-context .workbench {
    grid-template-columns: minmax(0, 1.5fr) minmax(270px, 1fr);
  }
  .context-section .context-title {
    width: 100%;
  }
  .context-section td {
    font-size: 13px;
  }
  .query-tile {
    min-width: 130px;
  }
}
@media (max-width: 800px) {
  .site-header {
    padding: 16px 20px;
  }
  .wordmark {
    font-size: 22px;
    gap: 9px;
  }
  main {
    padding: 22px 20px 44px;
  }
  .workbench,
  .with-context .workbench {
    grid-template-columns: 1fr;
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    border-right: 0;
    border-bottom: 4px solid var(--ink);
    padding: 0 0 20px;
  }
  .batch-list {
    margin-bottom: 16px;
  }
  .batch-list button {
    width: auto;
    display: inline-block;
  }
  .candidate-grid {
    gap: 16px;
  }
  .map-stats {
    gap: 12px;
  }
}
@media (max-width: 480px) {
  .network-link {
    display: none;
  }
  .site-header {
    padding: 14px 16px;
  }
  .wordmark {
    font-size: 22px;
  }
  .brand-section {
    font-size: 10px;
  }
  main {
    padding: 18px 16px 36px;
  }
  h1,
  .decision-heading h1 {
    font-size: 20px;
  }
  .query-target {
    width: 100%;
  }
  .query-tile {
    min-width: 0;
    padding: 12px;
    flex: 1;
  }
  .query-tile strong {
    font-size: 28px;
  }
  .query-tile > span {
    font-size: 10px;
  }
  .decision-basis {
    font-size: 13px;
  }
  .decision-topline {
    gap: 10px;
  }
  .stage-steps {
    gap: 4px;
  }
  .stage-steps li {
    padding: 5px;
    font-size: 11px;
  }
  .trial-heading {
    margin-bottom: 18px;
    padding-bottom: 18px;
  }
  .candidate-grid {
    gap: 12px;
  }
  .candidate-main {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .candidate-letter {
    width: 32px;
    height: 32px;
    font-size: 22px;
    line-height: 32px;
  }
  .candidate-media {
    height: 58px;
  }
  .map-title {
    font-size: 14px;
  }
  .map-detail {
    font-size: 12px;
  }
  .map-stats {
    gap: 8px;
  }
  .map-stats dd {
    font-size: 13px;
  }
  .map-stats dt {
    font-size: 10px;
  }
  .map-stats div {
    min-width: 38px;
  }
  .candidate-actions {
    gap: 5px;
  }
  .preview-button {
    padding: 9px 8px;
    font-size: 12px;
  }
  .candidate-actions a {
    font-size: 12px;
  }
  .heading-row {
    gap: 10px;
  }
  progress {
    width: 70px;
  }
  .context-section td {
    padding: 8px 4px;
  }
  .context-section .icon-button {
    width: 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
