:root {
  color-scheme: light;
  --bg: #f6f3ed;
  --surface: #ffffff;
  --surface-muted: #fbfbfc;
  --surface-selected: #eef4ff;
  --surface-soft: #f8fafc;
  --border: #e5e8ef;
  --border-strong: #d8dde7;
  --text: #1f2937;
  --muted: #6b7285;
  --accent: #1f5eff;
  --accent-soft: #eef4ff;
  --success: #2f855a;
  --success-soft: #eaf7ef;
  --amber: #b7791f;
  --amber-soft: #fff4df;
  --neutral-pill: #f3f4f6;
  --shadow: none;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --font-sans: Inter, "Inter Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", "IBM Plex Mono", "Consolas", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.4;
}

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

a {
  color: inherit;
}

button {
  color: inherit;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  height: 100dvh;
  overflow: hidden;
}

.app-drawer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 264px;
  min-width: 264px;
  min-height: 0;
  padding: 14px 14px 12px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  transition: width 180ms ease, min-width 180ms ease, padding 180ms ease;
  overflow: hidden;
}

.main-shell {
  min-width: 0;
  display: grid;
  grid-template-rows: 60px minmax(0, 1fr);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 40px;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 360px);
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.topbar-search input,
.search-field input,
.field input,
.field textarea,
.select-field select,
.table-footer-select select {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
}

.topbar-search-icon,
.nav-icon,
.account-caret {
  display: inline-flex;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.topbar-search svg,
.nav-icon svg,
.icon-button svg,
.account-caret svg,
.bookmark-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #eef2f7;
  color: #526072;
  font-size: 12px;
  font-weight: 600;
}

