:root {
  --ink: #172019;
  --muted: #687169;
  --paper: #f5f1e8;
  --surface: #fffdf7;
  --surface-2: #ece8df;
  --line: #d8d3c8;
  --green: #315f49;
  --green-dark: #234737;
  --lime: #c8e85c;
  --lime-soft: #eaf5b7;
  --orange: #d46d3e;
  --shadow: 0 22px 60px rgba(31, 43, 34, 0.09);
  --radius: 22px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 76% 3%, rgba(200, 232, 92, 0.17), transparent 24rem),
    var(--paper);
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

.hidden {
  display: none !important;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.topbar {
  width: min(1180px, calc(100% - 48px));
  height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(23, 32, 25, 0.14);
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: var(--green);
  border-radius: 9px 9px 9px 2px;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 20px;
}

.provider-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.55);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.guard-toggle {
  padding: 9px 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #8db49b;
  border-radius: 999px;
  color: var(--green);
  background: var(--lime-soft);
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.guard-toggle > span:first-child {
  color: #48a26d;
  font-size: 8px;
}

.guard-toggle.off {
  color: #934f2e;
  border-color: #e3ac90;
  background: #fff0e8;
}

.guard-toggle.off > span:first-child {
  color: var(--orange);
}

.chat-status.off {
  color: #934f2e;
  border-color: #e3ac90;
  background: #fff0e8;
}

.chat-status.off > span:first-child {
  background: var(--orange);
}

.editor-link {
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--surface);
  background: var(--green);
  text-decoration: none;
  font-size: 11px;
  font-weight: 750;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.editor-link:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b5aaa0;
  box-shadow: 0 0 0 4px rgba(181, 170, 160, 0.14);
}

.provider-pill.ready .status-dot {
  background: #48a26d;
  box-shadow: 0 0 0 4px rgba(72, 162, 109, 0.14);
}

.provider-pill.warning .status-dot {
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(212, 109, 62, 0.14);
}

