.pq-sheet {
  --pq-paper: #f7fbfd;
  --pq-line: #1774a7;
  --pq-ink: #15384f;
  --pq-reject: #775c31;
  background: var(--pq-paper); color: var(--pq-ink); min-width: 0;
  border-block: 1px solid #a7c1cf;
  container: pq-sheet / inline-size;
}
.pq-modes { min-width: 0; }
.pq-mode {
  min-width: 0; padding: clamp(12px, 1.35vw, 25px);
  background-image: radial-gradient(#b2c9d550 .75px, transparent .85px);
  background-size: 12px 12px;
  container: pq-mode / inline-size;
}
.pq-mode + .pq-mode { border-top: 1px solid #bed3de; }
#route-view .pq-mode h4,.pq-mode h4 {
  margin: 0 0 .4rem; font: 600 clamp(1.04rem, 1rem + .35vw, 1.3rem)/1.2 var(--equipment-title, sans-serif);
  color: #124366;
}
.pq-line { margin: 0; padding: 0; list-style: none; }
.pq-station {
  position: relative; isolation: isolate; min-width: 0;
  display: grid; grid-template-columns: 66px minmax(0,1fr); column-gap: 15px; align-items: center;
  min-height: 60px;
}
.pq-in-joint,.pq-out-joint { display: block; position: absolute; left: 0; width:66px; height:50%; overflow:visible; }
.pq-in-joint { top: 0; }
.pq-out-joint { top: 50%; }
.pq-in-joint path,.pq-out-joint path { fill: none; stroke:var(--pq-line); stroke-width:1.6; vector-effect:non-scaling-stroke; }
.pq-out-joint .pq-tip { fill:var(--pq-line); stroke:none; }
.pq-station:first-child .pq-in-joint,.pq-station:last-child .pq-out-joint { display:none; }
.pq-drawing { grid-row: 1 / span 2; grid-column: 1; width:52px; margin-left:6px; display: block; position: relative; z-index: 1; }
.pq-symbol {
  display: block; width: 100%; height: auto; color: #185173; fill:none;
  stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.pq-symbol .pq-fill { fill: #e2f0f6; }
.pq-symbol-sand .pq-fill { fill: #eee7d7; }
.pq-symbol-carbon .pq-fill { fill: #d1dee3; }
.pq-symbol-resin .pq-fill,.pq-symbol-brine .pq-fill { fill: #e3edda; }
.pq-symbol-product,.pq-symbol-softWater { color: #086b87; }
.pq-station-copy { grid-column: 2; grid-row: 1 / span 2; display:block; padding-block: 7px; min-width: 0; }
.pq-station-copy strong,.pq-aux strong { display:block; font-size: .99rem; font-weight: 600; line-height: 1.18; color: #163d56; }
.pq-station-copy small { display: block; margin-top: 3px; color: #405869; font-size: .875rem; line-height: 1.3; }
.pq-has-reject { min-height:83px; }
.pq-reject {
  position:absolute; z-index:2; display:block; width:0; top:1px; bottom:calc(50% + 12.2px); left:48.25px;
  color:var(--pq-reject); font-size:.72rem; font-weight:550; line-height:1.2;
}
.pq-reject span { display:block; position:absolute; top:0; left:0; transform:translateX(-50%); white-space:nowrap; }
.pq-reject::before {
  content:''; position:absolute; width:0; left:0; bottom:0; top:1.35em; border-left:1.5px dashed var(--pq-reject);
}
.pq-reject::after { content:''; display:block; position:absolute; left:-3px; top:1.1em; border:3.5px solid transparent; border-bottom:5px solid var(--pq-reject); }
.pq-mode .pq-return { margin: .6rem 0 0; color: #3c5667; font-size: .88rem; }
.pq-equipment { display: flex; flex-wrap: wrap; border-top: 1px solid #c1d5e0; background: #edf5f9; }
.pq-aux { flex: 1 1 300px; display: grid; grid-template-columns: 49px minmax(0,1fr); gap: 10px; align-items: center; min-width: 0; padding: 12px clamp(12px, 1.4vw, 25px); }
.pq-aux + .pq-aux { border-left: 1px solid #c1d5e0; }
.pq-aux .pq-symbol { width: 49px; }
.pq-aux p { margin: 3px 0 0; font-size: .89rem; line-height: 1.35; color: #3a5465; max-width: 74ch; }
.pq-edi-branch { display:flex; flex-wrap:wrap; align-items:center; gap:2px 4px; margin-block:4px; font-weight:550; color:#154f75; }
.pq-edi-branch span { display:inline-flex; gap:4px; align-items:center; }
.pq-edi-branch svg { width:25px; height:10px; fill:none; stroke:#27779a; stroke-width:1.7; }
@container pq-sheet (min-width:1140px) {
  .pq-dual { display: grid; grid-template-columns: 1fr 1fr; }
  .pq-dual .pq-mode + .pq-mode { border-top: 0; border-left: 1px solid #bed3de; }
}
@container pq-sheet (max-width:624px) {
  .pq-equipment { display: block; }
  .pq-aux + .pq-aux { border-left: 0; border-top: 1px solid #c1d5e0; }
}
@container pq-mode (min-width:535px) {
  .pq-line { --pq-icon: clamp(48px, 6cqi, 68px); --pq-top: 26px; display: grid; grid-template-columns: repeat(var(--pq-n), minmax(0,1fr)); }
  .pq-line:not(:has(.pq-has-reject)) { --pq-top: 3px; }
  .pq-station { display: block; padding-top: var(--pq-top); text-align:center; }
  .pq-in-joint,.pq-out-joint { display:none; }
  .pq-drawing { width: var(--pq-icon); height: var(--pq-icon); margin-inline: auto; }
  .pq-station:not(:last-child)::before {
    content:''; position:absolute;
    border-left: 0; border-top: 2px solid var(--pq-line);
    left: calc(50% + var(--pq-icon) / 2); width: calc(100% - var(--pq-icon));
    height: 0; top: calc(var(--pq-top) + var(--pq-icon) / 2 - 1px);
  }
  .pq-station:not(:last-child)::after {
    content:''; position:absolute; width:0; height:0;
    border: 4px solid transparent; border-left: 6px solid var(--pq-line);
    left: calc(100% - 2px); top: calc(var(--pq-top) + var(--pq-icon) / 2 - 4px); bottom: auto;
  }
  .pq-station-copy,.pq-has-reject .pq-station-copy { padding: 3px 5px 1px; }
  .pq-station-copy small { margin-inline: auto; max-width: 21ch; }
  .pq-reject { top:0; bottom:auto; left:calc(50% + var(--pq-icon) * .3125); height:calc(var(--pq-top) + var(--pq-icon) * .265625); font-size:.8rem; }
}
@container pq-mode (min-width:535px) and (max-width:800px) {
  .pq-long { --pq-icon: 42px; }
  .pq-long .pq-station-copy { padding-inline: 2px; }
  .pq-long .pq-station-copy strong { font-size: .89rem; overflow-wrap: anywhere; }
  .pq-long .pq-station-copy small { font-size: .8rem; }
  .pq-long .pq-reject { font-size:.71rem; }
}
