:root {
  color-scheme: light;
  --bg: #f4f4f2;
  --ink: #1f1f1f;
  --muted: #626262;
  --faint: #737370;
  --line: #d1d1ce;
  --line-strong: #949491;
  --surface: #ffffff;
  --soft: #eeeeec;
  --soft-blue: #eef0ff;
  --blue: #4f5bd5;
  --blue-dark: #3f49b8;
  --accent-border: #c9cef8;
  --danger: #c23e4e;
  --danger-soft: #fff0f2;
  --success: #26785d;
  --topbar-bg: #ffffff;
  --topbar-border: #d1d1ce;
  --field: #ffffff;
  --field-hover-border: #686865;
  --option-text: #333333;
  --surface-hover: #f7f7f5;
  --primary-bg: #1f1f1f;
  --primary-text: #ffffff;
  --primary-hover: #353535;
  --secondary-hover-border: #686865;
  --icon-hover: #e5e5e2;
  --progress-text: #1f1f1f;
  --progress-track: #d9dcfa;
  --neutral-badge-text: #5f5f5f;
  --neutral-badge-bg: #e7e7e4;
  --filter-border: #cdcdca;
  --filter-bg: #ececea;
  --filter-control-border: #949491;
  --list-bg: #f7f7f5;
  --heading-text: #1f1f1f;
  --group-border: #cececb;
  --group-header-border: #cececb;
  --group-header-bg: #eeeeec;
  --group-count-text: #1f1f1f;
  --group-count-bg: #dfdfdc;
  --meta-divider: #aaaaa7;
  --keyword-border: #c9cef8;
  --keyword-bg: #f3f4ff;
  --quick-open: #646464;
  --favorite: #969696;
  --favorite-active: #e99b00;
  --detail-description: #3f3f3f;
  --chart-label: #5f5f5f;
  --chart-track: #ddddda;
  --focus-ring: rgba(79, 91, 213, .34);
  --focus-shadow: rgba(79, 91, 213, .14);
  --status-ring: rgba(79, 91, 213, .12);
  --button-shadow: rgba(31, 31, 31, .14);
  --dialog-shadow: rgba(31, 31, 31, .18);
  --detail-shadow: rgba(31, 31, 31, .14);
  --dialog-backdrop: rgba(31, 31, 31, .3);
  --detail-backdrop: rgba(31, 31, 31, .24);
  --radius: 20px;
  --shadow: 0 1px 2px rgba(31, 31, 31, .04), 0 10px 28px rgba(31, 31, 31, .055);
  font-family: -apple-system-body, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji";
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button, summary, select, input[type="checkbox"] { cursor: pointer; }
button { color: inherit; }

[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.app-shell { min-height: 100vh; }

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 68px;
  padding: 10px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--topbar-border);
  background: var(--topbar-bg);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--ink);
  font-size: 18px;
  font-weight: 740;
  letter-spacing: -.03em;
  text-decoration: none;
}

.page-tabs {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  scrollbar-width: none;
}
.page-tabs::-webkit-scrollbar { display: none; }

.tab-button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  transition: color .15s ease, background .15s ease, box-shadow .15s ease;
}

.tab-button:hover { color: var(--ink); }
.tab-button.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(10, 18, 34, .1);
}

.storage-status {
  max-width: 220px;
  overflow: hidden;
  color: var(--faint);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storage-status::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: #afb4bd;
  content: "";
}
.storage-status.connected::before { background: var(--success); }

.page-view { display: none; }
.page-view.active { display: grid; }

