/* The studio design is documented in DESIGN.md. Keep the two in step: change both or neither. */

:root {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --line: #dde3eb;
  --line-strong: #c5cfdc;
  --text: #1a2433;
  --muted: #647389;
  --blue: #1f5fbf;
  --blue-dark: #174a96;
  --blue-soft: #e8eff9;
  --error: #c0392b;
  --warning: #a86a00;
  --ok: #2e7d4f;
  --radius: 6px;
  color-scheme: light;
  /* The rule editor package is themed through these. */
  --mq-editor-accent: var(--blue);
  --mq-editor-bg: var(--bg);
  --mq-editor-surface: var(--panel);
  --mq-editor-text: var(--text);
  --mq-editor-muted: var(--muted);
  --mq-editor-border: var(--line);
  --mq-editor-font: "Inter", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 13px/1.4 "Inter", system-ui, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button,
select,
input:not([type="checkbox"]),
textarea {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 4px 8px;
  min-height: 28px;
}

button {
  cursor: pointer;
  white-space: nowrap;
}

button:hover:not(:disabled),
select:hover {
  border-color: var(--blue);
}

button:disabled {
  opacity: 0.45;
  cursor: default;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 0;
  border-color: var(--blue);
}

textarea {
  width: 100%;
  resize: vertical;
}

input[type="checkbox"] {
  accent-color: var(--blue);
  margin: 0;
}

input[type="number"] {
  width: 64px;
}

button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 600;
}

button.primary:hover:not(:disabled) {
  background: var(--blue-dark);
}

button.small {
  min-height: 24px;
  padding: 2px 8px;
  font-size: 12px;
}

button.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--blue);
}

button.danger:hover:not(:disabled) {
  border-color: var(--error);
  color: var(--error);
}

button.icon {
  min-width: 28px;
  padding: 2px 6px;
}

button.remove {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  padding: 2px 6px;
}

button.remove:hover:not(:disabled) {
  color: var(--error);
  border-color: transparent;
}

button.link {
  border: none;
  background: none;
  padding: 0;
  min-height: 0;
  color: var(--blue);
  text-decoration: underline;
}

a {
  color: var(--blue);
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12px;
}

.spacer {
  flex: 1;
}

.row,
.inline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.empty {
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

.error {
  color: var(--error);
}

/* Top bar */

.topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 12px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-right: 4px;
}

.brand-mark {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--blue);
  box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 6px var(--blue);
}

.test-select {
  max-width: 260px;
  font-weight: 600;
}

.tabs {
  display: flex;
  gap: 2px;
  margin-left: 8px;
}

.tab {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.tab.active {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
}

.count {
  margin-left: 5px;
  font-size: 11px;
  color: var(--muted);
}

.save {
  font-size: 12px;
  color: var(--muted);
  min-width: 80px;
  text-align: right;
}

.save.dirty,
.save.saving {
  color: var(--warning);
}

.save.error {
  color: var(--error);
}

/* Layout */

.layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 372px;
}

.pages,
.side {
  background: var(--panel);
  overflow-y: auto;
}

.pages {
  border-right: 1px solid var(--line);
}

.side {
  border-left: 1px solid var(--line);
  padding-bottom: 16px;
}

.main {
  overflow-y: auto;
  padding: 0 20px 32px;
}

.pane-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 12px;
  background: inherit;
  border-bottom: 1px solid var(--line);
}

.main .pane-head {
  margin: 0 -20px 12px;
  padding: 6px 20px;
  background: var(--bg);
}

.pane-title {
  font-weight: 650;
  margin-right: auto;
}

.main .pane-title {
  margin-right: 8px;
}

/* Page list */

.page-list {
  list-style: none;
  margin: 0;
  padding: 4px;
}

.page-row {
  display: grid;
  grid-template-columns: 20px 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border-radius: var(--radius);
  cursor: pointer;
}

.page-row:hover {
  background: var(--bg);
}

.page-row.active {
  background: var(--blue-soft);
  box-shadow: inset 3px 0 0 var(--blue);
}