main {
  width: min(1060px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  padding: 112px 0 88px;
  text-align: center;
}

.eyebrow,
.section-number,
.kicker {
  margin: 0 0 16px;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 820px;
  margin: 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(52px, 8vw, 96px);
  line-height: 0.94;
  letter-spacing: -0.055em;
  font-weight: 500;
}

.hero h1 em {
  color: var(--green);
  font-weight: 500;
}

.hero-copy {
  max-width: 580px;
  margin: 32px auto 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.stepper {
  display: flex;
  align-items: center;
  margin-bottom: 34px;
}

.step {
  min-width: 175px;
  padding: 0;
  display: grid;
  grid-template-columns: 26px 1fr;
  column-gap: 8px;
  align-items: center;
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.step > span {
  grid-row: 1 / 3;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.step strong {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.step small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.step.active > span {
  color: var(--surface);
  border-color: var(--green);
  background: var(--green);
}

.step-line {
  height: 1px;
  flex: 1;
  margin: 0 20px;
  background: var(--line);
}

.workspace {
  margin-bottom: 26px;
  padding: 46px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 253, 247, 0.74);
  box-shadow: var(--shadow);
}

.muted-section {
  background: rgba(236, 232, 223, 0.6);
  box-shadow: none;
}

.section-heading {
  margin-bottom: 30px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 500;
}

.section-number {
  margin-bottom: 12px;
}

.section-aside {
  max-width: 245px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.text-button {
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.upload-card,
.job-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.dropzone {
  min-height: 230px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed #9ea79d;
  border-radius: 16px;
  background: #f8f6ef;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.dropzone:hover,
.dropzone.dragging {
  border-color: var(--green);
  background: #f2f5e8;
  transform: translateY(-2px);
}

.dropzone input,
.subtle-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: var(--lime-soft);
}

.upload-icon svg,
.primary-button svg,
.subtle-upload svg,
.url-field svg,
.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dropzone strong {
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 500;
}

.dropzone > span:last-child {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.field {
  margin-top: 24px;
}

.field-label {
  margin-bottom: 9px;
  display: flex;
  justify-content: space-between;
}

.field-label label,
.job-input-pane label {
  font-size: 12px;
  font-weight: 750;
}

.field-label span {
  color: var(--muted);
  font-size: 11px;
}

textarea,
.url-field {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfaf5;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

textarea {
  padding: 15px 16px;
  color: var(--ink);
  resize: vertical;
  line-height: 1.55;
}

textarea:focus,
.url-field:focus-within {
  outline: 0;
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(49, 95, 73, 0.09);
}

textarea::placeholder,
input::placeholder {
  color: #a09e95;
}

.subtle-upload {
  width: max-content;
  margin: 16px 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.subtle-upload svg {
  width: 15px;
  height: 15px;
}

.subtle-upload span {
  color: var(--muted);
  font-weight: 500;
}

.primary-button,
.secondary-button,
.icon-button {
  border: 0;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.primary-button {
  min-height: 54px;
  padding: 0 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 12px;
  color: white;
  background: var(--green);
  font-size: 13px;
  font-weight: 750;
}

.upload-card > .primary-button {
  width: 100%;
}

.primary-button:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.primary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.primary-button.compact {
  min-height: 48px;
}

.privacy-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.profile-dashboard {
  display: grid;
  gap: 18px;
}

.identity-card,
.content-card,
.evidence-drawer,
.target-banner {
  border: 1px solid var(--line);
  background: var(--surface);
}

.identity-card {
  padding: 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  border-radius: var(--radius);
}

.identity-monogram {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: var(--paper);
  background: var(--green);
  font-family: Georgia, serif;
  font-size: 24px;
}

.identity-card h3 {
  margin: 0 0 6px;
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 500;
}

.identity-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.identity-card .kicker {
  margin-bottom: 6px;
  color: var(--green);
  font-size: 9px;
}

.verified-badge,
.audit-seal {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.verified-badge svg,
.audit-seal svg {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  fill: var(--lime-soft);
  stroke: var(--green);
  stroke-width: 2;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.metric-card {
  padding: 22px;
  border-radius: 16px;
  background: var(--surface-2);
}

.metric-card.accent {
  background: var(--lime-soft);
}

.metric-value {
  display: block;
  margin-bottom: 5px;
  font-family: Georgia, serif;
  font-size: 34px;
  line-height: 1;
}

.metric-card > span:last-child {
  color: var(--muted);
  font-size: 11px;
}

.profile-columns,
.insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.content-card {
  padding: 23px;
  border-radius: 16px;
}

.card-header {
  margin-bottom: 17px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.card-header h3 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 500;
}

.card-header span {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 11px;
  line-height: 1.35;
}

.skill-chips .chip {
  color: var(--green);
  background: #edf1e8;
  font-weight: 650;
}

.evidence-drawer {
  border-radius: 16px;
}

.evidence-drawer summary {
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  list-style: none;
}

.evidence-drawer summary::-webkit-details-marker {
  display: none;
}

.evidence-drawer summary span:last-child {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.ledger {
  max-height: 420px;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.ledger-row {
  padding: 16px 22px;
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.ledger-row:last-child {
  border-bottom: 0;
}

.fact-id {
  width: max-content;
  height: max-content;
  padding: 4px 6px;
  border-radius: 5px;
  color: var(--green);
  background: var(--lime-soft);
  font-size: 9px;
  font-weight: 800;
}

.ledger-row p {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.45;
}

.ledger-row small {
  color: var(--muted);
  font-size: 10px;
}

.mode-switch {
  width: max-content;
  margin-bottom: 26px;
  padding: 4px;
  display: flex;
  border-radius: 10px;
  background: var(--surface-2);
}

.mode {
  padding: 9px 15px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.mode.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 2px 7px rgba(23, 32, 25, 0.08);
}

.job-input-pane label {
  display: block;
  margin-bottom: 9px;
}

.url-field {
  height: 58px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.url-field svg {
  width: 18px;
  color: var(--muted);
}

.url-field input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
}

.character-count {
  margin-top: 6px;
  display: block;
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

.tailoring-strength {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.strength-heading {
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.strength-heading label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 750;
}

.strength-heading p,
.truth-note {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.strength-heading output {
  min-width: 42px;
  padding: 7px 9px;
  border-radius: 9px;
  color: var(--surface);
  background: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.tailoring-strength input[type="range"] {
  width: 100%;
  accent-color: var(--green);
  cursor: pointer;
}

.strength-labels {
  margin-top: 3px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

.truth-note {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.tailoring-config {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.tailoring-config > div > strong,
.tailoring-config > div > span {
  display: block;
}

.tailoring-config > div > strong {
  margin-bottom: 4px;
  font-size: 12px;
}

.tailoring-config > div > span,
.tailoring-config > p {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.config-toggle {
  width: 100%;
  margin-top: 13px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--surface-2);
  text-align: left;
  cursor: pointer;
}

.config-toggle.active {
  border-color: var(--orange);
  background: #fff4ed;
}

.config-toggle:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.config-toggle-icon {
  width: 34px;
  height: 20px;
  padding: 2px;
  flex: 0 0 auto;
  border-radius: 99px;
  background: #b4b8b4;
  transition: background 160ms ease;
}

.config-toggle-icon::after {
  width: 16px;
  height: 16px;
  display: block;
  border-radius: 50%;
  content: "";
  background: white;
  box-shadow: 0 1px 3px rgba(23, 32, 25, 0.25);
  transition: transform 160ms ease;
}

.config-toggle.active .config-toggle-icon {
  background: var(--orange);
}

.config-toggle.active .config-toggle-icon::after {
  transform: translateX(14px);
}

.config-toggle strong,
.config-toggle small {
  display: block;
}

.config-toggle strong {
  margin-bottom: 3px;
  font-size: 10px;
}

.config-toggle small {
  color: var(--muted);
  font-size: 9px;
}

.tailoring-config > p {
  margin: 11px 0 0;
}

.job-action {
  margin-top: 24px;
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
}

.job-action strong,
.job-action span {
  display: block;
}

.job-action strong {
  margin-bottom: 4px;
  font-size: 12px;
}

.job-action span {
  color: var(--muted);
  font-size: 10px;
}

.results-heading {
  align-items: center;
}

.download-menu {
  display: flex;
  gap: 8px;
}

.secondary-button,
.icon-button {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface);
  font-size: 11px;
  font-weight: 750;
}

.secondary-button {
  padding: 0 16px;
  gap: 7px;
  cursor: pointer;
}

.secondary-button svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button {
  width: 43px;
}

.secondary-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  border-color: var(--green);
}

.secondary-button:disabled {
  opacity: 0.5;
  cursor: wait;
  transform: none;
}

.target-banner {
  margin-bottom: 16px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 16px;
}

.target-banner p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.target-banner h3 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 500;
}

.result-layout {
  display: grid;
  grid-template-columns: 245px 1fr;
  gap: 15px;
}

.match-panel {
  padding: 24px;
  border-radius: 16px;
  color: #f5f1e8;
  background: var(--green-dark);
}

.match-panel .kicker {
  color: var(--lime);
}

.match-stat {
  padding: 17px 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.match-stat strong {
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 500;
}

.match-stat span {
  color: rgba(255, 255, 255, 0.63);
  font-size: 10px;
}

.match-group {
  margin-top: 22px;
}

.match-group h4 {
  margin: 0 0 10px;
  color: var(--lime);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.match-group ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
  list-style: none;
}

.match-group li {
  position: relative;
  padding-left: 14px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  line-height: 1.45;
}

.match-group li::before {
  position: absolute;
  left: 0;
  content: "✓";
  color: var(--lime);
}

.gap-group h4 {
  color: #f0b18f;
}

.gap-group li::before {
  content: "·";
  color: #f0b18f;
}

.resume-preview {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #e8e4dc;
}

.resume-toolbar {
  padding: 12px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.resume-toolbar > span {
  color: var(--muted);
  font-size: 9px;
}

.preview-tabs {
  display: flex;
  gap: 4px;
}

.preview-tab {
  padding: 7px 9px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.preview-tab.active {
  color: var(--ink);
  background: var(--surface-2);
}

.resume-paper {
  width: calc(100% - 44px);
  max-width: 610px;
  min-height: 730px;
  margin: 22px auto;
  padding: clamp(30px, 6vw, 56px);
  background: white;
  box-shadow: 0 8px 22px rgba(23, 32, 25, 0.1);
}

.resume-paper h1 {
  margin: 0 0 5px;
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 500;
}

.resume-headline {
  color: var(--green);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.resume-contact {
  margin-top: 7px;
  color: var(--muted);
  font-size: 8px;
}

.resume-paper h2 {
  margin: 25px 0 9px;
  padding-bottom: 5px;
  border-bottom: 1px solid #b7b7b7;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.resume-paper ul {
  margin: 0;
  padding-left: 14px;
}

.resume-paper li {
  margin-bottom: 6px;
  color: #303630;
  font-family: Georgia, serif;
  font-size: 9px;
  line-height: 1.55;
}

.evidence-tags {
  margin: 4px 0 8px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.evidence-tags span {
  padding: 3px 5px;
  border-radius: 4px;
  color: var(--green);
  background: var(--lime-soft);
  font-family: Inter, sans-serif;
  font-size: 7px;
  font-weight: 800;
}

.revision-chat {
  margin-top: 15px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.chat-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.chat-heading .kicker {
  margin-bottom: 7px;
}

.chat-heading h3 {
  margin: 0 0 7px;
  font-family: Georgia, serif;
  font-size: 19px;
  font-weight: 500;
}

.chat-heading p:not(.kicker) {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.chat-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  color: var(--green);
  font-size: 9px;
  font-weight: 750;
}

.chat-status > span:first-child {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px var(--lime-soft);
}

.chat-suggestions {
  margin: 18px 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chat-suggestions button {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 9px;
  cursor: pointer;
}

.chat-suggestions button:hover {
  color: var(--green);
  border-color: var(--green);
}

.chat-messages {
  max-height: 340px;
  padding: 16px;
  display: grid;
  gap: 12px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
}

.chat-message {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(23, 32, 25, 0.05);
}

.chat-message.user {
  margin-left: auto;
  color: #fff;
  background: var(--green);
}

.chat-message > span {
  display: block;
  margin-bottom: 4px;
  color: var(--green);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.chat-message.user > span {
  color: var(--lime);
}

.chat-message p {
  margin: 0;
  font-size: 10px;
  line-height: 1.55;
}

.chat-message.thinking {
  color: var(--muted);
}

.chat-message.error {
  color: #8a2f2f;
  background: #fff0ed;
}

.chat-composer {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.chat-composer textarea {
  width: 100%;
  min-height: 68px;
  padding: 0;
  resize: vertical;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 11px;
  line-height: 1.5;
}

.chat-composer > div {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.chat-composer > div > span {
  color: var(--muted);
  font-size: 8px;
}

.insight-grid {
  margin-top: 15px;
}

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

.insight-list li {
  padding-left: 17px;
  position: relative;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.insight-list li::before {
  position: absolute;
  left: 0;
  content: "↗";
  color: var(--green);
  font-weight: 800;
}

.insight-list.questions li::before {
  content: "?";
}

footer {
  width: min(1060px, calc(100% - 48px));
  margin: 56px auto 0;
  padding: 28px 0 44px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  max-width: 380px;
  padding: 14px 18px;
  border-radius: 10px;
  color: white;
  background: var(--ink);
  box-shadow: var(--shadow);
  font-size: 12px;
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: #8f3f2d;
}

.processing {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(23, 32, 25, 0.72);
  backdrop-filter: blur(10px);
}

.processing-card {
  width: min(470px, 100%);
  padding: 44px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.orbit {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 50%;
  animation: spin 2.4s linear infinite;
}

.orbit span {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--lime);
}

.orbit span:first-child {
  top: -6px;
  left: 26px;
}

.orbit span:last-child {
  right: -6px;
  bottom: 15px;
  width: 8px;
  height: 8px;
  background: var(--green);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.processing-card h2 {
  margin: 0 0 10px;
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 500;
}

.processing-card > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.progress-track {
  height: 4px;
  margin: 28px 0 20px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-2);
}

.progress-track span {
  width: 10%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--green);
  transition: width 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.processing-steps {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

.processing-steps span.active {
  color: var(--green);
  font-weight: 800;
}

@media (max-width: 760px) {
  .topbar,
  main,
  footer {
    width: min(100% - 28px, 1060px);
  }

  .hero {
    padding: 76px 0 60px;
  }

  .hero h1 {
    font-size: clamp(46px, 15vw, 70px);
  }

  .provider-pill {
    display: none;
  }

  .guard-toggle {
    padding: 9px;
  }

  .guard-toggle span:last-child {
    display: none;
  }

  .step {
    min-width: 0;
    display: flex;
    flex-direction: column;
    text-align: center;
  }

  .step strong {
    margin-top: 7px;
  }

  .step small {
    display: none;
  }

  .step-line {
    margin: 0 8px 25px;
  }

  .workspace {
    padding: 24px 18px;
    border-radius: 20px;
  }

  .section-heading,
  .job-action,
  .target-banner,
  .results-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-aside {
    text-align: left;
  }

  .upload-card,
  .job-card {
    padding: 16px;
  }

  .dropzone {
    min-height: 200px;
    padding: 24px 18px;
    text-align: center;
  }

  .identity-card {
    grid-template-columns: auto 1fr;
  }

  .verified-badge {
    grid-column: 1 / -1;
  }

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

  .profile-columns,
  .insight-grid,
  .result-layout {
    grid-template-columns: 1fr;
  }

  .job-action .primary-button {
    width: 100%;
  }

  .job-action {
    align-items: stretch;
  }

  .target-banner {
    gap: 16px;
  }

  .download-menu {
    width: 100%;
    flex-wrap: wrap;
  }

  .download-menu .secondary-button {
    flex: 1;
  }

  .chat-heading,
  .chat-composer > div {
    align-items: stretch;
    flex-direction: column;
  }

  .chat-message {
    max-width: 94%;
  }

  .chat-composer .primary-button {
    width: 100%;
  }

  .resume-paper {
    width: calc(100% - 20px);
    margin: 10px auto;
  }

  footer {
    gap: 12px;
    flex-direction: column;
  }

  .processing-card {
    padding: 34px 24px;
  }
}

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