:root {
  color-scheme: light;
  --bg: #f6f7f8;
  --ink: #0d0f1a;
  --muted: #6b7280;
  --panel: #ffffff;
  --line: #d9dee4;
  --green: #20a464;
  --green-soft: #eafbf1;
  --red: #dfe3e8;
  --red-soft: #f2f4f7;
  --blue: #5b2cff;
  --cyan: #8a2be2;
  --violet: #5b2cff;
  --lime: #ff8a00;
  --orange: #ff5722;
  --solid-action: #5b2cff;
  --accent-grad: linear-gradient(135deg, #5b2cff 0%, #8a2be2 48%, #ff5722 100%);
  --accent-soft: #f4efff;
  --linkedin-dark: #313335;
  --linkedin-blue: #0a66c2;
  --linkedin-light: #cacCCE;
  --indeed: #2557a7;
  --indeed-soft: #eef4ff;
  --amber: #a66b16;
  --shadow: 0 18px 42px rgba(22, 31, 43, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #ffffff 0, var(--bg) 260px);
  color: var(--ink);
  font-family: Poppins, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-page="home"] .app-shell,
body[data-page="home"] .legal-page,
body[data-page="app"] .landing-page,
body[data-page="app"] .legal-page,
body[data-page="privacy"] .landing-page,
body[data-page="privacy"] .app-shell,
body[data-page="privacy"] #termsPage,
body[data-page="privacy"] #contactPage,
body[data-page="terms"] .landing-page,
body[data-page="terms"] .app-shell,
body[data-page="terms"] #privacyPage,
body[data-page="terms"] #contactPage,
body[data-page="contact"] .landing-page,
body[data-page="contact"] .app-shell,
body[data-page="contact"] #privacyPage,
body[data-page="contact"] #termsPage {
  display: none;
}

html {
  scroll-behavior: smooth;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  width: min(1440px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 12px 0 44px;
}

.site-nav {
  position: relative;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1440px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 10px 0;
}

.site-nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.site-brand,
.site-link,
.account-button,
.account-dropdown button {
  background: transparent;
  color: var(--ink);
}

.site-brand {
  font-size: 1.12rem;
  font-weight: 950;
}

.site-brand span,
.landing-hero h1 span {
  color: var(--orange);
}

.site-nav-links {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.site-link {
  min-height: 30px;
  border-radius: 0;
  padding: 0;
  color: var(--muted);
  font-weight: 800;
}

.site-link.active {
  background: transparent;
  color: var(--orange);
}

.site-auth {
  display: flex;
  justify-content: flex-end;
}

.google-login,
.bypass-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 900;
  text-decoration: none;
}

.google-login {
  background: var(--solid-action);
  color: white;
}

.bypass-login {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.small-login {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.9rem;
}

.account-menu {
  position: relative;
  z-index: 130;
}

.account-button {
  min-height: 30px;
  border: 0;
  border-radius: 0;
  background: #fff;
  padding: 0;
  color: var(--muted);
  font-weight: 800;
}

.account-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 140;
  width: 230px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 10px;
}

.account-dropdown.open {
  display: grid;
  gap: 8px;
}

.account-dropdown span {
  color: var(--muted);
  font-size: 0.84rem;
  word-break: break-word;
}

.account-dropdown button {
  min-height: 36px;
  border-radius: 8px;
  background: #f1f3f5;
  font-weight: 850;
}

.landing-page {
  width: min(1440px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 0 0 34px;
}

.landing-hero {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  margin: -12px auto 18px;
}

.landing-hero h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 0.95;
}

.landing-kicker {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 2.8rem);
  font-weight: 950;
}

.landing-copy {
  width: min(760px, 100%);
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.auth-error {
  margin: 0;
  color: #b91c1c;
  font-weight: 750;
}

.landing-graphic {
  margin: 0 auto;
  width: min(1240px, 100%);
}

.landing-graphic img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(22, 31, 43, 0.08);
}

.pricing-section {
  width: min(1120px, 100%);
  margin: 28px auto 0;
  scroll-margin-top: 22px;
}

.pricing-intro {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
  margin: 0 auto 18px;
}

.pricing-intro span {
  color: var(--orange);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.pricing-intro h2 {
  margin: 0;
  font-size: clamp(1.7rem, 2.7vw, 2.65rem);
  line-height: 1;
}

.pricing-intro p {
  width: min(780px, 100%);
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.45;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.feature-strip div,
.pricing-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.feature-strip div {
  padding: 14px;
}

.feature-strip strong {
  display: block;
  margin-bottom: 5px;
}

.feature-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.35;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.pricing-card {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.pricing-card.featured {
  border-color: rgba(26, 60, 255, 0.18);
  background:
    linear-gradient(#fff, #fff) padding-box,
    var(--accent-grad) border-box;
  border: 1px solid transparent;
}

.pricing-card span {
  color: var(--orange);
  font-weight: 950;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.pricing-card h3 {
  margin: 4px 0 0;
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1;
}

.pricing-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

.pricing-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pricing-card li {
  position: relative;
  padding-left: 22px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 650;
}

.pricing-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--orange);
  font-weight: 950;
}

.pricing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-width: 170px;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 900;
  padding: 0 18px;
}

.pricing-card.featured .pricing-button {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
}

.landing-footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin: 26px auto 0;
  padding-bottom: 10px;
}

.landing-footer button,
.legal-back {
  min-height: 32px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 8px;
  font-weight: 800;
}

.landing-footer button:hover,
.legal-back:hover {
  color: var(--orange);
}

.legal-page {
  width: min(860px, calc(100vw - 32px));
  margin: 34px auto 60px;
}

.legal-panel {
  padding: 30px;
}

.legal-panel h1 {
  margin: 10px 0 14px;
  font-size: 2rem;
}

.legal-panel h2 {
  margin: 22px 0 8px;
  font-size: 1.08rem;
}

.legal-panel p {
  color: var(--muted);
  line-height: 1.6;
}

.contact-form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 70;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
  padding: 8px 0 10px;
  background: rgba(247, 248, 250, 0.96);
  backdrop-filter: blur(14px);
}

.brand-block {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-block h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  grid-column: 2;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  line-height: 1.08;
}

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(22, 31, 43, 0.05);
}

