/* fixes-p0.css: mechanical design fixes (DESIGN-dev U3). No new colours, type or layout direction.
   Loaded after style.css from _layouts/default.html. */

/* ISS-6e6b47c0e7: ~20 rules in style.css and case-study.css lead their font stack with
   "IBM Plex Sans", which was never declared, so text drew in the system fallback. Declare
   it as an alias of the self-hosted IBM Plex Sans files (same files as 'IBM' and
   'IBMLight'), so every existing stack resolves to the brand face. */
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/assets/fonts/New/IBMPlexSans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/assets/fonts/New/IBMPlexSans-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* Body carries the brand face; controls and <summary> inherit it instead of the UA font. */
body {
  font-family: "IBM", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

button,
input,
select,
textarea,
summary {
  font-family: inherit;
}

/* ISS-471c7fc6cb: home overflow at 280-768. .usp-section is width:100% content-box with
   side padding (so wider than its parent); the button row did not wrap and its buttons
   could be wider than the row. */
.usp-section {
  box-sizing: border-box;
  max-width: 100%;
}

.button-box {
  flex-wrap: wrap;
  max-width: 100%;
}

.lead-button,
.hero-button {
  max-width: 100%;
  box-sizing: border-box;
}

/* style.css capped .hero-button at 15rem because its label was a fixed 9rem box. Since the
   site-main button label fix (1bdb124) the label sizes to its text, so a 15rem cap clips longer
   labels ("Start a conversation": 18px cut at 1440). Keep 15rem as the minimum and let the
   button grow to its label, never past its container. */
.hero-button {
  width: fit-content;
  min-width: min(15rem, 100%);
  max-width: 100%;
}

/* ISS-0ca42578c2 / ISS-4358d86d0a: LBAI small labels were #4a4a4a (1.9:1) and #666 (2.9:1)
   on #1e1e1e. The existing palette token --text-muted-color (#d9d9d9) meets AA. */
.benchmark-container .unit,
.benchmark-container th small,
.benchmark-container .lxbai-vendor-cta-legal {
  color: var(--text-muted-color);
}

/* ISS-4358d86d0a / ISS-6e6b47c0e7: the LBAI board container set a bare sans-serif, which
   skips the brand face for every label inside it. (Monospace: see IBM Plex Mono below.) */
.benchmark-container {
  font-family: "IBM", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* DESIGN-dev U3b (ISS-471c7fc6cb residue): at 280 px the two What We Do columns kept a fixed
   280px min-width inside a section with 5vw side padding, so their text overflowed the
   section's overflow-x:hidden box by 8px. Let the min-width yield to the container. */
.what-we-do-text,
.what-we-do-links,
.blog-links {
  min-width: min(280px, 100%);
}

/* The blog grid track (max(20vw, 18 x text-size)) is 288px at 280px viewports, wider than the
   container, so the cards sat off the left edge. Cap the track at the container width. */
.blog-posts {
  grid-template-columns: repeat(auto-fill, min(100%, max(20vw, calc(var(--text-size-Medium) * 18))));
}

/* The home "Technologies" five-up card grid starts at 750px; at 750-899px each card is ~120px
   wide and "Manufacturing" (a single word, 16px bold) is cut by the card's overflow:hidden.
   Three columns in that range give the title room; five columns resume at 900px. */
@media (min-width: 750px) and (max-width: 899px) {
  .tech-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* DS16 (owner): IBM Plex Mono, self-hosted (SIL OFL 1.1, licence next to the files:
   assets/fonts/New/IBMPlexMono-LICENSE.txt). 400 and 500 (tokens.md; U12 swapped the 700 file for 500). */
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/assets/fonts/New/IBMPlexMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/assets/fonts/New/IBMPlexMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

code,
pre,
kbd,
samp,
.benchmark-container .score-value,
.lbai-cta {
  font-family: var(--font-mono);
}

/* U10: the capability cards (technology landings, .why-choose-cards .card) kept a 14rem minimum
   width; in a 280px viewport (and at 130% text on 360) the container is narrower, so the card ran
   past the right edge (gpu, computer-vision, generative-ai, ... 4 OVF each). Let the minimum yield. */
.why-choose-cards .card {
  min-width: min(14rem, 100%);
  max-width: 100%;
  box-sizing: border-box;
}

/* U10: button labels are nowrap in a fixed 1.5rem box; a long label ("Tell us the crop or machine",
   "See the monitoring harness", "pip install lynxbench-ai") is wider than the button at 280px, or at
   130% text on a phone, and its last letters were clipped by the overflow:hidden label. On phones let
   the label wrap and the box grow with it; desktop is unchanged. */
@media screen and (max-width: 600px) {
  .button-inner .label {
    height: auto;
    min-height: 1.5rem;
    min-width: 0;
    white-space: normal;
  }

  .button-inner .label .text-default,
  .button-inner .label .text-hover {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* LBAI compare grid: the 16rem column minimum is wider than the container at 130% text on a phone. */
.lbai-compare-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr));
}

/* V1 (U10): _includes/landing/highlight-row.html emits .blog-preview-description, which no rule
   styled. It inherits its look from the card body; this only stops an unbroken string (a long
   URL or model name in a post description) from pushing the card past its column. */
.article-card-body .blog-preview-description {
  overflow-wrap: anywhere;
}

/* U15 (gate findings on pages U13a did not finish; mechanical, no look change at desktop) */

/* /404 (OVF 280/360): the text block is a flex item with align-items:flex-start, so it is sized
   fit-content; its grid list (auto-fit minmax(180px)) has a 564px min-content, which pushed the block and the
   document past the viewport. Cap the block at its container; the 60-unit max-width still applies. */
.highlight-box-text-block-contacted {
  max-width: min(100%, calc(var(--text-size-XLarge) * 60));
}

/* /team (CON 280-393, t130): the card name sits where the photo fades out of the scrim, white text on a
   busy photo (bg_std 77, contrast p10 1.9). Same black scrim, strong enough where the text sits. */
.team-card .card-info {
  background: linear-gradient(to top, rgb(0 0 0 / .88) 0%, rgb(0 0 0 / .80) 70%, rgb(0 0 0 / .45) 100%);
}

/* Case study metric cards (OVF 280, 768, t130): a one-word value ("Validation", "Defensibility") at
   the fixed display size is wider than a 3-up card and was clipped by the card's overflow:hidden. */
.cs-metric-cards-3 .cs-metric-card .cs-metric-value {
  overflow-wrap: anywhere;
  font-size: clamp(1.75rem, 3.4vw, 3rem);
}

/* Case study solution tag (CON 4.0-4.4 vs 4.5): .80 white on the card gradient; .92 clears 4.5. */
.cs-solution-card .cs-solution-tag {
  color: rgba(255, 255, 255, 0.92);
}

/* U27 post archives (post-list.md LIST-4..6): the list is a <ul>; the pager sits on the left axis
   with 44px targets (the board pager's look, shared include). */
ul.blog-posts.post-grid {
  list-style: none;
  margin: 0;
}

ul.blog-posts.post-grid > li {
  min-width: 0;
}

.board-pagination.board-pagination-start {
  justify-content: flex-start;
}

.post-topic-routes .landing-technology-stack-container {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.post-topic-routes .pill-grey {
  text-decoration: none;
  min-height: 2.75rem;
  align-items: center;
}

/* Clamped descriptions keep their hidden lines in the layout; clip the card at its own box so those
   lines never reach the next card (the T2 OVL detector counts text boxes, not drawn ink). */
ul.blog-posts.post-grid .blog-preview-container {
  overflow: hidden;
}

/* Hooks the archive markup carries (V1): CARD-9 no fixed card height; the pager's prev/next never wrap. */
.blog-preview-short {
  height: auto;
}

.post-archive {
  min-width: 0;
}

.board-pagination-prev,
.board-pagination-next {
  white-space: nowrap;
}

/* Home page: the inline styles of the Wave 1 index.md as classes (V3 ratchet, U14a). Same values; the
   higher selector specificity replaces the cascade win an inline style had. */
.link-text .link-qualifier {
  opacity: 0.6;
}

.tech-grid .tech-img {
  object-position: 80% center;
}

.tech-grid .tech-card > .usp-cta {
  top: 12px;
  right: 12px;
  bottom: auto;
  left: auto;
  position: absolute;
}
