:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #14233b;
  background: #f5f7fb;
  --bg: #f5f7fb;
  --paper: #ffffff;
  --paper-soft: #f8fafc;
  --ink: #14233b;
  --ink-soft: #40516b;
  --muted: #718097;
  --muted-light: #9aa7b9;
  --line: #e4eaf2;
  --line-strong: #d5dfec;
  --blue: #2c64e8;
  --blue-dark: #1f4bb6;
  --blue-soft: #edf3ff;
  --mint: #159b78;
  --mint-soft: #e8f8f2;
  --lilac: #7354d4;
  --lilac-soft: #f1edff;
  --danger: #c5425a;
  --danger-soft: #fff0f2;
  --shadow-card: 0 1px 2px rgba(20, 35, 59, .03), 0 14px 34px rgba(39, 69, 112, .06);
  --shadow-float: 0 18px 50px rgba(31, 54, 94, .14);
  --radius-card: 1.25rem;
  --radius-control: .75rem;
}

[hidden] { display: none !important; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(circle at 92% 4%, rgba(213, 229, 255, .7), transparent 27rem),
    radial-gradient(circle at 4% 82%, rgba(220, 248, 239, .48), transparent 24rem),
    var(--bg);
}
body::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: .25;
  background-image: linear-gradient(rgba(95, 121, 157, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(95, 121, 157, .055) 1px, transparent 1px);
  background-size: 4rem 4rem;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .54; }