.workspace {
  grid-template-columns: minmax(250px, 292px) minmax(0, 1fr);
  gap: 22px;
  width: min(1480px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.controls,
.results-panel,
.report-chart-card,
.report-row,
.report-ok {
  border: 1px solid var(--line);
  background: var(--surface);
}

.controls {
  position: sticky;
  min-width: 0;
  top: 94px;
  align-self: start;
  max-height: calc(100vh - 116px);
  overflow: auto;
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  scrollbar-width: thin;
}

.panel-heading,
.dialog-heading,
.report-chart-heading,
.results-toolbar,
.results-title,
.toolbar-actions,
.progress-copy,
.picker-actions,
.preset-row {
  display: flex;
  align-items: center;
}

.panel-heading { justify-content: space-between; margin-bottom: 20px; }
.panel-heading h1, .report-heading h1, .dialog-heading h2 {
  margin: 2px 0 0;
  font-size: 23px;
  line-height: 1.16;
  letter-spacing: -.035em;
}

.source-links { display: flex; gap: 14px; margin: 0 0 15px; }
.source-links a { color: var(--blue); font-size: 12px; font-weight: 700; text-decoration: none; }
.source-links a:hover { color: var(--blue-dark); text-decoration: underline; }

.section-label {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
}
.status-dot.active {
  background: var(--blue);
  box-shadow: 0 0 0 5px var(--status-ring);
  animation: pulse 1.4s ease infinite;
}
@keyframes pulse { 50% { opacity: .45; } }

.controls > label:not(.check-row),
.controls > div > label,
.preset-dialog label {
  display: block;
  margin: 15px 0 6px;
  color: var(--heading-text);
  font-size: 12px;
  font-weight: 700;
}

#dou-category-field { margin: 0 0 15px; }
#dou-category-field label { margin-top: 0; }

textarea,
input:not([type="checkbox"]),
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  background: var(--field);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

textarea,
input:not([type="checkbox"]) { padding: 10px 12px; }
textarea { min-height: 78px; resize: vertical; }
input[type="search"] { min-height: 42px; padding-left: 38px; }
select { min-height: 38px; padding: 0 32px 0 11px; }

textarea:hover, input:not([type="checkbox"]):hover, select:hover { border-color: var(--field-hover-border); }
textarea:focus, input:not([type="checkbox"]):focus, select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--focus-shadow);
  outline: 0;
}

.picker { margin: 15px 0; }
.picker summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  list-style: none;
  font-size: 13px;
  font-weight: 650;
}
.picker summary::-webkit-details-marker { display: none; }
.picker summary::after { margin-left: auto; padding-left: 8px; color: var(--faint); content: "⌄"; }
.picker[open] summary { border-radius: 10px 10px 0 0; border-color: var(--blue); }
.picker summary strong { margin-left: 8px; color: var(--muted); font-size: 11px; font-weight: 600; }
.picker-body {
  max-height: 330px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: var(--surface);
}
.picker-actions { justify-content: flex-end; gap: 10px; padding: 2px 5px 7px; }
.option-list { display: grid; gap: 1px; }
.option-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 33px;
  padding: 5px 7px;
  border-radius: 7px;
  color: var(--option-text);
  font-size: 12px;
}
.option-row:hover { background: var(--soft); }
input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 12px;
}

.primary-button,
.secondary-button,
.add-preset-button,
.text-button,
.icon-button {
  border: 0;
  font-weight: 700;
}

.primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  width: 100%;
  padding: 0 16px;
  border-radius: 11px;
  color: var(--primary-text);
  background: var(--primary-bg);
  box-shadow: 0 7px 16px var(--button-shadow);
  transition: transform .15s ease, background .15s ease;
}
.primary-button:hover:not(:disabled) { background: var(--primary-hover); transform: translateY(-1px); }
.primary-button:active:not(:disabled) { transform: translateY(0); }
.primary-button:disabled { cursor: not-allowed; opacity: .55; }

.secondary-button {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  white-space: nowrap;
}
.secondary-button:hover:not(:disabled) { border-color: var(--secondary-hover-border); background: var(--soft); }
.secondary-button:disabled { opacity: .45; }

.text-button { padding: 2px; color: var(--blue); background: none; font-size: 11px; }
.text-button:hover { color: var(--blue-dark); }
.icon-button {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: var(--muted);
  background: var(--soft);
  font-size: 19px;
}
.icon-button:hover { color: var(--ink); background: var(--icon-hover); }

.last-scraped { display: block; min-height: 16px; margin-top: 9px; color: var(--faint); font-size: 11px; text-align: center; }
.coverage-summary { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; text-align: center; }
.coverage-summary.warning { color: var(--danger); }
.spinner { display: none; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.35); border-top-color: white; border-radius: 50%; animation: spin .7s linear infinite; }
.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.progress-card { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--soft-blue); }
.progress-copy { justify-content: space-between; gap: 10px; color: var(--progress-text); font-size: 11px; }
.progress-track { height: 4px; margin-top: 9px; overflow: hidden; border-radius: 99px; background: var(--progress-track); }
.progress-bar { height: 100%; border-radius: inherit; background: var(--blue); transition: width .25s ease; }
.error-message { margin: 11px 0 0; padding: 10px 12px; border-radius: 9px; color: var(--danger); background: var(--danger-soft); font-size: 12px; }

