/*
 * Bordeaux template — a single wine-dark spine binds a single-column page.
 * Shared by browser (edit) and mPDF (pdf). No flexbox, no CSS grid:
 * floats / tables / block layout only, so the two renderers agree.
 *
 * The spine is `border-left` on .resume-page.resume-bordeaux — mPDF repeats a
 * block element's left border on every page fragment, so it binds all pages of
 * a multipage export (verified against _long.json). Its color is set inline
 * per-resume from settings.accentColor; the value here is the default.
 *
 * DejaVu Sans is pinned first: mPDF substitutes a bare Arial/Helvetica stack
 * with DejaVu Sans *Condensed*, which has no bold face, so section titles and
 * names would lose their weight. Bold is always the `bold` keyword, never a
 * numeric weight (mPDF ignores 600/700).
 */

/* ---- page margins (multi-page) ---------------------------------------- *
 * PdfService gives mPDF margin_* = 0, so a PDF's only vertical margin is
 * this wrapper's own padding — and a wrapper's padding-top lands on page 1
 * alone, leaving every later page hard against the sheet edge.
 *
 * @page restores an identical margin on every page; `@page :first` zeroes
 * the top one so page 1 keeps using the wrapper padding it always had and
 * its output is unchanged. Left/right stay 0 — the wrapper's horizontal
 * padding already applies to every page. Inert in the browser (@page is
 * print-only), and builder.js reads these same values back out of CSSOM
 * so its page-count model matches what mPDF actually does. */
@page {
    margin: 44px 0 44px 0;
}
@page :first {
    margin-top: 0;
}

.resume-page.resume-bordeaux {
    width: 794px;              /* A4 @ 96dpi -> fills A4 width in mPDF */
    box-sizing: border-box;
    border-left: 8px solid #7f1d1d;   /* the spine; color overridden inline */
    padding: 44px 48px 44px 26px;     /* content inset 26px from the spine */
    background: #ffffff;
    color: #1f1f1f;
    font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif;
    font-size: 13.5px;
    line-height: 1.5;
}

/* mPDF does NOT inherit font-family/size into table cells — anything inside a
   <td> falls back to the document default serif (in-td trap class, 2026-07
   slate rework). The header, entry title/date rows and skills grid are tables,
   so the font is declared at td level too. No-op in the browser. */
.resume-bordeaux td {
    font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif;
    font-size: 13.5px;
    line-height: 1.5;
    color: #1f1f1f;
}


/* ---- header ---------------------------------------------------------- */
.resume-bordeaux .cv-header {
    border-bottom: 1px solid #e6e0e0;
    padding-bottom: 16px;
    margin-bottom: 18px;
}
.resume-bordeaux .cv-head {
    width: 100%;
    border-collapse: collapse;
}
.resume-bordeaux .cv-head td {
    vertical-align: middle;
    padding: 0;
}
.resume-bordeaux .cv-head-photo {
    width: 95px;
    padding-right: 22px;
}
.resume-bordeaux .cv-name {
    font-size: 27px;
    font-weight: bold;
    letter-spacing: 0.3px;
    margin: 0 0 5px;
    line-height: 1.1;
    color: #1a1a1a;
}
.resume-bordeaux .cv-jobtitle {
    font-size: 14px;
    font-weight: bold;
    color: #7f1d1d;              /* overridden inline per-resume accentColor */
    margin-bottom: 6px;
}
.resume-bordeaux .cv-contact {
    font-size: 12px;
    color: #444;
}
.resume-bordeaux .cv-contact span {
    margin: 0 4px;
}

/* ---- sections -------------------------------------------------------- */
.resume-bordeaux .cv-section {
    margin-bottom: 16px;
}
.resume-bordeaux .cv-section:last-child {
    margin-bottom: 0;
}
/* pdf mode: mPDF doesn't reliably honor :last-child, so the server marks
 * whichever section/item actually renders last with this plain class instead
 * (bordeaux.php). Unscoped on purpose — applies to whichever element carries
 * it (section, item, or inline-item). */