.page-no {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.kind {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
}

.kind.question {
  background: var(--blue);
  color: #fff;
}

.kind.info {
  border: 1.5px solid var(--line-strong);
  color: var(--muted);
}

.page-main {
  display: grid;
  min-width: 0;
}

.page-prefix {
  font-weight: 600;
  font-size: 12px;
}

.page-text {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flow {
  color: var(--blue);
  margin-left: 4px;
  font-weight: 400;
}

.page-badges {
  display: flex;
  gap: 3px;
  align-items: center;
}

.badge {
  font-size: 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0 3px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dot.error {
  background: var(--error);
}

.dot.warning {
  background: var(--warning);
}

/* Forms */

.form {
  display: grid;
  gap: 2px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 14px;
  max-width: 860px;
}

.field-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.field-row:last-child {
  border-bottom: none;
}

.field-label {
  color: var(--muted);
  font-size: 12px;
  padding-top: 5px;
  cursor: help;
}

.field-control {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.field-control > textarea,
.field-control > .options,
.field-control > .strip,
.field-control > .table {
  flex-basis: 100%;
}

input.prefix {
  width: 140px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}

input.ms {
  width: 72px;
}

input.weight {
  width: 52px;
  min-height: 22px;
  padding: 1px 4px;
}

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

.option-row {
  display: flex;
  gap: 4px;
  align-items: center;
}

.option-label {
  flex: 1;
  min-width: 0;
}

.option-row.has-issue input {
  border-color: var(--warning);
}

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

.segmented button {
  border: none;
  border-radius: 0;
  min-height: 26px;
  padding: 2px 10px;
  color: var(--muted);
}

.segmented button + button {
  border-left: 1px solid var(--line-strong);
}

.segmented button.on {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px 9px 2px 7px;
  cursor: pointer;
}

.chip:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px;
}

.thumb {
  flex: none;
  width: 84px;
  height: 56px;
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--line);
}

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

.thumb.on {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue-soft);
}

.thumb.add {
  font-size: 20px;
  color: var(--muted);
  border-style: dashed;
}

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

.table > button {
  justify-self: start;
}

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

.table-row input:not(.narrow):not([type="checkbox"]) {
  flex: 1;
  min-width: 0;
}

.narrow {
  width: 120px;
}

.issues {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  max-width: 860px;
  display: grid;
  gap: 2px;
}

.issues li::before {
  content: "● ";
}

.issues .error,
.issue-list .error::before {
  color: var(--error);
}

.issues .warning,
.issue-list .warning::before {
  color: var(--warning);
}

.json {
  margin-top: 12px;
  max-width: 860px;
}

.json summary {
  cursor: pointer;
  color: var(--blue);
}

.json pre {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  overflow: auto;
  max-height: 420px;
  font: 11.5px/1.45 ui-monospace, "Cascadia Code", Consolas, monospace;
}

/* Rules view */

.main[data-view="rules"] {
  padding-top: 14px;
}

.rules {
  max-width: 900px;
}

/* Media library */

.dropzone {
  border: 1.5px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
  text-align: center;
  margin-bottom: 12px;
}

.dropzone.over {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.media-card {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.media-card img,
.play-tile {
  display: block;
  width: 100%;
  height: 92px;
  object-fit: cover;
  background: var(--bg);
}

.play-tile {
  border: none;
  border-radius: 0;
  font-size: 26px;
  color: var(--blue);
}

.media-card figcaption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 5px 4px 5px 8px;
  font-size: 12px;
}

.media-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-card .muted {
  grid-column: 1;
  font-size: 11px;
}

.media-card .remove {
  grid-row: 1 / span 2;
  grid-column: 2;
}

/* Side: preview and checks */

.preview-stage {
  display: flex;
  justify-content: center;
  padding: 12px 0 4px;
  min-height: 448px;
}

.preview-stage > * {
  box-shadow: 0 1px 2px rgb(26 36 51 / 8%), 0 4px 14px rgb(26 36 51 / 10%);
  border-radius: 3px;
}

.preview-message {
  margin: 0 16px;
}

.status {
  font-size: 12px;
  font-weight: 600;
}

.status.ok {
  color: var(--ok);
}

.status.error {
  color: var(--error);
}

.status.warning {
  color: var(--warning);
}

.issue-list {
  list-style: none;
  margin: 0;
  padding: 4px;
}

.issue-list li {
  padding: 5px 8px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
}

.issue-list li::before {
  content: "● ";
}

.issue-list li:hover {
  background: var(--bg);
}

.issue-path {
  font-weight: 600;
  margin-right: 6px;
}

/* Notice */

.notice {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: var(--text);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgb(0 0 0 / 20%);
  transition: opacity 0.15s, transform 0.15s;
  white-space: pre-line;
  max-width: 560px;
}

.notice.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.notice.error {
  background: var(--error);
}

/* Player */

.player {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.player-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.player-bar .pane-title {
  margin-right: 0;
}

.player-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.player-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px;
  min-height: 0;
}

.player-stage > * {
  box-shadow: 0 1px 2px rgb(26 36 51 / 8%), 0 8px 28px rgb(26 36 51 / 12%);
}

.player-side {
  background: var(--panel);
  border-left: 1px solid var(--line);
  overflow-y: auto;
}

.player-side > :not(.pane-head) {
  margin: 10px 12px;
}

.player-done {
  text-align: center;
  background: var(--panel);
  padding: 32px 48px;
  border-radius: 10px;
}

.player-done h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

table.answers {
  width: calc(100% - 24px);
  border-collapse: collapse;
  font-size: 12px;
}

table.answers td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--line);
}

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

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }
  .side {
    display: none;
  }
}

