/* Owned HTML baseline. No Webflow reset, generated site stylesheet or runtime. */
*,*::before,*::after{box-sizing:border-box}
html{font-family:Arial,Helvetica,sans-serif;-webkit-text-size-adjust:100%}
body{margin:0;color:#333;background:#fff;font-size:14px;line-height:1.42857143}
button,input,textarea,select{font:inherit;color:inherit}
button{cursor:pointer}button:disabled{cursor:default}
textarea{resize:vertical}
a{color:inherit}
img,svg{vertical-align:middle}
[hidden]{display:none!important}
h1,h2,h3,p{margin-top:0}p{margin-bottom:10px}
h1{font-size:38px;line-height:1.16}h2{font-size:32px;line-height:1.125}h3{font-size:24px;line-height:1.25}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #007f86;outline-offset:3px}
.file-picker input[type=file]{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.cv-preview-box{width:100%;height:600px;min-height:0}
.chat-card,.cv-card{background:#fff;border:1px solid #dce4e8;border-radius:12px}
.chat-title{font-size:24px;line-height:1.25}
.chat-input{display:block;width:100%;min-height:44px;padding:10px;border:1px solid #ccc;border-radius:6px;background:#fff}
.chat-send-button{display:inline-block;padding:9px 15px;border:0;border-radius:6px;background:#007f86;color:white;text-decoration:none}
.cv-document{background:#eaf0f3}
.cv-document-inner{position:relative;background:white}
.standalone-noscript{padding:16px;margin:0;background:#fff;color:#142a3d}
/* This is initial response CSS: storage/editor loading never hides the hero. */
html.drafted-pages[data-workspace-page=setup],html.drafted-pages[data-workspace-page=setup] body{height:auto;min-height:100%;overflow:auto!important}
html.drafted-pages[data-workspace-page=setup] .page-scroll{position:relative;inset:auto;height:auto;overflow:visible;scroll-snap-type:none}
html.drafted-pages[data-workspace-page=setup] .section-editor{display:none!important}
html.drafted-pages[data-workspace-page=editor] :is(.page-start,#section-input){display:none!important}
html.drafted-pages[data-workspace-page=editor][data-workspace-ready=false] .section-editor{display:none!important}

/* Development mode is outside the document/print DOM and never overlaps controls. */
html.drafted-pages{--drafted-env-height:36px}
.drafted-environment{height:var(--drafted-env-height);display:flex;align-items:center;justify-content:center;gap:12px;padding:4px 12px;box-sizing:border-box;background:#e8f4f4;color:#153f48;border-bottom:1px solid #bfd4d9;font:12px/16px system-ui;text-align:center}
.drafted-environment[data-mode=integration-blocked]{background:#fff4dd;color:#594321;border-color:#e0cda5}
.drafted-environment[data-mode=integration-live]{background:#173744;color:white;border-color:#173744}
.drafted-version-label{font:700 12px/16px system-ui}
.drafted-environment[data-channel=stable]{background:#edf0f5;color:#24384a;border-color:#c2cbd6}
html.drafted-pages[data-workspace-page=setup] .page-scroll>.page-start.drafted-landing{min-height:calc(100svh - var(--drafted-env-height))}
html.drafted-pages[data-workspace-page=editor] .drafted-environment{position:fixed;top:var(--workspace-viewport-top,0px);left:0;right:0;z-index:1100}
html.drafted-pages[data-workspace-page=editor] body>.page-scroll{top:calc(var(--workspace-viewport-top,0px) + var(--drafted-env-height));height:calc(var(--workspace-viewport-height,100dvh) - var(--drafted-env-height))}
@media(max-width:650px){html.drafted-pages{--drafted-env-height:64px}.drafted-environment{flex-direction:column;gap:0;padding:8px}}
@media print{.drafted-environment{display:none!important}}

/* drafted-editor.css – source entrypoint */

@keyframes draftedSpin { to { transform: rotate(360deg); } }



/* The editor fills the viewport within the natural page scroll flow. */
.page-scroll>.section-editor.snap-section.drafted-app.discovery-enabled{
  height:100%!important;min-height:0!important;max-height:100%!important;
  padding:0!important;overflow:hidden;background:#eaf0f3;
}
.section-editor.discovery-enabled .layout-container.editor-container{
  width:100%!important;max-width:none!important;height:100%;min-height:0!important;
  padding:clamp(8px,1.3vw,24px)!important;margin:0;box-sizing:border-box;
  display:flex;flex-direction:column;gap:0;
}
/* Webflow clearfix pseudo-elements would otherwise consume two flex gaps. */
.section-editor.discovery-enabled .editor-container::before,.section-editor.discovery-enabled .editor-container::after{display:none}
.section-editor.discovery-enabled .editor-layout{
  display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:clamp(10px,1.2vw,20px);width:100%;height:100%;min-height:0!important;
  flex:1 1 0!important;padding:0!important;margin:0;
}
.section-editor.discovery-enabled .editor-left,.section-editor.discovery-enabled .editor-right{
  display:flex!important;width:auto!important;height:100%;min-width:0;min-height:0!important;overflow:hidden;
}
.section-editor.discovery-enabled .chat-card,.section-editor.discovery-enabled .cv-card{
  display:flex!important;flex-direction:column;flex:1 1 0;height:100%;min-height:0!important;
  min-width:0;width:100%;padding:18px!important;gap:12px;box-sizing:border-box;overflow:hidden;
  border:1px solid #d4dfe5;border-radius:14px;background:#fff;box-shadow:0 4px 18px #2439440a;
}
.section-editor.discovery-enabled .chat-title{
  flex:0 0 auto;min-height:30px;margin:0;padding:3px 168px 3px 0;text-align:left;font-size:16px;line-height:1.4;
}
.section-editor.discovery-enabled .chat-messages{
  flex:1 1 0!important;min-height:0!important;max-height:none;padding:8px 2px!important;
  overflow:auto!important;overscroll-behavior:contain;scrollbar-gutter:stable;
}
.section-editor.discovery-enabled .chat-input-row{flex:0 0 auto;padding:0;margin:0}
.section-editor.discovery-enabled .form-block,.section-editor.discovery-enabled .form-2{width:100%;min-width:0;margin:0}
.section-editor.discovery-enabled .chat-command-bar{width:100%;gap:8px;padding:8px;box-sizing:border-box}
.section-editor.discovery-enabled .chat-send-button{padding:10px 14px;height:42px;line-height:22px}
.section-editor.discovery-enabled .context-chip-row{flex:0 0 auto;margin:0}
.section-editor.discovery-enabled .context-chip{padding:6px 10px;box-shadow:none}
.section-editor.discovery-enabled #tailor-card{flex:0 0 auto;margin:0;padding:0}
.section-editor.discovery-enabled #tailor-content.is-ready{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0}
.section-editor.discovery-enabled .tailor-title{font-size:13px;line-height:1.3;margin:0;text-align:left}
.section-editor.discovery-enabled .tailor-btn{padding:9px 12px;font-size:12px;line-height:1.3;border-radius:8px;white-space:nowrap}
.section-editor.discovery-enabled .cv-card{position:relative;padding-top:50px!important;background:#f8fafb}
.section-editor.discovery-enabled .cv-tools{top:10px;right:12px;display:flex;flex-direction:row;gap:6px}
.section-editor.discovery-enabled .cv-tools .tool-btn{width:30px;height:30px}
.section-editor.discovery-enabled .cv-document{
  flex:1 1 0!important;min-height:0!important;max-height:none;margin:0;padding:clamp(8px,1.2vw,18px);
  overflow:auto!important;overscroll-behavior:contain;background:#e8edef;border-radius:8px;scrollbar-gutter:stable;
}
.section-editor.discovery-enabled .cv-document-inner{flex:0 0 auto;width:100%;height:auto;min-height:100%;padding:20px;box-sizing:border-box;overflow:visible}
.section-editor.discovery-enabled .drafted-discovery{padding:0}
.section-editor.discovery-enabled .discovery-back{position:sticky;top:0;z-index:2;width:100%;text-align:left;background:#fff;margin-bottom:12px}
@media(max-width:700px) and (min-height:600px){
  .section-editor.discovery-enabled .editor-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1.15fr) minmax(0,1fr);gap:8px}
}
@media(max-width:700px){
  .section-editor.discovery-enabled .chat-card,.section-editor.discovery-enabled .cv-card{padding:12px!important;gap:8px;border-radius:10px}
  .section-editor.discovery-enabled .chat-title{font-size:14px;padding-right:142px;min-height:32px}
  .section-editor.discovery-enabled .cv-card{padding-top:42px!important}
  .section-editor.discovery-enabled .cv-document-inner{padding:12px}
  .section-editor.discovery-enabled .chip-sub{display:none}
  .section-editor.discovery-enabled .context-chip{padding:4px 6px;gap:4px}
  .section-editor.discovery-enabled .chip-label{gap:5px}
  .section-editor.discovery-enabled .chat-command-bar{padding:5px;gap:5px}
  .section-editor.discovery-enabled .chat-send-button{padding:8px 10px;height:38px;line-height:22px;font-size:12px}
  .section-editor.discovery-enabled .chat-input{font-size:14px;padding:8px;height:38px;min-height:38px}
  .section-editor.discovery-enabled .tailor-title{font-size:11px}
  .section-editor.discovery-enabled .tailor-btn{font-size:11px;padding:7px 9px}
}

/* A single application frame contains document actions and the two working panes. */
.section-editor.discovery-enabled .editor-container{gap:0;border:1px solid #cbd7dd;border-radius:16px;overflow:hidden;background:#fff;box-shadow:0 8px 32px #263f4d0d}
.section-editor.discovery-enabled .layout-container.editor-container{padding:0!important;width:calc(100% - 24px)!important;height:calc(100% - 24px);margin:12px;flex:1 1 0;min-height:0}
.workspace-topbar{width:100%;align-self:stretch;display:flex;align-items:center;justify-content:space-between;gap:12px;flex:0 0 auto;min-height:54px;padding:8px 18px;border-bottom:1px solid #dce4e8;background:#f7f9fa;box-sizing:border-box}
.workspace-identity{display:flex;align-items:center;gap:16px;min-width:0;text-align:left}
.workspace-brand{font-size:16px;font-weight:700;letter-spacing:-.5px;color:#243a43;flex:0 0 auto}
.workspace-document-title{border-left:1px solid #cbd6dc;padding-left:16px;font-size:13px;color:#53636b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.section-editor.discovery-enabled .editor-layout{height:auto;gap:0}
.section-editor.discovery-enabled .chat-card,.section-editor.discovery-enabled .cv-card{border:0;border-radius:0;box-shadow:none;padding:16px!important;gap:10px}
.section-editor.discovery-enabled .editor-left{border-right:1px solid #dce4e8}
.section-editor.discovery-enabled .chat-title,.workspace-preview-title{font-size:14px;line-height:20px;font-weight:600;color:#243a43;margin:0;padding:0;min-height:20px;text-align:left;flex:0 0 auto}
.workspace-editor-toolbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;flex:0 0 auto;padding-bottom:10px;border-bottom:1px solid #e8edef}
.workspace-editor-toolbar button,.section-editor.discovery-enabled .workspace-editor-toolbar .tailor-btn{border:1px solid transparent;border-radius:6px;background:transparent;color:#52656e;padding:7px 9px;font:500 12px/1.25 system-ui;cursor:pointer;margin:0;max-width:100%}
.workspace-editor-toolbar button[aria-pressed=true]{background:#e8efed;color:#234b40;border-color:#d0dfd8}
.workspace-editor-toolbar button:hover,.section-editor.discovery-enabled .workspace-editor-toolbar .tailor-btn:hover{background:#eef2f4}
.workspace-editor-toolbar .discovery-launcher{position:static;max-width:100%}
.workspace-editor-toolbar .discovery-launcher::before{display:none}
.section-editor.discovery-enabled .workspace-editor-toolbar #tailor-card{margin-left:auto}
.workspace-editor-toolbar .tailor-title{display:none}
.section-editor.discovery-enabled .cv-card{background:#f3f6f8}
.workspace-preview-title{padding-bottom:10px;border-bottom:1px solid #dfe7eb}
.section-editor.discovery-enabled .cv-document{background:#e6ecef}
@media(max-width:700px){
  .section-editor.discovery-enabled .layout-container.editor-container{width:calc(100% - 12px)!important;height:calc(100% - 12px);margin:6px;border-radius:10px}
  .workspace-topbar{padding:6px 10px;min-height:44px;gap:6px}
  .workspace-identity{gap:8px}.workspace-brand{font-size:14px}.workspace-document-title{padding-left:8px;font-size:12px}
  .section-editor.discovery-enabled .chat-card,.section-editor.discovery-enabled .cv-card{padding:10px!important;gap:6px}
  .workspace-editor-toolbar{gap:3px;padding-bottom:6px}
  .workspace-editor-toolbar button,.section-editor.discovery-enabled .workspace-editor-toolbar .tailor-btn{font-size:11px;padding:6px}
}
@media(max-width:700px) and (min-height:600px){
  .section-editor.discovery-enabled .editor-layout{gap:0;grid-template-rows:minmax(0,1.3fr) minmax(0,1fr)}
  .section-editor.discovery-enabled .editor-left{border-right:0;border-bottom:1px solid #dce4e8}
}
.section-editor.discovery-enabled .workspace-editor-toolbar .tailor-btn{width:auto;min-width:0}
@media(max-height:500px){
  .workspace-topbar{min-height:38px;padding:4px 12px}
  .section-editor.discovery-enabled .chat-card,.section-editor.discovery-enabled .cv-card{padding:8px!important;gap:5px}
  .workspace-editor-toolbar{padding-bottom:5px;gap:3px}
  .workspace-editor-toolbar button,.section-editor.discovery-enabled .workspace-editor-toolbar .tailor-btn{font-size:11px;padding:5px 7px}
  .section-editor.discovery-enabled .chat-command-bar{padding:4px;gap:4px}
  .section-editor.discovery-enabled .chat-send-button{height:32px;padding:5px 10px;line-height:22px;font-size:12px}
  .section-editor.discovery-enabled .chat-input{height:32px;min-height:32px;padding:5px 8px;font-size:14px}
  .section-editor.discovery-enabled .context-chip{padding:3px 6px;font-size:11px}
  .section-editor.discovery-enabled .chip-badge,.section-editor.discovery-enabled .chip-btn{padding:4px 6px;font-size:11px}
  .section-editor.discovery-enabled .chip-sub{display:none}
}

/* page behavior */
html,body {height:100%;overflow:hidden!important;}
/* The header is an ordinary first child of the shared scroll container. */
.navbar.w-nav {position:relative;inset:auto;width:100%;z-index:10;box-sizing:border-box;}
.page-scroll {
  position:fixed;inset:0;height:100dvh;
  overflow-y:auto;overflow-anchor:none;scroll-snap-type:y mandatory;scroll-behavior:auto;
  -webkit-overflow-scrolling:touch;overscroll-behavior-y:none;
  scroll-padding-top:0!important;
}
/* Full-height workspaces no longer depend on a changing header reservation. */
.page-scroll .snap-section {
  height:100%;min-height:100%;box-sizing:border-box;overflow:hidden;
  scroll-snap-align:start;scroll-snap-stop:always;padding-top:0!important;
}
/* Header and landing share the first snap section; tall content can grow naturally. */
.page-scroll>.page-start {height:auto;min-height:100%;display:flex;flex-direction:column;scroll-snap-align:start;scroll-snap-stop:always;}
.page-start>.navbar.w-nav {flex:0 0 auto;}
.page-scroll>.page-start>.hero-section {height:auto;min-height:0;flex:1 0 auto;padding-bottom:16px;scroll-snap-align:none;scroll-snap-stop:normal;}
.section-cta {scroll-snap-align:start;scroll-snap-stop:always;min-height:100%;box-sizing:border-box;padding-top:80px;padding-bottom:80px;}
.page-scroll>.section-editor.snap-section.drafted-app {
  height:100%!important;min-height:100%!important;max-height:100%!important;margin:0!important;
}



/* components */
.cv-preview-wrap{
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    border-radius: 12px;
  }

  .cv-preview-embed{
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
  }

  .cv-preview-placeholder{
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    pointer-events: none;
    color: rgba(0,0,0,0.55);
  }

  .cv-preview-wrap.has-file .cv-preview-placeholder{
    display: none;
  }

/* Original PDF pages only; no browser PDF plugin or viewer toolbar. */
.source-pdf-view {isolation:isolate;overflow:auto;overscroll-behavior:contain;padding:10px;box-sizing:border-box;background:#edf0f2;scrollbar-gutter:stable;}
.source-pdf-view:focus-visible {outline:2px solid #707980;outline-offset:-2px;}
.source-pdf-slot {position:relative;overflow:hidden;margin:0 auto 12px;background:white;box-shadow:0 1px 5px #24313b20;}
.source-pdf-slot:last-child {margin-bottom:0;}
.source-pdf-paper {position:absolute;inset:0 auto auto 0;transform-origin:0 0;background:white;}
.source-pdf-paper canvas {display:block;}
.source-pdf-status {z-index:2;position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#f8fafbe6;padding:24px;text-align:center;color:#52616c;font:14px/1.5 system-ui;pointer-events:none;}
.source-pdf-status[hidden] {display:none;}
/* Minimal text-layer rules adapted from PDF.js 6.4.299 web/pdf_viewer.css (Apache-2.0). */
.source-pdf-text {position:absolute;inset:0;overflow:clip;text-align:initial;line-height:1;letter-spacing:normal;word-spacing:normal;text-size-adjust:none;forced-color-adjust:none;transform-origin:0 0;caret-color:CanvasText;--min-font-size:1;--text-scale-factor:calc(var(--total-scale-factor) * var(--min-font-size));--min-font-size-inv:calc(1 / var(--min-font-size));}
.source-pdf-text :is(span,br) {color:transparent;position:absolute;white-space:pre;cursor:text;transform-origin:0 0;user-select:text;}
.source-pdf-text>.markedContent {display:contents;}
.source-pdf-text>:not(.markedContent),.source-pdf-text .markedContent span:not(.markedContent) {z-index:1;--font-height:0;font-size:calc(var(--text-scale-factor) * var(--font-height));--scale-x:1;--rotate:0deg;transform:rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));}
.source-pdf-text ::selection {background:#6b9ddb70;color:transparent;}
.source-pdf-link {position:absolute;display:block;background:transparent;}
.source-pdf-link:focus-visible {outline:2px solid #707980;outline-offset:1px;}

  /* ===== Editor preview behavior (text selection + rendering) ===== */
  #editor-preview-text{
    white-space: pre-wrap;
    user-select: text;
    -webkit-user-select: text;
    outline: none;
    cursor: text;
    /* Clip horizontally without creating a nested scroll container that traps the wheel. */
    overflow-x: clip;
    overscroll-behavior: auto;
    padding: 0 !important;
    width: 100%;
    box-sizing: border-box;
  }
  
  /* Hide horizontal scrollbar (WebKit) */
  #editor-preview-text::-webkit-scrollbar:horizontal{
    height: 0;
  }
  
  #editor-preview-text *{
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
  }

 /* --- CV preview spacing fixes (scoped, safer) --- */
#editor-preview-text{
  line-height: 1.35;
}

#editor-preview-text h1,
#editor-preview-text h2,
#editor-preview-text h3,
#editor-preview-text p{
  margin: 0;
}

#editor-preview-text .cv-block-body{
  padding: 4px 6px;
}

#editor-preview-text .cv-block{
  margin-bottom: 10px;
}

#editor-preview-text .cv-block--experience,
#editor-preview-text .cv-block--education{
  margin-bottom: 12px;
}

#editor-preview-text .cv-block--title{
  margin-bottom: 8px;
}

#editor-preview-text .cv-block--summary{
  margin-bottom: 14px;
}

#editor-preview-text .cv-section{
  margin-top: 18px;           /* lite mer luft före sektion */
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.10);
}

#editor-preview-text .cv-section-heading{
  font-size: 13px;            /* mindre än rolltitlar */
  font-weight: 800;
  letter-spacing: 0.08em;     /* ger “SECTION” känsla */
  text-transform: uppercase;
  opacity: 0.75;
  margin: 0 0 8px;
}

#editor-preview-text .cv-title{
  margin-bottom: 6px;
  line-height: 1.15;
}

#editor-preview-text .cv-exp-title,
#editor-preview-text .cv-edu-degree{
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;       /* viktig skillnad mot sektion */
  opacity: 0.95;
  margin-bottom: 4px;
}

#editor-preview-text .cv-exp-meta,
#editor-preview-text .cv-edu-meta{
  margin-bottom: 4px;
  line-height: 1.2;
}

/* avoid extra whitespace at the very end */
#editor-preview-text > .cv-block:last-of-type{
  margin-bottom: 0;
}
/* --- FIX: do NOT pre-wrap the whole preview DOM (it renders indentation/newlines) --- */
#editor-preview-text{
  white-space: normal !important; /* collapse whitespace text nodes between sections */
}

/* Keep pre-wrapping only where you render text content */
#editor-preview-text .cv-block-body{
  white-space: pre-wrap;          /* preserve intentional line breaks inside content */
}

  /* ===============================
     Click-select blocks (premium + consistent padding)
     =============================== */
     .cv-block{
        cursor: pointer;
        position: relative;
        border-radius: 12px;
        transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
        padding-inline-start: 10px;
        padding-inline-end: 10px;
        margin-inline-start: 15px;
        margin-inline-end: 15px;
      }
      
      .cv-block:hover{
        background: rgba(0,0,0,0.02);
      }
      
      .cv-block.is-selected{
        background: rgba(255, 210, 80, 0.40);
        box-shadow: 0 10px 25px rgba(0,0,0,0.06);
      }

      
      /* ===============================
   FULL CV SCOPE (global selection)
   =============================== */

.cv-document-inner.is-scope-full{
    position: relative;
  }
  
  /* Subtil ram som matchar block-highlightens gulhet */
  .cv-document-inner.is-scope-full::before{
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 14px;
    pointer-events: none;
  
    outline: 2px solid rgba(255, 210, 80, 0.55);
    outline-offset: 6px;
  
    box-shadow:
      0 0 0 10px rgba(255, 210, 80, 0.10),
      0 18px 50px rgba(0,0,0,0.10);
  }
  
  /* Badge: gör scope explicit */
  .cv-document-inner.is-scope-full::after{
    content: "Full CV selected";
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    pointer-events: none;
  
    font-size: 12px;
    font-weight: 800;
    padding: 7px 10px;
    border-radius: 999px;
  
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0,0,0,0.10);
    box-shadow: 0 10px 22px rgba(0,0,0,0.10);
  }
  

       /* ===============================
     Typography helpers
     =============================== */
  .cv-title{
    white-space: normal;
    overflow-wrap: anywhere;
    max-width: 100%;
    display: block;
    font-size: clamp(18px, 1.6vw, 24px);
    line-height: 1.15;
    letter-spacing: normal;
    text-transform: none;
  }
  
  .cv-block--experience {
    margin-bottom: 18px;
  }
  
  .cv-exp-title {
    font-weight: 600;
    letter-spacing: normal !important;
    text-transform: none;
  }
  
  .cv-exp-meta {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 4px;
  }
  
  .cv-exp-company {
    font-weight: 500;
  }
  
  .cv-exp-period {
    margin-left: 4px;
  }
  
  .cv-edu-degree {
    font-weight: 600;
    letter-spacing: normal !important;
    text-transform: none;
    margin-bottom: 2px;
  }
  
  .cv-edu-meta {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 6px;
  }
  
  .cv-edu-inst {
    font-weight: 500;
  }
  
  .cv-edu-period {
    margin-left: 4px;
  }
  
  .cv-section{
    margin: 18px 15px 6px;
  }
  
  .cv-section-heading{
    font-size: 16px;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
    opacity: 0.9;
  }
  
  /* Global default: body text is left-aligned */
  .cv-block-body {
    text-align: left;
    padding: 12px;
  }
/* ===============================
   CONTEXT CHIP (CLEAN, SEMANTIC)
   =============================== */

   .context-chip{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 100%;
    padding: 10px 12px;
  
    font-size: 13px;
    line-height: 1.2;
  
    background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 999px;
  
    box-shadow:
      0 10px 25px rgba(0,0,0,0.06),
      0 2px 6px rgba(0,0,0,0.05);
  }
  
  .context-chip.is-hidden{
    display: none;
  }
  
  /* ---------- LABEL ---------- */
  
  .context-chip .chip-label{
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
  }
  
  .context-chip .chip-badge{
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
  
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(0,0,0,0.08);
  
    flex: 0 0 auto;
  }
  
  .context-chip .chip-title{
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.01em;
    flex: 0 0 auto;
  }
  
  .context-chip .chip-sub{
    font-size: 13px;
    opacity: 0.65;
  
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  /* ---------- ACTIONS ---------- */
  
  .context-chip .chip-actions{
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
  }
  
  .context-chip .chip-btn{
    padding: 7px 10px;
    border-radius: 999px;
  
    font-size: 12.5px;
    font-weight: 700;
  
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.10);
    background: rgba(255,255,255,0.9);
  
    transition:
      transform .12s ease,
      box-shadow .12s ease,
      background .12s ease,
      opacity .12s ease;
  }
  
  .context-chip .chip-btn:hover{
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(0,0,0,0.08);
    background: #ffffff;
  }
  
  .context-chip .chip-btn:active{
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  }
  
  .context-chip .chip-btn:disabled{
    opacity: 0.45;
    cursor: default;
    box-shadow: none;
    transform: none;
  }
  
  /* ---------- BUTTON VARIANTS ---------- */
  
  .context-chip .chip-btn--ghost{
    background: transparent;
    border: 1px solid rgba(0,0,0,0.10);
  }
  
  .context-chip .chip-btn--primary{
    background: #111;
    color: #fff;
    border-color: rgba(0,0,0,0.22);
  }
  
  .context-chip .chip-btn--primary:hover{
    background: #000;
  }
  
  /* ---------- CONTEXT VARIANTS ---------- */
  
  .context-chip.chip--selection{
    border-color: rgba(255, 200, 60, 0.35);
    box-shadow:
      0 14px 30px rgba(255, 200, 60, 0.10),
      0 10px 25px rgba(0,0,0,0.06),
      0 2px 6px rgba(0,0,0,0.05);
  }
  
  .context-chip.chip--full{
    border-color: rgba(0,0,0,0.12);
  }
  
  .context-chip.chip--chat{
    border-color: rgba(0,0,0,0.08);
  }
  
  /* ===============================
   FORCE CHIP BUTTON RESET
   =============================== */

.context-chip .chip-btn{
    all: unset;
    box-sizing: border-box;
  
    display: inline-flex;
    align-items: center;
    justify-content: center;
  
    padding: 8px 12px;
    border-radius: 999px;
  
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1;
  
    cursor: pointer;
  
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(0,0,0,0.14);
  
    transition:
      background .15s ease,
      box-shadow .15s ease,
      transform .12s ease,
      opacity .12s ease;
  }
  
  .context-chip .chip-btn:hover{
    background: #ffffff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.10);
    transform: translateY(-1px);
  }
  
  .context-chip .chip-btn:active{
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0,0,0,0.10);
  }
  
  .context-chip .chip-btn:disabled{
    opacity: 0.45;
    cursor: default;
    box-shadow: none;
    transform: none;
  }
  
  .context-chip .chip-btn--ghost{
    background: transparent;
    border-color: rgba(0,0,0,0.12);
  }
  
  .context-chip .chip-btn--primary{
    background: #111;
    color: #fff;
    border-color: #111;
  }
  
  .context-chip .chip-btn--primary:hover{
    background: #000;
  }
  
/* Proposal card */
.drafted-proposal-card{
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 14px;
    padding: 14px 14px 12px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(0,0,0,0.08);
  }
  
  .drafted-proposal-card ul{
    margin: 10px 0 0 18px;
  }
  
  .drafted-proposal-card li{
    margin: 4px 0;
  }
  
  /* Button (single source of truth) */
  .drafted-proposal-card button{
    appearance: none;
    border: 1px solid rgba(0,0,0,0.14);
    background: #fff;
    border-radius: 999px;
  
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  
    padding: 10px 12px; /* final value you’re using now */
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
  
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }
  
  .drafted-proposal-card button:disabled{
    opacity: 0.6;       /* final value you’re using now */
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
  }
  
  /* Hover/active only when enabled */
  .drafted-proposal-card button:not(:disabled):hover{
    box-shadow: 0 10px 18px rgba(0,0,0,0.10);
    transform: translateY(-1px);
  }
  
  .drafted-proposal-card button:not(:disabled):active{
    transform: translateY(0);
    box-shadow: none;
  }
  
  /* Spinner */
  .drafted-btn-spinner{
    width: 14px;
    height: 14px;
    min-width: 14px;
    min-height: 14px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-top-color: transparent;
    display: inline-block;
    animation: draftedSpin 0.8s linear infinite;
  }
  
  .drafted-btn-spinner[hidden]{
    visibility: hidden;
  }
  
/* ===============================
     CHAT LAYOUT
     =============================== */
  
     /* Keep the example visibly separate from the user's real conversation. */
     .drafted-chat-demo {
       flex: 0 0 auto;
       padding: 18px;
       border: 1px dashed #c5cbd0;
       border-radius: 16px;
       background: #f8f9fa;
       text-align: left;
     }

     .drafted-chat-demo__heading {
       display: inline-block;
       padding: 4px 10px;
       border-radius: 6px;
       background: #e6eaee;
       color: #333;
       font-size: 12px;
       font-weight: 600;
       letter-spacing: 0.03em;
     }

     .drafted-chat-demo__note {
       margin: 10px 0 16px;
       color: #50565c;
       font-size: 14px;
       line-height: 1.5;
     }

     .drafted-chat-demo__messages {
       display: flex;
       flex-direction: column;
       gap: 12px;
     }

     .drafted-chat-demo .chat-message-ai {
       max-width: 90%;
       margin: 0;
       padding: 12px 14px;
       background: #fff;
       border: 1px solid #e0e3e6;
       border-radius: 12px;
       box-shadow: none;
       color: #50565c;
       font-size: 14px;
       line-height: 1.5;
       text-align: left;
     }

     .drafted-chat-demo .chat-message-user {
       align-self: flex-end;
       background: #eef0f2;
     }

     .chat-messages {
        display: flex;
        flex-direction: column;
        gap: 12px;
      }
      
      .chat-message {
        max-width: 78%;
        padding: 14px 16px;
        border-radius: 16px;
        line-height: 1.35;
        white-space: pre-wrap;
        text-align: left;
        background: #fff;
        border: 1px solid rgba(0,0,0,0.08);
        box-shadow: 0 10px 26px rgba(0,0,0,0.08);
      }
      
      .chat-message.ai {
        align-self: flex-start;
        background: #ffffff;
      }
      
      .chat-message.user {
        align-self: flex-end;
        background: #111;
        color: #f7f7f7;
      }
      
      /* System message */
      .chat-message.system {
        align-self: flex-start;
        opacity: 0.95;
        background: rgba(0,0,0,0.02);
        border-color: rgba(0,0,0,0.06);
        box-shadow: none;
      }

.drafted-discovery{margin:16px 0;padding:18px;border:1px solid #d5dadd;border-radius:12px;background:#fff;color:#24292d;text-align:left;flex:0 0 auto;overflow-wrap:anywhere}
.drafted-discovery[hidden]{display:none!important}.drafted-discovery h2{font-size:19px;line-height:1.45;margin:0 0 12px}.drafted-discovery p{font-size:14px;line-height:1.55;margin:10px 0}
.drafted-discovery button,.drafted-discovery select{font:inherit;font-size:14px;padding:9px 12px;margin:8px 8px 0 0;border:1px solid #9ca5ab;border-radius:7px;background:#fff;color:#24292d;cursor:pointer;max-width:100%}
.drafted-discovery button:disabled{opacity:.55;cursor:wait}.drafted-discovery textarea{font:inherit;font-size:15px;line-height:1.5;display:block;box-sizing:border-box;width:100%;min-height:110px;resize:vertical;margin:10px 0;padding:12px;border:1px solid #9ca5ab;border-radius:8px;background:white;color:#24292d}
.drafted-discovery button:focus-visible,.drafted-discovery textarea:focus-visible,.drafted-discovery select:focus-visible{outline:3px solid #416fbc;outline-offset:2px}.drafted-discovery .discovery-note{font-size:12px;color:#59636a}.drafted-discovery .discovery-progress{font-weight:700}.drafted-discovery .discovery-answer{white-space:pre-wrap;background:#f4f6f7;padding:10px;border-radius:6px}.drafted-discovery details{margin-top:16px;border-top:1px solid #e1e5e8;padding-top:10px}.drafted-discovery summary{cursor:pointer;font-size:14px}.drafted-discovery [role=alert]{color:#8a1d1d}
/* The actual chat pane must remain scrollable as discovery grows. */
.chat-messages{min-height:0;overflow-y:auto}.drafted-discovery .discovery-history-question{font-weight:600}
.local-preview-banner{position:fixed;top:0;left:0;right:0;z-index:100000;padding:8px;background:#fff4d6;color:#342800;text-align:center;font:13px/1.4 system-ui}#load-preview-scenario{margin:48px 16px 16px}

/* One editor card, two views. Chat nodes and its draft stay mounted while paused. */
.section-editor.discovery-enabled .chat-card{position:relative}
.discovery-launcher{position:absolute;top:16px;right:18px;border:1px solid #d5dadd;border-radius:20px;background:#f6f8fa;color:#35434d;padding:7px 12px;font:500 12px/1.4 system-ui;cursor:pointer;max-width:calc(100% - 36px)}
.discovery-launcher::before{content:'';display:inline-block;width:6px;height:6px;margin-right:7px;border-radius:50%;background:#50786a;vertical-align:middle}
.discovery-launcher[hidden],.drafted-discovery[hidden]{display:none!important}
.discovery-launcher:focus-visible,.discovery-back:focus-visible{outline:3px solid #416fbc;outline-offset:2px}
.chat-card.discovery-mode .chat-messages>:not(.drafted-discovery),.chat-card.discovery-mode .chat-input-row,.chat-card.discovery-mode #tailor-card,.chat-card.discovery-mode .context-chip-row{display:none!important}
.chat-card.discovery-mode .chat-messages{display:flex!important;padding-inline:6px!important}
.chat-card.discovery-mode .drafted-discovery{margin:0;padding:0;border:0;border-radius:0;background:transparent}
.drafted-discovery .discovery-back{border:0;background:transparent;padding:4px 0;margin:0 0 20px;color:#52616c;font-size:13px}
.drafted-discovery .discovery-back::before{content:'←';margin-right:8px}
@media(max-width:600px){.discovery-launcher{right:12px;top:12px;font-size:11px}}

/* Planning is proactive; a count is shown only after the validated plan exists. */
.discovery-count{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;margin-left:6px;padding:0 4px;border-radius:9px;background:#dce9e4;color:#234b40;font-size:11px;font-weight:600;box-sizing:border-box}
.discovery-count[hidden]{display:none}
.workspace-editor-toolbar .discovery-launcher[data-plan-state=loading]::after{content:'';display:inline-block;width:10px;height:10px;margin-left:7px;border:2px solid #cedad6;border-top-color:#385f51;border-radius:50%;vertical-align:middle;animation:discovery-planning-spin .8s linear infinite}
.workspace-editor-toolbar .discovery-launcher[data-plan-state=error]::after{content:'!';margin-left:6px;color:#865b25;font-weight:700}
@keyframes discovery-planning-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.workspace-editor-toolbar .discovery-launcher[data-plan-state=loading]::after{animation:none}}

/* The exact source and original question stay readable in the panel's flow. */
.drafted-discovery .discovery-followup-context{margin:8px 0 24px;padding:16px 18px;border:1px solid #e0e8ed;border-radius:9px;background:#f4f8fa;color:#405665}
.drafted-discovery .discovery-followup-context .discovery-result-label{margin:0 0 6px;font:600 13px/1.5 system-ui;color:#526a7a}
.drafted-discovery .discovery-followup-context .discovery-source-question,
.drafted-discovery .discovery-followup-context .discovery-previous-answer{max-height:none;overflow:visible;white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font:400 15px/1.6 system-ui;border:0;padding:0}
.drafted-discovery .discovery-followup-context .discovery-source-question{margin-bottom:16px}
.drafted-discovery .discovery-followup-turn+.discovery-followup-turn{border-top:1px solid #dce5eb;padding-top:16px;margin-top:16px}
.drafted-discovery .discovery-followup-label{margin:0 0 6px;font:600 13px/1.5 system-ui;color:#007f82}
.drafted-discovery .discovery-followup-label+h2{font-size:21px;line-height:1.4}
.drafted-discovery .discovery-original-context{margin-top:16px}
.drafted-discovery .discovery-result{border:1px solid #dce4e1;border-radius:10px;padding:14px 16px;margin:14px 0;background:#fafcfb}
.drafted-discovery .discovery-result h3{font-size:15px;line-height:1.5;margin:0 0 8px}
.drafted-discovery .discovery-result-label{font-weight:600;font-size:13px;margin-bottom:4px}
.drafted-discovery .discovery-answer{margin:8px 0;font-size:14px;line-height:1.55}
.drafted-discovery .discovery-cv-status{padding:12px 14px;background:#edf3f0;border-radius:8px}
.drafted-discovery ul{padding-left:20px;margin:8px 0;font-size:14px;line-height:1.55}

/* Compact, contextual next step within the existing editor scroll pane. */
.discovery-guidance{flex:0 0 auto;padding:14px 16px;margin:0 0 12px;border:1px solid #dce4e1;border-radius:10px;background:#f7faf8;color:#24292d;text-align:left;overflow-wrap:anywhere}
.discovery-guidance[hidden]{display:none!important}.discovery-guidance h2{font:600 15px/1.4 system-ui;margin:0 0 6px}.discovery-guidance p{font:13px/1.5 system-ui;margin:6px 0}.discovery-guidance .discovery-note{font-size:12px;color:#59636a}
.discovery-guidance button{font:500 13px/1.4 system-ui;padding:7px 11px;margin:5px 8px 0 0;border:1px solid #9ca5ab;border-radius:7px;background:white;color:#24292d;cursor:pointer}.discovery-guidance button:focus-visible{outline:3px solid #416fbc;outline-offset:2px}.discovery-guidance button:disabled{opacity:.55;cursor:default}
.tailor-suggestion blockquote{white-space:pre-wrap;font-size:13px;margin:8px 0;padding:10px;background:white;border-radius:6px}.tailor-suggestion summary{cursor:pointer;font-size:14px;font-weight:600}.tailor-suggestion details{margin:12px 0}
.drafted-discovery .discovery-finish-primary{background:#111;color:#fff;border-color:#111;font-weight:600}
.chat-messages:has(>.tailor-suggestion,>.tailor-feedback button)>#drafted-discovery-guidance{display:none}
.section-editor #tailor-card[hidden]{display:none!important}
.tailor-progress{flex:0 0 auto;margin:4px 0 16px;font:14px/1.5 system-ui;color:#52656e}
.drafted-discovery .discovery-question-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin:14px 0 8px}
.drafted-discovery .discovery-question-actions button{margin:0}

.tailor-context-question,.tailor-review-warning{padding:12px;margin:12px 0;border-left:3px solid #bd8538;background:#fff8e9;border-radius:4px}
.tailor-context-question h3,.tailor-review-warning h3{font-size:14px;margin:0 0 6px}.tailor-context-question textarea{display:block;box-sizing:border-box;width:100%;font:14px/1.5 system-ui;padding:9px;border:1px solid #9ca5ab;border-radius:6px;resize:vertical;min-height:70px}.tailor-context-question textarea:focus-visible{outline:3px solid #416fbc;outline-offset:2px}

/* Tailor has one active surface: a sourced context question OR a detached review. */
.chat-messages:has(>.tailor-context-mode)>:not(.tailor-context-mode):not(.drafted-discovery){display:none!important}
.chat-card:has(.tailor-suggestion) .chat-input-row,.chat-card:has(.tailor-suggestion) .context-chip-row{display:none!important}
.tailor-context-mode textarea{display:block;box-sizing:border-box;width:100%;min-height:90px;margin:12px 0;padding:10px;border:1px solid #9ca5ab;border-radius:7px;font:inherit;resize:vertical}
.tailor-context-mode textarea:focus-visible{outline:3px solid #416fbc;outline-offset:2px}
.tailor-context-mode blockquote{max-height:6em;overflow:auto;border-left:3px solid #dce4e1}
.tailor-actions{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 16px}
.tailor-actions button{margin:0}
.discovery-guidance .tailor-primary{background:#111;color:#fff;border-color:#111}

  /* ===============================
     DOWNLOAD & COPY TO CLIPBOARD BUTTONS
     =============================== */
     .tool-item {
        position: relative;
      }
      
      .tool-tip {
        position: absolute;
        right: 44px;
        top: 50%;
        transform: translateY(-50%);
        padding: 6px 10px;
        border-radius: 999px;
        background: #111;
        color: #fff;
        font-size: 12px;
        line-height: 1;
        white-space: nowrap;
      
        opacity: 0;
        pointer-events: none;
        transition: opacity 150ms ease;
      }
      
      .tool-item:hover .tool-tip {
        opacity: 1;
      }
#jobcontext-status{
    display: none;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.2;
    margin-top: 6px;
  }
  
  #jobcontext-status[data-state="loading"]{
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,0.04);
    color: #111;
  }
  
  #jobcontext-status[data-state="ready"]{
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(16,185,129,0.10);
    color: #111;
  }
  
  #jobcontext-status[data-state="error"]{
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(239,68,68,0.10);
    color: #111;
  }
  
  #jobcontext-status-icon{
    width: 16px;
    text-align: center;
    opacity: 0.9;
  }
  


/* states */
  /* ===== Force buttons to look active unless actually disabled ===== */
  #editor-send,
  #editor-chat-send{
    opacity: 1 !important;
    pointer-events: auto !important;
    filter: none !important;
  }
  
  #editor-send[disabled],
  #editor-chat-send[disabled]{
    opacity: 0.55 !important;
    pointer-events: none !important;
    filter: grayscale(30%) !important;
  }

    /* ===============================
     COMMAND BAR - NON-STACKING COMMANDS
     =============================== */
     .chat-input-row.is-locked {
        opacity: 0.7;
      }
      
      .chat-input-row.is-locked textarea,
      .chat-input-row.is-locked button {
        cursor: not-allowed;
      }
      
      #editor-chat-send:disabled,
      #editor-send:disabled {
        opacity: 0.6;
      }
      

      /* ===============================
   FILE PICKER (CUSTOM)
   =============================== */

.file-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  
    padding: 10px 14px;
    border-radius: 10px;
  
    font-size: 13px;
    font-weight: 700;
  
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.12);
    background: #fff;
    color: #111;
  
    box-shadow:
      0 6px 14px rgba(0,0,0,0.08);
  
    transition:
      background .15s ease,
      box-shadow .15s ease,
      transform .12s ease;
  }
  
  .file-btn:hover{
    background: #fff;
    box-shadow:
      0 10px 22px rgba(0,0,0,0.12);
    transform: translateY(-1px);
  }
  
  .file-btn:active{
    transform: translateY(0);
    box-shadow:
      0 4px 10px rgba(0,0,0,0.10);
  }
  
  /* Filename text */
  .file-name{
    margin-left: 10px;
    font-size: 13px;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
  }

  .file-picker{
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .file-picker #cv-file{
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
  }
  
  .file-picker .file-btn{
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  

    
/* ===============================
     UPLOAD LOADING (button + preview overlay)
     =============================== */
  
  /* Button: keep layout stable + show spinner */
  #upload-btn{
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }
  
  #upload-btn[disabled]{
    opacity: 0.75;
    cursor: not-allowed;
  }
  
  /* Small spinner that matches your existing style */
  .drafted-upload-spinner{
    width: 14px;
    height: 14px;
    min-width: 14px;
    min-height: 14px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-top-color: transparent;
    display: inline-block;
    animation: draftedSpin 0.8s linear infinite;
  }
  
  /* When hidden, keep space to avoid button "jump" */
  .drafted-upload-spinner[hidden]{
    visibility: hidden;
  }
  
  /* Overlay inside preview area */
  .cv-preview-loading{
    position: absolute;
    inset: 0;
    display: none;             
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px;
    z-index: 5;
    pointer-events: none;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
  
  .cv-preview-wrap.is-loading .cv-preview-loading{
    display: flex;
  }
  
  .cv-preview-loading .inner{
    max-width: 420px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 10px 26px rgba(0,0,0,0.08);
  }
  
  .cv-preview-loading .title{
    font-weight: 700;
    margin-bottom: 6px;
  }
  
  .cv-preview-loading .meta{
    opacity: 0.75;
    font-size: 13px;
    line-height: 1.35;
  }
  
  .cv-preview-loading .row{
    display: inline-flex;
    align-items: center;
    gap: 10px;
  }
 /* Editor processing state (right panel) */
 .cv-document-inner { position: relative; }
  
 .editor-processing {
   display: none;
   position: absolute;
   inset: 0;
   align-items: flex-start; 
   justify-content: center;
   text-align: center;
   padding-top: 120px;    
   padding-left: 28px;
   padding-right: 28px;
   pointer-events: none;
 }
 
 .cv-document-inner.is-processing .editor-processing {
   display: flex;
 }
 
 .editor-processing__inner {
   max-width: 460px;
   padding: 14px 16px;
   border-radius: 12px;
   background: rgba(255,255,255,0.92);
   border: 1px solid rgba(0,0,0,0.10);
   box-shadow: 0 12px 30px rgba(0,0,0,0.10);
   backdrop-filter: blur(3px);
   -webkit-backdrop-filter: blur(3px);
 }
 
 .editor-processing__title {
   font-weight: 700;
   margin-bottom: 6px;
   color: rgba(0,0,0,0.88);
 }
 
 .editor-processing__meta {
   font-size: 13px;
   line-height: 1.4;
   color: rgba(0,0,0,0.62);
 }
 
 .editor-processing {
   z-index: 5;
 }
 
 .cv-document-inner.is-processing > *:not(.editor-processing) {
   visibility: hidden;
 }
  /* ===============================
     Editor placeholder state
     =============================== */
  
  /* Default: hide placeholder */
  .editor-placeholder{
    display: none;
  }
  
  /* Show only when JS says so */
  .cv-document-inner.has-placeholder .editor-placeholder{
    display: flex;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    pointer-events: none;
    z-index: 2;
  }
  
  /* Optional: keep placeholder above CV content but below processing overlay */
  .cv-document-inner.has-placeholder #editor-preview-text{
    visibility: hidden;
  }

/* utilities (last word) */
.drafted-highlight{
    background: rgba(255, 210, 80, 0.40);
    border-radius: 4px;
    padding: 0 2px;
  }



@font-face {font-family:"Drafted Sans";src:url("./assets/fonts/LiberationSans-Regular.ttf") format("truetype");font-weight:400;font-style:normal;font-display:block;}
@font-face {font-family:"Drafted Sans";src:url("./assets/fonts/LiberationSans-Bold.ttf") format("truetype");font-weight:700;font-style:normal;font-display:block;}
/* Shared A4 document stylesheet; keep physical layout independent of viewer size.
 * Step 2 must use these exact rules and the same renderer/font/browser version.
 */
:is(.cv-layout,#editor-preview-text) .cv-page {
  width:210mm; height:297mm; min-width:210mm; max-width:none!important;
  padding:17mm 18mm 18mm; box-sizing:border-box; position:relative;
  background:#fff; color:#24313b; font:10.5pt/1.48 "Drafted Sans", sans-serif;
  text-align:left; letter-spacing:normal; transform-origin:top left;
  box-shadow:0 2px 10px #2333421c;
}
:is(.cv-layout,#editor-preview-text) .cv-page *, :is(.cv-layout,#editor-preview-text) .cv-page *::before, :is(.cv-layout,#editor-preview-text) .cv-page *::after {box-sizing:border-box;max-width:100%;user-select:text;-webkit-user-select:text;}
:is(.cv-layout,#editor-preview-text) .cv-page-content {height:100%;display:flow-root;overflow:visible;}
:is(.cv-layout,#editor-preview-text) .cv-block,:is(.cv-layout,#editor-preview-text) .cv-document-heading {display:flow-root;margin:0;padding:0;border:0;border-radius:2px;transition:none;}
:is(.cv-layout,#editor-preview-text) .cv-block {cursor:pointer;}
:is(.cv-layout,#editor-preview-text) .cv-block:hover {background:#edf3f866;}
:is(.cv-layout,#editor-preview-text) .cv-block.is-selected {background:#fff0b5;box-shadow:inset 3px 0 #c29322;}
:is(.cv-layout,#editor-preview-text) .cv-page h1,:is(.cv-layout,#editor-preview-text) .cv-page h2,:is(.cv-layout,#editor-preview-text) .cv-page h3,:is(.cv-layout,#editor-preview-text) .cv-page p,:is(.cv-layout,#editor-preview-text) .cv-page ul,:is(.cv-layout,#editor-preview-text) .cv-page li {padding:0;margin:0;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;text-transform:none;letter-spacing:normal;}
:is(.cv-layout,#editor-preview-text) .cv-page .cv-title {font:700 25pt/1.12 "Drafted Sans",sans-serif;color:#192e3c;margin:0 0 7mm;}
:is(.cv-layout,#editor-preview-text) .cv-page .cv-person-name {margin-bottom:3mm;}
:is(.cv-layout,#editor-preview-text) .cv-page .cv-headline {font:400 12pt/1.4 "Drafted Sans",sans-serif;color:#52616c;margin:0 0 4mm;}
:is(.cv-layout,#editor-preview-text) .cv-page .cv-header-contact {font:400 9.5pt/1.45 "Drafted Sans",sans-serif;color:#52616c;margin:0 0 4mm;}
:is(.cv-layout,#editor-preview-text) .cv-page .cv-section-heading {font:700 11pt/1.4 "Drafted Sans",sans-serif;color:#294959;letter-spacing:.09em;text-transform:uppercase;border-top:1px solid #c5d0d5;padding-top:4mm;margin:4mm 0 3mm;opacity:1;}
:is(.cv-layout,#editor-preview-text) .cv-page .cv-exp-title,:is(.cv-layout,#editor-preview-text) .cv-page .cv-edu-degree {font:700 11.5pt/1.35 "Drafted Sans",sans-serif;color:#223744;margin:3mm 0 1mm;opacity:1;}
:is(.cv-layout,#editor-preview-text) .cv-page .cv-entry-meta {font:400 9.5pt/1.4 "Drafted Sans",sans-serif;color:#52616c;margin:0 0 2.5mm;}
:is(.cv-layout,#editor-preview-text) .cv-page .cv-block-body {font:inherit;text-align:left;padding:0;margin:0 0 2.2mm;white-space:pre-wrap;}
:is(.cv-layout,#editor-preview-text) .cv-page .cv-list {list-style:none;margin:0;padding:0;}
:is(.cv-layout,#editor-preview-text) .cv-page .cv-list-item {padding-left:3.5mm;text-indent:-3.5mm;}
:is(.cv-layout,#editor-preview-text) .cv-page .cv-list-item.cv-break-long-token {word-break:break-all;}
:is(.cv-layout,#editor-preview-text) .cv-page-number {position:absolute;bottom:8mm;left:18mm;right:18mm;border-top:1px solid #dce2e6;padding-top:2mm;color:#65727b;font:9pt/1.3 "Drafted Sans",sans-serif;text-align:right;}
.cv-layout-measure {position:fixed!important;left:-20000px;top:0;width:210mm;visibility:hidden;pointer-events:none;}
.cv-layout-measure .cv-page {transform:none!important;}
/* Viewer only: scaling never changes the measured document width or type size. */
:is(.cv-layout,#editor-preview-text):not(.cv-layout-measure) {display:flex;flex-direction:column;align-items:center;gap:18px;width:100%;overflow:visible;}
:is(.cv-layout,#editor-preview-text):not(.cv-layout-measure) .cv-page-slot {position:relative;flex:none;max-width:none;}
:is(.cv-layout,#editor-preview-text):not(.cv-layout-measure) .cv-page {position:absolute;top:0;left:0;}
.section-editor.discovery-enabled .cv-document-inner:has(>.cv-layout) {padding:0;min-height:0;background:transparent;border:0;box-shadow:none;}
.workspace-page-count {margin-left:auto;color:#52616c;font:500 12px/1.4 "Drafted Sans",sans-serif;white-space:nowrap;letter-spacing:normal;text-transform:none;}
.workspace-preview-title {display:flex;align-items:center;gap:12px;}
.workspace-preview-title .workspace-preview-label {margin:0;padding:0;font:inherit;color:inherit;min-width:0;}
.workspace-preview-action {flex:none;border:1px solid #bac8d0;border-radius:6px;background:#fff;color:#24313b;padding:7px 10px;font:500 12px/1.4 "Drafted Sans",sans-serif;min-height:34px;white-space:nowrap;cursor:pointer;}
.workspace-preview-action[hidden] {display:none!important;}
.workspace-preview-action:disabled {opacity:.55;cursor:default;}
.workspace-preview-action:focus-visible,.cv-document:focus-visible {outline:2px solid #315d71;outline-offset:2px;}
.cv-preview-dialog {position:fixed;inset:0;width:min(1120px,calc(100vw - 32px));height:calc(100dvh - 32px);max-width:none;max-height:none;margin:auto;padding:0;border:1px solid #bac8d0;border-radius:12px;overflow:hidden;box-sizing:border-box;background:#f3f6f8;color:#24313b;}
.cv-preview-dialog[open] {display:flex;}
.cv-preview-dialog::backdrop {background:#132b3dcc;}
.section-editor.discovery-enabled .cv-preview-dialog .cv-card {width:100%;height:100%;border:0;border-radius:0;padding:16px!important;}
.cv-preview-placeholder {flex:1;min-width:0;min-height:0;}
@media(max-width:700px){
  .workspace-preview-title {gap:8px;}
  .workspace-preview-action {padding:7px 8px;}
  .cv-preview-dialog {width:calc(100vw - 12px);height:calc(100dvh - 12px);border-radius:8px;}
  .section-editor.discovery-enabled .cv-preview-dialog .cv-card {padding:10px!important;}
}
/* Fixed presentation variants, applied before measuring AND before printing.
 * Compact uses 10pt body text; no size depends on content or panel width. */
:is(.cv-layout,#editor-preview-text)[data-cv-design="compact_v1"] .cv-page {padding:14mm 16mm 17mm;font-size:10pt;line-height:1.4;}
:is(.cv-layout,#editor-preview-text)[data-cv-design="compact_v1"] .cv-page .cv-title {font-size:22pt;margin-bottom:4mm;}
:is(.cv-layout,#editor-preview-text)[data-cv-design="compact_v1"] .cv-page .cv-section-heading {font-size:10pt;letter-spacing:.06em;padding-top:2.5mm;margin:2.5mm 0 2mm;}
:is(.cv-layout,#editor-preview-text)[data-cv-design="compact_v1"] .cv-page .cv-exp-title,
:is(.cv-layout,#editor-preview-text)[data-cv-design="compact_v1"] .cv-page .cv-edu-degree {font-size:10.5pt;margin-top:2mm;}
:is(.cv-layout,#editor-preview-text)[data-cv-design="compact_v1"] .cv-page .cv-entry-meta {margin-bottom:1.5mm;}
:is(.cv-layout,#editor-preview-text)[data-cv-design="compact_v1"] .cv-page .cv-block-body {margin-bottom:1.5mm;}
:is(.cv-layout,#editor-preview-text)[data-cv-design="compact_v1"] .cv-page-number {left:16mm;right:16mm;}
:is(.cv-layout,#editor-preview-text)[data-cv-design="editorial_v1"] .cv-page {padding:19mm 18mm 19mm;color:#283746;}
:is(.cv-layout,#editor-preview-text)[data-cv-design="editorial_v1"] .cv-page .cv-title {font-size:28pt;line-height:1.16;color:#173d51;border-bottom:3px solid #315d71;padding-bottom:5mm;margin-bottom:6mm;}
:is(.cv-layout,#editor-preview-text)[data-cv-design="editorial_v1"] .cv-page .cv-section-heading {font-size:12pt;line-height:1.35;text-transform:none;letter-spacing:normal;color:#173d51;background:#edf2f4;border:0;border-left:3px solid #315d71;padding:2mm 3mm;margin:5mm 0 3mm;}
:is(.cv-layout,#editor-preview-text)[data-cv-design="editorial_v1"] .cv-page .cv-exp-title,
:is(.cv-layout,#editor-preview-text)[data-cv-design="editorial_v1"] .cv-page .cv-edu-degree {font-size:12pt;color:#173d51;margin-top:3.5mm;}
:is(.cv-layout,#editor-preview-text)[data-cv-design="editorial_v1"] .cv-page .cv-entry-meta {color:#526773;margin-bottom:3mm;}
:is(.cv-layout,#editor-preview-text)[data-cv-design="editorial_v1"] .cv-page-number {left:18mm;right:18mm;border-top-color:#315d71;}
/* Preview chrome stays with the live CV card, including in the expanded dialog. */
.workspace-topbar {min-height:44px;}
.workspace-topbar .workspace-identity {flex:1;}
.workspace-topbar .workspace-document-title {flex:1;}
.workspace-preview-title {position:relative;display:flex;align-items:center;gap:6px;min-width:0;padding:0;border:0;min-height:36px;}
.workspace-preview-label {margin:0;font:600 14px/1.4 "Drafted Sans",sans-serif;white-space:nowrap;}
.workspace-page-count {margin-left:auto;font-size:11px;}
.workspace-design-controls {display:flex;align-items:center;gap:6px;flex:none;min-width:0;margin:0;color:#52616c;font:12px/1.4 "Drafted Sans",sans-serif;}
.workspace-design-controls label,.workspace-sr-only {position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap;}
.workspace-design-controls select {width:112px;min-width:0;max-width:100%;height:36px;margin:0;padding:4px 24px 4px 8px;border:1px solid #bac8d0;border-radius:6px;background:#fff;color:#24313b;font:13px/1.4 "Drafted Sans",sans-serif;}
/* Only the select's outer frame changes; native option highlighting stays native. */
.workspace-design-controls select:focus {outline:none;box-shadow:none;border-color:#bac8d0;}
.workspace-design-controls select:focus-visible:not([data-pointer-focus]) {outline:2px solid #707980;outline-offset:2px;}
.workspace-icon-button {position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:36px;height:36px;min-height:36px;padding:7px;border:1px solid #c8d2d8;border-radius:6px;background:#fff;color:#344b57;cursor:pointer;}
.workspace-icon-button svg {display:block;flex:none;pointer-events:none;}
.workspace-icon-button:hover {background:#edf1f3;}
.workspace-icon-button:disabled {opacity:.5;cursor:default;}
.workspace-icon-button:focus-visible {outline:2px solid #707980;outline-offset:2px;}
.workspace-icon-button[hidden],.workspace-tooltip[hidden] {display:none!important;}
.workspace-tooltip {position:absolute;z-index:60;right:0;top:calc(100% + 5px);padding:6px 9px;border-radius:5px;background:#24313b;color:#fff;white-space:nowrap;font:12px/1.4 "Drafted Sans",sans-serif;pointer-events:none;box-shadow:0 2px 8px #23334226;}
.workspace-print-status {position:absolute;right:0;top:calc(100% + 6px);z-index:70;width:min(300px,80vw);padding:8px 12px;border:1px solid #c55;border-radius:6px;background:#fff5f5;color:#8a1d1d;text-align:left;font:12px/1.4 "Drafted Sans",sans-serif;box-shadow:0 3px 10px #2333421c;}
.workspace-print-status[hidden] {display:none;}
@media(max-width:900px){
  .workspace-preview-label {position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap;}
}
@media(max-width:700px){
  .workspace-preview-title {gap:4px;}
  .workspace-design-controls select {width:100px;}
  .workspace-icon-button {width:40px;height:40px;min-height:40px;}
}
@media(max-width:350px){
  .workspace-design-controls select {width:94px;}
  .workspace-icon-button {width:36px;height:40px;}
}
@page {size:A4;margin:0;}
@media print {
  .cv-layout {display:block!important;width:210mm!important;gap:0!important;}
  :is(.cv-layout,#editor-preview-text) .cv-page-slot {width:210mm!important;height:297mm!important;margin:0!important;break-after:page;}
  :is(.cv-layout,#editor-preview-text) .cv-page-slot:last-child {break-after:auto;}
  :is(.cv-layout,#editor-preview-text) .cv-page {transform:none!important;box-shadow:none;}
  :is(.cv-layout,#editor-preview-text) .cv-block:hover,:is(.cv-layout,#editor-preview-text) .cv-block.is-selected {background:transparent;box-shadow:none;}
}

:is(.cv-layout,#editor-preview-text) .cv-document-link {font:inherit;color:inherit;letter-spacing:inherit;text-decoration:underline;text-decoration-color:#a4b2bb;text-underline-offset:2px;}
@media print {
  html,body {margin:0!important;padding:0!important;}
  .cv-layout {margin:0!important;padding:0!important;}
  :is(.cv-layout,#editor-preview-text) .cv-page {print-color-adjust:exact;-webkit-print-color-adjust:exact;}
}

/* Workspace presentation only. These screen rules never enter the print layout.
   Keep document dimensions, fonts, block spacing and pagination in cv-document-layout.css. */
@media screen {
  .section-editor.discovery-enabled {
    --editor-navy:#152a38;
    --editor-ink:#1d3443;
    --editor-muted:#586d7c;
    --editor-teal:#007f82;
    --editor-teal-hover:#00676a;
    --editor-selection:#008f96;
    --editor-tint:#eaf6f6;
    --editor-line:#d8e3e9;
    --editor-surface:#edf3f6;
    --editor-radius:7px;
    --editor-space:16px;
    color:var(--editor-ink);
  }
  .section-editor.discovery-enabled .layout-container.editor-container {
    width:calc(100% - 24px)!important;margin:12px;border-radius:8px;
    border-color:var(--editor-line);box-shadow:0 6px 26px #172e3c0d;
  }
  .section-editor.discovery-enabled .workspace-topbar {
    min-height:62px;padding:10px 22px;background:var(--editor-navy);border:0;color:#fff;
  }
  .section-editor .workspace-identity {flex:1;gap:24px;overflow:hidden;}
  .section-editor .workspace-brand {font:700 25px/1.2 system-ui;color:#fff;letter-spacing:-.8px;}
  .section-editor .workspace-document-title {padding-left:24px;border-left-color:#78909d;font:600 15px/1.4 system-ui;color:#f4f8fa;}
  .section-editor .workspace-main-actions {position:relative;display:flex;align-items:center;gap:10px;flex:none;}
  .section-editor .workspace-main-actions #tailor-card {padding:0;margin:0;background:transparent;border:0;box-shadow:none;width:auto;}
  .section-editor .workspace-main-actions #tailor-content.is-ready {padding:0;}
  .section-editor .workspace-main-actions .tailor-title {display:none;}
  .section-editor .workspace-main-actions .tailor-btn,
  .section-editor .workspace-main-actions .workspace-print-button {
    display:inline-flex;align-items:center;justify-content:center;gap:8px;width:auto;min-width:0;min-height:40px;
    padding:9px 15px;border:1px solid #a0b3bf;border-radius:var(--editor-radius);
    background:transparent;color:#fff;font:600 13px/1.4 system-ui;white-space:nowrap;box-shadow:none;
  }
  .section-editor .workspace-main-actions .workspace-print-button {background:var(--editor-teal);border-color:var(--editor-teal);}
  .section-editor .workspace-main-actions .workspace-print-button svg {display:none;}
  .section-editor .workspace-main-actions .tailor-btn:hover {background:#ffffff14;}
  .section-editor .workspace-main-actions .workspace-print-button:hover {background:var(--editor-teal-hover);}
  .section-editor .workspace-job-context {position:relative;z-index:5;display:flex;align-items:center;gap:20px;width:100%;box-sizing:border-box;min-height:40px;padding:6px 22px;background:#f6f9fb;border-bottom:1px solid var(--editor-line);font:13px/1.5 system-ui;text-align:left;flex:none;}
  .section-editor .workspace-job-context[hidden] {display:none;}
  .section-editor .workspace-job-label {flex:none;color:var(--editor-muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;}
  .section-editor .workspace-job-role {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .section-editor .workspace-job-details {margin-left:auto;flex:none;}
  .section-editor .workspace-job-details summary {cursor:pointer;color:var(--editor-ink);font-size:12px;}
  .section-editor .workspace-job-text {position:absolute;top:100%;right:12px;z-index:10;width:min(560px,calc(100% - 24px));max-height:min(360px,50dvh);overflow:auto;padding:20px;border:1px solid var(--editor-line);border-radius:var(--editor-radius);background:#fff;box-shadow:0 12px 32px #142d3826;white-space:pre-wrap;overflow-wrap:anywhere;box-sizing:border-box;}
  .section-editor.discovery-enabled .editor-layout {grid-template-columns:minmax(0,38fr) minmax(0,62fr);}
  .section-editor.discovery-enabled .chat-card {padding:20px!important;gap:14px;background:#fff;}
  .section-editor.discovery-enabled .cv-card {padding:16px 20px!important;gap:10px;background:var(--editor-surface);}
  .section-editor.discovery-enabled .chat-title {font:700 18px/1.4 system-ui;color:var(--editor-ink);}
  .section-editor.discovery-enabled .editor-left {border-color:var(--editor-line);}
  .section-editor .workspace-editor-toolbar {gap:20px;padding:0;border-bottom:1px solid var(--editor-line);}
  .section-editor .workspace-editor-toolbar button {position:relative;inset:auto;min-height:40px;padding:6px 2px 10px;border:0;border-bottom:3px solid transparent;border-radius:0;color:var(--editor-muted);background:transparent;font:600 13px/1.4 system-ui;}
  .section-editor .workspace-editor-toolbar button[aria-pressed=true] {color:var(--editor-teal);border-color:var(--editor-teal);background:transparent;}
  .section-editor .workspace-editor-toolbar button:hover {background:transparent;color:var(--editor-teal-hover);}
  .section-editor .discovery-count {background:#e1f0f1;color:#234a54;border-radius:20px;padding:2px 7px;margin-left:6px;}
  .section-editor.discovery-enabled .chat-messages {padding:4px 0!important;gap:18px;}
  .section-editor .discovery-guidance {padding:16px 18px;border-color:var(--editor-line);border-radius:var(--editor-radius);background:#f4f9f9;color:var(--editor-ink);margin:0 0 8px;}
  .section-editor .discovery-guidance h2 {font:650 16px/1.4 system-ui;margin-bottom:6px;}
  .section-editor .discovery-guidance p {color:#425b6b;}
  .section-editor .discovery-guidance button,.section-editor .drafted-discovery button {border-color:#c7d6de;border-radius:var(--editor-radius);color:var(--editor-ink);box-shadow:none;}
  .section-editor .discovery-guidance .tailor-primary,.section-editor .drafted-discovery .discovery-finish-primary {background:var(--editor-teal);border-color:var(--editor-teal);color:#fff;}
  .section-editor .chat-message {max-width:92%;padding:12px 14px;border-radius:var(--editor-radius);font:14px/1.6 system-ui;box-shadow:none;overflow-wrap:anywhere;}
  .section-editor .chat-message.ai {background:#fff;border-color:var(--editor-line);color:#344e60;}
  .section-editor .chat-message.user {background:#edf5f9;border-color:#edf5f9;color:var(--editor-ink);}
  .section-editor .chat-message.system {background:#f6f8fa;color:var(--editor-muted);}
  .section-editor .drafted-chat-demo {padding:16px;border-radius:var(--editor-radius);border-color:var(--editor-line);background:#f8fafb;}
  .section-editor .drafted-chat-demo .chat-message-ai {border-radius:var(--editor-radius);box-shadow:none;}
  .section-editor .workspace-composer {flex:none;border:1px solid var(--editor-line);border-radius:var(--editor-radius);background:#f9fbfc;padding:10px;min-width:0;}
  .section-editor .chat-card.discovery-mode .workspace-composer,
  .section-editor .chat-card:has(.tailor-suggestion) .workspace-composer {display:none;}
  /* Preserve the former hidden Tailor action while in question mode. */
  .section-editor:has(.chat-card.discovery-mode) .workspace-main-actions #tailor-card {display:none!important;}
  .section-editor.discovery-enabled .context-chip {flex-wrap:wrap;gap:6px 10px;padding:0 0 9px;border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--editor-ink);}
  .section-editor .context-chip .chip-label {flex:1 1 160px;gap:7px;flex-wrap:wrap;align-items:center;}
  .section-editor .context-chip .chip-actions {flex-wrap:wrap;gap:5px;}
  .section-editor .context-chip .chip-badge {border:0;border-radius:4px;background:var(--editor-tint);padding:4px 6px;font-size:11px;color:var(--editor-teal-hover);}
  .section-editor .context-chip .chip-title {font-size:12px;}
  .section-editor.discovery-enabled .context-chip .chip-sub {display:block;flex:1 1 90px;font-size:12px;opacity:1;color:var(--editor-muted);}
  .section-editor .context-chip .chip-btn {border:1px solid #c7d6de;border-radius:5px;padding:6px 8px;font:600 11px/1.4 system-ui;background:#fff;color:var(--editor-teal-hover);box-shadow:none;transform:none;}
  .section-editor .context-chip .chip-btn:hover {background:var(--editor-tint);box-shadow:none;transform:none;}
  .section-editor.discovery-enabled .chat-command-bar {display:grid;grid-template-columns:1fr auto auto;gap:7px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;}
  .section-editor.discovery-enabled .chat-input {min-width:0;min-height:62px;height:62px;max-height:160px;margin:0;padding:10px 12px;resize:vertical;border:1px solid #c7d6de;border-radius:var(--editor-radius);background:#fff;color:var(--editor-ink);font:14px/1.5 system-ui;box-shadow:none;}
  .section-editor.discovery-enabled .chat-send-button {align-self:end;display:inline-flex;align-items:center;justify-content:center;height:38px;min-width:54px;padding:8px 11px;border:1px solid #bccfd8;border-radius:var(--editor-radius);background:#fff;color:var(--editor-teal-hover);font:600 12px/1.4 system-ui;box-shadow:none;transform:none;}
  .section-editor #editor-chat-send {background:var(--editor-teal);border-color:var(--editor-teal);color:#fff;}
  .section-editor.discovery-enabled #editor-send {max-width:110px;white-space:normal;height:auto;min-height:38px;}
  .section-editor #editor-chat-send:hover {background:var(--editor-teal-hover);}
  .section-editor #editor-send:hover {background:var(--editor-tint);}
  .section-editor .workspace-input-help {margin:8px 2px 0;color:var(--editor-muted);font:11px/1.5 system-ui;text-align:left;}
  .section-editor .workspace-preview-title {padding:0 0 12px;min-height:36px;gap:10px;border-color:var(--editor-line);color:var(--editor-ink);}
  .section-editor .workspace-preview-label {font:650 16px/1.4 system-ui;}
  .section-editor .workspace-preview-title .workspace-action-label {display:none;}
  .section-editor.discovery-enabled .cv-document {padding:22px;border:0;border-radius:0;background:var(--editor-surface);}
  /* Paint only: outlines never change block geometry or the renderer's measurements. */
  .section-editor #editor-preview-text .cv-block.is-selected {background:#008f960b;outline:1px solid var(--editor-selection);outline-offset:2px;border-radius:3px;box-shadow:none;}
  .section-editor .cv-document-inner.is-scope-full::before {outline:1px solid var(--editor-selection);box-shadow:none;border-radius:4px;}
  .section-editor .cv-document-inner.is-scope-full::after {background:var(--editor-tint);color:var(--editor-teal-hover);border-color:#b4dede;box-shadow:none;border-radius:4px;padding:4px 8px;}
  .section-editor :is(button,a,textarea,select,summary):focus-visible {outline:2px solid var(--editor-teal);outline-offset:3px;}
  .section-editor .workspace-design-controls select[data-pointer-focus]:focus {outline:none;box-shadow:none;}
  .section-editor .workspace-topbar :is(button,a):focus-visible {outline-color:#85e3e4;}
  .section-editor :is(button,a)[disabled],.section-editor :is(button,a)[aria-disabled=true] {opacity:.5;cursor:default;}
  .section-editor .workspace-print-button[aria-busy=true] {cursor:wait;}
  .section-editor .workspace-print-button[aria-busy=true] .workspace-action-label::after {content:'…';}
  @media(max-width:1100px) {
    .section-editor.discovery-enabled .editor-layout {grid-template-columns:minmax(330px,43fr) minmax(0,57fr);}
    .section-editor.discovery-enabled .chat-card,.section-editor.discovery-enabled .cv-card {padding:14px!important;gap:10px;}
    .section-editor.discovery-enabled .cv-document {padding:12px;}
  }
  @media(max-width:700px) {
    .section-editor.discovery-enabled .layout-container.editor-container {width:calc(100% - 12px)!important;margin:6px;}
    .section-editor.discovery-enabled .workspace-topbar {min-height:52px;padding:8px 12px;gap:8px;flex-wrap:wrap;}
    .section-editor .workspace-identity {gap:12px;flex:1 1 140px;}
    .section-editor .workspace-brand {font-size:20px;}
    .section-editor .workspace-document-title {padding-left:12px;font-size:12px;}
    .section-editor .workspace-main-actions {gap:6px;margin-left:auto;}
    .section-editor .workspace-main-actions .tailor-btn,.section-editor .workspace-main-actions .workspace-print-button {min-height:34px;padding:6px 10px;font-size:11px;}
    .section-editor .workspace-job-context {min-height:34px;padding:5px 12px;gap:10px;}
    .section-editor .workspace-job-label {font-size:9px;}
    .section-editor .workspace-job-role {font-size:11px;}
    .section-editor .workspace-job-details summary {font-size:10px;}
    .section-editor.discovery-enabled .chat-card,.section-editor.discovery-enabled .cv-card {padding:10px!important;gap:7px;}
    .section-editor.discovery-enabled .chat-title {font-size:15px;min-height:20px;}
    .section-editor .workspace-editor-toolbar {gap:16px;}
    .section-editor .workspace-editor-toolbar button {min-height:32px;font-size:12px;padding:4px 2px 6px;}
    .section-editor .workspace-composer {padding:8px;}
    .section-editor.discovery-enabled .chat-input {font-size:16px;min-height:42px;height:42px;padding:7px 9px;}
    .section-editor.discovery-enabled .context-chip {padding-bottom:6px;}
    .section-editor .context-chip .chip-label {flex-basis:140px;}
    .section-editor .workspace-input-help {margin-top:5px;font-size:10px;}
    .section-editor .workspace-preview-title {padding-bottom:6px;gap:5px;}
    .section-editor.discovery-enabled .cv-document {padding:8px;}
    .section-editor .discovery-guidance {padding:12px;}
    .section-editor .discovery-guidance h2 {font-size:14px;}
  }
  @media(max-width:700px) and (min-height:600px) {
    .section-editor.discovery-enabled .editor-layout {grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1.35fr) minmax(0,1fr);}
  }
  @media(max-width:700px) and (max-height:599px) {
    .section-editor.discovery-enabled .editor-layout {grid-template-columns:minmax(0,1fr) minmax(0,1fr);}
  }
  @media(max-height:500px) {
    .section-editor.discovery-enabled .workspace-topbar {min-height:40px;padding:4px 12px;}
    .section-editor .workspace-brand {font-size:18px;}
    .section-editor.discovery-enabled .chat-card,.section-editor.discovery-enabled .cv-card {padding:8px!important;gap:5px;}
    .section-editor .workspace-input-help {display:none;}
    .section-editor .workspace-composer {padding:6px;}
    .section-editor.discovery-enabled .chat-input {height:38px;min-height:38px;}
    .section-editor .workspace-job-context {min-height:28px;padding:3px 12px;}
  }
}
/* Flexible space places only the empty conversation's intro above the center.
   It collapses on short panels, leaving the card in ordinary scrollable flow. */
.section-editor.discovery-enabled .chat-messages.is-discovery-start {gap:0;}
.section-editor.discovery-enabled .chat-messages.is-discovery-start::before,
.section-editor.discovery-enabled .chat-messages.is-discovery-start::after {content:'';flex:1.15 0 0;}
.section-editor.discovery-enabled .chat-messages.is-discovery-start::before {flex-grow:.85;}
.section-editor.discovery-enabled .chat-messages.is-discovery-start > .discovery-guidance {
  flex:0 0 auto;align-self:center;width:calc(100% - 24px);max-width:600px;box-sizing:border-box;
  margin:0;padding:30px;border:1px solid var(--editor-line);border-radius:12px;background:#f6fafa;text-align:center;box-shadow:0 3px 14px #17344206;
}
.section-editor.discovery-enabled .chat-messages.is-discovery-start > .discovery-guidance h2 {font:700 clamp(22px,1.35vw,24px)/1.25 system-ui;letter-spacing:-.035em;margin:0 0 12px;color:var(--editor-ink);}
.section-editor.discovery-enabled .chat-messages.is-discovery-start > .discovery-guidance p {font:400 15px/1.6 system-ui;margin:0 0 24px;color:var(--editor-muted);}
.section-editor.discovery-enabled .discovery-guidance .discovery-start-primary {display:flex;width:fit-content;max-width:100%;align-items:center;justify-content:center;min-height:44px;margin:0 auto;padding:11px 20px;border:1px solid var(--editor-teal);border-radius:7px;background:var(--editor-teal);color:#fff;font:600 14px/1.4 system-ui;white-space:normal;}
.section-editor.discovery-enabled .discovery-guidance .discovery-start-primary:hover {background:var(--editor-teal-hover);}
.section-editor.discovery-enabled .chat-messages.is-discovery-start > :is(.chat-message.system,.drafted-chat-demo) {display:none;}
@media(max-width:400px) {
  .section-editor.discovery-enabled .chat-messages.is-discovery-start > .discovery-guidance {padding:24px;}
}
@media(max-width:700px) and (max-height:599px) {
  .section-editor.discovery-enabled:has(.is-discovery-start) .editor-layout {grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,2fr) minmax(0,1fr);}
}

/* Detached text review only; no changes to pane proportions or CV geometry. */
@media screen {
  .section-editor .tailor-review {
    display:flex;flex-direction:column;flex:0 0 auto;min-height:0;max-height:100%;
    box-sizing:border-box;padding:0;background:#fff;overflow:hidden;
    border:1px solid var(--editor-line,#d8e3e9);border-radius:7px;
  }
  .section-editor .tailor-review-header {display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;padding:16px 16px 12px;flex:none;}
  .section-editor .tailor-review-header h2 {font:700 16px/1.4 system-ui;margin:0;}
  .section-editor .tailor-review-header p {flex-basis:100%;margin:0;font:13px/1.5 system-ui;color:#526778;}
  .section-editor .tailor-review-status {padding:2px 7px;border:1px solid #e5ba6d;border-radius:5px;background:#fff8e9;color:#835010;font:600 11px/1.5 system-ui;}
  .section-editor .tailor-review-body {min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 14px 14px;scroll-padding:10px;}
  .section-editor .tailor-block-change {padding:13px;border:1px solid #dce5eb;border-radius:6px;background:#fff;}
  .section-editor .tailor-block-change+.tailor-block-change {margin-top:12px;}
  .section-editor .tailor-block-title {display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px;}
  .section-editor .tailor-block-title h3 {flex:1 1 140px;margin:0;font:650 14px/1.5 system-ui;color:var(--editor-ink,#1d3443);}
  .section-editor .tailor-review-link {flex:none;margin:0;padding:2px 0;min-height:28px;border:0;border-radius:0;background:transparent;color:#006a70;font:600 11px/1.5 system-ui;text-decoration:underline;text-underline-offset:3px;}
  .section-editor .tailor-edit {margin-top:10px;}
  .section-editor .tailor-edit+.tailor-edit {padding-top:12px;border-top:1px solid #edf1f4;}
  .section-editor .tailor-edit-kind {display:inline-block;margin:0 0 9px;padding:2px 7px;border-radius:12px;background:#e1f4f3;color:#00656a;font:650 10px/1.6 system-ui;letter-spacing:.025em;text-transform:uppercase;}
  .section-editor .tailor-kind-removed {background:#fce8ed;color:#9b2545;}
  .section-editor .tailor-diff-row {display:grid;grid-template-columns:48px minmax(0,1fr);gap:8px;margin-top:8px;align-items:start;}
  .section-editor .tailor-diff-label {padding-top:2px;font:650 10px/1.5 system-ui;text-transform:uppercase;letter-spacing:.04em;color:#596e7e;}
  .section-editor .tailor-diff-row+.tailor-diff-row .tailor-diff-label {color:#006a70;}
  .section-editor .tailor-diff-text {white-space:pre-wrap;overflow-wrap:anywhere;min-width:0;font:14px/1.65 system-ui;color:#243e50;tab-size:4;}
  .section-editor .tailor-diff-text mark,.section-editor .tailor-diff-text del {color:inherit;box-decoration-break:clone;-webkit-box-decoration-break:clone;border-radius:2px;padding:1px 0;}
  .section-editor .tailor-diff-text .tailor-mark-added {background:#d6f3ef;color:#07575a;}
  .section-editor .tailor-diff-text .tailor-mark-before {background:#e8edf2;}
  .section-editor .tailor-diff-text .tailor-mark-removed {background:#fce8ed;color:#87223d;text-decoration-thickness:1px;}
  .section-editor .tailor-diff-added,.section-editor .tailor-diff-removed {grid-template-columns:24px minmax(0,1fr);}
  .section-editor .tailor-diff-symbol {display:flex;align-items:center;justify-content:center;width:23px;height:23px;border-radius:50%;font:500 19px/1 system-ui;background:#e1f5f2;color:#00666b;}
  .section-editor .tailor-diff-removed .tailor-diff-symbol {background:#fce8ed;color:#9b2545;}
  .section-editor .tailor-spacing-note {display:block;color:#526778;font-size:12px;font-style:italic;}
  .section-editor .tailor-review-footer {flex:none;padding:12px 16px 10px;background:#fff;border-top:1px solid var(--editor-line,#d8e3e9);}
  .section-editor .tailor-review-footer .tailor-actions {display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:10px;margin:0;}
  .section-editor .tailor-review-footer button {min-height:38px;padding:8px 10px;margin:0;font-weight:600;}
  .section-editor .tailor-review-footer .tailor-current-notice {font:11px/1.5 system-ui;color:#526778;margin:7px 0 0;}
  .section-editor .tailor-review.is-stale .tailor-review-status {background:#fff1df;border-color:#d7a65d;color:#79430c;}
  .section-editor .tailor-change-details {border-top:1px solid #dce5eb;padding-top:12px;margin:14px 0 0;}
  .section-editor .tailor-change-details summary {font:600 12px/1.5 system-ui;color:#486272;}
  .section-editor .tailor-change-details h3 {font:650 13px/1.5 system-ui;margin:14px 0 4px;}
  .section-editor .tailor-change-details blockquote {padding:9px;border-left:2px solid #c4d6df;background:#f6f9fb;}
  .section-editor #editor-preview-text .cv-block.is-tailor-reviewed {outline:2px solid #007f82;outline-offset:3px;background:#dff3ee;}
  @media(max-width:700px) {
    .section-editor .tailor-review-header {padding:10px 11px 8px;gap:4px 8px;}
    .section-editor .tailor-review-header h2 {font-size:14px;}
    .section-editor .tailor-review-header p {font-size:12px;}
    .section-editor .tailor-review-body {padding:0 9px 9px;}
    .section-editor .tailor-block-change {padding:10px;}
    .section-editor .tailor-diff-row {grid-template-columns:minmax(0,1fr);gap:3px;}
    .section-editor .tailor-diff-added,.section-editor .tailor-diff-removed {grid-template-columns:22px minmax(0,1fr);gap:6px;}
    .section-editor .tailor-diff-text {font-size:13px;}
    .section-editor .tailor-review-footer {padding:8px 10px;}
    .section-editor .tailor-review-footer button {font-size:12px;}
  }
}
/* Pending-proposal controls belong to the screen layer, never a CV page. */
.tailor-preview-switch {display:flex;align-items:center;gap:4px;flex:none;max-width:100%;}
.tailor-preview-switch button {border:1px solid #bac8d0;border-radius:5px;background:#fff;color:#24313b;padding:5px 8px;font:500 12px/1.4 system-ui;cursor:pointer;}
.tailor-preview-switch button[aria-pressed=true] {background:#e0f4f2;border-color:#007f86;color:#00636b;}
.tailor-preview-switch button:focus-visible {outline:2px solid #007f86;outline-offset:2px;}
.tailor-preview-status {margin:0 4px;color:#895017;font:500 12px/1.4 system-ui;white-space:nowrap;}
@media print {[data-cv-preview-mode=suggested] {display:none!important;}}
/* Use the block-side margin or measured whitespace without a docked top row. */
.tailor-review-stage {position:relative;display:flex;flex-direction:column;flex:1 1 0;min-width:0;min-height:0;gap:8px;}
.tailor-review-stage>.cv-document {flex:1 1 0;min-height:0;width:100%;box-sizing:border-box;}
.tailor-preview-switch.tailor-block-tools {display:block;flex:none;box-sizing:border-box;max-width:100%;padding:10px 12px;border:1px solid #bdcfd8;border-radius:8px;background:#f8fbfc;box-shadow:0 2px 10px #1d344309;text-align:left;}
.tailor-block-tools.is-floating {position:absolute;z-index:8;}
.tailor-preview-switch.tailor-block-tools.is-compact {display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px;padding:7px 9px;}
.tailor-block-tools.is-compact .tailor-active-block {flex:1 1 auto;}
.tailor-block-tools.is-compact .tailor-block-actions {padding:0;}
.tailor-block-tools.is-compact .tailor-block-close {order:2;}
.tailor-block-tools[hidden] {display:none!important;}
.tailor-active-block {font:650 12px/1.4 system-ui;color:#243e50;overflow-wrap:anywhere;}
.tailor-block-tools .tailor-preview-status {display:inline-block;margin:0 0 0 8px;}
.tailor-block-close {float:right;min-width:28px;}
.tailor-block-actions {display:flex;flex-wrap:wrap;gap:5px;padding-top:8px;clear:both;}
.tailor-block-actions button {min-height:32px;}
.section-editor #editor-preview-text .cv-block.is-tailor-reviewed {outline:1.5px solid #007f82;outline-offset:3px;background:transparent;}
.section-editor.discovery-enabled .chat-messages.is-tailor-preparing {gap:12px;}
.section-editor .tailor-progress {display:flex;flex-direction:column;align-items:center;flex:0 0 auto;min-block-size:100%;box-sizing:border-box;margin:0;}
.tailor-progress::before,.tailor-progress::after {content:'';flex:1.15 0 0;}.tailor-progress::before {flex-grow:.85;}
.section-editor .tailor-progress-card {width:calc(100% - 24px);max-width:600px;box-sizing:border-box;padding:30px;border:1px solid var(--editor-line,#d8e3e9);border-radius:12px;background:#f6fafa;box-shadow:0 3px 14px #17344206;text-align:left;}
.section-editor .tailor-progress-card h2 {margin:14px 0 12px;font:700 24px/1.25 system-ui;letter-spacing:-.035em;color:#1d3443;}
.section-editor .tailor-progress-card p {margin:0;font:400 15px/1.6 system-ui;color:#586d7c;}
.tailor-activity {display:block;width:20px;height:20px;border:2px solid #c9dedf;border-top-color:#007f82;border-radius:50%;animation:tailor-wait 1s linear infinite;}
@keyframes tailor-wait {to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.tailor-activity {animation:none;}}
@media screen {::highlight(drafted-tailor-after) {background:#d6f3ef;color:#07575a;}::highlight(drafted-tailor-before) {background:#fce8ed;color:#87223d;text-decoration:line-through;}}
@media print {.tailor-block-tools,.tailor-progress {display:none!important;}}
@media screen {
 .document-comparison {display:flex;align-items:center;flex-wrap:wrap;gap:4px;flex:1 0 100%;padding-top:5px;}
 .document-comparison[hidden] {display:none;}
 .document-comparison button {min-height:30px;padding:4px 9px;border:1px solid #bac8d0;border-radius:5px;background:white;color:#243e50;font:500 12px/1.4 system-ui;cursor:pointer;}
 .document-comparison button[aria-pressed=true] {background:#e0f4f2;border-color:#007f86;color:#00636b;}
 .document-comparison button:focus-visible {outline:2px solid #007f86;outline-offset:2px;}
 .document-comparison button:disabled {opacity:.5;cursor:default;}
 .document-comparison-status {font:12px/1.4 system-ui;color:#526778;}
 ::highlight(drafted-document-after) {background:#d6f3ef;color:#07575a;}
 ::highlight(drafted-document-before) {background:#fce8ed;color:#87223d;text-decoration:line-through;}
}
@media print {.document-comparison,[data-cv-preview-mode=original] {display:none!important;}}

@media screen {
 .experience-context-picker fieldset{min-width:0;border:0;padding:0;margin:12px 0;display:grid;gap:8px}
 .experience-context-picker .experience-context-option{display:flex;align-items:center;gap:10px;margin:0;padding:11px 12px;border:1px solid #cbdbe3;border-radius:6px;background:#fff;cursor:pointer;color:#203b4b;font:13px/1.5 system-ui}
 .experience-context-option>input{flex:none;width:18px;height:18px;margin:0;accent-color:#007f82}
 .experience-context-option>span{display:grid;gap:2px;overflow-wrap:anywhere;min-width:0}
 .experience-context-option strong{font-weight:650}.experience-context-option>span>span{font-size:12px;color:#526778}
 .experience-context-picker .experience-context-option.is-chosen{border-color:#007f82;background:#e8f6f3;box-shadow:inset 0 0 0 1px #007f82}
 .experience-context-option:focus-within{outline:2px solid #007f82;outline-offset:2px}
 .experience-other-context{display:grid;gap:10px;margin:14px 0}.experience-other-context[hidden]{display:none}
 .experience-other-context label{font:600 12px/1.5 system-ui;color:#203b4b}
 .experience-other-context input{box-sizing:border-box;display:block;width:100%;margin:4px 0 0;padding:9px 10px;border:1px solid #b6cbd5;border-radius:5px;font:400 16px/1.5 system-ui;background:#fff;color:#203b4b}
 .experience-context-picker [role=alert]{color:#96384b;font-size:12px}
 .discovery-saved-context{white-space:pre-wrap;font:500 12px/1.6 system-ui;color:#315962;background:#eef6f6;padding:8px;border-radius:4px}
}

/* Editor-only paint and viewer geometry. Print still uses physical A4 pages. */
@media screen {
  .section-editor .workspace-preview-title {flex-wrap:wrap;row-gap:8px;}
  .section-editor .workspace-zoom {order:1;display:flex;align-items:center;justify-content:flex-end;gap:5px;flex:1 0 265px;max-width:100%;min-width:0;}
  .section-editor .workspace-zoom button {flex:none;min-height:30px;border:1px solid var(--editor-line);border-radius:5px;padding:4px 7px;background:#fff;color:var(--editor-ink);font:500 12px/1.4 system-ui;cursor:pointer;}
  .section-editor .workspace-zoom :is(.workspace-zoom-minus,.workspace-zoom-plus) {width:28px;padding:3px;font-size:18px;}
  .section-editor .workspace-zoom button:hover {background:var(--editor-tint);}
  .section-editor .workspace-zoom button[aria-pressed=true] {background:var(--editor-tint);border-color:#acd3d6;color:var(--editor-teal-hover);}
  .section-editor .workspace-zoom input {appearance:auto;flex:0 1 90px;width:90px;min-width:45px;height:26px;margin:0;padding:0;accent-color:var(--editor-teal);cursor:pointer;}
  .section-editor .workspace-zoom-value {flex:none;width:36px;color:var(--editor-muted);font:12px/1.4 system-ui;font-variant-numeric:tabular-nums;text-align:center;}
  .section-editor .workspace-zoom :disabled {opacity:.45;cursor:default;}
  .section-editor .workspace-zoom input:focus-visible {outline:2px solid var(--editor-teal);outline-offset:2px;border-radius:3px;}
  /* Auto cross-axis margins center fitting pages and become zero on overflow.
     Unlike align-items:center, oversized pages never extend into negative x. */
  .section-editor #editor-preview-text.cv-layout {align-items:flex-start;overflow:visible;overflow-anchor:none;}
  .section-editor #editor-preview-text .cv-page-slot {max-width:none!important;margin-inline:auto;}
  .section-editor .cv-document {overflow-anchor:none;}
  .section-editor .cv-document-inner.is-scope-full::before,
  .section-editor .cv-document-inner.is-scope-full::after {display:none;}
  .section-editor .cv-document-inner.is-scope-full #editor-preview-text .cv-page {outline:1px solid var(--editor-selection);outline-offset:2px;}
  @media(max-width:700px) {
    .section-editor .workspace-zoom {flex-basis:100%;justify-content:center;}
    .section-editor .workspace-zoom input {flex-basis:74px;width:74px;}
    .section-editor .workspace-zoom button {font-size:11px;}
  }
}

/* Only the pre-editor input section. Navigation, editor and document templates
   intentionally keep their existing presentation and behavior. */
#section-input.preparation-section {
  --prep-ink:#142a3d;--prep-muted:#5b7082;--prep-teal:#007f86;--prep-line:#d7e2e9;--prep-tint:#eaf4f5;
  display:flex;align-items:center;justify-content:center;height:auto;min-height:100vh;min-height:100svh;max-height:none;overflow:visible;box-sizing:border-box;
  padding:clamp(32px,5vh,64px) clamp(20px,4vw,64px)!important;background:#fff;color:var(--prep-ink);
  text-align:left;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
#section-input.preparation-section .preparation-layout {
  display:grid;grid-template-columns:minmax(0,55fr) minmax(0,45fr);gap:clamp(32px,3vw,48px);
  width:100%;max-width:1280px;margin:0 auto;align-items:start;
}
#section-input.preparation-section .input-left,
#section-input.preparation-section .input-right {width:100%;min-width:0;padding:0;box-sizing:border-box;}
#section-input.preparation-section .input-left {display:flex;flex-direction:column;gap:30px;}
#section-input.preparation-section .preparation-intro {margin:0 0 8px;}
#section-input.preparation-section .preparation-title {margin:0;color:var(--prep-ink);font-size:clamp(32px,3.2vw,46px);line-height:1.15;letter-spacing:-.045em;font-weight:750;text-wrap:balance;}
#section-input.preparation-section .preparation-introduction {margin:14px 0 0;color:var(--prep-muted);font-size:17px;line-height:1.6;max-width:65ch;}
#section-input.preparation-section .preparation-step {min-width:0;}
#section-input.preparation-section .preparation-step-heading {display:flex;align-items:flex-start;gap:14px;margin-bottom:18px;}
#section-input.preparation-section .preparation-number {flex:none;display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;background:var(--prep-tint);color:var(--prep-teal);font-size:14px;line-height:1;font-weight:700;}
#section-input.preparation-section .preparation-step-text {flex:1;min-width:0;}
#section-input.preparation-section .preparation-step-title {margin:0;color:var(--prep-ink);font-size:19px;line-height:1.4;font-weight:700;letter-spacing:-.025em;}
#section-input.preparation-section .preparation-step-help {margin:4px 0 0;color:var(--prep-muted);font-size:14px;line-height:1.5;}
#section-input.preparation-section #job-ad-input {display:block;width:100%;min-width:0;max-width:100%;height:220px;min-height:180px;max-height:440px;box-sizing:border-box;resize:vertical;padding:16px 18px;margin:0;border:1px solid var(--prep-line);border-radius:8px;background:#fff;color:#30485b;font-family:inherit;font-size:15px;line-height:1.65;box-shadow:none;}
#section-input.preparation-section #job-ad-input::placeholder {color:#748696;opacity:1;}
#section-input.preparation-section .preparation-job-feedback {display:grid;margin-top:10px;}
#section-input.preparation-section .preparation-job-hint,
#section-input.preparation-section #jobcontext-status {grid-area:1/1;box-sizing:border-box;min-width:0;padding:9px 12px;margin:0;font:13px/1.5 system-ui;}
#section-input.preparation-section .preparation-job-hint {color:var(--prep-muted);}
#section-input.preparation-section #jobcontext-status {display:flex;align-items:center;gap:10px;border-radius:6px;}
#section-input.preparation-section #jobcontext-status-icon {flex:none;}
#section-input.preparation-section #jobcontext-status:not([data-state]),
#section-input.preparation-section #jobcontext-status[data-state=idle] {visibility:hidden;}
#section-input.preparation-section #jobcontext-status[data-state=loading] {background:#f0f5f8;color:#40596d;}
#section-input.preparation-section #jobcontext-status[data-state=ready] {background:var(--prep-tint);color:#166165;}
#section-input.preparation-section #jobcontext-status[data-state=error] {background:#fff2ee;color:#8d3b2e;}
#section-input.preparation-section .file-picker {position:relative;display:flex;align-items:center;gap:14px;width:100%;max-width:100%;min-width:0;padding:17px 18px;border:1px solid var(--prep-line);border-radius:8px;box-sizing:border-box;background:#fff;}
#section-input.preparation-section .preparation-file-icon {flex:none;display:flex;align-items:center;justify-content:center;width:44px;height:48px;border-radius:8px;background:#eaf1fa;color:#234b69;}
#section-input.preparation-section .preparation-file-details {display:flex;flex-direction:column;gap:4px;flex:1;min-width:0;text-align:left;}
#section-input.preparation-section .file-name {display:block;width:100%;max-width:none;min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:1.4;font-weight:600;color:var(--prep-ink);opacity:1;}
#section-input.preparation-section .preparation-file-type {color:var(--prep-muted);font-size:13px;line-height:1.4;overflow-wrap:anywhere;}
#section-input.preparation-section .file-btn {flex:none;display:inline-flex;align-items:center;justify-content:center;max-width:100%;margin:0;padding:8px 0;border:0;border-radius:4px;background:transparent;color:var(--prep-teal);font:600 13px/1.5 system-ui;box-shadow:none;transform:none;white-space:nowrap;}
#section-input.preparation-section .file-btn:hover {color:#005d65;background:transparent;box-shadow:none;transform:none;text-decoration:underline;}
#section-input.preparation-section .preparation-actions {display:flex;flex-direction:column;align-items:stretch;gap:10px;}
#section-input.preparation-section #upload-btn {width:100%;min-height:54px;margin:0;padding:14px 20px;box-sizing:border-box;border:1px solid var(--prep-teal);border-radius:8px;background:var(--prep-teal);color:#fff;font:600 16px/1.5 system-ui;box-shadow:none;text-align:center;text-decoration:none;}
#section-input.preparation-section #upload-btn:hover {background:#006b72;border-color:#006b72;}
#section-input.preparation-section #upload-btn[aria-disabled=true] {opacity:.7;cursor:wait;}
#section-input.preparation-section .preparation-status {margin:0;padding:10px 12px;border:1px solid var(--prep-line);border-radius:6px;background:#f4f8fa;color:#40596d;font-size:13px;line-height:1.5;}
#section-input.preparation-section .preparation-status[data-state=error] {background:#fff5f2;border-color:#edcbc4;color:#8d3b2e;}
#section-input.preparation-section .preparation-status[data-state=ready] {background:var(--prep-tint);color:#166165;}
#section-input.preparation-section .input-right {position:relative;padding:24px;border-radius:10px;background:#edf3f7;}
#section-input.preparation-section .cv-preview-box {display:block;width:100%;height:auto;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;}
#section-input.preparation-section .cv-preview-box>.code-embed {width:100%;height:auto;}
#section-input.preparation-section .cv-preview-wrap {width:100%;height:clamp(460px,66vh,720px);min-height:0;border:1px solid var(--prep-line);border-radius:8px;background:#fff;box-shadow:0 4px 18px #20374b08;box-sizing:border-box;}
#section-input.preparation-section .source-pdf-view {height:100%;background:transparent;}
#section-input.preparation-section .source-pdf-slot {box-shadow:0 2px 8px #213c4e14;}
#section-input.preparation-section .cv-preview-placeholder {padding:30px;color:var(--prep-muted);font-size:15px;line-height:1.7;}
#section-input.preparation-section .source-pdf-status {color:var(--prep-muted);background:#f8fafceF;font:14px/1.6 system-ui;}
#section-input.preparation-section .cv-preview-loading .inner {border:1px solid var(--prep-line);border-radius:8px;background:#fff;color:var(--prep-ink);box-shadow:0 8px 24px #142e4214;font:14px/1.5 system-ui;}
#section-input.preparation-section .cv-preview-loading .meta {opacity:1;color:var(--prep-muted);font-size:12px;}
#section-input.preparation-section :is(a,button,label[role=button],textarea):focus-visible {outline:2px solid var(--prep-teal);outline-offset:3px;}
#section-input.preparation-section [hidden] {display:none!important;}
/* Keep the longer hint's natural wrapped height while it is hidden, so idle,
   loading, ready and error feedback share the same reserved space. */
#section-input.preparation-section .preparation-job-feedback .preparation-job-hint[hidden] {display:block!important;visibility:hidden;}
/* Opening control exists only for a readable selected document. */
#section-input.preparation-section .preparation-preview-open {position:absolute;top:32px;right:48px;z-index:3;display:block;width:38px;height:38px;margin:0;padding:0;border:0;border-radius:8px;background:transparent;cursor:zoom-in;opacity:0;transition:opacity .12s;}
#section-input.preparation-section .preparation-enlarge-icon {display:flex;align-items:center;justify-content:center;width:38px;height:38px;border:1px solid var(--prep-line);border-radius:8px;background:#fffffff0;color:var(--prep-teal);}
#section-input.preparation-section .input-right:is(:hover,:focus-within) .preparation-preview-open {opacity:1;}
#section-input.preparation-section .preparation-pdf-dialog {position:fixed;inset:0;display:none;flex-direction:column;gap:14px;width:calc(100% - 48px);max-width:1280px;height:calc(100dvh - 48px);max-height:none;margin:auto;padding:20px;border:1px solid var(--prep-line);border-radius:12px;background:#edf3f7;box-sizing:border-box;color:var(--prep-ink);box-shadow:0 16px 80px #102d4b44;}
#section-input.preparation-section .preparation-pdf-dialog[open] {display:flex;}
.preparation-pdf-dialog::backdrop {background:#0c1724a6;}
#section-input.preparation-section .preparation-pdf-toolbar {display:flex;flex:none;align-items:center;justify-content:space-between;gap:16px;}
#section-input.preparation-section .preparation-pdf-toolbar h2 {margin:0;font:600 1.125rem/1.4 system-ui;}
#section-input.preparation-section .preparation-pdf-close {flex:none;min-height:44px;padding:8px 14px;border:1px solid var(--prep-line);border-radius:7px;background:#fff;color:var(--prep-ink);font:600 .9375rem/1.4 system-ui;cursor:pointer;}
#section-input.preparation-section .preparation-pdf-dialog .cv-preview-wrap {flex:1;height:0;min-height:0;max-height:none;}
@media(hover:none) {#section-input.preparation-section .preparation-preview-open {opacity:1;}}
@media(prefers-reduced-motion:reduce) {#section-input.preparation-section .preparation-preview-open {transition:none;}}
@media(max-width:800px) {
  #section-input.preparation-section {padding:32px 22px!important;}
  #section-input.preparation-section .preparation-layout {grid-template-columns:minmax(0,1fr);gap:32px;max-width:650px;}
  #section-input.preparation-section .preparation-title {font-size:clamp(32px,6vw,42px);}
  #section-input.preparation-section .preparation-introduction {font-size:16px;}
  #section-input.preparation-section .input-right {padding:20px;}
  #section-input.preparation-section .preparation-pdf-dialog {width:calc(100% - 16px);height:calc(100dvh - 16px);padding:12px;gap:10px;border-radius:8px;}
  #section-input.preparation-section .preparation-preview-open {top:28px;right:44px;}
  #section-input.preparation-section .cv-preview-wrap {height:min(480px,58dvh);min-height:260px;}
}
@media(max-width:400px) {
  #section-input.preparation-section {padding:28px 18px!important;}
  #section-input.preparation-section .input-left {gap:26px;}
  #section-input.preparation-section .preparation-step-heading {gap:10px;}
  #section-input.preparation-section .preparation-number {width:32px;height:32px;font-size:12px;}
  #section-input.preparation-section .preparation-step-title {font-size:17px;}
  #section-input.preparation-section .preparation-step-help {font-size:13px;}
  #section-input.preparation-section #job-ad-input {height:200px;padding:12px 14px;}
  #section-input.preparation-section .file-picker {gap:10px;padding:14px 12px;}
  #section-input.preparation-section .preparation-file-icon {width:34px;height:40px;}
  #section-input.preparation-section .file-btn {font-size:12px;}
  #section-input.preparation-section .file-name {font-size:13px;}
  #section-input.preparation-section .input-right {padding:16px;}
}

/* Approved typographic landing: scoped to the existing first section/header. */
.page-scroll>.page-start.drafted-landing {height:auto;min-height:100vh;min-height:100svh;background:#f8f7f4;}
.drafted-landing {
  --hero-navy:#0c1724;--hero-muted:#4e5d6e;--hero-turquoise:#02c8bb;--hero-line:#a5afb8;--hero-paper:#f8f7f4;
  --hero-gutter:clamp(20px,4vw,64px);
}
.drafted-landing>.navbar.drafted-site-header {
  position:relative;inset:auto;display:block;flex:none;width:100%;height:auto;min-height:0;margin:0;padding:0 var(--hero-gutter);
  border:0;border-bottom:1px solid var(--hero-line);background:var(--hero-paper);box-sizing:border-box;color:var(--hero-navy);
}
.drafted-site-header .drafted-header-inner {display:flex;align-items:center;justify-content:space-between;gap:20px;width:100%;max-width:1280px;min-height:76px;margin:0 auto;padding:15px 0;box-sizing:border-box;}
.drafted-site-header .drafted-home {display:block;flex:none;line-height:0;}
.drafted-site-header .drafted-nav-wordmark {display:block;width:144px;height:auto;}
.page-scroll>.page-start.drafted-landing>.hero-section.drafted-hero {
  display:flex;align-items:center;flex:1 0 auto;width:100%;height:auto;min-height:0;max-height:none;overflow:visible;margin:0;
  padding:clamp(36px,5svh,64px) var(--hero-gutter) clamp(36px,5svh,64px)!important;box-sizing:border-box;background:var(--hero-paper);color:var(--hero-navy);text-align:left;font-family:Arial,Helvetica,sans-serif;
}
.drafted-hero .drafted-hero-inner {display:grid;flex:0 1 auto;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(max(calc(clamp(2.5rem,5vw,4.5rem)*2.08),calc(clamp(1.125rem,1.5vw,1.375rem)*2.9 + 82px)),auto);gap:clamp(48px,6svh,72px);width:100%;min-width:0;max-width:1280px;margin:0 auto;}
/* Wordmark keeps its own aspect ratio. The two other assets are independent
   decoration; their SVG paths use non-scaling strokes rather than thick borders. */
.drafted-hero .drafted-hero-brand {position:relative;flex:none;width:100%;aspect-ratio:1380/354;}
.drafted-hero .drafted-hero-wordmark {position:absolute;left:0;top:0;display:block;width:100%;height:auto;}
.drafted-hero .drafted-hero-rule {position:absolute;left:0;top:91.242938%;display:block;width:100%;height:7.344633%;}
/* Clip only the transparent margins of the decorative SVG canvas. Text and
   document content keep visible overflow and may grow beyond the viewport. */
.drafted-hero .drafted-hero-registration {position:absolute;inset:-20px;overflow:clip;pointer-events:none;}
.drafted-hero .drafted-hero-marks {position:absolute;left:calc(20px - (100% - 40px)*.05797101);top:calc(20px - (100% - 40px)*.04237288);display:block;width:calc((100% - 40px)*1.11304348);max-width:none;height:calc((100% - 40px)*1.03954802);pointer-events:none;}
.drafted-hero .drafted-hero-motion {position:absolute;inset:0;display:block;width:100%;height:100%;overflow:visible;pointer-events:none;}
/* Keep the existing image's accessible name while its decorative vector layer
   plays. The image, scale and markers also remain the exact fallback/end state. */
.drafted-hero-motion-running>:is(.drafted-hero-wordmark,.drafted-hero-rule,.drafted-hero-registration) {opacity:0;}
/* Select the server-delivered start layer before the first body paint. */
.drafted-hero .drafted-hero-brand[data-initial-hero]>.drafted-hero-initial {display:none;}
html[data-drafted-hero="eligible"] .drafted-hero .drafted-hero-brand[data-initial-hero]>.drafted-hero-initial {display:block;}
html[data-drafted-hero="eligible"] .drafted-hero-brand[data-initial-hero]>:is(.drafted-hero-wordmark,.drafted-hero-rule,.drafted-hero-registration) {opacity:0;}
@media(prefers-reduced-motion:reduce) {
  html[data-drafted-hero] .drafted-hero .drafted-hero-brand[data-initial-hero]>.drafted-hero-initial {display:none!important;}
  html[data-drafted-hero] .drafted-hero-brand[data-initial-hero]>:is(.drafted-hero-wordmark,.drafted-hero-rule,.drafted-hero-registration) {opacity:1!important;}
}
.drafted-hero .drafted-hero-content {display:grid;flex:none;grid-template-columns:minmax(0,55fr) minmax(0,45fr);align-items:start;gap:clamp(32px,3vw,48px);margin:0;}
.drafted-hero .drafted-hero-heading {margin:0;color:var(--hero-navy);font-size:clamp(2.5rem,5vw,4.5rem);line-height:1.04;letter-spacing:-.045em;font-weight:800;text-transform:none;overflow-wrap:anywhere;}
.drafted-hero .drafted-hero-heading span {display:block;}
.drafted-hero .drafted-hero-description {margin:0;color:#233345;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.45;max-width:42ch;}
.drafted-hero .drafted-hero-action {display:inline-flex;align-items:center;justify-content:space-between;gap:24px;min-height:58px;max-width:100%;margin-top:22px;padding:14px 26px;border:1px solid var(--hero-navy);border-radius:6px;background:var(--hero-navy);color:#fff;font:600 1.1875rem/1.4 Arial,Helvetica,sans-serif;text-decoration:none;box-sizing:border-box;}
.drafted-hero .drafted-action-arrow {color:var(--hero-turquoise);font-size:30px;font-weight:400;line-height:1;}
.drafted-hero .drafted-hero-action:hover {background:#183044;border-color:#183044;}
.drafted-landing :is(.drafted-home,.drafted-hero-action):focus-visible {outline:2px solid #007f86;outline-offset:5px;}
@media(max-width:900px) {
  .drafted-hero .drafted-hero-inner {grid-template-rows:auto minmax(max(calc(clamp(2.125rem,4.7vw,2.75rem)*2.08),calc(clamp(1.125rem,1.5vw,1.375rem)*2.9 + 82px)),auto);}
  .drafted-hero .drafted-hero-heading {font-size:clamp(2.125rem,4.7vw,2.75rem);}
}
@media(max-width:800px) {
  .drafted-landing {--hero-gutter:22px;}
  .drafted-site-header .drafted-header-inner,.drafted-hero .drafted-hero-inner {max-width:650px;}
  .drafted-hero .drafted-hero-inner {grid-template-rows:auto minmax(calc(clamp(1.875rem,8.5vw,3.25rem)*2.12 + 23px + 1.0625rem*3.1 + 74px),auto);}
  .drafted-site-header .drafted-header-inner {min-height:64px;padding:12px 0;gap:16px;}
  .drafted-site-header .drafted-nav-wordmark {width:132px;}
  .page-scroll>.page-start.drafted-landing>.hero-section.drafted-hero {padding-top:28px!important;padding-bottom:28px!important;}
  .drafted-hero .drafted-hero-inner {gap:clamp(32px,5svh,48px);}
  .drafted-hero .drafted-hero-content {grid-template-columns:minmax(0,1fr);gap:23px;}
  .drafted-hero .drafted-hero-heading {font-size:clamp(1.875rem,8.5vw,3.25rem);line-height:1.06;}
  .drafted-hero .drafted-hero-description {font-size:1.0625rem;line-height:1.55;max-width:42ch;}
  .drafted-hero .drafted-hero-action {min-height:54px;margin-top:20px;padding:12px 22px;font-size:1.0625rem;}
}
@media(max-width:400px) {
  .drafted-landing {--hero-gutter:18px;}
}
@media(max-width:500px) {
  .drafted-hero .drafted-hero-registration,.drafted-hero .drafted-hero-marks,.drafted-hero .drafted-motion-marks {display:none;}
}


/* Two fixed page views; screen rules never participate in document/PDF layout. */
@media screen {
  html.drafted-pages[data-workspace-page=setup],html.drafted-pages[data-workspace-page=setup] body {height:auto;min-height:100%;overflow:auto!important;}
  html.drafted-pages[data-workspace-page=setup] .page-scroll {position:relative;inset:auto;height:auto;min-height:100svh;overflow:visible;scroll-snap-type:none;overscroll-behavior-y:auto;}
  html.drafted-pages[data-workspace-page=setup] .section-editor,
  html.drafted-pages .section-cta,html.drafted-pages .page-scroll>.w-code-block {display:none!important;}
  html.drafted-pages[data-workspace-page=editor] .page-start,
  html.drafted-pages[data-workspace-page=editor] #section-input {display:none!important;}
  html.drafted-pages[data-workspace-page=editor] .page-scroll {position:fixed;top:var(--workspace-viewport-top,0px);bottom:auto;height:var(--workspace-viewport-height,100dvh);overflow:hidden;scroll-snap-type:none;}
  html.drafted-pages[data-workspace-page=editor][data-workspace-booting] .section-editor {visibility:hidden;}
  html.drafted-pages[data-workspace-page=editor][data-workspace-ready=false] .section-editor {display:none!important;}
  html.drafted-pages[data-workspace-page=editor] .page-scroll>.section-editor.snap-section.drafted-app {width:100%;height:100%!important;min-height:0!important;max-height:none!important;margin:0;padding:0;}
  html.drafted-pages[data-workspace-page=editor] .section-editor.discovery-enabled .layout-container.editor-container {width:100%!important;max-width:none!important;height:100%;margin:0;border:0;border-radius:0;box-shadow:none;}
  html.drafted-pages[data-workspace-page=editor] .chat-messages,
  html.drafted-pages[data-workspace-page=editor] .cv-document {overscroll-behavior:contain;overflow:auto;min-height:0;}
  .workspace-back-setup {flex:none;color:inherit;font:500 .8125rem/1.4 system-ui;white-space:nowrap;text-decoration:none;padding:6px 2px;}
  .workspace-back-setup:hover {text-decoration:underline;}
  .workspace-main-actions .workspace-edit-job {min-height:36px;padding:7px 10px;border:1px solid #a0b3bf;border-radius:6px;background:transparent;color:inherit;font:500 .8125rem/1.4 system-ui;cursor:pointer;}
  .workspace-save-status {position:fixed;bottom:12px;left:12px;right:12px;z-index:1000;margin:0;padding:12px;border:1px solid #d3b68b;border-radius:6px;background:#fff6df;color:#453522;font:14px/1.5 system-ui;}
  .workspace-save-status[hidden],.workspace-empty[hidden] {display:none!important;}
  .workspace-empty {position:relative;z-index:1;max-width:620px;margin:15svh auto;padding:32px;color:#152a38;font-family:system-ui;}
  .workspace-empty a {display:inline-block;padding:12px 18px;background:#007f86;color:white;border-radius:6px;}
  .workspace-job-dialog,.workspace-replace-dialog {position:fixed;inset:var(--workspace-viewport-top,0px) 0 max(0px,calc(100dvh - var(--workspace-viewport-height,100dvh) - var(--workspace-viewport-top,0px))) 0;margin:auto;width:calc(100% - 32px);max-width:640px;max-height:calc(var(--workspace-viewport-height,100dvh) - 32px);box-sizing:border-box;padding:24px;border:1px solid #d7e2e9;border-radius:10px;background:#fff;color:#142a3d;font:1rem/1.5 system-ui;overflow:auto;}
  :is(.workspace-job-dialog,.workspace-replace-dialog)::backdrop {background:#0c1724a6;}
  :is(.workspace-job-dialog,.workspace-replace-dialog) h2 {margin:0 0 16px;font-size:1.375rem;}
  .workspace-job-dialog label {display:block;margin-bottom:8px;}
  .workspace-job-dialog textarea {display:block;width:100%;box-sizing:border-box;min-height:180px;padding:12px;border:1px solid #b8cbd7;border-radius:6px;font:1rem/1.5 system-ui;resize:vertical;}
  .workspace-job-dialog>div {display:flex;justify-content:flex-end;gap:12px;}
  :is(.workspace-job-dialog,.workspace-replace-dialog) button {padding:10px 14px;margin:4px;border:1px solid #c2d5dc;border-radius:6px;background:#edf3f7;color:#142a3d;font:600 .9375rem/1.5 system-ui;cursor:pointer;}
  :is(.workspace-job-dialog,.workspace-replace-dialog) :is([data-save],[data-replace]) {background:#007f86;color:white;border-color:#007f86;}
  :is(.workspace-back-setup,.workspace-edit-job):focus-visible {outline:2px solid #66d6d7;outline-offset:3px;}
  .workspace-earlier-answers {padding:12px;border:1px solid #d7e2e9;border-radius:6px;background:#f6f9fa;color:#30485a;}
  .workspace-earlier-answers blockquote {white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0 16px;}
  @media(max-width:700px){
    .section-editor .workspace-identity {flex-wrap:wrap;gap:8px;}
    .workspace-back-setup {font-size:.6875rem;}
    .workspace-main-actions .workspace-edit-job {font-size:.6875rem;min-height:32px;padding:5px 8px;}
    html.drafted-pages[data-workspace-keyboard=true] .section-editor .editor-layout {grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);}
    html.drafted-pages[data-workspace-keyboard=true] .section-editor .editor-right {display:none!important;}
    html.drafted-pages[data-workspace-keyboard=true] .section-editor :is(.chat-title,.workspace-job-context,.workspace-input-help) {display:none!important;}
  }
}

/* Local shell layout. Document and print geometry stay in their existing renderer. */
@media screen {
  html.drafted-pages[data-workspace-page=setup] {scroll-snap-type:y mandatory;}
  html.drafted-pages[data-workspace-page=setup] body {overflow:visible!important;}
  html.drafted-pages[data-workspace-page=setup] .page-start {scroll-snap-align:start;scroll-margin-top:var(--drafted-env-height);}
  html.drafted-pages[data-workspace-page=setup] .drafted-hero {scroll-snap-align:none;}
  html.drafted-pages[data-workspace-page=setup] #section-input {scroll-snap-align:start;scroll-snap-stop:always;}
  html.drafted-pages:has(dialog[open]) {scroll-snap-type:none;}

  #section-input.preparation-section .preparation-layout {align-items:stretch;}
  #section-input.preparation-section .input-right {display:flex;flex-direction:column;}
  #section-input.preparation-section .cv-preview-box {display:flex;flex-direction:column;flex:1;}
  #section-input.preparation-section .cv-preview-box>.cv-preview-wrap {flex:1;height:0;min-height:0;aspect-ratio:auto;}
  @media(min-width:801px) {
    #section-input.preparation-section {--prep-section-pad:clamp(16px,3svh,32px);padding-block:var(--prep-section-pad)!important;}
    #section-input.preparation-section .preparation-layout {min-height:calc(100svh - var(--prep-section-pad) - var(--prep-section-pad));}
    #section-input.preparation-section .input-left {gap:16px;}
    #section-input.preparation-section .input-left> * {flex:none;}
    #section-input.preparation-section .input-left>.preparation-step:has(#job-ad-input) {display:flex;flex-direction:column;flex:1 0 auto;}
    #section-input.preparation-section .preparation-intro {margin:0;}
    #section-input.preparation-section .preparation-title {font-size:clamp(28px,2.6vw,38px);}
    #section-input.preparation-section .preparation-introduction {margin-top:10px;font-size:16px;line-height:1.5;}
    #section-input.preparation-section .preparation-step-heading {margin-bottom:10px;gap:12px;}
    #section-input.preparation-section .preparation-step-title {font-size:18px;}
    #section-input.preparation-section .preparation-step-help {font-size:13px;}
    #section-input.preparation-section #job-ad-input {flex:1 0 auto;height:clamp(100px,calc(100svh - 510px),180px);min-height:100px;max-height:none;padding:12px 14px;line-height:1.5;}
    #section-input.preparation-section .preparation-job-feedback {margin-top:6px;}
    #section-input.preparation-section :is(.preparation-job-hint,#jobcontext-status) {padding:6px 10px;}
    #section-input.preparation-section .file-picker {padding:12px 14px;}
    #section-input.preparation-section .preparation-file-icon {width:36px;height:38px;}
    #section-input.preparation-section #upload-btn {min-height:46px;padding:10px 16px;}
    #section-input.preparation-section .preparation-actions {gap:6px;}
    #section-input.preparation-section .preparation-status {padding:7px 10px;}
    /* The form sets the shared row height; PDF page ratio cannot enlarge it. */
    #section-input.preparation-section .input-right {min-height:0;padding:16px;}
    #section-input.preparation-section .cv-preview-box {contain:size;min-height:0;}
    #section-input.preparation-section .preparation-preview-open {top:24px;right:40px;}
  }

  html.drafted-pages[data-workspace-page=editor] .drafted-environment {display:none;}
  html.drafted-pages[data-workspace-page=editor] body>.page-scroll {top:var(--workspace-viewport-top,0px);height:var(--workspace-viewport-height,100dvh);}
  .section-editor.discovery-enabled .cv-card {padding:10px 12px!important;gap:8px;}
  .section-editor.discovery-enabled .cv-document {padding:12px;}
  .section-editor .workspace-preview-title {display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;width:100%;gap:6px;padding:0;min-height:0;}
  .workspace-preview-primary,.workspace-preview-secondary {display:flex;align-items:center;gap:6px;min-width:0;width:100%;flex:none;}
  .section-editor .workspace-preview-primary .workspace-preview-label {font-size:13px;white-space:nowrap;}
  .section-editor .workspace-preview-primary .workspace-page-count {margin-left:auto;white-space:nowrap;font-size:11px;}
  .section-editor .workspace-preview-primary :is(select,.workspace-icon-button) {height:30px;min-height:30px;}
  .section-editor .workspace-preview-primary .workspace-icon-button {width:30px;}
  .section-editor .workspace-preview-primary select {width:96px;font-size:12px;}
  .workspace-preview-secondary {overflow-x:auto;overflow-y:hidden;padding:3px;scrollbar-width:thin;}
  .section-editor .workspace-preview-secondary .document-comparison {flex:0 0 auto;flex-wrap:nowrap;padding:0;gap:3px;}
  .section-editor .workspace-preview-secondary .document-comparison button {white-space:nowrap;font-size:11px;padding:4px 6px;}
  .section-editor .workspace-preview-secondary .document-comparison-status:empty {display:none;}
  .section-editor .workspace-preview-secondary .workspace-zoom {flex:0 0 auto;margin-left:auto;gap:4px;}
  .section-editor .workspace-preview-secondary .workspace-zoom input {width:64px;flex-basis:64px;}
  .workspace-divider {display:none;}
  @media(min-width:801px) {
    .section-editor.discovery-enabled .editor-layout {grid-template-columns:minmax(0,var(--workspace-left,38%)) 8px minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:0;}
    .workspace-divider {display:block;position:relative;align-self:stretch;cursor:col-resize;touch-action:none;background:#edf3f6;outline-offset:-2px;}
    .workspace-divider::before {content:'';position:absolute;inset:0 3px;background:#d1dfe5;}
    .workspace-divider::after {content:'';position:absolute;top:calc(50% - 20px);left:2px;width:4px;height:40px;border-radius:3px;background:#8ca7b4;}
    .workspace-divider:is(:hover,:focus-visible)::after,.is-resizing .workspace-divider::after {background:#007f86;}
    .editor-layout.is-resizing {cursor:col-resize;user-select:none;}
  }
  @media(max-width:800px) {
    #section-input.preparation-section .cv-preview-box>.cv-preview-wrap {flex:none;height:auto;min-height:0;aspect-ratio:210 / 297;}
    .section-editor.discovery-enabled .editor-layout {grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(0,1fr);gap:0;}
    .section-editor .workspace-preview-primary .workspace-preview-label {font-size:12px;}
    .section-editor.discovery-enabled .cv-card {padding:6px 8px!important;gap:4px;}
    .section-editor.discovery-enabled .cv-document {padding:8px;}
    .section-editor .workspace-preview-title {gap:2px;}
    html.drafted-pages[data-workspace-keyboard=true] .section-editor .editor-layout {grid-template-rows:minmax(0,1fr);}
  }
}
@media print {.workspace-divider {display:none!important;}}

.drafted-cv-scan{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:hidden;z-index:2}
.drafted-scan-region rect{fill:#02c8bb;fill-opacity:.018;stroke:#009e9c;stroke-opacity:.55;stroke-width:.65;vector-effect:non-scaling-stroke}
.drafted-scan-region path{fill:none;stroke:#007f86;stroke-width:1;vector-effect:non-scaling-stroke}
.drafted-scan-region circle{fill:#00a9a5}
.drafted-cv-scan[data-reduced=true] .drafted-scan-sweep{display:none}
@media(prefers-reduced-motion:reduce){.drafted-scan-sweep{display:none!important}}
@media print{.drafted-cv-scan{display:none!important}}
