/* v86 — compact desktop UI pass. Functional logic and document/export geometry are unchanged. */
:root{
  --cvb-shell-max:1240px;
  --cvb-ui-font:14px;
  --cvb-control-h:36px;
}

/* Keep the app visually lighter and stop the editor stretching across large monitors. */
body{background:#eef2f6}
.toolbar{padding:10px 20px;min-height:58px;gap:14px}
.toolbar .brand-logo{max-height:38px!important;width:auto!important}
.toolbar .actions{gap:6px}
.toolbar .actions button{padding:7px 10px;font-size:12.5px;border-radius:6px}

.stepbar{max-width:none;padding:8px max(18px,calc((100vw - var(--cvb-shell-max))/2));gap:3px;justify-content:center;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin}
.stepbar button{padding:5px 7px;font-size:11.5px;gap:5px;white-space:nowrap;border-radius:7px;min-height:31px}
.stepbar button span{width:20px;height:20px;font-size:10px}

.workspace{max-width:var(--cvb-shell-max)!important;margin:18px auto!important;grid-template-columns:minmax(390px,470px) minmax(0,1fr)!important;gap:16px;background:transparent}
.editor{padding:18px 20px!important;border:1px solid #d8e0e8!important;border-radius:12px;background:#fff;box-shadow:0 5px 18px rgba(20,45,72,.05);min-width:0}
.preview-area{padding:14px 14px 18px!important;border:1px solid #d8e0e8;border-radius:12px;background:#f7f9fc;min-width:0}
.preview-bar{margin-bottom:10px!important;padding:0 2px}
.preview-bar p{font-size:15px!important;margin-top:3px!important}
.paper-label{font-size:10.5px!important;padding:5px 8px!important}
.preview-scroll{max-height:calc(100vh - 126px)!important;padding:2px 3px 10px!important}
.print-tip{font-size:11.5px!important;line-height:1.35!important;margin:7px auto 0!important}

/* Compact form rhythm. */
.wizard-panel h1,.wizard-panel>h1{font-size:22px!important;line-height:1.14!important;margin:2px 0 12px!important;letter-spacing:-.35px!important}
.wizard-panel>h1::after{width:30px!important;height:2px!important;margin-top:6px!important}
.wizard-panel .lead{font-size:13px!important;line-height:1.45!important;margin:0 0 12px!important}
.assist-kicker,.eyebrow{font-size:9.5px!important;letter-spacing:1.3px!important}
.fields{padding-bottom:12px!important}
.fields label,.date-control>label{font-size:12px!important;margin:7px 0 4px!important;line-height:1.25}
input,select,textarea,.rich-editor[contenteditable="true"]{font-size:13px!important;border-radius:6px!important;padding:7px 9px!important;min-height:var(--cvb-control-h)!important;line-height:1.35!important}
textarea{min-height:68px!important}
#summary{min-height:92px!important}
#skills{min-height:86px!important}
.hint,.notice,.template-simple-hint{font-size:11.5px!important;line-height:1.38!important}
.notice{padding:8px 10px!important;margin:11px 0!important}
.pair{gap:8px!important}
.date-selects{gap:5px!important}
.present-choice{margin-top:7px!important;gap:6px!important;font-size:12px!important}
.present-choice input{min-height:0!important}

.entry{padding:9px 10px!important;margin-bottom:9px!important;border-radius:8px!important}
.entry-head{font-size:10.5px!important;margin-bottom:1px}
.entry-head button{font-size:10.5px!important;padding:4px 7px!important}
.add,.sample{padding:7px 10px!important;font-size:12px!important}
.role-starter{padding:8px 10px!important;margin:7px 0!important;border-radius:8px!important}
.role-starter b{font-size:12px!important}
.role-starter span{font-size:10.8px!important;line-height:1.35!important}
.role-starter button{padding:5px 8px!important;font-size:11px!important}
.format-tools{gap:4px!important;margin:5px 0!important}
.format-tools button{padding:4px 7px!important;font-size:11px!important;min-height:28px!important}

.wizard-footer{margin-top:12px!important;padding-top:11px!important;gap:7px!important}
.wizard-footer button{padding:7px 12px!important;font-size:12px!important;min-height:34px!important}
.wizard-footer span{font-size:11px!important}
.source-reference{margin-top:10px!important}
.source-reference summary{font-size:12px!important;padding:8px 0!important}

/* Start/import screen should also fit comfortably on a laptop. */
.start-mode{max-width:900px!important;margin:20px auto!important;border-radius:12px!important}
.start-mode .editor{padding:24px!important}
.start-options{gap:12px!important;margin:17px 0 11px!important}
.start-card{padding:18px!important;min-height:102px!important}
.start-card strong{font-size:16px!important;margin-bottom:6px!important}
.start-card span{font-size:12px!important;line-height:1.4!important}
#import-review{margin-top:14px!important}
#import-review textarea{min-height:140px!important}

/* Final design workspace: denser controls without changing CV template/document dimensions. */
.final-design-studio{margin:10px 0 12px!important;border-radius:11px!important}
.final-studio-head{padding:12px 14px 9px!important}
.final-studio-head h2{font-size:18px!important;margin:2px 0 4px!important}
.final-studio-head p{font-size:11.5px!important;line-height:1.4!important}
.final-tabs{gap:6px!important;padding:7px!important;position:static!important}
.final-tabs button{padding:8px 8px!important;font-size:11.5px!important;border-radius:8px!important;min-height:34px!important}
.final-tab-panel{padding:11px 12px!important}
.final-tab-panel h3{font-size:14px!important;margin:2px 0 8px!important}
.final-template-gallery{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important;max-height:410px!important}
.final-template-gallery .template-card{padding:5px!important}
.final-template-gallery .template-card>strong{font-size:11px!important;margin:6px 0 2px!important}
.final-template-gallery .template-card>small{font-size:9.5px!important;line-height:1.25!important}
.final-colours{margin-top:10px!important;padding-top:9px!important}
.final-colours label,.final-format-controls label{margin:7px 0 4px!important;font-size:11.5px!important}
.final-format-controls{padding:9px 11px!important;border-radius:8px!important}
.final-layout-controls>section{margin-bottom:8px!important}
.finish-actions{gap:7px!important;margin:12px 0!important}
.finish-actions button{padding:7px 8px!important;font-size:11.5px!important;min-height:34px!important}

/* CV Check: compact issue-oriented presentation, less vertical scrolling. */
.cvcheck-head{margin-bottom:8px!important}
.cvcheck-head h2,.cvcheck-head h3{font-size:18px!important;margin:2px 0 5px!important}
.cvcheck-head p{font-size:11.5px!important;line-height:1.35!important}
.cvcheck-section-tabs{gap:5px!important;margin:7px 0!important;overflow-x:auto;flex-wrap:nowrap!important}
.cvcheck-section-tabs button{padding:6px 8px!important;font-size:10.5px!important;white-space:nowrap!important;min-height:30px!important}
.v85-review-summary{padding:9px 10px!important;margin-bottom:8px!important;gap:8px!important;border-radius:9px!important}
.v85-review-summary>span{min-width:26px!important;height:26px!important;font-size:12px!important}
.v85-review-summary b{font-size:13px!important}
.v85-review-summary p{font-size:10.5px!important;line-height:1.32!important;margin-top:2px!important}
.v85-suggestion-list{gap:7px!important}
.v85-suggestion-card{padding:9px 10px!important;border-radius:9px!important;box-shadow:0 2px 8px rgba(21,54,86,.04)!important}
.v85-suggestion-title{gap:6px!important}
.v85-suggestion-title>span{padding:3px 6px!important;font-size:9px!important}
.v85-suggestion-title b{font-size:12px!important}
.v85-suggestion-title p{font-size:10.5px!important;line-height:1.3!important;margin:2px 0!important}
.v85-suggestion-compare{margin-top:7px!important;border-radius:8px!important}
.v85-suggestion-compare>div{padding:7px 8px!important}
.v85-suggestion-compare span{font-size:8.5px!important;margin-bottom:3px!important}
.v85-suggestion-compare p{font-size:10.5px!important;line-height:1.32!important;max-height:96px;overflow:auto}
.v85-suggestion-actions{gap:5px!important;margin-top:7px!important}
.v85-suggestion-actions button{font-size:10.5px!important;padding:5px 9px!important;min-height:29px!important}
.v85-suggestion-actions .v85-accept{padding:5px 11px!important}
.v85-full-rewrite{margin-top:9px!important;padding-top:7px!important}
.v85-full-rewrite summary{font-size:10.5px!important;padding:4px 0!important}
.v85-review-continue{margin-top:7px!important;padding:6px 10px!important;font-size:11px!important}
.v85-issue-count{min-width:17px!important;height:17px!important;font-size:9px!important}

/* Language editor remains a single compact list: one row per language. */
#v85-languages-editor{margin-top:5px!important}
#v85-languages-editor .v85-lang-row,.v85-language-row{gap:6px!important;margin-bottom:6px!important;align-items:center!important}
#v85-languages-editor input,#v85-languages-editor select{min-height:34px!important;padding:6px 8px!important;font-size:12px!important}
#v85-languages-editor button{padding:5px 7px!important;font-size:10.5px!important;min-height:30px!important}

/* Keep the actual CV document readable; only make the on-screen preview fit the denser shell. */
@media(min-width:1001px){
  .preview-scroll{display:flex;justify-content:center;align-items:flex-start}
  .preview-scroll .resume{transform:scale(.82);transform-origin:top center;margin-bottom:-53mm!important}
}

/* Medium screens: preserve usability rather than over-compressing. */
@media(max-width:1180px) and (min-width:901px){
  .workspace{max-width:calc(100vw - 28px)!important;grid-template-columns:minmax(350px,430px) minmax(0,1fr)!important;margin:14px auto!important}
  .stepbar{padding-left:14px!important;padding-right:14px!important;justify-content:flex-start}
  .final-template-gallery{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .preview-scroll .resume{transform:scale(.74);margin-bottom:-77mm!important}
}

/* Mobile remains touch-friendly; do not apply desktop density too aggressively. */
@media(max-width:900px){
  .workspace{margin:0!important;max-width:none!important;display:block!important}
  .editor{border-radius:0!important;border-left:0!important;border-right:0!important;padding:17px!important}
  .preview-area{border-radius:0!important;border-left:0!important;border-right:0!important}
  .stepbar{padding:7px 9px!important;justify-content:flex-start!important}
  .stepbar button{font-size:11px!important;padding:5px 6px!important}
  .final-template-gallery{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .preview-scroll .resume{transform:none!important;margin-bottom:0!important}
}