.tab {
  min-width: 96px;
  padding: 10px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
}

.tab.active {
  background: var(--solid-action);
  color: white;
}

.source-switch {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  width: auto;
  padding-left: 0;
}

.source-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f4f5f7;
  color: var(--muted);
  padding: 0 12px 0 8px;
  font-size: 0.84rem;
  font-weight: 850;
}

.source-button:not(.active) .source-logo {
  background: #c2c8d0;
  color: #fff;
}

.source-button.active {
  border-color: rgba(10, 102, 194, 0.24);
  background: #eef6ff;
  color: var(--linkedin-blue);
}

body[data-source="indeed"] .source-button.active {
  border-color: rgba(37, 87, 167, 0.26);
  background: var(--indeed-soft);
  color: var(--indeed);
}

.source-logo {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 5px;
  color: white;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1;
}

.linkedin-logo {
  background: var(--linkedin-blue);
}

.indeed-logo {
  border-radius: 50%;
  background: var(--indeed);
  font-family: Georgia, serif;
  font-style: italic;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.center-stage,
.jobs-stage {
  display: grid;
  gap: 18px;
  margin: 0 auto;
}

.center-stage {
  width: min(760px, 100%);
}

.search-workbench {
  display: grid;
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
  align-items: start;
  gap: 6px;
  width: 100%;
  margin: 0 auto;
}

.keyword-sidebar {
  position: static;
  width: 100%;
  display: grid;
  gap: 6px;
  min-height: 36px;
  align-self: start;
  z-index: 5;
}

.keyword-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  margin: 0;
  min-height: 30px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.search-panel,
.status-panel,
.review-panel,
.list-panel,
.tech-stack-panel {
  padding: 24px;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.panel-head h2 {
  margin-bottom: 3px;
  font-size: 1.18rem;
}

.panel-head p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.step-dot {
  display: inline-grid;
  min-width: 34px;
  padding: 0 10px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--solid-action);
  color: white;
  font-weight: 850;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfd;
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(109, 43, 217, 0.14);
}

.indeed-only {
  display: none;
}

body[data-source="indeed"] .linkedin-only {
  display: none;
}

body[data-source="indeed"] .indeed-only {
  display: grid;
}

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

.actions,
.decision-row,
.review-meta,
.list-title,
.status-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.actions {
  justify-content: stretch;
  padding-top: 6px;
}

.primary,
.secondary,
.danger,
.success,
.ghost {
  min-height: 46px;
  border-radius: 9px;
  padding: 0 16px;
  font-weight: 800;
}

.actions button {
  flex: 1;
}

.primary {
  background: var(--solid-action);
  color: white;
}

.search-panel .actions .primary {
  background: var(--accent-grad);
}

.secondary,
.ghost {
  background: #edf0f3;
  color: var(--ink);
}

.danger {
  background: #e2e6ec;
  color: var(--ink);
}

.success {
  background: var(--orange);
  color: #fff;
}

.compact {
  min-height: 36px;
  padding: 0 12px;
}

.badge {
  display: inline-flex;
  min-width: 74px;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 850;
}

.badge.idle {
  background: #eef1f4;
  color: var(--muted);
}

.badge.running {
  background: var(--accent-soft);
  color: var(--violet);
}

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

.metrics div {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px;
  background: #fbfcfd;
}

.metrics strong {
  display: block;
  font-size: 1.65rem;
}

.metrics span,
.completion,
.error-list {
  color: var(--muted);
  font-size: 0.9rem;
}

.completion {
  display: none;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.completion.ready {
  display: block;
}

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

.error-list:empty {
  display: none;
}

.error-list li {
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  padding: 9px 11px;
  font-weight: 750;
}

.tutorial-stage {
  display: grid;
  gap: 18px;
  width: min(1120px, 100%);
  margin: -12px auto 0;
}

.tutorial-hero {
  padding: 24px;
}

.tutorial-hero > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
}

.tutorial-hero h2 {
  margin: 0;
  font-size: 1.6rem;
}

.tutorial-hero p {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
}

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

.tutorial-card,
.tutorial-flow {
  padding: 22px;
}

.tutorial-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

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

.tutorial-card-head span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tutorial-card-head h3 {
  margin: 2px 0 0;
  font-size: 1.2rem;
}

.tutorial-card p,
.flow-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.copy-chip {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 850;
}

.copy-chip:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.mini-window,
.mini-system,
.mock-card,
.mock-stats {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfcfd;
  box-shadow: 0 10px 24px rgba(22, 31, 43, 0.05);
}

.mini-window {
  overflow: hidden;
}

.mini-window-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
}

