/* Berger BI v2 — expertise. Owned by the expertise redesign; keep every rule scoped to its sections.
   #bcore: navy statement + a value row split by hairlines (no mini-cards).
   #spec:  two pillars as indexed hairline rows; each row is a native <details> (challenge / solution). */

#dc-root [data-xp] { position: relative; z-index: 1; scroll-margin-top: 90px; }
#dc-root [data-xp-wrap] { max-width: 1140px; margin: 0 auto; padding: 0 32px; box-sizing: border-box; }

/* ================================ #bcore ================================ */
#dc-root #bcore { padding: 0; }
#dc-root #bcore [data-xp-panel] {
  border-radius: var(--v2-r-card); color: #fff; overflow: hidden;
  padding: 64px 48px 0;
}
#dc-root #bcore [data-xp-lead] {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end;
}
/* the <mark> inside each h2 is an inline box sized by Heebo's tall metrics; give its descent room so nothing overflows */
#dc-root #bcore h2, #dc-root #spec h2 { padding-bottom: .18em; }
#dc-root #bcore h2 { margin: 14px 0 0; color: #fff; text-wrap: balance; }
/* the title breaks after its comma when it needs two lines ("Years of experience, / at the pace of the AI era");
   an inline-block still wraps inside itself on narrow screens */
#dc-root #bcore h2 mark { display: inline-block; padding-bottom: .2em; margin-bottom: -.2em; } /* room for Heebo's descent, line box unchanged */
#dc-root #bcore [data-xp-lead] > p {
  margin: 0; font-size: 18px; line-height: 1.7; color: rgba(255, 255, 255, .76); max-width: 54ch;
}

/* value row: columns split by 1px rules, bleeding to the panel edges */
#dc-root #bcore [data-xp-values] {
  list-style: none; margin: 56px -48px 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, .14);
}
#dc-root #bcore [data-xp-values] > li { padding: 28px 48px 44px; min-width: 0; }
#dc-root #bcore [data-xp-values] > li + li { border-inline-start: 1px solid rgba(255, 255, 255, .14); }
#dc-root #bcore [data-xp-fig] {
  font-family: var(--v2-mono); font-size: 12px; letter-spacing: .12em; color: rgba(255, 255, 255, .6);
  direction: ltr; unicode-bidi: isolate; text-align: start;
}
#dc-root [dir="rtl"] #bcore [data-xp-fig] { text-align: right; }
#dc-root #bcore h3 { margin: 26px 0 0; font-size: 20px; font-weight: 600; line-height: 1.35; color: #fff; }
#dc-root #bcore [data-xp-values] p { margin: 6px 0 0; font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, .74); }

/* FIG. 01/02 — a time scale with the relevant unit marked */
#dc-root #bcore [data-xp-scale] {
  margin-top: 22px; height: 40px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, .22); max-width: 280px;
}
#dc-root #bcore [data-xp-scale] > span {
  position: relative; padding-top: 12px; font-size: 14px; line-height: 1.3; color: rgba(255, 255, 255, .7);
  white-space: nowrap;
}
#dc-root #bcore [data-xp-scale] > span::before {
  content: ""; position: absolute; top: -4px; inset-inline-start: 0; width: 7px; height: 7px; border-radius: 50%;
  box-sizing: border-box; background: var(--v2-navy); border: 1px solid rgba(255, 255, 255, .45);
}
#dc-root #bcore [data-xp-scale] > span[data-on] { color: #fff; font-weight: 600; }
#dc-root #bcore [data-xp-scale] > span[data-on]::before { background: #fff; border-color: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .14); }

/* FIG. 03 — each project stands on the previous ones */
#dc-root #bcore [data-xp-stack] {
  margin-top: 22px; height: 40px; display: flex; align-items: flex-end; gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, .22); box-sizing: border-box;
}
#dc-root #bcore [data-xp-stack] > span {
  width: 22px; border: 1px solid rgba(255, 255, 255, .4); border-bottom: 0; border-radius: 3px 3px 0 0; box-sizing: border-box;
}
#dc-root #bcore [data-xp-stack] > span:nth-child(1) { height: 10px; }
#dc-root #bcore [data-xp-stack] > span:nth-child(2) { height: 18px; }
#dc-root #bcore [data-xp-stack] > span:nth-child(3) { height: 27px; }
#dc-root #bcore [data-xp-stack] > span[data-on] { height: 38px; background: #fff; border-color: #fff; }

