/*=========================================================
  PoppetValveStackup.html: only what kc-calc.css lacks.
  Frame, groups, result boxes and reference cards come from
  css/kc-calc.css (the spring calculator look).
=========================================================*/
.pv-main { max-width: 64rem; margin: 0 auto; padding: 0 12px 40px; }
.pv-calc { max-width: 64rem; font-family: "Roboto", "Roboto Fallback", Arial, sans-serif; }
.pv-lead { font-size: 15px; line-height: 1.55; color: #3a454b; max-width: 72ch; margin: 18px auto 18px; text-align: center; }

/* segmented switches: shape only; colours come from site-chrome.css */
.pv-calc .sq-seg { display: inline-flex; border: 1px solid #8fa6ae; border-radius: 4px; overflow: hidden; width: fit-content; flex-wrap: wrap; }
.pv-calc .sq-seg button { appearance: none; border: 0; font: 600 12.5px/1 Roboto, Arial, sans-serif; padding: 6px 11px; cursor: pointer; }
.pv-tb-gap { flex: 1 1 0; }
.pv-calc .grp-title.pv-gt { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.pv-calc .grp-title select { font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 500; height: 26px; border-radius: 5px; border: 1.5px solid #434343; background: #fff; }
.pv-calc [hidden] { display: none !important; }

/* diagram */
.pv-diagram { padding: 4px; }
.pv-calc .diagram svg.pv-svg { max-width: 100%; }
.pv-svg { font-family: "Roboto", Arial, sans-serif; }
.pv-svg .pv-body { fill: url(#pvHb); stroke: #1C2227; stroke-width: 1.4; stroke-linejoin: round; }
.pv-svg .pv-cap { fill: url(#pvHc); stroke: #1C2227; stroke-width: 1.4; stroke-linejoin: round; }
.pv-svg .pv-pop { fill: url(#pvHp); stroke: #7d5e1f; stroke-width: 1.4; stroke-linejoin: round; }
.pv-svg .pv-thd { fill: none; stroke: #1C2227; stroke-width: 1; }
.pv-svg .pv-oring { fill: #2b2f33; }
.pv-svg .pv-wire { fill: #8fb9c4; stroke: #1a6475; stroke-width: 1; }
.pv-svg .pv-wire-l { stroke: #1a6475; stroke-width: .7; opacity: .55; }
.pv-svg .pv-axis { stroke: #5A6168; stroke-width: .7; stroke-dasharray: 10 3 2 3; }
.pv-svg .pv-contact { fill: #cc5500; }
.pv-svg .pv-contact-o { fill: none; stroke: #cc5500; stroke-width: 1.2; }
.pv-svg .pv-ext { stroke: #8fa6ae; stroke-width: .8; }
.pv-svg .pv-dim { stroke-width: 1.1; }
.pv-svg .pv-dim-k { stroke: #1C2227; }
.pv-svg .pv-dim-o { stroke: #cc5500; }
.pv-svg .pv-dim-b { stroke: #1a6475; }
.pv-svg .pv-dt { font-size: 12px; font-weight: 700; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.pv-svg .pv-dt-k { fill: #1C2227; }
.pv-svg .pv-dt-o { fill: #cc5500; }
.pv-svg .pv-dt-b { fill: #1a6475; }
.pv-svg .pv-lbl { font-size: 11px; fill: #3a454b; paint-order: stroke; stroke: rgba(255,255,255,.85); stroke-width: 3px; }
.pv-svg .pv-lbl-o { fill: #cc5500; font-weight: 700; }
.pv-svg .pv-note { font-size: 10.5px; fill: #5A6168; }

/* input tables */
.pv-tw { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.pv-in { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.pv-in thead th { font-size: 11px; font-weight: 600; color: #5a6168; text-align: center; padding: 3px 4px; border-bottom: 1px solid #c0c0c0; }
table.pv-in thead th:first-child { text-align: left; }
table.pv-in tbody th { font-weight: 400; color: #333; text-align: left; padding: 3px 6px 3px 0; }
table.pv-in tbody th label { margin: 0; font-weight: 400; }
table.pv-in tbody th i { font-weight: 700; color: #1a6475; font-style: italic; }
table.pv-in td { padding: 3px 3px; vertical-align: middle; }
table.pv-in td[data-k] { font-size: 12px; color: #555; white-space: nowrap; padding-left: 6px; }
table.pv-in tbody tr { border-bottom: .5px solid #d6dde0; }
table.pv-in input, table.pv-in select { font-size: 12.5px; padding: 1px 5px; border-radius: 4px; border: 1.5px solid #434343; background: #fff; color: #000; height: 24px; width: 92px; text-align: right; font-family: inherit; }
table.pv-in select { width: 100%; max-width: 420px; text-align: left; }
table.pv-in input:focus, table.pv-in select:focus { outline: none; border-color: #1a6475; background: #e8f0f3; }
table.pv-in td.pv-pm { white-space: nowrap; }
table.pv-in td.pv-pm span { font-size: 12px; color: #555; margin: 0 4px; }
table.pv-in td.pv-pm input { width: 70px; }
table.pv-in td.pv-fixed { font-size: 11.5px; color: #8a959a; padding-left: 8px; }
.pv-row2 { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 10px; align-items: center; font-size: 12.5px; margin-bottom: 8px; max-width: 560px; }
.pv-row2 label { margin: 0; color: #333; }
.pv-row2 select { font-size: 12.5px; height: 26px; border-radius: 5px; border: 1.5px solid #434343; background: #fff; padding: 1px 4px; width: 100%; }
.pv-sub { font-size: 11.5px; font-weight: 700; color: #1a6475; text-transform: uppercase; letter-spacing: .06em; margin: 10px 0 4px; }
.pv-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0 14px; margin-top: 8px; background: #fff; border: 1px solid #c9d6da; border-radius: 6px; padding: 4px 10px; }
.pv-info > div { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; padding: 3px 0; border-bottom: .5px solid #e3eaed; }
.pv-info b { font-variant-numeric: tabular-nums; white-space: nowrap; color: #1a3a40; }
.pv-info:empty { display: none; }

/* result and contributor tables */
table.pv-res, table.pv-con { width: 100%; border-collapse: collapse; font-size: 12.5px; background: #fff; margin-top: 8px; font-variant-numeric: tabular-nums; }
table.pv-res th, table.pv-con th { font-weight: 600; }
table.pv-res thead th, table.pv-con thead th { background: #1d3f4b; color: #fff; font-size: 11.5px; padding: 5px 7px; text-align: right; white-space: nowrap; }
table.pv-res thead th:first-child, table.pv-con thead th:nth-child(-n+2) { text-align: left; }
table.pv-res thead th.pv-wc { background: #2b5563; }
table.pv-res thead th.pv-rss { background: #1a6475; }
table.pv-res td, table.pv-con td { padding: 4px 7px; text-align: right; border-bottom: 1px solid #e3eaed; white-space: nowrap; }
table.pv-res tbody th { text-align: left; font-weight: 500; color: #22343b; padding: 4px 7px; border-bottom: 1px solid #e3eaed; }
table.pv-con td:nth-child(-n+2) { text-align: left; white-space: normal; }
table.pv-res tbody tr:nth-child(even) > *, table.pv-con tbody tr:nth-child(even) > * { background: #f4f8f9; }
table.pv-res td.pv-bad { color: #b3362b; font-weight: 700; }
table.pv-con td small { color: #6a767b; font-size: 10.5px; }
table.pv-con tr.pv-zero td { color: #9aa4a8; }
table.pv-con tr.pv-tot td { font-weight: 700; border-top: 1.5px solid #1d3f4b; }
table.pv-con .pv-bar { display: inline-block; vertical-align: middle; width: 46px; height: 7px; margin-right: 6px; border-radius: 2px; background: linear-gradient(90deg, #2b5563 var(--w), #e3eaed var(--w)); }
table.pv-con .pv-bar-rss { background: linear-gradient(90deg, #1a6475 var(--w), #e3eaed var(--w)); }
.pv-status { margin-top: 10px !important; }
.pv-calc .res-box.pv-alarm { border-left-color: #cc2222; background: #fdf1f0; }
.sq-errbox { font-size: 13px; color: #b3362b; border: 1px solid #b3362b; border-radius: 4px; padding: 8px 10px; background: rgba(179,54,43,.05); margin-top: 10px; }
.pv-calc .bottom-bar a { color: #1a6475; text-decoration: underline; }

/* statistics panel (closed by default) */
.pv-stats > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 2px 0; }
.pv-stats > summary::-webkit-details-marker { display: none; }
.pv-stats > summary::before { content: ""; width: 0; height: 0; border-left: 7px solid #1a6475; border-top: 5px solid transparent; border-bottom: 5px solid transparent; transition: transform .15s; }
.pv-stats[open] > summary::before { transform: rotate(90deg); }
.pv-sum-t { font-size: 12px; font-weight: 600; color: #1a6475; text-transform: uppercase; letter-spacing: .06em; }
.pv-sum-h { font-size: 11.5px; color: #6a767b; }
.pv-stats[open] .pv-sum-h { display: none; }
.pv-stats[open] > summary { border-bottom: 1px solid #c0c0c0; padding-bottom: 5px; margin-bottom: 6px; }
.pv-st-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12.5px; margin: 8px 0; }
.pv-st-ctl label { margin: 0; color: #333; }
.pv-st-ctl select { font-size: 12.5px; height: 26px; border-radius: 5px; border: 1.5px solid #434343; background: #fff; padding: 1px 4px; max-width: 100%; }
.pv-st-ctl .pv-ck { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: #1d3f4b; }
.pv-st-ctl .pv-ck input { width: 15px; height: 15px; accent-color: #1a6475; margin: 0; }
.pv-mc-opts { display: inline-flex; flex-wrap: wrap; gap: 6px; }
table.pv-lim { max-width: 520px; }
.pv-stat { margin-top: 12px; }
.pv-bell { display: block; width: 100%; max-width: 760px; margin: 0 auto; height: auto; background: #fff; border: 1.5px solid #c9d6da; border-radius: 6px; font-family: "Roboto", Arial, sans-serif; }
.pv-bell .pv-curve { fill: none; stroke: #1a6475; stroke-width: 2; }
.pv-bell .pv-tail { fill: rgba(204,34,34,.28); }
.pv-bell .pv-hist { fill: #c9a464; opacity: .55; }
.pv-bell .pv-base { stroke: #5a6168; stroke-width: 1; }
.pv-bell .pv-v { stroke-width: 1.3; }
.pv-bell line.pv-v-wc { stroke: #5a6168; stroke-dasharray: 5 3; }
.pv-bell line.pv-v-spec { stroke: #cc2222; }
.pv-bell line.pv-v-mu { stroke: #1a6475; stroke-dasharray: 2 2; }
.pv-bell .pv-vt { font-size: 11px; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.pv-bell text.pv-v-wc { fill: #3a454b; }
.pv-bell text.pv-v-spec { fill: #b3362b; font-weight: 700; }
.pv-bell text.pv-v-mu { fill: #1a6475; font-weight: 700; }
table.pv-st { margin-top: 6px; }
table.pv-st tr.pv-wcrow td { text-align: left; color: #3a454b; }
table.pv-st small { color: #6a767b; font-size: 10.5px; }

/* phones: input rows stack the label over the values */
@media (max-width: 600px) {
  .pv-main { padding: 0 4px 30px; }
  .pv-calc .hdr { font-size: 19px; }
  .pv-tb-gap { display: none; }
  table.pv-in thead { display: none; }
  table.pv-in tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 3px 4px; padding: 5px 0; align-items: center; }
  table.pv-in tbody th { grid-column: 1 / -1; padding: 0; }
  table.pv-in td { padding: 0; min-width: 0; }
  table.pv-in td[colspan="4"] { grid-column: 1 / -1; }
  table.pv-in td[colspan="2"] { grid-column: span 2; }
  table.pv-in input { width: 100%; }
  table.pv-in td.pv-pm input { width: 70%; }
  .pv-row2 { grid-template-columns: 1fr; }
  table.pv-in tbody tr[hidden] { display: none !important; }
  table.pv-res tbody th { min-width: 150px; }
  table.pv-con td:nth-child(2) { min-width: 130px; }
}
@media print {
  .pv-calc .toolbar, #pvState, #pvConSel { display: none !important; }
}
