:root {
  color-scheme: light;
  --ink: #16231e;
  --muted: #68756f;
  --paper: #eef3ef;
  --surface: #ffffff;
  --surface-soft: #fbfbf8;
  --surface-tint: #f7faf8;
  --surface-glass: rgba(255, 255, 255, 0.86);
  --surface-nav: rgba(255, 255, 255, 0.64);
  --surface-field: rgba(249, 251, 249, 0.94);
  --surface-border: rgba(20, 55, 44, 0.14);
  --topbar-surface: rgba(238, 243, 239, 0.88);
  --line: rgba(20, 55, 44, 0.13);
  --green: #176b54;
  --green-dark: #0b382d;
  --coral: #ef6a4b;
  --gold: #d5a745;
  --blue: #4169e1;
  --nav-ink: #315046;
  --contrast-ink: #ffffff;
  --notice-ink: rgba(31, 31, 31, 0.72);
  --quiet-ink: rgba(31, 31, 31, 0.55);
  --quieter-ink: rgba(31, 31, 31, 0.6);
  --error-ink: #8a3429;
  --button-start: var(--green);
  --button-end: #0e5744;
  --button-hover-start: #1b795f;
  --button-hover-end: var(--green);
  --button-ink: #ffffff;
  --shadow: 0 24px 70px rgba(24, 52, 43, 0.1);
  --shadow-soft: 0 10px 30px rgba(24, 52, 43, 0.075);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf6f1;
  --muted: #9fb2aa;
  --paper: #07110e;
  --surface: #13201b;
  --surface-soft: #16251f;
  --surface-tint: #0e1a16;
  --surface-glass: rgba(16, 29, 24, 0.9);
  --surface-nav: rgba(16, 29, 24, 0.88);
  --surface-field: rgba(8, 20, 15, 0.9);
  --surface-border: rgba(190, 222, 208, 0.15);
  --topbar-surface: rgba(7, 17, 14, 0.88);
  --line: rgba(190, 222, 208, 0.14);
  --green: #4fc295;
  --green-dark: #7bd8b3;
  --coral: #ff8b70;
  --gold: #e4bb63;
  --blue: #8ea7ff;
  --nav-ink: #b9cec5;
  --contrast-ink: #07110e;
  --notice-ink: rgba(225, 236, 231, 0.72);
  --quiet-ink: rgba(225, 236, 231, 0.58);
  --quieter-ink: rgba(225, 236, 231, 0.64);
  --error-ink: #ffab98;
  --button-start: #5ad0a2;
  --button-end: #2c8f6c;
  --button-hover-start: #6fdbb0;
  --button-hover-end: #38a87f;
  --button-ink: #07110e;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% 2%, rgba(65, 105, 225, 0.09), transparent 28rem),
    radial-gradient(circle at 18% 90%, rgba(239, 106, 75, 0.08), transparent 30rem),
    linear-gradient(rgba(23, 107, 84, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 107, 84, 0.026) 1px, transparent 1px),
    var(--paper);
  background-size: auto, auto, 28px 28px, 28px 28px, auto;
  color: var(--ink);
  font-family: "Avenir Next", Avenir, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.006em;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 82% 2%, rgba(142, 167, 255, 0.1), transparent 28rem),
    radial-gradient(circle at 18% 90%, rgba(255, 139, 112, 0.07), transparent 30rem),
    linear-gradient(rgba(123, 216, 179, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123, 216, 179, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: auto, auto, 28px 28px, 28px 28px, auto;
}

::selection {
  background: rgba(65, 105, 225, 0.2);
}

.auth-required {
  overflow: hidden;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(23, 61, 52, 0.94), rgba(23, 61, 52, 0.82)),
    var(--paper);
}

.login-overlay[hidden] {
  display: none;
}

.login-card {
  width: min(100%, 420px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: var(--surface);
  padding: 28px;
  box-shadow: var(--shadow);
}

.login-card .brand-mark {
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
}

.login-card h1 {
  color: var(--green-dark);
}

.login-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.45;
}

.login-error {
  min-height: 20px;
  margin-top: 12px;
  color: var(--coral);
  font-weight: 760;
}