.mini-window-head span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #edf0f3;
  color: var(--ink);
  font-weight: 900;
}

.mini-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px;
}

.filter-mode,
.mock-filter-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
}

.filter-mode label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  cursor: pointer;
}

.filter-mode input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.filter-mode span,
.mock-filter-mode span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  color: var(--muted);
  padding: 0 10px;
  font-size: 0.82rem;
  font-weight: 850;
}

.filter-mode input:checked + span,
.mock-filter-mode .selected {
  background: #fff;
  color: var(--orange);
  box-shadow: 0 2px 8px rgba(22, 31, 43, 0.08);
}

.mock-filter-mode {
  margin: 12px 14px 0;
}

.red-tag,
.mock-card mark {
  border-radius: 999px;
  background: #fee2e2;
  color: #b42318;
  padding: 2px 7px;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.15;
}

.mini-tag-list .red-tag {
  font-size: 0.68rem;
  font-weight: 500;
}

.copy-block {
  max-height: 360px;
  overflow: auto;
  margin: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  white-space: pre-wrap;
  font: 0.9rem/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  padding: 14px;
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;
  margin-top: 18px;
}

.flow-grid-secondary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(760px, 100%);
  gap: 74px;
  margin: 34px auto 0;
}

.flow-step {
  display: grid;
  grid-template-rows: auto auto minmax(44px, auto) 1fr;
  align-content: stretch;
  gap: 10px;
}

.flow-step > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--solid-action);
  color: white;
  font-weight: 900;
}

.flow-step h4 {
  margin: 0;
  font-size: 1rem;
}

.flow-step p {
  font-size: 0.94rem;
  line-height: 1.35;
}

.flow-grid:not(.flow-grid-secondary) .flow-step > p {
  display: -webkit-box;
  min-height: 2.7em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mock-card,
.mock-stats {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 14px;
  font-size: 0.82rem;
}

.mock-search-card,
.mock-job-card,
.mock-cover-card {
  min-height: 242px;
  height: 242px;
}

.mock-job-card,
.mock-cover-card {
  position: relative;
  overflow: hidden;
}

.mock-actions-card {
  min-height: 170px;
}

.mock-job-company,
.mock-source-label {
  color: var(--indeed);
  font-weight: 950;
}

.mock-source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mock-source-row span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 5px 8px;
  font-weight: 850;
}

.mock-source-row b {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #fff;
  font-size: 0.68rem;
  line-height: 1;
}