/* Scoped ON PURPOSE, and measured: bordeaux's .cv-inline-item shadowed a
   bare .is-last, and that shadowing was itself opening a blank trailing page
   (boundary-test failed at HEAD, passes scoped). This is the OPPOSITE of
   classic/metric, where scoping caused the blank page — so the specificity of
   this one rule is a per-template measurement, not a fleet-wide convention.
   Re-run scripts/boundary-test.php bordeaux before touching it.
   Original warning, still true for every OTHER template: raising .is-last. It ties .cv-section /
   .cv-inline-item at (0,1,0) and wins only on source order — but scoping it to
   .resume-X, or class-doubling it, also makes it override the margin on
   page-break-inside:avoid entries, which reintroduces the blank trailing page
   it exists to prevent (measured on classic, metric, ledger, sapphire,
   curriculum, host; skill §5 avoid-estimator trap). */
.resume-bordeaux .is-last {
    margin-bottom: 0;
}

/* No underline bar — the spine carries the structure. The section title is an
 * accent label led by a filled-square marker sitting clear of the spine. */
.resume-bordeaux .cv-section-title {
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin: 0 0 9px;
    color: #7f1d1d;               /* overridden inline per-resume accentColor */
    page-break-after: avoid;
}
.resume-bordeaux .cv-section-title .cv-mark {
    font-size: 8px;
    margin-right: 9px;
    vertical-align: 2px;
}
/* page-break-after:avoid on the title alone is not reliable in mPDF — pair it
 * with a page-break-inside:avoid group around the title + its first entry so
 * the header is never orphaned at the foot of a page. */
.resume-bordeaux .cv-section-head-group {
    page-break-inside: avoid;
}

.resume-bordeaux .cv-summary {
    text-align: left;
}

/* ---- items ----------------------------------------------------------- */
.resume-bordeaux .cv-item {
    position: relative;
    margin-bottom: 12px;
    page-break-inside: avoid;
}
.resume-bordeaux .cv-item:last-child {
    margin-bottom: 0;
}

/* Two-column "title left / dates right" via table (mPDF-safe). */
.resume-bordeaux .cv-row {
    width: 100%;
    border-collapse: collapse;
}
.resume-bordeaux .cv-row td {
    vertical-align: top;
    padding: 0;
}
.resume-bordeaux .cv-row-main {
    text-align: left;
}
.resume-bordeaux .cv-row-side {
    text-align: right;
    white-space: nowrap;
    width: 30%;
    color: #555;
    font-size: 12px;
}
.resume-bordeaux .cv-item-title {
    font-weight: bold;
}
.resume-bordeaux .cv-item-org {
    color: #333;
}
.resume-bordeaux .cv-item-sep {
    color: #333;
}
.resume-bordeaux .cv-item-loc {
    color: #666;
    font-size: 12px;
}
.resume-bordeaux .cv-dates {
    font-weight: bold;
    color: #555;
}
.resume-bordeaux .cv-item-details {
    margin-top: 3px;
}

/* Bullets — filled-square marker span (never CSS generated content), hung in
 * the entry's left padding for a clean hanging indent (foundation pattern). */
.resume-bordeaux .cv-bullets {
    list-style: none;
    margin: 5px 0 0;
    padding: 0;
}
.resume-bordeaux .cv-bullets li {
    margin: 2px 0;
    padding: 0 0 0 15px;
    position: relative;
}
.resume-bordeaux .cv-bullet-mark {
    display: inline-block;
    width: 15px;
    margin-left: -15px;
    font-size: 8px;
    vertical-align: 1px;
    text-align: left;
}

/* Skills — two-column table grid (a repeated float grid stacks in mPDF). */
.resume-bordeaux .cv-skills-grid {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2px;
}
.resume-bordeaux .cv-skills-grid td.cv-skill-cell {
    width: 50%;
    vertical-align: top;
    padding: 2px 14px 2px 0;
    font-size: 13px;
}
.resume-bordeaux .cv-skill-name {
    font-weight: bold;
}

/* Languages / certifications inline rows */
.resume-bordeaux .cv-inline-item {
    position: relative;
    margin-bottom: 3px;
    page-break-inside: avoid;
}
.resume-bordeaux .cv-item-side {
    float: right;
    color: #555;
    font-size: 12px;
}
.resume-bordeaux .cv-muted {
    color: #999;
}

/* Skill/language level dots (tpl_dots) */
.resume-bordeaux .cv-level {
    font-size: 10px;
    letter-spacing: 1px;
    margin-left: 4px;
}
.resume-bordeaux .cv-dot-on {
    color: #7f1d1d;               /* tpl_dots sets the accent inline too */
}
.resume-bordeaux .cv-dot-off {
    color: #d8cccc;
}

