.cv-hero{
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:20px;
  align-items:end;
  padding-bottom:22px;
  border-bottom:2px solid var(--line);
}
.cv-hero h1{
  margin:8px 0 10px;
  max-width:900px;
  font-size:clamp(2rem,4.6vw,4.4rem);
  line-height:.98;
  letter-spacing:-.055em;
}
.cv-hero p{
  margin:0;
  max-width:760px;
  color:var(--muted);
  font-size:1rem;
  line-height:1.5;
}
.cv-hero aside{
  display:grid;
  gap:6px;
  padding:16px;
  border:2px solid var(--line);
  border-radius:14px;
  background:var(--yellow);
}
.cv-hero aside b{font-size:.95rem}
.cv-hero aside small{line-height:1.45}

.cv-learn-strip{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin:18px 0;
}
.cv-learn-strip details{
  border:2px solid var(--line);
  border-radius:14px;
  background:var(--panel);
  padding:13px 15px;
}
.cv-learn-strip summary{
  cursor:pointer;
  font-weight:700;
}
.cv-rule-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:12px;
}
.cv-rule-grid>div{
  padding:10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--paper);
}
.cv-rule-grid b,.cv-rule-grid span{display:block}
.cv-rule-grid b{font-size:.72rem;margin-bottom:3px}
.cv-rule-grid span{font-size:.69rem;line-height:1.45;color:var(--muted)}
.cv-bullet-guide{margin-top:12px}
.cv-bullet-guide p{font-size:.75rem;line-height:1.5}
.cv-bullet-guide code{
  display:block;
  padding:11px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#1d1a20;
  color:#fff8e8;
  white-space:normal;
  font-size:.72rem;
  line-height:1.5;
}

.cv-workspace{
  display:grid;
  grid-template-columns:minmax(360px,.88fr) minmax(520px,1.12fr);
  gap:18px;
  align-items:start;
}
.cv-builder{
  display:grid;
  gap:10px;
}
.cv-builder-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:15px;
  border:2px solid var(--line);
  border-radius:14px;
  background:var(--panel);
}
.cv-builder-toolbar h2{margin:3px 0 0;font-size:1.2rem}

.cv-editor-section{
  border:2px solid var(--line);
  border-radius:14px;
  background:var(--panel);
  padding:0 14px 14px;
}
.cv-editor-section>summary{
  padding:14px 0 0;
  cursor:pointer;
  font-weight:700;
}
.cv-form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:12px;
}
.cv-field{
  display:grid;
  gap:5px;
}
.cv-field-wide{grid-column:1/-1}
.cv-field>span{
  font-size:.68rem;
  font-weight:700;
  color:var(--muted);
}
.cv-field input,.cv-field textarea{
  width:100%;
  border:1.5px solid var(--line);
  border-radius:9px;
  background:var(--paper);
  color:var(--ink);
  padding:10px 11px;
  outline:none;
  font-size:.78rem;
  line-height:1.45;
}
.cv-field input:focus,.cv-field textarea:focus{
  box-shadow:0 0 0 2px var(--yellow);
}
.cv-entry-editor{
  margin-top:10px;
  padding:11px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--cream);
}
.cv-entry-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.cv-entry-head b{font-size:.75rem}
.cv-remove{
  border:0;
  background:transparent;
  color:var(--red);
  cursor:pointer;
  font-size:.68rem;
  font-weight:700;
}
.cv-add{
  margin-top:10px;
  border:1.5px dashed var(--line);
  background:transparent;
  padding:8px 10px;
  border-radius:9px;
  cursor:pointer;
  font-size:.72rem;
  font-weight:700;
}
.cv-section-note{
  margin:9px 0 0;
  color:var(--muted);
  font-size:.7rem;
  line-height:1.45;
}