.mock-job-card h5,
.mock-actions-card h5 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.15;
}

.mock-job-card p,
.mock-actions-card p {
  margin: 0;
  color: var(--muted);
}

.mock-requirements {
  display: grid;
  gap: 6px;
  margin-top: 4px;
  padding-right: 120px;
}

.mock-skill-tags {
  position: absolute;
  top: 58px;
  right: 14px;
  display: grid;
  gap: 3px;
  width: 92px;
}

.mock-skill-tags mark {
  display: block;
  text-align: center;
  padding: 2px 7px;
  font-size: 0.66rem;
  font-weight: 500;
  line-height: 1.15;
}

.mock-job-card ul {
  margin: 0;
  padding-left: 18px;
}

.mock-decision-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

.mock-decision-row button {
  min-height: 42px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.mock-decision-row .mock-no {
  border: 1px solid var(--line);
  background: #8b8d8f;
  color: #fff;
}

.mock-decision-row .mock-yes {
  background: var(--solid-action);
  color: #fff;
}

.mock-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  margin: -4px -4px 2px;
  padding: 0 0 6px;
}

.mock-chat-head button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  padding: 0 9px;
  font-size: 0.72rem;
}

.mock-chat-head span {
  color: var(--muted);
  font-size: 0.72rem;
}

.mock-letter-lines {
  display: grid;
  gap: 6px;
  padding: 8px 0;
}

.mock-letter-lines span {
  height: 8px;
  border-radius: 999px;
  background: #e3defa;
}

.mock-letter-lines span:nth-child(2) {
  width: 88%;
}

.mock-letter-lines span:nth-child(3) {
  width: 72%;
}

.mock-letter-lines span:nth-child(4) {
  width: 55%;
}

.mock-input {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 8px;
  color: var(--muted);
}

.mock-card button,
.mock-stats button {
  min-height: 30px;
  border-radius: 7px;
  background: var(--solid-action);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
}

.mock-buttons,
.mock-actions,
.mock-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mock-list-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

.mock-buttons button:first-child,
.mock-actions button,
.mock-icons span,
.mock-list-actions button,
.mock-stats button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.mock-icons span,
.mock-list-actions button,
.mock-applied-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 11px;
  font-size: 0.74rem;
  font-weight: 900;
}

.mock-icons span {
  border-radius: 6px;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mock-preview-button {
  color: var(--blue) !important;
}

.mock-applied-button {
  background: #ecfdf3 !important;
  color: #2f9e44 !important;
  border-color: #b7e4c7 !important;
}

.mock-chat-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  min-height: 34px;
  padding: 5px 6px 5px 12px;
}

.mock-chat-input span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mock-chat-input b {
  display: grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--solid-action);
  color: #fff;
  font-size: 0.95rem;
  line-height: 1;
}

.mock-preview-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px;
}

.mock-preview-layout .mock-actions-card {
  min-height: 170px;
}

.mock-preview-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(22, 31, 43, 0.08);
}

.mock-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
}

.mock-preview-head div {
  display: grid;
  gap: 2px;
}

.mock-preview-head span {
  color: var(--orange);
  font-weight: 950;
}

.mock-preview-head small {
  color: var(--muted);
}

.mock-preview-head b {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #edf0f3;
  color: var(--ink);
}

.mock-preview-body {
  display: grid;
  gap: 7px;
  padding: 12px;
}

.mock-preview-body h5,
.mock-preview-body p {
  margin: 0;
}

.mock-preview-body p {
  color: var(--muted);
  line-height: 1.4;
}

.mock-stats {
  align-self: start;
}

.mock-stats-head {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  margin: -2px 0 2px;
  padding-bottom: 8px !important;
}

.mock-stats-head div {
  display: grid !important;
  gap: 0;
  border: 0 !important;
  padding: 0 !important;
}

.mock-stats-head span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mock-stats-head strong {
  font-size: 1rem;
}

.mock-stats-head b {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #edf0f3;
  color: var(--ink);
  font-size: 0.86rem;
}

.mock-stats div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

.mock-stats small {
  color: var(--muted);
  font-size: 0.74rem;
}

.excluded-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b42318;
  padding: 0 12px;
  font-weight: 900;
}

.job-link-action.linkedin {
  color: var(--linkedin-blue);
}

.job-link-action.indeed {
  color: var(--indeed);
}

.job-link-action span {
  font-weight: 950;
  font-size: 0.78rem;
}