.workspace {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px 24px;
  overflow: hidden;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: var(--accent);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-label {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.drawer-nav {
  display: grid;
  gap: 4px;
  padding-top: 6px;
}

.nav-item,
.drawer-footer-button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.nav-item.is-active {
  background: var(--surface-selected);
  color: var(--accent);
}

.nav-item.is-active .nav-icon,
.nav-item.is-active .nav-label {
  color: var(--accent);
}

.nav-label {
  white-space: nowrap;
}

.drawer-section {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.keyword-summary-section {
  flex: 1 1 auto;
  /* without min-height a flex item refuses to shrink below its content,
     which pushed the sources list and footer past the bottom of the viewport */
  min-height: 0;
  overflow: auto;
}

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

.drawer-heading,
.drawer-subheading {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.drawer-empty,
.drawer-helper,
.workspace-subtitle,
.field small,
.source-copy small,
.table-footer-copy,
.table-footer-select span,
.mobile-card-grid span,
.cell-subtitle,
.amount-cell span,
.metric-item span {
  color: var(--muted);
}

.drawer-empty,
.drawer-helper {
  margin: 0;
  font-size: 12px;
}

.keyword-summary-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.keyword-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}

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

.keyword-summary-count {
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.query-editor {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

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

.field span,
.field legend,
.select-field span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field-stack textarea {
  min-height: 88px;
  resize: vertical;
}

.field input,
.field textarea,
.select-field select,
.search-field,
.table-footer-select select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.field input,
.field textarea,
.select-field select {
  padding: 9px 11px;
}

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

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

.status-group {
  margin: 0;
  padding: 0;
  border: 0;
}

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

.status-options label,
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.query-editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.source-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  color: inherit;
  text-decoration: none;
}

.source-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  flex: 0 0 auto;
}

.source-mark-red {
  background: #fff1ef;
  color: #d94841;
}

.source-mark-blue {
  background: #eef4ff;
  color: var(--accent);
}

.source-mark-gold {
  background: #fff7df;
  color: var(--amber);
}

.source-mark-slate {
  background: #eef2f7;
  color: #4b5563;
}

.source-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.source-copy strong {
  font-size: 12px;
}

.drawer-footer-button {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.workspace-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.workspace-header h1 {
  margin: 0;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.15;
}

.workspace-subtitle {
  margin: 6px 0 0;
  font-size: 13px;
}

.workspace-actions {
  display: flex;
  /* flex-end so the Export button lines up with the select control itself,
     not with the "Saved view" label sitting above it */
  align-items: flex-end;
  gap: 12px;
}

.select-field {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

.select-field-compact {
  min-width: 180px;
}

.select-field select {
  height: 38px;
  padding: 0 34px 0 12px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 2px),
    calc(100% - 11px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.button-primary {
  background: var(--accent);
  color: #ffffff;
}

.button-secondary {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: #d7e3ff;
}

.button-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.icon-button-inline svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metrics-strip {
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.metric-item {
  flex: 1 1 0;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 12px;
}

.metric-item strong {
  font-size: 13px;
  font-weight: 700;
}

.metric-item span {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.metric-divider {
  width: 1px;
  background: var(--border);
}

.metric-item-loading strong,
.metric-item-loading span {
  visibility: hidden;
}

.toolbar-panel,
.results-panel,
.raw-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.toolbar-panel {
  padding: 10px 12px;
}

.toolbar-form {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1.2fr) repeat(4, minmax(130px, 1fr)) auto auto;
  align-items: end;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 12px;
}

.search-field-toolbar {
  min-width: 220px;
}

.toolbar-reset {
  align-self: center;
  justify-self: start;
}

.results-panel {
  min-height: 0;
  display: grid;
  overflow: hidden;
}

.results-table-view {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
}

.table-scroll {
  min-height: 0;
  overflow: auto;
}

.results-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.results-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
}

.results-table thead th:first-child {
  padding-left: 14px;
}

.th-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.results-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 12.5px;
}

.results-table tbody tr:nth-child(even) td {
  background: var(--surface-muted);
}

.results-table tbody tr:hover td {
  background: #f8fbff;
}

.results-table tbody tr.is-selected td {
  background: var(--surface-selected);
}

.results-table tbody tr.is-saved td {
  box-shadow: inset 2px 0 0 var(--accent);
}

.checkbox-cell {
  width: 42px;
  padding-left: 14px;
}

.bookmark-cell {
  width: 44px;
}

/* Columns 2-10 must total 100%; the checkbox and save columns are fixed-width. */
.results-table th:nth-child(2),
.results-table td:nth-child(2) {
  width: 22%;
}

.results-table th:nth-child(3),
.results-table td:nth-child(3) {
  width: 14%;
}

.results-table th:nth-child(4),
.results-table td:nth-child(4) {
  width: 11%;
}

.results-table th:nth-child(5),
.results-table td:nth-child(5),
.results-table th:nth-child(6),
.results-table td:nth-child(6),
.results-table th:nth-child(7),
.results-table td:nth-child(7),
.results-table th:nth-child(8),
.results-table td:nth-child(8),
.results-table th:nth-child(9),
.results-table td:nth-child(9) {
  width: 8%;
}

.results-table th:nth-child(10),
.results-table td:nth-child(10) {
  width: 13%;
}

.results-table td:nth-child(10) {
  overflow: hidden;
}

.opportunity-cell {
  display: grid;
  gap: 4px;
}

.cell-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  font-weight: 600;
  line-height: 1.35;
}

.cell-subtitle {
  font-size: 12px;
}

.amount-cell {
  display: grid;
  gap: 2px;
}

.amount-cell strong {
  font-weight: 600;
}

.amount-cell span {
  font-size: 11px;
}

.status-pill,
.keyword-pill,
.days-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill {
  background: var(--success-soft);
  color: var(--success);
}

.keyword-pill {
  /* inline-block (not flex) so the label can truncate inside a narrow column */
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  line-height: 24px;
  text-overflow: ellipsis;
  background: var(--accent-soft);
  color: var(--accent);
}

.days-indicator.is-amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.days-indicator.is-green {
  background: var(--success-soft);
  color: var(--success);
}

.days-indicator.is-neutral {
  background: var(--neutral-pill);
  color: #5f6b7b;
}

.match-score {
  color: var(--accent);
  font-weight: 700;
}

.bookmark-button {
  width: 28px;
  height: 28px;
}

.bookmark-icon.is-filled path {
  fill: currentColor;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-button:hover,
.bookmark-button.is-active,
.keyword-summary-item:hover,
.source-item:hover,
.nav-item:hover,
.drawer-footer-button:hover,
.button:hover,
.text-button:hover {
  background: var(--surface-selected);
}

.results-table tbody tr.message-row td {
  padding: 24px 14px;
  background: var(--surface);
}

.table-message {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
}

.table-message strong {
  font-size: 13px;
}

.mobile-results {
  display: none;
}

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

.table-footer-copy {
  margin: 0;
  font-size: 12px;
}

.table-footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-footer-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.table-footer-select select {
  min-width: 56px;
  height: 32px;
  padding: 0 8px;
}

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

.page-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.sources-view {
  padding: 18px;
}

.sources-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.source-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.source-card h2 {
  margin: 0;
  font-size: 15px;
}

.source-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.source-card a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.raw-panel {
  overflow: hidden;
}

.raw-panel summary {
  padding: 10px 14px;
  cursor: pointer;
}

.raw-panel pre {
  margin: 0;
  padding: 0 14px 14px;
  overflow: auto;
  color: #334155;
  font-size: 12px;
}

.results-table tbody tr.loading-row td {
  padding-top: 12px;
  padding-bottom: 12px;
  background: var(--surface);
}

.skeleton {
  display: inline-block;
  border-radius: 999px;
  background: #edf1f6;
}

.skeleton-line {
  width: 100%;
  height: 10px;
}

.skeleton-line-lg {
  width: 88%;
}

.skeleton-line-md {
  width: 68%;
}

.skeleton-line-sm {
  width: 52%;
}

.skeleton-line-xs {
  width: 36px;
}

.skeleton-pill {
  width: 48px;
  height: 22px;
}

.skeleton-box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.mobile-empty-state {
  padding: 18px 14px;
  text-align: center;
}

.mobile-empty-state strong {
  display: block;
  margin-bottom: 4px;
}

.mobile-empty-state p {
  margin: 0;
  color: var(--muted);
}

.app-shell[data-drawer-collapsed="true"] {
  grid-template-columns: 62px minmax(0, 1fr);
}

.app-shell[data-drawer-collapsed="true"] .app-drawer {
  width: 62px;
  min-width: 62px;
  padding-inline: 8px;
}

.app-shell[data-drawer-collapsed="true"] .brand {
  justify-content: center;
  width: 100%;
}

.app-shell[data-drawer-collapsed="true"] .brand-label,
.app-shell[data-drawer-collapsed="true"] .nav-label,
.app-shell[data-drawer-collapsed="true"] .drawer-section-head,
.app-shell[data-drawer-collapsed="true"] .keyword-summary-list,
.app-shell[data-drawer-collapsed="true"] .drawer-empty,
.app-shell[data-drawer-collapsed="true"] .query-editor,
.app-shell[data-drawer-collapsed="true"] .source-copy {
  display: none;
}

.app-shell[data-drawer-collapsed="true"] .nav-item,
.app-shell[data-drawer-collapsed="true"] .drawer-footer-button,
.app-shell[data-drawer-collapsed="true"] .source-item {
  justify-content: center;
  padding-inline: 0;
}

.app-shell[data-drawer-collapsed="true"] .drawer-section {
  padding-top: 10px;
}

.topbar-menu {
  display: none;
}

input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--accent);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid rgba(31, 94, 255, 0.35);
  outline-offset: 2px;
}

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

@media (max-width: 1380px) {
  .col-match,
  .results-table th:nth-child(9),
  .results-table td:nth-child(9) {
    display: none;
  }
}

@media (max-width: 1240px) {
  .toolbar-form {
    grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(120px, 1fr)) auto auto;
  }

  .toolbar-form .select-field:nth-of-type(5) {
    grid-column: span 2;
  }

  .col-funding,
  .results-table th:nth-child(4),
  .results-table td:nth-child(4) {
    display: none;
  }
}

@media (max-width: 1080px) {
  .workspace-header,
  .workspace-actions,
  .table-footer,
  .table-footer-actions {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .search-field-toolbar {
    grid-column: 1 / -1;
  }

  .toolbar-reset,
  .toolbar-form .button-primary {
    justify-self: start;
  }
}

@media (max-width: 900px) {
  body {
    overflow: hidden;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-drawer {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: 264px;
    min-width: 264px;
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .app-shell[data-mobile-drawer-open="true"] .app-drawer {
    transform: translateX(0);
  }

  .app-shell[data-drawer-collapsed="true"] .app-drawer {
    width: 264px;
    min-width: 264px;
    padding-inline: 14px;
  }

  .topbar {
    padding-inline: 14px;
  }

  .topbar-menu {
    display: inline-flex;
  }

  .workspace {
    padding: 14px;
    gap: 10px;
  }

  .workspace-header h1 {
    font-size: 21px;
  }

  .toolbar-panel {
    padding: 10px;
  }

  .toolbar-form {
    grid-template-columns: 1fr;
  }

  .search-field-toolbar,
  .select-field,
  .select-field-compact {
    min-width: 0;
  }

  .results-table {
    display: none;
  }

  .mobile-results {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  .mobile-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
  }

  .mobile-card.is-selected {
    background: var(--surface-selected);
  }

  .mobile-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-card-top h2 {
    margin: 0;
    font-size: 15px;
    line-height: 1.35;
  }

  .mobile-card-top p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
  }

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

  .mobile-card-grid strong {
    display: block;
    margin-top: 2px;
    font-size: 13px;
  }

  .mobile-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 640px) {
  .topbar {
    gap: 8px;
  }

  .topbar-search {
    width: 100%;
  }

  .workspace-actions,
  .workspace-header {
    gap: 10px;
  }

  .metrics-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-divider {
    display: none;
  }

  .status-options,
  .field-grid,
  .field-grid-compact,
  .mobile-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
