:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-soft: #eef3f0;
  --text: #18201c;
  --muted: #66736b;
  --line: #d9ded7;
  --accent: #0b6f5c;
  --accent-strong: #064f42;
  --gold: #8a6200;
  --red: #9c2f2f;
  --danger: #a13b30;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.auth-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell {
  width: min(100%, 420px);
}

.login-form {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(24, 32, 28, 0.08);
}

.login-form h1 {
  margin: 0;
  font-size: 2rem;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 247, 244, 0.94);
  backdrop-filter: blur(12px);
}

.brand {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
}

.tabs {
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
  max-width: 100%;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs a {
  flex: 0 0 auto;
  min-width: 0;
  padding: 7px 8px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.tabs a[aria-current="page"] {
  background: var(--accent);
  color: #ffffff;
}

.tabs span {
  font-variant-numeric: tabular-nums;
}

.global-search {
  position: relative;
  grid-column: 1 / -1;
  grid-row: 3;
  min-width: 0;
  display: grid;
  gap: 8px;
}

.session-menu {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  min-width: 0;
  max-width: min(58vw, 320px);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

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

.session-menu button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.global-search label {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.global-search label span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.global-search input {
  min-height: 42px;
  padding-inline: 14px;
}

.search-filters {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.search-filters select {
  min-width: 0;
  min-height: 42px;
  padding-block: 8px;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 12px;
  max-height: min(68vh, 620px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(24, 32, 28, 0.16);
}

.search-result-group {
  display: grid;
  gap: 7px;
}

.search-result-group h2 {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.search-result {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--text);
  text-decoration: none;
}

.search-result:hover,
.search-result:focus-visible {
  border-color: rgba(11, 111, 92, 0.42);
}

.search-result strong {
  font-size: 0.96rem;
  line-height: 1.3;
}

.search-result-meta {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.search-result p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.84rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

mark {
  padding: 0 2px;
  border-radius: 3px;
  background: #fff0a8;
  color: var(--text);
}

main {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 18px 14px 40px;
}

.capture-form {
  display: grid;
  gap: 16px;
}

.url-import-panel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.url-import-panel .message {
  min-width: min(100%, 280px);
}

.import-progress {
  flex: 1 1 260px;
  min-width: min(100%, 260px);
  display: grid;
  gap: 6px;
}

.import-progress-track {
  height: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.import-progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 160ms ease;
}

.import-progress > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.visually-hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

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

label,
legend {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
}

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

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 12px;
  outline: none;
}

textarea {
  min-height: 156px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 111, 92, 0.16);
}

.message {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

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

.submit-button,
.inbox-header button,
.batch-actions button,
.secondary-button {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-weight: 900;
}

.submit-button:disabled,
.batch-actions button:disabled,
.inbox-header button:disabled {
  cursor: progress;
  opacity: 0.72;
}

.secondary-button {
  width: fit-content;
  min-height: 44px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--accent);
  color: var(--accent-strong);
}

.secondary-button:disabled {
  cursor: progress;
  opacity: 0.72;
}

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

.eyebrow {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.inbox-header h1 {
  margin: 0;
  font-size: 1.45rem;
}

.inbox-header button {
  min-height: 42px;
  padding: 0 14px;
}

.batch-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.review-prompt {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid #c9ddd6;
  border-radius: 8px;
  background: #f2f8f5;
  color: var(--text);
  font-weight: 700;
}

.review-prompt[hidden] {
  display: none;
}

.review-prompt strong {
  color: var(--accent-strong);
}

.top-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.top-signals > span:first-child {
  flex: 1 1 100%;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.batch-actions button {
  min-height: 44px;
  padding: 0 12px;
}

.selected-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.batch-message {
  min-height: 22px;
}

.inbox-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.concept-search {
  margin-bottom: 16px;
}

.concept-search label,
.merge-controls label {
  display: grid;
  gap: 5px;
}

.concept-search span,
.merge-controls span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.status-filter-bar {
  grid-column: 1 / -1;
  display: flex;
  gap: 7px;
  margin: 0;
  padding: 0 0 4px;
  border: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.status-filter-bar::-webkit-scrollbar {
  display: none;
}

.status-filter-bar legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.status-filter-bar label {
  flex: 0 0 auto;
}

.status-filter-bar input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  opacity: 0;
}

.status-filter-bar span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
}

.status-filter-bar input:checked + span {
  border-color: var(--accent);
  background: #e7f3ee;
  color: var(--accent-strong);
}

.status-filter-bar input:focus-visible + span {
  outline: 3px solid rgba(11, 111, 92, 0.22);
  outline-offset: 2px;
}

.inbox-filters label {
  display: grid;
  gap: 5px;
}

.inbox-filters .status-filter-bar label {
  display: block;
}

.inbox-filters span {
  color: var(--muted);
  font-size: 0.78rem;
}

.inbox-filters .status-filter-bar span {
  font-size: 0.86rem;
}

.inbox-filters .status-filter-bar input:checked + span {
  color: var(--accent-strong);
}

.recent-list {
  display: grid;
  gap: 10px;
}

.review-group {
  display: grid;
  gap: 10px;
}

.review-group + .review-group {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.review-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.review-group-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
}

.review-group-heading span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.capture-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: stretch;
}

.capture-row.is-selected .capture-card {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 111, 92, 0.12);
}

.capture-row-processing_failed .capture-card {
  border-color: #efc1bd;
  box-shadow: inset 4px 0 0 var(--red);
}

.capture-row.review-important .capture-card,
.capture-card.review-important {
  border-color: #bdd2ee;
  box-shadow: inset 4px 0 0 #225c9a;
}

.capture-row-processing_failed.review-important .capture-card {
  border-color: #efc1bd;
  box-shadow: inset 4px 0 0 var(--red);
}

.capture-select {
  width: 48px;
  min-height: 116px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.capture-select input {
  width: 22px;
  min-height: 22px;
  margin: 0;
  accent-color: var(--accent);
}

.capture-select span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.capture-card {
  display: grid;
  gap: 10px;
  min-height: 116px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  touch-action: manipulation;
}

.capture-card:focus-visible {
  outline: 3px solid rgba(11, 111, 92, 0.22);
  outline-offset: 2px;
}

.capture-card:hover {
  border-color: rgba(11, 111, 92, 0.42);
}

.concept-card {
  min-height: 104px;
}

.capture-card h2 {
  margin: 0;
  font-size: 1.03rem;
  line-height: 1.25;
}

.capture-card h2 a {
  color: var(--text);
  text-decoration: none;
}

.card-topline,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-grid {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.82rem;
}

.meta-grid span {
  overflow-wrap: anywhere;
}

.meta-grid strong {
  color: var(--text);
}

.chip {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: capitalize;
}

.status-captured {
  background: #eef0ef;
  border-color: #d1d7d3;
  color: #5f6a64;
}

.status-processing {
  background: #e7f0fb;
  border-color: #bdd2ee;
  color: #225c9a;
}

.status-processing::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.status-processing_failed {
  background: #fdeceb;
  border-color: #efc1bd;
  color: var(--red);
}

.status-processing_failed::before {
  content: "!";
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  margin-right: 2px;
  border-radius: 50%;
  background: var(--red);
  color: #ffffff;
  font-size: 0.68rem;
  line-height: 1;
}

.priority-high {
  background: #fff2d3;
  border-color: #ead18b;
  color: var(--gold);
}

.status-processed {
  background: #e4f5ea;
  border-color: #b5dec3;
  color: #17643a;
}

.priority-low {
  background: #edf1f7;
  border-color: #d2d9e6;
  color: #4d5f78;
}

.priority-medium {
  background: #f4f2eb;
  border-color: #ded8c7;
  color: #5e5a4d;
}

.failure-preview {
  margin: 0;
  color: var(--red);
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.86rem;
  font-weight: 800;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 8px;
  color: var(--accent-strong);
  font-weight: 900;
  text-decoration: none;
}

.capture-detail {
  display: grid;
  gap: 16px;
}

.detail-header {
  display: grid;
  gap: 10px;
}

.detail-header h1 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.detail-section {
  display: grid;
  gap: 8px;
  padding-block: 2px 14px;
  border-bottom: 1px solid var(--line);
}

.detail-section h2 {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-section p {
  margin: 0;
}

.detail-section a {
  color: var(--accent-strong);
  overflow-wrap: anywhere;
  font-weight: 800;
}

pre {
  width: 100%;
  max-height: 360px;
  margin: 0;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: 0.88rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.attachment-list {
  display: grid;
  gap: 10px;
}

.attachment-item {
  display: grid;
  gap: 8px;
  min-height: 48px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
}

.attachment-item img,
.attachment-item video,
.attachment-item iframe {
  width: 100%;
  border-radius: 6px;
  background: #f0f2ef;
}

.attachment-item img,
.attachment-item video {
  max-height: 420px;
  object-fit: contain;
}

.attachment-item iframe {
  min-height: 520px;
  border: 1px solid var(--line);
}

.attachment-item audio {
  width: 100%;
}

.attachment-item a {
  color: var(--accent-strong);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.capture-edit-form {
  display: grid;
  gap: 12px;
}

.capture-edit-form label {
  display: grid;
  gap: 6px;
}

.capture-edit-form label > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.edit-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.metadata-list {
  display: grid;
  grid-template-columns: minmax(96px, 0.45fr) 1fr;
  gap: 8px 12px;
  margin: 0;
}

.metadata-list dt {
  color: var(--muted);
  font-weight: 900;
}

.metadata-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.processed-analysis-section {
  gap: 12px;
}

.processed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.promotion-controls {
  flex: 1 1 100%;
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.promotion-title-field {
  display: grid;
  gap: 5px;
  max-width: 420px;
}

.promotion-title-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.promotion-title-field input {
  min-height: 42px;
}

.promotion-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.concept-actions,
.merge-controls {
  display: grid;
  gap: 10px;
}

.merge-controls {
  align-items: end;
}

.merge-controls select {
  min-height: 44px;
}

.similar-list {
  display: grid;
  gap: 8px;
}

.similar-item,
.related-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.similar-item span,
.related-item span {
  color: var(--muted);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.memory-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.memory-summary span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid #c9ddd6;
  border-radius: 8px;
  background: #f2f8f5;
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 900;
}

.related-items {
  display: grid;
  gap: 12px;
}

.related-group {
  display: grid;
  gap: 7px;
}

.related-group h3 {
  margin: 0;
  color: var(--text);
  font-size: 0.94rem;
}

.version-summary {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.version-summary p {
  margin: 0;
}

.version-summary strong {
  color: var(--text);
}

.processing-error-section {
  padding: 12px;
  border: 1px solid #efc1bd;
  border-left: 4px solid var(--red);
  border-radius: 8px;
  background: #fff7f6;
}

.error-message-text {
  color: var(--text);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.error-timestamp {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.processed-preview {
  display: grid;
  gap: 12px;
  max-width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow-wrap: anywhere;
}

.processed-highlights {
  display: grid;
  gap: 10px;
  padding-bottom: 4px;
}

.recommendation-badge {
  width: fit-content;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #edf1f7;
  color: #4d5f78;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.recommendation-adopt {
  background: #e4f5ea;
  border-color: #b5dec3;
  color: #17643a;
}

.recommendation-prototype {
  background: #e7f0fb;
  border-color: #bdd2ee;
  color: #225c9a;
}

.recommendation-expand {
  background: #f0e9fa;
  border-color: #d4c0ef;
  color: #673e9a;
}

.recommendation-watch {
  background: #fff2d3;
  border-color: #ead18b;
  color: var(--gold);
}

.recommendation-ignore {
  background: #eef0ef;
  border-color: #d1d7d3;
  color: #5f6a64;
}

.system-fit-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 7px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.system-fit-summary strong {
  color: var(--text);
}

.fit-rating {
  white-space: nowrap;
}

.fit-separator {
  color: #a2aaa5;
}

.why-callout {
  padding: 12px 12px 12px 14px;
  border: 1px solid #c9ddd6;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #f2f8f5;
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.55;
}

.processed-inline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--muted);
  font-size: 0.84rem;
}

.processed-inline-meta strong {
  color: var(--text);
}

.processed-preview h3,
.processed-preview h4,
.processed-preview h5,
.processed-preview h6 {
  margin: 6px 0 0;
  color: var(--text);
  line-height: 1.25;
}

.processed-preview h3 {
  font-size: 1.16rem;
}

.processed-preview h4 {
  font-size: 1.02rem;
}

.processed-preview p,
.processed-preview ul {
  margin: 0;
}

.processed-preview ul {
  padding-left: 1.25rem;
}

.processed-preview li + li {
  margin-top: 5px;
}

.processed-preview strong {
  font-weight: 900;
}

.processed-preview .empty {
  margin: 0;
  text-align: left;
}

.version-comparison {
  display: grid;
  gap: 12px;
}

.version-panel {
  display: grid;
  min-height: 320px;
  max-height: 620px;
  grid-template-rows: auto auto 1fr;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.version-panel h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.version-panel-meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.version-panel-body {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
}

.version-panel-body h3,
.version-panel-body h4,
.version-panel-body h5,
.version-panel-body h6,
.version-panel-body p,
.version-panel-body ul {
  margin: 0;
}

.version-panel-body ul {
  padding-left: 1.25rem;
}

.empty {
  margin: 30px 0;
  color: var(--muted);
  text-align: center;
}

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

@media (min-width: 680px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding-inline: calc((100vw - 760px) / 2 + 14px);
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .session-menu {
    grid-column: 3;
    grid-row: 1;
    max-width: 260px;
  }

  main {
    padding-top: 28px;
  }

  .inbox-filters {
    grid-template-columns: repeat(4, 1fr);
  }

  .batch-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
  }

  .review-prompt {
    grid-column: 1 / -1;
  }

  .selected-count,
  .batch-message {
    grid-column: 1 / -1;
  }

  .capture-card {
    min-height: 104px;
  }

  .capture-select {
    min-height: 104px;
  }

  .version-comparison {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (min-width: 520px) {
  .search-filters {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (min-width: 760px) {
  .global-search {
    grid-template-columns: minmax(250px, 1fr) minmax(360px, 0.9fr);
    align-items: start;
  }

  .search-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .session-menu span {
    display: none;
  }
}
