:root { --bg:#eef2f6; --bg-alt:#fff; --border:#dce4ed; --text:#22334a; --text-dim:#65758a; --primary:#087c78; --primary-hover:#05615e; --danger:#b64051; --success:#087c78; --navy:#182f49; }
* { box-sizing:border-box; margin:0; padding:0; }
body { font:14px/1.6 -apple-system,BlinkMacSystemFont,'PingFang SC','Segoe UI',sans-serif; color:var(--text); background:var(--bg); }
button,input,select { font:inherit; }
button { cursor:pointer; }
button:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible { outline:3px solid #35b4ae; outline-offset:3px; }
button:disabled { opacity:.5; cursor:wait; }
#app { height:100vh; height:100dvh; display:flex; flex-direction:column; }
header { min-height:92px; padding:18px 28px; display:flex; justify-content:space-between; align-items:center; gap:16px; background:white; border-bottom:1px solid var(--border); }
.brand { display:flex; gap:14px; align-items:center; }
.brand-mark { width:38px; height:40px; display:grid; grid-template-columns:1fr 1fr; gap:4px; transform:rotate(-6deg); }
.brand-mark i { background:var(--primary); border-radius:4px; }
.brand-mark i:first-child { grid-row:span 2; background:var(--navy); }
.brand-mark i:last-child { background:#8dcfc8; }
h1 { font:700 23px/1.25 'Avenir Next',sans-serif; letter-spacing:-1px; }
h1 span { font:500 12px/1.4 -apple-system,sans-serif; letter-spacing:0; margin-left:14px; color:var(--text-dim); }
.brand p { font-size:11px; color:var(--text-dim); margin-top:5px; letter-spacing:1px; }
.status { display:flex; align-items:center; gap:14px; }
.badge { font-size:12px; color:var(--text-dim); display:inline-flex; align-items:center; gap:6px; }
.badge:before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; flex-shrink:0; }
.badge.busy { color:#976c18; }.badge.error { color:var(--danger); }.badge.success { color:var(--primary); }
main { display:grid; grid-template-columns:238px minmax(0,1fr) min(520px, calc((100% - 238px) / 2)); flex:1; min-height:0; }
main > aside,main > section { min-width:0; overflow:auto; }
#sidebar { background:var(--navy); padding:28px 16px; color:#f5f9ff; }
.sidebar-heading { padding:0 12px 24px; }
#btn-new-variant { width:100%; min-height:44px; margin-bottom:24px; display:flex; align-items:center; justify-content:center; gap:8px; }
#btn-new-variant span { font-size:20px; line-height:1; font-weight:400; }
.eyebrow { display:block; font:600 10px/1.4 'Avenir Next',sans-serif; letter-spacing:1.8px; color:var(--text-dim); margin-bottom:7px; }
#sidebar .eyebrow { color:#8cb6cd; }
.sidebar-heading h2 { font-size:20px; font-weight:600; }
#variant-count { display:inline-block; font:12px/22px ui-monospace,monospace; padding:0 7px; background:#304961; color:#c9e0ee; border-radius:6px; vertical-align:middle; margin-left:7px; }
.variant-card { width:100%; text-align:left; color:#d9e5f2; background:transparent; padding:15px 14px; border:1px solid transparent; border-radius:10px; margin-bottom:7px; transition:background .16s,border-color .16s; }
.variant-card:hover { background:#243f59; }.variant-card.active { background:#edf9f7; color:#154b50; border-color:#a1d4ce; box-shadow:inset 4px 0 #28a398; }
.variant-card h3 { font-size:13px; font-weight:550; line-height:1.6; }.variant-card p { font-size:11px; opacity:.7; margin-top:7px; }.variant-card p span { margin:0 6px; }
#editor { padding:28px; background:radial-gradient(circle at top right,#dfedea,transparent 48%),var(--bg); }
.editor-header { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:16px; margin-bottom:24px; }
.editor-header h2 { font-size:23px; letter-spacing:-.5px; font-weight:650; }
.actions,.section-actions,.block-actions { display:flex; gap:6px; flex-wrap:wrap; }
.btn,.btn-primary,.btn-danger,.btn-sm { border:1px solid var(--border); border-radius:7px; padding:8px 13px; font-size:12px; font-weight:550; background:white; color:var(--text); transition:background .15s; }
.btn:hover,.btn-sm:hover { background:#e4eeed; }
.btn-primary { background:var(--primary); color:white; border-color:var(--primary); box-shadow:0 3px 8px #087c7818; }.btn-primary:hover { background:var(--primary-hover); }
.btn-danger { background:#fff5f5; color:var(--danger); border-color:#eedbdd; }.btn-danger:hover { background:#fbe5e8; }
.btn-sm { padding:5px 9px; font-size:11px; }
.section-card { background:#fff; border:1px solid var(--border); border-radius:13px; margin-bottom:18px; box-shadow:0 3px 12px #1b345006; overflow:hidden; }
.section-header { padding:16px 18px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid #edf1f5; background:#fbfcfd; flex-wrap:wrap; }
.section-header h3 { font-size:15px; font-weight:650; display:flex; align-items:center; gap:9px; }.section-header h3:before { content:''; width:4px; height:16px; background:var(--primary); border-radius:3px; }
.block-item { margin:12px; padding:15px; display:flex; align-items:flex-start; gap:10px; background:#fff; border:1px solid var(--border); border-radius:8px; cursor:grab; transition:border-color .15s; }.block-item:hover { border-color:#93bbb9; }
.block-info { flex:1; min-width:0; }.block-name { font-size:13px; font-weight:600; overflow-wrap:anywhere; }.block-path { font:10px/1.6 ui-monospace,'SF Mono',monospace; color:#798799; margin-top:4px; overflow-wrap:anywhere; }.block-actions { flex-shrink:0; }.block-actions .btn-sm { padding:3px 7px; }
.block-excerpt { margin-top:8px; font-size:12px; line-height:1.7; color:var(--text-dim); overflow-wrap:anywhere; }
.block-details { margin-top:10px; cursor:auto; }.block-details summary { width:fit-content; color:var(--primary); cursor:pointer; font-size:12px; padding:3px 0; }
.block-rendered { margin-top:10px; padding:20px; background:#fcfdfd; border:1px solid #dce8e7; border-top:3px solid #a9cfca; border-radius:5px; max-height:420px; overflow:auto; overflow-wrap:anywhere; cursor:text; user-select:text; font-size:12px; line-height:1.85; }
.block-rendered p { margin:6px 0; white-space:pre-wrap; }.block-rendered ul { padding-left:19px; margin:10px 0; }.block-rendered li { margin:7px 0; }.block-rendered li::marker { color:var(--primary); }.block-rendered h5 { font-size:15px; margin:10px 0; }.block-rendered a { color:var(--primary); text-underline-offset:3px; }.block-rendered > .block-excerpt:last-child { font-size:10px; padding-top:12px; border-top:1px dashed var(--border); margin-top:16px; }
.block-raw { margin-top:8px; }.block-raw summary { color:var(--text-dim); font-size:11px; }
.block-source { margin-top:8px; padding:12px; max-height:320px; overflow:auto; background:#f3f6f9; border:1px solid var(--border); border-radius:6px; font:11px/1.8 ui-monospace,monospace; white-space:pre-wrap; overflow-wrap:anywhere; user-select:text; cursor:text; }
.resume-entry { margin:18px 0 8px; }.resume-entry:first-child { margin-top:0; }.resume-entry-header { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 16px; }.resume-entry-title { flex:1 1 180px; font-size:15px; font-weight:600; }.resume-entry-date { margin-left:auto; font-size:11px; color:var(--text-dim); }.resume-entry-detail { font-size:12px; color:var(--text-dim); }.resume-entry p { margin:2px 0; }.resume-muted { color:var(--text-dim); }
#btn-add-section { width:100%; padding:12px; border-style:dashed; background:#ffffff80; color:var(--primary); }
#preview { padding:28px 20px; background:#e5ebf1; border-left:1px solid #d7e0e9; display:flex; flex-direction:column; }.preview-header { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:24px; }.preview-header h2 { font-size:17px; }
#preview-frame { flex:1; width:100%; min-height:400px; border:0; background:white; border-radius:6px; }
.empty-state { text-align:center; color:var(--text-dim); padding:50px 12px; }.empty-state h2,.empty-state h3 { color:var(--text); margin:16px 0 8px; }.empty-state h2 { font-size:22px; }.empty-state h3 { font-size:14px; }.empty-state p { font-size:12px; line-height:1.9; }.empty-symbol { display:block; width:80px; height:88px; margin:0 auto 24px; }
.paper-placeholder { width:140px; height:185px; background:white; border:1px solid #d5dfe8; box-shadow:7px 7px 0 #d5dfe7; margin:0 auto 28px; padding:24px 18px; transform:rotate(-3deg); }.paper-placeholder b,.paper-placeholder i { display:block; height:4px; background:#dce4ed; margin-bottom:9px; }.paper-placeholder b { width:46%; height:7px; background:#9ebcbf; margin-bottom:15px; }.paper-placeholder i:nth-child(4) { width:65%; margin-bottom:22px; }
#preview-errors { padding:15px; color:var(--danger); background:#fff1f3; border-radius:8px; overflow:auto; font:12px/1.8 ui-monospace,monospace; overflow-wrap:anywhere; }.error-line { padding:4px 0; }
.modal { position:fixed; inset:0; display:flex; align-items:center; justify-content:center; z-index:1000; background:#13283e80; backdrop-filter:blur(5px); padding:20px; }.modal-content { background:white; border:1px solid var(--border); border-radius:16px; width:660px; max-width:100%; max-height:85dvh; display:flex; flex-direction:column; box-shadow:0 24px 90px #13283e40; }.modal-header { padding:18px 24px; border-bottom:1px solid var(--border); display:flex; justify-content:space-between; align-items:center; }.modal-header h3 { font-size:18px; }.close { border:0; background:#f0f4f7; width:36px; height:36px; border-radius:50%; color:var(--text-dim); font-size:24px; }.modal-body { overflow:auto; padding:24px; }.search-input { width:100%; padding:12px; border:1px solid var(--border); border-radius:8px; margin-bottom:20px; }.block-group { margin-bottom:24px; }.block-group h4 { color:var(--text-dim); font-size:12px; margin-bottom:10px; }.block-list-item { padding:15px; border:1px solid var(--border); border-radius:9px; margin-bottom:8px; }.block-select { float:right; margin-left:8px; color:var(--primary); }.block-list-item .block-name { padding-top:4px; }
label { display:block; margin-bottom:18px; font-size:13px; font-weight:500; }label input,label select { display:block; width:100%; margin-top:8px; padding:11px; border:1px solid var(--border); border-radius:7px; background:white; color:var(--text); }
.workspace-nav { display:none; }
@media(min-width:1600px) { main { grid-template-columns:260px minmax(0,1fr) 520px; }#editor { padding:32px 40px; } }
@media(max-width:1150px) {
.workspace-nav { display:flex; padding:10px 20px; gap:6px; background:white; border-bottom:1px solid var(--border); }
.workspace-nav button { flex:1; border:0; background:transparent; padding:10px; border-radius:7px; font-size:12px; color:var(--text-dim); }.workspace-nav button[aria-pressed=true] { background:#e3f2ef; color:var(--primary); font-weight:600; }
main { display:block; overflow:hidden; }main > aside,main > section { display:none !important; height:100%; }main[data-view=sidebar] > #sidebar,main[data-view=editor] > #editor { display:block !important; }main[data-view=preview] > #preview { display:flex !important; }
#variant-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }#sidebar { padding:24px; }.variant-card { background:#203b56; margin:0; }#preview { border:0; }
}
@media(max-width:600px) {
header { padding:14px 16px; min-height:76px; align-items:center; }h1 { font-size:19px; }h1 span,.brand p { display:none; }.brand { gap:9px; }.brand-mark { width:27px; height:30px; gap:3px; }.status { gap:6px; flex-wrap:wrap; justify-content:flex-end; }.status .badge { font-size:10px; max-width:110px; }.status button { padding:9px; font-size:11px; }
.workspace-nav { padding:8px 12px; }.workspace-nav button { min-height:44px; }#editor { padding:20px 12px; }.editor-header { gap:14px; margin-bottom:18px; }.editor-header h2 { font-size:21px; }.actions { width:100%; }.actions button { min-height:44px; flex:1; }.eyebrow { font-size:9px; }
#sidebar { padding:22px 16px; }#variant-list { grid-template-columns:1fr; }.variant-card { padding:17px; }.variant-card h3 { font-size:14px; }.sidebar-heading { padding-left:4px; }
.section-header { padding:13px; gap:10px; }.section-actions { width:100%; }.section-actions .btn-sm { min-height:40px; flex:1; }.section-actions .btn-sm:first-child { flex:2; }
.block-item { margin:9px; padding:12px; flex-wrap:wrap; }.block-info { flex-basis:100%; }.block-actions { width:100%; justify-content:flex-end; padding-top:8px; border-top:1px solid #edf1f5; }.block-actions .btn-sm { min-width:44px; min-height:40px; }.block-details summary { min-height:40px; padding:10px 0; }.block-rendered { padding:14px; max-height:none; }.resume-entry-title { flex-basis:100%; }.resume-entry-date { margin-left:0; }.resume-entry-header { gap:0; }.block-excerpt { font-size:11px; }
#preview { padding:22px 16px; }.modal { padding:10px; align-items:flex-end; }.modal-content { border-radius:16px 16px 8px 8px; max-height:90dvh; }.modal-header,.modal-body { padding:16px; }.search-input,label input,label select { font-size:16px; }.close,.block-select { min-width:44px; min-height:44px; }
}
@media(prefers-reduced-motion:reduce) { * { transition:none !important; scroll-behavior:auto !important; } }

.profile-help { color:var(--text-dim); font-size:12px; margin-bottom:20px; }
.document-state-action { border:0; padding:0; background:none; color:var(--primary); text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.profile-photo { display:flex; align-items:center; gap:18px; padding:16px; background:var(--bg); border-radius:10px; margin-bottom:20px; }
.profile-photo img { width:86px; height:120px; object-fit:contain; background:white; border-radius:5px; }
.profile-photo label { margin-bottom:6px; }.profile-photo input { max-width:100%; padding:0; border:0; font-size:12px; }
.profile-photo p { font-size:11px; color:var(--text-dim); margin-bottom:8px; }
.profile-photo > div { min-width:0; }.profile-fields { display:grid; grid-template-columns:1fr 1fr; gap:0 16px; }
#profile-message { color:var(--primary); font-size:12px; margin-bottom:14px; }
@media(max-width:600px) { .profile-fields { grid-template-columns:1fr; } .brand-mark { display:none; } header { padding:12px 10px; gap:6px; } h1 { font-size:16px; } .status { gap:4px; }.status .badge { display:none; } }

.custom-fields-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:8px 0; }
#custom-field-count { color:var(--text-dim); font-size:12px; font-weight:400; margin-left:8px; }
.custom-field { display:grid; grid-template-columns:1fr 2fr auto; gap:10px; align-items:center; }
.custom-field label { min-width:0; }.custom-field button { min-height:40px; }
@media(max-width:600px) { .custom-field { grid-template-columns:1fr auto; padding:12px; background:var(--bg); border-radius:8px; margin-bottom:12px; }.custom-field label { grid-column:1; margin-bottom:6px; }.custom-field button { grid-column:2; grid-row:1 / 3; } }

textarea { display:block; width:100%; margin-top:8px; padding:12px; border:1px solid var(--border); border-radius:8px; font:inherit; line-height:1.7; resize:vertical; color:var(--text); background:white; }
textarea:focus-visible { outline:3px solid #35b4ae; outline-offset:2px; }
.experience-modes { display:flex; gap:8px; margin-bottom:20px; }.experience-modes button { flex:1; }.experience-modes button[aria-pressed=true] { background:#e3f2ef; border-color:#8dcfc8; color:var(--primary); }
.experience-scope-intro { margin-bottom:22px; padding:14px 17px; border-left:3px solid var(--primary); background:#f0f8f7; border-radius:0 8px 8px 0; }
.experience-scope-intro strong { display:block; font-size:14px; line-height:1.5; }
.experience-scope-intro p { margin-top:4px; color:var(--text-dim); font-size:12px; line-height:1.65; }
.experience-scope { min-width:0; margin:0 0 24px; padding:0 0 22px; border:0; border-bottom:1px solid var(--border); }
.experience-scope legend { padding:0; font-size:16px; font-weight:650; line-height:1.5; }
.experience-scope-impact { margin:5px 0 12px; color:var(--text-dim); font-size:12px; line-height:1.65; overflow-wrap:anywhere; }
.experience-scope-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.experience-scope-option { position:relative; min-width:0; margin:0; cursor:pointer; }
.experience-scope-option input { position:absolute; z-index:1; top:16px; left:15px; width:17px; height:17px; margin:0; padding:0; accent-color:var(--primary); cursor:pointer; }
.experience-scope-card { display:block; height:100%; min-height:102px; padding:13px 13px 13px 43px; border:1px solid var(--border); border-radius:9px; background:#fff; transition:background .15s,border-color .15s,box-shadow .15s; }
.experience-scope-card strong { display:block; margin-bottom:5px; font-size:13px; line-height:1.45; }
.experience-scope-card > span { display:block; color:var(--text-dim); font-size:12px; font-weight:400; line-height:1.55; }
.experience-scope-option:hover .experience-scope-card { border-color:#8dcfc8; }
.experience-scope-option input:checked + .experience-scope-card { border-color:var(--primary); background:#eef9f7; box-shadow:inset 0 0 0 1px var(--primary); }
.experience-scope-option input:focus-visible + .experience-scope-card { outline:3px solid #35b4ae; outline-offset:3px; }
#experience-paste-panel { padding:14px; background:var(--bg); border-radius:10px; margin-bottom:20px; }
#experience-message { margin-top:14px; }#experience-original-panel { margin-bottom:16px; }
.experience-description-field { margin-bottom:20px; }
.block-rendered ol { padding-left:24px; margin:10px 0; }
.rich-editor-label { display:flex; justify-content:space-between; gap:12px; align-items:baseline; margin-bottom:8px; }
#experience-description-count { color:var(--text-dim); font-size:11px; font-variant-numeric:tabular-nums; }
.rich-editor-shell { border:1px solid var(--border); border-radius:8px; overflow:hidden; background:var(--bg-alt); }
.rich-editor-shell:focus-within { border-color:var(--primary); box-shadow:0 0 0 2px #087c781a; }
.rich-editor-toolbar { display:flex; align-items:center; gap:4px; padding:6px 8px; background:#f7f9fb; border-bottom:1px solid var(--border); }
.rich-editor-toolbar button { display:inline-flex; align-items:center; justify-content:center; gap:5px; min-width:34px; height:34px; padding:0 9px; border:1px solid transparent; border-radius:5px; background:transparent; color:var(--text); font-size:12px; }
.rich-editor-toolbar button strong,.rich-editor-toolbar button em { font:700 17px Georgia,serif; }
.rich-editor-toolbar button em { font-style:italic; }
.rich-editor-toolbar button:hover { background:#eaf0f4; }
.rich-editor-toolbar button[aria-pressed=true] { color:var(--primary); background:#e3f2ef; border-color:#8dcfc8; }
.rich-editor-divider { width:1px; height:18px; margin:0 5px; background:var(--border); }
.rich-editor-body { position:relative; min-height:164px; max-height:320px; overflow:auto; padding:12px 14px; font:inherit; font-weight:400; line-height:1.75; overflow-wrap:anywhere; white-space:pre-wrap; outline:none; }
.rich-editor-body:focus-visible { outline:2px solid var(--primary); outline-offset:-2px; }
.rich-editor-body[aria-invalid=true] { box-shadow:inset 0 0 0 2px var(--danger); }
.date-range { min-width:0; margin-bottom:18px; font-size:13px; font-weight:500; }
.date-range-inputs { display:flex; align-items:center; gap:6px; margin-top:8px; }
.date-range-inputs input { flex:1 1 0; min-width:0; padding:11px; border:1px solid var(--border); border-radius:7px; background:white; color:var(--text); font-variant-numeric:tabular-nums; }
.date-range-separator { flex:none; color:var(--text-dim); }
.date-range-present { flex:none; align-self:stretch; padding:0 10px; border:1px solid var(--border); border-radius:7px; background:var(--bg); color:var(--text); font-size:12px; }
.date-range-present:hover { color:var(--primary); border-color:#8dcfc8; }
.import-card .date-range { display:grid; gap:5px; margin:0; }.import-card .date-range-inputs { margin-top:0; }.import-card .date-range-inputs input { padding:8px; }
@media(max-width:600px) { .date-range-inputs input { font-size:16px; }.date-range-present { min-width:44px; min-height:44px; } }
.rich-editor-body[data-empty=true]::before { content:attr(data-placeholder); position:absolute; color:var(--text-dim); pointer-events:none; }
.rich-editor-body p { margin:0 0 8px; }.rich-editor-body p:last-child { margin-bottom:0; }
.rich-editor-body ul,.rich-editor-body ol { margin:4px 0 8px; padding-left:24px; }
.rich-editor-body li { margin:3px 0; }.rich-editor-help { margin-top:7px; font-size:11px; color:var(--text-dim); }
@media(max-width:600px) { .rich-editor-body { font-size:16px; min-height:160px; }.rich-editor-toolbar button { min-width:44px; height:44px; }.rich-editor-toolbar { padding:4px; } }
[hidden] { display:none !important; }
@media(max-width:600px) { textarea { font-size:16px; }#experience-submit { width:100%; min-height:44px; }.experience-scope-choices { grid-template-columns:1fr; gap:8px; }.experience-scope-card { min-height:0; }.experience-scope { margin-bottom:18px; padding-bottom:18px; } }

#pdf-pages { overflow: auto; min-height: 0; padding: 12px 0; }
#pdf-pages .pdf-native { display: block; width: 100%; height: 100%; min-height: 70vh; border: 0; background: white; border-radius: 6px; }
#pdf-pages img { display: block; width: 100%; height: auto; margin-bottom: 16px; background: white; box-shadow: 0 2px 12px #0001; }
.preview-actions { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.preview-header { flex-wrap:wrap; }
#pdf-open { display:inline-block; margin:0; text-decoration:none; }
#pdf-open[hidden], #pdf-pages[hidden] { display: none; }

/* A content block is one compact title row; details appear only on demand. */
.block-item { display: flow-root; padding: 8px 12px; }
.block-info { flex: 1; min-width: 0; }
.block-details { margin: 0; }
.block-details > summary { display: flex; align-items: center; gap: 7px; width: 100%; min-height: 28px; padding: 3px 0; color: var(--text); font-size: 13px; font-weight: 600; list-style: none; }
.block-details > summary::-webkit-details-marker { display: none; }
.block-details > summary::before { content: '▸'; color: var(--text-dim); flex: none; }
.block-details[open] > summary::before { content: '▾'; }
.block-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.block-tag { flex: none; padding: 1px 6px; border-radius: 999px; background: #eef2f6; color: var(--text-dim); font-size: 10px; font-weight: 500; }
.block-warning { flex: none; padding: 1px 6px; border-radius: 999px; background: #fdecee; color: var(--danger); font-size: 10px; font-weight: 500; }
.block-item.block-placeholder { background: #fafbfc; border-style: dashed; }
.block-placeholder-body { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-height: 28px; }
.block-placeholder-add { color: var(--primary); border-color: #a9cfca; }
.block-placeholder-note { color: var(--text-dim); font-size: 12px; }
.block-actions .btn-sm.is-unavailable { color: #9aa6b4; background: #f6f8fa; cursor: not-allowed; }
.block-details > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 3px; }
.block-actions { width: auto; padding: 0; border: 0; flex-wrap: nowrap; }
.block-actions .btn-sm { min-width: 28px; min-height: 28px; }
/* Only the title shares a row with actions; expanded content clears that row. */
.block-item > .block-actions { float: right; margin-left: 10px; }
.block-item .block-details > summary { width: auto; }
.block-item .block-details > .block-rendered { clear: both; margin-top: 0; padding-top: 8px; }
.block-list-item { padding: 8px 12px; }
.block-details .block-rendered { margin-top: 8px; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; max-height: none; overflow: visible; }

.section-modal-content { width: 440px; }
.section-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* Keep the scroller inside the dialog's rounded shell. */
.modal-content { overflow: hidden; min-height: 0; }
.modal-header { flex-shrink: 0; }
.modal-body { min-height: 0; overscroll-behavior: contain; scrollbar-gutter: stable; }

/* In the picker, read the content before choosing a block. */
#block-picker-modal .modal-content { width: 800px; }
#block-picker-modal .modal-body { margin-bottom: 12px; }
#block-picker-modal .block-list-item { position: relative; padding: 16px; }
#block-picker-modal .block-select { float: none; position: absolute; top: 12px; right: 16px; margin: 0; min-height: 36px; }
#block-picker-modal .block-details > summary { width: calc(100% - 76px); min-height: 36px; font-size: 12px; font-weight: 400; color: var(--text-dim); }
#block-picker-modal .block-title { white-space: normal; overflow-wrap: anywhere; }
#block-picker-modal .block-rendered { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--border); }
@media(max-width:600px) {
  #block-picker-modal .block-select { min-height: 44px; }
  #block-picker-modal .block-details > summary { min-height: 44px; }
}

/* Local resume directory picker */
#btn-workspace { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-path-row { display: flex; gap: 8px; margin: 10px 0; }
#workspace-path { flex: 1; min-width: 0; }
#workspace-directories { max-height: 240px; overflow-y: auto; margin: 12px 0; display: grid; gap: 6px; }
.workspace-directory { text-align: left; overflow-wrap: anywhere; }
#workspace-current { overflow-wrap: anywhere; }
#workspace-error { color: #b42318; }
#workspace-unsaved { margin-bottom: 16px; }
#workspace-path { padding: 11px; border: 1px solid var(--border); border-radius: 7px; background: white; color: var(--text); }
#workspace-unsaved label { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
#workspace-discard { display: inline-block; width: auto; margin: 0; padding: 0; flex: none; }
#source-text { display: block; width: 100%; min-height: 300px; height: 42dvh; resize: vertical; padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: #f8fafc; color: var(--text); font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; tab-size: 2; box-sizing: border-box; }
#source-help { margin-top: 10px; }

/* One editor per block: content and source are two tabs over the same draft. */
#experience-modal.is-editing .modal-content { width: 820px; }
.edit-tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.edit-tabs button { margin-bottom: -1px; padding: 9px 16px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--text-dim); font-size: 13px; font-weight: 600; }
.edit-tabs button:hover { color: var(--text); }
.edit-tabs button[aria-selected=true] { border-bottom-color: var(--primary); color: var(--primary); }
.edit-tabs button:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: 6px 6px 0 0; }
.edit-tabs button:disabled { cursor: progress; }
.edit-panel { min-width: 0; margin: 0; padding: 0; border: 0; }
.edit-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Shared action icons retain the text labels and inherit each button color. */
.button-icon { width:14px; height:14px; display:inline-block; vertical-align:-2px; margin-right:6px; }

/* Document import review */
.import-content { width:min(900px, 94vw); max-height:90vh; }
.import-content .modal-body { overflow:auto; }
.import-card { border:1px solid var(--border, #ddd); margin:20px 0; padding:16px; display:grid; gap:10px; }
.import-card label { display:grid; gap:5px; }
.import-card input:not([type=checkbox]), .import-card textarea, .import-card select { width:100%; box-sizing:border-box; padding:8px; font:inherit; }
.import-card label:has(input[type=checkbox]) { display:flex; }
#import-message { white-space:pre-wrap; }
.import-card { grid-template-columns:repeat(2,minmax(0,1fr)); border-radius:10px; }
.import-card label { margin:0; min-width:0; }
.import-card label:has(textarea) { grid-column:1 / -1; }
.import-notice, .import-original { grid-column:1 / -1; }
.import-notice { margin:0; color:var(--text-dim); font-size:13px; line-height:1.6; }
#import-summary { font-weight:600; }
.import-card input, .import-card textarea { margin-top:0; }
#import-modal label:has(input[type=checkbox]) { display:flex; align-items:center; gap:8px; }
#import-modal input[type=checkbox] { width:auto; margin:0; padding:0; }
#import-close { border:0; background:#f0f4f7; width:36px; height:36px; border-radius:50%; color:var(--text-dim); font-size:24px; cursor:pointer; }
@media(max-width:600px) { .import-card { grid-template-columns:1fr; } }

.import-metadata { margin:20px 0; padding:16px; border:1px solid var(--border); border-radius:10px; }
#import-photos { display:flex; flex-wrap:wrap; gap:16px; margin-top:12px; }
.import-photo-choice { display:flex; flex-direction:column; align-items:flex-start; gap:8px; }
.import-photo-choice img { width:96px; height:120px; object-fit:contain; border:1px solid var(--border); border-radius:4px; }
#import-modal input[type=radio] { width:auto; margin:0; }

/* Fixed metadata section: outside the reorderable resume sections. */
.profile-fixed-label { font-size:12px; color:var(--text-dim); align-self:center; }
.profile-section-content { display:flex; align-items:center; gap:16px; padding:16px; min-width:0; }
.profile-section-content > div { min-width:0; }
#profile-section-photo { width:60px; height:76px; object-fit:contain; border-radius:5px; flex:none; }
#profile-section-photo[hidden] { display:none; }
#profile-section-name { margin:0 0 6px; font-weight:600; }
#profile-section-contacts { margin:0; font-size:13px; line-height:1.7; overflow-wrap:anywhere; color:var(--text-dim); }
.profile-section-content .profile-help { margin:6px 0 0; font-size:12px; }

.browser-storage { padding: 12px 24px; border-bottom: 1px solid #ddd; font-size: 13px; line-height: 1.6; }
.browser-storage[hidden] { display: none; }
.browser-storage p { margin: 0 0 8px; max-width: 960px; }
.browser-storage .btn { display: inline-block; cursor: pointer; margin-right: 8px; }
