/* Framework page */

/* Hero */
/* Clipped sideways only: ring.js pulls the stage section up under the ring's faded lower edge, and a vertical
   clip would cut that fade (and the selected stage's glow) off in a hard line. */
.fw-hero { padding-top: clamp(24px, 2.8vw, 40px); text-align: center; overflow-x: clip; }
/* Title and lead each sit on one line when the width allows; when they wrap, the lines are balanced */
.fw-hero__title { font-size: clamp(2.3rem, 1.4rem + 3vw, 4rem); font-weight: 300; line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; }
.fw-hero__lead { margin: 18px auto 0; font-size: clamp(1.05rem, 1rem + 0.35vw, 1.3rem); color: var(--text-2); line-height: 1.55; text-wrap: balance; }

/* Lifecycle ring: shared styles in ring.css; framework layout here */
.fw-hero .ring { width: min(100vw, 1200px); margin: 0 0 0 50%; transform: translateX(-50%); height: clamp(400px, 33vw, 460px); }
@media (max-width: 620px) { .fw-hero .ring { height: 380px; } }

/* Stage detail. Above the ring's faded tail, so that overlap never takes the stage's clicks. */
.fw-hero + .stage { position: relative; z-index: 1; }
.stage { padding-block: clamp(56px, 7vw, 100px) clamp(64px, 7vw, 110px); }
.stage__inner { position: relative; }
.stage__panels { min-height: 470px; }
.stage-panel { display: grid; grid-template-columns: minmax(0, 655px) minmax(0, 1fr); gap: 40px; align-items: start; }
.stage-panel[hidden] { display: none; }
.stage-panel:focus { outline: none; }
.stage-panel:focus-visible { outline: 2px solid var(--orange); outline-offset: 8px; }
.stage-panel__title { font-size: clamp(1.7rem, 1.2rem + 1.5vw, 2.6rem); font-weight: 300; line-height: 1.2; }
.stage-panel__sub { margin-top: 10px; font-size: 1.05rem; color: var(--text-2); }
.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 46px; list-style: none; padding: 0; margin: 30px 0 0; }
.flow__step { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 88px; padding: 14px 20px; background: #fafafa; border: 1px solid #d8d8d8; transition: border-color 250ms, box-shadow 250ms; }
.flow__title { font-size: 1.12rem; line-height: 1.3; }
.flow__text { font-size: 0.84rem; color: var(--text-2); margin-top: 4px; line-height: 1.35; }
.flow__step--human { background: #24241f; border-color: #24241f; color: #fff; }
.flow__step--human .flow__text { color: #b9b9b2; }
.flow__gate { position: absolute; z-index: 1; left: calc(100% + 12px); top: 50%; width: 21px; height: 21px; margin-top: -10.5px; display: grid; place-items: center; background: var(--bg); border: 1px solid #cfcfcf; transition: border-color 250ms, background-color 250ms; }
.flow__gate::before { content: ""; position: absolute; right: 100%; top: 50%; width: 13px; height: 1px; background: #cfcfcf; }
.flow__gate::after { content: ""; width: 8px; height: 4.5px; margin-top: -3px; border-left: 1.5px solid var(--orange); border-bottom: 1.5px solid var(--orange); transform: rotate(-45deg); }
.flow__step:not(:last-child)::after { content: ""; position: absolute; left: calc(100% + 33px); top: 50%; width: 13px; height: 1px; background: #cfcfcf; }
.flow__step.is-lit { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.flow__step--human.is-lit { box-shadow: 0 0 0 3px rgba(241, 90, 41, 0.45); }
.flow__gate.is-lit { border-color: var(--orange); background: #fff4ee; }
.boundary { display: inline-flex; align-items: center; gap: 12px; margin-top: 46px; color: var(--ink); font-size: 1.05rem; } /* ink text; the orange checkbox carries the colour */
.boundary__box { position: relative; width: 22px; height: 22px; flex: none; background: var(--orange); }
.boundary__box::after { content: ""; position: absolute; left: 6px; top: 6px; width: 10px; height: 5.5px; border-left: 1.7px solid #fff; border-bottom: 1.7px solid #fff; transform: rotate(-45deg); }
.stage-panel__art { margin: -110px -40px -60px 0; }
.stage-panel__art svg, .stage-panel__art img { width: 100%; height: auto; max-width: 560px; margin-left: auto; display: block; }

.stage-nav { display: grid; justify-items: center; gap: 8px; background: none; border: 0; padding: 0; cursor: pointer; color: var(--text-2); font-size: 1.05rem; }
/* Prev/next sit a fixed padding in from the window edges. The section is a three-column grid:
   button zone | content (container width) | button zone. On wide screens the zones are wider than
   the minimum, so the content lines up with the other sections' containers. */
.stage { --stage-nav-edge: var(--edge); --stage-nav-zone: calc(var(--stage-nav-edge) + 84px); }
@media (min-width: 641px) {
  .stage__inner.container { width: 100%; display: grid; grid-template-columns: minmax(var(--stage-nav-zone), 1fr) minmax(0, var(--container)) minmax(var(--stage-nav-zone), 1fr); }
  .stage__panels { grid-column: 2; grid-row: 1; }
  .stage-nav { grid-row: 1; align-self: start; margin-top: 132px; }
  .stage-nav--prev { grid-column: 1; justify-self: start; margin-left: var(--stage-nav-edge); }
  .stage-nav--next { grid-column: 3; justify-self: end; margin-right: var(--stage-nav-edge); }
}
.stage-nav__btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--ink); transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast); }
.stage-nav--next .stage-nav__btn { background: var(--orange); }
.stage-nav__btn svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.stage-nav--prev:hover .stage-nav__btn { transform: translateX(-2px); }
.stage-nav--next:hover .stage-nav__btn { transform: translateX(2px); }
.stage-nav:hover { color: var(--ink); }

@media (max-width: 999px) {
  .stage-panel { grid-template-columns: 1fr; }
  .stage-panel__art { margin: 0 auto; max-width: 480px; }
  .stage__panels { min-height: 0; }
}
@media (max-width: 640px) {
  .stage__inner { padding-inline: 0; padding-top: 72px; }
  .stage-nav { position: absolute; top: 0; grid-auto-flow: column; align-items: center; gap: 10px; }
  .stage-nav--prev { left: 0; }
  .stage-nav--next { right: 0; }
  .stage-nav--next .stage-nav__label { order: -1; }
  .flow { grid-template-columns: 1fr; gap: 34px; }
  .flow__gate { left: 50%; top: calc(100% + 6px); margin: 0 0 0 -10.5px; }
  .flow__gate::before, .flow__step:not(:last-child)::after { display: none; }
  .boundary { margin-top: 32px; }
}

/* Context engineering, certification and feedback loop: one section, three tabs under a
   page-width bar. Tabs follow the header nav: ink text, orange on hover and when selected. */
.pillars { padding-top: 0; padding-bottom: clamp(56px, 6vw, 96px); }   /* the autonomy divider sits this far below */
.pillars__bar { border-bottom: 1px solid var(--line); }   /* no fill and no top rule: only the line the tabs sit on */
.pillars__tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-inline: var(--edge); }
.pillars__tab {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 68px; margin: 0; padding: 14px 18px;
  border: 0; background: none; font: inherit; font-size: 1.05rem; line-height: 1.3; text-align: center; color: var(--ink);
  cursor: pointer; transition: color var(--dur-fast); -webkit-tap-highlight-color: transparent;
}
.pillars__tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--orange); transform: scaleX(0); transition: transform 320ms var(--ease-out); }
/* ink text; the orange underline marks the selected tab (and previews on hover) */
.pillars__tab:hover:not([aria-selected="true"])::after { transform: none; opacity: 0.35; }
.pillars__tab[aria-selected="true"]::after { transform: none; }
.pillars__tab:focus-visible { outline: 2px solid var(--orange); outline-offset: -6px; }
.pillars__panels { padding-top: clamp(48px, 6vw, 88px); }
.pillar[hidden] { display: none; }
.pillar:focus { outline: none; }
.pillar:focus-visible { outline: 2px solid var(--orange); outline-offset: 12px; }
@media (prefers-reduced-motion: reduce) { .pillars__tab::after { transition: none; } }
@media (max-width: 640px) {
  .pillars__tab { min-height: 72px; padding: 12px 8px; font-size: 0.88rem; }
}

/* Context engineering and certification diagrams: real cards on the page, wired by flow-diagrams.js
   (an SVG overlay drawn from the cards' positions, with orange signals that travel the connectors). */
.km__title, .cert__title { font-weight: 300; }
.flowd { position: relative; margin-top: clamp(36px, 4vw, 52px); }
.flowd__wires { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; z-index: 0; }
.flowd__wire { fill: none; stroke: #9a9a95; stroke-width: 1.2; }
.flowd__wire--soft { stroke: #c9c9c3; stroke-width: 1; }
.flowd__head { fill: none; stroke: #9a9a95; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.flowd__pulse { fill: none; stroke: var(--orange); stroke-width: 2.2; stroke-linecap: round; }
.flowd ol, .flowd ul { list-style: none; margin: 0; padding: 0; }

.dg-card {
  position: relative; z-index: 1; display: flex; flex-direction: column; padding: 20px 20px 22px;
  background: var(--bg); border: 1px solid #dedede; border-top: 2px solid var(--orange);
  transition: border-color 300ms var(--ease-out), box-shadow 300ms var(--ease-out), translate 300ms var(--ease-out);
}
.dg-card:hover { border-color: #c8c8c8; border-top-color: var(--orange); box-shadow: 0 14px 32px -12px rgba(17, 17, 17, 0.18), 0 4px 10px -4px rgba(17, 17, 17, 0.08); translate: 0 -3px; }
.dg-card__art { display: grid; place-items: center; height: 140px; margin-bottom: 16px; color: var(--ink); }
.dg-art { width: auto; height: 140px; max-width: 100%; object-fit: contain; stroke-linecap: round; stroke-linejoin: round; }
.dg-art--icon { height: 52px; }
.dg-accent, .dg-accent-stroke { stroke: var(--orange); }
.dg-card__eyebrow { margin-bottom: 6px; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); } /* grey text; the orange top rule carries the colour */
.dg-card__title { font-size: 1.12rem; font-weight: 350; line-height: 1.3; color: var(--ink); }
.dg-card__text { margin-top: 6px; font-size: 0.9rem; line-height: 1.5; color: var(--text-2); }
/* the human step is dark, as in the stage flows above */
.dg-card--human { background: var(--ink); border-color: var(--ink); border-top-color: var(--orange); }
.dg-card--human:hover { border-color: var(--ink); border-top-color: var(--orange); box-shadow: 0 16px 36px -12px rgba(17, 17, 17, 0.45), 0 4px 10px -4px rgba(17, 17, 17, 0.2); }
.dg-card--human .dg-card__art, .dg-card--human .dg-card__title { color: #fff; }
.dg-card--human .dg-card__text { color: #b9b9b2; }
/* lit when a signal arrives (flow-diagrams.js animates its opacity) */
.dg-lit { position: absolute; inset: -1px; border: 1.5px solid var(--orange); box-shadow: 0 0 0 4px rgba(241, 90, 41, 0.12); opacity: 0; pointer-events: none; }
.dg-lit--gate { inset: 0; border: 0; background: var(--orange); box-shadow: 0 0 0 4px rgba(241, 90, 41, 0.18); }
@media (prefers-reduced-motion: reduce) { .dg-card { transition: none; } .dg-card:hover { translate: none; } }

/* Knowledge model */
.kmd__sources { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.kmd__source { padding: 18px 16px 20px; }
.kmd__doc { width: 22px; height: 25px; margin-bottom: 14px; stroke: var(--orange); stroke-width: 1.2; }
.kmd__source .dg-card__title { font-size: 1rem; }
.kmd__source .dg-card__text { font-size: 0.84rem; }
.kmd__tenant { position: relative; margin-top: 72px; padding: 26px clamp(20px, 2.4vw, 32px) 24px; border: 1px dashed #b5b5b0; }
.kmd__tenant-label { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.kmd__stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(40px, 5vw, 72px); margin-top: 22px !important; }
.kmd__return { position: relative; z-index: 1; display: flex; justify-content: center; margin-top: 34px; }
.kmd__return span { padding: 2px 14px; background: var(--bg); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); }
.kmd__note { margin-top: 20px; font-size: 0.88rem; color: var(--text-3); }
@media (max-width: 1099px) { .kmd__sources { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 899px) {
  .kmd__tenant { padding-right: 60px; }
  .kmd__stages { grid-template-columns: minmax(0, 420px); justify-content: center; gap: 44px; }
  .kmd__return { margin-top: 26px; }
  .kmd__return span { background: none; padding: 0; }
  .kmd__return span::before { content: "\21BA\00a0"; color: var(--orange); }
}
@media (max-width: 560px) { .kmd__sources { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .kmd__tenant { padding-left: 16px; padding-right: 48px; } }

/* Certification */
.certd { padding-top: 30px; padding-bottom: 124px; }
.certd__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 72px minmax(0, 1.2fr); gap: clamp(26px, 3vw, 48px); align-items: stretch; }
/* the gate: a black bar between faint rails, shared with the feedback loop */
.dg-gate { position: relative; display: flex; justify-content: center; }
.dg-gate__label { white-space: nowrap; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); }
.dg-gate__bar { position: relative; width: 10px; background: var(--ink); }
.dg-gate__bar::before, .dg-gate__bar::after { content: ""; position: absolute; top: 0; bottom: 0; border-left: 1px solid rgba(23, 23, 23, 0.14); border-right: 1px solid rgba(23, 23, 23, 0.14); }
.dg-gate__bar::before { left: -8px; right: -8px; }
.dg-gate__bar::after { left: -16px; right: -16px; }
.dg-gate__note { font-size: 0.86rem; line-height: 1.45; color: var(--text-2); }
.certd .dg-gate__label { position: absolute; bottom: calc(100% + 10px); left: 50%; translate: -50% 0; }
.certd .dg-gate__note { position: absolute; top: calc(100% + 12px); left: calc(50% + 16px); width: 11.5em; }
.certd__loop { position: absolute; z-index: 1; translate: -50% -50%; padding: 2px 12px; background: var(--bg); white-space: nowrap; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); }
@media (max-width: 999px) {
  .certd { padding-top: 0; padding-bottom: 0; padding-right: 60px; }
  .certd__row { grid-template-columns: minmax(0, 440px); justify-content: center; gap: 40px; }
  .certd .dg-gate { display: grid; justify-content: stretch; gap: 10px; text-align: left; }
  .certd .dg-gate__label { position: static; translate: none; }
  .certd .dg-gate__bar { width: auto; height: 10px; min-height: 0; }
  .certd .dg-gate__bar::before, .certd .dg-gate__bar::after { display: none; }
  .certd .dg-gate__note { position: static; width: auto; max-width: 44%; }
  .certd__loops { display: grid; gap: 6px; margin-top: 28px !important; }
  .certd__loop { position: static; translate: none; padding: 0; background: none; white-space: normal; }
  .certd__loop::before { content: "\21BA\00a0"; color: var(--orange); }
}
@media (max-width: 560px) { .certd { padding-right: 48px; } }

/* Feedback loop and telemetry: the same wired cards as the diagrams above. Wide screens set the loop out as a
   ring of cards (telemetry on top, the gate between the two lower cards); narrow screens stack it, with the
   return path up the right-hand side. */
.learn__lead { margin-top: 22px; }
.loopd__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: ". top ." "left gate right"; gap: 56px clamp(40px, 5vw, 72px); }
.loopd__node--top { grid-area: top; }
.loopd__node--left { grid-area: left; }
.loopd__node--gate { grid-area: gate; }
/* the gate as in certification: label over the bar, note under it */
.loopd .dg-gate { flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.loopd .dg-gate__bar { flex: 1; min-height: 120px; }
.loopd .dg-gate__note { max-width: 16em; }
.loopd__node--right { grid-area: right; }
/* the learning illustrations carry wide margins in their own files, so they are drawn larger than the box */
.loopd .dg-card__art { height: 170px; }
.loopd img.dg-art { height: 230px; max-width: none; }
@media (max-width: 899px) {
  .loopd { padding-right: 60px; }
  .loopd__grid { grid-template-columns: minmax(0, 420px); grid-template-areas: "top" "right" "gate" "left"; justify-content: center; gap: 44px; }
  .loopd .dg-gate { display: grid; justify-content: stretch; gap: 10px; text-align: left; }
  .loopd .dg-gate__label { position: static; translate: none; }
  .loopd .dg-gate__bar { width: auto; height: 10px; min-height: 0; }
  .loopd .dg-gate__bar::before, .loopd .dg-gate__bar::after { display: none; }
  .loopd .dg-gate__note { position: static; width: auto; max-width: 44%; }
}
@media (max-width: 560px) { .loopd { padding-right: 48px; } }

/* Autonomy dial */
/* Ruled above and below with the same spacing on each side of each line */
.autonomy { padding-block: 0; }
.autonomy__grid { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 40px 60px; align-items: start; padding-block: clamp(56px, 6vw, 110px); border-block: 1px solid var(--line); }
.autonomy__lead { margin-top: 30px; }
.dial { padding-top: 0; }
.dial__options { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dial__track { position: absolute; top: 14px; height: 2px; left: 16.66%; right: 16.66%; background: #d8d8d8; }
/* The marker rides above the dots: a newly chosen dot keeps its fill until the marker slides over it. */
.dial__marker { position: absolute; z-index: 2; top: 50%; left: 0; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: var(--orange); will-change: transform; }
.dial__opt { position: relative; display: grid; justify-items: center; text-align: center; gap: 6px; padding: 0 6px; background: none; border: 0; cursor: pointer; color: inherit; }
.dial__dot { width: 30px; height: 30px; border-radius: 50%; background: var(--bg); border: 2px solid #c9c9c9; margin-bottom: 14px; position: relative; z-index: 1; transition: border-color var(--dur-fast); }
.dial__opt:hover .dial__dot { border-color: var(--orange); }
.dial__name { font-size: clamp(1.05rem, 0.95rem + 0.35vw, 1.4rem); font-weight: 350; line-height: 1.25; }
.dial__text { font-size: 0.95rem; color: var(--text-2); line-height: 1.6; }
@media (max-width: 899px) { .autonomy__grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .dial__name { font-size: 0.95rem; }
  .dial__text { font-size: 0.8rem; }
}

/* AI use (same split layout as the homepage) */
.governance { padding-top: clamp(56px, 6vw, 96px); }
.split { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.1fr); gap: 32px 64px; align-items: start; }
.split .h2 { max-width: 11em; }
.split__body { display: grid; gap: 14px; padding-top: 6px; }
.split__body .body { font-size: 1.05rem; line-height: 1.8; }
.split__body .link-arrow { margin-top: 8px; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