button,
input,
select,
textarea {
  font: inherit;
  transition: 160ms ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(65, 105, 225, 0.28);
  outline-offset: 3px;
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  gap: 16px;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 0%, rgba(116, 211, 168, 0.14), transparent 18rem),
    linear-gradient(165deg, #103c31 0%, #0c3027 55%, #09271f 100%);
  color: #f8f5ec;
  border-right: 0;
  box-shadow: 18px 0 50px rgba(15, 46, 37, 0.08);
}

.brand-mark {
  width: 76px;
  height: 76px;
}

.brand-lockup {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 5px;
}

.brand-lockup .brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.brand-lockup .eyebrow {
  margin-bottom: 4px;
  font-size: 0.67rem;
  letter-spacing: 0.12em;
}

.brand-lockup h1 {
  font-size: 1.65rem;
  letter-spacing: -0.045em;
}

.brand-subtitle {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: rgba(239, 248, 244, 0.62);
  font-size: 0.78rem;
  line-height: 1.42;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

.sidebar .eyebrow {
  color: #f1b18c;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 2rem;
  line-height: 1.02;
}

h2 {
  margin-bottom: 0;
  font-size: 1.55rem;
}

h3 {
  margin-bottom: 4px;
  font-size: 1.08rem;
}

.status-panel,
.criteria {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.075);
  padding: 16px;
  backdrop-filter: blur(12px);
}

.status-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  font-size: 0.88rem;
  line-height: 1.3;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(200, 155, 60, 0.18);
}

.status-dot.ready {
  background: #6fca8d;
  box-shadow: 0 0 0 5px rgba(111, 202, 141, 0.18);
}

.criteria h2 {
  margin-bottom: 18px;
  font-size: 0.92rem;
}

dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

dt {
  color: #bdd6ca;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

dd {
  margin: 4px 0 0;
  line-height: 1.4;
}

main {
  min-width: 0;
  padding: 22px 32px 60px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1240px;
  margin: 0 auto 18px;
  padding: 10px 0 14px;
  background: var(--topbar-surface);
  backdrop-filter: blur(18px);
}

.topbar > div:first-child {
  flex: 0 0 225px;
}

.topbar h2 {
  font-size: clamp(1.45rem, 2vw, 2rem);
  letter-spacing: -0.045em;
}

.topbar .eyebrow {
  margin-bottom: 5px;
  color: var(--blue);
  letter-spacing: 0.11em;
}

.view-menu {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-nav);
  box-shadow: var(--shadow-soft);
}

.view-tab {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--nav-ink);
  padding: 9px 11px;
  font-size: 0.84rem;
  font-weight: 750;
  cursor: pointer;
}

.view-tab:hover {
  border-color: transparent;
  background: rgba(23, 107, 84, 0.08);
  transform: translateY(-1px);
}

.view-tab.active {
  border-color: transparent;
  background: var(--green-dark);
  color: var(--contrast-ink);
  box-shadow: 0 8px 20px rgba(11, 56, 45, 0.2);
}

.text-link {
  color: var(--blue);
  font-weight: 760;
}

.view-menu .text-link {
  flex: 0 0 auto;
  margin: 0 4px;
  font-size: 0.82rem;
  text-decoration: none;
}

.theme-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-tint);
  color: var(--nav-ink);
  padding: 8px 11px;
  font-size: 0.8rem;
  font-weight: 760;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: rgba(65, 105, 225, 0.3);
  color: var(--blue);
  transform: translateY(-1px);
}

.theme-toggle-icon {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
  transform: rotate(-25deg);
  transition: transform 220ms ease;
}

[data-theme="dark"] .theme-toggle-icon {
  transform: rotate(25deg);
}

.workspace {
  display: block;
  max-width: 1240px;
  margin: 0 auto;
}

.panel {
  overflow: hidden;
  background: var(--surface-glass);
  border: 1px solid rgba(20, 55, 44, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 26px;
  backdrop-filter: blur(14px);
  animation: panel-enter 320ms ease both;
}

.panel[hidden] {
  display: none;
}

.active-view {
  min-height: 420px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.panel-heading p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.panel-heading h3 {
  font-size: 1.2rem;
  letter-spacing: -0.025em;
}

.step {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--green), #22936f);
  color: white;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(23, 107, 84, 0.22);
}

.action-row,
.form-grid {
  display: grid;
  gap: 12px;
}

.action-row {
  grid-template-columns: 110px 1fr;
  align-items: end;
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 720;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  background: var(--surface-field);
  color: var(--ink);
  padding: 12px 14px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(65, 105, 225, 0.11);
}

textarea {
  min-height: 240px;
  resize: vertical;
  line-height: 1.45;
}

.language-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 14px 0;
}

