@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f4f1ea;
  --card: #fffcf7;
  --ink: #1d1c19;
  --muted: #6b665c;
  --line: #e4ddd0;
  --accent: #2f6f55;
  --accent-soft: #e4f0e8;
  --amber: #c4922a;
  --mid: #6b8f4e;
  --danger: #8a3b2b;
  --radius: 14px;
  --ring: 326.7256;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Montserrat", system-ui, sans-serif;
}

button,
select,
input,
textarea {
  font-family: inherit;
}

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.header {
  margin-bottom: 22px;
}

.tries {
  margin-top: 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.tries.empty {
  color: #8a5a28;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
  letter-spacing: -0.03em;
}

h2 {
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
}

.tagline,
.muted,
.score-caption,
.job-label {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.empty {
  text-align: center;
  padding: 36px 20px;
}

.empty-title {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 18px 12px;
  border: 1.5px dashed #cfc6b6;
  border-radius: 12px;
  background: #fbf8f2;
  text-align: center;
}

.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone-title {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
}

.field textarea {
  resize: vertical;
  min-height: 180px;
  line-height: 1.5;
}

.resume-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.resume-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: #f6f3ec;
}

.resume-row.active {
  outline: 1px solid #cfe0d5;
  background: var(--accent-soft);
}

.resume-name {
  font-size: 13px;
  font-weight: 700;
}

.row-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.status {
  margin-top: 10px;
  font-size: 12px;
}

.status.error {
  color: var(--danger);
}

.status.success {
  color: var(--accent);
}

.job-label {
  margin-bottom: 2px;
  font-weight: 600;
  color: #3d3a34;
}

.score-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 14px 16px;
}

.ring-wrap {
  position: relative;
  width: 148px;
  height: 148px;
}

.ring-wrap svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.track,
.value {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}

.track {
  stroke: #ebe4d6;
}

.value {
  stroke: var(--amber);
  stroke-dasharray: var(--ring);
  stroke-dashoffset: var(--ring);
  transition: stroke-dashoffset 0.45s ease, stroke 0.3s ease;
}

.ring-wrap[data-tone="low"] .value {
  stroke: var(--amber);
}

.ring-wrap[data-tone="mid"] .value {
  stroke: var(--mid);
}

.ring-wrap[data-tone="high"] .value {
  stroke: var(--accent);
}

.score-number {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.score-why {
  margin-top: 14px;
  text-align: center;
  max-width: 280px;
}

.score-why-title {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chip {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f3eee3;
  color: #4d473c;
  font-size: 12px;
  font-weight: 600;
}

.bullets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.bullet {
  padding: 10px;
  border-radius: 10px;
  background: #f6f3ec;
}

.bullet.flagged {
  background: #f8eee4;
}

.section-tag {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.truth-flag {
  margin-top: 6px;
  color: #8a5a28;
  font-size: 12px;
}

.bullet p {
  font-size: 13px;
  line-height: 1.45;
}

.bullet-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.history-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.history-title {
  font-size: 13px;
  font-weight: 700;
}

.history-score {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 700;
}

.history-score.tone-high {
  color: var(--accent);
}

.history-score.tone-mid {
  color: var(--mid);
}

.history-score.tone-low {
  color: var(--amber);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn.ghost,
.btn.small {
  background: transparent;
  color: var(--accent);
  border: 1px solid #cfe0d5;
}

.btn.small {
  padding: 4px 10px;
  font-size: 12px;
}

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

.btn.ghost.block {
  margin-top: 10px;
}

.btn:hover {
  filter: brightness(1.05);
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 10px;
  border: 3px solid #ebe4d6;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

@media (max-width: 800px) {
  .layout {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 20px;
  }
}