/* ================================ #spec ================================ */
#dc-root #spec { padding: var(--v2-sec-y) 0; }
#dc-root #spec [data-xp-head] {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap;
}
#dc-root #spec [data-xp-head] > div { max-width: 640px; min-width: 0; }
#dc-root #spec h2 { margin: 16px 0 0; color: var(--v2-ink); text-wrap: balance; }
#dc-root #spec [data-xp-head] p { margin: 8px 0 0; font-size: 18px; line-height: 1.6; color: var(--v2-muted); max-width: 56ch; text-wrap: pretty; }

/* "expand all": a quiet text control, not a second button (P-32). Shown once expertise.js is running. Icon first, then
   both labels in one grid cell (the hidden one keeps its width), so the control never changes size when it toggles (D-24).
   The selector carries [data-xp-head] so it outranks the secondary-button rule for this control in system.css. */
#dc-root #spec [data-xp-head] > [data-xp-all] {
  display: none; grid-template-columns: auto auto; align-items: center; justify-items: start; column-gap: 10px; flex: none;
  height: 44px; min-height: 44px; padding: 0 2px; margin: 0; border: 0 !important; border-radius: var(--v2-r-pill);
  background: none !important; color: var(--v2-navy) !important; box-shadow: none;
  font: 600 16px/1.5 'Heebo', sans-serif; cursor: pointer;
}
#dc-root #spec[data-xp-ready] [data-xp-head] > [data-xp-all] { display: inline-grid; }
#dc-root #spec [data-xp-all] > svg { grid-area: 1 / 1; }
#dc-root #spec [data-xp-all] > span { grid-area: 1 / 2; text-decoration: underline 1px transparent; text-underline-offset: 5px; transition: text-decoration-color 200ms var(--v2-ease); }
#dc-root #spec [data-xp-all][aria-expanded="true"] > [data-xp-all-open],
#dc-root #spec [data-xp-all]:not([aria-expanded="true"]) > [data-xp-all-close] { visibility: hidden; }

/* pillar: the intro sits on the page ground (sticky while its rows scroll by), the rows are the one white card.
   No white void under a short intro, no card-in-card. */
#dc-root #spec [data-xp-pillar] {
  display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); column-gap: 56px; align-items: start;
}
#dc-root #spec [data-xp-pillar="A"] { margin-top: 56px; }
#dc-root #spec [data-xp-pillar] + [data-xp-pillar] { margin-top: 64px; }
#dc-root #spec [data-xp-pillar-head] { padding: 22px 0 0; position: sticky; top: 96px; }
#dc-root #spec [data-xp-key] {
  font-family: var(--v2-mono); font-size: 12px; font-weight: 500; letter-spacing: .12em; line-height: 1.4; color: var(--v2-muted);
  direction: ltr; unicode-bidi: isolate; text-align: start;
}
#dc-root [dir="rtl"] #spec [data-xp-key] { text-align: right; }
/* Hebrew: the pillar key is a Hebrew label (Heebo, right to left), not mono caps */
#dc-root [dir="rtl"] #spec [data-xp-key] { direction: rtl; font-family: 'Heebo', sans-serif; font-size: 14px; letter-spacing: 0; }
#dc-root #spec [data-xp-pillar-head] h3 { margin: 12px 0 0; font-size: 26px; font-weight: 700; line-height: 1.4; letter-spacing: -.01em; color: var(--v2-ink); text-wrap: balance; }
#dc-root #spec [data-xp-pillar-head] p { margin: 12px 0 0; font-size: 16px; line-height: 1.65; color: var(--v2-muted); }
#dc-root #spec [data-xp-pillar-head] p b { font-weight: 600; color: var(--v2-navy); }

/* rows */
#dc-root #spec [data-xp-rows] {
  min-width: 0; background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: var(--v2-r-card);
  overflow: clip;   /* rounds the hover fill of the first and last rows; nothing inside is ever cut (rows only grow) */
}
#dc-root #spec [data-xp-row] { border-bottom: 1px solid var(--v2-line); }
#dc-root #spec [data-xp-row]:last-child { border-bottom: 0; }
#dc-root #spec [data-xp-row] > summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 56px minmax(0, 1fr) 18px; gap: 16px;
  align-items: center; min-height: 68px; padding: 14px 32px; box-sizing: border-box; color: var(--v2-ink);
  border-radius: 0; transition: background-color 200ms var(--v2-ease), color 200ms var(--v2-ease);
}
/* Safari does not lay out <summary> as a grid: the summary stays a block and an inner div carries the row grid
   (columns and gap are inherited from the summary rules, so the breakpoints below keep working) */
