@import url('/calculator-base.css');
.run-list { display:grid; gap:.65rem; }
.run-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.55rem; align-items:end; padding:.75rem; border:1px solid var(--line); border-radius:8px; background:#f8fbfb; }
.run-row > .field:first-child { grid-column:1; grid-row:1; }
.run-row > .field:nth-child(2) { grid-column:1; grid-row:2; }
.run-row > .remove-run { grid-column:2; grid-row:1; align-self:end; }
.run-row button { min-height:42px; padding:0 .65rem; border:1px solid #c7d7dc; border-radius:7px; color:#6a7e87; background:white; font:600 .7rem Poppins,sans-serif; cursor:pointer; }
.method-strip { display:flex; flex-wrap:wrap; gap:.45rem; margin-top:1rem; }
.method-strip span { padding:.32rem .5rem; border:1px solid #cee1e3; border-radius:5px; color:#4e6c79; background:white; font-size:.66rem; font-weight:600; }
.flow-arrows path { stroke:#1e9eaa; stroke-width:10; stroke-linecap:round; fill:none; }
.flow-arrows circle { fill:#dff4f4; stroke:var(--blue); stroke-width:3; }
@media(max-width:650px){.run-row{grid-template-columns:1fr}.run-row > .field:first-child,.run-row > .field:nth-child(2),.run-row > .remove-run{grid-column:1;grid-row:auto}.run-row > .remove-run{justify-self:start}}

/* Pipe Size Calculator visual structure: page chrome, results, reading column and print view. */
.page-intro { padding: clamp(1.35rem, 3vw, 2.5rem) clamp(1.25rem, 8vw, 10rem) 3.4rem; background: transparent; }
.breadcrumb { align-items: center; margin-bottom: 1.35rem; font-size: .8rem; }
.breadcrumb-home { display: inline-flex; align-items: center; gap: .3rem; text-decoration: none; }
.breadcrumb-home svg { width: .9rem; height: .9rem; flex: 0 0 .9rem; }
.page-intro h1 { max-width: none; }
.page-intro > p:last-child { max-width: none; }
.calculator-shell, .results-section { width: min(75%, 1050px); max-width: none; padding: 0; }
.calculator-shell { margin-top: -1.1rem; }
.calculator-layout input, .calculator-layout select { border: 1px solid #c7d7dc; }
.calculator-layout select { padding-right: 2.75rem; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230b3150' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; background-size: .8rem; }
.calculator-layout input:focus-visible, .calculator-layout select:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.mode-tabs { border-color: var(--line); }
.mode-tab { min-height: 64px; font-size: .78rem; }
.mode-tab small { margin-top: .08rem; font-size: .64rem; }
.calculator-layout { grid-template-columns: minmax(0, 1fr); }
.calculator-form legend { display: flex; align-items: center; gap: .5rem; }
.calculator-form legend span { flex: 0 0 25px; margin-right: 0; line-height: 1; }
.run-row { border-color: var(--line); background: #f8fbfb; }
.stopwatch-control { display: flex; align-items: center; gap: .55rem; margin-top: .45rem; }
.run-timer { min-height: 1.9rem !important; padding: .32rem .55rem !important; color: #087e77 !important; background: white !important; font-size: .66rem !important; }
.run-timer[aria-pressed="true"] { border-color: #00a69b !important; color: white !important; background: #00a69b !important; }
.stopwatch-readout { min-width: 4.2rem; color: #526f7e; font-size: .72rem; font-variant-numeric: tabular-nums; }
.before-test { margin: -.2rem 0 1.1rem; padding: .85rem 1rem; border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 8px; color: #526f7e; background: #f7fbfb; font-size: .82rem; }
.before-test strong { color: var(--navy); font-size: .86rem; }
.before-test ul { display: grid; gap: .28rem; margin: .5rem 0 0; padding-left: 1.15rem; }
.timing-quality { margin-top: .5rem; color: #526f7e; }
.velocity-references { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .65rem; }
.velocity-references button { min-height: 2rem; padding: .38rem .6rem; border: 1px solid var(--line); border-radius: 6px; color: #087e77; background: #f7fbfb; font: 600 .7rem Poppins, sans-serif; cursor: pointer; }
.velocity-references button:hover, .velocity-references button:focus-visible { border-color: #00a69b; color: white; background: #00a69b; }
.results-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; }
.results-card .result-header { padding: 1.35rem 1.45rem 0; }
.results-card .primary-result { margin-top: 1rem; }
.result-actions, .results-card .copy-button { display: inline-flex; align-items: center; justify-content: center; gap: .42rem; }
.result-actions { flex-wrap: wrap; }
.results-card .copy-button svg { width: .95rem; height: .95rem; flex: 0 0 .95rem; }
.results-card .result-action-secondary { border: 1px solid var(--line); color: var(--navy); background: white; }
.results-card .result-action-secondary:hover { color: white; border-color: var(--navy); background: var(--navy); }
.results-card .result-note, .results-card .math-details { margin-right: 1.25rem; margin-left: 1.25rem; }
.result-handoff { display: inline-flex; align-items: center; gap: .42rem; margin: 1rem 1.25rem 1.25rem; padding: .62rem .9rem; border: 1px solid #00a69b; border-radius: 7px; color: white; background: #00a69b; font: 700 .78rem Poppins, sans-serif; cursor: pointer; }
.result-handoff:hover, .result-handoff:focus-visible { border-color: var(--navy); color: white; background: var(--navy); }
.results-card .primary-result p.result-meaning { display: grid; gap: .16rem; margin: .7rem 0 0; padding-top: .7rem; border-top: 1px solid rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .84); font-size: .69rem; font-weight: 400; line-height: 1.45; letter-spacing: 0; }
.result-meaning strong { color: white; font-size: .64rem; letter-spacing: .06em; text-transform: uppercase; }
.results-card .math-details { margin-bottom: 1.25rem; background: white; }
.results-card.has-pressure-breakdown .metric-grid { border-radius: 0; }
.pressure-breakdown { display: grid; grid-template-columns: minmax(180px, .9fr) minmax(0, 2.1fr); gap: 1rem; padding: 1.15rem 1.25rem; border: 1px solid var(--line); border-top: 0; color: #526f7e; background: #f7fbfb; }
.pressure-breakdown[hidden] { display: none; }
.pressure-breakdown h3 { margin: 0 0 .25rem; color: var(--navy); font-size: .94rem; }
.pressure-breakdown > div > p { margin: 0; font-size: .73rem; line-height: 1.55; }
.pressure-breakdown-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: white; }
.pressure-breakdown-grid article { min-width: 0; padding: .75rem; border-right: 1px solid var(--line); }
.pressure-breakdown-grid article:last-child { border-right: 0; }
.pressure-breakdown-grid span, .pressure-breakdown-grid small { display: block; color: #67808d; font-size: .62rem; line-height: 1.4; }
.pressure-breakdown-grid span { margin-bottom: .25rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.pressure-breakdown-grid strong { display: block; color: var(--navy); font-size: .88rem; line-height: 1.25; }
.pressure-breakdown-grid small { margin-top: .3rem; }

.page-body-layout { display: grid; grid-template-columns: minmax(0, 1fr) 245px; grid-template-areas: "content sidebar"; gap: 3.5rem; align-items: start; width: min(75%, 1050px); margin: 3.4rem auto 0; padding-bottom: 3rem; }
.page-content { grid-area: content; min-width: 0; }
.page-sidebar { grid-area: sidebar; position: sticky; top: 1.5rem; }
.page-content .visual-section, .page-content .content-section { width: auto; max-width: none; margin: 0; padding: 0; }
.page-content > * + * { margin-top: 3rem !important; }
.page-content .visual-card { padding: 1.5rem; border-color: var(--line); border-radius: 14px; box-shadow: none; }
.page-content .visual-card p { font-size: .88rem; }
.page-content .content-section > h2 { margin-bottom: 1.15rem; }
.page-content .copy-grid { border-color: var(--line); }
.page-content .copy-grid article { background: #f7fbfb; }
.page-content .faq-grid { grid-template-columns: 1fr; }
.page-content .faq-grid details { background: white; }
.page-content .table-wrap { margin-top: 0; }
#examples .table-wrap th { font-size: .72rem; }
#examples .table-wrap td { font-size: .86rem; line-height: 1.6; }
#faq-title .faq-grid summary { font-size: .9rem; }
#faq-title .faq-grid p { font-size: .86rem; line-height: 1.65; }
#next-tool .section-lede { font-size: 1rem; line-height: 1.7; }
#methodology .reviewed-date { font-size: .84rem; }
#methodology .reference-table th { font-size: .72rem; }
#methodology .reference-table td { font-size: .86rem; line-height: 1.6; }
#methodology .methodology-limit { font-size: .86rem; line-height: 1.65; }
.pressure-intro { max-width: 48rem; margin: -.25rem 0 1.1rem; }
.pressure-limit { max-width: 48rem; margin: -0.5rem 0 1.1rem; }
.pressure-coefficient { margin: .38rem 0 0; color: #526f7e; }

.page-content .flow-diagrams { width: auto; max-width: none; margin: 0; }
.flow-diagrams { display: grid; gap: 2.75rem; }
.flow-diagram { display: grid; gap: 1rem; }
.flow-diagram + .flow-diagram { margin-top: .75rem; }
.flow-diagram-heading .eyebrow { margin: 0 0 .55rem; }
.flow-diagram-heading h2 { margin: 0; color: var(--navy); font-size: clamp(1.45rem, 2.5vw, 2rem); line-height: 1.12; letter-spacing: -.035em; }
.flow-illustration { display: grid; gap: .7rem; width: min(100%, 560px); margin: .15rem auto 0; }
.flow-illustration img { display: block; width: 100%; height: auto; max-height: none; object-fit: contain; }
.flow-illustration figcaption { color: #647d89; font-size: .76rem; line-height: 1.5; }
.flow-diagram-copy p { max-width: none; margin: 0; color: #526f7e; font-size: .92rem; line-height: 1.7; }
.flow-diagram-link { display: inline-flex; align-items: center; gap: .45rem; margin-top: 1rem; padding: .62rem .9rem; border: 1px solid #00a69b; border-radius: 7px; color: white; background: #00a69b; font-size: .8rem; font-weight: 700; line-height: 1.25; text-decoration: none; }
.flow-diagram-link:hover, .flow-diagram-link:focus-visible { border-color: var(--navy); color: white; background: var(--navy); text-decoration: none; }
.flow-diagram-link span { font-size: 1.05em; line-height: 1; }

.technical-section { margin-top: 2.2rem !important; }
.technical-details { border: 1px solid var(--line); border-radius: 12px; background: white; }
.technical-details summary { display: flex; align-items: center; justify-content: space-between; min-height: 3.75rem; padding: .8rem 1.15rem; color: var(--navy); font-size: 1rem; font-weight: 600; cursor: pointer; list-style: none; }
.technical-details summary::-webkit-details-marker { display: none; }
.technical-details summary::after { width: 1.35rem; height: 1.35rem; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--blue); content: '+'; font-size: 1.05rem; font-weight: 500; line-height: 1; }
.technical-details[open] summary::after { content: '–'; }
.technical-details > div { padding: 0 1.15rem 1.15rem; }
.technical-details > div > p { max-width: 48rem; margin: 0 0 1rem; color: #526f7e; font-size: .9rem; }
.technical-details .copy-grid h3 { font-size: 1rem; }
.technical-details .copy-grid p { font-size: .86rem; }
.reviewed-date { margin: -.8rem 0 1rem; color: #647d89; font-size: .76rem; }
.reference-table td:first-child { width: 30%; color: var(--navy); font-weight: 600; }
.reference-table td { vertical-align: top; }
.methodology-limit { display: grid; gap: .25rem; margin: 1rem 0 0; padding: 1rem 1.1rem; border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 9px; color: #526f7e; background: #f7fbfb; font-size: .78rem; }
.methodology-limit strong { color: var(--navy); font-size: .9rem; }

.page-toc { margin: 0; padding: 1.15rem; border: 1px solid #00a69b; border-radius: 12px; color: white; background: #00a69b; }
.toc-intro { padding: .2rem 0; }
.toc-intro > p { margin: 0; }
.page-toc-label { margin: 0 0 .28rem; color: white; font-size: .96rem; font-weight: 700; letter-spacing: -.02em; text-transform: none; }
.toc-intro > p:last-child { margin-bottom: .9rem; color: white; font-size: .78rem; line-height: 1.5; }
.page-toc ol { display: grid; grid-template-columns: 1fr; gap: .5rem; margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.page-toc li { min-width: 0; padding: 0; color: inherit; font-size: .83rem; line-height: 1.35; counter-increment: toc; }
.page-toc li::before { display: none; }
.page-toc a { display: flex; align-items: center; gap: .6rem; min-height: 2.7rem; padding: .55rem .7rem; border: 0; border-radius: 8px; color: white; background: rgba(255, 255, 255, .1); font-weight: 400; text-decoration: none; }
.page-toc a::before { display: inline-grid; width: 1.75rem; height: 1.75rem; place-items: center; flex: 0 0 1.75rem; border-radius: 50%; color: #007c73; background: white; content: counter(toc, decimal-leading-zero); font-size: .59rem; font-weight: 700; letter-spacing: .04em; }
.page-toc a:hover { border-color: white; color: white; background: rgba(255, 255, 255, .2); text-decoration: none; }
.page-toc a:focus-visible { outline: 2px solid white; outline-offset: 2px; color: white; text-decoration: none; }

.print-report { display: none; }
@media print {
  @page { margin: 12mm; }
  * { box-shadow: none !important; }
  body { color: #0b3150; background: white; }
  .site-header, .page-intro, .calculator-shell, .page-body-layout, .site-footer { display: none !important; }
  .results-section { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; }
  .print-report { display: block !important; margin-bottom: 1.25rem; }
  .print-report-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: .65rem; border-bottom: 2px solid #00a69b; color: #0b3150; font-size: .75rem; }
  .print-report-header p { margin: 0; font-weight: 700; }
  .print-report-header span { color: #526e7c; }
  .print-report-title { margin: .9rem 0 1rem; color: #0b3150; font-size: 1.8rem; font-weight: 700; letter-spacing: -.04em; }
  .print-input-summary { padding: .9rem 1rem; border: 1px solid #bdd9dc; border-radius: 8px; background: #f5fafa; break-inside: avoid; }
  .print-input-summary h2 { margin: 0 0 .65rem; color: #0b3150; font-size: .9rem; }
  .print-input-summary dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem .9rem; margin: 0; }
  .print-input-summary dl > div { min-width: 0; }
  .print-input-summary dt { margin-bottom: .12rem; color: #587481; font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  .print-input-summary dd { margin: 0; color: #0b3150; font-size: .77rem; font-weight: 600; overflow-wrap: anywhere; }
  .results-card { border-color: #bdd9dc; border-radius: 10px; break-inside: avoid; }
  .results-card .result-header { padding: 1rem 1rem 0; }
  .results-card .result-header h2 { font-size: 1.35rem; }
  .results-card .copy-button, .results-card .result-handoff, .results-card .math-details { display: none !important; }
  .results-card .primary-result { margin-top: .8rem; padding: 1.15rem; background: #0d3c60 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .results-card .primary-result p { font-size: 2rem; }
  .results-card .metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); border-color: #bdd9dc; }
  .results-card .metric-grid article { min-height: 0; padding: .85rem; border-color: #bdd9dc; }
  .pressure-breakdown { grid-template-columns: .8fr 2.2fr; padding: .9rem; border-color: #bdd9dc; }
  .pressure-breakdown-grid { border-color: #bdd9dc; }
  .pressure-breakdown-grid article { padding: .65rem; border-color: #bdd9dc; }
  .results-card .result-note { margin: 1rem; break-inside: avoid; }
}

@media (max-width: 960px) {
  .calculator-shell, .results-section, .page-body-layout { width: min(75%, 1050px); }
  .calculator-layout { grid-template-columns: 1fr; }
  .page-body-layout { grid-template-columns: minmax(0, 1fr) 220px; gap: 2rem; }
}

/* Keep the hero's left and right edges exactly aligned with the calculator. */
@media (min-width: 768px) {
  .page-intro {
    width: min(75%, 1050px);
    max-width: none;
    margin-right: auto;
    margin-left: auto;
    padding-right: 0;
    padding-left: 0;
  }

}

@media (max-width: 767px) {
  .page-intro { padding-top: 1.25rem; padding-bottom: 3.2rem; }
  .breadcrumb { margin-bottom: 1.1rem; }
  .calculator-shell, .results-section, .page-body-layout { width: auto; margin-right: clamp(1.25rem, 8vw, 10rem); margin-left: clamp(1.25rem, 8vw, 10rem); }
  .calculator-shell { margin-top: -1.2rem; }
  .page-body-layout { display: grid; grid-template-columns: 1fr; grid-template-areas: "sidebar" "content"; gap: 2.5rem; padding-bottom: 3rem; }
  .page-sidebar { position: static; }
  .page-content > * + * { margin-top: 2.5rem !important; }
  .mode-tabs, .mode-tabs.three { grid-template-columns: 1fr; }
  .mode-tab { border-right: 0; border-bottom: 1px solid var(--line); }
  .mode-tab:last-child { border-bottom: 0; }
  .field-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .results-card .result-header { align-items: flex-start; flex-direction: column; }
  .results-card .copy-button { width: 100%; }
  .results-card .metric-grid { grid-template-columns: 1fr; }
  .results-card .metric-grid article { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .results-card .metric-grid article:last-child { border-bottom: 0; }
  .pressure-breakdown { grid-template-columns: 1fr; margin: 0; padding: .9rem; }
  .pressure-breakdown-grid { grid-template-columns: 1fr; }
  .pressure-breakdown-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
  .pressure-breakdown-grid article:last-child { border-bottom: 0; }
  .results-card .result-note, .results-card .math-details { margin-right: .9rem; margin-left: .9rem; }
  .result-handoff { width: calc(100% - 1.8rem); justify-content: center; margin-right: .9rem; margin-left: .9rem; }
  .page-content .visual-card { grid-template-columns: 1fr; padding: 1.15rem; }
  .flow-diagrams { gap: 2.25rem; }
  .flow-diagram { gap: .9rem; }
}