.cv-side{
  position:sticky;
  top:10px;
  display:grid;
  gap:10px;
}
.cv-check-panel{
  border:2px solid var(--line);
  border-radius:14px;
  background:var(--panel);
  padding:14px;
}
.cv-check-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.cv-check-head h2{margin:4px 0 0;font-size:1.15rem}
.cv-check-head>strong{
  display:grid;
  place-items:center;
  min-width:54px;
  height:54px;
  border:2px solid var(--line);
  border-radius:50%;
  background:var(--yellow);
  font:700 .8rem 'DM Mono',monospace;
}
#cvChecks{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
  margin-top:12px;
}
.cv-check{
  display:flex;
  gap:7px;
  align-items:center;
  padding:7px 8px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--paper);
}
.cv-check span{
  display:grid;
  place-items:center;
  width:18px;
  height:18px;
  border:1px solid var(--line);
  border-radius:50%;
  flex:none;
  font-size:.65rem;
}
.cv-check b{font-size:.66rem}
.cv-check.pass{background:#e4f1df}
.cv-check.pass span{background:#bedeae}
.cv-score-note{
  display:block;
  margin-top:10px;
  color:var(--muted);
  font-size:.64rem;
  line-height:1.4;
}

.cv-preview-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.cv-preview-toolbar>div{display:flex;gap:7px}
.cv-preview-toolbar button{font-size:.72rem}

.cv-paper{
  width:100%;
  min-height:1120px;
  padding:48px 52px;
  background:#fff;
  color:#111;
  border:2px solid var(--line);
  box-shadow:var(--soft-shadow);
  font-family:Arial,Helvetica,sans-serif;
  font-size:10.5pt;
  line-height:1.38;
}
.resume-head{
  padding-bottom:10px;
  border-bottom:1.5px solid #222;
}
.resume-head h1{
  margin:0;
  font-size:22pt;
  line-height:1;
  letter-spacing:0;
}
.resume-target{
  margin:5px 0 2px;
  font-size:11.5pt;
  font-weight:700;
}
.resume-contact{
  margin:5px 0 0;
  font-size:9.5pt;
}
.resume-section{margin-top:14px}
.resume-section h2{
  margin:0 0 6px;
  padding-bottom:3px;
  border-bottom:1px solid #555;
  font-size:11pt;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.resume-section p{margin:4px 0}
.resume-entry{margin:0 0 9px}
.resume-entry-head,.resume-cert{
  display:flex;
  justify-content:space-between;
  gap:16px;
}
.resume-entry-head>span,.resume-cert>span{
  flex:none;
  font-size:9.5pt;
  text-align:right;
}
.resume-entry-head>div span,.resume-cert div span{font-weight:400}
.resume-meta{font-size:9.5pt;color:#333}
.resume-entry ul{
  margin:4px 0 0;
  padding-left:18px;
}
.resume-entry li{margin:2px 0}

.cv-job-check{background:#fff8d9}
.cv-keyword-empty{
  margin:10px 0 0;
  color:var(--muted);
  font-size:.72rem;
}
.cv-keyword-summary{
  display:grid;
  gap:3px;
  margin-top:10px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--panel);
}
.cv-keyword-summary b{font-size:.72rem}
.cv-keyword-summary small{font-size:.66rem;line-height:1.4;color:var(--muted)}
.cv-keyword-columns{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:8px;
}
.cv-keyword-columns>div{
  padding:10px;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--panel);
}
.cv-keyword-columns span{
  display:block;
  margin-bottom:7px;
  font:700 .58rem 'DM Mono',monospace;
  letter-spacing:.05em;
}
.cv-keyword-columns p{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin:0;
}
.cv-keyword-columns em{
  padding:4px 6px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--cream);
  font-size:.62rem;
  font-style:normal;
}
.cv-keyword-columns i{font-size:.66rem;color:var(--muted)}

.cv-export-note{
  display:grid;
  grid-template-columns:150px 1fr;
  gap:12px;
  margin-top:14px;
  padding:13px 15px;
  border:2px solid var(--line);
  border-radius:12px;
  background:var(--yellow);
  font-size:.74rem;
  line-height:1.45;
}

@media(max-width:1050px){
  .cv-workspace{grid-template-columns:1fr}
  .cv-side{position:static}
  .cv-paper{max-width:820px;margin:auto}
}
@media(max-width:760px){
  .cv-hero,.cv-learn-strip,.cv-export-note{grid-template-columns:1fr}
  .cv-rule-grid,.cv-form-grid,.cv-keyword-columns{grid-template-columns:1fr}
  .cv-field-wide{grid-column:auto}
  #cvChecks{grid-template-columns:1fr}
}
@media(max-width:560px){
  .cv-paper{
    padding:28px 24px;
    min-height:900px;
    font-size:9.5pt;
  }
  .cv-preview-toolbar{
    align-items:flex-start;
    flex-direction:column;
  }
  .cv-preview-toolbar>div{width:100%}
  .cv-preview-toolbar button{flex:1}
}

@media print{
  body.cv-printing{
    background:#fff!important;
    overflow:visible!important;
  }
  body.cv-printing *{
    visibility:hidden!important;
  }
  body.cv-printing #cvPaper,
  body.cv-printing #cvPaper *{
    visibility:visible!important;
  }
  body.cv-printing #cvPaper{
    position:absolute!important;
    left:0!important;
    top:0!important;
    width:100%!important;
    min-height:0!important;
    margin:0!important;
    padding:12mm 14mm!important;
    border:0!important;
    box-shadow:none!important;
    background:#fff!important;
    color:#000!important;
  }
  @page{
    size:A4;
    margin:0;
  }
}