.jobs-stage {
  width: min(980px, 100%);
}

.jobs-keyword-bar {
  width: min(720px, 100%);
  margin: 0 auto;
}

.keyword-toggle {
  display: inline-flex;
  align-items: center;
  height: 30px;
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 2px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  appearance: none;
  transform: none;
}

.keyword-toggle:active,
.keyword-toggle:focus {
  transform: none;
}

.keyword-toggle:hover {
  color: var(--blue);
  text-decoration: underline;
}

.extension-toggle {
  display: none;
  color: var(--violet);
  text-decoration: underline;
  text-underline-offset: 3px;
}

body[data-source="indeed"] .extension-toggle {
  display: inline-flex;
}

.extension-toggle.active {
  color: var(--violet);
}

.keyword-panel {
  display: none;
  position: fixed;
  top: 156px;
  right: 18px;
  z-index: 120;
  bottom: 22px;
  flex-direction: column;
  width: min(420px, max(300px, calc((100vw - 720px) / 2 - 38px)));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 68px rgba(22, 31, 43, 0.16);
  padding: 14px;
}

.keyword-panel.open {
  display: flex;
}

.keyword-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.keyword-panel-head h2 {
  margin-bottom: 4px;
  font-size: 1.15rem;
}

.keyword-panel-head p,
.keyword-panel-actions span {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.keyword-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #edf0f3;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 800;
}

#requirementsKeywords,
#eliminateKeywords {
  flex: 1;
  min-height: 0;
  resize: vertical;
  line-height: 1.42;
  overflow: auto;
}

.keyword-panel-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.review-panel {
  width: min(720px, 100%);
  margin: 0 auto;
}

.review-meta {
  justify-content: space-between;
  color: var(--muted);
  margin-bottom: 14px;
}

.review-actions {
  display: flex;
  justify-content: flex-end;
}

.preview-toggle {
  min-height: 34px;
  border-radius: 0;
  background: transparent;
  color: #8f98a3;
  padding: 0 4px;
  font-size: 0.88rem;
  font-weight: 500;
}

.preview-toggle:hover,
.preview-toggle.active {
  background: transparent;
  color: var(--ink);
  text-decoration: underline;
}

.job-card {
  min-height: 390px;
  max-height: min(56vh, 560px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  background: #fbfcfd;
}

.job-card.empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.job-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
}

.eliminate-matches {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 240px;
}

.eliminate-matches span {
  border: 1px solid rgba(185, 28, 28, 0.2);
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.2;
}

.job-company {
  color: var(--blue);
  font-weight: 850;
}

.job-title {
  margin: 8px 0 6px;
  font-size: 1.45rem;
  line-height: 1.18;
}

.job-location {
  color: var(--muted);
  font-size: 0.95rem;
}

.requirements {
  margin-top: 16px;
  line-height: 1.48;
  font-size: 1rem;
}

.requirements h3 {
  margin: 18px 0 10px;
  font-size: 1.12rem;
  line-height: 1.2;
}

.requirements h3:first-child {
  margin-top: 0;
}

.requirements ul {
  margin: 0 0 12px 20px;
  padding: 0;
}

.requirements li {
  margin: 9px 0;
  padding-left: 4px;
}

.requirements p {
  color: var(--muted);
}

