/* =========================================================================
   Cabinhub News — the landing page's journey layer (/about)

   Additive to css/landing.css. It owns two things and restyles nothing that
   already exists:

     1. a thin, sticky "on this page" rail, the document's spine;
     2. the "Put it in your product" station that closes the buyer's path from
        evidence to integration.

   Why a rail: /about is a long document (hero, bilingual record, live API
   call, quotes, pricing). A first-time customer could not see its shape or
   jump to the part they came for. The rail is drawn with the page's own
   hairline and ink, not a second navigation system.

   Colour, type and rhythm come from css/tokens.css only. Motion is two
   shortcuts (the active marker and smooth scrolling) and both are opt-in
   only when the reader has NOT asked for reduced motion; nothing animates on
   load. No shadow, no gradient, no icon.
   ========================================================================= */

/* The newsroom's base.css reserves a four-row sticky stack for the shell. This
   document has one 44px rail, so the anchor offsets are re-stated here rather
   than inherited from a stack that is not on the page. */
html { scroll-padding-top: 0; }
.lp :target { scroll-margin-top: calc(var(--tap) + 0.75rem); }
@media (prefers-reduced-motion: no-preference) {
  /* Only when scripting is on: the rail is an enhancement, and a no-JS reader
     keeps the browser's instant jump. */
  html.c14-js { scroll-behavior: smooth; }
}

/* ------------------------------------------------------ the journey rail */
.c14-jump {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  /* Reserved before js/c14_landing.js fills it, so the rail cannot push the
     hero down after first paint. --tap is the product's own 44px target. */
  min-height: var(--tap);
  /* body is a flex column, and a flex item's automatic minimum is its content
     width. Without this the five nowrap links widen the whole document at 320
     (measured 346px) instead of scrolling inside .c14-jump__inner. */
  min-width: 0;
  max-width: 100%;
}
.c14-jump__inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--pad-r) 0 var(--pad-l);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: var(--tap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.c14-jump__label {
  flex: none;
  margin: 0 0.55rem 0 0;
  color: var(--ink-faint);
  font-size: var(--fs-micro);
  white-space: nowrap;
}
.c14-jump__list {
  display: flex;
  align-items: stretch;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.c14-jump__link,
.c14-jump__newsroom {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 0.7rem;
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: var(--fs-label);
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
  transition: color var(--dur-1) var(--ease);
}
.c14-jump__link:hover,
.c14-jump__newsroom:hover { color: var(--ink); }
.c14-jump__link::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transform: scaleX(0.55);
  transition: opacity var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
.c14-jump__link[aria-current="location"] { color: var(--ink); font-weight: 560; }
.c14-jump__link[aria-current="location"]::after { opacity: 1; transform: none; }
/* The reader's exit to the newsroom stays at the far end on a wide screen and
   simply follows the links when the rail scrolls on a phone. */
.c14-jump__newsroom {
  margin-left: auto;
  padding-left: 0.9rem;
  border-left: 1px solid var(--rule);
  color: var(--accent);
}
.c14-jump__newsroom:hover { color: var(--accent-hover); }

/* ------------------------------------------------- "put it in your product" */
.c14-int {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(2.4rem, 5vw, 4.4rem) var(--pad-r) clamp(2.4rem, 5vw, 4rem) var(--pad-l);
}
.c14-int__head { max-width: 62ch; margin-bottom: clamp(1.3rem, 3vw, 2rem); }
.c14-int__title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.1rem);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.c14-int__deck { margin: 0; color: var(--ink-soft); font-size: var(--fs-deck); line-height: 1.6; }
.c14-int__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: start;
}
@media (max-width: 820px) {
  .c14-int__grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---- the code panel: a working client, not a screenshot ---- */
.c14-code {
  margin: 0;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--paper-2);
  min-width: 0;
}
.c14-code__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}
.c14-code__tabs { display: inline-flex; }
.c14-code__tab {
  min-height: var(--tap);
  padding: 0 0.9rem;
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: var(--fs-label);
  cursor: pointer;
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.c14-code__tab:first-child { border-radius: var(--r-xs) 0 0 var(--r-xs); }
.c14-code__tab:last-child { border-radius: 0 var(--r-xs) var(--r-xs) 0; border-left: 0; }
.c14-code__tab[aria-selected="true"] {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}
.c14-code__copy {
  margin-left: auto;
  min-height: var(--tap);
  padding: 0 0.8rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: var(--fs-label);
  cursor: pointer;
  transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.c14-code__copy:hover { color: var(--ink); border-color: var(--ink-faint); }
.c14-code__panel { margin: 0; }
.c14-code__body {
  /* A fixed window, like the record and call panels above: a longer snippet
     scrolls, and the station below it does not move. The floor is the taller
     panel (TypeScript, one line more than Python) measured at 768 and 1440, so
     switching tabs cannot push the links below it down. */
  margin: 0;
  padding: 0.95rem 1rem;
  min-height: 15.5rem;
  max-height: 22rem;
  overflow: auto;
  background: var(--canvas);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  line-height: 1.6;
  tab-size: 2;
}
.c14-code__caption {
  margin: 0;
  padding: 0.55rem 0.75rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-faint);
  font-size: var(--fs-micro);
  line-height: 1.5;
}

/* ---- the verified facts, as a ledger in the page's own voice ---- */
.c14-int__facts {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule-strong);
}
.c14-int__fact { padding: 0.85rem 0; border-bottom: 1px solid var(--rule); }
.c14-int__fact-k {
  display: block;
  margin-bottom: 0.2rem;
  font-family: var(--font-display);
  font-size: var(--fs-sub);
  line-height: 1.25;
}
.c14-int__fact-t { margin: 0; color: var(--ink-soft); font-size: var(--fs-small); line-height: 1.55; }

.c14-int__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.4rem;
  margin: 1.4rem 0 0;
}
.c14-int__links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--accent);
  font-size: var(--fs-small);
  text-decoration: underline;
  text-underline-offset: 0.16em;
  touch-action: manipulation;
}
.c14-int__links a:hover { color: var(--accent-hover); }

@media (max-width: 640px) {
  /* The rail's own label costs the first chip off the screen; the links are
     the navigation and the label is only a gloss. The newsroom exit is already
     the wordmark and the footer, so it leaves the phone rail to the five
     destinations instead of hanging half-clipped at the edge. */
  .c14-jump__label,
  .c14-jump__newsroom { display: none; }
  /* A 55-character import and a 54-character loop do not fit a 390 code
     window. Wrapping the snippet is the phone alternative to a hidden
     horizontal scroller: every line stays readable without a gesture. The
     taller wrapped panel sets this floor (measured at 390 in both editions);
     at 320 both hit the 22rem cap, so they already share a height. */
  .c14-code__body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    min-height: 21.5rem;
  }
}

@media (max-width: 360px) {
  /* Measured at 320: the wordmark + the 140px theme/locale pair + gutters and
     gap are 346px, so the masthead widened the document before this layer
     existed. Let the side group take its own line rather than force the page
     wider than the phone; above 360 the one-row layout is unchanged. */
  .mast__inner { flex-wrap: wrap; }
  /* Five labels plus the 0.7rem padding measure 344px at 320; the tighter
     padding lets all five destinations sit on the phone rail. */
  .c14-jump__link { padding: 0 0.45rem; }
}

@media (prefers-reduced-motion: reduce) {
  .c14-jump__link::after { transition: none; }
}