@media (max-width: 1280px) {
  .topbar .role {
    display: none;
  }
}

/* Layout modes: login, full-width pages (tests, media, users) and the three-column editor. */

.layout[data-mode="page"],
.layout[data-mode="login"] {
  grid-template-columns: minmax(0, 1fr);
}

.layout[data-mode="page"] .pages,
.layout[data-mode="page"] .side,
.layout[data-mode="login"] .pages,
.layout[data-mode="login"] .side {
  display: none;
}

.layout[data-mode="page"] .main > * {
  max-width: 1100px;
}

.layout[data-mode="login"] .main {
  display: grid;
  place-items: center;
}

/* Test bar: the open test gets its own row under the main menu, so the menu, the test's
   controls and the test itself are three separate levels. */

.testbar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 48px;
  padding: 0 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex: none;
}

.testbar:empty {
  display: none;
}

.testbar .tabs {
  display: flex;
  gap: 2px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.testbar .crumb-name {
  font-size: 14px;
  font-weight: 650;
  max-width: 320px;
}

.testbar > button + button,
.testbar > .save + button {
  margin-left: -8px;
}

a.crumb-back {
  color: var(--muted);
  text-decoration: none;
}

a.crumb-back:hover {
  color: var(--blue);
}

/* Top bar: navigation, and the user */

.main-nav {
  display: flex;
  gap: 2px;
}

.nav,
a.tab {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
}

.nav:hover,
a.tab:hover {
  color: var(--text);
  background: var(--bg);
}

.nav.active {
  color: var(--text);
  font-weight: 600;
}

a.tab.active {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
}

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

.crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.crumb-sep {
  color: var(--line-strong);
}

.crumb-name {
  min-width: 60px;
  font-weight: 600;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 10px;
  margin-left: 4px;
  border-left: 1px solid var(--line);
}

.user-name {
  white-space: nowrap;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}

a.user-name:hover {
  text-decoration: underline;
}

.role {
  font-size: 11px;
  color: var(--muted);
}

.role.admin {
  color: var(--blue);
}

.status-badge {
  font-size: 11px;
  border-radius: 3px;
  padding: 1px 5px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  white-space: nowrap;
}

.status-badge.published {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
}

.status-badge.next {
  border-color: var(--blue);
  color: var(--blue);
}

/* Tables (tests, users, versions) */

table.grid {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

table.grid th {
  text-align: left;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

table.grid td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

table.grid tbody tr:last-child td {
  border-bottom: none;
}

table.grid tbody tr[tabindex] {
  cursor: pointer;
}

table.grid tbody tr[tabindex]:hover {
  background: var(--bg);
}

table.grid .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

table.grid .actions {
  text-align: right;
  white-space: nowrap;
}

table.grid .actions > * + * {
  margin-left: 4px;
}

.test-name {
  font-weight: 600;
  margin-right: 8px;
}

input.search {
  width: 200px;
}

.small-link {
  font-size: 12px;
  padding: 0 6px;
}

table.versions {
  margin-top: 12px;
  max-width: 860px;
}

.add-user {
  margin-top: 12px;
}

/* Locked (published) tests */

.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 860px;
  margin-bottom: 10px;
  padding: 7px 12px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.banner span {
  flex: 1;
}

fieldset.lock {
  border: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

fieldset.lock:disabled .form {
  background: var(--bg);
}

fieldset.lock + .form,
.form + .form {
  margin-top: 10px;
}

.rule-list {
  max-width: 860px;
  margin: 0;
  padding: 0 0 0 18px;
  display: grid;
  gap: 8px;
}

.rule-list li span {
  display: block;
}

/* Login */

.login {
  width: 340px;
  display: grid;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 24px;
}

.login h1 {
  font-size: 16px;
  margin: 10px 0 6px;
}

.login .field-label {
  padding-top: 4px;
}

.login button.primary {
  margin-top: 8px;
}

.login .error {
  margin: 4px 0 0;
}

.login-demo {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.login-hint {
  margin: 2px 0 4px;
  font-size: 12px;
}

.login-user {
  display: flex;
  justify-content: space-between;
  text-align: left;
}

/* Codes and results */

.code {
  display: inline-block;
  font: 600 12px/1.5 ui-monospace, "Cascadia Code", Consolas, monospace;
  letter-spacing: 0.08em;
  padding: 0 6px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
}

.code-status {
  font-size: 11px;
  border-radius: 3px;
  padding: 1px 5px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.code-status.started {
  border-color: var(--warning);
  color: var(--warning);
}

.code-status.completed {
  border-color: var(--ok);
  color: var(--ok);
  font-weight: 600;
}

.code-status.expired {
  border-style: dashed;
}

.form.new-codes {
  margin-bottom: 12px;
}

.batch {
  margin-bottom: 12px;
  padding: 8px 12px 10px;
  background: var(--panel);
  border: 1px solid var(--blue);
  border-radius: 8px;
}

.batch-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.code-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.code-grid .code {
  font-size: 13px;
  padding: 2px 8px;
}

.chip.static {
  cursor: default;
  padding-right: 4px;
}

.chip.static button.remove {
  padding: 0 4px;
  min-height: 0;
}

table.grid th.check,
table.grid td.check {
  width: 28px;
  padding-right: 0;
}

table.grid tbody tr.chosen {
  background: var(--blue-soft);
}

table.grid tbody tr.unanswered td {
  color: var(--muted);
}

.pane-head a.back {
  color: var(--muted);
  text-decoration: none;
}

.pane-head a.back:hover {
  color: var(--blue);
}

.section-title {
  font-size: 13px;
  font-weight: 650;
  margin: 18px 0 6px;
}

.footnote {
  font-size: 11px;
  color: var(--muted);
  margin: 4px 0 0;
}

.print-title {
  display: none;
}

/* Printing: a result as a report, or code slips to cut out (views/print.ts). */

@media print {
  @page {
    margin: 14mm;
  }

  html,
  body {
    height: auto;
    display: block;
    background: #fff;
  }

  .topbar,
  .pages,
  .side,
  .notice,
  .pane-head,
  .player {
    display: none !important;
  }

  .layout {
    display: block;
  }

  .main {
    overflow: visible;
    padding: 0;
  }

  .print-title {
    display: block;
    font-size: 16px;
    margin: 0 0 10px;
  }

  .form,
  table.grid {
    border-color: var(--line-strong);
    break-inside: auto;
  }

  table.grid tr {
    break-inside: avoid;
  }

  body.printing > :not(.print-sheet) {
    display: none !important;
  }
}

.print-sheet {
  display: none;
}

@media print {
  .print-sheet {
    display: block;
  }

  .slips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .slip {
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 14px 8px 16px;
    border: 1px dashed #9aa5b5;
    margin: -0.5px;
    break-inside: avoid;
    text-align: center;
    font-size: 11px;
    color: #1a2433;
  }

  .slip-url {
    font-size: 13px;
    font-weight: 600;
  }

  .slip-code {
    margin-top: 4px;
    font: 700 28px/1.2 ui-monospace, "Cascadia Code", Consolas, monospace;
    letter-spacing: 0.2em;
    text-indent: 0.2em;
  }

  .slip-note {
    color: #647389;
  }
}

.strip.over {
  outline: 1.5px dashed var(--blue);
  outline-offset: 2px;
  border-radius: 8px;
}
