/* CVBuilder — resume templates (the paper), on-page editing aids and print rules */
/* ================= Resume document ================= */
.doc {
  --accent: #2563eb;
  --accent2: var(--accent);
  --doc-ink: #222831;
  --page-bg: #ffffff;
  --doc-muted: color-mix(in srgb, var(--doc-ink) 72%, var(--page-bg));
  --ph: #a2a8b4;
  position: absolute; top: 0; left: 0; transform-origin: top left;
  width: 794px; min-height: 1123px; background-color: var(--page-bg); color: var(--doc-ink);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 18px 50px -12px rgba(16, 24, 40, .22);
  --px: 50px; --py: 44px; --sec-gap: 18px; --item-gap: 12px; --lh: 1.45;
  padding: var(--py) var(--px);
  font-family: Inter, Arial, sans-serif; font-size: 13.5px; line-height: var(--lh);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.doc.p-letter { width: 816px; min-height: 1056px; }
.doc.f-lato { font-family: Lato, Arial, sans-serif; }
.doc.f-merriweather { font-family: Merriweather, Georgia, serif; line-height: calc(var(--lh) + .05); }
.doc.s-sm { font-size: 12.5px; }
.doc.s-lg { font-size: 14.5px; }

.doc a { color: inherit; text-decoration: none; }
.doc h1 { margin: 0; font-size: 2.3em; line-height: 1.1; letter-spacing: -.01em; }
.doc .r-title { margin: 4px 0 0; font-size: 1.15em; color: var(--accent2); font-weight: 600; }

/* header, photo, contact */
.doc .r-head { display: flex; align-items: center; gap: 22px; }
.doc .r-id { flex: 1; min-width: 0; }
.doc .r-photo { flex: none; width: 92px; height: 92px; border-radius: 50%; overflow: hidden; cursor: pointer; }
.doc .r-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.doc .r-contact { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; color: var(--doc-muted); font-size: .92em; }
.doc .ci { display: inline-flex; align-items: center; gap: 5px; min-width: 0; word-break: break-word; }
.doc .ci svg { width: 1.05em; height: 1.05em; flex: none; color: var(--accent2); }

/* sections */
.doc .r-sec { position: relative; margin-top: var(--sec-gap); }
.doc .r-sec h2 {
  margin: 0 0 8px; font-size: .9em; text-transform: uppercase; letter-spacing: .12em; color: var(--accent);
  break-after: avoid;
}
.doc .r-h2 { break-after: avoid; }
.doc .h-ico { display: none; }
.doc .r-sec p { margin: 0; }
.doc .r-item { position: relative; margin-bottom: var(--item-gap); break-inside: avoid; }
.doc .r-item:last-child { margin-bottom: 0; }
.doc .r-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.doc h3 { margin: 0; font-size: 1.05em; }
.doc .r-date { color: var(--doc-muted); font-size: .9em; white-space: nowrap; }
.doc .r-sub { color: var(--doc-muted); font-weight: 500; }
.doc .dash { margin: 0 .3em; }
.doc .r-sub .loc:not(:empty)::before { content: ", "; }
.doc .r-details { margin-top: 2px !important; }
.doc ul { margin: 5px 0 0; padding-left: 18px; }
.doc li { margin-bottom: 2px; }
.doc ul.plain { list-style: none; padding: 0; margin: 0; }
.doc .r-when { display: none; }
.doc .r-skills { display: flex; flex-wrap: wrap; gap: 6px; }
.doc .r-skills span {
  background: color-mix(in srgb, var(--accent) 10%, #fff); color: color-mix(in srgb, var(--accent) 80%, #000);
  padding: 2px 9px; border-radius: 4px; font-size: .92em;
}
.doc .r-langs { display: flex; flex-wrap: wrap; gap: 3px 16px; }
.doc blockquote { margin: 0; padding-left: 12px; border-left: 3px solid var(--accent); font-style: italic; font-size: 1.05em; }

/* key achievements & strengths */
.doc .r-feats { display: grid; gap: 10px; }
.doc .r-feat { display: grid; grid-template-columns: 26px 1fr; gap: 10px; margin: 0; }
.doc .feat-icon { color: var(--accent2); cursor: pointer; padding-top: 1px; }
.doc .feat-icon svg { width: 22px; height: 22px; display: block; }
.doc .r-feat h3 { font-size: 1em; }
.doc .r-feat p { color: var(--doc-muted); font-size: .95em; margin-top: 1px; }

/* my time */
.doc .r-time { display: flex; align-items: center; gap: 14px; cursor: pointer; break-inside: avoid; }
.doc .r-time svg { width: 96px; height: 96px; flex: none; }
.doc .r-time li { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; font-size: .92em; }
.doc .r-time li i { width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* --- Elegant: two columns, photo right --- */
.t-elegant .r-head { padding-bottom: 18px; border-bottom: 1px solid #e3e6ec; }
.t-elegant .r-photo { order: 2; width: 100px; height: 100px; }
.t-elegant .r-cols { display: grid; grid-template-columns: 1fr 34%; gap: 30px; }
.t-elegant .r-sec h2 { color: var(--doc-ink); border-bottom: 2.5px solid var(--doc-ink); padding-bottom: 3px; letter-spacing: .08em; }
.t-elegant .r-sub { color: var(--accent2); font-weight: 600; }
.t-elegant .r-skills span { background: none; color: inherit; border-radius: 0; border-bottom: 1.5px solid #cfd3da; padding: 1px 2px; }

/* --- Modern: colored sidebar --- */
.doc.t-modern:not(.is-cover), .doc.t-polished:not(.is-cover) { padding: 0; }
:is(.t-modern, .t-polished) .r-grid { display: grid; grid-template-columns: 34% 1fr; min-height: inherit; }
:is(.t-modern, .t-polished) .r-aside {
  --doc-muted: rgba(255, 255, 255, .78); --ph: rgba(255, 255, 255, .55); --donut: #fff; --donut-mix: var(--accent);
  background: var(--accent); color: #fff; padding: var(--py) calc(var(--px) * .52);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
:is(.t-modern, .t-polished) .r-aside .r-head { flex-direction: column; align-items: flex-start; gap: 16px; }
:is(.t-modern, .t-polished) .r-aside .r-photo { width: 110px; height: 110px; border: 3px solid rgba(255, 255, 255, .5); }
:is(.t-modern, .t-polished) .r-aside h1 { font-size: 1.95em; }
:is(.t-modern, .t-polished) .r-aside .r-title { color: rgba(255, 255, 255, .88); }
:is(.t-modern, .t-polished) .r-aside .r-contact { flex-direction: column; gap: 6px; margin-top: 16px; }
:is(.t-modern, .t-polished) .r-aside .ci svg, :is(.t-modern, .t-polished) .r-aside .feat-icon { color: #fff; }
:is(.t-modern, .t-polished) .r-aside h2 { color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .35); padding-bottom: 4px; }
:is(.t-modern, .t-polished) .r-aside .r-skills span { background: rgba(255, 255, 255, .16); color: #fff; }
:is(.t-modern, .t-polished) .r-aside blockquote { border-color: #fff; }
:is(.t-modern, .t-polished) .r-main { padding: var(--py) calc(var(--px) * .68); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
:is(.t-modern, .t-polished) .r-main .r-sec:first-child { margin-top: 0; }
:is(.t-modern, .t-polished) .r-main h2 { border-bottom: 2px solid var(--accent); padding-bottom: 4px; }
:is(.t-modern, .t-polished).is-cover .r-head { border-left: 6px solid var(--accent); padding-left: 16px; }

/* --- Timeline: dates on a vertical line --- */
.t-timeline .r-head { padding-bottom: 16px; border-bottom: 3px solid var(--accent); }
.t-timeline .sec-experience .r-item, .t-timeline .sec-education .r-item, .t-timeline .sec-volunteering .r-item {
  display: grid; grid-template-columns: 122px 1fr; gap: 16px; margin: 0;
}
.t-timeline .r-when { display: block; text-align: right; padding-top: 1px; }
.t-timeline .r-what { position: relative; border-left: 2px solid color-mix(in srgb, var(--accent) 30%, #fff); padding: 0 0 calc(var(--item-gap) + 2px) 18px; }
.t-timeline .r-what::before {
  content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent); box-sizing: border-box;
}
.t-timeline .r-item:last-child .r-what { padding-bottom: 0; }

/* --- Classic: centered, ruled --- */
.t-classic .r-head { flex-direction: column; text-align: center; gap: 12px; padding-bottom: 14px; border-bottom: 2px solid var(--doc-ink); }
.t-classic .r-contact { justify-content: center; }
.t-classic .r-head h1 { text-transform: uppercase; letter-spacing: .08em; font-size: 2.1em; }
.t-classic .r-title { color: var(--doc-ink); font-weight: 400; font-style: italic; }
.t-classic .r-sec h2 { color: var(--doc-ink); border-bottom: 1px solid #c9ccd3; padding-bottom: 3px; }
.t-classic .r-skills span { background: none; color: inherit; padding: 0; }
.t-classic .r-skills span:not(:last-child)::after { content: "  •"; color: var(--accent); }

/* classic & minimal: text separators instead of icons */
.t-classic .ci svg, .t-minimal .ci svg { display: none; }
.t-classic .ci:not(.ci-empty) ~ .ci::before, .t-minimal .ci:not(.ci-empty) ~ .ci::before { content: "•"; margin-right: 12px; opacity: .5; }
.t-classic .r-contact, .t-minimal .r-contact { gap: 4px 12px; }

/* --- Minimal: heading column --- */
.doc.t-minimal { --px: 58px; --py: 54px; }
.t-minimal .r-head h1 { font-weight: 600; }
.t-minimal .r-photo { order: 2; }
.t-minimal .r-head { margin-bottom: 8px; }
.t-minimal:not(.is-cover) .r-sec { display: grid; grid-template-columns: 130px 1fr; gap: 16px; margin-top: calc(var(--sec-gap) + 4px); }
.t-minimal .r-sec h2 { color: var(--doc-muted); font-weight: 600; font-size: .8em; padding-top: 3px; }
.t-minimal .r-sec h2::before { content: ""; display: block; width: 18px; height: 3px; background: var(--accent); margin-bottom: 6px; }
.t-minimal .r-skills span { background: none; border: 1px solid #dcdfe5; color: inherit; }

/* --- Bold: header band --- */
.doc.t-bold { padding-top: 0; }
.t-bold .r-head {
  --doc-muted: rgba(255, 255, 255, .85); --ph: rgba(255, 255, 255, .6);
  background: var(--accent); color: #fff; margin: 0 calc(-1 * var(--px)) 6px; padding: 36px var(--px) 26px;
}
.t-bold .r-head .r-title { color: rgba(255, 255, 255, .92); }
.t-bold .r-head .ci svg { color: #fff; }
.t-bold .r-photo { border: 3px solid rgba(255, 255, 255, .6); }
.t-bold .r-sec h2 { display: inline-block; background: color-mix(in srgb, var(--accent) 12%, #fff); padding: 3px 10px; border-radius: 4px; }
.t-bold h3 { color: var(--accent2); }

/* --- Cover letter --- */
.doc.is-cover { --px: 62px; --py: 52px; }
.is-cover .r-head { margin-bottom: 30px; }
.cl-body p { margin: 0 0 14px; }
.cl-text { white-space: pre-wrap; margin-bottom: 14px; }
.cl-date { color: var(--doc-muted); }
.cl-sign { margin-top: 28px !important; }

/* --- Creative: color header, tinted side column on the left --- */
.doc.t-creative:not(.is-cover) { padding: 0; display: flex; flex-direction: column; }
.t-creative .r-head {
  --doc-muted: rgba(255, 255, 255, .85); --ph: rgba(255, 255, 255, .6);
  background: var(--accent); color: #fff; padding: var(--py) var(--px) calc(var(--py) * .6);
}
.t-creative .r-head .r-title { color: rgba(255, 255, 255, .92); }
.t-creative .r-head .ci svg { color: #fff; }
.t-creative .r-photo { width: 104px; height: 104px; border: 4px solid rgba(255, 255, 255, .7); }
.t-creative .r-cols { flex: 1; display: grid; grid-template-columns: 33% 1fr; }
.t-creative .r-side {
  background: color-mix(in srgb, var(--accent) 7%, #fff); padding: calc(var(--py) * .7) calc(var(--px) * .55);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.t-creative .r-main { padding: calc(var(--py) * .7) calc(var(--px) * .7); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.t-creative .r-cols .r-sec:first-child { margin-top: 0; }
.t-creative .r-sec h2 { color: var(--accent); display: flex; align-items: center; gap: 8px; }
.t-creative .r-sec h2::after { content: ""; flex: 1; height: 2px; background: color-mix(in srgb, var(--accent) 25%, #fff); }
.t-creative.is-cover .r-head { margin: calc(-1 * var(--py)) calc(-1 * var(--px)) 30px; }

/* --- Ivy League: serif, centered, small caps --- */
.doc.t-ivy { font-family: Merriweather, Georgia, serif; --lh: 1.5; }
.t-ivy .r-head { flex-direction: column; text-align: center; gap: 10px; padding-bottom: 10px; border-bottom: 1.5px solid var(--doc-ink); }
.t-ivy .r-head h1 { font-variant: small-caps; letter-spacing: .04em; font-weight: 700; font-size: 2.2em; }
.t-ivy .r-title { color: var(--doc-ink); font-weight: 400; font-size: 1em; }
.t-ivy .r-contact { justify-content: center; margin-top: 6px; }
.t-ivy .ci svg { display: none; }
.t-ivy .ci:not(.ci-empty) ~ .ci::before { content: "|"; margin-right: 10px; opacity: .45; }
.t-ivy .r-contact { gap: 4px 10px; }
.t-ivy .r-sec h2 {
  color: var(--doc-ink); text-transform: none; font-variant: small-caps; letter-spacing: .06em; font-size: 1.12em;
  border-bottom: 1px solid var(--doc-ink); padding-bottom: 2px;
}
.t-ivy h3 { font-size: 1em; }
.t-ivy .r-sub { font-style: italic; color: var(--doc-ink); font-weight: 400; }
.t-ivy .r-date { font-style: italic; color: var(--doc-ink); }
.t-ivy .r-skills span { background: none; color: inherit; padding: 0; border-radius: 0; }
.t-ivy .r-skills span:not(:last-child)::after { content: ","; }
.t-ivy .feat-icon { color: var(--doc-ink); }

/* --- Polished: main column left, colored sidebar right --- */
.t-polished .r-grid { grid-template-columns: 1fr 33%; }
.t-polished .r-main > .r-head { padding-bottom: 16px; border-bottom: 2px solid var(--accent); }
.t-polished .r-main > .r-head .r-photo { order: 2; }
.t-polished .r-aside .r-sec:first-child { margin-top: 0; }

/* --- Contemporary: centered photo, icon headings, side column left --- */
.t-contemporary .r-head { flex-direction: column; text-align: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid color-mix(in srgb, var(--doc-ink) 15%, transparent); }
.t-contemporary .r-photo { width: 108px; height: 108px; box-shadow: 0 0 0 4px var(--page-bg), 0 0 0 6px var(--accent); }
.t-contemporary .r-contact { justify-content: center; }
.t-contemporary .r-cols { display: grid; grid-template-columns: 34% 1fr; gap: 28px; }
.t-contemporary .r-side { border-right: 1px solid color-mix(in srgb, var(--doc-ink) 12%, transparent); padding-right: 22px; }
.t-contemporary .r-sec h2 { color: var(--doc-ink); letter-spacing: .1em; }
.t-contemporary .r-h2 { padding-bottom: 6px; border-bottom: 1.5px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.t-contemporary .h-ico { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; }
.t-contemporary .h-ico svg { width: 14px; height: 14px; }

/* --- Compact: dense two columns --- */
.doc.t-compact { --px: 40px; --py: 34px; --sec-gap: 12px; --item-gap: 8px; --lh: 1.38; }
.t-compact .r-head { gap: 16px; padding-bottom: 12px; border-bottom: 3px solid var(--accent); }
.t-compact .r-head h1 { font-size: 2em; }
.t-compact .r-photo { width: 76px; height: 76px; border-radius: 12px; }
.t-compact .r-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.t-compact .r-sec h2 { color: var(--doc-ink); background: color-mix(in srgb, var(--accent) 10%, var(--page-bg)); border-left: 3px solid var(--accent); padding: 4px 8px; letter-spacing: .08em; }
.t-compact ul { margin-top: 3px; }

/* --- Executive: dark header band, icon headings --- */
.doc.t-executive { padding-top: 0; }
.t-executive .r-head {
  --doc-muted: rgba(255, 255, 255, .8); --ph: rgba(255, 255, 255, .55);
  background: var(--doc-ink); color: #fff; margin: 0 calc(-1 * var(--px)) 8px; padding: 34px var(--px) 24px; border-bottom: 5px solid var(--accent);
}
.t-executive .r-head .r-title { color: color-mix(in srgb, var(--accent2) 45%, #fff); letter-spacing: .05em; text-transform: uppercase; font-size: .95em; }
.t-executive .r-head .ci svg { color: color-mix(in srgb, var(--accent2) 45%, #fff); }
.t-executive .r-photo { border: 3px solid var(--accent); }
.t-executive .r-sec h2 { color: var(--doc-ink); font-size: .95em; }
.t-executive .r-h2 { padding-bottom: 4px; border-bottom: 1px solid color-mix(in srgb, var(--doc-ink) 25%, transparent); }
.t-executive .h-ico { color: var(--accent); }
.t-executive .h-ico svg { width: 16px; height: 16px; }
.t-executive .r-date { color: var(--accent2); font-weight: 600; }

/* templates with heading icons */
:is(.t-contemporary, .t-executive) .r-h2 { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
:is(.t-contemporary, .t-executive) .r-h2 h2 { margin: 0; }
:is(.t-contemporary, .t-executive) .h-ico { display: grid; place-items: center; flex: none; }

/* --- page background patterns (also used by the little previews in the Design step) --- */
:is(.doc, .pat-swatch).bg-dots { background-image: radial-gradient(color-mix(in srgb, var(--accent) 18%, transparent) 1.1px, transparent 1.5px); background-size: 16px 16px; }
:is(.doc, .pat-swatch).bg-grid {
  background-image: linear-gradient(color-mix(in srgb, var(--accent) 8%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 8%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
}
:is(.doc, .pat-swatch).bg-lines { background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, transparent) 0 2px, transparent 2px 16px); }
.doc.bg-corner {
  background-image: radial-gradient(circle at 100% 0, color-mix(in srgb, var(--accent) 15%, transparent) 0 150px, transparent 151px),
    radial-gradient(circle at 0 100%, color-mix(in srgb, var(--accent2) 12%, transparent) 0 120px, transparent 121px);
  background-repeat: no-repeat;
}
.pat-swatch.bg-corner {
  background-image: radial-gradient(circle at 100% 0, color-mix(in srgb, var(--accent) 22%, transparent) 0 20px, transparent 21px),
    radial-gradient(circle at 0 100%, color-mix(in srgb, var(--accent2) 18%, transparent) 0 15px, transparent 16px);
  background-repeat: no-repeat;
}
.doc.bg-glow { background-image: linear-gradient(180deg, color-mix(in srgb, var(--accent) 13%, transparent), transparent 240px); background-repeat: no-repeat; }
.pat-swatch.bg-glow { background-image: linear-gradient(180deg, color-mix(in srgb, var(--accent) 25%, transparent), transparent 70%); }

/* --- page margins & section spacing (after templates so they take priority) --- */
.doc.m-narrow { --px: 34px; --py: 30px; }
.doc.m-wide { --px: 68px; --py: 58px; }
.doc.sp-tight { --sec-gap: 11px; --item-gap: 7px; --lh: 1.35; }
.doc.sp-airy { --sec-gap: 26px; --item-gap: 17px; --lh: 1.55; }

/* industry expertise bars */
.doc .r-exp { display: grid; gap: 4px; margin-bottom: 9px; }
.doc .r-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.doc .r-bar span { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--accent) 18%, #fff); cursor: pointer; }
.doc .r-bar span.on { background: var(--accent); }
.doc:not(.t-modern):not(.t-elegant):not(.t-creative):not(.t-polished):not(.t-contemporary):not(.t-compact) .sec-expertise .r-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.doc:not(.t-modern):not(.t-elegant):not(.t-creative):not(.t-polished):not(.t-contemporary):not(.t-compact) .sec-expertise .add-first { justify-self: start; }
.t-ivy .r-bar span.on { background: var(--doc-ink); }
:is(.t-modern, .t-polished) .r-aside .r-bar span { background: rgba(255, 255, 255, .25); }
:is(.t-modern, .t-polished) .r-aside .r-bar span.on { background: #fff; }

/* interests */
.doc .r-interests { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.doc .r-int { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.doc .r-int .feat-icon svg { width: 17px; height: 17px; }

/* ================= On-page editing (screen only) ================= */
@media screen {
  .doc [contenteditable] { outline: none; border-radius: 3px; transition: background .12s, box-shadow .12s; cursor: text; }
  .doc [contenteditable]:hover { background: color-mix(in srgb, var(--accent) 9%, transparent); }
  .doc [contenteditable]:focus { background: color-mix(in srgb, var(--accent) 10%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent); }
  :is(.t-modern, .t-polished) .r-aside [contenteditable]:hover, :is(.t-modern, .t-polished) .r-aside [contenteditable]:focus,
  :is(.t-bold, .t-executive, .t-creative) .r-head [contenteditable]:hover, :is(.t-bold, .t-executive, .t-creative) .r-head [contenteditable]:focus { background: rgba(255, 255, 255, .14); box-shadow: 0 0 0 2px rgba(255, 255, 255, .4); }
  .doc [data-edit]:empty::after, .doc [data-line]:empty::after, .doc [data-goto]:empty::after {
    content: attr(data-ph); color: var(--ph); font-weight: 400; font-style: italic; text-transform: none; letter-spacing: 0;
  }
  .doc [data-goto] { cursor: pointer; }
  .doc .ci-empty { opacity: .8; }
  .doc .is-empty { opacity: .85; }

  .doc .sec-tools, .doc .item-tools {
    position: absolute; z-index: 3; display: none; gap: 1px; padding: 2px;
    background: #fff; border: 1px solid #dfe3ea; border-radius: 7px; box-shadow: 0 2px 8px rgba(20, 30, 60, .12);
    font: 12px/1 Inter, system-ui, sans-serif; color: #4b5563;
  }
  .doc .sec-tools { top: -4px; right: 0; }
  .doc .item-tools { top: 0; left: -32px; flex-direction: column; }
  .doc .r-sec:hover > .sec-tools, .doc .r-sec:focus-within > .sec-tools,
  .doc .r-item:hover > .item-tools, .doc .r-item:focus-within > .item-tools { display: flex; }
  .doc .sec-tools button, .doc .item-tools button {
    border: 0; background: transparent; color: inherit; cursor: pointer; padding: 4px 6px; border-radius: 5px; font: inherit;
  }
  .doc .sec-tools button:hover:not(:disabled), .doc .item-tools button:hover:not(:disabled) { background: #eef0ff; color: #4f46e5; }
  .doc .sec-tools button:disabled, .doc .item-tools button:disabled { opacity: .3; cursor: default; }
  .doc .add-first {
    border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, #fff); background: transparent; color: var(--accent);
    border-radius: 6px; padding: 6px 12px; cursor: pointer; font: 600 12px Inter, system-ui, sans-serif;
  }
  .doc .sec-drag { cursor: grab; padding: 4px 6px; border-radius: 5px; color: #9aa1ad; letter-spacing: -1px; }
  .doc .sec-drag:hover { background: #eef0ff; color: #4f46e5; }
  .doc .r-sec.dragging { opacity: .35; }
  .doc .drop-before { box-shadow: 0 -3px 0 0 var(--accent); }
  .doc .drop-after { box-shadow: 0 3px 0 0 var(--accent); }
  .doc .drop-into { outline: 2px dashed color-mix(in srgb, var(--accent) 50%, transparent); outline-offset: -6px; }
  :is(.t-modern, .t-polished) .r-aside .add-first { color: #fff; border-color: rgba(255, 255, 255, .5); }
}

/* ================= Print → PDF ================= */
@media print {
  html, body { height: auto; background: #fff !important; display: block; overflow: visible !important; }
  .no-print, .toast { display: none !important; }
  .layout, .preview-pane, .preview-scroll { display: block; padding: 0; margin: 0; overflow: visible; background: none !important; border: 0; }
  .paper-wrap { width: auto !important; height: auto !important; }
  .doc { position: static; transform: none !important; box-shadow: none; width: 100% !important; }
  .doc.p-a4 { min-height: 296mm; }
  .doc.p-letter { min-height: 278mm; }
  /* anything left empty on the page is left out of the PDF */
  .doc .is-empty, .doc .ci-empty, .doc [data-edit]:empty, .doc [data-line]:empty, .doc [data-goto]:empty { display: none !important; }
  .doc .r-date:has([data-edit]:empty) .dash { display: none; }
}