#dc-root #spec [data-xp-row] > summary { display: block; }
#dc-root #spec [data-xp-sum] { display: grid; grid-template-columns: inherit; gap: inherit; align-items: center; min-height: 40px; }
#dc-root #spec [data-xp-row] > summary::-webkit-details-marker { display: none; }
#dc-root #spec [data-xp-row] > summary::marker { content: ""; }
#dc-root #spec [data-xp-row] > summary:focus-visible { outline: 2px solid var(--v2-navy); outline-offset: -2px; border-radius: 4px; }
#dc-root #spec [data-xp-num] {
  font-family: var(--v2-mono); font-size: 12px; letter-spacing: .06em; color: var(--v2-muted);
  direction: ltr; unicode-bidi: isolate; text-align: start;
}
#dc-root [dir="rtl"] #spec [data-xp-num] { text-align: right; }
#dc-root #spec [data-xp-row] h4 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.4; color: inherit; }
#dc-root #spec [data-xp-chev] { color: var(--v2-soft); transition: transform 220ms var(--v2-ease); }
#dc-root #spec [data-xp-row][open] > summary { color: var(--v2-navy); }
#dc-root #spec [data-xp-row][open] [data-xp-num] { color: var(--v2-navy); }
#dc-root #spec [data-xp-row][open] [data-xp-chev] { transform: rotate(180deg); color: var(--v2-navy); }

/* opened: challenge → solution, aligned under the title */
#dc-root #spec [data-xp-body] {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 32px;
  padding: 2px 32px 30px calc(32px + 56px + 16px);
}
#dc-root [dir="rtl"] #spec [data-xp-body] { padding: 2px calc(32px + 56px + 16px) 30px 32px; }
#dc-root #spec [data-xp-row][open] > [data-xp-body] { animation: xp-open 240ms var(--v2-ease) both; }
@keyframes xp-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
#dc-root #spec [data-xp-cell="solution"] { padding-inline-start: 24px; border-inline-start: 1px solid var(--v2-line-2); }
#dc-root #spec [data-xp-label] { font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--v2-muted); }
#dc-root #spec [data-xp-cell="solution"] [data-xp-label] { color: var(--v2-navy); }
#dc-root #spec [data-xp-cell] p { margin: 6px 0 0; font-size: 16px; line-height: 1.65; color: var(--v2-muted); text-wrap: pretty; }
#dc-root #spec [data-xp-cell="solution"] p { color: var(--v2-ink); }

/* pillar B's open slot: the list is examples, not a menu */
#dc-root #spec [data-xp-next] {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) 18px; gap: 16px; align-items: center;
  min-height: 68px; padding: 16px 32px; box-sizing: border-box;
  border-top: 1px dashed var(--v2-line-2);
  color: var(--v2-navy); transition: background-color 200ms var(--v2-ease);
}
#dc-root #spec [data-xp-next]:focus-visible { outline: 2px solid var(--v2-navy); outline-offset: -2px; }
#dc-root #spec [data-xp-next] [data-xp-num] { color: var(--v2-navy); }
#dc-root #spec [data-xp-next-text] { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; }
#dc-root #spec [data-xp-next-text] b { font-size: 18px; font-weight: 600; line-height: 1.4; }
#dc-root #spec [data-xp-next-text] span { font-size: 16px; line-height: 1.5; color: var(--v2-muted); }
#dc-root #spec [data-xp-arrow] { transition: transform 200ms var(--v2-ease); }
#dc-root [dir="rtl"] #spec [data-xp-arrow] { transform: scaleX(-1); }

@media (hover: hover) and (pointer: fine) {
  #dc-root #spec [data-xp-row] > summary:hover { background: var(--v2-surface-2); color: var(--v2-navy); }
  #dc-root #spec [data-xp-row] > summary:hover [data-xp-chev] { color: var(--v2-navy); }
  #dc-root #spec [data-xp-next]:hover { background: var(--v2-surface-2); color: var(--v2-navy); }
  #dc-root [dir="ltr"] #spec [data-xp-next]:hover [data-xp-arrow] { transform: translateX(3px); }
  #dc-root [dir="rtl"] #spec [data-xp-next]:hover [data-xp-arrow] { transform: scaleX(-1) translateX(3px); }
  #dc-root #spec [data-xp-head] > [data-xp-all]:hover { background: none !important; color: var(--v2-ink) !important; }
  #dc-root #spec [data-xp-all]:hover > span { text-decoration-color: currentColor; }
}

