/* ============================================================
 * Generated bundle. Concatenates: check-ats-score, create-resume, cover-letter-generator, match-resume-jd
 * Class prefixes are unique per file so styles do not collide.
 * Source files are kept for now — delete after verification.
 * ============================================================ */

/* ===== check-ats-score.css ===== */
/* Check ATS Score — page styles
 * Loaded by /check-ats-score.html
 */

/* Sidebar is intentionally omitted on this page — collapse the page grid
 * so main fills the whole viewport instead of leaving the 280px column blank. */
.page-wrap.page-full { grid-template-columns: 1fr; gap: 0; }
.page-wrap.page-full > main { padding-right: 0; }

.ats-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  margin-top: 14px;
}
@media (max-width: 960px) {
  .ats-layout { grid-template-columns: 1fr; }
}

/* ─── Drop zone ────────────────────────────────────────────── */
.ats-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
}
.ats-drop {
  border-style: dashed;
  border-color: #B6C0CC;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.ats-drop:hover, .ats-drop.is-drag {
  border-color: var(--brand);
  background: var(--brand-light, #E8F1FA);
}
.ats-drop-inner svg {
  color: var(--brand);
  margin-bottom: 10px;
}
.ats-drop-title {
  margin: 4px 0 4px;
  font-size: 16px;
  color: var(--ink);
  font-weight: 600;
}
.ats-drop-sub {
  margin: 0;
  font-size: 13px;
  color: var(--ink-2);
}
.ats-drop-tip {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--ink-3);
  font-style: italic;
}
.ats-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--brand);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

/* ─── Paste fallback ──────────────────────────────────────── */
.ats-or {
  margin-top: 12px;
  font-size: 13px;
}
.ats-or summary {
  cursor: pointer;
  color: var(--ink-2);
  font-weight: 600;
  padding: 8px 0;
}
.ats-or textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  margin-top: 8px;
  resize: vertical;
}
.ats-btn {
  padding: 9px 16px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  margin-top: 8px;
}
.ats-btn:hover { border-color: var(--brand); color: var(--brand); }
.ats-btn.primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  font-weight: 600;
}
.ats-btn.primary:hover { background: #16385A; color: #fff; }
.ats-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.ats-status {
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-2);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  min-height: 18px;
}
.ats-status.err { color: #B91C1C; font-weight: 600; }
.ats-status.ok  { color: #0B7A2C; font-weight: 600; }

/* ─── Result panel ────────────────────────────────────────── */
.ats-results { display: flex; flex-direction: column; gap: 14px; }

.ats-score-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
}
.ats-score-ring {
  position: relative;
  width: 120px;
  height: 120px;
}
.ats-score-ring svg { width: 100%; height: 100%; }
.ats-score-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
}
.ats-score-num small {
  font-size: 12px;
  color: var(--ink-3);
  margin-left: 2px;
  font-weight: 500;
}
.ats-score-label {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.ats-score-meta {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
}
.ats-score-meta b { color: var(--ink); }

/* ─── Tabs ────────────────────────────────────────────────── */
.ats-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  gap: 4px;
}
.ats-tab {
  background: none;
  border: 1px solid transparent;
  border-bottom: 0;
  padding: 9px 14px;
  font: inherit;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  margin-bottom: -1px;
}
.ats-tab:hover { color: var(--brand); }
.ats-tab.on {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
  font-weight: 600;
}
.ats-tab-pane { display: none; padding-top: 14px; }
.ats-tab-pane.on { display: block; }