.language-row label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 9px 12px;
  color: var(--ink);
  border-radius: 999px;
}

.language-row input {
  width: auto;
}

.primary-button {
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--button-start), var(--button-end));
  color: var(--button-ink);
  padding: 13px 16px;
  font-weight: 820;
  cursor: pointer;
  box-shadow: 0 9px 20px rgba(23, 107, 84, 0.18);
}

.primary-button:hover {
  background: linear-gradient(135deg, var(--button-hover-start), var(--button-hover-end));
  transform: translateY(-1px);
}

.primary-button:disabled {
  background: #8ba29a;
  box-shadow: none;
  cursor: not-allowed;
}

.secondary-button {
  border: 1px solid var(--green);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--green-dark);
  padding: 11px 14px;
  font-weight: 820;
  cursor: pointer;
}

.secondary-button:hover {
  background: rgba(39, 90, 75, 0.08);
}

.secondary-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.followup-panel {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius-md);
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.075);
  color: #fff;
  backdrop-filter: blur(12px);
}

.followup-panel span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.8rem;
  font-weight: 850;
  text-transform: uppercase;
}

.followup-panel strong {
  font-size: 1rem;
}

.wide {
  width: 100%;
  margin-top: 14px;
}

.result-box {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface-tint) 78%, transparent);
  padding: 15px;
}

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

.error-box {
  border-color: rgba(215, 92, 72, 0.55);
  background: rgba(215, 92, 72, 0.08);
  color: var(--error-ink);
  font-weight: 720;
}

.progress-box {
  display: grid;
  gap: 14px;
}

.inline-progress {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 12px;
  margin-bottom: 14px;
}

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

.progress-header p {
  margin: 5px 0 0;
  color: var(--muted);
}

.progress-header span {
  color: var(--green-dark);
  font-weight: 850;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  background: rgba(39, 90, 75, 0.12);
}

.progress-track div {
  height: 100%;
  background: var(--green);
  transition: width 180ms ease;
}

.progress-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.progress-stats div {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 10px;
}

.progress-stats dt {
  color: var(--muted);
}

.progress-stats dd {
  color: var(--green-dark);
  font-size: 1.2rem;
  font-weight: 850;
}

.progress-steps {
  display: grid;
  gap: 8px;
}

.progress-steps ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.progress-steps li {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border-left: 4px solid var(--blue);
  background: var(--surface);
  padding: 9px 10px;
}

.progress-steps span {
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 850;
}

.progress-steps p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.lead-list,
.file-list {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lead-card,
.file-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(20, 55, 44, 0.1);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--surface-tint) 90%, transparent));
  padding: 17px 18px;
  box-shadow: 0 7px 22px rgba(18, 58, 45, 0.055);
}

.lead-card::before,
.file-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--blue), #7e94ec);
}

.lead-card:hover,
.file-card:hover {
  border-color: rgba(65, 105, 225, 0.2);
  box-shadow: 0 14px 34px rgba(18, 58, 45, 0.1);
  transform: translateY(-2px);
}

.lead-card strong,
.file-card a {
  color: var(--green-dark);
}

.empty-state {
  border-left: 4px solid var(--coral);
  background: var(--surface);
  padding: 14px;
}

.empty-state strong {
  color: var(--green-dark);
}

.empty-state p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.source-report-box {
  margin: 12px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 12px;
}

.source-report-box summary {
  cursor: pointer;
  color: var(--green-dark);
  font-weight: 820;
}

.source-report-box ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.source-report {
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface-soft);
  padding: 10px;
}

.source-report.ok {
  border-left-color: var(--green);
}

.source-report.error {
  border-left-color: var(--coral);
}

.source-report.skipped {
  border-left-color: var(--muted);
}

.source-report.timeout {
  border-left-color: var(--gold);
}

.source-report span {
  display: inline-block;
  margin-left: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 720;
}

.source-report p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.linkedin-links {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 12px;
}

.linkedin-links strong {
  color: var(--green-dark);
}

.linkedin-links div,
.linkedin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.settings-panel .job-text-label {
  margin-top: 14px;
}

.settings-panel textarea {
  min-height: 120px;
}