.results-panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.results-panel.is-busy::before {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  width: 38%;
  height: 3px;
  border-radius: 0 99px 99px 0;
  background: var(--blue);
  content: "";
  animation: loading-bar 1s ease-in-out infinite alternate;
}
@keyframes loading-bar { from { transform: translateX(-30%); } to { transform: translateX(190%); } }

.results-toolbar {
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 14px;
}
.results-title { flex-wrap: wrap; gap: 9px; min-width: 160px; }
.results-title h2 { display: flex; align-items: baseline; gap: 5px; margin: 0; font-size: 21px; letter-spacing: -.03em; }
.new-count, .new-badge {
  border-radius: 99px;
  color: var(--blue);
  background: var(--soft-blue);
  font-size: 10px;
  font-weight: 750;
}
.new-count { padding: 4px 8px; }
.new-count { color: var(--neutral-badge-text); background: var(--neutral-badge-bg); }
.new-count.has-new { color: var(--blue); background: var(--soft-blue); }
.new-badge { padding: 2px 6px; }
.toolbar-actions { justify-content: flex-end; gap: 8px; width: min(100%, 520px); }
.results-toolbar input[type="search"] { width: min(100%, 440px); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%2379808c' stroke-width='1.8'%3E%3Ccircle cx='8' cy='8' r='5.3'/%3E%3Cpath d='m12 12 4 4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 12px center; }

.preset-row { gap: 8px; padding: 0 22px 12px; }
.preset-strip { display: flex; flex: 1; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.preset-strip::-webkit-scrollbar { display: none; }
.preset-chip,
.add-preset-button {
  flex: 0 0 auto;
  min-height: 31px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.preset-chip { padding: 0 12px; }
.preset-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.preset-chip.active { border-color: var(--primary-bg); color: var(--primary-text); background: var(--primary-bg); }
.add-preset-button { width: 31px; padding: 0; color: var(--blue); font-size: 18px; }
.add-preset-button:hover { border-color: var(--blue); background: var(--soft-blue); }

.compact-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 9px;
  padding: 13px 22px;
  border-top: 1px solid var(--filter-border);
  border-bottom: 1px solid var(--filter-border);
  background: var(--filter-bg);
}
.filter-toggle { display: none; }
.jobboard-filters,
.partner-filters { grid-template-columns: repeat(5, minmax(110px, 1fr)); }
.jobup-filters { grid-template-columns: repeat(2, minmax(140px, 240px)); }
.compact-filters select {
  min-width: 0;
  border-color: var(--filter-control-border);
  background-color: var(--field);
  box-shadow: 0 1px 2px rgba(19, 31, 48, .045);
  font-size: 12px;
  font-weight: 620;
}

.jobs-list { min-height: 120px; padding: 0 15px 22px; background: var(--list-bg); }
.load-more-button {
  display: block;
  min-width: 110px;
  min-height: 40px;
  margin: 18px auto 0;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
  font-weight: 700;
}
.load-more-button:hover { border-color: var(--secondary-hover-border); background: var(--soft); }
.time-group { padding-top: 20px; }
.time-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 3px 8px;
}
.time-group-header h3 {
  margin: 0;
  color: var(--heading-text);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.time-group-header span { color: var(--faint); font-size: 10px; font-weight: 680; }
.company-group {
  margin-bottom: 10px;
  overflow: clip;
  border: 1px solid var(--group-border);
  border-radius: 12px;
  background: var(--surface);
  content-visibility: auto;
  contain-intrinsic-size: 180px;
}
.company-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 35px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--group-header-border);
  background: var(--group-header-bg);
}
.company-group-header h4 {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--blue);
  font-size: 12px;
  font-weight: 790;
  letter-spacing: -.005em;
}
.company-group-header span {
  display: inline-grid;
  flex: 0 0 auto;
  min-width: 21px;
  height: 21px;
  place-items: center;
  padding: 0 6px;
  border-radius: 99px;
  color: var(--group-count-text);
  background: var(--group-count-bg);
  font-size: 10px;
  font-weight: 750;
}
.job-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.company-group .job-row:last-child { border-bottom: 0; }
.job-row:hover { background: var(--surface-hover); }
.job-row.is-new { box-shadow: inset 3px 0 var(--blue); }

