/* ===== Tokens: "Dress Blues" palette and type (from the family brand bible) ===== */
:root {
  --navy: #0E1A33;      /* primary dark: header band, quote band, web backdrop */
  --blue: #1F3260;      /* secondary: headings on ivory */
  --scarlet: #B3202A;   /* accent, used for capacity claim lines only */
  --brass: #C9A24A;     /* hairlines, rules, monogram */
  --brass-lt: #E8CF8A;  /* brass highlight on dark */
  --brass-dk: #7A5C1A;  /* brass text on ivory: brass itself is too light for text contrast */
  --ivory: #F3EEE4;     /* page */
  --ink: #1A2338;       /* body text on ivory */
  --display: "Cinzel", "Times New Roman", serif;
  --body: "Inter", system-ui, sans-serif;
  --quote: "Cormorant Garamond", Georgia, serif;
}
* { box-sizing: border-box; }
html { background: var(--navy); }
body { margin: 0; font-family: var(--body); color: var(--ink); font-size: 16px; line-height: 1.5; }

/* ===== Web view: pages centered on a navy backdrop ===== */
.toolbar { display: flex; justify-content: center; padding: 20px 12px 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 28px;
  background: var(--brass); color: var(--navy); font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  font-size: 14px; text-decoration: none; border-radius: 2px; }
.btn:hover { background: var(--brass-lt); }
.btn:focus-visible { outline: 3px solid var(--ivory); outline-offset: 3px; }
.sheet-stack { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 20px 12px 48px; }

/* Each .page is exactly US Letter. Fixed height + overflow hidden guarantees the printed page
   count: if content ever outgrows a page it is clipped visibly in review rather than spilling
   onto a surprise third sheet. Do not switch to min-height. */
.page { position: relative; width: 8.5in; height: 11in; overflow: hidden; background: var(--ivory);
  padding: .5in; box-shadow: 0 10px 40px rgba(0,0,0,.45); display: flex; flex-direction: column; }

.page > * { flex-shrink: 0; }
.caps { flex-shrink: 1; }
.sec { font-family: var(--display); font-weight: 700; font-size: 11pt; letter-spacing: .22em; text-transform: uppercase;
  color: var(--blue); margin: 0 0 6pt; padding-bottom: 4pt; border-bottom: 1px solid var(--brass); }

/* ===== Masthead: navy band bleeding to the page edges (negative margins cancel page padding) ===== */
.masthead { margin: -.5in -.5in 0; background: var(--navy); color: var(--ivory); display: grid;
  grid-template-columns: 1fr 2.55in; position: relative; border-bottom: 3px solid var(--brass); min-height: 2.15in; overflow: hidden; }
.masthead__text { padding: .18in .2in .16in .6in; display: flex; flex-direction: column; justify-content: center; }
.mono { width: .6in; height: .6in; margin-bottom: 4pt; }
.eyebrow { margin: 0; font-family: var(--display); font-size: 9.5pt; letter-spacing: .3em; text-transform: uppercase; color: var(--brass-lt); }
.name { margin: 2pt 0 4pt; font-family: var(--display); font-weight: 700; font-size: 46pt; letter-spacing: .16em; line-height: 1.05; color: var(--ivory); }
.tagline { margin: 0 0 8pt; font-family: var(--quote); font-style: italic; font-weight: 600; font-size: 14pt; color: var(--brass-lt); }
.credline { margin: 0; font-size: 9pt; letter-spacing: .08em; text-transform: uppercase; color: var(--ivory); }
/* Photo is a whole rectangle (never cut out). Its studio background is near-black so it melts into the band. */
.masthead__photo { grid-column: 2; position: absolute; top: 0; right: 0; bottom: 0; width: 2.55in; height: 100%; object-fit: cover; object-position: 50% 12%; display: block; }

/* ===== Education: one slim strip under the masthead ===== */
.edu { margin-top: 8pt; padding: 4pt 0; border-bottom: 1px solid var(--brass); }
.edu p { margin: 0; font-size: 9.5pt; line-height: 1.5; }
.edu b { color: var(--navy); }
.edu__k { display: inline-block; min-width: .8in; font-family: var(--display); font-weight: 700; letter-spacing: .2em; text-transform: uppercase; font-size: 8.5pt; color: var(--blue); margin-right: 6pt; }

/* ===== Highlights: four family-confirmed headline facts, one row ===== */
.stats { margin-top: 7pt; display: grid; grid-template-columns: 1.3fr 1fr 1.15fr 1fr; gap: 0; border-bottom: 1px solid var(--brass); padding-bottom: 6pt; }
.stat { padding: 2pt 8pt; border-left: 1px solid var(--brass); display: flex; flex-direction: column; gap: 1pt; min-width: 0; }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b { font-family: var(--display); font-weight: 700; font-size: 14pt; letter-spacing: .04em; color: var(--navy); line-height: 1.15; white-space: nowrap; }
/* Rank cell: full title, "Cadet" set small above "First Sergeant" (correct styling, never abbreviated). */
.stat--rank b { font-size: 13pt; }
.stat b small { display: block; font-size: 7pt; letter-spacing: .24em; line-height: 1.2; color: var(--brass-dk); }
.stat span { font-size: 7.5pt; line-height: 1.3; letter-spacing: .02em; color: var(--brass-dk); text-transform: uppercase; }