.resume-bordeaux .cv-taglist {
    line-height: 2;
}
.resume-bordeaux .cv-tag {
    display: inline-block;
    margin: 0 6px 4px 0;
    padding: 2px 8px;
    background: #f5efef;
    border-radius: 3px;
}

/* =====================================================================
 * Edit-mode affordances (browser only — these elements are never emitted
 * in pdf mode, so none of this reaches mPDF).
 * ===================================================================== */

/* contenteditable placeholders */
.resume-bordeaux [contenteditable][data-ph]:empty:before {
    content: attr(data-ph);
    color: #b7b7b7;
    font-style: italic;
    pointer-events: none;
}
.resume-bordeaux [contenteditable] {
    outline: none;
    border-radius: 2px;
    transition: box-shadow 0.12s ease, background 0.12s ease;
}
.resume-bordeaux [contenteditable]:hover {
    box-shadow: 0 0 0 1px #e6cccc;
}
.resume-bordeaux [contenteditable]:focus {
    box-shadow: 0 0 0 2px #7f1d1d;
    background: #fbf6f6;
}
.resume-bordeaux .cv-contact [contenteditable] {
    display: inline-block;
    min-width: 40px;
}

/* add / remove / reorder controls */
.resume-bordeaux .edit-controls {
    position: absolute;
    top: -2px;
    right: -44px;
    opacity: 0;
    transition: opacity 0.12s ease;
    white-space: nowrap;
    z-index: 5;
}
.resume-bordeaux .edit-controls--inline {
    position: absolute;
    left: -26px;
    right: auto;
    top: 0;
}
.resume-bordeaux .cv-item:hover > .edit-controls,
.resume-bordeaux .cv-inline-item:hover > .edit-controls,
.resume-bordeaux .cv-bullets li:hover > .edit-controls,
.resume-bordeaux .edit-controls:hover {
    opacity: 1;
}
.resume-bordeaux .edit-controls button {
    font-family: inherit;
    font-size: 13px;
    line-height: 1;
    width: 20px;
    height: 20px;
    margin-left: 2px;
    padding: 0;
    border: 1px solid #ccc;
    background: #fff;
    color: #444;
    border-radius: 3px;
    cursor: pointer;
}
.resume-bordeaux .edit-controls button:hover {
    background: #7f1d1d;
    border-color: #7f1d1d;
    color: #fff;
}

.resume-bordeaux .cv-add {
    font-family: inherit;
    font-size: 12.5px;
    margin-top: 6px;
    padding: 4px 10px;
    border: 1px dashed #cbb3b3;
    background: #fff;
    color: #7f1d1d;
    border-radius: 4px;
    cursor: pointer;
}
.resume-bordeaux .cv-add:hover {
    background: #fbf6f6;
    border-color: #7f1d1d;
}
.resume-bordeaux .cv-add--sm {
    font-size: 11.5px;
    padding: 2px 8px;
}

.resume-bordeaux .cv-current {
    display: block;
    font-family: inherit;
    font-size: 11px;
    font-weight: normal;
    color: #777;
    margin-top: 2px;
    white-space: nowrap;
    cursor: pointer;
}
.resume-bordeaux .cv-current input {
    vertical-align: middle;
}

.resume-bordeaux .cv-tag {
    position: relative;
}
.resume-bordeaux .cv-tag-x {
    font-family: inherit;
    border: none;
    background: none;
    color: #b00;
    cursor: pointer;
    padding: 0 0 0 4px;
    opacity: 0;
    font-size: 13px;
}
.resume-bordeaux .cv-tag:hover .cv-tag-x {
    opacity: 1;
}

/* Level dot editor (skills/languages) */
.resume-bordeaux .cv-level {
    white-space: nowrap;
}
.resume-bordeaux .cv-dot-btn {
    font-family: inherit;
    font-size: 10px;
    line-height: 1;
    width: 12px;
    height: 12px;
    padding: 0;
    margin: 0 1px;
    border: none;
    background: none;
    cursor: pointer;
}
.resume-bordeaux .cv-level-toggle {
    font-family: inherit;
    font-size: 9px;
    line-height: 1;
    padding: 1px 3px;
    margin-left: 3px;
    border: 1px solid #ccc;
    background: #fff;
    color: #777;
    border-radius: 2px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.12s ease;
}
.resume-bordeaux .cv-tag:hover .cv-level-toggle,
.resume-bordeaux .cv-inline-item:hover .cv-level-toggle {
    opacity: 1;
}
.resume-bordeaux .cv-level-text {
    display: inline-block;
    min-width: 20px;
}
