/* 1.8.2: framework and model detail pages (/frameworks/<slug>/), built by scripts/build_fw_detail_pages.py.
   Set W look: Source Sans 3 (tokens), light 300 frame and 800 key words in headings, New Leap Red #D44040 for the solution,
   slate #2F5D7C for the problem. Uses .lc-conn (DR-23 connector), the shell's emphasis classes and tokens; changes none of them. */

/* line breaks from the "breaks" field: .s = always its own line, .u = its own line on phones only (W-3) */
.fwd-hero h1 .s { display: block; }
@media (max-width: 47.99em) { .fwd-hero h1 .u { display: block; } }

/* emphasis on the dark hero: keep the role colours readable (ink key words become white; danger lightens) */
.dark .lc-k { color: #fff; }
.dark .lc-dang { color: #FF8A80; }
.fwd-hero .label { text-transform: none; letter-spacing: 0; font: 600 1.05rem/1.3 var(--font-heading); color: #E7EBEC; }
.fwd-hero .label .tm { font-size: .6em; }
/* type and status: a plain text line, not pills (no pill rows in a hero) */
.fwd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin: 18px 0 0; font: 700 .875rem/1.4 var(--font-heading); letter-spacing: .06em; text-transform: uppercase; color: #E7EBEC; }
.fwd-meta__s::before { content: "\00b7"; margin: 0 .6em; color: #6B7B82; }
.fwd-meta__s.is-live { color: #F07070; }
.fwd-meta__s.is-build { color: #A9C4D8; }
.fwd-src { margin: 14px 0 0; font-size: 1rem; font-style: italic; color: #C9D2D6; }
.fwd-hero .fwd-clause { color: #E7EBEC; border-color: #FF9B93; }

/* honesty clause (R-036a): full size of body text, never hidden */
.fwd-clause { font-size: var(--fs-body, 1.125rem); max-width: 70ch; border-left: 4px solid #D44040; padding: 4px 0 4px 16px; margin: 20px 0 0; }

/* How it works: the DR-23 connector, step number above its circle */
.fwd-steps { padding-inline: 0; max-width: none; margin-top: 8px; }
.fwd-steps .lc-conn__step::after { content: none; }
.fwd-n { position: absolute; inset-inline-start: 0; top: 12px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #D44040; color: #fff; font: 700 .9375rem/1 var(--font-heading); z-index: 1; }
.fwd-n::before { content: attr(data-n); }
.fwd-steps .lc-conn__step::before { top: 46px; }
.fwd-st h3 { font: 800 1.2rem/1.25 var(--font-heading); color: var(--fg-heading); margin: 2px 0 6px; letter-spacing: -.01em; }
.fwd-st p { margin: 0; font-size: var(--fs-body, 1.125rem); line-height: 1.55; color: var(--fg); }
.fwd-steps .lc-conn__group + .lc-conn__snake { margin-block: 0; }
/* 1.8.2: on phones the steps are 1 column; the snake joining the 2 desktop rows only left a gap, so it is hidden */
@media (max-width: 44.99em) { .fwd-steps .lc-conn__snake { display: none; } }
@media (min-width: 45em) {
  .fwd-steps .lc-conn__step { padding-top: 78px; }
  .fwd-n { top: 40px; width: 18px; height: 18px; border: 4px solid #D44040; background: var(--bg-tint, #F4F6F6); box-sizing: border-box; font-size: 0; }
  .fwd-n::before { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); font: 800 1.5rem/1 var(--font-heading); color: var(--c-sol-text,#B83434); }
  .fwd-steps .lc-conn__step::before { top: 47px; inset-inline-start: 22px; }
  /* 5-7 steps: 2 rows joined by the flowing line */
  .fwd-steps--2row { flex-direction: column; align-items: stretch; }
  .fwd-steps--2row .lc-conn__group { width: 100%; }
  .fwd-steps--2row .lc-conn__snake { flex: none; width: 100%; height: 56px; margin: 4px 0; }
  .fwd-steps--2row .lc-conn__snake .lc-conn__h { display: none; }
  .fwd-steps--2row .lc-conn__snake .lc-conn__v { display: inline; }
}

/* the diagram */
.fwd-fig { margin: 0 auto; max-width: 760px; }
.fwd-svg { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: clamp(12px, 3vw, 28px); }
.fwd-svg svg { display: block; width: 100%; height: auto; max-width: 100%; }
.fwd-fig figcaption { margin-top: 12px; font-size: .95rem; line-height: 1.5; color: var(--fg-muted); text-align: center; }

/* Where we use it: link cards */
.fwd-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 48em) { .fwd-cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); } }
.fwd-card { position: relative; display: block; height: 100%; padding: 18px 48px 18px 20px; border: 1px solid var(--line); border-top: 4px solid #D44040; border-radius: 14px; background: #fff; color: inherit; text-decoration: none; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.fwd-card:hover, .fwd-card:focus-visible { transform: translateY(-3px); border-color: #D44040; box-shadow: 0 16px 30px -18px rgba(26,26,26,.4); }
.fwd-card__t { display: block; font: 700 1.1rem/1.3 var(--font-heading); color: var(--fg-heading); }
.fwd-card__note { display: block; margin-top: 4px; font-size: .95rem; line-height: 1.5; color: var(--fg-muted); }
.fwd-card__go { position: absolute; top: 18px; right: 18px; font-weight: 700; color: var(--c-sol-text,#B83434); }

/* Works with: chips */
.fwd-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.fwd-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid #2F5D7C; color: #2F5D7C; background: #fff; font: 600 .95rem/1.3 var(--font-heading); text-decoration: none; overflow-wrap: anywhere; }
.fwd-chip:hover, .fwd-chip:focus-visible { background: #2F5D7C; color: #fff; }

/* the outcome and the R-099 condition */
.fwd-cond { font-size: var(--fs-body, 1.125rem); color: var(--fg-muted); border-left: 4px solid #2F5D7C; padding: 4px 0 4px 16px; }
.fwd-back { margin: 18px 0 0; } .fwd-back a { color: #F07070; font-weight: 600; }

/* 320px: nothing may push the page sideways */
.fwd-hero h1, .fwd-st, .fwd-card, .fwd-chip { overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 22.5em) { .fwd-card { padding-right: 40px; } }
@media (prefers-reduced-motion: reduce) { .fwd-card { transition: none; } }