/* ================================ responsive ================================ */
@media (max-width: 1100px) {
  #dc-root #bcore [data-xp-panel] { padding: 56px 44px 0; }
  #dc-root #bcore [data-xp-values] { margin: 48px -44px 0; }
  #dc-root #bcore [data-xp-values] > li { padding: 26px 44px 40px; }
  #dc-root #spec [data-xp-pillar] { grid-template-columns: minmax(0, 250px) minmax(0, 1fr); column-gap: 40px; }
}
@media (max-width: 900px) {
  #dc-root #bcore [data-xp-lead] { grid-template-columns: minmax(0, 1fr); align-items: start; }
  #dc-root #spec [data-xp-pillar] { grid-template-columns: minmax(0, 1fr); }
  #dc-root #spec [data-xp-pillar-head] { position: static; padding: 0 0 20px; }
  #dc-root #spec [data-xp-pillar-head] p { max-width: 60ch; }
}
@media (max-width: 900px) {
  /* value row becomes stacked rows (no squeezed three-in-a-row); the figure sits beside the text */
  #dc-root #bcore [data-xp-values] { grid-template-columns: minmax(0, 1fr); }
  #dc-root #bcore [data-xp-values] > li {
    display: grid; grid-template-columns: minmax(0, 1fr) 220px; column-gap: 40px; align-items: center;
    padding: 24px 44px 26px;
  }
  #dc-root #bcore [data-xp-values] > li + li { border-inline-start: 0; border-top: 1px solid rgba(255, 255, 255, .14); }
  #dc-root #bcore [data-xp-values] > li > * { grid-column: 1; }
  #dc-root #bcore [data-xp-values] > li > [data-xp-scale],
  #dc-root #bcore [data-xp-values] > li > [data-xp-stack] { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
  #dc-root #bcore [data-xp-values] > li > [data-xp-stack] { width: 100%; }
  #dc-root #bcore h3 { margin-top: 10px; }
}
@media (max-width: 760px) {
  #dc-root #spec [data-xp-body] { grid-template-columns: minmax(0, 1fr); }
  #dc-root #spec [data-xp-cell="solution"] { padding-inline-start: 0; border-inline-start: 0; padding-top: 16px; border-top: 1px solid var(--v2-line); }
}
@media (max-width: 639px) {
  #dc-root [data-xp-wrap] { padding: 0 20px; }
  #dc-root #bcore [data-xp-panel] { padding: 36px 22px 0; }
  #dc-root #bcore h2 { margin-top: 14px; }
  #dc-root #bcore [data-xp-values] { margin: 32px -22px 0; }
  #dc-root #bcore [data-xp-values] > li { display: block; padding: 20px 22px 22px; }
  #dc-root #bcore [data-xp-scale], #dc-root #bcore [data-xp-stack] { display: none; }
  #dc-root #bcore h3 { font-size: 18px; }
  #dc-root #spec [data-xp-head] { row-gap: 12px; }
  #dc-root #spec [data-xp-pillar="A"] { margin-top: 28px; }
  #dc-root #spec [data-xp-pillar] + [data-xp-pillar] { margin-top: 48px; }
  #dc-root #spec [data-xp-pillar-head] { padding: 0 0 16px; }
  #dc-root #spec [data-xp-pillar-head] h3 { font-size: 22px; margin-top: 10px; }
  #dc-root #spec [data-xp-row] > summary, #dc-root #spec [data-xp-next] {
    grid-template-columns: 40px minmax(0, 1fr) 18px; gap: 12px; min-height: 60px; padding: 12px 20px;
  }
  #dc-root #spec [data-xp-row] h4, #dc-root #spec [data-xp-next-text] b { font-size: 18px; }
  #dc-root #spec [data-xp-num] { font-size: 12px; letter-spacing: .02em; }
  #dc-root #spec [data-xp-body], #dc-root [dir="rtl"] #spec [data-xp-body] { padding: 0 20px 24px; gap: 16px; }
}

/* motion off: reduced motion and the a11y "stop animations" switch */
@media (prefers-reduced-motion: reduce) {
  #dc-root #spec [data-xp-row][open] > [data-xp-body] { animation: none; }
  #dc-root #spec [data-xp-chev], #dc-root #spec [data-xp-arrow], #dc-root #spec [data-xp-all] > span { transition: none; }
}
html.a11y-no-motion #dc-root #spec [data-xp-row][open] > [data-xp-body] { animation: none; }
html.a11y-no-motion #dc-root #spec [data-xp-chev], html.a11y-no-motion #dc-root #spec [data-xp-arrow] { transition: none; }
