:root {
  color-scheme: light;
  --background: #f6f7f9;
  --surface: #ffffff;
  --border: #d8dde5;
  --text: #1d2430;
  --muted: #5e6b7a;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --warning: #8a4b0f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
}

.shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 32px auto;
}

.toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

h1 {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.1;
}

p {
  margin: 0;
  color: var(--muted);
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

button[hidden] {
  display: none;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(140px, 200px));
  gap: 16px;
  margin: 20px 0;
}

.debug-panel {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr;
  gap: 16px;
  align-items: end;
  margin: -4px 0 20px;
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

.debug-panel[hidden] {
  display: none;
}

.debug-source-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 42px;
}

.debug-source-count {
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 4px 9px;
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
}

.status,
.errors {
  margin: 18px 0;
  color: var(--muted);
}

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

.list {
  display: grid;
  gap: 12px;
}

.load-more {
  display: flex;
  justify-content: center;
  margin: 20px 0 0;
}

.posting {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.posting-company {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
}

.posting h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.posting h2 a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.posting h2 a:hover {
  text-decoration: underline;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 9px;
  background: #fbfcfd;
  color: var(--muted);
  font-weight: 700;
}

.posting .tag {
  align-self: center;
}

.tag-location {
  max-width: min(360px, 100%);
  overflow: hidden;
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #0369a1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-level {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.tag-type-software {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.tag-type-product {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.tag-type-data,
.tag-type-research {
  border-color: #c4b5fd;
  background: #f5f3ff;
  color: #6d28d9;
}

.tag-type-design {
  border-color: #fbcfe8;
  background: #fdf2f8;
  color: #be185d;
}

.tag-type-finance {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

.tag-type-other {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #475569;
}

.tag-age {
  border-color: #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
}

.tag-salary {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #047857;
}

.tag-season {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
}

.tag-season-season-not-specified {
  border-color: #e5e7eb;
  background: #f9fafb;
  color: #6b7280;
}

.tag-reviews {
  border-color: #d8b4fe;
  background: #faf5ff;
  color: #7e22ce;
}

.tag-source {
  border-color: #e5e7eb;
  background: #f9fafb;
  color: #4b5563;
}

.posting a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.posting a:hover {
  text-decoration: underline;
}

.review-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
}

.posting-action {
  white-space: nowrap;
}

@media (max-width: 720px) {
  .shell {
    width: min(100vw - 24px, 1120px);
    margin: 20px auto;
  }

  .toolbar,
  .posting {
    grid-template-columns: 1fr;
    display: grid;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .debug-panel {
    grid-template-columns: 1fr;
  }
}