/* ─── Check list ──────────────────────────────────────────── */
.ats-checks {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.ats-checks li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
}
.ats-checks li:last-child { border-bottom: 0; }
.ats-check-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.ats-check-icon.pass { background: #D6F5E1; color: #0B7A2C; }
.ats-check-icon.warn { background: #FFE9C2; color: #8A5A00; }
.ats-check-icon.fail { background: #FBDDD8; color: #B91C1C; }
.ats-check-label {
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.5;
}
.ats-check-label b { font-weight: 600; }
.ats-check-detail {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 3px;
  line-height: 1.5;
}
.ats-check-pts {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  margin-top: 1px;
}

/* ─── Grammar issues ──────────────────────────────────────── */
.ats-grammar-meta {
  font-size: 13px;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 14px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ats-grammar-meta .ats-grammar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
}
.ats-issues {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ats-issue {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.ats-issue-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 6px;
}
.ats-issue-cat {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  padding: 2px 8px;
  border-radius: 999px;
}
.ats-issue-cat.warn  { background: #C77B00; }
.ats-issue-cat.style { background: #5C5C7B; }
.ats-issue-msg {
  font-size: 13.5px;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.5;
}
.ats-issue-ctx {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--ink-2);
  background: #F4F6F8;
  padding: 6px 10px;
  border-radius: 4px;
  word-break: break-word;
}
.ats-issue-ctx mark {
  background: #FFE17A;
  color: var(--ink);
  padding: 0 2px;
  border-radius: 2px;
}
.ats-issue-fix {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-2);
}
.ats-issue-fix b { color: #0B7A2C; }

/* ─── Extracted text view ─────────────────────────────────── */
.ats-extracted {
  background: #1A2332;
  color: #E8ECF1;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.5;
  padding: 14px;
  border-radius: var(--r-md);
  max-height: 480px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

.ats-empty {
  text-align: center;
  color: var(--ink-3);
  padding: 30px 14px;
  font-size: 13px;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
}

/* ===== create-resume.css ===== */
/* Create Resume — page styles
 * Loaded by /create-resume.html
 *
 * Two-pane layout: form on the left, live resume preview on the right.
 * The .cr-preview node is what html2pdf.js exports, so its inner CSS
 * has to be self-contained (no reliance on the global stylesheet's
 * variables) and print-friendly.
 */

/* Full-width: sidebar is intentionally hidden on this page. */
.page-wrap.page-full { grid-template-columns: 1fr; gap: 0; }
.page-wrap.page-full > main { padding-right: 0; }

.cr-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 14px;
  margin-top: 14px;
}
.cr-templates { display: flex; gap: 6px; flex-wrap: wrap; }
.cr-tpl {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  color: var(--ink-2);
}
.cr-tpl:hover { border-color: var(--brand); color: var(--brand); }
.cr-tpl.on   {
  background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600;
}

.cr-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.cr-btn {
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
}
.cr-btn:hover { border-color: var(--brand); color: var(--brand); }
.cr-btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }
.cr-btn.primary:hover { background: #16385A; color: #fff; }
.cr-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.cr-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 14px;
  margin-top: 14px;
}
@media (max-width: 1024px) { .cr-layout { grid-template-columns: 1fr; } }

/* ─── Form ─────────────────────────────────────────────────── */
.cr-form { display: flex; flex-direction: column; gap: 10px; }
.cr-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0;
}
.cr-section > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  user-select: none;
  position: relative;
}
.cr-section > summary::-webkit-details-marker { display: none; }
.cr-section > summary::after {
  content: '+';
  position: absolute;
  right: 16px;
  top: 12px;
  font-size: 20px;
  color: var(--ink-3);
  font-weight: 400;
}
.cr-section[open] > summary::after { content: '−'; }
.cr-section .cr-opt {
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  color: var(--ink-3);
  font-size: 11px;
  margin-left: 6px;
}
.cr-section > .cr-grid,
.cr-section > .cr-rows,
.cr-section > .cr-add,
.cr-section > .cr-objective,
.cr-section > .cr-field,
.cr-section > .cr-check {
  margin: 0 16px 14px;
}
.cr-section > .cr-add { margin-top: 4px; margin-bottom: 16px; }
.cr-section > details > summary { /* nested if any */ padding: 8px 0; }

.cr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}
.cr-field { display: flex; flex-direction: column; gap: 4px; }
.cr-field.cr-wide { grid-column: span 2; }
.cr-field span {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}
.cr-field span em { color: #B91C1C; font-style: normal; margin-left: 2px; }
.cr-field input[type=text],
.cr-field input[type=email],
.cr-field input[type=tel],
.cr-field input[type=url],
.cr-field input[type=date],
.cr-field input[type=number],
.cr-field select,
.cr-field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  background: #fff;
  color: var(--ink);
}
.cr-field textarea { resize: vertical; min-height: 60px; line-height: 1.45; font-family: inherit; }
.cr-field input:focus, .cr-field select:focus, .cr-field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 78, 121, 0.12);
}

