/* Consulting hub (consulting.html), warm theme: the botanical chapter layout, matched to
   redesign/reference/consulting-reference.png (1064px wide).
   The markup is rearranged by assets/js/consulting-hub.js, which adds html.cx-hub; every rule
   here is scoped to it (or to this page's body), so the classic theme and the other pages are
   untouched. Art: the asset kit in assets/img/consulting/kit/ (see its README.md). */

html[data-theme="warm"].cx-hub {
  --cx-brass: var(--color-ornament, #A68B5A);
  --cx-rule: var(--line-soft, #C8BBA3);
  --cx-green: var(--color-primary, #20382F);
  --cx-ivy: clamp(200px, 22vw, 310px);          /* ivy_trailing.png, 838 × 877; a little lighter than Finance's oak (--fx-oak-art) */
  --cx-margin: max(var(--gutter, 3rem), (100vw - 76rem) / 2);   /* window edge → content edge */
  --cx-ivy-room: max(1.5rem, .418 * var(--cx-ivy) + 34px - var(--cx-margin));   /* the panel stops this short of the content edge, so the vine clears the frame and the leaves end ≥24px inside the window */
}

/* ---------- Paper: the kit's grain a little more visible, and a soft vignette ---------- */
html[data-theme="warm"] body[data-page="consulting"] {
  background: var(--surface-page) url("../img/consulting/kit/warm_paper_tile_1024.png") repeat;
}
html[data-theme="warm"] body[data-page="consulting"]::before,
html[data-theme="warm"] body[data-page="consulting"]::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
}
html[data-theme="warm"] body[data-page="consulting"]::before {      /* the grain again: centred on mid-grey, contrast raised, overlaid lightly */
  background: url("../img/consulting/kit/warm_paper_tile_1024.png") repeat;
  filter: grayscale(1) brightness(.54) contrast(6); mix-blend-mode: overlay; opacity: .4;
}
html[data-theme="warm"] body[data-page="consulting"]::after {       /* the vignette: a little lighter in the middle, warm and soft at the edges */
  background: radial-gradient(ellipse at 50% 46%, rgba(252, 244, 228, .55) 0%, rgba(252, 244, 228, 0) 40%, rgba(225, 160, 50, 0) 44%, rgba(225, 160, 50, .16) 100%);
}
html[data-theme="warm"] body[data-page="consulting"] main > .hero { background: transparent; }

/* Match the outcomes note below the Finance directory. */
html[data-theme="warm"].cx-hub .cx-figure { margin: 1rem 0 0; font-size: .9rem; }
html[data-theme="warm"].cx-hub .cx-figure .margin-note__value {
  font: 600 1.3rem/1 var(--font-head); margin-inline-end: .45em;
}
html[data-theme="warm"].cx-hub .cx-figure .badge-verify { margin-inline-start: .35em; }

html[data-theme="warm"].cx-hub .cx-plant { position: absolute; z-index: 0; display: block; max-width: none; pointer-events: none; }

/* ---------- 2. Section headings: italic, a brass line to the column's right edge ---------- */
html[data-theme="warm"].cx-hub main .cx-heading {
  display: flex; align-items: center; gap: var(--space-5);
  margin: 0 0 6px; max-width: none;
  font: italic 500 2.1rem/1.15 var(--font-head); letter-spacing: 0; color: var(--color-text, var(--ink));
  text-align: left; text-wrap: balance;
}
html[data-theme="warm"].cx-hub main .cx-heading::after {
  content: ""; flex: 1 1 2rem; min-width: 2rem; border-top: 1px solid var(--cx-brass);
}
html[data-theme="warm"].cx-hub .playbill-heading { max-width: none; text-align: left; }
html[data-theme="warm"].cx-hub .playbill-heading__rule { display: none; }
html[data-theme="warm"].cx-hub .playbill-heading__title { margin-block: 0; }
/* The topic blocks further down: heading across the top, the list under it */
html[data-theme="warm"].cx-hub #sections > .split { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
html[data-theme="warm"].cx-hub #sections .cx-heading { font-size: 2.1rem; }

/* ---------- The main areas: tight under the opener ---------- */
html[data-theme="warm"].cx-hub #lanes { padding-top: 36px; overflow-x: clip; }

/* ---------- 3. "Which one is which?": a plain paragraph ---------- */
html[data-theme="warm"].cx-hub .cx-lede {
  max-width: calc(100% - 13rem); margin: 1rem 0 0;
  font-size: .95rem; line-height: 1.45; color: var(--color-text, var(--ink));
}
html[data-theme="warm"].cx-hub .cx-lede .cite { font-size: .7em; }

/* Ivy: grows in from the right margin, from beside the heading down the outside of the panel's
   right edge (as the oak on Finance). Below its top third the vine is the right half of the PNG
   (from 50% across), so that half sits 10px outside the frame; the leaves of the top third (from
   16.5% across) start where the heading's line has stopped (below). The heading's centre line is
   ~18% down the ivy's drawn height (19px is half the heading's height). */
html[data-theme="warm"].cx-hub .cx-lanes { position: relative; }
html[data-theme="warm"].cx-hub .cx-plant--ivy {
  z-index: 1; width: var(--cx-ivy); height: auto; opacity: .9;
  left: calc(100% - var(--gutter, 3rem) - var(--cx-ivy-room) + 10px - .5 * var(--cx-ivy));
  top: calc(19px - .194 * var(--cx-ivy));
}

/* ---------- 5. Comparison table: matched to redesign/reference/consulting-table-reference.png ----------
   Sizes are chosen so every cell wraps exactly where the reference wraps at a 1064px window:
   14px text, 16px side padding, the reference's column proportions, 12px header labels. */
html[data-theme="warm"].cx-hub {
  --cx-t-ink: #1F1910;           /* heading and header labels */
  --cx-t-text: #271F12;          /* cell text */
  --cx-t-muted: #6B6254;         /* the intro line */
  --cx-t-head: #E0D6BF;          /* header row */
  --cx-t-body: #EEE5D3;          /* body cells: close to the page tone */
  --cx-t-border: #CDC4B0;        /* outer border */
  --cx-t-rule: #DCD3C0;          /* rules between rows and columns */
  --cx-t-dash: #AEA695;          /* "—" in an empty cell */
}
html[data-theme="warm"].cx-hub .warm-compare { margin-top: 28px; }
html[data-theme="warm"].cx-hub main .warm-compare .cx-heading--sub { margin-bottom: 6px; font-size: 2.1rem; color: var(--cx-t-ink); }
html[data-theme="warm"].cx-hub main .warm-compare .cx-heading--sub::after { border-top-color: rgba(166, 139, 90, .7); }   /* #A68B5A at 70% */
html[data-theme="warm"].cx-hub .cx-compare-note { margin: 0 0 14px; font-size: .84rem; line-height: 1.45; color: var(--cx-t-muted); }
html[data-theme="warm"].cx-hub .warm-compare th[scope="row"] { font: 600 1.15rem/1.2 var(--font-head); }
html[data-theme="warm"].cx-hub .warm-compare th[scope="row"] a { color: var(--cx-green); text-decoration-line: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
/* Verify markers: kept, small and quiet; never split across lines */
html[data-theme="warm"].cx-hub .warm-compare .badge-verify {
  display: inline-block; white-space: nowrap; vertical-align: baseline;
  font-size: .64rem; line-height: 1.35; padding: 0 5px; margin: 3px 0 0;
  color: var(--cx-t-muted); background: transparent; border-color: var(--cx-t-dash);
}
@media (min-width: 40rem) {
  html[data-theme="warm"].cx-hub .warm-compare__scroll {
    overflow-x: auto; background: var(--cx-t-body);
    border: 1px solid var(--cx-t-border); border-radius: 6px; box-shadow: none;
  }
  html[data-theme="warm"].cx-hub .warm-compare table { table-layout: fixed; width: 100%; font-size: 14px; color: var(--cx-t-text); }
  html[data-theme="warm"].cx-hub .warm-compare thead th:nth-child(1) { width: 14%; }
  html[data-theme="warm"].cx-hub .warm-compare thead th:nth-child(2) { width: 21%; }
  html[data-theme="warm"].cx-hub .warm-compare thead th:nth-child(3) { width: 13.5%; }
  html[data-theme="warm"].cx-hub .warm-compare thead th:nth-child(4) { width: 15.7%; }
  html[data-theme="warm"].cx-hub .warm-compare thead th:nth-child(5) { width: 17.8%; }
  html[data-theme="warm"].cx-hub .warm-compare thead th:nth-child(6) { width: 18%; }
  html[data-theme="warm"].cx-hub .warm-compare th,
  html[data-theme="warm"].cx-hub .warm-compare td {
    padding: 15px 16px; vertical-align: top; line-height: 1.3;
    border-bottom: 1px solid var(--cx-t-rule); border-right: 1px solid var(--cx-t-rule);
  }
  html[data-theme="warm"].cx-hub .warm-compare tr > :last-child { border-right: 0; }
  html[data-theme="warm"].cx-hub .warm-compare tbody tr:last-child > * { border-bottom: 0; }
  html[data-theme="warm"].cx-hub .warm-compare thead th {
    padding: 14px 16px; vertical-align: middle;
    background: var(--cx-t-head); color: var(--cx-t-ink);
    font: 700 12.75px/1.35 var(--font-body); letter-spacing: .12em; text-transform: uppercase; font-variant: normal;
  }
  html[data-theme="warm"].cx-hub .warm-compare thead th:first-child,
  html[data-theme="warm"].cx-hub .warm-compare tbody th[scope="row"] { border-right-color: var(--cx-t-rule); }
  html[data-theme="warm"].cx-hub .warm-compare thead th:first-child { background: var(--cx-t-head); }
  html[data-theme="warm"].cx-hub .warm-compare tbody th[scope="row"],
  html[data-theme="warm"].cx-hub .warm-compare tbody td { background: var(--cx-t-body); }
  html[data-theme="warm"].cx-hub .warm-compare td.cx-empty { text-align: center; color: var(--cx-t-dash); }
  html[data-theme="warm"].cx-hub .warm-compare td.cx-empty > span:first-child { font-size: 1.2em; color: #9C9381; }
}
/* The two intro sentences, after the table */
html[data-theme="warm"].cx-hub .cx-after-table { max-width: 46rem; margin: 18px 0 0; font-size: .95rem; line-height: 1.5; color: var(--color-text, var(--ink)); }
html[data-theme="warm"].cx-hub #lanes .see-all { margin-top: 12px; }

/* ---------- 7. The lower sections, in Finance's treatment (scoped to Consulting) ---------- */
/* Topic blocks: structured text rows */
html[data-theme="warm"][data-palette].cx-hub #sections > .split { padding-block: var(--space-10); }
html[data-theme="warm"][data-palette].cx-hub #sections > .split .item-list > li { padding-block: 10px; border-top: 1px solid var(--cx-rule); }
html[data-theme="warm"][data-palette].cx-hub #sections > .split .item-list > li:first-child { border-top: 0; padding-top: 0; }
/* Early insight programs: editorial rows, term on the left */
html[data-theme="warm"][data-palette].cx-hub #early-insight .notice {
  max-width: 46rem; padding: 6px 0 6px 16px;
  background: transparent; border: 0; border-left: 2px solid var(--cx-brass); border-radius: 0;
  color: var(--color-text-muted, var(--ink-muted)); font-size: .9rem;
}
html[data-theme="warm"][data-palette].cx-hub #early-insight .prose { max-width: 46rem; }
html[data-theme="warm"][data-palette].cx-hub #early-insight .card-grid.warm-timeline {
  display: block; max-width: none; margin-top: 28px; padding: 0; border-bottom: 1px solid var(--cx-rule);
}
html[data-theme="warm"][data-palette].cx-hub #early-insight .card-grid.warm-timeline::before { display: none; }
html[data-theme="warm"][data-palette].cx-hub #early-insight .warm-timeline > .card {
  display: grid; grid-template-columns: 14rem minmax(0, 1fr); column-gap: 32px;
  padding: 18px 0; background: transparent; border: 0; border-top: 1px solid var(--cx-rule); border-radius: 0; box-shadow: none;
}
html[data-theme="warm"][data-palette].cx-hub #early-insight .warm-timeline > .card::before { display: none; }
html[data-theme="warm"][data-palette].cx-hub #early-insight .warm-timeline > .card > h3 {
  margin: 0; font: 600 1.25rem/1.25 var(--font-head); font-variant: normal; letter-spacing: 0; color: var(--cx-green);
}
html[data-theme="warm"][data-palette].cx-hub #early-insight .warm-timeline > .card.is-key { box-shadow: inset 3px 0 0 var(--cx-brass); padding-left: 16px; }
html[data-theme="warm"][data-palette].cx-hub #early-insight .warm-timeline .item-list { gap: 10px; margin: 0; }
html[data-theme="warm"][data-palette].cx-hub #early-insight .warm-timeline .item-title { font-weight: 600; color: var(--color-text, var(--ink)); }
/* Year-by-Year Guide: a handbook index of years, then the terms */
html[data-theme="warm"][data-palette].cx-hub #guide { background: transparent; border-top: 1px solid var(--cx-rule); }
html[data-theme="warm"][data-palette].cx-hub #guide .section-intro { max-width: 46rem; margin: 6px 0 12px; text-align: left; font-size: .95rem; color: var(--color-text-muted, var(--ink-muted)); }
html[data-theme="warm"][data-palette].cx-hub .year-tabs {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding: 0; margin-top: 20px;
  background: transparent; border: 0; border-bottom: 1px solid var(--cx-brass); border-radius: 0; box-shadow: none;
}
html[data-theme="warm"][data-palette].cx-hub .year-tab {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  margin-bottom: -1px; padding: 12px 16px 14px; text-align: left;
  background: transparent; color: var(--color-text, var(--ink)); border: 0; border-bottom: 2px solid transparent; border-radius: 0; box-shadow: none;
}
html[data-theme="warm"][data-palette].cx-hub .year-tab > .icon-badge { display: none; }
html[data-theme="warm"][data-palette].cx-hub .year-tab .tab-year,
html[data-theme="warm"][data-palette].cx-hub .year-tab .tab-theme { align-self: flex-start; }
html[data-theme="warm"][data-palette].cx-hub .year-tab .tab-year { font: 600 1.3rem/1.15 var(--font-head); color: var(--cx-green); }
html[data-theme="warm"][data-palette].cx-hub .year-tab .tab-theme { font-size: .85rem; color: var(--color-text-muted, var(--ink-muted)); }
html[data-theme="warm"][data-palette].cx-hub .year-tab:hover { background: rgba(166, 139, 90, .10); }
html[data-theme="warm"][data-palette].cx-hub .year-tab[aria-selected="true"] { background: transparent; color: var(--color-text, var(--ink)); border-bottom-color: var(--cx-green); }
html[data-theme="warm"][data-palette].cx-hub .year-tab[aria-selected="true"] .tab-theme { color: var(--color-text, var(--ink)); }
html[data-theme="warm"][data-palette].cx-hub .year-tab:focus-visible { outline: 2px solid var(--cx-green); outline-offset: -2px; }
html[data-theme="warm"][data-palette].cx-hub .year-panel { padding: 24px 0 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
html[data-theme="warm"][data-palette].cx-hub .year-panel:has(.warm-timeline) { padding-inline: 0; }
html[data-theme="warm"][data-palette].cx-hub .year-goal { padding: 4px 0 4px 18px; background: transparent; border: 0; border-left: 2px solid var(--cx-brass); border-radius: 0; }
html[data-theme="warm"][data-palette].cx-hub .year-goal h3 { font: 600 1.4rem/1.2 var(--font-head); color: var(--cx-green); }
html[data-theme="warm"][data-palette].cx-hub #guide .warm-timeline::before { width: 1px; margin-left: 0; background: var(--cx-brass); }
html[data-theme="warm"][data-palette].cx-hub #guide .warm-timeline > *::before { background: var(--surface-page) !important; border: 1.5px solid var(--cx-brass); }
/* Recruiting from Grinnell */
html[data-theme="warm"][data-palette].cx-hub #rural { background: transparent; border-top: 1px solid var(--cx-rule); }
html[data-theme="warm"][data-palette].cx-hub #rural .section-intro { max-width: 46rem; text-align: left; color: var(--color-text-muted, var(--ink-muted)); }
html[data-theme="warm"][data-palette].cx-hub #rural .warm-plain > .card { background: transparent; box-shadow: none; }
html[data-theme="warm"][data-palette].cx-hub #rural .warm-plain > .card > h3 { font: 600 1.25rem/1.25 var(--font-head); color: var(--cx-green); }
/* Target firms to research: an editorial list on the page's paper, no boxes */
html[data-theme="warm"][data-palette].cx-hub #firms { background: transparent; border-top: 1px solid var(--cx-rule); }
html[data-theme="warm"][data-palette].cx-hub #firms .section-intro { max-width: 46rem; text-align: left; color: var(--color-text-muted, var(--ink-muted)); }
html[data-theme="warm"][data-palette].cx-hub #firms .firm-columns > div > h3 {
  margin: 28px 0 0; padding-bottom: 8px; border-bottom: 1px solid var(--cx-brass);
  font: 700 .72rem/1.3 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--color-text, var(--ink));
}
html[data-theme="warm"][data-palette].cx-hub #firms .firm-card {
  background: transparent; border: 0; border-bottom: 1px solid var(--cx-rule); border-radius: 0; box-shadow: none;
}
html[data-theme="warm"][data-palette].cx-hub #firms .firm-card > h4 { font: 600 1.25rem/1.25 var(--font-head); color: var(--cx-green); }
/* Verify markers anywhere on the page: kept whole, never split across two lines */
html[data-theme="warm"][data-palette].cx-hub main .badge-verify { display: inline-block; white-space: nowrap; }

/* ---------- 6. Responsive ---------- */
@media (min-width: 64rem) {
  html[data-theme="warm"].cx-hub .cx-lanes .career-directory { margin-inline-end: var(--cx-ivy-room); }   /* the ivy grows in the room on the right */
}
@media (max-width: 63.999rem) {
  html[data-theme="warm"].cx-hub .cx-plant { display: none; }
  html[data-theme="warm"].cx-hub .cx-lede { max-width: 46rem; }
}
@media (max-width: 39.999rem) {
  /* headings wrap on a phone: the brass line runs under them instead of beside them */
  html[data-theme="warm"].cx-hub main .cx-heading { display: block; font-size: 1.85rem; }
  html[data-theme="warm"].cx-hub main .cx-heading::after { display: block; margin-top: var(--space-3); }
  html[data-theme="warm"].cx-hub main .warm-compare .cx-heading--sub,
  html[data-theme="warm"].cx-hub #sections .cx-heading { font-size: 1.85rem; }
}
@media (max-width: 47.999rem) {
  html[data-theme="warm"][data-palette].cx-hub #early-insight .warm-timeline > .card { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
  html[data-theme="warm"][data-palette].cx-hub .year-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