.job-disclosure {
  min-width: 0;
  padding: 13px 14px;
  border: 0;
  background: transparent;
  text-align: left;
}
.job-title-line { display: flex; align-items: flex-start; gap: 9px; min-width: 0; font-size: 15px; font-weight: 745; letter-spacing: -.015em; line-height: 1.32; }
.job-title, .partner-title { min-width: 0; overflow-wrap: anywhere; }
.job-chevron { flex: 0 0 7px; width: 7px; height: 7px; margin-top: 5px; border-right: 1.5px solid var(--faint); border-bottom: 1.5px solid var(--faint); transform: rotate(-45deg); }
.job-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0; margin-top: 5px; color: var(--muted); font-size: 11px; }
.job-meta > span:not([hidden]) { display: inline-flex; align-items: center; }
.job-meta > span:not(:last-child):not(.new-badge):not(.description-badge):not(.search-match-badge)::after { margin: 0 7px; color: var(--meta-divider); content: "·"; }
.description-badge { margin-right: 7px; padding: 2px 6px; border-radius: 99px; color: var(--danger); background: var(--danger-soft); font-size: 9px; font-weight: 750; }
.search-match-badge { margin-right: 7px; padding: 2px 6px; border-radius: 99px; color: var(--blue-dark); background: var(--soft-blue); font-size: 9px; font-weight: 750; }
.job-keyword-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.keyword-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid var(--keyword-border);
  border-radius: 6px;
  color: var(--blue);
  background: var(--keyword-bg);
  font-size: 10px;
  font-weight: 690;
  line-height: 1.2;
}
.keyword-more { color: var(--muted); border-color: var(--line-strong); background: var(--soft); }

.job-row-actions { display: flex; flex-direction: column; align-items: center; gap: 1px; padding-top: 7px; }
.quick-open-button,
.favorite-button { display: inline-grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 9px; background: transparent; text-decoration: none; }
.quick-open-button { color: var(--quick-open); font-size: 17px; font-weight: 650; }
.quick-open-button:hover { color: var(--primary-text); background: var(--primary-bg); }
.favorite-button { color: var(--favorite); font-size: 21px; line-height: 1; }
.favorite-button:hover { color: var(--blue); background: var(--soft-blue); }
.favorite-button.active { color: var(--favorite-active); }

.empty-state,
.loading-state { padding: 76px 20px; color: var(--muted); text-align: center; }
.loading-state { display: flex; align-items: center; justify-content: center; gap: 9px; }
.loading-spinner { width: 16px; height: 16px; border: 2px solid var(--accent-border); border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }

.job-detail-dialog {
  width: min(680px, 100%);
  max-width: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-left: 1px solid var(--line-strong);
  color: var(--ink);
  background: var(--surface);
  box-shadow: -22px 0 70px var(--detail-shadow);
}
.job-detail-dialog::backdrop { background: var(--detail-backdrop); }
.job-detail-panel { display: flex; height: 100%; flex-direction: column; }
.job-detail-header {
  position: relative;
  flex: 0 0 auto;
  padding: 28px 30px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.job-detail-heading { padding-right: 42px; }
.job-detail-company {
  display: block;
  margin-bottom: 7px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.job-detail-heading h2 { margin: 0; overflow-wrap: anywhere; font-size: clamp(21px, 3vw, 29px); line-height: 1.25; letter-spacing: -.035em; }
.job-detail-meta { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.job-detail-close { position: absolute; top: 21px; right: 22px; }
.job-detail-actions { display: flex; margin-top: 18px; }
.detail-source-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  color: var(--primary-text);
  background: var(--primary-bg);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}
.detail-source-link:hover { background: var(--primary-hover); }
.job-detail-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 24px 30px 48px; }
.job-detail-body .job-keyword-tags { margin: 0 0 18px; }
.job-detail-description { margin: 0; color: var(--detail-description); font-size: 13px; font-weight: 400; line-height: 1.75; white-space: pre-wrap; }

.report-page {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 44px 0 64px;
}
.report-heading { margin-bottom: 22px; }
.report-heading h1 { font-size: 34px; }
.report-heading p { margin: 9px 0 0; color: var(--muted); font-size: 14px; }
.quality-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.quality-metrics article {
  min-width: 0;
  padding: 16px 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.quality-metrics span { display: block; color: var(--muted); font-size: 10px; font-weight: 720; letter-spacing: .03em; text-transform: uppercase; }
.quality-metrics strong { display: block; margin-top: 6px; overflow-wrap: anywhere; font-size: clamp(20px, 3vw, 28px); letter-spacing: -.04em; line-height: 1; }
.report-chart-card { padding: clamp(22px, 3vw, 34px); border-radius: var(--radius); box-shadow: var(--shadow); }
.report-chart-heading { justify-content: space-between; margin-bottom: 8px; }
.report-chart-heading h2 { margin: 0; font-size: clamp(18px, 2vw, 22px); letter-spacing: -.025em; }
.report-chart-heading span { color: var(--muted); font-size: 13px; }
.report-chart-subtitle { margin: 0 0 28px; color: var(--muted); font-size: 14px; }
.report-chart { --chart-label-width: minmax(130px, 210px); display: grid; gap: 9px; }
.chart-row {
  position: relative;
  display: grid;
  grid-template-columns: var(--chart-label-width) minmax(160px, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 31px;
}
.chart-label { overflow: hidden; color: var(--chart-label); font-size: 13px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.chart-track {
  position: relative;
  height: 28px;
  background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(25% - 1px), var(--chart-track) 25%);
  background-size: 100% 100%;
}
.chart-track::before { position: absolute; inset: -5px auto -5px 0; border-left: 1px solid var(--chart-track); content: ""; }
.chart-bar { display: block; height: 100%; min-width: 0; border-radius: 7px; background: linear-gradient(90deg, #245a9f, #2e67b4); box-shadow: inset 0 0 0 1px rgba(36, 88, 157, .3); transition: filter .15s ease; }
.chart-row:hover .chart-bar { filter: brightness(1.08); }
.chart-tooltip {
  position: absolute;
  z-index: 2;
  top: calc(100% + 7px);
  left: min(max(8px, calc(var(--bar-width) - 56px)), calc(100% - 154px));
  display: none;
  min-width: 146px;
  padding: 11px 13px;
  border-radius: 12px;
  color: #f7f7f7;
  background: #363636;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  font-size: 12px;
  line-height: 1.35;
}
.chart-tooltip strong { display: block; margin-bottom: 7px; font-size: 12px; }
.chart-tooltip span { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.chart-tooltip span::before { width: 9px; height: 9px; border-radius: 50%; background: #2e67b4; content: ""; }
.chart-tooltip b { margin-left: auto; font-size: 13px; }
.chart-row:hover .chart-tooltip { display: block; }
.chart-axis { display: grid; grid-template-columns: var(--chart-label-width) minmax(160px, 1fr); gap: 14px; margin-top: -1px; }
.chart-axis-ticks { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.report-list { display: grid; gap: 9px; margin-top: 16px; }
.report-row { display: grid; min-width: 0; gap: 7px; padding: 15px 17px; border-radius: 11px; }
.report-row > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; min-width: 0; }
.report-row strong { font-size: 13px; }
.report-row span { flex: 0 0 auto; color: var(--muted); font-size: 11px; }
.report-row p { min-width: 0; margin: 0; overflow-wrap: anywhere; color: var(--danger); font-size: 11px; }
.report-ok { padding: 18px; border-radius: 11px; color: var(--success); }

.preset-dialog {
  width: min(520px, calc(100% - 28px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 28px 80px var(--dialog-shadow);
}
.preset-dialog::backdrop { background: var(--dialog-backdrop); }
.preset-dialog form { padding: 23px; }
.dialog-heading { justify-content: space-between; margin-bottom: 18px; }
.dialog-help { margin: 9px 0; color: var(--muted); font-size: 11px; }
.saved-presets { display: grid; gap: 6px; margin: 14px 0; }
.saved-preset-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 9px; background: var(--soft); }
.saved-preset-row.is-editing { box-shadow: inset 0 0 0 1px var(--blue); background: var(--soft-blue); }
.saved-preset-row > div:first-child { min-width: 0; }
.saved-preset-row strong, .saved-preset-row span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-preset-row strong { font-size: 12px; }
.saved-preset-row span { color: var(--muted); font-size: 10px; }
.preset-actions { display: flex; flex: 0 0 auto; gap: 4px; }
.preset-actions .icon-button { width: 29px; height: 29px; font-size: 16px; }

/* Reference-like geometry for the minimal palette. */
.topbar {
  min-height: 76px;
  border-bottom-color: var(--topbar-border);
}
.brand {
  font-size: 20px;
  font-weight: 780;
  letter-spacing: -.045em;
}
.page-tabs {
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
}
.tab-button {
  min-height: 42px;
  padding-inline: 17px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
}
.tab-button.active {
  background: var(--soft);
  box-shadow: none;
}
.controls,
.results-panel,
.report-chart-card,
.report-row,
.report-ok {
  border-color: var(--line);
}
.partner-controls .picker { margin-top: 0; }
.picker summary { border-radius: 14px; }
.picker[open] summary { border-radius: 14px 14px 0 0; }
.picker-body { border-radius: 0 0 14px 14px; }
.primary-button {
  border-radius: 999px;
  box-shadow: none;
  font-weight: 650;
}
.secondary-button,
input:not([type="checkbox"]),
select {
  border-radius: 999px;
}
.company-group,
.quality-metrics article,
.report-chart-card,
.report-row {
  border-radius: 18px;
}
.company-group-header,
.saved-preset-row { border-radius: 14px; }

@media (max-width: 980px) {
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding-inline: 18px; }
  .page-tabs { justify-self: center; }
  .storage-status { display: none; }
  .workspace { grid-template-columns: 1fr; }
  .controls { position: static; max-height: none; }
  .compact-filters, .jobboard-filters, .partner-filters, .jobup-filters, .ukraine-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quality-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .topbar { position: static; display: flex; flex-wrap: wrap; min-height: 0; padding: 13px 14px; }
  .brand { font-size: 16px; }
  .page-tabs { order: 2; width: 100%; margin-top: 4px; }
  .tab-button { flex: 0 0 auto; min-height: 44px; padding-inline: 13px; }
  .workspace { width: calc(100% - 20px); max-width: calc(100vw - 20px); padding-top: 12px; }
  .controls { padding: 17px; }
  .results-toolbar { align-items: flex-start; flex-direction: column; padding: 17px 15px 12px; }
  .toolbar-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; }
  .results-toolbar input[type="search"] { min-width: 0; width: 100%; }
  .toolbar-actions .secondary-button { white-space: nowrap; }
  .preset-row { padding-inline: 15px; }
  .filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: calc(100% - 30px);
    min-height: 44px;
    margin: 0 15px 12px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--ink);
    background: var(--surface);
    font-size: 12px;
    font-weight: 700;
  }
  .filter-toggle::after { margin-left: auto; color: var(--muted); content: "+"; font-size: 18px; font-weight: 500; }
  .filter-toggle[aria-expanded="true"]::after { content: "−"; }
  .filter-count { display: inline-grid; min-width: 22px; height: 22px; margin-left: 8px; place-items: center; border-radius: 99px; color: #fff; background: var(--blue); font-size: 10px; }
  .compact-filters, .jobboard-filters, .partner-filters, .jobup-filters, .ukraine-filters { display: none; grid-template-columns: 1fr 1fr; padding: 11px 15px; }
  .compact-filters.is-open { display: grid; }
  .jobs-list { padding: 0 8px 16px; }
  .time-group { padding-top: 16px; }
  .time-group-header { padding-inline: 5px; }
  .company-group { border-radius: 10px; contain-intrinsic-size: 260px; }
  .company-group-header { padding-inline: 11px; }
  .job-row { grid-template-columns: minmax(0, 1fr) 40px; }
  .job-disclosure { padding: 14px 10px; }
  .job-title-line { font-size: 14px; line-height: 1.38; }
  .job-meta { row-gap: 4px; margin-top: 7px; }
  .job-meta > span:not(:last-child):not(.new-badge):not(.description-badge):not(.search-match-badge)::after { margin-inline: 5px; }
  .job-detail-header { padding: 22px 20px 18px; }
  .job-detail-close { top: 16px; right: 15px; }
  .job-detail-body { padding: 20px 20px 40px; }
  .report-page { width: calc(100% - 20px); padding-top: 26px; }
  .report-heading h1 { font-size: 28px; }
  .report-chart-card { padding: 16px 13px; }
  .report-chart-heading { align-items: flex-start; gap: 10px; }
  .report-chart { --chart-label-width: minmax(78px, 105px); gap: 7px; }
  .report-chart-subtitle { margin-bottom: 20px; font-size: 12px; }
  .chart-row { gap: 8px; min-height: 25px; }
  .chart-label { font-size: 11px; }
  .chart-track { height: 22px; }
  .chart-tooltip { display: none !important; }
  .report-row { grid-template-columns: 1fr; }
  .report-row > div { flex-direction: column; gap: 2px; }
  .report-row span, .report-row p { grid-column: 1; }
}

@media (max-width: 420px) {
  .compact-filters, .jobboard-filters, .partner-filters, .jobup-filters, .ukraine-filters { grid-template-columns: 1fr; }
  .quality-metrics { grid-template-columns: 1fr 1fr; gap: 7px; }
  .quality-metrics article { padding: 13px 12px; }
  .quality-metrics strong { font-size: 21px; }
  .job-row { grid-template-columns: minmax(0, 1fr) 40px; }
  .job-detail-dialog { border-left: 0; }
}

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