.cr-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}

.cr-add {
  display: inline-block;
  padding: 7px 14px;
  border: 1px dashed var(--line);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  color: var(--brand);
  font-weight: 600;
}
.cr-add:hover { background: var(--brand-light, #E8F1FA); border-color: var(--brand); }

.cr-rows { display: flex; flex-direction: column; gap: 12px; }
.cr-row {
  background: #F8FAFC;
  border: 1px solid #E5EAF0;
  border-radius: 8px;
  padding: 12px 12px 12px;
  position: relative;
}
.cr-row .cr-rm {
  position: absolute;
  right: 10px;
  top: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-3);
  font-size: 18px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 4px;
}
.cr-row .cr-rm:hover { background: #FBE2DC; color: #B91C1C; }
.cr-row .cr-grid { margin: 0; }

/* Objective preset chips */
.cr-objective {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cr-obj-preset {
  text-align: left;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
}
.cr-obj-preset:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light, #E8F1FA); }
.cr-obj-preset.on  { border-color: var(--brand); background: var(--brand-light, #E8F1FA); color: var(--ink); }
.cr-obj-preset b   { color: var(--brand); font-weight: 700; margin-right: 6px; }

/* ─── Preview pane ─────────────────────────────────────────── */
.cr-preview-wrap {
  background: #E8ECF1;
  border-radius: var(--r-md);
  padding: 14px;
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
  overflow: auto;
}
@media (max-width: 1024px) { .cr-preview-wrap { position: static; max-height: none; } }
.cr-preview-note {
  text-align: center;
  font-size: 11px;
  color: var(--ink-3);
  margin: 8px 0 0;
}

/* The actual resume sheet — A4 ratio at 210x297mm.
 * Self-contained typography so html2pdf can render it standalone. */
.cr-preview {
  background: #fff;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 22mm 18mm;
  min-height: 297mm;
  /* border-box keeps the padding *inside* the 297 mm min-height so
     the rendered element is exactly one A4 page tall — without this,
     22 mm + 297 mm + 22 mm = 341 mm and PDF/Word/Print produce a
     trailing blank page. */
  box-sizing: border-box;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  font-family: Arial, Helvetica, sans-serif;
  color: #1A1A1A;
  font-size: 10.5pt;
  line-height: 1.45;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.cr-preview * { box-sizing: border-box; }
.cr-preview p { margin: 0 0 6pt; }
.cr-preview h1, .cr-preview h2, .cr-preview h3 { margin: 0; }
.cr-preview ul { margin: 4pt 0 6pt 16pt; padding: 0; }
.cr-preview li { margin: 0 0 3pt; line-height: 1.4; }

/* Header */
.cr-resume-head {
  text-align: center;
  border-bottom: 1.5pt solid #1A1A1A;
  padding-bottom: 10pt;
  margin-bottom: 12pt;
}
.cr-resume-name {
  font-size: 22pt;
  font-weight: 700;
  letter-spacing: 0.5pt;
  margin-bottom: 4pt;
  text-transform: uppercase;
}
.cr-resume-title {
  font-size: 11pt;
  color: #4B5563;
  margin-bottom: 6pt;
  font-weight: 500;
}
.cr-resume-contact {
  font-size: 9.5pt;
  color: #4B5563;
  line-height: 1.55;
}
.cr-resume-contact a { color: #1F4E79; text-decoration: none; }
.cr-resume-contact span + span::before { content: ' · '; color: #B6C0CC; margin: 0 4px; }

/* Section heading */
.cr-resume-section { margin-bottom: 11pt; }
.cr-resume-section h2 {
  font-size: 11.5pt;
  text-transform: uppercase;
  letter-spacing: 1pt;
  color: #1A1A1A;
  border-bottom: 0.6pt solid #1A1A1A;
  padding-bottom: 3pt;
  margin: 0 0 6pt;
}
.cr-resume-row { margin-bottom: 7pt; }
.cr-resume-row:last-child { margin-bottom: 0; }
.cr-resume-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12pt;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 2pt;
}
.cr-resume-row-title {
  font-weight: 700;
  font-size: 10.5pt;
  color: #1A1A1A;
}
.cr-resume-row-sub {
  font-style: italic;
  font-size: 10pt;
  color: #4B5563;
}
.cr-resume-row-meta {
  font-size: 9.5pt;
  color: #4B5563;
  white-space: nowrap;
}
.cr-resume-row-desc { font-size: 10pt; color: #1A1A1A; }
.cr-resume-bullets {
  margin: 3pt 0 0 16pt;
  padding: 0;
}
.cr-resume-bullets li {
  font-size: 10pt;
  color: #1A1A1A;
}

.cr-skill-line { margin-bottom: 3pt; font-size: 10pt; }
.cr-skill-line b { font-weight: 700; color: #1A1A1A; }

.cr-decl {
  margin-top: 14pt;
  padding-top: 8pt;
  border-top: 0.4pt solid #B6C0CC;
  font-size: 9.5pt;
  font-style: italic;
  color: #4B5563;
}

/* ─── Modern template ──────────────────────────────────────── */
.cr-tpl-modern {
  font-family: Calibri, "Segoe UI", Arial, sans-serif;
  font-size: 11pt;
}
.cr-tpl-modern .cr-resume-name {
  text-transform: none;
  letter-spacing: 0;
  font-size: 24pt;
  color: #1F4E79;
  border-bottom: none;
}
.cr-tpl-modern .cr-resume-head {
  text-align: left;
  border-bottom: 2pt solid #1F4E79;
}
.cr-tpl-modern .cr-resume-section h2 {
  color: #1F4E79;
  border-bottom: 0.6pt solid #1F4E79;
  text-transform: uppercase;
  letter-spacing: 0.6pt;
}
.cr-tpl-modern .cr-resume-row-title { color: #1F4E79; }

/* ─── Compact template ─────────────────────────────────────── */
.cr-tpl-compact {
  font-family: "Times New Roman", Georgia, serif;
  font-size: 10pt;
  line-height: 1.35;
  padding: 16mm 16mm;
}
.cr-tpl-compact .cr-resume-name { font-size: 18pt; letter-spacing: 0.3pt; }
.cr-tpl-compact .cr-resume-section { margin-bottom: 8pt; }
.cr-tpl-compact .cr-resume-section h2 {
  font-size: 10.5pt;
  letter-spacing: 0.8pt;
}
.cr-tpl-compact .cr-resume-row { margin-bottom: 4pt; }
.cr-tpl-compact .cr-resume-bullets { margin-top: 2pt; }
.cr-tpl-compact .cr-resume-bullets li { font-size: 9.5pt; }

/* Print rules — hide the rest of the page when printing.
 * Used by the "Print" button as a fallback to PDF export. */
@media print {
  body * { visibility: hidden !important; }
  .cr-preview, .cr-preview * { visibility: visible !important; }
  .cr-preview {
    position: absolute;
    inset: 0;
    box-shadow: none;
    margin: 0;
    padding: 18mm 16mm;
    width: 100%;
    max-width: none;
    /* Let the printed sheet size to its content — no forced 297 mm,
       otherwise a half-page resume reserves a full page and the
       browser may add a trailing blank page. */
    min-height: auto;
  }
}

/* ===== cover-letter-generator.css ===== */
/* Cover Letter Generator — page styles
 * Loaded by /cover-letter-generator.html
 *
 * Two-pane layout: form on the left, live letter preview on the right.
 * The .cl-preview node is what html2pdf / Word export read, so its
 * inner CSS is self-contained and print-friendly.
 */

/* Full-width: sidebar is intentionally hidden on this page. */
.page-wrap.page-full { grid-template-columns: 1fr; gap: 0; }
.page-wrap.page-full > main { padding-right: 0; }

.cl-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 14px;
  margin-top: 14px;
}
.cl-templates { display: flex; gap: 6px; flex-wrap: wrap; }
.cl-tpl {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  color: var(--ink-2);
}
.cl-tpl:hover { border-color: var(--brand); color: var(--brand); }
.cl-tpl.on { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }

.cl-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.cl-btn {
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
}
.cl-btn:hover { border-color: var(--brand); color: var(--brand); }
.cl-btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }
.cl-btn.primary:hover { background: #16385A; color: #fff; }
.cl-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.cl-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 14px;
  margin-top: 14px;
}
@media (max-width: 1024px) { .cl-layout { grid-template-columns: 1fr; } }

/* ─── Form ─────────────────────────────────────────────────── */
.cl-form { display: flex; flex-direction: column; gap: 10px; }
.cl-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.cl-section > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  user-select: none;
  position: relative;
}
.cl-section > summary::-webkit-details-marker { display: none; }
.cl-section > summary::after {
  content: '+';
  position: absolute;
  right: 16px;
  top: 12px;
  font-size: 20px;
  color: var(--ink-3);
  font-weight: 400;
}
.cl-section[open] > summary::after { content: '−'; }
.cl-section .cl-opt {
  text-transform: none; letter-spacing: normal; font-weight: 400;
  color: var(--ink-3); font-size: 11px; margin-left: 6px;
}
.cl-section > .cl-grid,
.cl-section > .cl-group,
.cl-section > .cl-presets,
.cl-section > .cl-field {
  margin: 0 16px 14px;
}

.cl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}
.cl-field { display: flex; flex-direction: column; gap: 4px; }
.cl-field.cl-wide { grid-column: span 2; }
.cl-field span {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}
.cl-field span em { color: #B91C1C; font-style: normal; margin-left: 2px; }
.cl-field input[type=text],
.cl-field input[type=email],
.cl-field input[type=tel],
.cl-field input[type=url],
.cl-field input[type=date],
.cl-field select,
.cl-field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  background: #fff;
  color: var(--ink);
}
.cl-field textarea { resize: vertical; min-height: 60px; line-height: 1.45; font-family: inherit; }
.cl-field input:focus, .cl-field select:focus, .cl-field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 78, 121, 0.12);
}

.cl-group { display: flex; flex-direction: column; gap: 6px; }
.cl-grp-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}
.cl-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.cl-chip {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  color: var(--ink-2);
}
.cl-chip:hover { border-color: var(--brand); color: var(--brand); }
.cl-chip.on   { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }

.cl-presets { display: flex; flex-direction: column; gap: 5px; }
.cl-preset {
  text-align: left;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
}
.cl-preset:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light, #E8F1FA); }
.cl-preset.on    { border-color: var(--brand); background: var(--brand-light, #E8F1FA); color: var(--ink); }
.cl-preset b     { color: var(--brand); font-weight: 700; margin-right: 6px; }

/* ─── Preview pane ─────────────────────────────────────────── */
.cl-preview-wrap {
  background: #E8ECF1;
  border-radius: var(--r-md);
  padding: 14px;
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
  overflow: auto;
}
@media (max-width: 1024px) { .cl-preview-wrap { position: static; max-height: none; } }
.cl-preview-note {
  text-align: center;
  font-size: 11px;
  color: var(--ink-3);
  margin: 8px 0 0;
}

/* The actual letter sheet — A4 ratio. Self-contained styling so html2pdf
 * + Word export render reliably without the global stylesheet. */
.cl-preview {
  background: #fff;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 22mm 22mm;
  min-height: 297mm;
  /* border-box keeps the padding *inside* the 297 mm min-height so
     the rendered element is exactly one A4 page tall — without this,
     22 mm + 297 mm + 22 mm = 341 mm and PDF/Word/Print produce a
     trailing blank page. */
  box-sizing: border-box;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  font-family: Arial, Helvetica, sans-serif;
  color: #1A1A1A;
  font-size: 11pt;
  line-height: 1.55;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.cl-preview p   { margin: 0 0 11pt; }
.cl-preview a   { color: #1F4E79; text-decoration: none; }

/* Sender block */
.cl-from {
  margin-bottom: 22pt;
}
.cl-from-name {
  font-weight: 700;
  font-size: 13pt;
  margin-bottom: 2pt;
}
.cl-from-line {
  font-size: 10pt;
  color: #4B5563;
  line-height: 1.55;
}
.cl-from-line span + span::before { content: ' · '; color: #B6C0CC; margin: 0 4px; }

.cl-date    { margin-bottom: 16pt; font-size: 10.5pt; color: #4B5563; }

.cl-to      { margin-bottom: 16pt; }
.cl-to-line { font-size: 10.5pt; line-height: 1.5; }
.cl-to-line.bold { font-weight: 700; }

.cl-subject { font-weight: 700; margin: 0 0 14pt; font-size: 11pt; }

.cl-greeting { margin: 0 0 14pt; font-size: 11pt; }

.cl-signoff   { margin: 22pt 0 4pt; font-size: 11pt; }
.cl-signature { font-weight: 700; font-size: 11pt; }

/* ─── Modern template ──────────────────────────────────────── */
.cl-tpl-modern {
  font-family: Calibri, "Segoe UI", Arial, sans-serif;
  font-size: 11.5pt;
}
.cl-tpl-modern .cl-from-name {
  color: #1F4E79;
  font-size: 18pt;
  letter-spacing: 0.3pt;
  border-bottom: 2pt solid #1F4E79;
  padding-bottom: 4pt;
  margin-bottom: 4pt;
}
.cl-tpl-modern .cl-subject { color: #1F4E79; }
.cl-tpl-modern a { color: #1F4E79; }

/* ─── Compact template ─────────────────────────────────────── */
.cl-tpl-compact {
  font-family: "Times New Roman", Georgia, serif;
  font-size: 10.5pt;
  line-height: 1.4;
  padding: 18mm 18mm;
}
.cl-tpl-compact p { margin: 0 0 8pt; }
.cl-tpl-compact .cl-from { margin-bottom: 16pt; }
.cl-tpl-compact .cl-date { margin-bottom: 10pt; }
.cl-tpl-compact .cl-to   { margin-bottom: 10pt; }
.cl-tpl-compact .cl-subject  { margin-bottom: 10pt; }
.cl-tpl-compact .cl-greeting { margin-bottom: 10pt; }
.cl-tpl-compact .cl-signoff  { margin-top: 16pt; }

/* Print rules — hide the rest of the page when printing.
 * Used by the "Print" button as a fallback to PDF export. */
@media print {
  body * { visibility: hidden !important; }
  .cl-preview, .cl-preview * { visibility: visible !important; }
  .cl-preview {
    position: absolute;
    inset: 0;
    box-shadow: none;
    margin: 0;
    width: 100%;
    max-width: none;
    /* Let the printed sheet size to its content — no forced 297 mm,
       otherwise a short letter reserves a full page and the
       browser may add a trailing blank page. */
    min-height: auto;
  }
}

/* ===== match-resume-jd.css ===== */
/* Match Resume to JD — page styles */

/* Full-width: sidebar is intentionally hidden on this page. */
.page-wrap.page-full { grid-template-columns: 1fr; gap: 0; }
.page-wrap.page-full > main { padding-right: 0; }

.mr-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 14px;
}
@media (max-width: 860px) { .mr-layout { grid-template-columns: 1fr; } }

.mr-h3 {
  margin: 0 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--brand);
}

.mr-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px;
}

.mr-drop {
  border-style: dashed;
  border-color: #B6C0CC;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  padding: 22px 14px;
}
.mr-drop:hover, .mr-drop.is-drag { border-color: var(--brand); background: var(--brand-light, #E8F1FA); }
.mr-drop-inner svg { color: var(--brand); margin-bottom: 6px; }
.mr-drop-title { margin: 4px 0 4px; font-size: 14px; font-weight: 600; color: var(--ink); }
.mr-drop-sub   { margin: 0; font-size: 12px; color: var(--ink-2); }
.mr-link {
  background: none; border: none; padding: 0;
  color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline;
}

.mr-or { margin-top: 10px; font-size: 12px; }
.mr-or summary { cursor: pointer; color: var(--ink-2); font-weight: 600; padding: 4px 0; }
.mr-or textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 6px; font: inherit; font-size: 13px; margin-top: 6px; resize: vertical;
}

.mr-jd { padding: 0; }
.mr-jd textarea {
  width: 100%; min-height: 250px; padding: 14px 16px;
  border: none; border-radius: var(--r-md); font: inherit; font-size: 13px;
  resize: vertical; line-height: 1.5; color: var(--ink); outline: none;
}
.mr-jd-meta {
  border-top: 1px solid var(--line);
  padding: 8px 14px;
  font-size: 11px;
  color: var(--ink-3);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.mr-status {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-2);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  min-height: 18px;
}
.mr-status.err { color: #B91C1C; font-weight: 600; }
.mr-status.ok  { color: #0B7A2C; font-weight: 600; }

.mr-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 16px 0 6px;
}
.mr-btn {
  padding: 10px 20px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
}
.mr-btn:hover { border-color: var(--brand); color: var(--brand); }
.mr-btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; padding: 10px 28px; }
.mr-btn.primary:hover { background: #16385A; color: #fff; }
.mr-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ─── Results ──────────────────────────────────────────────── */
.mr-results { margin-top: 16px; display: flex; flex-direction: column; gap: 14px; }

.mr-score-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
}
.mr-score-ring { position: relative; width: 120px; height: 120px; }
.mr-score-ring svg { width: 100%; height: 100%; }
.mr-score-num {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 700; color: var(--ink);
}
.mr-score-num small { font-size: 12px; color: var(--ink-3); margin-left: 2px; font-weight: 500; }
.mr-score-label { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.mr-score-meta  { font-size: 12px; color: var(--ink-2); line-height: 1.5; }
.mr-score-meta b { color: var(--ink); }

.mr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
@media (max-width: 900px) { .mr-grid { grid-template-columns: 1fr; } }

.mr-bucket-title {
  margin: 0 0 4px;
  font-size: 13px;
  display: flex; align-items: center; gap: 8px;
  font-weight: 700;
}
.mr-bucket-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 999px;
}
.mr-bucket-title.good     { color: #0B7A2C; }
.mr-bucket-title.good .mr-bucket-dot     { background: #0B7A2C; }
.mr-bucket-title.bad      { color: #B91C1C; }
.mr-bucket-title.bad  .mr-bucket-dot     { background: #B91C1C; }
.mr-bucket-title.neutral  { color: #5C5C7B; }
.mr-bucket-title.neutral .mr-bucket-dot  { background: #5C5C7B; }
.mr-bucket-sub  { margin: 0 0 10px; font-size: 12px; color: var(--ink-3); }

.mr-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.mr-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: #F4F6F8;
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.mr-tag.good    { background: #E5F5EC; color: #0B7A2C; border-color: #C3E6CF; }
.mr-tag.bad     { background: #FBE2DC; color: #9A3A21; border-color: #F2C8BD; }
.mr-tag.neutral { background: #EEF1F5; color: #4B5563; border-color: #DCE3EB; }
.mr-tag .n {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  margin-left: 4px;
  opacity: 0.7;
}
.mr-empty {
  font-size: 12px;
  color: var(--ink-3);
  font-style: italic;
}

.mr-sugg ul { margin: 8px 0 0; padding-left: 18px; }
.mr-sugg li { margin-bottom: 6px; font-size: 13.5px; color: var(--ink); line-height: 1.55; }
.mr-sugg li b { color: var(--brand); }
.mr-sugg h4 { margin: 0 0 4px; font-size: 14px; }