/* ===== Profile ===== */
.profile { margin-top: 8pt; }
.profile p { margin: 0; font-size: 10pt; line-height: 1.5; max-width: 7.3in; }

/* ===== Capacities grid ===== */
.caps { margin-top: 7pt; flex: 1; }
.caps__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5pt 14pt; }
.cap { background: #fff; border-left: 3px solid var(--brass); padding: 6pt 11pt; break-inside: avoid; }
.cap h3 { margin: 0 0 2pt; font-family: var(--display); font-weight: 700; font-size: 10.5pt; letter-spacing: .06em; color: var(--blue); }
.cap p { margin: 0 0 2pt; font-size: 9pt; line-height: 1.38; }
.cap .claim { font-family: var(--quote); font-style: italic; font-weight: 600; font-size: 12pt; line-height: 1.2; color: var(--scarlet); margin-bottom: 4pt; }
.cap .built { font-size: 8.5pt; color: var(--brass-dk); margin: 0; }
.cap b { font-weight: 600; color: var(--navy); }
.cap .built b { color: var(--brass-dk); }

.page__foot { position: absolute; left: .5in; right: .5in; bottom: .28in; font-size: 7.5pt; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brass-dk); border-top: 1px solid var(--brass); padding-top: 4pt; display: flex; justify-content: space-between; }

/* ===== Page 2 ===== */
.runhead { display: flex; align-items: center; gap: 9pt; font-family: var(--display); letter-spacing: .22em; font-size: 9.5pt; color: var(--blue); padding-bottom: 7pt; border-bottom: 1px solid var(--brass); margin-bottom: 12pt; }
.runhead__mark { display: inline-grid; place-items: center; width: 22pt; height: 22pt; border: 1.2pt solid var(--brass); border-radius: 50%; font-weight: 700; color: var(--navy); letter-spacing: 0; }
.lede { margin: 0 0 9pt; font-size: 10.5pt; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6pt; }
.chips li { border: 1px solid var(--brass); background: #fff; padding: 5pt 11pt; font-size: 9.5pt; font-weight: 600; color: var(--navy); }
.note { margin: 8pt 0 0; font-size: 8.5pt; font-style: italic; color: #4a5368; }

/* Pull quote: navy band, brass hairlines; grayscale-safe because contrast is luminance based. */
.ath, .honors { margin-top: 12pt; }
.lead2 .ticks li, .ath .ticks li { font-size: 9.5pt; padding-bottom: 5pt; }
.quote { margin: 10pt 0; padding: 10pt 36pt; background: var(--navy); border-top: 2px solid var(--brass); border-bottom: 2px solid var(--brass); text-align: center; }
.quote blockquote { margin: 0; font-family: var(--quote); font-style: italic; font-weight: 600; font-size: 20pt; line-height: 1.25; color: var(--ivory); }
.quote figcaption { margin-top: 10pt; font-family: var(--display); font-size: 8.5pt; letter-spacing: .26em; text-transform: uppercase; color: var(--brass-lt); }

.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 0 0 7pt 20pt; font-size: 10.5pt; line-height: 1.45; }
.ticks li::before { content: ""; position: absolute; left: 2pt; top: 5pt; width: 7pt; height: 7pt; background: var(--brass); transform: rotate(45deg); }
.ticks b { color: var(--navy); }
.brings { margin-bottom: 8pt; }
.next { margin-top: 10pt; }
.next p { margin: 0; font-family: var(--quote); font-style: italic; font-weight: 600; font-size: 15pt; line-height: 1.3; color: var(--blue); }
.contact { margin-top: auto; padding: 8pt 0 .2in; text-align: center; font-size: 10pt; color: var(--navy); }
.contact p { margin: 0 0 2pt; }

/* ===== Small screens: let pages reflow instead of forcing 8.5in width ===== */
@media screen and (max-width: 8.8in) {
  .page { width: 100%; height: auto; overflow: visible; padding: 20px 18px 56px; }
  .masthead { margin: -20px -18px 0; grid-template-columns: 1fr; }
  .masthead__photo { position: static; grid-column: 1; width: 100%; height: 340px; order: -1; }
  .masthead__text { padding: 24px 18px; }
  .caps__grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; row-gap: 8pt; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .name { font-size: 36pt; }
  .contact { position: static; margin-top: 24px; }
  .edu__k:empty { display: none; }
  .quote { padding: 22pt 18pt; }
  .quote blockquote { font-size: 19pt; }
}

/* ===== Print: exact Letter pages, no chrome ===== */
@page { size: Letter; margin: 0; }
@media print {
  html, body { background: var(--ivory); }
  .toolbar { display: none; }
  .sheet-stack { display: block; padding: 0; gap: 0; }
  .page { box-shadow: none; break-after: page; page-break-after: always; }
  .page:last-child { break-after: auto; page-break-after: auto; }
  /* Force navy bands and fills to print. */
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  h2, h3 { break-after: avoid; }
}