/* Dark mode: yellow CV accents must remain high-contrast */
.dark .cv-hero aside,
.dark .cv-check-head > strong,
.dark .cv-export-note {
  color:#171319;
  border-color:#171319;
}
.dark .cv-hero aside .eyebrow,
.dark .cv-hero aside b,
.dark .cv-hero aside small,
.dark .cv-export-note b,
.dark .cv-export-note span {
  color:#171319 !important;
  opacity:1 !important;
}
.dark .cv-job-check > summary,
.dark .cv-job-check > .cv-section-note,
.dark .cv-job-check > .cv-field > span {
  color:#171319 !important;
  opacity:1 !important;
}


/* CV Studio uses blue for structure and coral for action */
.cv-hero{border-top:5px solid var(--green);padding-top:18px}
.cv-learn-strip details:first-child{
  background:linear-gradient(120deg,var(--blue-soft),var(--panel) 70%);
  border-top:4px solid var(--blue);
}
.cv-learn-strip details:last-child{
  background:linear-gradient(120deg,var(--red-soft),var(--panel) 70%);
  border-top:4px solid var(--coral);
}
.cv-rule-grid>div:nth-child(4n+1){border-top:3px solid var(--blue)}
.cv-rule-grid>div:nth-child(4n+2){border-top:3px solid var(--coral)}
.cv-rule-grid>div:nth-child(4n+3){border-top:3px solid var(--yellow)}
.cv-rule-grid>div:nth-child(4n){border-top:3px solid var(--green)}

.cv-builder-toolbar{
  background:linear-gradient(100deg,var(--blue-soft),var(--panel) 70%);
  border-left:5px solid var(--blue);
}
.cv-editor-section:nth-of-type(4n+1){border-left:4px solid var(--blue)}
.cv-editor-section:nth-of-type(4n+2){border-left:4px solid var(--coral)}
.cv-editor-section:nth-of-type(4n+3){border-left:4px solid var(--yellow)}
.cv-editor-section:nth-of-type(4n){border-left:4px solid var(--green)}
.cv-field input:focus,.cv-field textarea:focus{
  box-shadow:0 0 0 2px var(--blue);
}
.cv-entry-editor{
  background:var(--blue-soft);
}
.cv-check-panel{
  background:linear-gradient(120deg,var(--yellow-soft),var(--panel) 72%);
  border-top:5px solid var(--yellow);
}
.cv-check.pass{
  background:var(--green-soft);
}
.cv-preview-toolbar button:first-child{border-color:var(--blue)}
.cv-preview-toolbar button:nth-child(2){border-color:var(--coral)}
.cv-preview-toolbar button:nth-child(3){border-color:var(--green)}
.cv-job-check{
  border-left:5px solid var(--blue);
}
.cv-export-note{
  background:linear-gradient(105deg,var(--red-soft),var(--yellow-soft));
  border-left:5px solid var(--coral);
}

.dark .cv-entry-editor,
.dark .cv-check.pass,
.dark .cv-learn-strip details:first-child,
.dark .cv-learn-strip details:last-child{
  color:var(--ink);
}


/* Export note now uses theme-soft colors, so dark mode returns to light text */
.dark .cv-export-note,
.dark .cv-export-note b,
.dark .cv-export-note span{
  color:var(--ink) !important;
  border-color:var(--line);
}