a { color: inherit; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 14rem;
  height: 14rem;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .35;
}
.ambient-one { top: 10%; right: 0; background: #d9e7ff; }
.ambient-two { bottom: 4%; left: 0; background: #d9f5e8; }

.topbar {
  display: flex;
  width: min(100% - 2rem, 82rem);
  min-height: 4.5rem;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: .7rem;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  position: relative;
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  overflow: hidden;
  border-radius: .82rem;
  background: var(--ink);
  box-shadow: 0 8px 18px rgba(20, 35, 59, .16);
}
.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  position: absolute;
  display: block;
  width: 1.15rem;
  height: .28rem;
  border-radius: 99px;
  background: #fff;
  content: "";
  transform: rotate(-35deg);
}
.brand-mark::before { translate: -.12rem -.28rem; opacity: .45; }
.brand-mark::after { translate: .12rem .28rem; background: #5bd4b3; }
.brand-copy { display: grid; gap: .12rem; }
.brand-copy strong { font-size: .98rem; letter-spacing: -.025em; }
.brand-copy small { color: var(--muted); font-size: .59rem; font-weight: 800; letter-spacing: .16em; }
.top-actions { display: flex; align-items: center; gap: .6rem; }
.status-badge {
  display: inline-flex;
  min-height: 2.2rem;
  align-items: center;
  padding: .45rem .8rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .74);
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
}
.status-badge.online { border-color: #bfe8d9; color: #10795e; background: var(--mint-soft); }
.status-badge.offline { border-color: #f0ced5; color: #a13b50; background: var(--danger-soft); }

.eyebrow,
.step-label,
.breadcrumbs,
.stat-label,
.hero-note-label {
  margin: 0;
  color: var(--blue);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .13em;
  line-height: 1.2;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); text-wrap: balance; }
h1 { letter-spacing: -.055em; line-height: 1.01; }
h2 { margin-bottom: .5rem; font-size: clamp(1.28rem, 2vw, 1.62rem); letter-spacing: -.045em; line-height: 1.12; }
h3 { font-size: 1rem; letter-spacing: -.025em; line-height: 1.2; }
p { line-height: 1.55; }
.hint,
.form-hint,
.csv-help,
.card-heading p,
.queue-heading p { color: var(--muted); font-size: .82rem; line-height: 1.55; }

.button {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .68rem 1rem;
  border: 1px solid transparent;
  border-radius: .72rem;
  font-size: .82rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease, color .2s ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0) scale(.985); }
.button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible { outline: 3px solid rgba(44, 100, 232, .25); outline-offset: 2px; }
.button-primary { color: #fff; background: var(--blue); box-shadow: 0 9px 18px rgba(44, 100, 232, .2); }
.button-primary:hover { background: var(--blue-dark); box-shadow: 0 11px 22px rgba(44, 100, 232, .25); }
.button-secondary { color: #fff; background: var(--ink); box-shadow: 0 8px 16px rgba(20, 35, 59, .14); }
.button-secondary:hover { background: #213858; }
.button-soft { border-color: #cfdbec; color: var(--blue-dark); background: var(--blue-soft); }
.button-soft:hover { border-color: #b7c9e8; background: #e5eeff; }
.button-ghost { border-color: var(--line-strong); color: var(--ink-soft); background: rgba(255, 255, 255, .72); }
.button-ghost:hover { border-color: #b9c7d9; color: var(--ink); background: #fff; }
.button-wide { width: 100%; }
.button-small { min-height: 2.4rem; padding: .55rem .78rem; font-size: .74rem; }

.auth-screen,
.app-shell {
  width: min(100% - 2rem, 82rem);
  margin: 0 auto;
}
.auth-screen { padding: 1.25rem 0 4rem; animation: rise-in .55s ease both; }
.auth-layout {
  display: grid;
  min-height: min(42rem, calc(100vh - 6rem));
  grid-template-columns: minmax(0, 1.16fr) minmax(19rem, .72fr);
  gap: 1.2rem;
}
.auth-intro {
  position: relative;
  display: flex;
  min-height: 36rem;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  padding: clamp(1.6rem, 4vw, 3.3rem);
  border: 1px solid rgba(211, 224, 242, .8);
  border-radius: 1.8rem;
  background: #eef4ff;
  box-shadow: var(--shadow-card);
}
.auth-intro > :not(.auth-art) { position: relative; z-index: 1; }
.auth-intro h1 { max-width: 31rem; margin: 1rem 0 1.1rem; font-size: clamp(2.25rem, 5vw, 4.15rem); }
.auth-lead { max-width: 31rem; margin-bottom: 0; color: var(--ink-soft); font-size: 1rem; }
.auth-art { position: absolute; z-index: 0; inset: 0; pointer-events: none; }
.auth-art::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, #eef4ff 0%, #eef4ff 25%, rgba(238, 244, 255, .95) 42%, rgba(238, 244, 255, .2) 66%, rgba(238, 244, 255, 0) 100%);
}
.auth-art::after {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 32%;
  content: "";
  background: linear-gradient(0deg, rgba(238, 244, 255, .4), transparent);
}
.auth-art img { width: 104%; height: 100%; object-fit: cover; object-position: 100% center; opacity: .9; mix-blend-mode: multiply; }
.art-caption {
  position: absolute;
  z-index: 2;
  right: 2rem;
  bottom: 1.7rem;
  display: block;
  padding: .7rem .85rem;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: .8rem;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, .7);
  box-shadow: 0 8px 24px rgba(43, 71, 112, .08);
  font-size: .7rem;
  font-weight: 800;
  line-height: 1.25;
}
.auth-card {
  align-self: center;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.45rem;
  background: rgba(255, 255, 255, .93);
  box-shadow: var(--shadow-float);
  animation: rise-in .62s .08s ease both;
}
.auth-card-head { display: flex; align-items: center; gap: .7rem; }
.auth-card-head h2 { margin: .2rem 0 0; }
.mini-mark { width: 2rem; height: 2rem; border-radius: .65rem; background: var(--blue); box-shadow: 0 6px 12px rgba(44, 100, 232, .22); }
.auth-card > .hint { margin: 1.1rem 0 1.4rem; }
.auth-form { display: grid; gap: .9rem; }
.auth-footnote { display: flex; align-items: center; gap: .4rem; margin: 1.1rem 0 0; color: var(--muted-light); font-size: .7rem; }
.lock-mark { color: var(--mint); font-size: .6rem; }

.field { display: grid; gap: .42rem; min-width: 0; color: var(--ink-soft); font-size: .74rem; font-weight: 800; }
.field > span b { color: var(--blue); }
.field input,
.field textarea,
.field select,
.search-field input,
.filter-field select {
  width: 100%;
  min-height: 2.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  padding: .72rem .8rem;
  color: var(--ink);
  outline: none;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.field textarea { min-height: 5.2rem; resize: vertical; line-height: 1.45; }
.field input::placeholder,
.field textarea::placeholder,
.search-field input::placeholder { color: #a7b2c1; }
.field input:hover,
.field textarea:hover,
.field select:hover { border-color: #bac8da; }
.field input:focus,
.field textarea:focus,
.field select:focus,
.search-field input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(44, 100, 232, .11); }

.app-shell { padding-bottom: 4rem; animation: rise-in .5s ease both; }
.workspace-hero { padding: 1.8rem 0 1.45rem; }
.breadcrumbs { display: flex; align-items: center; gap: .5rem; color: var(--muted); letter-spacing: .04em; }
.breadcrumbs b { color: #b2bdca; font-weight: 500; }
.breadcrumbs strong { color: var(--ink-soft); font-weight: 800; }
.hero-layout { display: grid; align-items: end; grid-template-columns: minmax(0, 1fr) minmax(15rem, .35fr); gap: 1.5rem; margin-top: 1.25rem; }
.hero-copy h1 { max-width: 44rem; margin: .65rem 0 .85rem; font-size: clamp(2.15rem, 5.2vw, 4.4rem); }
.hero-subtitle { max-width: 42rem; margin-bottom: 0; color: var(--ink-soft); font-size: 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.35rem; }
.hero-note { display: grid; min-height: 11rem; align-content: space-between; padding: 1.25rem; border-radius: 1.25rem; color: #fff; background: var(--ink); box-shadow: var(--shadow-float); animation: float-soft 6s ease-in-out infinite; }
.hero-note-label { color: #83aaff; }
.hero-note strong { font-size: 1.1rem; letter-spacing: -.03em; line-height: 1.12; }
.hero-note small { color: #aebbd0; font-size: .7rem; line-height: 1.35; }
.hero-note-line { display: flex; height: 1.35rem; align-items: end; gap: .28rem; }
.hero-note-line i { display: block; width: .24rem; height: 45%; border-radius: 99px; background: #6f9aff; animation: bars 1.8s ease-in-out infinite; }
.hero-note-line i:nth-child(2) { height: 72%; animation-delay: .1s; background: #64d4b6; }
.hero-note-line i:nth-child(3) { height: 55%; animation-delay: .2s; }
.hero-note-line i:nth-child(4) { height: 92%; animation-delay: .3s; background: #64d4b6; }
.hero-note-line i:nth-child(5) { height: 66%; animation-delay: .4s; }

.stats-grid { display: grid; grid-template-columns: 1fr; gap: .7rem; margin-bottom: 1.1rem; }
.stat-card { display: flex; min-width: 0; align-items: center; gap: .72rem; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: rgba(255, 255, 255, .8); box-shadow: var(--shadow-card); }
.stat-card-primary { border-color: #cfddf7; background: #f3f7ff; }
.stat-icon { display: grid; width: 2.3rem; height: 2.3rem; flex: 0 0 auto; place-items: center; border-radius: .75rem; font-weight: 900; }
.stat-icon-blue { color: var(--blue); background: #dfeaff; }
.stat-icon-mint { color: var(--mint); background: #d9f4e9; }
.stat-icon-lilac { color: var(--lilac); background: #ebe5ff; }
.stat-label { display: block; margin-bottom: .23rem; color: var(--muted); font-size: .62rem; letter-spacing: .06em; }
.stat-value { display: block; color: var(--ink); font-size: 1.45rem; letter-spacing: -.05em; line-height: 1; }
.stat-caption { margin-left: auto; color: var(--muted); font-size: .7rem; white-space: nowrap; }

.workspace-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: start; }
.card { min-width: 0; padding: clamp(1.15rem, 2.5vw, 1.65rem); border: 1px solid var(--line); border-radius: var(--radius-card); background: rgba(255, 255, 255, .9); box-shadow: var(--shadow-card); }
.card-heading,
.queue-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.card-heading h2,
.queue-heading h2 { margin-top: .52rem; }
.card-heading p,
.queue-heading p { max-width: 30rem; margin-bottom: 0; }
.step-label { display: flex; align-items: center; gap: .45rem; color: var(--muted); letter-spacing: .1em; }
.step-label span { display: inline-grid; width: 1.35rem; height: 1.35rem; place-items: center; border-radius: .42rem; color: var(--blue); background: var(--blue-soft); font-size: .62rem; letter-spacing: 0; }
.card-badge { padding: .43rem .62rem; border: 1px solid #dce4ef; border-radius: 999px; color: var(--ink-soft); background: #f8fafc; font-size: .63rem; font-weight: 800; white-space: nowrap; }
.card-badge-mint { border-color: #c9ecde; color: #138063; background: var(--mint-soft); }
.form-grid { display: grid; grid-template-columns: 1fr; gap: .8rem; }
.field-wide { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin-top: .1rem; }
.form-hint { font-size: .7rem; }

.bulk-card { background: linear-gradient(180deg, #fff 0%, #fcfdff 100%); }
.dropzone { display: flex; min-height: 5.2rem; align-items: center; gap: .75rem; padding: .8rem; border: 1px dashed #b9c9df; border-radius: 1rem; background: #f7faff; transition: border-color .2s ease, background-color .2s ease, transform .2s ease; }
.dropzone.is-dragging { border-color: var(--blue); background: #edf4ff; transform: scale(1.01); }
.dropzone-icon { display: grid; width: 2.5rem; height: 2.5rem; flex: 0 0 auto; place-items: center; border-radius: .8rem; color: var(--blue); background: #dfebff; font-size: 1.25rem; font-weight: 900; }
.dropzone-copy { display: grid; min-width: 0; flex: 1; gap: .2rem; }
.dropzone-copy strong { color: var(--ink); font-size: .76rem; }
.dropzone-copy span { color: var(--muted); font-size: .68rem; }
.or-divider { display: flex; align-items: center; gap: .65rem; margin: 1rem 0 .75rem; color: var(--muted-light); font-size: .67rem; }
.or-divider::before,
.or-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.import-mode-field { max-width: 18rem; margin-bottom: .75rem; }
.csv-input { min-height: 8.7rem !important; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .72rem !important; line-height: 1.5 !important; }
.import-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .65rem; margin-top: .8rem; }
.import-summary { color: var(--muted); font-size: .68rem; }
.csv-help { margin: .75rem 0 0; font-size: .68rem; }

.leads-card { margin-top: 1rem; }
.queue-heading { align-items: center; }
.queue-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; margin-bottom: .85rem; }
.bulk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 .85rem; padding: .7rem .8rem; border: 1px solid #dbe6f4; border-radius: .85rem; color: var(--muted); background: #f7faff; font-size: .72rem; }
.bulk-actions strong { margin-right: .25rem; color: var(--ink-soft); }
.bulk-actions .button { min-height: 2.2rem; }
.search-field { display: flex; min-width: 12rem; flex: 1; align-items: center; gap: .45rem; padding: 0 .75rem; border: 1px solid var(--line-strong); border-radius: .72rem; background: #fff; }
.search-field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(44, 100, 232, .11); }
.search-field input { min-height: 2.6rem; border: 0; padding-left: 0; box-shadow: none !important; }
.search-glyph { color: var(--muted); font-size: 1.35rem; line-height: 1; transform: translateY(-.07rem); }
.filter-field { display: flex; min-height: 2.6rem; align-items: center; gap: .5rem; padding-left: .7rem; border: 1px solid var(--line); border-radius: .72rem; color: var(--muted); background: #fff; font-size: .69rem; font-weight: 800; }
.filter-field select { min-height: 2.5rem; width: auto; border: 0; padding: .5rem .7rem .5rem 0; color: var(--ink-soft); box-shadow: none !important; font-size: .72rem; font-weight: 800; }
.message { min-height: 1.35rem; margin: 0 0 .35rem; font-size: .76rem; }
.message.info { color: var(--muted); }
.message.success { color: #138063; }
.message.error { color: var(--danger); }
.lead-list { display: grid; gap: 0; }
.empty-state { display: grid; min-height: 10rem; place-items: center; align-content: center; gap: .42rem; padding: 2rem 1rem; border: 1px dashed #d1dce9; border-radius: 1rem; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--ink-soft); font-size: .88rem; }
.empty-state > span:last-child { font-size: .72rem; }
.empty-mark { display: grid; width: 2.5rem; height: 2.5rem; place-items: center; margin-bottom: .2rem; border-radius: .8rem; color: var(--blue); background: var(--blue-soft); font-size: 1.4rem; }
.lead-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; padding: 1.1rem 0; border-top: 1px solid var(--line); animation: rise-in .42s ease both; }
.lead-header { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.lead-title-line { display: flex; min-width: 0; align-items: flex-start; gap: .65rem; }
.lead-select { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; margin-top: .2rem; accent-color: var(--blue); }
.lead-title-wrap { min-width: 0; }
.lead-title-wrap h3 { margin: 0 0 .35rem; overflow-wrap: anywhere; }
.lead-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .42rem; color: var(--muted); font-size: .68rem; }
.meta-chip { padding: .28rem .48rem; border-radius: 999px; color: var(--muted); background: #f3f6fa; }
.score-box { display: flex; flex: 0 0 auto; align-items: center; gap: .55rem; }
.score-ring { position: relative; display: grid; width: 3.05rem; height: 3.05rem; place-items: center; border-radius: 50%; background: conic-gradient(var(--blue) calc(var(--score, 0) * 1%), #e7edf5 0); }
.score-ring::after { position: absolute; inset: .25rem; border-radius: 50%; background: #fff; content: ""; }
.score-ring strong { position: relative; z-index: 1; color: var(--ink); font-size: .7rem; }
.score-copy { display: grid; gap: .15rem; color: var(--muted); font-size: .62rem; text-align: right; }
.score-copy strong { color: var(--ink-soft); font-size: .72rem; }
.lead-fields { display: grid; grid-template-columns: 1fr; gap: .45rem .9rem; margin: 0; }
.lead-field { display: flex; min-width: 0; gap: .45rem; color: var(--ink-soft); font-size: .74rem; overflow-wrap: anywhere; }
.field-caption { min-width: 4.5rem; color: var(--muted); }
.lead-field a { color: var(--blue); text-decoration: none; }
.lead-field a:hover { text-decoration: underline; }
.reasons { margin: .85rem 0 0; color: var(--muted); font-size: .68rem; line-height: 1.45; }
.lead-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem; margin-top: .15rem; }
.state { display: inline-flex; min-height: 1.9rem; align-items: center; padding: .35rem .6rem; border-radius: 999px; color: var(--muted); background: #f3f6fa; font-size: .68rem; font-weight: 800; }
.review-state { margin-right: .35rem; }
.review-unverified { color: #9a6b15; background: #fff6df; }
.review-verified { color: #127d61; background: var(--mint-soft); }
.review-rejected { color: #a64455; background: #fff0f2; }
.state-exported { color: #127d61; background: var(--mint-soft); }
.state-pending { color: #7953cf; background: var(--lilac-soft); }
.state-review { color: #9a6b15; background: #fff6df; }
.pagination { display: flex; align-items: center; justify-content: center; gap: .8rem; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.page-summary { min-width: 8rem; color: var(--muted); font-size: .7rem; text-align: center; }
.refresh-glyph { display: inline-block; font-size: 1.1rem; line-height: .5; transition: transform .5s ease; }
.is-loading .refresh-glyph { transform: rotate(360deg); }

@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float-soft { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes bars { 0%, 100% { transform: scaleY(.75); opacity: .65; } 50% { transform: scaleY(1.08); opacity: 1; } }

@media (min-width: 40rem) {
  .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 64rem) {
  .workspace-grid { grid-template-columns: minmax(0, 1.12fr) minmax(20rem, .88fr); }
  .lead-item { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .lead-item > .lead-footer { grid-column: 1 / -1; }
  .lead-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 52rem) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-intro { min-height: 35rem; }
  .auth-card { max-width: 34rem; width: 100%; margin: 0 auto; }
  .hero-layout { grid-template-columns: 1fr; }
  .hero-note { max-width: 24rem; }
}

@media (max-width: 40rem) {
  .topbar { width: min(100% - 1.25rem, 82rem); min-height: 4rem; }
  .brand { min-width: 0; }
  .brand-copy { min-width: 0; }
  .brand-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .top-actions { min-width: 0; flex-shrink: 1; gap: .3rem; }
  .status-badge { max-width: 7rem; overflow: hidden; padding-inline: .55rem; text-overflow: ellipsis; white-space: nowrap; font-size: .65rem; }
  .top-actions .button-ghost { min-height: 2.35rem; padding-inline: .62rem; font-size: .7rem; }
  .auth-screen,
  .app-shell { width: min(100% - 1.25rem, 82rem); }
  .auth-screen { padding-top: .6rem; }
  .auth-intro { min-height: 34rem; padding: 1.35rem; border-radius: 1.35rem; }
  .auth-intro h1 { font-size: clamp(2rem, 10vw, 3rem); }
  .auth-art { top: auto; height: 16rem; }
  .auth-art::before { background: linear-gradient(180deg, #eef4ff 0%, rgba(238, 244, 255, .1) 52%, rgba(238, 244, 255, 0) 100%); }
  .art-caption { right: 1rem; bottom: .85rem; }
  .auth-card { padding: 1.25rem; border-radius: 1.2rem; }
  .workspace-hero { padding-top: 1rem; }
  .hero-copy h1 { font-size: clamp(2rem, 10vw, 3rem); }
  .hero-actions .button { flex: 1 1 100%; }
  .card { border-radius: 1.05rem; }
  .card-heading,
  .queue-heading { gap: .7rem; }
  .card-badge { display: none; }
  .queue-heading { align-items: flex-start; }
  .queue-heading > .button { flex: 0 0 auto; padding-inline: .72rem; }
  .queue-toolbar { align-items: stretch; flex-direction: column; }
  .filter-field { justify-content: space-between; }
  .filter-field select { flex: 1; }
  .dropzone { align-items: flex-start; flex-wrap: wrap; }
  .dropzone-copy { padding-top: .2rem; }
  .dropzone .button { width: 100%; margin-left: 3.25rem; }
  .import-bottom { align-items: stretch; flex-direction: column; }
  .import-bottom .button { width: 100%; }
  .lead-header { gap: .55rem; }
  .score-box { gap: .35rem; }
  .score-copy { display: none; }
  .lead-footer { align-items: stretch; flex-direction: column; }
  .lead-footer .button { width: 100%; }
  .state { align-self: flex-start; }
}

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