.job-link {
  display: inline-flex;
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.source-link {
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 2px;
}

.linkedin-link {
  color: var(--blue);
}

.indeed-link,
body[data-source="indeed"] .indeed-link {
  color: #c25a00;
}

.job-actions,
.list-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.list-actions {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  justify-content: start;
}

.job-preview-panel {
  position: fixed;
  top: 156px;
  right: 18px;
  bottom: 22px;
  z-index: 118;
  display: none;
  width: min(420px, max(300px, calc((100vw - 720px) / 2 - 38px)));
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 68px rgba(22, 31, 43, 0.18);
  padding: 16px;
}

.job-preview-panel.open {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.job-preview-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.job-preview-head h2 {
  margin: 5px 0 4px;
  font-size: 1.08rem;
  line-height: 1.22;
}

.job-preview-head p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.preview-description {
  min-width: 0;
  overflow: auto;
  border-radius: 9px;
  background: #fbfcfd;
  color: var(--ink);
  padding: 14px;
  line-height: 1.5;
}

.preview-description h3 {
  margin: 14px 0 8px;
  font-size: 0.98rem;
}

.preview-description h3:first-child {
  margin-top: 0;
}

.preview-description p {
  margin: 0 0 12px;
}

.preview-description ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.preview-description li + li {
  margin-top: 5px;
}

.list-actions {
  margin-top: 8px;
}

.cover-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-size: 0.88rem;
  font-weight: 850;
}

.cover-button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.cover-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.cover-button.small {
  min-height: 28px;
  padding: 0 10px;
  font-size: 0.8rem;
}

.preview-button {
  min-height: 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #8f98a3;
  padding: 0 2px;
  font-size: 0.8rem;
  font-weight: 500;
}

.preview-button:hover,
.preview-button.active {
  background: transparent;
  color: var(--ink);
  text-decoration: underline;
}

.applied-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  grid-column: 4;
  justify-self: end;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfcfd;
  color: #a0a9b3;
  padding: 0 10px;
  font-size: 0.8rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.applied-toggle span:first-child {
  color: #b6bec7;
  font-weight: 950;
}

.applied-toggle.active {
  border-color: rgba(22, 163, 74, 0.3);
  background: #ecfdf3;
  color: #15803d;
}

.applied-toggle.active span:first-child {
  color: #16a34a;
}

.saved-preview-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 33vw;
  z-index: 90;
  display: none;
  background: rgba(246, 247, 248, 0.72);
  backdrop-filter: blur(2px);
  padding: 22px 22px 22px 0;
}

.saved-preview-panel.open {
  display: grid;
}

.saved-preview-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 26px 72px rgba(22, 31, 43, 0.18);
}

.saved-preview-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #eef1f4;
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.saved-preview-close:hover {
  background: #e2e6eb;
}

.saved-preview-head {
  border-bottom: 1px solid var(--line);
  padding: 22px 64px 16px 22px;
}

.saved-preview-head h2 {
  margin: 5px 0 5px;
  font-size: 1.35rem;
  line-height: 1.18;
}

.saved-preview-head p {
  margin-bottom: 10px;
  color: var(--muted);
}

.saved-preview-head a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.saved-preview-head a.hidden {
  display: none;
}

.saved-preview-description {
  min-width: 0;
  overflow: auto;
  padding: 22px;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.55;
}

.saved-preview-description h3 {
  margin: 22px 0 9px;
  font-size: 1.05rem;
  line-height: 1.25;
}

.saved-preview-description h3:first-child {
  margin-top: 0;
}

.saved-preview-description p {
  margin: 0 0 14px;
}

.saved-preview-description ul {
  margin: 0 0 15px;
  padding-left: 22px;
}

.saved-preview-description li + li {
  margin-top: 6px;
}

.decision-row {
  justify-content: stretch;
  margin-top: 12px;
}

.decision-row button {
  flex: 1;
  min-height: 54px;
  font-size: 1.08rem;
}

.lists-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 6px;
}

.list-title {
  display: grid;
  grid-template-columns: auto 1fr auto;
  justify-content: initial;
  margin-bottom: 12px;
}

.list-title h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
  text-align: left;
}

.list-title span {
  display: inline-grid;
  min-width: 34px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #edf0f3;
  font-weight: 850;
}

.reset-list {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  font-size: 0.82rem;
  font-weight: 800;
}

.reset-list:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.job-list {
  display: grid;
  gap: 10px;
  max-height: 640px;
  overflow: auto;
  padding-right: 4px;
}

.list-item {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  background: #fbfcfd;
}

.list-item strong {
  display: block;
  margin-bottom: 4px;
}

.list-item span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.list-item a {
  color: var(--blue);
  font-weight: 750;
  text-decoration: none;
}

.record-panel,
.extension-panel {
  position: fixed;
  top: 156px;
  right: 18px;
  z-index: 119;
  display: none;
  width: min(340px, calc(100vw - 36px));
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 68px rgba(22, 31, 43, 0.18);
  padding: 16px;
}

.record-panel.open,
.extension-panel.open {
  display: grid;
  gap: 16px;
}

.record-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.record-head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.record-head h2 {
  margin: 3px 0 0;
  font-size: 1.08rem;
}

.record-stats {
  display: grid;
  gap: 8px;
}

.record-stats > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #eef1f4;
  padding-bottom: 8px;
}

.record-stats span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.record-stats strong {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  color: var(--ink);
  font-size: 1.05rem;
}

.record-stats small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.record-controls {
  display: grid;
  gap: 6px;
}

.record-reset {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
}

