/* Section 3: approved whole-system diagram, scoped independently. */
@layer fidelity {
  #model.ars-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(3rem, 4.2vw, 5rem) 0 clamp(4rem, 7vw, 8rem);
    background: radial-gradient(ellipse at 22% 0, #05204b 0, transparent 48%), #020f23;
    color: #fff;
  }
  #model::before {
    z-index: -1;
    inset: auto -5% -4rem;
    height: 14rem;
    border-radius: 50%;
    background: radial-gradient(circle, #00cfff 1px, transparent 1.7px) 0 0 / 12px 12px;
    transform: skewY(9deg);
    opacity: .42;
    mask-image: linear-gradient(transparent, #000 40%, transparent);
  }
  #model::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: auto -5% -6rem;
    height: 15rem;
    border-radius: 50%;
    border-top: 2px solid #7744ff;
    box-shadow: 0 -5px 20px #5240e966, 0 -2px 6px #00d4ff66;
    transform: rotate(-7deg);
    pointer-events: none;
  }
  #model .s3-layout { display: grid; grid-template-columns: minmax(0, .56fr) minmax(0, 1fr); grid-template-areas: "intro board" "bridge board"; grid-template-rows: minmax(min-content, 1fr) auto; gap: clamp(1.5rem, 2vw, 2.5rem); align-items: start; max-width: 1600px; }
  #model .s3-intro { grid-area: intro; min-width: 0; }
  #model .s3-intro .ars-eyebrow { color: #00dafa; font-size: .875rem; letter-spacing: .28em; }
  #model .s3-intro h2 { margin: 1.2rem 0 1.8rem; font-size: clamp(2.4rem, 3.65vw, 4rem); line-height: 1.08; letter-spacing: -.045em; color: white; font-weight: 800; }
  #model .s3-intro h2 > span { display: block; background: linear-gradient(90deg, #00dcf8, #7096ff 48%, #d93dff); color: #55d4ff; background-clip: text; -webkit-text-fill-color: transparent; }
  #model .s3-intro > p:not(.ars-eyebrow) { color: #c5d5ed; font-size: clamp(1rem, 1.35vw, 1.45rem); line-height: 1.5; margin: 0 0 1.25rem; max-width: 38ch; }
  #model .s3-board { grid-area: board; position: relative; min-width: 0; padding: 1.5rem clamp(1rem, 2vw, 2rem) 1.2rem; border: 1px solid #0872b47a; border-radius: 1.8rem; background: linear-gradient(125deg, #01111eec, #020d25ed); box-shadow: inset 0 0 45px #08335d44; }
  #model .s3-method-bridge { grid-area: bridge; align-self: end; min-width: 0; max-width: 34rem; padding-top: clamp(1.25rem, 2vw, 2rem); background: linear-gradient(90deg, #00d9ef, #487bff 55%, transparent) top left / 100% 1px no-repeat; }
  #model .s3-method-kicker { margin: 0 0 .65rem; color: #7eeeff; font-size: .78rem; font-weight: 750; letter-spacing: .19em; line-height: 1.5; text-transform: uppercase; }
  #model .s3-method-bridge h3 { margin: 0 0 .75rem; color: #fff; font-size: clamp(1.7rem, 2.25vw, 2.4rem); line-height: 1.1; letter-spacing: -.035em; }
  #model .s3-method-bridge > p:not(.s3-method-kicker):not(.s3-method-credit) { max-width: 44ch; margin: 0 0 .9rem; color: #c5d5ed; font-size: 1rem; line-height: 1.5; text-wrap: pretty; }
  #model .s3-method-bridge .s3-method-credit { max-width: 44ch; margin: 0 0 .9rem; color: #a8c4e4; font-size: .875rem; line-height: 1.45; }
  #model .s3-method-bridge a { display: inline-flex; align-items: center; min-height: 2.75rem; color: #8cecff; font-weight: 700; line-height: 1.35; text-decoration: underline; text-decoration-color: #8cecff99; text-underline-offset: .34em; transition: color .18s ease, text-decoration-color .18s ease; }
  #model .s3-method-bridge a:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 2px; }
  @media (hover: hover) and (pointer: fine) { #model .s3-method-bridge a:hover { color: #fff; text-decoration-color: #fff; } }
  #model .s3-impact, #model .s3-safety { display: flex; align-items: center; justify-content: center; gap: 1rem; position: relative; color: #aed6ff; }
  #model .s3-impact::before, #model .s3-impact::after { content: ""; flex: 1; height: 2px; min-width: .5rem; background: linear-gradient(90deg, transparent, #00e6ff); }
  #model .s3-impact::after { background: linear-gradient(90deg, #bf3cff, transparent); }
  #model .s3-impact strong, #model .s3-safety strong { display: block; font-size: 1rem; line-height: 1.4; letter-spacing: .18em; text-transform: uppercase; }
  #model .s3-impact small, #model .s3-safety small { display: block; margin-top: .3rem; font-size: .75rem; line-height: 1.5; letter-spacing: .17em; text-transform: uppercase; color: #a6ceff; }
  #model .s3-icon { display: grid; place-items: center; flex: 0 0 auto; width: clamp(2.8rem, 4vw, 4rem); height: clamp(2.8rem, 4vw, 4rem); border: 2px solid var(--s3-accent, #00d9ff); border-radius: 50%; color: var(--s3-accent, #00d9ff); box-shadow: inset 0 0 15px #0c43833b; background: #021027; }
  #model .s3-icon svg { width: 56%; height: 56%; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  #model .s3-impact .s3-icon { border-bottom-color: #b34bff; border-right-color: #b34bff; }
  #model .s3-journey { position: relative; display: flow-root; min-width: 0; }
  #model .s3-journey::before { content: ""; position: absolute; z-index: 0; inset: 0; background: radial-gradient(ellipse 31% 82% at 29% 50%, #00d9ef1a, transparent 100%), linear-gradient(90deg, transparent 0%, transparent 23%, #00d9ef12 31%, #00d9ef20 50%, #487bff22 59%, #487bff22 73%, #b954f524 81%, #b954f524 93%, transparent 100%); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 13%, #000 82%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 13%, #000 82%, transparent); pointer-events: none; }
  #model .s3-phase-headings { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 1.5rem 0 .2rem 31%; text-align: center; }
  #model .s3-phase-headings > div { display: grid; justify-items: center; align-content: end; gap: .25rem; padding: .4rem; }
  #model .s3-phase-headings strong { font-size: 1.125rem; }
  #model .s3-phase-headings small { font-size: .75rem; text-transform: uppercase; line-height: 1.4; letter-spacing: .065em; color: #a4ceff; }
  #model .s3-phase-headings i { width: .8rem; height: .8rem; margin-bottom: .25rem; border: 2px solid #00dbff; border-radius: 50%; }
  #model .s3-phase-headings > :nth-child(2) i { border-color: #7282ff; }
  #model .s3-phase-headings > :nth-child(3) i { border-color: #e75dff; }
  #model .s3-pathways { position: relative; z-index: 1; display: grid; gap: .7rem; padding: .5rem 0 1.7rem; }
  #model .s3-row { appearance: none; position: relative; display: grid; grid-template-columns: minmax(0, 31%) minmax(0, 1fr); align-items: center; width: 100%; min-height: 4.4rem; padding: .35rem 0; color: #fff; background: transparent; border: 0; border-radius: 1rem; text-align: left; cursor: pointer; transition: transform 180ms ease, background 180ms ease, opacity 180ms ease; transform-origin: center; }
  #model .s3-audience { display: flex; gap: .8rem; align-items: center; min-width: 0; position: relative; z-index: 1; }
  #model .s3-audience strong { display: block; color: var(--s3-accent); font-size: clamp(1.05rem, 1.05vw, 1.16rem); line-height: 1.22; font-weight: 750; }
  #model .s3-row:first-child .s3-audience strong { font-size: clamp(1.15rem, 1.15vw, 1.25rem); }
  #model .s3-track { --s3-bridge: clamp(5rem, 10vw, 8rem); position: relative; display: block; min-width: 0; height: 4.4rem; }
  #model .s3-row:nth-child(1) .s3-track { --s3-entry: 38.75%; }
  #model .s3-row:nth-child(2) .s3-track { --s3-entry: 27.5%; }
  #model .s3-row:nth-child(3) .s3-track { --s3-entry: 48.75%; }
  #model .s3-row:nth-child(4) .s3-track { --s3-entry: 50%; }
  #model .s3-row:nth-child(5) .s3-track { --s3-entry: 35%; }
  #model .s3-track::before, #model .s3-track::after { content: ""; position: absolute; left: calc(-1 * var(--s3-bridge)); width: var(--s3-bridge); pointer-events: none; }
  #model .s3-track::before { top: 25%; height: 45%; border-radius: 1rem 0 0 1rem; background: linear-gradient(90deg, transparent, var(--s3-accent)); opacity: .065; }
  #model .s3-track::after { top: var(--s3-entry); height: 2.8px; transform: translateY(-50%); background: linear-gradient(90deg, transparent 0%, transparent 55%, var(--s3-accent) 100%); }
  #model .s3-row .s3-track::before, #model .s3-row .s3-track::after { display: none; }
  #model .s3-students-ribbon, #model .s3-educators-ribbon, #model .s3-leaders-ribbon, #model .s3-operations-ribbon, #model .s3-families-ribbon { position: absolute; z-index: 0; top: 50%; left: 0; width: 100%; height: 4.4rem; transform: translateY(-50%); overflow: visible; pointer-events: none; }
  #model .s3-students-ribbon-fill { fill: none; stroke: url(#s3-students-join); stroke-width: 29; stroke-linecap: round; filter: drop-shadow(0 0 8px #42e8f566); }
  #model .s3-students-ribbon-highlight { fill: none; stroke: url(#s3-students-join-highlight); stroke-width: 2.2; stroke-linecap: round; }
  #model .s3-students-bed { fill: url(#s3-students-bed); }
  #model .s3-students-line, #model .s3-students-line-glow { fill: none; stroke: url(#s3-students-continuous-line); stroke-width: 2.8; vector-effect: non-scaling-stroke; }
  #model .s3-students-line-glow { stroke-width: 7; opacity: .4; filter: blur(5px); }
  #model .s3-unified-line, #model .s3-unified-line-glow { fill: none; stroke-width: 2.8; vector-effect: non-scaling-stroke; }
  #model .s3-unified-line-glow { stroke-width: 7; opacity: .4; filter: blur(5px); }
  #model .s3-educators-ribbon-fill { fill: none; stroke: url(#s3-educators-join); stroke-width: 29; stroke-linecap: round; filter: drop-shadow(0 0 8px #79a9ff66); }
  #model .s3-educators-ribbon-highlight { fill: none; stroke: url(#s3-educators-join-highlight); stroke-width: 2.2; stroke-linecap: round; }
  #model .s3-leaders-ribbon-fill { fill: none; stroke: url(#s3-leaders-join); stroke-width: 29; stroke-linecap: round; filter: drop-shadow(0 0 8px #b4a3ff66); }
  #model .s3-leaders-ribbon-highlight { fill: none; stroke: url(#s3-leaders-join-highlight); stroke-width: 2.2; stroke-linecap: round; }
  #model .s3-operations-ribbon-fill { fill: none; stroke: url(#s3-operations-join); stroke-width: 29; stroke-linecap: round; filter: drop-shadow(0 0 8px #e78af766); }
  #model .s3-operations-ribbon-highlight { fill: none; stroke: url(#s3-operations-join-highlight); stroke-width: 2.2; stroke-linecap: round; }
  #model .s3-families-ribbon-fill { fill: none; stroke: url(#s3-families-join); stroke-width: 29; stroke-linecap: round; filter: drop-shadow(0 0 8px #f79bcd66); }
  #model .s3-families-ribbon-highlight { fill: none; stroke: url(#s3-families-join-highlight); stroke-width: 2.2; stroke-linecap: round; }
  #model .s3-row .s3-track { z-index: 1; }
  #model .s3-row .s3-track .s3-flow-filled, #model .s3-row .s3-track .s3-flow-fill-highlight { display: none; }
  #model .s3-track svg { width: 100%; height: 100%; overflow: visible; }
  #model .s3-track-bed { fill: var(--s3-accent); fill-opacity: .065; stroke: none; }
  #model .s3-row .s3-track-bed,
  #model .s3-row .s3-flow,
  #model .s3-row .s3-flow-glow { display: none; }
  #model .s3-flow-filled { fill: none; stroke: url(#s3-filled-students); stroke-width: 29; stroke-linecap: round; opacity: .9; filter: drop-shadow(0 0 8px #42e8f566); }
  #model .s3-flow-fill-highlight { fill: none; stroke: #e1fcff; stroke-width: 2.2; stroke-linecap: round; opacity: .38; }
  #model .s3-row:nth-child(2) .s3-flow-filled { stroke: url(#s3-filled-educators); filter: drop-shadow(0 0 8px #79a9ff66); }
  #model .s3-row:nth-child(3) .s3-flow-filled { stroke: url(#s3-filled-leaders); filter: drop-shadow(0 0 8px #b4a3ff66); }
  #model .s3-row:nth-child(4) .s3-flow-filled { stroke: url(#s3-filled-operations); filter: drop-shadow(0 0 8px #e78af766); }
  #model .s3-row:nth-child(5) .s3-flow-filled { stroke: url(#s3-filled-families); filter: drop-shadow(0 0 8px #f79bcd66); }
  #model .s3-flow, #model .s3-flow-glow { fill: none; stroke-width: 2.8; vector-effect: non-scaling-stroke; }
  #model .s3-flow-glow { stroke-width: 7; opacity: .4; filter: blur(5px); }
  #model .s3-node { fill: #080e2d; stroke: #8464ff; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
  #model .s3-node--lit, #model .s3-node--bright { fill: var(--s3-accent); stroke: #e6fbff; filter: drop-shadow(0 0 6px var(--s3-accent)); }
  #model .s3-node--bright { stroke-width: 2; filter: drop-shadow(0 0 9px var(--s3-accent)); }
  #model .s3-row:hover, #model .s3-row:focus-visible, #model .s3-row[aria-pressed="true"] { z-index: 2; transform: scale(1.025); background: #153b684d; }
  #model .s3-row:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
  #model .s3-pathways[data-emphasis] .s3-row:not(.is-emphasized) { opacity: .72; }
  #model .s3-mobile-phases { display: none; }
  #model .s3-safety { margin-top: 1.2rem; padding: 1rem .5rem .25rem; background: radial-gradient(ellipse at center, #0d436977, transparent 72%); border-top: 1px solid #287bb0; }
  @media (max-width: 75rem) {
    #model .s3-layout { grid-template-columns: minmax(0, .5fr) minmax(0, 1fr); }
    #model .s3-audience { gap: .4rem; }
    #model .s3-audience .s3-icon { width: 2.6rem; height: 2.6rem; }
  }
  @media (max-width: 64rem) {
    #model .s3-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "board" "bridge"; grid-template-rows: auto; gap: 2rem; }
    #model .s3-intro h2 { font-size: clamp(2.3rem, 5vw, 3.5rem); }
    #model .s3-intro > p:not(.ars-eyebrow) { max-width: 58ch; }
    #model .s3-method-bridge { align-self: start; max-width: 58ch; }
  }
  @media (min-width: 40.01rem) and (max-width: 48rem) {
    #model .s3-students-ribbon, #model .s3-educators-ribbon, #model .s3-leaders-ribbon, #model .s3-operations-ribbon, #model .s3-families-ribbon { -webkit-mask-image: linear-gradient(90deg, transparent 23%, #000 29%); mask-image: linear-gradient(90deg, transparent 23%, #000 29%); }
  }
  @media (max-width: 40rem) {
    #model .s3-board { padding: 1.2rem .9rem; border-radius: 1.2rem; }
    #model .s3-journey::before { display: none; }
    #model .s3-impact, #model .s3-safety { gap: .7rem; }
    #model .s3-impact::before, #model .s3-impact::after { display: none; }
    #model .s3-impact strong, #model .s3-safety strong { font-size: .875rem; letter-spacing: .08em; }
    #model .s3-impact small, #model .s3-safety small { letter-spacing: .055em; }
    #model .s3-phase-headings { display: none; }
    #model .s3-pathways { gap: 1rem; padding-top: 1.5rem; }
    #model .s3-row { grid-template-columns: minmax(0, 1fr); padding: .5rem; border: 1px solid #25507788; }
    #model .s3-audience { gap: .8rem; }
    #model .s3-audience strong { font-size: 1.05rem; }
    #model .s3-row:first-child .s3-audience strong { font-size: 1.18rem; }
    #model .s3-track { height: 3.5rem; margin-top: .3rem; border-radius: .6rem; background: linear-gradient(90deg, #00d9ef18 0%, #00d9ef18 30%, #487bff19 36%, #487bff19 63%, #b954f51b 70%, #b954f51b 100%); }
    #model .s3-track::before, #model .s3-track::after { display: none; }
    #model .s3-students-ribbon, #model .s3-educators-ribbon, #model .s3-leaders-ribbon, #model .s3-operations-ribbon, #model .s3-families-ribbon { display: none; }
    #model .s3-row .s3-track .s3-flow-filled, #model .s3-row .s3-track .s3-flow-fill-highlight { display: initial; }
    #model .s3-mobile-phases { display: flex; justify-content: space-between; color: #bedbff; font-size: .875rem; padding: 0 .25rem; }
    #model .s3-row:hover, #model .s3-row:focus-visible, #model .s3-row[aria-pressed="true"] { transform: scale(1.012); }
  }
  @media (prefers-reduced-motion: reduce) {
    #model .s3-row { transition: none; }
    #model .s3-row:hover, #model .s3-row:focus-visible, #model .s3-row[aria-pressed="true"] { transform: none; }
    #model .s3-method-bridge a { transition: none; }
  }
  @media (forced-colors: active) {
    #model .s3-intro h2 > span { background: none; color: CanvasText; -webkit-text-fill-color: CanvasText; }
    #model .s3-flow, #model .s3-node { stroke: CanvasText; }
    #model .s3-row[aria-pressed="true"] { outline: 2px solid Highlight; }
  }
}

/* The three phase explanations remain live text at every viewport. */
#model .s3-phase-headings {
  min-height: 9.5rem;
  align-items: stretch;
  margin-bottom: .2rem;
}
#model .s3-phase-headings p {
  max-width: 22ch;
  margin: .2rem 0 0;
  color: #c7ddfb;
  font-size: clamp(.875rem, .9vw, 1rem);
  font-weight: 400;
  line-height: 1.35;
  text-wrap: pretty;
}
#model .s3-pathways { scroll-margin-top: 7rem; }
#model .s3-row:focus-visible,
#model .s3-row[aria-pressed="true"] { transform: none; }
@media (hover: none), (pointer: coarse) {
  #model .s3-row:hover { transform: none; background: transparent; }
  #model .s3-row[aria-pressed="true"] { background: #153b684d; }
}
@media (max-width: 40rem) {
  #model .s3-board { display: flex; flex-direction: column; }
  #model .s3-impact { order: 0; }
  #model .s3-journey { display: flex; flex-direction: column; }
  #model .s3-journey::before {
    display: block;
    inset: 0;
    border-radius: .85rem;
    background: linear-gradient(90deg,
      #00d9ef1b 0%, #00d9ef1b 31%,
      #487bff24 35%, #487bff24 64%,
      #b954f527 68%, #b954f527 100%);
    -webkit-mask-image: none;
    mask-image: none;
  }
  #model .s3-pathways { order: 1; gap: .3rem; padding: .3rem 0 .8rem; }
  #model .s3-phase-headings {
    order: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    min-height: 0;
    margin: .75rem .5rem .35rem;
    text-align: center;
  }
  #model .s3-phase-headings > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    align-items: start;
    align-content: start;
    gap: .45rem;
    min-width: 0;
    padding: .45rem clamp(.2rem, 1.5vw, .6rem);
  }
  #model .s3-phase-headings > :nth-child(n) { background: none; }
  #model .s3-phase-headings i { display: none; }
  #model .s3-phase-headings strong { font-size: clamp(.82rem, 3vw, 1rem); letter-spacing: -.025em; }
  #model .s3-phase-headings > :nth-child(1) strong { color: #aff7ff; }
  #model .s3-phase-headings > :nth-child(2) strong { color: #c7d5ff; }
  #model .s3-phase-headings > :nth-child(3) strong { color: #eacaff; }
  #model .s3-phase-headings p { max-width: 100%; margin: 0; font-size: .875rem; line-height: 1.34; text-align: left; hyphens: auto; overflow-wrap: break-word; }
  #model .s3-row { border: 0; border-bottom: 1px solid #39729c5c; border-radius: 0; }
  #model .s3-track { box-sizing: border-box; width: calc(100% + .5rem); margin-inline-start: -.5rem; padding-inline-end: .75rem; background: transparent; }
  #model .s3-row:first-child .s3-track-bed { display: initial; fill: url(#s3-bed-students-mobile); fill-opacity: 1; }
  #model .s3-row .s3-track-bed, #model .s3-row .s3-flow, #model .s3-row .s3-flow-glow { display: initial; }
  #model .s3-mobile-phases { display: none; }
  #model .s3-safety { order: 3; }
}
@media (forced-colors: active) {
  #model .s3-phase-headings > div { border: 1px solid CanvasText; }
  #model .s3-phase-headings p { color: CanvasText; }
}
