/* ═══════════════════════════════════════════
   ATS ANALYZER — Styles
   ═══════════════════════════════════════════ */

/* ─── PAGE HEADER ─── */
.page-header {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 80px) var(--page-px) clamp(28px, 4vw, 44px);
}

.page-overline {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.page-overline::before {
  content: '';
  width: 36px;
  height: 2px;
  background: var(--blue-grad);
  border-radius: 1px;
}

.page-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 0.96;
  letter-spacing: -1.5px;
  margin-bottom: 14px;
}

.page-title em {
  font-style: italic;
  font-weight: 400;
  background: var(--blue-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-desc {
  font-size: 16px;
  color: var(--ink-light);
  max-width: 540px;
  line-height: 1.7;
}

/* ─── INPUT SECTION ─── */
.input-section {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-px);
}

.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
}

.input-col {
  display: flex;
  flex-direction: column;
}

.input-col:first-child {
  border-right: 1px solid var(--rule);
}

.input-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-warm);
}

.input-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.btn-small {
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 12px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-small:hover {
  color: var(--blue);
  border-color: var(--blue);
}

.text-area {
  width: 100%;
  min-height: 300px;
  padding: 20px 24px;
  border: none;
  outline: none;
  resize: vertical;
  background: transparent;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink);
}

.text-area::placeholder {
  color: var(--ink-faint);
}

.input-footer {
  padding: 10px 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--paper-warm);
}

.char-ct {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
}

/* ─── ANALYZE BUTTON ─── */
.analyze-wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 40px var(--page-px);
  text-align: center;
}

.btn-analyze {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 52px;
  border: none;
  border-radius: 8px;
  background: var(--blue-grad);
  color: white;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 12px rgba(37, 84, 168, 0.2);
}

.btn-analyze:hover {
  background: var(--blue-grad-h);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 84, 168, 0.28);
}

.btn-analyze:active {
  transform: translateY(0);
}

.btn-analyze:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-analyze .spin {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: sp 0.7s linear infinite;
  display: none;
}

.btn-analyze.loading .spin { display: block; }
.btn-analyze.loading .label { display: none; }

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

.analyze-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 14px;
}

/* ═══ RESULTS ═══ */
.results {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-px) 60px;
  display: none;
}

.results.show {
  display: block;
}

/* ─── Score Hero ─── */
.score-hero {
  text-align: center;
  padding: 56px 0 44px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 44px;
}

.score-big {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(80px, 14vw, 130px);
  line-height: 1;
  letter-spacing: -4px;
  background: var(--blue-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.score-of {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 4px;
  letter-spacing: 1px;
}

.score-verdict {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 20px;
  margin-top: 16px;
  color: var(--ink-light);
}

/* ─── Metrics ─── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  margin-bottom: 44px;
}

.metric-cell {
  padding: 22px 20px;
  border-right: 1px solid var(--rule);
}

.metric-cell:last-child {
  border-right: none;
}

.metric-name {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.metric-val {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 26px;
  margin-bottom: 10px;
}

.metric-track {
  height: 4px;
  background: var(--paper-warm);
  border-radius: 2px;
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}

/* ─── Keywords ─── */
.kw-section {
  margin-bottom: 44px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.3px;
}

.section-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.kw-group-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 10px;
  margin-top: 20px;
}

.kw-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.kw-tag {
  font-family: var(--mono);
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid;
}

.kw-tag.found {
  background: var(--green-bg);
  border-color: rgba(22, 133, 74, 0.2);
  color: var(--green);
}

.kw-tag.miss {
  background: var(--red-bg);
  border-color: rgba(194, 58, 42, 0.2);
  color: var(--red);
}

/* ─── Analysis Columns ─── */
.analysis-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  margin-bottom: 44px;
}

.analysis-col {
  padding: 24px;
}

.analysis-col:first-child {
  border-right: 1px solid var(--rule);
}

.analysis-col-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

.check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--paper-warm);
}

.check-row:last-child { border-bottom: none; }
.check-label { color: var(--ink-light); }
.check-val { font-family: var(--mono); font-size: 12px; font-weight: 500; }
.check-yes { color: var(--green); }
.check-no { color: var(--red); }

/* ─── Suggestions ─── */
.suggestions-section {
  margin-bottom: 44px;
}

.suggestion-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}

.sug-badge {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  margin-top: 2px;
}

.sug-high { background: var(--red-bg); color: var(--red); }
.sug-med  { background: var(--amber-bg); color: var(--amber); }
.sug-low  { background: var(--green-bg); color: var(--green); }

.sug-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 3px;
}

.sug-text {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.65;
}

/* ─── Export ─── */
.export-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.export-info {
  font-size: 14px;
  color: var(--ink-muted);
}

.export-btns {
  display: flex;
  gap: 10px;
}

.btn-export {
  font-family: var(--mono);
  font-size: 12px;
  padding: 8px 20px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-export:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.btn-export.primary {
  background: var(--blue-grad);
  color: white;
  border: none;
}

.btn-export.primary:hover {
  box-shadow: 0 2px 12px rgba(37, 84, 168, 0.25);
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .input-grid { grid-template-columns: 1fr; }
  .input-col:first-child { border-right: none; border-bottom: 1px solid var(--rule); }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .metric-cell:nth-child(2) { border-right: none; }
  .metric-cell:nth-child(3),
  .metric-cell:nth-child(4) { border-top: 1px solid var(--rule); }
  .analysis-cols { grid-template-columns: 1fr; }
  .analysis-col:first-child { border-right: none; border-bottom: 1px solid var(--rule); }
  .export-strip { flex-direction: column; gap: 14px; align-items: flex-start; }
}
