/*
 * Brigade template — kitchen-hierarchy chronological.
 * Shared by browser (edit) and mPDF (pdf). No flexbox, no CSS grid:
 * floats / tables / block layout only, so the two renderers agree.
 */

/* ---- 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: 40px 0 40px 0;
}
@page :first {
    margin-top: 0;
}

.resume-page.resume-brigade {
    width: 794px;               /* A4 @ 96dpi -> fills A4 width in mPDF */
    box-sizing: border-box;
    padding: 0;
    background: #ffffff;
    color: #292524;
    font-family: 'DejaVu Sans', Helvetica, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.45;
}

/* mPDF does NOT inherit font-family/size into table cells — anything inside
   a <td> silently falls back to the serif document default (in-td trap class,
   2026-07 slate rework). This template's row/column/band layout uses tables,
   so the font must be declared at td level too. No-op in the browser. */
.resume-brigade td {
    font-family: 'DejaVu Sans', Helvetica, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.45;
    color: #292524;
}


/* ---- header band (full-bleed, charcoal) --------------------------------- */
.cv-header-band {
    box-sizing: border-box;
    width: 100%;
    background: #1c1917;
    padding: 0;
}
.cv-header-table {
    width: 100%;
    border-collapse: collapse;
}
.cv-header-cell {
    box-sizing: border-box;
    height: 72px;
    padding: 12px 56px;
    vertical-align: middle;
}
.cv-name {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 3px;
    line-height: 1.15;
    color: #ffffff;
    text-align: left;
}
.cv-jobtitle {
    font-size: 12.5px;
    font-weight: bold;
    letter-spacing: 0.3px;
    color: #d97706;
    margin-bottom: 3px;
}
.cv-contact {
    font-size: 11px;
    color: #d6d3d1;
}
.cv-contact span {
    margin: 0 3px;
}

/* ---- slim strip under header: skills left / languages+certs right ------- */
.cv-strip {
    width: 100%;
    border-collapse: collapse;
    background: #fafaf9;
    border-bottom: 1px solid #d6d3d1;
}
.cv-strip td {
    vertical-align: top;
    padding: 14px 20px;
}
.cv-strip-left {
    width: 58%;
    border-right: 1px solid #d6d3d1;
}
.cv-strip-right {
    width: 42%;
}
.cv-strip-header {
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #d97706;
    margin-bottom: 6px;
}
.cv-skills-line {
    font-size: 12.5px;
    line-height: 1.6;
    color: #44403c;
}
.cv-strip-block {
    margin-bottom: 8px;
}
.cv-strip-block:last-child {
    margin-bottom: 0;
}

/* ---- body -------------------------------------------------------------- */
.cv-body {
    box-sizing: border-box;
    padding: 24px 56px 40px;
}

.cv-section {
    margin-bottom: 16px;
}
.cv-section-title {
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #d97706;
    border-bottom: 1px solid #d6d3d1;
    padding-bottom: 4px;
    margin: 0 0 10px;
    page-break-after: avoid;
}
/* page-break-after:avoid on the title alone is not reliable in mPDF — a
 * header can still land as the last line on a page with its first entry
 * pushed to the next one. Wrapping the title together with its first entry
 * in a page-break-inside:avoid group moves the pair to the next page as a
 * unit. */
.cv-section-head-group {
    page-break-inside: avoid;
}
.cv-summary {
    text-align: left;
    color: #44403c;
}

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

.cv-row {
    width: 100%;
    border-collapse: collapse;
}
.cv-row td {
    vertical-align: top;
    padding: 0;
}
.cv-row-main {
    text-align: left;
}
.resume-brigade .cv-row-side {
    text-align: right;
    white-space: nowrap;
    width: 30%;
    color: #57534e;
    font-size: 12px;
}

/* trade-first: station/rank bold leading line, house + covers second line */
.cv-position {
    font-weight: bold;
    font-size: 15px;
    color: #1c1917;
}
.cv-orgline {
    font-size: 12.5px;
    color: #57534e;
    margin-top: 1px;
}

.cv-item-title {
    font-weight: bold;
}
.cv-item-org {
    font-style: italic;
    color: #44403c;
}
.cv-item-sep {
    color: #57534e;
    font-style: normal;
}
.cv-dates {
    font-weight: bold;
}
.cv-item-details {
    margin-top: 3px;
    color: #44403c;
}

/* Bullets — tight 13px */
.cv-bullets {
    margin: 6px 0 0;
    padding-left: 18px;
    font-size: 13px;
}
.cv-bullets li {
    margin-bottom: 2px;
    position: relative;
}

/* Languages / certifications (strip, right cell) */
.cv-inline-item {
    position: relative;
    margin-bottom: 4px;
    font-size: 12.5px;
    page-break-inside: avoid;
}
.cv-inline-item:last-child {
    margin-bottom: 0;
}
.cv-muted {
    color: #a8a29e;
}

/* Skills tag cloud (edit mode only) */
.cv-taglist {
    line-height: 2;
}
.cv-tag {
    position: relative;
    display: inline-block;
    margin: 0 6px 4px 0;
    padding: 2px 6px;
    background: #f2f0ef;
    border-radius: 3px;
}

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

[contenteditable][data-ph]:empty:before {
    content: attr(data-ph);
    color: #b7b7b7;
    font-style: italic;
    pointer-events: none;
}
.cv-header-band [contenteditable][data-ph]:empty:before {
    color: rgba(255, 255, 255, 0.55);
}
[contenteditable] {
    outline: none;
    border-radius: 2px;
    transition: box-shadow 0.12s ease, background 0.12s ease;
}
[contenteditable]:hover {
    box-shadow: 0 0 0 1px #f3d9b1;
}
[contenteditable]:focus {
    box-shadow: 0 0 0 2px #d97706;
    background: #fffaf0;
}
.cv-header-band [contenteditable]:hover {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
}
.cv-header-band [contenteditable]:focus {
    box-shadow: 0 0 0 2px #ffffff;
    background: rgba(255, 255, 255, 0.12);
}
.cv-contact [contenteditable] {
    display: inline-block;
    min-width: 40px;
}

.edit-controls {
    position: absolute;
    top: -2px;
    right: -44px;
    opacity: 0;
    transition: opacity 0.12s ease;
    white-space: nowrap;
    z-index: 5;
}
.edit-controls--inline {
    position: absolute;
    left: -26px;
    right: auto;
    top: 0;
}
.cv-item:hover > .edit-controls,
.cv-inline-item:hover > .edit-controls,
.cv-bullets li:hover > .edit-controls,
.edit-controls:hover {
    opacity: 1;
}
.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;
}
.edit-controls button:hover {
    background: #d97706;
    border-color: #d97706;
    color: #fff;
}

.cv-add {
    font-family: inherit;
    font-size: 12.5px;
    margin-top: 6px;
    padding: 4px 10px;
    border: 1px dashed #d6b98c;
    background: #fff;
    color: #d97706;
    border-radius: 4px;
    cursor: pointer;
}
.cv-add:hover {
    background: #fffaf0;
    border-color: #d97706;
}
.cv-add--sm {
    font-size: 11.5px;
    padding: 2px 8px;
}

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

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