.record-reset:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.record-reset.danger:hover {
  border-color: #b91c1c;
  color: #b91c1c;
}

.record-controls p,
.record-status {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.extension-content {
  display: grid;
  gap: 10px;
}

.extension-content p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.extension-download {
  color: var(--violet);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.chat-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  height: calc(100vh - 148px);
  min-height: 540px;
  margin: 0 0 19px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.chat-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100%;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: #f7f8fa;
  padding: 12px;
}

.new-chat {
  width: 100%;
  min-height: 42px;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 0 12px;
  font-weight: 500;
}

.new-chat {
  margin-bottom: 14px;
  background: #fff;
  border: 1px solid #e6e9ee;
}

.chat-list {
  display: grid;
  gap: 2px;
}

.chat-item.active,
.chat-item:hover {
  background: #eceef2;
}

body[data-source="indeed"] .chat-item.active,
body[data-source="indeed"] .chat-item:hover {
  background: #eceef2;
}

.chat-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  min-height: 40px;
  border-radius: 8px;
  padding: 0 6px 0 12px;
  cursor: pointer;
}

.chat-open {
  position: absolute;
  inset: 0;
  border-radius: 9px;
  background: transparent;
}

.chat-title-input {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 400;
  cursor: pointer;
  user-select: none;
  outline: none;
}

.chat-title-input:focus:not(.editing) {
  background: transparent;
  box-shadow: none;
}

.chat-title-input.editing {
  cursor: text;
  user-select: text;
}

.chat-title-input.editing:focus {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(22, 31, 43, 0.1);
}

.chat-menu-button {
  position: relative;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  line-height: 1;
}

.chat-menu-button:hover {
  background: #f4f5f7;
  color: var(--ink);
}

.chat-menu {
  position: absolute;
  right: 6px;
  top: 34px;
  z-index: 5;
  display: none;
  min-width: 116px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(22, 31, 43, 0.14);
  padding: 6px;
}

.chat-menu.open {
  display: block;
}

.chat-menu button {
  width: 100%;
  min-height: 34px;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 0 9px;
  font-weight: 800;
}

.chat-menu button:hover {
  background: #f1f3f5;
  color: var(--blue);
}

.chat-main {
  display: grid;
  position: relative;
  z-index: 40;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
  background: #fff;
}

.chat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.94);
}

.system-toggle {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  padding: 0 12px;
  font-weight: 500;
}

.system-toggle:hover {
  border-color: var(--blue);
  background: #f2f8ff;
}

.system-status {
  color: var(--muted);
  font-size: 0.84rem;
}

.system-popover {
  position: absolute;
  top: 10px;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 260;
  display: none;
}

.system-popover.open {
  display: grid;
}

.system-popover-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  max-width: none;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(22, 31, 43, 0.28);
  padding: 16px;
}

.system-popover-card label {
  grid-column: 1;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.system-save {
  grid-column: 2;
  min-height: 28px;
  border-radius: 7px;
  background: transparent;
  color: var(--blue);
  padding: 0 8px;
  font-size: 0.86rem;
  font-weight: 600;
}

.system-save:hover {
  background: #f2f5f8;
}

.system-popover-card textarea {
  grid-column: 1 / -1;
  height: 100%;
  min-height: 0;
  max-height: none;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfd;
  color: var(--ink);
  padding: 12px 14px;
  font: inherit;
  outline: none;
}

textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.12);
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: auto;
  padding: 28px min(7vw, 96px);
}

