/* Systems are explanatory patterns; evidence status belongs to each connection. */
.systems-entry,.system-connections { margin: 42px 0; }
#main .systems-entry-description { margin-top: 13px; max-width: 68ch; color: var(--muted); font-size: 16px; line-height: 1.75; }
.systems-entry > .section-heading { align-items: flex-start; }
.systems-entry > .section-heading > .text-link { flex-shrink: 0; margin-top: 20px; }
.system-profile-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.system-profile-card { padding: 26px; background: var(--card); border: 1px solid var(--line); border-radius: 5px; display: flex; flex-direction: column; transition: border-color .15s,background .15s; min-width: 0; }
.system-profile-card:hover { border-color: var(--green); background: var(--sage); }
.system-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 23px; color: var(--green); }
.system-card-top > .icon { width: 24px; height: 24px; }
.system-number { color: var(--green); font: 500 12px/1.6 var(--mono); letter-spacing: .06em; }
#main .system-profile-card h3 { font-size: 25px; line-height: 1.3; margin: 0 0 16px; }
#main .system-profile-card p { font-size: 16px; line-height: 1.75; color: var(--muted); margin: 0 0 22px; }
.system-card-bottom { margin-top: auto; display: grid; gap: 13px; font-size: 13px; color: var(--muted); }
.system-card-bottom .text-link { color: var(--ink); font-size: 14px; justify-content: space-between; }
.system-profile-card-compact { padding: 23px; }
.system-heading h1 { max-width: 1000px; }
#main .system-heading > p { max-width: 68ch; font-size: 18px; line-height: 1.75; margin-top: 23px; }
.system-heading > .eyebrow { margin-bottom: 16px; }
.system-profile-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 28px; color: var(--muted); font-size: 14px; margin-top: 22px; }
.system-profile-meta a { display: inline-flex; gap: 12px; align-items: center; min-height: 44px; color: var(--green); }
.system-learning-path { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 30px; padding: 26px 0 30px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#main .system-learning-path h2 { margin: 12px 0; font-size: 21px; line-height: 1.35; }
#main .system-learning-path p { color: var(--muted); font-size: 16px; line-height: 1.75; }
.system-reading-note { display: grid; grid-template-columns: 26px minmax(0,1fr); gap: 20px; padding: 27px; background: var(--sage); border-left: 3px solid var(--green); margin: 38px 0; }
.system-reading-note > div:first-child { color: var(--green); padding-top: 3px; }
#main .system-reading-note h2 { font-size: 24px; line-height: 1.4; margin: 0 0 16px; }
#main .system-reading-note p { font-size: 16px; line-height: 1.8; max-width: 76ch; color: var(--muted); }
.system-reading-note strong { color: var(--ink); }
.system-framework-link { margin: 42px 0; padding-top: 27px; border-top: 1px solid var(--line); }
#main .system-framework-link h2 { font-size: 26px; line-height: 1.4; margin: 11px 0 15px; }
#main .system-framework-link p { max-width: 70ch; font-size: 16px; line-height: 1.8; color: var(--muted); }
.system-stage-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 23px; }
.system-stage-links a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); background: var(--card); border-radius: 4px; font-size: 14px; }
.system-stage-links a:hover { border-color: var(--green); color: var(--green); }
.system-primer-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; margin: 12px 0 38px; }
.system-primer-grid > section { border-top: 1px solid var(--line); padding: 24px 0; }
#main .system-primer-grid h2 { font-size: 25px; line-height: 1.4; margin: 12px 0 16px; }
#main .system-primer-grid h3 { font-size: 18px; line-height: 1.5; margin: 24px 0 12px; }
#main .system-primer-grid p,.system-summary-list { font-size: 16px; line-height: 1.8; color: var(--muted); }
.system-summary-list { padding-left: 23px; margin: 12px 0 0; }
.system-summary-list li + li { margin-top: 11px; }
#main .system-primer-note { margin-top: 20px; font-size: 14px; }
.system-explorer { border: 1px solid var(--line); background: var(--card); border-radius: 6px; padding: 28px; scroll-margin-top: 115px; }
.system-explorer-controls { display: flex; justify-content: space-between; align-items: flex-start; gap: 22px; }
#main .system-explorer-controls h2 { font-size: 27px; line-height: 1.4; margin: 10px 0 0; }
.system-view-options { display: flex; flex-wrap: wrap; gap: 8px; max-width: 65%; }
.system-view-options a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 11px 16px; font-size: 14px; line-height: 1.5; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }
.system-view-options a[aria-current] { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.system-view-options a:hover { border-color: var(--green); }
.system-scope-note { padding: 21px 23px; margin: 24px 0; background: var(--paper); border-left: 3px solid var(--green); }
#main .system-scope-note h3 { font-size: 21px; line-height: 1.45; margin: 10px 0 13px; }
#main .system-scope-note p { font-size: 16px; color: var(--muted); line-height: 1.8; max-width: 80ch; }
.system-scope-note dl { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr); gap: 20px; margin: 18px 0; font-size: 14px; }
.system-scope-note dt { color: var(--ink); font-weight: 600; margin-bottom: 5px; }
.system-scope-note dd { margin: 0; color: var(--muted); line-height: 1.8; }
.system-scope-note .text-link { font-size: 14px; min-height: 44px; }
.system-map { margin: 0 0 27px; }
.system-map figcaption { font-size: 17px; font-weight: 600; }
#main .system-map > p { color: var(--muted); font-size: 14px; line-height: 1.75; margin: 8px 0 0; }
.system-map-svg { display: block; width: 100%; overflow: visible; margin: 18px 0 6px; }
.system-map-node rect { fill: var(--paper); stroke: var(--line); stroke-width: 1.5; }
.system-map-node text { fill: var(--ink); font: 500 16px var(--sans); text-anchor: middle; }
.system-map-svg marker path { fill: var(--muted); }
.system-edge-hit { fill: none; stroke: transparent; stroke-width: 30; }
.system-edge-line { fill: none; stroke: var(--muted); stroke-width: 2; }
.system-edge-number-background { fill: var(--card); stroke: var(--line); stroke-width: 1.5; }
.system-edge-number { fill: var(--ink); text-anchor: middle; font: 500 14px var(--mono); }
.system-map-edge.status-hypothesis .system-edge-line,.system-map-edge.status-not-established .system-edge-line { stroke-dasharray: 5 6; }
.system-map-edge.status-alleged .system-edge-number-background { stroke: var(--accent); }
.system-map-edge.status-reported .system-edge-number-background { stroke: var(--muted); }
.system-map-edge.is-selected .system-edge-line,.system-map-edge:hover .system-edge-line,.system-map-edge:focus .system-edge-line { stroke: var(--green); stroke-width: 3; }
.system-map-edge.is-selected .system-edge-number-background,.system-map-edge:hover .system-edge-number-background,.system-map-edge:focus .system-edge-number-background { fill: var(--green-soft); stroke: var(--green); stroke-width: 2; }
.system-map-edge:focus-visible { outline: none; }
.system-map-edge:focus-visible .system-edge-number-background { stroke: var(--accent); stroke-width: 4; }
.system-map-legend { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 14px 0 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.system-map-legend > span { display: inline-flex; align-items: center; gap: 9px; }
.system-legend-line { width: 24px; border-top: 2px solid var(--muted); }
.system-legend-line.is-dashed { border-top-style: dashed; }
.system-mobile-map { display: none; }
.system-inspection-grid { display: grid; grid-template-columns: minmax(245px,.85fr) minmax(0,1.5fr); gap: 25px; align-items: start; border-top: 1px solid var(--line); padding-top: 27px; }
#main .system-relationship-nav h3 { font-size: 18px; margin: 0 0 16px; }
.system-relationship-nav ol { list-style: none; padding: 0; margin: 0; }
.system-relationship-nav li { margin: 0; }
.system-relationship-nav li + li { margin-top: 8px; }
.system-relationship-nav a { display: grid; grid-template-columns: 25px minmax(0,1fr) 17px; align-items: start; gap: 10px; border: 1px solid transparent; border-radius: 4px; padding: 14px 12px; min-height: 64px; background: var(--paper); }
.system-relationship-nav a:hover { border-color: var(--line); }
.system-relationship-nav a[aria-current] { background: var(--green-soft); border-color: var(--green); }
.system-relationship-number { font: 500 12px/1.8 var(--mono); color: var(--green); }
.system-relationship-nav strong { font-size: 15px; font-weight: 500; line-height: 1.55; display: block; }
.system-relationship-nav .icon { margin-top: 3px; }
.system-relationship-route { display: block; margin-top: 7px; font-size: 13px; line-height: 1.65; color: var(--muted); }
.system-relationship-status { display: block; font-size: 12px; line-height: 1.6; margin-top: 9px; color: var(--green); }
.system-relationship-status.status-hypothesis,.system-relationship-status.status-not-established { color: var(--muted); }
.system-relationship-status.status-alleged { color: var(--accent); }
.system-selected-evidence { background: var(--paper); border: 1px solid var(--line); padding: 25px; border-radius: 4px; min-width: 0; scroll-margin-top: 115px; }
.system-evidence-top { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; justify-content: space-between; }
.system-status { display: inline-block; font-size: 12px; line-height: 1.6; padding: 5px 9px; border: 1px solid var(--line); border-radius: 3px; background: var(--card); color: var(--muted); }
.system-status-research-supported,.system-status-documented { border-color: var(--green); color: var(--green); }
.system-status-alleged { border-color: var(--accent); color: var(--accent); }
.system-status-hypothesis,.system-status-not-established { border-style: dashed; }
#main .system-selected-evidence h3 { font-size: 26px; line-height: 1.35; margin: 20px 0 12px; }
#main .system-relationship-direction { font-size: 14px; line-height: 1.8; color: var(--muted); margin: 0 0 13px; }
.system-flow-label { display: inline-block; margin: 0 0 18px; color: var(--green); font: 500 12px/1.7 var(--mono); text-transform: uppercase; letter-spacing: .06em; }
#main .system-relationship-statement { font-size: 16px; line-height: 1.85; margin-bottom: 23px; }
.system-evidence-limit { border-left: 2px solid var(--accent); padding: 0 0 0 17px; margin: 21px 0; }
.system-evidence-limit > strong { font-size: 14px; font-weight: 600; }
#main .system-evidence-limit p { color: var(--muted); font-size: 15px; line-height: 1.8; margin: 9px 0 0; }
.system-supporting-sources,.system-finding-evidence { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 21px; }
#main .system-supporting-sources h4 { font-size: 16px; line-height: 1.6; margin-bottom: 14px; }
.system-source-list { list-style: none; padding: 0; margin: 0; }
.system-source-list li { margin: 0; padding: 12px 0; }
.system-source-list li + li { border-top: 1px solid var(--line); }
.system-source-list a { font-size: 15px; line-height: 1.75; text-decoration: underline; text-underline-offset: 4px; }
.system-source-list span { display: block; color: var(--muted); font-size: 13px; line-height: 1.7; margin-top: 7px; }
.system-finding-evidence a,.system-evidence-passage p a { text-decoration: underline; text-underline-offset: 4px; }
#main .system-finding-evidence p,#main .system-evidence-passage p { font-size: 15px; line-height: 1.8; margin: 12px 0; }
#main .system-evidence-location { font-size: 14px; color: var(--muted); }
.system-finding-evidence details { border: 1px solid var(--line); border-radius: 3px; margin: 19px 0; }
.system-finding-evidence summary { padding: 12px 15px; cursor: pointer; min-height: 44px; font-size: 14px; }
.system-evidence-passage { padding: 18px 0; border-top: 1px solid var(--line); margin-top: 18px; }
.system-finding-evidence details .system-evidence-passage { margin: 0; padding: 16px; }
.system-evidence-passage .text-link { font-size: 14px; min-height: 44px; }
#main .system-no-evidence { color: var(--muted); font-size: 14px; line-height: 1.8; }
.system-example-effects { border-top: 1px solid var(--line); padding-top: 27px; margin-top: 30px; }
#main .system-example-effects > h3 { font-size: 22px; line-height: 1.5; }
#main .system-effects-note { font-size: 14px; line-height: 1.8; color: var(--muted); margin: 12px 0 20px; }
.system-example-effects > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.system-example-effects article { border: 1px solid var(--line); border-radius: 4px; background: var(--paper); padding: 20px; }
#main .system-example-effects h4 { font-size: 18px; line-height: 1.6; margin-bottom: 12px; }
#main .system-example-effects article p { font-size: 15px; color: var(--muted); line-height: 1.8; margin-top: 14px; }
.system-finding-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; min-height: 44px; }
.system-section { margin-top: 44px; }
.system-section-heading { margin-bottom: 24px; }
#main .system-section-heading h2 { font-size: 29px; line-height: 1.4; margin: 10px 0 13px; }
#main .system-section-heading p { color: var(--muted); font-size: 16px; line-height: 1.8; max-width: 70ch; }
.system-role-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.system-role-grid > article { border-top: 1px solid var(--line); padding: 21px 0 0; }
#main .system-role-grid h3 { font-size: 20px; line-height: 1.4; margin: 0 0 13px; }
#main .system-role-grid p { color: var(--muted); font-size: 16px; line-height: 1.8; }
.system-reading-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 32px; }
.system-explanation-cards { display: grid; gap: 20px; }
.system-explanation-cards > article { padding: 22px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); }
#main .system-explanation-cards h3 { font-size: 20px; line-height: 1.5; margin: 0 0 14px; }
#main .system-explanation-cards p { font-size: 16px; line-height: 1.8; color: var(--muted); }
.system-source-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 17px; }
.system-source-chips a { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 3px; font-size: 12px; line-height: 1.6; }
.system-source-chips a:hover { border-color: var(--green); color: var(--green); }
.system-observables .system-explanation-cards { grid-template-columns: repeat(3,minmax(0,1fr)); }
.system-limits { border-left: 3px solid var(--accent); padding: 24px 28px; background: var(--card); }
.system-limits .system-section-heading { margin-bottom: 18px; }
.system-limits .system-summary-list { max-width: 85ch; }
.system-complete-evidence { margin-top: 46px; }
.system-register-group { border: 1px solid var(--line); background: var(--card); border-radius: 4px; margin-top: 14px; }
.system-register-group > summary { cursor: pointer; padding: 20px 23px; font-size: 17px; line-height: 1.6; min-height: 44px; }
.system-register-group > summary > span { color: var(--muted); font-size: 13px; display: inline-block; margin-left: 17px; }
.system-register-relationship { padding: 24px; border-top: 1px solid var(--line); scroll-margin-top: 115px; }
#main .system-register-relationship h3 { font-size: 23px; line-height: 1.5; margin: 18px 0 12px; }
#main .system-register-relationship > p { font-size: 16px; line-height: 1.85; max-width: 82ch; margin: 14px 0; }
.system-register-introduction { padding: 23px; border-top: 1px solid var(--line); }
#main .system-register-introduction > p { font-size: 16px; line-height: 1.8; max-width: 82ch; }
.system-register-introduction .system-example-effects { margin-top: 0; padding-top: 0; border: 0; }
.system-source-register > .system-source-list { border-top: 1px solid var(--line); padding: 10px 24px 16px; }
.system-related-briefings { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.system-related-briefings a { position: relative; display: flex; flex-direction: column; border-top: 1px solid var(--line); padding: 21px 28px 15px 0; }
.system-related-briefings a > span { font: 500 12px/1.8 var(--mono); color: var(--green); }
.system-related-briefings strong { font-size: 17px; font-weight: 500; line-height: 1.65; margin-top: 13px; }
.system-related-briefings .icon { position: absolute; right: 0; top: 24px; }
.system-profile-footer { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 23px; padding: 10px 0 24px; }
.system-profile-footer .text-link { min-height: 44px; font-size: 14px; }
.system-connection-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.system-connection { display: grid; grid-template-columns: 24px minmax(0,1fr) 18px; align-items: start; gap: 14px; padding: 22px; border: 1px solid var(--line); background: var(--card); border-radius: 4px; }
.system-connection > span { color: var(--green); }
#main .system-connection h3 { font-size: 20px; line-height: 1.4; margin: 0 0 10px; }
#main .system-connection p { font-size: 15px; color: var(--muted); line-height: 1.8; margin: 0; }
.system-connection:hover { border-color: var(--green); }
.system-profile :is(a,p,li,dd,h1,h2,h3,h4),.system-profile-card :is(h3,p),.system-connection :is(h3,p) { overflow-wrap: anywhere; }
.system-profile :is(section,article,nav,figure,div) { min-width: 0; }

@media (max-width: 1100px) {
  .system-profile-card { padding: 22px; }
  .system-profile-grid { gap: 15px; }
  .system-explorer { padding: 22px; }
  .system-explorer-controls { flex-direction: column; }
  .system-view-options { max-width: 100%; }
  .system-inspection-grid { grid-template-columns: minmax(225px,.8fr) minmax(0,1.2fr); gap: 18px; }
  .system-selected-evidence { padding: 20px; }
  .system-observables .system-explanation-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .system-profile-grid,.system-learning-path,.system-primer-grid,.system-reading-grid { grid-template-columns: 1fr; }
  .system-profile-grid { gap: 18px; }
  .system-profile-card { padding: 25px; }
  .system-card-top { margin-bottom: 16px; }
  .system-learning-path { gap: 24px; }
  .system-learning-path > article + article { border-top: 1px solid var(--line); padding-top: 21px; }
  .system-primer-grid { gap: 0; margin-bottom: 20px; }
  .system-role-grid,.system-related-briefings { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .system-inspection-grid { grid-template-columns: 1fr; }
  .system-relationship-nav ol { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .system-relationship-nav li + li { margin: 0; }
  .system-relationship-nav a { height: 100%; }
  .system-map-svg { display: none; }
  .system-mobile-map { display: block; margin: 23px 0; }
  .system-mobile-map ul { display: flex; flex-wrap: wrap; gap: 9px; list-style: none; padding: 0; margin: 14px 0 0; }
  .system-mobile-map li { margin: 0; background: var(--paper); border: 1px solid var(--line); padding: 8px 11px; font-size: 14px; line-height: 1.7; border-radius: 3px; }
  .system-map-legend { margin-top: 14px; }
  .systems-entry > .section-heading { flex-direction: column; gap: 14px; }
  .systems-entry > .section-heading > .text-link { margin: 0; }
  .system-connection-grid { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .systems-entry { margin: 32px 0; }
  #main .system-heading > p { font-size: 17px; }
  .system-profile-meta { gap: 10px; align-items: flex-start; flex-direction: column; }
  .system-profile-card,.system-explorer { padding: 19px; }
  #main .system-profile-card h3 { font-size: 24px; }
  .system-scope-note { padding: 18px; }
  .system-scope-note dl { grid-template-columns: 1fr; gap: 12px; }
  .system-view-options { width: 100%; }
  .system-view-options a { flex: 1 1 100%; justify-content: flex-start; }
  .system-relationship-nav ol,.system-role-grid,.system-example-effects > div,.system-related-briefings,.system-observables .system-explanation-cards { grid-template-columns: 1fr; }
  .system-relationship-nav a { padding: 14px 11px; }
  .system-selected-evidence { padding: 19px; }
  #main .system-selected-evidence h3 { font-size: 24px; }
  .system-evidence-top { gap: 10px; }
  .system-reading-note { padding: 22px; grid-template-columns: 1fr; gap: 12px; }
  .system-reading-note > div:first-child { display: none; }
  .system-limits { padding: 22px; }
  .system-register-group > summary { padding: 18px; font-size: 16px; }
  .system-register-group > summary > span { display: block; margin: 8px 0 0 17px; }
  .system-register-relationship,.system-register-introduction { padding: 20px; }
  .system-source-register > .system-source-list { padding-inline: 19px; }
  .system-profile-footer { flex-direction: column; align-items: flex-start; gap: 8px; }
  .system-profile .eyebrow,.systems-entry .eyebrow { font-size: 12px; letter-spacing: .1em; }
}
@media (prefers-reduced-motion: reduce) {
  .system-profile-card { transition: none; }
}
@media print {
  .system-profile-grid,.system-role-grid,.system-primer-grid,.system-reading-grid,.system-learning-path,.system-example-effects > div,.system-related-briefings,.system-connection-grid { display: block; }
  .system-profile-card,.system-explanation-cards article,.system-role-grid article,.system-example-effects article { break-inside: avoid; margin-bottom: 15px; }
  .system-explorer { background: transparent; padding: 0; border: 0; }
  .system-view-options,.system-relationship-nav,.system-selected-evidence,.system-profile-footer,.system-map-svg,.system-map-legend { display: none; }
  .system-mobile-map { display: block; }
  .system-mobile-map ul { display: block; }
  .system-inspection-grid { display: none; }
  .system-register-group,.system-register-relationship,.system-register-introduction { border: 0; background: transparent; padding: 0; }
  .system-register-group { margin: 25px 0; }
  .system-register-group > summary { font-size: 20px; font-weight: 600; padding: 0; }
  .system-register-relationship { break-inside: avoid; margin: 22px 0; }
  .system-register-group > :not(summary),.system-finding-evidence details > :not(summary) { display: block !important; }
  .system-status,.system-source-chips a { color: #111; border-color: #777; }
  .system-source-chips a { padding: 0 8px; min-height: 0; }
  .system-scope-note,.system-reading-note,.system-limits { background: transparent; }
  .system-section { margin-top: 28px; }
}