.linkedin-search-link {
  border: 1px solid rgba(39, 90, 75, 0.28);
  background: rgba(39, 90, 75, 0.06);
  color: var(--green-dark);
  padding: 8px 10px;
  font-weight: 760;
  border-radius: var(--radius-sm);
}

.search-summary,
.lead-header,
.lead-actions,
.result-actions {
  display: flex;
  gap: 12px;
}

.search-summary {
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.search-summary p,
.lead-header p,
.lead-reasons,
.lead-snippet {
  margin-bottom: 0;
  color: var(--muted);
}

.result-actions,
.lead-actions {
  align-items: center;
  flex-wrap: wrap;
}

.result-actions {
  justify-content: flex-end;
}

.lead-card {
  display: grid;
  gap: 11px;
}

.lead-header {
  align-items: flex-start;
}

.select-lead {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--coral);
}

.select-lead input {
  width: auto;
}

.lead-header strong {
  display: block;
  font-size: 1.01rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.lead-salary {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.runtime-notice {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(239, 106, 75, 0.18);
  border-radius: 12px;
  background: rgba(207, 91, 63, 0.08);
  color: var(--notice-ink);
  line-height: 1.45;
}

.salary-amount {
  font-size: 0.95rem;
  font-weight: 780;
  color: var(--green);
}

.salary-tag {
  font-size: 0.7rem;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
}

.salary-tag--stated {
  color: var(--green-dark);
  background: rgba(39, 90, 75, 0.1);
}

/* Deliberately muted: an estimate must never read as hard data. */
.salary-tag--estimated {
  color: var(--quiet-ink);
  background: transparent;
  border-style: dashed;
}

.salary-workload {
  font-size: 0.8rem;
  color: var(--quieter-ink);
}

.salary-source {
  font-size: 0.75rem;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lead-reasons {
  font-size: 0.84rem;
  font-weight: 720;
  line-height: 1.5;
}

.lead-snippet {
  font-size: 0.9rem;
  line-height: 1.55;
}

.status-note {
  border: 1px solid rgba(39, 90, 75, 0.24);
  background: rgba(39, 90, 75, 0.08);
  color: var(--green-dark);
  padding: 10px 12px;
  margin-bottom: 12px;
  font-weight: 720;
}

.prepared-files {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(39, 90, 75, 0.22);
  background: rgba(39, 90, 75, 0.06);
  padding: 10px;
}

.prepared-files div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.prepared-files a {
  color: var(--green-dark);
  font-weight: 760;
}

.compact-button {
  padding: 9px 11px;
  font-size: 0.9rem;
}

.score {
  display: inline-block;
  margin-right: 8px;
  color: var(--coral);
  font-weight: 850;
}

.path-line {
  margin-top: 12px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.technical-details {
  margin-top: 12px;
  color: var(--muted);
}

.technical-details summary {
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 720;
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .topbar {
    align-items: flex-start;
  }

  .view-menu {
    justify-content: flex-start;
    flex-wrap: wrap;
    border-radius: var(--radius-md);
  }
}

@media (max-width: 940px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    height: auto;
    min-height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 22px;
  }

  .brand-lockup,
  .criteria {
    grid-column: 1 / -1;
  }

  main {
    padding: 20px 22px 50px;
  }

  .topbar {
    position: static;
    display: grid;
    min-width: 0;
  }

  .view-menu {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 620px) {
  main,
  .sidebar {
    padding: 16px;
  }

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

  .brand-lockup,
  .criteria {
    grid-column: auto;
  }

  .topbar,
  .action-row,
  .form-grid,
  .search-summary {
    grid-template-columns: 1fr;
    display: grid;
  }

  .view-menu {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 5px;
    scrollbar-width: thin;
  }

  .view-tab,
  .view-menu .text-link {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .panel {
    border-radius: 18px;
    padding: 18px;
  }

  .lead-card,
  .file-card {
    padding: 15px;
  }

  .lead-actions > *,
  .result-actions > * {
    width: 100%;
    text-align: center;
  }

  .result-actions {
    justify-content: flex-start;
  }

  .progress-stats,
  .progress-steps li {
    grid-template-columns: 1fr;
  }
}

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

.reason-choices {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.reason-choices span {
  flex-basis: 100%;
  font-size: 0.86rem;
  opacity: 0.8;
}