.chat-scroll-bottom {
  position: absolute;
  left: 50%;
  bottom: 94px;
  z-index: 55;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(22, 31, 43, 0.14);
  font-size: 1.35rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.chat-scroll-bottom.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.chat-scroll-bottom:hover {
  color: #fff;
  background: var(--solid-action);
}

.empty-chat {
  margin: auto;
  color: var(--ink);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.message {
  max-width: min(860px, 100%);
  line-height: 1.55;
}

.message.user {
  align-self: flex-end;
}

.message.assistant {
  align-self: flex-start;
}

.message-body {
  border-radius: 18px;
  padding: 12px 15px;
  background: #f1f3f5;
}

.message.user .message-body {
  background: var(--blue);
  color: #fff;
}

.message.pending .message-body {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
}

.writing-mark {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  margin-left: 12px;
  animation: writingDot 1.35s ease-in-out infinite;
}

.writing-mark::before,
.writing-mark::after {
  content: "";
  position: absolute;
  top: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  animation: writingDot 1.35s ease-in-out infinite;
}

.writing-mark::before {
  left: -12px;
  background: var(--violet);
  animation-delay: -0.18s;
}

.writing-mark::after {
  left: 12px;
  background: var(--orange);
  animation-delay: 0.18s;
}

@keyframes writingDot {
  0%,
  100% {
    transform: translateY(2px) scale(0.82);
    opacity: 0.55;
  }

  50% {
    transform: translateY(-3px) scale(1.08);
    opacity: 1;
  }
}

.writing-ellipsis {
  display: inline-block;
  min-width: 0.7em;
  animation: ellipsisBlink 1.35s ease-in-out infinite;
}

@keyframes ellipsisBlink {
  0%,
  100% {
    opacity: 0.35;
  }

  50% {
    opacity: 1;
  }
}

.message-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-left: 4px;
}

.message-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.message-action:hover,
.message-action.copied {
  background: #f1f3f5;
  color: var(--ink);
}

.message-action svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chatgpt-action {
  width: 30px;
  min-width: 30px;
  padding: 0;
  color: #68717b;
}

.chatgpt-action:disabled {
  opacity: 0.55;
  cursor: wait;
}

.chatgpt-status {
  align-self: center;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 500;
}

.chatgpt-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: end;
  gap: 10px;
  width: min(1040px, calc(100% - 44px));
  margin: 0 auto 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(22, 31, 43, 0.08);
}

.chat-composer textarea {
  min-height: 40px;
  max-height: calc(1.45em * 9 + 22px);
  line-height: 1.45;
  border: 0;
  background: transparent;
  resize: none;
  box-shadow: none;
  overflow-y: auto;
  padding: 8px 4px;
}

.chat-composer button {
  align-self: end;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 850;
}

.api-status {
  min-height: 24px;
  margin: 4px 0 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.tech-stack-panel {
  margin-top: 18px;
}

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

.tech-stack-grid h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.tech-stack-grid ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.tech-stack-grid li + li {
  margin-top: 7px;
}

.key-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
}

.key-toggle {
  min-height: 48px;
  border-radius: 9px;
  background: var(--blue);
  color: white;
  font-weight: 850;
}

.key-row input:disabled {
  color: var(--muted);
  background: #f1f4f7;
  -webkit-text-security: none;
}

@media (max-width: 920px) {
  .topbar,
  .center-stage,
  .search-workbench,
  .jobs-stage,
  .lists-grid,
  .tutorial-grid,
  .flow-grid,
  .feature-strip,
  .pricing-grid,
  .chat-shell {
    grid-template-columns: 1fr;
  }

  .keyword-sidebar {
    position: static;
    width: 100%;
  }

  .keyword-buttons {
    width: min(760px, 100%);
    margin: 0 auto;
  }

  .jobs-stage {
    width: min(980px, 100%);
  }

  .jobs-keyword-bar {
    width: min(720px, 100%);
    margin: -14px auto 0;
  }

  .jobs-keyword-bar .keyword-buttons {
    display: flex;
    gap: 12px;
  }

  .keyword-panel {
    top: 72px;
    left: 10px;
    height: min(560px, calc(100vh - 92px));
    width: calc(100vw - 20px);
  }

  .job-preview-panel {
    top: 72px;
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
  }

  .saved-preview-panel {
    left: 10px;
    padding: 10px;
  }

  .record-panel {
    top: 72px;
    right: 10px;
    width: calc(100vw - 20px);
  }

  .chat-sidebar {
    position: static;
    height: auto;
    max-height: 220px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .chat-main,
  .chat-shell {
    height: auto;
    min-height: 680px;
  }

  .system-popover {
    top: 58px;
    left: 10px;
    right: 10px;
  }

  .system-popover-card {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: static;
    display: grid;
    align-items: start;
  }

  .mock-preview-layout {
    grid-template-columns: 1fr;
  }

  .header-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    width: 100%;
  }

  .source-switch {
    padding-left: 0;
  }

}

@media (max-width: 560px) {
  .shell {
    width: min(100vw - 20px, 1180px);
    padding-top: 18px;
  }

  .tabs,
  .tab,
  .actions,
  .decision-row {
    width: 100%;
  }

  .source-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .source-button {
    justify-content: center;
  }

  .field-grid,
  .metrics,
  .tutorial-hero > div {
    grid-template-columns: 1fr;
  }

  .tutorial-hero p {
    grid-column: 1;
  }
}
